add Intel compiler detection

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-25 14:31:09 +00:00
parent 3b96fc2f1b
commit ab0ad5f175
2 changed files with 218 additions and 34 deletions

View File

@@ -97,6 +97,10 @@ AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER],
fi
])
dnl recent versions of SGI mipsPro compiler define _SGI_COMPILER_VERSION
dnl
dnl NB: old versions define _COMPILER_VERSION but this could probably be
dnl defined by other compilers too so don't test for it to be safe
AC_DEFUN([AC_BAKEFILE_PROG_SGICC],
[
_AC_BAKEFILE_LANG_COMPILER(SGI, C, _SGI_COMPILER_VERSION, SGICC=yes)
@@ -107,18 +111,27 @@ AC_DEFUN([AC_BAKEFILE_PROG_SGICXX],
_AC_BAKEFILE_LANG_COMPILER(SGI, C++, _SGI_COMPILER_VERSION, SGICXX=yes)
])
dnl Loosely based on autoconf AC_PROG_CC
dnl Sun compiler defines __SUNPRO_C/__SUNPRO_CC
AC_DEFUN([AC_BAKEFILE_PROG_SUNCC],
[
_AC_BAKEFILE_LANG_COMPILER(Sun, C, __SUNPRO_C, SUNCC=yes)
])
dnl Loosely based on autoconf AC_PROG_CC
AC_DEFUN([AC_BAKEFILE_PROG_SUNCXX],
[
_AC_BAKEFILE_LANG_COMPILER(Sun, C++, __SUNPRO_CC, SUNCXX=yes)
])
dnl Intel icc compiler defines __INTEL_COMPILER for both C and C++
AC_DEFUN([AC_BAKEFILE_PROG_INTELCC],
[
_AC_BAKEFILE_LANG_COMPILER(Intel, C, __INTEL_COMPILER, INTELCC=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX],
[
_AC_BAKEFILE_LANG_COMPILER(Intel, C++, __INTEL_COMPILER, INTELCXX=yes)
])
dnl ===========================================================================
dnl macros to detect specialty compiler options
@@ -166,30 +179,37 @@ dnl ===========================================================================
AC_DEFUN([AC_BAKEFILE_PROG_CC],
[
AC_PROG_CC
AC_BAKEFILE_METROWERKS_EXTO
dnl By the time we find out that we need -ext o some tests have failed.
if test "x$wx_cv_c_exto" '!=' "x"; then
unset ac_cv_prog_cc_g
_AC_PROG_CC_G
AC_BAKEFILE_PROG_INTELCC
dnl if we're using gcc, we can't be using any of incompatible compilers
if test "x$GCC" != "xyes"; then
AC_BAKEFILE_METROWERKS_EXTO
dnl By the time we find out that we need -ext o some tests have failed.
if test "x$wx_cv_c_exto" '!=' "x"; then
unset ac_cv_prog_cc_g
_AC_PROG_CC_G
fi
AC_BAKEFILE_PROG_MWCC
AC_BAKEFILE_PROG_XLCC
AC_BAKEFILE_PROG_SGICC
AC_BAKEFILE_PROG_SUNCC
fi
AC_BAKEFILE_PROG_MWCC
AC_BAKEFILE_PROG_XLCC
AC_BAKEFILE_PROG_SGICC
AC_BAKEFILE_PROG_SUNCC
])
AC_DEFUN([AC_BAKEFILE_PROG_CXX],
[
AC_PROG_CXX
AC_BAKEFILE_METROWERKS_EXTO
dnl By the time we find out that we need -ext o some tests have failed.
if test "x$wx_cv_cxx_exto" '!=' "x"; then
unset ac_cv_prog_cxx_g
_AC_PROG_CXX_G
AC_BAKEFILE_PROG_INTELCXX
if test "x$GXX" != "xyes"; then
AC_BAKEFILE_METROWERKS_EXTO
dnl By the time we find out that we need -ext o some tests have failed.
if test "x$wx_cv_cxx_exto" '!=' "x"; then
unset ac_cv_prog_cxx_g
_AC_PROG_CXX_G
fi
AC_BAKEFILE_PROG_MWCXX
AC_BAKEFILE_PROG_XLCXX
AC_BAKEFILE_PROG_SGICXX
AC_BAKEFILE_PROG_SUNCXX
fi
AC_BAKEFILE_PROG_MWCXX
AC_BAKEFILE_PROG_XLCXX
AC_BAKEFILE_PROG_SGICXX
AC_BAKEFILE_PROG_SUNCXX
])

192
configure vendored
View File

@@ -11644,7 +11644,88 @@ 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 if the C compiler requires -ext o" >&5
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 Intel C compiler" >&5
echo $ECHO_N "checking whether we are using the Intel C compiler... $ECHO_C" >&6
if test "${bakefile_cv_c_compiler___INTEL_COMPILER+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 __INTEL_COMPILER
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_cv_c_compiler___INTEL_COMPILER=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
bakefile_cv_c_compiler___INTEL_COMPILER=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bakefile_cv_c_compiler___INTEL_COMPILER" >&5
echo "${ECHO_T}$bakefile_cv_c_compiler___INTEL_COMPILER" >&6
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
if test "x$bakefile_cv_c_compiler___INTEL_COMPILER" = "xyes"; then
:; INTELCC=yes
else
:;
fi
if test "x$GCC" != "xyes"; then
echo "$as_me:$LINENO: checking if the C compiler requires -ext o" >&5
echo $ECHO_N "checking if the C compiler requires -ext o... $ECHO_C" >&6
if test "${wx_cv_c_exto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11702,9 +11783,9 @@ if test "x$wx_cv_c_exto" '!=' "x"; then
fi
fi
if test "x$wx_cv_c_exto" '!=' "x"; then
unset ac_cv_prog_cc_g
ac_test_CFLAGS=${CFLAGS+set}
if test "x$wx_cv_c_exto" '!=' "x"; then
unset ac_cv_prog_cc_g
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
@@ -11774,8 +11855,8 @@ else
CFLAGS=
fi
fi
fi
ac_ext=c
fi
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'
@@ -11847,7 +11928,7 @@ 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_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'
@@ -12079,6 +12160,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
fi
ac_ext=c
@@ -12745,7 +12827,88 @@ 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 if the C++ compiler requires -ext o" >&5
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 Intel C++ compiler" >&5
echo $ECHO_N "checking whether we are using the Intel C++ compiler... $ECHO_C" >&6
if test "${bakefile_cv_cxx_compiler___INTEL_COMPILER+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 __INTEL_COMPILER
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_cv_cxx_compiler___INTEL_COMPILER=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
bakefile_cv_cxx_compiler___INTEL_COMPILER=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bakefile_cv_cxx_compiler___INTEL_COMPILER" >&5
echo "${ECHO_T}$bakefile_cv_cxx_compiler___INTEL_COMPILER" >&6
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
if test "x$bakefile_cv_cxx_compiler___INTEL_COMPILER" = "xyes"; then
:; INTELCXX=yes
else
:;
fi
if test "x$GXX" != "xyes"; then
echo "$as_me:$LINENO: checking if the C++ compiler requires -ext o" >&5
echo $ECHO_N "checking if the C++ compiler requires -ext o... $ECHO_C" >&6
if test "${wx_cv_cxx_exto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12803,9 +12966,9 @@ if test "x$wx_cv_cxx_exto" '!=' "x"; then
fi
fi
if test "x$wx_cv_cxx_exto" '!=' "x"; then
unset ac_cv_prog_cxx_g
ac_test_CXXFLAGS=${CXXFLAGS+set}
if test "x$wx_cv_cxx_exto" '!=' "x"; then
unset ac_cv_prog_cxx_g
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
@@ -12875,8 +13038,8 @@ else
CXXFLAGS=
fi
fi
fi
ac_ext=cc
fi
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'
@@ -12948,7 +13111,7 @@ 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_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'
@@ -13180,6 +13343,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
fi
ac_ext=c