From: Kurt Zeilenga Date: Wed, 23 Sep 1998 04:33:15 +0000 (+0000) Subject: Added acconfig.h defines. started to clean up -llber. X-Git-Tag: PHP3_TOOL_0_0~18^2~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=84864e55e15615fd56db509f3d41be75922d5c29;p=openldap Added acconfig.h defines. started to clean up -llber. --- diff --git a/INSTALL b/INSTALL index fa2c404b70..191693492b 100644 --- a/INSTALL +++ b/INSTALL @@ -20,7 +20,9 @@ these steps: 2. Type: % ./configure --help - to list available configuration options. + to list available configuration options. A description of + these options is provided in the 'CONFIGURE OPTIONS' section + below. The configure script will also use your environmental variables for determining compiler/linker options. @@ -31,6 +33,9 @@ these steps: CPPFLAGS CPP Flags (-I/path/include -Ddef) LDFLAGS LDFLAGS (-L/path/lib -llib) + A list of defines and other options are noted in the + 'DEFINES and FLAGS' comments below. + 3. edit the file include/ldapconfig.h.edit to configure the software for your site (the files are well-commented): @@ -101,4 +106,23 @@ Follow these steps for each different platform: Note: make depend in VPATH environment is not yet supported. + +CONFIGURE OPTIONS + +Regrettably, this section has not been written (yet). See +"./configure --help" for current list of options. + + +DEFINES and FLAGS + +The configure script will also use your environmental +variables for determining compiler/linker options. This can +be used to manual specify features and compilation options. + +Supported Environmental Variables + CC C Compiler (cc, ecgs) + CFLAGS C Flags (-ansi) + CPPFLAGS CPP Flags (-I/path/include -Ddef) + LDFLAGS LDFLAGS (-L/path/lib -llib) + End of OpenLDAP INSTALL file. diff --git a/acconfig.h b/acconfig.h index b34ceaf659..00babca70b 100644 --- a/acconfig.h +++ b/acconfig.h @@ -8,9 +8,48 @@ /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST -/* define this you have crypt */ +/* define if you have berkeley db */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have berkeley db2 */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have Mach CThreads */ +#undef HAVE_CTHREADS + +/* define if you have crypt */ #undef HAVE_CRYPT +/* define if you have DCE */ +#undef HAVE_DCE + +/* define if you have GDBM */ +#undef HAVE_GDBM + +/* define if you have Kerberos */ +#undef HAVE_KERBEROS + +/* define if you have LinuxThreads */ +#undef HAVE_LINUX_THREADS + +/* define if you have Sun LWP (SunOS style) */ +#undef HAVE_LWP + +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_LWP_THR + +/* define if you have NDBM */ +#undef HAVE_NDBM + +/* define if you have a preemptive POSIX Threads implementation */ +#undef HAVE_PREEMPTIVE_PTHREADS + +/* define if you have POSIX Threads */ +#undef HAVE_PTHREADS + +/* define if your POSIX Threads implementatin is circa Draft 4 */ +#undef HAVE_PTHREADS_D4 + /* define this for connectionless LDAP support */ #undef LDAP_CONNECTIONLESS diff --git a/aclocal.m4 b/aclocal.m4 index 3492f08721..1df969aa99 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -112,6 +112,9 @@ AC_DEFUN([OL_BERKELEY_DB2], ol_cv_berkeley_db2=yes fi ]) + if test $ol_cv_berkeley_db2 = yes ; then + AC_DEFINE(HAVE_BERKELEY_DB2) + fi ])dnl dnl dnl ==================================================================== @@ -175,6 +178,9 @@ AC_DEFUN([OL_BERKELEY_DB], ol_cv_berkeley_db=yes fi ]) + if test $ol_cv_berkeley_db = yes ; then + AC_DEFINE(HAVE_BERKELEY_DB) + fi ])dnl dnl dnl ==================================================================== @@ -217,6 +223,9 @@ AC_DEFUN([OL_GDBM], ol_cv_gdbm=yes fi ]) + if test $ol_cv_gdbm = yes ; then + AC_DEFINE(HAVE_GDBM) + fi ])dnl dnl dnl ==================================================================== @@ -270,6 +279,9 @@ AC_DEFUN([OL_NDBM], ol_cv_ndbm=yes fi ]) + if test $ol_cv_ndbm = yes ; then + AC_DEFINE(HAVE_NDBM) + fi ])dnl dnl dnl ==================================================================== diff --git a/configure b/configure index dd1ceb1df0..fd5b50eb5c 100755 --- a/configure +++ b/configure @@ -28,6 +28,8 @@ 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 @@ -585,7 +587,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:591: checking configure arguments" >&5 # OpenLDAP --enable-debug @@ -751,6 +753,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 @@ -1187,7 +1210,7 @@ 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:1191: checking for $ac_word" >&5 +echo "configure:1214: 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 @@ -1216,7 +1239,7 @@ 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:1220: checking for $ac_word" >&5 +echo "configure:1243: 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 @@ -1264,7 +1287,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1268: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1291: 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. @@ -1274,11 +1297,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1305: \"$ac_link\") 1>&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 @@ -1298,12 +1321,12 @@ 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:1302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1325: 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:1307: checking whether we are using GNU C" >&5 +echo "configure:1330: 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 @@ -1312,7 +1335,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1327,7 +1350,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1331: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1354: 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 @@ -1355,7 +1378,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1359: checking how to run the C preprocessor" >&5 +echo "configure:1382: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1370,13 +1393,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:1380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1387,13 +1410,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:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1417,13 +1440,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:1421: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1444: 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 @@ -1441,7 +1464,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1464,7 +1487,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1468: checking whether ln -s works" >&5 +echo "configure:1491: 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 @@ -1495,7 +1518,7 @@ fi # 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:1499: checking for a BSD compatible install" >&5 +echo "configure:1522: 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 @@ -1547,7 +1570,7 @@ 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:1551: checking for $ac_word" >&5 +echo "configure:1574: 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 @@ -1574,7 +1597,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1578: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1601: 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 @@ -1604,7 +1627,7 @@ 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:1608: checking for $ac_word" >&5 +echo "configure:1631: 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 @@ -1636,7 +1659,7 @@ 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:1640: checking for $ac_word" >&5 +echo "configure:1663: 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 @@ -1668,7 +1691,7 @@ 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:1672: checking for $ac_word" >&5 +echo "configure:1695: 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 @@ -1701,12 +1724,12 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:1705: checking for socket" >&5 +echo "configure:1728: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -1748,7 +1771,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1752: checking for main in -lsocket" >&5 +echo "configure:1775: 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 @@ -1756,14 +1779,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1790: \"$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 @@ -1791,7 +1814,7 @@ else fi echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6 -echo "configure:1795: checking for main in -lnet" >&5 +echo "configure:1818: 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 @@ -1799,14 +1822,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1833: \"$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 @@ -1834,7 +1857,7 @@ else fi echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 -echo "configure:1838: checking for main in -lnsl_s" >&5 +echo "configure:1861: 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 @@ -1842,14 +1865,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1876: \"$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 @@ -1877,7 +1900,7 @@ else fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1881: checking for main in -lnsl" >&5 +echo "configure:1904: 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 @@ -1885,14 +1908,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1919: \"$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 @@ -1920,7 +1943,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:1924: checking for socket in -linet" >&5 +echo "configure:1947: 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 @@ -1928,7 +1951,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1966: \"$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 @@ -1967,7 +1990,7 @@ else fi echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:1971: checking for main in -lgen" >&5 +echo "configure:1994: 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 @@ -1975,14 +1998,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2009: \"$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 @@ -2014,7 +2037,7 @@ fi echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6 -echo "configure:2018: checking for sigset in -lV3" >&5 +echo "configure:2041: 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 @@ -2022,7 +2045,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lV3 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2060: \"$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 @@ -2066,17 +2089,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2070: checking for $ac_hdr" >&5 +echo "configure:2093: 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:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2105,7 +2128,7 @@ 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:2109: checking for main in -lkrb4" >&5 +echo "configure:2132: 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 @@ -2113,14 +2136,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb4 -lkrb5 -ldes425 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2147: \"$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 @@ -2146,6 +2169,11 @@ fi ol_with_kerberos=found ol_link_kerberos=yes + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 +EOF + + KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb4 -lkrb5 -ldes425" fi @@ -2156,17 +2184,17 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2160: checking for $ac_hdr" >&5 +echo "configure:2188: 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:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2195,7 +2223,7 @@ done if test $ac_cv_header_krb_h = yes ; then echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:2199: checking for main in -lkrb" >&5 +echo "configure:2227: 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 @@ -2203,14 +2231,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2242: \"$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 @@ -2236,6 +2264,11 @@ fi ol_with_kerberos=found ol_link_kerberos=yes + cat >> confdefs.h <<\EOF +#define HAVE_KERBEROS 1 +EOF + + KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb -ldes" fi @@ -2249,17 +2282,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2253: checking for $ac_hdr" >&5 +echo "configure:2286: 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:2263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2288,13 +2321,13 @@ done if test $ac_cv_header_pthread_h = yes ; then echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6 -echo "configure:2292: checking POSIX thread version" >&5 +echo "configure:2325: 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 < @@ -2316,7 +2349,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -2353,6 +2386,10 @@ 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 + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS_D4 1 +EOF + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" else { echo "configure: error: unknown pthread version" 1>&2; exit 1; } @@ -2363,7 +2400,7 @@ echo "$ac_t""$ol_cv_pthread_version" 1>&6 echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:2367: checking for LinuxThreads" >&5 +echo "configure:2404: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2381,17 +2418,21 @@ echo "$ac_t""$ol_cv_linux_threads" 1>&6 if test $ol_cv_linux_threads = yes ; then - LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" + cat >> confdefs.h <<\EOF +#define HAVE_LINUX_THREADS 1 +EOF + + LTHREAD_DEFS="$LTHREAD_DEFS -DLINUX_THREADS" fi echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:2390: checking for pthread_create" >&5 +echo "configure:2431: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -2436,7 +2477,7 @@ fi if test $ol_link_threads = no ; then echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 -echo "configure:2440: checking for pthread_create with -pthread" >&5 +echo "configure:2481: 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 @@ -2444,7 +2485,7 @@ else save_LIBS="$LIBS" LIBS="-pthread $LIBS" cat > conftest.$ac_ext < int main() { @@ -2454,7 +2495,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_pthread_flag=yes else @@ -2479,7 +2520,7 @@ echo "$ac_t""$ol_cv_pthread_flag" 1>&6 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:2483: checking for pthread_create in -lpthread" >&5 +echo "configure:2524: 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 @@ -2487,7 +2528,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2543: \"$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,7 +2567,7 @@ 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:2530: checking for pthread_create in -lc_r" >&5 +echo "configure:2571: 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 @@ -2534,7 +2575,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2590: \"$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 @@ -2573,15 +2614,18 @@ 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:2577: checking for pthread_create in -lpthread" >&5 +echo "configure:2618: 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 ac_save_LIBS="$LIBS" -LIBS="-lpthread -lmach -lexc -lc $LIBS" +LIBS="-lpthread if test $with_preemptive = auto ; then + ol_with_preemptive=yes + fi + -lmach -lexc -lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2640: \"$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 @@ -2608,8 +2652,12 @@ fi 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_DEFS="$LTHREAD_DEFS -DDEC_THREADS" + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_DCE_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc" else echo "$ac_t""no" 1>&6 @@ -2619,18 +2667,25 @@ fi fi if test $ol_link_threads != no ; then + cat >> confdefs.h <<\EOF +#define HAVE_PTHREADS 1 +EOF + + + save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" + CPPFLAGS="$LTHREAD_DEFS $CPPFLAGS" 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:2629: checking for $ac_func" >&5 +echo "configure:2684: 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:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2685,19 +2740,15 @@ done { echo "configure: error: POSIX Threads are not usable" 1>&2; exit 1; } fi - for ac_func in pthread_kill \ - pthread_attr_init pthread_attr_create \ - pthread_attr_destroy pthread_attr_delete \ - pthread_attr_setdetachstate pthread_attr_setdetach_np \ - + for ac_func in pthread_kill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2696: checking for $ac_func" >&5 +echo "configure:2747: 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:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2745,6 +2796,82 @@ fi done + if test $ol_with_preemptive = auto ; then + echo $ac_n "checking for preemptive Pthread implementation""... $ac_c" 1>&6 +echo "configure:2802: 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 + cat > 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; + 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:2852: \"$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 -fr conftest* + ol_pthread_preemptive=no +fi +rm -fr conftest* +fi + + echo "$ac_t""$ol_pthread_preemptive" 1>&6 + + if test $ol_pthread_preemptive = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_PREEMPTIVE_PTHREADS 1 +EOF + + ol_with_preemptive=yes + fi + fi + + CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" else { echo "configure: error: could not link with POSIX Threads" 1>&2; exit 1; } @@ -2761,17 +2888,17 @@ if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2765: checking for $ac_hdr" >&5 +echo "configure:2892: 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:2775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2799,7 +2926,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for cthread_fork in -llwp""... $ac_c" 1>&6 -echo "configure:2803: checking for cthread_fork in -llwp" >&5 +echo "configure:2930: checking for cthread_fork in -llwp" >&5 ac_lib_var=`echo lwp'_'cthread_fork | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2807,7 +2934,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2949: \"$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 @@ -2841,6 +2968,10 @@ fi if test $have_cthreads = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CTHREADS 1 +EOF + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi @@ -2848,21 +2979,21 @@ fi fi if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then - for ac_hdr in lwp/lwp.h + 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:2856: checking for $ac_hdr" >&5 +echo "configure:2987: 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:2866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2890,7 +3021,7 @@ done if test $ac_cv_header_lwp_lwp_h = yes ; then echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:2894: checking for thr_create in -lthread" >&5 +echo "configure:3025: 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 @@ -2898,7 +3029,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3044: \"$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 @@ -2932,26 +3063,34 @@ fi if test $have_lwp = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_LWP 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_LWP_THR 1 +EOF + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi fi - for ac_hdr in thread.h synch.h + 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:2945: checking for $ac_hdr" >&5 +echo "configure:3084: 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:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2979,7 +3118,7 @@ done if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6 -echo "configure:2983: checking for lwp_create in -llwp" >&5 +echo "configure:3122: 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 @@ -2987,7 +3126,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llwp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3141: \"$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 @@ -3021,12 +3160,24 @@ fi if test $have_lwp = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_LWP 1 +EOF + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $with_preemptive = auto ; then + with_preemptive=yes + fi fi fi fi +if test $ol_with_preemptive = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_PREEMPTIVE" +fi + if test $ol_with_threads = manual ; then $ol_link_threads=yes @@ -3036,17 +3187,17 @@ if test $ol_with_threads = manual ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3040: checking for $ac_hdr" >&5 +echo "configure:3191: 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:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3075,12 +3226,12 @@ done for ac_func in sched_yield pthread_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3079: checking for $ac_func" >&5 +echo "configure:3230: 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:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3129,7 +3280,7 @@ done echo $ac_n "checking for LinuxThreads""... $ac_c" 1>&6 -echo "configure:3133: checking for LinuxThreads" >&5 +echo "configure:3284: checking for LinuxThreads" >&5 if eval "test \"`echo '$''{'ol_cv_linux_threads'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3145,6 +3296,127 @@ fi echo "$ac_t""$ol_cv_linux_threads" 1>&6 + + 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:3305: 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:3315: \"$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_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:3345: 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:3355: \"$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_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:3385: 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:3395: \"$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 + fi if test $ol_link_threads = no ; then @@ -3164,13 +3436,13 @@ 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:3168: checking for DB2 library" >&5 +echo "configure:3440: 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:3174: checking for db_open in -ldb" >&5 +echo "configure:3446: 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 @@ -3178,7 +3450,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:3465: \"$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 @@ -3220,17 +3492,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:3224: checking for $ac_hdr" >&5 +echo "configure:3496: 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:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3258,13 +3530,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:3262: checking if db.h is DB2" >&5 +echo "configure:3534: 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 < @@ -3296,7 +3568,7 @@ fi echo $ac_n "checking for Berkeley DB2""... $ac_c" 1>&6 -echo "configure:3300: checking for Berkeley DB2" >&5 +echo "configure:3572: 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 @@ -3310,6 +3582,12 @@ 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 @@ -3332,18 +3610,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:3336: checking for Berkeley DB library" >&5 +echo "configure:3614: 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:3342: checking for dbopen" >&5 +echo "configure:3620: 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:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbopen=yes" else @@ -3385,7 +3663,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6 -echo "configure:3389: checking for dbopen in -ldb" >&5 +echo "configure:3667: 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 @@ -3393,7 +3671,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:3686: \"$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 @@ -3439,17 +3717,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:3443: checking for $ac_hdr" >&5 +echo "configure:3721: 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:3453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3485,7 +3763,7 @@ fi echo $ac_n "checking for Berkeley DB""... $ac_c" 1>&6 -echo "configure:3489: checking for Berkeley DB" >&5 +echo "configure:3767: 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 @@ -3499,6 +3777,12 @@ 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 @@ -3530,17 +3814,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:3534: checking for $ac_hdr" >&5 +echo "configure:3818: 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:3544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3575,18 +3859,18 @@ 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:3579: checking for GDBM library" >&5 +echo "configure:3863: 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:3585: checking for gdbm_open" >&5 +echo "configure:3869: 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:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gdbm_open=yes" else @@ -3628,7 +3912,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:3632: checking for gdbm_open in -lgdbm" >&5 +echo "configure:3916: 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 @@ -3636,7 +3920,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:3935: \"$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 @@ -3682,17 +3966,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:3686: checking for $ac_hdr" >&5 +echo "configure:3970: 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:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3719,7 +4003,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3723: checking for db" >&5 +echo "configure:4007: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_gdbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3733,6 +4017,12 @@ 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 @@ -3749,18 +4039,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:3753: checking for NDBM library" >&5 +echo "configure:4043: 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:3759: checking for dbm_open" >&5 +echo "configure:4049: 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:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3802,7 +4092,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3806: checking for dbm_open in -lndbm" >&5 +echo "configure:4096: 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 @@ -3810,7 +4100,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:4115: \"$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 @@ -3841,7 +4131,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3845: checking for dbm_open in -ldbm" >&5 +echo "configure:4135: 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 @@ -3849,7 +4139,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:4154: \"$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 @@ -3897,17 +4187,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:3901: checking for $ac_hdr" >&5 +echo "configure:4191: 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:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3934,7 +4224,7 @@ fi done echo $ac_n "checking for db""... $ac_c" 1>&6 -echo "configure:3938: checking for db" >&5 +echo "configure:4228: checking for db" >&5 if eval "test \"`echo '$''{'ol_cv_ndbm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3948,6 +4238,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 @@ -3978,7 +4274,7 @@ fi if test $ol_enable_wrappers = yes ; then echo $ac_n "checking for hosts_access in -lwrap""... $ac_c" 1>&6 -echo "configure:3982: checking for hosts_access in -lwrap" >&5 +echo "configure:4278: 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 @@ -3986,7 +4282,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:4297: \"$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 @@ -4041,17 +4337,17 @@ 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:4045: checking for $ac_hdr" >&5 +echo "configure:4341: 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:4055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4080,7 +4376,7 @@ done if test $ol_link_termcap = no ; then echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6 -echo "configure:4084: checking for tputs in -ltermcap" >&5 +echo "configure:4380: 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 @@ -4088,7 +4384,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:4399: \"$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 @@ -4128,7 +4424,7 @@ fi if test $ol_link_termcap = no ; then echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:4132: checking for initscr in -lncurses" >&5 +echo "configure:4428: 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 @@ -4136,7 +4432,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:4447: \"$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 @@ -4182,12 +4478,12 @@ 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:4186: checking for crypt" >&5 +echo "configure:4482: 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:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4229,7 +4525,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4233: checking for crypt in -lcrypt" >&5 +echo "configure:4529: 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 @@ -4237,7 +4533,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:4548: \"$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 @@ -4287,12 +4583,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4291: checking for ANSI C header files" >&5 +echo "configure:4587: 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 @@ -4300,7 +4596,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4317,7 +4613,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 @@ -4335,7 +4631,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 @@ -4356,7 +4652,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4367,7 +4663,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -4395,12 +4691,12 @@ 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:4399: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4695: 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> @@ -4408,7 +4704,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4433,7 +4729,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:4437: checking for opendir in -ldir" >&5 +echo "configure:4733: 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 @@ -4441,7 +4737,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:4752: \"$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 @@ -4474,7 +4770,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4478: checking for opendir in -lx" >&5 +echo "configure:4774: 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 @@ -4482,7 +4778,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:4793: \"$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 @@ -4516,12 +4812,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4520: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4816: 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 @@ -4537,7 +4833,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4574,17 +4870,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4578: checking for $ac_hdr" >&5 +echo "configure:4874: 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:4588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -4612,12 +4908,12 @@ done echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4616: checking for uid_t in sys/types.h" >&5 +echo "configure:4912: 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 @@ -4646,7 +4942,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:4650: checking type of array argument to getgroups" >&5 +echo "configure:4946: 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 @@ -4654,7 +4950,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:4979: \"$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 @@ -4693,7 +4989,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4717,12 +5013,12 @@ EOF echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4721: checking for mode_t" >&5 +echo "configure:5017: 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 @@ -4750,12 +5046,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4754: checking for off_t" >&5 +echo "configure:5050: 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 @@ -4783,12 +5079,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4787: checking for pid_t" >&5 +echo "configure:5083: 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 @@ -4816,12 +5112,12 @@ EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4820: checking return type of signal handlers" >&5 +echo "configure:5116: 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 @@ -4838,7 +5134,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:4842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4857,12 +5153,12 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4861: checking for size_t" >&5 +echo "configure:5157: 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 @@ -4890,12 +5186,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4894: checking for uid_t in sys/types.h" >&5 +echo "configure:5190: 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 @@ -4924,12 +5220,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4928: checking for st_blksize in struct stat" >&5 +echo "configure:5224: 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 @@ -4937,7 +5233,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4958,12 +5254,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4962: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5258: 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 @@ -4972,7 +5268,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4993,12 +5289,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4997: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5293: 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 @@ -5006,7 +5302,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5028,12 +5324,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5032: checking for working const" >&5 +echo "configure:5328: 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:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5104,7 +5400,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:5108: checking for 8-bit clean memcmp" >&5 +echo "configure:5404: 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 @@ -5112,7 +5408,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:5422: \"$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 @@ -5140,12 +5436,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:5144: checking for strftime" >&5 +echo "configure:5440: 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:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -5190,7 +5486,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:5194: checking for strftime in -lintl" >&5 +echo "configure:5490: 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 @@ -5198,7 +5494,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:5509: \"$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 @@ -5236,12 +5532,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:5240: checking for vprintf" >&5 +echo "configure:5536: 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:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -5288,12 +5584,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:5292: checking for _doprnt" >&5 +echo "configure:5588: 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:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -5341,7 +5637,7 @@ fi fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:5345: checking for wait3 that fills in rusage" >&5 +echo "configure:5641: 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 @@ -5349,7 +5645,7 @@ else ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -5380,7 +5676,7 @@ main() { } } EOF -if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5680: \"$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 @@ -5428,12 +5724,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5432: checking for $ac_func" >&5 +echo "configure:5728: 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:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5484,12 +5780,12 @@ done for ac_func in strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5488: checking for $ac_func" >&5 +echo "configure:5784: 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:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5542,13 +5838,13 @@ done # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:5546: checking declaration of sys_errlist" >&5 +echo "configure:5842: 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 < @@ -5558,7 +5854,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:5562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes else @@ -5579,20 +5875,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:5583: checking existence of sys_errlist" >&5 +echo "configure:5879: 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:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ol_cv_have_sys_errlist=yes else @@ -5612,8 +5908,8 @@ fi if test $ol_enable_debug != no ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" fi -if test $ol_enable_libui = no ; then - LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" +if test $ol_enable_libui = yes ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_LIBUI" fi if test $ol_enable_cache = no ; then LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" diff --git a/configure.in b/configure.in index 91d9b746aa..dc50682c2d 100644 --- a/configure.in +++ b/configure.in @@ -35,6 +35,8 @@ OL_ARG_WITH(kerberos,[ --with-kerberos use Kerberos], auto, [auto k5 k4 afs yes no]) OL_ARG_WITH(threads,[ --with-threads use threads], auto, [auto posix mach lwp yes no manual] ) +OL_ARG_WITH(preemptive,[ --with-preemptive thread implementation is preemptive], + auto, [auto yes no manual] ) dnl Server options @@ -241,6 +243,8 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then ol_with_kerberos=found ol_link_kerberos=yes + AC_DEFINE(HAVE_KERBEROS) + KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb4 -lkrb5 -ldes425" fi @@ -256,6 +260,8 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then ol_with_kerberos=found ol_link_kerberos=yes + AC_DEFINE(HAVE_KERBEROS) + KRB_DEFS="-DKERBEROS" KRB_LIBS="-lkrb -ldes" fi @@ -273,6 +279,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then if test $ol_cv_pthread_version = final ; then LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS" elif test $ol_cv_pthread_version = draft4 ; then + AC_DEFINE(HAVE_PTHREADS_D4) LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS" else AC_MSG_ERROR([unknown pthread version]) @@ -284,8 +291,8 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then OL_LINUX_THREADS if test $ol_cv_linux_threads = yes ; then -dnl AC_DEFINE(HAVE_LINUX_THREADS,1) - LTHREAD_DEFS="$LTHREAD_DEFS -DHAVE_LINUX_THREADS" + AC_DEFINE(HAVE_LINUX_THREADS,1) + LTHREAD_DEFS="$LTHREAD_DEFS -DLINUX_THREADS" fi dnl Now the hard part, how to link @@ -336,15 +343,24 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) dnl try DEC Threads save_LIBS="$LIBS" AC_CHECK_LIB(pthread, pthread_create, [ + AC_DEFINE(HAVE_DCE) ol_link_threads=posix - LTHREAD_DEFS="$LTHREAD_DEFS -DDEC_THREADS" + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_DCE_THREADS" LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],, + if test $with_preemptive = auto ; then + ol_with_preemptive=yes + fi [-lmach -lexc -lc]) LIBS="$save_LIBS" fi if test $ol_link_threads != no ; then + AC_DEFINE(HAVE_PTHREADS) + + dnl save DEFS/LIBS + save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" + CPPFLAGS="$LTHREAD_DEFS $CPPFLAGS" LIBS="$LTHREAD_LIBS $LIBS" dnl All POSIX Thread (final) implementations should have @@ -360,12 +376,68 @@ dnl AC_DEFINE(HAVE_LINUX_THREADS,1) fi dnl Check functions for compatibility - AC_CHECK_FUNCS(pthread_kill \ - pthread_attr_init pthread_attr_create \ - pthread_attr_destroy pthread_attr_delete \ - pthread_attr_setdetachstate pthread_attr_setdetach_np \ - ) + AC_CHECK_FUNCS(pthread_kill) +dnl AC_CHECK_FUNCS( +dnl pthread_attr_create pthread_attr_init \ +dnl pthread_attr_destroy pthread_attr_delete \ +dnl pthread_attr_setdetachstate pthread_attr_setdetach_np \ +dnl ) + + dnl Check PREEMPTIVE Implementation + if test $ol_with_preemptive = auto ; then + AC_MSG_CHECKING([for preemptive Pthread implementation]) + AC_TRY_RUN([ +#include +#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; + 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); +} + ], [ol_pthread_preemptive=yes], [ol_pthread_preemptive=no], [ + AC_MSG_ERROR([crossing compiling: use --with-preemptive=yes|no|manual])]) + AC_MSG_RESULT($ol_pthread_preemptive) + + if test $ol_pthread_preemptive = yes ; then + AC_DEFINE(HAVE_PREEMPTIVE_PTHREADS) + ol_with_preemptive=yes + fi + fi + dnl restore DEFS/LIBS + CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" else AC_MSG_ERROR([could not link with POSIX Threads]) @@ -384,6 +456,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then AC_CHECK_LIB(lwp, cthread_fork, [have_cthreads=yes], [have_cthreads=no]) if test $have_cthreads = yes ; then + AC_DEFINE(HAVE_CTHREADS) LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi @@ -392,28 +465,39 @@ fi if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then dnl check for SunOS5 LWP - AC_CHECK_HEADERS(lwp/lwp.h) + AC_CHECK_HEADERS(thread.h synch.h) if test $ac_cv_header_lwp_lwp_h = yes ; then AC_CHECK_LIB(thread, thr_create, [have_lwp=yes], [have_lwp=no]) if test $have_lwp = yes ; then + AC_DEFINE(HAVE_LWP) + AC_DEFINE(HAVE_LWP_THR) LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" fi fi dnl check for SunOS4 LWP - AC_CHECK_HEADERS(thread.h synch.h) + AC_CHECK_HEADERS(lwp/lwp.h) if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then AC_CHECK_LIB(lwp, lwp_create, [have_lwp=yes], [have_lwp=no]) if test $have_lwp = yes ; then + AC_DEFINE(HAVE_LWP) LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP" LTHREAD_LIBS="$LTHREAD_LIBS -llwp" + + if test $with_preemptive = auto ; then + with_preemptive=yes + fi fi fi fi +if test $ol_with_preemptive = yes ; then + LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_PREEMPTIVE" +fi + if test $ol_with_threads = manual ; then dnl User thinks he can manually configure threads. $ol_link_threads=yes @@ -423,6 +507,10 @@ if test $ol_with_threads = manual ; then AC_CHECK_HEADERS(pthread.h sched.h) AC_CHECK_FUNCS(sched_yield pthread_yield) OL_LINUX_THREADS + + AC_CHECK_HEADERS(mach/cthreads.h) + AC_CHECK_HEADERS(lwp/lwp.h) + AC_CHECK_HEADERS(thread.h synch.h) fi if test $ol_link_threads = no ; then @@ -551,7 +639,6 @@ if test $ol_enable_wrappers = yes ; then [have_wrappers=yes], [have_wrappers=no]) if test $have_wrappers = yes ; then -dnl LIBTCPD="-lwrap" dnl AC_DEFINE(HAVE_TCPD) SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS" SLAPD_LIBS="$SLAPD_LIBS -lwrap" @@ -575,6 +662,7 @@ AC_CHECK_HEADERS(termcap.h ncurses.h) if test $ol_link_termcap = no ; then AC_CHECK_LIB(termcap, tputs, [have_termcap=yes], [have_termcap=no]) if test $have_termcap = yes ; then +dnl AC_DEFINE(HAVE_TERMCAP) ol_link_termcap=yes TERMCAP_LIBS=-ltermcap fi @@ -583,6 +671,7 @@ fi if test $ol_link_termcap = no ; then AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no]) if test $have_ncurses = yes ; then +dnl AC_DEFINE(HAVE_NCURSES) ol_link_termcap=yes TERMCAP_LIBS=-lncurses fi @@ -600,7 +689,7 @@ if test $ol_enable_crypt != no ; then have_crypt=yes], [have_crypt=no])]) if test $have_crypt = yes ; then -dnl AC_DEFINE(SLAPD_CRYPT,1) +dnl AC_DEFINE(HAVE_CRYPT) LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT" else AC_MSG_WARN(could not find crypt) @@ -695,8 +784,8 @@ fi dnl if test $ol_enable_syslog != no ; then dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG" dnl fi -if test $ol_enable_libui = no ; then - LDAP_DEFS="$LDAP_DEFS -DNO_USERINTERFACE" +if test $ol_enable_libui = yes ; then + LDAP_DEFS="$LDAP_DEFS -DLDAP_LIBUI" fi if test $ol_enable_cache = no ; then LDAP_DEFS="$LDAP_DEFS -DNO_CACHE" diff --git a/include/bridge.h b/include/bridge.h index 7adf1cf62d..0476ba9d16 100644 --- a/include/bridge.h +++ b/include/bridge.h @@ -23,6 +23,11 @@ * edit this file. */ +#ifndef LDAP_LIBUI +#ifndef NO_USERINTERFACE +#define NO_USERINTERFACE +#endif +#endif #ifndef SYSV #if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 ) diff --git a/include/portable.h.bot b/include/portable.h.bot index 5e8cb58859..4a45b92795 100644 --- a/include/portable.h.bot +++ b/include/portable.h.bot @@ -4,5 +4,6 @@ #endif #include "bridge.h" +#include "ldap_cdefs.h" #endif /* _LDAP_PORTABLE_H */ diff --git a/include/portable.h.in b/include/portable.h.in index 20edd07584..534d0bb867 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -73,6 +73,45 @@ /* define this if sys_errlist is not defined in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST +/* define if you have berkeley db */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have berkeley db2 */ +#undef HAVE_BERKELEY_DB2 + +/* define if you have Mach CThreads */ +#undef HAVE_CTHREADS + +/* define if you have DCE */ +#undef HAVE_DCE + +/* define if you have GDBM */ +#undef HAVE_GDBM + +/* define if you have Kerberos */ +#undef HAVE_KERBEROS + +/* define if you have LinuxThreads */ +#undef HAVE_LINUX_THREADS + +/* define if you have Sun LWP (SunOS style) */ +#undef HAVE_LWP + +/* define if you have Sun LWP (Solaris style) */ +#undef HAVE_LWP_THR + +/* define if you have NDBM */ +#undef HAVE_NDBM + +/* define if you have a preemptive POSIX Threads implementation */ +#undef HAVE_PREEMPTIVE_PTHREADS + +/* define if you have POSIX Threads */ +#undef HAVE_PTHREADS + +/* define if your POSIX Threads implementatin is circa Draft 4 */ +#undef HAVE_PTHREADS_D4 + /* define this for ACL Group support */ #undef SLAPD_ACLGROUPS @@ -103,24 +142,6 @@ /* Define if you have the mktime function. */ #undef HAVE_MKTIME -/* Define if you have the pthread_attr_create function. */ -#undef HAVE_PTHREAD_ATTR_CREATE - -/* Define if you have the pthread_attr_delete function. */ -#undef HAVE_PTHREAD_ATTR_DELETE - -/* Define if you have the pthread_attr_destroy function. */ -#undef HAVE_PTHREAD_ATTR_DESTROY - -/* Define if you have the pthread_attr_init function. */ -#undef HAVE_PTHREAD_ATTR_INIT - -/* Define if you have the pthread_attr_setdetach_np function. */ -#undef HAVE_PTHREAD_ATTR_SETDETACH_NP - -/* Define if you have the pthread_attr_setdetachstate function. */ -#undef HAVE_PTHREAD_ATTR_SETDETACHSTATE - /* Define if you have the pthread_kill function. */ #undef HAVE_PTHREAD_KILL diff --git a/libraries/liblber/bprint.c b/libraries/liblber/bprint.c index e4b6fd27ea..78af185d2b 100644 --- a/libraries/liblber/bprint.c +++ b/libraries/liblber/bprint.c @@ -1,20 +1,26 @@ + +#define LDAP_BRIDGE /* disable LDAP_BRIDGE code */ +#include "portable.h" + +#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI ) #include -#include +#include #include +#endif /* LDAP_DEBUG && LDAP_LIBUI */ + #include "lber.h" /* * Print arbitrary stuff, for debugging. */ -#ifdef LDAP_DEBUG - -#ifndef NO_USERINTERFACE -#define BPLEN 48 void lber_bprint( char *data, int len ) { +#if defined( LDAP_DEBUG ) && defined( LDAP_LIBUI ) +#define BPLEN 48 + static char hexdig[] = "0123456789abcdef"; char out[ BPLEN ]; int i = 0; @@ -49,12 +55,7 @@ lber_bprint( char *data, int len ) } out[ i++ ] = ' '; } + +#endif /* LDAP_DEBUG && LDAP_LIBUI */ } -#else /* NO_USERINTERFACE */ -void -lber_bprint( char *data, int len ) -{ -} -#endif /* NO_USERINTERFACE */ -#endif diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index a722c9eb7a..d16ca53756 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -11,17 +11,22 @@ * is provided ``as is'' without express or implied warranty. */ +#define LDAP_BRIDGE /* disable LDAP_BRIDGE code */ +#include "portable.h" + #include + #ifdef MACOS #include #include #include "macos.h" #else /* MACOS */ -#if defined(NeXT) || defined(VMS) + +#if defined(NeXT) || defined(VMS) || defined(__FreeBSD__) #include -#else /* next || vms */ +#else /* next || vms || freebsd */ #include -#endif /* next || vms */ +#endif /* next || vms || freebsd */ #if defined(BC31) || defined(_WIN32) #include #else /* BC31 || _WIN32 */ @@ -40,16 +45,14 @@ #endif /* DOS */ #include + #include "lber.h" #ifdef LDAP_DEBUG int lber_debug; #endif -#ifdef NEEDPROTOS -static int ber_getnint( BerElement *ber, long *num, int len ); -#endif /* NEEDPROTOS */ - +static int ber_getnint LDAP_P(( BerElement *ber, long *num, int len )); /* return the tag - LBER_DEFAULT returned means trouble */ unsigned long @@ -155,6 +158,7 @@ ber_getnint( BerElement *ber, long *num, int len ) { int diff, sign, i; long netnum; + char *p; /* * The tag and length have already been stripped off. We should @@ -172,11 +176,12 @@ ber_getnint( BerElement *ber, long *num, int len ) if ( ber_read( ber, ((char *) &netnum) + diff, len ) != len ) return( -1 ); - /* sign extend if necessary */ - sign = ((0x80 << ((len - 1) * 8)) & netnum); - if ( sign && len < sizeof(long) ) { - for ( i = sizeof(long) - 1; i > len - 1; i-- ) { - netnum |= (0xffL << (i * 8)); + /* sign extend if necessary */ + p = (char *) &netnum; + sign = (0x80 & *(p+diff) ); + if ( sign && len < sizeof(long) ) { + for ( i = 0; i < diff; i++ ) { + *(p+i) = 0xff; } } *num = LBER_NTOHL( netnum ); diff --git a/libraries/liblber/dtest.c b/libraries/liblber/dtest.c index cd63b9f89a..62b7ae363d 100644 --- a/libraries/liblber/dtest.c +++ b/libraries/liblber/dtest.c @@ -11,8 +11,11 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include +#include + #ifdef MACOS #include #include