search for yp_*() in libnsl (Linux, Solaris, AIX...)
This commit is contained in:
parent
76a65c0ccb
commit
7b56a805a1
39
configure.in
39
configure.in
|
@ -1,8 +1,10 @@
|
||||||
AC_INIT(scsh-yp, 1.0)
|
AC_INIT(scsh-yp, 1.0)
|
||||||
|
AC_LANG(C)
|
||||||
AC_CONFIG_SRCDIR(configure.in)
|
AC_CONFIG_SRCDIR(configure.in)
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
|
|
||||||
define([PREPEND], [[$2]="$[$2] [$1]"])
|
define([PREPEND], [[$2]="$[$2] [$1]"])
|
||||||
|
define([CHECK_YP_FUN], [AC_SEARCH_LIBS($1, nsl, [], PREPEND($1, missing_yp_funs))])
|
||||||
|
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
@ -14,35 +16,18 @@ AC_ARG_WITH(scsh-includes,
|
||||||
scsh_includes=/usr/local/include)
|
scsh_includes=/usr/local/include)
|
||||||
AC_SUBST(scsh_includes)
|
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=""
|
missing_yp_funs=""
|
||||||
|
|
||||||
AC_CHECK_FUNC(yp_get_default_domain,
|
CHECK_YP_FUN(yp_get_default_domain)
|
||||||
[], PREPEND(yp_get_default_domain, missing_yp_funs))
|
CHECK_YP_FUN(yp_bind)
|
||||||
AC_CHECK_FUNC(yp_bind,
|
CHECK_YP_FUN(yp_unbind)
|
||||||
[], PREPEND(yp_bind, missing_yp_funs))
|
CHECK_YP_FUN(yperr_string)
|
||||||
AC_CHECK_FUNC(yp_unbind,
|
CHECK_YP_FUN(ypprot_err)
|
||||||
[], PREPEND(yp_unbind, missing_yp_funs))
|
CHECK_YP_FUN(yp_match)
|
||||||
AC_CHECK_FUNC(yperr_string,
|
CHECK_YP_FUN(yp_order)
|
||||||
[], PREPEND(yperr_string, missing_yp_funs))
|
CHECK_YP_FUN(yp_master)
|
||||||
AC_CHECK_FUNC(ypprot_err,
|
CHECK_YP_FUN(yp_first)
|
||||||
[], PREPEND(ypprot_err, missing_yp_funs))
|
CHECK_YP_FUN(yp_next)
|
||||||
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
|
if test "$missing_yp_funs" != ""; then
|
||||||
AC_MSG_FAILURE([The following yp functions calls could not be found: $missing_yp_funs])
|
AC_MSG_FAILURE([The following yp functions calls could not be found: $missing_yp_funs])
|
||||||
|
|
Loading…
Reference in New Issue