diff -Nur autoconf-2.61.orig/doc/autoconf.texi autoconf-2.61/doc/autoconf.texi --- autoconf-2.61.orig/doc/autoconf.texi Fri Nov 17 01:16:27 2006 +++ autoconf-2.61/doc/autoconf.texi Wed Aug 29 14:39:58 2007 @@ -7297,6 +7297,13 @@ functions. Should be called before any macros that run the C compiler. @end defmac address@hidden AC_INTERIX address@hidden address@hidden _ALL_SOURCE +If on @acronym{Interix} and using @acronym{GCC}, define @code{_ALL_SOURCE}. +Should be called before any macros that run the C compiler. address@hidden defmac + @defmac AC_GNU_SOURCE @acindex{GNU_SOURCE} @cvindex _GNU_SOURCE @@ -7344,7 +7351,7 @@ @code{_POSIX_PTHREAD_SEMANTICS}, which are macros used by Solaris. It also defines @code{_TANDEM_SOURCE} for the @acronym{HP} NonStop platform. This macro also has the combined effects of @code{AC_GNU_SOURCE}, address@hidden, and @code{AC_MINIX}. address@hidden, @code{AC_INTERIX}, and @code{AC_MINIX}. @end defmac diff -Nur autoconf-2.61.orig/lib/autoconf/specific.m4 autoconf-2.61/lib/autoconf/specific.m4 --- autoconf-2.61.orig/lib/autoconf/specific.m4 Tue Oct 24 21:34:09 2006 +++ autoconf-2.61/lib/autoconf/specific.m4 Wed Aug 29 14:36:18 2007 @@ -393,6 +393,7 @@ AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_AIX]) + AC_REQUIRE([AC_INTERIX]) AC_REQUIRE([AC_MINIX]) AH_VERBATIM([__EXTENSIONS__], @@ -453,6 +454,30 @@ AC_DEFINE(_ALL_SOURCE)], [AC_MSG_RESULT([no])]) ])# AC_AIX + + +# AC_INTERIX +# ---------- +AC_DEFUN([AC_INTERIX], +[AH_VERBATIM([_ALL_SOURCE], +[/* Define to 1 if on Interix. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ address@hidden:@ifndef _ALL_SOURCE address@hidden:@ undef _ALL_SOURCE address@hidden:@endif])dnl +AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl +AC_BEFORE([$0], [AC_RUN_IFELSE])dnl +AC_MSG_CHECKING([for Interix]) +AC_EGREP_CPP(yes, +[#ifdef __INTERIX + yes +#endif +], +[AC_MSG_RESULT([yes]) +AC_DEFINE(_ALL_SOURCE)], +[AC_MSG_RESULT([no])]) +])# AC_INTERIX # AC_MINIX