comparison configure.ac @ 4510:bd1fbed783dd ac-fix-2008-10-25

Improve g++ detection.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 25 Oct 2008 18:59:03 +0900
parents 6cd3955b7e4d
children 66411359ce4e
comparison
equal deleted inserted replaced
3975:1af222c75869 4510:bd1fbed783dd
2234 test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system) 2234 test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system)
2235 fi 2235 fi
2236 2236
2237 dnl If we're specifying XEMACS_CC, it'd better be in the same family 2237 dnl If we're specifying XEMACS_CC, it'd better be in the same family
2238 dnl as CC or the following flag calculations are bogus. 2238 dnl as CC or the following flag calculations are bogus.
2239 dnl #### We may want to actually error and abort here, but I am not sure. 2239 dnl No error/abort; detection is too fragile.
2240
2241 xemacs_cc_cc_mismatch=no
2240 if test "$CC" != "$XEMACS_CC"; then 2242 if test "$CC" != "$XEMACS_CC"; then
2241 if test "$XEMACS_CC" = "g++" -a "$GCC" != "yes"; then 2243 case "$XEMACS_CC" in
2242 AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong]) 2244 *g++* )
2243 xemacs_cc_cc_mismatch=yes 2245 if test "$GCC" != "yes"; then
2244 elif test -n "$GCC" -a "$XEMACS_CC" != "g++"; then 2246 AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong])
2245 AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong]) 2247 xemacs_cc_cc_mismatch=yes ;;
2246 xemacs_cc_cc_mismatch=yes 2248 esac
2249 if test -n "$GCC"; then
2250 case $XEMACS_CC in
2251 *g++* )
2252 ;;
2253 * )
2254 AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong])
2255 xemacs_cc_cc_mismatch=yes ;;
2256 esac
2247 dnl #### Add other detectable mismatches here. 2257 dnl #### Add other detectable mismatches here.
2248 else
2249 xemacs_cc_cc_mismatch=no
2250 fi
2251 fi 2258 fi
2252 2259
2253 dnl Calculate optimization flags. These will be off by default in beta 2260 dnl Calculate optimization flags. These will be off by default in beta
2254 dnl versions and on in release versions. 2261 dnl versions and on in release versions.
2255 2262