From 073edccf697c171ab15262f03c5397610beda71f Mon Sep 17 00:00:00 2001 From: eknauel Date: Tue, 25 Nov 2003 22:07:38 +0000 Subject: [PATCH] + check for yp_*() functions --- Makefile.am | 16 +--------------- configure.in | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/Makefile.am b/Makefile.am index fca5d53..6401003 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,15 +1 @@ -SUBDIRS= c - -scheme/load-yp.scm: - (echo '(user)'; \ - echo "(open 'dynamic-externals)"; \ - echo "(open 'external-calls)"; \ - echo '(run '; \ - echo " '(let ((initializer-name \"scsh_yp_main\")"; \ - echo ' (module-file "$(prefix)/lib/libscshyp.so"))'; \ - echo ' (dynamic-load module-file)'; \ - echo ' (call-external (get-external initializer-name))))'; \ - echo '(config)'; \ - echo '(load "yp-interfaces.scm")'; \ - echo '(load "yp-packages.scm")'; \ - ) > $@ +SUBDIRS= c scheme diff --git a/configure.in b/configure.in index 89cf304..5a23e89 100644 --- a/configure.in +++ b/configure.in @@ -2,12 +2,7 @@ AC_INIT(scsh-yp,1.0) AC_CONFIG_SRCDIR(configure.in) AM_INIT_AUTOMAKE -dnl AM_MAINTAINER_MODE - -AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL -AC_LIB_LTDL - AC_PROG_CC AC_ARG_WITH(scsh-includes, @@ -24,10 +19,34 @@ AC_ARG_WITH(scsh-libraries, scsh_libraries=/usr/local/lib/scsh) AC_SUBST(scsh_libraries) -AC_CHECK_FUNCS(yp_get_default_domain yp_bind yp_unbind) -AC_CHECK_FUNCS(yperr_string ypprot_err) -AC_CHECK_FUNCS(yp_match yp_order) -AC_CHECK_FUNCS(yp_master yp_first yp_next) +define([PREPEND], [[$2]="$[$2] [$1]"]) + +missing_yp_funs = "" + +AC_CHECK_FUNC(yp_get_default_domain, + [], PREPEND(yp_get_default_domain, missing_yp_funs)) +AC_CHECK_FUNC(yp_bind, + [], PREPEND(yp_bind, missing_yp_funs)) +AC_CHECK_FUNC(yp_unbind, + [], PREPEND(yp_unbind, missing_yp_funs)) +AC_CHECK_FUNC(yperr_string, + [], PREPEND(yperr_string, missing_yp_funs)) +AC_CHECK_FUNC(ypprot_err, + [], PREPEND(ypprot_err, missing_yp_funs)) +AC_CHECK_FUNC(yp_match, + [], PREPEND(yp_match, missing_yp_funs)) +AC_CHECK_FUNC(yp_order, + [], PREPEND(yp_order, missing_yp_funs)) +AC_CHECK_FUNC(yp_master, + [], PREPEND(yp_master, missing_yp_funs)) +AC_CHECK_FUNC(yp_first, + [], PREPEND(yp_first, missing_yp_funs)) +AC_CHECK_FUNC(yp_next, + [], PREPEND(yp_next, missing_yp_funs)) + +if test "$missing_yp_funs" != ""; then + AC_MSG_FAILURE([The following yp functions calls could not be found: $missing_yp_funs]) +fi AC_SUBST(LIBS) AC_SUBST(CC)