X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=configure;h=1e6e09d3aca21403cd50db2c1252aa744618fd07;hb=2c644a29f1ed48f016f7a54003a56804706938a9;hp=47d8f8d9b7c77d1d47e0688547aa9ede5045f342;hpb=39aa70851aadb446002af65f2f233810246b210a;p=openldap diff --git a/configure b/configure index 47d8f8d9b7..1e6e09d3ac 100755 --- a/configure +++ b/configure @@ -14,26 +14,32 @@ ac_default_prefix=/usr/local ac_default_prefix=/usr/local ac_help="$ac_help --enable-debug enable debugging (yes)" +ac_help="$ac_help + --enable-proctitle enable proctitle support (yes)" ac_help="$ac_help --enable-libui enable library user interface (yes)" ac_help="$ac_help --enable-cache enable caching (yes)" ac_help="$ac_help - --enable-dns enable dns support (no)" + --enable-dns enable dns support (no)" ac_help="$ac_help --enable-referrals enable referrals (yes)" ac_help="$ac_help - --enable-clapd enable connectionless ldap (no)" + --enable-cldap enable connectionless ldap (no)" +ac_help="$ac_help + --enable-x-compile enable cross compiling (no)" ac_help="$ac_help --with-kerberos use Kerberos (auto)" ac_help="$ac_help --with-threads use threads (auto)" +ac_help="$ac_help + --with-preemptive thread implementation is preemptive (auto)" ac_help="$ac_help --enable-ldapd enable building ldapd (no)" ac_help="$ac_help --enable-slapd enable building slapd (yes)" ac_help="$ac_help - --enable-aclgroup enable ACL group support (auto)" + --enable-aclgroups enable ACL group support (auto)" ac_help="$ac_help --enable-crypt enable crypt(3) passwords (auto)" ac_help="$ac_help @@ -585,7 +591,7 @@ ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. echo $ac_n "checking configure arguments""... $ac_c" 1>&6 -echo "configure:589: checking configure arguments" >&5 +echo "configure:595: checking configure arguments" >&5 # OpenLDAP --enable-debug @@ -608,6 +614,26 @@ else ol_enable_debug="yes" fi # end --enable-debug +# OpenLDAP --enable-proctitle + # Check whether --enable-proctitle or --disable-proctitle was given. +if test "${enable_proctitle+set}" = set; then + enableval="$enable_proctitle" + + ol_arg=invalid + for ol_val in auto yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; } + fi + ol_enable_proctitle="$ol_arg" + +else + ol_enable_proctitle="yes" +fi +# end --enable-proctitle # OpenLDAP --enable-libui # Check whether --enable-libui or --disable-libui was given. if test "${enable_libui+set}" = set; then @@ -708,6 +734,26 @@ else ol_enable_cldap="no" fi # end --enable-cldap +# OpenLDAP --enable-x_compile + # Check whether --enable-x_compile or --disable-x_compile was given. +if test "${enable_x_compile+set}" = set; then + enableval="$enable_x_compile" + + ol_arg=invalid + for ol_val in yes no ; do + if test "$enableval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; } + fi + ol_enable_x_compile="$ol_arg" + +else + ol_enable_x_compile="no" +fi +# end --enable-x_compile # OpenLDAP --with-kerberos # Check whether --with-kerberos or --without-kerberos was given. @@ -736,7 +782,7 @@ if test "${with_threads+set}" = set; then withval="$with_threads" ol_arg=invalid - for ol_val in auto posix dce mach yes no manual ; do + for ol_val in auto posix mach lwp yes no manual ; do if test "$withval" = "$ol_val" ; then ol_arg="$ol_val" fi @@ -751,6 +797,27 @@ else fi # end --with-threads +# OpenLDAP --with-preemptive + # Check whether --with-preemptive or --without-preemptive was given. +if test "${with_preemptive+set}" = set; then + withval="$with_preemptive" + + ol_arg=invalid + for ol_val in auto yes no manual ; do + if test "$withval" = "$ol_val" ; then + ol_arg="$ol_val" + fi + done + if test "$ol_arg" = "invalid" ; then + { echo "configure: error: bad value $withval for --with-preemptive" 1>&2; exit 1; } + fi + ol_with_preemptive="$ol_arg" + +else + ol_with_preemptive="auto" +fi +# end --with-preemptive + # OpenLDAP --enable-ldapd @@ -794,10 +861,10 @@ else ol_enable_slapd="yes" fi # end --enable-slapd -# OpenLDAP --enable-aclgroup - # Check whether --enable-aclgroup or --disable-aclgroup was given. -if test "${enable_aclgroup+set}" = set; then - enableval="$enable_aclgroup" +# OpenLDAP --enable-aclgroups + # Check whether --enable-aclgroups or --disable-aclgroups was given. +if test "${enable_aclgroups+set}" = set; then + enableval="$enable_aclgroups" ol_arg=invalid for ol_val in auto yes no ; do @@ -806,14 +873,14 @@ if test "${enable_aclgroup+set}" = set; then fi done if test "$ol_arg" = "invalid" ; then - { echo "configure: error: bad value $enableval for --enable-aclgroup" 1>&2; exit 1; } + { echo "configure: error: bad value $enableval for --enable-aclgroups" 1>&2; exit 1; } fi - ol_enable_aclgroup="$ol_arg" + ol_enable_aclgroups="$ol_arg" else - ol_enable_aclgroup="auto" + ol_enable_aclgroups="auto" fi -# end --enable-aclgroup +# end --enable-aclgroups # OpenLDAP --enable-crypt # Check whether --enable-crypt or --disable-crypt was given. if test "${enable_crypt+set}" = set; then @@ -1062,50 +1129,50 @@ fi if test $ol_enable_slapd = no ; then if test $ol_enable_ldbm = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_ldbm argument" 1>&2 fi if test $ol_enable_passwd = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_passwd argument" 1>&2 fi if test $ol_enable_shell = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_shell argument" 1>&2 fi - if test $ol_enable_aclgroup = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_aclgroup argument" 1>&2; + if test $ol_enable_aclgroups = yes ; then + echo "configure: warning: slapd disabled, ignoring --enable_aclgroups argument" 1>&2 fi if test $ol_enable_crypt = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_crypt argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_crypt argument" 1>&2 fi if test $ol_enable_md5 = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_md5 argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_md5 argument" 1>&2 fi if test $ol_enable_sha1 = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_sha1 argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_sha1 argument" 1>&2 fi if test $ol_enable_wrappers = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_wrappers argument" 1>&2 fi if test $ol_enable_phonetic = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_phonetic argument" 1>&2 fi if test $ol_enable_rlookups = yes ; then - echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --enable_rlookups argument" 1>&2 fi if test $ol_with_ldbm_api != auto ; then - echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --with_ldbm_api argument" 1>&2 fi if test $ol_with_ldbm_type != auto ; then - echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2; + echo "configure: warning: slapd disabled, ignoring --with_ldbm_type argument" 1>&2 fi if test $ol_enable_slurpd = yes ; then - { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }; + { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; } fi # force settings to no ol_enable_ldbm=no ol_enable_shell=no ol_enable_passwd=no - ol_enable_aclgroup=no + ol_enable_aclgroups=no ol_enable_crypt=no ol_enable_md5=no ol_enable_sha1=no @@ -1119,15 +1186,15 @@ if test $ol_enable_slapd = no ; then elif test $ol_enable_ldbm = no ; then if test $ol_with_ldbm_api != auto ; then - echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2; + echo "configure: warning: LDBM disabled, ignoring --with_ldbm_api argument" 1>&2 fi if test $ol_with_ldbm_type != auto ; then - echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2; + echo "configure: warning: LDBM disabled, ignoring --with_ldbm_type argument" 1>&2 fi if test $ol_enable_passwd = no -a $ol_enable_shell = no ; then - { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }; + { echo "configure: error: slapd requires a backend" 1>&2; exit 1; } fi ol_with_ldbm_api=no @@ -1137,37 +1204,30 @@ else if test $ol_with_ldbm_api = gdbm -a \ $ol_with_ldbm_type = btree ; then - { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }; + { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; } fi if test $ol_with_ldbm_api = ndbm -a \ $ol_with_ldbm_type = btree ; then - { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }; + { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; } fi fi if test $ol_enable_slurpd = yes ; then if test $ol_with_threads = no ; then - { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }; + { echo "configure: error: slurpd requires threads" 1>&2; exit 1; } fi fi echo "$ac_t""done" 1>&6 ## Initialize vars -LDAP_DEFS= LDAP_LIBS= -LDBM_DEFS= LDBM_LIBS= -LTHREAD_DEFS= LTHREAD_LIBS= -LUTIL_DEFS= LUTIL_LIBS= -LDAPD_DEFS= LDAPD_LIBS= -SLAPD_DEFS= SLAPD_LIBS= -SLURPD_DEFS= SLURPD_LIBS= BUILD_LDAPD=no @@ -1178,179 +1238,430 @@ BUILD_LDBM=no BUILD_PASSWD=no BUILD_SHELL=no +KRB_LIBS= +TERMCAP_LIBS= -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1186: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1247: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" + ac_cv_prog_LN_S=ln fi fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:1278: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1215: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:1330: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" + ac_cv_prog_RANLIB="ranlib" break fi done IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1263: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1297: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1302: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:1357: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.c < conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes else - ac_cv_prog_gcc=no + eval ac_cv_prog_make_${ac_make}_set=no fi +rm -f conftestmake fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1326: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= else - ac_cv_prog_cc_g=no + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" fi -rm -f conftest* -fi -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi +# Extract the first word of "sendmail", so it can be a program name with args. +set dummy sendmail; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1387: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$SENDMAIL" in + /*) + ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_SENDMAIL="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail" + ;; +esac +fi +SENDMAIL="$ac_cv_path_SENDMAIL" +if test -n "$SENDMAIL"; then + echo "$ac_t""$SENDMAIL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "vi", so it can be a program name with args. +set dummy vi; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1419: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$EDITOR" in + /*) + ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/ucb$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_EDITOR="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi" + ;; +esac +fi +EDITOR="$ac_cv_path_EDITOR" +if test -n "$EDITOR"; then + echo "$ac_t""$EDITOR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "finger", so it can be a program name with args. +set dummy finger; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1451: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$FINGER" in + /*) + ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH:/usr/ucb$ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_FINGER="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger" + ;; +esac +fi +FINGER="$ac_cv_path_FINGER" +if test -n "$FINGER"; then + echo "$ac_t""$FINGER" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1484: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1513: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1561: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1595: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1600: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1624: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi else GCC= test "${CFLAGS+set}" = set || CFLAGS="-g" fi + +if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then + echo "configure: warning: cross compiling.... go for it" 1>&2 + +elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then + echo "configure: warning: programs compiled here do run here..." 1>&2 + { echo "configure: error: if not cross compiling, use --disable-x-compile." 1>&2; exit 1; } + +elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then + echo "configure: warning: programs compiled here do not run here..." 1>&2 + { echo "configure: error: if cross compiling, add --enable-x-compile." 1>&2; exit 1; } +fi + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1354: checking how to run the C preprocessor" >&5 +echo "configure:1665: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1365,13 +1676,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1382,13 +1693,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1412,13 +1723,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1416: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1727: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1436,7 +1747,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1457,451 +1768,1568 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi fi - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1463: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1773: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + + + +echo $ac_n "checking for AIX""... $ac_c" 1>&6 +echo "configure:1836: checking for AIX" >&5 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF +#define _ALL_SOURCE 1 +EOF + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1860: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + +ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 +echo "configure:1882: checking for minix/config.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MINIX=yes +else + echo "$ac_t""no" 1>&6 +MINIX= +fi + +if test "$MINIX" = yes; then + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_1_SOURCE 2 +EOF + + cat >> confdefs.h <<\EOF +#define _MINIX 1 +EOF + +fi + + + + +echo $ac_n "checking for socket""... $ac_c" 1>&6 +echo "configure:1933: checking for socket" >&5 +if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* 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 socket(); + +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_socket) || defined (__stub___socket) +choke me +#else +socket(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_socket=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_socket=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 +echo "configure:1980: checking for main in -lsocket" >&5 +ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 +echo "configure:2023: checking for main in -lnet" >&5 +ac_lib_var=`echo net'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnet $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 +echo "configure:2066: checking for main in -lnsl_s" >&5 +ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl_s $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 +echo "configure:2109: checking for main in -lnsl" >&5 +ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 +echo "configure:2152: checking for socket in -linet" >&5 +ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-linet $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 +echo "configure:2199: checking for main in -lgen" >&5 +ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgen $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + +fi + + +echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 +echo "configure:2246: checking for sigset in -lV3" >&5 +ac_lib_var=`echo V3'_'sigset | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lV3 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then + for ac_hdr in kerberosIV/krb.h kerberosIV/des.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2298: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_header_kerberosIV_krb_h = yes ; then + echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 +echo "configure:2337: checking for main in -lkrb4" >&5 +ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_k5=yes +else + echo "$ac_t""no" 1>&6 +have_k5=no +fi + + + if test $have_k5 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes + + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 +EOF + + + KRB_LIBS="-lkrb4 -lkrb5 -ldes425" + fi + fi +fi +if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then + for ac_hdr in krb.h des.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2392: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_header_krb_h = yes ; then + echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 +echo "configure:2431: checking for main in -lkrb" >&5 +ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lkrb -ldes $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_k4=yes +else + echo "$ac_t""no" 1>&6 +have_k4=no +fi + + + if test $have_k4 = yes ; then + ol_with_kerberos=found + ol_link_kerberos=yes + + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 +EOF + + + KRB_LIBS="-lkrb -ldes" + fi + fi +fi + + +ol_link_threads=no +if test $ol_with_threads = auto -o $ol_with_threads = posix ; then + for ac_hdr in pthread.h sched.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2489: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + if test $ac_cv_header_pthread_h = yes ; then + echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 +echo "configure:2528: checking POSIX thread version" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < + /* this check could be improved */ +# ifdef PTHREAD_ONCE_INIT + final +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "final" >/dev/null 2>&1; then + rm -rf conftest* + ol_pthread_final=yes +else + rm -rf conftest* + ol_pthread_final=no +fi +rm -f conftest* + + + cat > conftest.$ac_ext < + /* this check could be improved */ +# ifdef pthread_once_init + draft4 +# endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "draft4" >/dev/null 2>&1; then + rm -rf conftest* + ol_pthread_draft4=yes +else + rm -rf conftest* + ol_pthread_draft4=no +fi +rm -f conftest* + + + if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then + ol_cv_pthread_version=final + elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then + ol_cv_pthread_version=draft4 + else + ol_cv_pthread_version=unknown + fi + +fi + +echo "$ac_t""$ol_cv_pthread_version" 1>&6 + + + if test $ol_cv_pthread_version = final ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS_FINAL 1 +EOF + + elif test $ol_cv_pthread_version = draft4 ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS_D4 1 +EOF + + else + { echo "configure: error: unknown pthread version" 1>&2; exit 1; } + fi + + # consider threads found + ol_with_threads=found + + +echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 +echo "configure:2609: checking for LinuxThreads" >&5 +if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` + if test "$res" -gt 0 ; then + ol_cv_linux_threads=yes + else + ol_cv_linux_threads=no + fi + +fi + +echo "$ac_t""$ol_cv_linux_threads" 1>&6 + + + if test $ol_cv_linux_threads = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_LINUX_THREADS 1 +EOF + + fi + + + echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 +echo "configure:2635: checking for pthread_create" >&5 +if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* 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 pthread_create(); + +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_pthread_create) || defined (__stub___pthread_create) +choke me +#else +pthread_create(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_pthread_create=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_pthread_create=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ol_link_threads=yes +else + echo "$ac_t""no" 1>&6 +fi + + + if test $ol_link_threads = no ; then + echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 +echo "configure:2685: checking for pthread_create with -pthread" >&5 +if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + save_LIBS="$LIBS" + LIBS="-pthread $LIBS" + cat > conftest.$ac_ext < +int main() { + + pthread_create((pthread_t*) 0, + (pthread_attr_t*) 0, 0, 0); + +; return 0; } +EOF +if { (eval echo configure:2703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ol_cv_pthread_flag=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_pthread_flag=no +fi +rm -f conftest* + LIBS="$save_LIBS" + +fi + +echo "$ac_t""$ol_cv_pthread_flag" 1>&6 + + if test $ol_cv_pthread_flag = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -pthread" + ol_link_threads=posix + fi + fi + + if test $ol_link_threads = no ; then + save_LIBS="$LIBS" + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:2728: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" + ac_save_LIBS="$LIBS" +LIBS="-lpthread $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" else - ac_cv_prog_LN_S=ln + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" + fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 + + ol_link_threads=posix + LTHREAD_LIBS="$LTHREAD_LIBS -lpthread" else echo "$ac_t""no" 1>&6 fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1494: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + LIBS="$save_LIBS" + fi + + if test $ol_link_threads = no ; then + save_LIBS="$LIBS" + echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +echo "configure:2775: checking for pthread_create in -lc_r" >&5 +ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" + ac_save_LIBS="$LIBS" +LIBS="-lc_r $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 +rm -f conftest* +LIBS="$ac_save_LIBS" -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + ol_link_threads=posix + LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" +else + echo "$ac_t""no" 1>&6 +fi -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + LIBS="$save_LIBS" + fi -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1546: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + if test $ol_link_threads = no ; then + save_LIBS="$LIBS" + echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:2822: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + ac_save_LIBS="$LIBS" +LIBS="-lpthread -lmach -lexc -lc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" + fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + + cat >> confdefs.h <<\EOF +#define HAVE_DCE 1 +EOF + + ol_link_threads=posix + LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=yes + fi + else echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1573: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + LIBS="$save_LIBS" + fi + + if test $ol_link_threads != no ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS 1 +EOF + + + save_CPPFLAGS="$CPPFLAGS" + save_LIBS="$LIBS" + LIBS="$LTHREAD_LIBS $LIBS" + + for ac_func in sched_yield pthread_yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2887: 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 > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' + cat > conftest.$ac_ext < +/* 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 -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes +if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" else - eval ac_cv_prog_make_${ac_make}_set=no + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi -rm -f conftestmake +rm -f conftest* fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - SET_MAKE= + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 - SET_MAKE="MAKE=${MAKE-make}" fi +done -# Extract the first word of "sendmail", so it can be a program name with args. -set dummy sendmail; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1603: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no ; then + echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6 +echo "configure:2943: checking for sched_yield in -lrt" >&5 +ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$SENDMAIL" in - /*) - ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc$ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_SENDMAIL="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail" - ;; -esac -fi -SENDMAIL="$ac_cv_path_SENDMAIL" -if test -n "$SENDMAIL"; then - echo "$ac_t""$SENDMAIL" 1>&6 + ac_save_LIBS="$LIBS" +LIBS="-lrt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" -# Extract the first word of "vi", so it can be a program name with args. -set dummy vi; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1635: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_EDITOR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$EDITOR" in - /*) - ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH:/usr/ucb$ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_EDITOR="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi" - ;; -esac fi -EDITOR="$ac_cv_path_EDITOR" -if test -n "$EDITOR"; then - echo "$ac_t""$EDITOR" 1>&6 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LTHREAD_LIBS="$LTHREAD_LIBS -lrt" + cat >> confdefs.h <<\EOF +#define HAVE_SCHED_YIELD 1 +EOF + + ac_cv_func_sched_yield=yes else echo "$ac_t""no" 1>&6 +ac_cv_func_sched_yield=no fi -# Extract the first word of "finger", so it can be a program name with args. -set dummy finger; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1667: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_FINGER'+set}'`\" = set"; then + fi + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no ; then + echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 +echo "configure:2992: checking for sched_yield in -lposix4" >&5 +ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$FINGER" in - /*) - ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH:/usr/ucb$ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_FINGER="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger" - ;; -esac + ac_save_LIBS="$LIBS" +LIBS="-lposix4 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi -FINGER="$ac_cv_path_FINGER" -if test -n "$FINGER"; then - echo "$ac_t""$FINGER" 1>&6 +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LTHREAD_LIBS="$LTHREAD_LIBS -lposix4" + cat >> confdefs.h <<\EOF +#define HAVE_SCHED_YIELD 1 +EOF + + ac_cv_func_sched_yield=yes else echo "$ac_t""no" 1>&6 +ac_cv_func_sched_yield=no fi + fi + if test $ac_cv_func_sched_yield = no -a \ + $ac_cv_func_pthread_yield = no ; then + echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2 + { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; } + fi - -echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:1699: checking for socket" >&5 -if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then + for ac_func in pthread_kill +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3047: 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 < /* 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 socket(); +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_socket) || defined (__stub___socket) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -socket(); +$ac_func(); #endif ; return 0; } EOF -if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_func_socket=yes" + 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_socket=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then +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 <&6 - echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:1745: checking for gethostname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +fi +done + + + for ac_func in \ + pthread_setconcurrency \ + thr_setconcurrency \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3106: 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 - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < /* 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 gethostname(); +char $ac_func(); int main() { -gethostname() + +/* 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:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + 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_lib_$ac_lib_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi +done - echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1792: checking for socket in -lsocket" >&5 -ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + + if test $ol_with_preemptive = auto ; then + echo $ac_n "checking for preemptive Pthread implementation""... $ac_c" 1>&6 +echo "configure:3161: checking for preemptive Pthread implementation" >&5 + if test "$cross_compiling" = yes; then + + { echo "configure: error: crossing compiling: use --with-preemptive=yes|no|manual" 1>&2; exit 1; } else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +#include +#include +#include +#ifndef NULL +#define NULL 0 +#endif + +int task(arg) + int *arg; +{ + struct timeval tv; + + tv.tv_sec=4; + tv.tv_usec=0; + select(0, NULL, NULL, NULL, &tv); + + tv.tv_sec=6; + tv.tv_usec=0; + select(0, NULL, NULL, NULL, &tv); + + exit(1); /* if we exit here, the select blocked the whole process */ +} + +main(argc, argv) +int argc; char **argv; +{ + pthread_t t; + +#ifdef HAVE_PTHREAD_SETCONCURRENCY + (void) pthread_setconcurrency(2); +#elif HAVE_THR_SETCONCURRENCY + /* Set Solaris LWP concurrency to 2 */ + thr_setconcurrency(2); +#endif + + pthread_create(&t, NULL, (void *) task, NULL); + +#if HAVE_SCHED_YIELD + sched_yield(); /* make sure task runs first */ +#else +#if defined(HAVE_PTHREAD_YIELD) + pthread_yield(); /* make sure task runs first */ +#endif +#endif + exit(0); +} + EOF -if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ol_pthread_preemptive=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + rm -fr conftest* + ol_pthread_preemptive=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -fr conftest* fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -else - echo "$ac_t""no" 1>&6 -fi + if test $ol_pthread_preemptive = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_PREEMPTIVE_PTHREADS 1 +EOF - echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:1839: checking for socket in -linet" >&5 -ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + ol_with_preemptive=yes + fi + fi + + for ac_func in \ + feof_unlocked \ + unlocked_feof \ + ftrylockfile \ + flockfile \ + putc_unlocked \ + gmtime_r \ + strtok_r \ + +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3253: 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 - ac_save_LIBS="$LIBS" -LIBS="-linet $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < /* 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 socket(); +char $ac_func(); int main() { -socket() + +/* 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:1858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + 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_lib_$ac_lib_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi +done -fi + CPPFLAGS="$save_CPPFLAGS" + LIBS="$save_LIBS" + else + { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } + fi + fi + if test $ol_with_threads = posix ; then + { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; } + fi +fi -ol_link_threads=no -if test $ol_with_threads = auto -o $ol_with_threads = posix ; then - for ac_hdr in pthread.h sched.h +if test $ol_with_threads = auto -o $ol_with_threads = mach ; then + for ac_hdr in mach/cthreads.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1895: checking for $ac_hdr" >&5 +echo "configure:3323: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1927,148 +3355,51 @@ else fi done - - if test "$ac_cv_header_pthread_h" = yes ; then - echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:1934: checking POSIX thread version" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_version'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < - /* this check could be improved */ -# ifdef PTHREAD_ONCE_INIT - final -# endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "final" >/dev/null 2>&1; then - rm -rf conftest* - ol_pthread_final=yes -else - rm -rf conftest* - ol_pthread_final=no -fi -rm -f conftest* - - - cat > conftest.$ac_ext < - /* this check could be improved */ -# ifdef pthread_once_init - draft4 -# endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "draft4" >/dev/null 2>&1; then - rm -rf conftest* - ol_pthread_draft4=yes -else - rm -rf conftest* - ol_pthread_draft4=no -fi -rm -f conftest* - - - if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then - ol_cv_pthread_version=final - elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then - ol_cv_pthread_version=draft4 - else - ol_cv_pthread_version=unknown - fi - -fi - -echo "$ac_t""$ol_cv_pthread_version" 1>&6 - - - if test $ol_cv_pthread_version = final ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" - elif test $ol_cv_pthread_version = draft4 ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" - else - { echo "configure: error: unknown pthread version" 1>&2; exit 1; } - fi - - # consider threads found + if test $ac_cv_header_mach_cthreads_h = yes ; then ol_with_threads=found - -echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2009: checking for LinuxThreads" >&5 -if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` - if test "$res" -gt 0 ; then - ol_cv_linux_threads=yes - else - ol_cv_linux_threads=no - fi - -fi - -echo "$ac_t""$ol_cv_linux_threads" 1>&6 - - - if test $ol_cv_linux_threads = yes ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" - fi - - - echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:2032: checking for pthread_create" >&5 -if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then + echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6 +echo "configure:3363: checking for cthread_fork" >&5 +if eval "test \"`echo '$''{'ac_cv_func_cthread_fork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* 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 pthread_create(); +char cthread_fork(); 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_pthread_create) || defined (__stub___pthread_create) +#if defined (__stub_cthread_fork) || defined (__stub___cthread_fork) choke me #else -pthread_create(); +cthread_fork(); #endif ; return 0; } EOF -if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_func_pthread_create=yes" + eval "ac_cv_func_cthread_fork=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_pthread_create=no" + eval "ac_cv_func_cthread_fork=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then echo "$ac_t""yes" 1>&6 ol_link_threads=yes else @@ -2077,70 +3408,121 @@ fi if test $ol_link_threads = no ; then - echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:2082: checking for pthread_create with -pthread" >&5 -if eval "test \"`echo '$''{'ol_cv_pthread_flag'+set}'`\" = set"; then + echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6 +echo "configure:3413: checking for cthread_fork with -all_load" >&5 +if eval "test \"`echo '$''{'ol_cv_cthread_all_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else save_LIBS="$LIBS" - LIBS="-pthread $LIBS" + LIBS="-all_load $LIBS" cat > conftest.$ac_ext < +#include int main() { - pthread_create((pthread_t*) 0, - (pthread_attr_t*) 0, 0, 0); + cthread_fork((void *)0, (void *)0); ; return 0; } EOF -if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - ol_cv_pthread_flag=yes + ol_cv_cthread_all_load=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ol_cv_pthread_flag=no + ol_cv_cthread_all_load=no fi rm -f conftest* LIBS="$save_LIBS" fi -echo "$ac_t""$ol_cv_pthread_flag" 1>&6 +echo "$ac_t""$ol_cv_cthread_all_load" 1>&6 - if test $ol_cv_pthread_flag = yes ; then - LTHREAD_LIBS="$LTHREAD_LIBS -pthread" - ol_link_threads=posix + if test $ol_cv_cthread_all_load = yes ; then + LTHREAD_LIBS="$LTHREAD_LIBS -all_load" + ol_link_threads=mach fi fi - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2125: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` + if test $ol_link_threads != no ; then + : check for cthread specific functionality here + else + { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; } + fi + fi + + if test $ol_with_threads = mach ; then + { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; } + fi +fi + +if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then + for ac_hdr in thread.h synch.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3469: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then + echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 +echo "configure:3507: checking for thr_create in -lthread" >&5 +ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" +LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2155,86 +3537,88 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lpthread" + have_lwp=yes else echo "$ac_t""no" 1>&6 +have_lwp=no fi - LIBS="$save_LIBS" + + if test $have_lwp = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_THR 1 +EOF + + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=yes + fi fi + fi - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2172: checking for pthread_create in -lc_r" >&5 -ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + for ac_hdr in lwp/lwp.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3565: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lc_r $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < EOF -if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_LIBS="$LTHREAD_LIBS -lc_r" + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 fi +done - LIBS="$save_LIBS" - fi - - if test $ol_link_threads = no ; then - save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2219: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` + if test $ac_cv_header_lwp_lwp_h = yes ; then + echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 +echo "configure:3603: checking for lwp_create in -llwp" >&5 +ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lpthread -lmach -lexc -lc $LIBS" +LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2249,27 +3633,88 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ol_link_threads=posix - LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" - LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" + have_lwp=yes else echo "$ac_t""no" 1>&6 +have_lwp=no fi - LIBS="$save_LIBS" + + if test $have_lwp = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_LWP 1 +EOF + + LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $ol_with_preemptive = auto ; then + ol_with_preemptive=no + fi fi + fi +fi - if test $ol_link_threads != no ; then - for ac_func in sched_yield pthread_yield +if test $ol_with_preemptive = yes ; then + cat >> confdefs.h <<\EOF +#define PREEMPTIVE_THREADS 1 +EOF + +fi + +if test $ol_with_threads = manual ; then + ol_link_threads=yes + + echo "configure: warning: thread defines and link options must be set manually" 1>&2 + + for ac_hdr in pthread.h sched.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3674: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2268: checking for $ac_func" >&5 +echo "configure:3713: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2316,43 +3761,40 @@ else fi done - - if test $ac_cv_func_sched_yield = no -a \ - $ac_cv_func_pthread_yield = no ; then - - echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2 - { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; } - fi - else - { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } - fi + +echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 +echo "configure:3767: checking for LinuxThreads" >&5 +if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` + if test "$res" -gt 0 ; then + ol_cv_linux_threads=yes + else + ol_cv_linux_threads=no fi - if test $ol_with_threads = posix ; then - { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; } - fi fi -if test $ol_with_threads = manual ; then - $ol_link_threads=yes +echo "$ac_t""$ol_cv_linux_threads" 1>&6 - echo "configure: warning: thread defines and link options must be set manually" 1>&2 - for ac_hdr in pthread.h sched.h + for ac_hdr in mach/cthreads.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2346: checking for $ac_hdr" >&5 +echo "configure:3788: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2378,54 +3820,39 @@ else fi done - for ac_func in sched_yield pthread_yield + for ac_hdr in lwp/lwp.h do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2385: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3828: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -/* 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; } +#include <$ac_hdr> EOF -if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "ac_cv_header_$ac_safe=yes" else + echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 -echo "configure:2439: checking for LinuxThreads" >&5 -if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then + for ac_hdr in thread.h synch.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3868: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` - if test "$res" -gt 0 ; then - ol_cv_linux_threads=yes - else - ol_cv_linux_threads=no - fi - + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" fi - -echo "$ac_t""$ol_cv_linux_threads" 1>&6 +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done fi @@ -2460,23 +3909,30 @@ if test $ol_link_threads = no ; then if test $ol_with_threads = auto ; then echo "configure: warning: no suitable thread support, disabling threads" 1>&2 - $ol_with_threads = no + ol_with_threads=no fi - LTHREAD_DEFS="-DNO_THREADS" + cat >> confdefs.h <<\EOF +#define NO_THREADS 1 +EOF + + cat >> confdefs.h <<\EOF +#define PREEMPTIVE_THREADS 1 +EOF + LTHREAD_LIBS="" fi ol_link_ldbm=no if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then echo $ac_n "checking for DB2 library""... $ac_c" 1>&6 -echo "configure:2474: checking for DB2 library" >&5 +echo "configure:3930: checking for DB2 library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:2480: checking for db_open in -ldb" >&5 +echo "configure:3936: checking for db_open in -ldb" >&5 ac_lib_var=`echo db'_'db_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2484,7 +3940,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2526,17 +3982,17 @@ for ac_hdr in db.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2530: checking for $ac_hdr" >&5 +echo "configure:3986: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2564,13 +4020,13 @@ done if test $ac_cv_header_db_h = yes ; then echo $ac_n "checking if db.h is DB2""... $ac_c" 1>&6 -echo "configure:2568: checking if db.h is DB2" >&5 +echo "configure:4024: checking if db.h is DB2" >&5 if eval "test \"`echo '$''{'ol_cv_header_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -2602,7 +4058,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:2606: checking for Berkeley DB2" >&5 +echo "configure:4062: checking for Berkeley DB2" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2616,18 +4072,28 @@ else fi echo "$ac_t""$ol_cv_berkeley_db2" 1>&6 + if test $ol_cv_berkeley_db2 = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_BERKELEY_DB2 1 +EOF + + fi if test $ol_cv_berkeley_db2 = yes ; then ol_link_ldbm=db2 ol_with_ldbm_api=db2 - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2" - if test $ol_with_ldbm_type = hash ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBHASH 1 +EOF + else - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBBTREE 1 +EOF + fi if test $ol_cv_lib_db2 != yes ; then @@ -2638,18 +4104,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then echo $ac_n "checking for Berkeley DB library""... $ac_c" 1>&6 -echo "configure:2642: checking for Berkeley DB library" >&5 +echo "configure:4108: checking for Berkeley DB library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbopen""... $ac_c" 1>&6 -echo "configure:2648: checking for dbopen" >&5 +echo "configure:4114: checking for dbopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -2691,7 +4157,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:2695: checking for dbopen in -ldb" >&5 +echo "configure:4161: checking for dbopen in -ldb" >&5 ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2699,7 +4165,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2745,17 +4211,17 @@ for ac_hdr in db_185.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2749: checking for $ac_hdr" >&5 +echo "configure:4215: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2791,7 +4257,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:2795: checking for Berkeley DB" >&5 +echo "configure:4261: checking for Berkeley DB" >&5 if eval "test \"`echo '$''{'ol_cv_berkeley_db'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2805,20 +4271,28 @@ else fi echo "$ac_t""$ol_cv_berkeley_db" 1>&6 + if test $ol_cv_berkeley_db = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_BERKELEY_DB 1 +EOF + + fi if test $ol_cv_berkeley_db = yes ; then ol_link_ldbm=db ol_with_ldbm_api=db - if test $ac_cv_header_db_185_h = yes ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185" - fi - if test $ol_with_ldbm_type = hash ; then - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH" + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBHASH 1 +EOF + else - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE" + cat >> confdefs.h <<\EOF +#define LDBM_USE_DBBTREE 1 +EOF + fi if test $ol_cv_lib_db != yes ; then @@ -2828,7 +4302,7 @@ echo "$ac_t""$ol_cv_berkeley_db" 1>&6 fi if test $ol_with_ldbm_api = manual ; then - $ol_link_ldbm=yes + ol_link_ldbm=yes echo "configure: warning: LDBM defines and link options must be set manually" 1>&2 @@ -2836,17 +4310,17 @@ if test $ol_with_ldbm_api = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2840: checking for $ac_hdr" >&5 +echo "configure:4314: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2875,24 +4349,24 @@ done fi if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then - echo "configure: warning: Could not find LDBM with BTREE support" 1>&2; - $ol_with_ldbm_api=none + echo "configure: warning: Could not find LDBM with BTREE support" 1>&2 + ol_with_ldbm_api=none fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then echo $ac_n "checking for GDBM library""... $ac_c" 1>&6 -echo "configure:2885: checking for GDBM library" >&5 +echo "configure:4359: checking for GDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6 -echo "configure:2891: checking for gdbm_open" >&5 +echo "configure:4365: checking for gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -2934,7 +4408,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:2938: checking for gdbm_open in -lgdbm" >&5 +echo "configure:4412: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2942,7 +4416,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2988,17 +4462,17 @@ echo "$ac_t""$ol_cv_lib_gdbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2992: checking for $ac_hdr" >&5 +echo "configure:4466: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3025,7 +4499,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3029: checking for db" >&5 +echo "configure:4503: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3039,14 +4513,18 @@ else fi echo "$ac_t""$ol_cv_gdbm" 1>&6 + if test $ol_cv_gdbm = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_GDBM 1 +EOF + + fi if test $ol_cv_gdbm = yes ; then ol_link_ldbm=gdbm ol_with_ldbm_api=gdbm - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM" - if test $ol_cv_lib_gdbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm" fi @@ -3055,18 +4533,18 @@ fi if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then echo $ac_n "checking for NDBM library""... $ac_c" 1>&6 -echo "configure:3059: checking for NDBM library" >&5 +echo "configure:4537: checking for NDBM library" >&5 if eval "test \"`echo '$''{'ol_cv_lib_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ol_LIBS="$LIBS" echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:3065: checking for dbm_open" >&5 +echo "configure:4543: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3108,7 +4586,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3112: checking for dbm_open in -lndbm" >&5 +echo "configure:4590: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3116,7 +4594,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3147,7 +4625,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3151: checking for dbm_open in -ldbm" >&5 +echo "configure:4629: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3155,7 +4633,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3203,17 +4681,17 @@ echo "$ac_t""$ol_cv_lib_ndbm" 1>&6 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3207: checking for $ac_hdr" >&5 +echo "configure:4685: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3240,7 +4718,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3244: checking for db" >&5 +echo "configure:4722: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3254,6 +4732,12 @@ else fi echo "$ac_t""$ol_cv_ndbm" 1>&6 + if test $ol_cv_ndbm = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NDBM 1 +EOF + + fi if test $ol_cv_ndbm = yes ; then @@ -3264,8 +4748,6 @@ echo "$ac_t""$ol_cv_ndbm" 1>&6 echo "configure: warning: Attempting to use NDBM. Functionality will be limited." 1>&2 fi - LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM" - if test $ol_cv_lib_ndbm != yes ; then LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm" fi @@ -3279,12 +4761,12 @@ if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then fi echo "configure: warning: disabling LDBM" 1>&2 - $ol_enable_ldbm=no + ol_enable_ldbm=no fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3288: checking for hosts_access in -lwrap" >&5 +echo "configure:4770: checking for hosts_access in -lwrap" >&5 ac_lib_var=`echo wrap'_'hosts_access | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3292,7 +4774,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3326,7 +4808,10 @@ fi if test $have_wrappers = yes ; then - SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" + cat >> confdefs.h <<\EOF +#define HAVE_TCPD 1 +EOF + SLAPD_LIBS="$SLAPD_LIBS -lwrap" else echo "configure: warning: could not find -lwrap" 1>&2 @@ -3342,25 +4827,21 @@ fi # ud needs termcap (should insert check here) ol_link_termcap=no - -TERMCAP_DEFS= -TERMCAP_LIBS= - for ac_hdr in termcap.h ncurses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3354: checking for $ac_hdr" >&5 +echo "configure:4835: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3389,7 +4870,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:3393: checking for tputs in -ltermcap" >&5 +echo "configure:4874: checking for tputs in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3397,7 +4878,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3430,6 +4911,10 @@ have_termcap=no fi if test $have_termcap = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_TERMCAP 1 +EOF + ol_link_termcap=yes TERMCAP_LIBS=-ltermcap fi @@ -3437,7 +4922,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:3441: checking for initscr in -lncurses" >&5 +echo "configure:4926: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3445,7 +4930,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3478,28 +4963,32 @@ have_ncurses=no fi if test $have_ncurses = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES 1 +EOF + ol_link_termcap=yes TERMCAP_LIBS=-lncurses fi fi if test $ol_link_termcap = no ; then - TERMCAP_DEFS="-DNOTERMCAP" + cat >> confdefs.h <<\EOF +#define NO_TERMCAP 1 +EOF + TERMCAP_LIBS= fi - - - # FreeBSD (and others) have crypt(3) in -lcrypt if test $ol_enable_crypt != no ; then echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:3498: checking for crypt" >&5 +echo "configure:4987: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -3541,7 +5030,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3545: checking for crypt in -lcrypt" >&5 +echo "configure:5034: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3549,7 +5038,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3586,7 +5075,10 @@ fi if test $have_crypt = yes ; then - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" + cat >> confdefs.h <<\EOF +#define HAVE_CRYPT 1 +EOF + else echo "configure: warning: could not find crypt" 1>&2 if test $ol_enable_crypt = yes ; then @@ -3598,13 +5090,116 @@ fi fi fi +# FreeBSD (and others) have setproctitle(3) in -lutil +if test $ol_enable_proctitle != no ; then + echo $ac_n "checking for setproctitle""... $ac_c" 1>&6 +echo "configure:5097: checking for setproctitle" >&5 +if eval "test \"`echo '$''{'ac_cv_func_setproctitle'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* 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 setproctitle(); + +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_setproctitle) || defined (__stub___setproctitle) +choke me +#else +setproctitle(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_setproctitle=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_setproctitle=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_setproctitle=yes +else + echo "$ac_t""no" 1>&6 + + echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6 +echo "configure:5144: checking for setproctitle in -lutil" >&5 +ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lutil $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_setproctitle=yes + LUTIL_LIBS="$LUTIL_LIBS -lutil" +else + echo "$ac_t""no" 1>&6 +have_setproctitle=no + LIBOBJS="$LIBOBJS setproctitle.o" +fi + +fi + + + if test $have_setproctitle = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_SETPROCTITLE 1 +EOF + + fi +fi + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3603: checking for ANSI C header files" >&5 +echo "configure:5198: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3612,7 +5207,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3629,7 +5224,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3647,7 +5242,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3668,7 +5263,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3679,7 +5274,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3702,17 +5297,22 @@ EOF fi + +if test $ac_cv_header_stdc != yes; then + echo "configure: warning: could not locate Standard C headers" 1>&2 +fi + ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3711: checking for $ac_hdr that defines DIR" >&5 +echo "configure:5311: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3720,7 +5320,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3745,7 +5345,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3749: checking for opendir in -ldir" >&5 +echo "configure:5349: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3753,7 +5353,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3786,7 +5386,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3790: checking for opendir in -lx" >&5 +echo "configure:5390: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3794,7 +5394,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3828,12 +5428,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3832: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:5432: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3849,7 +5449,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3870,33 +5470,44 @@ EOF fi for ac_hdr in \ - stddef.h \ - fcntl.h \ - filio.h \ - limits.h \ - malloc.h \ - sgtty.h \ - sys/file.h \ - sys/ioctl.h \ - sys/time.h \ - syslog.h \ - termio.h \ - unistd.h \ + stdarg.h \ + stddef.h \ + errno.h \ + fcntl.h \ + filio.h \ + getopt.h \ + libutil.h \ + limits.h \ + malloc.h \ + regex.h \ + sgtty.h \ + sys/file.h \ + sys/filio.h \ + sys/errno.h \ + sys/ioctl.h \ + sys/param.h \ + sys/socket.h \ + sys/syslog.h \ + sys/time.h \ + sys/types.h \ + syslog.h \ + termios.h \ + unistd.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3890: checking for $ac_hdr" >&5 +echo "configure:5501: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3924,12 +5535,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3928: checking for uid_t in sys/types.h" >&5 +echo "configure:5539: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3958,7 +5569,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3962: checking type of array argument to getgroups" >&5 +echo "configure:5573: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3966,7 +5577,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -4005,7 +5616,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4029,12 +5640,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4033: checking for mode_t" >&5 +echo "configure:5644: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4062,12 +5673,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4066: checking for off_t" >&5 +echo "configure:5677: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4095,12 +5706,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4099: checking for pid_t" >&5 +echo "configure:5710: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4128,12 +5739,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4132: checking return type of signal handlers" >&5 +echo "configure:5743: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4150,7 +5761,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4169,12 +5780,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4173: checking for size_t" >&5 +echo "configure:5784: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4202,12 +5813,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4206: checking for uid_t in sys/types.h" >&5 +echo "configure:5817: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4236,12 +5847,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4240: checking for st_blksize in struct stat" >&5 +echo "configure:5851: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4249,7 +5860,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4270,12 +5881,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4274: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5885: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4284,7 +5895,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4305,12 +5916,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4309: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5920: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4318,7 +5929,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4339,13 +5950,58 @@ EOF fi + +echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6 +echo "configure:5956: checking if toupper() requires islower()" >&5 +if eval "test \"`echo '$''{'ol_cv_c_upper_lower'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + ol_cv_c_upper_lower=safe +else + cat > conftest.$ac_ext < +main() +{ + if ('C' == toupper('C')) + exit(0); + else + exit(1); +} +EOF +if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ol_cv_c_upper_lower=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ol_cv_c_upper_lower=yes +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ol_cv_c_upper_lower" 1>&6 +if test $ol_cv_c_upper_lower != no ; then + cat >> confdefs.h <<\EOF +#define C_UPPER_LOWER 1 +EOF + +fi + echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4344: checking for working const" >&5 +echo "configure:6000: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4415,8 +6071,9 @@ EOF fi + echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4420: checking for 8-bit clean memcmp" >&5 +echo "configure:6077: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4424,7 +6081,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4452,12 +6109,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:4456: checking for strftime" >&5 +echo "configure:6113: checking for strftime" >&5 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -4502,7 +6159,7 @@ else echo "$ac_t""no" 1>&6 # strftime is in -lintl on SCO UNIX. echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:4506: checking for strftime in -lintl" >&5 +echo "configure:6163: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4510,7 +6167,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4548,12 +6205,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:4552: checking for vprintf" >&5 +echo "configure:6209: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -4600,12 +6257,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:4604: checking for _doprnt" >&5 +echo "configure:6261: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -4652,8 +6309,67 @@ fi fi + +if test $ac_cv_func_vprintf = yes ; then + for ac_func in vsnprintf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6318: 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 < +/* 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:6346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 <&6 +fi +done + +fi + echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:4657: checking for wait3 that fills in rusage" >&5 +echo "configure:6373: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4661,7 +6377,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -4692,7 +6408,7 @@ main() { } } EOF -if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -4716,16 +6432,23 @@ fi for ac_func in \ + bcopy \ + getopt \ + flock \ gethostname \ gettimeofday \ getdtablesize \ + lockf \ memcpy \ + memmove \ + mkstemp \ mktime \ select \ setpwfile \ setsid \ signal \ sigset \ + snprintf \ socket \ strerror \ strstr \ @@ -4735,15 +6458,17 @@ for ac_func in \ strtol \ strtoul \ sysconf \ + tempnam \ + waitpid \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4742: checking for $ac_func" >&5 +echo "configure:6467: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4791,15 +6516,15 @@ fi done -for ac_func in strdup +for ac_func in getopt strdup tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4798: checking for $ac_func" >&5 +echo "configure:6523: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4852,13 +6577,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:4856: checking declaration of sys_errlist" >&5 +echo "configure:6581: 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 < @@ -4868,7 +6593,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -4889,20 +6614,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:4893: checking existence of sys_errlist" >&5 +echo "configure:6618: 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 < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -4920,72 +6645,110 @@ fi if test $ol_enable_debug != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" + cat >> confdefs.h <<\EOF +#define LDAP_DEBUG 1 +EOF + fi -if test $ol_enable_libui = no ; then - LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" +if test $ol_enable_libui = yes ; then + cat >> confdefs.h <<\EOF +#define LDAP_LIBUI 1 +EOF + fi if test $ol_enable_cache = no ; then - LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" + cat >> confdefs.h <<\EOF +#define LDAP_NOCACHE 1 +EOF + fi if test $ol_enable_dns != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS" + cat >> confdefs.h <<\EOF +#define LDAP_DNS 1 +EOF + +fi +if test $ol_enable_proctitle != no ; then + cat >> confdefs.h <<\EOF +#define LDAP_PROCTITLE 1 +EOF + fi if test $ol_enable_referrals != no ; then - LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS" + cat >> confdefs.h <<\EOF +#define LDAP_REFERRALS 1 +EOF + fi if test $ol_enable_cldap != no ; then - LDAP_DEFS="$LDAP_DEFS -DCLDAP" + cat >> confdefs.h <<\EOF +#define LDAP_CONNECTIONLESS 1 +EOF + fi -if test $ol_enable_aclgroup != no ; then +if test $ol_enable_aclgroups != no ; then cat >> confdefs.h <<\EOF -#define SLAPD_ACLGROUP 1 +#define SLAPD_ACLGROUPS 1 EOF - SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP" fi +if test $ol_enable_crypt != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_CRYPT 1 +EOF -if test $ol_enable_md5 != no ; then - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5" fi +if test $ol_enable_md5 != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_MD5 1 +EOF -if test $ol_enable_sha1 != no ; then - LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1" fi +if test $ol_enable_sha1 != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_SHA1 1 +EOF +fi if test $ol_enable_phonetic != no ; then cat >> confdefs.h <<\EOF #define SLAPD_PHONETIC 1 EOF - SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX" fi - if test $ol_enable_rlookups != no ; then cat >> confdefs.h <<\EOF #define SLAPD_RLOOKUPS 1 EOF - SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS" fi if test $ol_link_ldbm != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_LDBM 1 +EOF + BUILD_SLAPD=yes BUILD_LDBM=yes - LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS" fi if test $ol_enable_passwd != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_PASSWD 1 +EOF + BUILD_SLAPD=yes BUILD_PASSWD=yes - SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS" fi if test $ol_enable_shell != no ; then + cat >> confdefs.h <<\EOF +#define SLAPD_SHELL 1 +EOF + BUILD_SLAPD=yes BUILD_SHELL=yes - SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS" fi if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \ @@ -4993,6 +6756,10 @@ if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \ BUILD_SLURPD=yes fi +if test $ol_enable_ldapd != no ; then + BUILD_LDAPD=yes +fi + @@ -5010,10 +6777,6 @@ fi - - - - @@ -5185,8 +6948,6 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g s%@LN_S@%$LN_S%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -5195,8 +6956,8 @@ s%@SET_MAKE@%$SET_MAKE%g s%@SENDMAIL@%$SENDMAIL%g s%@EDITOR@%$EDITOR%g s%@FINGER@%$FINGER%g -s%@TERMCAP_DEFS@%$TERMCAP_DEFS%g -s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g s%@BUILD_LDAPD@%$BUILD_LDAPD%g s%@BUILD_SLAPD@%$BUILD_SLAPD%g @@ -5204,20 +6965,15 @@ s%@BUILD_LDBM@%$BUILD_LDBM%g s%@BUILD_PASSWD@%$BUILD_PASSWD%g s%@BUILD_SHELL@%$BUILD_SHELL%g s%@BUILD_SLURPD@%$BUILD_SLURPD%g -s%@LDAP_DEFS@%$LDAP_DEFS%g s%@LDAP_LIBS@%$LDAP_LIBS%g -s%@LDAPD_DEFS@%$LDAPD_DEFS%g s%@LDAPD_LIBS@%$LDAPD_LIBS%g -s%@SLAPD_DEFS@%$SLAPD_DEFS%g s%@SLAPD_LIBS@%$SLAPD_LIBS%g -s%@SLURPD_DEFS@%$SLURPD_DEFS%g s%@SLURPD_LIBS@%$SLURPD_LIBS%g -s%@LDBM_DEFS@%$LDBM_DEFS%g s%@LDBM_LIBS@%$LDBM_LIBS%g -s%@LTHREAD_DEFS@%$LTHREAD_DEFS%g s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g -s%@LUTIL_DEFS@%$LUTIL_DEFS%g s%@LUTIL_LIBS@%$LUTIL_LIBS%g +s%@KRB_LIBS@%$KRB_LIBS%g +s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g CEOF EOF @@ -5465,7 +7221,10 @@ cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + date > stamp-h +echo Please \"make depend\" to build dependencies + exit 0 EOF chmod +x $CONFIG_STATUS