configure.ac revision 2828bd38e8fd76ee54681b54bded71cfdf337d4b
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl Process this file with autoconf to produce a configure script.
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_PREREQ(2.50)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_INIT(inkscape, 0.44+devel)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl N.B. After 0.40, please change to `0.40+cvs' instead of `0.41cvs'.
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl Rationale: (i) placate simple version comparison software such as
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl `dpkg --compare-versions'. (ii) We don't always know what the next
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl version is going to be called until about the time we release it
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl (whereas we always know what the previous version was called).
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_CANONICAL_HOST
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_CONFIG_SRCDIR(src/main.cpp)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAM_INIT_AUTOMAKE
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAM_CONFIG_HEADER(config.h)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_PROG_INTLTOOL(0.22)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl These next few lines are needed only while libcroco is in our source tree.
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAM_PROG_CC_C_O
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoif test "$GCC" = "yes"; then
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # Enable some warnings from gcc.
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # by gcc 2.95.
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico ink_svd_CFLAGS="$CFLAGS"
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico CFLAGS="-Wno-pointer-sign $CFLAGS"
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico AC_COMPILE_IFELSE([int dummy;
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico], , CFLAGS="$ink_svd_CFLAGS",)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico CFLAGS="-Wall -W $CFLAGS"
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAM_PROG_CC_STDC
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_HEADER_STDC
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl Honor aclocal flags
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl RANLIB is outdated now
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl AC_PROG_RANLIB
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAM_PROG_LIBTOOL
d380b9443b463cec3bc1bdb313452647858fd88btheAdibdnl Verify our GCC version
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoif test "x$GXX" = "xyes"; then
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico AC_MSG_CHECKING([GNU compiler version])
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico cc_version=["`$CXX $CXXFLAGS -v 2>&1 </dev/null |grep 'gcc version' |\
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"]
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico AC_MSG_RESULT([$cc_version])
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # Some version numbers
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico cc_vers_major=`echo $cc_version | cut -f1 -d.`
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico cc_vers_minor=`echo $cc_version | cut -f2 -d.`
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico cc_vers_patch=`echo $cc_version | cut -f3 -d.`
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico test -n "$cc_vers_major" || cc_vers_major=0
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico test -n "$cc_vers_minor" || cc_vers_minor=0
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico test -n "$cc_vers_patch" || cc_vers_patch=0
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch`
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico if test $cc_vers_major -lt 3; then
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico AC_MSG_ERROR([gcc >= 3.0 is needed to compile inkscape])
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl ******************************
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl Gettext stuff
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl ******************************
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoGETTEXT_PACKAGE="AC_PACKAGE_NAME"
d380b9443b463cec3bc1bdb313452647858fd88btheAdibAC_SUBST(GETTEXT_PACKAGE)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl Add the languages which your application supports here.
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoALL_LINGUAS="am az be ca cs da de el es es_MX et eu fr ga gl hu it ja ko lt mk nb nl nn pa pl pt pt_BR ru sk sl sr sr@Latn sv tr uk vi zh_CN zh_TW"
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAM_GLIB_GNU_GETTEXT
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_PATH_PROG(PKG_CONFIG, pkg-config, no)
d380b9443b463cec3bc1bdb313452647858fd88btheAdibif test "x$PKG_CONFIG" = "xno"; then
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=no)], png_ok=no, -lz -lm)
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoif test "x$png_ok" != "xyes"; then
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico AC_MSG_ERROR([libpng >= 1.2 is needed to compile inkscape])
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl Handle possible dlopen requirement for libgc
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicodnl Isn't this internal to something in autoconf? Couldn't find it...
94be920c9026f9747c5304ced67acd6afe60615bJazzyNicoAC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico [lt_cv_dlopen="dlopen"],
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico [AC_CHECK_LIB([dl], [dlopen],
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico [AC_CHECK_LIB([svld], [dlopen],
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico [AC_CHECK_LIB([dld], [dld_link],
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # To test for the different required libs, I have to
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # overcome autoconf's caching system, so I change the
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # desired function name. They're all in libgc.
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # The "break" will exit from the top level
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico # AC_CHECK_HEADERS.
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico AC_CHECK_LIB(gc, GC_init,
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico LIBS="-lgc $gc_libs $LIBS";
94be920c9026f9747c5304ced67acd6afe60615bJazzyNico break], [gc_ok=no], [$gc_libs])
# 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([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 "
PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 >= 1.116.0 libgnomeprintui-2.2 >= 1.116.0, gp=yes, gp=no)
AC_MSG_ERROR([--with-gnome-print was specified, but appropriate libgnomeprint development packages could not be found])
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_LDFLAGS=`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('LIBRARY'),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])
AS_HELP_STRING([--enable-inkboard], [enable Inkboard online whiteboard facility (disabled by default)]),
PKG_CHECK_MODULES(INKSCAPE, gdkmm-2.4 glibmm-2.4 gtkmm-2.4 gtk+-2.0 >= 2.4.0 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 sigc++-2.0 >= 2.0.12 $ink_spell_pkg gthread-2.0 >= 2.0)
PKG_CHECK_MODULES(INKSCAPE, gdkmm-2.4 glibmm-2.4 gtkmm-2.4 gtk+-2.0 >= 2.4.0 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 sigc++-2.0 >= 2.0.11 $ink_spell_pkg gthread-2.0 >= 2.0)
AC_CHECK_HEADER(popt.h,
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_HEADER([boost/graph/adjacency_list.hpp],
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
CXXFLAGS="-Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
dnl AC_ARG_WITH(modules, AC_HELP_STRING([--with-modules], [Compile with plugin support (experimental)]), [mod=$withval], [mod=yes])
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)
AC_DEFINE(g_ascii_strtod, fixed_g_ascii_strtod, [Pre-1.107 gstrfuncs.c version of g_ascii_strtod is broken])
dnl Define our data paths for config.h
[Base data directory -- only path-prefix.h should use it!])
[Base library directory -- only path-prefix.h should use it!])