diff options
author | 2008-06-29 23:12:06 +0000 | |
---|---|---|
committer | 2008-06-29 23:12:06 +0000 | |
commit | 0ae1f834d446ce77b786f5e0acaeec9d90bc2fe3 (patch) | |
tree | 59f52735736b13ca96c85d045799066d782f89c0 /sys-devel | |
parent | broken (diff) | |
download | historical-0ae1f834d446ce77b786f5e0acaeec9d90bc2fe3.tar.gz historical-0ae1f834d446ce77b786f5e0acaeec9d90bc2fe3.tar.bz2 historical-0ae1f834d446ce77b786f5e0acaeec9d90bc2fe3.zip |
Add workarounds for nasty bugs #217976 (multiline problems) and #228825 (big endian misdetection on ppc).
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.25 x86_64
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/autoconf/ChangeLog | 12 | ||||
-rw-r--r-- | sys-devel/autoconf/Manifest | 17 | ||||
-rw-r--r-- | sys-devel/autoconf/autoconf-2.62-r1.ebuild | 47 | ||||
-rw-r--r-- | sys-devel/autoconf/files/autoconf-2.62-at-keywords.patch | 81 | ||||
-rw-r--r-- | sys-devel/autoconf/files/autoconf-2.62-fix-multiline-string.patch | 30 | ||||
-rw-r--r-- | sys-devel/autoconf/files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch | 214 |
6 files changed, 398 insertions, 3 deletions
diff --git a/sys-devel/autoconf/ChangeLog b/sys-devel/autoconf/ChangeLog index 4c88a6379ca6..137d2d0d09ea 100644 --- a/sys-devel/autoconf/ChangeLog +++ b/sys-devel/autoconf/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-devel/autoconf # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf/ChangeLog,v 1.119 2008/06/23 16:04:19 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf/ChangeLog,v 1.120 2008/06/29 23:12:05 vapier Exp $ + +*autoconf-2.62-r1 (29 Jun 2008) + + 29 Jun 2008; Mike Frysinger <vapier@gentoo.org> + +files/autoconf-2.62-at-keywords.patch, + +files/autoconf-2.62-fix-multiline-string.patch, + +files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch, + +autoconf-2.62-r1.ebuild: + Add workarounds for nasty bugs #217976 (multiline problems) and #228825 + (big endian misdetection on ppc). 23 Jun 2008; Jeroen Roovers <jer@gentoo.org> autoconf-2.61-r2.ebuild: Stable for HPPA (bug #227603). diff --git a/sys-devel/autoconf/Manifest b/sys-devel/autoconf/Manifest index f6a74c962040..469120801c0f 100644 --- a/sys-devel/autoconf/Manifest +++ b/sys-devel/autoconf/Manifest @@ -1,9 +1,15 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX autoconf-2.13-destdir.patch 677 RMD160 ff71fb18c1676455e267dfd8f3059e8c9384fe19 SHA1 5ef1905e271e078cecea3424560207585868e9cd SHA256 67c3eaf2f8aaf3acbcff387bc3fc6d46688b56a6b51043344e301bfaf16186a0 AUX autoconf-2.13-gentoo.patch 898 RMD160 c39068cd8477188cde4818049c32b4142689ca0d SHA1 17bdf4d77c8a0c738f20378f0b281fd6ecf57ddd SHA256 5d6a4b9d8d789684b44addf565200a90ee92140d58bebf087373ae82c4d89ea8 AUX autoconf-2.13-test-fixes.patch 547 RMD160 4f8713f9a046c496c813fc52f5fccbb8d616f97c SHA1 95dcffbc29c8355f11c191d6626b54f1db9403ea SHA256 43929d95e6050642385530df91084d4c073cec5cca727918d5ff84bc1e3059f5 AUX autoconf-2.59-more-quotes.patch 1223 RMD160 f704db2caacdb3c7eedbe39ec1745503b336391c SHA1 ae3d0e3be5ffb4fc84a30a60e6c78c1fcc45a68b SHA256 0bd6d00b2f77e89684ed7305c3821090950fcc6407ab045fd3ace91ac0b19abd AUX autoconf-2.60-tests.patch 720 RMD160 cbae84eb08b71dc034b38d8ad2d915e06180235d SHA1 94f0852872395db32ad25854ea202e8c68254a31 SHA256 96a54f7623bd889f3f8a12c802305a8e07a0dc781796ab78c8f9b61c4644c9fa AUX autoconf-2.61-GETMNTENT.patch 909 RMD160 3641e399071ccfbde9c37dfebc6414fc5a28fbfe SHA1 de4e87d3b3757ec96244dbae0620640a96e40b07 SHA256 28b5ea16cad98460e7920456365068d171c1ce1f50b2582c4f393e83e9421d09 +AUX autoconf-2.62-at-keywords.patch 2857 RMD160 1574aa72cc1b8583241c43bd843e8460fc18d2f6 SHA1 c3145c7f8859ec3aff83e31e4afdb09f953e8b60 SHA256 dea4a6caef01566f252ce71c6fb9b5aff07faa918925c10a2c5a7b4b68f1c2a9 +AUX autoconf-2.62-fix-multiline-string.patch 1040 RMD160 b9038df63126c43970329ea209285497ad5c6e60 SHA1 feb6dd8332d7637990a76b2446f5d2e6e508b3bb SHA256 853bf209c69610d5a9f95dc6637342651eacdfe7255198228c2995fca2c4fb36 +AUX autoconf-2.62-revert-AC_C_BIGENDIAN.patch 7040 RMD160 42ef4aa0cef1ef22335e1afdd867afe057ccf00f SHA1 db9e27d78885cb7cef238dc3121b08653b4ebac6 SHA256 5dcd1437891ad33ce81219b27429f94ff56ad7216b7b707427ae028bdc60f610 DIST autoconf-2.13.tar.gz 443844 RMD160 0d1fa0992280ed71c0d72487a5a4c246d1c1b18a SHA1 e4826c8bd85325067818f19b2b2ad2b625da66fc SHA256 f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e DIST autoconf-2.59.tar.bz2 925073 RMD160 792c45aade68e2ed19a0e4c6ebc0e20cb8298e1a SHA1 d366a07b2d99c95b7f24395aa8a8e023d8b93b69 SHA256 f0cde70a8f135098a6a3e85869f2e1cc3f141beea766fa3d6636e086cd8b90a7 DIST autoconf-2.61.tar.gz 1396855 RMD160 ec5f512aec24b3cc5a9968e96d261558e45471b5 SHA1 69f37c509a4757d747b6f4c091d209ab3984d62f SHA256 9d14f2ed0d1b6f8180498a66517f511c7c49c870d6873219a3ff4b8b3082a68b @@ -12,7 +18,14 @@ EBUILD autoconf-2.13.ebuild 1502 RMD160 63e5d35cbf9dc4ba0d8403cbc2cfb41fbdfd79cb EBUILD autoconf-2.59-r7.ebuild 1256 RMD160 ea87e1c15d25ae2a0b768b890266d25676689b8f SHA1 b950c584cdd4cf6021688bdfe7508dd841e88de1 SHA256 16b3c837c45816013cab9651555c83200d2885fada56ef03b93c5b6f42197416 EBUILD autoconf-2.61-r1.ebuild 1208 RMD160 b3d09a159ec652a7cfee302b0fa8d25903d6a039 SHA1 ff5f68fef2803f83b401b5fcbaa54f4f9071dd44 SHA256 8b816c0ab4f893f24aa1ae33cc2500b516ace98858c482b145d950f102bd97d6 EBUILD autoconf-2.61-r2.ebuild 1312 RMD160 08e141e5cc984f311ccc07333c8103d03fe5259c SHA1 0698e10a3c8d76cb26a96f9b66857fa919797840 SHA256 20aa84dc5c309110963d033e950214faaa1d98e1597ce1fc4f0730b4c912bc58 -EBUILD autoconf-2.62.ebuild 1216 RMD160 f7a72065ef446b18114a22e7b7f81d368ed15fae SHA1 a42ece14b0cdd9b738415d000eeac32e248a8aac SHA256 bcf8e80bbb1c4ac81c3702be5c4af094938598693a704330f933b55b99fbc7cf +EBUILD autoconf-2.62-r1.ebuild 1447 RMD160 38c899c660b48e663b5fe6f4944c45396f039e00 SHA1 e009a1376af97cba0a605d7f3756f1a35a5b6de6 SHA256 dc37530315eac445aad0189079fa9d87e43b986fdb1fab036248218454623849 EBUILD autoconf-9999.ebuild 1262 RMD160 46da23705fa4033b0a420507aaba52eeb3364af1 SHA1 b64c10c9fbd1cf34e2802474e021576e712d78c8 SHA256 0fc59822d4289bbd38a6f0a55374b7cc5c3ff61fafeb25301728e6cd11d68d31 -MISC ChangeLog 16719 RMD160 07876c5c30f452fa57916d07a1b91202b56627d4 SHA1 803a5280db3ac7cbe246991b215f8d8fb94d9e4b SHA256 002855100b8388040159b863c7c0cf08779a2ec4df41046365e12febac2a3db9 +MISC ChangeLog 17089 RMD160 0d06b4185f4815c66e16b31be946a35bbd47fd97 SHA1 036e6a8eb11bc1227b67ca55f1a22b185a100f69 SHA256 de7e060b244c8caeb0d15406c67313e152921f578199a2e0fb2b891f8971b1ba MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkhoFssACgkQ67wieSYcaxcGjACfdXx3msDYKyj+XorIFFnISxdF +PyEAoPBtpdHcjCnIAXWJoyF3DLDQe5PC +=pJxM +-----END PGP SIGNATURE----- diff --git a/sys-devel/autoconf/autoconf-2.62-r1.ebuild b/sys-devel/autoconf/autoconf-2.62-r1.ebuild new file mode 100644 index 000000000000..376e81c3fd4d --- /dev/null +++ b/sys-devel/autoconf/autoconf-2.62-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf/autoconf-2.62-r1.ebuild,v 1.1 2008/06/29 23:12:05 vapier Exp $ + +inherit eutils + +DESCRIPTION="Used to create autoconfiguration files" +HOMEPAGE="http://www.gnu.org/software/autoconf/autoconf.html" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="2.5" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="emacs" + +DEPEND=">=sys-apps/texinfo-4.3 + >=sys-devel/m4-1.4.6 + dev-lang/perl" +RDEPEND="${DEPEND} + >=sys-devel/autoconf-wrapper-5" +PDEPEND="emacs? ( app-emacs/autoconf-mode )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-revert-AC_C_BIGENDIAN.patch #228825 + epatch "${FILESDIR}"/${P}-at-keywords.patch + epatch "${FILESDIR}"/${P}-fix-multiline-string.patch #217976 +} + +src_compile() { + # Disable Emacs in the build system since it is in a separate package. + export EMACS=no + econf --program-suffix="-${PV}" || die + # econf updates config.{sub,guess} which forces the manpages + # to be regenerated which we dont want to do #146621 + touch man/*.1 + # From configure output: + # Parallel builds via `make -jN' do not work. + emake -j1 || die +} + +src_install() { + emake DESTDIR="${D}" install || die + dodoc AUTHORS BUGS NEWS README TODO THANKS \ + ChangeLog ChangeLog.0 ChangeLog.1 ChangeLog.2 +} diff --git a/sys-devel/autoconf/files/autoconf-2.62-at-keywords.patch b/sys-devel/autoconf/files/autoconf-2.62-at-keywords.patch new file mode 100644 index 000000000000..04cd1807b8a0 --- /dev/null +++ b/sys-devel/autoconf/files/autoconf-2.62-at-keywords.patch @@ -0,0 +1,81 @@ +commit 3ac7ceb0c2dfd023e0e9e944da6825b6bd676568 +Author: Eric Blake <ebb9@byu.net> +Date: Thu Jun 5 15:18:11 2008 -0600 + + Fix regression in AT_KEYWORDS([Macro]), from 2007-10-18. + + * lib/autotest/general.m4 (AT_KEYWORDS): Expand argument prior to + converting it to lower case. + * tests/autotest.at (Keywords and ranges): Test this. + * NEWS: Document the fix. + * THANKS: Update. + Reported by Karsten Hopp. + + Signed-off-by: Eric Blake <ebb9@byu.net> + +diff --git a/NEWS b/NEWS +index 183d4f1..8b866ad 100644 +--- a/NEWS ++++ b/NEWS +@@ -9,6 +9,10 @@ GNU Autoconf NEWS - User visible changes. + ** Two new quadrigraphs have been introduced: @{:@ for (, and @:}@ for ), + allowing the output of unbalanced parantheses in more contexts. + ++** AT_KEYWORDS once again performs expansion on its argument, such that ++ AT_KEYWORDS([m4_if([$1], [], [default])]) no longer complains about ++ the possibly unexpanded m4_if [regression introduced in 2.62]. ++ + + * Major changes in Autoconf 2.62 (2008-04-05) [stable] + Released by Eric Blake, based on git versions 2.61a.*. +diff --git a/THANKS b/THANKS +index 5ec8921..224cdea 100644 +--- a/THANKS ++++ b/THANKS +@@ -177,6 +177,7 @@ Justace Clutter ? + Jörn Rennecke amylaar@cygnus.co.uk + Karl Berry karl@cs.umb.edu + Karl Heuer kwzh@gnu.org ++Karsten Hopp karsten@redhat.com + Kate Hedstrom ? + Kathryn Hargreaves kathryn@deas.harvard.edu + Kaveh R. Ghazi ghazi@caip.rutgers.edu +diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 +index 88d10a3..993dd9f 100644 +--- a/lib/autotest/general.m4 ++++ b/lib/autotest/general.m4 +@@ -1476,9 +1476,10 @@ m4_case([$1], + # AT_KEYWORDS(KEYWORDS) + # --------------------- + # Declare a list of keywords associated to the current test group. +-# The list is stored in lower case, since the -k option is case-insensitive. ++# Since the -k option is case-insensitive, the list is stored in lower case ++# to avoid duplicates that differ only by case. + _AT_DEFINE_SETUP([AT_KEYWORDS], +-[m4_append_uniq_w([AT_keywords], m4_tolower([[$1]]))]) ++[m4_append_uniq_w([AT_keywords], m4_tolower(m4_dquote(m4_expand([$1]))))]) + + + # AT_CAPTURE_FILE(FILE) +diff --git a/tests/autotest.at b/tests/autotest.at +index dc3cfd5..c4c0eda 100644 +--- a/tests/autotest.at ++++ b/tests/autotest.at +@@ -690,7 +690,7 @@ AT_CHECK(:) + AT_CLEANUP + AT_SETUP(both) # 04 + AT_KEYWORDS([key1 key2]) +-AT_KEYWORDS([key1]) ++AT_KEYWORDS([m4@&t@_echo([Key1])]) + AT_CHECK(:) + AT_CLEANUP + AT_SETUP(test5) # 05 +@@ -713,7 +713,7 @@ AT_CHECK(:) + AT_CLEANUP + ]]) + dnl check that AT_KEYWORDS does not duplicate words +-AT_CHECK([grep 'key1.*key1' k], [1]) ++AT_CHECK([grep -i 'key1.*key1' k], [1]) + dnl check that -k requires an argument + AT_CHECK([$CONFIG_SHELL ./k -k], [1], [], [ignore]) + diff --git a/sys-devel/autoconf/files/autoconf-2.62-fix-multiline-string.patch b/sys-devel/autoconf/files/autoconf-2.62-fix-multiline-string.patch new file mode 100644 index 000000000000..cfd7b4228794 --- /dev/null +++ b/sys-devel/autoconf/files/autoconf-2.62-fix-multiline-string.patch @@ -0,0 +1,30 @@ +sniped from mandrivia: +http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/autoconf/current/SOURCES/autoconf-2.62-fix-multiline-string.patch + +this may not be the correct fix, but it seems to get the job done until we can +grab whatever upstream merges +http://lists.gnu.org/archive/html/bug-autoconf/2008-04/msg00031.html + +--- autoconf-2.62/lib/autoconf/status.m4 ++++ autoconf-2.62/lib/autoconf/status.m4 +@@ -1360,16 +1360,16 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + # Files that config.status was made for. + m4_ifdef([_AC_SEEN_CONFIG(FILES)], +-[config_files="$ac_config_files" ++[config_files="`echo $ac_config_files`" + ])dnl + m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], +-[config_headers="$ac_config_headers" ++[config_headers="`echo $ac_config_headers`" + ])dnl + m4_ifdef([_AC_SEEN_CONFIG(LINKS)], +-[config_links="$ac_config_links" ++[config_links="`echo $ac_config_links`" + ])dnl + m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], +-[config_commands="$ac_config_commands" ++[config_commands="`echo $ac_config_commands`" + ])dnl + + _ACEOF diff --git a/sys-devel/autoconf/files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch b/sys-devel/autoconf/files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch new file mode 100644 index 000000000000..76db013cac53 --- /dev/null +++ b/sys-devel/autoconf/files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch @@ -0,0 +1,214 @@ +revert AC_C_BIGENDIAN to the version found in 2.61 since the version in 2.62 is +known to be broken and the changes that it brings are not critical + +http://bugs.gentoo.org/228825 + +--- autoconf-2.62/lib/autoconf/c.m4 ++++ autoconf-2.61/lib/autoconf/c.m4 +@@ -1393,140 +1351,74 @@ + ])# AC_C_CHAR_UNSIGNED + + +-# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN], +-# [ACTION-IF-UNIVERSAL]) ++# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN]) + # ------------------------------------------------------------------------- + AC_DEFUN([AC_C_BIGENDIAN], +-[AH_VERBATIM([WORDS_BIGENDIAN], +-[/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most +- significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ +-#if defined __BIG_ENDIAN__ +-# define WORDS_BIGENDIAN 1 +-#elif ! defined __LITTLE_ENDIAN__ +-# undef WORDS_BIGENDIAN +-#endif])dnl +- AC_CACHE_CHECK([whether byte ordering is bigendian], [ac_cv_c_bigendian], +- [ac_cv_c_bigendian=unknown +- m4_ifval(m4_ifdef([AH_HEADER], 1)[$4], +- [# See if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined. +- AC_COMPILE_IFELSE( +- [AC_LANG_SOURCE( +- [[#if ! (defined __BIG_ENDIAN__ || defined __LITTLE_ENDIAN__) +- neither is defined; +- #endif +- typedef int dummy; +- ]])], +- [ac_cv_c_bigendian=universal])], +- [AC_DIAGNOSE([obsolete], [AC_C_BIGENDIAN suggests AC_CONFIG_HEADERS])]) +- if test $ac_cv_c_bigendian = unknown; then +- # See if sys/param.h defines the BYTE_ORDER macro. +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include <sys/types.h> +- #include <sys/param.h> +- ]], +- [[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ +- && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ +- && LITTLE_ENDIAN) +- bogus endian macros +- #endif +- ]])], +- [# It does; now see whether it defined to BIG_ENDIAN or not. +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include <sys/types.h> +- #include <sys/param.h> +- ]], +- [[#if BYTE_ORDER != BIG_ENDIAN +- not big endian +- #endif +- ]])], +- [ac_cv_c_bigendian=yes], +- [ac_cv_c_bigendian=no])]) +- fi +- if test $ac_cv_c_bigendian = unknown; then +- # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include <limits.h> +- ]], +- [[#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) +- bogus endian macros +- #endif +- ]])], +- [# It does; now see whether it defined to _BIG_ENDIAN or not. +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include <limits.h> +- ]], +- [[#ifndef _BIG_ENDIAN +- not big endian +- #endif +- ]])], +- [ac_cv_c_bigendian=yes], +- [ac_cv_c_bigendian=no])]) +- fi +- if test $ac_cv_c_bigendian = unknown; then +- # Compile a test program. +- AC_RUN_IFELSE( +- [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], +- [[ +- /* Are we little or big endian? From Harbison&Steele. */ +- union +- { +- long int l; +- char c[sizeof (long int)]; +- } u; +- u.l = 1; +- return u.c[sizeof (long int) - 1] == 1; +- ]])], +- [ac_cv_c_bigendian=no], +- [ac_cv_c_bigendian=yes], +- [# Try to guess by grepping values from an object file. +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM( +- [[short int ascii_mm[] = +- { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +- short int ascii_ii[] = +- { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +- int use_ascii (int i) { +- return ascii_mm[i] + ascii_ii[i]; +- } +- short int ebcdic_ii[] = +- { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +- short int ebcdic_mm[] = +- { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +- int use_ebcdic (int i) { +- return ebcdic_mm[i] + ebcdic_ii[i]; +- } +- extern int foo; +- ]], +- [[return use_ascii (foo) == use_ebcdic (foo);]])], +- [if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then +- ac_cv_c_bigendian=yes +- fi +- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then +- if test "$ac_cv_c_bigendian" = unknown; then +- ac_cv_c_bigendian=no +- else +- # finding both strings is unlikely to happen, but who knows? +- ac_cv_c_bigendian=unknown +- fi +- fi])]) +- fi]) +- case $ac_cv_c_bigendian in #( +- yes) +- m4_default([$1], +- [AC_DEFINE([WORDS_BIGENDIAN], 1)]);; #( +- no) +- $2 ;; #( +- universal) +- $4 ;; #( +- *) +- m4_default([$3], +- [AC_MSG_ERROR([unknown endianness +- presetting ac_cv_c_bigendian=no (or yes) will help])]) ;; +- esac ++[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, ++[# See if sys/param.h defines the BYTE_ORDER macro. ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> ++#include <sys/param.h> ++], ++[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ ++ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) ++ bogus endian macros ++#endif ++])], ++[# It does; now see whether it defined to BIG_ENDIAN or not. ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h> ++#include <sys/param.h> ++], [#if BYTE_ORDER != BIG_ENDIAN ++ not big endian ++#endif ++])], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=no])], ++[# It does not; compile a test program. ++AC_RUN_IFELSE( ++[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ ++ /* Are we little or big endian? From Harbison&Steele. */ ++ union ++ { ++ long int l; ++ char c[sizeof (long int)]; ++ } u; ++ u.l = 1; ++ return u.c[sizeof (long int) - 1] == 1; ++]])], ++ [ac_cv_c_bigendian=no], ++ [ac_cv_c_bigendian=yes], ++[# try to guess the endianness by grepping values into an object file ++ ac_cv_c_bigendian=unknown ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( ++[[short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; ++short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; ++void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } ++short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; ++short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; ++void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }]], ++[[ _ascii (); _ebcdic (); ]])], ++[if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ++ ac_cv_c_bigendian=yes ++fi ++if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then ++ if test "$ac_cv_c_bigendian" = unknown; then ++ ac_cv_c_bigendian=no ++ else ++ # finding both strings is unlikely to happen, but who knows? ++ ac_cv_c_bigendian=unknown ++ fi ++fi])])])]) ++case $ac_cv_c_bigendian in ++ yes) ++ m4_default([$1], ++ [AC_DEFINE([WORDS_BIGENDIAN], 1, ++ [Define to 1 if your processor stores words with the most significant ++ byte first (like Motorola and SPARC, unlike Intel and VAX).])]) ;; ++ no) ++ $2 ;; ++ *) ++ m4_default([$3], ++ [AC_MSG_ERROR([unknown endianness ++presetting ac_cv_c_bigendian=no (or yes) will help])]) ;; ++esac + ])# AC_C_BIGENDIAN + + |