]> granicus.if.org Git - imagemagick/blobdiff - configure.ac
(no commit message)
[imagemagick] / configure.ac
index fbc67122e808ffb04dff2f435484b178aac8a1ce..787a4e592348dc452b3819dfdab4dcff6ab57b30 100755 (executable)
@@ -1,4 +1,4 @@
-#  Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization
+#  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
 #  dedicated to making software imaging solutions freely available.
 #
 #  You may not use this file except in compliance with the License.  You may
@@ -15,7 +15,7 @@
 #  Copyright (C) 2003 - 2008 GraphicsMagick Group
 
 AC_PREREQ(2.63)
-AC_INIT([ImageMagick],[6.5.7],[http://www.imagemagick.org],[ImageMagick])
+AC_INIT([ImageMagick],[6.6.2],[http://www.imagemagick.org],[ImageMagick])
 AC_CONFIG_SRCDIR([magick/MagickCore.h])
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_MACRO_DIR([m4])
@@ -28,6 +28,7 @@ AC_CONFIG_FILES([\
     config/ImageMagick.rdf \
     config/MagickCore.dox \
     config/MagickWand.dox \
+    config/type-dejavu.xml \
     config/type-ghostscript.xml \
     config/type-windows.xml \
     config/type.xml \
@@ -81,13 +82,29 @@ AC_SUBST(CONFIGURE_ARGS)
 # Source file containing package/library versioning information.
 . ${srcdir}/version.sh
 
-echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_LIB_SUBVERSION}"
+echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
+AC_CANONICAL_SYSTEM
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
 AC_CANONICAL_TARGET([])
 
+MAGICK_TARGET_CPU=$target_cpu
+AC_SUBST(MAGICK_TARGET_CPU)
+
+MAGICK_TARGET_VENDOR=$target_vendor
+AC_SUBST(MAGICK_TARGET_VENDOR)
+
+MAGICK_TARGET_OS=$target_os
+AC_SUBST(MAGICK_TARGET_OS)
+
 # Substitute library versioning
 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
+AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
+         [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
+AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
+         [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
 
 AC_SUBST(PACKAGE_NAME)dnl
 AC_SUBST(PACKAGE_VERSION)dnl
@@ -96,12 +113,12 @@ AC_SUBST(PACKAGE_CHANGE_DATE)dnl
 AC_SUBST(PACKAGE_LIB_VERSION)dnl
 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
-AC_SUBST(PACKAGE_LIB_SUBVERSION)dnl
+AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
 
 # Ensure that make can run correctly
 AM_SANITY_CHECK
 
-AM_INIT_AUTOMAKE($PACKAGE_NAME,"${PACKAGE_VERSION}${PACKAGE_LIB_SUBVERSION}", ' ')
+AM_INIT_AUTOMAKE($PACKAGE_NAME,"${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}", ' ')
 
 # Enable support for silent build rules
 AM_SILENT_RULES([yes])
@@ -213,26 +230,30 @@ AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
 AC_SUBST(DIRSEP)
 
+
+#
+# Enable OS features.
+#
+AC_USE_SYSTEM_EXTENSIONS
+
 # Check for programs
 AC_PROG_CC
+AC_PROG_CXX
 AC_PROG_CC_STDC
 AC_PROG_CPP
 AC_PROG_LD
-AC_PROG_RANLIB
 AC_SUBST(LD)
+AC_PROG_CC_C99
 AM_PROG_CC_C_O
+AX_CFLAGS_WARN_ALL
+AC_INCLUDES_DEFAULT
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
-AC_COMPILE_WARNINGS
 AC_PROG_LN_S
 AM_WITH_DMALLOC
+AX_C___ATTRIBUTE__
 PKG_PROG_PKG_CONFIG
 
-#
-# Enable OS features.
-#
-AC_GNU_SOURCE
-
 #
 # Enable run-time checking.
 #
@@ -252,19 +273,17 @@ fi
 #
 AC_EXEEXT
 AC_OBJEXT
+AX_LANG_COMPILER_MS
 
 GDI32_LIBS=''
-StaticCplusPlusLibraries='no'
 native_win32_build='no'
 cygwin_build='no'
 case "${host_os}" in
     cygwin* )
-        StaticCplusPlusLibraries='yes'
         cygwin_build='yes'
         GDI32_LIBS='-lgdi32'
     ;;
     mingw* )
-        StaticCplusPlusLibraries='yes'
         native_win32_build='yes'
         GDI32_LIBS='-lgdi32'
     ;;
@@ -336,7 +355,7 @@ case "$host" in
     LDFLAGS="$LDFLAGS -L/sw/lib"
   fi
   dnl OS X universal binary support, requires --disable-dependency-tracking
-  AC_ARG_ENABLE(osx-universal-binary,
+  AC_ARG_ENABLE([osx-universal-binary],
         AC_HELP_STRING([--enable-osx-universal-binary],
            [build universal binary on OS X [[default=no]]]),
         [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
@@ -364,8 +383,8 @@ AC_ARG_WITH([threads],
 
 have_threads=no
 if test "$with_threads" != 'no'; then
-    ACX_PTHREAD()
-    if test "$acx_pthread_ok" = yes; then
+    AX_PTHREAD()
+    if test "$ax_pthread_ok" = yes; then
         have_threads=yes
         DEF_THREAD="$PTHREAD_CFLAGS"
         CFLAGS="$CFLAGS $DEF_THREAD"
@@ -387,9 +406,10 @@ MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
 AC_SUBST(OPENMP_CFLAGS)
 
 # Enable support for OpenCL
-AX_CHECK_CL
+AX_OPENCL([C])
 CFLAGS="$CL_CFLAGS $CFLAGS"
 LIBS="$CL_LIBS $LIBS"
+AC_SUBST(CL_CFLAGS)
 
 ########
 #
@@ -446,12 +466,7 @@ if test "$enable_static" = 'yes'; then
     libtool_build_static_libs='yes'
 fi
 
-# MinGW and Cygwin can't build C++ DLLs which support exceptions.
-if test "${StaticCplusPlusLibraries}" = 'yes'; then
-    LTCXXLIBOPTS='--static'
-    AC_SUBST(LTCXXLIBOPTS)
-fi
-
+AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
 #
 # Enable support for building loadable modules
 #
@@ -459,7 +474,7 @@ AC_ARG_WITH([modules],
     [AC_HELP_STRING([--with-modules],
                     [enable building dynamically loadable modules])],
     [with_modules=$withval],
-    [with_modules=$libtool_build_shared_libs])
+    [with_modules='no'])
 
 # Only allow building loadable modules if we are building shared libraries
 if test "$with_modules" != 'no' ; then
@@ -492,7 +507,7 @@ if test "$with_ltdl" != 'no'; then
 fi
 
 # Enable build using delegate libraries built in subdirectories rather than installed
-# delegate libraries (bzlib fftw fpx jp2 jbig jpeg lcms png tiff ttf wmf xml zlib)
+# delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms png tiff ttf wmf xml zlib)
 AC_ARG_ENABLE([delegate-build],
     [AC_HELP_STRING([--enable-delegate-build],
                     [look for delegate libraries in build directory])],
@@ -544,7 +559,7 @@ AC_ARG_ENABLE([embeddable],
     [enable_embeddable='no'])
 
 if test "$enable_embeddable" = 'yes'; then
-    AC_DEFINE(EMBEDDABLE_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick (experimental)])
+    AC_DEFINE(EMBEDDABLE_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
 fi
 
 # Build a high dynamic range version of ImageMagick.
@@ -557,21 +572,10 @@ AC_ARG_ENABLE([hdri],
 MAGICK_HDRI=""
 if test "$enable_hdri" = 'yes'; then
     MAGICK_HDRI="HDRI"
-    AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels  in real scenes])
+    AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
 fi
 AC_SUBST(MAGICK_HDRI)dnl
 
-# Enable verbose output from libtool (enable libtool's default)
-AC_ARG_ENABLE([libtool-verbose],
-    [AC_HELP_STRING([--enable-libtool-verbose],
-                    [enable verbose libtool output])],
-    [enable_libtool_verbose=$enableval],
-    [enable_libtool_verbose='no'])
-
-if test "$enable_libtool_verbose" = 'no'; then
-    LIBTOOL="$LIBTOOL --silent"
-fi
-
 # Build a version of ImageMagick with assert statements.
 AC_ARG_ENABLE([assert],
     [AC_HELP_STRING([--disable-assert],
@@ -696,17 +700,15 @@ AC_ARG_WITH([perl],
     [AC_HELP_STRING([--with-perl],
                     [enable build/install of PerlMagick])],
     [with_perl=$withval],
-    [with_perl=$libtool_build_shared_libs])
+    [with_perl='no'])
 
 # Options to pass when configuring PerlMagick
 AC_ARG_WITH([perl-options],
     [AC_HELP_STRING([--with-perl-options=OPTIONS],
-                    [options to pass on command-line when generating PerlMagick's build file])])
-
-PERL_MAKE_OPTIONS=$with_perl_options
+                    [options to pass on command-line when generating PerlMagick's build file])],
+PERL_MAKE_OPTIONS=$withval)
 AC_SUBST(PERL_MAKE_OPTIONS)
 
-
 # Enable umem, object-caching memory allocation library.
 AC_ARG_WITH(umem,
         [  --with-umem             enable umem memory allocation library support],
@@ -778,10 +780,11 @@ if ! test x"$ac_cv_header_stdc" = x"yes"; then
     header files.  Compilation cannot proceed.  Please install the ANSI C
     headers and rerun this script.]);
 fi
+AC_HEADER_ASSERT
 AC_HEADER_DIRENT
 
 # Check additional headers
-AC_CHECK_HEADERS(arm/limits.h complex.h errno.h fcntl.h inttypes.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h OS.h stdarg.h stddef.h string.h strings.h sys/ipc.h sys/resource.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/wait.h unistd.h wchar.h)
+AC_CHECK_HEADERS(arm/limits.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h OS.h process.h stdarg.h sys/ipc.h sys/resource.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h)
 
 ########
 #
@@ -795,12 +798,9 @@ AC_C_STRINGIZE
 AC_HEADER_STAT
 AC_HEADER_TIME
 AC_STRUCT_TM
+AC_STRUCT_TIMEZONE
 AC_SYS_INTERPRETER
 
-# If the C compiler does not fully support the ANSI C qualifier const,
-# define const to be empty.
-AC_C_CONST
-
 # If the C compiler supports the keyword inline, do nothing. Otherwise
 # define inline to __inline__ or __inline if it accepts one of those,
 # otherwise define inline to be empty.
@@ -989,7 +989,15 @@ AC_TYPE_SIGNAL
 AC_FUNC_STRTOD
 AC_FUNC_VPRINTF
 
-AC_CHECK_FUNCS([_exit atexit clock directio execvp floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol symlink sysconf sigemptyset sigaction strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep vsprintf vsnprintf waitpid _wfopen _wstat])
+#
+# Find math library
+#
+MATH_LIBS=''
+AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
+LIBS="$MATH_LIBS $LIBS"
+AC_SUBST(MATH_LIBS)
+
+AC_CHECK_FUNCS([_exit atexit cimag clock directio execvp fchmod floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep utime vsprintf vsnprintf waitpid _wfopen _wstat])
 
 #
 # Check for clock_gettime().
@@ -1047,9 +1055,9 @@ if test "$with_magick_plus_plus" = 'yes'; then
     # functional iomanip iosfwd iostream iterator list string strstream utility
     AC_LANG([C++])
     AC_PROG_CXX
-    AC_CXX_HAVE_BOOL
-    AC_CXX_HAVE_NAMESPACES
-    AC_CXX_HAVE_STD_NAMESPACE
+    AX_CXX_BOOL
+    AX_CXX_NAMESPACES
+    AX_CXX_NAMESPACE_STD
     AC_CXX_HAVE_STD_LIBS
     AC_CXX_HAVE_LSTRING
     AC_OPENMP([C++])
@@ -1057,11 +1065,11 @@ if test "$with_magick_plus_plus" = 'yes'; then
 
     AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
     if \
-        test $ac_cv_cxx_have_bool = 'yes' && \
+        test $ax_cv_cxx_bool = 'yes' && \
         test $ac_cv_cxx_have_lstring = 'yes' && \
-        test $ac_cv_cxx_have_namespaces = 'yes' && \
+        test $ax_cv_cxx_namespaces = 'yes' && \
         test $ac_cv_cxx_have_std_libs = 'yes' && \
-        test $ac_cv_cxx_have_std_namespace = 'yes'; then
+        test $ax_cv_cxx_have_std_namespace = 'yes'; then
         have_magick_plus_plus='yes'
     else
         have_magick_plus_plus='no (failed tests)'
@@ -1083,7 +1091,7 @@ if test "$enable_delegate_build" != 'no'; then
     # Most delegates have includes in the same directory as the library, but not all...
     #
     # Includes
-    for dir in bzlib fftw fpx jp2 jp2/src/libjasper/include jbig/libjbig jpeg lcms/include magick png tiff/libtiff ttf/include wand wmf/include xml/include zlib; do
+    for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper/include jbig/libjbig jpeg lcms/include magick png tiff/libtiff ttf/include wand wmf/include xml/include zlib; do
         if test -d "$builddir/$dir"; then
             CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
         else
@@ -1094,7 +1102,7 @@ if test "$enable_delegate_build" != 'no'; then
     done
 
     # Libraries
-    for dir in bzlib fftw fpx jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src magick png tiff/libtiff ttf/objs wand wmf/src xml zlib; do
+    for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src magick png tiff/libtiff ttf/objs wand wmf/src xml zlib; do
     if test -d "$builddir/$dir/.libs"; then
         LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
     else
@@ -1275,14 +1283,6 @@ if test "$enable_efence" = 'yes'; then
     LIBS="$EFENCE_LIBS $LIBS"
 fi
 
-#
-# Find math library
-#
-MATH_LIBS=''
-AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
-LIBS="$MATH_LIBS $LIBS"
-AC_SUBST(MATH_LIBS)
-
 dnl ===========================================================================
 
 #
@@ -1602,6 +1602,21 @@ AC_SUBST(DJVU_LIBS)
 
 dnl ===========================================================================
 
+#
+# Set DejaVu font directory.
+#
+AC_ARG_WITH([dejavu-font-dir],
+    [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
+                    [DejaVu font directory])],
+    [with_dejavu_font_dir=$withval],
+    [with_dejavu_font_dir='default'])
+
+if test "$with_dejavu_font_dir" != 'default'; then
+    DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
+fi
+
+dnl ===========================================================================
+
 #
 # Check for FFTW delegate library.
 #
@@ -1716,10 +1731,10 @@ if test "x$with_fontconfig" = "xyes"; then
 fi
 
 if test "$have_fontconfig" = 'yes'; then
-    AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
-    if test "$with_modules" = 'no'; then
+  AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
+  if test "$with_modules" = 'no'; then
     CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
-    fi
+  fi
 fi
 
 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
@@ -2099,6 +2114,45 @@ fi
 have_lcms='no'
 LCMS_LIBS=''
 if test "$with_lcms" != 'no'; then
+    AC_MSG_RESULT([-------------------------------------------------------------])
+    AC_MSG_CHECKING([for LCMS])
+    AC_MSG_RESULT([])
+    failed=0
+    passed=0
+    have_lcms_header='no'
+    AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
+    if test "$have_lcms_header" = 'yes'; then
+        passed=`expr $passed + 1`
+        AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
+    else
+        AC_CHECK_HEADER(lcms/lcms2.h,have_lcms_header='yes',,)
+        if test "$have_lcms_header" = 'yes'; then
+            passed=`expr $passed + 1`
+            AC_DEFINE(HAVE_LCMS_LCMS2_H,1,Define if you have the <lcms/lcms2.h> header file.)
+        else
+            failed=`expr $failed + 1`
+        fi
+    fi
+    AC_CHECK_LIB(lcms2,cmsOpenProfileFromMem,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
+    AC_MSG_CHECKING([if LCMS2 package is complete])
+    if test $passed -gt 0; then
+        if test $failed -gt 0; then
+            AC_MSG_RESULT([no -- some components failed test])
+            have_lcms='no (failed tests)'
+        else
+            LCMS_LIBS='-llcms2'
+            LIBS="$LCMS_LIBS $LIBS"
+            AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library)
+            AC_MSG_RESULT([yes])
+            have_lcms='yes'
+        fi
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+
+if test "$with_lcms" != 'no'; then
+if test "$have_lcms" == 'no'; then
     AC_MSG_RESULT([-------------------------------------------------------------])
     AC_MSG_CHECKING([for LCMS])
     AC_MSG_RESULT([])
@@ -2135,6 +2189,7 @@ if test "$with_lcms" != 'no'; then
         AC_MSG_RESULT([no])
     fi
 fi
+fi
 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms" = 'yes')
 AC_SUBST(LCMS_LIBS)
 
@@ -2145,7 +2200,7 @@ dnl ===========================================================================
 #
 AC_ARG_WITH([lqr],
     [AC_HELP_STRING([--without-lqr],
-                    [disable Liquid Rescale support (experimental)])],
+                    [disable Liquid Rescale support])],
     [with_lqr=$withval],
     [with_lqr='yes'])
 
@@ -2375,7 +2430,7 @@ AC_ARG_WITH([wmf],
     [AC_HELP_STRING([--without-wmf],
                     [disable WMF support])],
     [with_wmf=$withval],
-    [with_wmf=$with_modules])
+    [with_wmf='yes'])
 
 if test "$with_wmf" != 'yes'; then
     DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
@@ -2383,56 +2438,35 @@ fi
 
 have_wmf='no'
 WMF_LIBS=''
-WMF_LIBS_DEPS=''
-OLIBS="$LIBS"
 if test "$with_wmf" != 'no'; then
     AC_MSG_RESULT([-------------------------------------------------------------])
     AC_MSG_CHECKING([for WMF])
     AC_MSG_RESULT([])
-    have_libwmf='no'
-    have_libwmflite='no'
-    have_libwmf_ipa_h='no'
-
-    AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H])
-    if test "$have_libwmf_ipa_h" = 'yes'; then
-        AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,)
-        if test "$have_libwmflite" = 'yes'; then
-            AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library)
-            WMF_LIBS='-lwmflite'
+    failed=0
+    passed=0
+    AC_CHECK_HEADER(libwmf/eps.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
+    AC_CHECK_LIB(wmf,wmf_eps_function,passed=`expr $passed + 1`,failed=`expr $failed + 1`,"-lwmflite")
+    AC_MSG_CHECKING([if WMF package is complete])
+    if test $passed -gt 0; then
+        if test $failed -gt 0; then
+            AC_MSG_RESULT([no -- some components failed test])
+            have_wmf='no (failed tests)'
+        else
+            WMF_LIBS='-lwmf -lwmflite'
             LIBS="$WMF_LIBS $LIBS"
+            AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
+            AC_MSG_RESULT([yes])
             have_wmf='yes'
-        else
-            WMF_LIBS_DEPS=''
-            WMF_CONFIG_LIBS=`libwmf-config --libs`
-            for lib in xml2 expat freetype jpeg png z; do
-                testlib="-l${lib}"
-                echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib"
-            done
-            AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS)
-            if test "$have_libwmf" = 'yes'; then
-                AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library)
-                WMF_LIBS='-lwmf'
-                LIBS="$WMF_LIBS $LIBS"
-                have_wmf='yes'
-            else
-                AC_MSG_RESULT([no -- some components failed test])
-                have_wmf='no (failed tests)'
-                have_wmflite='no (failed tests)'
-                LIBS="$OLIBS"
-                WMF_LIBS=''
-            fi
         fi
-    fi
-    AC_MSG_CHECKING([if WMF package is complete])
-    if test "$have_wmf" = 'yes'; then
-        AC_MSG_RESULT([yes])
     else
         AC_MSG_RESULT([no])
     fi
 fi
-AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes')
+AM_CONDITIONAL(WMF_DELEGATE,test "$have_wmf" = 'yes')
 AC_SUBST(WMF_LIBS)
-AC_SUBST(WMF_LIBS_DEPS)
+
+dnl ===========================================================================
+
 
 dnl ===========================================================================
 
@@ -2664,6 +2698,7 @@ else
 fi
 RLEEncodeDelegateDefault='rawtorle'
 RMDelegateDefault='rm'
+RSVGDecodeDelegateDefault='rsvg'
 SCANDecodeDelegateDefault='scanimage'
 TXTDelegateDefault='enscript'
 WMFDecodeDelegateDefault='wmf2eps'
@@ -2709,6 +2744,7 @@ AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
+AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
@@ -2747,12 +2783,33 @@ have_xps='no'        ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then hav
 #
 type_include_files=''
 
+# Dejavu fonts.
+AC_MSG_CHECKING(for Dejavu fonts directory)
+dejavu_font_dir=''
+if test "${with_dejavu_font_dir}" != 'default'; then
+  dejavu_font_dir="${with_dejavu_font_dir}/"
+else
+  for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
+    if test -f "${font_dir}DejaVuSerif.ttf"; then
+      dejavu_font_dir="${font_dir}"
+      break 1
+    fi
+  done
+fi
+if test "${dejavu_font_dir}x" != 'x'; then
+  type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
+  AC_MSG_RESULT([$dejavu_font_dir])
+else
+  AC_MSG_RESULT([not found!]);
+fi
+AC_SUBST(dejavu_font_dir)
+
 # Windows
 windows_font_dir=''
 if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
    windows_font_dir="${with_windows_font_dir}/"
 fi
-if test -n "$windows_font_dir"; then
+if test "${windows_font_dir}x" != 'x'; then
     if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
       windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
     fi
@@ -2763,7 +2820,7 @@ if test -n "$windows_font_dir"; then
       windows_font_dir='/usr/share/fonts/msttcore/truetype/'
     fi
 fi
-if test -n "$windows_font_dir"; then
+if test "${windows_font_dir}x" != 'x'; then
   type_include_files="$type_include_files "'<include file="type-windows.xml" />'
 fi
 AC_SUBST(windows_font_dir)
@@ -2854,6 +2911,7 @@ if test "$with_frozenpaths" != 'yes'; then
   HDRDecodeDelegate="$HDRDecodeDelegateDefault"
   RLEEncodeDelegate="$RLEEncodeDelegateDefault"
   RMDelegate="$RMDelegateDefault"
+  RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
   SCANDecodeDelegate="$SCANDecodeDelegateDefault"
   ShowImageDelegate="$ShowImageDelegateDefault"
   TXTDelegate="$TXTDelegateDefault"
@@ -3152,6 +3210,12 @@ if test "$with_perl" != 'no'; then
     fi
 fi
 
+if test "$with_perl" != 'yes' ; then
+    DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
+fi
+
+PERL_SUPPORTS_DESTDIR='no'
+
 with_perl_static='no'
 with_perl_dynamic='no'
 if test "$have_perl" != 'no'; then
@@ -3162,7 +3226,7 @@ if test "$have_perl" != 'no'; then
         with_perl_dynamic='yes'
     fi
     # Is PERL's MakeMaker new enough to support DESTDIR?
-    AC_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
+    AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
 fi
 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
@@ -3268,9 +3332,9 @@ AC_SUBST(MAGICK_LIBLTDL)
 AC_SUBST(MAGICK_LTDLDEPS)
 
 if test "$with_modules" != 'no'; then
-    MAGICK_DEP_LIBS="$LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $THREAD_LIBS"
+    MAGICK_DEP_LIBS="$LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
 else
-    MAGICK_DEP_LIBS="$JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JP2_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $BZLIB_LIBS $OPENEXR_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $THREAD_LIBS"
+    MAGICK_DEP_LIBS="$JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JP2_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $BZLIB_LIBS $OPENEXR_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
 fi
 AC_SUBST(MAGICK_DEP_LIBS)
 
@@ -3332,6 +3396,11 @@ AC_OUTPUT
 
 rm -f magick-version
 
+result_dejavu_font_dir='none'
+if test "${dejavu_font_dir}x" != 'x'; then
+    result_dejavu_font_dir=$dejavu_font_dir
+fi
+
 result_ghostscript_font_dir='none'
 if test "${ghostscript_font_dir}x" != 'x'; then
     result_ghostscript_font_dir=$ghostscript_font_dir
@@ -3362,6 +3431,7 @@ High Dynamic Range Imagery
 Delegate Configuration:
 BZLIB             --with-bzlib=$with_bzlib             $have_bzlib
 Autotrace         --with-autotrace=$with_autotrace             $have_autotrace
+Dejavu fonts      --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
 DJVU              --with-djvu=$with_djvu               $have_djvu
 DPS               --with-dps=$with_dps         $have_dps
 FFTW              --with-fftw=$with_fftw               $have_fftw
@@ -3403,7 +3473,6 @@ Options used to compile and link:
   VERSION         = $PACKAGE_VERSION
   CC              = $CC
   CFLAGS          = $CFLAGS
-  MAGICK_CFLAGS   = $MAGICK_CFLAGS
   CPPFLAGS        = $MAGICK_CPPFLAGS
   PCFLAGS         = $MAGICK_PCFLAGS
   DEFS            = $DEFS