aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-08-27 15:52:12 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-08-27 15:52:12 +0100
commit703221a79ab2b300919f50d655a5cf2138cac862 (patch)
tree103bd184219e094e19437cc3f0f4ef8c17fa23d3
parent139609acd9481b079bec619a6ed80fa636cab0d4 (diff)
downloadpaludis-703221a79ab2b300919f50d655a5cf2138cac862.tar.gz
paludis-703221a79ab2b300919f50d655a5cf2138cac862.tar.xz
Pickier checks for c++0x 'extern template' support
See gcc bug 37256.
-rw-r--r--configure.ac25
1 files changed, 21 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index ed60585..2b7b810 100644
--- a/configure.ac
+++ b/configure.ac
@@ -460,7 +460,7 @@ dnl }}}
dnl {{{ check whether we can do extern template
CAN_USE_EXTERN_TEMPLATE=
-AC_MSG_CHECKING([whether we can use extern template])
+AC_MSG_CHECKING([for c++0x 'extern template' support])
AC_COMPILE_IFELSE([
template <typename T_> class S
{
@@ -471,9 +471,26 @@ extern template struct S<int>;
template struct S<int>;
],
[AC_MSG_RESULT([yes])
- CAN_USE_EXTERN_TEMPLATE=yes
- PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_HAVE_EXTERN_TEMPLATE=1"
- PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_HAVE_EXTERN_TEMPLATE=1"
+ AC_MSG_CHECKING([whether c++0x 'extern template' works as we expect])
+ AC_COMPILE_IFELSE([
+template <typename T_> struct B
+{
+ T_ f();
+};
+extern template class B<int>;
+void f()
+{
+ B<int> t;
+ t.f();
+}
+],
+ [AC_MSG_RESULT([yes])
+ CAN_USE_EXTERN_TEMPLATE=yes
+ PALUDIS_CXXFLAGS="${PALUDIS_CXXFLAGS} -DPALUDIS_HAVE_EXTERN_TEMPLATE=1"
+ PALUDIS_PC_CFLAGS="${PALUDIS_PC_CFLAGS} -DPALUDIS_HAVE_EXTERN_TEMPLATE=1"
+ ],
+ [AC_MSG_RESULT([no, your compiler is weird])
+ ])
],
[AC_MSG_RESULT([no])])
dnl }}}