]> git.sur5r.net Git - openldap/blobdiff - configure.in
move ldap_int_put_filter to ldap_pvt_put_filter
[openldap] / configure.in
index 384bf0130c968cdab42e4c0e90136b079d13e1f9..6b759e8ac74250274e7b6cc0ec226d20074d3d26 100644 (file)
@@ -25,7 +25,7 @@ define([AC_INIT_BINSH],
 # top-level directory of the distribution.
 
 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
-echo "Restrictions apply, see COPYRIGHT and LICENSE files."
+echo " Restrictions apply, see COPYRIGHT and LICENSE files."
 ])dnl
 dnl ----------------------------------------------------------------
 dnl Disable config.cache!
@@ -58,7 +58,7 @@ else
 fi
 
 SHTOOL="$ac_cv_shtool"
-AC_SUBST(SHTOOL)
+dnl AC_SUBST(SHTOOL)dnl
 
 TB=`$SHTOOL echo -e %B`
 TN=`$SHTOOL echo -e %b`
@@ -159,7 +159,8 @@ dnl ----------------------------------------------------------------
 
 dnl ----------------------------------------------------------------
 dnl SLAPD OPTIONS
-AC_ARG_WITH(xxslapdoptions,[SLAPD (Standalone LDAP Daemon) Options:])
+AC_ARG_WITH(xxslapdoptions,[
+SLAPD (Standalone LDAP Daemon) Options:])
 OL_ARG_ENABLE(slapd,[  --enable-slapd    enable building slapd], yes)dnl
 OL_ARG_ENABLE(aci,[    --enable-aci      enable per-object ACIs (experimental)], no)dnl
 OL_ARG_ENABLE(cleartext,[    --enable-cleartext          enable cleartext passwords], yes)dnl
@@ -216,11 +217,13 @@ OL_ARG_WITH(tcl_module,[    --with-tcl-module       module type], static,
 
 dnl ----------------------------------------------------------------
 dnl SLURPD OPTIONS
-AC_ARG_WITH(xxslurpdoptions,[SLURPD (Replication Daemon) Options:])
+AC_ARG_WITH(xxslurpdoptions,[
+SLURPD (Replication Daemon) Options:])
 OL_ARG_ENABLE(slurpd,[  --enable-slurpd          enable building slurpd], auto)dnl
 
 dnl ----------------------------------------------------------------
-AC_ARG_WITH(xxliboptions,[Library Generation & Linking Options])
+AC_ARG_WITH(xxliboptions,[
+Library Generation & Linking Options])
 AC_ENABLE_STATIC
 dnl AC_DISABLE_SHARED
 AC_ENABLE_SHARED
@@ -619,10 +622,6 @@ AC_PROG_AWK
 OL_PROG_LN_H
 AC_PROG_LN_S
 
-if test "$LN_H" = "cp" -a "$LN_S" = "ln"; then
-       LN_S="$LN_H"
-fi
-
 AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail,
        $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc)
 AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb)
@@ -896,11 +895,30 @@ if test "$ol_cv_c_posix_regex" = no ; then
 fi
 
 dnl ----------------------------------------------------------------
+dnl UUID Support
+
+have_uuid=no
+AC_CHECK_HEADERS(sys/uuid.h)
+if test $ac_cv_header_sys_uuid_h = yes ; then
+       save_LIBS="$LIBS"
+       AC_SEARCH_LIBS(uuid_to_str, uuid, [have_uuid=yes], :)
+       LIBS="$save_LIBS"
+
+       if test have_uuid = yes ; then
+               AC_DEFINE(HAVE_UUID_TO_STR,1,
+                       [define if you have uuid_to_str()])
+
+               test "$ac_cv_search_uuid_to_str" = "none required" || \
+                       SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
+       fi
+fi
+
 dnl For windows, check for the need of RPCRT for UUID function support
-AC_MSG_CHECKING(to see if -lrpcrt4 is needed for win32 UUID support)
-save_LIBS="$LIBS"
-LIBS="$LIBS -lrpcrt4"
-AC_TRY_LINK([
+if test $have_uuid = no ; then
+       AC_MSG_CHECKING(to see if -lrpcrt4 is needed for win32 UUID support)
+       save_LIBS="$LIBS"
+       LIBS="$LIBS -lrpcrt4"
+       AC_TRY_LINK([
                char UuidCreate@4();
                char UuidToStringA@8();
                ],
@@ -909,11 +927,12 @@ AC_TRY_LINK([
                UuidToStringA@8();
                ],
                need_rpcrt=yes, need_rpcrt=no)
-if test $need_rpcrt = yes; then
-       SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
+       if test $need_rpcrt = yes; then
+               SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
+       fi
+       LIBS="$save_LIBS"
+       AC_MSG_RESULT($need_rpcrt)
 fi
-LIBS="$save_LIBS"
-AC_MSG_RESULT($need_rpcrt)
 
 dnl ----------------------------------------------------------------
 dnl Check for resolver routines
@@ -2114,33 +2133,16 @@ dnl ----------------------------------------------------------------
 dnl
 dnl Check for Cyrus SASL
 dnl
-dnl HAVE_CYRUS_SASL2 implicitly defines HAVE_CYRUS_SASL
 ol_link_sasl=no
 ol_link_spasswd=no
 if test $ol_with_cyrus_sasl != no ; then
-       AC_CHECK_HEADERS(sasl/sasl.h)
+       AC_CHECK_HEADERS(sasl/sasl.h sasl.h)
 
-       if test $ac_cv_header_sasl_sasl_h = yes ; then
+       if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
                AC_CHECK_LIB(sasl2, sasl_client_init,
-                       [have_cyrus_sasl2=yes], [have_cyrus_sasl2=no])
-
-               if test $have_cyrus_sasl2 != no ; then
-                       SASL_LIBS="-lsasl2"
-                       AC_DEFINE(HAVE_CYRUS_SASL2,1,[define if you have Cyrus SASL v2])
-                       ol_link_sasl=yes
-               fi
-       else
-               AC_CHECK_HEADERS(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
-                               SASL_LIBS="-lsasl"
-                               ol_link_sasl=yes
-                       fi
-               fi
+                       [ol_link_sasl="-lsasl2"],
+                       [AC_CHECK_LIB(sasl, sasl_client_init,
+                               [ol_link_sasl="-lsasl"])])
        fi
 
        if test $ol_link_sasl = no ; then
@@ -2155,6 +2157,7 @@ if test $ol_with_cyrus_sasl != no ; then
                fi
        else
                AC_DEFINE(HAVE_CYRUS_SASL,1,[define if you have Cyrus SASL])
+               SASL_LIBS="$ol_link_sasl"
                if test $ol_enable_spasswd != no ; then
                        ol_link_spasswd=yes
                fi
@@ -2684,7 +2687,6 @@ fi
 if test "$ol_enable_rewrite" != no ; then
        AC_DEFINE(ENABLE_REWRITE,1,[define to enable rewriting in back-ldap and back-meta])
        BUILD_REWRITE=yes
-       SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
 fi
 
 dnl ----------------------------------------------------------------
@@ -2769,6 +2771,11 @@ AC_SUBST(SLAPD_SQL_LDFLAGS)
 AC_SUBST(SLAPD_SQL_LIBS)
 AC_SUBST(SLAPD_SQL_INCLUDES)
 
+dnl ----------------------------------------------------------------
+dnl final help output
+AC_ARG_WITH(xxinstall,[
+See INSTALL file for further details.])
+
 dnl ----------------------------------------------------------------
 dnl final output
 dnl
@@ -2818,5 +2825,5 @@ tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
 ,[
 date > stamp-h
-echo Please \"make depend\" to build dependencies
+echo Please run \"make depend\" to build dependencies
 ])