Code

latex export: add transparency export for pdf
[inkscape.git] / configure.ac
index 136bb5c312d05ab5bc2267ea2a58acaaec6e5f5c..ca49d5f54cfd3192f73a7ff2498bb6d1e1c99476 100644 (file)
@@ -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 <tr1/unordered_set>
+int main() {
+  std::tr1::unordered_set<int> 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 <tr1/unordered_set> 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.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 +173,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)
@@ -603,8 +644,11 @@ dnl        with_inkboard="no"
 dnl fi
 
 dnl AM_CONDITIONAL(WITH_INKBOARD, test "x$with_inkboard" = "xyes")
-dnl AC_SUBST(INKBOARD_LIBS)
-dnl AC_SUBST(INKBOARD_CFLAGS)
+
+INKBOARD_CFLAGS=""
+INKBOARD_LIBS=""
+AC_SUBST(INKBOARD_LIBS)
+AC_SUBST(INKBOARD_CFLAGS)
 
 dnl ******************************
 dnl Check for libwpg for extension
@@ -657,10 +701,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])
@@ -755,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?])