Add support for Metrowerks compilers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ae5e1dcb68
commit
9598655399
154
configure
vendored
154
configure
vendored
@ -11359,6 +11359,78 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
echo "$as_me:$LINENO: checking whether we are using the Metrowerks C compiler" >&5
|
||||
echo $ECHO_N "checking whether we are using the Metrowerks C compiler... $ECHO_C" >&6
|
||||
if test "${bakefile_cv_c_compiler_mwerks+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef __MWERKS__
|
||||
choke me
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
bakefile_compiler_mwerks=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
bakefile_compiler_mwerks=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
bakefile_cv_c_compiler_mwerks=$bakefile_compiler_mwerks
|
||||
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $bakefile_cv_c_compiler_mwerks" >&5
|
||||
echo "${ECHO_T}$bakefile_cv_c_compiler_mwerks" >&6
|
||||
|
||||
MWCC=`test $bakefile_compiler_mwerks = yes && echo yes`
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
@ -12023,6 +12095,79 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
ac_ext=cc
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
echo "$as_me:$LINENO: checking whether we are using the Metrowerks C++ compiler" >&5
|
||||
echo $ECHO_N "checking whether we are using the Metrowerks C++ compiler... $ECHO_C" >&6
|
||||
if test "${bakefile_cv_cxx_compiler_mwerks+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef __MWERKS__
|
||||
choke me
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
bakefile_compiler_mwerks=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
bakefile_compiler_mwerks=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
bakefile_cv_cxx_compiler_mwerks=$bakefile_compiler_mwerks
|
||||
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $bakefile_cv_cxx_compiler_mwerks" >&5
|
||||
echo "${ECHO_T}$bakefile_cv_cxx_compiler_mwerks" >&6
|
||||
|
||||
MWCXX=`test $bakefile_compiler_mwerks = yes && echo yes`
|
||||
ac_ext=cc
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@ -12597,8 +12742,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for strcasecmp() in string.h" >&5
|
||||
echo "$as_me:$LINENO: checking for strcasecmp() in string.h" >&5
|
||||
echo $ECHO_N "checking for strcasecmp() in string.h... $ECHO_C" >&6
|
||||
if test "${ac_cv_string_strcasecmp+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
@ -38593,6 +38737,12 @@ CPPFLAGS=`echo $WXDEBUG_DEFINE $INCLUDES $CPPFLAGS`
|
||||
CFLAGS=`echo $CODE_GEN_FLAGS $EXTRA_CFLAGS $CFLAGS $CWARNINGS`
|
||||
CXXFLAGS=`echo $CODE_GEN_FLAGS $CODE_GEN_FLAGS_CXX $EXTRA_CFLAGS $CXXFLAGS $CXXWARNINGS`
|
||||
|
||||
if test "x$MWCC" = "xyes"; then
|
||||
|
||||
CC="$CC -cwd source -I-"
|
||||
CXX="$CXX -cwd source -I-"
|
||||
fi
|
||||
|
||||
|
||||
LIBS=`echo $LIBS`
|
||||
EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
|
||||
|
17
configure.in
17
configure.in
@ -1354,6 +1354,7 @@ dnl default CFLAGS (something like "-g -O2") -- we don't need this as we add
|
||||
dnl -g and -O flags ourselves below
|
||||
CFLAGS=${CFLAGS:=}
|
||||
AC_PROG_CC
|
||||
AC_BAKEFILE_PROG_MWCC
|
||||
|
||||
dnl is -traditional needed for correct compilations
|
||||
dnl adds -traditional for gcc if needed
|
||||
@ -1371,6 +1372,7 @@ dnl
|
||||
dnl see CFLAGS line above
|
||||
CXXFLAGS=${CXXFLAGS:=}
|
||||
AC_PROG_CXX
|
||||
AC_BAKEFILE_PROG_MWCXX
|
||||
|
||||
AC_LANG_RESTORE
|
||||
|
||||
@ -6138,6 +6140,21 @@ CPPFLAGS=`echo $WXDEBUG_DEFINE $INCLUDES $CPPFLAGS`
|
||||
CFLAGS=`echo $CODE_GEN_FLAGS $EXTRA_CFLAGS $CFLAGS $CWARNINGS`
|
||||
CXXFLAGS=`echo $CODE_GEN_FLAGS $CODE_GEN_FLAGS_CXX $EXTRA_CFLAGS $CXXFLAGS $CXXWARNINGS`
|
||||
|
||||
if test "x$MWCC" = "xyes"; then
|
||||
dnl Correct MW 8.3 to be more similar to GCC. In particular we
|
||||
dnl must use <regex.h> from system not our local copy on OS X,
|
||||
dnl but must use local not system on OS 9.
|
||||
dnl The following should make all -I paths usable for <> includes
|
||||
dnl while first checking in real system paths. With 8.3 using
|
||||
dnl -gccincludes it will actually check local paths before system
|
||||
dnl even for <> which is totally wrong.
|
||||
|
||||
dnl Note that because this absolutely needs to be before any -I
|
||||
dnl that we have to tack it on to the end of the compiler commandline.
|
||||
CC="$CC -cwd source -I-"
|
||||
CXX="$CXX -cwd source -I-"
|
||||
fi
|
||||
|
||||
|
||||
LIBS=`echo $LIBS`
|
||||
EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
|
||||
|
Loading…
Reference in New Issue
Block a user