From ff88af6d87c70cd642bd1e5051f9c3161ac536e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Krzysztof=20Kosi=C5=84ski?= Date: Tue, 23 Feb 2010 20:03:50 +0100 Subject: [PATCH] Better URL for unordered_set error message. The new wiki page contains only information relevant to this particular error. Also perform the check earlier during configure. --- configure.ac | 79 ++++++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/configure.ac b/configure.ac index eb5c22c5a..ca49d5f54 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,47 @@ if test "x$GXX" = "xyes"; then fi fi +# Test for broken unordered_set on GCC 4.0.0, shipped with Apple XCode tools +# This is a system header so we check it as soon as possible +AC_MSG_CHECKING([TR1 unordered_set usability]) +AC_COMPILE_IFELSE([ +#include +int main() { + std::tr1::unordered_set i, j; + i = j; + return 0; +} +], [unordered_set_broken=no], [unordered_set_broken=yes]) +if test "x$unordered_set_broken" = "xyes"; then + AC_MSG_RESULT([broken]) + AC_MSG_ERROR([ +You have a broken version of the header. See +http://wiki.inkscape.org/wiki/index.php/HashtableFixOSX +for information on how to fix this problem.]) +else + AC_MSG_RESULT([ok]) +fi + +# Test whether GCC emits a spurious warning when using boost::optional +# If yes, turn off strict aliasing warnings to reduce noise +# and allow the legitimate warnings to stand out +AC_MSG_CHECKING([for overzealous strict aliasing warnings]) +ignore_strict_aliasing=no +CXXFLAGS_SAVE=$CXXFLAGS +CXXFLAGS="$CXXFLAGS -Werror=strict-aliasing" +AC_COMPILE_IFELSE([ +#include +boost::optional x; +int func() { + return *x; +} +], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes]) +AC_MSG_RESULT($ignore_strict_aliasing) +CXXFLAGS=$CXXFLAGS_SAVE +if test "x$ignore_strict_aliasing" = "xyes"; then + CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing" +fi + dnl ****************************** dnl Gettext stuff dnl ****************************** @@ -675,42 +716,6 @@ AM_CONDITIONAL(HAVE_CARBON, test "x$carbon_ok" = "xyes") # Check for some boost header files AC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)])) -# Test whether GCC emits a spurious warning when using boost::optional -# If yes, turn off strict aliasing warnings to reduce noise -AC_MSG_CHECKING([for overzealous strict aliasing warnings]) -ignore_strict_aliasing=no -CXXFLAGS_SAVE=$CXXFLAGS -CXXFLAGS="$CXXFLAGS -Werror=strict-aliasing" -AC_COMPILE_IFELSE([ -#include -boost::optional x; -int func() { - return *x; -} -], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes]) -AC_MSG_RESULT($ignore_strict_aliasing) -CXXFLAGS=$CXXFLAGS_SAVE -if test "x$ignore_strict_aliasing" = "xyes"; then - CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing" -fi - -# Test for broken unordered_set on GCC 4.0.0, shipped with Apple XCode tools -AC_MSG_CHECKING([TR1 unordered_set usability]) -AC_COMPILE_IFELSE([ -#include -int main() { - std::tr1::unordered_set i, j; - i = j; - return 0; -} -], [unordered_set_broken=no], [unordered_set_broken=yes]) -if test "x$unordered_set_broken" = "xyes"; then - AC_MSG_RESULT([broken]) - AC_MSG_ERROR([You have a broken version of the header. See http://wiki.inkscape.org/wiki/index.php/CompilingMacOsX for information on how to fix this problem.]) -else - AC_MSG_RESULT([ok]) -fi - PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no) if test "x$cairo_pdf" = "xyes"; then AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available]) @@ -794,7 +799,7 @@ elif test "$enable_binreloc" = "auto"; then elif test "$enable_binreloc" = "no"; then AC_MSG_RESULT(no) else - AC_MSG_RESULT(no (unknown value "$enable_binreloc")) + AC_MSG_RESULT([no (unknown value "$enable_binreloc")]) enable_binreloc=no fi AC_DEFINE(BR_PTHREADS,[0],[Use binreloc thread support?]) -- 2.30.2