1 # Copyright 1999-2013 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
17 # Copying and distribution of this file, with or without modification,
18 # are permitted in any medium without royalty provided the copyright
19 # notice and this notice are preserved.
23 m4_define([magick_major_version], [7])
24 m4_define([magick_minor_version], [0])
25 m4_define([magick_micro_version], [0])
26 m4_define([magick_patchlevel_version], [0])
27 m4_define([magick_version],
28 [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
29 m4_define([magick_svn_revision], esyscmd([sh -c "(svnversion .) | awk '{ print \$1 }' | tr -d '\n'"]))
31 AC_INIT([ImageMagick],[magick_version],[http://www.imagemagick.org],[ImageMagick])
32 AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
33 AC_CONFIG_AUX_DIR([config])
34 AC_REQUIRE_AUX_FILE([tap-driver.sh])
35 AC_CONFIG_MACRO_DIR([m4])
36 AC_CONFIG_HEADERS([config/config.h])
37 AX_PREFIX_CONFIG_H([MagickCore/magick-baseconfig.h],[MagickCore])
40 config/configure.xml \
41 config/delegates.xml \
42 config/ImageMagick.rdf \
43 config/MagickCore.dox \
44 config/MagickWand.dox \
46 config/type-dejavu.xml \
47 config/type-ghostscript.xml \
48 config/type-windows.xml \
51 Magick++/bin/Magick++-config \
52 MagickCore/ImageMagick.pc \
53 Magick++/lib/ImageMagick++.pc \
54 Magick++/lib/Magick++.pc \
55 MagickCore/MagickCore-config \
56 MagickCore/MagickCore.pc \
57 MagickCore/version.h \
60 PerlMagick/Magick.pm \
61 PerlMagick/Makefile.PL \
65 utilities/composite.1 \
69 utilities/identify.1 \
70 utilities/ImageMagick.1 \
75 MagickWand/MagickWand-config \
76 MagickWand/MagickWand.pc ])
79 # Save initial user-tunable values
82 for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
83 eval isset=\${$var+set}
84 if test "$isset" = 'set'; then
86 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
89 AC_SUBST(DISTCHECK_CONFIG_FLAGS)
91 CONFIGURE_ARGS="$0 ${ac_configure_args}"
92 AC_SUBST(CONFIGURE_ARGS)
94 # Source file containing package/library versioning information.
95 . ${srcdir}/version.sh
97 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
103 MAGICK_TARGET_CPU=$host_cpu
104 AC_SUBST(MAGICK_TARGET_CPU)
105 AC_DEFINE_UNQUOTED(MAGICK_TARGET_CPU,$MAGICK_TARGET_CPU,[Target Host CPU])
107 MAGICK_TARGET_VENDOR=$host_vendor
108 AC_SUBST(MAGICK_TARGET_VENDOR)
109 AC_DEFINE_UNQUOTED(MAGICK_TARGET_VENDOR,$MAGICK_TARGET_VENDOR,[Target Host Vendor])
111 MAGICK_TARGET_OS=$host_os
112 AC_SUBST(MAGICK_TARGET_OS)
113 AC_DEFINE_UNQUOTED(MAGICK_TARGET_OS,$MAGICK_TARGET_OS,[Target Host OS])
115 # Substitute library versioning
116 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
117 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
118 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
119 AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
120 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
121 AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
122 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
123 AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision])
125 AC_SUBST(PACKAGE_NAME)dnl
126 AC_SUBST(PACKAGE_VERSION)dnl
127 AC_SUBST(PACKAGE_PERL_VERSION)dnl
128 AC_SUBST(PACKAGE_RELEASE)dnl
129 AC_SUBST(PACKAGE_CHANGE_DATE)dnl
130 AC_SUBST(PACKAGE_LIB_VERSION)dnl
131 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
132 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
133 AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
135 # Ensure that make can run correctly
138 AM_INIT_AUTOMAKE([1.12 color-tests foreign parallel-tests silent-rules subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip])
140 # Enable support for silent build rules
141 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
143 MAGICK_LIB_VERSION="0x"
144 if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
145 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
147 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
148 if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
149 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
151 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
152 if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
153 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
155 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
156 AC_SUBST(MAGICK_LIB_VERSION)
158 # Definition used to define MagickLibVersionText in version.h
159 MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
160 AC_SUBST(MAGICK_LIB_VERSION_TEXT)
162 # Definition used to define MagickLibVersionNumber in version.h
163 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
164 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
166 # Regenerate config.status if ChangeLog or version.sh is updated.
167 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
172 MAGICK_CPPFLAGS=$CPPFLAGS_USER
173 MAGICK_PCFLAGS=$CPPFLAGS_USER
179 # Evaluate shell variable equivalents to Makefile directory variables
181 if test "x$prefix" = xNONE; then
182 prefix=$ac_default_prefix
184 # Let make expand exec_prefix.
185 if test "x$exec_prefix" = xNONE; then
186 exec_prefix='${prefix}'
190 eval "eval PREFIX_DIR=${prefix}"
192 eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
193 AC_SUBST(EXEC_PREFIX_DIR)
194 eval "eval BIN_DIR=$bindir"
196 eval "eval SBIN_DIR=$sbindir"
198 eval "eval LIBEXEC_DIR=$libexecdir"
199 AC_SUBST(LIBEXEC_DIR)
200 eval "eval DATA_DIR=$datadir"
202 eval "eval DOC_DIR=$datadir/doc"
204 eval "eval SYSCONF_DIR=$sysconfdir"
205 AC_SUBST(SYSCONF_DIR)
206 eval "eval SHAREDSTATE_DIR=$sharedstatedir"
207 AC_SUBST(SHAREDSTATE_DIR)
208 eval "eval LOCALSTATE_DIR=$localstatedir"
209 AC_SUBST(LOCALSTATE_DIR)
210 eval "eval LIB_DIR=$libdir"
212 eval "eval INCLUDE_DIR=$includedir"
213 AC_SUBST(INCLUDE_DIR)
214 eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
215 AC_SUBST(PERSISTINCLUDE_DIR)
216 eval "eval INFO_DIR=$infodir"
218 eval "eval MAN_DIR=$mandir"
221 # Get full paths to source and build directories
222 srcdirfull="`cd $srcdir && pwd`"
226 # Compute variables useful for running uninstalled software.
228 MAGICK_CODER_MODULE_PATH="${builddir}/coders"
229 MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
230 MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
231 MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
233 case "${build_os}" in
235 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
236 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
237 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
238 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
247 AC_SUBST(MAGICK_CODER_MODULE_PATH)
248 AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
249 AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
250 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
255 # Enable OS features.
257 AC_USE_SYSTEM_EXTENSIONS
276 AX_GCC_ARCHFLAG([no])
279 # Check for linker script support
283 # Enable run-time checking.
285 AC_ARG_ENABLE([bounds-checking],
286 [AC_HELP_STRING([--enable-bounds-checking],
287 [enable run-time bounds-checking])],
288 [enable_bounds_checking=$enableval],
289 [enable_bounds_checking='no'])
291 if test "$enable_bounds_checking" = yes; then
292 AC_DEFINE([_FORTIFY_SOURCE], [2],
293 [enable run-time bounds-checking])
303 native_win32_build='no'
311 native_win32_build='yes'
315 if test "${GDI32_LIBS}x" != 'x'; then
316 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
319 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
320 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
321 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
322 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
324 WinPathScript="${srcdirfull}/winpath.sh"
325 AC_SUBST(WinPathScript)
328 # Compiler flags tweaks
330 if test "${GCC}" != "yes"; then
333 # aCC: HP ANSI C++ B3910B A.03.34
334 CFLAGS="${CFLAGS} -Wp,-H30000"
335 if test -n "${CXXFLAGS}"; then
338 CXXFLAGS="${CXXFLAGS} -AA"
342 # Compaq alphaev68-dec-osf5.1 compiler
343 if test -n "${CXXFLAGS}"; then
344 CXXFLAGS='-std strict_ansi -noimplicit_include'
346 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
351 # Check for lazy-loading.
352 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
354 im_cv_ld_lazyload='none'
356 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
357 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
358 im_cv_ld_lazyload='-Wl,-zlazyload'
363 if test "${im_cv_ld_lazyload}" != 'none' ; then
364 if test -z "${LDFLAGS}" ; then
365 LDFLAGS="${im_cv_ld_lazyload}"
367 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
371 dnl Platform-specific stuff
373 *darwin* | *-macos10*)
374 dnl OS X universal binary support, requires --disable-dependency-tracking
375 AC_ARG_ENABLE([osx-universal-binary],
376 AC_HELP_STRING([--enable-osx-universal-binary],
377 [build universal binary on OS X [[default=no]]]),
378 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
380 if test "${build_osxuniversal}" != no ; then
381 if test "$enable_dependency_tracking" != no ; then
382 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
383 Please re-run configure with these options:
384 --disable-dependency-tracking --enable-osx-universal-binary
387 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
388 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
389 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
395 # ARCH specific include directory
397 AC_ARG_WITH([includearch-dir],
398 [AC_HELP_STRING([--includearch-dir=DIR],
399 [ARCH specific include directory])],
400 [includearch_dir=$withval],
401 [includearch_dir=$INCLUDE_DIR])
403 eval "eval INCLUDEARCH_DIR=$includearch_dir"
404 AC_SUBST(INCLUDEARCH_DIR)
407 # ARCH specific configuration directory
409 AC_ARG_WITH([sharearch-dir],
410 [AC_HELP_STRING([--sharearch-dir=DIR],
411 [ARCH specific config directory])],
412 [sharearch_dir=$withval],
413 [sharearch_dir="${LIB_DIR}"])
415 eval "eval SHAREARCH_DIR=$sharearch_dir"
416 SHAREARCH_DIR="$sharearch_dir"
417 AC_SUBST(SHAREARCH_DIR)
420 # Enable support for threads
421 AC_ARG_WITH([threads],
422 [AC_HELP_STRING([--without-threads], [disable threads support])],
423 [with_threads=$withval],
424 [with_threads='yes'])
427 if test "$with_threads" != 'no'; then
429 if test "$ax_pthread_ok" = yes; then
431 DEF_THREAD="$PTHREAD_CFLAGS"
432 CFLAGS="$CFLAGS $DEF_THREAD"
433 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
434 if test "$CC" != "$PTHREAD_CC"; then
435 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
438 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
442 # Enable support for OpenMP
443 if test "$have_threads" != 'yes'; then
444 ac_cv_prog_c_openmp=unsupported
447 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
448 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
449 AC_SUBST(OPENMP_CFLAGS)
450 if test "$enable_openmp" != no; then
451 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
452 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
456 # Enable support for OpenCL
458 CFLAGS="$CL_CFLAGS $CFLAGS"
459 LIBS="$CL_LIBS $LIBS"
461 if test "$enable_opencl" != no; then
462 if test "X$ax_cv_check_cl_libcl" != Xno; then :
463 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
469 # Check for large file support
475 if test "$enable_largefile" != no; then
476 case $ac_cv_sys_file_offset_bits in
478 # nothing to do here as the host supports LFS fine
481 AC_MSG_CHECKING([for native large file support])
482 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
484 exit(!(sizeof(off_t) == 8));
486 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
487 AC_MSG_NOTICE([yes])],
488 [AC_MSG_NOTICE([no])])
491 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
494 if test "$ac_cv_sys_large_files" != 'no'; then
495 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
497 if test "$ac_cv_sys_largefile_source" != 'no'; then
498 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
501 AC_SUBST(LFS_CPPFLAGS)
507 AC_SUBST(LIBTOOL_DEPS)
509 # Check to see if building shared libraries
510 libtool_build_shared_libs='no'
511 if test "$enable_shared" = 'yes'; then
512 libtool_build_shared_libs='yes'
515 # Check to see if building static libraries
516 libtool_build_static_libs='no'
517 if test "$enable_static" = 'yes'; then
518 libtool_build_static_libs='yes'
521 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
523 # Enable support for building loadable modules
526 AC_ARG_WITH([modules],
527 [AC_HELP_STRING([--with-modules],
528 [enable building dynamically loadable modules])],
529 [with_modules=$withval],
532 # Only allow building loadable modules if we are building shared libraries
533 if test "$with_modules" != 'no' ; then
534 if test "$libtool_build_shared_libs" = 'no'; then
535 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
541 if test "$build_modules" != 'no' ; then
542 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
544 AM_CONDITIONAL(WITH_MODULES, test "$build_modules" != 'no')
546 # Enable build using delegate libraries built in subdirectories rather than installed
547 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
548 AC_ARG_ENABLE([delegate-build],
549 [AC_HELP_STRING([--enable-delegate-build],
550 [look for delegate libraries in build directory])],
551 [enable_delegate_build=$enableval],
552 [enable_delegate_build='no'])
554 AC_ARG_ENABLE([deprecated],
555 [AC_HELP_STRING([--disable-deprecated],
556 [exclude deprecated methods in MagickCore and MagickWand APIs])],
557 [enable_deprecated=$enableval],
558 [enable_deprecated='no'])
560 if test "$enable_deprecated" = 'yes'; then
561 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
563 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
566 # Build a version of ImageMagick which operates uninstalled.
567 # Used to build distributions located via MAGICK_HOME / executable path
568 AC_ARG_ENABLE([installed],
569 [AC_HELP_STRING([--disable-installed],
570 [Formally install ImageMagick under PREFIX])],
571 [enable_installed=$enableval],
572 [enable_installed='yes'])
574 if test "$enable_installed" = 'yes'; then
575 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
577 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
580 # Permit enciphering and deciphering image pixels.
581 AC_ARG_ENABLE([cipher],
582 [AC_HELP_STRING([--disable-cipher],
583 [disable enciphering and deciphering image pixels])],
584 [enable_cipher=$enableval],
585 [enable_cipher='yes'])
587 if test "$enable_cipher" = 'yes'; then
588 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
591 # Build a zero-configuration version of ImageMagick.
592 AC_ARG_ENABLE([zero-configuration],
593 [AC_HELP_STRING([--enable-zero-configuration],
594 [enable self-contained, embeddable, zero-configuration ImageMagick])],
595 [enable_zero_configuration=$enableval],
596 [enable_zero_configuration='no'])
598 if test "$enable_zero_configuration" = 'yes'; then
599 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
600 MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES"
603 # Build a high dynamic range version of ImageMagick.
604 AC_ARG_ENABLE([hdri],
605 [AC_HELP_STRING([--enable-hdri],
606 [accurately represent the wide range of intensity levels found in real scenes])],
607 [enable_hdri=$enableval],
611 if test "$enable_hdri" = 'yes'; then
613 AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
614 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
616 AC_SUBST(MAGICK_HDRI)dnl
618 # Build a version of ImageMagick with assert statements.
619 AC_ARG_ENABLE([assert],
620 [AC_HELP_STRING([--disable-assert],
621 [disable assert() statements in build])],
622 [enable_assert=$enableval],
623 [enable_assert='yes'])
625 if test "$enable_assert" = 'no'; then
626 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
629 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
632 # Enable ccmalloc memory debugging support
633 AC_ARG_ENABLE([ccmalloc],
634 [AC_HELP_STRING([--enable-ccmalloc],
635 [enable 'ccmalloc' memory debug support])],
636 [enable_ccmalloc=$enableval],
637 [enable_ccmalloc='no'])
639 # Enable Electric Fence memory debugging support
640 AC_ARG_ENABLE([efence],
641 [AC_HELP_STRING([--enable-efence],
642 [enable 'efence' memory debug support])],
643 [enable_efence=$enableval],
644 [enable_efence='no'])
646 # Enable prof-based profiling support
647 AC_ARG_ENABLE([prof],
648 [AC_HELP_STRING([--enable-prof],
649 [enable 'prof' profiling support])],
650 [enable_prof=$enableval],
653 # Enable gprof-based profiling support
654 AC_ARG_ENABLE([gprof],
655 [AC_HELP_STRING([--enable-gprof],
656 [enable 'gprof' profiling support])],
657 [enable_gprof=$enableval],
660 # Enable gcov-based profiling support
661 AC_ARG_ENABLE([gcov],
662 [AC_HELP_STRING([--enable-gcov],
663 [enable 'gcov' profiling support])],
664 [enable_gcov=$enableval],
667 enable_profiling='no'
668 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
669 enable_profiling='yes'
670 if test "$libtool_build_shared_libs" = 'yes'; then
671 echo "Warning: Can not profile code using shared libraries"
675 # Magick API method prefix
676 AC_ARG_WITH([method-prefix],
677 [AC_HELP_STRING([--with-method-prefix=PREFIX],
678 [prefix MagickCore API methods])],
679 [with_method_prefix=$withval],
680 [with_method_prefix='no'])
682 if test "$with_method_prefix" != 'no'; then
683 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
684 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
687 # Enable legacy support (default no)
688 AC_ARG_ENABLE(legacy-support,
689 [ --enable-legacy-support install legacy command-line utilities (default disabled)],
690 [with_legacy_support=$enableval],
691 [with_legacy_support='no'])
692 AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no')
694 # Number of bits in a Quantum
695 AC_ARG_WITH([quantum-depth],
696 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
697 [number of bits in a pixel quantum (default 16)])],
698 [with_quantum_depth=$withval],
699 [with_quantum_depth=16])
701 if test "$with_quantum_depth" != '8'; then
702 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
705 case "${with_quantum_depth}" in
710 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
712 QUANTUM_DEPTH="$with_quantum_depth"
713 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
714 AC_SUBST(QUANTUM_DEPTH)dnl
716 # define a lib suffix for abi purpose
717 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}"
718 if test "$enable_hdri" = 'yes'; then
719 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}${MAGICK_HDRI}"
721 AC_SUBST(MAGICK_ABI_SUFFIX)
723 # Set pixel cache threshold
725 [AC_HELP_STRING([--with-cache=THRESHOLD],
726 [set pixel cache threshhold in MB (default available memory)])],
727 [with_cache=$withval],
730 if test "$with_cache" != ''; then
731 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
732 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
735 # Disable/Enable support for full delegate paths
736 AC_ARG_WITH([frozenpaths],
737 [AC_HELP_STRING([--with-frozenpaths],
738 [freeze delegate paths])],
739 [with_frozenpaths=$withval],
740 [with_frozenpaths='no'])
742 # Enable build/install of Magick++
743 AC_ARG_WITH([magick-plus-plus],
744 [AC_HELP_STRING([--without-magick-plus-plus],
745 [disable build/install of Magick++])],
746 [with_magick_plus_plus=$withval],
747 [with_magick_plus_plus='yes'])
749 # Encode the this name into the shared library.
750 AC_ARG_WITH([package-release-name],
751 [AC_HELP_STRING([--with-package-release-name=NAME],
752 [encode this name into the shared library])],
753 [MAGICK_LT_RELEASE_OPTS="-release $withval"])
754 AC_SUBST(MAGICK_LT_RELEASE_OPTS)
756 # Disable build/install of PerlMagick.
758 [AC_HELP_STRING([--with-perl],
759 [enable build/install of PerlMagick])],
760 [with_perl=$withval],
763 # Options to pass when configuring PerlMagick
764 AC_ARG_WITH([perl-options],
765 [AC_HELP_STRING([--with-perl-options=OPTIONS],
766 [options to pass on command-line when generating PerlMagick build file])],
767 PERL_MAKE_OPTIONS=$withval)
768 AC_SUBST(PERL_MAKE_OPTIONS)
770 # Enable umem, object-caching memory allocation library.
772 [ --with-umem enable umem memory allocation library support],
773 [with_umem=$withval],
775 if test "$with_umem" != 'yes' ; then
776 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
780 # Specify path to shared libstdc++ if not in normal location
782 AC_ARG_WITH([libstdc],
783 [AC_HELP_STRING([--with-libstdc=DIR],
784 [ use libstdc++ in DIR (for GNU C++)])],
785 [with_libstdc=$withval],
788 if test "$with_libstdc" != ''; then
789 if test -d "$with_libstdc"; then
790 LIBSTDCLDFLAGS="-L$with_libstdc"
793 AC_SUBST(LIBSTDCLDFLAGS)
795 # Does gcc required -traditional?
796 AC_PROG_GCC_TRADITIONAL
800 # Set defines required to build DLLs and modules using MinGW
803 # These options are set for multi-thread DLL module build
804 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
806 # executable/Magick++: _DLL _MAGICKMOD_
807 MODULE_EXTRA_CPPFLAGS=''
808 LIBRARY_EXTRA_CPPFLAGS=''
809 if test "${native_win32_build}" = 'yes'; then
810 if test "${libtool_build_shared_libs}" = 'yes'; then
811 CPPFLAGS="$CPPFLAGS -D_DLL"
812 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
813 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
814 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
815 if test "$build_modules" = 'yes'; then
816 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
818 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
821 CPPFLAGS="$CPPFLAGS -D_LIB"
822 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
823 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
825 if test "$with_threads" = 'yes'; then
826 CPPFLAGS="$CPPFLAGS -D_MT"
827 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
828 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
831 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
832 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
834 # Check standard headers
836 if ! test x"$ac_cv_header_stdc" = x"yes"; then
837 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
838 header files. Compilation cannot proceed. Please install the ANSI C
839 headers and rerun this script.]);
844 # Check additional headers
845 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 sun_prefetch.h stdarg.h sys/ipc.h sys/mman.h sys/resource.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h xlocale.h)
849 # Checks for typedefs, structures, and compiler characteristics.
862 # If the C compiler supports the keyword inline, do nothing. Otherwise
863 # define inline to __inline__ or __inline if it accepts one of those,
864 # otherwise define inline to be empty.
867 # If the C compiler supports the keyword restrict, do nothing. Otherwise
868 # define restrict to __restrict__ or __restrict if it accepts one of those,
869 # otherwise define restrict to be empty.
872 # If words are stored with the most significant byte first (like
873 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
876 # Define to a suitable type, if standard headers do not define it.
884 AC_TYPE_LONG_DOUBLE_WIDER
885 AC_TYPE_LONG_LONG_INT
899 AC_TYPE_UNSIGNED_LONG_LONG_INT
901 # If the C type char is unsigned, define __CHAR_UNSIGNED__, unless the
902 # C compiler predefines it.
905 # Float_t and double_t are intended to be the the most efficient type.
906 AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]])
907 AC_CHECK_TYPES([double_t], [], [], [[#include <math.h>]])
908 AC_CHECK_SIZEOF([float_t], [], [[#include <math.h>]])
909 AC_CHECK_SIZEOF([double_t], [], [[#include <math.h>]])
911 # Get size of float, double and long double for comparaison.
912 AC_CHECK_SIZEOF([float])
913 AC_CHECK_SIZEOF([double])
914 AC_CHECK_SIZEOF([long double])
916 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
917 AC_CHECK_SIZEOF(signed short)
919 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
920 AC_CHECK_SIZEOF(unsigned short)
922 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
923 AC_CHECK_SIZEOF(signed int)
925 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
926 AC_CHECK_SIZEOF(unsigned int)
928 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
929 AC_CHECK_SIZEOF(signed long)
931 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
932 AC_CHECK_SIZEOF(unsigned long)
934 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
935 # 'signed long long' is not supported then the value defined is zero.
936 AC_CHECK_SIZEOF(signed long long)
938 # Obtain size of a 'unsigned long long' and define as
939 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
940 # supported then the value defined is zero.
941 AC_CHECK_SIZEOF(unsigned long long)
943 # Obtain size of off_t and define as SIZEOF_OFF_T
944 AC_CHECK_SIZEOF(off_t)
946 # Obtain size of size_t and define as SIZEOF_SIZE_T
947 AC_CHECK_SIZEOF(size_t)
949 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
950 AC_CHECK_SIZEOF(ssize_t)
952 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
953 AC_CHECK_SIZEOF(unsigned int*)
956 # Compute sized types for current CPU and compiler options.
959 AC_MSG_CHECKING(for signed 8-bit type)
961 AC_MSG_NOTICE($INT8_T)
964 AC_MSG_CHECKING(for unsigned 8-bit type)
965 UINT8_T='unsigned char'
966 AC_MSG_NOTICE($UINT8_T)
969 AC_MSG_CHECKING(for signed 16-bit type)
970 INT16_T='signed short'
971 AC_MSG_NOTICE($INT16_T)
974 AC_MSG_CHECKING(for unsigned 16-bit type)
975 UINT16_T='unsigned short'
976 AC_MSG_NOTICE($UINT16_T)
979 AC_MSG_CHECKING(for signed 32-bit type)
982 if test $ac_cv_sizeof_signed_int -eq 4; then
985 elif test $ac_cv_sizeof_signed_long -eq 4; then
986 INT32_T='signed long'
989 AC_MSG_NOTICE($INT32_T)
993 AC_MSG_CHECKING(for unsigned 32-bit type)
996 if test $ac_cv_sizeof_unsigned_int -eq 4; then
997 UINT32_T='unsigned int'
999 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
1000 UINT32_T='unsigned long'
1003 AC_MSG_NOTICE($UINT32_T)
1007 AC_MSG_CHECKING(for signed 64-bit type)
1010 if test $ac_cv_sizeof_signed_long -eq 8; then
1011 INT64_T='signed long'
1013 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
1014 INT64_T='signed long long'
1017 case "${host_os}" in
1022 AC_MSG_NOTICE($INT64_T)
1026 AC_MSG_CHECKING(for unsigned 64-bit type)
1029 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1030 UINT64_T='unsigned long'
1032 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1033 UINT64_T='unsigned long long'
1036 case "${host_os}" in
1041 AC_MSG_NOTICE($UINT64_T)
1045 AC_MSG_CHECKING(for unsigned maximum type)
1048 if test "$UINT64_T" != 'none'; then
1051 elif test "$UINT32_T" != 'none'; then
1055 AC_MSG_NOTICE($UINTMAX_T)
1059 AC_MSG_CHECKING(for pointer difference type)
1062 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1063 UINTPTR_T='unsigned long'
1065 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1066 UINTPTR_T='unsigned long long'
1069 AC_MSG_NOTICE($UINTPTR_T)
1073 AC_MSG_CHECKING([whether our compiler supports __func__])
1075 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1076 AC_MSG_NOTICE([yes]),
1078 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1080 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1081 AC_MSG_NOTICE([yes])
1082 AC_DEFINE(__func__, __FUNCTION__,
1083 [Define to appropriate substitue if compiler does not have __func__]),
1085 AC_DEFINE(__func__, __FILE__,
1086 [Define to appropriate substitue if compiler does not have __func__])))
1090 # Check for functions
1093 MAGICK_FUNC_MMAP_FILEIO
1094 AC_FUNC_CLOSEDIR_VOID
1098 AC_FUNC_SELECT_ARGTYPES
1099 AC_FUNC_SETVBUF_REVERSED
1109 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1110 LIBS="$MATH_LIBS $LIBS"
1113 AC_CHECK_FUNCS([acosh _aligned_malloc 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 isnan 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])
1116 # Check for clock_gettime().
1118 AC_SEARCH_LIBS(clock_gettime, rt,
1120 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1121 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1124 [[#include <time.h>]],
1125 [[clockid_t clockType = CLOCK_REALTIME;]])],
1128 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1129 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1135 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1141 # Check for function prototypes
1145 AC_CHECK_DECLS([pread, pwrite],[],[],[
1146 #include <unistd.h>])
1148 AC_CHECK_DECLS([strlcpy],[],[],[
1149 #include <strings.h>])
1151 AC_CHECK_DECLS([vsnprintf],[],[],[
1153 #include <stdarg.h>])
1157 # C++ Support Tests (For Magick++)
1160 have_magick_plus_plus='no'
1161 if test "$with_magick_plus_plus" = 'yes'; then
1166 # Full set of headers used...
1167 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1168 # functional iomanip iosfwd iostream iterator list string strstream utility
1173 AX_CXX_NAMESPACE_STD
1174 AC_CXX_HAVE_STD_LIBS
1178 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1180 test $ax_cv_cxx_bool = 'yes' && \
1181 test $ax_cv_cxx_namespaces = 'yes' && \
1182 test $ac_cv_cxx_have_std_libs = 'yes' && \
1183 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1184 have_magick_plus_plus='yes'
1186 have_magick_plus_plus='no (failed tests)'
1188 AC_MSG_NOTICE([$have_magick_plus_plus])
1191 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1193 # Only check for delegate libraries in subdirectories if requested.
1194 if test "$enable_delegate_build" != 'no'; then
1195 # Check for delegate sub-directories and add -I & -L options as required.
1196 # This presumes that delegates are installed as detailed in the ImageMagick
1197 # README. If delegates are installed in a standard location where the
1198 # compiler will automatically find them then these options should not be
1202 # Most delegates have includes in the same directory as the library, but not all...
1205 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 webp wmf/include xml/include zlib; do
1206 if test -d "$builddir/$dir"; then
1207 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1209 if test -d "$srcdirfull/$dir"; then
1210 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1216 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 webp wmf/src xml zlib; do
1217 if test -d "$builddir/$dir/.libs"; then
1218 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1220 if test -d "$srcdirfull/$dir/.libs"; then
1221 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1224 if test -d "$builddir/$dir"; then
1225 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1227 if test -d "$srcdirfull/$dir"; then
1228 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1234 # Assume that delegate headers reside under same directory as ImageMagick
1235 # installation prefix.
1236 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/ImageMagick $MAGICK_CPPFLAGS"
1239 # Find the X11 RGB database
1241 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1242 [# Look for the header file in a standard set of common directories.
1243 # Check X11 before X11Rn because it is often a symlink to the current release.
1252 /usr/XFree86/lib/X11 \
1260 /usr/local/X11/lib \
1261 /usr/local/X11R4/lib \
1262 /usr/local/X11R5/lib \
1263 /usr/local/X11R6/lib \
1265 /usr/local/lib/X11 \
1266 /usr/local/lib/X11R4 \
1267 /usr/local/lib/X11R5 \
1268 /usr/local/lib/X11R6 \
1269 /usr/local/lib/X11R7 \
1270 /usr/local/x11r5/lib \
1271 /usr/lpp/Xamples/lib \
1273 /usr/openwin/share/lib \
1274 /usr/unsupported/lib \
1277 if test -f "$ac_dir/X11/rgb.txt"; then
1278 im_cv_x_configure="$ac_dir/X11/"
1280 elif test -f "$ac_dir/rgb.txt"; then
1281 im_cv_x_configure="$ac_dir/"
1286 X11_CONFIGURE_PATH="$im_cv_x_configure"
1287 case "${build_os}" in
1289 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1292 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",[Location of X11 configure files])
1295 # Find OpenMP library
1298 if test "$enable_openmp" != 'no'; then
1299 if test "${GCC}" = "yes"; then
1300 # Open64 (passes for GCC but uses different OpenMP implementation)
1301 if test "x$GOMP_LIBS" = x ; then
1302 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1303 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1307 if test "x$GOMP_LIBS" = x ; then
1308 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1312 if test "x$GOMP_LIBS" = x ; then
1313 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1316 if test "x$GOMP_LIBS" = x ; then
1317 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1319 # SGI IRIX 6.5 MIPSpro C/C++
1320 if test "x$GOMP_LIBS" = x ; then
1321 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1324 LIBS="$GOMP_LIBS $LIBS"
1329 # Find Posix threads library
1332 if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then
1334 if test "x$PTHREAD_LIBS" = "x"; then
1335 case "${host_cpu}-${host_os}" in
1337 MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;;
1341 for lib in pthread pthreads; do
1342 if test "x$PTHREAD_LIBS" = "x"; then
1343 MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib])
1347 THREAD_LIBS="$PTHREAD_LIBS"
1348 LIBS="$LIBS $THREAD_LIBS"
1350 AC_SUBST(THREAD_LIBS)
1357 if test "$with_umem" != 'no'; then
1358 AC_MSG_CHECKING(for UMEM support )
1362 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1363 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1364 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1365 AC_MSG_CHECKING(if umem memory allocation library is complete)
1366 if test $passed -gt 0; then
1367 if test $failed -gt 0; then
1368 AC_MSG_NOTICE(no -- some components failed test)
1369 have_umem='no (failed tests)'
1372 LIBS="$UMEM_LIBS $LIBS"
1373 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1381 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1385 # Add support for ccmalloc memory debugging library if requested
1389 if test "$enable_ccmalloc" = 'yes'; then
1390 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1391 if test -n "$CCMALLOCDelegate"; then
1392 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1394 # Assume that gcc is used with ccmalloc.
1395 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1396 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1397 if test -n "$CCMALLOC_LIBS"; then
1399 LIBS="$LIBS $CCMALLOC_LIBS"
1408 # Add support for efence memory debugging library if requested
1410 if test "$enable_efence" = 'yes'; then
1411 EFENCE_LIBS='-lefence'
1412 LIBS="$EFENCE_LIBS $LIBS"
1415 dnl ===========================================================================
1421 AC_ARG_WITH([bzlib],
1422 [AC_HELP_STRING([--without-bzlib],
1423 [disable BZLIB support])],
1424 [with_bzlib=$withval],
1427 if test "$with_bzlib" != 'yes'; then
1428 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1432 if test "$with_bzlib" != 'no'; then
1434 AC_MSG_NOTICE([-------------------------------------------------------------])
1435 AC_MSG_CHECKING([for BZLIB])
1440 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1441 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1442 if test "$native_win32_build" = 'yes'; then
1443 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1445 if test $found_libbz -gt 0; then
1446 passed=`expr $passed + 1`
1448 failed=`expr $failed + 1`
1450 AC_MSG_CHECKING(if BZLIB package is complete)
1451 if test $passed -gt 0; then
1452 if test $failed -gt 0; then
1453 AC_MSG_NOTICE(no -- some components failed test)
1454 have_bzlib='no (failed tests)'
1457 LIBS="$BZLIB_LIBS $LIBS"
1458 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1466 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1467 AC_SUBST(BZLIB_LIBS)
1470 # Find the X11 include and library directories.
1477 if test "$no_x" != 'yes'; then
1478 AC_MSG_NOTICE([-------------------------------------------------------------])
1479 AC_MSG_CHECKING([for X11])
1481 LDFLAGS="$LDFLAGS $X_LIBS"
1482 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1483 LIBS="$X11_LIBS $LIBS"
1484 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1486 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1489 # Check for X11 shared memory extension
1491 # shmctl is required to support the shared memory extension
1492 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1493 if test "$have_shmctl" != 'yes'; then
1495 LIBS="$LIBS -lcygipc"
1496 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1500 if test "$have_shmctl" = 'yes'; then
1501 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1505 # Check for X11 shape extension
1507 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1508 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1509 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1511 if test "$no_x" != 'yes'; then
1516 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1520 dnl ===========================================================================
1526 [AC_HELP_STRING([--without-zlib],
1527 [disable ZLIB support])],
1528 [with_zlib=$withval],
1531 if test "$with_zlib" != 'yes'; then
1532 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1537 dnl PNG requires zlib so enable zlib check if PNG is requested
1538 if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
1539 AC_MSG_NOTICE([-------------------------------------------------------------])
1540 AC_MSG_CHECKING([for ZLIB])
1545 AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1546 AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1547 AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1548 AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1549 AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1550 AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1551 AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1552 AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1553 AC_MSG_CHECKING([if ZLIB package is complete])
1554 if test $passed -gt 0; then
1555 if test $failed -gt 0; then
1556 AC_MSG_NOTICE([no -- some components failed test])
1557 have_zlib='no (failed tests)'
1560 LIBS="$ZLIB_LIBS $LIBS"
1561 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
1562 AC_MSG_NOTICE([yes])
1569 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1572 # whether modules are built or not.
1576 if test "$build_modules" != 'no' ; then
1577 AC_MSG_NOTICE([-------------------------------------------------------------])
1578 AC_MSG_CHECKING([for libltdl])
1582 AC_CHECK_HEADER([ltdl.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1583 AC_CHECK_LIB([ltdl],[lt_dlinit],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1584 AC_MSG_CHECKING([if libltdl package is complete])
1585 if test $passed -gt 0 ; then
1586 if test $failed -gt 0 ; then
1587 AC_MSG_RESULT([no -- some components failed test])
1588 have_ltdl='no (failed tests)'
1591 LIBS="$LTDL_LIBS $LIBS"
1592 AC_DEFINE(LTDL_DELEGATE,1,[Define if using libltdl to support dynamically loadable modules])
1593 AC_MSG_RESULT([yes])
1599 if test "$have_ltdl" != 'yes' ; then
1600 AC_MSG_FAILURE([libltdl is required for modules build],[1])
1603 AM_CONDITIONAL(WITH_LTDL, test "$have_ltdl" != 'no')
1606 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1609 if test "$enable_profiling" = 'yes'; then
1610 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1611 LIBS="$LIB_DL $LIBS"
1615 dnl ===========================================================================
1618 # Check for Autotrace delegate library.
1620 AC_ARG_WITH([autotrace],
1621 [AC_HELP_STRING([--with-autotrace],
1622 [enable autotrace support])],
1623 [with_autotrace=$withval],
1624 [with_autotrace='no'])
1626 if test "$with_autotrace" != 'yes'; then
1627 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1634 if test "x$with_autotrace" = "xyes"; then
1635 AC_MSG_NOTICE([-------------------------------------------------------------])
1636 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1640 if test "$have_autotrace" = 'yes'; then
1642 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1643 if test "$build_modules" = 'no'; then
1644 CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
1648 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1649 AC_SUBST(AUTOTRACE_CFLAGS)
1650 AC_SUBST(AUTOTRACE_LIBS)
1652 dnl ===========================================================================
1655 # Check for Display Postscript delegate library.
1658 [AC_HELP_STRING([--without-dps],
1659 [disable Display Postscript support])],
1660 [with_dps=$withval],
1663 if test "$with_dps" != 'yes'; then
1664 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1669 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1670 AC_MSG_NOTICE([-------------------------------------------------------------])
1671 AC_MSG_CHECKING([for DPS])
1675 PERSIST_CPPFLAGS="$CPPFLAGS"
1676 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1677 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1679 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1680 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1681 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1682 # ImageMagick itself doesn't use -lXt.
1685 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1686 if test "$have_libdps" != 'yes'; then
1687 # Unset cache variable so we can try again.
1688 unset ac_cv_lib_dps_DPSInitialize
1689 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1690 if test "$have_libdps" = 'yes'; then
1694 if test "$have_libdps" = 'yes'; then
1695 passed=`expr $passed + 1`
1697 failed=`expr $failed + 1`
1699 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1700 AC_MSG_CHECKING([if DPS package is complete])
1701 if test $passed -gt 0; then
1702 if test $failed -gt 0; then
1703 AC_MSG_NOTICE([no -- some components failed test])
1704 have_dps='no (failed tests)'
1705 CPPFLAGS="$PERSIST_CPPFLAGS"
1707 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1708 LIBS="$DPS_LIBS $LIBS"
1709 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1710 AC_MSG_NOTICE([yes])
1715 CPPFLAGS=$PERSIST_CPPFLAGS
1718 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1721 dnl ===========================================================================
1724 # Check for DJVU delegate library.
1727 [AC_HELP_STRING([--without-djvu],
1728 [disable DjVu support])],
1729 [with_djvu=$withval],
1732 if test "$with_djvu" != 'yes'; then
1733 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1738 if test "$with_djvu" != 'no'; then
1739 AC_MSG_NOTICE([-------------------------------------------------------------])
1740 AC_MSG_CHECKING([for DJVU])
1744 AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1745 AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1746 AC_MSG_CHECKING([if DJVU package is complete])
1747 if test $passed -gt 0; then
1748 if test $failed -gt 0; then
1749 AC_MSG_NOTICE([no -- some components failed test])
1750 have_djvu='no (failed tests)'
1752 DJVU_LIBS='-ldjvulibre'
1753 LIBS="$DJVU_LIBS $LIBS"
1754 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1755 AC_MSG_NOTICE([yes])
1762 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1765 dnl ===========================================================================
1768 # Set DejaVu font directory.
1770 AC_ARG_WITH([dejavu-font-dir],
1771 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1772 [DejaVu font directory])],
1773 [with_dejavu_font_dir=$withval],
1774 [with_dejavu_font_dir='default'])
1776 if test "$with_dejavu_font_dir" != 'default'; then
1777 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1780 dnl ===========================================================================
1783 # Check for FFTW delegate library.
1786 [AC_HELP_STRING([--without-fftw],
1787 [disable FFTW support])],
1788 [with_fftw=$withval],
1791 if test "$with_fftw" != 'yes'; then
1792 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1797 if test "$with_fftw" != 'no'; then
1798 AC_MSG_NOTICE([-------------------------------------------------------------])
1799 AC_MSG_CHECKING([for FFTW])
1803 AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1804 AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1805 AC_MSG_CHECKING([if FFTW package is complete])
1806 if test $passed -gt 0; then
1807 if test $failed -gt 0; then
1808 AC_MSG_NOTICE([no -- some components failed test])
1809 have_fftw='no (failed tests)'
1812 LIBS="$FFTW_LIBS $LIBS"
1813 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1814 AC_MSG_NOTICE([yes])
1821 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1824 dnl ===========================================================================
1827 # Check for FlashPIX delegate library.
1830 [AC_HELP_STRING([--without-fpx],
1831 [disable FlashPIX support])],
1832 [with_fpx=$withval],
1835 if test "$with_fpx" != 'yes'; then
1836 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1841 if test "$with_fpx" != 'no'; then
1842 AC_MSG_NOTICE([-------------------------------------------------------------])
1843 AC_MSG_CHECKING([for FlashPIX])
1848 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1849 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1851 AC_MSG_CHECKING([if FlashPIX package is complete])
1852 if test $passed -gt 0; then
1853 if test $failed -gt 0; then
1854 AC_MSG_NOTICE([no -- some components failed test])
1855 have_fpx='no (failed tests)'
1858 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1859 AC_MSG_NOTICE([yes])
1867 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1870 dnl ===========================================================================
1873 # Check for fontconfig delegate library.
1875 AC_ARG_WITH([fontconfig],
1876 [AC_HELP_STRING([--without-fontconfig],
1877 [disable fontconfig support])],
1878 [with_fontconfig=$withval],
1879 [with_fontconfig='yes'])
1881 if test "$with_fontconfig" != 'yes'; then
1882 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
1885 have_fontconfig='no'
1886 FONTCONFIG_CFLAGS=""
1889 if test "x$with_fontconfig" = "xyes"; then
1890 AC_MSG_NOTICE([-------------------------------------------------------------])
1891 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
1895 if test "$have_fontconfig" = 'yes'; then
1896 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
1897 if test "$build_modules" = 'no'; then
1898 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1902 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
1903 AC_SUBST(FONTCONFIG_CFLAGS)
1904 AC_SUBST(FONTCONFIG_LIBS)
1906 dnl ===========================================================================
1909 # Check for freetype delegate library.
1911 AC_ARG_WITH([freetype],
1912 [AC_HELP_STRING([--without-freetype],
1913 [disable Freetype support])],
1914 [with_freetype=$withval],
1915 [with_freetype='yes'])
1918 if test "$with_freetype" != 'yes'; then
1919 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
1924 if test "$with_freetype" != 'no'; then
1925 AC_MSG_NOTICE([-------------------------------------------------------------])
1926 AC_MSG_CHECKING(for FreeType 2.0 )
1930 PERSIST_LDFLAGS="$LDFLAGS"
1931 PERSIST_CPPFLAGS="$CPPFLAGS"
1933 # Allow the user to specify the location of freetype.
1934 if test "$with_freetype" != 'yes'; then
1935 if test -x "${with_freetype}/bin/freetype-config"; then
1936 freetype_config="${with_freetype}/bin/freetype-config"
1937 elif test -x "${with_freetype}"; then
1938 freetype_config=${with_freetype}
1941 if test -z "$freetype_config"; then
1942 AC_PATH_PROG(freetype_config,freetype-config,)dnl
1944 if test -n "$freetype_config"; then
1945 freetype_prefix=`${freetype_config} --prefix`
1946 freetype_exec_prefix=`${freetype_config} --exec-prefix`
1947 LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
1948 CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
1951 dnl First see if there is a library
1952 if test "$FREETYPE_LIBS" = ''; then
1953 AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,)
1954 if test "$FREETYPE_LIBS" != ''; then
1955 passed=`expr $passed + 1`
1957 failed=`expr $failed + 1`
1958 LDFLAGS="$PERSIST_LDFLAGS"
1962 dnl Now test for the headers
1963 AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include <ft2build.h>'],[ft2build=''],[])
1964 AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H])
1965 if test "$have_freetype_h" = 'yes'; then
1966 passed=`expr $passed + 1`
1968 failed=`expr $failed + 1`
1969 CPPFLAGS="$PERSIST_CPPFLAGS"
1972 AC_MSG_CHECKING(if FreeType package is complete)
1973 if test $passed -gt 0; then
1974 if test $failed -gt 0; then
1976 AC_MSG_NOTICE(no -- some components failed test)
1977 have_freetype='no (failed tests)'
1979 LIBS="$FREETYPE_LIBS $LIBS"
1980 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library)
1981 if test "$ac_cv_header_ft2build_h" = 'yes'; then
1982 AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the <ft2build.h> header file.])
1991 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
1992 AC_SUBST(FREETYPE_LIBS)
1994 dnl ===========================================================================
1997 # Check for Ghostscript library or framework.
1999 # Test for iapi.h & test for gsapi_new_instance in -lgs
2000 # or -framework Ghostscript
2002 AC_ARG_WITH([gslib],
2003 [AC_HELP_STRING([--without-gslib],
2004 [enable Ghostscript library support])],
2005 [with_gslib=$withval],
2008 gslib_framework='no'
2009 if test "$with_gslib" != 'yes'; then
2010 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
2015 if test "$with_gslib" != 'no'; then
2016 AC_MSG_NOTICE([-------------------------------------------------------------])
2017 AC_MSG_CHECKING([for Ghostscript])
2022 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
2023 failed=`expr $failed + 1`,)
2024 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
2025 failed=`expr $failed + 1`,)
2026 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
2027 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
2028 AC_MSG_CHECKING([if Ghostscript package is complete])
2029 if test $passed -gt 0; then
2030 if test $failed -gt 0; then
2031 AC_MSG_NOTICE([no -- some components failed test])
2032 have_gslib='no (failed tests)'
2034 if test $framework -gt 0; then
2035 GS_LIBS='-framework Ghostscript'
2036 gslib_framework='yes'
2037 AC_MSG_NOTICE([yes, using framework.])
2039 AC_MSG_NOTICE([yes, using library.])
2042 LIBS="$GS_LIBS $LIBS"
2043 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
2050 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
2053 # Set default font search path
2054 AC_ARG_WITH([fontpath],
2055 [AC_HELP_STRING([--with-fontpath=DIR],
2056 [prepend to default font search path])],
2057 [with_fontpath=$withval],
2060 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2063 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",[Define to prepend to default font search path.])
2065 if test "$with_fontpath=" != ''; then
2066 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2069 # Set Ghostscript font directory
2070 AC_ARG_WITH([gs-font-dir],
2071 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2072 [Ghostscript font directory])],
2073 [with_gs_font_dir=$withval],
2074 [with_gs_font_dir='default'])
2076 if test "$with_gs_font_dir" != 'default'; then
2077 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2080 dnl ===========================================================================
2083 # Check for GVC delegate library.
2086 [AC_HELP_STRING([--with-gvc],
2087 [disable GVC support])],
2088 [with_gvc=$withval],
2091 if test "$with_gvc" != 'yes'; then
2092 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2096 if test "x$with_gvc" = "xyes"; then
2097 AC_MSG_NOTICE([-------------------------------------------------------------])
2098 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2102 if test "$have_gvc" = 'yes'; then
2103 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2104 if test "$build_modules" = 'no'; then
2105 CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
2109 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2110 AC_SUBST(GVC_CFLAGS)
2113 dnl ===========================================================================
2116 # Check for JBIG delegate library.
2120 [AC_HELP_STRING([--without-jbig],
2121 [disable JBIG support])],
2122 [with_jbig=$withval],
2127 if test "$with_jbig" != 'no'; then
2128 AC_MSG_NOTICE([-------------------------------------------------------------])
2129 AC_MSG_CHECKING([for JBIG])
2133 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2134 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2135 AC_MSG_CHECKING([if JBIG package is complete])
2136 if test $passed -gt 0; then
2137 if test $failed -gt 0; then
2138 AC_MSG_NOTICE([no -- some components failed test])
2139 have_jbig='no (failed tests)'
2142 LIBS="$JBIG_LIBS $LIBS"
2143 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2144 AC_MSG_NOTICE([yes])
2151 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2154 dnl ===========================================================================
2157 # Check for JPEG delegate library.
2160 [AC_HELP_STRING([--without-jpeg],
2161 [disable JPEG support])],
2162 [with_jpeg=$withval],
2165 if test "$with_jpeg" != 'yes'; then
2166 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2171 if test "$with_jpeg" != 'no'; then
2172 AC_MSG_NOTICE([-------------------------------------------------------------])
2173 AC_MSG_CHECKING([for JPEG])
2177 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2178 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2179 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2180 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2181 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2183 # Test for compatible JPEG library
2184 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2185 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2189 #include <jpeglib.h>
2191 changequote(<<, >>)dnl
2193 #if JPEG_LIB_VERSION < 62
2194 #error IJG JPEG library must be version 6b or newer!
2198 changequote([, ])dnl
2199 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2200 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2202 AC_MSG_CHECKING([if JPEG package is complete])
2203 if test $passed -gt 0; then
2204 if test $failed -gt 0; then
2205 AC_MSG_NOTICE([no -- some components failed test])
2206 have_jpeg='no (failed tests)'
2209 LIBS="$JPEG_LIBS $LIBS"
2210 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2211 AC_MSG_NOTICE([yes])
2218 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2221 dnl ===========================================================================
2224 # Check for JPEG Version 2 delegate library.
2227 [AC_HELP_STRING([--without-jp2],
2228 [disable JPEG-2000 support])],
2229 [with_jp2=$withval],
2232 if test "$with_jp2" != 'yes'; then
2233 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 "
2238 if test "$with_jp2" != 'no'; then
2239 AC_MSG_NOTICE([-------------------------------------------------------------])
2240 AC_MSG_CHECKING([for JPEG Version 2])
2244 AC_CHECK_HEADER(jasper/jasper.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2245 AC_CHECK_LIB(jasper,jas_stream_fopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2246 AC_MSG_CHECKING([if JPEG version 2 support package is complete])
2247 if test $passed -gt 0; then
2248 if test $failed -gt 0; then
2249 AC_MSG_NOTICE([no -- some components failed test])
2250 have_jp2='no (failed tests)'
2253 LIBS="$JP2_LIBS $LIBS"
2254 AC_DEFINE(JP2_DELEGATE,1,Define if you have JPEG version 2 "Jasper" library)
2255 AC_MSG_NOTICE([yes])
2262 AM_CONDITIONAL(JP2_DELEGATE, test "$have_jp2" = 'yes')
2265 dnl ===========================================================================
2268 # Check for LCMS delegate library.
2272 [ --without-lcms disable lcms (v1.1X) support],
2273 [with_lcms=$withval],
2275 if test "$with_lcms" != 'yes' ; then
2276 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2281 [ --without-lcms2 disable lcms (v2.X) support],
2282 [with_lcms2=$withval],
2284 if test "$with_lcms2" != 'yes' ; then
2285 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
2290 if test "$with_lcms2" != 'no'; then
2291 AC_MSG_NOTICE([-------------------------------------------------------------])
2292 AC_MSG_CHECKING([for LCMS v2])
2296 have_lcms_header='no'
2298 # Check for <lcms2.h>
2299 AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
2300 if test "$have_lcms_header" = 'yes'; then
2301 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2302 passed=`expr $passed + 1`
2305 # Check for <lcms2/lcms2.h)
2306 if test "$have_lcms_header" != 'yes'; then
2307 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2308 if test "$have_lcms_header" = 'yes'; then
2309 passed=`expr $passed + 1`
2310 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2314 # Failed to find lcms header?
2315 if test "$have_lcms_header" != 'yes'; then
2316 failed=`expr $failed + 1`
2319 AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2320 AC_MSG_CHECKING(if LCMS v2 package is complete)
2321 if test $passed -gt 0; then
2322 if test $failed -gt 0; then
2323 AC_MSG_NOTICE(no -- some components failed test)
2324 have_lcms2='no (failed tests)'
2327 LIBS="$LCMS_LIBS $LIBS"
2337 # Check for LCMS v1 (1.11 or later)
2339 if test $have_lcms2 = 'yes'; then
2344 if test "$with_lcms" != 'no'; then
2345 AC_MSG_NOTICE([-------------------------------------------------------------])
2346 AC_MSG_CHECKING([for LCMS v1.1X])
2350 have_lcms_header='no'
2352 # Check for <lcms.h>
2353 if test "$have_lcms_header" != 'yes'; then
2354 AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
2355 if test "$have_lcms_header" = 'yes'; then
2356 passed=`expr $passed + 1`
2357 AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
2361 # Check for <lcms/lcms.h>
2362 if test "$have_lcms_header" != 'yes'; then
2363 AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
2364 if test "$have_lcms_header" = 'yes'; then
2365 passed=`expr $passed + 1`
2366 AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
2370 # Failed to find lcms header?
2371 if test "$have_lcms_header" != 'yes'; then
2372 failed=`expr $failed + 1`
2375 AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2376 AC_MSG_CHECKING(if LCMS package is complete)
2377 if test $passed -gt 0; then
2378 if test $failed -gt 0; then
2379 AC_MSG_NOTICE(no -- some components failed test)
2380 have_lcms='no (failed tests)'
2383 LIBS="$LCMS_LIBS $LIBS"
2392 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
2393 if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
2394 AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
2399 dnl ===========================================================================
2402 # Check for the LQR (Liquid Rescale) delegate library.
2405 [AC_HELP_STRING([--without-lqr],
2406 [disable Liquid Rescale support])],
2407 [with_lqr=$withval],
2410 if test "$with_lqr" != 'yes'; then
2411 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2418 if test "x$with_lqr" = "xyes"; then
2419 AC_MSG_NOTICE([-------------------------------------------------------------])
2420 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2424 if test "$have_lqr" = 'yes'; then
2425 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2426 CFLAGS="$LQR_CFLAGS $CFLAGS"
2429 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2430 AC_SUBST(LQR_CFLAGS)
2433 dnl ===========================================================================
2435 # Disable LZMA (lzma library)
2437 [ --without-lzma disable LZMA support],
2438 [with_lzma=$withval],
2440 if test "$with_lzma" != 'yes' ; then
2441 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2445 if test "x$with_lzma" = "xyes"; then
2446 AC_MSG_NOTICE([-------------------------------------------------------------])
2447 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2451 if test "$have_lzma" = 'yes'; then
2452 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2453 if test "$build_modules" = 'no'; then
2454 CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS"
2458 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2459 AC_SUBST(LZMA_CFLAGS)
2462 dnl ===========================================================================
2465 # Check for the OpenEXR delegate library.
2467 AC_ARG_WITH([openexr],
2468 [AC_HELP_STRING([--without-openexr],
2469 [disable OpenEXR support])],
2470 [with_openexr=$withval],
2471 [with_openexr='yes'])
2473 if test "$with_openexr" != 'yes'; then
2474 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2481 if test "x$with_openexr" = "xyes"; then
2482 AC_MSG_NOTICE([-------------------------------------------------------------])
2483 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2487 if test "$have_openexr" = 'yes'; then
2488 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2489 if test "$build_modules" = 'no'; then
2490 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2494 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2495 AC_SUBST(OPENEXR_CFLAGS)
2496 AC_SUBST(OPENEXR_LIBS)
2498 dnl ===========================================================================
2501 # Check for PANGO delegate library.
2503 AC_ARG_WITH([pango],
2504 [AC_HELP_STRING([--without-pango],
2505 [disable PANGO support])],
2506 [with_pango=$withval],
2509 if test "$with_pango" != 'yes'; then
2510 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2514 have_pangocairo='no'
2518 if test "x$with_pango" = "xyes"; then
2519 AC_MSG_RESULT([-------------------------------------------------------------])
2520 PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
2522 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2526 if test "$have_pango" = 'yes'; then
2527 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2528 if test "$build_modules" = 'no'; then
2529 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
2533 if test "$have_pangocairo" = 'yes'; then
2534 AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
2535 if test "$build_modules" = 'no'; then
2536 CPPFLAGS="$PANGOCAIRO_CFLAGS $CPPFLAGS"
2540 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2541 AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes')
2542 AC_SUBST(PANGO_CFLAGS)
2543 AC_SUBST(PANGO_LIBS)
2545 dnl ===========================================================================
2548 # Check for PNG delegate library.
2551 [AC_HELP_STRING([--without-png],
2552 [disable PNG support])],
2553 [with_png=$withval],
2556 if test "$with_png" != 'yes'; then
2557 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2563 if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
2564 AC_MSG_NOTICE([-------------------------------------------------------------])
2565 AC_MSG_CHECKING(for PNG support )
2569 AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
2570 failed=`expr $failed + 1`,)
2572 if test $passed -gt 0; then
2573 for var in 5 4 2 '' ; do
2574 if test "$have_png" = 'no' ; then
2575 if test "x${var}" = 'x' ; then
2581 # Test for compatible LIBPNG library
2584 if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
2585 if test "${pnglib}" != 'png' ; then
2586 AC_MSG_CHECKING(for LIBPNG1${var} support )
2592 changequote(<<, >>)dnl
2594 #if PNG_LIBPNG_VER_MINOR != ${var}
2595 #error LIBPNG library must be version 1${var}!
2600 changequote([, ])dnl
2601 ac_cv_libpng_ok='yes',
2602 ac_cv_libpng_ok='no')
2603 if test "$ac_cv_libpng_ok" = 'yes' ; then
2604 passed=`expr $passed + 1`
2607 failed=`expr $failed + 1`
2611 passed=`expr $passed + 1`
2616 if test $passed -gt 0 -a $failed -le 0; then
2617 if test "1${var}" = '15' ; then
2618 AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
2619 failed=`expr $failed + 1`,)
2620 AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
2621 failed=`expr $failed + 1`,)
2623 if test "1${var}" = '14' ; then
2624 AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
2625 failed=`expr $failed + 1`,)
2626 AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
2627 failed=`expr $failed + 1`,)
2629 if test "1${var}" = '12' ; then
2630 AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
2631 failed=`expr $failed + 1`,)
2633 if test "1${var}" = '1' ; then
2634 AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
2635 failed=`expr $failed + 1`,)
2637 if test $passed -gt 0 -a $failed -le 0 ; then
2638 AC_MSG_CHECKING(if ${pnglib} package is complete)
2639 if test $passed -gt 0 ; then
2640 if test $failed -gt 0 ; then
2641 AC_MSG_NOTICE(no -- some components failed test)
2642 have_png='no (failed tests)'
2644 PNG_LIBS="-l${pnglib}"
2645 LIBS="$PNG_LIBS $LIBS"
2646 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2658 AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
2662 dnl ===========================================================================
2665 # Check for RSVG delegate library.
2668 [AC_HELP_STRING([--without-rsvg],
2669 [enable RSVG support])],
2670 [with_rsvg=$withval],
2673 if test "$with_rsvg" != 'yes'; then
2674 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2682 if test "x$with_rsvg" = "xyes"; then
2683 AC_MSG_NOTICE([-------------------------------------------------------------])
2684 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2686 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2690 if test "$have_rsvg" = 'yes'; then
2691 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2692 if test "$build_modules" = 'no'; then
2693 CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
2697 if test "$have_cairo" = 'yes'; then
2698 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2699 if test "$build_modules" = 'no'; then
2700 CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
2704 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2705 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2706 AC_SUBST(RSVG_CFLAGS)
2709 dnl ===========================================================================
2712 # Check for TIFF delegate library.
2715 [AC_HELP_STRING([--without-tiff],
2716 [disable TIFF support])],
2717 [with_tiff=$withval],
2720 if test "$with_tiff" != 'yes'; then
2721 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2726 if test "$with_tiff" != 'no'; then
2727 AC_MSG_NOTICE([-------------------------------------------------------------])
2728 AC_MSG_CHECKING([for TIFF])
2732 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2733 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2734 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2735 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2736 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2737 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2738 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2739 AC_MSG_CHECKING([if TIFF package is complete])
2740 if test $passed -gt 0; then
2741 if test $failed -gt 0; then
2742 AC_MSG_NOTICE([no -- some components failed test])
2743 have_tiff='no (failed tests)'
2746 LIBS="$TIFF_LIBS $LIBS"
2747 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2748 AC_MSG_NOTICE([yes])
2750 AC_CHECK_HEADERS(tiffconf.h)
2751 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2752 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2753 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2754 TIFFSwabArrayOfTriples])
2760 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2763 dnl ===========================================================================
2766 # Check for WEBP delegate library.
2769 [AC_HELP_STRING([--without-webp],
2770 [disable WEBP support])],
2771 [with_webp=$withval],
2774 if test "$with_webp" != 'yes'; then
2775 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2780 if test "$with_webp" != 'no'; then
2781 AC_MSG_NOTICE([-------------------------------------------------------------])
2782 AC_MSG_CHECKING([for WEBP])
2786 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2787 AC_CHECK_LIB(webp,WebPDecodeRGB,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2788 AC_MSG_CHECKING([if WEBP package is complete])
2789 if test $passed -gt 0; then
2790 if test $failed -gt 0; then
2791 AC_MSG_NOTICE([no -- some components failed test])
2792 have_webp='no (failed tests)'
2795 LIBS="$WEBP_LIBS $LIBS"
2796 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2797 AC_MSG_NOTICE([yes])
2804 AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2807 dnl ===========================================================================
2810 # Set Windows font directory.
2812 AC_ARG_WITH([windows-font-dir],
2813 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2814 [directory containing MS-Windows fonts])],
2815 [with_windows_font_dir=$withval],
2816 [with_windows_font_dir=''])
2817 if test "$with_windows_font_dir" != '' ; then
2818 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2821 dnl ===========================================================================
2824 # Check for WMF delegate library.
2827 [AC_HELP_STRING([--with-wmf],
2828 [enable WMF support])],
2829 [with_wmf=$withval],
2832 if test "$with_wmf" != 'yes'; then
2833 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2840 if test "$with_wmf" != 'no'; then
2841 AC_MSG_RESULT([-------------------------------------------------------------])
2842 AC_MSG_CHECKING([for WMF])
2845 have_libwmflite='no'
2846 have_libwmf_ipa_h='no'
2848 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H])
2849 if test "$have_libwmf_ipa_h" = 'yes'; then
2850 AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,)
2851 if test "$have_libwmflite" = 'yes'; then
2852 AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library)
2853 WMF_LIBS='-lwmflite'
2854 LIBS="$WMF_LIBS $LIBS"
2858 WMF_CONFIG_LIBS=`libwmf-config --libs`
2859 for lib in xml2 expat freetype jpeg png z; do
2861 echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib"
2863 AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS)
2864 if test "$have_libwmf" = 'yes'; then
2865 AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library)
2867 LIBS="$WMF_LIBS $LIBS"
2870 AC_MSG_RESULT([no -- some components failed test])
2871 have_wmf='no (failed tests)'
2872 have_wmflite='no (failed tests)'
2878 AC_MSG_CHECKING([if WMF package is complete])
2879 if test "$have_wmf" = 'yes'; then
2880 AC_MSG_RESULT([yes])
2885 AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes')
2887 AC_SUBST(WMF_LIBS_DEPS)
2890 dnl ===========================================================================
2893 # Check for XML delegate library.
2896 [AC_HELP_STRING([--without-xml],
2897 [disable XML support])],
2898 [with_xml=$withval],
2901 if test "$with_xml" != 'yes' ; then
2902 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2907 if test "$with_xml" != 'no'; then
2908 AC_MSG_NOTICE([-------------------------------------------------------------])
2909 AC_MSG_CHECKING([for XML])
2911 PERSIST_LDFLAGS=$LDFLAGS
2912 PERSIST_CPPFLAGS=$CPPFLAGS
2914 AC_PATH_PROG(xml2_config,xml2-config,)dnl
2915 if test -n "$xml2_config"; then
2916 # Debian installs libxml headers under /usr/include/libxml2/libxml with
2917 # the shared library installed under /usr/lib, whereas the package
2918 # installs itself under $prefix/libxml and $prefix/lib.
2919 xml2_prefix=`xml2-config --prefix`
2920 if test -d "${xml2_prefix}/include/libxml2"; then
2921 CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
2923 if test "${xml2_prefix}" != '/usr'; then
2924 LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
2929 AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2930 AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2931 AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2932 AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2933 AC_MSG_CHECKING([if XML package is complete])
2934 if test $passed -gt 0; then
2935 if test $failed -gt 0; then
2936 AC_MSG_NOTICE([no -- some components failed test])
2937 have_xml='no (failed tests)'
2938 LDFLAGS="$PERSIST_LDFLAGS"
2939 CPPFLAGS="$PERSIST_CPPFLAGS"
2942 LIBS="$XML_LIBS $LIBS"
2943 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2944 AC_MSG_NOTICE([yes])
2951 AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
2954 dnl ===========================================================================
2956 # Substitute compiler name to build/link PerlMagick
2958 AC_SUBST(PERLMAINCC)
2961 # Configure install Paths
2964 # Path to ImageMagick header files
2965 INCLUDE_RELATIVE_PATH="ImageMagick"
2966 INCLUDE_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
2967 DEFINE_INCLUDE_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
2968 case "${build_os}" in
2970 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2973 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick headers live.])
2974 AC_SUBST(INCLUDE_PATH)
2976 # Subdirectory under lib to place ImageMagick lib files
2977 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2978 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",[Subdirectory of lib where ImageMagick architecture dependent files are installed.])
2980 # Path to ImageMagick bin directory
2981 EXECUTABLE_PATH="${BIN_DIR}"
2982 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2983 case "${build_os}" in
2985 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2988 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",[Directory where executables are installed.])
2989 AC_SUBST(EXECUTABLE_PATH)
2991 # Path to ImageMagick lib
2992 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2993 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2994 case "${build_os}" in
2996 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2999 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",[Directory where architecture-dependent files live.])
3000 AC_SUBST(LIBRARY_PATH)
3003 # path to modules lib
3004 if test "x$MODULES_BASEDIRNAME" = "x"; then
3005 MODULES_BASEDIRNAME="modules"
3007 AC_DEFINE_UNQUOTED(MODULES_BASEDIRNAME,"$MODULES_BASEDIRNAME",[Module directory name without ABI part.])
3008 AC_SUBST(MODULES_BASEDIRNAME)
3010 if test "x$MODULES_DIRNAME" = "x"; then
3011 MODULES_DIRNAME=${MODULES_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3013 AC_DEFINE_UNQUOTED(MODULES_DIRNAME,"$MODULES_DIRNAME",[Module directory dirname])
3015 AC_SUBST(MODULES_DIRNAME)
3017 MODULES_RELATIVE_PATH="${MODULES_DIRNAME}"
3018 AC_SUBST(MODULES_RELATIVE_PATH)
3019 MODULES_PATH="${LIBRARY_PATH}/${MODULES_RELATIVE_PATH}"
3020 AC_SUBST(MODULES_PATH)
3023 # path to coders lib
3024 if test "x$CODER_DIRNAME" = "x"; then
3025 CODER_DIRNAME="coders"
3027 AC_DEFINE_UNQUOTED(CODER_DIRNAME,"$CODER_DIRNAME",[coders subdirectory.])
3028 AC_SUBST(CODER_DIRNAME)
3030 CODER_RELATIVE_PATH="${CODER_DIRNAME}"
3031 CODER_PATH="${MODULES_PATH}/${CODER_DIRNAME}"
3032 AC_SUBST(CODER_PATH)
3035 # Subdirectory under lib to place ImageMagick filter module files
3037 # path to coders lib
3038 if test "x$FILTER_DIRNAME" = "x"; then
3039 FILTER_DIRNAME="filters"
3041 AC_DEFINE_UNQUOTED(FILTER_DIRNAME,"$FILTER_DIRNAME",[filter subdirectory.])
3042 AC_SUBST(FILTER_DIRNAME)
3044 FILTER_RELATIVE_PATH="${FILTER_DIRNAME}"
3045 FILTER_PATH="${MODULES_PATH}/${FILTER_DIRNAME}"
3046 AC_SUBST(FILTER_PATH)
3049 # Path to ImageMagick documentation files
3050 DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
3051 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
3052 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
3053 case "${build_os}" in
3055 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
3058 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",[Directory where ImageMagick documents live.])
3059 AC_SUBST(DOCUMENTATION_PATH)
3061 # Subdirectory to place architecture-dependent configuration files
3062 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
3063 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",[Subdirectory of lib where architecture-dependent configuration files live.])
3064 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3065 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3066 case "${build_os}" in
3068 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
3071 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",[Directory where architecture-dependent configuration files live.])
3072 AC_SUBST(CONFIGURE_PATH)
3074 # Subdirectory to place architecture-independent configuration files
3075 SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
3076 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",[Subdirectory of lib where architecture-independent configuration files live.])
3077 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
3078 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
3079 case "${build_os}" in
3081 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
3084 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",[Directory where architecture-independent configuration files live.])
3085 AC_SUBST(SHARE_PATH)
3088 # Subdirectory to place architecture-dependent configuration files.
3089 if test "x$SHAREARCH_BASEDIRNAME" = "x"; then
3090 SHAREARCH_BASEDIRNAME="config"
3092 AC_DEFINE_UNQUOTED(SHAREARCH_BASEDIRNAME,"$SHAREARCH_BASEDIRNAME",[Configure directory name without ABI part.])
3093 AC_SUBST(SHAREARCH_BASEDIRNAME)
3095 if test "x$SHAREARCH_DIRNAME" = "x"; then
3096 SHAREARCH_DIRNAME=${SHAREARCH_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3098 AC_DEFINE_UNQUOTED(SHAREARCH_DIRNAME,"$SHAREARCH_DIRNAME",[Configure directory dirname])
3100 AC_SUBST(SHAREARCH_DIRNAME)
3102 SHAREARCH_RELATIVE_PATH="${SHAREARCH_DIRNAME}"
3103 AC_SUBST(SHAREARCH_RELATIVE_PATH)
3104 SHAREARCH_PATH="${LIBRARY_PATH}/${SHAREARCH_RELATIVE_PATH}"
3105 AC_SUBST(SHAREARCH_PATH)
3108 # program_transform_name is formed for use in a Makefile, so create a
3109 # modified version for use in a shell script.
3110 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3112 # Default delegate definitions
3113 AC_MSG_NOTICE([-------------------------------------------------------------])
3114 AC_MSG_CHECKING([for ImageMagick delegate programs])
3116 AutotraceDecodeDelegateDefault='autotrace'
3117 BlenderDecodeDelegateDefault='blender'
3118 BZIPDelegateDefault='bzip2'
3119 BrowseDelegateDefault='xdg-open'
3120 CGMDecodeDelegateDefault='ralcgm'
3121 CatDelegateDefault='cat'
3122 DNGDecodeDelegateDefault='ufraw-batch'
3123 GVCDecodeDelegateDefault='dot'
3124 DVIDecodeDelegateDefault='dvips'
3125 EchoDelegateDefault='echo'
3126 EditorDelegateDefault='xterm'
3127 FIGDecodeDelegateDefault='fig2dev'
3128 ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
3129 DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
3130 MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
3131 GnuplotDecodeDelegateDefault='gnuplot'
3132 HPGLDecodeDelegateDefault='hp2xx'
3133 HTMLDecodeDelegateDefault='html2ps'
3134 ILBMDecodeDelegateDefault='ilbmtoppm'
3135 ILBMEncodeDelegateDefault='ppmtoilbm'
3136 LPDelegateDefault='lp'
3137 LPRDelegateDefault='lpr'
3138 LaunchDelegateDefault='gimp'
3139 MANDelegateDefault='groff'
3140 MPEGDecodeDelegateDefault='ffmpeg'
3141 MPEGEncodeDelegateDefault='ffmpeg'
3142 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3143 MVDelegateDefault='mv'
3144 PCLDelegateDefault='pcl6'
3145 PGPDecodeDelegateDefault='pgpv'
3146 POVDelegateDefault='povray'
3147 if test "$native_win32_build" = 'yes'; then
3148 PSDelegateDefault='gswin32c'
3149 elif test "$gslib_framework" = 'yes'; then
3150 PSDelegateDefault='gsc'
3152 PSDelegateDefault='gs'
3154 RLEEncodeDelegateDefault='rawtorle'
3155 RMDelegateDefault='rm'
3156 RSVGDecodeDelegateDefault='rsvg-convert'
3157 SCANDecodeDelegateDefault='scanimage'
3158 SVGDecodeDelegateDefault='inkscape'
3159 TXTDelegateDefault='enscript'
3160 UniconvertorDelegateDefault='uniconvertor'
3161 WMFDecodeDelegateDefault='wmf2eps'
3162 WWWDecodeDelegateDefault='curl'
3163 XPSDelegateDefault='gxps'
3164 ZipDelegateDefault='gzip'
3166 # Search for delegates
3167 AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
3168 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3169 AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
3170 AC_PATH_PROGS(BrowseDelegate, "$BrowseDelegateDefault" google-chrome firefox konqueror mozilla lynx, "$BrowseDelegateDefault")
3171 AC_PATH_PROG(CGMDecodeDelegate, "$CGMDecodeDelegateDefault", "$CGMDecodeDelegateDefault")
3172 AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
3173 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3174 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3175 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3176 AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
3177 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3178 AC_PATH_PROG(FIGDecodeDelegate, "$FIGDecodeDelegateDefault", "$FIGDecodeDelegateDefault")
3179 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3180 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3181 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3182 AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
3183 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3184 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3185 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3186 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3187 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3188 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3189 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3190 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
3191 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3192 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3193 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3194 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3195 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3196 AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
3197 AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
3198 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3199 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
3200 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3201 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3202 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
3203 AC_PATH_PROG(SVGDecodeDelegate, "$SVGDecodeDelegateDefault", "$SVGDecodeDelegateDefault")
3204 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
3205 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3206 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
3207 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
3208 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3209 AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
3211 # Prefer lpr to lp; lp needs options tacked on.
3212 if test "$LPRDelegate" != no; then
3213 PrintDelegate="$LPRDelegate"
3215 PrintDelegate="$LPDelegate -c -s"
3217 AC_SUBST(PrintDelegate)
3219 # Installed ImageMagick utiltity paths
3220 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3221 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3222 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3224 # Set delegate booleans
3225 have_ffmpeg='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_ffmpeg='yes'; fi
3226 have_fig2dev='no' ; if test "$FIGDecodeDelegate" != "$FIGDecodeDelegateDefault" ; then have_fig2dev='yes'; fi
3227 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3228 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3229 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3230 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3231 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3232 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3233 have_ralcgm='no' ; if test "$CGMDecodeDelegate" != "$CGMDecodeDelegateDefault" ; then have_ralcgm='yes'; fi
3234 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3237 # Test for font directories
3239 type_include_files=''
3242 AC_MSG_CHECKING(for Dejavu fonts directory)
3244 if test "${with_dejavu_font_dir}" != 'default'; then
3245 dejavu_font_dir="${with_dejavu_font_dir}/"
3247 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3248 if test -f "${font_dir}DejaVuSerif.ttf"; then
3249 dejavu_font_dir="${font_dir}"
3254 if test "${dejavu_font_dir}x" != 'x'; then
3255 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3256 AC_MSG_NOTICE([$dejavu_font_dir])
3258 AC_MSG_NOTICE([not found!]);
3260 AC_SUBST(dejavu_font_dir)
3264 if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
3265 windows_font_dir="${with_windows_font_dir}/"
3267 if test "${windows_font_dir}x" != 'x'; then
3268 if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
3269 windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
3271 if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then
3272 windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/'
3274 if test -f '/usr/share/fonts/msttcore/arial.ttf'; then
3275 windows_font_dir='/usr/share/fonts/msttcore/truetype/'
3278 if test "${windows_font_dir}x" != 'x'; then
3279 type_include_files="$type_include_files "'<include file="type-windows.xml" />'
3281 AC_SUBST(windows_font_dir)
3284 AC_MSG_CHECKING(for Ghostscript fonts directory)
3285 ghostscript_font_dir=''
3286 if test "${with_gs_font_dir}" != 'default'; then
3287 ghostscript_font_dir="${with_gs_font_dir}/"
3289 if test "${native_win32_build}" = 'yes'; then
3290 # Native Windows Build
3291 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3292 if test -f "${font_dir}a010013l.pfb"; then
3293 ghostscript_font_dir="$font_dir"
3297 if test "${PSDelegate}" != 'gswin32c'; then
3298 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3301 # Linux / Mac OS X / Unix Build
3302 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
3303 if test -f "${font_dir}a010013l.pfb"; then
3304 ghostscript_font_dir="${font_dir}"
3308 if test "${ghostscript_font_dir}x" = 'x'; then
3309 if test "$PSDelegate" != 'gs'; then
3310 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3315 if test "${ghostscript_font_dir}x" != 'x'; then
3316 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3317 AC_MSG_NOTICE([$ghostscript_font_dir])
3319 AC_MSG_NOTICE([not found!]);
3321 AC_SUBST(ghostscript_font_dir)
3322 case "${build_os}" in
3324 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3328 AC_SUBST(type_include_files)
3331 # Handle case where user doesn't want frozen paths
3333 if test "$with_frozenpaths" != 'yes'; then
3334 # Re-set delegate definitions to default (no paths)
3335 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
3336 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3337 BZIPDelegate="$BZIPDelegateDefault"
3338 BrowseDelegate="$BrowseDelegateDefault"
3339 CGMDecodeDelegate="$CGMDecodeDelegateDefault"
3340 CatDelegate="$CatDelegateDefault"
3341 ConvertDelegate="$ConvertDelegateDefault"
3342 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3343 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3344 EchoDelegate="$EchoDelegateDefault"
3345 EditorDelegate="$EditorDelegateDefault"
3346 FIGDecodeDelegate="$FIGDecodeDelegateDefault"
3347 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3348 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3349 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3350 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3351 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3352 LPDelegate="$LPDelegateDefault"
3353 LaunchDelegate="$LaunchDelegateDefault"
3354 MANDelegate="$MANDelegateDefault"
3355 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3356 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3357 MogrifyDelegate="$MogrifyDelegateDefault"
3358 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3359 MVDelegate="$MVDelegateDefault"
3360 PCLDelegate="$PCLDelegateDefault"
3361 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3362 POVDelegate="$POVDelegateDefault"
3363 PSDelegate="$PSDelegateDefault"
3364 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3365 RMDelegate="$RMDelegateDefault"
3366 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3367 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3368 SVGDecodeDelegate="$SVGDecodeDelegateDefault"
3369 ShowImageDelegate="$ShowImageDelegateDefault"
3370 TXTDelegate="$TXTDelegateDefault"
3371 UniconvertorDelegate="$UniconvertorDelegateDefault"
3372 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3373 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3374 XPSDelegate="$XPSDelegateDefault"
3375 ZipDelegate="$ZipDelegateDefault"
3378 # Delegate substitutions
3379 AC_SUBST(AutotraceDecodeDelegate)
3380 AC_SUBST(BlenderDecodeDelegate)
3381 AC_SUBST(BZIPDelegate)
3382 AC_SUBST(BrowseDelegate)
3383 AC_SUBST(CGMDecodeDelegate)
3384 AC_SUBST(CatDelegate)
3385 AC_SUBST(ConvertDelegate)
3386 AC_SUBST(GVCDecodeDelegate)
3387 AC_SUBST(DVIDecodeDelegate)
3388 AC_SUBST(EchoDelegate)
3389 AC_SUBST(EditorDelegate)
3390 AC_SUBST(FIGDecodeDelegate)
3391 AC_SUBST(GnuplotDecodeDelegate)
3392 AC_SUBST(HPGLDecodeDelegate)
3393 AC_SUBST(HTMLDecodeDelegate)
3394 AC_SUBST(ILBMDecodeDelegate)
3395 AC_SUBST(ILBMEncodeDelegate)
3396 AC_SUBST(LPDelegate)
3397 AC_SUBST(LaunchDelegate)
3398 AC_SUBST(MANDelegate)
3399 AC_SUBST(MPEGDecodeDelegate)
3400 AC_SUBST(MPEGEncodeDelegate)
3401 AC_SUBST(MogrifyDelegate)
3402 AC_SUBST(MrSIDDecodeDelegate)
3403 AC_SUBST(MVDelegate)
3404 AC_SUBST(PCLDelegate)
3405 AC_SUBST(PGPDecodeDelegate)
3406 AC_SUBST(POVDelegate)
3407 AC_SUBST(PSDelegate)
3408 AC_SUBST(RLEEncodeDelegate)
3409 AC_SUBST(RMDelegate)
3410 AC_SUBST(SCANDecodeDelegate)
3411 AC_SUBST(ShowImageDelegate)
3412 AC_SUBST(TXTDelegate)
3413 AC_SUBST(UniconvertorDelegate)
3414 AC_SUBST(WMFDecodeDelegate)
3415 AC_SUBST(WWWDecodeDelegate)
3416 AC_SUBST(XPSDelegate)
3417 AC_SUBST(ZipDelegate)
3423 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3424 AC_CHECK_PROGS(PERL,perl)
3425 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3426 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3427 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3428 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3429 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3431 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3434 # 7ZIP support (http://p7zip.sourceforge.net/)
3437 AC_CHECK_PROGS(P7ZIP,[7za])
3439 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3442 # ZIP support (http://www.info-zip.org/Zip.html)
3445 AC_CHECK_PROGS(ZIP,[zip])
3447 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3450 # GhostPCL related configuration.
3452 PCLColorDevice=ppmraw
3453 PCLCMYKDevice=pamcmyk32
3454 PCLMonoDevice=pbmraw
3455 if test -z "$PCLVersion"; then
3456 PCLVersion='unknown'
3458 if test $have_pcl = 'yes'; then
3459 AC_MSG_NOTICE([-------------------------------------------------------------])
3460 AC_MSG_CHECKING([for PCL])
3463 AC_MSG_CHECKING([for pcl color device])
3464 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3467 PCLColorDevice=ppmraw
3469 AC_MSG_NOTICE([$PCLColorDevice])
3472 AC_MSG_CHECKING([for pcl CMYK device])
3473 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3476 PCLCMYKDevice=$PCLColorDevice
3478 AC_MSG_NOTICE([$PCLCMYKDevice])
3481 AC_MSG_CHECKING([for pcl mono device])
3482 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3485 PCLMonoDevice=$PCLColorDevice
3487 AC_MSG_NOTICE([$PCLMonoDevice])
3490 AC_SUBST(PCLMonoDevice)
3491 AC_SUBST(PCLColorDevice)
3492 AC_SUBST(PCLCMYKDevice)
3493 AC_SUBST(PCLVersion)
3496 # GhostXPS related configuration.
3498 XPSColorDevice=ppmraw
3499 XPSCMYKDevice=bmpsep8
3500 XPSMonoDevice=pbmraw
3501 if test -z "$XPSVersion"; then
3502 XPSVersion='unknown'
3504 if test $have_xps = 'yes'; then
3505 AC_MSG_NOTICE([-------------------------------------------------------------])
3506 AC_MSG_CHECKING([for XPS])
3509 AC_MSG_CHECKING([for xps color device])
3510 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3513 XPSColorDevice=ppmraw
3515 AC_MSG_NOTICE([$XPSColorDevice])
3518 AC_MSG_CHECKING([for xps CMYK device])
3519 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3522 XPSCMYKDevice=$XPSColorDevice
3524 AC_MSG_NOTICE([$XPSCMYKDevice])
3527 AC_MSG_CHECKING([for xps mono device])
3528 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3531 XPSMonoDevice=$XPSColorDevice
3533 AC_MSG_NOTICE([$XPSMonoDevice])
3536 AC_SUBST(XPSMonoDevice)
3537 AC_SUBST(XPSColorDevice)
3538 AC_SUBST(XPSCMYKDevice)
3539 AC_SUBST(XPSVersion)
3542 # Ghostscript related configuration.
3544 GSAlphaDevice=pngalpha
3545 GSColorDevice=pnmraw
3548 GSPDFDevice=pdfwrite
3550 GSEPSDevice=epswrite
3552 if test $have_gs = 'yes'; then
3553 AC_MSG_NOTICE([-------------------------------------------------------------])
3554 AC_MSG_CHECKING([for Ghostscript])
3556 AC_MSG_CHECKING([for Ghostscript version])
3557 if GSVersion=`$PSDelegate --version`; then
3560 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3562 AC_MSG_NOTICE([$GSVersion])
3565 AC_MSG_CHECKING([for gs alpha device])
3566 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3569 GSAlphaDevice=pnmraw
3571 AC_MSG_NOTICE([$GSAlphaDevice])
3574 AC_MSG_CHECKING([for gs color device])
3575 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3578 GSColorDevice=pnmraw
3580 AC_MSG_NOTICE([$GSColorDevice])
3583 AC_MSG_CHECKING([for gs CMYK device])
3584 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3587 GSCMYKDevice=bmpsep8
3589 AC_MSG_NOTICE([$GSCMYKDevice])
3592 AC_MSG_CHECKING([for gs mono device])
3593 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3596 GSMonoDevice=$GSColorDevice
3598 AC_MSG_NOTICE([$GSMonoDevice])
3601 AC_MSG_CHECKING([for gs PDF writing device])
3602 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3605 GSPDFDevice=nodevice
3607 AC_MSG_NOTICE([$GSPDFDevice])
3610 AC_MSG_CHECKING([for gs PS writing device])
3611 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3616 AC_MSG_NOTICE([$GSPSDevice])
3619 AC_MSG_CHECKING([for gs EPS writing device])
3620 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3623 GSEPSDevice=nodevice
3625 AC_MSG_NOTICE([$GSEPSDevice])
3628 AC_SUBST(GSAlphaDevice)
3629 AC_SUBST(GSCMYKDevice)
3630 AC_SUBST(GSColorDevice)
3631 AC_SUBST(GSEPSDevice)
3632 AC_SUBST(GSMonoDevice)
3633 AC_SUBST(GSPDFDevice)
3634 AC_SUBST(GSPSDevice)
3638 # PerlMagick-related configuration
3641 # Look for PERL if PerlMagick requested
3642 # If name/path of desired PERL interpreter is specified, look for that one first
3644 if test "$with_perl" != 'no'; then
3645 AC_MSG_NOTICE([-------------------------------------------------------------])
3646 AC_MSG_CHECKING([for Perl])
3648 if test "$with_perl" != 'yes'; then
3649 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3650 PERL=$ac_cv_path_PERL
3652 have_perl="$ac_cv_path_PERL"
3654 AC_PATH_PROGS(PERL,perl perl5,)dnl
3655 if test "$ac_cv_path_PERL"; then
3656 have_perl="$ac_cv_path_PERL"
3661 if test "$with_perl" != 'yes' ; then
3662 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3665 PERL_SUPPORTS_DESTDIR='no'
3667 with_perl_static='no'
3668 with_perl_dynamic='no'
3669 if test "$have_perl" != 'no'; then
3670 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3671 with_perl_static='yes'
3673 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3674 with_perl_dynamic='yes'
3676 # Is PERL's MakeMaker new enough to support DESTDIR?
3677 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3679 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3680 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3681 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3682 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3684 # Determine path to pick up MagickCore library from for use with building PerlMagick
3685 MAGICKCORE_PATH="${LIB_DIR}"
3686 if test $with_perl_static = 'yes'; then
3687 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3688 libtool_objdir=$objdir
3690 # Linker search path to library, followed by -lMagickCore
3691 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3693 AC_SUBST(MAGICKCORE_PATH)
3695 # Create a simple string containing format names for all delegate libraries
3697 if test "$have_autotrace" = 'yes'; then DELEGATES="$DELEGATES autotrace"; fi
3698 if test "$have_bzlib" = 'yes'; then DELEGATES="$DELEGATES bzlib"; fi
3699 if test "$have_djvu" = 'yes'; then DELEGATES="$DELEGATES djvu"; fi
3700 if test "$have_dps" = 'yes'; then DELEGATES="$DELEGATES dps"; fi
3701 if test "$have_fftw" = 'yes'; then DELEGATES="$DELEGATES fftw"; fi
3702 if test "$have_fpx" = 'yes'; then DELEGATES="$DELEGATES fpx"; fi
3703 if test "$have_fontconfig" = 'yes'; then DELEGATES="$DELEGATES fontconfig"; fi
3704 if test "$have_freetype" = 'yes'; then DELEGATES="$DELEGATES freetype"; fi
3705 if test "$have_gslib" = 'yes'; then DELEGATES="$DELEGATES gs"; fi
3706 if test "$have_gvc" = 'yes'; then DELEGATES="$DELEGATES gvc"; fi
3707 if test "$have_jbig" = 'yes'; then DELEGATES="$DELEGATES jbig"; fi
3708 if test "$have_jpeg" = 'yes'; then
3709 DELEGATES="$DELEGATES jpeg";
3710 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi
3712 if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi
3713 if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi
3714 if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi
3715 if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi
3716 if test "$have_lzma" = 'yes'; then DELEGATES="$DELEGATES lzma"; fi
3717 if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi
3718 if test "$have_openexr" = 'yes'; then DELEGATES="$DELEGATES openexr"; fi
3719 if test "$have_pango" = 'yes'; then DELEGATES="$DELEGATES pango"; fi
3720 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES png"; fi
3721 if test "$have_rsvg" = 'yes'; then DELEGATES="$DELEGATES rsvg"; fi
3722 if test "$have_tiff" = 'yes'; then DELEGATES="$DELEGATES tiff"; fi
3723 if test "$have_x" = 'yes'; then DELEGATES="$DELEGATES x11"; fi
3724 if test "$have_xml" = 'yes'; then DELEGATES="$DELEGATES xml"; fi
3725 if test "$have_wmf" = 'yes'; then DELEGATES="$DELEGATES wmf"; fi
3726 if test "$have_zlib" = 'yes'; then DELEGATES="$DELEGATES zlib"; fi
3731 # Handle special compiler flags
3734 # Add '-p' if prof source profiling support enabled
3735 if test "$enable_prof" = 'yes'; then
3737 CXXFLAGS="-p $CXXFLAGS"
3738 LDFLAGS="-p $LDFLAGS"
3741 # Add '-pg' if gprof source profiling support enabled
3742 if test "$enable_gprof" = 'yes'; then
3743 CFLAGS="-pg $CFLAGS"
3744 CXXFLAGS="-pg $CXXFLAGS"
3745 LDFLAGS="-pg $LDFLAGS"
3748 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3749 # This is a gcc-specific feature
3750 if test "$enable_gcov" = 'yes'; then
3751 AC_CHECK_LIB(gcov,_gcov_init)
3752 AC_CHECK_LIB(gcov,__gcov_init)
3753 case "$target_os" in
3755 OSX_GCOV_LDFLAG="-Wl,-single_module"
3761 AC_SUBST(OSX_GCOV_LDFLAG)
3762 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3763 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3764 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3768 # Build library dependency list for libMagickCore
3771 if test "$build_modules" != 'no'; then
3772 MAGICK_DEP_LIBS="$LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
3774 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 $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
3776 AC_SUBST(MAGICK_DEP_LIBS)
3779 # Remove extraneous spaces from output variables (asthetic)
3781 X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'`
3782 X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'`
3783 X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'`
3784 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'`
3786 CC=`echo $CC | sed -e 's/ */ /g'`
3787 CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'`
3788 CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'`
3789 CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'`
3790 DELEGATES=`echo $DELEGATES | sed -e 's/^ //g'`
3791 DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'`
3792 LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'`
3793 TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3794 MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
3795 #LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3797 # Pass only user-provided LIBS as "global" libraries
3803 #AC_SUBST(X_PRE_LIBS)
3805 #AC_SUBST(X_EXTRA_LIBS)
3807 MAGICK_CFLAGS=$CFLAGS
3808 MAGICK_CXXFLAGS="$CXXFLAGS"
3809 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3810 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3811 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3812 MAGICK_LIBS="-lMagickCore $MAGICK_DEP_LIBS"
3814 AC_SUBST(MAGICK_CFLAGS)
3815 AC_SUBST(MAGICK_CXXFLAGS)
3816 AC_SUBST(MAGICK_CPPFLAGS)
3817 AC_SUBST(MAGICK_PCFLAGS)
3818 AC_SUBST(MAGICK_LDFLAGS)
3819 AC_SUBST(MAGICK_LIBS)
3821 AC_SUBST(MAGICK_FEATURES)
3823 # Set configured scripts to executable.
3824 AC_CONFIG_COMMANDS([default],[],[])
3825 AC_CONFIG_COMMANDS([magick.sh.in],[chmod +x magick.sh])
3826 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3827 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3828 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3829 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3831 AC_MSG_NOTICE([-------------------------------------------------------------])
3832 AC_MSG_NOTICE([Update ImageMagick configuration])
3835 rm -f magick-version
3837 result_dejavu_font_dir='none'
3838 if test "${dejavu_font_dir}x" != 'x'; then
3839 result_dejavu_font_dir=$dejavu_font_dir
3842 result_ghostscript_font_dir='none'
3843 if test "${ghostscript_font_dir}x" != 'x'; then
3844 result_ghostscript_font_dir=$ghostscript_font_dir
3847 result_windows_font_dir='none'
3848 if test "${windows_font_dir}x" != 'x'; then
3849 result_windows_font_dir=${windows_font_dir}
3853 ImageMagick is configured as follows. Please verify that this configuration
3854 matches your expectations.
3856 Host system type: $host
3857 Build system type: $build
3860 -------------------------------------------------------------------------------
3861 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3862 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3863 Module support --with-modules=$build_modules $build_modules
3864 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3865 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3866 High Dynamic Range Imagery
3867 --enable-hdri=$enable_hdri $enable_hdri
3869 Delegate Configuration:
3870 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3871 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3872 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3873 DJVU --with-djvu=$with_djvu $have_djvu
3874 DPS --with-dps=$with_dps $have_dps
3875 FFTW --with-fftw=$with_fftw $have_fftw
3876 FlashPIX --with-fpx=$with_fpx $have_fpx
3877 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3878 FreeType --with-freetype=$with_freetype $have_freetype
3879 GhostPCL None $PCLDelegate ($PCLVersion)
3880 GhostXPS None $XPSDelegate ($XPSVersion)
3881 Ghostscript None $PSDelegate ($GSVersion)
3882 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3883 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3884 Graphviz --with-gvc=$with_gvc $have_gvc
3885 JBIG --with-jbig=$with_jbig $have_jbig
3886 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
3887 JPEG-2000 --with-jp2=$with_jp2 $have_jp2
3888 LCMS v1 --with-lcms=$with_lcms $have_lcms
3889 LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
3890 LQR --with-lqr=$with_lqr $have_lqr
3891 LTDL --with-ltdl=$with_ltdl $have_ltdl
3892 LZMA --with-lzma=$with_lzma $have_lzma
3893 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3894 OpenEXR --with-openexr=$with_openexr $have_openexr
3895 PANGO --with-pango=$with_pango $have_pango
3896 PERL --with-perl=$with_perl $have_perl
3897 PNG --with-png=$with_png $have_png
3898 RSVG --with-rsvg=$with_rsvg $have_rsvg
3899 TIFF --with-tiff=$with_tiff $have_tiff
3900 WEBP --with-webp=$with_webp $have_webp
3901 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
3902 WMF --with-wmf=$with_wmf $have_wmf
3903 X11 --with-x=$with_x $have_x
3904 XML --with-xml=$with_xml $have_xml
3905 ZLIB --with-zlib=$with_zlib $have_zlib
3908 X_CFLAGS = $X_CFLAGS
3909 X_PRE_LIBS = $X_PRE_LIBS
3911 X_EXTRA_LIBS = $X_EXTRA_LIBS
3913 Options used to compile and link:
3914 PREFIX = $PREFIX_DIR
3915 EXEC-PREFIX = $EXEC_PREFIX_DIR
3916 VERSION = $PACKAGE_VERSION
3919 CPPFLAGS = $MAGICK_CPPFLAGS
3920 PCFLAGS = $MAGICK_PCFLAGS
3923 MAGICK_LDFLAGS = $MAGICK_LDFLAGS
3926 CXXFLAGS = $CXXFLAGS
3927 FEATURES = $MAGICK_FEATURES