]> git.sur5r.net Git - openldap/blobdiff - configure.in
ITS#8573 allow all libldap options in tools -o option
[openldap] / configure.in
index 41cd0a5df892091d70e4deae4b86a9d022f4302b..ee25a4a90aefeae3f4491d2f677c1aeee80550d0 100644 (file)
@@ -1,7 +1,7 @@
 dnl $OpenLDAP$
 dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
 dnl
 dnl $OpenLDAP$
 dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
 dnl
-dnl Copyright 1998-2017 The OpenLDAP Foundation.
+dnl Copyright 1998-2018 The OpenLDAP Foundation.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@ define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
 define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
 dnl ================================================================
 dnl Configure.in for OpenLDAP
 define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
 dnl ================================================================
 dnl Configure.in for OpenLDAP
-AC_COPYRIGHT([[Copyright 1998-2017 The OpenLDAP Foundation. All rights reserved.
+AC_COPYRIGHT([[Copyright 1998-2018 The OpenLDAP Foundation. All rights reserved.
 Restrictions apply, see COPYRIGHT and LICENSE files.]])
 AC_REVISION([$Id$])
 AC_INIT([OpenLDAP],,[http://www.openldap.org/its/])
 Restrictions apply, see COPYRIGHT and LICENSE files.]])
 AC_REVISION([$Id$])
 AC_INIT([OpenLDAP],,[http://www.openldap.org/its/])
@@ -98,7 +98,7 @@ AH_TOP([
 /* begin of portable.h.pre */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
 /* begin of portable.h.pre */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2017 The OpenLDAP Foundation
+ * Copyright 1998-2018 The OpenLDAP Foundation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -422,7 +422,7 @@ dnl ----------------------------------------------------------------
 
 # validate options
 if test $ol_enable_slapd = no ; then
 
 # validate options
 if test $ol_enable_slapd = no ; then
-       dnl SLAPD was specificallly disabled
+       dnl SLAPD was specifically disabled
        if test $ol_enable_slapi = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-slapi argument])
        fi
        if test $ol_enable_slapi = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-slapi argument])
        fi
@@ -568,6 +568,7 @@ BUILD_WT=no
 
 BUILD_ACCESSLOG=no
 BUILD_AUDITLOG=no
 
 BUILD_ACCESSLOG=no
 BUILD_AUDITLOG=no
+BUILD_AUTOCA=no
 BUILD_CONSTRAINT=no
 BUILD_DDS=no
 BUILD_DENYOP=no
 BUILD_CONSTRAINT=no
 BUILD_DDS=no
 BUILD_DENYOP=no
@@ -968,7 +969,7 @@ AC_CHECK_FUNC(select, :, AC_MSG_ERROR([select() required.]))
 
 if test "${ac_cv_header_winsock_h}" != yes; then
        dnl Select arg types
 
 if test "${ac_cv_header_winsock_h}" != yes; then
        dnl Select arg types
-       dnl (if this detection becomes permenent, it and the select() detection
+       dnl (if this detection becomes permanent, it and the select() detection
        dnl should be done before the yielding select test) 
        AC_FUNC_SELECT_ARGTYPES
 fi
        dnl should be done before the yielding select test) 
        AC_FUNC_SELECT_ARGTYPES
 fi
@@ -994,6 +995,18 @@ if test "${ac_cv_header_sys_epoll_h}" = yes; then
        AC_DEFINE(HAVE_EPOLL,1, [define if your system supports epoll])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
 fi
 
        AC_DEFINE(HAVE_EPOLL,1, [define if your system supports epoll])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
 fi
 
+dnl ----------------------------------------------------------------
+AC_CHECK_HEADERS( sys/event.h )
+if test "${ac_cv_header_sys_event_h}" = yes; then
+AC_MSG_CHECKING(for kqueue system call)
+AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int argc, char **argv)
+{
+       int kqfd = kqueue();
+       exit (kqfd == -1 ? 1 : 0);
+}]])],[AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_KQUEUE,1, [define if your system supports kqueue])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
+fi
+
 dnl ----------------------------------------------------------------
 AC_CHECK_HEADERS( sys/devpoll.h )
 dnl "/dev/poll" needs <sys/poll.h> as well...
 dnl ----------------------------------------------------------------
 AC_CHECK_HEADERS( sys/devpoll.h )
 dnl "/dev/poll" needs <sys/poll.h> as well...
@@ -1224,11 +1237,11 @@ if test $ol_link_tls = no ; then
                AC_CHECK_HEADERS(gnutls/gnutls.h)
 
                if test $ac_cv_header_gnutls_gnutls_h = yes ; then
                AC_CHECK_HEADERS(gnutls/gnutls.h)
 
                if test $ac_cv_header_gnutls_gnutls_h = yes ; then
-                       AC_PREPROC_IFELSE(
+                       AC_PREPROC_IFELSE([AC_LANG_SOURCE(
                                [[#include <gnutls/gnutls.h>]
 [#if GNUTLS_VERSION_NUMBER < 0x020c00]
 [#error "GnuTLS 2.12.0 or newer required"]
                                [[#include <gnutls/gnutls.h>]
 [#if GNUTLS_VERSION_NUMBER < 0x020c00]
 [#error "GnuTLS 2.12.0 or newer required"]
-[#endif]],
+[#endif]])],
                                        , [AC_MSG_FAILURE([GnuTLS is too old])])
 
                        AC_CHECK_LIB(gnutls, gnutls_init,
                                        , [AC_MSG_FAILURE([GnuTLS is too old])])
 
                        AC_CHECK_LIB(gnutls, gnutls_init,
@@ -1490,7 +1503,7 @@ pthread_rwlock_t rwlock;
                        AC_DEFINE(HAVE_PTHREAD_DETACH,1,
                                [define if you have pthread_detach function])
 
                        AC_DEFINE(HAVE_PTHREAD_DETACH,1,
                                [define if you have pthread_detach function])
 
-                       dnl Check for setconcurreny functions
+                       dnl Check for setconcurrency functions
                        AC_CHECK_FUNCS( \
                                pthread_setconcurrency \
                                pthread_getconcurrency \
                        AC_CHECK_FUNCS( \
                                pthread_setconcurrency \
                                pthread_getconcurrency \
@@ -1505,7 +1518,7 @@ pthread_rwlock_t rwlock;
                                AC_MSG_ERROR([LinuxThreads header/library mismatch]);
                        fi
 
                                AC_MSG_ERROR([LinuxThreads header/library mismatch]);
                        fi
 
-                       AC_CACHE_CHECK([if pthread_create() works],
+                       AC_CACHE_CHECK([AC_LANG_SOURCE([if pthread_create() works])],
                                ol_cv_pthread_create_works,[
                        AC_RUN_IFELSE([OL_PTHREAD_TEST_PROGRAM],
                                [ol_cv_pthread_create_works=yes],
                                ol_cv_pthread_create_works,[
                        AC_RUN_IFELSE([OL_PTHREAD_TEST_PROGRAM],
                                [ol_cv_pthread_create_works=yes],
@@ -1736,7 +1749,7 @@ case $ol_with_threads in auto | yes | lwp)
                                ol_with_yielding_select=yes
                        fi
 
                                ol_with_yielding_select=yes
                        fi
 
-                       dnl Check for setconcurreny functions
+                       dnl Check for setconcurrency functions
                        AC_CHECK_FUNCS( \
                                thr_setconcurrency \
                                thr_getconcurrency \
                        AC_CHECK_FUNCS( \
                                thr_setconcurrency \
                                thr_getconcurrency \
@@ -1971,7 +1984,7 @@ hosts_access(req)
                AC_DEFINE(HAVE_TCPD,1, [define if you have -lwrap])
                WRAP_LIBS="-lwrap"
        elif test $ol_enable_wrappers = yes ; then
                AC_DEFINE(HAVE_TCPD,1, [define if you have -lwrap])
                WRAP_LIBS="-lwrap"
        elif test $ol_enable_wrappers = yes ; then
-               AC_MSG_ERROR([could not find TCP wrappers, select apppropriate options or disable])
+               AC_MSG_ERROR([could not find TCP wrappers, select appropriate options or disable])
        else
                AC_MSG_WARN([could not find TCP wrappers, support disabled])
                WRAP_LIBS=""
        else
                AC_MSG_WARN([could not find TCP wrappers, support disabled])
                WRAP_LIBS=""
@@ -2241,10 +2254,16 @@ if test $ol_enable_crypt != no ; then
                AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
                        have_crypt=yes], [have_crypt=no])])
 
                AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
                        have_crypt=yes], [have_crypt=no])])
 
+       LIBS="$TLS_LIBS $LIBS"
+       AC_CHECK_LIB(crypt, crypt_r, [have_crypt_r=yes], [have_crypt_r=no])
+
        LIBS="$save_LIBS"
 
        if test $have_crypt = yes ; then
                AC_DEFINE(HAVE_CRYPT,1, [define if crypt(3) is available])
        LIBS="$save_LIBS"
 
        if test $have_crypt = yes ; then
                AC_DEFINE(HAVE_CRYPT,1, [define if crypt(3) is available])
+               if test $have_crypt_r = yes ; then
+                       AC_DEFINE(HAVE_CRYPT_R, 1, [define if crypt_r() is also available])
+               fi
        else
                AC_MSG_WARN([could not find crypt])
                if test $ol_enable_crypt = yes ; then
        else
                AC_MSG_WARN([could not find crypt])
                if test $ol_enable_crypt = yes ; then
@@ -2549,7 +2568,7 @@ if test "$ac_cv_func_getpeereid" != yes; then
                fi
                AC_CHECK_MEMBERS([struct stat.st_fstype, struct stat.st_vfstype])
                if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
                fi
                AC_CHECK_MEMBERS([struct stat.st_fstype, struct stat.st_vfstype])
                if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
-                       AC_COMPILE_IFELSE([struct stat st; char *ptr=st.st_fstype;],
+                       AC_COMPILE_IFELSE([AC_LANG_SOURCE([struct stat st; char *ptr=st.st_fstype;])],
                                AC_DEFINE([HAVE_STRUCT_STAT_ST_FSTYPE_CHAR],1,[define to 1 if st_fstype is char *]),
                                AC_DEFINE([HAVE_STRUCT_STAT_ST_FSTYPE_INT],1,[define to 1 if st_fstype is int]))
                fi
                                AC_DEFINE([HAVE_STRUCT_STAT_ST_FSTYPE_CHAR],1,[define to 1 if st_fstype is char *]),
                                AC_DEFINE([HAVE_STRUCT_STAT_ST_FSTYPE_INT],1,[define to 1 if st_fstype is int]))
                fi
@@ -2907,7 +2926,7 @@ if test "$ol_enable_auditlog" != no ; then
 fi
 
 if test "$ol_enable_autoca" != no ; then
 fi
 
 if test "$ol_enable_autoca" != no ; then
-       BUILD_AUDITLOG=$ol_enable_autoca
+       BUILD_AUTOCA=$ol_enable_autoca
        if test "$ol_enable_autoca" = mod ; then
                MFLAG=SLAPD_MOD_DYNAMIC
                SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS autoca.la"
        if test "$ol_enable_autoca" = mod ; then
                MFLAG=SLAPD_MOD_DYNAMIC
                SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS autoca.la"
@@ -3194,6 +3213,7 @@ dnl backends
 dnl overlays
   AC_SUBST(BUILD_ACCESSLOG)
   AC_SUBST(BUILD_AUDITLOG)
 dnl overlays
   AC_SUBST(BUILD_ACCESSLOG)
   AC_SUBST(BUILD_AUDITLOG)
+  AC_SUBST(BUILD_AUTOCA)
   AC_SUBST(BUILD_COLLECT)
   AC_SUBST(BUILD_CONSTRAINT)
   AC_SUBST(BUILD_DDS)
   AC_SUBST(BUILD_COLLECT)
   AC_SUBST(BUILD_CONSTRAINT)
   AC_SUBST(BUILD_DDS)
@@ -3319,7 +3339,7 @@ rm -f $BACKENDSC
 cat > $BACKENDSC << ENDX
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
 cat > $BACKENDSC << ENDX
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2017 The OpenLDAP Foundation.
+ * Copyright 1998-2018 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -3370,7 +3390,7 @@ rm -f $OVERLAYSC
 cat > $OVERLAYSC << ENDX
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
 cat > $OVERLAYSC << ENDX
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2017 The OpenLDAP Foundation.
+ * Copyright 1998-2018 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without