]> git.sur5r.net Git - openldap/blobdiff - configure.in
Merge remote-tracking branch 'origin/mdb.RE/0.9'
[openldap] / configure.in
index e6cc3854537162f935a5a8cfd0cc090ecc4b2817..cc95802472e3cf381df48a85fb5d15b7ff1ecd98 100644 (file)
@@ -1,7 +1,7 @@
 dnl $OpenLDAP$
 dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
 dnl
-dnl Copyright 1998-2013 The OpenLDAP Foundation.
+dnl Copyright 1998-2015 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_LIBTOOL_LANG_F77_CONFIG], [:])dnl
 define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
 dnl ================================================================
 dnl Configure.in for OpenLDAP
-AC_COPYRIGHT([[Copyright 1998-2013 The OpenLDAP Foundation. All rights reserved.
+AC_COPYRIGHT([[Copyright 1998-2015 The OpenLDAP Foundation. All rights reserved.
 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/>.
  *
- * Copyright 1998-2013 The OpenLDAP Foundation
+ * Copyright 1998-2015 The OpenLDAP Foundation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -296,7 +296,8 @@ Backends="bdb \
        relay \
        shell \
        sock \
-       sql"
+       sql \
+       wt"
 
 AC_ARG_ENABLE(xxslapbackends,[
 SLAPD Backend Options:])
@@ -308,7 +309,7 @@ OL_ARG_ENABLE(bdb,[    --enable-bdb   enable Berkeley DB backend],
 OL_ARG_ENABLE(dnssrv,[    --enable-dnssrv        enable dnssrv backend],
        no, [no yes mod], ol_enable_backends)dnl
 OL_ARG_ENABLE(hdb,[    --enable-hdb      enable Hierarchical DB backend],
-       yes, [no yes mod], ol_enable_backends)dnl
+       no, [no yes mod], ol_enable_backends)dnl
 OL_ARG_ENABLE(ldap,[    --enable-ldap    enable ldap backend],
        no, [no yes mod], ol_enable_backends)dnl
 OL_ARG_ENABLE(mdb,[    --enable-mdb      enable mdb database backend],
@@ -333,6 +334,8 @@ OL_ARG_ENABLE(sock,[    --enable-sock         enable sock backend],
        no, [no yes mod], ol_enable_backends)dnl
 OL_ARG_ENABLE(sql,[    --enable-sql      enable sql backend],
        no, [no yes mod], ol_enable_backends)dnl
+OL_ARG_ENABLE(wt,[    --enable-wt        enable WiredTiger backend],
+       no, [no yes mod], ol_enable_backends)dnl
 
 dnl ----------------------------------------------------------------
 dnl SLAPD Overlay Options
@@ -485,7 +488,8 @@ elif test $ol_enable_modules != yes &&
        test $ol_enable_relay = no &&
        test $ol_enable_shell = no &&
        test $ol_enable_sock = no &&
-       test $ol_enable_sql = no ; then
+       test $ol_enable_sql = no &&
+       test $ol_enable_wt = no ; then
        dnl no slapd backend
 
        if test $ol_enable_slapd = yes ; then
@@ -548,6 +552,7 @@ BUILD_RELAY=no
 BUILD_SHELL=no
 BUILD_SOCK=no
 BUILD_SQL=no
+BUILD_WT=no
 
 BUILD_ACCESSLOG=no
 BUILD_AUDITLOG=no
@@ -1207,6 +1212,13 @@ if test $ol_link_tls = no ; then
                AC_CHECK_HEADERS(gnutls/gnutls.h)
 
                if test $ac_cv_header_gnutls_gnutls_h = yes ; then
+                       AC_PREPROC_IFELSE(
+                               [[#include <gnutls/gnutls.h>]
+[#if GNUTLS_VERSION_NUMBER < 0x020c00]
+[#error "GnuTLS 2.12.0 or newer required"]
+[#endif]],
+                                       , [AC_MSG_FAILURE([GnuTLS is too old])])
+
                        AC_CHECK_LIB(gnutls, gnutls_init,
                                [have_gnutls=yes], [have_gnutls=no])
 
@@ -1972,7 +1984,7 @@ if test $ol_enable_sql != no ; then
        ])
 
        sql_LIBS="$LIBS"
-       LIBS="$LTHREAD_LIBS"
+       LIBS="$LTHREAD_LIBS $LIBS"
 
        if test $ol_with_odbc = auto ; then
                ol_with_odbc="iodbc unixodbc odbc32"
@@ -2075,6 +2087,33 @@ if test $ol_enable_ndb != no ; then
        fi
 fi
 
+dnl ----------------------------------------------------------------
+dnl WiredTiger
+ol_link_wt=no
+if test $ol_enable_wt != no ; then
+       AC_CHECK_PROG(PKGCONFIG,pkg-config,yes)
+       if test "$PKGCONFIG" != yes ; then
+               AC_MSG_ERROR([could not locate pkg-config])
+       fi
+       WT_INCS=`pkg-config --cflags wiredtiger`
+       WT_LIBS=`pkg-config --libs wiredtiger`
+
+       save_CFLAGS="$CFLAGS"
+       save_LDFLAGS="$LDFLAGS"
+       CFLAGS="$WT_INCS"
+       CPPFLAGS="$WT_INCS"
+       LDFLAGS="$WT_LIBS"
+       AC_CHECK_HEADERS([wiredtiger.h])
+       AC_CHECK_LIB(wiredtiger,wiredtiger_version,[: ok],[
+               AC_MSG_ERROR([could not locate wiredtiger library])
+       ])
+       CFLAGS="$save_CFLAGS"
+       CPPFLAGS="$save_CPPFLAGS"
+       LDFLAGS="$save_LDFLAGS"
+       SLAPD_LIBS="$SLAPD_LIBS \$(WT_LIBS)"
+       ol_link_wt=yes
+fi
+
 dnl ----------------------------------------------------------------
 dnl International Components for Unicode
 OL_ICU
@@ -2804,6 +2843,19 @@ if test "$ol_link_sql" != no ; then
        AC_DEFINE_UNQUOTED(SLAPD_SQL,$MFLAG,[define to support SQL backend])
 fi
 
+if test "$ol_link_wt" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_WT=$ol_enable_wt
+       if test "$ol_enable_wt" = mod; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-wt"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-wt"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       AC_DEFINE_UNQUOTED(SLAPD_WT,$MFLAG,[define to support WiredTiger backend])
+fi
+
 if test "$ol_enable_accesslog" != no ; then
        BUILD_ACCESSLOG=$ol_enable_accesslog
        if test "$ol_enable_accesslog" = mod ; then
@@ -3099,6 +3151,7 @@ dnl backends
   AC_SUBST(BUILD_SHELL)
   AC_SUBST(BUILD_SOCK)
   AC_SUBST(BUILD_SQL)
+  AC_SUBST(BUILD_WT)
 dnl overlays
   AC_SUBST(BUILD_ACCESSLOG)
   AC_SUBST(BUILD_AUDITLOG)
@@ -3162,6 +3215,9 @@ AC_SUBST(SLAPD_SQL_LDFLAGS)
 AC_SUBST(SLAPD_SQL_LIBS)
 AC_SUBST(SLAPD_SQL_INCLUDES)
 
+AC_SUBST(WT_INCS)
+AC_SUBST(WT_LIBS)
+
 dnl ----------------------------------------------------------------
 dnl final help output
 AC_ARG_WITH(xxinstall,[
@@ -3206,6 +3262,7 @@ AC_CONFIG_FILES([Makefile:build/top.mk:Makefile.in:build/dir.mk]
 [servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk]
 [servers/slapd/back-sock/Makefile:build/top.mk:servers/slapd/back-sock/Makefile.in:build/mod.mk]
 [servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk]
+[servers/slapd/back-wt/Makefile:build/top.mk:servers/slapd/back-wt/Makefile.in:build/mod.mk]
 [servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk]
 [servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk]
 [servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk]
@@ -3222,7 +3279,7 @@ rm -f $BACKENDSC
 cat > $BACKENDSC << ENDX
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2013 The OpenLDAP Foundation.
+ * Copyright 1998-2015 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -3273,7 +3330,7 @@ rm -f $OVERLAYSC
 cat > $OVERLAYSC << ENDX
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2013 The OpenLDAP Foundation.
+ * Copyright 1998-2015 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without