search for yp_*() in libnsl (Linux, Solaris, AIX...)

This commit is contained in:
eknauel 2003-12-03 08:59:35 +00:00
parent 76a65c0ccb
commit 7b56a805a1
1 changed files with 12 additions and 27 deletions

View File

@ -1,8 +1,10 @@
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
@ -14,35 +16,18 @@ AC_ARG_WITH(scsh-includes,
scsh_includes=/usr/local/include)
AC_SUBST(scsh_includes)
AC_ARG_WITH(scsh-libraries,
AC_HELP_STRING([--with-scsh-libraries=DIR],
[scsh libraries are in DIR [/usr/local/lib/scsh]]),
scsh_libraries=$withval,
scsh_libraries=/usr/local/lib/scsh)
AC_SUBST(scsh_libraries)
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))
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])