aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-19 13:40:49 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-19 13:40:49 +0000
commite9e0c208e356fa1e766b66ba948a8cb8ed48a609 (patch)
tree70df04c0cbb8b7390fd1cea9c895700ea3efd525
parent077a83d316b765757561693efa8df062cb760581 (diff)
downloadpaludis-e9e0c208e356fa1e766b66ba948a8cb8ed48a609.tar.gz
paludis-e9e0c208e356fa1e766b66ba948a8cb8ed48a609.tar.xz
Catch b0rked compilers early on. See: ticket:401
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8014960..e93cb36 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,6 +151,22 @@ int main(int, char **)
])
dnl }}}
+dnl {{{ check for namespace aliasing
+AC_MSG_CHECKING([whether your compiler has referencing issues])
+AC_COMPILE_IFELSE([
+namespace n
+{
+ int x = 0;
+ int & r_x = x;
+}
+
+using n::r_x;
+],
+ [AC_MSG_RESULT([no])],
+ [AC_MSG_RESULT([yes])
+ AC_MSG_ERROR([Your compiler is b0rked (GCC bug 31899?)])])
+dnl }}}
+
dnl {{{ check for hashes
AC_MSG_CHECKING([for hashed associative containers])
AC_COMPILE_IFELSE([