From 8f1528af61a592fa138c5d27ce339bdad37dc630 Mon Sep 17 00:00:00 2001
From: Kurt Zeilenga <kurt@openldap.org>
Date: Fri, 12 Aug 2005 03:56:00 +0000
Subject: [PATCH] Run autoupdate and rebuild

---
 configure    | 276 +++++++--------------------------------------------
 configure.in | 152 ++++++++++++++--------------
 2 files changed, 114 insertions(+), 314 deletions(-)

diff --git a/configure b/configure
index 4e469987bf..15b2fcbf48 100755
--- a/configure
+++ b/configure
@@ -1551,6 +1551,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
 # set unset (borrowed from autoconf 2.49c)
 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
   ol_unset=unset
@@ -5552,7 +5553,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5555 "configure"' > conftest.$ac_ext
+  echo '#line 5556 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7373,7 +7374,7 @@ fi
 
 
 # Provide some information about the compiler.
-echo "$as_me:7376:" \
+echo "$as_me:7377:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -8471,11 +8472,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8474: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8475: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8478: \$? = $ac_status" >&5
+   echo "$as_me:8479: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8733,11 +8734,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8736: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8737: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8740: \$? = $ac_status" >&5
+   echo "$as_me:8741: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8795,11 +8796,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8798: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8799: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8802: \$? = $ac_status" >&5
+   echo "$as_me:8803: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -11035,7 +11036,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 11038 "configure"
+#line 11039 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11133,7 +11134,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 11136 "configure"
+#line 11137 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13381,11 +13382,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13384: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13385: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13388: \$? = $ac_status" >&5
+   echo "$as_me:13389: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13443,11 +13444,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13446: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13447: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13450: \$? = $ac_status" >&5
+   echo "$as_me:13451: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14812,7 +14813,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 14815 "configure"
+#line 14816 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14910,7 +14911,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 14913 "configure"
+#line 14914 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15795,11 +15796,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15798: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15799: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15802: \$? = $ac_status" >&5
+   echo "$as_me:15803: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15857,11 +15858,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15860: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15861: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15864: \$? = $ac_status" >&5
+   echo "$as_me:15865: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17979,11 +17980,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17982: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17983: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17986: \$? = $ac_status" >&5
+   echo "$as_me:17987: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -18241,11 +18242,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18244: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18245: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18248: \$? = $ac_status" >&5
+   echo "$as_me:18249: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -18303,11 +18304,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18306: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18307: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:18310: \$? = $ac_status" >&5
+   echo "$as_me:18311: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -20543,7 +20544,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 20546 "configure"
+#line 20547 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -20641,7 +20642,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 20644 "configure"
+#line 20645 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -23944,76 +23945,7 @@ _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
-echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
-if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <termios.h>
-#ifdef TIOCGWINSZ
-  yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
-  ac_cv_sys_tiocgwinsz_in_termios_h=yes
-else
-  ac_cv_sys_tiocgwinsz_in_termios_h=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
-echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
-
-if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
-  echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
-echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
-if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#ifdef TIOCGWINSZ
-  yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
-  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
-else
-  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
-echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
-
-  if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define GWINSZ_IN_SYS_IOCTL 1
-_ACEOF
-
-  fi
-fi
-
+AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
 if test $am_cv_sys_posix_termios = yes ; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -30346,7 +30278,7 @@ if test "${ol_cv_pthread_create+set}" = set; then
 else
 
 		if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
+  _au_changequote(,)cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -30459,75 +30391,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
-	void *p;
-{
-	return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
-	int argc;
-	char **argv;
-{
-
-	/* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define	PTHREAD_CREATE_DETACHED	1
-#endif
-	pthread_t t;
-	int status;
-	int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
-	/* Final pthreads */
-	pthread_attr_t attr;
-
-	status = pthread_attr_init(&attr);
-	if( status ) return status;
-
-#if HAVE_PTHREADS < 7
-	status = pthread_attr_setdetachstate(&attr, &detach);
-	if( status < 0 ) status = errno;
-#else
-	status = pthread_attr_setdetachstate(&attr, detach);
-#endif
-	if( status ) return status;
-	status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
-	if( status < 0 ) status = errno;
-#endif
-	if( status ) return status;
-#else
-	/* Draft 4 pthreads */
-	status = pthread_create( &t, pthread_attr_default, task, NULL );
-	if( status ) return errno;
-
-	/* give thread a chance to complete */
-	/* it should remain joinable and hence detachable */
-	sleep( 1 );
-
-	status = pthread_detach( &t );
-	if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
-	pthread_kill_other_threads_np();
-#endif
-
-	return 0;
-
-}
-
+OL_PTHREAD_TEST_PROGRAM
 _ACEOF
 rm -f conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -34708,75 +34572,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* pthread test headers */
-#include <pthread.h>
-#if HAVE_PTHREADS < 7
-#include <errno.h>
-#endif
-#ifndef NULL
-#define NULL (void*)0
-#endif
-
-static void *task(p)
-	void *p;
-{
-	return (void *) (p == NULL);
-}
-
-
-int main(argc, argv)
-	int argc;
-	char **argv;
-{
-
-	/* pthread test function */
-#ifndef PTHREAD_CREATE_DETACHED
-#define	PTHREAD_CREATE_DETACHED	1
-#endif
-	pthread_t t;
-	int status;
-	int detach = PTHREAD_CREATE_DETACHED;
-
-#if HAVE_PTHREADS > 4
-	/* Final pthreads */
-	pthread_attr_t attr;
-
-	status = pthread_attr_init(&attr);
-	if( status ) return status;
-
-#if HAVE_PTHREADS < 7
-	status = pthread_attr_setdetachstate(&attr, &detach);
-	if( status < 0 ) status = errno;
-#else
-	status = pthread_attr_setdetachstate(&attr, detach);
-#endif
-	if( status ) return status;
-	status = pthread_create( &t, &attr, task, NULL );
-#if HAVE_PTHREADS < 7
-	if( status < 0 ) status = errno;
-#endif
-	if( status ) return status;
-#else
-	/* Draft 4 pthreads */
-	status = pthread_create( &t, pthread_attr_default, task, NULL );
-	if( status ) return errno;
-
-	/* give thread a chance to complete */
-	/* it should remain joinable and hence detachable */
-	sleep( 1 );
-
-	status = pthread_detach( &t );
-	if( status ) return errno;
-#endif
-
-#ifdef HAVE_LINUX_THREADS
-	pthread_kill_other_threads_np();
-#endif
-
-	return 0;
-
-}
-
+OL_PTHREAD_TEST_PROGRAM
 _ACEOF
 rm -f conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -44565,7 +44361,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 
 				LIBS="$LIBS -lnsl"
-		cat >conftest.$ac_ext <<_ACEOF
+		_au_changequote(,)cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -51194,9 +50990,11 @@ fi;
 
 
                                                                                                                                                                                                                                                                                                                                                                                                                 ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/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/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 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk"
+
           ac_config_commands="$ac_config_commands default"
 
 
+
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
@@ -52708,7 +52506,7 @@ ENDX
 
 	cat >> $BACKENDSC << ENDX
 
-BackendInfo slap_binfo[] = {
+BackendInfo slap_binfo[[]] = {
 ENDX
 
 	for b in config ${STATIC_BACKENDS}; do
diff --git a/configure.in b/configure.in
index 99135a87fb..36f146e756 100644
--- a/configure.in
+++ b/configure.in
@@ -60,7 +60,8 @@ define([AC_CACHE_LOAD], )dnl
 define([AC_CACHE_SAVE], )dnl
 dnl ================================================================
 dnl Configure.in for OpenLDAP
-AC_INIT(build/version.sh)dnl
+AC_INIT
+AC_CONFIG_SRCDIR([build/version.sh])dnl
 
 # set unset (borrowed from autoconf 2.49c)
 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
@@ -99,7 +100,7 @@ echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
 
 dnl Determine host platform
 dnl		we try not to use this for much
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET([])
 
 AM_INIT_AUTOMAKE([$OL_PACKAGE],[$OL_VERSION], [no defines])dnl
 AC_SUBST(PACKAGE)dnl
@@ -124,7 +125,7 @@ AC_SUBST(OPENLDAP_RELEASE_DATE)dnl
 dnl We use autoconf features new to 2.13.  Later versions like won't work.
 dnl aclocal.m4 should be built using aclocal from automake 1.4
 dnl libtool 1.4.3 should be installed.
-AC_PREREQ(2.13)dnl Required Autoconf version
+AC_PREREQ(2.59)dnl Required Autoconf version
 
 AC_CONFIG_HEADER(include/portable.h include/ldap_features.h include/lber_types.h)dnl
 
@@ -675,8 +676,18 @@ dnl AC_MINIX
 
 dnl ----------------------------------------------------------------
 dnl Checks for system services
-AC_CYGWIN
-AC_MINGW32
+AC_CANONICAL_HOST()
+AC_DIAGNOSE([obsolete],[AC_CYGWIN is obsolete: use AC_CANONICAL_HOST and $host_os])case $host_os in
+  *cygwin* ) CYGWIN=yes;;
+	 * ) CYGWIN=no;;
+esac
+
+AC_CANONICAL_HOST()
+AC_DIAGNOSE([obsolete],[AC_MINGW32 is obsolete: use AC_CANONICAL_HOST and $host_os])case $host_os in
+  *mingw32* ) MINGW32=yes;;
+	  * ) MINGW32=no;;
+esac
+
 AC_EXEEXT
 AC_OBJEXT
 
@@ -688,7 +699,14 @@ AC_CHECK_LIB(be, be_app, [LIBS="$LIBS -lbe -lroot -lnet"], :, [-lroot -lnet])
 
 dnl ----------------------------------------------------------------
 dnl OpenLDAP requires STDC features
-AM_PROG_CC_STDC
+AC_PROG_CC()
+AC_DIAGNOSE([obsolete],[AM_PROG_CC_STDC:
+	your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
+	`ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
+	you adjust the code.  You can also remove the above call to
+	AC_PROG_CC if you already called it elsewhere.])
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+
 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
 	AC_MSG_ERROR([OpenLDAP requires compiler to support STDC constructs.])
 fi
@@ -845,15 +863,13 @@ AC_CACHE_CHECK([for winsock], [ol_cv_winsock],
 save_LIBS="$LIBS"
 for curlib in ws2_32 wsock32; do
 	LIBS="$LIBS -l$curlib"
-	AC_TRY_LINK([#include <winsock.h>
-			],
-			[
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <winsock.h>
+			]], [[
 			socket(0,0,0);
 			select(0,NULL,NULL,NULL,NULL);
 			closesocket(0);
 			gethostname(NULL,0);
-			],
-			ol_cv_winsock=yes, ol_cv_winsock=no)
+			]])],[ol_cv_winsock=yes],[ol_cv_winsock=no])
 
 	if test $ol_cv_winsock = yes; then
 		AC_DEFINE(HAVE_WINSOCK, 1, [define if you have winsock])
@@ -908,14 +924,12 @@ dnl ----------------------------------------------------------------
 AC_CHECK_HEADERS( sys/epoll.h )
 if test "${ac_cv_header_sys_epoll_h}" = yes; then
 AC_MSG_CHECKING(for epoll system call)
-AC_TRY_RUN(
-int main(int argc, char *argv[])
+AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(int argc, char *argv)
 {
 	int epfd = epoll_create(256);
 	exit (epfd == -1 ? 1 : 0);
-}, [AC_MSG_RESULT(yes)
-AC_DEFINE(HAVE_EPOLL,1, [define if your system supports epoll])],
-AC_MSG_RESULT(no),AC_MSG_RESULT(no))
+}]])],[AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_EPOLL,1, [define if your system supports epoll])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
 fi
 
 dnl ----------------------------------------------------------------
@@ -960,15 +974,13 @@ if test $have_uuid = no ; then
 	AC_MSG_CHECKING(to see if -lrpcrt4 is needed for win32 UUID support)
 	save_LIBS="$LIBS"
 	LIBS="$LIBS -lrpcrt4"
-	AC_TRY_LINK([
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 		int __stdcall UuidCreate(void *);
 		int __stdcall UuidToStringA(void *,void **);
-		],
-		[
+		]], [[
 		UuidCreate(0);
 		UuidToStringA(0,0);
-		],
-		need_rpcrt=yes, need_rpcrt=no)
+		]])],[need_rpcrt=yes],[need_rpcrt=no])
 	if test $need_rpcrt = yes; then
 		SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
 	fi
@@ -1025,13 +1037,12 @@ elif test $ol_enable_ipv6 != no ; then
 
 
 	AC_CACHE_CHECK([struct sockaddr_storage],ol_cv_struct_sockaddr_storage,[
-		AC_TRY_COMPILE([
+		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #include <sys/socket.h>
-],[
+]], [[
 			struct sockaddr_storage ss;
-],			[ol_cv_struct_sockaddr_storage=yes],
-			[ol_cv_struct_sockaddr_storage=no])])
+]])],[ol_cv_struct_sockaddr_storage=yes],[ol_cv_struct_sockaddr_storage=no])])
 
 	if test $ol_cv_inet6_addrstrlen = yes \
 		-a $ol_cv_struct_sockaddr_storage = yes ; then
@@ -1158,13 +1169,13 @@ if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
 				dnl save the flags
 				save_LIBS="$LIBS"
 				LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
-				AC_TRY_LINK([
+				AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <kerberosIV/krb.h>
 #include <kerberosIV/des.h>
 extern int des_debug;
-],[
+]], [[
 des_debug = 1;
-],				ol_cv_var_des_debug=yes, ol_cv_var_des_debug=no)
+]])],[ol_cv_var_des_debug=yes],[ol_cv_var_des_debug=no])
 				dnl restore the LIBS
 				LIBS="$save_LIBS"
 			])
@@ -1277,7 +1288,7 @@ if test $ol_with_tls != no ; then
 	fi
 
 else
-	AC_WARN([TLS data protection not supported!])
+	AC_MSG_WARN([TLS data protection not supported!])
 fi
 
 WITH_TLS=no
@@ -1286,18 +1297,18 @@ if test $ol_link_tls = yes ; then
 	WITH_TLS=yes
 
 elif test $ol_with_tls = auto ; then
-	AC_WARN([Could not locate TLS/SSL package])
-	AC_WARN([TLS data protection not supported!])
+	AC_MSG_WARN([Could not locate TLS/SSL package])
+	AC_MSG_WARN([TLS data protection not supported!])
 
 elif test $ol_with_tls != no ; then
-	AC_ERROR([Could not locate TLS/SSL package])
+	AC_MSG_ERROR([Could not locate TLS/SSL package])
 fi
 
 dnl ----------------------------------------------------------------
 dnl LAN Manger password checking requires DES from OpenSSL
 if test $ol_enable_lmpasswd != no; then
 	if test $ol_link_tls != yes ; then
-		AC_ERROR([LAN Manager passwords require OpenSSL])
+		AC_MSG_ERROR([LAN Manager passwords require OpenSSL])
 	fi
 
 	AC_DEFINE(SLAPD_LMHASH, 1, [define to support LAN Manager passwords])
@@ -1387,10 +1398,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 		dnl pthread_create in $LIBS
 		AC_CACHE_CHECK([for pthread_create in default libraries],
 			ol_cv_pthread_create,[
-		AC_TRY_RUN(OL_PTHREAD_TEST_PROGRAM,
-			[ol_cv_pthread_create=yes],
-			[ol_cv_pthread_create=no],
-			[AC_TRY_LINK(OL_PTHREAD_TEST_INCLUDES,OL_PTHREAD_TEST_FUNCTION,
+		AC_RUN_IFELSE([AC_LANG_SOURCE([[OL_PTHREAD_TEST_PROGRAM]])],[ol_cv_pthread_create=yes],[ol_cv_pthread_create=no],[_au_changequote([,])AC_TRY_LINK(OL_PTHREAD_TEST_INCLUDES,OL_PTHREAD_TEST_FUNCTION,
 				[ol_cv_pthread_create=yes],
 				[ol_cv_pthread_create=no])])])
 
@@ -1468,15 +1476,12 @@ dnl			[ol_cv_pthread_lpthread_lexc])
 			AC_CACHE_CHECK([for pthread_detach with <pthread.h>],
 				[ol_cv_func_pthread_detach], [
 				dnl save the flags
-				AC_TRY_LINK([
+				AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <pthread.h>
 #ifndef NULL
 #define NULL (void*)0
 #endif
-],
-					[pthread_detach(NULL);],
-					[ol_cv_func_pthread_detach=yes],
-					[ol_cv_func_pthread_detach=no])
+]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
 			])
 
 			if test $ol_cv_func_pthread_detach = no ; then
@@ -1503,10 +1508,7 @@ dnl			[ol_cv_pthread_lpthread_lexc])
 
 			AC_CACHE_CHECK([if pthread_create() works],
 				ol_cv_pthread_create_works,[
-			AC_TRY_RUN(OL_PTHREAD_TEST_PROGRAM,
-				[ol_cv_pthread_create_works=yes],
-				[ol_cv_pthread_create_works=no],
-				[dnl assume yes
+			AC_RUN_IFELSE([AC_LANG_SOURCE([[OL_PTHREAD_TEST_PROGRAM]])],[ol_cv_pthread_create_works=yes],[ol_cv_pthread_create_works=no],[dnl assume yes
 				ol_cv_pthread_create_works=yes])])
 
 			if test $ol_cv_pthread_create_works = no ; then
@@ -1517,7 +1519,7 @@ dnl			[ol_cv_pthread_lpthread_lexc])
 			if test $ol_with_yielding_select = auto ; then
 				AC_CACHE_CHECK([if select yields when using pthreads],
 					ol_cv_pthread_select_yields,[
-				AC_TRY_RUN([
+				AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <sys/types.h>
 #include <sys/time.h>
 #include <unistd.h>
@@ -1590,10 +1592,7 @@ int main(argc, argv)
 #endif
 
 	exit(2);
-}],
-				[ol_cv_pthread_select_yields=no],
-				[ol_cv_pthread_select_yields=yes],
-				[ol_cv_pthread_select_yields=cross])])
+}]])],[ol_cv_pthread_select_yields=no],[ol_cv_pthread_select_yields=yes],[ol_cv_pthread_select_yields=cross])])
 
 				if test $ol_cv_pthread_select_yields = cross ; then
 					AC_MSG_ERROR([crossing compiling: use --with-yielding_select=yes|no|manual])
@@ -1636,9 +1635,9 @@ if test $ol_with_threads = auto -o $ol_with_threads = yes \
 				dnl save the flags
 				save_LIBS="$LIBS"
 				LIBS="-all_load $LIBS"
-				AC_TRY_LINK([#include <mach/cthreads.h>],[
+				AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mach/cthreads.h>]], [[
 					cthread_fork((void *)0, (void *)0);
-					], ol_cv_cthread_all_load=yes, ol_cv_cthread_all_load=no)
+					]])],[ol_cv_cthread_all_load=yes],[ol_cv_cthread_all_load=no])
 				dnl restore the LIBS
 				LIBS="$save_LIBS"
 			])
@@ -1782,18 +1781,14 @@ if test $ol_link_threads != no -a $ol_link_threads != nt ; then
 	dnl If it does, we must link with thread support.
 	AC_CACHE_CHECK([for thread specific errno],
 		[ol_cv_errno_thread_specific], [
-		AC_TRY_LINK([#include <errno.h>], [errno = 0;],
-			[ol_cv_errno_thread_specific=yes],
-			[ol_cv_errno_thread_specific=no])
+		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <errno.h>]], [[errno = 0;]])],[ol_cv_errno_thread_specific=yes],[ol_cv_errno_thread_specific=no])
 	])
 
 	dnl The h_errno declaration may dependent upon _REENTRANT.
 	dnl If it does, we must link with thread support.
 	AC_CACHE_CHECK([for thread specific h_errno],
 		[ol_cv_h_errno_thread_specific], [
-		AC_TRY_LINK([#include <netdb.h>], [h_errno = 0;],
-			[ol_cv_h_errno_thread_specific=yes],
-			[ol_cv_h_errno_thread_specific=no])
+		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[h_errno = 0;]])],[ol_cv_h_errno_thread_specific=yes],[ol_cv_h_errno_thread_specific=no])
 	])
 
 	if test $ol_cv_errno_thread_specific != yes \
@@ -2017,20 +2012,20 @@ if test $ol_enable_wrappers != no ; then
 		AC_MSG_CHECKING([for TCP wrappers library])
 		save_LIBS="$LIBS"
 		LIBS="$LIBS -lwrap"
-		AC_TRY_LINK([
+		AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <tcpd.h>
 int allow_severity = 0;
 int deny_severity  = 0;
 
 struct request_info *req;
-		],[
+		]], [[
 hosts_access(req)
-		],[AC_MSG_RESULT([-lwrap])
+		]])],[AC_MSG_RESULT([-lwrap])
 		have_wrappers=yes
 		LIBS="$save_LIBS"],[
 		dnl try with -lnsl
 		LIBS="$LIBS -lnsl"
-		AC_TRY_LINK([
+		_au_changequote([,])AC_TRY_LINK([
 #include <tcpd.h>
 int allow_severity = 0;
 int deny_severity  = 0;
@@ -2043,8 +2038,7 @@ hosts_access(req)
 		LIBS="$save_LIBS -lnsl"],[
 		AC_MSG_RESULT(no)
 		have_wrappers=no
-		LIBS=$save_LIBS])],[
-		have_wrappers=no])],[have_wrappers=no])
+		LIBS=$save_LIBS])])],[have_wrappers=no])
 
 	if test $have_wrappers = yes ; then
 		AC_DEFINE(HAVE_TCPD,1, [define if you have -lwrap])
@@ -2357,9 +2351,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
 
 dnl Checks for long long
 AC_CACHE_CHECK([long long], ol_cv_type_long_long, [
-	AC_TRY_COMPILE([], [long long x;],
-		[ol_cv_type_long_long=yes],
-		[ol_cv_type_long_long=no])])
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x;]])],[ol_cv_type_long_long=yes],[ol_cv_type_long_long=no])])
 if test $ol_cv_type_long_long = yes; then
 	AC_DEFINE(HAVE_LONG_LONG, 1, [define if you have 'long long'])
 fi
@@ -2367,7 +2359,7 @@ fi
 AC_TYPE_MODE_T
 AC_TYPE_OFF_T
 AC_TYPE_PID_T
-AM_TYPE_PTRDIFF_T
+AC_CHECK_TYPES([ptrdiff_t])
 AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
 
@@ -2375,7 +2367,15 @@ AC_CHECK_TYPE(ssize_t, [signed int])
 AC_CHECK_TYPE(caddr_t,	[char *])
 
 OL_TYPE_SOCKLEN_T
-AC_STRUCT_ST_BLKSIZE
+AC_DIAGNOSE([obsolete],[AC_STRUCT_ST_BLKSIZE:
+	your code should no longer depend upon `HAVE_ST_BLKSIZE', but
+	`HAVE_STRUCT_STAT_ST_BLKSIZE'.  Remove this warning and
+	the `AC_DEFINE' when you adjust the code.])
+AC_CHECK_MEMBERS([struct stat.st_blksize],[AC_DEFINE(HAVE_ST_BLKSIZE, 1,
+			    [Define to 1 if your `struct stat' has
+			     `st_blksize'.  Deprecated, use
+			     `HAVE_STRUCT_STAT_ST_BLKSIZE' instead.])])
+
 AC_HEADER_TIME
 AC_STRUCT_TM
 AC_TYPE_UID_T
@@ -2423,9 +2423,9 @@ if test $ac_cv_func_memcmp_working = no ; then
 		[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
+dnl AC_FUNC_MKTIME([]) dnl checks for sys/time.h and unistd.h
 AC_FUNC_STRFTIME
-dnl AM_FUNC_STRTOD
+dnl AC_FUNC_STRTOD([])
 
 OL_FUNC_INET_ATON
 
@@ -3059,7 +3059,7 @@ dnl ----------------------------------------------------------------
 dnl final output
 dnl
 
-AC_OUTPUT( \
+AC_CONFIG_FILES([\
 Makefile:build/top.mk:Makefile.in:build/dir.mk \
 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
@@ -3100,7 +3100,8 @@ 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 \
 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
-,[
+])
+AC_CONFIG_COMMANDS([default],[[
 chmod +x tests/run
 date > stamp-h
 BACKENDSC="servers/slapd/backends.c"
@@ -3156,4 +3157,5 @@ ENDX
 fi
 
 echo Please run \"make depend\" to build dependencies
-],[STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"])
+]],[[STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"]])
+AC_OUTPUT
-- 
GitLab