3083 | | { echo "$as_me:$LINENO: checking for which Mac OSX -arch flags are supported" >&5 |
3084 | | echo $ECHO_N "checking for which Mac OSX -arch flags are supported... $ECHO_C" >&6; } |
3085 | | valid_arch_flags="" |
3086 | | found_arch_flags="" |
3087 | | arch_flags="ppc ppc64 x86_64 i386" |
3088 | | for a in $arch_flags; do |
3089 | | save_ldflags="$LDFLAGS" |
3090 | | LDFLAGS="$LDFLAGS -arch $a" |
3091 | | cat >conftest.$ac_ext <<_ACEOF |
3092 | | /* confdefs.h. */ |
3093 | | _ACEOF |
3094 | | cat confdefs.h >>conftest.$ac_ext |
3095 | | cat >>conftest.$ac_ext <<_ACEOF |
3096 | | /* end confdefs.h. */ |
3097 | | #include <stdio.h> |
3098 | | int |
3099 | | main () |
3100 | | { |
3101 | | exit(0) |
3102 | | ; |
3103 | | return 0; |
3104 | | } |
3105 | | _ACEOF |
3106 | | rm -f conftest.$ac_objext conftest$ac_exeext |
3107 | | if { (ac_try="$ac_link" |
3108 | | case "(($ac_try" in |
3109 | | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
3110 | | *) ac_try_echo=$ac_try;; |
3111 | | esac |
3112 | | eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
3113 | | (eval "$ac_link") 2>conftest.er1 |
3114 | | ac_status=$? |
3115 | | grep -v '^ *+' conftest.er1 >conftest.err |
3116 | | rm -f conftest.er1 |
3117 | | cat conftest.err >&5 |
3118 | | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3119 | | (exit $ac_status); } && { |
3120 | | test -z "$ac_c_werror_flag" || |
3121 | | test ! -s conftest.err |
3122 | | } && test -s conftest$ac_exeext && |
3123 | | $as_test_x conftest$ac_exeext; then |
3124 | | valid_arch_flags="$valid_arch_flags -arch $a";found_arch_flags="$found_arch_flags $a" |
3125 | | else |
3126 | | echo "$as_me: failed program was:" >&5 |
3127 | | sed 's/^/| /' conftest.$ac_ext >&5 |
3128 | | |
3129 | | a="$a" |
3130 | | |
3131 | | fi |
3132 | | |
3133 | | rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ |
3134 | | conftest$ac_exeext conftest.$ac_ext |
3135 | | LDFLAGS="$save_ldflags" |
3136 | | done |
3137 | | { echo "$as_me:$LINENO: result: $found_arch_flags" >&5 |
3138 | | echo "${ECHO_T}$found_arch_flags" >&6; } |
3139 | | |
3140 | | |
3141 | | SYS_DEFS="$valid_arch_flags" |
3142 | | EEXTRA="$valid_arch_flags" |