diff --git a/Python/importdl.c b/Python/importdl.c index 7493e580065..073e23f4001 100644 --- a/Python/importdl.c +++ b/Python/importdl.c @@ -260,7 +260,7 @@ typedef void (*dl_funcptr)(); extern char *Py_GetProgramName(); #ifndef FUNCNAME_PATTERN -#if defined(__hp9000s300) || defined(__NetBSD__) || defined(__FreeBSD__) && !defined(__ELF__) || defined(__OpenBSD__) || defined(__BORLANDC__) +#if defined(__hp9000s300) || (defined(__NetBSD__) || defined(__FreeBSD__)) && !defined(__ELF__) || defined(__OpenBSD__) || defined(__BORLANDC__) #define FUNCNAME_PATTERN "_init%.200s" #else #define FUNCNAME_PATTERN "init%.200s" diff --git a/configure b/configure index 660f473df13..de743d92972 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.93 +# From configure.in Revision: 1.94 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 @@ -2035,7 +2035,14 @@ then Linux*) LDSHARED="gcc -shared";; dgux*) LDSHARED="ld -G";; FreeBSD*/3*) LDSHARED="gcc -shared";; - FreeBSD*|NetBSD*|OpenBSD*) LDSHARED="ld -Bshareable";; + FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";; + NetBSD*) + if [ "`$CC -dM -E - &6 # CCSHARED are the C *flags* used to create objects to go into a shared # library -- this is only needed for a few systems echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 -echo "configure:2048: checking CCSHARED" >&5 +echo "configure:2055: checking CCSHARED" >&5 if test -z "$CCSHARED" then case $ac_sys_system/$ac_sys_release in @@ -2053,7 +2060,8 @@ then else CCSHARED="+z"; fi;; Linux*) CCSHARED="-fpic";; - FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fpic";; + FreeBSD*|OpenBSD*) CCSHARED="-fpic";; + NetBSD*) CCSHARED="-fPIC";; SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; @@ -2065,7 +2073,7 @@ echo "$ac_t""$CCSHARED" 1>&6 # LINKFORSHARED are the flags passed to the $(CC) command that links # the python executable -- this is only needed for a few systems echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 -echo "configure:2069: checking LINKFORSHARED" >&5 +echo "configure:2077: checking LINKFORSHARED" >&5 if test -z "$LINKFORSHARED" then case $ac_sys_system/$ac_sys_release in @@ -2076,6 +2084,11 @@ then Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; next/*) LINKFORSHARED="-u libsys_s";; SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; + NetBSD*) + if [ "`$CC -dM -E - /dev/null | grep BFD >/dev/null @@ -2089,7 +2102,7 @@ echo "$ac_t""$LINKFORSHARED" 1>&6 # checks for libraries echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:2093: checking for dlopen in -ldl" >&5 +echo "configure:2106: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2097,7 +2110,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2125: \"$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 @@ -2136,7 +2149,7 @@ else fi # Dynamic linking for SunOS/Solaris and SYSV echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2140: checking for shl_load in -ldld" >&5 +echo "configure:2153: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2144,7 +2157,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2172: \"$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 @@ -2183,7 +2196,7 @@ else fi # Dynamic linking for HP-UX echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6 -echo "configure:2187: checking for pow in -lm" >&5 +echo "configure:2200: checking for pow in -lm" >&5 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2191,7 +2204,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2219: \"$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,7 +2249,7 @@ case "$ac_sys_system" in IRIX*) ;; *) echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 -echo "configure:2240: checking for t_open in -lnsl" >&5 +echo "configure:2253: checking for t_open in -lnsl" >&5 ac_lib_var=`echo nsl'_'t_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 @@ -2244,7 +2257,7 @@ 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:2272: \"$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 @@ -2276,7 +2289,7 @@ else fi # SVR4 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2280: checking for socket in -lsocket" >&5 +echo "configure:2293: 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 @@ -2284,7 +2297,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2312: \"$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 @@ -2316,7 +2329,7 @@ else fi # SVR4 sockets echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 -echo "configure:2320: checking for socket in -lnet" >&5 +echo "configure:2333: checking for socket in -lnet" >&5 ac_lib_var=`echo net'_'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 @@ -2324,7 +2337,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnet $LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2352: \"$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 @@ -2359,7 +2372,7 @@ fi esac echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 -echo "configure:2363: checking for --with-libs" >&5 +echo "configure:2376: checking for --with-libs" >&5 # Check whether --with-libs or --without-libs was given. if test "${with_libs+set}" = set; then withval="$with_libs" @@ -2373,7 +2386,7 @@ fi echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6 -echo "configure:2377: checking for --with(out)-readline" >&5 +echo "configure:2390: checking for --with(out)-readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -2388,7 +2401,7 @@ fi USE_THREAD_MODULE="#" echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 -echo "configure:2392: checking for --with-dec-threads" >&5 +echo "configure:2405: checking for --with-dec-threads" >&5 # Check whether --with-dec-threads or --without-dec-threads was given. if test "${with_dec_threads+set}" = set; then @@ -2404,7 +2417,7 @@ fi echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 -echo "configure:2408: checking for --with-threads" >&5 +echo "configure:2421: checking for --with-threads" >&5 # Check whether --with-threads or --without-threads was given. if test "${with_threads+set}" = set; then withval="$with_threads" @@ -2418,7 +2431,7 @@ fi echo $ac_n "checking for --with-thread""... $ac_c" 1>&6 -echo "configure:2422: checking for --with-thread" >&5 +echo "configure:2435: checking for --with-thread" >&5 # Check whether --with-thread or --without-thread was given. if test "${with_thread+set}" = set; then withval="$with_thread" @@ -2434,17 +2447,17 @@ EOF ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 -echo "configure:2438: checking for mach/cthreads.h" >&5 +echo "configure:2451: checking for mach/cthreads.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:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2473,12 +2486,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 -echo "configure:2477: checking for pthread_detach" >&5 +echo "configure:2490: checking for pthread_detach" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+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:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_detach=yes" else @@ -2529,17 +2542,17 @@ else ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 -echo "configure:2533: checking for kernel/OS.h" >&5 +echo "configure:2546: checking for kernel/OS.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:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2568,7 +2581,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:2572: checking for pthread_create in -lpthreads" >&5 +echo "configure:2585: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'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 @@ -2576,7 +2589,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2604: \"$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 @@ -2616,7 +2629,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2620: checking for pthread_create in -lpthread" >&5 +echo "configure:2633: 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 @@ -2624,7 +2637,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:2652: \"$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 @@ -2664,7 +2677,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2668: checking for pthread_create in -lc_r" >&5 +echo "configure:2681: 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 @@ -2672,7 +2685,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:2700: \"$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 @@ -2712,7 +2725,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 -echo "configure:2716: checking for __d6_pthread_create in -lthread" >&5 +echo "configure:2729: checking for __d6_pthread_create in -lthread" >&5 ac_lib_var=`echo thread'_'__d6_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 @@ -2720,7 +2733,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:2748: \"$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 @@ -2760,7 +2773,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 -echo "configure:2764: checking for pthread_create in -lcma" >&5 +echo "configure:2777: checking for pthread_create in -lcma" >&5 ac_lib_var=`echo cma'_'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 @@ -2768,7 +2781,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcma $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2796: \"$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 @@ -2825,7 +2838,7 @@ fi echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 -echo "configure:2829: checking for usconfig in -lmpc" >&5 +echo "configure:2842: checking for usconfig in -lmpc" >&5 ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2833,7 +2846,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2861: \"$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 @@ -2870,7 +2883,7 @@ else fi echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:2874: checking for thr_create in -lthread" >&5 +echo "configure:2887: 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 @@ -2878,7 +2891,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:2906: \"$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 @@ -2925,7 +2938,7 @@ fi DLINCLDIR=/ echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 -echo "configure:2929: checking for --with-sgi-dl" >&5 +echo "configure:2942: checking for --with-sgi-dl" >&5 # Check whether --with-sgi-dl or --without-sgi-dl was given. if test "${with_sgi_dl+set}" = set; then withval="$with_sgi_dl" @@ -2948,7 +2961,7 @@ fi echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 -echo "configure:2952: checking for --with-dl-dld" >&5 +echo "configure:2965: checking for --with-dl-dld" >&5 # Check whether --with-dl-dld or --without-dl-dld was given. if test "${with_dl_dld+set}" = set; then withval="$with_dl_dld" @@ -2972,7 +2985,8 @@ fi # checks for library functions -for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \ +for ac_func in alarm chown clock dlopen execv flock fork \ + fsync fdatasync ftime ftruncate \ gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \ kill link lstat mkfifo mktime nice pause plock pthread_init putenv readlink \ select setgid setlocale setuid setsid setpgid setpgrp setvbuf \ @@ -2980,12 +2994,12 @@ for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \ tcgetpgrp tcsetpgrp timegm times truncate uname waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2984: checking for $ac_func" >&5 +echo "configure:2998: 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:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3037,12 +3051,12 @@ done for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3041: checking for $ac_func" >&5 +echo "configure:3055: 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:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3093,12 +3107,12 @@ done for ac_func in dup2 getcwd strdup strerror memmove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3097: checking for $ac_func" >&5 +echo "configure:3111: 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:3139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3148,12 +3162,12 @@ done echo $ac_n "checking for getpgrp""... $ac_c" 1>&6 -echo "configure:3152: checking for getpgrp" >&5 +echo "configure:3166: checking for getpgrp" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+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:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getpgrp=yes" else @@ -3191,14 +3205,14 @@ fi if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then echo "$ac_t""yes" 1>&6 cat > conftest.$ac_ext < int main() { getpgrp(0); ; return 0; } EOF -if { (eval echo configure:3202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define GETPGRP_HAVE_ARG 1 @@ -3214,12 +3228,12 @@ else fi echo $ac_n "checking for setpgrp""... $ac_c" 1>&6 -echo "configure:3218: checking for setpgrp" >&5 +echo "configure:3232: checking for setpgrp" >&5 if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+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:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_setpgrp=yes" else @@ -3257,14 +3271,14 @@ fi if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then echo "$ac_t""yes" 1>&6 cat > conftest.$ac_ext < int main() { setpgrp(0,0); ; return 0; } EOF -if { (eval echo configure:3268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SETPGRP_HAVE_ARG 1 @@ -3280,12 +3294,12 @@ else fi echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 -echo "configure:3284: checking for gettimeofday" >&5 +echo "configure:3298: checking for gettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+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:3326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gettimeofday=yes" else @@ -3323,14 +3337,14 @@ fi if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then echo "$ac_t""yes" 1>&6 cat > conftest.$ac_ext < int main() { gettimeofday((struct timeval*)0,(struct timezone*)0); ; return 0; } EOF -if { (eval echo configure:3334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -3349,12 +3363,12 @@ fi # checks for structures echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3353: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3367: 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 @@ -3363,7 +3377,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3384,12 +3398,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3388: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3402: 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 @@ -3397,7 +3411,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3418,12 +3432,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3422: checking for tm_zone in struct tm" >&5 +echo "configure:3436: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -3431,7 +3445,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3451,12 +3465,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3455: checking for tzname" >&5 +echo "configure:3469: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -3466,7 +3480,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3489,19 +3503,19 @@ fi echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 -echo "configure:3493: checking for time.h that defines altzone" >&5 +echo "configure:3507: checking for time.h that defines altzone" >&5 if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return altzone; ; return 0; } EOF -if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time_altzone=yes else @@ -3523,9 +3537,9 @@ fi was_it_defined=no echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3527: checking whether sys/select.h and sys/time.h may both be included" >&5 +echo "configure:3541: checking whether sys/select.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < @@ -3536,7 +3550,7 @@ int main() { ; ; return 0; } EOF -if { (eval echo configure:3540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SYS_SELECT_WITH_SYS_TIME 1 @@ -3552,14 +3566,14 @@ echo "$ac_t""$was_it_defined" 1>&6 # checks for compiler characteristics echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3556: checking whether char is unsigned" >&5 +echo "configure:3570: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3616,12 +3630,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3620: checking for working const" >&5 +echo "configure:3634: 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:3688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3693,16 +3707,16 @@ fi works=no echo $ac_n "checking for working volatile""... $ac_c" 1>&6 -echo "configure:3697: checking for working volatile" >&5 +echo "configure:3711: checking for working volatile" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* works=yes else @@ -3719,16 +3733,16 @@ echo "$ac_t""$works" 1>&6 works=no echo $ac_n "checking for working signed char""... $ac_c" 1>&6 -echo "configure:3723: checking for working signed char" >&5 +echo "configure:3737: checking for working signed char" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* works=yes else @@ -3745,16 +3759,16 @@ echo "$ac_t""$works" 1>&6 have_prototypes=no echo $ac_n "checking for prototypes""... $ac_c" 1>&6 -echo "configure:3749: checking for prototypes" >&5 +echo "configure:3763: checking for prototypes" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_PROTOTYPES 1 @@ -3769,9 +3783,9 @@ echo "$ac_t""$have_prototypes" 1>&6 works=no echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 -echo "configure:3773: checking for variable length prototypes and stdarg.h" >&5 +echo "configure:3787: checking for variable length prototypes and stdarg.h" >&5 cat > conftest.$ac_ext < @@ -3788,7 +3802,7 @@ int main() { return foo(10, "", 3.14); ; return 0; } EOF -if { (eval echo configure:3792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STDARG_PROTOTYPES 1 @@ -3804,16 +3818,16 @@ echo "$ac_t""$works" 1>&6 if test "$have_prototypes" = yes; then bad_prototypes=no echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 -echo "configure:3808: checking for bad exec* prototypes" >&5 +echo "configure:3822: checking for bad exec* prototypes" >&5 cat > conftest.$ac_ext < int main() { char **t;execve("@",t,t); ; return 0; } EOF -if { (eval echo configure:3817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -3830,12 +3844,12 @@ fi bad_forward=no echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 -echo "configure:3834: checking for bad static forward" >&5 +echo "configure:3848: checking for bad static forward" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3870,9 +3884,9 @@ echo "$ac_t""$bad_forward" 1>&6 va_list_is_array=no echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 -echo "configure:3874: checking whether va_list is an array" >&5 +echo "configure:3888: checking whether va_list is an array" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -3904,7 +3918,7 @@ echo "$ac_t""$va_list_is_array" 1>&6 # Linux requires this for correct f.p. operations echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 -echo "configure:3908: checking for __fpu_control in -lieee" >&5 +echo "configure:3922: checking for __fpu_control in -lieee" >&5 ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3912,7 +3926,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3941: \"$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 @@ -3953,7 +3967,7 @@ fi # Check for --with-fpectl echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 -echo "configure:3957: checking for --with-fpectl" >&5 +echo "configure:3971: checking for --with-fpectl" >&5 # Check whether --with-fpectl or --without-fpectl was given. if test "${with_fpectl+set}" = set; then withval="$with_fpectl" @@ -3976,7 +3990,7 @@ BeOS) ;; *) LIBM=-lm esac echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 -echo "configure:3980: checking for --with-libm=STRING" >&5 +echo "configure:3994: checking for --with-libm=STRING" >&5 # Check whether --with-libm or --without-libm was given. if test "${with_libm+set}" = set; then withval="$with_libm" @@ -3997,7 +4011,7 @@ fi # check for --with-libc=... echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 -echo "configure:4001: checking for --with-libc=STRING" >&5 +echo "configure:4015: checking for --with-libc=STRING" >&5 # Check whether --with-libc or --without-libc was given. if test "${with_libc+set}" = set; then withval="$with_libc" @@ -4021,12 +4035,12 @@ LIBS="$LIBS $LIBM" for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4025: checking for $ac_func" >&5 +echo "configure:4039: 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:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4076,12 +4090,12 @@ done for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4080: checking for $ac_func" >&5 +echo "configure:4094: 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:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4134,7 +4148,7 @@ LIBS=$LIBS_SAVE # check for getopt echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6 -echo "configure:4138: checking for genuine getopt" >&5 +echo "configure:4152: checking for genuine getopt" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4142,7 +4156,7 @@ else ac_cv_func_getopt=no else cat > conftest.$ac_ext < extern int optind, opterr, getopt(); @@ -4154,7 +4168,7 @@ int main() { exit(0); } EOF -if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_getopt=yes else @@ -4172,7 +4186,7 @@ test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o" # check whether malloc(0) returns NULL or not echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 -echo "configure:4176: checking what malloc(0) returns" >&5 +echo "configure:4190: checking what malloc(0) returns" >&5 if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4180,7 +4194,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #ifdef HAVE_STDLIB @@ -4199,7 +4213,7 @@ main() { exit(0); } EOF -if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_malloc_zero=nonnull else diff --git a/configure.in b/configure.in index d73c11b7ec0..0ff6717a4e3 100644 --- a/configure.in +++ b/configure.in @@ -359,7 +359,14 @@ then Linux*) LDSHARED="gcc -shared";; dgux*) LDSHARED="ld -G";; FreeBSD*/3*) LDSHARED="gcc -shared";; - FreeBSD*|NetBSD*|OpenBSD*) LDSHARED="ld -Bshareable";; + FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";; + NetBSD*) + if [[ "`$CC -dM -E - /dev/null | grep BFD >/dev/null @@ -537,7 +550,8 @@ DLINCLDIR=${dldir} LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no)) # checks for library functions -AC_CHECK_FUNCS(alarm chown clock dlopen execv flock fork ftime ftruncate \ +AC_CHECK_FUNCS(alarm chown clock dlopen execv flock fork \ + fsync fdatasync ftime ftruncate \ gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \ kill link lstat mkfifo mktime nice pause plock pthread_init putenv readlink \ select setgid setlocale setuid setsid setpgid setpgrp setvbuf \