[lbtt] Adjust to support the Intel compiler (icpc).
* configure.ac: Adjust to call...
* m4/intel.m4: ...this new macro.
* Makefile.am: Add the directory `m4' as an includedir of
autoconf's macros.
This commit is contained in:
parent
bf925aaeeb
commit
b3e8797c51
4 changed files with 61 additions and 1 deletions
|
|
@ -1,3 +1,12 @@
|
|||
2009-06-12 Guillaume Sadegh <sadegh@lrde.epita.fr>
|
||||
|
||||
Adjust to support the Intel compiler (icpc).
|
||||
|
||||
* configure.ac: Adjust to call...
|
||||
* m4/intel.m4: ...this new macro.
|
||||
* Makefile.am: Add the directory `m4' as an includedir of
|
||||
autoconf's macros.
|
||||
|
||||
2009-05-31 Alexandre Duret-Lutz <adl@gnu.org>
|
||||
|
||||
Adjust parser to Bison 2.4.1.
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
SUBDIRS = doc src
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ AC_PROG_CXX
|
|||
AC_PROG_CXXCPP
|
||||
AM_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
|
||||
lbtt_INTEL
|
||||
|
||||
|
||||
# Check whether the user has explicitly disabled support for the GNU readline
|
||||
|
|
|
|||
50
lbtt/m4/intel.m4
Normal file
50
lbtt/m4/intel.m4
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
|
||||
dnl Adapted from the predefined _AC_LANG_COMPILER_GNU.
|
||||
m4_define([_AC_LANG_COMPILER_INTEL],
|
||||
[AC_CACHE_CHECK([whether we are using the INTEL _AC_LANG compiler],
|
||||
[ac_cv_[]_AC_LANG_ABBREV[]_compiler_intel],
|
||||
[
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __INTEL_COMPILER
|
||||
choke me
|
||||
#endif
|
||||
]])],
|
||||
[ac_compiler_intel=yes],
|
||||
[ac_compiler_intel=no])
|
||||
ac_cv_[]_AC_LANG_ABBREV[]_compiler_intel=$ac_compiler_intel
|
||||
])])# _AC_LANG_COMPILER_INTEL
|
||||
|
||||
dnl The list of warnings that must be disabled.
|
||||
m4_define([_INTEL_IGNORE_WARNINGS],
|
||||
[ 913 dnl Warn when multibyte character are used (for example "Büchi").
|
||||
]) # _INTEL_IGNORE_WARNINGS
|
||||
|
||||
dnl Add extra flags when icpc is used.
|
||||
AC_DEFUN([lbtt_INTEL],
|
||||
[_AC_LANG_COMPILER_INTEL
|
||||
AC_CACHE_CHECK([to add extra CXXFLAGS for the INTEL C++ compiler],
|
||||
[ac_cv_intel_cxxflags],
|
||||
[ dnl
|
||||
if test x"$ac_compiler_intel" = x"yes"; then
|
||||
# -W does not exist for icpc in CXXFLAGS.
|
||||
CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-W[[[:space:]]]//g;s/-W$//'`
|
||||
|
||||
disabled_warnings=''
|
||||
for warning in _INTEL_IGNORE_WARNINGS; do
|
||||
disabled_warnings="$disabled_warnings,$warning"
|
||||
done
|
||||
|
||||
# Remove the extra "," and extra whitespaces.
|
||||
disabled_warnings=`echo "$disabled_warnings" | sed "s/^,//;s/[[[:space:]]]//g"`
|
||||
|
||||
INTEL_CXXFLAGS="-w1 -Werror -wd${disabled_warnings}"
|
||||
|
||||
# Even if the icpc preprocessor defines __GNUC__, it is not a GNU compiler.
|
||||
GXX=
|
||||
CXXFLAGS="$CXXFLAGS $INTEL_CXXFLAGS"
|
||||
|
||||
[ac_cv_intel_cxxflags="$INTEL_CXXFLAGS"]
|
||||
else
|
||||
[ac_cv_intel_cxxflags="no extra flags"]
|
||||
fi])
|
||||
AC_SUBST([INTEL_CXXFLAGS])
|
||||
]) # lbtt_INTEL
|
||||
Loading…
Add table
Add a link
Reference in a new issue