5270N/Adnl Process this file with autoconf to produce a configure script.
120N/A# Rationale: (i) placate simple version comparison software such as
120N/A# `dpkg --compare-versions'. (ii) We don't always know what the next
5270N/A# version is going to be called until about the time we release it
5270N/A# (whereas we always know what the previous version was called).
5270N/AAC_CONFIG_AUX_DIR([build-aux])
120N/A# We need version 1.9 of Automake or higher since we no longer distribute the
120N/A# obsolete mkinstalldirs script
120N/AAM_INIT_AUTOMAKE([-Wall dist-zip dist-bzip2 tar-pax 1.9])
5270N/AAC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
5270N/Adnl If automake 1.11 shave the output to look nice
5270N/Am4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
5270N/Adnl *********************************************************
5270N/Adnl Configure a strict set of build rules to prevent usage of
120N/Adnl deprecated features in external libraries and code that
5270N/Adnl triggers compiler warnings.
5270N/Adnl *********************************************************
5270N/A [AS_HELP_STRING([--enable-strict-build], [Enable strict build configuration [[default=yes]]. Usage of most deprecated symbols is forbidden by default. Set the argument to "high" to introduce very strict checking that will cause the build to fail on many systems.])],
5270N/A [enable_strict_build=$enableval],
5270N/Aif test "x$enable_strict_build" = "xno"; then
5270N/A AC_MSG_WARN([Strict build options disabled])
5270N/Aelif test "x$enable_strict_build" = "xhigh"; then
120N/A AC_MSG_WARN([Strictest build options enabled. This will cause build failure on most systems])
5270N/A AC_MSG_RESULT([Strict build options enabled])
5270N/Adnl These next few lines are needed only while libcroco is in our source tree.
120N/Aif test "$GCC" = "yes"; then
120N/A # Enable some warnings from gcc.
5270N/A # What is just plain "-W" ?
5270N/A # Fortify source requires -O2 or higher, which is handled with newer autoconf
5270N/A CPPFLAGS="-W -D_FORTIFY_SOURCE=2 $CPPFLAGS"
5270N/A # Enable format and format security warnings
5270N/A CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS"
5270N/A # Enable all default warnings
5270N/A # Permit only top-level Glib headers to be used.
5270N/A # TODO: This is already used in Glib >= 2.32 so this flag can be
5270N/A # dropped when all targeted distros use higher Glib versions.
5270N/A CPPFLAGS="-DG_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
5270N/A # Ensure that private GTK+ fields are not accessible. This strictly
5270N/A # enforced in Gtk+ 3, so it is important to check this in Gtk+ 2 builds
5270N/A CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS"
5270N/A # Unfortunately, we cannot (yet) build with -Werror, so we have to manually
5270N/A # change a ton of warnings into errors.
5270N/A # After some more work on fixing warning-inducing code, we can change this set into
5270N/A # it's complement and use -Wno-error=...
5270N/A # Test for -Werror=... (introduced some time post-4.0)
5270N/A AC_MSG_CHECKING([compiler support for -Werror=...])
5270N/A ink_svd_CPPFLAGS="$CPPFLAGS"
5270N/A CPPFLAGS="-Werror=format-security -Wswitch -Werror=return-type $CPPFLAGS"
5270N/A AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
5270N/A AC_MSG_RESULT([$ink_opt_ok])
5270N/A if test "x$ink_opt_ok" != "xyes"; then
5270N/A CPPFLAGS="$ink_svd_CPPFLAGS"
5270N/A # CPPFLAGS="-DWITH_MESH -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE -DWITH_SVG2 $CPPFLAGS"
5270N/A # Uncomment for LPE Tool and All LPEs
5270N/A # CPPFLAGS="-DWITH_LPETOOL -DLPE_ENABLE_TEST_EFFECTS $CPPFLAGS"
5270N/A # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
5270N/A AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
5270N/A CFLAGS="-Wno-pointer-sign $CFLAGS"
5270N/A AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
5270N/A AC_MSG_RESULT([$ink_opt_ok])
5270N/A if test "x$ink_opt_ok" != "xyes"; then
5270N/A # This Automake variable is only used to suppress warnings in our internal
5270N/A # fork of GDL. Once we get rid of our GDL fork, we can delete this test
5270N/A AC_MSG_CHECKING([compiler support for -Wno-unused-but-set-variable])
5270N/A CFLAGS="-Wno-unused-but-set-variable $CFLAGS"
5270N/A AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
120N/A AC_MSG_RESULT([$ink_opt_ok])
5270N/A AM_CONDITIONAL(CC_WNO_UNUSED_BUT_SET_VARIABLE_SUPPORTED, test "$ink_opt_ok" = "yes")
5270N/A # Have linker produce read-only relocations, if it knows how
5270N/A AC_MSG_CHECKING([linker tolerates -z relro])
5270N/A LDFLAGS="-Wl,-z,relro $LDFLAGS"
5270N/A AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
120N/A AC_MSG_RESULT([$ink_opt_ok])
5270N/A if test "x$ink_opt_ok" != "xyes"; then
5270N/A # C++-specific flags are defined further below. Look for CXXFLAGS...
5270N/A# Detect a working version of unordered containers.
5270N/A# First try looking for native support (C++11 feature)
5270N/AAC_MSG_CHECKING([native support for unordered_set])
5270N/AAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unordered_set>]],
5270N/A std::unordered_set<int> i, j;
5270N/A[native_unordered_set_works=yes], [native_unordered_set_works=no])
5270N/Aif test "x$native_unordered_set_works" = "xyes"; then
5270N/A AC_DEFINE(HAVE_NATIVE_UNORDERED_SET, 1, [Has working native unordered_set])
5270N/A AC_MSG_RESULT([not working])
5270N/AAC_MSG_CHECKING([TR1 unordered_set usability])
5270N/A std::tr1::unordered_set<int> i, j;
5270N/A[tr1_unordered_set_works=yes], [tr1_unordered_set_works=no])
5270N/Aif test "x$tr1_unordered_set_works" = "xyes"; then
5270N/A AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set])
5270N/A AC_MSG_RESULT([not working])
5270N/A# Test whether GCC emits a spurious warning when using boost::optional
5270N/A# If yes, turn off strict aliasing warnings to reduce noise
5270N/A# and allow the legitimate warnings to stand out
5270N/AAC_MSG_CHECKING([for overzealous strict aliasing warnings])
120N/ACXXFLAGS="$CXXFLAGS -Werror=strict-aliasing"
5270N/AAC_COMPILE_IFELSE([AC_LANG_SOURCE([
5270N/A])], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes])
5270N/AAC_MSG_RESULT($ignore_strict_aliasing)
5270N/Aif test "x$ignore_strict_aliasing" = "xyes"; then
5270N/A CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing"
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/AAM_GNU_GETTEXT_VERSION([0.17])
120N/AAM_GNU_GETTEXT([external])
5270N/AGETTEXT_PACKAGE="AC_PACKAGE_NAME"
5270N/AAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
5270N/AAC_PATH_PROG(PKG_CONFIG, pkg-config, no)
5270N/Aif test "x$PKG_CONFIG" = "xno"; then
5270N/A AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
5270N/AAC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
5270N/AAC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/Aif test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
5270N/A dnl We have it, now set up the flags
5270N/A CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
5270N/A AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/APKG_CHECK_MODULES(EXIF, libexif, exif_ok=yes, exif_ok=no)
5270N/Aif test "x$exif_ok" = "xyes"; then
5270N/A AC_DEFINE(HAVE_EXIF, 1, [Use libexif])
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/AAC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [AC_CHECK_HEADER(
jpeglib.h, jpeg_ok=yes, jpeg_ok=no)], jpeg_ok=no)
5270N/Aif test "x$jpeg_ok" = "xyes"; then
5270N/A AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
5270N/Adnl This check is to get a FIONREAD definition on Solaris 8
5270N/AAC_CHECK_FUNCS([mallinfo], [
5270N/AAC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
5270N/Aif test "x$FREETYPE_CONFIG" = "xno"; then
5270N/A AC_MSG_ERROR([Cannot find freetype-config])
5270N/AFREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
5270N/AFREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/AAC_MSG_CHECKING([for Win32 platform])
5270N/A WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
5270N/AAC_MSG_RESULT([$platform_win32])
5270N/AAM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/AAC_MSG_CHECKING([for OSX platform])
5270N/Aif test "x$build_vendor" = "xapple" ; then
5270N/AAC_MSG_RESULT([$platform_osx])
5270N/AAC_MSG_CHECKING([for Solaris platform])
120N/A solaris_version=`echo $host|sed -e 's/^.*-solaris2\.//' -e s'/\..*$//'`
5270N/A CFLAGS="$CFLAGS -DSOLARIS=$solaris_version"
5270N/A CXXFLAGS="$CXXFLAGS -DSOLARIS=$solaris_version"
5270N/AAC_MSG_RESULT([$platform_solaris])
5270N/AAM_CONDITIONAL(PLATFORM_SOLARIS, test "$platform_solaris" = "yes")
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/A AS_HELP_STRING([--with-gnome-vfs],[use gnome vfs for loading files]),
5270N/A [with_gnome_vfs=$withval], [with_gnome_vfs=auto])
5270N/Aif test "x$with_gnome_vfs" = "xno"; then
5270N/A dnl Asked to ignore gnome-vfs
5270N/A dnl Have to test gnome-vfs presence
5270N/A PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.0, gnome_vfs=yes, gnome_vfs=no)
5270N/A if test "x$gnome_vfs" != "xyes"; then
120N/A if test "x$with_gnome_vfs" = "xyes"; then
5270N/A dnl Gnome-VFS was explicitly asked for, so stop
5270N/A AC_MSG_ERROR([--with-gnome-vfs was specified, but appropriate libgnomevfs development packages could not be found])
5270N/A # gnome-vfs is no, tell us for the log file
5270N/AAM_CONDITIONAL(USE_GNOME_VFS, test "x$gnome_vfs" = "xyes")
5270N/Aif test "x$gnome_vfs" = "xyes"; then
5270N/A AC_DEFINE(WITH_GNOME_VFS, 1, [Use gnome vfs file load functionality])
120N/AAC_SUBST(GNOME_VFS_LIBS)
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/A AS_HELP_STRING([--without-inkjar],[disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
5270N/Aif test "x$with_ij" = "xyes"; then
5270N/A AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)])
5270N/AAM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/A AS_HELP_STRING([--enable-lcms],[enable LittleCms for color management]),
5270N/A [enable_lcms=$enableval], [enable_lcms=yes])
5270N/Aif test "x$enable_lcms" = "xno"; then
5270N/A # Asked to ignore LittleCms
5270N/A # Have to test LittleCms presence
5270N/A if test "x${platform_osx}" != "xyes"; then
5270N/A # lcms 2.2 & 2.3 have problems on OSX
5270N/A PKG_CHECK_MODULES(LCMS2, lcms2, have_lcms2="yes", have_lcms2="no")
5270N/A if test "x${have_lcms2}" = "xyes"; then
5270N/A AC_DEFINE(HAVE_LIBLCMS2, 1, [define to 1 if you have lcms version
2.x])
5270N/A PKG_CHECK_MODULES(LCMS, lcms >= 1.13, lcms=yes, lcms=no)
5270N/A if test "x$lcms" = "xyes"; then
5270N/A AC_DEFINE(HAVE_LIBLCMS1, 1, [define to 1 if you have lcms version
1.x])
5270N/A # No lcms found. LittleCms was explicitly asked for, so stop
5270N/A AC_MSG_ERROR([--enable-lcms was specified, but appropriate LittleCms development packages could not be found])
5270N/Adnl ******************************
5270N/Adnl ******************************
5270N/AAC_ARG_ENABLE(poppler-cairo,
5270N/A AS_HELP_STRING([--enable-poppler-cairo],[Enable libpoppler-cairo for rendering PDF preview]),
5270N/A [enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
5270N/APKG_CHECK_MODULES(POPPLER, poppler >= 0.5.9, poppler=yes, poppler=no)
120N/Aif test "x$poppler" = "xyes"; then
5270N/A dnl Have to test libpoppler-glib presence
5270N/A PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.5.9, poppler_glib=yes, poppler_glib=no)
5270N/A if test "x$poppler_glib" = "xyes"; then
5270N/A dnl Working libpoppler-glib found
5270N/A dnl Check whether the Cairo SVG backend is available
5270N/A PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, cairo_svg=yes, cairo_svg=no)
5270N/A if test "x$cairo_svg" = "xyes"; then
5270N/A POPPLER_LIBS="$POPPLER_LIBS $POPPLER_GLIB_LIBS "
5270N/A if test "x$enable_poppler_cairo" = "xyes"; then
5270N/A dnl Have to test libpoppler-cairo presence for PDF preview
5270N/A dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
5270N/A PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.5.9, poppler_cairo=yes, poppler_cairo=no)
5270N/A if test "x$poppler_glib" = "xyes" -a "x$poppler_cairo" = "xyes" -a \
5270N/A POPPLER_LIBS="$POPPLER_LIBS $POPPLER_CAIRO_LIBS "
120N/Aif test "x$poppler" = "xyes"; then
5270N/A AC_DEFINE(HAVE_POPPLER, 1, [Use libpoppler for direct PDF import])
5270N/Aif test "x$poppler_cairo" = "xyes" -a "x$poppler_glib" = "xyes"; then
5270N/A AC_DEFINE(HAVE_POPPLER_CAIRO, 1, [Use libpoppler-cairo for rendering PDF preview])
5270N/Aif test "x$poppler_glib" = "xyes" -a "x$cairo_svg" = "xyes"; then
5270N/A AC_DEFINE(HAVE_POPPLER_GLIB, 1, [Use libpoppler-glib and Cairo-SVG for PDF import])
120N/AAC_SUBST(POPPLER_CFLAGS)
5270N/APKG_CHECK_MODULES(POPPLER_GFXFONT, poppler >= 0.8.3, popplernew=yes, popplernew=no)
5270N/Aif test "x$popplernew" = "xyes"; then
5270N/A AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Use GfxFont from Poppler >= 0.8.3])
5270N/APKG_CHECK_MODULES(POPPLER_NEWERRORAPI, poppler >= 0.20.0, popplernewerror=yes, popplernewerror=no)
5270N/Aif test "x$popplernewerror" = "xyes"; then
5270N/A AC_DEFINE(POPPLER_NEW_ERRORAPI, 1, [Use new error API from Poppler >= 0.20.0])
5270N/ACPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
5270N/AAC_MSG_CHECKING(for new color space API in Poppler)
120N/A typedef GfxColorSpace *(*parse_p)(Object *, Gfx *);
120N/A parse_p p = &GfxColorSpace::parse;
5270N/Aif test "x$popplercolor" = "xyes"; then
5270N/A AC_DEFINE(POPPLER_NEW_COLOR_SPACE_API, 1, [Use color space API from Poppler >= 0.12.2])
5270N/APKG_CHECK_MODULES(POPPLER_EVEN_NEWER_COLOR_SPACE_API, poppler >= 0.26.0, popplernewercolorspaceapi=yes, popplernewercolorspaceapi=no)
120N/Aif test "x$popplernewercolorspaceapi" = "xyes"; then
5270N/A AC_DEFINE(POPPLER_EVEN_NEWER_COLOR_SPACE_API, 1, [Use even newer color space API from Poppler >= 0.26.0])
5270N/A# Poppler's b604a008 commit changes this
5270N/AAC_MSG_CHECKING([whether GfxPatch in Poppler no longer uses GfxColor])
5270N/AAC_COMPILE_IFELSE([AC_LANG_PROGRAM(
5270N/A GfxPatch::ColorValue color = {c: {0}};
5270N/Aif test "x$popplergfxcolor" = "xyes"; then
5270N/A AC_DEFINE(POPPLER_NEW_GFXPATCH, 1, [GfxPatch no longer uses GfxColor in >= 0.15.1])
120N/ACPPFLAGS=$ink_svd_CPPFLAGS
5270N/Adnl ******************************
5270N/Adnl Check for libwpg for extension
5270N/Adnl ******************************
5270N/A AS_HELP_STRING([--disable-wpg], [compile without support for WordPerfect Graphics]),
5270N/A enable_wpg=$enableval,enable_wpg=yes)
5270N/Aif test "x$enable_wpg" = "xyes"; then
5270N/A PKG_CHECK_MODULES(LIBWPG01, libwpg-0.1 libwpg-stream-0.1, with_libwpg01=yes, with_libwpg01=no)
5270N/A if test "x$with_libwpg01" = "xyes"; then
5270N/A AC_SUBST(LIBWPG_LIBS, $LIBWPG01_LIBS)
5270N/A AC_SUBST(LIBWPG_CFLAGS, $LIBWPG01_CFLAGS)
5270N/A PKG_CHECK_MODULES(LIBWPG02, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg02=yes, with_libwpg02=no)
5270N/A if test "x$with_libwpg02" = "xyes"; then
5270N/A AC_SUBST(LIBWPG_LIBS, $LIBWPG02_LIBS)
5270N/A AC_SUBST(LIBWPG_CFLAGS, $LIBWPG02_CFLAGS)
5270N/A if test "x$with_libwpg" = "xyes"; then
5270N/A AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
5270N/AAM_CONDITIONAL(WITH_LIBWPG01, test "x$with_libwpg01" = "xyes")
5270N/AAM_CONDITIONAL(WITH_LIBWPG02, test "x$with_libwpg02" = "xyes")
5270N/AAM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
5270N/Adnl ********************************
5270N/Adnl Check for libvisio for extension
5270N/Adnl ********************************
5270N/A AS_HELP_STRING([--disable-visio], [compile without support for Microsoft Visio Diagrams]),
5270N/A enable_visio=$enableval,enable_visio=yes)
120N/Aif test "x$enable_visio" = "xyes"; then
120N/A PKG_CHECK_MODULES(LIBVISIO, libvisio-0.0 >= 0.0.20 libwpd-0.9 libwpd-stream-0.9 libwpg-0.2, with_libvisio=yes, with_libvisio=no)
5270N/A if test "x$with_libvisio" = "xyes"; then
5270N/A AC_DEFINE(WITH_LIBVISIO,1,[Build in libvisio])
5270N/AAM_CONDITIONAL(WITH_LIBVISIO, test "x$with_libvisio" = "xyes")
5270N/Adnl ********************************
5270N/Adnl Check for libcdr for extension
5270N/Adnl ********************************
5270N/A AS_HELP_STRING([--disable-cdr], [compile without support for CorelDRAW Diagrams]),
5270N/A enable_cdr=$enableval,enable_cdr=yes)
5270N/Aif test "x$enable_cdr" = "xyes"; then
120N/A PKG_CHECK_MODULES(LIBCDR, libcdr-0.0 >= 0.0.3 libwpd-0.9 libwpd-stream-0.9 libwpg-0.2, with_libcdr=yes, with_libcdr=no)
5270N/A if test "x$with_libcdr" = "xyes"; then
5270N/A AC_DEFINE(WITH_LIBCDR,1,[Build in libcdr])
5270N/AAM_CONDITIONAL(WITH_LIBCDR, test "x$with_libcdr" = "xyes")
5270N/Adnl ******************************
120N/Adnl Support doing a local install
5270N/Adnl ******************************
5270N/AAC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install system files in the local path (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
5270N/Adnl ******************************
5270N/Adnl Check for dbus functionality
5270N/Adnl ******************************
5270N/A AS_HELP_STRING([--enable-dbusapi], [compile with support for DBus interface]),
5270N/A enable_dbusapi=$enableval,enable_dbusapi=no)
5270N/Aif test "x$enable_dbusapi" = "xyes"; then
5270N/A PKG_CHECK_MODULES(DBUS, dbus-glib-1, with_dbus=yes, with_dbus=no)
5270N/A if test "x$with_dbus" = "xyes"; then
5270N/A if test "x$with_localinstall" = "xyes"; then
5270N/A DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
120N/A AC_SUBST(DBUSSERVICEDIR)
120N/A AC_DEFINE(WITH_DBUS,1,[Build in dbus])
5270N/AAM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
120N/Adnl ******************************
120N/Adnl Check for ImageMagick Magick++
120N/Adnl ******************************
5270N/APKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
120N/Aif test "x$magick_ok" = "xyes"; then
5270N/A AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
120N/AAM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
120N/AAC_SUBST(IMAGEMAGICK_LIBS)
120N/AAC_SUBST(IMAGEMAGICK_CFLAGS)
120N/Adnl ******************************
120N/Adnl Unconditional dependencies
5270N/Adnl ******************************
120N/APKG_CHECK_MODULES(INKSCAPE,
5270N/Adnl Check whether we need to use new Glib::Thread::Mutex API.
5270N/Adnl TODO: Drop this test once we bump the required version of glibmm to 2.32
120N/APKG_CHECK_MODULES(GLIBMM_2_32, glibmm-2.4 >= 2.32, with_glibmm_2_32=yes, with_glibmm_2_32=no)
5270N/Aif test "x$with_glibmm_2_32" = "xyes"; then
5270N/A AC_DEFINE(WITH_GLIBMM_2_32,1,[Build with Glibmm 2.32 or higher])
5270N/Adnl *********************************
631N/Adnl Allow experimental GTK+3 build
631N/Adnl *********************************
631N/AAC_ARG_ENABLE(gtk3-experimental,
5270N/A AS_HELP_STRING([--enable-gtk3-experimental], [enable compilation with GTK+3 (EXPERIMENTAL!)]),
5270N/A [enable_gtk3=$enableval], [enable_gtk3=no])
5270N/Aif test "x$enable_gtk3" = "xyes"; then
5270N/A if pkg-config --exists gtkspell-3.0; then
5270N/A AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
5270N/A if test "x$with_gtkmm_3_0" = "xyes"; then
5270N/A AC_MSG_RESULT([Using EXPERIMENTAL Gtkmm 3 build])
5270N/A AC_DEFINE(WITH_GTKMM_3_0,1,[Build with Gtkmm
3.0.x or higher])
5270N/A AC_MSG_RESULT([Using external GDL])
5270N/A AC_DEFINE(WITH_EXT_GDL,1,[Build with external GDL])
5270N/A AC_MSG_ERROR([Some dependencies were not fulfilled for the experimental GTK+ 3 build. One possible cause for this is a new dependency on the gdl-3.0 development package.])
5270N/A # Check whether we can use new features in Gtkmm 3.10
5270N/A # TODO: Drop this test and bump the version number in the GTK test above
5270N/A # as soon as all supported distributions provide Gtkmm >= 3.10
631N/A PKG_CHECK_MODULES(GTKMM_3_10,
5270N/A if test "x$with_gtkmm_3_10" = "xyes"; then
5270N/A AC_MSG_RESULT([Using Gtkmm 3.10 build])
5270N/A AC_DEFINE(WITH_GTKMM_3_10,1,[Build with Gtkmm
3.10.x or higher])
631N/A # Check whether we are using Gdl >= 3.6. This version introduced an
API/ABI change.
631N/A # TODO: We should drop support for older versions of Gdl once all supported distros
631N/A # provide Gdl 3.6 or higher
631N/A PKG_CHECK_MODULES(GDL_3_6, gdl-3.0 >= 3.6, with_gdl_3_6=yes, with_gdl_3_6=no)
631N/A if test "x$with_gdl_3_6" = "xyes"; then
631N/A AC_MSG_RESULT([Using Gdl 3.6 or higher])
631N/A AC_DEFINE(WITH_GDL_3_6,1,[Build with Gdl 3.6 or higher])
631N/A dnl The following test is only defined if Gtk+ 3 development libraries
631N/A dnl are installed on the system. Therefore, it is guarded by an
631N/A dnl m4_ifdef statement. The ifdef can be probably be removed once we
631N/A dnl switch to Gtk+ 3 as a hard dependency
631N/A # Check whether we are using the X11 backend target for Gtk+ 3.
631N/A m4_ifdef([GTK_CHECK_BACKEND],
631N/A [GTK_CHECK_BACKEND([x11], , [have_x11=yes], [have_x11=no])])
631N/A # Enable strict build options that should work on most systems unless
631N/A # the build has been configured not to do so
631N/A if test "x$enable_strict_build" != "xno"; then
631N/A # Add build flags here as soon as Inkscape trunk can build
631N/A # against Gtk+ 3 with the option enabled
631N/A # Enable strict build options that are known to cause failure in
631N/A if test "x$enable_strict_build" = "xhigh"; then
631N/A # Disable deprecated Gtk+ symbols that have been removed since
631N/A CPPFLAGS="-DGTKMM_DISABLE_DEPRECATED $CPPFLAGS"
631N/A CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
631N/A CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
631N/A if pkg-config --exists gtkspell-2.0; then
631N/A ink_spell_pkg=gtkspell-2.0
631N/A AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
631N/A # Check whether we are using the X11 backend for Gtk+ 2.
631N/A AC_MSG_CHECKING([if Gtk+ 2.0 is using the X11 backend target])
631N/A if test "x`$PKG_CONFIG --variable=target gtk+-2.0`" = "xx11"; then
631N/A AC_MSG_RESULT($have_x11)
631N/A # Enable build strict options that should work on most systems unless
631N/A # the build has been configured explicitly not to do so
631N/A if test "x$enable_strict_build" != "xno"; then
631N/A # Prevent usage of deprecated Gtk+ symbols. These have all
631N/A # been removed in Gtk+ 3 so these checks are important.
631N/A CPPFLAGS="-DGTKMM_DISABLE_DEPRECATED $CPPFLAGS"
631N/A CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
631N/A # Allow only top-level GTK+ headers to be used. This is mandatory
631N/A # for GTK+ >= 3.0 so there is no need to apply the flag in GTK+ 3
631N/A CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
631N/A # Optionally enable strict build options that are known to cause build
631N/A if test "x$enable_strict_build" == "xhigh"; then
631N/A # FIXME: This causes build failure because our internal
631N/A # copy of GDL uses deprecated GDK symbols.
631N/A # This specific issue isn't a problem for GTK+ 3 builds because
631N/A # we build against external GDL >= 3.3.4 rather than using
631N/A # the deprecated internal code
631N/A CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
631N/AINKSCAPE_CFLAGS="$GTK_CFLAGS $INKSCAPE_CFLAGS"
631N/AINKSCAPE_LIBS="$GTK_LIBS $INKSCAPE_LIBS"
631N/Adnl Configure x11 library if Gtk+ uses it as a backend.
631N/Adnl Note that this is only here because we directly use X11 functionality. We
631N/Adnl wouldn't need this check if we were only using X as the Gtk+ backend.
631N/Aif test "x$have_x11" = "xyes"; then
631N/A PKG_CHECK_MODULES(X11, x11)
5270N/AAM_CONDITIONAL(WITH_EXT_GDL, test "x$with_gtkmm_3_0" = "xyes")
631N/A# Prevent usage of deprecated library symbols unless strict build
631N/A# checking has been disabled
631N/Aif test "x$enable_strict_build" != "xno"; then
631N/A CPPFLAGS="-DGDKMM_DISABLE_DEPRECATED $CPPFLAGS"
631N/A # Ensure that no deprecated glibmm symbols are introduced.
631N/A # lp:inkscape builds cleanly with this option at r10957
631N/A CPPFLAGS="-DGLIBMM_DISABLE_DEPRECATED $CPPFLAGS"
631N/A dnl Pango 1.32.4 uses a deprecated Glib symbol:
631N/A dnl TODO: Get rid of this check once we are sure that all targeted
631N/A dnl platforms have got rid of this Pango version. Apply the
631N/A dnl G_DISABLE_DEPRECATED flag to all builds.
631N/A pango_uses_deprecated_glib_symbols=no
631N/A PKG_CHECK_MODULES(PANGO_USES_DEPRECATED_GLIB_SYMBOLS,
5270N/A pango_uses_deprecated_glib_symbols=yes,
5270N/A pango_uses_deprecated_glib_symbols=no)
631N/A # Don't disable deprecated Glib symbols if it will break stuff in an
631N/A # external library header that we use
631N/A if test "x$pango_uses_deprecated_glib_symbols" = "xyes"; then
631N/A AC_MSG_WARN([The available version of Pango uses deprecated Glib symbols. Deprecated Glib symbol usage will be allowed])
631N/A CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS"
631N/A# Check for Apple Mac OS X Carbon framework
631N/AAC_MSG_CHECKING([for Mac OS X Carbon support])
631N/AAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
631N/AAC_MSG_RESULT($carbon_ok)
631N/Aif test "x$carbon_ok" = "xyes"; then
631N/A AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
631N/A CARBON_LDFLAGS="-framework Carbon"
631N/A AC_SUBST(CARBON_LDFLAGS)
631N/AAM_CONDITIONAL(HAVE_CARBON, test "x$carbon_ok" = "xyes")
631N/A# Check for some boost header files
631N/APKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no)
631N/Aif test "x$cairo_pdf" = "xyes"; then
631N/A AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
631N/Adnl Shouldn't we test for libz?
631N/AINKSCAPE_LIBS="$INKSCAPE_LIBS -lz"
631N/Aif test "x$openmp_ok" = "xyes"; then
631N/A INKSCAPE_LIBS="$INKSCAPE_LIBS -lgomp"
631N/A [INKSCAPE_LIBS="$INKSCAPE_LIBS -lpopt"],
631N/A AC_MSG_ERROR([libpopt is required]))
5270N/Adnl **************************
5270N/Adnl ******************************
631N/AAC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(
aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
631N/Aif test "x$aspell_ok" = "xyes"; then
631N/A AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
631N/A INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
631N/A AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
631N/Adnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
631N/ALIBS="$LIBS $INKSCAPE_LIBS"
631N/AAC_CHECK_FUNCS(bind_textdomain_codeset)
631N/Adnl Check for gtk_window_fullscreen in gtk (>= 2.2)
631N/AAC_CHECK_FUNCS(gtk_window_set_default_icon_from_file)
631N/AAC_CHECK_FUNCS(gtk_window_fullscreen)
631N/Adnl Check for binary relocation support
631N/Adnl Hongli Lai <h.lai@chello.nl>
631N/A AS_HELP_STRING([--enable-binreloc], [compile with binary relocation support]),
631N/A enable_binreloc=$enableval,enable_binreloc=no)
631N/AAC_MSG_CHECKING(whether binary relocation support should be enabled)
631N/Aif test "$enable_binreloc" = "yes"; then
631N/Aelif test "$enable_binreloc" = "auto"; then
631N/A AC_MSG_RESULT(yes when available)
631N/A AC_MSG_CHECKING(whether everything is installed to the same prefix)
631N/A if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
631N/A "$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
631N/A "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
631N/A AC_MSG_NOTICE(Binary relocation support will be disabled.)
631N/Aelif test "$enable_binreloc" = "no"; then
631N/A AC_MSG_RESULT([no (unknown value "$enable_binreloc")])
631N/AAC_DEFINE(BR_PTHREADS,[0],[Use binreloc thread support?])
631N/Aif test "$enable_binreloc" = "yes"; then
631N/A AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
631N/A AS_HELP_STRING([--enable-osxapp], [compile with OSX .app data dir paths]),
631N/A enable_osxapp=$enableval,enable_osxapp=no)
631N/Aif test "$enable_osxapp" = "yes"; then
631N/A AC_DEFINE(ENABLE_OSX_APP_LOCATIONS,,[Build with OSX .app data dir paths?])
631N/A LDFLAGS="$LDFLAGS -headerpad_max_install_names"
631N/Adnl ******************************
631N/Adnl Reported by autoscan
631N/Adnl ******************************
631N/A# if we did not find pow(), see if it's in libm.
631N/Aif test x"$ac_cv_func_pow" = x"no" ; then
631N/AAC_CHECK_FUNCS(gettimeofday)
631N/AAC_CHECK_FUNCS(strncasecmp)
631N/AAC_CHECK_FUNCS(fpsetmask)
5270N/Adnl Work around broken gcc 3.3 (seen on OSX) where "ENABLE_NLS" isn't
5270N/Adnl set correctly because the gettext function isn't noticed.
5270N/Aif test "$ac_cv_header_libintl_h" = "yes" &&
5270N/A test "$ac_cv_func_bind_textdomain_codeset" = "yes" &&
5270N/A test "$gt_cv_func_have_gettext" != "yes"; then
631N/A AC_DEFINE([ENABLE_NLS], [], [Description])
5270N/Adnl ******************************
5270N/Adnl ******************************
631N/Aif test "$GXX" = "yes"; then
631N/A # Enable some warnings from g++.
631N/A # Rationale: a number of bugs in inkscape have been fixed by enabling g++
631N/A # warnings and addressing the produced warnings. Usually the committing
631N/A # developer is the best person to address the warnings.
631N/A ink_svd_CXXFLAGS="$CXXFLAGS"
631N/A CXXFLAGS="-Wno-unused-parameter $CXXFLAGS"
631N/A # -Wno-unused-parameter isn't accepted by gcc 2.95.
631N/A AC_COMPILE_IFELSE([AC_LANG_SOURCE([int dummy;])
631N/A], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",)
631N/A # Note: At least one bug has been caught from unused parameter warnings,
631N/A # so it might be worth trying not to disable it.
631N/A # One way of selectively disabling the warnings (
i.e. only where the
631N/A # programmer deliberately isn't using the parameter,
e.g. for a callback)
631N/A # is to remove the parameter name (leaving just its type), as is done
631N/A # programmer deliberately has an unused parameter (
e.g. because it's used
631N/A # as a callback or similar function pointer use).
631N/A CXXFLAGS="-Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
631N/Adnl ******************************
631N/Adnl ******************************
631N/Adnl AC_ARG_ENABLE(libinkscape, AS_HELP_STRING([--enable-libinkscape],[Compile dynamic library (experimental)]), [splib=$enableval], [splib=no])
631N/Adnl AM_CONDITIONAL(ENABLE_LIBINKSCAPE, test "x$splib" != "xno")
631N/AAC_SUBST(INKSCAPE_CFLAGS)
631N/Adnl Check to see if we have a newer (2.32.0+) glibmm
631N/ATMP_CPPFLAGS="$CPPFLAGS"
631N/ACPPFLAGS="$GTK_CFLAGS $CPPFLAGS"
631N/ACPPFLAGS="$TMP_CPPFLAGS"
5270N/AAC_DEFINE_DIR([INKSCAPE_DATADIR], [datadir], [Base data directory])
5270N/AAC_DEFINE_DIR([PACKAGE_LOCALE_DIR], [localedir], [Locatization directory])
631N/A Source code location: ${srcdir}
631N/A Destination path prefix: ${prefix}
631N/A Use gnome-vfs: ${gnome_vfs}
631N/A Use openoffice files: ${ij}
631N/A Use relocation support: ${enable_binreloc}
631N/A Enable LittleCms: ${enable_lcms}
631N/A Enable DBUS: ${with_dbus}
631N/A Enable Poppler-Cairo: ${enable_poppler_cairo}
631N/A ImageMagick Magick++: ${magick_ok}
631N/A Libvisio: ${with_libvisio}
Doing Local Install: ${with_localinstall}