configure.diff   [plain text]


--- configure.orig	2013-12-15 17:29:21.000000000 -0800
+++ configure	2013-12-15 17:30:05.000000000 -0800
@@ -5050,7 +5050,7 @@ if test "$GCC" = yes; then
 esac
 	done; }
 else
-    linker_flag=
+    linker_flag=-Wl,
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker is GNU ld" >&5
@@ -5107,8 +5107,8 @@ fi
 
 # RUBY_UNIVERSAL_ARCH begin
 ARCH_FLAG=`expr " $CFLAGS " : '.* \(-m[0-9][0-9]*\) '`
-test ${CFLAGS+set} && CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-arch  *^ *//g' -e 's/ *-m32//g' -e 's/ *-m64//g'`
-test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-arch  *^ *//g' -e 's/ *-m32//g' -e 's/ *-m64//g'`
+test ${CFLAGS+set} && CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-arch  *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'`
+test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-arch  *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'`
 unset universal_binary universal_archnames
 if test ${target_archs+set}; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking target architectures" >&5
@@ -5135,13 +5135,7 @@ $as_echo "failed" >&6; }
 esac
     done
     target_archs="$universal_binary"
-    unset universal_binary
-    case "$target_archs" in #(
-  *,*) :
-    universal_binary=yes ;; #(
-  *) :
-    unset universal_archnames ;;
-esac
+    universal_binary=yes
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_archs" >&5
 $as_echo "$target_archs" >&6; }
 
@@ -8841,20 +8835,15 @@ else
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-	# Check for potential -arch flags.  It is not universal unless
-	# there are at least two -arch flags with different values.
+	# Check for potential -arch flags.  It is then universal.
 	ac_arch=
 	ac_prev=
 	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
 	 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
-	       else
 		 ac_cv_c_bigendian=universal
 		 break
-	       fi
 	       ;;
 	   esac
 	   ac_prev=