From: Bruno Haible Date: Sun, 17 Aug 2008 09:51:31 +0000 (+0000) Subject: Adapt AC_C_BIGENDIAN invocation to autoconf 2.62. X-Git-Tag: v0.18~373 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9111e71467a234e89dd5ae7972281218b5a1a85a;p=thirdparty%2Fgettext.git Adapt AC_C_BIGENDIAN invocation to autoconf 2.62. --- diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index ecb8a3dd8..34b0dff1e 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,8 @@ +2008-08-17 Bruno Haible + + * configure.ac: Adapt AC_C_BIGENDIAN invocation to autoconf 2.62: make + it work for universal binary builds on MacOS X. + 2008-04-20 Bruno Haible * configure.ac: Use LT_INIT instead of AC_PROG_LIBTOOL. diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 307ade9b9..1d1f56dd8 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -169,12 +169,28 @@ AC_FUNC_VFORK gt_SIGINFO gt_SETLOCALE gt_LIBGREP + AC_C_BIGENDIAN([endianness=1], [endianness=0], [echo "AC-C-BIGENDIAN fails to work on your system." | sed -e 's,-,_,g' 1>&2 echo "Please report this as a bug to bug-autoconf@gnu.org" 1>&2 - exit 1]) -AC_DEFINE_UNQUOTED([ENDIANNESS], [$endianness], - [Define according to the byte order of the target machine: 1 for big endian, 0 for little endian.]) + exit 1], + [endianness=universal]) +if test $endianness != universal; then + AC_DEFINE_UNQUOTED([ENDIANNESS], [$endianness], + [Define according to the byte order of the target machine: 1 for big endian, 0 for little endian.]) +fi +dnl For possibly universal binaries, it's not possible to determine the +dnl endianness at configure time. So determine it at compile time. +AH_BOTTOM([ +#ifndef ENDIANNESS +# if defined __BIG_ENDIAN__ +# define ENDIANNESS 1 +# endif +# if defined __LITTLE_ENDIAN__ +# define ENDIANNESS 0 +# endif +#endif +]) gt_PREREQ_HOSTNAME