aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-18 15:40:43 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-18 15:40:43 +0000
commit2888ddd75968caa7445f79db65ea4d78c5f34778 (patch)
tree49e8b107fe197a119bb99da5528f1048d53bf432
parent85bf661d895f01efeb8bc94b593a89af7bd86aca (diff)
downloadpaludis-2888ddd75968caa7445f79db65ea4d78c5f34778.tar.gz
paludis-2888ddd75968caa7445f79db65ea4d78c5f34778.tar.xz
gcc 4.1 wants -Wno-non-virtual-dtor
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6b103f0..25b252d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -729,6 +729,29 @@ else
fi
AC_MSG_RESULT([${cxxflags_message}])
+AC_MSG_CHECKING([whether we want -Wno-non-virtual-dtor to work around compiler silliness])
+AC_COMPILE_IFELSE([
+#ifndef __GNUC__
+# error not gcc
+#endif
+
+#if __GNUC__ != 4
+# error not gcc 4
+#endif
+
+#if __GNUC_MINOR__ != 1
+# error not gcc 4.1
+#endif
+
+int main(int, char **)
+{
+}
+],
+ [AC_MSG_RESULT([yes])
+ PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -Wnon-virtual-dtor"
+ ],
+ [AC_MSG_RESULT([no])])
+
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])