]> git.sur5r.net Git - openldap/blobdiff - configure.in
Add LDAPsubentry (without OID).
[openldap] / configure.in
index e8aad57cec19e04f03d466048ceea2a369aed18e..ce9af708cdafcd5d9bf4c09392e5a3c8f7938215 100644 (file)
@@ -101,6 +101,7 @@ 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
 
@@ -188,6 +189,9 @@ if test $ol_enable_slapd = no ; then
        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
@@ -234,6 +238,7 @@ if test $ol_enable_slapd = no ; then
        ol_enable_modules=no
        ol_enable_multimaster=no
        ol_enable_phonetic=no
+       ol_enable_quipu=no
        ol_enable_rlookups=no
        ol_enable_wrappers=no
 
@@ -346,28 +351,32 @@ BUILD_LDAP=no
 BUILD_LDBM=no
 BUILD_PASSWD=no
 BUILD_PERL=no
+BUILD_QUIPU=no
 BUILD_SHELL=no
 BUILD_TCL=no
 BUILD_THREAD=no
 
-BUILD_BDB2_DYNAMIC=no
-BUILD_LDAP_DYNAMIC=no
-BUILD_LDBM_DYNAMIC=no
-BUILD_PASSWD_DYNAMIC=no
-BUILD_PERL_DYNAMIC=no
-BUILD_SHELL_DYNAMIC=no
-BUILD_TCL_DYNAMIC=no
+BUILD_BDB2_DYNAMIC=static
+BUILD_LDAP_DYNAMIC=static
+BUILD_LDBM_DYNAMIC=static
+BUILD_PASSWD_DYNAMIC=static
+BUILD_PERL_DYNAMIC=static
+BUILD_SHELL_DYNAMIC=static
+BUILD_TCL_DYNAMIC=static
 
 SLAPD_MODULES_LDFLAGS=
 SLAPD_MODULES_CPPFLAGS=
+SLAPD_MODULES_LIST=
 
 SLAPD_PERL_LDFLAGS=
 SLAPD_PERL_CPPFLAGS=
 
 KRB_LIBS=
 READLINE_LIBS=
+SASL_LIBS=
 TERMCAP_LIBS=
 TLS_LIBS=
+MODULES_LIBS=
 
 dnl ----------------------------------------------------------------
 dnl Checks for programs
@@ -430,6 +439,7 @@ dnl The default CFLAGS is empty NOT whatever AC_PROG_CC sets.
 dnl (for now, let autoconf sort this out)
 dnl CFLAGS=${CFLAGS-""}
 
+AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
 dnl AC_PROG_MAKE_SET
 
@@ -512,21 +522,18 @@ dnl Check for module support
 dnl
 ol_link_modules=no
 if test $ol_enable_modules != no ; then
-       AC_PATH_PROG(GLIBCONFIG, glib-config)
+       AC_CHECK_HEADERS(ltdl.h)
 
-       if test "no$GLIBCONFIG" = "no" ; then
-               if test $ol_enable_modules = yes ; then
-                       AC_MSG_ERROR([could not locate glib-config])
-               fi
+       if test $ac_cv_header_ltdl_h = no ; then
+               AC_MSG_ERROR([could not locate libtool ltdl.h])
 
-       else
-               SLAPD_MODULES_VERSION="`$GLIBCONFIG --version gmodule`"
-               SLAPD_MODULES_CPPFLAGS="`$GLIBCONFIG --cflags gmodule`"
-               SLAPD_MODULES_LDFLAGS="`$GLIBCONFIG --libs gmodule`"
+       fi
 
-               dnl should check glib version
-               ol_link_modules=yes
+       AC_CHECK_LIB(ltdl, lt_dlinit)
+       if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
+               AC_MSG_ERROR([could not locate libtool -lltdl])
        fi
+       ol_link_modules=yes
 else
        ol_with_bdb2_module=static
        ol_with_ldap_module=static
@@ -648,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
@@ -696,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
@@ -1657,7 +1680,7 @@ if test $ol_with_cyrus_sasl != no ; then
                        [have_cyrus_sasl=yes], [have_cyrus_sasl=no])
 
                if test $have_cyrus_sasl != no ; then
-                       LUTIL_LIBS="$LUTIL_LIBS -lsasl"
+                       SASL_LIBS="-lsasl"
                        AC_DEFINE(HAVE_CYRUS_SASL,1,[define if you have Cyrus SASL])
                        ol_link_sasl=yes
                fi
@@ -1921,6 +1944,8 @@ fi
 if test "$ol_link_modules" != no ; then
        AC_DEFINE(SLAPD_MODULES,1,[define to support modules])
        BUILD_SLAPD=yes
+       MODULES_LIBS=-lltdl
+       SLAPD_MODULES_LDFLAGS="-dlopen self"
 fi
 
 if test "$ol_link_bdb2" != no ; then
@@ -1930,7 +1955,9 @@ if test "$ol_link_bdb2" != no ; then
        if test "$ol_with_bdb2_module" != static ; then
                AC_DEFINE(SLAPD_BDB2_DYNAMIC,1,
                        [define to support dynamic BDB2 backend])
-               BUILD_BDB2_DYNAMIC=yes
+               BUILD_BDB2=mod
+               BUILD_BDB2_DYNAMIC=shared
+               SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
        fi
 fi
 
@@ -1941,7 +1968,9 @@ if test "$ol_enable_ldap" != no ; then
        if test "$ol_with_ldap_module" != static ; then
                AC_DEFINE(SLAPD_LDAP_DYNAMIC,1,
                        [define to support dynamic LDAP backend])
-               BUILD_LDAP_DYNAMIC=yes
+               BUILD_LDAP=mod
+               BUILD_LDAP_DYNAMIC=shared
+               SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
        fi
 fi
 
@@ -1952,7 +1981,9 @@ if test "$ol_link_ldbm" != no ; then
        if test "$ol_with_ldbm_module" != static ; then
                AC_DEFINE(SLAPD_LDBM_DYNAMIC,1,
                        [define to support dynamic LDBM backend])
-               BUILD_LDBM_DYNAMIC=yes
+               BUILD_LDBM=mod
+               BUILD_LDBM_DYNAMIC=shared
+               SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
        fi
 fi
 
@@ -1963,7 +1994,9 @@ if test "$ol_enable_passwd" != no ; then
        if test "$ol_with_passwd_module" != static ; then
                AC_DEFINE(SLAPD_PASSWD_DYNAMIC,1,
                        [define to support dynamic PASSWD backend])
-               BUILD_PASSWD_DYNAMIC=yes
+               BUILD_PASSWD=mod
+               BUILD_PASSWD_DYNAMIC=shared
+               SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
        fi
 fi
 
@@ -1974,7 +2007,9 @@ if test "$ol_link_perl" != no ; then
        if test "$ol_with_perl_module" != static ; then
                AC_DEFINE(SLAPD_PERL_DYNAMIC,1,
                        [define to support dynamic PERL backend])
-               BUILD_PERL_DYNAMIC=yes
+               BUILD_PERL=mod
+               BUILD_PERL_DYNAMIC=shared
+               SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
        fi
 fi
 
@@ -1985,7 +2020,9 @@ if test "$ol_enable_shell" != no ; then
        if test "$ol_with_shell_module" != static ; then
                AC_DEFINE(SLAPD_SHELL_DYNAMIC,1,
                        [define to support dynamic SHELL backend])
-               BUILD_SHELL_DYNAMIC=yes
+               BUILD_SHELL=mod
+               BUILD_SHELL_DYNAMIC=shared
+               SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
        fi
 fi
 
@@ -1996,7 +2033,9 @@ if test "$ol_enable_tcl" != no ; then
        if test "$ol_with_tcl_module" != static; then
                AC_DEFINE(SLAPD_TCL_DYNAMIC,1,
                        [define to support dynamic TCL backend])
-               BUILD_TCL_DYNAMIC=yes
+               BUILD_TCL=mod
+               BUILD_TCL_DYNAMIC=shared
+               SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
        fi
 fi
 
@@ -2018,6 +2057,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)
@@ -2040,14 +2080,17 @@ AC_SUBST(LUTIL_LIBS)
 
 AC_SUBST(SLAPD_MODULES_CPPFLAGS)
 AC_SUBST(SLAPD_MODULES_LDFLAGS)
+AC_SUBST(SLAPD_MODULES_LIST)
 
 AC_SUBST(SLAPD_PERL_CPPFLAGS)
 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)
+AC_SUBST(MODULES_LIBS)
 
 dnl ----------------------------------------------------------------
 dnl final output
@@ -2081,13 +2124,13 @@ libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/li
 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-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 \
-servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
-servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
+servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.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/mod.mk \
+servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
+servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
+servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
+servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \