Skip to content
Snippets Groups Projects
configure 291 KiB
Newer Older
  • Learn to ignore specific revisions
  • fi
    
    
    if test $ac_cv_func_vprintf = yes ; then
    		for ac_func in vsnprintf vsprintf
    do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    
    echo "configure:10016: checking for $ac_func" >&5
    
    if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    /* System header to define __stub macros and hopefully few prototypes,
        which can conflict with char $ac_func(); below.  */
    #include <assert.h>
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char $ac_func();
    
    
    
    /* The GNU C library defines this for functions which it implements
        to always fail with ENOSYS.  Some functions are actually named
        something starting with __ and the normal name is an alias.  */
    #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
    choke me
    #else
    $ac_func();
    #endif
    
    
    if { (eval echo configure:10044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    
    if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_func 1
    
    	lockf			\
    	memcpy			\
    	memmove			\
    	mkstemp			\
    	select			\
    	setpwfile		\
    	setsid			\
    	signal			\
    	sigset			\
    	snprintf		\
    	socket			\
    	strdup			\
    	strerror		\
    	strpbrk			\
    	strrchr			\
    	strsep			\
    	strstr			\
    	strtol			\
    	strtoul			\
    	strspn			\
    	sysconf			\
    	waitpid			\
    
    do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    
    echo "configure:10103: checking for $ac_func" >&5
    
    if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    /* System header to define __stub macros and hopefully few prototypes,
        which can conflict with char $ac_func(); below.  */
    #include <assert.h>
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char $ac_func();
    
    
    
    /* The GNU C library defines this for functions which it implements
        to always fail with ENOSYS.  Some functions are actually named
        something starting with __ and the normal name is an alias.  */
    #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
    choke me
    #else
    $ac_func();
    #endif
    
    
    if { (eval echo configure:10131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_func 1
    
    for ac_func in getopt tempnam
    
    do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    
    echo "configure:10159: checking for $ac_func" >&5
    
    if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    /* System header to define __stub macros and hopefully few prototypes,
        which can conflict with char $ac_func(); below.  */
    #include <assert.h>
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char $ac_func();
    
    int main() {
    
    /* The GNU C library defines this for functions which it implements
        to always fail with ENOSYS.  Some functions are actually named
        something starting with __ and the normal name is an alias.  */
    #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
    choke me
    #else
    $ac_func();
    #endif
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:10187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
      eval "ac_cv_func_$ac_func=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_func_$ac_func=no"
    fi
    rm -f conftest*
    fi
    
    if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_func 1
    EOF
     
    else
      echo "$ac_t""no" 1>&6
    
    LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
    
    fi
    done
    
    
    
    # Check Configuration
    
    echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
    
    echo "configure:10217: checking declaration of sys_errlist" >&5
    
    if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    	cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    
    #include <stdio.h>
    #include <sys/types.h>
    #include <errno.h> 
    int main() {
    char *c = (char *) *sys_errlist
    ; return 0; }
    EOF
    
    if { (eval echo configure:10233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      rm -rf conftest*
      ol_cv_dcl_sys_errlist=yes
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      ol_cv_dcl_sys_errlist=no
    fi
    rm -f conftest*
    fi
    
    echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
    # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
    if test $ol_cv_dcl_sys_errlist = no ; then
    	cat >> confdefs.h <<\EOF
    #define DECL_SYS_ERRLIST 1
    EOF
    
    	echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
    
    echo "configure:10253: checking existence of sys_errlist" >&5
    
    	if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    		cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <errno.h>
    int main() {
    char *c = (char *) *sys_errlist
    ; return 0; }
    EOF
    
    if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
      ol_cv_have_sys_errlist=yes
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      ol_cv_have_sys_errlist=no
    fi
    rm -f conftest*
    fi
    
    	echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
    
    	if test $ol_cv_have_sys_errlist = yes ; then
    		cat >> confdefs.h <<\EOF
    
    echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
    
    echo "configure:10290: checking strdup declaration" >&5
    
    if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    	cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    
    #include <string.h> 
    int main() {
    
    extern char *strdup();
    
    if { (eval echo configure:10304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      rm -rf conftest*
      ol_cv_dcl_strdup=yes
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      ol_cv_dcl_strdup=no
    fi
    rm -f conftest*
    fi
    
    echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
    if test $ol_cv_dcl_strdup = yes ; then
    	cat >> confdefs.h <<\EOF
    #define DECL_STRDUP 1
    EOF
    
    fi
    
    
    
    
    if test "$ol_enable_debug" != no ; then
    
    	cat >> confdefs.h <<\EOF
    #define LDAP_DEBUG 1
    EOF
    
    
    if test "$ol_enable_syslog" = yes ; then
    
    if test "$ol_enable_libui" = yes ; then
    
    	cat >> confdefs.h <<\EOF
    #define LDAP_LIBUI 1
    EOF
    
    fi
    
    if test "$ol_enable_cache" = no ; then
    
    	cat >> confdefs.h <<\EOF
    #define LDAP_NOCACHE 1
    EOF
    
    fi
    
    if test "$ol_enable_dns" != no ; then
    
    	cat >> confdefs.h <<\EOF
    
    #define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_VENDOR_VERSION
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    fi
    
    if test "$ol_enable_proctitle" != no ; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    	cat >> confdefs.h <<\EOF
    #define LDAP_PROCTITLE 1
    EOF
    
    
    if test "$ol_enable_referrals" != no ; then
    
    	cat >> confdefs.h <<\EOF
    
    #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
    
    if test "$ol_enable_cldap" != no ; then
    
    	cat >> confdefs.h <<\EOF
    #define LDAP_CONNECTIONLESS 1
    EOF
    
    fi
    
    
    if test "$ol_enable_aclgroups" != no ; then
    
    	cat >> confdefs.h <<\EOF
    
    #define SLAPD_ACLGROUPS 1
    
    if test "$ol_enable_crypt" != no ; then
    
    	cat >> confdefs.h <<\EOF
    #define SLAPD_CRYPT 1
    EOF
    
    fi
    
    if test "$ol_enable_cleartext" != no ; then
    
    	cat >> confdefs.h <<\EOF
    
    if test "$ol_enable_phonetic" != no ; then
    
    	cat >> confdefs.h <<\EOF
    #define SLAPD_PHONETIC 1
    EOF
    
    fi
    
    if test "$ol_enable_rlookups" != no ; then
    
    	cat >> confdefs.h <<\EOF
    #define SLAPD_RLOOKUPS 1
    EOF
    
    fi
    
    
    if test "$ol_link_bdb2" != no ; then
    	cat >> confdefs.h <<\EOF
    #define SLAPD_BDB2 1
    EOF
    
    	BUILD_SLAPD=yes
    	BUILD_BDB2=yes
    fi
    
    
    if test "$ol_link_ldbm" != no ; then
    
    	cat >> confdefs.h <<\EOF
    #define SLAPD_LDBM 1
    EOF
    
    	BUILD_SLAPD=yes
    	BUILD_LDBM=yes
    fi
    
    
    if test "$ol_enable_passwd" != no ; then
    
    	cat >> confdefs.h <<\EOF
    #define SLAPD_PASSWD 1
    EOF
    
    	BUILD_SLAPD=yes
    	BUILD_PASSWD=yes
    fi
    
    
    if test "$ol_enable_perl" != no ; then
    	cat >> confdefs.h <<\EOF
    #define SLAPD_PERL 1
    EOF
    
    	BUILD_SLAPD=yes
    	BUILD_PERL=yes
    fi
    
    
    if test "$ol_enable_shell" != no ; then
    
    	cat >> confdefs.h <<\EOF
    #define SLAPD_SHELL 1
    EOF
    
    	BUILD_SLAPD=yes
    	BUILD_SHELL=yes
    fi
    
    
    if test "$ol_enable_tcl" != no ; then
    	cat >> confdefs.h <<\EOF
    #define SLAPD_TCL 1
    EOF
    
    	BUILD_SLAPD=yes
    	BUILD_TCL=yes
    fi
    
    
    if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
    
    	$BUILD_SLAPD = yes ; then
    	BUILD_SLURPD=yes
    fi
    
    
    if test "$ol_link_isode" != no ; then
    
    	BUILD_LDAPD=yes
    
    
    
    trap '' 1 2 15
    cat > confcache <<\EOF
    # This file is a shell script that caches the results of configure
    # tests run on this system so they can be shared between configure
    # scripts and configure runs.  It is not useful on other systems.
    # If it contains results you don't want to keep, you may remove or edit it.
    #
    # By default, configure uses ./config.cache as the cache file,
    # creating it if it does not exist already.  You can give configure
    # the --cache-file=FILE option to use a different cache file; that is
    # what configure does when it calls configure scripts in
    # subdirectories, so they share the cache.
    # Giving --cache-file=/dev/null disables caching, for debugging configure.
    # config.status only pays attention to the cache file if you give it the
    # --recheck option to rerun configure.
    #
    EOF
    # The following way of writing the cache mishandles newlines in values,
    # but we know of no workaround that is simple, portable, and efficient.
    # So, don't put newlines in cache variables' values.
    # Ultrix sh set writes to stderr and can't be redirected directly,
    # and sets the high bit in the cache file unless we assign to the vars.
    (set) 2>&1 |
    
      case `(ac_space=' '; set | grep ac_space) 2>&1` in
    
      *ac_space=\ *)
        # `set' does not quote correctly, so add quotes (double-quote substitution
        # turns \\\\ into \\, and sed turns \\ into \).
        sed -n \
          -e "s/'/'\\\\''/g" \
          -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
        ;;
      *)
        # `set' quotes correctly as required by POSIX, so do not add quotes.
        sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
        ;;
      esac >> confcache
    if cmp -s $cache_file confcache; then
      :
    else
      if test -w $cache_file; then
        echo "updating cache $cache_file"
        cat confcache > $cache_file
      else
        echo "not updating unwritable cache $cache_file"
      fi
    fi
    rm -f confcache
    
    trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
    
    test "x$prefix" = xNONE && prefix=$ac_default_prefix
    # Let make expand exec_prefix.
    test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
    
    # Any assignment to VPATH causes Sun make to only execute
    # the first set of double-colon rules, so remove it if not needed.
    # If there is a colon in the path, we need to keep it.
    if test "x$srcdir" = x.; then
      ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
    fi
    
    trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
    
    DEFS=-DHAVE_CONFIG_H
    
    # Without the "./", some shells look in PATH for config.status.
    : ${CONFIG_STATUS=./config.status}
    
    echo creating $CONFIG_STATUS
    rm -f $CONFIG_STATUS
    cat > $CONFIG_STATUS <<EOF
    #! /bin/sh
    # Generated automatically by configure.
    # Run this file to recreate the current configuration.
    # This directory was configured as follows,
    # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
    #
    # $0 $ac_configure_args
    #
    # Compiler output produced by configure, useful for debugging
    # configure, is in ./config.log if it exists.
    
    ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
    for ac_option
    do
      case "\$ac_option" in
      -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
        echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
        exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
      -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    
        echo "$CONFIG_STATUS generated by autoconf version 2.13"
    
        exit 0 ;;
      -help | --help | --hel | --he | --h)
        echo "\$ac_cs_usage"; exit 0 ;;
      *) echo "\$ac_cs_usage"; exit 1 ;;
      esac
    done
    
    ac_given_srcdir=$srcdir
    ac_given_INSTALL="$INSTALL"
    
    trap 'rm -fr `echo "\
    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/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
    clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
    clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
    clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
    clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
    clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.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/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.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/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk	\
    libraries/libldif/Makefile:build/top.mk:libraries/libldif/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	\
    
    servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
    servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
    servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
    
    servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
    
    servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
    servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
    
    servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
    
    servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
    
    servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
    
    servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.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/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
    
    contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
    
    contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
    
     include/portable.h include/ldap_features.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
    
    EOF
    cat >> $CONFIG_STATUS <<EOF
    
    # Protect against being on the right side of a sed subst in config.status.
    sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
     s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
    $ac_vpsub
    $extrasub
    
    s%@CFLAGS@%$CFLAGS%g
    s%@CPPFLAGS@%$CPPFLAGS%g
    s%@CXXFLAGS@%$CXXFLAGS%g
    
    s%@DEFS@%$DEFS%g
    s%@LDFLAGS@%$LDFLAGS%g
    s%@LIBS@%$LIBS%g
    s%@exec_prefix@%$exec_prefix%g
    s%@prefix@%$prefix%g
    s%@program_transform_name@%$program_transform_name%g
    s%@bindir@%$bindir%g
    s%@sbindir@%$sbindir%g
    s%@libexecdir@%$libexecdir%g
    s%@datadir@%$datadir%g
    s%@sysconfdir@%$sysconfdir%g
    s%@sharedstatedir@%$sharedstatedir%g
    s%@localstatedir@%$localstatedir%g
    s%@libdir@%$libdir%g
    s%@includedir@%$includedir%g
    s%@oldincludedir@%$oldincludedir%g
    s%@infodir@%$infodir%g
    s%@mandir@%$mandir%g
    s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
    
    s%@PACKAGE@%$PACKAGE%g
    s%@VERSION@%$VERSION%g
    s%@ACLOCAL@%$ACLOCAL%g
    s%@AUTOCONF@%$AUTOCONF%g
    s%@AUTOMAKE@%$AUTOMAKE%g
    s%@AUTOHEADER@%$AUTOHEADER%g
    s%@MAKEINFO@%$MAKEINFO%g
    
    s%@SET_MAKE@%$SET_MAKE%g
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    s%@ldap_subdir@%$ldap_subdir%g
    
    s%@host@%$host%g
    s%@host_alias@%$host_alias%g
    s%@host_cpu@%$host_cpu%g
    s%@host_vendor@%$host_vendor%g
    s%@host_os@%$host_os%g
    s%@RANLIB@%$RANLIB%g
    s%@CC@%$CC%g
    s%@LD@%$LD%g
    s%@NM@%$NM%g
    s%@LN_S@%$LN_S%g
    s%@LIBTOOL@%$LIBTOOL%g
    
    s%@SENDMAIL@%$SENDMAIL%g
    s%@EDITOR@%$EDITOR%g
    s%@FINGER@%$FINGER%g
    
    s%@PERLBIN@%$PERLBIN%g
    
    s%@CPP@%$CPP%g
    
    s%@EXEEXT@%$EXEEXT%g
    s%@OBJEXT@%$OBJEXT%g
    
    s%@PEPSY@%$PEPSY%g
    
    s%@LIBOBJS@%$LIBOBJS%g
    s%@BUILD_LDAPD@%$BUILD_LDAPD%g
    s%@BUILD_SLAPD@%$BUILD_SLAPD%g
    
    s%@BUILD_LDBM@%$BUILD_LDBM%g
    s%@BUILD_PASSWD@%$BUILD_PASSWD%g
    
    s%@BUILD_PERL@%$BUILD_PERL%g
    
    s%@BUILD_SHELL@%$BUILD_SHELL%g
    
    s%@BUILD_SLURPD@%$BUILD_SLURPD%g
    s%@LDAP_LIBS@%$LDAP_LIBS%g
    s%@LDAPD_LIBS@%$LDAPD_LIBS%g
    s%@SLAPD_LIBS@%$SLAPD_LIBS%g
    s%@SLURPD_LIBS@%$SLURPD_LIBS%g
    s%@LDBM_LIBS@%$LDBM_LIBS%g
    s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
    s%@LUTIL_LIBS@%$LUTIL_LIBS%g
    
    s%@SLAPD_PERL_CPPFLAGS@%$SLAPD_PERL_CPPFLAGS%g
    s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
    
    s%@KRB_LIBS@%$KRB_LIBS%g
    
    s%@READLINE_LIBS@%$READLINE_LIBS%g
    
    s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
    
    
    CEOF
    EOF
    
    cat >> $CONFIG_STATUS <<\EOF
    
    # Split the substitutions into bite-sized pieces for seds with
    # small command number limits, like on Digital OSF/1 and HP-UX.
    ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
    ac_file=1 # Number of current file.
    ac_beg=1 # First line for current file.
    ac_end=$ac_max_sed_cmds # Line after last line for current file.
    ac_more_lines=:
    ac_sed_cmds=""
    while $ac_more_lines; do
      if test $ac_beg -gt 1; then
        sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
      else
        sed "${ac_end}q" conftest.subs > conftest.s$ac_file
      fi
      if test ! -s conftest.s$ac_file; then
        ac_more_lines=false
        rm -f conftest.s$ac_file
      else
        if test -z "$ac_sed_cmds"; then
          ac_sed_cmds="sed -f conftest.s$ac_file"
        else
          ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
        fi
        ac_file=`expr $ac_file + 1`
        ac_beg=$ac_end
        ac_end=`expr $ac_end + $ac_max_sed_cmds`
      fi
    done
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds=cat
    fi
    EOF
    
    cat >> $CONFIG_STATUS <<EOF
    
    CONFIG_FILES=\${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/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
    clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
    clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
    clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
    clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
    clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.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/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.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/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk	\
    libraries/libldif/Makefile:build/top.mk:libraries/libldif/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	\
    
    servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
    servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
    servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
    
    servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/srv.mk \
    
    servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
    servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
    
    servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/srv.mk \
    
    servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
    
    servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/srv.mk \
    
    servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.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/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
    
    contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
    
    contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
    
    "}
    EOF
    cat >> $CONFIG_STATUS <<\EOF
    for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
      # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
      case "$ac_file" in
      *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
           ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
      *) ac_file_in="${ac_file}.in" ;;
      esac
    
      # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
    
      # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
        # The file is in a subdirectory.
        test ! -d "$ac_dir" && mkdir "$ac_dir"
        ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
        # A "../" for each directory in $ac_dir_suffix.
        ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
      else
        ac_dir_suffix= ac_dots=
      fi
    
      case "$ac_given_srcdir" in
      .)  srcdir=.
          if test -z "$ac_dots"; then top_srcdir=.
          else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
      /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
      *) # Relative path.
        srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
        top_srcdir="$ac_dots$ac_given_srcdir" ;;
      esac
    
      case "$ac_given_INSTALL" in
      [/$]*) INSTALL="$ac_given_INSTALL" ;;
      *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
      esac
    
      echo creating "$ac_file"
      rm -f "$ac_file"
      configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
      case "$ac_file" in
      *Makefile*) ac_comsub="1i\\
    # $configure_input" ;;
      *) ac_comsub= ;;
      esac
    
      ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
      sed -e "$ac_comsub
    s%@configure_input@%$configure_input%g
    s%@srcdir@%$srcdir%g
    s%@top_srcdir@%$top_srcdir%g
    s%@INSTALL@%$INSTALL%g
    " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
    fi; done
    rm -f conftest.s*
    
    # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
    # NAME is the cpp macro being defined and VALUE is the value it is being given.
    #
    # ac_d sets the value in "#define NAME VALUE" lines.
    ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
    ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
    ac_dC='\3'
    ac_dD='%g'
    # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
    ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
    ac_uB='\([ 	]\)%\1#\2define\3'
    ac_uC=' '
    ac_uD='\4%g'
    # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
    ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
    ac_eB='$%\1#\2define\3'
    ac_eC=' '
    ac_eD='%g'
    
    if test "${CONFIG_HEADERS+set}" != set; then
    EOF
    cat >> $CONFIG_STATUS <<EOF
    
      CONFIG_HEADERS="include/portable.h include/ldap_features.h"
    
    EOF
    cat >> $CONFIG_STATUS <<\EOF
    fi
    for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
      # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
      case "$ac_file" in
      *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
           ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
      *) ac_file_in="${ac_file}.in" ;;
      esac
    
      echo creating $ac_file
    
      rm -f conftest.frag conftest.in conftest.out
      ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
      cat $ac_file_inputs > conftest.in
    
    EOF
    
    # Transform confdefs.h into a sed script conftest.vals that substitutes
    # the proper values into config.h.in to produce config.h.  And first:
    # Protect against being on the right side of a sed subst in config.status.
    # Protect against being in an unquoted here document in config.status.
    rm -f conftest.vals
    cat > conftest.hdr <<\EOF
    s/[\\&%]/\\&/g
    s%[\\$`]%\\&%g
    s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
    s%ac_d%ac_u%gp
    s%ac_u%ac_e%gp
    EOF
    sed -n -f conftest.hdr confdefs.h > conftest.vals
    rm -f conftest.hdr
    
    # This sed command replaces #undef with comments.  This is necessary, for
    # example, in the case of _POSIX_SOURCE, which is predefined and required
    # on some systems where configure will not decide to define it.
    cat >> conftest.vals <<\EOF
    s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
    EOF
    
    # Break up conftest.vals because some shells have a limit on
    # the size of here documents, and old seds have small limits too.
    
    rm -f conftest.tail
    while :
    do
      ac_lines=`grep -c . conftest.vals`
      # grep -c gives empty output for an empty file on some AIX systems.
      if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
      # Write a limited-size here document to conftest.frag.
      echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
      sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
      echo 'CEOF
      sed -f conftest.frag conftest.in > conftest.out
      rm -f conftest.in
      mv conftest.out conftest.in
    ' >> $CONFIG_STATUS
      sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
      rm -f conftest.vals
      mv conftest.tail conftest.vals
    done
    rm -f conftest.vals
    
    cat >> $CONFIG_STATUS <<\EOF
      rm -f conftest.frag conftest.h
      echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
      cat conftest.in >> conftest.h
      rm -f conftest.in
      if cmp -s $ac_file conftest.h 2>/dev/null; then
        echo "$ac_file is unchanged"
        rm -f conftest.h
      else
        # Remove last slash and all that follows it.  Not all systems have dirname.
          ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
          if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
          # The file is in a subdirectory.
          test ! -d "$ac_dir" && mkdir "$ac_dir"
        fi
        rm -f $ac_file
        mv conftest.h $ac_file
      fi
    fi; done
    
    EOF
    cat >> $CONFIG_STATUS <<EOF
    
    EOF
    cat >> $CONFIG_STATUS <<\EOF
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    
    
    date > stamp-h
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    echo Please \"make depend\" to build dependencies
    
    
    exit 0
    EOF
    chmod +x $CONFIG_STATUS
    rm -fr confdefs* $ac_clean_files
    test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1