]> git.sur5r.net Git - openldap/blobdiff - configure.in
Import newsuperior test from HEAD
[openldap] / configure.in
index eac71002d62271251ec0747528d5dce0ccc1fba9..48c5f2cac0063fc1cefcec7b8bfc4e5b45b8af84 100644 (file)
@@ -1,7 +1,7 @@
 dnl $OpenLDAP$
 dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
 dnl
-dnl Copyright 1998-2004 The OpenLDAP Foundation.
+dnl Copyright 1998-2005 The OpenLDAP Foundation.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@ define([AC_INIT_BINSH],
 
 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
 #
-# Copyright 1998-2004 The OpenLDAP Foundation.
+# Copyright 1998-2005 The OpenLDAP Foundation.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@ define([AC_INIT_BINSH],
 # top-level directory of the distribution or, alternatively, at
 # <http://www.OpenLDAP.org/license.html>.
 
-echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
+echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
 echo " Restrictions apply, see COPYRIGHT and LICENSE files."
 ])dnl
 dnl ----------------------------------------------------------------
@@ -195,11 +195,14 @@ OL_ARG_ENABLE(slapi,[    --enable-slapi        enable SLAPI support (experimenta
 OL_ARG_ENABLE(slp,[    --enable-slp          enable SLPv2 support], no)dnl     
 OL_ARG_ENABLE(wrappers,[    --enable-wrappers    enable tcp wrapper support], no)dnl
 
-
+dnl ----------------------------------------------------------------
+dnl SLAPD Backend Options
 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
        passwd perl shell sql"
 
-dnl SLAPD Backend options
+AC_ARG_WITH(xxslapoverlays,[
+SLAPD Backend Options:])
+
 OL_ARG_ENABLE(bdb,[    --enable-bdb      enable Berkeley DB backend no|yes|mod], yes, [no yes mod])dnl
 OL_ARG_ENABLE(dnssrv,[    --enable-dnssrv        enable dnssrv backend no|yes|mod], no, [no yes mod])dnl
 OL_ARG_ENABLE(hdb,[    --enable-hdb      enable Hierarchical DB backend no|yes|mod], no, [no yes mod])dnl
@@ -223,6 +226,7 @@ Overlays="dyngroup proxycache"
 
 AC_ARG_WITH(xxslapoverlays,[
 SLAPD Overlay Options:])
+
 OL_ARG_ENABLE(dyngroup,[    --enable-dyngroup    Dynamic Group overlay no|yes|mod], no,
        [no yes mod])
 OL_ARG_ENABLE(proxycache,[    --enable-proxycache        Proxy Cache overlay no|yes|mod], no,
@@ -362,26 +366,15 @@ else
                AC_MSG_ERROR([NDBM only supports LDBM type hash])
        fi
 
-       if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
+       if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
                if test $ol_with_ldbm_api = auto ; then
                        ol_with_ldbm_api=berkeley
                elif test $ol_with_ldbm_api != berkeley ; then
                        AC_MSG_ERROR([LDBM API not compatible with BDB/HDB])
                fi
-
-       elif test $ol_enable_bdb = auto ; then
-               if test $ol_with_ldbm_api != berkeley \
-                       -o $ol_with_ldbm_api != auto ; then
-                       AC_MSG_WARN([LDBM API not compatible with BDB, disabling BDB])
-                       ol_enable_bdb=no
-               fi
        fi
 fi
 
-if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
-       AC_MSG_ERROR([--enable-chain requires --enable-ldap])
-fi
-
 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
        AC_MSG_ERROR([--enable-meta requires --enable-ldap])
 fi
@@ -747,9 +740,13 @@ AC_CHECK_HEADERS(  \
 dnl ----------------------------------------------------------------
 dnl Checks for libraries
 
+AC_CHECK_FUNCS( sigaction sigset )
+
 dnl HP-UX requires -lV3
 dnl this is not needed on newer versions of HP-UX
-AC_CHECK_LIB(V3, sigset)
+if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
+       AC_CHECK_LIB(V3, sigset)
+fi
 
 dnl The following is INTENTIONALLY scripted out because shell does not
 dnl support variable names with the '@' character, which is what
@@ -899,6 +896,11 @@ if test $ac_cv_func_res_query = no ; then
        ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
 fi
 
+if test $ac_cv_func_res_query = no ; then 
+       AC_CHECK_LIB(resolv, _res_9_query)
+       ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
+fi
+
 if test "$ac_cv_func_res_query" = yes ; then
        AC_DEFINE(HAVE_RES_QUERY,1,
                [define if you have res_query()])
@@ -1834,22 +1836,17 @@ if test $ol_with_ldbm_api = auto \
        fi
 fi
 
-if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
-       AC_MSG_ERROR(BDB: BerkeleyDB not available)
-elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
-       OL_BDB_COMPAT
-
-       if test $ol_cv_bdb_compat = yes ; then
-               ol_enable_bdb=yes
-       elif test $ol_enable_bdb = yes ; then
-               AC_MSG_ERROR([BDB: BerkeleyDB version incompatible])
+if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
+       if test $ol_link_ldbm != berkeley ; then
+               AC_MSG_ERROR(BDB/HDB: BerkeleyDB not available)
        else
-               ol_enable_bdb=no
+               OL_BDB_COMPAT
+
+               if test $ol_cv_bdb_compat != yes ; then
+                       AC_MSG_ERROR([BDB/HDB: BerkeleyDB version incompatible])
+               fi
        fi
 fi
-if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
-       AC_MSG_ERROR([HDB: BerkeleyDB not available])
-fi
 
 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
        AC_MSG_WARN([Could not find LDBM with BTREE support])
@@ -1904,6 +1901,12 @@ if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
        ol_enable_ldbm=no
 fi
 
+if test $ol_enable_bdb = yes -o \
+       $ol_enable_hdb = yes -o \
+       $ol_enable_ldbm = yes ; then
+       SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
+fi
+
 dnl ----------------------------------------------------------------
 
 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
@@ -2221,6 +2224,12 @@ AC_DEFINE(LBER_TAG_T,long)
 dnl ----------------------------------------------------------------
 dnl Checks for library functions.
 AC_FUNC_MEMCMP
+
+if test $ac_cv_func_memcmp_clean = no ; then
+       AC_DEFINE(NEED_MEMCMP_REPLACEMENT,1,
+               [define if memcmp is not 8-bit clean or is otherwise broken])
+fi
+
 dnl AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
 AC_FUNC_STRFTIME
 dnl AM_FUNC_STRTOD
@@ -2279,9 +2288,7 @@ AC_CHECK_FUNCS(           \
        setsid                  \
        setuid                  \
        seteuid                 \
-       sigaction               \
        signal                  \
-       sigset                  \
        strdup                  \
        strerror                \
        strpbrk                 \