]> git.sur5r.net Git - openldap/blobdiff - configure.in
Preliminary Make rules to allow building backends as modules.
[openldap] / configure.in
index b5811f86c377dea9a3788178faead09dbe55b23f..86182b0c062b841c977ccd957751a97c7dec23a7 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],
@@ -95,7 +99,9 @@ OL_ARG_ENABLE(slapd,[  --enable-slapd enable building slapd], yes)dnl
 OL_ARG_ENABLE(cleartext,[    --enable-cleartext        enable cleartext passwords], yes)dnl
 OL_ARG_ENABLE(crypt,[    --enable-crypt        enable crypt(3) passwords], auto)dnl
 OL_ARG_ENABLE(modules,[    --enable-modules    enable dynamic module support], no)dnl
+OL_ARG_ENABLE(multimaster,[    --enable-multimaster    enable multimaster replication], no)dnl
 OL_ARG_ENABLE(phonetic,[    --enable-phonetic  enable phonetic/soundex], no)dnl
+OL_ARG_ENABLE(quipu,[    --enable-quipu        build quipu migration tools], no)dnl
 OL_ARG_ENABLE(rlookups,[    --enable-rlookups  enable reverse lookups], auto)dnl
 OL_ARG_ENABLE(wrappers,[    --enable-wrappers  enable tcp wrapper support], no)dnl
 
@@ -174,12 +180,18 @@ if test $ol_enable_slapd = no ; then
        if test $ol_enable_modules = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-modules argument])
        fi
+       if test $ol_enable_multimaster = yes ; then
+               AC_MSG_WARN([slapd disabled, ignoring --enable-multimaster argument])
+       fi
        if test $ol_enable_wrappers = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-wrappers argument])
        fi
        if test $ol_enable_phonetic = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-phonetic argument])
        fi
+       if test $ol_enable_quipu = yes ; then
+               AC_MSG_WARN([slapd disabled, ignoring --enable-quipu argument])
+       fi
        if test $ol_enable_rlookups = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-rlookups argument])
        fi
@@ -224,7 +236,9 @@ if test $ol_enable_slapd = no ; then
        ol_enable_tcl=no
 
        ol_enable_modules=no
+       ol_enable_multimaster=no
        ol_enable_phonetic=no
+       ol_enable_quipu=no
        ol_enable_rlookups=no
        ol_enable_wrappers=no
 
@@ -319,6 +333,7 @@ AC_MSG_RESULT(done)
 
 ## Initialize vars
 LDAP_LIBS=
+LDIF_LIBS=
 LDBM_LIBS=
 LTHREAD_LIBS=
 LUTIL_LIBS=
@@ -336,6 +351,7 @@ BUILD_LDAP=no
 BUILD_LDBM=no
 BUILD_PASSWD=no
 BUILD_PERL=no
+BUILD_QUIPU=no
 BUILD_SHELL=no
 BUILD_TCL=no
 BUILD_THREAD=no
@@ -356,6 +372,7 @@ SLAPD_PERL_CPPFLAGS=
 
 KRB_LIBS=
 READLINE_LIBS=
+SASL_LIBS=
 TERMCAP_LIBS=
 TLS_LIBS=
 
@@ -638,6 +655,10 @@ if test $ol_enable_dns != no ; then
                AC_CHECK_LIB(bind, res_search)
                ac_cv_func_res_search=$ac_cv_lib_bind_res_search
        fi
+       if test $ac_cv_func_res_search = no ; then 
+               AC_CHECK_LIB(bind, __res_search)
+               ac_cv_func_res_search=$ac_cv_lib_bind___res_search
+       fi
        if test $ac_cv_func_res_search = no ; then 
                AC_CHECK_LIB(resolv, res_search)
                ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
@@ -686,6 +707,18 @@ if test $ol_link_isode != no; then
        AC_PATH_PROG(PEPSY, pepsy)
 fi
 
+if test $ol_enable_quipu != no ; then
+       AC_CHECK_HEADERS(quipu/commonarg.h)
+
+       if test $ac_cv_header_quipu_commonarg_h = yes ; then
+               BUILD_QUIPU=yes
+       elif test $ol_enable_quipu = auto ; then
+               AC_MSG_WARN([no quipu for --enable-quipu=auto, disabling])
+       else
+               AC_MSG_ERROR(no quipu for --enable-quipu=$ol_enable_quipu)
+       fi
+fi
+
 dnl
 dnl check for kerberos
 dnl
@@ -1634,6 +1667,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
+                       SASL_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 +1826,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
@@ -1855,6 +1931,9 @@ fi
 if test "$ol_enable_cleartext" != no ; then
        AC_DEFINE(SLAPD_CLEARTEXT,1,[define to support cleartext passwords])
 fi
+if test "$ol_enable_multimaster" != no ; then
+       AC_DEFINE(SLAPD_MULTIMASTER,1,[define to support multimaster replication])
+fi
 if test "$ol_enable_phonetic" != no ; then
        AC_DEFINE(SLAPD_PHONETIC,1,[define to support phonetic])
 fi
@@ -1962,6 +2041,7 @@ AC_SUBST(BUILD_SLAPD)
   AC_SUBST(BUILD_LDBM)
   AC_SUBST(BUILD_PASSWD)
   AC_SUBST(BUILD_PERL)
+  AC_SUBST(BUILD_QUIPU)
   AC_SUBST(BUILD_SHELL)
   AC_SUBST(BUILD_TCL)
   AC_SUBST(BUILD_BDB2_DYNAMIC)
@@ -1975,6 +2055,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)
@@ -1989,6 +2070,7 @@ AC_SUBST(SLAPD_PERL_LDFLAGS)
 
 AC_SUBST(KRB_LIBS)
 AC_SUBST(READLINE_LIBS)
+AC_SUBST(SASL_LIBS)
 AC_SUBST(TERMCAP_LIBS)
 AC_SUBST(TLS_LIBS)
 
@@ -2025,7 +2107,7 @@ servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
 servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
 servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
-servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/srv.mk \
+servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \