aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-16 15:34:59 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-16 15:34:59 +0100
commitd5b526c6e12744a92b7d2f3ca4facb250a33f7bd (patch)
tree06b883b61991887cfc0d8ad5ca75ab7e07e5e756
parentf7035feccdcf5eed83f24119a26bc7d73b1df4b9 (diff)
downloadpaludis-d5b526c6e12744a92b7d2f3ca4facb250a33f7bd.tar.gz
paludis-d5b526c6e12744a92b7d2f3ca4facb250a33f7bd.tar.xz
gcc <4.5.1 needs -fno-deduce-init-list
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8129434..21f2bc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -415,6 +415,28 @@ AC_PREPROC_IFELSE([
],
[AC_MSG_RESULT([no])])
+AC_MSG_CHECKING([whether we need -fno-deduce-init-list])
+AC_PREPROC_IFELSE([
+#ifndef __GNUC__
+# error not gcc
+#endif
+
+#if __GNUC__ != 4
+# error not gcc 4
+#endif
+
+#if __GNUC_MINOR__ == 4
+#elif __GNUC_MINOR__ == 5 && __GNUC_PATCHLEVEL__ == 0
+#else
+# error not 4.4 or 4.5.0
+#endif
+],
+ [AC_MSG_RESULT([yes])
+ PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -fno-deduce-init-list"
+ PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -fno-deduce-init-list"
+ ],
+ [AC_MSG_RESULT([no])])
+
PALUDIS_CXXFLAGS_WITHOUT_PEDANTIC=$PALUDIS_CXXFLAGS
AC_MSG_CHECKING([for 'extern template' support])