summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e9f21e)
raw | patch | inline | side by side (parent: 8e9f21e)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Thu, 14 Jan 2010 09:16:28 +0000 (10:16 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Thu, 14 Jan 2010 09:16:28 +0000 (10:16 +0100) |
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 136bb5c312d05ab5bc2267ea2a58acaaec6e5f5c..23c1c457c0abd2be87c93f2bd316a73c7d128468 100644 (file)
--- a/configure.ac
+++ b/configure.ac
@@ -657,10 +657,10 @@ PKG_CHECK_MODULES(INKSCAPE, gdkmm-2.4 glibmm-2.4 giomm-2.4 gtkmm-2.4 >= 2.10.0
# Check for Apple Mac OS X Carbon framework
carbon_ok=no
AC_MSG_CHECKING([for Mac OS X Carbon support])
-AC_TRY_CPP([
+AC_COMPILE_IFELSE([
#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>
-], carbon_ok=yes)
+], [carbon_ok=yes])
AC_MSG_RESULT($carbon_ok)
if test "x$carbon_ok" = "xyes"; then
AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
# 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
+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.hpp>
+boost::optional<int> 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
+
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])