configure.ac revision 00273e039d66aeb11b9f23d80ced10177f0eaa63
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl Process this file with autoconf to produce a configure script.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_PREREQ(2.50)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_INIT(inkscape, 0.46+devel)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl N.B. After 0.40, please change to `0.40+cvs' instead of `0.41cvs'.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl Rationale: (i) placate simple version comparison software such as
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl `dpkg --compare-versions'. (ii) We don't always know what the next
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl version is going to be called until about the time we release it
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl (whereas we always know what the previous version was called).
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav GlassAC_CANONICAL_HOST
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CONFIG_SRCDIR(src/main.cpp)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass prefix=/opt/inkscape
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass PATH="/opt/lsb/bin:$PATH"
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass CC=lsbcc
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass CXX=lsbc++
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass export CC CXX
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAM_CONFIG_HEADER(config.h)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_PROG_INTLTOOL(0.22)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_LANG(C++)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_ISC_POSIX
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_PROG_CXX
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAM_PROG_CC_STDC
f69da96c272d2efe7f43da5150c13c0fe6899646Dav GlassAM_PROG_AS
56fa0b5ce00608c58c7c82cc5341c5fbf8898719Dav GlassAC_HEADER_STDC
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glassdnl These next few lines are needed only while libcroco is in our source tree.
56fa0b5ce00608c58c7c82cc5341c5fbf8898719Dav GlassAC_PROG_CC
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAM_PROG_CC_C_O
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_MSG_NOTICE([Testing -Wno-pointer-sign])
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glassif test "$GCC" = "yes"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # Enable some warnings from gcc.
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glass AC_LANG_PUSH(C)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # by gcc 2.95.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass ink_svd_CFLAGS="$CFLAGS"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass CFLAGS="-Wno-pointer-sign $CFLAGS"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), AC_MSG_NOTICE([ compiler supports -Wno-pointer-sign]), CFLAGS="$ink_svd_CFLAGS")
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass CFLAGS="-Wall -Wformat-security -W -D_FORTIFY_SOURCE=2 $CFLAGS"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_LANG_POP
a3d67a254e415c93408a9d4314e46e3cb7d87d99Dav Glassfi
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl Honor aclocal flags
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav GlassACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav GlassAC_PROG_RANLIB
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glassdnl Verify our GCC version
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glassif test "x$GXX" = "xyes"; then
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass AC_MSG_CHECKING([GNU compiler version])
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass # Don't pass CXXFLAGS to the following CXX command as some
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass # of them can't be specified along with '-v'.
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass cc_version=["`$CXX -v 2>&1 </dev/null |grep 'gcc version' |\
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"]
a2cf1018c8c3c924dd3210ac6d5d796939a87876Dav Glass
a2cf1018c8c3c924dd3210ac6d5d796939a87876Dav Glass AC_MSG_RESULT([$cc_version])
a2cf1018c8c3c924dd3210ac6d5d796939a87876Dav Glass
a2cf1018c8c3c924dd3210ac6d5d796939a87876Dav Glass # Some version numbers
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass cc_vers_major=`echo $cc_version | cut -f1 -d.`
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass cc_vers_minor=`echo $cc_version | cut -f2 -d.`
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass cc_vers_patch=`echo $cc_version | cut -f3 -d.`
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass test -n "$cc_vers_major" || cc_vers_major=0
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass test -n "$cc_vers_minor" || cc_vers_minor=0
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass test -n "$cc_vers_patch" || cc_vers_patch=0
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch`
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glass if test $cc_vers_major -lt 3; then
9b5e5f2ec4de2f405fbad1fc7c71325c84feb772Dav Glass AC_MSG_ERROR([gcc >= 3.0 is needed to compile inkscape])
9b5e5f2ec4de2f405fbad1fc7c71325c84feb772Dav Glass fi
9b5e5f2ec4de2f405fbad1fc7c71325c84feb772Dav Glassfi
9b5e5f2ec4de2f405fbad1fc7c71325c84feb772Dav Glass
9b5e5f2ec4de2f405fbad1fc7c71325c84feb772Dav Glassdnl ******************************
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glassdnl Gettext stuff
f8b3e367f0b400ff8b4feeb35c56d9387a31f9e0Dav Glassdnl ******************************
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav GlassGETTEXT_PACKAGE="AC_PACKAGE_NAME"
fe442de8408a276919d26a1110e8121844b1ba11Dav GlassAC_SUBST(GETTEXT_PACKAGE)
fe442de8408a276919d26a1110e8121844b1ba11Dav GlassAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
fe442de8408a276919d26a1110e8121844b1ba11Dav Glassdnl Add the languages which your application supports here.
fe442de8408a276919d26a1110e8121844b1ba11Dav GlassALL_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 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"
fe442de8408a276919d26a1110e8121844b1ba11Dav GlassAM_GLIB_GNU_GETTEXT
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav GlassAC_PATH_PROG(PKG_CONFIG, pkg-config, no)
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassif test "x$PKG_CONFIG" = "xno"; then
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassfi
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassdnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav GlassAC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav GlassAC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
883d785f73cff98fbe2fe00953621713c1489729Dav Glass
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glassdnl ******************************
883d785f73cff98fbe2fe00953621713c1489729Dav Glassdnl Check for libpng
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassdnl ******************************
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav GlassAC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=no)], png_ok=no, -lz -lm)
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassif test "x$png_ok" != "xyes"; then
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass AC_MSG_ERROR([libpng >= 1.2 is needed to compile inkscape])
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassfi
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassdnl Handle possible dlopen requirement for libgc
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassdnl Isn't this internal to something in autoconf? Couldn't find it...
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav GlassAC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [lt_cv_dlopen="dlopen"],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [AC_CHECK_LIB([dl], [dlopen],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [AC_CHECK_LIB([svld], [dlopen],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [AC_CHECK_LIB([dld], [dld_link],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass ])
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass ])
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass ])
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass ])
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav GlassAC_CHECK_HEADERS([gc.h gc/gc.h],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass # To test for the different required libs, I have to
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass # overcome autoconf's caching system, so I change the
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass # desired function name. They're all in libgc.
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass # The "break" will exit from the top level
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass # AC_CHECK_HEADERS.
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass gc_libs=""
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_CHECK_LIB(gc, GC_init,
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass [gc_ok=yes;
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass LIBS="-lgc $gc_libs $LIBS";
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass break], [gc_ok=no], [$gc_libs])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass gc_libs="-lpthread"
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass AC_CHECK_LIB(gc, GC_malloc,
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass [gc_ok=yes;
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass LIBS="-lgc $gc_libs $LIBS";
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass break], [gc_ok=no], [$gc_libs])
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glass gc_libs="$lt_cv_dlopen_libs"
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass AC_CHECK_LIB(gc, GC_realloc,
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass [gc_ok=yes;
3499692683cbc70ff10f1844350ff92b1d0eba3fDav Glass LIBS="-lgc $gc_libs $LIBS";
3499692683cbc70ff10f1844350ff92b1d0eba3fDav Glass break], [gc_ok=no], [$gc_libs])
3499692683cbc70ff10f1844350ff92b1d0eba3fDav Glass gc_libs="-lpthread $lt_cv_dlopen_libs"
3499692683cbc70ff10f1844350ff92b1d0eba3fDav Glass AC_CHECK_LIB(gc, GC_free,
3499692683cbc70ff10f1844350ff92b1d0eba3fDav Glass [gc_ok=yes;
3499692683cbc70ff10f1844350ff92b1d0eba3fDav Glass LIBS="-lgc $gc_libs $LIBS";
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass break], [gc_ok=no], [$gc_libs])
edefd42ddde54932d14d9150369570db47822ab5Dav Glass break],
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glass [gc_ok=no])
aa2ac226ad6e45232f8416eecc99d2165ce74d03Dav Glassif test "x$gc_ok" = "xyes"; then
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass AC_MSG_CHECKING([libgc version 6.4+])
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass AC_RUN_IFELSE(
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass [AC_LANG_SOURCE([[
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass #ifdef HAVE_GC_GC_H
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass # include <gc/gc.h>
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass #else
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass # include <gc.h>
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass #endif
edefd42ddde54932d14d9150369570db47822ab5Dav Glass #include <stdio.h>
1e2a941753ef897ca70f03b0c9803795357ad35dDav Glass extern unsigned GC_version;
577da64a9f0680112357f6595f47bfcab32d9adbDav Glass int main(void){
1f5da3ee0a7dfb278ab235231e5af6aad13326d4Dav Glass unsigned min = ((6 << 16) | (4 << 8) | 0);
577da64a9f0680112357f6595f47bfcab32d9adbDav Glass printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF);
1e2a941753ef897ca70f03b0c9803795357ad35dDav Glass if (GC_version>=min) return 0;
edefd42ddde54932d14d9150369570db47822ab5Dav Glass return 1;
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glass }]])],
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glass [gc_ok=yes],
43e2f05871a8e99383b8c1d893d290cd978be81aDav Glass [gc_ok=no]
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass )
43e2f05871a8e99383b8c1d893d290cd978be81aDav Glass AC_MSG_RESULT([$gc_ok])
43e2f05871a8e99383b8c1d893d290cd978be81aDav Glassfi
b357b56da58949fa86ab8e56983972e0db5cbffbDav Glassif test "x$gc_ok" != "xyes"; then
b357b56da58949fa86ab8e56983972e0db5cbffbDav Glass AC_MSG_ERROR([libgc (the Boehm Conservative Collector) 6.4+, is needed to compile inkscape -- http://www.hpl.hp.com/personal/Hans_Boehm/gc])
db62bb9907ff4ffe68df2dd2772e8e46f67a2ca1Dav Glassfi
43e2f05871a8e99383b8c1d893d290cd978be81aDav Glass
db62bb9907ff4ffe68df2dd2772e8e46f67a2ca1Dav Glassdnl This check is to get a FIONREAD definition on Solaris 8
43e2f05871a8e99383b8c1d893d290cd978be81aDav GlassAC_CHECK_HEADERS([sys/filio.h])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_CHECK_HEADERS([malloc.h])
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassAC_CHECK_FUNCS([mallinfo], [
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glass AC_CHECK_MEMBERS([struct mallinfo.usmblks,
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glass struct mallinfo.fsmblks,
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glass struct mallinfo.uordblks,
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glass struct mallinfo.fordblks,
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glass struct mallinfo.hblkhd],,,
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glass [#include <malloc.h>])
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glass])
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glass
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav GlassAC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
6dbc2e0b2c23ae7763959af9762fc50c84dbd937Dav Glassif test "x$FREETYPE_CONFIG" = "xno"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass AC_MSG_ERROR([Cannot find freetype-config])
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glassfi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassFREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassFREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_SUBST(FREETYPE_CFLAGS)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_SUBST(FREETYPE_LIBS)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassdnl ******************************
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glassdnl Win32
690dda02d518be26b6ee1c6530ee361081c9eb03Dav Glassdnl ******************************
690dda02d518be26b6ee1c6530ee361081c9eb03Dav GlassAC_MSG_CHECKING([for Win32 platform])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glasscase "$host" in
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass *-*-mingw*)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass platform_win32=yes
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass INKSCAPE_CFLAGS="$INKSCAPE_CFLAGS -mms-bitfields -DLIBXML_STATIC"
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass ;;
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass *)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass platform_win32=no
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass ;;
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassesac
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_MSG_RESULT([$platform_win32])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassAC_MSG_CHECKING([for Solaris 2.8 platform])
052dcc53d425df9224bfc720b2feca1e92903382Dav Glasscase "$host" in
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass *-solaris2.8)
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass platform_solaris_2_8=yes
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass CFLAGS="$CFLAGS -DSOLARIS_2_8"
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass CXXFLAGS="$CXXFLAGS -DSOLARIS_2_8"
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass ;;
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass *)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass platform_solaris_2_8=no
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass ;;
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassesac
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_MSG_RESULT([$platform_solaris_2_8])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAM_CONDITIONAL(PLATFORM_SOLARIS_2_8, test "$platform_solaris_2_8" = "yes")
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
690dda02d518be26b6ee1c6530ee361081c9eb03Dav Glassdnl ******************************
690dda02d518be26b6ee1c6530ee361081c9eb03Dav Glassdnl Xft checking
690dda02d518be26b6ee1c6530ee361081c9eb03Dav Glassdnl ******************************
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_ARG_WITH(xft,
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass AC_HELP_STRING([--with-xft], [use xft scalable font database (default is auto)]),
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass [with_xft=$withval], [with_xft=auto])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassif test "x$with_xft" != "xno" ; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass dnl Test fontconfig package
690dda02d518be26b6ee1c6530ee361081c9eb03Dav Glass PKG_CHECK_MODULES(XFT, xft, xft_ok=yes, xft_ok=no)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass if test "x$xft_ok" != "xyes"; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass dnl test xft package
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass PKG_CHECK_MODULES(XFT, fontconfig, xft_ok=yes, xft_ok=no)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass if test "x$xft_ok" != "xyes"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass dnl Have to test xft presence
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass AC_CHECK_HEADER(X11/Xft/Xft.h, xft_ok=yes, xft_ok=no)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass if test "x$xft_ok" != "xyes"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass dnl No xft found
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass if test "x$with_xft" = "xyes"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass dnl Xft was explicitly asked, so stop
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass AC_MSG_ERROR([--with-xft was specified, but appropriate development packages could not be found])
d0bccce76452becc96b65acaaa684aa6fabaf386Dav Glass fi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass else
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass dnl Working Xft1
d0bccce76452becc96b65acaaa684aa6fabaf386Dav Glass XFT_LIBS="-L/usr/X11R6/lib -lXft "
d0bccce76452becc96b65acaaa684aa6fabaf386Dav Glass fi
d0bccce76452becc96b65acaaa684aa6fabaf386Dav Glass fi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass fi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glasselse
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass dnl Asked to ignore xft
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass xft_ok=no
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glassfi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_SUBST(XFT_CFLAGS)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_SUBST(XFT_LIBS)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAM_CONDITIONAL(USE_XFT, test "x$xft_ok" = "xyes")
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassif test "x$xft_ok" = "xyes"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass AC_DEFINE(WITH_XFT, 1, [Use Xft font database])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassfi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassdnl ******************************
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassdnl pangoft2 for xft
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassdnl ******************************
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassif test "x$xft_ok" = "xyes"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass PKG_CHECK_MODULES(PANGOFT2, pangoft2, pango_ok=yes, pango_ok=no)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass if test "x$pango_ok" = "xyes"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass XFT_LIBS="$XFT_LIBS $PANGOFT2_LIBS"
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass fi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassfi
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glassdnl ******************************
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glassdnl gnome vfs checking
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glassdnl ******************************
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav GlassAC_ARG_WITH(gnome-vfs,
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass AC_HELP_STRING([--with-gnome-vfs], [use gnome vfs for loading files]),
5cbdc947eb0c9c5e840d59ff8e1dd49a0e2a1887Dav Glass [with_gnome_vfs=$withval], [with_gnome_vfs=auto])
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassif test "x$with_gnome_vfs" = "xno"; then
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass dnl Asked to ignore gnome-vfs
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass gnome_vfs=no
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glasselse
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass dnl Have to test gnome-vfs presence
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.0, gnome_vfs=yes, gnome_vfs=no)
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass if test "x$gnome_vfs" != "xyes"; then
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass dnl No gnome-vfs found
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass if test "x$with_gnome_vfs" = "xyes"; then
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glass dnl Gnome-VFS was explicitly asked for, so stop
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass AC_MSG_ERROR([--with-gnome-vfs was specified, but appropriate libgnomevfs development packages could not be found])
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass else
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass # gnome-vfs is no, tell us for the log file
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass AC_MSG_RESULT($gnome_vfs)
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glass fi
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass fi
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassfi
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass
e08067d50c8d5e4692441db53bba084c7a667e0aDav GlassAM_CONDITIONAL(USE_GNOME_VFS, test "x$gnome_vfs" = "xyes")
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassif test "x$gnome_vfs" = "xyes"; then
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass AC_DEFINE(WITH_GNOME_VFS, 1, [Use gnome vfs file load functionality])
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassfi
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass
e08067d50c8d5e4692441db53bba084c7a667e0aDav GlassAC_SUBST(GNOME_VFS_CFLAGS)
e08067d50c8d5e4692441db53bba084c7a667e0aDav GlassAC_SUBST(GNOME_VFS_LIBS)
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassdnl ******************************
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassdnl libinkjar checking
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassdnl ******************************
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass
573bad453b98b1e493f4abfcf507f85b22b6bf4aDav GlassAC_ARG_WITH(inkjar,
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass AC_HELP_STRING([--without-inkjar], [disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glassif test "x$with_ij" = "xyes"; then
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)])
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass AC_C_BIGENDIAN
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass AC_CHECK_HEADERS(zlib.h)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass ij=yes
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glasselse
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass ij=no
5cbdc947eb0c9c5e840d59ff8e1dd49a0e2a1887Dav Glassfi
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glassink_spell_pkg=
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glassif pkg-config --exists gtkspell-2.0; then
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass ink_spell_pkg=gtkspell-2.0
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glassfi
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glassdnl ******************************
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassdnl PERL checking
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glassdnl ******************************
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass
5cbdc947eb0c9c5e840d59ff8e1dd49a0e2a1887Dav GlassAC_MSG_CHECKING(for Perl development environment)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_ARG_WITH(perl,
e08067d50c8d5e4692441db53bba084c7a667e0aDav Glass AC_HELP_STRING([--with-perl], [use Perl for embedded scripting (EXPERIMENTAL)]),
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glass [with_perl=$withval], [with_perl=skipped])
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glass
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glassif test "x$with_perl" = "xyes"; then
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glass checkPERL_CFLAGS=`perl -MExtUtils::Embed -e perl_inc 2>/dev/null`
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glass if test "$?" -gt "0"; then
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass with_perl="no"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass else
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass checkPERL_LIBS=`perl -MExtUtils::Embed -e ldopts 2>/dev/null`
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass if test "$?" -gt "0"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass with_perl="no"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass else
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass with_perl="yes"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass fi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass fi
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav Glassfi
9d0be4bedcaad945c505994577198223ffc4ed9eDav GlassAC_MSG_RESULT([$with_perl])
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glassif test "x$with_perl" = "xyes"; then
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass # Test that we actually have the perl libraries installed
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass oldCFLAGS="$CFLAGS"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass oldLIBS="$LIBS"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass CFLAGS="$CFLAGS $checkPERL_CFLAGS"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass LIBS="$LIBS $checkPERL_LIBS"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass AC_CHECK_FUNC([perl_parse],[
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass PERL_CFLAGS="$checkPERL_CFLAGS"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass PERL_LIBS="$checkPERL_LIBS"
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass AC_DEFINE(WITH_PERL, 1, [use Perl for embedded scripting])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass ],[
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glass with_perl="no"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass ])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass CFLAGS="$oldCFLAGS"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass LIBS="$oldLIBS"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glassfi
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav GlassAM_CONDITIONAL(WITH_PERL, test "x$with_perl" = "xyes")
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav GlassAC_SUBST(PERL_CFLAGS)
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav GlassAC_SUBST(PERL_LIBS)
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glassdnl ******************************
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glassdnl Python checking
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glassdnl ******************************
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav GlassAC_MSG_CHECKING(for Python development environment)
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav GlassAC_ARG_WITH(python,
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass AC_HELP_STRING([--with-python], [use Python for embedded scripting (EXPERIMENTAL)]),
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass [with_python=$withval], [with_python=skipped])
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass
fe442de8408a276919d26a1110e8121844b1ba11Dav Glassif test "x$with_python" = "xyes"; then
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass checkPYTHON_CFLAGS=`python -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass if test "$?" -gt "0"; then
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass with_python="no"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass else
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass 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`
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass if test "$?" -gt "0"; then
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass with_python="no"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass else
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass with_python="yes"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass fi
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass fi
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glassfi
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav GlassAC_MSG_RESULT([$with_python])
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glassif test "x$with_python" = "xyes"; then
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass # Test that we actually have the python libraries installed
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass oldCFLAGS="$CFLAGS"
406fbc8e9d992226194dfc2353a6ba1c1fd24b3aDav Glass oldLIBS="$LIBS"
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass CFLAGS="$CFLAGS $checkPYTHON_CFLAGS"
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass LIBS="$LIBS $checkPYTHON_LIBS"
fe442de8408a276919d26a1110e8121844b1ba11Dav Glass AC_CHECK_FUNC([Py_Initialize],[
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass PYTHON_CFLAGS="$checkPYTHON_CFLAGS"
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glass PYTHON_LIBS="$checkPYTHON_LIBS"
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glass AC_DEFINE(WITH_PYTHON, 1, [use Python for embedded scripting])
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glass ],[
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glass with_python="no"
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass ])
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glass CFLAGS="$oldCFLAGS"
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glass LIBS="$oldLIBS"
9d0be4bedcaad945c505994577198223ffc4ed9eDav Glassfi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAM_CONDITIONAL(WITH_PYTHON, test "x$with_python" = "xyes")
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_SUBST(PYTHON_CFLAGS)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_SUBST(PYTHON_LIBS)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glassdnl ******************************
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl LittleCms checking
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl ******************************
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassAC_ARG_ENABLE(lcms,
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_HELP_STRING([--enable-lcms], [enable LittleCms for color management]),
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass [enable_lcms=$enableval], [enable_lcms=yes])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glassif test "x$enable_lcms" = "xno"; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass dnl Asked to ignore LittleCms
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass lcms=no
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glasselse
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass dnl Have to test LittleCms presence
998d2791b549446db8394dc80d46a94a247857d9Dav Glass PKG_CHECK_MODULES(LCMS, lcms >= 1.13, lcms=yes, lcms=no)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass if test "x$lcms" != "xyes"; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass dnl No lcms found
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass if test "x$enable_lcms" = "xyes"; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass dnl LittleCms was explicitly asked for, so stop
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_ERROR([--enable-lcms was specified, but appropriate LittleCms development packages could not be found])
998d2791b549446db8394dc80d46a94a247857d9Dav Glass else
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # lcms is no, tell us for the log file
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_MSG_RESULT($lcms)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass fi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass else
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass dnl Working lcms
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass LIBS="$LIBS $LCMS_LIBS"
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_DEFINE(ENABLE_LCMS, 1, [Use LittleCms color management])
998d2791b549446db8394dc80d46a94a247857d9Dav Glass fi
998d2791b549446db8394dc80d46a94a247857d9Dav Glassfi
998d2791b549446db8394dc80d46a94a247857d9Dav Glass
998d2791b549446db8394dc80d46a94a247857d9Dav GlassAC_SUBST(LCMS_CFLAGS)
998d2791b549446db8394dc80d46a94a247857d9Dav GlassAC_SUBST(LCMS_LIBS)
998d2791b549446db8394dc80d46a94a247857d9Dav Glass
998d2791b549446db8394dc80d46a94a247857d9Dav Glassdnl ******************************
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glassdnl Libpoppler checking
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glassdnl ******************************
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_ARG_ENABLE(poppler-cairo,
998d2791b549446db8394dc80d46a94a247857d9Dav Glass AC_HELP_STRING([--enable-poppler-cairo], [Enable libpoppler-cairo for rendering PDF preview]),
998d2791b549446db8394dc80d46a94a247857d9Dav Glass [enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
998d2791b549446db8394dc80d46a94a247857d9Dav GlassPOPPLER_CFLAGS=""
91085c33d52b89808c10ff61e5a94d7b35d57d65Dav GlassPKG_CHECK_MODULES(POPPLER, poppler >= 0.5.9, poppler=yes, poppler=no)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glassif test "x$poppler" = "xyes"; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass dnl Working libpoppler
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass POPPLER_LIBS="-lpoppler "
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass dnl Have to test libpoppler-glib presence
998d2791b549446db8394dc80d46a94a247857d9Dav Glass PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.5.9, poppler_glib=yes, poppler_glib=no)
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass if test "x$poppler_glib" = "xyes"; then
7058d70d5189510fab628ef8d64bb50dd726a941Dav Glass dnl Working libpoppler-glib found
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass dnl Check whether the Cairo SVG backend is available
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, cairo_svg=yes, cairo_svg=no)
7058d70d5189510fab628ef8d64bb50dd726a941Dav Glass if test "x$cairo_svg" = "xyes"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass POPPLER_LIBS="$POPPLER_LIBS -lpoppler-glib "
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass fi
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass fi
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass if test "x$enable_poppler_cairo" = "xyes"; then
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass dnl Have to test libpoppler-cairo presence for PDF preview
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
b7bd9aa409761c479bb0a2e5794295d35ebe24eaDav Glass PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.5.9, poppler_cairo=yes, poppler_cairo=no)
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass if test "x$poppler_glib" = "xyes" -a "x$poppler_cairo" = "xyes" -a \
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass "x$cairo_svg" = "xno"
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass then
998d2791b549446db8394dc80d46a94a247857d9Dav Glass POPPLER_LIBS="$POPPLER_LIBS -lpoppler-glib "
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glass fi
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass fi
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glassfi
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glassif test "x$poppler" = "xyes"; then
323ca860aba4b2515b560796e2322d5eaae57e5aDav Glass LIBS="$LIBS $POPPLER_LIBS"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_DEFINE(HAVE_POPPLER, 1, [Use libpoppler for direct PDF import])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassfi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassif test "x$poppler_cairo" = "xyes" -a "x$poppler_glib" = "xyes"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass AC_DEFINE(HAVE_POPPLER_CAIRO, 1, [Use libpoppler-cairo for rendering PDF preview])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassfi
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassif test "x$poppler_glib" = "xyes" -a "x$cairo_svg" = "xyes"; then
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass AC_DEFINE(HAVE_POPPLER_GLIB, 1, [Use libpoppler-glib and Cairo-SVG for PDF import])
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassfi
998d2791b549446db8394dc80d46a94a247857d9Dav GlassAC_SUBST(POPPLER_CFLAGS)
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav GlassAC_SUBST(POPPLER_LIBS)
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
762b21413a7bbc38b5c7b2d94385fb44f26f9d39Dav Glassdnl ******************************
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassdnl Inkboard dependency checking
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glassdnl ******************************
998d2791b549446db8394dc80d46a94a247857d9Dav Glass
998d2791b549446db8394dc80d46a94a247857d9Dav Glasswith_inkboard="no"
998d2791b549446db8394dc80d46a94a247857d9Dav Glasswith_inkboard_ssl="no"
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav Glass
e20a95dc78bf51b6544e7bfb4e53ed190ecec3c9Dav GlassINKBOARD_CFLAGS=""
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_ARG_ENABLE(inkboard,
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AS_HELP_STRING([--enable-inkboard], [enable Inkboard online whiteboard facility (disabled by default)]),
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass with_inkboard=$enableval,with_inkboard=no)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassif test "x$with_inkboard" = "xyes"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass with_inkboard="yes"
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass AC_DEFINE(WITH_INKBOARD,1,[Build in Inkboard support])
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass dnl Test for OpenSSL
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass PKG_CHECK_MODULES(INKBOARD, openssl, with_inkboard_ssl=yes, with_inkboard_ssl=no)
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass if test "x$with_inkboard_ssl" = "xyes"; then
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass dnl OpenSSL found; enable SSL support in Pedro
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass INKBOARD_CFLAGS="$INKBOARD_CFLAGS -DHAVE_SSL"
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass RELAYTOOL([ssl], INKBOARD_LIBS, INKBOARD_CFLAGS, [inkboard_weak=yes])
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass RELAYTOOL([crypto], INKBOARD_LIBS, INKBOARD_CFLAGS, [inkboard_weak=yes])
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass AC_DEFINE(WITH_INKBOARD_SSL,1,[Build in SSL support for Inkboard])
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass fi
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glasselse
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass with_inkboard="no"
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassfi
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav GlassAM_CONDITIONAL(WITH_INKBOARD, test "x$with_inkboard" = "xyes")
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav GlassAC_SUBST(INKBOARD_LIBS)
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav GlassAC_SUBST(INKBOARD_CFLAGS)
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassdnl ******************************
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassdnl Check for libwpg for extension
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassdnl ******************************
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav GlassPKG_CHECK_MODULES(LIBWPG, libwpg-0.1 libwpg-stream-0.1, with_libwpg=yes, with_libwpg=no)
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassif test "x$with_libwpg" = "xyes"; then
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassfi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_SUBST(LIBWPG_LIBS)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_SUBST(LIBWPG_CFLAGS)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl ******************************
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl Check for ImageMagick Magick++
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl ******************************
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_LIB(Magick++, InitializeMagick, [AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)], magick_ok=no, -llcms -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lz -lpthread -lm -lpthread)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassif test "x$magick_ok" = "xyes"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_CHECK_PROG(MAGICKPP_CONFIG, Magick++-config, yes, no)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass if test "x$MAGICKPP_CONFIG" = "xyes"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass IMAGEMAGICK_LIBS=`Magick++-config --libs`
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_SUBST(IMAGEMAGICK_LIBS)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass fi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassfi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl ******************************
15e7d5bd8a8fb4068cc8df277bb857b83a0891f5Dav Glassdnl Unconditional dependencies
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl ******************************
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl sigc++-2.0 >= 2.0.12: using "visit_each" not available in 2.0.10
15e7d5bd8a8fb4068cc8df277bb857b83a0891f5Dav Glassif test $cc_vers_major -gt 3; then
15e7d5bd8a8fb4068cc8df277bb857b83a0891f5Dav Glass min_sigc_version=2.0.12
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glasselse
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass min_sigc_version=2.0.11
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glassfi
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav GlassPKG_CHECK_MODULES(INKSCAPE, gdkmm-2.4 glibmm-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)
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass# Check for Apple Mac OS X Carbon framework
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glasscarbon_ok=no
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav GlassAC_MSG_CHECKING([for Mac OS X Carbon support])
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav GlassAC_TRY_CPP([
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass#include <Carbon/Carbon.h>
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass#include <CoreServices/CoreServices.h>
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass], carbon_ok=yes)
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav GlassAC_MSG_RESULT($carbon_ok)
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glassif test "x$carbon_ok" = "xyes"; then
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass CARBON_LDFLAGS="-framework Carbon"
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass AC_SUBST(CARBON_LDFLAGS)
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glassfi
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav GlassAM_CONDITIONAL(HAVE_CARBON, test "x$carbon_ok" = "xyes")
a0c3229e02af852e4b15bf6d4cf4e862440bb00eDav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass# Check for some boost header files
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)]))
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassPKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassif test "x$cairo_pdf" = "xyes"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassfi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
74508273e502d40de8fc4bd810859c1d0c453c6cDav Glassdnl Shouldn't we test for libpng and libz?
74508273e502d40de8fc4bd810859c1d0c453c6cDav GlassINKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz"
74508273e502d40de8fc4bd810859c1d0c453c6cDav Glass
74508273e502d40de8fc4bd810859c1d0c453c6cDav GlassAC_CHECK_HEADER(popt.h,
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass [INKSCAPE_LIBS="$INKSCAPE_LIBS -lpopt"],
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_MSG_ERROR([libpopt is required]))
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glasssp_save_LIBS=$LIBS
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav GlassLIBS="$LIBS $INKSCAPE_LIBS"
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav GlassAC_CHECK_FUNCS(bind_textdomain_codeset)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glassdnl Check for gtk_window_fullscreen in gtk (>= 2.2)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav GlassAC_CHECK_FUNCS(gtk_window_set_default_icon_from_file)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav GlassAC_CHECK_FUNCS(gtk_window_fullscreen)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav GlassLIBS=$sp_save_LIBS
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glassdnl Check for binary relocation support
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glassdnl Hongli Lai <h.lai@chello.nl>
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav GlassAC_ARG_ENABLE(binreloc,
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass [ --enable-binreloc compile with binary relocation support],
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass enable_binreloc=$enableval,enable_binreloc=no)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav GlassAC_MSG_CHECKING(whether binary relocation support should be enabled)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glassif test "$enable_binreloc" = "yes"; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_RESULT(yes)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass if test -e /proc/self/maps; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_RESULT(yes)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass else
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_RESULT(no)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass enable_binreloc="no"
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass fi
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glasselif test "$enable_binreloc" = "auto"; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_RESULT(yes when available)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass if test -e /proc/self/maps; then
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_RESULT(yes)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass enable_binreloc=yes
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass AC_MSG_CHECKING(whether everything is installed to the same prefix)
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass "$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
f7aa62ea2e8cf43fbb9d83db5060db540ff1893fDav Glass "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass then
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass AC_MSG_RESULT(yes)
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass else
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass AC_MSG_RESULT(no)
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass AC_MSG_NOTICE(Binary relocation support will be disabled.)
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass enable_binreloc=no
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass fi
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass else
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass AC_MSG_RESULT(no)
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass enable_binreloc=no
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass fi
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glasselif test "$enable_binreloc" = "no"; then
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass AC_MSG_RESULT(no)
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glasselse
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass AC_MSG_RESULT(no (unknown value "$enable_binreloc"))
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass enable_binreloc=no
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassfi
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav GlassAC_DEFINE(BR_PTHREADS,[0],[Use binreloc thread support?])
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassif test "$enable_binreloc" = "yes"; then
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassfi
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav GlassAC_ARG_ENABLE(osxapp,
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass [ --enable-osxapp compile with OSX .app data dir paths],
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass enable_osxapp=$enableval,enable_osxapp=no)
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassif test "$enable_osxapp" = "yes"; then
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass AC_DEFINE(ENABLE_OSX_APP_LOCATIONS,,[Build with OSX .app data dir paths?])
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassfi
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glass
24e95e1c11b518e1aaaa7f04882febe32de00b5eDav Glassdnl ******************************
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glassdnl Reported by autoscan
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glassdnl ******************************
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav GlassAC_CHECK_FUNCS(pow)
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glass# if we did not find pow(), see if it's in libm.
9f2068537ef4a78d9a11fb5a136991d9d9e059a0Dav Glassif test x"$ac_cv_func_pow" = x"no" ; then
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glass AC_CHECK_LIB(m,pow)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav Glassfi
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(sqrt)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(floor)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(gettimeofday)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(memmove)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(memset)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(mkdir)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(strncasecmp)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(strpbrk)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(strrchr)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(strspn)
b80d65233fd7492f4b6487349f5364b9a8ca019eDav GlassAC_CHECK_FUNCS(strstr)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_FUNCS(strtoul)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_FUNCS(fpsetmask)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_FUNCS(ecvt)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_HEADERS(ieeefp.h)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_HEADERS(fcntl.h)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_HEADERS(libintl.h)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_HEADERS(stddef.h)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_CHECK_HEADERS(sys/time.h)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_FUNC_STAT
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_FUNC_STRFTIME
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_FUNC_STRTOD
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_HEADER_STAT
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_HEADER_TIME
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_STRUCT_TM
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_TYPE_MODE_T
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_TYPE_SIGNAL
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl Work around broken gcc 3.3 (seen on OSX) where "ENABLE_NLS" isn't
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl set correctly because the gettext function isn't noticed.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassif test "$ac_cv_header_libintl_h" = "yes" &&
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass test "$ac_cv_func_bind_textdomain_codeset" = "yes" &&
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass test "$gt_cv_func_have_gettext" != "yes"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_DEFINE(ENABLE_NLS)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassfi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl ******************************
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl Compilation warnings
9a68201f57ed1257e4735227620d7ec556fe99e5Dav Glassdnl ******************************
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassif test "$GXX" = "yes"; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # Enable some warnings from g++.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # Rationale: a number of bugs in inkscape have been fixed by enabling g++
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # warnings and addressing the produced warnings. Usually the committing
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # developer is the best person to address the warnings.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass ink_svd_CXXFLAGS="$CXXFLAGS"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass CXXFLAGS="-Wno-unused-parameter $CXXFLAGS"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # -Wno-unused-parameter isn't accepted by gcc 2.95.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_COMPILE_IFELSE([int dummy;
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # Note: At least one bug has been caught from unused parameter warnings,
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # so it might be worth trying not to disable it.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # One way of selectively disabling the warnings (i.e. only where the
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # programmer deliberately isn't using the parameter, e.g. for a callback)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # is to remove the parameter name (leaving just its type), as is done
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # in src/seltrans.cpp:sp_seltrans_handle_event; this indicates that the
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # programmer deliberately has an unused parameter (e.g. because it's used
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass # as a callback or similar function pointer use).
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass CXXFLAGS="-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -D_FORTIFY_SOURCE=2 $CXXFLAGS"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass dnl Test for arch-specific situations.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass case "$host_cpu" in
840fa3af908837f29008e2b1b24b45dca3484f92Dav Glass mips|mipsel)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass dnl Symbol tables can get too large: this uses alternate tables
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass dnl See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=283476
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass CXXFLAGS="$CXXFLAGS -Wa,-xgot"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass CFLAGS="$CFLAGS -Wa,-xgot"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass ;;
573bad453b98b1e493f4abfcf507f85b22b6bf4aDav Glass esac
840fa3af908837f29008e2b1b24b45dca3484f92Dav Glassfi
573bad453b98b1e493f4abfcf507f85b22b6bf4aDav Glass
958d1f7fa2c13f0298c1da8fb4465dd758db36ccDav GlassAC_DEFINE(WITH_MODULES, 1, [Use experimental module support])
958d1f7fa2c13f0298c1da8fb4465dd758db36ccDav Glass
958d1f7fa2c13f0298c1da8fb4465dd758db36ccDav Glassdnl ******************************
958d1f7fa2c13f0298c1da8fb4465dd758db36ccDav Glassdnl libinkscape
958d1f7fa2c13f0298c1da8fb4465dd758db36ccDav Glassdnl ******************************
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl AC_ARG_ENABLE(libinkscape, AC_HELP_STRING([--enable-libinkscape], [Compile dynamic library (experimental)]), [splib=$enableval], [splib=no])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl AM_CONDITIONAL(ENABLE_LIBINKSCAPE, test "x$splib" != "xno")
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_SUBST(INKSCAPE_CFLAGS)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_SUBST(INKSCAPE_LIBS)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass#
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass# Checks to see if we should compile in MMX support (there will be
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass# a runtime test when the code is actually run to see if it should
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass# be used - this just checks if we can compile it.)
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass#
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass# This code is partially taken from Mesa
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass#
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glassdnl Let people disable the MMX optimization
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav GlassAC_ARG_ENABLE(mmx, [ --disable-mmx Don't use MMX optimization [default=auto]], enable_mmx="$enableval", enable_mmx=auto)
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav GlassAC_MSG_CHECKING(for x86 platform)
ac74069ae9518fdedd0b905ef28c965177ca6d4fDav Glasscase $host_cpu in
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass i386|i486|i586|i686|i786|k6|k7)
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass use_x86_asm=yes
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass ;;
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass *)
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass use_x86_asm=no
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glassesac
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav GlassAC_MSG_RESULT($use_x86_asm)
c145dba89e51cac0a247d52f4f4c0c8d8245027dDav Glass
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glassdnl Are we going to use MMX extensions
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glassuse_mmx_asm=no
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass
f69da96c272d2efe7f43da5150c13c0fe6899646Dav GlassAC_MSG_CHECKING(compiler support for MMX)
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glassif test x$enable_mmx = xauto ; then
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass if test $use_x86_asm = yes; then
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass save_ac_ext=$ac_ext
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass ac_ext=S
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass cp $srcdir/src/libnr/nr_mmx_R8G8B8A8_P_R8G8B8A8_P_A8_RGBAP.S conftest.S
f69da96c272d2efe7f43da5150c13c0fe6899646Dav Glass if AC_TRY_EVAL(ac_compile); then
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glass use_mmx_asm=yes
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glass fi
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glass dnl rm -f conftest.[oS]
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glass
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glass ac_ext=$save_ac_ext
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glass fi
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glass
162527ab925c04aa8d6bbf78d0484a133a8076f1Dav Glassdnl Enforce usage of MMX extensions
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glasselif test x$enable_mmx = xyes ; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass use_mmx_asm=yes
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glasselse
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass use_mmx_asm=no
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassfi
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassif test $use_mmx_asm = yes; then
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_DEFINE(WITH_MMX, 1, [Use MMX optimizations, if CPU supports it])
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass AC_MSG_RESULT(yes)
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glasselse
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glass AC_MSG_RESULT(no)
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glassfi
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glass
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav GlassAM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glass
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glassdnl Figure out where the datadir actually is
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glassdnl http://autoconf-archive.cryp.to/ac_define_dir.html
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glassprefix_NONE=
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glassexec_prefix_NONE=
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glasstest "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glasstest "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
daeb6d531149c45a2ceb543ae2cf1e56e5235bbeDav Glassdnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glassdnl refers to ${prefix}. Thus we have to use `eval' twice.
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glasseval runtime_datadir="${datadir}"
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glasseval runtime_datadir="${runtime_datadir}"
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glasstest "$prefix_NONE" && prefix=NONE
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glasstest "$exec_prefix_NONE" && exec_prefix=NONE
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glass
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glassinkscape_sharedir="${runtime_datadir}/${PACKAGE_NAME}"
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glass
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav Glassdnl Define our data paths for config.h
a2621d519886de7d60c30c5a0850f5c17fd2fb36Dav GlassAC_SUBST(INKSCAPE_DATADIR)
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav GlassAC_DEFINE_UNQUOTED([INKSCAPE_DATADIR], "${runtime_datadir}",
dbf2c770f8178b12e8fe3c36bfa29df58ef13959Dav Glass [Base data directory -- only path-prefix.h should use it!])
AC_SUBST(PACKAGE_LOCALE_DIR)
AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], "${runtime_datadir}/locale",
[Localization directory])
AC_SUBST(INKSCAPE_LIBDIR)
AC_DEFINE_UNQUOTED([INKSCAPE_LIBDIR], "${prefix}/lib",
[Base library directory -- only path-prefix.h should use it!])
dnl Have to add module makefiles (lauris)
AC_CONFIG_FILES([
Makefile
src/Makefile
src/check-header-compile
src/algorithms/makefile
src/application/makefile
src/bind/makefile
src/debug/makefile
src/dialogs/makefile
src/display/makefile
src/dom/makefile
src/extension/implementation/makefile
src/extension/internal/makefile
src/extension/makefile
src/extension/script/makefile
src/helper/makefile
src/inkjar/makefile
src/io/makefile
src/libcroco/makefile
src/libgdl/makefile
src/libnr/makefile
src/libnrtype/makefile
src/libavoid/makefile
src/livarot/makefile
src/live_effects/makefile
src/live_effects/parameter/makefile
src/pedro/makefile
src/jabber_whiteboard/makefile
src/removeoverlap/makefile
src/svg/makefile
src/trace/makefile
src/traits/makefile
src/ui/cache/makefile
src/ui/dialog/makefile
src/ui/makefile
src/ui/view/makefile
src/ui/widget/makefile
src/utest/makefile
src/util/makefile
src/widgets/makefile
src/xml/makefile
src/2geom/makefile
doc/Makefile
po/Makefile.in
share/Makefile
share/clipart/Makefile
share/examples/Makefile
share/extensions/Makefile
share/extensions/alphabet_soup/Makefile
share/extensions/Barcode/Makefile
share/extensions/xaml2svg/Makefile
share/fonts/Makefile
share/gradients/Makefile
share/icons/Makefile
share/keys/Makefile
share/markers/Makefile
share/palettes/Makefile
share/patterns/Makefile
share/screens/Makefile
share/templates/Makefile
share/tutorials/Makefile
share/ui/Makefile
packaging/autopackage/default.apspec
inkscape.spec
Info.plist
inkview.1
])
AH_BOTTOM([
])
AC_OUTPUT
echo "
Configuration:
Source code location: ${srcdir}
Destination path prefix: ${prefix}
Compiler: ${CXX}
CPPFLAGS: ${CPPFLAGS}
CXXFLAGS: ${CXXFLAGS}
CFLAGS: ${CFLAGS}
LDFLAGS: ${LDFLAGS}
Use Xft font database: ${xft_ok}
Use gnome-vfs: ${gnome_vfs}
Use openoffice files: ${ij}
Use MMX optimizations: ${use_mmx_asm}
Use relocation support: ${enable_binreloc}
Internal Python: ${with_python}
Internal Perl: ${with_perl}
Enable LittleCms: ${enable_lcms}
Enable Inkboard: ${with_inkboard}
Enable SSL in Inkboard: ${with_inkboard_ssl}
Enable Poppler-Cairo: ${enable_poppler_cairo}
ImageMagick Magick++: ${magick_ok}
Libwpg: ${with_libwpg}
"