aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-04-25 15:04:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-04-25 15:04:26 +0000
commita60a5abb81ef0c2d61e4d0221bd214c42a8f4651 (patch)
tree64c378754b3052a97a6996b62cdec4eeea925bcd
parent837e53ecaee7d786c6c1890596796295f82ed8fa (diff)
downloadpaludis-a60a5abb81ef0c2d61e4d0221bd214c42a8f4651.tar.gz
paludis-a60a5abb81ef0c2d61e4d0221bd214c42a8f4651.tar.xz
icc hates -pedantic
-rw-r--r--configure.ac28
1 files changed, 16 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 6bae47e..7334764 100644
--- a/configure.ac
+++ b/configure.ac
@@ -713,21 +713,25 @@ else
fi
AC_MSG_RESULT([${cxxflags_message}])
-if test x$CAN_USE_EXTERN_TEMPLATE = xyes ; then
- AC_MSG_CHECKING([whether -pedantic works if we use extern template])
- save_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS -pedantic"
- AC_COMPILE_IFELSE([
+AC_MSG_CHECKING([whether -pedantic works if we use extern template])
+if test "x${cxx_compiler_icc}" = "xyes" ; then
+ AC_MSG_RESULT([no, icc doesn't do pedantic])
+else
+ if test x$CAN_USE_EXTERN_TEMPLATE = xyes ; then
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS -pedantic"
+ AC_COMPILE_IFELSE([
template <typename T_> struct S { };
extern template struct S<int>;
-],
- [AC_MSG_RESULT([yes])
- CHECK_CXXFLAG([-pedantic])],
- [AC_MSG_RESULT([no])])
-else
- CHECK_CXXFLAG([-pedantic])
+ ],
+ [AC_MSG_RESULT([yes])
+ CHECK_CXXFLAG([-pedantic])],
+ [AC_MSG_RESULT([no])])
+ else
+ CHECK_CXXFLAG([-pedantic])
+ fi
+ CXXFLAGS=$save_CXXFLAGS
fi
-CXXFLAGS=$save_CXXFLAGS
AC_SUBST([PALUDIS_CXXFLAGS])
AC_SUBST([PALUDIS_CXXFLAGS_WITHOUT_PEDANTIC])