$NetBSD: patch-ab,v 1.14 2002/10/14 11:49:55 skrll Exp $ --- configure.orig Sun Jan 27 12:29:59 2002 +++ configure @@ -139,6 +139,8 @@ ac_help="$ac_help ac_help="$ac_help --enable-shared build shared libraries (default=yes)" ac_help="$ac_help + --with-fdsetsize=NUM set FD_SETSIZE" +ac_help="$ac_help --with-mctx-mth=ID force mctx method (mcsc,sjlj)" ac_help="$ac_help --with-mctx-dsp=ID force mctx dispatching (sc,ssjlj,sjlj,usjlj,sjlje,...)" @@ -177,7 +179,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -292,7 +293,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -463,11 +463,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -633,16 +628,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -1888,9 +1879,74 @@ EOF +echo $ac_n "checking for value of FD_SETSIZE""... $ac_c" 1>&6 +echo "configure:1884: checking for value of FD_SETSIZE" >&5 +cross_compile=no +if test "$cross_compiling" = yes; then + ac_fdsetsize=1024 + +else + cat > conftest.$ac_ext < +#include + +int main(int argc, char *argv[]) +{ + FILE *fp; + int ac_fdsetsize; + +#if defined(FD_SETSIZE) + ac_fdsetsize = FD_SETSIZE; +#else + ac_fdsetsize = (sizeof(fd_set)*8); +#endif + if ((fp = fopen("conftestval", "w")) == NULL) + exit(1); + fprintf(fp, "%d\n", ac_fdsetsize); + fclose(fp); + exit(0); +} + + +EOF +if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_fdsetsize=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_fdsetsize=1024 +fi +rm -fr conftest* +fi +echo "$ac_t""$ac_fdsetsize" 1>&6 +PTH_FDSETSIZE="$ac_fdsetsize" + + + +# Check whether --with-fdsetsize or --without-fdsetsize was given. +if test "${with_fdsetsize+set}" = set; then + withval="$with_fdsetsize" + +case $withval in + [1-9][0-9]) PTH_FDSETSIZE=$withval ;; + [0-9][0-9][0-9]) PTH_FDSETSIZE=$withval ;; + [0-9][0-9][0-9][0-9]) PTH_FDSETSIZE=$withval ;; + * ) { echo "configure: error: invalid FD_SETSIZE specified -- allowed: 10-9999" 1>&2; exit 1; } ;; +esac +CPPFLAGS="$CPPFLAGS -DFD_SETSIZE=$PTH_FDSETSIZE"; +echo "$ac_t""Overriding FD_SETSIZE with $PTH_FDSETSIZE" 1>&6; + +fi + + for ac_func in poll; do echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6 -echo "configure:1894: checking for function $ac_func" >&5 +echo "configure:1950: checking for function $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2223,7 +2279,7 @@ fi done -for ac_hdr in sys/resource.h net/errno.h paths.h +for ac_hdr in net/errno.h paths.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -2454,8 +2510,54 @@ if test ".$ac_cv_header_sys_select_h" != fi +for ac_hdr in sys/resource.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2518: 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:2528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +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 + +EXTRA_INCLUDE_SYS_RESOURCE_H="#include " +if test ".$ac_cv_header_sys_resource_h" != .yes; then + EXTRA_INCLUDE_SYS_RESOURCE_H="/* $EXTRA_INCLUDE_SYS_RESOURCE_H */" +fi + + echo $ac_n "checking for typedef sig_atomic_t""... $ac_c" 1>&6 -echo "configure:2459: checking for typedef sig_atomic_t" >&5 +echo "configure:2561: checking for typedef sig_atomic_t" >&5 if eval "test \"`echo '$''{'ac_cv_typedef_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5153,6 +5255,7 @@ fi + PTH_EXT_SFIO=0 # Check whether --with-sfio or --without-sfio was given. if test "${with_sfio+set}" = set; then @@ -5708,9 +5811,11 @@ s%@CPP@%$CPP%g s%@SET_MAKE@%$SET_MAKE%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g +s%@PTH_FDSETSIZE@%$PTH_FDSETSIZE%g s%@PTH_FAKE_POLL@%$PTH_FAKE_POLL%g s%@PTH_FAKE_RWV@%$PTH_FAKE_RWV%g s%@EXTRA_INCLUDE_SYS_SELECT_H@%$EXTRA_INCLUDE_SYS_SELECT_H%g +s%@EXTRA_INCLUDE_SYS_RESOURCE_H@%$EXTRA_INCLUDE_SYS_RESOURCE_H%g s%@FALLBACK_SIG_ATOMIC_T@%$FALLBACK_SIG_ATOMIC_T%g s%@FALLBACK_PID_T@%$FALLBACK_PID_T%g s%@FALLBACK_SIZE_T@%$FALLBACK_SIZE_T%g @@ -5736,6 +5841,7 @@ s%@TARGET_ALL@%$TARGET_ALL%g s%@PTHREAD_O@%$PTHREAD_O%g s%@LIBPTHREAD_A@%$LIBPTHREAD_A%g s%@LIBPTHREAD_LA@%$LIBPTHREAD_LA%g +s%@LIBTOOL@%$LIBTOOL%g s%@PTHREAD_CONFIG_1@%$PTHREAD_CONFIG_1%g s%@PTHREAD_3@%$PTHREAD_3%g s%@INSTALL_PTHREAD@%$INSTALL_PTHREAD%g