aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in55
1 files changed, 47 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 1d4688e..531d0d0 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,7 @@
#
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl
-AC_INIT(.autofs-3.1.4)
+AC_INIT(.autofs-3.1.6)
#
# autofs installs by default in /usr
@@ -54,25 +54,33 @@ AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv")
AC_SUBST(LIBRESOLV)
#
-# Hesiod support? Hesiod is tricky, because it may live in /usr/athena
-# or some equally weird place; if so, have the user specify
-# --with-hesiod=/usr/athena
+# Hesiod support? Expect that this may have a special directory...
#
AF_tmp_ldflags="$LDFLAGS"
+LIBHESIOD=''
+HAVE_HESIOD=''
AC_ARG_WITH(hesiod,
--with-hesiod=DIR enable Hesiod support (libs and includes in DIR),
- if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
+ if test "$withval" = no
+ then
+ HAVE_HESIOD=0 # Disable
+ elif -o "$withval" = yes -o -z "$withval"
then
- LIBHESIOD=""
+ : Search for Hesiod in normal directory path
else
+ : Search for Hesiod in specific directory
LDFLAGS="$LDFLAGS -L${withval}/lib"
LIBHESIOD="-L${withval}/lib"
HESIOD_FLAGS="-I${withval}/include"
fi
)
-HAVE_HESIOD=0
-AC_CHECK_LIB(hesiod, hes_resolve, HAVE_HESIOD=1 LIBHESIOD="$LIBHESIOD -lhesiod", , $LIBRESOLV)
+if test -z "$HAVE_HESIOD"
+then
+ HAVE_HESIOD=0
+ AC_CHECK_LIB(hesiod, hes_resolve, HAVE_HESIOD=1 LIBHESIOD="$LIBHESIOD -lhesiod", ,
+ $LIBRESOLV)
+fi
AC_SUBST(HAVE_HESIOD)
AC_SUBST(LIBHESIOD)
AC_SUBST(HESIOD_FLAGS)
@@ -84,6 +92,37 @@ AC_CHECK_HEADER(rpcsvc/nis.h, HAVE_NISPLUS=1)
AC_SUBST(HAVE_NISPLUS)
#
+# OpenLDAP support? Expect that this may have a special directory...
+#
+AF_tmp_ldflags="$LDFLAGS"
+LIBLDAP=''
+HAVE_LDAP=''
+AC_ARG_WITH(openldap,
+--with-openldap=DIR enable OpenLDAP map support (libs and includes in DIR),
+ if test "$withval" = 'no'; then
+ HAVE_LDAP=0 # Disable
+ elif test -z "$withval" -o "$withval" = 'yes'
+ then
+ : Search for LDAP in normal directory path
+ else
+ : Search for LDAP in specific directory
+ LDFLAGS="$LDFLAGS -L${withval}/lib"
+ LIBLDAP="-L${withval}/lib"
+ LDAP_FLAGS="-I${withval}/include"
+ fi
+)
+if test -z "$HAVE_LDAP"; then
+ HAVE_LDAP=0
+ AC_CHECK_LIB(ldap, ldap_init, HAVE_LDAP=1 LIBLDAP="$LIBLDAP -lldap -llber", ,
+ -llber)
+fi
+
+AC_SUBST(LDAP_FLAGS)
+AC_SUBST(HAVE_LDAP)
+AC_SUBST(LIBLDAP)
+LDFLAGS="${AF_tmp_ldflags}"
+
+#
# Location of init.d directory?
#
AF_INIT_D()