diff --git a/ChangeLog b/ChangeLog index 7dee54abe..31498b20e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Jul 17 07:56:05 1997 Gary Houston + + * configure.in: use AC_CHECK_FUNCS for sethostent etc., + so scmconfig.h is updated with the test results. this may + disable one of the cygwin hacks. + Fri Jul 11 00:18:19 1997 Jim Blandy Changes to compile under gnu-win32, from Marcus Daniels: diff --git a/aclocal.m4 b/aclocal.m4 index a5c39116a..0d20a659f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -255,7 +255,7 @@ AC_MSG_CHECKING([for ld used by the C compiler ($CC $CFLAGS $LDFLAGS)]) AC_CACHE_VAL(am_cv_path_LD, [case "$LD" in /*) - am_cv_path_LD="$LD" # Let the user override the test with a path. + ac_cv_path_LD="$LD" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" diff --git a/configure b/configure index aa4dfeaa4..424fd7041 100755 --- a/configure +++ b/configure @@ -1129,7 +1129,7 @@ if eval "test \"`echo '$''{'am_cv_path_LD'+set}'`\" = set"; then else case "$LD" in /*) - am_cv_path_LD="$LD" # Let the user override the test with a path. + ac_cv_path_LD="$LD" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" @@ -2615,64 +2615,64 @@ 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 + + + +for ac_func in sethostent endhostent getnetent setnetent endnetent getprotoent endprotoent getservent endservent getnetbyaddr getnetbyname inet_lnaof inet_makeaddr inet_netof +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2625: 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 $func(); +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_$func) || defined (__stub___$func) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$func(); +$ac_func(); #endif ; return 0; } EOF -if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_func_$func=yes" + 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_$func=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'$func`\" = yes"; then +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.bak confdefs.h + echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6 diff --git a/configure.in b/configure.in index 546dc35c4..98a4355e6 100644 --- a/configure.in +++ b/configure.in @@ -96,17 +96,31 @@ 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 I don't know what this prefixing of cygwin32_ is for. +dnl scmconfig.h wasn't updated with the test results. +dnl so use AC_CHECK_FUNCS for now. + +dnl how about: +dnl save confdefs.h +dnl if test $ac_cv_cigwin = yes; then +dnl modify confdefs.h +dnl fi +dnl AC_CHECK_FUNCS... +dnl restore confdefs.h + +dnl cp confdefs.h confdefs.h.bak +dnl for func in sethostent endhostent getnetent setnetent endnetent getprotoent endprotoent getservent endservent getnetbyaddr getnetbyname inet_lnaof inet_makeaddr inet_netof ; do +dnl cp confdefs.h.bak confdefs.h +dnl cat >> confdefs.h << EOF +dnl #ifdef __CYGWIN32__ +dnl #define $func cygwin32_$func +dnl #endif +dnl EOF +dnl AC_CHECK_FUNC($func) +dnl done +dnl cp confdefs.h.bak confdefs.h + +AC_CHECK_FUNCS(sethostent endhostent getnetent setnetent endnetent getprotoent endprotoent getservent endservent getnetbyaddr getnetbyname inet_lnaof inet_makeaddr inet_netof) dnl diff --git a/libguile/scmconfig.h.in b/libguile/scmconfig.h.in index 8789f7884..2970e4c80 100644 --- a/libguile/scmconfig.h.in +++ b/libguile/scmconfig.h.in @@ -161,6 +161,18 @@ /* Define if you have the ctermid function. */ #undef HAVE_CTERMID +/* Define if you have the endhostent function. */ +#undef HAVE_ENDHOSTENT + +/* Define if you have the endnetent function. */ +#undef HAVE_ENDNETENT + +/* Define if you have the endprotoent function. */ +#undef HAVE_ENDPROTOENT + +/* Define if you have the endservent function. */ +#undef HAVE_ENDSERVENT + /* Define if you have the ftime function. */ #undef HAVE_FTIME @@ -176,12 +188,36 @@ /* Define if you have the gethostent function. */ #undef HAVE_GETHOSTENT +/* Define if you have the getnetbyaddr function. */ +#undef HAVE_GETNETBYADDR + +/* Define if you have the getnetbyname function. */ +#undef HAVE_GETNETBYNAME + +/* Define if you have the getnetent function. */ +#undef HAVE_GETNETENT + +/* Define if you have the getprotoent function. */ +#undef HAVE_GETPROTOENT + +/* Define if you have the getservent function. */ +#undef HAVE_GETSERVENT + /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY /* Define if you have the inet_aton function. */ #undef HAVE_INET_ATON +/* Define if you have the inet_lnaof function. */ +#undef HAVE_INET_LNAOF + +/* Define if you have the inet_makeaddr function. */ +#undef HAVE_INET_MAKEADDR + +/* Define if you have the inet_netof function. */ +#undef HAVE_INET_NETOF + /* Define if you have the lstat function. */ #undef HAVE_LSTAT @@ -221,9 +257,15 @@ /* Define if you have the seteuid function. */ #undef HAVE_SETEUID +/* Define if you have the sethostent function. */ +#undef HAVE_SETHOSTENT + /* Define if you have the setlocale function. */ #undef HAVE_SETLOCALE +/* Define if you have the setnetent function. */ +#undef HAVE_SETNETENT + /* Define if you have the setpgid function. */ #undef HAVE_SETPGID