aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-10-16 02:41:46 +0000
committerNIIBE Yutaka <[email protected]>2024-10-16 02:41:46 +0000
commit347ab07c6245bbd65797b6712bebdb8f13a2b61c (patch)
tree1b5949ba38d7c508dbf678d66786aae8c7ba6b55 /configure.ac
parentcommon: Fix a race condition in creating socketdir. (diff)
downloadgnupg-347ab07c6245bbd65797b6712bebdb8f13a2b61c.tar.gz
gnupg-347ab07c6245bbd65797b6712bebdb8f13a2b61c.zip
build: Don't remove --disable-endian-check.
* configure.ac (WORDS_BIGENDIAN): Use the autoconf macro, instead of our own BIG_ENDIAN_HOST. (DISABLED_ENDIAN_CHECK): Keep --disable-endian-check supported. * g10/rmd160.c (transform): Use WORDS_BIGENDIAN. -- Fixes-commit: f8bf5e01f76620cc550253cc2575754872cf64aa Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 22 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 36ff452d7..dea5cc8d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -544,6 +544,19 @@ AH_BOTTOM([
#endif
+/* If the configure check for endianness has been disabled, get it from
+ OS macros. This is intended for making fat binary builds on OS X. */
+#ifdef DISABLED_ENDIAN_CHECK
+# if defined(__BIG_ENDIAN__)
+# define WORDS_BIGENDIAN 1
+# elif defined(__LITTLE_ENDIAN__)
+# undef WORDS_BIGENDIAN
+# else
+# error "No endianness found"
+# endif
+#endif /*DISABLED_ENDIAN_CHECK*/
+
+
/* Hack used for W32: ldap.m4 also tests for the ASCII version of
ldap_start_tls_s because that is the actual symbol used in the
library. winldap.h redefines it to our commonly used value,
@@ -1319,10 +1332,15 @@ AC_MSG_NOTICE([checking for system characteristics])
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
-AC_C_BIGENDIAN([AC_DEFINE(BIG_ENDIAN_HOST,1,
- [Defined if the host has big endian byte ordering])],
- [AC_DEFINE(LITTLE_ENDIAN_HOST,1,
- [Defined if the host has little endian byte ordering])])
+AC_ARG_ENABLE(endian-check,
+ AS_HELP_STRING([--disable-endian-check],
+ [disable the endian check and trust the OS provided macros]),
+ endiancheck=$enableval,endiancheck=yes)
+if test x"$endiancheck" = xyes ; then
+ AC_C_BIGENDIAN
+else
+ AC_DEFINE(DISABLED_ENDIAN_CHECK,1,[configure did not test for endianness])
+fi
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_CHECK_FUNCS([sigdescr_np])