autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unreliable detection of universal builds in AC_C_BIGENDIAN


From: Eric Blake
Subject: Re: unreliable detection of universal builds in AC_C_BIGENDIAN
Date: Thu, 25 Dec 2008 21:23:18 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 12/25/2008 6:06 AM:
>       # Check for potential -arch flags.  It is not universal unless
> !     # there are some -arch flags.
> !     ac_prev=
> !     for ac_word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
> !       if test -n "$ac_prev"; then
> !         case $ac_word in
> !           i386 | x86_64 | ppc | ppc64) ac_cv_c_bigendian=universal ;;
> !         esac
> !         ac_prev=
> !       else
> !         if test "x$ac_word" = "x-arch"; then

Can the argument to -arch be specified with an =, rather than as the next
argument, in which case this doesn't work?

> !           ac_prev=arch
> !         fi
> !       fi
> !     done])

Wouldn't this also do the trick, by narrowing the search to an argument
that starts with -arch, without resorting to an iteration over arguments?

case " $CC $CFLAGS $CPPFLAGS $LDFLAGS" in  #(
  *\ -arch*ppc* | *\ -arch*i386* | *\ -arch*x86_64*)
    ac_cv_c_bigendian=universal;;
esac

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklUXDYACgkQ84KuGfSFAYCNZgCcC5Z7LdX4eWWC//IiOAEcUzeD
3vgAoNYsNzjguZx938sieH0X55+fx29g
=UWvJ
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]