Skip to content

Instantly share code, notes, and snippets.

@goodell
Created January 19, 2012 19:57
Show Gist options
  • Save goodell/1642200 to your computer and use it in GitHub Desktop.
Save goodell/1642200 to your computer and use it in GitHub Desktop.
commit 3b0c4e50280653b29d34a7a29bd493d6c1307a91
Author: Dave Goodell <[email protected]>
Date: Wed Jan 18 17:46:30 2012 -0600
tt#1568: insert -D_DARWIN_C_SOURCE early in hydra's configure
Because we build hwloc in "m4 embedded mode", we can't restrict this
#define to only the hwloc code without getting configure tests inside
of HWLOC_SETUP_CORE wrong.
No reviewer.
---
src/pm/hydra/configure.in | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/pm/hydra/configure.in b/src/pm/hydra/configure.in
index a76bc53..1775d4b 100644
--- a/src/pm/hydra/configure.in
+++ b/src/pm/hydra/configure.in
@@ -15,6 +15,14 @@ AC_CONFIG_MACRO_DIR(confdb)
AC_CANONICAL_TARGET
AC_ARG_PROGRAM
AC_USE_SYSTEM_EXTENSIONS
+# Define -D_DARWIN_C_SOURCE on OS/X to ensure that hwloc will build even if we
+# are building under MPICH2 with --enable-strict that defined _POSIX_C_SOURCE.
+# Some standard Darwin headers don't build correctly under a strict posix
+# environment.
+AS_CASE([$host],
+ [*-*-darwin*], [PAC_APPEND_FLAG([-D_DARWIN_C_SOURCE],[CPPFLAGS])]
+)
+
AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.11])
@@ -27,6 +35,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
PAC_RESET_LINK_FLAGS()
PAC_PROG_CC
+
PAC_ARG_STRICT
AC_C_CONST
@@ -52,14 +61,6 @@ PAC_C_MACRO_VA_ARGS
PAC_C_GNU_ATTRIBUTE
PAC_CC_FUNCTION_NAME_SYMBOL
-# Define -D_DARWIN_C_SOURCE on OS/X to ensure that hwloc will build even if we
-# are building under MPICH2 with --enable-strict that defined _POSIX_C_SOURCE.
-# Some standard Darwin headers don't build correctly under a strict posix
-# environment.
-AS_CASE([$host],
- [*-*-darwin*], [PAC_APPEND_FLAG([-D_DARWIN_C_SOURCE],[CPPFLAGS])]
-)
-
# Build information
# these values come from the m4_include above
HYDRA_VERSION="MPICH2_VERSION_m4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment