Code

While dragging or rotating a guide, <shift>-key now disables snapping. (Just before...
[inkscape.git] / configure.ac
index 5dac99d08a64420e83f327f429978b822dfca2f3..00b0e91cb3eab42bc90c4ff887baf9d44cc92449 100644 (file)
@@ -125,6 +125,45 @@ if test "x$GXX" = "xyes"; then
        fi
 fi
 
+# Detect a working version of unordered containers.
+AC_MSG_CHECKING([TR1 unordered_set usability])
+AC_COMPILE_IFELSE([
+#include <tr1/unordered_set>
+int main() {
+  std::tr1::unordered_set<int> i, j;
+  i = j;
+  return 0;
+}
+], [unordered_set_works=yes], [unordered_set_works=no])
+if test "x$unordered_set_works" = "xyes"; then
+       AC_MSG_RESULT([ok])
+       AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set])
+else
+       AC_MSG_RESULT([not working])
+fi
+AC_CHECK_HEADER([boost/unordered_set.hpp], [AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1, [Boost unordered_set (Boost >= 1.36)])], [])
+AC_CHECK_HEADER([ext/hash_set], [AC_DEFINE(HAVE_EXT_HASH_SET, 1, [Legacy GNU ext/hash_set])], [])
+
+# 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.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
+
 dnl ******************************
 dnl Gettext stuff
 dnl ******************************
@@ -132,7 +171,7 @@ GETTEXT_PACKAGE="AC_PACKAGE_NAME"
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
 dnl Add the languages which your application supports here.
-ALL_LINGUAS="am ar az be bg bn br ca ca@valencia cs da de dz el en_AU en_CA en_GB en_US@piglatin eo es_MX es et eu fi fr ga gl he hr hu hy id it ja km ko lt mk mn nb ne nl nn pa pl pt_BR pt ro ru rw sk sl sq sr@latin sr sv th tr uk vi zh_CN zh_TW"
+ALL_LINGUAS="am ar az be bg bn br ca ca@valencia cs da de dz el en_AU en_CA en_GB en_US@piglatin eo es_MX es et eu fa fi fr ga gl he hr hu hy id it ja km ko lt mk mn nb ne nl nn pa pl pt_BR pt ro ru rw sk sl sq sr@latin sr sv th tr uk vi zh_CN zh_TW"
 AM_GLIB_GNU_GETTEXT
 
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
@@ -675,25 +714,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
-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])
@@ -777,7 +797,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?])