1
dnl Process this file with autoconf to produce a configure script.
5
# Always use 0.xx+devel instead of 0.xxdevel for the version, e.g. 0.46+devel.
6
# Rationale: (i) placate simple version comparison software such as
7
# `dpkg --compare-versions'. (ii) We don't always know what the next
8
# version is going to be called until about the time we release it
9
# (whereas we always know what the previous version was called).
10
AC_INIT(inkscape, 0.48.5)
13
AC_CONFIG_SRCDIR([src/main.cpp])
14
AM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax])
16
AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
18
PATH="/opt/lsb/bin:$PATH"
24
AM_CONFIG_HEADER(config.h)
32
AC_PROG_INTLTOOL(0.22)
34
INK_BZR_SNAPSHOT_BUILD
36
dnl If automake 1.11 shave the output to look nice
37
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
39
dnl These next few lines are needed only while libcroco is in our source tree.
42
if test "$GCC" = "yes"; then
43
# Enable some warnings from gcc.
47
# Generic cpp flags...
49
# What is just plain "-W" ?
50
# Fortify source requires -O2 or higher, which is handled with newer autoconf
51
CPPFLAGS="-W -D_FORTIFY_SOURCE=2 $CPPFLAGS"
52
# Enable format and format security warnings
53
CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS"
54
# Enable all default warnings
55
CPPFLAGS="-Wall $CPPFLAGS"
56
# Enforce including only <glib.h> (required since 2.31)
57
PKG_CHECK_MODULES(NEW_GLIBMM, glibmm-2.4 >= 2.28, new_glibmm=yes,
59
if test "x$new_glibmm" = "xyes"; then
60
CPPFLAGS="-DG_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
63
# Test for -Werror=... (introduced some time post-4.0)
64
# If we hit a format error -- it should be fatal.
65
AC_MSG_CHECKING([compiler support for -Werror=format-security])
66
ink_svd_CPPFLAGS="$CPPFLAGS"
67
CPPFLAGS="-Werror=format-security $CPPFLAGS"
68
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
69
AC_MSG_RESULT([$ink_opt_ok])
70
if test "x$ink_opt_ok" != "xyes"; then
71
CPPFLAGS="$ink_svd_CPPFLAGS"
77
# -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
79
AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
80
ink_svd_CFLAGS="$CFLAGS"
81
CFLAGS="-Wno-pointer-sign $CFLAGS"
82
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
83
AC_MSG_RESULT([$ink_opt_ok])
84
if test "x$ink_opt_ok" != "xyes"; then
85
CFLAGS="$ink_svd_CFLAGS"
91
# Have linker produce read-only relocations, if it knows how
92
AC_MSG_CHECKING([linker tolerates -z relro])
93
ink_svd_LDFLAGS="$LDFLAGS"
94
LDFLAGS="-Wl,-z,relro $LDFLAGS"
95
AC_LINK_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
96
AC_MSG_RESULT([$ink_opt_ok])
97
if test "x$ink_opt_ok" != "xyes"; then
98
LDFLAGS="$ink_svd_LDFLAGS"
103
# C++-specific flags are defined further below. Look for CXXFLAGS...
106
dnl Honor aclocal flags
107
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
109
# Detect a working version of unordered containers.
110
AC_MSG_CHECKING([TR1 unordered_set usability])
112
#include <tr1/unordered_set>
114
std::tr1::unordered_set<int> i, j;
118
], [unordered_set_works=yes], [unordered_set_works=no])
119
if test "x$unordered_set_works" = "xyes"; then
121
AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set])
123
AC_MSG_RESULT([not working])
125
AC_CHECK_HEADER([boost/unordered_set.hpp], [AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1, [Boost unordered_set (Boost >= 1.36)])], [])
126
AC_CHECK_HEADER([ext/hash_set], [AC_DEFINE(HAVE_EXT_HASH_SET, 1, [Legacy GNU ext/hash_set])], [])
128
# Test whether GCC emits a spurious warning when using boost::optional
129
# If yes, turn off strict aliasing warnings to reduce noise
130
# and allow the legitimate warnings to stand out
131
AC_MSG_CHECKING([for overzealous strict aliasing warnings])
132
ignore_strict_aliasing=no
133
CXXFLAGS_SAVE=$CXXFLAGS
134
CXXFLAGS="$CXXFLAGS -Werror=strict-aliasing"
136
#include <boost/optional.hpp>
137
boost::optional<int> x;
141
], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes])
142
AC_MSG_RESULT($ignore_strict_aliasing)
143
CXXFLAGS=$CXXFLAGS_SAVE
144
if test "x$ignore_strict_aliasing" = "xyes"; then
145
CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing"
148
dnl ******************************
150
dnl ******************************
151
GETTEXT_PACKAGE="AC_PACKAGE_NAME"
152
AC_SUBST(GETTEXT_PACKAGE)
153
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
154
dnl Add the languages which your application supports here.
155
ALL_LINGUAS="am ar az be bg bn br ca ca@valencia cs da de dz el en_AU en_CA en_GB en_US@piglatin eo es_MX es et eu fa fi fr ga gl he hr hu hy id it ja km ko lt mk mn nb ne nl nn pa pl pt_BR pt ro ru rw sk sl sq sr@latin sr sv te_IN th tr uk vi zh_CN zh_TW"
158
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
159
if test "x$PKG_CONFIG" = "xno"; then
160
AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
163
dnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
164
AC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
165
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
167
dnl ******************************
169
dnl Replace this with AC_OPENMP once Autoconf 2.62 is widespread
170
dnl ******************************
171
AX_OPENMP([AC_CHECK_HEADER([omp.h],
176
if test "x$openmp_ok" = "xyes"; then
177
dnl We have it, now set up the flags
178
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
179
AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
182
dnl ******************************
184
dnl ******************************
185
AC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=yes)], png_ok=no, -lz -lm)
186
if test "x$png_ok" != "xyes"; then
187
AC_MSG_ERROR([libpng >= 1.2 is needed to compile inkscape])
190
dnl Handle possible dlopen requirement for libgc
191
dnl Isn't this internal to something in autoconf? Couldn't find it...
192
AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
193
[lt_cv_dlopen="dlopen"],
194
[AC_CHECK_LIB([dl], [dlopen],
195
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
196
[AC_CHECK_LIB([svld], [dlopen],
197
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
198
[AC_CHECK_LIB([dld], [dld_link],
199
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
205
AC_CHECK_HEADERS([gc.h gc/gc.h],
207
# To test for the different required libs, I have to
208
# overcome autoconf's caching system, so I change the
209
# desired function name. They're all in libgc.
210
# The "break" will exit from the top level
213
AC_CHECK_LIB(gc, GC_init,
215
LIBS="-lgc $gc_libs $LIBS";
216
break], [gc_ok=no], [$gc_libs])
218
AC_CHECK_LIB(gc, GC_malloc,
220
LIBS="-lgc $gc_libs $LIBS";
221
break], [gc_ok=no], [$gc_libs])
222
gc_libs="$lt_cv_dlopen_libs"
223
AC_CHECK_LIB(gc, GC_realloc,
225
LIBS="-lgc $gc_libs $LIBS";
226
break], [gc_ok=no], [$gc_libs])
227
gc_libs="-lpthread $lt_cv_dlopen_libs"
228
AC_CHECK_LIB(gc, GC_free,
230
LIBS="-lgc $gc_libs $LIBS";
231
break], [gc_ok=no], [$gc_libs])
234
if test "x$gc_ok" = "xyes" && test "x$cross_compiling" = "xno" ; then
235
AC_MSG_CHECKING([libgc version 6.4+])
244
extern unsigned GC_version;
246
unsigned min = ((6 << 16) | (4 << 8) | 0);
247
printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF);
248
if (GC_version>=min) return 0;
254
AC_MSG_RESULT([$gc_ok])
256
if test "x$gc_ok" != "xyes"; then
257
AC_MSG_ERROR([libgc (the Boehm Conservative Collector) 6.4+, is needed to compile inkscape -- http://www.hpl.hp.com/personal/Hans_Boehm/gc])
260
dnl This check is to get a FIONREAD definition on Solaris 8
261
AC_CHECK_HEADERS([sys/filio.h])
264
AC_CHECK_HEADERS([malloc.h])
265
AC_CHECK_FUNCS([mallinfo], [
266
AC_CHECK_MEMBERS([struct mallinfo.usmblks,
267
struct mallinfo.fsmblks,
268
struct mallinfo.uordblks,
269
struct mallinfo.fordblks,
270
struct mallinfo.hblkhd],,,
271
[#include <malloc.h>])
274
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
275
if test "x$FREETYPE_CONFIG" = "xno"; then
276
AC_MSG_ERROR([Cannot find freetype-config])
278
FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
279
FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
280
AC_SUBST(FREETYPE_CFLAGS)
281
AC_SUBST(FREETYPE_LIBS)
283
dnl ******************************
285
dnl ******************************
286
AC_MSG_CHECKING([for Win32 platform])
290
WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
296
AC_MSG_RESULT([$platform_win32])
297
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
298
AC_SUBST(WIN32_CFLAGS)
300
dnl ******************************
302
dnl ******************************
303
AC_MSG_CHECKING([for OSX platform])
304
if test "x$build_vendor" = "xapple" ; then
309
AC_MSG_RESULT([$platform_osx])
310
AM_CONDITIONAL(PLATFORM_OSX, test "$platform_osx" = "yes")
312
AC_MSG_CHECKING([for Solaris platform])
316
solaris_version=`echo $host|sed -e 's/^.*-solaris2\.//' -e s'/\..*$//'`
317
CFLAGS="$CFLAGS -DSOLARIS=$solaris_version"
318
CXXFLAGS="$CXXFLAGS -DSOLARIS=$solaris_version"
324
AC_MSG_RESULT([$platform_solaris])
325
AM_CONDITIONAL(PLATFORM_SOLARIS, test "$platform_solaris" = "yes")
327
dnl ******************************
328
dnl gnome vfs checking
329
dnl ******************************
331
AC_ARG_WITH(gnome-vfs,
332
AC_HELP_STRING([--with-gnome-vfs], [use gnome vfs for loading files]),
333
[with_gnome_vfs=$withval], [with_gnome_vfs=auto])
335
if test "x$with_gnome_vfs" = "xno"; then
336
dnl Asked to ignore gnome-vfs
339
dnl Have to test gnome-vfs presence
340
PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.0, gnome_vfs=yes, gnome_vfs=no)
341
if test "x$gnome_vfs" != "xyes"; then
342
dnl No gnome-vfs found
343
if test "x$with_gnome_vfs" = "xyes"; then
344
dnl Gnome-VFS was explicitly asked for, so stop
345
AC_MSG_ERROR([--with-gnome-vfs was specified, but appropriate libgnomevfs development packages could not be found])
347
# gnome-vfs is no, tell us for the log file
348
AC_MSG_RESULT($gnome_vfs)
353
AM_CONDITIONAL(USE_GNOME_VFS, test "x$gnome_vfs" = "xyes")
354
if test "x$gnome_vfs" = "xyes"; then
355
AC_DEFINE(WITH_GNOME_VFS, 1, [Use gnome vfs file load functionality])
358
AC_SUBST(GNOME_VFS_CFLAGS)
359
AC_SUBST(GNOME_VFS_LIBS)
361
dnl ******************************
362
dnl libinkjar checking
363
dnl ******************************
366
AC_HELP_STRING([--without-inkjar], [disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
368
if test "x$with_ij" = "xyes"; then
369
AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)])
371
AC_CHECK_HEADERS(zlib.h)
376
AM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
379
if pkg-config --exists gtkspell-2.0; then
380
ink_spell_pkg=gtkspell-2.0
381
AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
384
dnl ******************************
386
dnl ******************************
388
AC_MSG_CHECKING(for Perl development environment)
390
AC_HELP_STRING([--with-perl], [use Perl for embedded scripting (EXPERIMENTAL)]),
391
[with_perl=$withval], [with_perl=skipped])
393
if test "x$with_perl" = "xyes"; then
394
checkPERL_CFLAGS=`perl -MExtUtils::Embed -e perl_inc 2>/dev/null`
395
if test "$?" -gt "0"; then
398
checkPERL_LIBS=`perl -MExtUtils::Embed -e ldopts 2>/dev/null`
399
if test "$?" -gt "0"; then
406
AC_MSG_RESULT([$with_perl])
407
if test "x$with_perl" = "xyes"; then
408
# Test that we actually have the perl libraries installed
411
CFLAGS="$CFLAGS $checkPERL_CFLAGS"
412
LIBS="$LIBS $checkPERL_LIBS"
413
AC_CHECK_FUNC([perl_parse],[
414
PERL_CFLAGS="$checkPERL_CFLAGS"
415
PERL_LIBS="$checkPERL_LIBS"
416
AC_DEFINE(WITH_PERL, 1, [use Perl for embedded scripting])
423
AM_CONDITIONAL(WITH_PERL, test "x$with_perl" = "xyes")
424
AC_SUBST(PERL_CFLAGS)
427
dnl ******************************
429
dnl ******************************
431
AC_MSG_CHECKING(for Python development environment)
433
AC_HELP_STRING([--with-python], [use Python for embedded scripting (EXPERIMENTAL)]),
434
[with_python=$withval], [with_python=skipped])
436
if test "x$with_python" = "xyes"; then
437
checkPYTHON_CFLAGS=`python -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
438
if test "$?" -gt "0"; then
441
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`
442
if test "$?" -gt "0"; then
449
AC_MSG_RESULT([$with_python])
450
if test "x$with_python" = "xyes"; then
451
# Test that we actually have the python libraries installed
454
CFLAGS="$CFLAGS $checkPYTHON_CFLAGS"
455
LIBS="$LIBS $checkPYTHON_LIBS"
456
AC_CHECK_FUNC([Py_Initialize],[
457
PYTHON_CFLAGS="$checkPYTHON_CFLAGS"
458
PYTHON_LIBS="$checkPYTHON_LIBS"
459
AC_DEFINE(WITH_PYTHON, 1, [use Python for embedded scripting])
466
AM_CONDITIONAL(WITH_PYTHON, test "x$with_python" = "xyes")
467
AC_SUBST(PYTHON_CFLAGS)
468
AC_SUBST(PYTHON_LIBS)
470
dnl ******************************
471
dnl LittleCms checking
472
dnl ******************************
475
AC_HELP_STRING([--enable-lcms], [enable LittleCms for color management]),
476
[enable_lcms=$enableval], [enable_lcms=yes])
478
if test "x$enable_lcms" = "xno"; then
479
# Asked to ignore LittleCms
483
# Have to test LittleCms presence
484
if test "x${platform_osx}" != "xyes"; then
485
# lcms 2.2 & 2.3 have problems on OSX
486
PKG_CHECK_MODULES(LCMS2, lcms2, have_lcms2="yes", have_lcms2="no")
489
if test "x${have_lcms2}" = "xyes"; then
490
LIBS="$LIBS $LCMS2_LIBS"
491
AC_DEFINE(HAVE_LIBLCMS2, 1, [define to 1 if you have lcms version 2.x])
492
AC_SUBST(LCMS2_CFLAGS)
495
PKG_CHECK_MODULES(LCMS, lcms >= 1.13, lcms=yes, lcms=no)
496
if test "x$lcms" = "xyes"; then
497
LIBS="$LIBS $LCMS_LIBS"
498
AC_DEFINE(HAVE_LIBLCMS1, 1, [define to 1 if you have lcms version 1.x])
499
AC_SUBST(LCMS_CFLAGS)
502
# No lcms found. LittleCms was explicitly asked for, so stop
503
AC_MSG_ERROR([--enable-lcms was specified, but appropriate LittleCms development packages could not be found])
508
dnl ******************************
509
dnl Libpoppler checking
510
dnl ******************************
512
AC_ARG_ENABLE(poppler-cairo,
513
AC_HELP_STRING([--enable-poppler-cairo], [Enable libpoppler-cairo for rendering PDF preview]),
514
[enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
517
PKG_CHECK_MODULES(POPPLER, poppler >= 0.5.9, poppler=yes, poppler=no)
519
if test "x$poppler" = "xyes"; then
520
dnl Working libpoppler
521
dnl Have to test libpoppler-glib presence
522
PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.5.9, poppler_glib=yes, poppler_glib=no)
523
if test "x$poppler_glib" = "xyes"; then
524
dnl Working libpoppler-glib found
525
dnl Check whether the Cairo SVG backend is available
526
PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, cairo_svg=yes, cairo_svg=no)
527
if test "x$cairo_svg" = "xyes"; then
528
POPPLER_LIBS="$POPPLER_LIBS $POPPLER_GLIB_LIBS "
531
if test "x$enable_poppler_cairo" = "xyes"; then
532
dnl Have to test libpoppler-cairo presence for PDF preview
533
dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
534
PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.5.9, poppler_cairo=yes, poppler_cairo=no)
535
if test "x$poppler_glib" = "xyes" -a "x$poppler_cairo" = "xyes" -a \
536
"x$cairo_svg" = "xno"
538
POPPLER_LIBS="$POPPLER_LIBS $POPPLER_CAIRO_LIBS "
543
if test "x$poppler" = "xyes"; then
544
LIBS="$LIBS $POPPLER_LIBS"
545
AC_DEFINE(HAVE_POPPLER, 1, [Use libpoppler for direct PDF import])
547
if test "x$poppler_cairo" = "xyes" -a "x$poppler_glib" = "xyes"; then
548
AC_DEFINE(HAVE_POPPLER_CAIRO, 1, [Use libpoppler-cairo for rendering PDF preview])
550
if test "x$poppler_glib" = "xyes" -a "x$cairo_svg" = "xyes"; then
551
AC_DEFINE(HAVE_POPPLER_GLIB, 1, [Use libpoppler-glib and Cairo-SVG for PDF import])
553
AC_SUBST(POPPLER_CFLAGS)
554
AC_SUBST(POPPLER_LIBS)
556
PKG_CHECK_MODULES(POPPLER_GFXFONT, poppler >= 0.8.3, popplernew=yes, popplernew=no)
557
if test "x$popplernew" = "xyes"; then
558
AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Use GfxFont from Poppler >= 0.8.3])
561
PKG_CHECK_MODULES(POPPLER_NEWERRORAPI, poppler >= 0.20.0, popplernewerror=yes, popplernewerror=no)
562
if test "x$popplernewerror" = "xyes"; then
563
AC_DEFINE(POPPLER_NEW_ERRORAPI, 1, [Use new error API from Poppler >= 0.20.0])
567
ink_svd_CPPFLAGS=$CPPFLAGS
569
CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
570
LIBS="$LIBS $POPPLER_LIBS"
572
AC_MSG_CHECKING(for new color space API in Poppler)
575
#include <GfxState.h>
578
typedef GfxColorSpace *(*parse_p)(Object *, Gfx *);
580
p = &GfxColorSpace::parse;
583
], [popplercolor=yes])
584
if test "x$popplercolor" = "xyes"; then
585
AC_DEFINE(POPPLER_NEW_COLOR_SPACE_API, 1, [Use color space API from Poppler >= 0.12.2])
591
PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_COLOR_SPACE_API, poppler >= 0.26.0, popplernewercolorspaceapi=yes, popplernewercolorspaceapi=no)
592
if test "x$popplernewercolorspaceapi" = "xyes"; then
593
AC_DEFINE(POPPLER_EVEN_NEWER_COLOR_SPACE_API, 1, [Use even newer color space API from Poppler >= 0.26.0])
596
# Poppler's b604a008 commit changes this
597
AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor])
600
#include <GfxState.h>
603
GfxPatch::ColorValue color = {c: {0}};
605
patch.color[[0]][[0]] = color;
608
], [popplergfxcolor=yes])
609
if test "x$popplergfxcolor" = "xyes"; then
610
AC_DEFINE(POPPLER_NEW_GFXPATCH, 1, [GfxPatch no longer uses GfxColor in >= 0.15.1])
616
CPPFLAGS=$ink_svd_CPPFLAGS
619
dnl ******************************
620
dnl Inkboard dependency checking
621
dnl ******************************
623
dnl with_inkboard="no"
624
dnl with_inkboard_ssl="no"
626
dnl INKBOARD_CFLAGS=""
628
dnl AC_ARG_ENABLE(inkboard,
629
dnl AS_HELP_STRING([--enable-inkboard], [enable Inkboard online whiteboard facility (disabled by default)]),
630
dnl with_inkboard=$enableval,with_inkboard=no)
632
dnl if test "x$with_inkboard" = "xyes"; then
633
dnl with_inkboard="yes"
634
dnl AC_DEFINE(WITH_INKBOARD,1,[Build in Inkboard support])
637
dnl PKG_CHECK_MODULES(INKBOARD, openssl, with_inkboard_ssl=yes, with_inkboard_ssl=no)
638
dnl if test "x$with_inkboard_ssl" = "xyes"; then
639
dnl OpenSSL found; enable SSL support in Pedro
640
dnl INKBOARD_CFLAGS="$INKBOARD_CFLAGS -DHAVE_SSL"
641
dnl RELAYTOOL([ssl], INKBOARD_LIBS, INKBOARD_CFLAGS, [inkboard_weak=yes])
642
dnl RELAYTOOL([crypto], INKBOARD_LIBS, INKBOARD_CFLAGS, [inkboard_weak=yes])
643
dnl AC_DEFINE(WITH_INKBOARD_SSL,1,[Build in SSL support for Inkboard])
646
dnl with_inkboard="no"
649
dnl AM_CONDITIONAL(WITH_INKBOARD, test "x$with_inkboard" = "xyes")
653
AC_SUBST(INKBOARD_LIBS)
654
AC_SUBST(INKBOARD_CFLAGS)
656
dnl ******************************
657
dnl Check for libwpg for extension
658
dnl ******************************
662
PKG_CHECK_MODULES(LIBWPG01, libwpg-0.1 libwpg-stream-0.1, with_libwpg01=yes, with_libwpg01=no)
663
if test "x$with_libwpg01" = "xyes"; then
664
AC_DEFINE(WITH_LIBWPG01,1,[Build in libwpg 0.1.x])
666
AC_SUBST(LIBWPG_LIBS, $LIBWPG01_LIBS)
667
AC_SUBST(LIBWPG_CFLAGS, $LIBWPG01_CFLAGS)
669
AM_CONDITIONAL(WITH_LIBWPG01, test "x$with_libwpg01" = "xyes")
671
PKG_CHECK_MODULES(LIBWPG02, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg02=yes, with_libwpg02=no)
672
if test "x$with_libwpg02" = "xyes"; then
673
AC_DEFINE(WITH_LIBWPG02,1,[Build in libwpg 0.2.x])
675
AC_SUBST(LIBWPG_LIBS, $LIBWPG02_LIBS)
676
AC_SUBST(LIBWPG_CFLAGS, $LIBWPG02_CFLAGS)
678
AM_CONDITIONAL(WITH_LIBWPG02, test "x$with_libwpg02" = "xyes")
680
if test "x$with_libwpg" = "xyes"; then
681
AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
683
AM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
685
dnl ******************************
686
dnl Check for ImageMagick Magick++
687
dnl ******************************
689
PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
690
if test "x$magick_ok" = "xyes"; then
691
AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
693
AM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
695
AC_SUBST(IMAGEMAGICK_LIBS)
696
AC_SUBST(IMAGEMAGICK_CFLAGS)
698
dnl ***********************************************************************************************************
699
dnl Check for a Cairo version that implements user-fonts feature (with a stable API, that is cairo > 1.7.6),
700
dnl so that we conditionally add SVGFonts support
701
dnl ***********************************************************************************************************
703
PKG_CHECK_MODULES(CAIRO_USER_FONTS, cairo > 1.7.6, cairouserfonts=yes, cairouserfonts=no)
704
if test "x$cairouserfonts" = "xyes"; then
705
AC_DEFINE(ENABLE_SVG_FONTS, 1, [SVG Fonts should be used])
708
dnl ******************************
709
dnl Unconditional dependencies
710
dnl ******************************
712
PKG_CHECK_MODULES(INKSCAPE, gdkmm-2.4 glibmm-2.4 giomm-2.4 gtkmm-2.4 >= 2.10.0 gtk+-2.0 pangoft2 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 cairo sigc++-2.0 >= 2.0.12 $ink_spell_pkg gthread-2.0 >= 2.0 libpng >= 1.2 gsl)
714
dnl gtkmm provides no preprocessor macros for easily checking versions. This check is used
715
dnl to figure out if we are working with the newer 2.24 series or not.
716
PKG_CHECK_MODULES(GTKMM_2_24, gtkmm-2.4 >= 2.24, with_gtkmm_2_24=yes, with_gtkmm_2_24=no)
717
if test "x$with_gtkmm_2_24" = "xyes"; then
718
AC_DEFINE(WITH_GTKMM_2_24,1,[Build with Gtkmm 2.24.x])
721
PKG_CHECK_MODULES(GTKMM_2_22, gtkmm-2.4 >= 2.22, with_gtkmm_2_22=yes, with_gtkmm_2_22=no)
722
if test "x$with_gtkmm_2_22" = "xyes"; then
723
AC_DEFINE(WITH_GTKMM_2_22,1,[Build with Gtkmm 2.22.x])
726
# Check for GTK+ backend target
727
AC_MSG_CHECKING([for GTK+ backend target])
728
gtk_backend_target=`pkg-config --variable=target gtk+-2.0`
729
AC_MSG_RESULT($gtk_backend_target)
731
# Add X11 library if needed
732
if test "x$gtk_backend_target" = "xx11"; then
733
INKSCAPE_LIBS="$INKSCAPE_LIBS -lX11"
736
# Check for Apple Mac OS X Carbon framework
738
AC_MSG_CHECKING([for Mac OS X Carbon support])
740
#include <Carbon/Carbon.h>
741
#include <CoreServices/CoreServices.h>
743
AC_MSG_RESULT($carbon_ok)
744
if test "x$carbon_ok" = "xyes"; then
745
AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
746
CARBON_LDFLAGS="-framework Carbon"
747
AC_SUBST(CARBON_LDFLAGS)
749
AM_CONDITIONAL(HAVE_CARBON, test "x$carbon_ok" = "xyes")
751
# Check for some boost header files
752
AC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)]))
754
PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no)
755
if test "x$cairo_pdf" = "xyes"; then
756
AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
759
dnl Shouldn't we test for libpng and libz?
760
INKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz -lxml2 -ldl"
761
if test "x$openmp_ok" = "xyes"; then
762
INKSCAPE_LIBS="$INKSCAPE_LIBS -lgomp"
765
AC_CHECK_HEADER(popt.h,
766
[INKSCAPE_LIBS="$INKSCAPE_LIBS -lpopt"],
767
AC_MSG_ERROR([libpopt is required]))
769
dnl **************************
771
dnl ******************************
772
AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
773
if test "x$aspell_ok" = "xyes"; then
774
AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
775
INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
777
AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
780
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
782
LIBS="$LIBS $INKSCAPE_LIBS"
783
AC_CHECK_FUNCS(bind_textdomain_codeset)
784
dnl Check for gtk_window_fullscreen in gtk (>= 2.2)
785
AC_CHECK_FUNCS(gtk_window_set_default_icon_from_file)
786
AC_CHECK_FUNCS(gtk_window_fullscreen)
790
dnl Check for binary relocation support
791
dnl Hongli Lai <h.lai@chello.nl>
793
AC_ARG_ENABLE(binreloc,
794
[ --enable-binreloc compile with binary relocation support],
795
enable_binreloc=$enableval,enable_binreloc=no)
797
AC_MSG_CHECKING(whether binary relocation support should be enabled)
798
if test "$enable_binreloc" = "yes"; then
800
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
801
if test -e /proc/self/maps; then
805
AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
809
elif test "$enable_binreloc" = "auto"; then
810
AC_MSG_RESULT(yes when available)
811
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
812
if test -e /proc/self/maps; then
816
AC_MSG_CHECKING(whether everything is installed to the same prefix)
817
if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
818
"$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
819
"$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
824
AC_MSG_NOTICE(Binary relocation support will be disabled.)
833
elif test "$enable_binreloc" = "no"; then
836
AC_MSG_RESULT([no (unknown value "$enable_binreloc")])
839
AC_DEFINE(BR_PTHREADS,[0],[Use binreloc thread support?])
840
if test "$enable_binreloc" = "yes"; then
841
AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
844
AC_ARG_ENABLE(osxapp,
845
[ --enable-osxapp compile with OSX .app data dir paths],
846
enable_osxapp=$enableval,enable_osxapp=no)
847
if test "$enable_osxapp" = "yes"; then
848
AC_DEFINE(ENABLE_OSX_APP_LOCATIONS,,[Build with OSX .app data dir paths?])
851
dnl ******************************
852
dnl Reported by autoscan
853
dnl ******************************
855
# if we did not find pow(), see if it's in libm.
856
if test x"$ac_cv_func_pow" = x"no" ; then
860
AC_CHECK_FUNCS(floor)
861
AC_CHECK_FUNCS(gettimeofday)
862
AC_CHECK_FUNCS(memmove)
863
AC_CHECK_FUNCS(memset)
864
AC_CHECK_FUNCS(mkdir)
865
AC_CHECK_FUNCS(strncasecmp)
866
AC_CHECK_FUNCS(strpbrk)
867
AC_CHECK_FUNCS(strrchr)
868
AC_CHECK_FUNCS(strspn)
869
AC_CHECK_FUNCS(strstr)
870
AC_CHECK_FUNCS(strtoul)
871
AC_CHECK_FUNCS(fpsetmask)
873
AC_CHECK_HEADERS(ieeefp.h)
874
AC_CHECK_HEADERS(fcntl.h)
875
AC_CHECK_HEADERS(libintl.h)
876
AC_CHECK_HEADERS(stddef.h)
877
AC_CHECK_HEADERS(sys/time.h)
887
dnl Work around broken gcc 3.3 (seen on OSX) where "ENABLE_NLS" isn't
888
dnl set correctly because the gettext function isn't noticed.
889
if test "$ac_cv_header_libintl_h" = "yes" &&
890
test "$ac_cv_func_bind_textdomain_codeset" = "yes" &&
891
test "$gt_cv_func_have_gettext" != "yes"; then
892
AC_DEFINE(ENABLE_NLS)
895
dnl ******************************
896
dnl Compilation warnings
897
dnl ******************************
898
if test "$GXX" = "yes"; then
899
# Enable some warnings from g++.
901
# Rationale: a number of bugs in inkscape have been fixed by enabling g++
902
# warnings and addressing the produced warnings. Usually the committing
903
# developer is the best person to address the warnings.
905
ink_svd_CXXFLAGS="$CXXFLAGS"
906
CXXFLAGS="-Wno-unused-parameter $CXXFLAGS"
907
# -Wno-unused-parameter isn't accepted by gcc 2.95.
908
AC_COMPILE_IFELSE([int dummy;
909
], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",)
910
# Note: At least one bug has been caught from unused parameter warnings,
911
# so it might be worth trying not to disable it.
912
# One way of selectively disabling the warnings (i.e. only where the
913
# programmer deliberately isn't using the parameter, e.g. for a callback)
914
# is to remove the parameter name (leaving just its type), as is done
915
# in src/seltrans.cpp:sp_seltrans_handle_event; this indicates that the
916
# programmer deliberately has an unused parameter (e.g. because it's used
917
# as a callback or similar function pointer use).
919
# Add even more stuff
920
CXXFLAGS="-Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
924
dnl ******************************
926
dnl ******************************
928
dnl AC_ARG_ENABLE(libinkscape, AC_HELP_STRING([--enable-libinkscape], [Compile dynamic library (experimental)]), [splib=$enableval], [splib=no])
930
dnl AM_CONDITIONAL(ENABLE_LIBINKSCAPE, test "x$splib" != "xno")
933
AC_SUBST(INKSCAPE_CFLAGS)
934
AC_SUBST(INKSCAPE_LIBS)
936
dnl Define our data paths for config.h
937
AC_DEFINE_DIR([INKSCAPE_DATADIR], [datadir], [Base data directory])
938
AC_DEFINE_DIR([PACKAGE_LOCALE_DIR], [localedir], [Locatization directory])
943
src/check-header-compile
944
src/application/makefile
950
src/extension/implementation/makefile
951
src/extension/internal/makefile
952
src/extension/makefile
953
src/extension/script/makefile
957
src/libcroco/makefile
960
src/libnrtype/makefile
961
src/libavoid/makefile
963
src/live_effects/makefile
964
src/live_effects/parameter/makefile
966
src/jabber_whiteboard/makefile
969
src/ui/cache/makefile
970
src/ui/dialog/makefile
973
src/ui/widget/makefile
981
share/clipart/Makefile
982
share/examples/Makefile
983
share/extensions/Makefile
984
share/extensions/alphabet_soup/Makefile
985
share/extensions/Barcode/Makefile
986
share/extensions/Poly3DObjects/Makefile
987
share/extensions/test/Makefile
988
share/extensions/xaml2svg/Makefile
989
share/filters/Makefile
991
share/gradients/Makefile
993
share/icons/application/Makefile
994
share/icons/application/16x16/Makefile
995
share/icons/application/22x22/Makefile
996
share/icons/application/24x24/Makefile
997
share/icons/application/32x32/Makefile
998
share/icons/application/48x48/Makefile
999
share/icons/application/256x256/Makefile
1001
share/markers/Makefile
1002
share/palettes/Makefile
1003
share/patterns/Makefile
1004
share/screens/Makefile
1005
share/templates/Makefile
1006
share/tutorials/Makefile
1008
packaging/autopackage/default.apspec
1024
Source code location: ${srcdir}
1025
Destination path prefix: ${prefix}
1027
CPPFLAGS: ${CPPFLAGS}
1028
CXXFLAGS: ${CXXFLAGS}
1032
Use gnome-vfs: ${gnome_vfs}
1033
Use openoffice files: ${ij}
1034
Use relocation support: ${enable_binreloc}
1035
Internal Python: ${with_python}
1036
Internal Perl: ${with_perl}
1037
Enable LittleCms: ${enable_lcms}
1038
Enable Poppler-Cairo: ${enable_poppler_cairo}
1039
ImageMagick Magick++: ${magick_ok}
1040
Libwpg: ${with_libwpg}
1041
GTK+ backend target: ${gtk_backend_target}