AC_PREREQ(2.53)
-AC_INIT
+AC_INIT(m4_esyscmd(. ./GUILE-VERSION && echo -n ${PACKAGE}),
+ m4_esyscmd(. ./GUILE-VERSION && echo -n ${GUILE_VERSION}))
+AC_CONFIG_SRCDIR(GUILE-VERSION)
+AM_INIT_AUTOMAKE([no-define])
+
AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
AC_CONFIG_SRCDIR([GUILE-VERSION])
+
. $srcdir/GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
+
AM_MAINTAINER_MODE
AM_CONFIG_HEADER([config.h])
AH_TOP(/*GUILE_CONFIGURE_COPYRIGHT*/)
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([io.h libc.h limits.h malloc.h memory.h string.h \
+# Reasons for testing:
+# fenv.h - available in C99, but not older systems
+#
+AC_CHECK_HEADERS([fenv.h io.h libc.h limits.h malloc.h memory.h string.h \
regex.h rxposix.h rx/rxposix.h sys/dir.h sys/ioctl.h sys/select.h \
sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \
sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \
# DINFINITY - OSF specific
# DQNAN - OSF specific
# (DINFINITY and DQNAN are actually global variables, not functions)
+# fesetround - available in C99, but not older systems
# gmtime_r - recent posix, not on old systems
+# readdir_r - recent posix, not on old systems
+# sysconf - not on old systems
# _NSGetEnviron - Darwin specific
#
-AC_CHECK_FUNCS([DINFINITY DQNAN ctermid ftime fchown getcwd geteuid gettimeofday gmtime_r lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex unsetenv _NSGetEnviron])
+AC_CHECK_FUNCS([DINFINITY DQNAN ctermid fesetround ftime fchown getcwd geteuid gettimeofday gmtime_r lstat mkdir mknod nice readdir_r readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex unsetenv _NSGetEnviron])
-AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h)
+# Reasons for testing:
+# netdb.h - not in mingw
+# sys/param.h - not in mingw
+#
+AC_CHECK_HEADERS(crypt.h netdb.h sys/param.h sys/resource.h sys/file.h)
AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
# crypt() may or may not be available, for instance in some countries there