summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2009-02-12 18:19:39 -0500
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2009-02-12 18:19:39 -0500
commitcf84389cd2d9063467d8c5fa0b66b9487d59020c (patch)
tree3d7e4a6ee4eac18aab8478a5de40582f7fd40413
parentab388574f83567ca779e68f0cadddbcd59aa2ac0 (diff)
downloadslapi-nis-cf84389cd2d9063467d8c5fa0b66b9487d59020c.tar.gz
slapi-nis-cf84389cd2d9063467d8c5fa0b66b9487d59020c.tar.xz
slapi-nis-cf84389cd2d9063467d8c5fa0b66b9487d59020c.zip
- fix being able to disable tcp-wrappers
- check for clnttcp6_create(), from a v6-capable RPC library
-rw-r--r--configure.ac31
1 files changed, 19 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 52d81be..14a74e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,19 +14,21 @@ AC_ARG_WITH(tcp-wrappers,
AS_HELP_STRING([--with-tcp-wrappers=AUTO]
[use tcp-wrappers]),
tcp_wrappers=$withval,tcp_wrappers=AUTO)
-AC_CHECK_HEADERS(tcpd.h)
-if test x$ac_cv_header_tcpd_h != xyes ; then
- if test x$tcp_wrappers = xyes ; then
- AC_MSG_ERROR([tcp-wrappers enabled but tcpd.h not found])
- elif test x$tcp_wrappers != xno ; then
- AC_MSG_WARN([tcp-wrappers enabled but tcpd.h not found])
+if test x$tcp_wrappers != xno ; then
+ AC_CHECK_HEADERS(tcpd.h)
+ if test x$ac_cv_header_tcpd_h != xyes ; then
+ if test x$tcp_wrappers = xyes ; then
+ AC_MSG_ERROR([tcp-wrappers enabled but tcpd.h not found])
+ elif test x$tcp_wrappers != xno ; then
+ AC_MSG_WARN([tcp-wrappers enabled but tcpd.h not found])
+ fi
+ else
+ saved_LIBS="$LIBS"
+ LIBS=
+ AC_CHECK_FUNC(hosts_access,,AC_CHECK_LIB(wrap,hosts_access))
+ LIBWRAP="$LIBS"
+ LIBS="$saved_LIBS"
fi
-else
- saved_LIBS="$LIBS"
- LIBS=
- AC_CHECK_FUNC(hosts_access,,AC_CHECK_LIB(wrap,hosts_access))
- LIBWRAP="$LIBS"
- LIBS="$saved_LIBS"
fi
AC_SUBST(LIBWRAP)
AC_ARG_WITH(tcp-wrappers-name,
@@ -108,6 +110,11 @@ fi
AC_SUBST(RPC_CFLAGS)
AC_SUBST(RPC_LIBS)
+savedlibs="$LIBS"
+LIBS="$LIBS $TIRPC_LIBS $RPC_LIBS"
+AC_CHECK_FUNCS(clnttcp6_create)
+LIBS="$savedlibs"
+
mylibdir=`eval echo "$libdir" | sed "s,NONE,${ac_default_prefix},g"`
mylibdir=`eval echo "$mylibdir" | sed "s,NONE,${ac_prefix},g"`
case "$server" in