# HG changeset patch # User Stephen J. Turnbull # Date 1224928743 -32400 # Node ID bd1fbed783dd4440c1eec52e61492f4253c32c50 # Parent 1af222c7586991f690ea06d1b8c75fb5a6a0a352 Improve g++ detection. diff -r 1af222c75869 -r bd1fbed783dd ChangeLog --- a/ChangeLog Mon May 21 05:02:43 2007 +0000 +++ b/ChangeLog Sat Oct 25 18:59:03 2008 +0900 @@ -1,3 +1,7 @@ +2008-10-25 Stephen J. Turnbull + + * configure.ac (xemacs_cc_cc_mismatch): Improve g++ detection. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. diff -r 1af222c75869 -r bd1fbed783dd configure.ac --- a/configure.ac Mon May 21 05:02:43 2007 +0000 +++ b/configure.ac Sat Oct 25 18:59:03 2008 +0900 @@ -2236,18 +2236,25 @@ dnl If we're specifying XEMACS_CC, it'd better be in the same family dnl as CC or the following flag calculations are bogus. -dnl #### We may want to actually error and abort here, but I am not sure. +dnl No error/abort; detection is too fragile. + +xemacs_cc_cc_mismatch=no if test "$CC" != "$XEMACS_CC"; then - if test "$XEMACS_CC" = "g++" -a "$GCC" != "yes"; then - AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong]) - xemacs_cc_cc_mismatch=yes - elif test -n "$GCC" -a "$XEMACS_CC" != "g++"; then - AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong]) - xemacs_cc_cc_mismatch=yes + case "$XEMACS_CC" in + *g++* ) + if test "$GCC" != "yes"; then + AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong]) + xemacs_cc_cc_mismatch=yes ;; + esac + if test -n "$GCC"; then + case $XEMACS_CC in + *g++* ) + ;; + * ) + AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong]) + xemacs_cc_cc_mismatch=yes ;; + esac dnl #### Add other detectable mismatches here. - else - xemacs_cc_cc_mismatch=no - fi fi dnl Calculate optimization flags. These will be off by default in beta