Code

allow switch between LINE and LWPOLYLINE
[inkscape.git] / configure.ac
index e34da61c5b0be609c20fddaef542ad56ca0e3d23..eb5c22c5a545d875d87872576f5100c282075578 100644 (file)
@@ -31,7 +31,10 @@ AM_PROG_AS
 AC_PROG_RANLIB
 AC_PROG_INTLTOOL(0.22)
 AC_HEADER_STDC
-INK_SVN_SNAPSHOT_BUILD
+INK_BZR_SNAPSHOT_BUILD
+
+dnl If automake 1.11 shave the output to look nice
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
 dnl These next few lines are needed only while libcroco is in our source tree.
 AC_PROG_CC
@@ -129,7 +132,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)
@@ -600,8 +603,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
@@ -654,10 +660,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])
@@ -669,6 +675,42 @@ 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.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
+
+# 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 <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/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])
@@ -968,6 +1010,13 @@ share/filters/Makefile
 share/fonts/Makefile
 share/gradients/Makefile
 share/icons/Makefile
+share/icons/application/Makefile
+share/icons/application/16x16/Makefile
+share/icons/application/22x22/Makefile
+share/icons/application/24x24/Makefile
+share/icons/application/32x32/Makefile
+share/icons/application/48x48/Makefile
+share/icons/application/256x256/Makefile
 share/keys/Makefile
 share/markers/Makefile
 share/palettes/Makefile