Skip to content
Snippets Groups Projects
configure 319 KiB
Newer Older
  • Learn to ignore specific revisions
  • # 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-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/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 \
    
    contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/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