configure.ac revision 7a9c207116b53b2b5253bd878fa8432210b8e0c6
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Process this file with autoconf to produce a configure script.
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_PREREQ(2.53)
61ea54c309169801a1833f99729723071c24c047Dirk Hogan# Always use 0.xx+devel instead of 0.xxdevel for the version, e.g. 0.46+devel.
61ea54c309169801a1833f99729723071c24c047Dirk Hogan# Rationale: (i) placate simple version comparison software such as
61ea54c309169801a1833f99729723071c24c047Dirk Hogan# `dpkg --compare-versions'. (ii) We don't always know what the next
61ea54c309169801a1833f99729723071c24c047Dirk Hogan# version is going to be called until about the time we release it
61ea54c309169801a1833f99729723071c24c047Dirk Hogan# (whereas we always know what the previous version was called).
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_INIT(inkscape, 0.47+devel)
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_CANONICAL_HOST
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_CONFIG_SRCDIR([src/main.cpp])
3744900be632496920d4c9aca8f94ba6db4dd882Dirk HoganAM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax])
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
61ea54c309169801a1833f99729723071c24c047Dirk Hogan export CC CXX
61ea54c309169801a1833f99729723071c24c047Dirk HoganAM_CONFIG_HEADER(config.h)
61ea54c309169801a1833f99729723071c24c047Dirk HoganAM_PROG_CC_STDC
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_PROG_RANLIB
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_PROG_INTLTOOL(0.22)
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_HEADER_STDC
61ea54c309169801a1833f99729723071c24c047Dirk HoganINK_BZR_SNAPSHOT_BUILD
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl If automake 1.11 shave the output to look nice
61ea54c309169801a1833f99729723071c24c047Dirk Hoganm4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl These next few lines are needed only while libcroco is in our source tree.
3744900be632496920d4c9aca8f94ba6db4dd882Dirk HoganAM_PROG_CC_C_O
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hoganif test "$GCC" = "yes"; then
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan # Enable some warnings from gcc.
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan AC_LANG_PUSH(C)
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan # Generic cpp flags...
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan # What is just plain "-W" ?
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # Fortify source requires -O2 or higher, which is handled with newer autoconf
61ea54c309169801a1833f99729723071c24c047Dirk Hogan CPPFLAGS="-W -D_FORTIFY_SOURCE=2 $CPPFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # Enable format and format security warnings
61ea54c309169801a1833f99729723071c24c047Dirk Hogan CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # Enable all default warnings
61ea54c309169801a1833f99729723071c24c047Dirk Hogan CPPFLAGS="-Wall $CPPFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # Test for -Werror=... (introduced some time post-4.0)
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # If we hit a format error -- it should be fatal.
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_CHECKING([compiler support for -Werror=format-security])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan ink_svd_CPPFLAGS="$CPPFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan CPPFLAGS="-Werror=format-security $CPPFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_RESULT([$ink_opt_ok])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan if test "x$ink_opt_ok" != "xyes"; then
61ea54c309169801a1833f99729723071c24c047Dirk Hogan CPPFLAGS="$ink_svd_CPPFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # C-specific flags...
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # by gcc 2.95.
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan ink_svd_CFLAGS="$CFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan CFLAGS="-Wno-pointer-sign $CFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan AC_MSG_RESULT([$ink_opt_ok])
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan if test "x$ink_opt_ok" != "xyes"; then
61ea54c309169801a1833f99729723071c24c047Dirk Hogan CFLAGS="$ink_svd_CFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # Linker flags...
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # Have linker produce read-only relocations, if it knows how
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_CHECKING([linker tolerates -z relro])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan ink_svd_LDFLAGS="$LDFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan LDFLAGS="-Wl,-z,relro $LDFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_LINK_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_RESULT([$ink_opt_ok])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan if test "x$ink_opt_ok" != "xyes"; then
61ea54c309169801a1833f99729723071c24c047Dirk Hogan LDFLAGS="$ink_svd_LDFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # C++-specific flags are defined further below. Look for CXXFLAGS...
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Honor aclocal flags
61ea54c309169801a1833f99729723071c24c047Dirk HoganACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Verify our GCC version
61ea54c309169801a1833f99729723071c24c047Dirk Hoganif test "x$GXX" = "xyes"; then
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_CHECKING([GNU compiler version])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # Don't pass CXXFLAGS to the following CXX command as some
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # of them can't be specified along with '-v'.
61ea54c309169801a1833f99729723071c24c047Dirk Hogan cc_version=["`$CXX -v 2>&1 </dev/null |grep 'gcc version' |\
61ea54c309169801a1833f99729723071c24c047Dirk Hogan sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"]
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_RESULT([$cc_version])
61ea54c309169801a1833f99729723071c24c047Dirk Hogan # Some version numbers
61ea54c309169801a1833f99729723071c24c047Dirk Hogan cc_vers_major=`echo $cc_version | cut -f1 -d.`
61ea54c309169801a1833f99729723071c24c047Dirk Hogan cc_vers_minor=`echo $cc_version | cut -f2 -d.`
61ea54c309169801a1833f99729723071c24c047Dirk Hogan cc_vers_patch=`echo $cc_version | cut -f3 -d.`
61ea54c309169801a1833f99729723071c24c047Dirk Hogan test -n "$cc_vers_major" || cc_vers_major=0
61ea54c309169801a1833f99729723071c24c047Dirk Hogan test -n "$cc_vers_minor" || cc_vers_minor=0
61ea54c309169801a1833f99729723071c24c047Dirk Hogan test -n "$cc_vers_patch" || cc_vers_patch=0
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch`
61ea54c309169801a1833f99729723071c24c047Dirk Hogan if test $cc_vers_major -lt 3; then
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_ERROR([gcc >= 3.0 is needed to compile inkscape])
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl ******************************
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Gettext stuff
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl ******************************
61ea54c309169801a1833f99729723071c24c047Dirk HoganGETTEXT_PACKAGE="AC_PACKAGE_NAME"
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_SUBST(GETTEXT_PACKAGE)
3744900be632496920d4c9aca8f94ba6db4dd882Dirk HoganAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Add the languages which your application supports here.
61ea54c309169801a1833f99729723071c24c047Dirk HoganALL_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"
61ea54c309169801a1833f99729723071c24c047Dirk HoganAM_GLIB_GNU_GETTEXT
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_PATH_PROG(PKG_CONFIG, pkg-config, no)
61ea54c309169801a1833f99729723071c24c047Dirk Hoganif test "x$PKG_CONFIG" = "xno"; then
3744900be632496920d4c9aca8f94ba6db4dd882Dirk Hogan AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl ******************************
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Check for OpenMP
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Replace this with AC_OPENMP once Autoconf 2.62 is widespread
bf428bd5bd8ff463b3438964b14c7f95ee57fc8cDirk Hogandnl ******************************
61ea54c309169801a1833f99729723071c24c047Dirk HoganAX_OPENMP([openmp_ok=yes],[openmp_ok=no])
61ea54c309169801a1833f99729723071c24c047Dirk Hoganif test "x$openmp_ok" = "xyes"; then
61ea54c309169801a1833f99729723071c24c047Dirk Hogan dnl We have it, now set up the flags
bf428bd5bd8ff463b3438964b14c7f95ee57fc8cDirk Hogan CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_CHECK_HEADER(omp.h)
bf428bd5bd8ff463b3438964b14c7f95ee57fc8cDirk Hogandnl ******************************
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl Check for libpng
61ea54c309169801a1833f99729723071c24c047Dirk Hogandnl ******************************
61ea54c309169801a1833f99729723071c24c047Dirk HoganAC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=yes)], png_ok=no, -lz -lm)
61ea54c309169801a1833f99729723071c24c047Dirk Hoganif test "x$png_ok" != "xyes"; then
61ea54c309169801a1833f99729723071c24c047Dirk Hogan AC_MSG_ERROR([libpng >= 1.2 is needed to compile inkscape])
AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
# include <gc/gc.h>
# include <gc.h>
#include <stdio.h>
AC_MSG_ERROR([libgc (the Boehm Conservative Collector) 6.4+, is needed to compile inkscape -- http://www.hpl.hp.com/personal/Hans_Boehm/gc])
AC_CHECK_HEADERS([sys/filio.h])
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_MEMBERS([struct mallinfo.usmblks,
struct mallinfo.fsmblks,
struct mallinfo.uordblks,
struct mallinfo.fordblks,
struct mallinfo.hblkhd],,,
[#include <malloc.h>])
AC_CHECK_HEADER(X11/Xft/Xft.h, xft_ok=yes, xft_ok=no)
XFT_LIBS="-L/usr/X11R6/lib -lXft "
AC_MSG_ERROR([--with-gnome-vfs was specified, but appropriate libgnomevfs development packages could not be found])
AC_HELP_STRING([--without-inkjar], [disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
AC_CHECK_HEADERS(zlib.h)
checkPERL_CFLAGS=`perl -MExtUtils::Embed -e perl_inc 2>/dev/null`
checkPERL_LIBS=`perl -MExtUtils::Embed -e ldopts 2>/dev/null`
checkPYTHON_CFLAGS=`python -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '%s/%s %s' % (distutils.sysconfig.get_config_var('LIBPL'),distutils.sysconfig.get_config_var('LDLIBRARY'),distutils.sysconfig.get_config_var('LIBS'))" 2>/dev/null`
AC_MSG_ERROR([--enable-lcms was specified, but appropriate LittleCms development packages could not be found])
AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Poppler version of GfxFont to use (0.8.3 or higher versions of Poppler)])
dnl AS_HELP_STRING([--enable-inkboard], [enable Inkboard online whiteboard facility (disabled by default)]),
dnl ***********************************************************************************************************
dnl Check for a Cairo version that implements user-fonts feature (with a stable API, that is cairo > 1.7.6),
dnl ***********************************************************************************************************
PKG_CHECK_MODULES(INKSCAPE, gdkmm-2.4 glibmm-2.4 giomm-2.4 gtkmm-2.4 >= 2.10.0 gtk+-2.0 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 cairo sigc++-2.0 >= $min_sigc_version $ink_spell_pkg gthread-2.0 >= 2.0 libpng >= 1.2 gsl)
#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>
AC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)]))
AC_CHECK_HEADER(popt.h,
AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
if test -e /proc/self/maps; then
AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
if test -e /proc/self/maps; then
AC_CHECK_HEADERS(ieeefp.h)
AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_HEADERS(libintl.h)
AC_CHECK_HEADERS(stddef.h)
AC_CHECK_HEADERS(sys/time.h)
# One way of selectively disabling the warnings (i.e. only where the
# programmer deliberately isn't using the parameter, e.g. for a callback)
# in src/seltrans.cpp:sp_seltrans_handle_event; this indicates that the
# programmer deliberately has an unused parameter (e.g. because it's used
dnl AC_ARG_ENABLE(libinkscape, AC_HELP_STRING([--enable-libinkscape], [Compile dynamic library (experimental)]), [splib=$enableval], [splib=no])
AC_ARG_ENABLE(mmx, [ --disable-mmx Don't use MMX optimization [default=auto]], enable_mmx="$enableval", enable_mmx=auto)
dnl Define our data paths for config.h
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