dnl On the NeXT, #including 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 #else #include #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 # include ], [], [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 ] )