1 # Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
2 # dedicated to making software imaging solutions freely available.
4 # You may not use this file except in compliance with the License. You may
5 # obtain a copy of the License at
7 # http://www.imagemagick.org/script/license.php
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Copyright (C) 2003 - 2008 GraphicsMagick Group
19 m4_define([magick_major_version], [7])
20 m4_define([magick_minor_version], [0])
21 m4_define([magick_micro_version], [0])
22 m4_define([magick_patchlevel_version], [0])
23 m4_define([magick_version],
24 [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
25 m4_define([magick_svn_revision], esyscmd([sh -c "svnversion | sed -r 's/([0-9]+).*/\1/'"]))
27 AC_INIT([ImageMagick],[magick_version],[http://www.imagemagick.org],[ImageMagick])
28 AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
29 AC_CONFIG_AUX_DIR([config])
30 AC_CONFIG_MACRO_DIR([m4])
31 AC_CONFIG_LIBOBJ_DIR([ltdl])
32 AC_CONFIG_HEADERS([config/config.h])
33 AX_PREFIX_CONFIG_H([MagickCore/magick-config.h],[MagickCore])
35 config/configure.xml \
36 config/delegates.xml \
37 config/ImageMagick.rdf \
38 config/MagickCore.dox \
39 config/MagickWand.dox \
40 config/type-dejavu.xml \
41 config/type-ghostscript.xml \
42 config/type-windows.xml \
45 Magick++/bin/Magick++-config \
46 MagickCore/ImageMagick.pc \
47 Magick++/lib/ImageMagick++.pc \
48 Magick++/lib/Magick++.pc \
49 MagickCore/MagickCore-config \
50 MagickCore/MagickCore.pc \
51 MagickCore/version.h \
54 PerlMagick/Magick.pm \
55 PerlMagick/Makefile.PL \
59 utilities/composite.1 \
63 utilities/identify.1 \
64 utilities/ImageMagick.1 \
69 MagickWand/MagickWand-config \
70 MagickWand/MagickWand.pc ])
73 # Save initial user-tunable values
76 for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
77 eval isset=\${$var+set}
78 if test "$isset" = 'set'; then
80 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
83 AC_SUBST(DISTCHECK_CONFIG_FLAGS)
85 CONFIGURE_ARGS="$0 ${ac_configure_args}"
86 AC_SUBST(CONFIGURE_ARGS)
88 # Source file containing package/library versioning information.
89 . ${srcdir}/version.sh
91 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
96 MAGICK_TARGET_CPU=$host_cpu
97 AC_SUBST(MAGICK_TARGET_CPU)
99 MAGICK_TARGET_VENDOR=$host_vendor
100 AC_SUBST(MAGICK_TARGET_VENDOR)
102 MAGICK_TARGET_OS=$host_os
103 AC_SUBST(MAGICK_TARGET_OS)
105 # Substitute library versioning
106 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
107 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
108 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
109 AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
110 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
111 AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
112 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
113 AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision])
115 AC_SUBST(PACKAGE_NAME)dnl
116 AC_SUBST(PACKAGE_VERSION)dnl
117 AC_SUBST(PACKAGE_PERL_VERSION)dnl
118 AC_SUBST(PACKAGE_RELEASE)dnl
119 AC_SUBST(PACKAGE_CHANGE_DATE)dnl
120 AC_SUBST(PACKAGE_LIB_VERSION)dnl
121 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
122 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
123 AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
125 # Ensure that make can run correctly
128 AM_INIT_AUTOMAKE([1.11 color-tests foreign parallel-tests silent-rules subdir-objects dist-zip dist-bzip2 dist-xz])
130 # Enable support for silent build rules
131 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
133 MAGICK_LIB_VERSION="0x"
134 if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
135 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
137 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
138 if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
139 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
141 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
142 if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
143 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
145 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
146 AC_SUBST(MAGICK_LIB_VERSION)
148 # Definition used to define MagickLibVersionText in version.h
149 MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
150 AC_SUBST(MAGICK_LIB_VERSION_TEXT)
152 # Definition used to define MagickLibVersionNumber in version.h
153 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
154 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
156 # Regenerate config.status if ChangeLog or version.sh is updated.
157 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
162 MAGICK_CPPFLAGS=$CPPFLAGS_USER
163 MAGICK_PCFLAGS=$CPPFLAGS_USER
169 # Evaluate shell variable equivalents to Makefile directory variables
171 if test "x$prefix" = xNONE; then
172 prefix=$ac_default_prefix
174 # Let make expand exec_prefix.
175 if test "x$exec_prefix" = xNONE; then
176 exec_prefix='${prefix}'
180 eval "eval PREFIX_DIR=${prefix}"
182 eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
183 AC_SUBST(EXEC_PREFIX_DIR)
184 eval "eval BIN_DIR=$bindir"
186 eval "eval SBIN_DIR=$sbindir"
188 eval "eval LIBEXEC_DIR=$libexecdir"
189 AC_SUBST(LIBEXEC_DIR)
190 eval "eval DATA_DIR=$datadir"
192 eval "eval DOC_DIR=$docdir"
194 eval "eval SYSCONF_DIR=$sysconfdir"
195 AC_SUBST(SYSCONF_DIR)
196 eval "eval SHAREDSTATE_DIR=$sharedstatedir"
197 AC_SUBST(SHAREDSTATE_DIR)
198 eval "eval LOCALSTATE_DIR=$localstatedir"
199 AC_SUBST(LOCALSTATE_DIR)
200 eval "eval LIB_DIR=$libdir"
202 eval "eval INCLUDE_DIR=$includedir"
203 AC_SUBST(INCLUDE_DIR)
204 eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
205 AC_SUBST(PERSISTINCLUDE_DIR)
206 eval "eval INFO_DIR=$infodir"
208 eval "eval MAN_DIR=$mandir"
211 # Get full paths to source and build directories
212 srcdirfull="`cd $srcdir && pwd`"
216 # Compute variables useful for running uninstalled software.
218 MAGICK_CODER_MODULE_PATH="${builddir}/coders"
219 MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
220 MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
221 MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
223 case "${build_os}" in
225 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
226 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
227 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
228 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
237 AC_SUBST(MAGICK_CODER_MODULE_PATH)
238 AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
239 AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
240 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
245 # Enable OS features.
247 AC_USE_SYSTEM_EXTENSIONS
267 # Enable run-time checking.
269 AC_ARG_ENABLE([bounds-checking],
270 [AC_HELP_STRING([--bounds-checking],
271 [enable run-time bounds-checking])],
272 [enable_bounds_checking=$enableval],
273 [enable_bounds_checking='no'])
275 if test "$enable_bounds_checking" = yes; then
276 AC_DEFINE([_FORTIFY_SOURCE], [2],
277 [enable run-time bounds-checking])
288 native_win32_build='no'
296 native_win32_build='yes'
300 if test "${GDI32_LIBS}x" != 'x'; then
301 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
304 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
305 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
306 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
307 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
309 WinPathScript="${srcdirfull}/winpath.sh"
310 AC_SUBST(WinPathScript)
313 # Compiler flags tweaks
315 if test "${GCC}" != "yes"; then
318 # aCC: HP ANSI C++ B3910B A.03.34
319 CFLAGS="${CFLAGS} -Wp,-H30000"
320 if test -n "${CXXFLAGS}"; then
323 CXXFLAGS="${CXXFLAGS} -AA"
327 # Compaq alphaev68-dec-osf5.1 compiler
328 if test -n "${CXXFLAGS}"; then
329 CXXFLAGS='-std strict_ansi -noimplicit_include'
331 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
336 # Check for lazy-loading.
337 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
339 im_cv_ld_lazyload='none'
341 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
342 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
343 im_cv_ld_lazyload='-Wl,-zlazyload'
348 if test "${im_cv_ld_lazyload}" != 'none' ; then
349 if test -z "${LDFLAGS}" ; then
350 LDFLAGS="${im_cv_ld_lazyload}"
352 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
356 dnl Platform-specific stuff
358 *darwin* | *-macos10*)
359 dnl OS X universal binary support, requires --disable-dependency-tracking
360 AC_ARG_ENABLE([osx-universal-binary],
361 AC_HELP_STRING([--enable-osx-universal-binary],
362 [build universal binary on OS X [[default=no]]]),
363 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
365 if test "${build_osxuniversal}" != no ; then
366 if test "$enable_dependency_tracking" != no ; then
367 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
368 Please re-run configure with these options:
369 --disable-dependency-tracking --enable-osx-universal-binary
372 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
373 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
374 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
380 # ARCH specific include directory
382 AC_ARG_WITH([includedir-arch],
383 [AC_HELP_STRING([--includedir-arch=DIR],
384 [ARCH specific include directory])],
385 [includedir_arch=$withval],
386 [includedir_arch=$INCLUDE_DIR])
388 AC_DEFINE_UNQUOTED(INCLUDEDIR_ARCH,"$includedir_arch",[ARCH specific include directory])
389 INCLUDEDIR_ARCH="$includedir_arch"
390 AC_SUBST(INCLUDEDIR_ARCH)
393 # ARCH specific configuration directory
395 AC_ARG_WITH([configdir-arch],
396 [AC_HELP_STRING([--configdir-arch=DIR],
397 [ARCH specific config directory])],
398 [configdir_arch=$withval],
399 [configdir_arch="${LIB_DIR}/${PACKAGE_NAME}-${PACKAGE_VERSION}"])
401 AC_DEFINE_UNQUOTED(CONFIGDIR_ARCH,"$configdir_arch",[ARCH specific config directory])
402 CONFIGDIR_ARCH="$configdir_arch"
403 AC_SUBST(CONFIGDIR_ARCH)
406 # Enable support for threads
407 AC_ARG_WITH([threads],
408 [AC_HELP_STRING([--without-threads], [disable threads support])],
409 [with_threads=$withval],
410 [with_threads='yes'])
413 if test "$with_threads" != 'no'; then
415 if test "$ax_pthread_ok" = yes; then
417 DEF_THREAD="$PTHREAD_CFLAGS"
418 CFLAGS="$CFLAGS $DEF_THREAD"
419 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
420 if test "$CC" != "$PTHREAD_CC"; then
421 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
424 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
428 # Enable support for OpenMP
429 if test "$have_threads" != 'yes'; then
430 ac_cv_prog_c_openmp=unsupported
433 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
434 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
435 AC_SUBST(OPENMP_CFLAGS)
436 if test "$enable_openmp" != no; then
437 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
438 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
442 # Enable support for OpenCL
444 CFLAGS="$CL_CFLAGS $CFLAGS"
445 LIBS="$CL_LIBS $LIBS"
447 if test "$enable_opencl" != no; then
448 if test "X$ax_cv_check_cl_libcl" != Xno; then :
449 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
455 # Check for large file support
461 if test "$enable_largefile" != no; then
462 case $ac_cv_sys_file_offset_bits in
464 # nothing to do here as the host supports LFS fine
467 AC_MSG_CHECKING([for native large file support])
468 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
470 exit(!(sizeof(off_t) == 8));
472 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
473 AC_MSG_NOTICE([yes])],
474 [AC_MSG_NOTICE([no])])
477 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
480 if test "$ac_cv_sys_large_files" != 'no'; then
481 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
483 if test "$ac_cv_sys_largefile_source" != 'no'; then
484 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
487 AC_SUBST(LFS_CPPFLAGS)
493 AC_SUBST(LIBTOOL_DEPS)
496 LT_CONFIG_LTDL_DIR([ltdl])
497 LTDL_INIT([convenience nonrecursive])
499 # Check to see if building shared libraries
500 libtool_build_shared_libs='no'
501 if test "$enable_shared" = 'yes'; then
502 libtool_build_shared_libs='yes'
505 # Check to see if building static libraries
506 libtool_build_static_libs='no'
507 if test "$enable_static" = 'yes'; then
508 libtool_build_static_libs='yes'
511 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
513 # Enable support for building loadable modules
515 AC_ARG_WITH([modules],
516 [AC_HELP_STRING([--with-modules],
517 [enable building dynamically loadable modules])],
518 [with_modules=$withval],
521 # Only allow building loadable modules if we are building shared libraries
522 if test "$with_modules" != 'no' ; then
523 if test "$libtool_build_shared_libs" = 'no'; then
524 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
528 if test "$with_modules" != 'no'; then
529 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
531 AM_CONDITIONAL(WITH_MODULES, test "$with_modules" != 'no')
533 # Enable building/use of libltdl if we are building shared libraries regardless
534 # of whether modules are built or not.
536 if test "$libtool_build_shared_libs" != 'no'; then
540 AM_CONDITIONAL(WITH_LTDL, test "$with_ltdl" != 'no')
541 if test "$with_ltdl" != 'no'; then
542 AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules)
545 if test X"$enable_shared" = Xyes; then
546 DLLDFLAGS=-export-dynamic
551 # Enable build using delegate libraries built in subdirectories rather than installed
552 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
553 AC_ARG_ENABLE([delegate-build],
554 [AC_HELP_STRING([--enable-delegate-build],
555 [look for delegate libraries in build directory])],
556 [enable_delegate_build=$enableval],
557 [enable_delegate_build='no'])
559 AC_ARG_ENABLE([deprecated],
560 [AC_HELP_STRING([--disable-deprecated],
561 [exclude deprecated methods in MagickCore and MagickWand API's])],
562 [enable_deprecated=$enableval],
563 [enable_deprecated='no'])
565 if test "$enable_deprecated" = 'yes'; then
566 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
568 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
571 # Build a version of ImageMagick which operates uninstalled.
572 # Used to build distributions located via MAGICK_HOME / executable path
573 AC_ARG_ENABLE([installed],
574 [AC_HELP_STRING([--disable-installed],
575 [Formally install ImageMagick under PREFIX])],
576 [enable_installed=$enableval],
577 [enable_installed='yes'])
579 if test "$enable_installed" = 'yes'; then
580 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
582 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
585 # Permit enciphering and deciphering image pixels.
586 AC_ARG_ENABLE([cipher],
587 [AC_HELP_STRING([--disable-cipher],
588 [disable enciphering and deciphering image pixels])],
589 [enable_cipher=$enableval],
590 [enable_cipher='yes'])
592 if test "$enable_cipher" = 'yes'; then
593 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
596 # Build a zero-configuration version of ImageMagick.
597 AC_ARG_ENABLE([zero-configuration],
598 [AC_HELP_STRING([--enable-zero-configuration],
599 [enable self-contained, embeddable, zero-configuration ImageMagick])],
600 [enable_zero_configuration=$enableval],
601 [enable_zero_configuration='no'])
603 if test "$enable_zero_configuration" = 'yes'; then
604 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
605 MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES"
608 # Build a high dynamic range version of ImageMagick.
609 AC_ARG_ENABLE([hdri],
610 [AC_HELP_STRING([--enable-hdri],
611 [accurately represent the wide range of intensity levels found in real scenes])],
612 [enable_hdri=$enableval],
616 if test "$enable_hdri" = 'yes'; then
618 AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
619 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
621 AC_SUBST(MAGICK_HDRI)dnl
623 # Build a version of ImageMagick with assert statements.
624 AC_ARG_ENABLE([assert],
625 [AC_HELP_STRING([--disable-assert],
626 [disable assert() statements in build])],
627 [enable_assert=$enableval],
628 [enable_assert='yes'])
630 if test "$enable_assert" = 'no'; then
631 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
634 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
637 # Enable ccmalloc memory debugging support
638 AC_ARG_ENABLE([ccmalloc],
639 [AC_HELP_STRING([--enable-ccmalloc],
640 [enable 'ccmalloc' memory debug support])],
641 [enable_ccmalloc=$enableval],
642 [enable_ccmalloc='no'])
644 # Enable Electric Fence memory debugging support
645 AC_ARG_ENABLE([efence],
646 [AC_HELP_STRING([--enable-efence],
647 [enable 'efence' memory debug support])],
648 [enable_efence=$enableval],
649 [enable_efence='no'])
651 # Enable prof-based profiling support
652 AC_ARG_ENABLE([prof],
653 [AC_HELP_STRING([--enable-prof],
654 [enable 'prof' profiling support])],
655 [enable_prof=$enableval],
658 # Enable gprof-based profiling support
659 AC_ARG_ENABLE([gprof],
660 [AC_HELP_STRING([--enable-gprof],
661 [enable 'gprof' profiling support])],
662 [enable_gprof=$enableval],
665 # Enable gcov-based profiling support
666 AC_ARG_ENABLE([gcov],
667 [AC_HELP_STRING([--enable-gcov],
668 [enable 'gcov' profiling support])],
669 [enable_gcov=$enableval],
672 enable_profiling='no'
673 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
674 enable_profiling='yes'
675 if test "$libtool_build_shared_libs" = 'yes'; then
676 echo "Warning: Can not profile code using shared libraries"
680 # Magick API method prefix
681 AC_ARG_WITH([method-prefix],
682 [AC_HELP_STRING([--with-method-prefix=PREFIX],
683 [prefix MagickCore API methods])],
684 [with_method_prefix=$enableval],
685 [with_method_prefix=''])
687 if test "$with_method_prefix" != ''; then
688 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
691 # Number of bits in a Quantum
692 AC_ARG_WITH([quantum-depth],
693 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
694 [number of bits in a pixel quantum (default 16)])],
695 [with_quantum_depth=$withval],
696 [with_quantum_depth=16])
698 if test "$with_quantum_depth" != '8'; then
699 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
702 case "${with_quantum_depth}" in
707 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
709 QUANTUM_DEPTH="$with_quantum_depth"
710 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
711 AC_SUBST(QUANTUM_DEPTH)dnl
713 # Set pixel cache threshold
715 [AC_HELP_STRING([--with-cache=THRESHOLD],
716 [set pixel cache threshhold in MB (default available memory)])],
717 [with_cache=$withval],
720 if test "$with_cache" != ''; then
721 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
722 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
725 # Disable/Enable support for full delegate paths
726 AC_ARG_WITH([frozenpaths],
727 [AC_HELP_STRING([--with-frozenpaths],
728 [freeze delegate paths])],
729 [with_frozenpaths=$withval],
730 [with_frozenpaths='no'])
732 # Enable build/install of Magick++
733 AC_ARG_WITH([magick-plus-plus],
734 [AC_HELP_STRING([--without-magick-plus-plus],
735 [disable build/install of Magick++])],
736 [with_magick_plus_plus=$withval],
737 [with_magick_plus_plus='yes'])
739 # Disable build/install of PerlMagick.
741 [AC_HELP_STRING([--with-perl],
742 [enable build/install of PerlMagick])],
743 [with_perl=$withval],
746 # Options to pass when configuring PerlMagick
747 AC_ARG_WITH([perl-options],
748 [AC_HELP_STRING([--with-perl-options=OPTIONS],
749 [options to pass on command-line when generating PerlMagick's build file])],
750 PERL_MAKE_OPTIONS=$withval)
751 AC_SUBST(PERL_MAKE_OPTIONS)
753 # Enable umem, object-caching memory allocation library.
755 [ --with-umem enable umem memory allocation library support],
756 [with_umem=$withval],
758 if test "$with_umem" != 'yes' ; then
759 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
763 # Specify path to shared libstdc++ if not in normal location
765 AC_ARG_WITH([libstdc],
766 [AC_HELP_STRING([--with-libstdc=DIR],
767 [ use libstdc++ in DIR (for GNU C++)])],
768 [with_libstdc=$withval],
771 if test "$with_libstdc" != ''; then
772 if test -d "$with_libstdc"; then
773 LIBSTDCLDFLAGS="-L$with_libstdc"
776 AC_SUBST(LIBSTDCLDFLAGS)
778 # Does gcc required -traditional?
779 AC_PROG_GCC_TRADITIONAL
783 # Set defines required to build DLLs and modules using MinGW
786 # These options are set for multi-thread DLL module build
787 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
789 # executable/Magick++: _DLL _MAGICKMOD_
790 MODULE_EXTRA_CPPFLAGS=''
791 LIBRARY_EXTRA_CPPFLAGS=''
792 if test "${native_win32_build}" = 'yes'; then
793 if test "${libtool_build_shared_libs}" = 'yes'; then
794 CPPFLAGS="$CPPFLAGS -D_DLL"
795 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
796 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
797 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
798 if test "$with_modules" = 'yes'; then
799 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
801 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
804 CPPFLAGS="$CPPFLAGS -D_LIB"
805 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
806 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
808 if test "$with_threads" = 'yes'; then
809 CPPFLAGS="$CPPFLAGS -D_MT"
810 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
811 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
814 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
815 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
817 # Check standard headers
819 if ! test x"$ac_cv_header_stdc" = x"yes"; then
820 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
821 header files. Compilation cannot proceed. Please install the ANSI C
822 headers and rerun this script.]);
827 # Check additional headers
828 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 xlocale.h)
832 # Checks for typedefs, structures, and compiler characteristics.
845 # If the C compiler supports the keyword inline, do nothing. Otherwise
846 # define inline to __inline__ or __inline if it accepts one of those,
847 # otherwise define inline to be empty.
850 # If the C compiler supports the keyword restrict, do nothing. Otherwise
851 # define restrict to __restrict__ or __restrict if it accepts one of those,
852 # otherwise define restrict to be empty.
855 # If words are stored with the most significant byte first (like
856 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
859 # Define to a suitable type, if standard headers do not define it.
867 AC_TYPE_LONG_DOUBLE_WIDER
868 AC_TYPE_LONG_LONG_INT
882 AC_TYPE_UNSIGNED_LONG_LONG_INT
884 # If the C type char is unsigned, define __CHAR_UNSIGNED__, unless the
885 # C compiler predefines it.
888 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
889 AC_CHECK_SIZEOF(signed short)
891 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
892 AC_CHECK_SIZEOF(unsigned short)
894 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
895 AC_CHECK_SIZEOF(signed int)
897 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
898 AC_CHECK_SIZEOF(unsigned int)
900 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
901 AC_CHECK_SIZEOF(signed long)
903 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
904 AC_CHECK_SIZEOF(unsigned long)
906 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
907 # 'signed long long' is not supported then the value defined is zero.
908 AC_CHECK_SIZEOF(signed long long)
910 # Obtain size of a 'unsigned long long' and define as
911 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
912 # supported then the value defined is zero.
913 AC_CHECK_SIZEOF(unsigned long long)
915 # Obtain size of off_t and define as SIZEOF_OFF_T
916 AC_CHECK_SIZEOF(off_t)
918 # Obtain size of size_t and define as SIZEOF_SIZE_T
919 AC_CHECK_SIZEOF(size_t)
921 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
922 AC_CHECK_SIZEOF(ssize_t)
924 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
925 AC_CHECK_SIZEOF(unsigned int*)
928 # Compute sized types for current CPU and compiler options.
931 AC_MSG_CHECKING(for signed 8-bit type)
933 AC_MSG_NOTICE($INT8_T)
936 AC_MSG_CHECKING(for unsigned 8-bit type)
937 UINT8_T='unsigned char'
938 AC_MSG_NOTICE($UINT8_T)
941 AC_MSG_CHECKING(for signed 16-bit type)
942 INT16_T='signed short'
943 AC_MSG_NOTICE($INT16_T)
946 AC_MSG_CHECKING(for unsigned 16-bit type)
947 UINT16_T='unsigned short'
948 AC_MSG_NOTICE($UINT16_T)
951 AC_MSG_CHECKING(for signed 32-bit type)
954 if test $ac_cv_sizeof_signed_int -eq 4; then
957 elif test $ac_cv_sizeof_signed_long -eq 4; then
958 INT32_T='signed long'
961 AC_MSG_NOTICE($INT32_T)
965 AC_MSG_CHECKING(for unsigned 32-bit type)
968 if test $ac_cv_sizeof_unsigned_int -eq 4; then
969 UINT32_T='unsigned int'
971 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
972 UINT32_T='unsigned long'
975 AC_MSG_NOTICE($UINT32_T)
979 AC_MSG_CHECKING(for signed 64-bit type)
982 if test $ac_cv_sizeof_signed_long -eq 8; then
983 INT64_T='signed long'
985 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
986 INT64_T='signed long long'
989 case "${build_os}" in
994 AC_MSG_NOTICE($INT64_T)
998 AC_MSG_CHECKING(for unsigned 64-bit type)
1001 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1002 UINT64_T='unsigned long'
1004 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1005 UINT64_T='unsigned long long'
1008 case "${build_os}" in
1013 AC_MSG_NOTICE($UINT64_T)
1017 AC_MSG_CHECKING(for unsigned maximum type)
1020 if test "$UINT64_T" != 'none'; then
1023 elif test "$UINT32_T" != 'none'; then
1027 AC_MSG_NOTICE($UINTMAX_T)
1031 AC_MSG_CHECKING(for pointer difference type)
1034 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1035 UINTPTR_T='unsigned long'
1037 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1038 UINTPTR_T='unsigned long long'
1041 AC_MSG_NOTICE($UINTPTR_T)
1045 AC_MSG_CHECKING([whether our compiler supports __func__])
1047 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1048 AC_MSG_NOTICE([yes]),
1050 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1052 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1053 AC_MSG_NOTICE([yes])
1054 AC_DEFINE(__func__, __FUNCTION__,
1055 [Define to appropriate substitue if compiler does not have __func__]),
1057 AC_DEFINE(__func__, __FILE__,
1058 [Define to appropriate substitue if compiler does not have __func__])))
1062 # Check for functions
1065 MAGICK_FUNC_MMAP_FILEIO
1066 AC_FUNC_CLOSEDIR_VOID
1070 AC_FUNC_SELECT_ARGTYPES
1071 AC_FUNC_SETVBUF_REVERSED
1081 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1082 LIBS="$MATH_LIBS $LIBS"
1085 AC_CHECK_FUNCS([acosh asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
1088 # Check for clock_gettime().
1090 AC_SEARCH_LIBS(clock_gettime, rt,
1092 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1093 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1096 [[#include <time.h>]],
1097 [[clockid_t clockType = CLOCK_REALTIME;]])],
1100 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1101 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1107 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1113 # Check for function prototypes
1117 AC_CHECK_DECLS([pread, pwrite],[],[],[
1118 #include <unistd.h>])
1120 AC_CHECK_DECLS([strlcpy],[],[],[
1121 #include <strings.h>])
1123 AC_CHECK_DECLS([vsnprintf],[],[],[
1125 #include <stdarg.h>])
1129 # C++ Support Tests (For Magick++)
1132 have_magick_plus_plus='no'
1133 if test "$with_magick_plus_plus" = 'yes'; then
1138 # Full set of headers used...
1139 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1140 # functional iomanip iosfwd iostream iterator list string strstream utility
1145 AX_CXX_NAMESPACE_STD
1146 AC_CXX_HAVE_STD_LIBS
1150 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1152 test $ax_cv_cxx_bool = 'yes' && \
1153 test $ax_cv_cxx_namespaces = 'yes' && \
1154 test $ac_cv_cxx_have_std_libs = 'yes' && \
1155 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1156 have_magick_plus_plus='yes'
1158 have_magick_plus_plus='no (failed tests)'
1160 AC_MSG_NOTICE([$have_magick_plus_plus])
1163 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1165 # Only check for delegate libraries in subdirectories if requested.
1166 if test "$enable_delegate_build" != 'no'; then
1167 # Check for delegate sub-directories and add -I & -L options as required.
1168 # This presumes that delegates are installed as detailed in the ImageMagick
1169 # README. If delegates are installed in a standard location where the
1170 # compiler will automatically find them then these options should not be
1174 # Most delegates have includes in the same directory as the library, but not all...
1177 for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper/include jbig/libjbig jpeg lcms/include lzma magick png tiff/libtiff ttf/include wand wmf/include xml/include zlib; do
1178 if test -d "$builddir/$dir"; then
1179 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1181 if test -d "$srcdirfull/$dir"; then
1182 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1188 for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src lzma magick png tiff/libtiff ttf/objs wand wmf/src xml zlib; do
1189 if test -d "$builddir/$dir/.libs"; then
1190 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1192 if test -d "$srcdirfull/$dir/.libs"; then
1193 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1196 if test -d "$builddir/$dir"; then
1197 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1199 if test -d "$srcdirfull/$dir"; then
1200 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1206 # Assume that delegate headers reside under same directory as ImageMagick
1207 # installation prefix.
1208 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/ImageMagick $MAGICK_CPPFLAGS"
1211 # Find the X11 RGB database
1213 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1214 [# Look for the header file in a standard set of common directories.
1215 # Check X11 before X11Rn because it is often a symlink to the current release.
1224 /usr/XFree86/lib/X11 \
1232 /usr/local/X11/lib \
1233 /usr/local/X11R4/lib \
1234 /usr/local/X11R5/lib \
1235 /usr/local/X11R6/lib \
1237 /usr/local/lib/X11 \
1238 /usr/local/lib/X11R4 \
1239 /usr/local/lib/X11R5 \
1240 /usr/local/lib/X11R6 \
1241 /usr/local/lib/X11R7 \
1242 /usr/local/x11r5/lib \
1243 /usr/lpp/Xamples/lib \
1245 /usr/openwin/share/lib \
1246 /usr/unsupported/lib \
1249 if test -f "$ac_dir/X11/rgb.txt"; then
1250 im_cv_x_configure="$ac_dir/X11/"
1252 elif test -f "$ac_dir/rgb.txt"; then
1253 im_cv_x_configure="$ac_dir/"
1258 X11_CONFIGURE_PATH="$im_cv_x_configure"
1259 case "${build_os}" in
1261 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1264 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",Location of X11 configure files)
1267 # Find OpenMP library
1270 if test "$enable_openmp" != 'no'; then
1271 if test "${GCC}" = "yes"; then
1272 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,) # gcc
1274 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,) # solaris cc
1275 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,) # AIX xlc
1276 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,) # SGI IRIX 6.5 MIPSpro C/C++
1278 LIBS="$GOMP_LIBS $LIBS"
1283 # Find Posix threads library
1286 if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then
1288 if test "x$PTHREAD_LIBS" = "x"; then
1289 case "${host_cpu}-${host_os}" in
1291 MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;;
1295 for lib in pthread pthreads; do
1296 if test "x$PTHREAD_LIBS" = "x"; then
1297 MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib])
1301 THREAD_LIBS="$PTHREAD_LIBS"
1302 LIBS="$LIBS $THREAD_LIBS"
1304 AC_SUBST(THREAD_LIBS)
1311 if test "$with_umem" != 'no'; then
1312 AC_MSG_CHECKING(for UMEM support )
1316 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1317 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1318 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1319 AC_MSG_CHECKING(if umem memory allocation library is complete)
1320 if test $passed -gt 0; then
1321 if test $failed -gt 0; then
1322 AC_MSG_NOTICE(no -- some components failed test)
1323 have_umem='no (failed tests)'
1326 LIBS="$UMEM_LIBS $LIBS"
1327 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1335 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1339 # Add support for ccmalloc memory debugging library if requested
1343 if test "$enable_ccmalloc" = 'yes'; then
1344 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1345 if test -n "$CCMALLOCDelegate"; then
1346 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1348 # Assume that gcc is used with ccmalloc.
1349 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1350 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1351 if test -n "$CCMALLOC_LIBS"; then
1353 LIBS="$LIBS $CCMALLOC_LIBS"
1362 # Add support for efence memory debugging library if requested
1364 if test "$enable_efence" = 'yes'; then
1365 EFENCE_LIBS='-lefence'
1366 LIBS="$EFENCE_LIBS $LIBS"
1369 dnl ===========================================================================
1375 AC_ARG_WITH([bzlib],
1376 [AC_HELP_STRING([--without-bzlib],
1377 [disable BZLIB support])],
1378 [with_bzlib=$withval],
1381 if test "$with_bzlib" != 'yes'; then
1382 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1386 if test "$with_bzlib" != 'no'; then
1388 AC_MSG_NOTICE([-------------------------------------------------------------])
1389 AC_MSG_CHECKING([for BZLIB])
1394 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1395 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1396 if test "$native_win32_build" = 'yes'; then
1397 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1399 if test $found_libbz -gt 0; then
1400 passed=`expr $passed + 1`
1402 failed=`expr $failed + 1`
1404 AC_MSG_CHECKING(if BZLIB package is complete)
1405 if test $passed -gt 0; then
1406 if test $failed -gt 0; then
1407 AC_MSG_NOTICE(no -- some components failed test)
1408 have_bzlib='no (failed tests)'
1411 LIBS="$BZLIB_LIBS $LIBS"
1412 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1420 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1421 AC_SUBST(BZLIB_LIBS)
1424 # Find the X11 include and library directories.
1431 if test "$no_x" != 'yes'; then
1432 AC_MSG_NOTICE([-------------------------------------------------------------])
1433 AC_MSG_CHECKING([for X11])
1435 LDFLAGS="$LDFLAGS $X_LIBS"
1436 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1437 LIBS="$X11_LIBS $LIBS"
1438 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1440 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1443 # Check for X11 shared memory extension
1445 # shmctl is required to support the shared memory extension
1446 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1447 if test "$have_shmctl" != 'yes'; then
1449 LIBS="$LIBS -lcygipc"
1450 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1454 if test "$have_shmctl" = 'yes'; then
1455 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1459 # Check for X11 shape extension
1461 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1462 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1463 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1465 if test "$no_x" != 'yes'; then
1470 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1474 dnl ===========================================================================
1480 [AC_HELP_STRING([--without-zlib],
1481 [disable ZLIB support])],
1482 [with_zlib=$withval],
1485 if test "$with_zlib" != 'yes'; then
1486 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1491 dnl PNG requires zlib so enable zlib check if PNG is requested
1492 if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
1493 AC_MSG_NOTICE([-------------------------------------------------------------])
1494 AC_MSG_CHECKING([for ZLIB])
1499 AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1500 AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1501 AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1502 AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1503 AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1504 AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1505 AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1506 AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1507 AC_MSG_CHECKING([if ZLIB package is complete])
1508 if test $passed -gt 0; then
1509 if test $failed -gt 0; then
1510 AC_MSG_NOTICE([no -- some components failed test])
1511 have_zlib='no (failed tests)'
1514 LIBS="$ZLIB_LIBS $LIBS"
1515 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
1516 AC_MSG_NOTICE([yes])
1523 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1527 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1530 if test "$enable_profiling" = 'yes'; then
1531 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1532 LIBS="$LIB_DL $LIBS"
1536 dnl ===========================================================================
1539 # Check for Autotrace delegate library.
1541 AC_ARG_WITH([autotrace],
1542 [AC_HELP_STRING([--with-autotrace],
1543 [enable autotrace support])],
1544 [with_autotrace=$withval],
1545 [with_autotrace='no'])
1547 if test "$with_autotrace" != 'yes'; then
1548 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1555 if test "x$with_autotrace" = "xyes"; then
1556 AC_MSG_NOTICE([-------------------------------------------------------------])
1557 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1561 if test "$have_autotrace" = 'yes'; then
1563 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1564 if test "$with_modules" = 'no'; then
1565 CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
1569 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1570 AC_SUBST(AUTOTRACE_CFLAGS)
1571 AC_SUBST(AUTOTRACE_LIBS)
1573 dnl ===========================================================================
1576 # Check for Display Postscript delegate library.
1579 [AC_HELP_STRING([--without-dps],
1580 [disable Display Postscript support])],
1581 [with_dps=$withval],
1584 if test "$with_dps" != 'yes'; then
1585 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1590 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1591 AC_MSG_NOTICE([-------------------------------------------------------------])
1592 AC_MSG_CHECKING([for DPS])
1596 PERSIST_CPPFLAGS="$CPPFLAGS"
1597 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1598 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1600 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1601 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1602 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1603 # ImageMagick itself doesn't use -lXt.
1606 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1607 if test "$have_libdps" != 'yes'; then
1608 # Unset cache variable so we can try again.
1609 unset ac_cv_lib_dps_DPSInitialize
1610 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1611 if test "$have_libdps" = 'yes'; then
1615 if test "$have_libdps" = 'yes'; then
1616 passed=`expr $passed + 1`
1618 failed=`expr $failed + 1`
1620 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1621 AC_MSG_CHECKING([if DPS package is complete])
1622 if test $passed -gt 0; then
1623 if test $failed -gt 0; then
1624 AC_MSG_NOTICE([no -- some components failed test])
1625 have_dps='no (failed tests)'
1626 CPPFLAGS="$PERSIST_CPPFLAGS"
1628 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1629 LIBS="$DPS_LIBS $LIBS"
1630 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1631 AC_MSG_NOTICE([yes])
1636 CPPFLAGS=$PERSIST_CPPFLAGS
1639 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1642 dnl ===========================================================================
1645 # Check for DJVU delegate library.
1648 [AC_HELP_STRING([--without-djvu],
1649 [disable DjVu support])],
1650 [with_djvu=$withval],
1653 if test "$with_djvu" != 'yes'; then
1654 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1659 if test "$with_djvu" != 'no'; then
1660 AC_MSG_NOTICE([-------------------------------------------------------------])
1661 AC_MSG_CHECKING([for DJVU])
1665 AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1666 AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1667 AC_MSG_CHECKING([if DJVU package is complete])
1668 if test $passed -gt 0; then
1669 if test $failed -gt 0; then
1670 AC_MSG_NOTICE([no -- some components failed test])
1671 have_djvu='no (failed tests)'
1673 DJVU_LIBS='-ldjvulibre'
1674 LIBS="$DJVU_LIBS $LIBS"
1675 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1676 AC_MSG_NOTICE([yes])
1683 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1686 dnl ===========================================================================
1689 # Set DejaVu font directory.
1691 AC_ARG_WITH([dejavu-font-dir],
1692 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1693 [DejaVu font directory])],
1694 [with_dejavu_font_dir=$withval],
1695 [with_dejavu_font_dir='default'])
1697 if test "$with_dejavu_font_dir" != 'default'; then
1698 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1701 dnl ===========================================================================
1704 # Check for FFTW delegate library.
1707 [AC_HELP_STRING([--without-fftw],
1708 [disable FFTW support])],
1709 [with_fftw=$withval],
1712 if test "$with_fftw" != 'yes'; then
1713 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1718 if test "$with_fftw" != 'no'; then
1719 AC_MSG_NOTICE([-------------------------------------------------------------])
1720 AC_MSG_CHECKING([for FFTW])
1724 AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1725 AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1726 AC_MSG_CHECKING([if FFTW package is complete])
1727 if test $passed -gt 0; then
1728 if test $failed -gt 0; then
1729 AC_MSG_NOTICE([no -- some components failed test])
1730 have_fftw='no (failed tests)'
1733 LIBS="$FFTW_LIBS $LIBS"
1734 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1735 AC_MSG_NOTICE([yes])
1742 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1745 dnl ===========================================================================
1748 # Check for FlashPIX delegate library.
1751 [AC_HELP_STRING([--without-fpx],
1752 [disable FlashPIX support])],
1753 [with_fpx=$withval],
1756 if test "$with_fpx" != 'yes'; then
1757 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1762 if test "$with_fpx" != 'no'; then
1763 AC_MSG_NOTICE([-------------------------------------------------------------])
1764 AC_MSG_CHECKING([for FlashPIX])
1769 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1770 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1772 AC_MSG_CHECKING([if FlashPIX package is complete])
1773 if test $passed -gt 0; then
1774 if test $failed -gt 0; then
1775 AC_MSG_NOTICE([no -- some components failed test])
1776 have_fpx='no (failed tests)'
1779 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1780 AC_MSG_NOTICE([yes])
1788 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1791 dnl ===========================================================================
1794 # Check for fontconfig delegate library.
1796 AC_ARG_WITH([fontconfig],
1797 [AC_HELP_STRING([--without-fontconfig],
1798 [disable fontconfig support])],
1799 [with_fontconfig=$withval],
1800 [with_fontconfig=$have_x])
1802 if test "$with_fontconfig" != 'yes'; then
1803 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
1806 have_fontconfig='no'
1807 FONTCONFIG_CFLAGS=""
1810 if test "x$with_fontconfig" = "xyes"; then
1811 AC_MSG_NOTICE([-------------------------------------------------------------])
1812 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
1816 if test "$have_fontconfig" = 'yes'; then
1817 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
1818 if test "$with_modules" = 'no'; then
1819 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1823 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
1824 AC_SUBST(FONTCONFIG_CFLAGS)
1825 AC_SUBST(FONTCONFIG_LIBS)
1827 dnl ===========================================================================
1830 # Check for freetype delegate library.
1832 AC_ARG_WITH([freetype],
1833 [AC_HELP_STRING([--without-freetype],
1834 [disable Freetype support])],
1835 [with_freetype=$withval],
1836 [with_freetype='yes'])
1839 if test "$with_freetype" != 'yes'; then
1840 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
1845 if test "$with_freetype" != 'no'; then
1846 AC_MSG_NOTICE([-------------------------------------------------------------])
1847 AC_MSG_CHECKING(for FreeType 2.0 )
1851 PERSIST_LDFLAGS="$LDFLAGS"
1852 PERSIST_CPPFLAGS="$CPPFLAGS"
1854 # Allow the user to specify the location of freetype.
1855 if test "$with_freetype" != 'yes'; then
1856 if test -x "${with_freetype}/bin/freetype-config"; then
1857 freetype_config="${with_freetype}/bin/freetype-config"
1858 elif test -x "${with_freetype}"; then
1859 freetype_config=${with_freetype}
1862 if test -z "$freetype_config"; then
1863 AC_PATH_PROG(freetype_config,freetype-config,)dnl
1865 if test -n "$freetype_config"; then
1866 freetype_prefix=`${freetype_config} --prefix`
1867 freetype_exec_prefix=`${freetype_config} --exec-prefix`
1868 LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
1869 CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
1872 dnl First see if there is a library
1873 if test "$FREETYPE_LIBS" = ''; then
1874 AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,)
1875 if test "$FREETYPE_LIBS" != ''; then
1876 passed=`expr $passed + 1`
1878 failed=`expr $failed + 1`
1879 LDFLAGS="$PERSIST_LDFLAGS"
1883 dnl Now test for the headers
1884 AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include <ft2build.h>'],[ft2build=''],[])
1885 AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H])
1886 if test "$have_freetype_h" = 'yes'; then
1887 passed=`expr $passed + 1`
1889 failed=`expr $failed + 1`
1890 CPPFLAGS="$PERSIST_CPPFLAGS"
1893 AC_MSG_CHECKING(if FreeType package is complete)
1894 if test $passed -gt 0; then
1895 if test $failed -gt 0; then
1897 AC_MSG_NOTICE(no -- some components failed test)
1898 have_freetype='no (failed tests)'
1900 LIBS="$FREETYPE_LIBS $LIBS"
1901 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library)
1902 if test "$ac_cv_header_ft2build_h" = 'yes'; then
1903 AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the <ft2build.h> header file.])
1912 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
1913 AC_SUBST(FREETYPE_LIBS)
1915 dnl ===========================================================================
1918 # Check for Ghostscript library or framework.
1920 # Test for iapi.h & test for gsapi_new_instance in -lgs
1921 # or -framework Ghostscript
1923 AC_ARG_WITH([gslib],
1924 [AC_HELP_STRING([--without-gslib],
1925 [enable Ghostscript library support])],
1926 [with_gslib=$withval],
1929 gslib_framework='no'
1930 if test "$with_gslib" != 'yes'; then
1931 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
1936 if test "$with_gslib" != 'no'; then
1937 AC_MSG_NOTICE([-------------------------------------------------------------])
1938 AC_MSG_CHECKING([for Ghostscript])
1943 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
1944 failed=`expr $failed + 1`,)
1945 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
1946 failed=`expr $failed + 1`,)
1947 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
1948 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
1949 AC_MSG_CHECKING([if Ghostscript package is complete])
1950 if test $passed -gt 0; then
1951 if test $failed -gt 0; then
1952 AC_MSG_NOTICE([no -- some components failed test])
1953 have_gslib='no (failed tests)'
1955 if test $framework -gt 0; then
1956 GS_LIBS='-framework Ghostscript'
1957 gslib_framework='yes'
1958 AC_MSG_NOTICE([yes, using framework.])
1960 AC_MSG_NOTICE([yes, using library.])
1963 LIBS="$GS_LIBS $LIBS"
1964 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
1971 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
1974 # Set default font search path
1975 AC_ARG_WITH([fontpath],
1976 [AC_HELP_STRING([--with-fontpath=DIR],
1977 [prepend to default font search path])],
1978 [with_fontpath=$withval],
1981 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
1984 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",Define to prepend to default font search path.)
1986 if test "$with_fontpath=" != ''; then
1987 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
1990 # Set Ghostscript font directory
1991 AC_ARG_WITH([gs-font-dir],
1992 [AC_HELP_STRING([--with-gs-font-dir=DIR],
1993 [Ghostscript font directory])],
1994 [with_gs_font_dir=$withval],
1995 [with_gs_font_dir='default'])
1997 if test "$with_gs_font_dir" != 'default'; then
1998 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2001 dnl ===========================================================================
2004 # Check for GVC delegate library.
2007 [AC_HELP_STRING([--without-gvc],
2008 [disable GVC support])],
2009 [with_gvc=$withval],
2012 if test "$with_gvc" != 'yes'; then
2013 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2017 if test "x$with_gvc" = "xyes"; then
2018 AC_MSG_NOTICE([-------------------------------------------------------------])
2019 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2023 if test "$have_gvc" = 'yes'; then
2024 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2025 if test "$with_modules" = 'no'; then
2026 CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
2030 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2031 AC_SUBST(GVC_CFLAGS)
2034 dnl ===========================================================================
2037 # Check for JBIG delegate library.
2041 [AC_HELP_STRING([--without-jbig],
2042 [disable JBIG support])],
2043 [with_jbig=$withval],
2048 if test "$with_jbig" != 'no'; then
2049 AC_MSG_NOTICE([-------------------------------------------------------------])
2050 AC_MSG_CHECKING([for JBIG])
2054 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2055 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2056 AC_MSG_CHECKING([if JBIG package is complete])
2057 if test $passed -gt 0; then
2058 if test $failed -gt 0; then
2059 AC_MSG_NOTICE([no -- some components failed test])
2060 have_jbig='no (failed tests)'
2063 LIBS="$JBIG_LIBS $LIBS"
2064 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2065 AC_MSG_NOTICE([yes])
2072 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2075 dnl ===========================================================================
2078 # Check for JPEG delegate library.
2081 [AC_HELP_STRING([--without-jpeg],
2082 [disable JPEG support])],
2083 [with_jpeg=$withval],
2086 if test "$with_jpeg" != 'yes'; then
2087 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2092 if test "$with_jpeg" != 'no'; then
2093 AC_MSG_NOTICE([-------------------------------------------------------------])
2094 AC_MSG_CHECKING([for JPEG])
2098 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2099 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2100 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2101 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2102 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2104 # Test for compatible JPEG library
2105 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2106 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2110 #include <jpeglib.h>
2112 changequote(<<, >>)dnl
2114 #if JPEG_LIB_VERSION < 62
2115 #error IJG JPEG library must be version 6b or newer!
2119 changequote([, ])dnl
2120 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2121 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2123 AC_MSG_CHECKING([if JPEG package is complete])
2124 if test $passed -gt 0; then
2125 if test $failed -gt 0; then
2126 AC_MSG_NOTICE([no -- some components failed test])
2127 have_jpeg='no (failed tests)'
2130 LIBS="$JPEG_LIBS $LIBS"
2131 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2132 AC_MSG_NOTICE([yes])
2139 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2142 dnl ===========================================================================
2145 # Check for JPEG Version 2 delegate library.
2148 [AC_HELP_STRING([--without-jp2],
2149 [disable JPEG-2000 support])],
2150 [with_jp2=$withval],
2153 if test "$with_jp2" != 'yes'; then
2154 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 "
2159 if test "$with_jp2" != 'no'; then
2160 AC_MSG_NOTICE([-------------------------------------------------------------])
2161 AC_MSG_CHECKING([for JPEG Version 2])
2165 AC_CHECK_HEADER(jasper/jasper.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2166 AC_CHECK_LIB(jasper,jas_stream_fopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2167 AC_MSG_CHECKING([if JPEG version 2 support package is complete])
2168 if test $passed -gt 0; then
2169 if test $failed -gt 0; then
2170 AC_MSG_NOTICE([no -- some components failed test])
2171 have_jp2='no (failed tests)'
2174 LIBS="$JP2_LIBS $LIBS"
2175 AC_DEFINE(JP2_DELEGATE,1,Define if you have JPEG version 2 "Jasper" library)
2176 AC_MSG_NOTICE([yes])
2183 AM_CONDITIONAL(JP2_DELEGATE, test "$have_jp2" = 'yes')
2186 dnl ===========================================================================
2189 # Check for LCMS delegate library.
2193 [ --without-lcms disable lcms (v1.1X) support],
2194 [with_lcms=$withval],
2196 if test "$with_lcms" != 'yes' ; then
2197 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2202 [ --without-lcms2 disable lcms (v2.X) support],
2203 [with_lcms2=$withval],
2205 if test "$with_lcms2" != 'yes' ; then
2206 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
2211 if test "$with_lcms2" != 'no'; then
2212 AC_MSG_NOTICE([-------------------------------------------------------------])
2213 AC_MSG_CHECKING([for LCMS v2])
2217 have_lcms_header='no'
2219 # Check for <lcms2.h>
2220 AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
2221 if test "$have_lcms_header" = 'yes'; then
2222 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2223 passed=`expr $passed + 1`
2226 # Check for <lcms2/lcms2.h)
2227 if test "$have_lcms_header" != 'yes'; then
2228 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2229 if test "$have_lcms_header" = 'yes'; then
2230 passed=`expr $passed + 1`
2231 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2235 # Failed to find lcms header?
2236 if test "$have_lcms_header" != 'yes'; then
2237 failed=`expr $failed + 1`
2240 AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2241 AC_MSG_CHECKING(if LCMS v2 package is complete)
2242 if test $passed -gt 0; then
2243 if test $failed -gt 0; then
2244 AC_MSG_NOTICE(no -- some components failed test)
2245 have_lcms2='no (failed tests)'
2248 LIBS="$LCMS_LIBS $LIBS"
2258 # Check for LCMS v1 (1.11 or later)
2260 if test $have_lcms2 = 'yes'; then
2265 if test "$with_lcms" != 'no'; then
2266 AC_MSG_NOTICE([-------------------------------------------------------------])
2267 AC_MSG_CHECKING([for LCMS v1.1X])
2271 have_lcms_header='no'
2273 # Check for <lcms.h>
2274 if test "$have_lcms_header" != 'yes'; then
2275 AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
2276 if test "$have_lcms_header" = 'yes'; then
2277 passed=`expr $passed + 1`
2278 AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
2282 # Check for <lcms/lcms.h>
2283 if test "$have_lcms_header" != 'yes'; then
2284 AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
2285 if test "$have_lcms_header" = 'yes'; then
2286 passed=`expr $passed + 1`
2287 AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
2291 # Failed to find lcms header?
2292 if test "$have_lcms_header" != 'yes'; then
2293 failed=`expr $failed + 1`
2296 AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2297 AC_MSG_CHECKING(if LCMS package is complete)
2298 if test $passed -gt 0; then
2299 if test $failed -gt 0; then
2300 AC_MSG_NOTICE(no -- some components failed test)
2301 have_lcms='no (failed tests)'
2304 LIBS="$LCMS_LIBS $LIBS"
2313 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
2314 if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
2315 AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
2320 dnl ===========================================================================
2323 # Check for the LQR (Liquid Rescale) delegate library.
2326 [AC_HELP_STRING([--without-lqr],
2327 [disable Liquid Rescale support])],
2328 [with_lqr=$withval],
2331 if test "$with_lqr" != 'yes'; then
2332 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2339 if test "x$with_lqr" = "xyes"; then
2340 AC_MSG_NOTICE([-------------------------------------------------------------])
2341 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2345 if test "$have_lqr" = 'yes'; then
2346 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2347 CFLAGS="$LQR_CFLAGS $CFLAGS"
2350 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2351 AC_SUBST(LQR_CFLAGS)
2354 dnl ===========================================================================
2356 # Disable LZMA (lzma library)
2358 [ --without-lzma disable LZMA support],
2359 [with_lzma=$withval],
2361 if test "$with_lzma" != 'yes' ; then
2362 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2370 if test "$with_lzma" != 'no' || test "$with_tiff" != 'no'; then
2371 AC_MSG_NOTICE([-------------------------------------------------------------])
2372 AC_MSG_CHECKING(for LZMA)
2376 AC_CHECK_HEADER(lzma.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2377 AC_CHECK_LIB(lzma,lzma_code,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2378 AC_MSG_CHECKING(if LZMA package is complete)
2379 if test $passed -gt 0; then
2380 if test $failed -gt 0; then
2381 AC_MSG_NOTICE(no -- some components failed test)
2382 have_lzma='no (failed tests)'
2385 LIBS="$LZMA_LIBS $LIBS"
2386 AC_DEFINE(LZMA_DELEGATE,1,Define if you have lzma compression library)
2394 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2397 dnl ===========================================================================
2400 # Check for the OpenEXR delegate library.
2402 AC_ARG_WITH([openexr],
2403 [AC_HELP_STRING([--without-openexr],
2404 [disable OpenEXR support])],
2405 [with_openexr=$withval],
2406 [with_openexr='yes'])
2408 if test "$with_openexr" != 'yes'; then
2409 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2416 if test "x$with_openexr" = "xyes"; then
2417 AC_MSG_NOTICE([-------------------------------------------------------------])
2418 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2422 if test "$have_openexr" = 'yes'; then
2423 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2424 if test "$with_modules" = 'no'; then
2425 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2429 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2430 AC_SUBST(OPENEXR_CFLAGS)
2431 AC_SUBST(OPENEXR_LIBS)
2433 dnl ===========================================================================
2436 # Check for PANGO delegate library.
2438 AC_ARG_WITH([pango],
2439 [AC_HELP_STRING([--without-pango],
2440 [disable PANGO support])],
2441 [with_pango=$withval],
2442 [with_pango=$have_x])
2444 if test "$with_pango" != 'yes'; then
2445 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2453 if test "x$with_pango" = "xyes"; then
2454 AC_MSG_RESULT([-------------------------------------------------------------])
2455 PKG_CHECK_MODULES(PANGO, pangoft2, have_pangoft2=yes, have_pangoft2=no)
2457 PKG_CHECK_MODULES(PANGO, pango, have_pango=yes, have_pango=no)
2461 if test "$have_pango" = 'yes'; then
2462 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2463 if test "$with_modules" = 'no'; then
2464 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
2468 if test "$have_pangoft2" = 'yes'; then
2469 AC_DEFINE(PANGOFT2_DELEGATE,1,Define if you have PANGOFT2 library)
2470 if test "$with_modules" = 'no'; then
2471 CPPFLAGS="$PANGOFT2_CFLAGS $CPPFLAGS"
2475 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2476 AM_CONDITIONAL(PANGOFT2_DELEGATE, test "$have_pangoft2" = 'yes')
2477 AC_SUBST(PANGO_CFLAGS)
2478 AC_SUBST(PANGO_LIBS)
2480 dnl ===========================================================================
2483 # Check for PNG delegate library.
2486 [AC_HELP_STRING([--without-png],
2487 [disable PNG support])],
2488 [with_png=$withval],
2491 if test "$with_png" != 'yes'; then
2492 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2498 if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
2499 AC_MSG_NOTICE([-------------------------------------------------------------])
2500 AC_MSG_CHECKING(for PNG support )
2504 AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
2505 failed=`expr $failed + 1`,)
2507 if test $passed -gt 0; then
2508 for var in 5 4 2 '' ; do
2509 if test "$have_png" = 'no' ; then
2510 if test "x${var}" = 'x' ; then
2516 # Test for compatible LIBPNG library
2519 if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
2520 if test "${pnglib}" != 'png' ; then
2521 AC_MSG_CHECKING(for LIBPNG1${var} support )
2527 changequote(<<, >>)dnl
2529 #if PNG_LIBPNG_VER_MINOR != ${var}
2530 #error LIBPNG library must be version 1${var}!
2535 changequote([, ])dnl
2536 ac_cv_libpng_ok='yes',
2537 ac_cv_libpng_ok='no')
2538 if test "$ac_cv_libpng_ok" = 'yes' ; then
2539 passed=`expr $passed + 1`
2542 failed=`expr $failed + 1`
2546 passed=`expr $passed + 1`
2551 if test $passed -gt 0 -a $failed -le 0; then
2552 if test "1${var}" = '15' ; then
2553 AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
2554 failed=`expr $failed + 1`,)
2555 AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
2556 failed=`expr $failed + 1`,)
2558 if test "1${var}" = '14' ; then
2559 AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
2560 failed=`expr $failed + 1`,)
2561 AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
2562 failed=`expr $failed + 1`,)
2564 if test "1${var}" = '12' ; then
2565 AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
2566 failed=`expr $failed + 1`,)
2568 if test "1${var}" = '1' ; then
2569 AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
2570 failed=`expr $failed + 1`,)
2572 if test $passed -gt 0 -a $failed -le 0 ; then
2573 AC_MSG_CHECKING(if ${pnglib} package is complete)
2574 if test $passed -gt 0 ; then
2575 if test $failed -gt 0 ; then
2576 AC_MSG_NOTICE(no -- some components failed test)
2577 have_png='no (failed tests)'
2579 PNG_LIBS="-l${pnglib}"
2580 LIBS="$PNG_LIBS $LIBS"
2581 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2593 AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
2597 dnl ===========================================================================
2600 # Check for RSVG delegate library.
2603 [AC_HELP_STRING([--without-rsvg],
2604 [disable RSVG support])],
2605 [with_rsvg=$withval],
2606 [with_rsvg=$have_x])
2608 if test "$with_rsvg" != 'yes'; then
2609 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2617 if test "x$with_rsvg" = "xyes"; then
2618 AC_MSG_NOTICE([-------------------------------------------------------------])
2619 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2621 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2625 if test "$have_rsvg" = 'yes'; then
2626 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2627 if test "$with_modules" = 'no'; then
2628 CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
2632 if test "$have_cairo" = 'yes'; then
2633 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2634 if test "$with_modules" = 'no'; then
2635 CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
2639 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2640 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2641 AC_SUBST(RSVG_CFLAGS)
2644 dnl ===========================================================================
2647 # Check for TIFF delegate library.
2650 [AC_HELP_STRING([--without-tiff],
2651 [disable TIFF support])],
2652 [with_tiff=$withval],
2655 if test "$with_tiff" != 'yes'; then
2656 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2661 if test "$with_tiff" != 'no'; then
2662 AC_MSG_NOTICE([-------------------------------------------------------------])
2663 AC_MSG_CHECKING([for TIFF])
2667 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2668 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2669 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2670 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2671 AC_CHECK_LIB(tiff,TIFFIsBigEndian,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2672 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2673 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2674 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2675 AC_MSG_CHECKING([if TIFF package is complete])
2676 if test $passed -gt 0; then
2677 if test $failed -gt 0; then
2678 AC_MSG_NOTICE([no -- some components failed test])
2679 have_tiff='no (failed tests)'
2682 LIBS="$TIFF_LIBS $LIBS"
2683 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2684 AC_MSG_NOTICE([yes])
2686 AC_CHECK_HEADERS(tiffconf.h)
2687 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2688 TIFFReadEXIFDirectory TIFFSetErrorHandlerExt TIFFSetTagExtender \
2689 TIFFSetWarningHandlerExt TIFFSwabArrayOfTriples])
2695 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2698 dnl ===========================================================================
2701 # Check for WEBP delegate library.
2704 [AC_HELP_STRING([--without-webp],
2705 [disable WEBP support])],
2706 [with_webp=$withval],
2709 if test "$with_webp" != 'yes'; then
2710 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2715 if test "$with_webp" != 'no'; then
2716 AC_MSG_NOTICE([-------------------------------------------------------------])
2717 AC_MSG_CHECKING([for WEBP])
2721 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2722 AC_CHECK_LIB(webp,WebPDecodeRGB,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2723 AC_MSG_CHECKING([if WEBP package is complete])
2724 if test $passed -gt 0; then
2725 if test $failed -gt 0; then
2726 AC_MSG_NOTICE([no -- some components failed test])
2727 have_webp='no (failed tests)'
2730 LIBS="$WEBP_LIBS $LIBS"
2731 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2732 AC_MSG_NOTICE([yes])
2739 AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2742 dnl ===========================================================================
2745 # Set Windows font directory.
2747 AC_ARG_WITH([windows-font-dir],
2748 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2749 [directory containing MS-Windows fonts])],
2750 [with_windows_font_dir=$withval],
2751 [with_windows_font_dir=''])
2752 if test "$with_windows_font_dir" != '' ; then
2753 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2756 dnl ===========================================================================
2759 # Check for WMF delegate library.
2762 [AC_HELP_STRING([--without-wmf],
2763 [disable WMF support])],
2764 [with_wmf=$withval],
2767 if test "$with_wmf" != 'yes'; then
2768 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2773 if test "$with_wmf" != 'no'; then
2774 AC_MSG_NOTICE([-------------------------------------------------------------])
2775 AC_MSG_CHECKING([for WMF])
2779 AC_CHECK_HEADER(libwmf/eps.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2780 AC_CHECK_LIB(wmf,wmf_eps_function,passed=`expr $passed + 1`,failed=`expr $failed + 1`,"-lwmflite")
2781 AC_MSG_CHECKING([if WMF package is complete])
2782 if test $passed -gt 0; then
2783 if test $failed -gt 0; then
2784 AC_MSG_NOTICE([no -- some components failed test])
2785 have_wmf='no (failed tests)'
2787 WMF_LIBS='-lwmf -lwmflite'
2788 LIBS="$WMF_LIBS $LIBS"
2789 AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
2790 AC_MSG_NOTICE([yes])
2797 AM_CONDITIONAL(WMF_DELEGATE,test "$have_wmf" = 'yes')
2800 dnl ===========================================================================
2803 dnl ===========================================================================
2806 # Check for XML delegate library.
2809 [AC_HELP_STRING([--without-xml],
2810 [disable XML support])],
2811 [with_xml=$withval],
2814 if test "$with_xml" != 'yes' ; then
2815 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2820 if test "$with_xml" != 'no'; then
2821 AC_MSG_NOTICE([-------------------------------------------------------------])
2822 AC_MSG_CHECKING([for XML])
2824 PERSIST_LDFLAGS=$LDFLAGS
2825 PERSIST_CPPFLAGS=$CPPFLAGS
2827 AC_PATH_PROG(xml2_config,xml2-config,)dnl
2828 if test -n "$xml2_config"; then
2829 # Debian installs libxml headers under /usr/include/libxml2/libxml with
2830 # the shared library installed under /usr/lib, whereas the package
2831 # installs itself under $prefix/libxml and $prefix/lib.
2832 xml2_prefix=`xml2-config --prefix`
2833 if test -d "${xml2_prefix}/include/libxml2"; then
2834 CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
2836 if test "${xml2_prefix}" != '/usr'; then
2837 LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
2842 AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2843 AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2844 AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2845 AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2846 AC_MSG_CHECKING([if XML package is complete])
2847 if test $passed -gt 0; then
2848 if test $failed -gt 0; then
2849 AC_MSG_NOTICE([no -- some components failed test])
2850 have_xml='no (failed tests)'
2851 LDFLAGS="$PERSIST_LDFLAGS"
2852 CPPFLAGS="$PERSIST_CPPFLAGS"
2855 LIBS="$XML_LIBS $LIBS"
2856 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2857 AC_MSG_NOTICE([yes])
2864 AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
2867 dnl ===========================================================================
2869 # Substitute compiler name to build/link PerlMagick
2871 AC_SUBST(PERLMAINCC)
2874 # Configure install Paths
2877 # Subdirectory under lib to place ImageMagick lib files
2878 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2879 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",Subdirectory of lib where ImageMagick architecture dependent files are installed)
2881 # Path to ImageMagick bin directory
2882 EXECUTABLE_PATH="${BIN_DIR}"
2883 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2884 case "${build_os}" in
2886 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2889 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",Directory where executables are installed.)
2890 AC_SUBST(EXECUTABLE_PATH)
2892 # Path to ImageMagick lib
2893 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2894 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2895 case "${build_os}" in
2897 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2900 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",Directory where architecture-dependent files live.)
2901 AC_SUBST(LIBRARY_PATH)
2904 # Subdirectory under lib to place ImageMagick coder module files
2905 CODER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/coders"
2906 AC_DEFINE_UNQUOTED(CODER_RELATIVE_PATH,"$CODER_RELATIVE_PATH",Subdirectory of lib where coder modules are installed)
2907 CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}"
2908 DEFINE_CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}/"
2909 case "${build_os}" in
2911 DEFINE_CODER_PATH=`$WinPathScript "$DEFINE_CODER_PATH" 1`
2914 AC_DEFINE_UNQUOTED(CODER_PATH,"$DEFINE_CODER_PATH",Location of coder modules)
2915 AC_SUBST(CODER_PATH)
2918 # Subdirectory under lib to place ImageMagick filter module files
2919 FILTER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/filters"
2920 AC_DEFINE_UNQUOTED(FILTER_RELATIVE_PATH,"$FILTER_RELATIVE_PATH",Subdirectory of lib where filter modules are installed)
2921 FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}"
2922 DEFINE_FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}/"
2923 case "${build_os}" in
2925 DEFINE_FILTER_PATH=`$WinPathScript "$DEFINE_FILTER_PATH" 1`
2928 AC_DEFINE_UNQUOTED(FILTER_PATH,"$DEFINE_FILTER_PATH",Location of filter modules)
2929 AC_SUBST(FILTER_PATH)
2932 # Path to ImageMagick documentation files
2933 DOCUMENTATION_RELATIVE_PATH=""
2934 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
2935 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
2936 case "${build_os}" in
2938 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
2941 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",Directory where ImageMagick documents live.)
2942 AC_SUBST(DOCUMENTATION_PATH)
2944 # Subdirectory to place ImageMagick configuration files
2945 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
2946 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",Subdirectory of lib where architecture-dependent configuration files live.)
2947 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2948 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2949 case "${build_os}" in
2951 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
2954 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",Directory where architecture-dependent configuration files live.)
2955 AC_SUBST(CONFIGURE_PATH)
2957 # Subdirectory to place ImageMagick configuration files
2958 SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
2959 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
2960 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
2961 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
2962 case "${build_os}" in
2964 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
2967 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",Directory where architecture-independent configuration files live.)
2968 AC_SUBST(SHARE_PATH)
2971 # program_transform_name is formed for use in a Makefile, so create a
2972 # modified version for use in a shell script.
2973 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
2975 # Default delegate definitions
2976 AC_MSG_NOTICE([-------------------------------------------------------------])
2977 AC_MSG_CHECKING([for ImageMagick delegate programs])
2979 AutotraceDecodeDelegateDefault='autotrace'
2980 BlenderDecodeDelegateDefault='blender'
2981 BZIPDelegateDefault='bzip2'
2982 BrowseDelegateDefault='xdg-open'
2983 CGMDecodeDelegateDefault='ralcgm'
2984 CatDelegateDefault='cat'
2985 DNGDecodeDelegateDefault='ufraw-batch'
2986 GVCDecodeDelegateDefault='dot'
2987 DVIDecodeDelegateDefault='dvips'
2988 EchoDelegateDefault='echo'
2989 EditorDelegateDefault='xterm'
2990 FIGDecodeDelegateDefault='fig2dev'
2991 ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
2992 DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
2993 MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
2994 GnuplotDecodeDelegateDefault='gnuplot'
2995 HPGLDecodeDelegateDefault='hp2xx'
2996 HTMLDecodeDelegateDefault='html2ps'
2997 ILBMDecodeDelegateDefault='ilbmtoppm'
2998 ILBMEncodeDelegateDefault='ppmtoilbm'
2999 LPDelegateDefault='lp'
3000 LPRDelegateDefault='lpr'
3001 LZWDecodeDelegateDefault='uncompress'
3002 LZWEncodeDelegateDefault='compress'
3003 LaunchDelegateDefault='gimp'
3004 MANDelegateDefault='groff'
3005 MPEGDecodeDelegateDefault='ffmpeg'
3006 MPEGEncodeDelegateDefault='ffmpeg'
3007 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3008 MVDelegateDefault='mv'
3009 PCLDelegateDefault='pcl6'
3010 PGPDecodeDelegateDefault='pgpv'
3011 POVDelegateDefault='povray'
3012 if test "$native_win32_build" = 'yes'; then
3013 PSDelegateDefault='gswin32c'
3014 elif test "$gslib_framework" = 'yes'; then
3015 PSDelegateDefault='gsc'
3017 PSDelegateDefault='gs'
3019 RLEEncodeDelegateDefault='rawtorle'
3020 RMDelegateDefault='rm'
3021 RSVGDecodeDelegateDefault='rsvg'
3022 SCANDecodeDelegateDefault='scanimage'
3023 TXTDelegateDefault='enscript'
3024 UniconvertorDelegateDefault='uniconvertor'
3025 WMFDecodeDelegateDefault='wmf2eps'
3026 WWWDecodeDelegateDefault='curl'
3027 XPSDelegateDefault='gxps'
3028 ZipDelegateDefault='gzip'
3030 # Search for delegates
3031 AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
3032 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3033 AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
3034 AC_PATH_PROG(BrowseDelegate, "$BrowseDelegateDefault" mozilla firefox netscape, "$BrowseDelegateDefault")
3035 AC_PATH_PROG(CGMDecodeDelegate, "$CGMDecodeDelegateDefault", "$CGMDecodeDelegateDefault")
3036 AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
3037 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3038 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3039 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3040 AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
3041 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3042 AC_PATH_PROG(FIGDecodeDelegate, "$FIGDecodeDelegateDefault", "$FIGDecodeDelegateDefault")
3043 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3044 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3045 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3046 AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
3047 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3048 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3049 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3050 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3051 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3052 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3053 AC_PATH_PROG(LZWDecodeDelegate, "$LZWDecodeDelegateDefault", "$LZWDecodeDelegateDefault")
3054 AC_PATH_PROG(LZWEncodeDelegate, "$LZWEncodeDelegateDefault", "$LZWEncodeDelegateDefault")
3055 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3056 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
3057 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3058 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3059 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3060 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3061 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3062 AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
3063 AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
3064 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3065 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
3066 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3067 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3068 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
3069 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
3070 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3071 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
3072 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
3073 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3074 AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
3076 # Prefer lpr to lp; lp needs options tacked on.
3077 if test "$LPRDelegate" != no; then
3078 PrintDelegate="$LPRDelegate"
3080 PrintDelegate="$LPDelegate -c -s"
3082 AC_SUBST(PrintDelegate)
3084 # Installed ImageMagick utiltity paths
3085 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3086 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3087 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3089 # Set delegate booleans
3090 have_ffmpeg='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_ffmpeg='yes'; fi
3091 have_fig2dev='no' ; if test "$FIGDecodeDelegate" != "$FIGDecodeDelegateDefault" ; then have_fig2dev='yes'; fi
3092 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3093 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3094 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3095 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3096 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3097 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3098 have_ralcgm='no' ; if test "$CGMDecodeDelegate" != "$CGMDecodeDelegateDefault" ; then have_ralcgm='yes'; fi
3099 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3102 # Test for font directories
3104 type_include_files=''
3107 AC_MSG_CHECKING(for Dejavu fonts directory)
3109 if test "${with_dejavu_font_dir}" != 'default'; then
3110 dejavu_font_dir="${with_dejavu_font_dir}/"
3112 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3113 if test -f "${font_dir}DejaVuSerif.ttf"; then
3114 dejavu_font_dir="${font_dir}"
3119 if test "${dejavu_font_dir}x" != 'x'; then
3120 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3121 AC_MSG_NOTICE([$dejavu_font_dir])
3123 AC_MSG_NOTICE([not found!]);
3125 AC_SUBST(dejavu_font_dir)
3129 if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
3130 windows_font_dir="${with_windows_font_dir}/"
3132 if test "${windows_font_dir}x" != 'x'; then
3133 if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
3134 windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
3136 if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then
3137 windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/'
3139 if test -f '/usr/share/fonts/msttcore/arial.ttf'; then
3140 windows_font_dir='/usr/share/fonts/msttcore/truetype/'
3143 if test "${windows_font_dir}x" != 'x'; then
3144 type_include_files="$type_include_files "'<include file="type-windows.xml" />'
3146 AC_SUBST(windows_font_dir)
3149 AC_MSG_CHECKING(for Ghostscript fonts directory)
3150 ghostscript_font_dir=''
3151 if test "${with_gs_font_dir}" != 'default'; then
3152 ghostscript_font_dir="${with_gs_font_dir}/"
3154 if test "${native_win32_build}" = 'yes'; then
3155 # Native Windows Build
3156 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3157 if test -f "${font_dir}a010013l.pfb"; then
3158 ghostscript_font_dir="$font_dir"
3162 if test "${PSDelegate}" != 'gswin32c'; then
3163 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3166 # Linux / Mac OS X / Unix Build
3167 for font_dir in "${prefix}/share/ghostscript/fonts/" '/usr/share/fonts/default/Type1/' '/usr/share/ghostscript/fonts/' '/usr/share/fonts/ghostscript/' '/usr/share/fonts/type1/gsfonts/' '/opt/local/share/ghostscript/fonts/' '/sw/share/ghostscript/fonts/' '/System/Library/Frameworks/Ghostscript.framework/Resources/fonts/'; do
3168 if test -f "${font_dir}a010013l.pfb"; then
3169 ghostscript_font_dir="${font_dir}"
3173 if test "${ghostscript_font_dir}x" = 'x'; then
3174 if test "$PSDelegate" != 'gs'; then
3175 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3180 if test "${ghostscript_font_dir}x" != 'x'; then
3181 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3182 AC_MSG_NOTICE([$ghostscript_font_dir])
3184 AC_MSG_NOTICE([not found!]);
3186 AC_SUBST(ghostscript_font_dir)
3187 case "${build_os}" in
3189 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3193 AC_SUBST(type_include_files)
3196 # Handle case where user doesn't want frozen paths
3198 if test "$with_frozenpaths" != 'yes'; then
3199 # Re-set delegate definitions to default (no paths)
3200 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
3201 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3202 BZIPDelegate="$BZIPDelegateDefault"
3203 BrowseDelegate="$BrowseDelegateDefault"
3204 CGMDecodeDelegate="$CGMDecodeDelegateDefault"
3205 CatDelegate="$CatDelegateDefault"
3206 ConvertDelegate="$ConvertDelegateDefault"
3207 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3208 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3209 EchoDelegate="$EchoDelegateDefault"
3210 EditorDelegate="$EditorDelegateDefault"
3211 FIGDecodeDelegate="$FIGDecodeDelegateDefault"
3212 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3213 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3214 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3215 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3216 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3217 LPDelegate="$LPDelegateDefault"
3218 LZWDecodeDelegate="$LZWDecodeDelegateDefault"
3219 LZWEncodeDelegate="$LZWEncodeDelegateDefault"
3220 LaunchDelegate="$LaunchDelegateDefault"
3221 MANDelegate="$MANDelegateDefault"
3222 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3223 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3224 MogrifyDelegate="$MogrifyDelegateDefault"
3225 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3226 MVDelegate="$MVDelegateDefault"
3227 PCLDelegate="$PCLDelegateDefault"
3228 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3229 POVDelegate="$POVDelegateDefault"
3230 PSDelegate="$PSDelegateDefault"
3231 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3232 RMDelegate="$RMDelegateDefault"
3233 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3234 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3235 ShowImageDelegate="$ShowImageDelegateDefault"
3236 TXTDelegate="$TXTDelegateDefault"
3237 UniconvertorDelegate="$UniconvertorDelegateDefault"
3238 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3239 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3240 XPSDelegate="$XPSDelegateDefault"
3241 ZipDelegate="$ZipDelegateDefault"
3244 # Delegate substitutions
3245 AC_SUBST(AutotraceDecodeDelegate)
3246 AC_SUBST(BlenderDecodeDelegate)
3247 AC_SUBST(BZIPDelegate)
3248 AC_SUBST(BrowseDelegate)
3249 AC_SUBST(CGMDecodeDelegate)
3250 AC_SUBST(CatDelegate)
3251 AC_SUBST(ConvertDelegate)
3252 AC_SUBST(GVCDecodeDelegate)
3253 AC_SUBST(DVIDecodeDelegate)
3254 AC_SUBST(EchoDelegate)
3255 AC_SUBST(EditorDelegate)
3256 AC_SUBST(FIGDecodeDelegate)
3257 AC_SUBST(GnuplotDecodeDelegate)
3258 AC_SUBST(HPGLDecodeDelegate)
3259 AC_SUBST(HTMLDecodeDelegate)
3260 AC_SUBST(ILBMDecodeDelegate)
3261 AC_SUBST(ILBMEncodeDelegate)
3262 AC_SUBST(LPDelegate)
3263 AC_SUBST(LZWDecodeDelegate)
3264 AC_SUBST(LZWEncodeDelegate)
3265 AC_SUBST(LaunchDelegate)
3266 AC_SUBST(MANDelegate)
3267 AC_SUBST(MPEGDecodeDelegate)
3268 AC_SUBST(MPEGEncodeDelegate)
3269 AC_SUBST(MogrifyDelegate)
3270 AC_SUBST(MrSIDDecodeDelegate)
3271 AC_SUBST(MVDelegate)
3272 AC_SUBST(PCLDelegate)
3273 AC_SUBST(PGPDecodeDelegate)
3274 AC_SUBST(POVDelegate)
3275 AC_SUBST(PSDelegate)
3276 AC_SUBST(RLEEncodeDelegate)
3277 AC_SUBST(RMDelegate)
3278 AC_SUBST(SCANDecodeDelegate)
3279 AC_SUBST(ShowImageDelegate)
3280 AC_SUBST(TXTDelegate)
3281 AC_SUBST(UniconvertorDelegate)
3282 AC_SUBST(WMFDecodeDelegate)
3283 AC_SUBST(WWWDecodeDelegate)
3284 AC_SUBST(XPSDelegate)
3285 AC_SUBST(ZipDelegate)
3291 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3292 AC_CHECK_PROGS(PERL,perl)
3293 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3294 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3295 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3296 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3297 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3299 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3302 # 7ZIP support (http://p7zip.sourceforge.net/)
3305 AC_CHECK_PROGS(P7ZIP,[7za])
3307 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3310 # ZIP support (http://www.info-zip.org/Zip.html)
3313 AC_CHECK_PROGS(ZIP,[zip])
3315 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3318 # GhostPCL related configuration.
3320 PCLColorDevice=ppmraw
3321 PCLCMYKDevice=pamcmyk32
3322 PCLMonoDevice=pbmraw
3323 if test -z "$PCLVersion"; then
3324 PCLVersion='unknown'
3326 if test $have_pcl = 'yes'; then
3327 AC_MSG_NOTICE([-------------------------------------------------------------])
3328 AC_MSG_CHECKING([for PCL])
3331 AC_MSG_CHECKING([for pcl color device])
3332 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3335 PCLColorDevice=ppmraw
3337 AC_MSG_NOTICE([$PCLColorDevice])
3340 AC_MSG_CHECKING([for pcl CMYK device])
3341 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3344 PCLCMYKDevice=$PCLColorDevice
3346 AC_MSG_NOTICE([$PCLCMYKDevice])
3349 AC_MSG_CHECKING([for pcl mono device])
3350 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3353 PCLMonoDevice=$PCLColorDevice
3355 AC_MSG_NOTICE([$PCLMonoDevice])
3358 AC_SUBST(PCLMonoDevice)
3359 AC_SUBST(PCLColorDevice)
3360 AC_SUBST(PCLCMYKDevice)
3361 AC_SUBST(PCLVersion)
3364 # GhostXPS related configuration.
3366 XPSColorDevice=ppmraw
3367 XPSCMYKDevice=bmpsep8
3368 XPSMonoDevice=pbmraw
3369 if test -z "$XPSVersion"; then
3370 XPSVersion='unknown'
3372 if test $have_xps = 'yes'; then
3373 AC_MSG_NOTICE([-------------------------------------------------------------])
3374 AC_MSG_CHECKING([for XPS])
3377 AC_MSG_CHECKING([for xps color device])
3378 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3381 XPSColorDevice=ppmraw
3383 AC_MSG_NOTICE([$XPSColorDevice])
3386 AC_MSG_CHECKING([for xps CMYK device])
3387 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3390 XPSCMYKDevice=$XPSColorDevice
3392 AC_MSG_NOTICE([$XPSCMYKDevice])
3395 AC_MSG_CHECKING([for xps mono device])
3396 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3399 XPSMonoDevice=$XPSColorDevice
3401 AC_MSG_NOTICE([$XPSMonoDevice])
3404 AC_SUBST(XPSMonoDevice)
3405 AC_SUBST(XPSColorDevice)
3406 AC_SUBST(XPSCMYKDevice)
3407 AC_SUBST(XPSVersion)
3410 # Ghostscript related configuration.
3412 GSAlphaDevice=pngalpha
3413 GSColorDevice=pnmraw
3416 GSPDFDevice=pdfwrite
3418 GSEPSDevice=epswrite
3420 if test $have_gs = 'yes'; then
3421 AC_MSG_NOTICE([-------------------------------------------------------------])
3422 AC_MSG_CHECKING([for Ghostscript])
3424 AC_MSG_CHECKING([for Ghostscript version])
3425 if GSVersion=`$PSDelegate --version`; then
3428 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3430 AC_MSG_NOTICE([$GSVersion])
3433 AC_MSG_CHECKING([for gs alpha device])
3434 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3437 GSAlphaDevice=pnmraw
3439 AC_MSG_NOTICE([$GSAlphaDevice])
3442 AC_MSG_CHECKING([for gs color device])
3443 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3446 GSColorDevice=pnmraw
3448 AC_MSG_NOTICE([$GSColorDevice])
3451 AC_MSG_CHECKING([for gs CMYK device])
3452 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3455 GSCMYKDevice=bmpsep8
3457 AC_MSG_NOTICE([$GSCMYKDevice])
3460 AC_MSG_CHECKING([for gs mono device])
3461 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3464 GSMonoDevice=$GSColorDevice
3466 AC_MSG_NOTICE([$GSMonoDevice])
3469 AC_MSG_CHECKING([for gs PDF writing device])
3470 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3473 GSPDFDevice=nodevice
3475 AC_MSG_NOTICE([$GSPDFDevice])
3478 AC_MSG_CHECKING([for gs PS writing device])
3479 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3484 AC_MSG_NOTICE([$GSPSDevice])
3487 AC_MSG_CHECKING([for gs EPS writing device])
3488 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3491 GSEPSDevice=nodevice
3493 AC_MSG_NOTICE([$GSEPSDevice])
3496 AC_SUBST(GSAlphaDevice)
3497 AC_SUBST(GSCMYKDevice)
3498 AC_SUBST(GSColorDevice)
3499 AC_SUBST(GSEPSDevice)
3500 AC_SUBST(GSMonoDevice)
3501 AC_SUBST(GSPDFDevice)
3502 AC_SUBST(GSPSDevice)
3506 # PerlMagick-related configuration
3509 # Look for PERL if PerlMagick requested
3510 # If name/path of desired PERL interpreter is specified, look for that one first
3512 if test "$with_perl" != 'no'; then
3513 AC_MSG_NOTICE([-------------------------------------------------------------])
3514 AC_MSG_CHECKING([for Perl])
3516 if test "$with_perl" != 'yes'; then
3517 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3518 PERL=$ac_cv_path_PERL
3520 have_perl="$ac_cv_path_PERL"
3522 AC_PATH_PROGS(PERL,perl perl5,)dnl
3523 if test "$ac_cv_path_PERL"; then
3524 have_perl="$ac_cv_path_PERL"
3529 if test "$with_perl" != 'yes' ; then
3530 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3533 PERL_SUPPORTS_DESTDIR='no'
3535 with_perl_static='no'
3536 with_perl_dynamic='no'
3537 if test "$have_perl" != 'no'; then
3538 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3539 with_perl_static='yes'
3541 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3542 with_perl_dynamic='yes'
3544 # Is PERL's MakeMaker new enough to support DESTDIR?
3545 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3547 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3548 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3549 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3550 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3552 # Determine path to pick up MagickCore library from for use with building PerlMagick
3553 MAGICKCORE_PATH="${LIB_DIR}"
3554 if test $with_perl_static = 'yes'; then
3555 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3556 libtool_objdir=$objdir
3558 # Linker search path to library, followed by -lMagickCore
3559 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3561 AC_SUBST(MAGICKCORE_PATH)
3563 # Create a simple string containing format names for all delegate libraries
3565 if test "$have_autotrace" = 'yes'; then DELEGATES="$DELEGATES autotrace"; fi
3566 if test "$have_bzlib" = 'yes'; then DELEGATES="$DELEGATES bzlib"; fi
3567 if test "$have_djvu" = 'yes'; then DELEGATES="$DELEGATES djvu"; fi
3568 if test "$have_dps" = 'yes'; then DELEGATES="$DELEGATES dps"; fi
3569 if test "$have_fftw" = 'yes'; then DELEGATES="$DELEGATES fftw"; fi
3570 if test "$have_fpx" = 'yes'; then DELEGATES="$DELEGATES fpx"; fi
3571 if test "$have_fontconfig" = 'yes'; then DELEGATES="$DELEGATES fontconfig"; fi
3572 if test "$have_freetype" = 'yes'; then DELEGATES="$DELEGATES freetype"; fi
3573 if test "$have_gslib" = 'yes'; then DELEGATES="$DELEGATES gs"; fi
3574 if test "$have_gvc" = 'yes'; then DELEGATES="$DELEGATES gvc"; fi
3575 if test "$have_jbig" = 'yes'; then DELEGATES="$DELEGATES jbig"; fi
3576 if test "$have_jpeg" = 'yes'; then
3577 DELEGATES="$DELEGATES jpeg";
3578 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi
3580 if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi
3581 if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi
3582 if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi
3583 if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi
3584 if test "$have_lzma" = 'yes'; then DELEGATES="$DELEGATES lzma"; fi
3585 if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi
3586 if test "$have_openexr" = 'yes'; then DELEGATES="$DELEGATES openexr"; fi
3587 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES png"; fi
3588 if test "$have_rsvg" = 'yes'; then DELEGATES="$DELEGATES rsvg"; fi
3589 if test "$have_tiff" = 'yes'; then DELEGATES="$DELEGATES tiff"; fi
3590 if test "$have_x" = 'yes'; then DELEGATES="$DELEGATES x11"; fi
3591 if test "$have_xml" = 'yes'; then DELEGATES="$DELEGATES xml"; fi
3592 if test "$have_wmf" = 'yes'; then DELEGATES="$DELEGATES wmf"; fi
3593 if test "$have_zlib" = 'yes'; then DELEGATES="$DELEGATES zlib"; fi
3598 # Handle special compiler flags
3601 # Add '-p' if prof source profiling support enabled
3602 if test "$enable_prof" = 'yes'; then
3604 CXXFLAGS="-p $CXXFLAGS"
3605 LDFLAGS="-p $LDFLAGS"
3608 # Add '-pg' if gprof source profiling support enabled
3609 if test "$enable_gprof" = 'yes'; then
3610 CFLAGS="-pg $CFLAGS"
3611 CXXFLAGS="-pg $CXXFLAGS"
3612 LDFLAGS="-pg $LDFLAGS"
3615 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3616 # This is a gcc-specific feature
3617 if test "$enable_gcov" = 'yes'; then
3618 AC_CHECK_LIB(gcov,_gcov_init)
3619 AC_CHECK_LIB(gcov,__gcov_init)
3620 case "$target_os" in
3622 OSX_GCOV_LDFLAG="-Wl,-single_module"
3628 AC_SUBST(OSX_GCOV_LDFLAG)
3629 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3630 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3631 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3635 # Build library dependency list for libMagickCore
3638 MAGICK_LIBLTDL='' # Libltdl for build
3639 MAGICK_API_LIBLTDL='' # libltdl for dependent application (API) build
3640 MAGICK_LTDLDEPS='' # extra libltdl dependencies
3641 if test "$with_ltdl" != 'no'
3643 if test \( "$with_included_ltdl" = 'no' -o "$enable_ltdl_convenience" = 'no' \) -o "$enable_ltdl_install" = 'yes'; then
3644 MAGICK_API_LIBLTDL='-lltdl'
3646 MAGICK_LIBLTDL=${LIBLTDL}
3647 MAGICK_LTDLDEPS=${LTDLDEPS}
3649 AC_SUBST(MAGICK_LIBLTDL)
3650 AC_SUBST(MAGICK_LTDLDEPS)
3652 if test "$with_modules" != 'no'; then
3653 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 $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
3655 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 $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $PANGO_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"
3657 AC_SUBST(MAGICK_DEP_LIBS)
3660 # Remove extraneous spaces from output variables (asthetic)
3662 X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'`
3663 X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'`
3664 X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'`
3665 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'`
3667 CC=`echo $CC | sed -e 's/ */ /g'`
3668 CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'`
3669 CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'`
3670 CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'`
3671 DELEGATES=`echo $DELEGATES | sed -e 's/^ //g'`
3672 DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'`
3673 LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'`
3674 TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3675 MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
3676 #LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3678 # Pass only user-provided LIBS as "global" libraries
3684 #AC_SUBST(X_PRE_LIBS)
3686 #AC_SUBST(X_EXTRA_LIBS)
3688 MAGICK_CFLAGS=$CFLAGS
3689 MAGICK_CXXFLAGS="$CXXFLAGS"
3690 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3691 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3692 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3693 MAGICK_LIBS="-lMagickCore $MAGICK_DEP_LIBS $MAGICK_API_LIBLTDL"
3695 AC_SUBST(MAGICK_CFLAGS)
3696 AC_SUBST(MAGICK_CXXFLAGS)
3697 AC_SUBST(MAGICK_CPPFLAGS)
3698 AC_SUBST(MAGICK_PCFLAGS)
3699 AC_SUBST(MAGICK_LDFLAGS)
3700 AC_SUBST(MAGICK_LIBS)
3701 AC_SUBST(MAGICK_FEATURES)
3703 # Set configured scripts to executable.
3704 AC_CONFIG_COMMANDS([default],[],[])
3705 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3706 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3707 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3708 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3710 AC_MSG_NOTICE([-------------------------------------------------------------])
3711 AC_MSG_NOTICE([Update ImageMagick configuration])
3714 rm -f magick-version
3716 result_dejavu_font_dir='none'
3717 if test "${dejavu_font_dir}x" != 'x'; then
3718 result_dejavu_font_dir=$dejavu_font_dir
3721 result_ghostscript_font_dir='none'
3722 if test "${ghostscript_font_dir}x" != 'x'; then
3723 result_ghostscript_font_dir=$ghostscript_font_dir
3726 result_windows_font_dir='none'
3727 if test "${windows_font_dir}x" != 'x'; then
3728 result_windows_font_dir=${windows_font_dir}
3732 ImageMagick is configured as follows. Please verify that this configuration
3733 matches your expectations.
3735 Host system type: $host
3736 Build system type: $build
3739 -------------------------------------------------------------------------------
3740 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3741 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3742 Module support --with-modules=$with_modules $with_modules
3743 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3744 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3745 High Dynamic Range Imagery
3746 --enable-hdri=$enable_hdri $enable_hdri
3748 Delegate Configuration:
3749 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3750 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3751 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3752 DJVU --with-djvu=$with_djvu $have_djvu
3753 DPS --with-dps=$with_dps $have_dps
3754 FFTW --with-fftw=$with_fftw $have_fftw
3755 FlashPIX --with-fpx=$with_fpx $have_fpx
3756 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3757 FreeType --with-freetype=$with_freetype $have_freetype
3758 GhostPCL None $PCLDelegate ($PCLVersion)
3759 GhostXPS None $XPSDelegate ($XPSVersion)
3760 Ghostscript None $PSDelegate ($GSVersion)
3761 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3762 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3763 Graphviz --with-gvc=$with_gvc $have_gvc
3764 JBIG --with-jbig=$with_jbig $have_jbig
3765 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
3766 JPEG-2000 --with-jp2=$with_jp2 $have_jp2
3767 LCMS v1 --with-lcms=$with_lcms $have_lcms
3768 LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
3769 LQR --with-lqr=$with_lqr $have_lqr
3770 LZMA --with-lzma=$with_lzma $have_lzma
3771 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3772 OpenEXR --with-openexr=$with_openexr $have_openexr
3773 PANGO --with-pango=$with_pango $have_pango
3774 PERL --with-perl=$with_perl $have_perl
3775 PNG --with-png=$with_png $have_png
3776 RSVG --with-rsvg=$with_rsvg $have_rsvg
3777 TIFF --with-tiff=$with_tiff $have_tiff
3778 WEBP --with-webp=$with_webp $have_webp
3779 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
3780 WMF --with-wmf=$with_wmf $have_wmf
3781 X11 --with-x=$with_x $have_x
3782 XML --with-xml=$with_xml $have_xml
3783 ZLIB --with-zlib=$with_zlib $have_zlib
3786 X_CFLAGS = $X_CFLAGS
3787 X_PRE_LIBS = $X_PRE_LIBS
3789 X_EXTRA_LIBS = $X_EXTRA_LIBS
3791 Options used to compile and link:
3792 PREFIX = $PREFIX_DIR
3793 EXEC-PREFIX = $EXEC_PREFIX_DIR
3794 VERSION = $PACKAGE_VERSION
3797 CPPFLAGS = $MAGICK_CPPFLAGS
3798 PCFLAGS = $MAGICK_PCFLAGS
3801 MAGICK_LDFLAGS = $MAGICK_LDFLAGS
3804 CXXFLAGS = $CXXFLAGS
3805 FEATURES = $MAGICK_FEATURES