]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prepare the cross-compile
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 20 Aug 2001 16:25:00 +0000 (16:25 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 20 Aug 2001 16:25:00 +0000 (16:25 +0000)
program with AC_LANG_PROGRAM before feeding it to
AC_COMPILE_IFELSE.  Cleanup grep usage.

ChangeLog
lib/autoconf/c.m4

index 01e0b6734e6152535b7e135686dafe2eac55931b..b117cc6db5a77b1d74e2f35cc653ce1fec59e10a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-08-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prepare the cross-compile
+       program with AC_LANG_PROGRAM before feeding it to
+       AC_COMPILE_IFELSE.  Cleanup grep usage.
+
 2001-08-20  Akim Demaille  <akim@epita.fr>
 
        * ChangeLog, ChangeLog.0, ChangeLog.1, ChangeLog.2, AUTHORS, BUGS,
index d8b131dc0f19523fa6d5460865a1863132af8b81..e908d005a785b946ac0d5836b8ade6d163b2aa0c 100644 (file)
@@ -863,18 +863,18 @@ main ()
 }], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes],
 [# try to guess the endianess by grep'ing values into an object file
   ac_cv_c_bigendian=unknown
-  AC_COMPILE_IFELSE(
-[short ascii_mm[[]] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[[]] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[[]] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[[]] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
-int main () { _ascii (); _ebcdic (); return 0; }],
-[if test `grep -l BIGenDianSyS conftest.$ac_objext` ; then
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }]],
+[[ _ascii (); _ebcdic (); ]])],
+[if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
   ac_cv_c_bigendian=yes
 fi
-if test `grep -l LiTTleEnDian conftest.$ac_objext` ; then
+if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
   if test "$ac_cv_c_bigendian" = unknown; then
     ac_cv_c_bigendian=no
   else