From 254446f555a23a830d4b26972c1fdbad000d815b Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 6 Apr 2009 17:25:28 +0000 Subject: [PATCH] * configure.in (CFLAGS, CXXFLAGS): need ARCH_FLAG for universal binary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ configure.in | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d85add3fe9..70b86dc850 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Apr 7 02:25:26 2009 Nobuyoshi Nakada + + * configure.in (CFLAGS, CXXFLAGS): need ARCH_FLAG for universal + binary. + Tue Apr 7 01:08:21 2009 Nobuyoshi Nakada * numeric.c (flo_to_s): reduce fragments if no precision lost. diff --git a/configure.in b/configure.in index 10b4e76e8c..497fc7b716 100644 --- a/configure.in +++ b/configure.in @@ -348,8 +348,8 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then warnflags="-Wall -Wno-unused-parameter -Wno-parentheses ${warnflags+$warnflags }-Wpointer-arith -Wwrite-strings" fi -test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && CFLAGS="`eval echo $cflags`" -test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && CXXFLAGS="`eval echo $cxxflags`" +test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ARCH_FLAG\"" +test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cxxflags $ARCH_FLAG\"" dnl check for large file stuff mv confdefs.h confdefs1.h @@ -2187,11 +2187,11 @@ if test "${universal_binary-no}" = yes ; then ], [ AC_MSG_RESULT(no) archflagpat=`eval echo '"'"${ARCH_FLAG}"'"' | sed 's/[[][|.*]]/\\&/g'` - cflags=`echo "$CFLAGS" | sed "s|$archflagpat"'||'` + new_cflags=`echo "$CFLAGS" | sed "s|$archflagpat"'||'` for archs in ${universal_archnames}; do cpu=${archs#*=} archs=${archs%=*} - CFLAGS="$cflags -arch $archs" + CFLAGS="$new_cflags -arch $archs" archs="__${archs}__" AC_MSG_CHECKING([for macro ${archs} on ${cpu}]) AC_TRY_COMPILE([@%:@ifndef ${archs}