aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-22 10:38:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-22 10:38:40 +0000
commitcac99b2cbe66cc254098be9eb859973a1d3b2b3c (patch)
tree5411b408cd2f87b3cb34567ee28313c102f5b767
parent5445a304d47ad6809e11708b96e1af3852547b5f (diff)
downloadpaludis-cac99b2cbe66cc254098be9eb859973a1d3b2b3c.tar.gz
paludis-cac99b2cbe66cc254098be9eb859973a1d3b2b3c.tar.xz
Random tinkering.
-rw-r--r--configure.ac25
1 files changed, 13 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index cc38d7e..df54679 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,10 +89,19 @@ AC_CHECK_FUNCS([popen], [], [AC_MSG_ERROR([I need popen])])
dnl }}}
dnl {{{ check for cxxflags
+AC_MSG_CHECKING([whether our compiler is iccy])
+AC_COMPILE_IFELSE([
+#ifndef __ICC
+#error nope
+#endif
+],
+ [cxx_compiler_icc=yes],
+ [cxx_compiler_icc=no])
+AC_MSG_RESULT([${cxx_compiler_icc}])
+
AC_DEFUN([CHECK_CXXFLAG], [
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $1 -Werror"
- AC_MSG_CHECKING([for usable $1 flag])
AC_COMPILE_IFELSE([
#include <string>
#include <iostream>
@@ -104,23 +113,14 @@ int main(int, char **)
],
[cxxflag_success=yes],
[cxxflag_success=no])
- AC_MSG_RESULT($cxxflag_success)
CXXFLAGS="$save_CXXFLAGS"
if test "x$cxxflag_success" = "xyes" ; then
CXXFLAGS="$CXXFLAGS $1"
+ cxxflags_message="${cxxflags_message} $1"
fi
])
-AC_MSG_CHECKING([whether our compiler is iccy])
-AC_COMPILE_IFELSE([
-#ifndef __ICC
-#error nope
-#endif
-],
- [cxx_compiler_icc=yes],
- [cxx_compiler_icc=no])
-AC_MSG_RESULT([${cxx_compiler_icc}])
-
+AC_MSG_CHECKING([for appropriate warning flags])
if test "x${cxx_compiler_icc}" = "xyes" ; then
CHECK_CXXFLAG([-Wall])
CHECK_CXXFLAG([-wd279])
@@ -145,6 +145,7 @@ elif test "x${ac_cv_cxx_compiler_gnu}" = "xyes" ; then
else
CHECK_CXXFLAG([-Wall])
fi
+AC_MSG_RESULT([${cxxflags_message}])
dnl }}}
dnl {{{ doxygen, dot