1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
dnl On the NeXT, #including <utime.h> doesn't give you a definition for
dnl struct utime, unless you #define _POSIX_SOURCE.
AC_DEFUN(GUILE_STRUCT_UTIMBUF, [
AC_CACHE_CHECK([whether we need POSIX to get struct utimbuf],
guile_cv_struct_utimbuf_needs_posix,
[AC_TRY_CPP([
#ifdef __EMX__
#include <sys/utime.h>
#else
#include <utime.h>
#endif
struct utime blah;
],
guile_cv_struct_utimbuf_needs_posix=no,
guile_cv_struct_utimbuf_needs_posix=yes)])
if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then
AC_DEFINE(UTIMBUF_NEEDS_POSIX)
fi])
dnl
dnl Apparently, at CMU they have a weird version of libc.h that is
dnl installed in /usr/local/include and conflicts with unistd.h.
dnl In these situations, we should not #include libc.h.
dnl This test arranges to #define LIBC_H_WITH_UNISTD_H iff libc.h is
dnl present on the system, and is safe to #include.
dnl
AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD],
[
AC_CHECK_HEADERS(libc.h unistd.h)
AC_CACHE_CHECK(
"whether libc.h and unistd.h can be included together",
guile_cv_header_libc_with_unistd,
[
if test "$ac_cv_header_libc_h" = "no"; then
guile_cv_header_libc_with_unistd="no"
elif test "$ac_cv_header_unistd.h" = "no"; then
guile_cv_header_libc_with_unistd="yes"
else
AC_TRY_COMPILE(
[
# include <libc.h>
# include <unistd.h>
],
[],
[guile_cv_header_libc_with_unistd=yes],
[guile_cv_header_libc_with_unistd=no]
)
fi
]
)
if test "$guile_cv_header_libc_with_unistd" = yes; then
AC_DEFINE(LIBC_H_WITH_UNISTD_H)
fi
]
)
|