AC_INIT(scsh-yp, 1.0) AC_LANG(C) AC_CONFIG_SRCDIR(configure.in) AM_INIT_AUTOMAKE define([PREPEND], [[$2]="$[$2] [$1]"]) define([CHECK_YP_FUN], [AC_SEARCH_LIBS($1, nsl, [], PREPEND($1, missing_yp_funs))]) AC_PROG_LIBTOOL AC_PROG_CC AC_ARG_WITH(scsh-includes, AC_HELP_STRING([--with-scsh-includes=DIR], [scsh include files are in DIR [/usr/local/include]]), scsh_includes=$withval, scsh_includes=/usr/local/include) AC_SUBST(scsh_includes) missing_yp_funs="" CHECK_YP_FUN(yp_get_default_domain) CHECK_YP_FUN(yp_bind) CHECK_YP_FUN(yp_unbind) CHECK_YP_FUN(yperr_string) CHECK_YP_FUN(ypprot_err) CHECK_YP_FUN(yp_match) CHECK_YP_FUN(yp_order) CHECK_YP_FUN(yp_master) CHECK_YP_FUN(yp_first) CHECK_YP_FUN(yp_next) if test "$missing_yp_funs" != ""; then AC_MSG_FAILURE([The following yp functions calls could not be found: $missing_yp_funs]) fi schemedir='${prefix}'"/scheme" libdir='${prefix}'"/lib" libsysdir=${libdir}"/`scsh -lm ${srcdir}/scheme/configure.scm -o configure -c '(display (host))'`" AC_SUBST(libdir) AC_SUBST(libsysdir) AC_SUBST(schemedir) AC_SUBST(LIBS) AC_SUBST(CC) AC_OUTPUT([Makefile c/Makefile scheme/Makefile])