Hi, In AC_C_BIGENDIAN there is code like this:
case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac This means, simply by setting CPPFLAGS="-I/opt/gnu-arch/i386-apple-darwin/include", my builds will be treated as universal! Likewise for -L options in LDFLAGS. Argh. Here is a proposed fix: 2008-12-25 Bruno Haible <br...@clisp.org> * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Make detection of options indicating a universal build more reliable. *** lib/autoconf/c.m4.orig 2008-12-25 13:57:49.000000000 +0100 --- lib/autoconf/c.m4 2008-12-25 13:57:32.000000000 +0100 *************** *** 1312,1322 **** ]])], [ # Check for potential -arch flags. It is not universal unless ! # there are some -arch flags. Note that *ppc* also matches ! # ppc64. This check is also rather less than ideal. ! case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( ! *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; ! esac]) if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. AC_COMPILE_IFELSE( --- 1313,1332 ---- ]])], [ # 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 ! ac_prev=arch ! fi ! fi ! done]) if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. AC_COMPILE_IFELSE(