]> git.sur5r.net Git - openldap/blobdiff - configure.in
Add references to new RFCs
[openldap] / configure.in
index 9cee4e976f4fefafa1dc3a7c2ae8474c3553a71e..49540f2b90db7ccda17fbf85525d3c611dde59f5 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-2003 The OpenLDAP Foundation.
+dnl Copyright 1998-2004 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_INIT_BINSH],
 
 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
 #
 
 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
 #
-# Copyright 1998-2003 The OpenLDAP Foundation.
+# Copyright 1998-2004 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
@@ -34,7 +34,7 @@ define([AC_INIT_BINSH],
 # top-level directory of the distribution or, alternatively, at
 # <http://www.OpenLDAP.org/license.html>.
 
 # top-level directory of the distribution or, alternatively, at
 # <http://www.OpenLDAP.org/license.html>.
 
-echo "Copyright 1998-2003 The OpenLDAP Foundation. All rights reserved."
+echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
 echo " Restrictions apply, see COPYRIGHT and LICENSE files."
 ])dnl
 dnl ----------------------------------------------------------------
 echo " Restrictions apply, see COPYRIGHT and LICENSE files."
 ])dnl
 dnl ----------------------------------------------------------------
@@ -183,8 +183,6 @@ 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(cleartext,[    --enable-cleartext          enable cleartext passwords], yes)dnl
 OL_ARG_ENABLE(crypt,[    --enable-crypt          enable crypt(3) passwords], no)dnl
 OL_ARG_ENABLE(aci,[    --enable-aci      enable per-object ACIs (experimental)], no)dnl
 OL_ARG_ENABLE(cleartext,[    --enable-cleartext          enable cleartext passwords], yes)dnl
 OL_ARG_ENABLE(crypt,[    --enable-crypt          enable crypt(3) passwords], no)dnl
-dnl OL_ARG_ENABLE(kpasswd,[    --enable-kpasswd          enable Kerberos password verification], no)dnl
-ol_enable_kpasswd=${ol_enable_kpasswd-no}
 OL_ARG_ENABLE(lmpasswd,[    --enable-lmpasswd    enable LAN Manager passwords], no)dnl
 OL_ARG_ENABLE(spasswd,[    --enable-spasswd      enable (Cyrus) SASL password verification], no)dnl
 OL_ARG_ENABLE(modules,[    --enable-modules      enable dynamic module support], no)dnl
 OL_ARG_ENABLE(lmpasswd,[    --enable-lmpasswd    enable LAN Manager passwords], no)dnl
 OL_ARG_ENABLE(spasswd,[    --enable-spasswd      enable (Cyrus) SASL password verification], no)dnl
 OL_ARG_ENABLE(modules,[    --enable-modules      enable dynamic module support], no)dnl
@@ -232,6 +230,9 @@ OL_ARG_WITH(passwd_module,[    --with-passwd-module  module type static|dynamic]
 OL_ARG_ENABLE(perl,[    --enable-perl    enable perl backend], no)dnl
 OL_ARG_WITH(perl_module,[    --with-perl-module          module type static|dynamic], static,
        [static dynamic])
 OL_ARG_ENABLE(perl,[    --enable-perl    enable perl backend], no)dnl
 OL_ARG_WITH(perl_module,[    --with-perl-module          module type static|dynamic], static,
        [static dynamic])
+OL_ARG_ENABLE(relay,[    --enable-relay          enable relay backend], yes)dnl
+OL_ARG_WITH(relay_module,[    --with-relay-module   module type static|dynamic], static,
+       [static dynamic])
 OL_ARG_ENABLE(shell,[    --enable-shell          enable shell backend], no)dnl
 OL_ARG_WITH(shell_module,[    --with-shell-module        module type static|dynamic], static,
        [static dynamic])
 OL_ARG_ENABLE(shell,[    --enable-shell          enable shell backend], no)dnl
 OL_ARG_WITH(shell_module,[    --with-shell-module        module type static|dynamic], static,
        [static dynamic])
@@ -243,6 +244,10 @@ dnl ----------------------------------------------------------------
 dnl SLAPD Overlay Options
 AC_ARG_WITH(xxslapoverlays,[
 SLAPD Overlay Options:])
 dnl SLAPD Overlay Options
 AC_ARG_WITH(xxslapoverlays,[
 SLAPD Overlay Options:])
+OL_ARG_WITH(chain,[    --with-chain      LDAP Chain Response no|yes|mod], no,
+       [no yes mod])
+OL_ARG_WITH(denyop,[    --with-denyop            Deny Operation overlay no|yes|mod], no,
+       [no yes mod])
 OL_ARG_WITH(dyngroup,[    --with-dyngroup        Dynamic Group overlay no|yes|mod], no,
        [no yes mod])
 OL_ARG_WITH(proxycache,[    --with-proxycache    Proxy Cache overlay no|yes|mod], no,
 OL_ARG_WITH(dyngroup,[    --with-dyngroup        Dynamic Group overlay no|yes|mod], no,
        [no yes mod])
 OL_ARG_WITH(proxycache,[    --with-proxycache    Proxy Cache overlay no|yes|mod], no,
@@ -301,6 +306,9 @@ if test $ol_enable_slapd = no ; then
        if test $ol_enable_perl = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-perl argument])
        fi
        if test $ol_enable_perl = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-perl argument])
        fi
+       if test $ol_enable_relay = yes ; then
+               AC_MSG_WARN([slapd disabled, ignoring --enable-relay argument])
+       fi
        if test $ol_enable_shell = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-shell argument])
        fi
        if test $ol_enable_shell = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-shell argument])
        fi
@@ -358,6 +366,9 @@ if test $ol_enable_slapd = no ; then
        if test $ol_with_perl_module != static ; then
                AC_MSG_WARN([slapd disabled, ignoring --with-perl-module argument])
        fi
        if test $ol_with_perl_module != static ; then
                AC_MSG_WARN([slapd disabled, ignoring --with-perl-module argument])
        fi
+       if test $ol_with_relay_module != static ; then
+               AC_MSG_WARN([slapd disabled, ignoring --with-relay-module argument])
+       fi
        if test $ol_with_shell_module != static ; then
                AC_MSG_WARN([slapd disabled, ignoring --with-shell-module argument])
        fi
        if test $ol_with_shell_module != static ; then
                AC_MSG_WARN([slapd disabled, ignoring --with-shell-module argument])
        fi
@@ -370,6 +381,13 @@ if test $ol_enable_slapd = no ; then
        if test $ol_enable_rewrite = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-rewrite argument])
        fi
        if test $ol_enable_rewrite = yes ; then
                AC_MSG_WARN([slapd disabled, ignoring --enable-rewrite argument])
        fi
+       dnl overlays
+       if test $ol_with_chain != no ; then
+               AC_MSG_WARN([slapd disabled, ignoring --with-chain argument])
+       fi
+       if test $ol_with_denyop != no ; then
+               AC_MSG_WARN([slapd disabled, ignoring --with-denyop argument])
+       fi
        if test $ol_with_dyngroup != no ; then
                AC_MSG_WARN([slapd disabled, ignoring --with-dyngroup argument])
        fi
        if test $ol_with_dyngroup != no ; then
                AC_MSG_WARN([slapd disabled, ignoring --with-dyngroup argument])
        fi
@@ -392,6 +410,7 @@ if test $ol_enable_slapd = no ; then
        ol_enable_null=no
        ol_enable_passwd=no
        ol_enable_perl=no
        ol_enable_null=no
        ol_enable_passwd=no
        ol_enable_perl=no
+       ol_enable_relay=no
        ol_enable_shell=no
        ol_enable_sql=no
 
        ol_enable_shell=no
        ol_enable_sql=no
 
@@ -414,6 +433,7 @@ if test $ol_enable_slapd = no ; then
        ol_with_null_module=static
        ol_with_passwd_module=static
        ol_with_perl_module=static
        ol_with_null_module=static
        ol_with_passwd_module=static
        ol_with_perl_module=static
+       ol_with_relay_module=static
        ol_with_shell_module=static
        ol_with_sql_module=static
 
        ol_with_shell_module=static
        ol_with_sql_module=static
 
@@ -421,6 +441,8 @@ if test $ol_enable_slapd = no ; then
 
        ol_enable_rewrite=no
 
 
        ol_enable_rewrite=no
 
+       ol_with_chain=no
+       ol_with_denyop=no
        ol_with_dyngroup=no
        ol_with_proxycache=no
        ol_with_rwm=no
        ol_with_dyngroup=no
        ol_with_proxycache=no
        ol_with_rwm=no
@@ -450,6 +472,7 @@ elif test $ol_enable_ldbm = no ; then
                $ol_enable_null = no -a \
                $ol_enable_passwd = no -a \
                $ol_enable_perl = no -a \
                $ol_enable_null = no -a \
                $ol_enable_passwd = no -a \
                $ol_enable_perl = no -a \
+               $ol_enable_relay = no -a \
                $ol_enable_shell = no -a \
                $ol_enable_sql = no ; then
 
                $ol_enable_shell = no -a \
                $ol_enable_sql = no ; then
 
@@ -513,14 +536,14 @@ if test $ol_enable_lmpasswd = yes ; then
        fi
 fi
 
        fi
 fi
 
-if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
+if test $ol_enable_kbind = yes ; then
        if test $ol_with_kerberos = no ; then
                AC_MSG_ERROR([options require --with-kerberos])
        elif test $ol_with_kerberos = auto ; then
                ol_with_kerberos=yes
        fi
 
        if test $ol_with_kerberos = no ; then
                AC_MSG_ERROR([options require --with-kerberos])
        elif test $ol_with_kerberos = auto ; then
                ol_with_kerberos=yes
        fi
 
-elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
+elif test $ol_enable_kbind = no ; then
        if test $ol_with_kerberos = auto ; then
                ol_with_kerberos=no
        elif test $ol_with_kerberos != no ; then
        if test $ol_with_kerberos = auto ; then
                ol_with_kerberos=no
        elif test $ol_with_kerberos != no ; then
@@ -566,6 +589,7 @@ BUILD_MONITOR=no
 BUILD_NULL=no
 BUILD_PASSWD=no
 BUILD_PERL=no
 BUILD_NULL=no
 BUILD_PASSWD=no
 BUILD_PERL=no
+BUILD_RELAY=no
 BUILD_SHELL=no
 BUILD_SQL=no
 
 BUILD_SHELL=no
 BUILD_SQL=no
 
@@ -579,9 +603,12 @@ BUILD_MONITOR_DYNAMIC=static
 BUILD_NULL_DYNAMIC=static
 BUILD_PASSWD_DYNAMIC=static
 BUILD_PERL_DYNAMIC=static
 BUILD_NULL_DYNAMIC=static
 BUILD_PASSWD_DYNAMIC=static
 BUILD_PERL_DYNAMIC=static
+BUILD_RELAY_DYNAMIC=static
 BUILD_SHELL_DYNAMIC=static
 BUILD_SQL_DYNAMIC=static
 
 BUILD_SHELL_DYNAMIC=static
 BUILD_SQL_DYNAMIC=static
 
+BUILD_CHAIN=no
+BUILD_DENYOP=no
 BUILD_DYNGROUP=no
 BUILD_PROXYCACHE=no
 BUILD_RWM=no
 BUILD_DYNGROUP=no
 BUILD_PROXYCACHE=no
 BUILD_RWM=no
@@ -811,19 +838,28 @@ else
        ol_with_null_module=static
        ol_with_passwd_module=static
        ol_with_perl_module=static
        ol_with_null_module=static
        ol_with_passwd_module=static
        ol_with_perl_module=static
+       ol_with_relay_module=static
        ol_with_shell_module=static
        ol_with_sql_module=static
        ol_with_shell_module=static
        ol_with_sql_module=static
+       if test $ol_with_chain = mod ; then
+               AC_MSG_WARN([building static chain overlay])
+               ol_with_chain=yes
+       fi
+       if test $ol_with_denyop = mod ; then
+               AC_MSG_WARN([building static denyop overlay])
+               ol_with_denyop=yes
+       fi
        if test $ol_with_dyngroup = mod ; then
                AC_MSG_WARN([building static dyngroup overlay])
        if test $ol_with_dyngroup = mod ; then
                AC_MSG_WARN([building static dyngroup overlay])
-               ol_with_dyngroup = yes
+               ol_with_dyngroup=yes
        fi
        if test $ol_with_proxycache = mod ; then
                AC_MSG_WARN([building static proxycache overlay])
        fi
        if test $ol_with_proxycache = mod ; then
                AC_MSG_WARN([building static proxycache overlay])
-               ol_with_proxycache = yes
+               ol_with_proxycache=yes
        fi
        if test $ol_with_rwm = mod ; then
                AC_MSG_WARN([building static rwm overlay])
        fi
        if test $ol_with_rwm = mod ; then
                AC_MSG_WARN([building static rwm overlay])
-               ol_with_rwm = yes
+               ol_with_rwm=yes
        fi
 fi
 
        fi
 fi
 
@@ -847,6 +883,7 @@ AC_CHECK_HEADERS(   \
        arpa/inet.h             \
        arpa/nameser.h  \
        assert.h                \
        arpa/inet.h             \
        arpa/nameser.h  \
        assert.h                \
+       bits/types.h    \
        conio.h                 \
        crypt.h                 \
        direct.h                \
        conio.h                 \
        crypt.h                 \
        direct.h                \
@@ -897,8 +934,6 @@ AC_CHECK_HEADERS(   \
 dnl ----------------------------------------------------------------
 dnl Checks for libraries
 
 dnl ----------------------------------------------------------------
 dnl Checks for libraries
 
-AC_CHECK_FUNC(dlopen, :, [AC_CHECK_LIB(dl, dlopen)])
-
 dnl HP-UX requires -lV3
 dnl this is not needed on newer versions of HP-UX
 AC_CHECK_LIB(V3, sigset)
 dnl HP-UX requires -lV3
 dnl this is not needed on newer versions of HP-UX
 AC_CHECK_LIB(V3, sigset)
@@ -906,40 +941,37 @@ AC_CHECK_LIB(V3, sigset)
 dnl The following is INTENTIONALLY scripted out because shell does not
 dnl support variable names with the '@' character, which is what
 dnl autoconf would try to generate if one merely used AC_SEARCH_LIBS
 dnl The following is INTENTIONALLY scripted out because shell does not
 dnl support variable names with the '@' character, which is what
 dnl autoconf would try to generate if one merely used AC_SEARCH_LIBS
-AC_MSG_CHECKING(for winsock)
+if test "$ac_cv_header_winsock_h" = yes; then
+AC_CACHE_CHECK([for winsock], [ol_cv_winsock],
 save_LIBS="$LIBS"
 for curlib in ws2_32 wsock32; do
        LIBS="$LIBS -l$curlib"
 save_LIBS="$LIBS"
 for curlib in ws2_32 wsock32; do
        LIBS="$LIBS -l$curlib"
-       AC_TRY_LINK([
-                       char socket@12();
-                       char select@20();
-                       char closesocket@4();
-                       char gethostname@8();
+       AC_TRY_LINK([#include <winsock.h>
                        ],
                        [
                        ],
                        [
-                       socket@12();
-                       select@20();
-                       closesocket@4();
-                       gethostname@8();
+                       socket(0,0,0);
+                       select(0,NULL,NULL,NULL,NULL);
+                       closesocket(0);
+                       gethostname(NULL,0);
                        ],
                        ],
-                       have_winsock=yes, have_winsock=no)
+                       ol_cv_winsock=yes, ol_cv_winsock=no)
 
 
-       if test $have_winsock = yes; then
+       if test $ol_cv_winsock = yes; then
                AC_DEFINE(HAVE_WINSOCK, 1, [define if you have winsock])
                ac_cv_func_socket=yes
                ac_cv_func_select=yes
                ac_cv_func_closesocket=yes
                ac_cv_func_gethostname=yes
                if test $curlib = ws2_32; then
                AC_DEFINE(HAVE_WINSOCK, 1, [define if you have winsock])
                ac_cv_func_socket=yes
                ac_cv_func_select=yes
                ac_cv_func_closesocket=yes
                ac_cv_func_gethostname=yes
                if test $curlib = ws2_32; then
-                       have_winsock=winsock2
+                       ol_cv_winsock=winsock2
                        AC_DEFINE(HAVE_WINSOCK2, 1,
                                  [define if you have winsock2])
                fi
                break
        fi
        LIBS="$save_LIBS"
                        AC_DEFINE(HAVE_WINSOCK2, 1,
                                  [define if you have winsock2])
                fi
                break
        fi
        LIBS="$save_LIBS"
-done
-AC_MSG_RESULT($have_winsock)
+done)
+fi
 
 dnl Find socket()
 dnl Likely combinations:
 
 dnl Find socket()
 dnl Likely combinations:
@@ -1008,12 +1040,12 @@ if test $have_uuid = no ; then
        save_LIBS="$LIBS"
        LIBS="$LIBS -lrpcrt4"
        AC_TRY_LINK([
        save_LIBS="$LIBS"
        LIBS="$LIBS -lrpcrt4"
        AC_TRY_LINK([
-               char UuidCreate@4();
-               char UuidToStringA@8();
+               int __stdcall UuidCreate(void *);
+               int __stdcall UuidToStringA(void *,void **);
                ],
                [
                ],
                [
-               UuidCreate@4();
-               UuidToStringA@8();
+               UuidCreate(0);
+               UuidToStringA(0,0);
                ],
                need_rpcrt=yes, need_rpcrt=no)
        if test $need_rpcrt = yes; then
                ],
                need_rpcrt=yes, need_rpcrt=no)
        if test $need_rpcrt = yes; then
@@ -1121,7 +1153,6 @@ fi
 dnl ----------------------------------------------------------------
 dnl Kerberos
 ol_link_kbind=no
 dnl ----------------------------------------------------------------
 dnl Kerberos
 ol_link_kbind=no
-ol_link_kpasswd=no
 ol_link_krb5=no
 ol_link_krb4=no
 
 ol_link_krb5=no
 ol_link_krb4=no
 
@@ -1176,10 +1207,6 @@ if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
                        AC_DEFINE(HAVE_KRB5, 1,
                                [define if you have Kerberos V])
 
                        AC_DEFINE(HAVE_KRB5, 1,
                                [define if you have Kerberos V])
 
-                       if test $ol_enable_kpasswd != no ; then
-                               ol_link_kpasswd=yes;
-                       fi
-
                        if test $ol_with_kerberos = k5only ; then
                                ol_with_kerberos=found
                        fi
                        if test $ol_with_kerberos = k5only ; then
                                ol_with_kerberos=found
                        fi
@@ -1276,10 +1303,6 @@ if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
        fi
 fi
 
        fi
 fi
 
-if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
-       ol_link_kpasswd=yes
-fi
-
 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
        ol_link_kbind=yes
 
 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
        ol_link_kbind=yes
 
@@ -2540,9 +2563,6 @@ fi
 if test "$ol_enable_crypt" != no ; then
        AC_DEFINE(SLAPD_CRYPT,1,[define to support crypt(3) passwords])
 fi
 if test "$ol_enable_crypt" != no ; then
        AC_DEFINE(SLAPD_CRYPT,1,[define to support crypt(3) passwords])
 fi
-if test "$ol_link_kpasswd" != no ; then
-       AC_DEFINE(SLAPD_KPASSWD,1,[define to support Kerberos passwords])
-fi
 if test "$ol_link_spasswd" != no ; then
        AC_DEFINE(SLAPD_SPASSWD,1,[define to support SASL passwords])
 fi
 if test "$ol_link_spasswd" != no ; then
        AC_DEFINE(SLAPD_SPASSWD,1,[define to support SASL passwords])
 fi
@@ -2722,6 +2742,21 @@ if test "$ol_link_perl" != no ; then
        fi
 fi
 
        fi
 fi
 
+if test "$ol_enable_relay" != no ; then
+       AC_DEFINE(SLAPD_RELAY,1,[define to support relay backend])
+       BUILD_SLAPD=yes
+       BUILD_RELAY=yes
+       if test "$ol_with_relay_module" != static ; then
+               AC_DEFINE(SLAPD_RELAY_DYNAMIC,1,
+                       [define to support dynamic relay backend])
+               BUILD_RELAY=mod
+               BUILD_RELAY_DYNAMIC=shared
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
+       fi
+fi
+
 if test "$ol_enable_shell" != no ; then
        if test "$ol_link_thread" != no ; then
                AC_MSG_WARN([Use of --without-threads is recommended with back-shell])
 if test "$ol_enable_shell" != no ; then
        if test "$ol_link_thread" != no ; then
                AC_MSG_WARN([Use of --without-threads is recommended with back-shell])
@@ -2755,6 +2790,28 @@ if test "$ol_link_sql" != no ; then
        fi
 fi
 
        fi
 fi
 
+if test "$ol_with_chain" != no ; then
+       BUILD_CHAIN=$ol_with_chain
+       if test "$ol_with_chain" = mod ; then
+               MFLAG=SLAPD_MOD_DYNAMIC
+               SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
+       else
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       AC_DEFINE_UNQUOTED(SLAPD_OVER_CHAIN,$MFLAG,[define for Dynamic Group overlay])
+fi
+
+if test "$ol_with_denyop" != no ; then
+       BUILD_DENYOP=$ol_with_denyop
+       if test "$ol_with_denyop" = mod ; then
+               MFLAG=SLAPD_MOD_DYNAMIC
+               SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
+       else
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       AC_DEFINE_UNQUOTED(SLAPD_OVER_DENYOP,$MFLAG,[define for Dynamic Group overlay])
+fi
+
 if test "$ol_with_dyngroup" != no ; then
        BUILD_DYNGROUP=$ol_with_dyngroup
        if test "$ol_with_dyngroup" = mod ; then
 if test "$ol_with_dyngroup" != no ; then
        BUILD_DYNGROUP=$ol_with_dyngroup
        if test "$ol_with_dyngroup" = mod ; then
@@ -2831,8 +2888,10 @@ AC_SUBST(WITH_TLS)
 AC_SUBST(BUILD_LIBS_DYNAMIC)
 
 AC_SUBST(BUILD_SLAPD)
 AC_SUBST(BUILD_LIBS_DYNAMIC)
 
 AC_SUBST(BUILD_SLAPD)
+dnl slapi
   AC_SUBST(BUILD_SLAPI)
   AC_SUBST(SLAPD_SLAPI_DEPEND)
   AC_SUBST(BUILD_SLAPI)
   AC_SUBST(SLAPD_SLAPI_DEPEND)
+dnl backends
   AC_SUBST(BUILD_BDB)
   AC_SUBST(BUILD_DNSSRV)
   AC_SUBST(BUILD_HDB)
   AC_SUBST(BUILD_BDB)
   AC_SUBST(BUILD_DNSSRV)
   AC_SUBST(BUILD_HDB)
@@ -2842,9 +2901,11 @@ AC_SUBST(BUILD_SLAPD)
   AC_SUBST(BUILD_MONITOR)
   AC_SUBST(BUILD_NULL)
   AC_SUBST(BUILD_PASSWD)
   AC_SUBST(BUILD_MONITOR)
   AC_SUBST(BUILD_NULL)
   AC_SUBST(BUILD_PASSWD)
+  AC_SUBST(BUILD_RELAY)
   AC_SUBST(BUILD_PERL)
   AC_SUBST(BUILD_SHELL)
   AC_SUBST(BUILD_SQL)
   AC_SUBST(BUILD_PERL)
   AC_SUBST(BUILD_SHELL)
   AC_SUBST(BUILD_SQL)
+dnl backend modules
   AC_SUBST(BUILD_BDB_DYNAMIC)
   AC_SUBST(BUILD_DNSSRV_DYNAMIC)
   AC_SUBST(BUILD_HDB_DYNAMIC)
   AC_SUBST(BUILD_BDB_DYNAMIC)
   AC_SUBST(BUILD_DNSSRV_DYNAMIC)
   AC_SUBST(BUILD_HDB_DYNAMIC)
@@ -2855,8 +2916,12 @@ AC_SUBST(BUILD_SLAPD)
   AC_SUBST(BUILD_NULL_DYNAMIC)
   AC_SUBST(BUILD_PASSWD_DYNAMIC)
   AC_SUBST(BUILD_PERL_DYNAMIC)
   AC_SUBST(BUILD_NULL_DYNAMIC)
   AC_SUBST(BUILD_PASSWD_DYNAMIC)
   AC_SUBST(BUILD_PERL_DYNAMIC)
+  AC_SUBST(BUILD_RELAY_DYNAMIC)
   AC_SUBST(BUILD_SHELL_DYNAMIC)
   AC_SUBST(BUILD_SQL_DYNAMIC)
   AC_SUBST(BUILD_SHELL_DYNAMIC)
   AC_SUBST(BUILD_SQL_DYNAMIC)
+dnl overlays
+  AC_SUBST(BUILD_CHAIN)
+  AC_SUBST(BUILD_DENYOP)
   AC_SUBST(BUILD_DYNGROUP)
   AC_SUBST(BUILD_PROXYCACHE)
   AC_SUBST(BUILD_RWM)
   AC_SUBST(BUILD_DYNGROUP)
   AC_SUBST(BUILD_PROXYCACHE)
   AC_SUBST(BUILD_RWM)
@@ -2937,12 +3002,12 @@ servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Make
 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/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-null/Makefile:build/top.mk:servers/slapd/back-null/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-relay/Makefile:build/top.mk:servers/slapd/back-relay/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-sql/Makefile:build/top.mk:servers/slapd/back-sql/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 \
 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/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 \
-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 \
 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
 tests/run \
 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
 tests/run \