--- configure.orig Wed Feb 17 04:14:07 1999 +++ configure Wed Feb 17 21:11:29 1999 @@ -3758,7 +3758,7 @@ # Check for some functions -for ac_func in lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp poll +for ac_func in lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3765: checking for $ac_func" >&5 @@ -5302,11 +5302,13 @@ G_THREAD_CFLAGS="$G_THREAD_CFLAGS -mthreads" fi ;; - *-freebsd2.2*) - G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE" - - # FreeBSD 2.2.x shiped with gcc 2.7.2.x, which doesn't support - # -mthreads flag. + *-*-freebsd2.2* | *-*-freebsd3* | *-*-freebsd4*) + if test x"$G_THREAD_LIBS" = x"-lc_r"; then + G_THREAD_CFLAGS="-D_THREAD_SAFE -pthread" + have_poll=no + else + G_THREAD_CFLAGS="-D_THREAD_SAFE" + fi ;; esac @@ -5315,7 +5317,7 @@ old_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" cat > conftest.$ac_ext < EOF @@ -5332,7 +5334,7 @@ CPPFLAGS=$old_CPPFLAGS echo $ac_n "checking necessary compiler options""... $ac_c" 1>&6 -echo "configure:5336: checking necessary compiler options" >&5 +echo "configure:5338: checking necessary compiler options" >&5 echo "$ac_t""$G_THREAD_CFLAGS" 1>&6 else @@ -5350,12 +5352,12 @@ for ac_func in localtime_r rand_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5354: checking for $ac_func" >&5 +echo "configure:5356: 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${ac_exeext}; then +if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5404,7 +5406,7 @@ if test "$ac_cv_header_pwd_h" = "yes"; then echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6 -echo "configure:5408: checking for getpwuid_r" >&5 +echo "configure:5410: checking for getpwuid_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpwuid_r'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5412,7 +5414,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main () { char buffer[10000], *pointer; @@ -5423,7 +5425,7 @@ sizeof (buffer), &pointer); return errno == ENOSYS;} EOF -if { (eval echo configure:5427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_getpwuid_r=yes else @@ -5448,20 +5450,20 @@ fi if test "$ac_cv_func_getpwuid_r" = "yes"; then echo $ac_n "checking whether getpwuid_r is posix like""... $ac_c" 1>&6 -echo "configure:5452: checking whether getpwuid_r is posix like" >&5 +echo "configure:5454: checking whether getpwuid_r is posix like" >&5 # getpwuid_r(0, NULL, NULL, 0) is the signature on # solaris, if that is not found, the prog below won't # compile, then the posix signature is assumed as # the default. cat > conftest.$ac_ext < int main() { getpwuid_r(0, NULL, NULL, 0); ; return 0; } EOF -if { (eval echo configure:5465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -5479,17 +5481,17 @@ fi if test x"$have_threads" = xposix; then echo $ac_n "checking whether pthread_getspecific is posix like""... $ac_c" 1>&6 -echo "configure:5483: checking whether pthread_getspecific is posix like" >&5 +echo "configure:5485: checking whether pthread_getspecific is posix like" >&5 # PCThreads has pthread_getspecific(pthread_key_t, void **); cat > conftest.$ac_ext < int main() { pthread_getspecific(0,NULL); ; return 0; } EOF -if { (eval echo configure:5493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -5530,7 +5532,7 @@ case "$mutex_has_default" in "yes") echo $ac_n "checking size of $mutex_default_type""... $ac_c" 1>&6 -echo "configure:5534: checking size of $mutex_default_type" >&5 +echo "configure:5536: checking size of $mutex_default_type" >&5 if eval "test \"`echo '$''{'glib_cv_sizeof_gmutex'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5538,7 +5540,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #include <$mutex_header_file> @@ -5550,7 +5552,7 @@ exit(0); } EOF -if { (eval echo configure:5554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then glib_cv_sizeof_gmutex=`cat conftestval` else @@ -5570,7 +5572,7 @@ echo $ac_n "checking byte contents of $mutex_default_type""... $ac_c" 1>&6 -echo "configure:5574: checking byte contents of $mutex_default_type" >&5 +echo "configure:5576: checking byte contents of $mutex_default_type" >&5 if eval "test \"`echo '$''{'glib_cv_byte_contents_gmutex'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5578,7 +5580,7 @@ glib_cv_byte_contents_gmutex=0 else cat > conftest.$ac_ext < #include <$mutex_header_file> @@ -5595,7 +5597,7 @@ exit(0); } EOF -if { (eval echo configure:5599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then glib_cv_byte_contents_gmutex=`cat conftestval` else @@ -5623,6 +5625,63 @@ +if test x"$have_poll" != xno; then + for ac_func in poll +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5633: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:5661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +fi glib_sysdefso="glibconfig-sysdefs.h" glib_sysdef_msg=`echo POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32 | sed 's/:[^ ]*//g'` if test "x`(echo '\n') 2>/dev/null`" != 'x\n'; then @@ -5631,7 +5690,7 @@ glib_nl='\n' fi echo $ac_n "checking system definitions for $glib_sysdef_msg""... $ac_c" 1>&6 -echo "configure:5635: checking system definitions for $glib_sysdef_msg" >&5 +echo "configure:5694: checking system definitions for $glib_sysdef_msg" >&5 cat >confrun.c <<_______EOF #include #include @@ -5658,11 +5717,11 @@ { 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${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""done" 1>&6 else