summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2006-03-20 17:13:52 +0100
committerDavid Shaw <dshaw@jabberwocky.com>2006-03-20 17:13:52 +0100
commitca766728f4d7dbe344054c5315ab788ac16d3fbe (patch)
treea664d67c2ccc13c17b5ac521a2366793ecd72253
parent* configure.ac: Add --disable-endian-check for building fat binaries (diff)
downloadgnupg2-ca766728f4d7dbe344054c5315ab788ac16d3fbe.tar.xz
gnupg2-ca766728f4d7dbe344054c5315ab788ac16d3fbe.zip
* configure.ac: Improved --disable-endian-check that doesn't involve
changing #ifdefs in the rest of the code.
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac22
2 files changed, 20 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 61be84abd..580015fdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-20 David Shaw <dshaw@jabberwocky.com>
+
+ * configure.ac: Improved --disable-endian-check that doesn't
+ involve changing #ifdefs in the rest of the code.
+
2006-03-19 David Shaw <dshaw@jabberwocky.com>
* configure.ac: Add --disable-endian-check for building fat
diff --git a/configure.ac b/configure.ac
index 9c6928ee5..06d9cb005 100644
--- a/configure.ac
+++ b/configure.ac
@@ -405,6 +405,18 @@ AH_TOP([
])
AH_BOTTOM([
+/* We didn't define endianness above, so get it from OS macros. This
+is intended for making fat binary builds on OS X. */
+#if !defined(BIG_ENDIAN_HOST) && !defined(LITTLE_ENDIAN_HOST)
+#if defined(__BIG_ENDIAN__)
+#define BIG_ENDIAN_HOST 1
+#elif defined(__LITTLE_ENDIAN__)
+#define LITTLE_ENDIAN_HOST 1
+#else
+#error "No endianness found"
+#endif
+#endif
+
#if !(defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID))
#define EXEC_TEMPFILE_ONLY
#endif
@@ -824,15 +836,11 @@ AC_TYPE_SIGNAL
AC_DECL_SYS_SIGLIST
AC_ARG_ENABLE(endian-check,
- AC_HELP_STRING([--disable-endian-check],[disable the endian check and trust the OS provided macros]),
+ AC_HELP_STRING([--disable-endian-check],
+ [disable the endian check and trust the OS provided macros]),
endiancheck=$enableval,endiancheck=yes)
-if test x"$endiancheck" = xno ; then
- # don't do an endian check so we can build universal ("fat")
- # binaries on OS X.
- AC_DEFINE_UNQUOTED(LITTLE_ENDIAN_HOST,__LITTLE_ENDIAN__)
- AC_DEFINE_UNQUOTED(BIG_ENDIAN_HOST,__BIG_ENDIAN__)
-else
+if test x"$endiancheck" = xyes ; then
GNUPG_CHECK_ENDIAN
fi