configure.ac revision 9a12fdf94b4e14dca43f1fc2db650803e68b824d
5270N/Adnl Process this file with autoconf to produce a configure script.
5270N/A
120N/AAC_PREREQ([2.64])
5270N/A
120N/A# Always use 0.xx+devel instead of 0.xxdevel for the version, e.g. 0.46+devel.
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_INIT([inkscape],
5270N/A [0.48+devel],
120N/A [http://bugs.launchpad.net/inkscape/+filebug],
5270N/A [inkscape],
5270N/A [http://inkscape.org/])
5270N/A
5270N/AAC_CONFIG_HEADERS([config.h])
5270N/AAC_CONFIG_SRCDIR([src/main.cpp])
5270N/AAC_CONFIG_MACRO_DIR([m4])
5270N/AAC_CONFIG_AUX_DIR([build-aux])
120N/AAC_CANONICAL_HOST
120N/A
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/A
5270N/AAC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
5270N/A prefix=/opt/inkscape
120N/A PATH="/opt/lsb/bin:$PATH"
5270N/A CC=lsbcc
5270N/A CXX=lsbc++
5270N/A export CC CXX
5270N/A])
120N/A
120N/AAC_LANG(C++)
5270N/AAC_PROG_CXX
5270N/AAC_PROG_CC
5270N/AAM_PROG_AS
5270N/A# Initialize libtool
120N/ALT_PREREQ([2.2])
5270N/ALT_INIT
5270N/AAC_HEADER_STDC
5270N/AINK_BZR_SNAPSHOT_BUILD
5270N/A
5270N/Adnl If automake 1.11 shave the output to look nice
5270N/Am4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
5270N/A
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/AAC_ARG_ENABLE(strict-build,
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/A [enable_strict_build=yes])
5270N/A
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/Aelse
5270N/A AC_MSG_RESULT([Strict build options enabled])
5270N/Afi
5270N/A
5270N/Adnl These next few lines are needed only while libcroco is in our source tree.
5270N/AAM_PROG_CC_C_O
120N/Aif test "$GCC" = "yes"; then
120N/A # Enable some warnings from gcc.
120N/A AC_LANG_PUSH(C)
5270N/A
5270N/A ####
5270N/A # Generic cpp flags...
5270N/A
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 CPPFLAGS="-Wall $CPPFLAGS"
5270N/A
5270N/A # Permit only top-level Glib headers to be used.
5270N/A #
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
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"
120N/A
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 fi
5270N/A
5270N/A # Uncomment for SVG2 stuff
5270N/A # CPPFLAGS="-DWITH_MESH -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE -DWITH_SVG2 $CPPFLAGS"
5270N/A
5270N/A # Uncomment for LPE Tool and All LPEs
5270N/A # CPPFLAGS="-DWITH_LPETOOL -DLPE_ENABLE_TEST_EFFECTS $CPPFLAGS"
5270N/A
5270N/A ####
120N/A # C-specific flags...
5270N/A
5270N/A # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
5270N/A # by gcc 2.95.
5270N/A AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
5270N/A ink_svd_CFLAGS="$CFLAGS"
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 CFLAGS="$ink_svd_CFLAGS"
5270N/A fi
5270N/A
5270N/A
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 ink_svd_CFLAGS="$CFLAGS"
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 CFLAGS="$ink_svd_CFLAGS"
5270N/A AM_CONDITIONAL(CC_WNO_UNUSED_BUT_SET_VARIABLE_SUPPORTED, test "$ink_opt_ok" = "yes")
5270N/A
5270N/A
5270N/A ####
5270N/A # Linker flags...
5270N/A
5270N/A # Have linker produce read-only relocations, if it knows how
5270N/A AC_MSG_CHECKING([linker tolerates -z relro])
5270N/A ink_svd_LDFLAGS="$LDFLAGS"
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 LDFLAGS="$ink_svd_LDFLAGS"
5270N/A fi
5270N/A
5270N/A AC_LANG_POP
5270N/A
5270N/A # C++-specific flags are defined further below. Look for CXXFLAGS...
5270N/Afi
5270N/A
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[[
5270N/A std::unordered_set<int> i, j;
5270N/A i = j;
120N/A]])],
5270N/A[native_unordered_set_works=yes], [native_unordered_set_works=no])
5270N/A
5270N/Aif test "x$native_unordered_set_works" = "xyes"; then
5270N/A AC_MSG_RESULT([ok])
5270N/A AC_DEFINE(HAVE_NATIVE_UNORDERED_SET, 1, [Has working native unordered_set])
5270N/Aelse
5270N/A AC_MSG_RESULT([not working])
5270N/Afi
5270N/A
5270N/AAC_MSG_CHECKING([TR1 unordered_set usability])
5270N/AAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <tr1/unordered_set>]],
5270N/A[[
5270N/A std::tr1::unordered_set<int> i, j;
5270N/A i = j;
5270N/A]])],
5270N/A[tr1_unordered_set_works=yes], [tr1_unordered_set_works=no])
5270N/A
5270N/Aif test "x$tr1_unordered_set_works" = "xyes"; then
5270N/A AC_MSG_RESULT([ok])
5270N/A AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set])
5270N/Aelse
5270N/A AC_MSG_RESULT([not working])
120N/Afi
5270N/A
5270N/AAC_CHECK_HEADER([boost/unordered_set.hpp], [AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1, [Boost unordered_set (Boost >= 1.36)])], [])
5270N/A
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])
5270N/Aignore_strict_aliasing=no
5270N/ACXXFLAGS_SAVE=$CXXFLAGS
120N/ACXXFLAGS="$CXXFLAGS -Werror=strict-aliasing"
5270N/AAC_COMPILE_IFELSE([AC_LANG_SOURCE([
5270N/A#include <boost/optional.hpp>
5270N/Aboost::optional<int> x;
5270N/Aint func() {
5270N/A return *x;
5270N/A}
5270N/A])], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes])
5270N/AAC_MSG_RESULT($ignore_strict_aliasing)
5270N/ACXXFLAGS=$CXXFLAGS_SAVE
5270N/Aif test "x$ignore_strict_aliasing" = "xyes"; then
5270N/A CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing"
5270N/Afi
5270N/A
5270N/Adnl ******************************
5270N/Adnl Gettext stuff
5270N/Adnl ******************************
5270N/AIT_PROG_INTLTOOL([0.40.0])
5270N/A
5270N/AAM_GNU_GETTEXT_VERSION([0.17])
120N/AAM_GNU_GETTEXT([external])
5270N/A
5270N/AGETTEXT_PACKAGE="AC_PACKAGE_NAME"
5270N/AAC_SUBST(GETTEXT_PACKAGE)
5270N/AAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
5270N/A
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/Afi
5270N/A
5270N/Adnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
5270N/AAC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
5270N/AAC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
5270N/A
5270N/Adnl ******************************
5270N/Adnl Check for OpenMP
5270N/Adnl ******************************
5270N/AAC_OPENMP
5270N/Aif test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
5270N/A openmp_ok=yes
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/Afi
5270N/A
5270N/Adnl ******************************
5270N/Adnl Check for libexif
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/Afi
5270N/AAC_SUBST(EXIF_LIBS)
5270N/AAC_SUBST(EXIF_CFLAGS)
5270N/A
5270N/Adnl ******************************
5270N/Adnl Check for libjpeg
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 LIBS="-ljpeg $LIBS"
5270N/A AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
5270N/Afi
5270N/A
5270N/Adnl This check is to get a FIONREAD definition on Solaris 8
5270N/AAC_CHECK_HEADERS([sys/filio.h])
5270N/A
5270N/A
5270N/AAC_CHECK_HEADERS([malloc.h])
5270N/AAC_CHECK_FUNCS([mallinfo], [
5270N/A AC_CHECK_MEMBERS([struct mallinfo.usmblks,
5270N/A struct mallinfo.fsmblks,
5270N/A struct mallinfo.uordblks,
5270N/A struct mallinfo.fordblks,
5270N/A struct mallinfo.hblkhd],,,
5270N/A [#include <malloc.h>])
5270N/A])
120N/A
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/Afi
5270N/AFREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
5270N/AFREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
5270N/AAC_SUBST(FREETYPE_CFLAGS)
5270N/AAC_SUBST(FREETYPE_LIBS)
5270N/A
5270N/Adnl ******************************
5270N/Adnl Win32
5270N/Adnl ******************************
5270N/AAC_MSG_CHECKING([for Win32 platform])
5270N/Acase "$host" in
5270N/A *-*-mingw*)
5270N/A platform_win32=yes
5270N/A WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
120N/A ;;
5270N/A *)
5270N/A platform_win32=no
5270N/A ;;
120N/Aesac
5270N/AAC_MSG_RESULT([$platform_win32])
5270N/AAM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
5270N/AAC_SUBST(WIN32_CFLAGS)
5270N/A
5270N/Adnl TODO - switch to a linker/libtool/feature check, not OS check:
5270N/Adnl ******************************
5270N/Adnl MacOS X
5270N/Adnl ******************************
5270N/AAC_MSG_CHECKING([for OSX platform])
5270N/Aif test "x$build_vendor" = "xapple" ; then
5270N/A platform_osx=yes
5270N/Aelse
5270N/A platform_osx=no
5270N/Afi
5270N/AAC_MSG_RESULT([$platform_osx])
5270N/A
5270N/AAC_MSG_CHECKING([for Solaris platform])
5270N/Acase "$host" in
5270N/A *-solaris2.*)
5270N/A platform_solaris=yes
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/A ;;
5270N/A *)
5270N/A platform_solaris=no
5270N/A ;;
5270N/Aesac
5270N/AAC_MSG_RESULT([$platform_solaris])
5270N/AAM_CONDITIONAL(PLATFORM_SOLARIS, test "$platform_solaris" = "yes")
5270N/A
5270N/Adnl ******************************
5270N/Adnl gnome vfs checking
5270N/Adnl ******************************
5270N/A
5270N/AAC_ARG_WITH(gnome-vfs,
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/A
5270N/Aif test "x$with_gnome_vfs" = "xno"; then
5270N/A dnl Asked to ignore gnome-vfs
5270N/A gnome_vfs=no
5270N/Aelse
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
5270N/A dnl No gnome-vfs found
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 else
5270N/A # gnome-vfs is no, tell us for the log file
5270N/A AC_MSG_RESULT($gnome_vfs)
5270N/A fi
5270N/A fi
5270N/Afi
5270N/A
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])
5270N/Afi
5270N/A
5270N/AAC_SUBST(GNOME_VFS_CFLAGS)
120N/AAC_SUBST(GNOME_VFS_LIBS)
5270N/A
5270N/Adnl ******************************
5270N/Adnl libinkjar checking
5270N/Adnl ******************************
5270N/A
5270N/AAC_ARG_WITH(inkjar,
5270N/A AS_HELP_STRING([--without-inkjar],[disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
5270N/A
5270N/Aif test "x$with_ij" = "xyes"; then
5270N/A AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)])
5270N/A AC_C_BIGENDIAN
5270N/A AC_CHECK_HEADERS(zlib.h)
5270N/A ij=yes
5270N/Aelse
5270N/A ij=no
5270N/Afi
5270N/AAM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
120N/A
5270N/Adnl ******************************
5270N/Adnl LittleCms checking
5270N/Adnl ******************************
5270N/A
5270N/AAC_ARG_ENABLE(lcms,
5270N/A AS_HELP_STRING([--enable-lcms],[enable LittleCms for color management]),
5270N/A [enable_lcms=$enableval], [enable_lcms=yes])
5270N/A
5270N/Aif test "x$enable_lcms" = "xno"; then
5270N/A # Asked to ignore LittleCms
5270N/A lcms=no
5270N/A have_lcms2=no
5270N/Aelse
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 fi
5270N/A
5270N/A if test "x${have_lcms2}" = "xyes"; then
5270N/A LIBS="$LIBS $LCMS2_LIBS"
5270N/A AC_DEFINE(HAVE_LIBLCMS2, 1, [define to 1 if you have lcms version 2.x])
5270N/A AC_SUBST(LCMS2_CFLAGS)
5270N/A AC_SUBST(LCMS2_LIBS)
5270N/A else
5270N/A PKG_CHECK_MODULES(LCMS, lcms >= 1.13, lcms=yes, lcms=no)
5270N/A if test "x$lcms" = "xyes"; then
5270N/A LIBS="$LIBS $LCMS_LIBS"
5270N/A AC_DEFINE(HAVE_LIBLCMS1, 1, [define to 1 if you have lcms version 1.x])
5270N/A AC_SUBST(LCMS_CFLAGS)
5270N/A AC_SUBST(LCMS_LIBS)
5270N/A else
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/A fi
5270N/A fi
5270N/Afi
5270N/A
5270N/Adnl ******************************
5270N/Adnl Libpoppler checking
5270N/Adnl ******************************
5270N/A
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/A
5270N/APOPPLER_CFLAGS=""
5270N/APKG_CHECK_MODULES(POPPLER, poppler >= 0.5.9, poppler=yes, poppler=no)
5270N/A
120N/Aif test "x$poppler" = "xyes"; then
5270N/A dnl Working libpoppler
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 fi
5270N/A fi
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 "x$cairo_svg" = "xno"
5270N/A then
5270N/A POPPLER_LIBS="$POPPLER_LIBS $POPPLER_CAIRO_LIBS "
5270N/A fi
5270N/A fi
5270N/Afi
5270N/A
120N/Aif test "x$poppler" = "xyes"; then
5270N/A LIBS="$LIBS $POPPLER_LIBS"
5270N/A AC_DEFINE(HAVE_POPPLER, 1, [Use libpoppler for direct PDF import])
5270N/Afi
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/Afi
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])
5270N/Afi
120N/AAC_SUBST(POPPLER_CFLAGS)
5270N/AAC_SUBST(POPPLER_LIBS)
5270N/A
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/Afi
5270N/A
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/Afi
5270N/A
5270N/A
5270N/Aink_svd_CPPFLAGS=$CPPFLAGS
5270N/Aink_svd_LIBS=$LIBS
5270N/ACPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
5270N/ALIBS="$LIBS $POPPLER_LIBS"
5270N/A
5270N/AAC_MSG_CHECKING(for new color space API in Poppler)
5270N/Apopplercolor="no"
5270N/AAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <GfxState.h>]],
5270N/A[[
120N/A typedef GfxColorSpace *(*parse_p)(Object *, Gfx *);
120N/A parse_p p = &GfxColorSpace::parse;
5270N/A]])],
5270N/A[popplercolor=yes])
5270N/A
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/A AC_MSG_RESULT(yes)
5270N/Aelse
5270N/A AC_MSG_RESULT(no)
5270N/Afi
5270N/A
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/Afi
5270N/A
5270N/A# Poppler's b604a008 commit changes this
5270N/AAC_MSG_CHECKING([whether GfxPatch in Poppler no longer uses GfxColor])
5270N/Apopplergfxcolor="no"
5270N/AAC_COMPILE_IFELSE([AC_LANG_PROGRAM(
5270N/A [[#include <GfxState.h>]],
5270N/A[[
5270N/A GfxPatch::ColorValue color = {c: {0}};
5270N/A GfxPatch patch;
5270N/A patch.color[0][0] = color;
5270N/A]])
5270N/A], [popplergfxcolor=yes])
5270N/Aif test "x$popplergfxcolor" = "xyes"; then
5270N/A AC_DEFINE(POPPLER_NEW_GFXPATCH, 1, [GfxPatch no longer uses GfxColor in >= 0.15.1])
5270N/A AC_MSG_RESULT(yes)
5270N/Aelse
5270N/A AC_MSG_RESULT(no)
5270N/Afi
5270N/A
120N/ACPPFLAGS=$ink_svd_CPPFLAGS
5270N/ALIBS=$ink_svd_LIBS
5270N/A
5270N/Adnl ******************************
5270N/Adnl Check for libwpg for extension
5270N/Adnl ******************************
5270N/A
5270N/AAC_ARG_ENABLE(wpg,
5270N/A AS_HELP_STRING([--disable-wpg], [compile without support for WordPerfect Graphics]),
5270N/A enable_wpg=$enableval,enable_wpg=yes)
5270N/A
5270N/Awith_libwpg=no
5270N/A
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_DEFINE(WITH_LIBWPG01,1,[Build in libwpg 0.1.x])
5270N/A with_libwpg=yes
5270N/A AC_SUBST(LIBWPG_LIBS, $LIBWPG01_LIBS)
5270N/A AC_SUBST(LIBWPG_CFLAGS, $LIBWPG01_CFLAGS)
5270N/A fi
120N/A
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_DEFINE(WITH_LIBWPG02,1,[Build in libwpg 0.2.x])
5270N/A with_libwpg=yes
5270N/A AC_SUBST(LIBWPG_LIBS, $LIBWPG02_LIBS)
5270N/A AC_SUBST(LIBWPG_CFLAGS, $LIBWPG02_CFLAGS)
5270N/A fi
5270N/A
5270N/A if test "x$with_libwpg" = "xyes"; then
5270N/A AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
5270N/A fi
120N/Afi
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/A
5270N/Adnl ********************************
5270N/Adnl Check for libvisio for extension
5270N/Adnl ********************************
5270N/A
5270N/AAC_ARG_ENABLE(visio,
5270N/A AS_HELP_STRING([--disable-visio], [compile without support for Microsoft Visio Diagrams]),
5270N/A enable_visio=$enableval,enable_visio=yes)
5270N/A
5270N/Awith_libvisio=no
120N/A
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
5270N/A if test "x$with_libvisio" = "xyes"; then
5270N/A AC_DEFINE(WITH_LIBVISIO,1,[Build in libvisio])
5270N/A fi
5270N/Afi
5270N/AAC_SUBST(LIBVISIO_LIBS)
5270N/AAC_SUBST(LIBVISIO_CFLAGS)
5270N/AAM_CONDITIONAL(WITH_LIBVISIO, test "x$with_libvisio" = "xyes")
120N/A
5270N/Adnl ********************************
5270N/Adnl Check for libcdr for extension
5270N/Adnl ********************************
5270N/A
120N/AAC_ARG_ENABLE(cdr,
5270N/A AS_HELP_STRING([--disable-cdr], [compile without support for CorelDRAW Diagrams]),
5270N/A enable_cdr=$enableval,enable_cdr=yes)
5270N/A
5270N/Awith_libcdr=no
5270N/A
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
5270N/A if test "x$with_libcdr" = "xyes"; then
5270N/A AC_DEFINE(WITH_LIBCDR,1,[Build in libcdr])
5270N/A fi
5270N/Afi
5270N/AAC_SUBST(LIBCDR_LIBS)
5270N/AAC_SUBST(LIBCDR_CFLAGS)
5270N/AAM_CONDITIONAL(WITH_LIBCDR, test "x$with_libcdr" = "xyes")
5270N/A
5270N/Adnl ******************************
120N/Adnl Support doing a local install
5270N/Adnl (mostly for distcheck)
5270N/Adnl ******************************
5270N/A
5270N/Awith_localinstall="no"
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/A
5270N/Adnl ******************************
5270N/Adnl Check for dbus functionality
5270N/Adnl ******************************
120N/A
5270N/AAC_ARG_ENABLE(dbusapi,
5270N/A AS_HELP_STRING([--enable-dbusapi], [compile with support for DBus interface]),
5270N/A enable_dbusapi=$enableval,enable_dbusapi=no)
5270N/A
5270N/Awith_dbus="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="${datadir}/dbus-1/services/"
5270N/A else
5270N/A DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
120N/A fi
120N/A AC_SUBST(DBUSSERVICEDIR)
120N/A AC_DEFINE(WITH_DBUS,1,[Build in dbus])
120N/A fi
120N/Afi
120N/AAC_SUBST(DBUS_LIBS)
120N/AAC_SUBST(DBUS_CFLAGS)
5270N/AAM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
120N/A
120N/Adnl ******************************
120N/Adnl Check for ImageMagick Magick++
120N/Adnl ******************************
120N/A
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/Afi
120N/AAM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
120N/A
120N/AAC_SUBST(IMAGEMAGICK_LIBS)
120N/AAC_SUBST(IMAGEMAGICK_CFLAGS)
120N/A
120N/Adnl ******************************
120N/Adnl Unconditional dependencies
5270N/Adnl ******************************
120N/APKG_CHECK_MODULES(INKSCAPE,
120N/A bdw-gc >= 7.1
120N/A cairo >= 1.10
5270N/A cairomm-1.0 >= 1.9.8
5270N/A glib-2.0 >= 2.28
120N/A glibmm-2.4 >= 2.28
5270N/A giomm-2.4
5270N/A gsl
120N/A gthread-2.0 >= 2.0
120N/A libpng >= 1.2
120N/A libxml-2.0 >= 2.6.11
120N/A libxslt >= 1.0.15
5270N/A pango >= 1.24
5270N/A pangoft2 >= 1.24
120N/A sigc++-2.0 >= 2.0.12
5270N/A )
5270N/A
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/A
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/Afi
5270N/A
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/A
5270N/Awith_gtkmm_3_0="no"
5270N/Aif test "x$enable_gtk3" = "xyes"; then
5270N/A
5270N/A ink_spell_pkg=
5270N/A if pkg-config --exists gtkspell-3.0; then
5270N/A ink_spell_pkg=gtkspell-3.0
5270N/A AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
5270N/A fi
5270N/A
5270N/A PKG_CHECK_MODULES(GTK,
5270N/A gtkmm-3.0 >= 3.2
5270N/A gdkmm-3.0 >= 3.2
5270N/A gtk+-3.0 >= 3.2
5270N/A gdk-3.0 >= 3.2
5270N/A gdl-3.0 > 3.3.4
5270N/A $ink_spell_pkg,
5270N/A with_gtkmm_3_0=yes,
5270N/A with_gtkmm_3_0=no)
5270N/A
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
5270N/A AC_MSG_RESULT([Using external GDL])
5270N/A AC_DEFINE(WITH_EXT_GDL,1,[Build with external GDL])
5270N/A else
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 fi
5270N/A
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,
631N/A gtkmm-3.0 >= 3.10,
5270N/A with_gtkmm_3_10=yes,
5270N/A with_gtkmm_3_10=no)
5270N/A
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 fi
631N/A
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
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 fi
631N/A
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
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
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 echo ""
631N/A fi
631N/A
631N/A # Enable strict build options that are known to cause failure in
631N/A # Gtk+ 3 builds
631N/A if test "x$enable_strict_build" = "xhigh"; then
631N/A # Disable deprecated Gtk+ symbols that have been removed since
631N/A # Gtk+ 3.
631N/A CPPFLAGS="-DGTKMM_DISABLE_DEPRECATED $CPPFLAGS"
631N/A CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
631N/A CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
631N/A fi
631N/Aelse
631N/A
631N/A ink_spell_pkg=
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 fi
5270N/A
5270N/A PKG_CHECK_MODULES(GTK,
5270N/A gtk+-2.0 >= 2.24
5270N/A $ink_spell_pkg
5270N/A gdkmm-2.4 >= 2.24
631N/A gtkmm-2.4 >= 2.24)
631N/A
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 have_x11=yes
631N/A else
631N/A have_x11=no
631N/A fi
631N/A AC_MSG_RESULT($have_x11)
631N/A
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
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 # builds.
631N/A CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
631N/A fi
631N/A
631N/A # Optionally enable strict build options that are known to cause build
631N/A # failure in many/most systems
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 #
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/A fi
631N/Afi
631N/A
631N/AINKSCAPE_CFLAGS="$GTK_CFLAGS $INKSCAPE_CFLAGS"
631N/AINKSCAPE_LIBS="$GTK_LIBS $INKSCAPE_LIBS"
631N/A
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)
631N/Afi
631N/AAC_SUBST(X11_CFLAGS)
5270N/AAC_SUBST(X11_LIBS)
5270N/A
5270N/AAM_CONDITIONAL(WITH_EXT_GDL, test "x$with_gtkmm_3_0" = "xyes")
631N/A
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
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
631N/A dnl Pango 1.32.4 uses a deprecated Glib symbol:
631N/A dnl https://bugzilla.gnome.org/show_bug.cgi?id=689843
631N/A dnl
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
631N/A PKG_CHECK_MODULES(PANGO_USES_DEPRECATED_GLIB_SYMBOLS,
631N/A pango = 1.32.4,
5270N/A pango_uses_deprecated_glib_symbols=yes,
5270N/A pango_uses_deprecated_glib_symbols=no)
631N/A
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 else
631N/A CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS"
631N/A fi
631N/Afi
631N/A
631N/A# Check for Apple Mac OS X Carbon framework
631N/Acarbon_ok=no
631N/AAC_MSG_CHECKING([for Mac OS X Carbon support])
631N/AAC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
631N/A#include <Carbon/Carbon.h>
631N/A#include <CoreServices/CoreServices.h>]], [])
631N/A], [carbon_ok=yes])
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/Afi
631N/AAM_CONDITIONAL(HAVE_CARBON, test "x$carbon_ok" = "xyes")
631N/A
631N/A# Check for some boost header files
631N/AAC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)]))
631N/A
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/Afi
631N/A
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/Afi
631N/A
631N/AAC_CHECK_HEADER(popt.h,
631N/A [INKSCAPE_LIBS="$INKSCAPE_LIBS -lpopt"],
631N/A AC_MSG_ERROR([libpopt is required]))
631N/A
5270N/Adnl **************************
5270N/Adnl Check for aspell
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/Aelse
631N/A AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
631N/Afi
631N/A
631N/Adnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
631N/Asp_save_LIBS=$LIBS
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/ALIBS=$sp_save_LIBS
631N/A
631N/A
631N/Adnl Check for binary relocation support
631N/Adnl Hongli Lai <h.lai@chello.nl>
631N/A
631N/AAC_ARG_ENABLE(binreloc,
631N/A AS_HELP_STRING([--enable-binreloc], [compile with binary relocation support]),
631N/A enable_binreloc=$enableval,enable_binreloc=no)
631N/A
631N/AAC_MSG_CHECKING(whether binary relocation support should be enabled)
631N/Aif test "$enable_binreloc" = "yes"; then
631N/A AC_MSG_RESULT(yes)
631N/A AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
631N/A if test -e /proc/self/maps; then
631N/A AC_MSG_RESULT(yes)
631N/A else
631N/A AC_MSG_RESULT(no)
631N/A AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
631N/A enable_binreloc="no"
631N/A fi
631N/A
631N/Aelif test "$enable_binreloc" = "auto"; then
631N/A AC_MSG_RESULT(yes when available)
631N/A AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
631N/A if test -e /proc/self/maps; then
631N/A AC_MSG_RESULT(yes)
631N/A enable_binreloc=yes
631N/A
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 then
631N/A AC_MSG_RESULT(yes)
631N/A else
631N/A AC_MSG_RESULT(no)
631N/A AC_MSG_NOTICE(Binary relocation support will be disabled.)
631N/A enable_binreloc=no
631N/A fi
631N/A
631N/A else
631N/A AC_MSG_RESULT(no)
631N/A enable_binreloc=no
631N/A fi
631N/A
631N/Aelif test "$enable_binreloc" = "no"; then
631N/A AC_MSG_RESULT(no)
631N/Aelse
631N/A AC_MSG_RESULT([no (unknown value "$enable_binreloc")])
631N/A enable_binreloc=no
631N/Afi
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/Afi
631N/A
631N/AAC_ARG_ENABLE(osxapp,
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/Afi
631N/A
631N/Adnl ******************************
631N/Adnl Reported by autoscan
631N/Adnl ******************************
631N/AAC_CHECK_FUNCS(pow)
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/A AC_CHECK_LIB(m,pow)
631N/Afi
631N/AAC_CHECK_FUNCS(sqrt)
631N/AAC_CHECK_FUNCS(floor)
631N/AAC_CHECK_FUNCS(gettimeofday)
631N/AAC_CHECK_FUNCS(memmove)
631N/AAC_CHECK_FUNCS(memset)
631N/AAC_CHECK_FUNCS(mkdir)
631N/AAC_CHECK_FUNCS(strncasecmp)
631N/AAC_CHECK_FUNCS(strpbrk)
631N/AAC_CHECK_FUNCS(strrchr)
631N/AAC_CHECK_FUNCS(strspn)
631N/AAC_CHECK_FUNCS(strstr)
631N/AAC_CHECK_FUNCS(strtoul)
631N/AAC_CHECK_FUNCS(fpsetmask)
631N/AAC_CHECK_FUNCS(ecvt)
631N/AAC_CHECK_HEADERS(ieeefp.h)
631N/AAC_CHECK_HEADERS(fcntl.h)
631N/AAC_CHECK_HEADERS(libintl.h)
631N/AAC_CHECK_HEADERS(stddef.h)
631N/AAC_CHECK_HEADERS(sys/time.h)
631N/AAC_FUNC_STAT
631N/AAC_FUNC_STRFTIME
631N/AAC_FUNC_STRTOD
631N/AAC_HEADER_STAT
631N/AAC_HEADER_TIME
631N/AAC_STRUCT_TM
631N/AAC_TYPE_MODE_T
5270N/A
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/Afi
5270N/A
5270N/Adnl ******************************
5270N/Adnl Compilation warnings
5270N/Adnl ******************************
631N/Aif test "$GXX" = "yes"; then
631N/A # Enable some warnings from g++.
631N/A
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
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 # in src/seltrans.cpp:sp_seltrans_handle_event; this indicates that the
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
631N/A # Add even more stuff
631N/A CXXFLAGS="-Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
631N/A
631N/Afi
631N/A
631N/Adnl ******************************
631N/Adnl libinkscape
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
631N/Adnl AM_CONDITIONAL(ENABLE_LIBINKSCAPE, test "x$splib" != "xno")
631N/Adnl
631N/A
631N/AAC_SUBST(INKSCAPE_CFLAGS)
631N/AAC_SUBST(INKSCAPE_LIBS)
631N/A
631N/A
631N/Adnl Check to see if we have a newer (2.32.0+) glibmm
631N/ATMP_CPPFLAGS="$CPPFLAGS"
631N/ACPPFLAGS="$GTK_CFLAGS $CPPFLAGS"
631N/AAC_CHECK_HEADERS([glibmm/threads.h])
631N/ACPPFLAGS="$TMP_CPPFLAGS"
631N/A
5270N/A
5270N/Adnl Define our data paths for config.h
5270N/AAC_DEFINE_DIR([INKSCAPE_DATADIR], [datadir], [Base data directory])
5270N/AAC_DEFINE_DIR([PACKAGE_LOCALE_DIR], [localedir], [Locatization directory])
5270N/A
5270N/AAC_CONFIG_FILES([
5270N/AMakefile
5270N/Asrc/Makefile
5270N/Asrc/check-header-compile
5270N/Asrc/debug/makefile
5270N/Asrc/dialogs/makefile
5270N/Asrc/display/makefile
5270N/Asrc/extension/implementation/makefile
5270N/Asrc/extension/internal/makefile
5270N/Asrc/extension/makefile
5270N/Asrc/extension/dbus/wrapper/inkdbus.pc
5270N/Asrc/filters/makefile
5270N/Asrc/helper/makefile
5270N/Asrc/io/makefile
5270N/Asrc/libcroco/makefile
5270N/Asrc/libgdl/makefile
5270N/Asrc/libnrtype/makefile
5270N/Asrc/libavoid/makefile
5270N/Asrc/libuemf/makefile
631N/Asrc/livarot/makefile
631N/Asrc/live_effects/makefile
631N/Asrc/live_effects/parameter/makefile
631N/Asrc/svg/makefile
5270N/Asrc/trace/makefile
5270N/Asrc/ui/cache/makefile
5270N/Asrc/ui/dialog/makefile
5270N/Asrc/ui/makefile
631N/Asrc/ui/view/makefile
631N/Asrc/ui/widget/makefile
631N/Asrc/util/makefile
631N/Asrc/widgets/makefile
631N/Asrc/xml/makefile
631N/Asrc/2geom/makefile
631N/Adoc/Makefile
631N/Apo/Makefile.in
631N/Ashare/Makefile
5270N/Ashare/attributes/Makefile
5270N/Ashare/branding/Makefile
5270N/Ashare/examples/Makefile
5270N/Ashare/extensions/Makefile
5270N/Ashare/extensions/alphabet_soup/Makefile
5270N/Ashare/extensions/Barcode/Makefile
5270N/Ashare/extensions/Poly3DObjects/Makefile
5270N/Ashare/extensions/test/Makefile
5270N/Ashare/extensions/xaml2svg/Makefile
5270N/Ashare/extensions/ink2canvas/Makefile
5270N/Ashare/filters/Makefile
5270N/Ashare/fonts/Makefile
5270N/Ashare/gradients/Makefile
5270N/Ashare/icons/Makefile
5270N/Ashare/icons/application/Makefile
5270N/Ashare/icons/application/16x16/Makefile
5270N/Ashare/icons/application/22x22/Makefile
5270N/Ashare/icons/application/24x24/Makefile
5270N/Ashare/icons/application/32x32/Makefile
5270N/Ashare/icons/application/48x48/Makefile
5270N/Ashare/icons/application/256x256/Makefile
5270N/Ashare/keys/Makefile
5270N/Ashare/markers/Makefile
5270N/Ashare/palettes/Makefile
5270N/Ashare/patterns/Makefile
5270N/Ashare/screens/Makefile
5270N/Ashare/symbols/Makefile
5270N/Ashare/templates/Makefile
5270N/Ashare/tutorials/Makefile
5270N/Ashare/ui/Makefile
5270N/Apackaging/autopackage/default.apspec
5270N/Ainkscape.spec
5270N/AInfo.plist
631N/Ainkview.1
631N/A])
631N/A
631N/AAH_BOTTOM([
631N/A
631N/A
631N/A])
631N/A
631N/AAC_OUTPUT
631N/A
5270N/Aecho "
631N/AConfiguration:
631N/A
631N/A Source code location: ${srcdir}
631N/A Destination path prefix: ${prefix}
631N/A Compiler: ${CXX}
631N/A CPPFLAGS: ${CPPFLAGS}
631N/A CXXFLAGS: ${CXXFLAGS}
631N/A CFLAGS: ${CFLAGS}
631N/A LDFLAGS: ${LDFLAGS}
631N/A
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 Libwpg: ${with_libwpg}
631N/A Libvisio: ${with_libvisio}
1514N/A Libcdr: ${with_libcdr}
Doing Local Install: ${with_localinstall}
"