]> git.sur5r.net Git - openldap/blobdiff - configure.in
filter2bv can't de-normalize UUIDs, must do it explicitly for back-ldap
[openldap] / configure.in
index ec8f749343e1c78ddfc4ed6211bc73e2031861dd..bb251f4345e8f3a2be2c7b4587f031ad490dba6d 100644 (file)
@@ -1,7 +1,7 @@
 dnl $OpenLDAP$
 dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
 dnl
-dnl Copyright 1998-2005 The OpenLDAP Foundation.
+dnl Copyright 1998-2006 The OpenLDAP Foundation.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
@@ -23,10 +23,11 @@ define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
 define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
 dnl ================================================================
 dnl Configure.in for OpenLDAP
-AC_COPYRIGHT([[Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved.
+AC_COPYRIGHT([[Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
 Restrictions apply, see COPYRIGHT and LICENSE files.]])
 AC_REVISION([$OpenLDAP$])
 AC_INIT([OpenLDAP],,[http://www.openldap.org/its/])
+m4_define([AC_PACKAGE_BUGREPORT],[<http://www.openldap.org/its/>])
 AC_CONFIG_SRCDIR(build/version.sh)dnl
 dnl ----------------------------------------------------------------
 dnl OpenLDAP Autoconf Macros
@@ -92,7 +93,7 @@ AH_TOP([
 /* begin of portable.h.pre */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation
+ * Copyright 1998-2006 The OpenLDAP Foundation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -222,7 +223,8 @@ AC_SUBST(ldap_subdir)dnl
 
 dnl ----------------------------------------------------------------
 dnl General "enable" options
-OL_ARG_ENABLE(debug,[  --enable-debug    enable debugging], yes)dnl
+dnl set default to traditional to enable the original debug style
+OL_ARG_ENABLE(debug,[  --enable-debug    enable debugging], yes, [no yes traditional])dnl
 OL_ARG_ENABLE(dynamic,[  --enable-dynamic        enable linking built binaries with dynamic libs], no)dnl
 OL_ARG_ENABLE(syslog,[  --enable-syslog          enable syslog support], auto)dnl
 OL_ARG_ENABLE(proctitle,[  --enable-proctitle    enable proctitle support], yes)dnl
@@ -262,7 +264,8 @@ dnl SLAPD OPTIONS
 AC_ARG_ENABLE(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(dynacl,[    --enable-dynacl        enable run-time loadable ACL support (experimental)], no)dnl
+OL_ARG_ENABLE(aci,[    --enable-aci      enable per-object ACIs (experimental)], no, [no yes mod])dnl
 OL_ARG_ENABLE(cleartext,[    --enable-cleartext          enable cleartext passwords], yes)dnl
 OL_ARG_ENABLE(crypt,[    --enable-crypt          enable crypt(3) passwords], no)dnl
 OL_ARG_ENABLE(lmpasswd,[    --enable-lmpasswd    enable LAN Manager passwords], no)dnl
@@ -337,6 +340,7 @@ OL_ARG_ENABLE(sql,[    --enable-sql   enable sql backend],
 dnl ----------------------------------------------------------------
 dnl SLAPD Overlay Options
 Overlays="accesslog \
+       dds \
        denyop \
        dyngroup \
        dynlist \
@@ -358,6 +362,8 @@ OL_ARG_ENABLE(overlays,[    --enable-overlays         enable all available overlays],
        --, [no yes mod])dnl
 OL_ARG_ENABLE(accesslog,[    --enable-accesslog          In-Directory Access Logging overlay],
        no, [no yes mod], ol_enable_overlays)
+OL_ARG_ENABLE(dds,[    --enable-dds      Dynamic Directory Services overlay],
+       no, [no yes mod], ol_enable_overlays)
 OL_ARG_ENABLE(denyop,[    --enable-denyop        Deny Operation overlay],
        no, [no yes mod], ol_enable_overlays)
 OL_ARG_ENABLE(dyngroup,[    --enable-dyngroup    Dynamic Group overlay],
@@ -427,7 +433,10 @@ if test $ol_enable_slapd = no ; then
        if test $ol_enable_rlookups = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-rlookups argument])
        fi
-       if test $ol_enable_aci = yes ; then
+       if test $ol_enable_dynacl = yes ; then
+               AC_MSG_WARN([slapd disabled, ignoring --enable-dynacl argument])
+       fi
+       if test $ol_enable_aci != no ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-aci argument])
        fi
        if test $ol_enable_ldbm_api != auto ; then
@@ -462,6 +471,7 @@ if test $ol_enable_slapd = no ; then
        ol_enable_modules=no
        ol_enable_multimaster=no
        ol_enable_rlookups=no
+       ol_enable_dynacl=no
        ol_enable_aci=no
        ol_enable_wrappers=no
 
@@ -611,6 +621,7 @@ BUILD_SHELL=no
 BUILD_SQL=no
 
 BUILD_ACCESSLOG=no
+BUILD_DDS=no
 BUILD_DENYOP=no
 BUILD_DYNGROUP=no
 BUILD_DYNLIST=no
@@ -651,6 +662,7 @@ SLAPI_LIBS=
 LIBSLAPI=
 LIBSLAPITOOLS=
 AUTH_LIBS=
+ICU_LIBS=
 
 SLAPD_SLP_LIBS=
 SLAPD_GMP_LIBS=
@@ -853,11 +865,11 @@ AC_HEADER_DIRENT
 AC_HEADER_SYS_WAIT
 AC_HEADER_TIOCGWINSZ
 
-AC_CHECK_HEADERS(              \
+AC_CHECK_HEADERS(      \
        arpa/inet.h             \
-       arpa/nameser.h          \
+       arpa/nameser.h  \
        assert.h                \
-       bits/types.h            \
+       bits/types.h    \
        conio.h                 \
        crypt.h                 \
        direct.h                \
@@ -870,7 +882,6 @@ AC_CHECK_HEADERS(           \
        libutil.h               \
        limits.h                \
        locale.h                \
-       netinet/tcp.h           \
        malloc.h                \
        memory.h                \
        psap.h                  \
@@ -887,11 +898,11 @@ AC_CHECK_HEADERS(         \
        sys/errno.h             \
        sys/ioctl.h             \
        sys/param.h             \
-       sys/resource.h          \
-       sys/select.h            \
-       sys/socket.h            \
+       sys/resource.h  \
+       sys/select.h    \
+       sys/socket.h    \
        sys/stat.h              \
-       sys/syslog.h            \
+       sys/syslog.h    \
        sys/time.h              \
        sys/types.h             \
        sys/uio.h               \
@@ -904,11 +915,16 @@ AC_CHECK_HEADERS(         \
 )
 
 AC_CHECK_HEADERS( resolv.h, [], [],
-[$ac_includes_default]
+[$ac_includes_default
 #include <netinet/in.h>
-)
+])
+
+AC_CHECK_HEADERS( netinet/tcp.h, [], [],
+[$ac_includes_default
+#include <netinet/in.h>
+])
 
-AC_CHECK_HEADERS(sys/ucred.h, [], [],
+AC_CHECK_HEADERS( sys/ucred.h, [], [],
 [$ac_includes_default
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
@@ -1585,6 +1601,19 @@ dnl                      [ol_cv_pthread_lpthread_lexc])
                                AC_MSG_ERROR([pthread_create is not usable, check environment settings])
                        fi
 
+                       ol_replace_broken_yield=no
+dnl                    case "$target" in
+dnl                    *-*-linux*) 
+dnl                            AC_CHECK_FUNCS(nanosleep)
+dnl                            ol_replace_broken_yield=yes
+dnl                    ;;
+dnl                    esac
+
+                       if test $ol_replace_broken_yield = yes ; then
+                               AC_DEFINE([REPLACE_BROKEN_YIELD],1,
+                                       [define if sched_yield yields the entire process])
+                       fi
+
                        dnl Check if select causes an yield
                        if test $ol_with_yielding_select = auto ; then
                                AC_CACHE_CHECK([if select yields when using pthreads],
@@ -1933,6 +1962,9 @@ if test $ol_link_threads = no ; then
        AC_DEFINE(NO_THREADS,1,
                [define if you have (or want) no threads])
        LTHREAD_LIBS=""
+       BUILD_THREAD=no
+else
+       BUILD_THREAD=yes
 fi
 
 if test $ol_link_threads != no ; then
@@ -2163,6 +2195,14 @@ if test $ol_enable_sql != no ; then
        fi
 fi
 
+dnl ----------------------------------------------------------------
+dnl International Components for Unicode
+OL_ICU
+if test "$ol_icu" = no ; then
+       AC_MSG_WARN([ICU not available])
+else
+       ICU_LIBS="$ol_icu"
+fi
 dnl ----------------------------------------------------------------
 dnl
 dnl Check for Cyrus SASL
@@ -2535,6 +2575,7 @@ AC_CHECK_FUNCS(           \
        lockf                   \
        memcpy                  \
        memmove                 \
+       memrchr                 \
        mkstemp                 \
        mktemp                  \
        pipe                    \
@@ -2560,7 +2601,6 @@ AC_CHECK_FUNCS(           \
        strtoll                 \
        strspn                  \
        sysconf                 \
-       usleep                  \
        waitpid                 \
        wait4                   \
        write                   \
@@ -2575,21 +2615,26 @@ AC_REPLACE_FUNCS(getopt getpeereid)
 if test "$ac_cv_func_getopt" != yes; then
        LIBSRCS="$LIBSRCS getopt.c"
 fi
+
 if test "$ac_cv_func_getpeereid" != yes; then
-       AC_CHECK_MEMBERS([struct msghdr.msg_accrightslen],,,
-               [$ac_includes_default
+       AC_CHECK_FUNCS( getpeerucred )
+       if test "$ac_cv_func_getpeerucred" != yes ; then
+               AC_CHECK_MEMBERS([struct msghdr.msg_accrightslen],,,
+                       [$ac_includes_default
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif])
-       if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
-               AC_CHECK_MEMBERS([struct msghdr.msg_control],,,
-                       [$ac_includes_default
+               if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
+                       AC_CHECK_MEMBERS([struct msghdr.msg_control],,,
+                               [$ac_includes_default
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif])
+               fi
        fi
        LIBSRCS="$LIBSRCS getpeereid.c"
 fi
+
 if test "$ac_cv_func_snprintf" != yes ||
    test "$ac_cv_func_vsnprintf" != yes; then
        if test "$ac_cv_func_snprintf" != yes; then
@@ -2622,6 +2667,10 @@ if test "$ol_enable_slapi" != no ; then
 fi
 
 if test "$ol_enable_debug" != no ; then
+       if test "$ol_enable_debug" = traditional; then
+               AC_DEFINE(OLD_DEBUG,1,
+                       [define to use the original debug style])
+       fi
        AC_DEFINE(LDAP_DEBUG,1,
                [define this to add debugging code])
 fi
@@ -2663,11 +2712,25 @@ if test "$ol_enable_rlookups" != no ; then
        AC_DEFINE(SLAPD_RLOOKUPS,1,[define to support reverse lookups])
 fi
 if test "$ol_enable_aci" != no ; then
-       AC_DEFINE(SLAPD_ACI_ENABLED,1,[define to support per-object ACIs])
-       WITH_ACI_ENABLED=yes
+       if test $ol_enable_dynacl = no ; then
+               ol_enable_dynacl=yes
+               AC_MSG_WARN([ACIs need dynacl])
+       fi
+       if test "$ol_enable_aci" = mod ; then
+               MFLAG=SLAPD_MOD_DYNAMIC
+               dnl remove this after moving servers/slapd/aci.c in contrib/slapd-modules/acl
+               AC_MSG_ERROR([ACI build as dynamic module not supported (yet)])
+       else 
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       WITH_ACI_ENABLED=$ol_enable_aci
+       AC_DEFINE_UNQUOTED(SLAPD_ACI_ENABLED,$MFLAG,[define to support per-object ACIs])
 else
        WITH_ACI_ENABLED=no
 fi
+if test "$ol_enable_dynacl" != no ; then
+       AC_DEFINE(SLAP_DYNACL,1,[define to support run-time loadable ACL])
+fi
 
 if test "$ol_link_modules" != no ; then
        AC_DEFINE(SLAPD_MODULES,1,[define to support modules])
@@ -2863,6 +2926,18 @@ if test "$ol_enable_accesslog" != no ; then
        AC_DEFINE_UNQUOTED(SLAPD_OVER_ACCESSLOG,$MFLAG,[define for In-Directory Access Logging overlay])
 fi
 
+if test "$ol_enable_dds" != no ; then
+       BUILD_DDS=$ol_enable_dds
+       if test "$ol_enable_dds" = mod ; then
+               MFLAG=SLAPD_MOD_DYNAMIC
+               SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
+       else
+               MFLAG=SLAPD_MOD_STATIC
+               SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
+       fi
+       AC_DEFINE_UNQUOTED(SLAPD_OVER_DDS,$MFLAG,[define for Dynamic Directory Services overlay])
+fi
+
 if test "$ol_enable_denyop" != no ; then
        BUILD_DENYOP=$ol_enable_denyop
        if test "$ol_enable_denyop" = mod ; then
@@ -2872,7 +2947,7 @@ if test "$ol_enable_denyop" != no ; then
                MFLAG=SLAPD_MOD_STATIC
                SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
        fi
-       AC_DEFINE_UNQUOTED(SLAPD_OVER_DENYOP,$MFLAG,[define for Dynamic Group overlay])
+       AC_DEFINE_UNQUOTED(SLAPD_OVER_DENYOP,$MFLAG,[define for Deny Operation overlay])
 fi
 
 if test "$ol_enable_dyngroup" != no ; then
@@ -3057,6 +3132,7 @@ AC_SUBST(WITH_SASL)
 AC_SUBST(WITH_TLS)
 AC_SUBST(WITH_MODULES_ENABLED)
 AC_SUBST(WITH_ACI_ENABLED)
+AC_SUBST(BUILD_THREAD)
 AC_SUBST(BUILD_LIBS_DYNAMIC)
 
 AC_SUBST(BUILD_SLAPD)
@@ -3079,6 +3155,7 @@ dnl backends
   AC_SUBST(BUILD_SQL)
 dnl overlays
   AC_SUBST(BUILD_ACCESSLOG)
+  AC_SUBST(BUILD_DDS)
   AC_SUBST(BUILD_DENYOP)
   AC_SUBST(BUILD_DYNGROUP)
   AC_SUBST(BUILD_DYNLIST)
@@ -3124,6 +3201,7 @@ AC_SUBST(SLAPI_LIBS)
 AC_SUBST(LIBSLAPI)
 AC_SUBST(LIBSLAPITOOLS)
 AC_SUBST(AUTH_LIBS)
+AC_SUBST(ICU_LIBS)
 
 AC_SUBST(SLAPD_SLP_LIBS)
 AC_SUBST(SLAPD_GMP_LIBS)
@@ -3191,7 +3269,7 @@ rm -f $BACKENDSC
 cat > $BACKENDSC << ENDX
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -3236,7 +3314,63 @@ ENDX
 /* end of generated file */
 ENDX
 fi
+OVERLAYSC="servers/slapd/overlays/statover.c"
+echo "Making $OVERLAYSC"
+rm -f $OVERLAYSC
+cat > $OVERLAYSC << ENDX
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2006 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* This file is automatically generated by configure; please do not edit. */
+
+#include "portable.h"
+#include "slap.h"
+
+ENDX
+if test "${STATIC_OVERLAYS}"; then
+       for o in ${STATIC_OVERLAYS}; do
+               oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
+               cat >> $OVERLAYSC << ENDX
+extern OV_init ${oo}_initialize;
+ENDX
+       done
+fi
+
+cat >> $OVERLAYSC << ENDX
+
+OverlayInit slap_oinfo[] = {
+ENDX
+
+if test "${STATIC_OVERLAYS}"; then
+       for o in ${STATIC_OVERLAYS}; do
+               oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
+               echo "    Add ${oo} ..."
+               cat >> $OVERLAYSC << ENDX
+       { "${oo}", ${oo}_initialize },
+ENDX
+       done
+fi
+
+       cat >> $OVERLAYSC << ENDX
+       { NULL, NULL },
+};
+
+/* end of generated file */
+ENDX
 
 echo Please run \"make depend\" to build dependencies
-]],[[STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"]])
+]],[[
+STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
+STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
+]])
 AC_OUTPUT