From da88f0cb9f7de2cd87aa22e847a0e3be309e66bf Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 11 Jul 1997 05:41:08 +0000 Subject: [PATCH] Changes to compile under gnu-win32, from Marcus Daniels: * configure.in: When sys/un.h exists, define HAVE_UNIX_DOMAIN_SOCKETS to indicate that Unix domain sockets will work. Check for socketpair, getgroups, setwent, pause, and tzset (cygwin currently lacks these them). Check for sethostent endhostent getnetent setnetent endnetent getprotoent endprotoent getservent endservent getnetbyaddr getnetbyname inet_lnaof inet_makeaddr inet_netof (cygwin currently lacks them). In the case of cygwin, temporarily prefix these functions with "cygwin32_", the way that netdb.h does. Don't define HAVE_REGCOMP unless both regcomp and regex.h are available (cygwin b18 came distributed without a working regex.h file). * acconfig.h (HAVE_UNIX_DOMAIN_SOCKETS): Add this. * configure: Regenerated. --- acconfig.h | 3 + configure | 349 +++++++++++++++++++++++++++++++++++++-------------- configure.in | 29 ++++- 3 files changed, 284 insertions(+), 97 deletions(-) diff --git a/acconfig.h b/acconfig.h index e7f263c14..cfde7b0ea 100644 --- a/acconfig.h +++ b/acconfig.h @@ -71,3 +71,6 @@ /* Define if the operating system can restart system calls. */ #undef HAVE_RESTARTS + +/* Define if the system supports Unix-domain (file-domain) sockets. */ +#undef HAVE_UNIX_DOMAIN_SOCKETS diff --git a/configure b/configure index f4e436143..aa4dfeaa4 100755 --- a/configure +++ b/configure @@ -1695,7 +1695,7 @@ EOF fi -for ac_hdr in libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h +for ac_hdr in libc.h limits.h malloc.h memory.h string.h regex.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -2518,52 +2518,56 @@ fi done -echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6 -echo "configure:2523: checking for restartable system calls" >&5 -if eval "test \"`echo '$''{'scm_cv_restarts'+set}'`\" = set"; then + +ac_safe=`echo "sys/un.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for sys/un.h""... $ac_c" 1>&6 +echo "configure:2525: checking for sys/un.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test $ac_cv_func_sigaction = yes; then - cat > conftest.$ac_ext < conftest.$ac_ext < -int main() { -int a = SA_RESTART -; return 0; } +#include EOF -if { (eval echo configure:2536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then rm -rf conftest* - scm_cv_restarts=yes + 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* - scm_cv_restarts=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* - else - scm_cv_restarts=no - fi +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + have_sys_un_h=1 +else + echo "$ac_t""no" 1>&6 fi -echo "$ac_t""$scm_cv_restarts" 1>&6 -if test $scm_cv_restarts = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_RESTARTS 1 +if test -n "$have_sys_un_h" ; then +cat >> confdefs.h <<\EOF +#define HAVE_UNIX_DOMAIN_SOCKETS 1 EOF fi -for ac_func in regcomp +for ac_func in socketpair getgroups setpwent pause tzset do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2562: checking for $ac_func" >&5 +echo "configure:2566: 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:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 + + +cp confdefs.h confdefs.h.bak +for func in sethostent endhostent getnetent setnetent endnetent getprotoent endprotoent getservent endservent getnetbyaddr getnetbyname inet_lnaof inet_makeaddr inet_netof ; do +cp confdefs.h.bak confdefs.h +cat >> confdefs.h << EOF +#ifdef __CYGWIN32__ +#define $func cygwin32_$func +#endif +EOF +echo $ac_n "checking for $func""... $ac_c" 1>&6 +echo "configure:2628: checking for $func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$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 $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_$func) || defined (__stub___$func) +choke me +#else +$func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + +done +cp confdefs.h.bak confdefs.h + + +echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6 +echo "configure:2680: checking for restartable system calls" >&5 +if eval "test \"`echo '$''{'scm_cv_restarts'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test $ac_cv_func_sigaction = yes; then + cat > conftest.$ac_ext < +int main() { +int a = SA_RESTART +; return 0; } +EOF +if { (eval echo configure:2693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_restarts=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + scm_cv_restarts=no +fi +rm -f conftest* + else + scm_cv_restarts=no + fi +fi + +echo "$ac_t""$scm_cv_restarts" 1>&6 +if test $scm_cv_restarts = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_RESTARTS 1 +EOF + +fi + +if test "$ac_cv_header_regex_h" = yes; then + for ac_func in regcomp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2720: 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:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2610,16 +2768,17 @@ else fi done +fi for ac_func in inet_aton putenv strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2618: checking for $ac_func" >&5 +echo "configure:2777: 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:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2675,19 +2834,19 @@ done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2679: checking for working alloca.h" >&5 +echo "configure:2838: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2708,12 +2867,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2712: checking for alloca" >&5 +echo "configure:2871: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+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:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2768,12 +2927,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2772: checking whether alloca needs Cray hooks" >&5 +echo "configure:2931: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2802: checking for $ac_func" >&5 +echo "configure:2961: 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:2989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2853,7 +3012,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2857: checking stack direction for C alloca" >&5 +echo "configure:3016: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2861,7 +3020,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2904,12 +3063,12 @@ fi if test "$ALLOCA" = "alloca.o"; then LIBOBJS="alloca.o $LIBOBJS"; fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:2908: checking for st_rdev in struct stat" >&5 +echo "configure:3067: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2917,7 +3076,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:2921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -2938,12 +3097,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2942: checking for st_blksize in struct stat" >&5 +echo "configure:3101: 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 @@ -2951,7 +3110,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:2955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -2975,12 +3134,12 @@ fi # We could use AC_STRUCT_ST_BLOCKS here, but that adds fileblocks.o to # LIBOBJS, which we don't need. This seems more direct. echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:2979: checking for st_blocks in struct stat" >&5 +echo "configure:3138: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2988,7 +3147,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -3009,12 +3168,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3013: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3172: 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 @@ -3022,7 +3181,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3043,12 +3202,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3047: checking for tm_zone in struct tm" >&5 +echo "configure:3206: 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> @@ -3056,7 +3215,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3076,12 +3235,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3080: checking for tzname" >&5 +echo "configure:3239: 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. */ @@ -3091,7 +3250,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3114,12 +3273,12 @@ fi echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6 -echo "configure:3118: checking whether we need POSIX to get struct utimbuf" >&5 +echo "configure:3277: checking whether we need POSIX to get struct utimbuf" >&5 if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -3164,13 +3323,13 @@ if test "$cross_compiling" = yes; then echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2 else cat > conftest.$ac_ext <= ((unsigned long)&x)); } main () { int q; aux((unsigned long)&q); } EOF -if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then cat >> confdefs.h <<\EOF #define SCM_STACK_GROWS_UP 1 @@ -3193,11 +3352,11 @@ EOF echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then cat >> confdefs.h <<\EOF #define SCM_SINGLES 1 @@ -3212,12 +3371,12 @@ fi echo $ac_n "checking for struct linger""... $ac_c" 1>&6 -echo "configure:3216: checking for struct linger" >&5 +echo "configure:3375: checking for struct linger" >&5 if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3226,7 +3385,7 @@ int main() { struct linger lgr; lgr.l_linger = 100 ; return 0; } EOF -if { (eval echo configure:3230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_struct_linger="yes" else @@ -3253,19 +3412,19 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking how to set a stream file descriptor""... $ac_c" 1>&6 -echo "configure:3257: checking how to set a stream file descriptor" >&5 +echo "configure:3416: checking how to set a stream file descriptor" >&5 if eval "test \"`echo '$''{'scm_cv_fd_setter'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { stdout->_file = 1 ; return 0; } EOF -if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_fd_setter="_file" else @@ -3273,14 +3432,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < int main() { stdout->_fileno = 1 ; return 0; } EOF -if { (eval echo configure:3284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_fd_setter="_fileno" else @@ -3318,19 +3477,19 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6 -echo "configure:3322: checking how to get buffer char count from FILE structure" >&5 +echo "configure:3481: checking how to get buffer char count from FILE structure" >&5 if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->_cnt = 0 ; return 0; } EOF -if { (eval echo configure:3334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_struct_file_count="_cnt" else @@ -3338,14 +3497,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->_r = 0 ; return 0; } EOF -if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_struct_file_count="_r" else @@ -3353,14 +3512,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->readCount = 0 ; return 0; } EOF -if { (eval echo configure:3364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_struct_file_count="readCount" else @@ -3387,14 +3546,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->_gptr = f->egptr; ; return 0; } EOF -if { (eval echo configure:3398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_struct_file_gptr=1 else @@ -3417,14 +3576,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end; ; return 0; } EOF -if { (eval echo configure:3428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_struct_file_readptr=1 else @@ -3454,7 +3613,7 @@ fi echo $ac_n "checking "threads package type"""... $ac_c" 1>&6 -echo "configure:3458: checking "threads package type"" >&5 +echo "configure:3617: checking "threads package type"" >&5 if eval "test \"`echo '$''{'cy_cv_threads_package'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3513,7 +3672,7 @@ if test "$use_threads" != no; then LDFLAGS="-L$use_threads/lib" LIBS="-lgthreads -lmalloc" cat > conftest.$ac_ext < int main() { @@ -3522,7 +3681,7 @@ pthread_equal(NULL,NULL); ; return 0; } EOF -if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* threads_package=FSU else @@ -3534,7 +3693,7 @@ rm -f conftest* if test "$threads_package" = unknown; then LIBS="-lpthread" cat > conftest.$ac_ext < int main() { @@ -3543,7 +3702,7 @@ pthread_equal(NULL,NULL); ; return 0; } EOF -if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* threads_package=MIT else @@ -3555,7 +3714,7 @@ rm -f conftest* if test "$threads_package" = unknown; then LIBS="-lpthreads" cat > conftest.$ac_ext < int main() { @@ -3564,7 +3723,7 @@ pthread_equal(NULL,NULL); ; return 0; } EOF -if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* threads_package=PCthreads else @@ -3644,7 +3803,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3648: checking for $ac_word" >&5 +echo "configure:3807: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3703,7 +3862,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:3707: checking host system type" >&5 +echo "configure:3866: checking host system type" >&5 host_alias=$host case "$host_alias" in diff --git a/configure.in b/configure.in index 53ae0a6be..546dc35c4 100644 --- a/configure.in +++ b/configure.in @@ -45,7 +45,7 @@ AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_TIME AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h) +AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h regex.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h) GUILE_HEADER_LIBC_WITH_UNISTD AC_TYPE_GETGROUPS @@ -87,6 +87,29 @@ fi AC_CHECK_FUNCS(ctermid ftime getcwd geteuid gethostent gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid) +dnl + +AC_CHECK_HEADER(sys/un.h, have_sys_un_h=1) +if test -n "$have_sys_un_h" ; then +AC_DEFINE(HAVE_UNIX_DOMAIN_SOCKETS) +fi + +AC_CHECK_FUNCS(socketpair getgroups setpwent pause tzset) + +cp confdefs.h confdefs.h.bak +for func in sethostent endhostent getnetent setnetent endnetent getprotoent endprotoent getservent endservent getnetbyaddr getnetbyname inet_lnaof inet_makeaddr inet_netof ; do +cp confdefs.h.bak confdefs.h +cat >> confdefs.h << EOF +#ifdef __CYGWIN32__ +#define $func cygwin32_$func +#endif +EOF +AC_CHECK_FUNC($func) +done +cp confdefs.h.bak confdefs.h + +dnl + AC_CACHE_CHECK([for restartable system calls], scm_cv_restarts, if test $ac_cv_func_sigaction = yes; then [AC_TRY_COMPILE([#include ], @@ -100,7 +123,9 @@ if test $scm_cv_restarts = yes; then AC_DEFINE(HAVE_RESTARTS) fi -AC_CHECK_FUNCS(regcomp, [LIBOBJS="regex-posix.o $LIBOBJS"]) +if test "$ac_cv_header_regex_h" = yes; then + AC_CHECK_FUNCS(regcomp, [LIBOBJS="regex-posix.o $LIBOBJS"]) +fi AC_REPLACE_FUNCS(inet_aton putenv strerror)