summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-13 22:31:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:36 -0500
commit6fa6c74d5959471a2b8d07a2e1e508d299bc2b8d (patch)
tree1f63b58c393ec07591ea011b4bcf4a3bcdaafd10
parentf80d6bc100ed7b9c8bf83525c3e68c1272de84c3 (diff)
downloadsamba-6fa6c74d5959471a2b8d07a2e1e508d299bc2b8d.tar.gz
samba-6fa6c74d5959471a2b8d07a2e1e508d299bc2b8d.tar.bz2
samba-6fa6c74d5959471a2b8d07a2e1e508d299bc2b8d.zip
r18488: we have to make sure any extensions flags also make it into
confdefs.h, otherwise the real build and the configure tests will not be significant this change fixes the build of libreplace on hpux with gcc (This used to be commit d37fc315325c93414ce0942d28f0f47b42873b95)
-rw-r--r--source4/lib/replace/libreplace_cc.m414
-rw-r--r--source4/lib/replace/libreplace_macros.m413
2 files changed, 16 insertions, 11 deletions
diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4
index dd06a6c0f7..2c58933a65 100644
--- a/source4/lib/replace/libreplace_cc.m4
+++ b/source4/lib/replace/libreplace_cc.m4
@@ -45,17 +45,9 @@ AC_C_INLINE
AC_C_BIGENDIAN
AC_PROG_INSTALL
-AH_VERBATIM([_XOPEN_SOURCE_EXTENDED],
-[/* Enable XOPEN extensions on systems that have them. */
-#ifndef _XOPEN_SOURCE_EXTENDED
-# define _XOPEN_SOURCE_EXTENDED 1
-#endif])
-
-AH_VERBATIM([_OSF_SOURCE],
-[/* Enable OSF extensions on systems that have them. */
-#ifndef _OSF_SOURCE
-# define _OSF_SOURCE 1
-#endif])
+
+AC_EXTENSION_FLAG(_XOPEN_SOURCE_EXTENDED)
+AC_EXTENSION_FLAG(_OSF_SOURCE)
LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])])
diff --git a/source4/lib/replace/libreplace_macros.m4 b/source4/lib/replace/libreplace_macros.m4
index 6c1110dc4b..6c4cfc465d 100644
--- a/source4/lib/replace/libreplace_macros.m4
+++ b/source4/lib/replace/libreplace_macros.m4
@@ -87,6 +87,19 @@ fi
rm -f conftest*
])])
+AC_DEFUN([AC_EXTENSION_FLAG],
+[
+ cat >>confdefs.h <<\EOF
+#ifndef $1
+# define $1
+#endif
+EOF
+AH_VERBATIM([$1], [#ifndef $1
+# define $1
+#endif])
+])
+
+
dnl see if a declaration exists for a function or variable
dnl defines HAVE_function_DECL if it exists
dnl AC_HAVE_DECL(var, includes)