]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Fix typo "__LITLE_ENDIAN__".
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 1 Mar 2007 00:18:28 +0000 (00:18 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 1 Mar 2007 00:18:28 +0000 (00:18 +0000)
Problem reported by Paolo Bonzini in:
http://lists.gnu.org/archive/html/autoconf-patches/2007-02/msg00024.html
* tests/semantics.at (AC_C_BIGENDIAN): Don't reject hosts that have
universal binaries.  Problem reported by Elias Pipping.

ChangeLog
lib/autoconf/c.m4
tests/semantics.at

index aceb58948e81056513d5b2a72b3de074f1942e40..077cabd6023b1621df9a78e8e7b7ec14a34996c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-02-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Fix typo "__LITLE_ENDIAN__".
+       Problem reported by Paolo Bonzini in:
+       http://lists.gnu.org/archive/html/autoconf-patches/2007-02/msg00024.html
+       * tests/semantics.at (AC_C_BIGENDIAN): Don't reject hosts that have
+       universal binaries.  Problem reported by Elias Pipping.
+
 2007-02-27  Paul Eggert  <eggert@cs.ucla.edu>
 
        * NEWS: AC_C_BIGENDIAN now supports universal binaries a la Mac OS X.
index cb62d27bacd2e7efcbf0a9af4818d58a38c66ac6..f9105c042f6499305cbee74721a502ca0446abf5 100644 (file)
@@ -1384,9 +1384,10 @@ AC_DEFUN([AC_C_BIGENDIAN],
     # See if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined.
     AC_COMPILE_IFELSE(
       [AC_LANG_SOURCE(
-        [[#if ! (defined __BIG_ENDIAN__ || defined __LITLE_ENDIAN__)
+        [[#if ! (defined __BIG_ENDIAN__ || defined __LITTLE_ENDIAN__)
            neither is defined;
          #endif
+         typedef int dummy;
         ]])],
       [ac_cv_c_bigendian=universal])
     if test $ac_cv_c_bigendian = unknown; then
index 304cce4c6413dfaaab3dad8e237a91e7d6544dbe..0a7afdd9783969d2b22d82adea812a8e7e4d9a46 100644 (file)
@@ -2,7 +2,7 @@
 
 AT_BANNER([Semantics.])
 
-# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006 Free Software
+# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -470,7 +470,11 @@ AT_KEYWORDS([cross])
 # cross-compiling or not.
 
 _AT_CHECK_AC_MACRO(
-  [[AC_C_BIGENDIAN([ac_endian=big],[ac_endian=little],[ac_endian=unknown])
+  [[AC_C_BIGENDIAN(
+      [ac_endian=big],
+      [ac_endian=little],
+      [ac_endian=unknown],
+      [ac_endian=universal])
    echo $ac_endian > at-endian
 ]])
 
@@ -479,7 +483,11 @@ _AT_CHECK_AC_MACRO(
   [[# Force cross compiling.
    cross_compiling=yes
    ac_tool_warned=yes
-   AC_C_BIGENDIAN([ac_endian=big],[ac_endian=little],[ac_endian=unknown])
+   AC_C_BIGENDIAN(
+     [ac_endian=big],
+     [ac_endian=little],
+     [ac_endian=unknown],
+     [ac_endian=universal])
    ac_prevendian=`cat at-endian`
    # Check that we have found the same result as in the previous run
    # or unknown (because the cross-compiling check is allowed to fail;
@@ -490,7 +498,8 @@ _AT_CHECK_AC_MACRO(
    fi
 ]])
 
-# Make sure AC_C_BIGENDIAN with no argument will define WORDS_BIGENDIAN
+# Make sure AC_C_BIGENDIAN with no argument will create a config.h template
+# containing "WORDS_BIGENDIAN".
 AT_CONFIGURE_AC([[AC_C_BIGENDIAN]])
 # --force is necessary, the computer might be too fast.
 AT_CHECK_AUTOHEADER([--force])