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: Mon, 29 Dec 2008 23:21:09 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Bruno Haible <bruno <at> clisp.org> writes:

> Here is a revised proposed patch:
> 
> 2008-12-26  Bruno Haible  <bruno <at> clisp.org>
> 
>       * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Make detection of options
>       indicating a universal build more reliable.

With Ralf's approval of your patch, I've just pushed a variant of your patch.

> +     for ac_word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do

Unneeded {}.  Should we also add CXX and CXXFLAGS to this list (as a separate 
patch)?

> +       if test -n "$ac_prev"; then
> +         case $ac_word in
> +           i?86 | x86_64 | ppc | ppc64)
> +             if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
> +               ac_arch="$ac_word"

Unneeded ""; you may like it (and it doesn't hurt), but the overall autoconf 
style tends not to use it.

> +             else
> +               ac_cv_c_bigendian=universal

Added a break here, to quit the loop early.

> +             fi
> +             ;;
> +         esac
> +         ac_prev=
> +       else
> +         if test "x$ac_word" = "x-arch"; then

Merged into an elif.

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

-- 
Eric Blake







reply via email to

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