configure.ac revision 690616c90626ab0142761a448f6d8c6718c7d32b
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Process this file with autoconf to produce a configure script.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_PREREQ(2.53)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# Always use 0.xx+devel instead of 0.xxdevel for the version, e.g. 0.46+devel.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# Rationale: (i) placate simple version comparison software such as
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# `dpkg --compare-versions'. (ii) We don't always know what the next
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# version is going to be called until about the time we release it
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# (whereas we always know what the previous version was called).
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_INIT(inkscape, 0.47+devel)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_CANONICAL_HOST
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CONFIG_SRCDIR([src/main.cpp])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_INIT_AUTOMAKE([dist-zip dist-bzip2 tar-pax])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith export CC CXX
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAM_CONFIG_HEADER(config.h)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_PROG_CC_STDC
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_PROG_RANLIB
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_PROG_INTLTOOL(0.22)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_HEADER_STDC
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithINK_SVN_SNAPSHOT_BUILD
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl If automake 1.11 shave the output to look nice
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithm4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl These next few lines are needed only while libcroco is in our source tree.
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAM_PROG_CC_C_O
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithif test "$GCC" = "yes"; then
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith # Enable some warnings from gcc.
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith AC_LANG_PUSH(C)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith # Generic cpp flags...
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # What is just plain "-W" ?
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Fortify source requires -O2 or higher, which is handled with newer autoconf
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CPPFLAGS="-W -D_FORTIFY_SOURCE=2 $CPPFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Enable format and format security warnings
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Enable all default warnings
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CPPFLAGS="-Wall $CPPFLAGS"
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith # Test for -Werror=... (introduced some time post-4.0)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # If we hit a format error -- it should be fatal.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_CHECKING([compiler support for -Werror=format-security])
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith ink_svd_CPPFLAGS="$CPPFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CPPFLAGS="-Werror=format-security $CPPFLAGS"
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT([$ink_opt_ok])
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith if test "x$ink_opt_ok" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CPPFLAGS="$ink_svd_CPPFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # C-specific flags...
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # by gcc 2.95.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith ink_svd_CFLAGS="$CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CFLAGS="-Wno-pointer-sign $CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT([$ink_opt_ok])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$ink_opt_ok" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CFLAGS="$ink_svd_CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Linker flags...
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Have linker produce read-only relocations, if it knows how
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_CHECKING([linker tolerates -z relro])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith ink_svd_LDFLAGS="$LDFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LDFLAGS="-Wl,-z,relro $LDFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_LINK_IFELSE(AC_LANG_PROGRAM([]), [ink_opt_ok=yes], [ink_opt_ok=no])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT([$ink_opt_ok])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$ink_opt_ok" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LDFLAGS="$ink_svd_LDFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # C++-specific flags are defined further below. Look for CXXFLAGS...
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Honor aclocal flags
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Verify our GCC version
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$GXX" = "xyes"; then
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith AC_MSG_CHECKING([GNU compiler version])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Don't pass CXXFLAGS to the following CXX command as some
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # of them can't be specified along with '-v'.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith cc_version=["`$CXX -v 2>&1 </dev/null |grep 'gcc version' |\
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"]
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT([$cc_version])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Some version numbers
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith cc_vers_major=`echo $cc_version | cut -f1 -d.`
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith cc_vers_minor=`echo $cc_version | cut -f2 -d.`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith cc_vers_patch=`echo $cc_version | cut -f3 -d.`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith test -n "$cc_vers_major" || cc_vers_major=0
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith test -n "$cc_vers_minor" || cc_vers_minor=0
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith test -n "$cc_vers_patch" || cc_vers_patch=0
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test $cc_vers_major -lt 3; then
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith AC_MSG_ERROR([gcc >= 3.0 is needed to compile inkscape])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Gettext stuff
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithGETTEXT_PACKAGE="AC_PACKAGE_NAME"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(GETTEXT_PACKAGE)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Add the languages which your application supports here.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithALL_LINGUAS="am ar az be bg bn br ca ca@valencia cs da de dz el en_AU en_CA en_GB en_US@piglatin eo es_MX es et eu fi fr ga gl he hr hu hy id it ja km ko lt mk mn nb ne nl nn pa pl pt_BR pt ro ru rw sk sl sq sr@latin sr sv th tr uk vi zh_CN zh_TW"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_GLIB_GNU_GETTEXT
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_PATH_PROG(PKG_CONFIG, pkg-config, no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$PKG_CONFIG" = "xno"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Check for OpenMP
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Replace this with AC_OPENMP once Autoconf 2.62 is widespread
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAX_OPENMP([openmp_ok=yes],[openmp_ok=no])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$openmp_ok" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl We have it, now set up the flags
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_HEADER(omp.h)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Check for libpng
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=yes)], png_ok=no, -lz -lm)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$png_ok" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_ERROR([libpng >= 1.2 is needed to compile inkscape])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Handle possible dlopen requirement for libgc
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Isn't this internal to something in autoconf? Couldn't find it...
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [lt_cv_dlopen="dlopen"],
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [AC_CHECK_LIB([dl], [dlopen],
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith [AC_CHECK_LIB([svld], [dlopen],
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [AC_CHECK_LIB([dld], [dld_link],
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # To test for the different required libs, I have to
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # overcome autoconf's caching system, so I change the
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # desired function name. They're all in libgc.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # The "break" will exit from the top level
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # AC_CHECK_HEADERS.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_LIB(gc, GC_init,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="-lgc $gc_libs $LIBS";
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith break], [gc_ok=no], [$gc_libs])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith gc_libs="-lpthread"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_LIB(gc, GC_malloc,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="-lgc $gc_libs $LIBS";
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith break], [gc_ok=no], [$gc_libs])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith gc_libs="$lt_cv_dlopen_libs"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_LIB(gc, GC_realloc,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="-lgc $gc_libs $LIBS";
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith break], [gc_ok=no], [$gc_libs])
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith gc_libs="-lpthread $lt_cv_dlopen_libs"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_LIB(gc, GC_free,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="-lgc $gc_libs $LIBS";
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith break], [gc_ok=no], [$gc_libs])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$gc_ok" = "xyes" && test "x$cross_compiling" = "xno" ; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_CHECKING([libgc version 6.4+])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_RUN_IFELSE(
d7a66fe2de41baa56b41e8b7b254d1f6a50a5135Luke Smith [AC_LANG_SOURCE([[
d7a66fe2de41baa56b41e8b7b254d1f6a50a5135Luke Smith #ifdef HAVE_GC_GC_H
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith extern unsigned GC_version;
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith int main(void){
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith unsigned min = ((6 << 16) | (4 << 8) | 0);
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF);
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if (GC_version>=min) return 0;
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [gc_ok=yes],
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT([$gc_ok])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$gc_ok" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_ERROR([libgc (the Boehm Conservative Collector) 6.4+, is needed to compile inkscape -- http://www.hpl.hp.com/personal/Hans_Boehm/gc])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl This check is to get a FIONREAD definition on Solaris 8
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_HEADERS([sys/filio.h])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_HEADERS([malloc.h])
0cd29719d36de1f7e3d0043f5d6fafb990a7b9e0Luke SmithAC_CHECK_FUNCS([mallinfo], [
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_MEMBERS([struct mallinfo.usmblks,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [#include <malloc.h>])
d7a66fe2de41baa56b41e8b7b254d1f6a50a5135Luke SmithAC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$FREETYPE_CONFIG" = "xno"; then
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith AC_MSG_ERROR([Cannot find freetype-config])
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithFREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithFREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(FREETYPE_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(FREETYPE_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_CHECKING([for Win32 platform])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithcase "$host" in
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith platform_win32=yes
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith platform_win32=no
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_RESULT([$platform_win32])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(WIN32_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_CHECKING([for Solaris platform])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithcase "$host" in
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith *-solaris2.*)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith platform_solaris=yes
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith solaris_version=`echo $host|sed -e 's/^.*-solaris2\.//' -e s'/\..*$//'`
3702e9bc9b6b94b58c66f0cf1316bdda55419744Luke Smith CFLAGS="$CFLAGS -DSOLARIS=$solaris_version"
3702e9bc9b6b94b58c66f0cf1316bdda55419744Luke Smith CXXFLAGS="$CXXFLAGS -DSOLARIS=$solaris_version"
3702e9bc9b6b94b58c66f0cf1316bdda55419744Luke Smith platform_solaris=no
3702e9bc9b6b94b58c66f0cf1316bdda55419744Luke SmithAC_MSG_RESULT([$platform_solaris])
3702e9bc9b6b94b58c66f0cf1316bdda55419744Luke SmithAM_CONDITIONAL(PLATFORM_SOLARIS, test "$platform_solaris" = "yes")
3702e9bc9b6b94b58c66f0cf1316bdda55419744Luke Smithdnl ******************************
3702e9bc9b6b94b58c66f0cf1316bdda55419744Luke Smithdnl Xft checking
3702e9bc9b6b94b58c66f0cf1316bdda55419744Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_WITH(xft,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_HELP_STRING([--with-xft], [use xft scalable font database (default is auto)]),
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [with_xft=$withval], [with_xft=auto])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$with_xft" != "xno" ; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Test fontconfig package
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PKG_CHECK_MODULES(XFT, fontconfig, xft_ok=yes, xft_ok=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$xft_ok" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl test xft package
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PKG_CHECK_MODULES(XFT, xft, xft_ok=yes, xft_ok=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$xft_ok" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Have to test xft presence
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_HEADER(X11/Xft/Xft.h, xft_ok=yes, xft_ok=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$xft_ok" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl No xft found
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$with_xft" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Xft was explicitly asked, so stop
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_ERROR([--with-xft was specified, but appropriate development packages could not be found])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Working Xft1
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith XFT_LIBS="-L/usr/X11R6/lib -lXft "
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith dnl Asked to ignore xft
16479f9c396537f36d0d9c5633b24df618eee1e6Luke SmithAC_SUBST(XFT_CFLAGS)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke SmithAC_SUBST(XFT_LIBS)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke SmithAM_CONDITIONAL(USE_XFT, test "x$xft_ok" = "xyes")
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithif test "x$xft_ok" = "xyes"; then
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith AC_DEFINE(WITH_XFT, 1, [Use Xft font database])
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithdnl ******************************
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithdnl pangoft2 for xft
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$xft_ok" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PKG_CHECK_MODULES(PANGOFT2, pangoft2, pango_ok=yes, pango_ok=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$pango_ok" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith XFT_LIBS="$XFT_LIBS $PANGOFT2_LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl gnome vfs checking
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_WITH(gnome-vfs,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_HELP_STRING([--with-gnome-vfs], [use gnome vfs for loading files]),
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [with_gnome_vfs=$withval], [with_gnome_vfs=auto])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$with_gnome_vfs" = "xno"; then
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith dnl Asked to ignore gnome-vfs
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith gnome_vfs=no
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Have to test gnome-vfs presence
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.0, gnome_vfs=yes, gnome_vfs=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$gnome_vfs" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl No gnome-vfs found
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$with_gnome_vfs" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Gnome-VFS was explicitly asked for, so stop
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_ERROR([--with-gnome-vfs was specified, but appropriate libgnomevfs development packages could not be found])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # gnome-vfs is no, tell us for the log file
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT($gnome_vfs)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(USE_GNOME_VFS, test "x$gnome_vfs" = "xyes")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$gnome_vfs" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(WITH_GNOME_VFS, 1, [Use gnome vfs file load functionality])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(GNOME_VFS_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(GNOME_VFS_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl libinkjar checking
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_WITH(inkjar,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_HELP_STRING([--without-inkjar], [disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$with_ij" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_C_BIGENDIAN
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_HEADERS(zlib.h)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithink_spell_pkg=
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif pkg-config --exists gtkspell-2.0; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith ink_spell_pkg=gtkspell-2.0
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl PERL checking
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_CHECKING(for Perl development environment)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_WITH(perl,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_HELP_STRING([--with-perl], [use Perl for embedded scripting (EXPERIMENTAL)]),
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [with_perl=$withval], [with_perl=skipped])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$with_perl" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith checkPERL_CFLAGS=`perl -MExtUtils::Embed -e perl_inc 2>/dev/null`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "$?" -gt "0"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith with_perl="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith checkPERL_LIBS=`perl -MExtUtils::Embed -e ldopts 2>/dev/null`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "$?" -gt "0"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith with_perl="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith with_perl="yes"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_RESULT([$with_perl])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$with_perl" = "xyes"; then
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith # Test that we actually have the perl libraries installed
9327ef7ad1fee11b0e494b97cc07386565326c03Luke Smith oldCFLAGS="$CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith oldLIBS="$LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CFLAGS="$CFLAGS $checkPERL_CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="$LIBS $checkPERL_LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_FUNC([perl_parse],[
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PERL_CFLAGS="$checkPERL_CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PERL_LIBS="$checkPERL_LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(WITH_PERL, 1, [use Perl for embedded scripting])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith with_perl="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CFLAGS="$oldCFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="$oldLIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(WITH_PERL, test "x$with_perl" = "xyes")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(PERL_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(PERL_LIBS)
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smithdnl ******************************
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smithdnl Python checking
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smithdnl ******************************
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke SmithAC_MSG_CHECKING(for Python development environment)
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke SmithAC_ARG_WITH(python,
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith AC_HELP_STRING([--with-python], [use Python for embedded scripting (EXPERIMENTAL)]),
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith [with_python=$withval], [with_python=skipped])
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smithif test "x$with_python" = "xyes"; then
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith checkPYTHON_CFLAGS=`python -c "import distutils.sysconfig ; print '-I%s' % distutils.sysconfig.get_config_var('INCLUDEPY')" 2>/dev/null`
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith if test "$?" -gt "0"; then
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith with_python="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith 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`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "$?" -gt "0"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith with_python="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith with_python="yes"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_RESULT([$with_python])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$with_python" = "xyes"; then
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith # Test that we actually have the python libraries installed
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith oldCFLAGS="$CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith oldLIBS="$LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CFLAGS="$CFLAGS $checkPYTHON_CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="$LIBS $checkPYTHON_LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_CHECK_FUNC([Py_Initialize],[
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PYTHON_CFLAGS="$checkPYTHON_CFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PYTHON_LIBS="$checkPYTHON_LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(WITH_PYTHON, 1, [use Python for embedded scripting])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith with_python="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CFLAGS="$oldCFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="$oldLIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(WITH_PYTHON, test "x$with_python" = "xyes")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(PYTHON_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(PYTHON_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl LittleCms checking
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_ENABLE(lcms,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_HELP_STRING([--enable-lcms], [enable LittleCms for color management]),
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [enable_lcms=$enableval], [enable_lcms=yes])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$enable_lcms" = "xno"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Asked to ignore LittleCms
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Have to test LittleCms presence
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith PKG_CHECK_MODULES(LCMS, lcms >= 1.13, lcms=yes, lcms=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$lcms" != "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl No lcms found
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$enable_lcms" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl LittleCms was explicitly asked for, so stop
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_ERROR([--enable-lcms was specified, but appropriate LittleCms development packages could not be found])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # lcms is no, tell us for the log file
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT($lcms)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Working lcms
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LIBS="$LIBS $LCMS_LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(ENABLE_LCMS, 1, [Use LittleCms color management])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(LCMS_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(LCMS_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl Libpoppler checking
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl ******************************
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_ARG_ENABLE(poppler-cairo,
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith AC_HELP_STRING([--enable-poppler-cairo], [Enable libpoppler-cairo for rendering PDF preview]),
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith [enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithPOPPLER_CFLAGS=""
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithPKG_CHECK_MODULES(POPPLER, poppler >= 0.5.9, poppler=yes, poppler=no)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithif test "x$poppler" = "xyes"; then
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith dnl Working libpoppler
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith POPPLER_LIBS="-lpoppler "
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith dnl Have to test libpoppler-glib presence
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.5.9, poppler_glib=yes, poppler_glib=no)
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith if test "x$poppler_glib" = "xyes"; then
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith dnl Working libpoppler-glib found
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith dnl Check whether the Cairo SVG backend is available
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, cairo_svg=yes, cairo_svg=no)
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith if test "x$cairo_svg" = "xyes"; then
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith POPPLER_LIBS="$POPPLER_LIBS -lpoppler-glib "
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith if test "x$enable_poppler_cairo" = "xyes"; then
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith dnl Have to test libpoppler-cairo presence for PDF preview
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.5.9, poppler_cairo=yes, poppler_cairo=no)
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith if test "x$poppler_glib" = "xyes" -a "x$poppler_cairo" = "xyes" -a \
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith "x$cairo_svg" = "xno"
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith POPPLER_LIBS="$POPPLER_LIBS -lpoppler-glib "
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smithif test "x$poppler" = "xyes"; then
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith LIBS="$LIBS $POPPLER_LIBS"
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith AC_DEFINE(HAVE_POPPLER, 1, [Use libpoppler for direct PDF import])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$poppler_cairo" = "xyes" -a "x$poppler_glib" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(HAVE_POPPLER_CAIRO, 1, [Use libpoppler-cairo for rendering PDF preview])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$poppler_glib" = "xyes" -a "x$cairo_svg" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(HAVE_POPPLER_GLIB, 1, [Use libpoppler-glib and Cairo-SVG for PDF import])
16479f9c396537f36d0d9c5633b24df618eee1e6Luke SmithAC_SUBST(POPPLER_CFLAGS)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke SmithAC_SUBST(POPPLER_LIBS)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke SmithPKG_CHECK_MODULES(POPPLERNEW, poppler >= 0.8.3, popplernew=yes, popplernew=no)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithif test "x$popplernew" = "xyes"; then
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Poppler version of GfxFont to use (0.8.3 or higher versions of Poppler)])
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Inkboard dependency checking
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl with_inkboard="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl with_inkboard_ssl="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl INKBOARD_CFLAGS=""
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AC_ARG_ENABLE(inkboard,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AS_HELP_STRING([--enable-inkboard], [enable Inkboard online whiteboard facility (disabled by default)]),
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl with_inkboard=$enableval,with_inkboard=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl if test "x$with_inkboard" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl with_inkboard="yes"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AC_DEFINE(WITH_INKBOARD,1,[Build in Inkboard support])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl Test for OpenSSL
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl PKG_CHECK_MODULES(INKBOARD, openssl, with_inkboard_ssl=yes, with_inkboard_ssl=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl if test "x$with_inkboard_ssl" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith dnl OpenSSL found; enable SSL support in Pedro
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl INKBOARD_CFLAGS="$INKBOARD_CFLAGS -DHAVE_SSL"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl RELAYTOOL([ssl], INKBOARD_LIBS, INKBOARD_CFLAGS, [inkboard_weak=yes])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl RELAYTOOL([crypto], INKBOARD_LIBS, INKBOARD_CFLAGS, [inkboard_weak=yes])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AC_DEFINE(WITH_INKBOARD_SSL,1,[Build in SSL support for Inkboard])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl with_inkboard="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AM_CONDITIONAL(WITH_INKBOARD, test "x$with_inkboard" = "xyes")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AC_SUBST(INKBOARD_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AC_SUBST(INKBOARD_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke Smithdnl Check for libwpg for extension
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithPKG_CHECK_MODULES(LIBWPG, libwpg-0.1 libwpg-stream-0.1, with_libwpg=yes, with_libwpg=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$with_libwpg" = "xyes"; then
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke Smith AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(LIBWPG_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(LIBWPG_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Support doing a local install
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl (mostly for distcheck)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithwith_localinstall="no"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install system files in the local path (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Check for dbus functionality
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithPKG_CHECK_MODULES(DBUS, dbus-glib-1, with_dbus=yes, with_dbus=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$with_dbus" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(WITH_DBUS,1,[Build in dbus])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "x$with_localinstall" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith DBUSSERVICEDIR="${datadir}/dbus-1/services/"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_SUBST(DBUSSERVICEDIR)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke SmithAC_SUBST(DBUS_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(DBUS_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Check for ImageMagick Magick++
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithPKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "x$magick_ok" = "xyes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(IMAGEMAGICK_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(IMAGEMAGICK_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ***********************************************************************************************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Check for a Cairo version that implements user-fonts feature (with a stable API, that is cairo > 1.7.6),
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl so that we conditionally add SVGFonts support
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl ***********************************************************************************************************
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithPKG_CHECK_MODULES(CAIRO_USER_FONTS, cairo > 1.7.6, cairouserfonts=yes, cairouserfonts=no)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithif test "x$cairouserfonts" = "xyes"; then
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith AC_DEFINE(ENABLE_SVG_FONTS, 1, [SVG Fonts should be used])
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl ******************************
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl Unconditional dependencies
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl ******************************
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl sigc++-2.0 >= 2.0.12: using "visit_each" not available in 2.0.10
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithif test $cc_vers_major -gt 3; then
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith min_sigc_version=2.0.12
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith min_sigc_version=2.0.11
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithPKG_CHECK_MODULES(INKSCAPE, gdkmm-2.4 glibmm-2.4 giomm-2.4 gtkmm-2.4 >= 2.10.0 gtk+-2.0 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 cairo sigc++-2.0 >= $min_sigc_version $ink_spell_pkg gthread-2.0 >= 2.0 libpng >= 1.2 gsl)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith# Check for Apple Mac OS X Carbon framework
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_CHECKING([for Mac OS X Carbon support])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith], carbon_ok=yes)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_RESULT($carbon_ok)
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smithif test "x$carbon_ok" = "xyes"; then
12193f069c735c9fa68aa22d6b4a8ff1fc5b83f1Luke Smith AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
12193f069c735c9fa68aa22d6b4a8ff1fc5b83f1Luke Smith CARBON_LDFLAGS="-framework Carbon"
12193f069c735c9fa68aa22d6b4a8ff1fc5b83f1Luke Smith AC_SUBST(CARBON_LDFLAGS)
12193f069c735c9fa68aa22d6b4a8ff1fc5b83f1Luke SmithAM_CONDITIONAL(HAVE_CARBON, test "x$carbon_ok" = "xyes")
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith# Check for some boost header files
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke SmithAC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)]))
d7a66fe2de41baa56b41e8b7b254d1f6a50a5135Luke SmithPKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no)
d7a66fe2de41baa56b41e8b7b254d1f6a50a5135Luke Smithif test "x$cairo_pdf" = "xyes"; then
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl Shouldn't we test for libpng and libz?
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithif test "x$openmp_ok" = "xyes"; then
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith INKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz -lgomp"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith INKSCAPE_LIBS="$INKSCAPE_LIBS -lpng -lz"
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke SmithAC_CHECK_HEADER(popt.h,
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith [INKSCAPE_LIBS="$INKSCAPE_LIBS -lpopt"],
c31ae0e3c3d2726907b1876b5fe81cfd94527d5dLuke Smith AC_MSG_ERROR([libpopt is required]))
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl **************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Check for aspell
776dbe951677142d852d930b593a8ab05c406e83Luke Smithdnl ******************************
12193f069c735c9fa68aa22d6b4a8ff1fc5b83f1Luke SmithAC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
12193f069c735c9fa68aa22d6b4a8ff1fc5b83f1Luke Smithif test "x$aspell_ok" = "xyes"; then
12193f069c735c9fa68aa22d6b4a8ff1fc5b83f1Luke Smith AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
12193f069c735c9fa68aa22d6b4a8ff1fc5b83f1Luke Smith INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smithdnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithsp_save_LIBS=$LIBS
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithLIBS="$LIBS $INKSCAPE_LIBS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(bind_textdomain_codeset)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Check for gtk_window_fullscreen in gtk (>= 2.2)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_CHECK_FUNCS(gtk_window_set_default_icon_from_file)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_CHECK_FUNCS(gtk_window_fullscreen)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithLIBS=$sp_save_LIBS
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Check for binary relocation support
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Hongli Lai <h.lai@chello.nl>
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_ENABLE(binreloc,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith [ --enable-binreloc compile with binary relocation support],
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith enable_binreloc=$enableval,enable_binreloc=no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_CHECKING(whether binary relocation support should be enabled)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "$enable_binreloc" = "yes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(yes)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith if test -e /proc/self/maps; then
4db02d4b38afe802ad625f6c389e106fdc7c26faLuke Smith AC_MSG_RESULT(yes)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith enable_binreloc="no"
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke Smithelif test "$enable_binreloc" = "auto"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(yes when available)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test -e /proc/self/maps; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(yes)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith enable_binreloc=yes
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_CHECKING(whether everything is installed to the same prefix)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith "$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(yes)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_NOTICE(Binary relocation support will be disabled.)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith enable_binreloc=no
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith enable_binreloc=no
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke Smithelif test "$enable_binreloc" = "no"; then
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke Smith AC_MSG_RESULT(no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(no (unknown value "$enable_binreloc"))
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith enable_binreloc=no
16479f9c396537f36d0d9c5633b24df618eee1e6Luke SmithAC_DEFINE(BR_PTHREADS,[0],[Use binreloc thread support?])
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke Smithif test "$enable_binreloc" = "yes"; then
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke Smith AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
16479f9c396537f36d0d9c5633b24df618eee1e6Luke SmithAC_ARG_ENABLE(osxapp,
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith [ --enable-osxapp compile with OSX .app data dir paths],
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith enable_osxapp=$enableval,enable_osxapp=no)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithif test "$enable_osxapp" = "yes"; then
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith AC_DEFINE(ENABLE_OSX_APP_LOCATIONS,,[Build with OSX .app data dir paths?])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Reported by autoscan
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(pow)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# if we did not find pow(), see if it's in libm.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test x"$ac_cv_func_pow" = x"no" ; then
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smith AC_CHECK_LIB(m,pow)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(sqrt)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(floor)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(gettimeofday)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(memmove)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(memset)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(mkdir)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(strncasecmp)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(strpbrk)
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke SmithAC_CHECK_FUNCS(strrchr)
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke SmithAC_CHECK_FUNCS(strspn)
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke SmithAC_CHECK_FUNCS(strstr)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(strtoul)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(fpsetmask)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_FUNCS(ecvt)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_HEADERS(ieeefp.h)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_HEADERS(fcntl.h)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_HEADERS(libintl.h)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_HEADERS(stddef.h)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CHECK_HEADERS(sys/time.h)
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_FUNC_STRFTIME
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_FUNC_STRTOD
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_HEADER_STAT
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_HEADER_TIME
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_TYPE_MODE_T
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke SmithAC_TYPE_SIGNAL
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Work around broken gcc 3.3 (seen on OSX) where "ENABLE_NLS" isn't
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl set correctly because the gettext function isn't noticed.
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithif test "$ac_cv_header_libintl_h" = "yes" &&
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith test "$ac_cv_func_bind_textdomain_codeset" = "yes" &&
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith test "$gt_cv_func_have_gettext" != "yes"; then
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smith AC_DEFINE(ENABLE_NLS)
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithdnl ******************************
16479f9c396537f36d0d9c5633b24df618eee1e6Luke Smithdnl Compilation warnings
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithif test "$GXX" = "yes"; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Enable some warnings from g++.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Rationale: a number of bugs in inkscape have been fixed by enabling g++
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # warnings and addressing the produced warnings. Usually the committing
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # developer is the best person to address the warnings.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith ink_svd_CXXFLAGS="$CXXFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CXXFLAGS="-Wno-unused-parameter $CXXFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # -Wno-unused-parameter isn't accepted by gcc 2.95.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_COMPILE_IFELSE([int dummy;
ed51daad3a3ab15255ca10edef69d5f703d69adbLuke Smith], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Note: At least one bug has been caught from unused parameter warnings,
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # so it might be worth trying not to disable it.
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # One way of selectively disabling the warnings (i.e. only where the
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # programmer deliberately isn't using the parameter, e.g. for a callback)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # is to remove the parameter name (leaving just its type), as is done
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # in src/seltrans.cpp:sp_seltrans_handle_event; this indicates that the
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # programmer deliberately has an unused parameter (e.g. because it's used
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # as a callback or similar function pointer use).
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith # Add even more stuff
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CXXFLAGS="-Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
d463aba91a07cde67f9ec9382bce464db5bcc9d3Luke Smithdnl libinkscape
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl ******************************
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AC_ARG_ENABLE(libinkscape, AC_HELP_STRING([--enable-libinkscape], [Compile dynamic library (experimental)]), [splib=$enableval], [splib=no])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl AM_CONDITIONAL(ENABLE_LIBINKSCAPE, test "x$splib" != "xno")
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(INKSCAPE_CFLAGS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_SUBST(INKSCAPE_LIBS)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# Checks to see if we should compile in MMX support (there will be
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# a runtime test when the code is actually run to see if it should
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# be used - this just checks if we can compile it.)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith# This code is partially taken from Mesa
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Let people disable the MMX optimization
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_ARG_ENABLE(mmx, [ --disable-mmx Don't use MMX optimization [default=auto]], enable_mmx="$enableval", enable_mmx=auto)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_CHECKING(for x86 platform)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithcase $host_cpu in
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith i386|i486|i586|i686|i786|k6|k7)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith use_x86_asm=yes
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith use_x86_asm=no
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_MSG_RESULT($use_x86_asm)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Are we going to use MMX extensions
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithuse_mmx_asm=no
abdfe7cf11d34f89f17b26e4779bf6079d22a910Adam MooreAC_MSG_CHECKING(compiler support for MMX)
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smithif test x$enable_mmx = xauto ; then
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith if test $use_x86_asm = yes; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith save_ac_ext=$ac_ext
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith cp $srcdir/src/libnr/nr_mmx_R8G8B8A8_P_R8G8B8A8_P_A8_RGBAP.S conftest.S
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith if AC_TRY_EVAL(ac_compile); then
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith use_mmx_asm=yes
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith dnl rm -f conftest.[oS]
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smith ac_ext=$save_ac_ext
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Enforce usage of MMX extensions
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithelif test x$enable_mmx = xyes ; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith use_mmx_asm=yes
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith use_mmx_asm=no
8652e2d20f8ea9c9bfe21217ba427cf0d85ada9aLuke Smithif test $use_mmx_asm = yes; then
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_DEFINE(WITH_MMX, 1, [Use MMX optimizations, if CPU supports it])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(yes)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith AC_MSG_RESULT(no)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smithdnl Define our data paths for config.h
4db02d4b38afe802ad625f6c389e106fdc7c26faLuke SmithAC_DEFINE_DIR([INKSCAPE_DATADIR], [datadir], [Base data directory])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_DEFINE_DIR([PACKAGE_LOCALE_DIR], [localedir], [Locatization directory])
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithAC_CONFIG_FILES([
35eeab4975a1c9e62cf466455a59e80ba5e00fb0Luke Smithsrc/2geom/makefile
b32d148b0052e1f874e9bc9803bef729bf859d97Luke SmithConfiguration:
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Source code location: ${srcdir}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Destination path prefix: ${prefix}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Compiler: ${CXX}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CPPFLAGS: ${CPPFLAGS}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CXXFLAGS: ${CXXFLAGS}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith CFLAGS: ${CFLAGS}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith LDFLAGS: ${LDFLAGS}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Use Xft font database: ${xft_ok}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Use gnome-vfs: ${gnome_vfs}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Use openoffice files: ${ij}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Use MMX optimizations: ${use_mmx_asm}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Use relocation support: ${enable_binreloc}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Internal Python: ${with_python}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Internal Perl: ${with_perl}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Enable LittleCms: ${enable_lcms}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Enable DBUS ${with_dbus}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Enable Poppler-Cairo: ${enable_poppler_cairo}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith ImageMagick Magick++: ${magick_ok}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Libwpg: ${with_libwpg}
b32d148b0052e1f874e9bc9803bef729bf859d97Luke Smith Doing Local Install: ${with_localinstall}