diff --git a/configure b/configure index b95c0b470e2..c8f66cb25d8 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.71 +# From configure.in Revision: 1.72 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 @@ -1829,7 +1829,7 @@ then DYNIX/ptx*) LDSHARED="ld -G";; next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';; Linux*) LDSHARED="gcc -shared";; - FreeBSD*) LDSHARED="ld -Bshareable";; + FreeBSD*|NetBSD*) LDSHARED="ld -Bshareable";; SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; *) LDSHARED="ld";; esac @@ -1847,7 +1847,7 @@ then else CCSHARED="+z"; fi;; Linux*) CCSHARED="-fpic";; - FreeBSD*) CCSHARED="-fpic";; + FreeBSD*|NetBSD*) CCSHARED="-fpic";; SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; IRIX*/6*) CCSHARED="-all";; esac @@ -2348,8 +2348,56 @@ LIBOBJS="$LIBOBJS thread.o" else echo "$ac_t""no" 1>&6 +echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 +echo "configure:2353: checking for pthread_create in -lc_r" >&5 +ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc_r $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_THREAD 1 +EOF + +cat >> confdefs.h <<\EOF +#define _POSIX_THREADS 1 +EOF + +LIBS="$LIBS -lc_r" +LIBOBJS="$LIBOBJS thread.o" +else + echo "$ac_t""no" 1>&6 + echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 -echo "configure:2353: checking for __d6_pthread_create in -lthread" >&5 +echo "configure:2401: 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 @@ -2357,7 +2405,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:2420: \"$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 @@ -2404,9 +2452,11 @@ fi fi +fi + echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 -echo "configure:2410: checking for usconfig in -lmpc" >&5 +echo "configure:2460: 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 @@ -2414,7 +2464,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:2479: \"$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 @@ -2451,7 +2501,7 @@ else fi echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:2455: checking for thr_create in -lthread" >&5 +echo "configure:2505: 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 @@ -2459,7 +2509,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:2524: \"$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 @@ -2506,7 +2556,7 @@ fi DLINCLDIR=/ echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 -echo "configure:2510: checking for --with-sgi-dl" >&5 +echo "configure:2560: 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" @@ -2529,7 +2579,7 @@ fi echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 -echo "configure:2533: checking for --with-dl-dld" >&5 +echo "configure:2583: 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" @@ -2561,12 +2611,12 @@ for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \ tcgetpgrp tcsetpgrp times truncate uname waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2565: checking for $ac_func" >&5 +echo "configure:2615: 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:2643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2616,12 +2666,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:2620: checking for $ac_func" >&5 +echo "configure:2670: 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:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2671,12 +2721,12 @@ done echo $ac_n "checking for getpgrp""... $ac_c" 1>&6 -echo "configure:2675: checking for getpgrp" >&5 +echo "configure:2725: 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:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getpgrp=yes" else @@ -2714,14 +2764,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:2725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define GETPGRP_HAVE_ARG 1 @@ -2737,12 +2787,12 @@ else fi echo $ac_n "checking for setpgrp""... $ac_c" 1>&6 -echo "configure:2741: checking for setpgrp" >&5 +echo "configure:2791: 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:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_setpgrp=yes" else @@ -2780,14 +2830,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:2791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SETPGRP_HAVE_ARG 1 @@ -2803,12 +2853,12 @@ else fi echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 -echo "configure:2807: checking for gettimeofday" >&5 +echo "configure:2857: 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:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gettimeofday=yes" else @@ -2846,14 +2896,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:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -2872,12 +2922,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:2876: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2926: 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 @@ -2886,7 +2936,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2907,12 +2957,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2911: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2961: 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 @@ -2920,7 +2970,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2941,12 +2991,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:2945: checking for tm_zone in struct tm" >&5 +echo "configure:2995: 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> @@ -2954,7 +3004,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:2958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -2974,12 +3024,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:2978: checking for tzname" >&5 +echo "configure:3028: 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. */ @@ -2989,7 +3039,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:2993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3012,19 +3062,19 @@ fi echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 -echo "configure:3016: checking for time.h that defines altzone" >&5 +echo "configure:3066: 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:3028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time_altzone=yes else @@ -3046,9 +3096,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:3050: checking whether sys/select.h and sys/time.h may both be included" >&5 +echo "configure:3100: checking whether sys/select.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < @@ -3059,7 +3109,7 @@ int main() { ; ; return 0; } EOF -if { (eval echo configure:3063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define SYS_SELECT_WITH_SYS_TIME 1 @@ -3075,14 +3125,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:3079: checking whether char is unsigned" >&5 +echo "configure:3129: 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:3168: \"$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 @@ -3139,12 +3189,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3143: checking for working const" >&5 +echo "configure:3193: 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:3247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3216,16 +3266,16 @@ fi works=no echo $ac_n "checking for working volatile""... $ac_c" 1>&6 -echo "configure:3220: checking for working volatile" >&5 +echo "configure:3270: checking for working volatile" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* works=yes else @@ -3242,16 +3292,16 @@ echo "$ac_t""$works" 1>&6 works=no echo $ac_n "checking for working signed char""... $ac_c" 1>&6 -echo "configure:3246: checking for working signed char" >&5 +echo "configure:3296: checking for working signed char" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* works=yes else @@ -3268,16 +3318,16 @@ echo "$ac_t""$works" 1>&6 have_prototypes=no echo $ac_n "checking for prototypes""... $ac_c" 1>&6 -echo "configure:3272: checking for prototypes" >&5 +echo "configure:3322: checking for prototypes" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_PROTOTYPES 1 @@ -3292,9 +3342,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:3296: checking for variable length prototypes and stdarg.h" >&5 +echo "configure:3346: checking for variable length prototypes and stdarg.h" >&5 cat > conftest.$ac_ext < @@ -3311,7 +3361,7 @@ int main() { return foo(10, "", 3.14); ; return 0; } EOF -if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STDARG_PROTOTYPES 1 @@ -3327,16 +3377,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:3331: checking for bad exec* prototypes" >&5 +echo "configure:3381: checking for bad exec* prototypes" >&5 cat > conftest.$ac_ext < int main() { char **t;execve("@",t,t); ; return 0; } EOF -if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -3353,12 +3403,12 @@ fi bad_forward=no echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 -echo "configure:3357: checking for bad static forward" >&5 +echo "configure:3407: 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:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -3393,9 +3443,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:3397: checking whether va_list is an array" >&5 +echo "configure:3447: checking whether va_list is an array" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -3427,7 +3477,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:3431: checking for __fpu_control in -lieee" >&5 +echo "configure:3481: 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 @@ -3435,7 +3485,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:3500: \"$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 @@ -3476,7 +3526,7 @@ fi # Check for --with-fpectl echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 -echo "configure:3480: checking for --with-fpectl" >&5 +echo "configure:3530: checking for --with-fpectl" >&5 # Check whether --with-fpectl or --without-fpectl was given. if test "${with_fpectl+set}" = set; then withval="$with_fpectl" @@ -3498,7 +3548,7 @@ next) ;; *) LIBM=-lm esac echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 -echo "configure:3502: checking for --with-libm=STRING" >&5 +echo "configure:3552: 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" @@ -3519,7 +3569,7 @@ fi # check for --with-libc=... echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 -echo "configure:3523: checking for --with-libc=STRING" >&5 +echo "configure:3573: 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" @@ -3543,12 +3593,12 @@ LIBS="$LIBS $LIBM" for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3547: checking for $ac_func" >&5 +echo "configure:3597: 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:3625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3598,12 +3648,12 @@ done for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3602: checking for $ac_func" >&5 +echo "configure:3652: 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:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3656,7 +3706,7 @@ LIBS=$LIBS_SAVE # check for getopt echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6 -echo "configure:3660: checking for genuine getopt" >&5 +echo "configure:3710: 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 @@ -3664,7 +3714,7 @@ else ac_cv_func_getopt=no else cat > conftest.$ac_ext < extern int optind, opterr, getopt(); @@ -3676,7 +3726,7 @@ int main() { exit(0); } EOF -if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_getopt=yes else @@ -3694,7 +3744,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:3698: checking what malloc(0) returns" >&5 +echo "configure:3748: 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 @@ -3702,7 +3752,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 @@ -3721,7 +3771,7 @@ main() { exit(0); } EOF -if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3775: \"$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 09e3a65f8ce..c7bd2760685 100644 --- a/configure.in +++ b/configure.in @@ -279,7 +279,7 @@ then DYNIX/ptx*) LDSHARED="ld -G";; next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';; Linux*) LDSHARED="gcc -shared";; - FreeBSD*) LDSHARED="ld -Bshareable";; + FreeBSD*|NetBSD*) LDSHARED="ld -Bshareable";; SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; *) LDSHARED="ld";; esac @@ -296,7 +296,7 @@ then else CCSHARED="+z"; fi;; Linux*) CCSHARED="-fpic";; - FreeBSD*) CCSHARED="-fpic";; + FreeBSD*|NetBSD*) CCSHARED="-fpic";; SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; IRIX*/6*) CCSHARED="-all";; esac @@ -385,11 +385,15 @@ AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) LIBS="$LIBS -lpthread" LIBOBJS="$LIBOBJS thread.o"], [ +AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD) +AC_DEFINE(_POSIX_THREADS) +LIBS="$LIBS -lc_r" +LIBOBJS="$LIBOBJS thread.o"], [ AC_CHECK_LIB(thread, __d6_pthread_create, [AC_DEFINE(WITH_THREAD) AC_DEFINE(_POSIX_THREADS) LIBS="$LIBS -lthread" LIBOBJS="$LIBOBJS thread.o"]) -])])]) +])])])]) AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) LIBS="$LIBS -lmpc"