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
AC_TYPE_SIGNAL
AC_TYPE_MODE_T
-AC_CHECK_LIB(rx, main)
-
-# Checks for dynamic linking
-
AC_CHECK_LIB(m, main)
+AC_CHECK_LIB(rx, main)
AC_CHECK_FUNC(gethostbyname)
if test $ac_cv_func_gethostbyname = no; then
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(socket, connect)
fi
+# Checks for dynamic linking
+
if test "$enable_dynamic_linking" = "yes"; then
AC_CHECK_LIB(dl,dlopen)
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 <GNU-WIN32 hacks>
+
+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)
+
+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 </GNU-WIN32 hacks>
+
AC_CACHE_CHECK([for restartable system calls], scm_cv_restarts,
if test $ac_cv_func_sigaction = yes; then
[AC_TRY_COMPILE([#include <signal.h>],
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)
+# When testing for the presence of alloca, we need to add alloca.o
+# explicitly to LIBOBJS to make sure that it is translated to
+# `alloca.lo' for libtool later on. This can and should be done more cleanly.
AC_FUNC_ALLOCA
+if test "$ALLOCA" = "alloca.o"; then LIBOBJS="alloca.o $LIBOBJS"; fi
AC_STRUCT_ST_RDEV
AC_STRUCT_ST_BLKSIZE
qtmds_s=$qtsrcdir/md/sparc.s
qtdmdb_s=$qtsrcdir/md/sparc_b.s
;;
+alpha-*-*)
+ qtmd_h=md/axp.h
+ qtmdc_c=$qtsrcdir/md/null.c
+ qtmds_s=$qtsrcdir/md/axp.s
+ qtdmdb_s=$qtsrcdir/md/axp_b.s
+ ;;
*)
echo "Unknown configuration; threads package disabled"
threads_enabled=false