summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Müller <lars@samba.org>2010-01-18 11:49:01 +0100
committerLars Müller <lars@samba.org>2010-01-18 11:49:01 +0100
commit9e318129e0285e8fecf905187f2ca94a58b60316 (patch)
tree7797d90f66bf6e57b7dd336760c86d452d5bca45
parent3fb359aa5698e393f37765ab279b5a4ba366f965 (diff)
downloadsamba-9e318129e0285e8fecf905187f2ca94a58b60316.tar.gz
samba-9e318129e0285e8fecf905187f2ca94a58b60316.tar.bz2
samba-9e318129e0285e8fecf905187f2ca94a58b60316.zip
Work around bad use of autoconf interna
Merge fix made by Andreas Schwab <schwab@linux-m68k.org>. This change had been in use by SUSE since 2008-07-03.
-rw-r--r--lib/replace/autoconf-2.60.m450
1 files changed, 37 insertions, 13 deletions
diff --git a/lib/replace/autoconf-2.60.m4 b/lib/replace/autoconf-2.60.m4
index 2d5dbc1661..b2694fde62 100644
--- a/lib/replace/autoconf-2.60.m4
+++ b/lib/replace/autoconf-2.60.m4
@@ -181,32 +181,56 @@ AC_DEFUN([AC_PROG_CC_C99],
# typically due to standards-conformance issues.
m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],[
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
- AC_BEFORE([$0], [AC_RUN_IFELSE])
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_AIX])
- AC_REQUIRE([AC_MINIX])
+ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+ if test "$MINIX" = yes; then
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define to 1 if you need to in order for `stat' and other
+ things to work.])
+ AC_DEFINE([_POSIX_1_SOURCE], [2],
+ [Define to 2 if the system does not provide POSIX.1 features
+ except with this defined.])
+ AC_DEFINE([_MINIX], [1],
+ [Define to 1 if on MINIX.])
+ fi
AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+[/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
-#endif])
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
[ac_cv_safe_to_define___extensions__],
[AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
+ [AC_LANG_PROGRAM([[
# define __EXTENSIONS__ 1
- AC_INCLUDES_DEFAULT])],
+ ]AC_INCLUDES_DEFAULT])],
[ac_cv_safe_to_define___extensions__=yes],
[ac_cv_safe_to_define___extensions__=no])])
test $ac_cv_safe_to_define___extensions__ = yes &&
AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_ALL_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-])
+ AC_DEFINE([_TANDEM_SOURCE])
+])# AC_USE_SYSTEM_EXTENSIONS
])