]> git.sur5r.net Git - openldap/blobdiff - configure.in
Initial inet_aton() detection.
[openldap] / configure.in
index b5811f86c377dea9a3788178faead09dbe55b23f..fedac7e78eb1304a41128362afaf0857fb1b4b6a 100644 (file)
@@ -72,6 +72,10 @@ OL_ARG_ENABLE(x_compile,[  --enable-x-compile        enable cross compiling],
 dnl General "with" options
 OL_ARG_ENABLE(dmalloc,[  --enable-dmalloc      enable debug malloc support], no)dnl
 
+OL_ARG_WITH(cyrus_sasl,[  --with-cyrus-sasl  with Cyrus SASL support],
+       auto, [auto yes no] )
+OL_ARG_WITH(fetch,[  --with-fetch  with fetch URL support],
+       auto, [auto yes no] )
 OL_ARG_WITH(kerberos,[  --with-kerberos        with Kerberos support],
        auto, [auto k5 k4 afs yes no])
 OL_ARG_WITH(readline,[  --with-readline  with readline support],
@@ -319,6 +323,7 @@ AC_MSG_RESULT(done)
 
 ## Initialize vars
 LDAP_LIBS=
+LDIF_LIBS=
 LDBM_LIBS=
 LTHREAD_LIBS=
 LUTIL_LIBS=
@@ -1634,6 +1639,47 @@ if test $ol_link_termcap = no ; then
        TERMCAP_LIBS=
 fi
 
+dnl
+dnl Check for fetch URL support
+dnl            should be extended to support other fetch URL APIs
+dnl
+ol_link_sasl=no
+if test $ol_with_cyrus_sasl != no ; then
+       AC_CHECK_HEADER(sasl.h)
+
+       if test $ac_cv_header_sasl_h = yes ; then
+               AC_CHECK_LIB(sasl, sasl_client_init,
+                       [have_cyrus_sasl=yes], [have_cyrus_sasl=no])
+
+               if test $have_cyrus_sasl != no ; then
+                       LUTIL_LIBS="$LUTIL_LIBS -lsasl"
+                       AC_DEFINE(HAVE_CYRUS_SASL,1,[define if you have Cyrus SASL])
+                       ol_link_sasl=yes
+               fi
+       fi
+
+       if test $ol_link_sasl = no -a $ol_with_cyrus_sasl = yes ; then
+               AC_MSG_ERROR(no suitable API for --with-cyrus-sasl=$ol_with_cyrus_sasl)
+       fi
+fi
+
+dnl
+dnl Check for fetch URL support
+dnl            should be extended to support other fetch URL APIs
+dnl
+ol_link_fetch=no
+if test $ol_with_fetch != no ; then
+       OL_LIB_FETCH
+
+       if test $ol_cv_lib_fetch != no ; then
+               LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
+               ol_link_fetch=freebsd
+
+       elif test $ol_with_fetch != auto ; then
+               AC_MSG_ERROR(no suitable API for --with-fetch=$ol_with_fetch)
+       fi 
+fi
+
 dnl
 dnl Check for GNU readline
 dnl
@@ -1752,6 +1798,8 @@ dnl AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
 AC_FUNC_STRFTIME
 dnl AM_FUNC_STRTOD
 
+OL_FUNC_INET_ATON
+
 dnl we should use vfork instead of fork in a number of places...
 dnl AC_FUNC_VFORK
 AC_FUNC_VPRINTF
@@ -1975,6 +2023,7 @@ AC_SUBST(BUILD_SLURPD)
 
 AC_SUBST(LDAP_LIBS)
 AC_SUBST(LDAPD_LIBS)
+AC_SUBST(LDIF_LIBS)
 AC_SUBST(SLAPD_LIBS)
 AC_SUBST(SLURPD_LIBS)
 AC_SUBST(LDBM_LIBS)