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/Magick++.pc \
54 MagickCore/MagickCore-config \
55 MagickCore/MagickCore.pc \
56 MagickCore/version.h \
60 PerlMagick/default/Magick.pm \
61 PerlMagick/Makefile.PL \
62 PerlMagick/default/Makefile.PL \
63 PerlMagick/quantum/Makefile.PL \
64 PerlMagick/quantum/quantum.pm \
65 PerlMagick/quantum/quantum.xs \
66 PerlMagick/quantum/typemap \
69 utilities/composite.1 \
73 utilities/identify.1 \
74 utilities/ImageMagick.1 \
79 MagickWand/MagickWand-config \
80 MagickWand/MagickWand.pc ])
83 # Save initial user-tunable values
86 for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
87 eval isset=\${$var+set}
88 if test "$isset" = 'set'; then
90 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
93 AC_SUBST(DISTCHECK_CONFIG_FLAGS)
95 CONFIGURE_ARGS="$0 ${ac_configure_args}"
96 AC_SUBST(CONFIGURE_ARGS)
98 # Source file containing package/library versioning information.
99 . ${srcdir}/version.sh
101 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
107 MAGICK_TARGET_CPU=$host_cpu
108 AC_SUBST(MAGICK_TARGET_CPU)
109 AC_DEFINE_UNQUOTED(MAGICK_TARGET_CPU,$MAGICK_TARGET_CPU,[Target Host CPU])
111 MAGICK_TARGET_VENDOR=$host_vendor
112 AC_SUBST(MAGICK_TARGET_VENDOR)
113 AC_DEFINE_UNQUOTED(MAGICK_TARGET_VENDOR,$MAGICK_TARGET_VENDOR,[Target Host Vendor])
115 MAGICK_TARGET_OS=$host_os
116 AC_SUBST(MAGICK_TARGET_OS)
117 AC_DEFINE_UNQUOTED(MAGICK_TARGET_OS,$MAGICK_TARGET_OS,[Target Host OS])
120 # Substitute versioning
121 AC_SUBST([MAGICK_MAJOR_VERSION],[magick_major_version])
122 AC_SUBST([MAGICK_MINOR_VERSION],[magick_minor_version])
123 AC_SUBST([MAGICK_MICRO_VERSION],[magick_micro_version])
124 AC_SUBST([MAGICK_PATCHLEVEL_VERSION],[magick_patchlevel_version])
125 AC_SUBST([MAGICK_VERSION],[magick_version])
126 AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision])
128 # Substitute library versioning
129 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
130 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
131 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
132 AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
133 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
134 AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
135 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
137 AC_SUBST(PACKAGE_NAME)dnl
138 AC_SUBST(PACKAGE_VERSION)dnl
139 AC_SUBST(PACKAGE_PERL_VERSION)dnl
140 AC_SUBST(PACKAGE_RELEASE)dnl
141 AC_SUBST(PACKAGE_CHANGE_DATE)dnl
142 AC_SUBST(PACKAGE_LIB_VERSION)dnl
143 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
144 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
145 AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
147 # Ensure that make can run correctly
150 AM_INIT_AUTOMAKE([1.11 color-tests foreign parallel-tests silent-rules subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip])
152 # Enable support for silent build rules
153 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
155 MAGICK_LIB_VERSION="0x"
156 if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
157 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
159 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
160 if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
161 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
163 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
164 if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
165 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
167 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
168 AC_SUBST(MAGICK_LIB_VERSION)
170 # Definition used to define MagickLibVersionText in version.h
171 MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
172 AC_SUBST(MAGICK_LIB_VERSION_TEXT)
174 # Definition used to define MagickLibVersionNumber in version.h
175 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
176 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
178 # Regenerate config.status if ChangeLog or version.sh is updated.
179 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
184 MAGICK_CPPFLAGS=$CPPFLAGS_USER
185 MAGICK_PCFLAGS=$CPPFLAGS_USER
191 # Evaluate shell variable equivalents to Makefile directory variables
193 if test "x$prefix" = xNONE; then
194 prefix=$ac_default_prefix
196 # Let make expand exec_prefix.
197 if test "x$exec_prefix" = xNONE; then
198 exec_prefix='${prefix}'
202 eval "eval PREFIX_DIR=${prefix}"
204 eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
205 AC_SUBST(EXEC_PREFIX_DIR)
206 eval "eval BIN_DIR=$bindir"
208 eval "eval SBIN_DIR=$sbindir"
210 eval "eval LIBEXEC_DIR=$libexecdir"
211 AC_SUBST(LIBEXEC_DIR)
212 eval "eval DATA_DIR=$datadir"
214 eval "eval DOC_DIR=$datadir/doc"
216 eval "eval SYSCONF_DIR=$sysconfdir"
217 AC_SUBST(SYSCONF_DIR)
218 eval "eval SHAREDSTATE_DIR=$sharedstatedir"
219 AC_SUBST(SHAREDSTATE_DIR)
220 eval "eval LOCALSTATE_DIR=$localstatedir"
221 AC_SUBST(LOCALSTATE_DIR)
222 eval "eval LIB_DIR=$libdir"
224 eval "eval INCLUDE_DIR=$includedir"
225 AC_SUBST(INCLUDE_DIR)
226 eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
227 AC_SUBST(PERSISTINCLUDE_DIR)
228 eval "eval INFO_DIR=$infodir"
230 eval "eval MAN_DIR=$mandir"
233 # Get full paths to source and build directories
234 srcdirfull="`cd $srcdir && pwd`"
238 # Compute variables useful for running uninstalled software.
240 MAGICK_CODER_MODULE_PATH="${builddir}/coders"
241 MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
242 MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
243 MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
245 case "${build_os}" in
247 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
248 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
249 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
250 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
259 AC_SUBST(MAGICK_CODER_MODULE_PATH)
260 AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
261 AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
262 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
267 # Enable OS features.
269 AC_USE_SYSTEM_EXTENSIONS
289 AX_GCC_ARCHFLAG([no])
292 # Check for linker script support
296 # Enable run-time checking.
298 AC_ARG_ENABLE([bounds-checking],
299 [AC_HELP_STRING([--enable-bounds-checking],
300 [enable run-time bounds-checking])],
301 [enable_bounds_checking=$enableval],
302 [enable_bounds_checking='no'])
304 if test "$enable_bounds_checking" = yes; then
305 AC_DEFINE([_FORTIFY_SOURCE], [2],
306 [enable run-time bounds-checking])
316 native_win32_build='no'
324 native_win32_build='yes'
328 if test "${GDI32_LIBS}x" != 'x'; then
329 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
332 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
333 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
334 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
335 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
337 WinPathScript="${srcdirfull}/winpath.sh"
338 AC_SUBST(WinPathScript)
341 # Compiler flags tweaks
343 if test "${GCC}" != "yes"; then
346 # aCC: HP ANSI C++ B3910B A.03.34
347 CFLAGS="${CFLAGS} -Wp,-H30000"
348 if test -n "${CXXFLAGS}"; then
351 CXXFLAGS="${CXXFLAGS} -AA"
355 # Compaq alphaev68-dec-osf5.1 compiler
356 if test -n "${CXXFLAGS}"; then
357 CXXFLAGS='-std strict_ansi -noimplicit_include'
359 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
364 # Check for lazy-loading.
365 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
367 im_cv_ld_lazyload='none'
369 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
370 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
371 im_cv_ld_lazyload='-Wl,-zlazyload'
376 if test "${im_cv_ld_lazyload}" != 'none' ; then
377 if test -z "${LDFLAGS}" ; then
378 LDFLAGS="${im_cv_ld_lazyload}"
380 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
384 dnl Platform-specific stuff
386 *darwin* | *-macos10*)
387 dnl Disable FORTIFY_SOURCE to fix a bug in LVVM / OpenMP support
388 CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=0"
389 dnl OS X universal binary support, requires --disable-dependency-tracking
390 AC_ARG_ENABLE([osx-universal-binary],
391 AC_HELP_STRING([--enable-osx-universal-binary],
392 [build universal binary on OS X [[default=no]]]),
393 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
395 if test "${build_osxuniversal}" != no ; then
396 if test "$enable_dependency_tracking" != no ; then
397 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
398 Please re-run configure with these options:
399 --disable-dependency-tracking --enable-osx-universal-binary
402 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
403 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
404 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
410 # ARCH specific include directory
412 AC_ARG_WITH([includearch-dir],
413 [AC_HELP_STRING([--includearch-dir=DIR],
414 [ARCH specific include directory])],
415 [includearch_dir=$withval],
416 [includearch_dir=$INCLUDE_DIR])
418 eval "eval INCLUDEARCH_DIR=$includearch_dir"
419 AC_SUBST(INCLUDEARCH_DIR)
422 # ARCH specific configuration directory
424 AC_ARG_WITH([sharearch-dir],
425 [AC_HELP_STRING([--sharearch-dir=DIR],
426 [ARCH specific config directory])],
427 [sharearch_dir=$withval],
428 [sharearch_dir="${LIB_DIR}"])
430 eval "eval SHAREARCH_DIR=$sharearch_dir"
431 AC_SUBST(SHAREARCH_DIR)
433 # Path to the pkgconfig folder
434 AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=DIR],
435 [Path to the pkgconfig directory @<:@LIBDIR/pkgconfig@:>@]),
436 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
437 AC_SUBST([pkgconfigdir])
440 # Enable support for threads
441 AC_ARG_WITH([threads],
442 [AC_HELP_STRING([--without-threads], [disable threads support])],
443 [with_threads=$withval],
444 [with_threads='yes'])
447 if test "$with_threads" != 'no'; then
449 if test "$ax_pthread_ok" = yes; then
451 DEF_THREAD="$PTHREAD_CFLAGS"
452 CFLAGS="$CFLAGS $DEF_THREAD"
453 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
454 if test "$CC" != "$PTHREAD_CC"; then
455 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
458 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
462 # Enable support for OpenMP
463 if test "$have_threads" != 'yes'; then
464 ac_cv_prog_c_openmp=unsupported
467 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
468 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
469 AC_SUBST(OPENMP_CFLAGS)
470 if test "$enable_openmp" != no; then
471 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
472 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
476 # Enable support for OpenCL
478 CFLAGS="$CL_CFLAGS $CFLAGS"
479 LIBS="$CL_LIBS $LIBS"
481 if test "$enable_opencl" != no; then
482 if test "X$ax_cv_check_cl_libcl" != Xno; then :
483 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
489 # Check for large file support
495 if test "$enable_largefile" != no; then
496 case $ac_cv_sys_file_offset_bits in
498 # nothing to do here as the host supports LFS fine
501 AC_MSG_CHECKING([for native large file support])
502 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
504 exit(!(sizeof(off_t) == 8));
506 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
507 AC_MSG_RESULT([yes])],
508 [AC_MSG_RESULT([no])])
511 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
514 if test "$ac_cv_sys_large_files" != 'no'; then
515 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
517 if test "$ac_cv_sys_largefile_source" != 'no'; then
518 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
521 AC_SUBST(LFS_CPPFLAGS)
527 AC_SUBST(LIBTOOL_DEPS)
529 # Check to see if building shared libraries
530 libtool_build_shared_libs='no'
531 if test "$enable_shared" = 'yes'; then
532 libtool_build_shared_libs='yes'
535 # Check to see if building static libraries
536 libtool_build_static_libs='no'
537 if test "$enable_static" = 'yes'; then
538 libtool_build_static_libs='yes'
541 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
543 # Enable support for building loadable modules
546 AC_ARG_WITH([modules],
547 [AC_HELP_STRING([--with-modules],
548 [enable building dynamically loadable modules])],
549 [with_modules=$withval],
552 # Only allow building loadable modules if we are building shared libraries
553 if test "$with_modules" != 'no' ; then
554 if test "$libtool_build_shared_libs" = 'no'; then
555 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
561 if test "$build_modules" != 'no' ; then
562 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
563 MAGICK_FEATURES="$MAGICK_FEATURES Modules"
565 AM_CONDITIONAL(WITH_MODULES, test "$build_modules" != 'no')
567 # Enable build using delegate libraries built in subdirectories rather than installed
568 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
569 AC_ARG_ENABLE([delegate-build],
570 [AC_HELP_STRING([--enable-delegate-build],
571 [look for delegate libraries in build directory])],
572 [enable_delegate_build=$enableval],
573 [enable_delegate_build='no'])
575 AC_ARG_ENABLE([deprecated],
576 [AC_HELP_STRING([--disable-deprecated],
577 [exclude deprecated methods in MagickCore and MagickWand APIs])],
578 [enable_deprecated=$enableval],
579 [enable_deprecated='no'])
581 if test "$enable_deprecated" = 'yes'; then
582 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
584 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
587 # Build a version of ImageMagick which operates uninstalled.
588 # Used to build distributions located via MAGICK_HOME / executable path
589 AC_ARG_ENABLE([installed],
590 [AC_HELP_STRING([--disable-installed],
591 [Formally install ImageMagick under PREFIX])],
592 [enable_installed=$enableval],
593 [enable_installed='yes'])
595 if test "$enable_installed" = 'yes'; then
596 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
598 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
601 # Permit enciphering and deciphering image pixels.
602 AC_ARG_ENABLE([cipher],
603 [AC_HELP_STRING([--disable-cipher],
604 [disable enciphering and deciphering image pixels])],
605 [enable_cipher=$enableval],
606 [enable_cipher='yes'])
608 if test "$enable_cipher" = 'yes'; then
609 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
612 # Build a zero-configuration version of ImageMagick.
613 AC_ARG_ENABLE([zero-configuration],
614 [AC_HELP_STRING([--enable-zero-configuration],
615 [enable self-contained, embeddable, zero-configuration ImageMagick])],
616 [enable_zero_configuration=$enableval],
617 [enable_zero_configuration='no'])
619 if test "$enable_zero_configuration" = 'yes'; then
620 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
621 MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES"
624 # Build a high dynamic range version of ImageMagick.
625 AC_ARG_ENABLE([hdri],
626 [AC_HELP_STRING([--enable-hdri],
627 [accurately represent the wide range of intensity levels found in real scenes])],
628 [enable_hdri=$enableval],
632 if test "$enable_hdri" = 'yes'; then
634 magick_hdri_enable='1';
635 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
637 magick_hdri_enable='0'
639 AC_DEFINE_UNQUOTED(HDRI_ENABLE_OBSOLETE_IN_H,$magick_hdri_enable,[Whether hdri is enabled or not])
640 AC_SUBST(MAGICK_HDRI)dnl
641 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
642 CFLAGS="$CFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
643 CPPFLAGS="$CPPFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
645 # Build a version of ImageMagick with assert statements.
646 AC_ARG_ENABLE([assert],
647 [AC_HELP_STRING([--disable-assert],
648 [disable assert() statements in build])],
649 [enable_assert=$enableval],
650 [enable_assert='yes'])
652 if test "$enable_assert" = 'no'; then
653 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
656 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
659 # Enable hugepages support
660 AC_ARG_ENABLE([hugepages],
661 [AC_HELP_STRING([--enable-hugepages],
662 [enable 'huge pages' support])],
663 [enable_hugepages=$enableval],
664 [enable_hugepages='no'])
666 # Enable ccmalloc memory debugging support
667 AC_ARG_ENABLE([ccmalloc],
668 [AC_HELP_STRING([--enable-ccmalloc],
669 [enable 'ccmalloc' memory debug support])],
670 [enable_ccmalloc=$enableval],
671 [enable_ccmalloc='no'])
673 # Enable Electric Fence memory debugging support
674 AC_ARG_ENABLE([efence],
675 [AC_HELP_STRING([--enable-efence],
676 [enable 'efence' memory debug support])],
677 [enable_efence=$enableval],
678 [enable_efence='no'])
680 # Enable prof-based profiling support
681 AC_ARG_ENABLE([prof],
682 [AC_HELP_STRING([--enable-prof],
683 [enable 'prof' profiling support])],
684 [enable_prof=$enableval],
687 # Enable gprof-based profiling support
688 AC_ARG_ENABLE([gprof],
689 [AC_HELP_STRING([--enable-gprof],
690 [enable 'gprof' profiling support])],
691 [enable_gprof=$enableval],
694 # Enable gcov-based profiling support
695 AC_ARG_ENABLE([gcov],
696 [AC_HELP_STRING([--enable-gcov],
697 [enable 'gcov' profiling support])],
698 [enable_gcov=$enableval],
701 enable_profiling='no'
702 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
703 enable_profiling='yes'
704 if test "$libtool_build_shared_libs" = 'yes'; then
705 echo "Warning: Can not profile code using shared libraries"
709 # Magick API method prefix
710 AC_ARG_WITH([method-prefix],
711 [AC_HELP_STRING([--with-method-prefix=PREFIX],
712 [prefix MagickCore API methods])],
713 [with_method_prefix=$withval],
714 [with_method_prefix='no'])
716 if test "$with_method_prefix" != 'no'; then
717 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
718 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
721 # Enable legacy support (default no)
722 AC_ARG_ENABLE(legacy-support,
723 [ --enable-legacy-support install legacy command-line utilities (default disabled)],
724 [with_legacy_support=$enableval],
725 [with_legacy_support='no'])
726 AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no')
728 # Number of bits in a Quantum
729 AC_ARG_WITH([quantum-depth],
730 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
731 [number of bits in a pixel quantum (default 16)])],
732 [with_quantum_depth=$withval],
733 [with_quantum_depth=16])
735 if test "$with_quantum_depth" != '8'; then
736 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
739 case "${with_quantum_depth}" in
744 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
746 QUANTUM_DEPTH="$with_quantum_depth"
747 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH_OBSOLETE_IN_H,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
748 AC_SUBST(QUANTUM_DEPTH)dnl
749 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
750 CFLAGS="$CFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
751 CPPFLAGS="$CPPFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
753 # define a lib suffix for abi purpose
754 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}"
755 if test "$enable_hdri" = 'yes'; then
756 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}${MAGICK_HDRI}"
758 AC_SUBST(MAGICK_ABI_SUFFIX)
760 # Set pixel cache threshold
762 [AC_HELP_STRING([--with-cache=THRESHOLD],
763 [set pixel cache threshhold in MB (default available memory)])],
764 [with_cache=$withval],
767 if test "$with_cache" != ''; then
768 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
769 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
772 # Disable/Enable support for full delegate paths
773 AC_ARG_WITH([frozenpaths],
774 [AC_HELP_STRING([--with-frozenpaths],
775 [freeze delegate paths])],
776 [with_frozenpaths=$withval],
777 [with_frozenpaths='no'])
779 # Enable build/install of Magick++
780 AC_ARG_WITH([magick-plus-plus],
781 [AC_HELP_STRING([--without-magick-plus-plus],
782 [disable build/install of Magick++])],
783 [with_magick_plus_plus=$withval],
784 [with_magick_plus_plus='yes'])
786 # Encode the this name into the shared library.
787 AC_ARG_WITH([package-release-name],
788 [AC_HELP_STRING([--with-package-release-name=NAME],
789 [encode this name into the shared library])],
790 [MAGICK_LT_RELEASE_OPTS="-release $withval"])
791 AC_SUBST(MAGICK_LT_RELEASE_OPTS)
793 # Disable build/install of PerlMagick.
795 [AC_HELP_STRING([--with-perl],
796 [enable build/install of PerlMagick])],
797 [with_perl=$withval],
800 # Options to pass when configuring PerlMagick
801 AC_ARG_WITH([perl-options],
802 [AC_HELP_STRING([--with-perl-options=OPTIONS],
803 [options to pass on command-line when generating PerlMagick build file])],
804 PERL_MAKE_OPTIONS=$withval)
805 AC_SUBST(PERL_MAKE_OPTIONS)
807 # Enable umem, object-caching memory allocation library.
809 [ --with-umem enable umem memory allocation library support],
810 [with_umem=$withval],
812 if test "$with_umem" != 'yes' ; then
813 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
817 # Specify path to shared libstdc++ if not in normal location
819 AC_ARG_WITH([libstdc],
820 [AC_HELP_STRING([--with-libstdc=DIR],
821 [ use libstdc++ in DIR (for GNU C++)])],
822 [with_libstdc=$withval],
825 if test "$with_libstdc" != ''; then
826 if test -d "$with_libstdc"; then
827 LIBSTDCLDFLAGS="-L$with_libstdc"
830 AC_SUBST(LIBSTDCLDFLAGS)
832 # Does gcc required -traditional?
833 AC_PROG_GCC_TRADITIONAL
837 # Set defines required to build DLLs and modules using MinGW
840 # These options are set for multi-thread DLL module build
841 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
843 # executable/Magick++: _DLL _MAGICKMOD_
844 MODULE_EXTRA_CPPFLAGS=''
845 LIBRARY_EXTRA_CPPFLAGS=''
846 if test "${native_win32_build}" = 'yes'; then
847 if test "${libtool_build_shared_libs}" = 'yes'; then
848 CPPFLAGS="$CPPFLAGS -D_DLL"
849 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
850 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
851 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
852 if test "$build_modules" = 'yes'; then
853 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
855 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
858 CPPFLAGS="$CPPFLAGS -D_LIB"
859 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
860 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
862 if test "$with_threads" = 'yes'; then
863 CPPFLAGS="$CPPFLAGS -D_MT"
864 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
865 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
868 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
869 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
871 # Check standard headers
873 if ! test x"$ac_cv_header_stdc" = x"yes"; then
874 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
875 header files. Compilation cannot proceed. Please install the ANSI C
876 headers and rerun this script.]);
881 # Check additional headers
882 AC_CHECK_HEADERS(arm/limits.h arpa/inet.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h sys/ipc.h sys/mman.h sys/resource.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h xlocale.h)
886 # Checks for typedefs, structures, and compiler characteristics.
900 # Checks for language qualifiers and semantics.
908 # If words are stored with the most significant byte first (like
909 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
912 # Define to a suitable type, if standard headers do not define it.
920 AC_TYPE_LONG_DOUBLE_WIDER
921 AC_TYPE_LONG_LONG_INT
935 AC_TYPE_UNSIGNED_LONG_LONG_INT
937 # Float_t and double_t are intended to be the the most efficient type.
938 AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]])
939 AC_CHECK_TYPES([double_t], [], [], [[#include <math.h>]])
940 AC_CHECK_SIZEOF([float_t], [], [[#include <math.h>]])
941 AC_CHECK_SIZEOF([double_t], [], [[#include <math.h>]])
943 # Get size of float, double and long double for comparaison.
944 AC_CHECK_SIZEOF([float])
945 AC_CHECK_SIZEOF([double])
946 AC_CHECK_SIZEOF([long double])
948 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
949 AC_CHECK_SIZEOF(signed short)
951 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
952 AC_CHECK_SIZEOF(unsigned short)
954 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
955 AC_CHECK_SIZEOF(signed int)
957 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
958 AC_CHECK_SIZEOF(unsigned int)
960 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
961 AC_CHECK_SIZEOF(signed long)
963 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
964 AC_CHECK_SIZEOF(unsigned long)
966 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
967 # 'signed long long' is not supported then the value defined is zero.
968 AC_CHECK_SIZEOF(signed long long)
970 # Obtain size of a 'unsigned long long' and define as
971 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
972 # supported then the value defined is zero.
973 AC_CHECK_SIZEOF(unsigned long long)
975 # Obtain size of off_t and define as SIZEOF_OFF_T
976 AC_CHECK_SIZEOF(off_t)
978 # Obtain size of size_t and define as SIZEOF_SIZE_T
979 AC_CHECK_SIZEOF(size_t)
981 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
982 AC_CHECK_SIZEOF(ssize_t)
984 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
985 AC_CHECK_SIZEOF(unsigned int*)
988 # Compute sized types for current CPU and compiler options.
991 AC_MSG_CHECKING(for signed 8-bit type)
993 AC_MSG_RESULT($INT8_T)
996 AC_MSG_CHECKING(for unsigned 8-bit type)
997 UINT8_T='unsigned char'
998 AC_MSG_RESULT($UINT8_T)
1001 AC_MSG_CHECKING(for signed 16-bit type)
1002 INT16_T='signed short'
1003 AC_MSG_RESULT($INT16_T)
1006 AC_MSG_CHECKING(for unsigned 16-bit type)
1007 UINT16_T='unsigned short'
1008 AC_MSG_RESULT($UINT16_T)
1011 AC_MSG_CHECKING(for signed 32-bit type)
1014 if test $ac_cv_sizeof_signed_int -eq 4; then
1015 INT32_T='signed int'
1017 elif test $ac_cv_sizeof_signed_long -eq 4; then
1018 INT32_T='signed long'
1021 AC_MSG_RESULT($INT32_T)
1025 AC_MSG_CHECKING(for unsigned 32-bit type)
1028 if test $ac_cv_sizeof_unsigned_int -eq 4; then
1029 UINT32_T='unsigned int'
1031 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
1032 UINT32_T='unsigned long'
1035 AC_MSG_RESULT($UINT32_T)
1039 AC_MSG_CHECKING(for signed 64-bit type)
1042 if test $ac_cv_sizeof_signed_long -eq 8; then
1043 INT64_T='signed long'
1045 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
1046 INT64_T='signed long long'
1049 case "${host_os}" in
1054 AC_MSG_RESULT($INT64_T)
1058 AC_MSG_CHECKING(for unsigned 64-bit type)
1061 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1062 UINT64_T='unsigned long'
1064 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1065 UINT64_T='unsigned long long'
1068 case "${host_os}" in
1073 AC_MSG_RESULT($UINT64_T)
1077 AC_MSG_CHECKING(for unsigned maximum type)
1080 if test "$UINT64_T" != 'none'; then
1083 elif test "$UINT32_T" != 'none'; then
1087 AC_MSG_RESULT($UINTMAX_T)
1091 AC_MSG_CHECKING(for pointer difference type)
1094 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1095 UINTPTR_T='unsigned long'
1097 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1098 UINTPTR_T='unsigned long long'
1101 AC_MSG_RESULT($UINTPTR_T)
1105 AC_MSG_CHECKING([whether our compiler supports __func__])
1107 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1108 AC_MSG_RESULT([yes]),
1110 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1112 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1113 AC_MSG_RESULT([yes])
1114 AC_DEFINE(__func__, __FUNCTION__,
1115 [Define to appropriate substitue if compiler does not have __func__]),
1117 AC_DEFINE(__func__, __FILE__,
1118 [Define to appropriate substitue if compiler does not have __func__])))
1122 # Check for functions
1125 MAGICK_FUNC_MMAP_FILEIO
1126 AC_FUNC_CLOSEDIR_VOID
1130 AC_FUNC_SELECT_ARGTYPES
1131 AC_FUNC_SETVBUF_REVERSED
1141 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1142 LIBS="$MATH_LIBS $LIBS"
1146 # Find socket library
1148 AC_SEARCH_LIBS(gethostbyname, resolv nsl)
1149 AC_SEARCH_LIBS(socket, socket,
1151 AC_DEFINE([HAVE_SOCKET],[1],[Define to 1 if you have socket support.])
1152 MAGICK_FEATURES="DPC $MAGICK_FEATURES"
1155 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 socket 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])
1158 # Check for clock_gettime().
1160 AC_SEARCH_LIBS(clock_gettime, rt,
1162 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1163 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1166 [[#include <time.h>]],
1167 [[clockid_t clockType = CLOCK_REALTIME;]])],
1170 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1171 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1177 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1183 # Check for function prototypes
1187 AC_CHECK_DECLS([pread, pwrite],[],[],[
1188 #include <unistd.h>])
1190 AC_CHECK_DECLS([strlcpy],[],[],[
1191 #include <strings.h>])
1193 AC_CHECK_DECLS([vsnprintf],[],[],[
1195 #include <stdarg.h>])
1199 # C++ Support Tests (For Magick++)
1202 have_magick_plus_plus='no'
1203 if test "$with_magick_plus_plus" = 'yes'; then
1208 # Full set of headers used...
1209 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1210 # functional iomanip iosfwd iostream iterator list string strstream utility
1215 AX_CXX_NAMESPACE_STD
1216 AC_CXX_HAVE_STD_LIBS
1220 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1222 test $ax_cv_cxx_bool = 'yes' && \
1223 test $ax_cv_cxx_namespaces = 'yes' && \
1224 test $ac_cv_cxx_have_std_libs = 'yes' && \
1225 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1226 have_magick_plus_plus='yes'
1228 have_magick_plus_plus='no (failed tests)'
1230 AC_MSG_RESULT([$have_magick_plus_plus])
1233 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1235 # Only check for delegate libraries in subdirectories if requested.
1236 if test "$enable_delegate_build" != 'no'; then
1237 # Check for delegate sub-directories and add -I & -L options as required.
1238 # This presumes that delegates are installed as detailed in the ImageMagick
1239 # README. If delegates are installed in a standard location where the
1240 # compiler will automatically find them then these options should not be
1244 # Most delegates have includes in the same directory as the library, but not all...
1247 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
1248 if test -d "$builddir/$dir"; then
1249 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1251 if test -d "$srcdirfull/$dir"; then
1252 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1258 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
1259 if test -d "$builddir/$dir/.libs"; then
1260 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1262 if test -d "$srcdirfull/$dir/.libs"; then
1263 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1266 if test -d "$builddir/$dir"; then
1267 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1269 if test -d "$srcdirfull/$dir"; then
1270 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1276 # Assume that delegate headers reside under same directory as ImageMagick
1277 # installation prefix.
1278 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/${PACKAGE_NAME}-$MAGICK_MAJOR_VERSION $MAGICK_CPPFLAGS"
1281 # Find the X11 RGB database
1283 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1284 [# Look for the header file in a standard set of common directories.
1285 # Check X11 before X11Rn because it is often a symlink to the current release.
1294 /usr/XFree86/lib/X11 \
1302 /usr/local/X11/lib \
1303 /usr/local/X11R4/lib \
1304 /usr/local/X11R5/lib \
1305 /usr/local/X11R6/lib \
1307 /usr/local/lib/X11 \
1308 /usr/local/lib/X11R4 \
1309 /usr/local/lib/X11R5 \
1310 /usr/local/lib/X11R6 \
1311 /usr/local/lib/X11R7 \
1312 /usr/local/x11r5/lib \
1313 /usr/lpp/Xamples/lib \
1315 /usr/openwin/share/lib \
1316 /usr/unsupported/lib \
1319 if test -f "$ac_dir/X11/rgb.txt"; then
1320 im_cv_x_configure="$ac_dir/X11/"
1322 elif test -f "$ac_dir/rgb.txt"; then
1323 im_cv_x_configure="$ac_dir/"
1328 X11_CONFIGURE_PATH="$im_cv_x_configure"
1329 case "${build_os}" in
1331 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1334 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",[Location of X11 configure files])
1337 # Find OpenMP library
1340 if test "$enable_openmp" != 'no'; then
1341 if test "${GCC}" = "yes"; then
1342 # Open64 (passes for GCC but uses different OpenMP implementation)
1343 if test "x$GOMP_LIBS" = x ; then
1344 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1345 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1349 if test "x$GOMP_LIBS" = x ; then
1350 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1354 if test "x$GOMP_LIBS" = x ; then
1355 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1358 if test "x$GOMP_LIBS" = x ; then
1359 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1361 # SGI IRIX 6.5 MIPSpro C/C++
1362 if test "x$GOMP_LIBS" = x ; then
1363 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1366 LIBS="$GOMP_LIBS $LIBS"
1371 # Find Posix threads library
1374 if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then
1376 if test "x$PTHREAD_LIBS" = "x"; then
1377 case "${host_cpu}-${host_os}" in
1379 MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;;
1383 for lib in pthread pthreads; do
1384 if test "x$PTHREAD_LIBS" = "x"; then
1385 MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib])
1389 THREAD_LIBS="$PTHREAD_LIBS"
1390 LIBS="$LIBS $THREAD_LIBS"
1392 AC_SUBST(THREAD_LIBS)
1399 if test "$with_umem" != 'no'; then
1400 AC_MSG_CHECKING(for UMEM support )
1404 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1405 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1406 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1407 AC_MSG_CHECKING(if umem memory allocation library is complete)
1408 if test $passed -gt 0; then
1409 if test $failed -gt 0; then
1410 AC_MSG_RESULT(no -- some components failed test)
1411 have_umem='no (failed tests)'
1414 LIBS="$UMEM_LIBS $LIBS"
1415 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1423 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1427 # Add support for ccmalloc memory debugging library if requested
1431 if test "$enable_ccmalloc" = 'yes'; then
1432 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1433 if test -n "$CCMALLOCDelegate"; then
1434 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1436 # Assume that gcc is used with ccmalloc.
1437 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1438 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1439 if test -n "$CCMALLOC_LIBS"; then
1441 LIBS="$LIBS $CCMALLOC_LIBS"
1450 # Add support for 'huge pages' if requested
1452 AS_IF([test "x$enable_hugepages" != "xno"],[
1453 AC_DEFINE(HAVE_HUGEPAGES, 1, [Compile with hugepage support])
1457 # Add support for efence memory debugging library if requested
1459 if test "$enable_efence" = 'yes'; then
1460 EFENCE_LIBS='-lefence'
1461 LIBS="$EFENCE_LIBS $LIBS"
1464 dnl ===========================================================================
1470 AC_ARG_WITH([bzlib],
1471 [AC_HELP_STRING([--without-bzlib],
1472 [disable BZLIB support])],
1473 [with_bzlib=$withval],
1476 if test "$with_bzlib" != 'yes'; then
1477 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1481 if test "$with_bzlib" != 'no'; then
1483 AC_MSG_RESULT([-------------------------------------------------------------])
1484 AC_MSG_CHECKING([for BZLIB])
1489 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1490 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1491 if test "$native_win32_build" = 'yes'; then
1492 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1494 if test $found_libbz -gt 0; then
1495 passed=`expr $passed + 1`
1497 failed=`expr $failed + 1`
1499 AC_MSG_CHECKING(if BZLIB package is complete)
1500 if test $passed -gt 0; then
1501 if test $failed -gt 0; then
1502 AC_MSG_RESULT(no -- some components failed test)
1503 have_bzlib='no (failed tests)'
1506 LIBS="$BZLIB_LIBS $LIBS"
1507 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1515 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1516 AC_SUBST(BZLIB_LIBS)
1519 # Find the X11 include and library directories.
1526 if test "$no_x" != 'yes'; then
1527 AC_MSG_RESULT([-------------------------------------------------------------])
1528 AC_MSG_CHECKING([for X11])
1530 LDFLAGS="$LDFLAGS $X_LIBS"
1531 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1532 LIBS="$X11_LIBS $LIBS"
1533 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1535 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1538 # Check for X11 shared memory extension
1540 # shmctl is required to support the shared memory extension
1541 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1542 if test "$have_shmctl" != 'yes'; then
1544 LIBS="$LIBS -lcygipc"
1545 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1549 if test "$have_shmctl" = 'yes'; then
1550 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1554 # Check for X11 shape extension
1556 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1557 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1558 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1560 if test "$no_x" != 'yes'; then
1565 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1569 dnl ===========================================================================
1575 [AC_HELP_STRING([--without-zlib],
1576 [disable ZLIB support])],
1577 [with_zlib=$withval],
1580 if test "$with_zlib" != 'yes'; then
1581 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1586 dnl PNG requires zlib so enable zlib check if PNG is requested
1587 if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
1588 AC_MSG_RESULT([-------------------------------------------------------------])
1589 AC_MSG_CHECKING([for ZLIB])
1594 AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1595 AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1596 AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1597 AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1598 AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1599 AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1600 AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1601 AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1602 AC_MSG_CHECKING([if ZLIB package is complete])
1603 if test $passed -gt 0; then
1604 if test $failed -gt 0; then
1605 AC_MSG_RESULT([no -- some components failed test])
1606 have_zlib='no (failed tests)'
1609 LIBS="$ZLIB_LIBS $LIBS"
1610 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
1611 AC_MSG_RESULT([yes])
1618 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1621 # whether modules are built or not.
1625 if test "$build_modules" != 'no' ; then
1626 AC_MSG_RESULT([-------------------------------------------------------------])
1627 AC_MSG_CHECKING([for libltdl])
1631 AC_CHECK_HEADER([ltdl.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1632 AC_CHECK_LIB([ltdl],[lt_dlinit],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1633 AC_MSG_CHECKING([if libltdl package is complete])
1634 if test $passed -gt 0 ; then
1635 if test $failed -gt 0 ; then
1636 AC_MSG_RESULT([no -- some components failed test])
1637 have_ltdl='no (failed tests)'
1640 LIBS="$LTDL_LIBS $LIBS"
1641 AC_DEFINE(LTDL_DELEGATE,1,[Define if using libltdl to support dynamically loadable modules])
1642 AC_MSG_RESULT([yes])
1648 if test "$have_ltdl" != 'yes' ; then
1649 AC_MSG_FAILURE([libltdl is required for modules build],[1])
1652 AM_CONDITIONAL(WITH_LTDL, test "$have_ltdl" != 'no')
1655 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1658 if test "$enable_profiling" = 'yes'; then
1659 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1660 LIBS="$LIB_DL $LIBS"
1664 dnl ===========================================================================
1667 # Check for Autotrace delegate library.
1669 AC_ARG_WITH([autotrace],
1670 [AC_HELP_STRING([--with-autotrace],
1671 [enable autotrace support])],
1672 [with_autotrace=$withval],
1673 [with_autotrace='no'])
1675 if test "$with_autotrace" != 'yes'; then
1676 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1683 if test "x$with_autotrace" = "xyes"; then
1684 AC_MSG_RESULT([-------------------------------------------------------------])
1685 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1689 if test "$have_autotrace" = 'yes'; then
1691 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1692 if test "$build_modules" = 'no'; then
1693 CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
1697 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1698 AC_SUBST(AUTOTRACE_CFLAGS)
1699 AC_SUBST(AUTOTRACE_LIBS)
1701 dnl ===========================================================================
1704 # Check for Display Postscript delegate library.
1707 [AC_HELP_STRING([--without-dps],
1708 [disable Display Postscript support])],
1709 [with_dps=$withval],
1712 if test "$with_dps" != 'yes'; then
1713 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1718 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1719 AC_MSG_RESULT([-------------------------------------------------------------])
1720 AC_MSG_CHECKING([for DPS])
1724 PERSIST_CPPFLAGS="$CPPFLAGS"
1725 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1726 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1728 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1729 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1730 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1731 # ImageMagick itself doesn't use -lXt.
1734 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1735 if test "$have_libdps" != 'yes'; then
1736 # Unset cache variable so we can try again.
1737 unset ac_cv_lib_dps_DPSInitialize
1738 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1739 if test "$have_libdps" = 'yes'; then
1743 if test "$have_libdps" = 'yes'; then
1744 passed=`expr $passed + 1`
1746 failed=`expr $failed + 1`
1748 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1749 AC_MSG_CHECKING([if DPS package is complete])
1750 if test $passed -gt 0; then
1751 if test $failed -gt 0; then
1752 AC_MSG_RESULT([no -- some components failed test])
1753 have_dps='no (failed tests)'
1754 CPPFLAGS="$PERSIST_CPPFLAGS"
1756 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1757 LIBS="$DPS_LIBS $LIBS"
1758 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1759 AC_MSG_RESULT([yes])
1764 CPPFLAGS=$PERSIST_CPPFLAGS
1767 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1770 dnl ===========================================================================
1773 # Check for DJVU delegate library.
1776 [AC_HELP_STRING([--without-djvu],
1777 [disable DjVu support])],
1778 [with_djvu=$withval],
1781 if test "$with_djvu" != 'yes'; then
1782 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1787 if test "$with_djvu" != 'no'; then
1788 AC_MSG_RESULT([-------------------------------------------------------------])
1789 AC_MSG_CHECKING([for DJVU])
1793 AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1794 AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1795 AC_MSG_CHECKING([if DJVU package is complete])
1796 if test $passed -gt 0; then
1797 if test $failed -gt 0; then
1798 AC_MSG_RESULT([no -- some components failed test])
1799 have_djvu='no (failed tests)'
1801 DJVU_LIBS='-ldjvulibre'
1802 LIBS="$DJVU_LIBS $LIBS"
1803 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1804 AC_MSG_RESULT([yes])
1811 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1814 dnl ===========================================================================
1817 # Set DejaVu font directory.
1819 AC_ARG_WITH([dejavu-font-dir],
1820 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1821 [DejaVu font directory])],
1822 [with_dejavu_font_dir=$withval],
1823 [with_dejavu_font_dir='default'])
1825 if test "$with_dejavu_font_dir" != 'default'; then
1826 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1829 dnl ===========================================================================
1832 # Check for FFTW delegate library.
1835 [AC_HELP_STRING([--without-fftw],
1836 [disable FFTW support])],
1837 [with_fftw=$withval],
1840 if test "$with_fftw" != 'yes'; then
1841 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1846 if test "$with_fftw" != 'no'; then
1847 AC_MSG_RESULT([-------------------------------------------------------------])
1848 AC_MSG_CHECKING([for FFTW])
1852 AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1853 AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1854 AC_MSG_CHECKING([if FFTW package is complete])
1855 if test $passed -gt 0; then
1856 if test $failed -gt 0; then
1857 AC_MSG_RESULT([no -- some components failed test])
1858 have_fftw='no (failed tests)'
1861 LIBS="$FFTW_LIBS $LIBS"
1862 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1863 AC_MSG_RESULT([yes])
1870 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1873 dnl ===========================================================================
1876 # Check for FlashPIX delegate library.
1879 [AC_HELP_STRING([--without-fpx],
1880 [disable FlashPIX support])],
1881 [with_fpx=$withval],
1884 if test "$with_fpx" != 'yes'; then
1885 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1890 if test "$with_fpx" != 'no'; then
1891 AC_MSG_RESULT([-------------------------------------------------------------])
1892 AC_MSG_CHECKING([for FlashPIX])
1897 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1898 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1900 AC_MSG_CHECKING([if FlashPIX package is complete])
1901 if test $passed -gt 0; then
1902 if test $failed -gt 0; then
1903 AC_MSG_RESULT([no -- some components failed test])
1904 have_fpx='no (failed tests)'
1907 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1908 AC_MSG_RESULT([yes])
1916 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1919 dnl ===========================================================================
1922 # Check for fontconfig delegate library.
1924 AC_ARG_WITH([fontconfig],
1925 [AC_HELP_STRING([--without-fontconfig],
1926 [disable fontconfig support])],
1927 [with_fontconfig=$withval],
1928 [with_fontconfig='yes'])
1930 if test "$with_fontconfig" != 'yes'; then
1931 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
1934 have_fontconfig='no'
1935 FONTCONFIG_CFLAGS=""
1938 if test "x$with_fontconfig" = "xyes"; then
1939 AC_MSG_RESULT([-------------------------------------------------------------])
1940 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
1944 if test "$have_fontconfig" = 'yes'; then
1945 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
1946 if test "$build_modules" = 'no'; then
1947 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1951 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
1952 AC_SUBST(FONTCONFIG_CFLAGS)
1953 AC_SUBST(FONTCONFIG_LIBS)
1955 dnl ===========================================================================
1958 # Check for the Freetype delegate library.
1960 AC_ARG_WITH([freetype],
1961 [AC_HELP_STRING([--without-freetype],
1962 [disable Freetype support])],
1963 [with_freetype=$withval],
1964 [with_freetype='yes'])
1966 if test "$with_freetype" != 'yes'; then
1967 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
1974 if test "x$with_freetype" = "xyes"; then
1975 AC_MSG_RESULT([-------------------------------------------------------------])
1976 PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no)
1980 if test "$have_freetype" = 'yes'; then
1981 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library)
1982 CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
1985 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
1986 AC_SUBST(FREETYPE_CFLAGS)
1987 AC_SUBST(FREETYPE_LIBS)
1989 dnl ===========================================================================
1992 # Check for Ghostscript library or framework.
1994 # Test for iapi.h & test for gsapi_new_instance in -lgs
1995 # or -framework Ghostscript
1997 AC_ARG_WITH([gslib],
1998 [AC_HELP_STRING([--with-gslib],
1999 [enable Ghostscript library support])],
2000 [with_gslib=$withval],
2003 gslib_framework='no'
2004 if test "$with_gslib" != 'yes'; then
2005 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
2010 if test "$with_gslib" != 'no'; then
2011 AC_MSG_RESULT([-------------------------------------------------------------])
2012 AC_MSG_CHECKING([for Ghostscript])
2017 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
2018 failed=`expr $failed + 1`,)
2019 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
2020 failed=`expr $failed + 1`,)
2021 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
2022 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
2023 AC_MSG_CHECKING([if Ghostscript package is complete])
2024 if test $passed -gt 0; then
2025 if test $failed -gt 0; then
2026 AC_MSG_RESULT([no -- some components failed test])
2027 have_gslib='no (failed tests)'
2029 if test $framework -gt 0; then
2030 GS_LIBS='-framework Ghostscript'
2031 gslib_framework='yes'
2032 AC_MSG_RESULT([yes, using framework.])
2034 AC_MSG_RESULT([yes, using library.])
2037 LIBS="$GS_LIBS $LIBS"
2038 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
2045 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
2048 # Set default font search path
2049 AC_ARG_WITH([fontpath],
2050 [AC_HELP_STRING([--with-fontpath=DIR],
2051 [prepend to default font search path])],
2052 [with_fontpath=$withval],
2055 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2058 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",[Define to prepend to default font search path.])
2060 if test "$with_fontpath=" != ''; then
2061 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2064 # Set Ghostscript font directory
2065 AC_ARG_WITH([gs-font-dir],
2066 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2067 [Ghostscript font directory])],
2068 [with_gs_font_dir=$withval],
2069 [with_gs_font_dir='default'])
2071 if test "$with_gs_font_dir" != 'default'; then
2072 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2075 dnl ===========================================================================
2078 # Check for GVC delegate library.
2081 [AC_HELP_STRING([--with-gvc],
2082 [enable GVC support])],
2083 [with_gvc=$withval],
2086 if test "$with_gvc" != 'yes'; then
2087 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2091 if test "x$with_gvc" = "xyes"; then
2092 AC_MSG_RESULT([-------------------------------------------------------------])
2093 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2097 if test "$have_gvc" = 'yes'; then
2098 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2099 if test "$build_modules" = 'no'; then
2100 CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
2104 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2105 AC_SUBST(GVC_CFLAGS)
2108 dnl ===========================================================================
2111 # Check for JBIG delegate library.
2115 [AC_HELP_STRING([--without-jbig],
2116 [disable JBIG support])],
2117 [with_jbig=$withval],
2122 if test "$with_jbig" != 'no'; then
2123 AC_MSG_RESULT([-------------------------------------------------------------])
2124 AC_MSG_CHECKING([for JBIG])
2128 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2129 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2130 AC_MSG_CHECKING([if JBIG package is complete])
2131 if test $passed -gt 0; then
2132 if test $failed -gt 0; then
2133 AC_MSG_RESULT([no -- some components failed test])
2134 have_jbig='no (failed tests)'
2137 LIBS="$JBIG_LIBS $LIBS"
2138 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2139 AC_MSG_RESULT([yes])
2146 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2149 dnl ===========================================================================
2152 # Check for JPEG delegate library.
2155 [AC_HELP_STRING([--without-jpeg],
2156 [disable JPEG support])],
2157 [with_jpeg=$withval],
2160 if test "$with_jpeg" != 'yes'; then
2161 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2166 if test "$with_jpeg" != 'no'; then
2167 AC_MSG_RESULT([-------------------------------------------------------------])
2168 AC_MSG_CHECKING([for JPEG])
2172 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2173 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2174 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2175 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2176 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2178 # Test for compatible JPEG library
2179 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2180 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2184 #include <jpeglib.h>
2186 changequote(<<, >>)dnl
2188 #if JPEG_LIB_VERSION < 62
2189 #error IJG JPEG library must be version 6b or newer!
2193 changequote([, ])dnl
2194 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2195 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2197 AC_MSG_CHECKING([if JPEG package is complete])
2198 if test $passed -gt 0; then
2199 if test $failed -gt 0; then
2200 AC_MSG_RESULT([no -- some components failed test])
2201 have_jpeg='no (failed tests)'
2204 LIBS="$JPEG_LIBS $LIBS"
2205 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2206 AC_MSG_RESULT([yes])
2213 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2216 dnl ===========================================================================
2219 # Check for JPEG Version 2 delegate library.
2222 [AC_HELP_STRING([--without-jp2],
2223 [disable JPEG-2000 support])],
2224 [with_jp2=$withval],
2227 if test "$with_jp2" != 'yes'; then
2228 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 "
2233 if test "$with_jp2" != 'no'; then
2234 AC_MSG_RESULT([-------------------------------------------------------------])
2235 AC_MSG_CHECKING([for JPEG Version 2])
2239 AC_CHECK_HEADER(jasper/jasper.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2240 AC_CHECK_LIB(jasper,jas_stream_fopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2241 AC_MSG_CHECKING([if JPEG version 2 support package is complete])
2242 if test $passed -gt 0; then
2243 if test $failed -gt 0; then
2244 AC_MSG_RESULT([no -- some components failed test])
2245 have_jp2='no (failed tests)'
2248 LIBS="$JP2_LIBS $LIBS"
2249 AC_DEFINE(JP2_DELEGATE,1,Define if you have JPEG version 2 "Jasper" library)
2250 AC_MSG_RESULT([yes])
2257 AM_CONDITIONAL(JP2_DELEGATE, test "$have_jp2" = 'yes')
2260 dnl ===========================================================================
2263 # Check for LCMS delegate library.
2267 [ --without-lcms disable lcms (v1.1X) support],
2268 [with_lcms=$withval],
2270 if test "$with_lcms" != 'yes' ; then
2271 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2276 [ --without-lcms2 disable lcms (v2.X) support],
2277 [with_lcms2=$withval],
2279 if test "$with_lcms2" != 'yes' ; then
2280 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
2285 if test "$with_lcms2" != 'no'; then
2286 AC_MSG_RESULT([-------------------------------------------------------------])
2287 AC_MSG_CHECKING([for LCMS v2])
2291 have_lcms_header='no'
2293 # Check for <lcms2.h>
2294 AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
2295 if test "$have_lcms_header" = 'yes'; then
2296 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2297 passed=`expr $passed + 1`
2300 # Check for <lcms2/lcms2.h)
2301 if test "$have_lcms_header" != 'yes'; then
2302 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2303 if test "$have_lcms_header" = 'yes'; then
2304 passed=`expr $passed + 1`
2305 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2309 # Failed to find lcms header?
2310 if test "$have_lcms_header" != 'yes'; then
2311 failed=`expr $failed + 1`
2314 AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2315 AC_MSG_CHECKING(if LCMS v2 package is complete)
2316 if test $passed -gt 0; then
2317 if test $failed -gt 0; then
2318 AC_MSG_RESULT(no -- some components failed test)
2319 have_lcms2='no (failed tests)'
2322 LIBS="$LCMS_LIBS $LIBS"
2332 # Check for LCMS v1 (1.11 or later)
2334 if test $have_lcms2 = 'yes'; then
2339 if test "$with_lcms" != 'no'; then
2340 AC_MSG_RESULT([-------------------------------------------------------------])
2341 AC_MSG_CHECKING([for LCMS v1.1X])
2345 have_lcms_header='no'
2347 # Check for <lcms.h>
2348 if test "$have_lcms_header" != 'yes'; then
2349 AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
2350 if test "$have_lcms_header" = 'yes'; then
2351 passed=`expr $passed + 1`
2352 AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
2356 # Check for <lcms/lcms.h>
2357 if test "$have_lcms_header" != 'yes'; then
2358 AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
2359 if test "$have_lcms_header" = 'yes'; then
2360 passed=`expr $passed + 1`
2361 AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
2365 # Failed to find lcms header?
2366 if test "$have_lcms_header" != 'yes'; then
2367 failed=`expr $failed + 1`
2370 AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2371 AC_MSG_CHECKING(if LCMS package is complete)
2372 if test $passed -gt 0; then
2373 if test $failed -gt 0; then
2374 AC_MSG_RESULT(no -- some components failed test)
2375 have_lcms='no (failed tests)'
2378 LIBS="$LCMS_LIBS $LIBS"
2387 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
2388 if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
2389 AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
2394 dnl ===========================================================================
2397 # Check for the LQR (Liquid Rescale) delegate library.
2400 [AC_HELP_STRING([--without-lqr],
2401 [disable Liquid Rescale support])],
2402 [with_lqr=$withval],
2405 if test "$with_lqr" != 'yes'; then
2406 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2413 if test "x$with_lqr" = "xyes"; then
2414 AC_MSG_RESULT([-------------------------------------------------------------])
2415 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2419 if test "$have_lqr" = 'yes'; then
2420 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2421 CFLAGS="$LQR_CFLAGS $CFLAGS"
2424 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2425 AC_SUBST(LQR_CFLAGS)
2428 dnl ===========================================================================
2430 # Disable LZMA (lzma library)
2432 [ --without-lzma disable LZMA support],
2433 [with_lzma=$withval],
2435 if test "$with_lzma" != 'yes' ; then
2436 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2440 if test "x$with_lzma" = "xyes"; then
2441 AC_MSG_RESULT([-------------------------------------------------------------])
2442 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2446 if test "$have_lzma" = 'yes'; then
2447 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2448 if test "$build_modules" = 'no'; then
2449 CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS"
2453 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2454 AC_SUBST(LZMA_CFLAGS)
2457 dnl ===========================================================================
2460 # Check for the OpenEXR delegate library.
2462 AC_ARG_WITH([openexr],
2463 [AC_HELP_STRING([--without-openexr],
2464 [disable OpenEXR support])],
2465 [with_openexr=$withval],
2466 [with_openexr='yes'])
2468 if test "$with_openexr" != 'yes'; then
2469 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2476 if test "x$with_openexr" = "xyes"; then
2477 AC_MSG_RESULT([-------------------------------------------------------------])
2478 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2482 if test "$have_openexr" = 'yes'; then
2483 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2484 if test "$build_modules" = 'no'; then
2485 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2489 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2490 AC_SUBST(OPENEXR_CFLAGS)
2491 AC_SUBST(OPENEXR_LIBS)
2493 dnl ===========================================================================
2496 # Check for PANGO delegate library.
2498 AC_ARG_WITH([pango],
2499 [AC_HELP_STRING([--without-pango],
2500 [disable PANGO support])],
2501 [with_pango=$withval],
2504 if test "$with_pango" != 'yes'; then
2505 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2509 have_pangocairo='no'
2513 if test "x$with_pango" = "xyes"; then
2514 AC_MSG_RESULT([-------------------------------------------------------------])
2515 PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
2517 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2521 if test "$have_pango" = 'yes'; then
2522 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2523 if test "$build_modules" = 'no'; then
2524 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
2528 if test "$have_pangocairo" = 'yes'; then
2529 AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
2530 if test "$build_modules" = 'no'; then
2531 CPPFLAGS="$PANGOCAIRO_CFLAGS $CPPFLAGS"
2535 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2536 AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes')
2537 AC_SUBST(PANGO_CFLAGS)
2538 AC_SUBST(PANGO_LIBS)
2540 dnl ===========================================================================
2543 # Check for PNG delegate library.
2546 [AC_HELP_STRING([--without-png],
2547 [disable PNG support])],
2548 [with_png=$withval],
2551 if test "$with_png" != 'yes'; then
2552 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2558 if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
2559 AC_MSG_RESULT([-------------------------------------------------------------])
2560 AC_MSG_CHECKING(for PNG support )
2564 AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
2565 failed=`expr $failed + 1`,)
2567 if test $passed -gt 0; then
2568 for var in 7 6 5 4 2 '' ; do
2569 if test "$have_png" = 'no' ; then
2570 if test "x${var}" = 'x' ; then
2576 # Test for compatible LIBPNG library
2579 if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
2580 if test "${pnglib}" != 'png' ; then
2581 AC_MSG_CHECKING(for LIBPNG1${var} support )
2587 changequote(<<, >>)dnl
2589 #if PNG_LIBPNG_VER_MINOR != ${var}
2590 #error LIBPNG library must be version 1${var}!
2595 changequote([, ])dnl
2596 ac_cv_libpng_ok='yes',
2597 ac_cv_libpng_ok='no')
2598 if test "$ac_cv_libpng_ok" = 'yes' ; then
2599 passed=`expr $passed + 1`
2602 failed=`expr $failed + 1`
2606 passed=`expr $passed + 1`
2611 if test $passed -gt 0 -a $failed -le 0; then
2612 if test "1${var}" = '17' ; then
2613 AC_CHECK_LIB(png17,png_get_io_ptr,passed=`expr $passed + 1`,
2614 failed=`expr $failed + 1`,)
2615 AC_CHECK_LIB(png17,png_longjmp,passed=`expr $passed + 1`,
2616 failed=`expr $failed + 1`,)
2618 if test "1${var}" = '16' ; then
2619 AC_CHECK_LIB(png16,png_get_io_ptr,passed=`expr $passed + 1`,
2620 failed=`expr $failed + 1`,)
2621 AC_CHECK_LIB(png16,png_longjmp,passed=`expr $passed + 1`,
2622 failed=`expr $failed + 1`,)
2624 if test "1${var}" = '15' ; then
2625 AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
2626 failed=`expr $failed + 1`,)
2627 AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
2628 failed=`expr $failed + 1`,)
2630 if test "1${var}" = '14' ; then
2631 AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
2632 failed=`expr $failed + 1`,)
2633 AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
2634 failed=`expr $failed + 1`,)
2636 if test "1${var}" = '12' ; then
2637 AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
2638 failed=`expr $failed + 1`,)
2640 if test "1${var}" = '1' ; then
2641 AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
2642 failed=`expr $failed + 1`,)
2644 if test $passed -gt 0 -a $failed -le 0 ; then
2645 AC_MSG_CHECKING(if ${pnglib} package is complete)
2646 if test $passed -gt 0 ; then
2647 if test $failed -gt 0 ; then
2648 AC_MSG_RESULT(no -- some components failed test)
2649 have_png='no (failed tests)'
2651 PNG_LIBS="-l${pnglib}"
2652 LIBS="$PNG_LIBS $LIBS"
2653 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2665 AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
2669 dnl ===========================================================================
2672 # Check for RSVG delegate library.
2675 [AC_HELP_STRING([--with-rsvg],
2676 [enable RSVG support])],
2677 [with_rsvg=$withval],
2680 if test "$with_rsvg" != 'yes'; then
2681 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2689 if test "x$with_rsvg" = "xyes"; then
2690 AC_MSG_RESULT([-------------------------------------------------------------])
2691 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2693 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2697 if test "$have_rsvg" = 'yes'; then
2698 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2699 if test "$build_modules" = 'no'; then
2700 CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
2704 if test "$have_cairo" = 'yes'; then
2705 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2706 if test "$build_modules" = 'no'; then
2707 CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
2711 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2712 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2713 AC_SUBST(RSVG_CFLAGS)
2716 dnl ===========================================================================
2719 # Check for TIFF delegate library.
2722 [AC_HELP_STRING([--without-tiff],
2723 [disable TIFF support])],
2724 [with_tiff=$withval],
2727 if test "$with_tiff" != 'yes'; then
2728 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2733 if test "$with_tiff" != 'no'; then
2734 AC_MSG_RESULT([-------------------------------------------------------------])
2735 AC_MSG_CHECKING([for TIFF])
2739 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2740 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2741 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2742 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2743 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2744 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2745 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2746 AC_MSG_CHECKING([if TIFF package is complete])
2747 if test $passed -gt 0; then
2748 if test $failed -gt 0; then
2749 AC_MSG_RESULT([no -- some components failed test])
2750 have_tiff='no (failed tests)'
2753 LIBS="$TIFF_LIBS $LIBS"
2754 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2755 AC_MSG_RESULT([yes])
2757 AC_CHECK_HEADERS(tiffconf.h)
2758 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2759 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2760 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2761 TIFFSwabArrayOfTriples])
2767 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2770 dnl ===========================================================================
2773 # Check for WEBP delegate library.
2776 [AC_HELP_STRING([--without-webp],
2777 [disable WEBP support])],
2778 [with_webp=$withval],
2781 if test "$with_webp" != 'yes'; then
2782 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2787 if test "$with_webp" != 'no'; then
2788 AC_MSG_RESULT([-------------------------------------------------------------])
2789 AC_MSG_CHECKING([for WEBP])
2793 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2794 AC_CHECK_LIB(webp,WebPPictureInitInternal,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2795 AC_MSG_CHECKING([if WEBP package is complete])
2796 if test $passed -gt 0; then
2797 if test $failed -gt 0; then
2798 AC_MSG_RESULT([no -- some components failed test])
2799 have_webp='no (failed tests)'
2802 LIBS="$WEBP_LIBS $LIBS"
2803 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2804 AC_MSG_RESULT([yes])
2811 AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2814 dnl ===========================================================================
2817 # Set Windows font directory.
2819 AC_ARG_WITH([windows-font-dir],
2820 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2821 [directory containing MS-Windows fonts])],
2822 [with_windows_font_dir=$withval],
2823 [with_windows_font_dir=''])
2824 if test "$with_windows_font_dir" != '' ; then
2825 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2828 dnl ===========================================================================
2831 # Check for WMF delegate library.
2834 [AC_HELP_STRING([--with-wmf],
2835 [enable WMF support])],
2836 [with_wmf=$withval],
2839 if test "$with_wmf" != 'yes'; then
2840 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2847 if test "$with_wmf" != 'no'; then
2848 AC_MSG_RESULT([-------------------------------------------------------------])
2849 AC_MSG_CHECKING([for WMF])
2852 have_libwmflite='no'
2853 have_libwmf_ipa_h='no'
2855 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H])
2856 if test "$have_libwmf_ipa_h" = 'yes'; then
2857 AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,)
2858 if test "$have_libwmflite" = 'yes'; then
2859 AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library)
2860 WMF_LIBS='-lwmflite'
2861 LIBS="$WMF_LIBS $LIBS"
2865 WMF_CONFIG_LIBS=`libwmf-config --libs`
2866 for lib in xml2 expat freetype jpeg png z; do
2868 echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib"
2870 AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS)
2871 if test "$have_libwmf" = 'yes'; then
2872 AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library)
2874 LIBS="$WMF_LIBS $LIBS"
2877 AC_MSG_RESULT([no -- some components failed test])
2878 have_wmf='no (failed tests)'
2879 have_wmflite='no (failed tests)'
2885 AC_MSG_CHECKING([if WMF package is complete])
2886 if test "$have_wmf" = 'yes'; then
2887 AC_MSG_RESULT([yes])
2892 AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes')
2894 AC_SUBST(WMF_LIBS_DEPS)
2897 dnl ===========================================================================
2900 # Check for XML delegate library.
2903 [AC_HELP_STRING([--without-xml],
2904 [disable XML support])],
2905 [with_xml=$withval],
2908 if test "$with_xml" != 'yes' ; then
2909 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2914 if test "$with_xml" != 'no'; then
2915 AC_MSG_RESULT([-------------------------------------------------------------])
2916 AC_MSG_CHECKING([for XML])
2918 PERSIST_LDFLAGS=$LDFLAGS
2919 PERSIST_CPPFLAGS=$CPPFLAGS
2921 AC_PATH_PROG(xml2_config,xml2-config,)dnl
2922 if test -n "$xml2_config"; then
2923 # Debian installs libxml headers under /usr/include/libxml2/libxml with
2924 # the shared library installed under /usr/lib, whereas the package
2925 # installs itself under $prefix/libxml and $prefix/lib.
2926 xml2_prefix=`xml2-config --prefix`
2927 if test -d "${xml2_prefix}/include/libxml2"; then
2928 CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
2930 if test "${xml2_prefix}" != '/usr'; then
2931 LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
2936 AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2937 AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2938 AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2939 AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2940 AC_MSG_CHECKING([if XML package is complete])
2941 if test $passed -gt 0; then
2942 if test $failed -gt 0; then
2943 AC_MSG_RESULT([no -- some components failed test])
2944 have_xml='no (failed tests)'
2945 LDFLAGS="$PERSIST_LDFLAGS"
2946 CPPFLAGS="$PERSIST_CPPFLAGS"
2949 LIBS="$XML_LIBS $LIBS"
2950 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2951 AC_MSG_RESULT([yes])
2958 AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
2961 dnl ===========================================================================
2963 # Substitute compiler name to build/link PerlMagick
2965 AC_SUBST(PERLMAINCC)
2968 # Configure install Paths
2971 # Path to ImageMagick header files
2972 INCLUDE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
2973 INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}"
2974 DEFINE_INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}/"
2975 case "${build_os}" in
2977 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2980 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick headers live.])
2981 AC_SUBST(INCLUDE_PATH)
2983 # Path to ImageMagick header files (arch part)
2984 INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
2985 DEFINE_INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
2986 case "${build_os}" in
2988 DEFINE_INCLUDEARCH_PATH=`$WinPathScript "$DEFINE_INCLUDEARCH_PATH" 1`
2991 AC_DEFINE_UNQUOTED(INCLUDEARCH_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick architecture headers live.])
2992 AC_SUBST(INCLUDEARCH_PATH)
2994 # Subdirectory under lib to place ImageMagick lib files
2995 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2996 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",[Subdirectory of lib where ImageMagick architecture dependent files are installed.])
2998 # Path to ImageMagick bin directory
2999 EXECUTABLE_PATH="${BIN_DIR}"
3000 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
3001 case "${build_os}" in
3003 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
3006 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",[Directory where executables are installed.])
3007 AC_SUBST(EXECUTABLE_PATH)
3009 # Path to ImageMagick lib
3010 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
3011 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
3012 case "${build_os}" in
3014 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
3017 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",[Directory where architecture-dependent files live.])
3018 AC_SUBST(LIBRARY_PATH)
3021 # path to local binaries
3022 if test "x$LIB_BIN_BASEDIRNAME" = "x"; then
3023 LIB_BIN_BASEDIRNAME="bin"
3025 AC_DEFINE_UNQUOTED(LIB_BIN_BASEDIRNAME,"$LIB_BIN_BASEDIRNAME",[Binaries in libraries path base name (will be during install linked to bin)])
3026 AC_SUBST(LIB_BIN_BASEDIRNAME)
3028 if test "x$LIB_BIN_DIR" = "x"; then
3029 LIB_BIN_DIR=${LIB_BIN_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3031 AC_SUBST(LIB_BIN_DIR)
3033 LIB_BIN_DIR_RELATIVE_PATH=$LIB_BIN_DIR
3034 AC_SUBST(LIB_BIN_DIR_RELATIVE_PATH)
3035 LIB_BIN_DIR_PATH="${LIBRARY_PATH}/${LIB_BIN_DIR_RELATIVE_PATH}"
3036 AC_SUBST(LIB_BIN_DIR_PATH)
3039 # path to modules lib
3040 if test "x$MODULES_BASEDIRNAME" = "x"; then
3041 MODULES_BASEDIRNAME="modules"
3043 AC_DEFINE_UNQUOTED(MODULES_BASEDIRNAME,"$MODULES_BASEDIRNAME",[Module directory name without ABI part.])
3044 AC_SUBST(MODULES_BASEDIRNAME)
3046 if test "x$MODULES_DIRNAME" = "x"; then
3047 MODULES_DIRNAME=${MODULES_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3049 AC_DEFINE_UNQUOTED(MODULES_DIRNAME,"$MODULES_DIRNAME",[Module directory dirname])
3051 AC_SUBST(MODULES_DIRNAME)
3053 MODULES_RELATIVE_PATH="${MODULES_DIRNAME}"
3054 AC_SUBST(MODULES_RELATIVE_PATH)
3055 MODULES_PATH="${LIBRARY_PATH}/${MODULES_RELATIVE_PATH}"
3056 AC_SUBST(MODULES_PATH)
3059 # path to coders lib
3060 if test "x$CODER_DIRNAME" = "x"; then
3061 CODER_DIRNAME="coders"
3063 AC_DEFINE_UNQUOTED(CODER_DIRNAME,"$CODER_DIRNAME",[coders subdirectory.])
3064 AC_SUBST(CODER_DIRNAME)
3066 CODER_RELATIVE_PATH="${CODER_DIRNAME}"
3067 CODER_PATH="${MODULES_PATH}/${CODER_DIRNAME}"
3068 AC_SUBST(CODER_PATH)
3071 # Subdirectory under lib to place ImageMagick filter module files
3073 # path to coders lib
3074 if test "x$FILTER_DIRNAME" = "x"; then
3075 FILTER_DIRNAME="filters"
3077 AC_DEFINE_UNQUOTED(FILTER_DIRNAME,"$FILTER_DIRNAME",[filter subdirectory.])
3078 AC_SUBST(FILTER_DIRNAME)
3080 FILTER_RELATIVE_PATH="${FILTER_DIRNAME}"
3081 FILTER_PATH="${MODULES_PATH}/${FILTER_DIRNAME}"
3082 AC_SUBST(FILTER_PATH)
3085 # Path to ImageMagick documentation files
3086 DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3087 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
3088 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
3089 case "${build_os}" in
3091 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
3094 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",[Directory where ImageMagick documents live.])
3095 AC_SUBST(DOCUMENTATION_PATH)
3097 # Subdirectory to place architecture-dependent configuration files
3098 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3099 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",[Subdirectory of lib where architecture-dependent configuration files live.])
3100 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3101 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3102 case "${build_os}" in
3104 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
3107 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",[Directory where architecture-dependent configuration files live.])
3108 AC_SUBST(CONFIGURE_PATH)
3110 # Subdirectory to place architecture-independent configuration files
3111 SHARE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3112 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",[Subdirectory of lib where architecture-independent configuration files live.])
3113 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
3114 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
3115 case "${build_os}" in
3117 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
3120 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",[Directory where architecture-independent configuration files live.])
3121 AC_SUBST(SHARE_PATH)
3124 # Subdirectory to place architecture-dependent configuration files.
3125 if test "x$SHAREARCH_BASEDIRNAME" = "x"; then
3126 SHAREARCH_BASEDIRNAME="config"
3128 AC_DEFINE_UNQUOTED(SHAREARCH_BASEDIRNAME,"$SHAREARCH_BASEDIRNAME",[Sharearch directory name without ABI part.])
3129 AC_SUBST(SHAREARCH_BASEDIRNAME)
3131 if test "x$SHAREARCH_DIRNAME" = "x"; then
3132 SHAREARCH_DIRNAME=${SHAREARCH_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3134 AC_DEFINE_UNQUOTED(SHAREARCH_DIRNAME,"$SHAREARCH_DIRNAME",[Sharearch directory dirname])
3136 AC_SUBST(SHAREARCH_DIRNAME)
3138 SHAREARCH_RELATIVE_PATH="${SHAREARCH_DIRNAME}"
3139 AC_SUBST(SHAREARCH_RELATIVE_PATH)
3140 SHAREARCH_PATH="${LIBRARY_PATH}/${SHAREARCH_RELATIVE_PATH}"
3141 AC_SUBST(SHAREARCH_PATH)
3144 # program_transform_name is formed for use in a Makefile, so create a
3145 # modified version for use in a shell script.
3146 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3148 # Default delegate definitions
3149 AC_MSG_RESULT([-------------------------------------------------------------])
3150 AC_MSG_CHECKING([for ImageMagick delegate programs])
3152 AutotraceDecodeDelegateDefault='autotrace'
3153 BlenderDecodeDelegateDefault='blender'
3154 BZIPDelegateDefault='bzip2'
3155 BrowseDelegateDefault='xdg-open'
3156 CGMDecodeDelegateDefault='ralcgm'
3157 CatDelegateDefault='cat'
3158 DNGDecodeDelegateDefault='ufraw-batch'
3159 GVCDecodeDelegateDefault='dot'
3160 DVIDecodeDelegateDefault='dvips'
3161 EchoDelegateDefault='echo'
3162 EditorDelegateDefault='xterm'
3163 FIGDecodeDelegateDefault='fig2dev'
3164 ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
3165 DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
3166 MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
3167 GnuplotDecodeDelegateDefault='gnuplot'
3168 HPGLDecodeDelegateDefault='hp2xx'
3169 HTMLDecodeDelegateDefault='html2ps'
3170 ILBMDecodeDelegateDefault='ilbmtoppm'
3171 ILBMEncodeDelegateDefault='ppmtoilbm'
3172 JXRDecodeDelegateDefault='JxrDecApp'
3173 JXREncodeDelegateDefault='JxrEncApp'
3174 LPDelegateDefault='lp'
3175 LPRDelegateDefault='lpr'
3176 LaunchDelegateDefault='gimp'
3177 MANDelegateDefault='groff'
3178 MPEGDecodeDelegateDefault='ffmpeg'
3179 MPEGEncodeDelegateDefault='ffmpeg'
3180 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3181 MVDelegateDefault='mv'
3182 PCLDelegateDefault='pcl6'
3183 PGPDecodeDelegateDefault='pgpv'
3184 POVDelegateDefault='povray'
3185 if test "$native_win32_build" = 'yes'; then
3186 PSDelegateDefault='gswin32c'
3187 elif test "$gslib_framework" = 'yes'; then
3188 PSDelegateDefault='gsc'
3190 PSDelegateDefault='gs'
3192 RLEEncodeDelegateDefault='rawtorle'
3193 RMDelegateDefault='rm'
3194 RSVGDecodeDelegateDefault='rsvg-convert'
3195 SCANDecodeDelegateDefault='scanimage'
3196 SVGDecodeDelegateDefault='inkscape'
3197 TXTDelegateDefault='enscript'
3198 UniconvertorDelegateDefault='uniconvertor'
3199 WMFDecodeDelegateDefault='wmf2eps'
3200 WWWDecodeDelegateDefault='curl'
3201 XPSDelegateDefault='gxps'
3202 ZipDelegateDefault='gzip'
3204 # Search for delegates
3205 AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
3206 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3207 AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
3208 AC_PATH_PROGS(BrowseDelegate, "$BrowseDelegateDefault" google-chrome firefox konqueror mozilla lynx, "$BrowseDelegateDefault")
3209 AC_PATH_PROG(CGMDecodeDelegate, "$CGMDecodeDelegateDefault", "$CGMDecodeDelegateDefault")
3210 AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
3211 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3212 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3213 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3214 AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
3215 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3216 AC_PATH_PROG(FIGDecodeDelegate, "$FIGDecodeDelegateDefault", "$FIGDecodeDelegateDefault")
3217 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3218 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3219 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3220 AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
3221 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3222 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3223 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3224 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3225 AC_PATH_PROG(JXRDecodeDelegate, "$JXRDecodeDelegateDefault", "$JXRDecodeDelegateDefault")
3226 AC_PATH_PROG(JXREncodeDelegate, "$JXREncodeDelegateDefault", "$JXREncodeDelegateDefault")
3227 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3228 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3229 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3230 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
3231 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3232 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3233 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3234 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3235 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3236 AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
3237 AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
3238 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3239 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
3240 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3241 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3242 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
3243 AC_PATH_PROG(SVGDecodeDelegate, "$SVGDecodeDelegateDefault", "$SVGDecodeDelegateDefault")
3244 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
3245 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3246 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
3247 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
3248 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3249 AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
3251 # Prefer lpr to lp; lp needs options tacked on.
3252 if test "$LPRDelegate" != no; then
3253 PrintDelegate="$LPRDelegate"
3255 PrintDelegate="$LPDelegate -c -s"
3257 AC_SUBST(PrintDelegate)
3259 # Installed ImageMagick utiltity paths
3260 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3261 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3262 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3264 # Set delegate booleans
3265 have_ffmpeg='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_ffmpeg='yes'; fi
3266 have_fig2dev='no' ; if test "$FIGDecodeDelegate" != "$FIGDecodeDelegateDefault" ; then have_fig2dev='yes'; fi
3267 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3268 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3269 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3270 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3271 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3272 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3273 have_ralcgm='no' ; if test "$CGMDecodeDelegate" != "$CGMDecodeDelegateDefault" ; then have_ralcgm='yes'; fi
3274 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3277 # Test for font directories
3279 type_include_files=''
3282 AC_MSG_CHECKING(for Dejavu fonts directory)
3284 if test "${with_dejavu_font_dir}" != 'default'; then
3285 dejavu_font_dir="${with_dejavu_font_dir}/"
3287 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3288 if test -f "${font_dir}DejaVuSerif.ttf"; then
3289 dejavu_font_dir="${font_dir}"
3294 if test "${dejavu_font_dir}x" != 'x'; then
3295 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3296 AC_MSG_RESULT([$dejavu_font_dir])
3298 AC_MSG_RESULT([not found!]);
3300 AC_SUBST(dejavu_font_dir)
3304 if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
3305 windows_font_dir="${with_windows_font_dir}/"
3307 if test "${windows_font_dir}x" != 'x'; then
3308 if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
3309 windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
3311 if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then
3312 windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/'
3314 if test -f '/usr/share/fonts/msttcore/arial.ttf'; then
3315 windows_font_dir='/usr/share/fonts/msttcore/truetype/'
3318 if test "${windows_font_dir}x" != 'x'; then
3319 type_include_files="$type_include_files "'<include file="type-windows.xml" />'
3321 AC_SUBST(windows_font_dir)
3324 AC_MSG_CHECKING(for Ghostscript fonts directory)
3325 ghostscript_font_dir=''
3326 if test "${with_gs_font_dir}" != 'default'; then
3327 ghostscript_font_dir="${with_gs_font_dir}/"
3329 if test "${native_win32_build}" = 'yes'; then
3330 # Native Windows Build
3331 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3332 if test -f "${font_dir}a010013l.pfb"; then
3333 ghostscript_font_dir="$font_dir"
3337 if test "${PSDelegate}" != 'gswin32c'; then
3338 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3341 # Linux / Mac OS X / Unix Build
3342 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
3343 if test -f "${font_dir}a010013l.pfb"; then
3344 ghostscript_font_dir="${font_dir}"
3348 if test "${ghostscript_font_dir}x" = 'x'; then
3349 if test "$PSDelegate" != 'gs'; then
3350 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3355 if test "${ghostscript_font_dir}x" != 'x'; then
3356 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3357 AC_MSG_RESULT([$ghostscript_font_dir])
3359 AC_MSG_RESULT([not found!]);
3361 AC_SUBST(ghostscript_font_dir)
3362 case "${build_os}" in
3364 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3368 AC_SUBST(type_include_files)
3371 # Handle case where user doesn't want frozen paths
3373 if test "$with_frozenpaths" != 'yes'; then
3374 # Re-set delegate definitions to default (no paths)
3375 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
3376 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3377 BZIPDelegate="$BZIPDelegateDefault"
3378 BrowseDelegate="$BrowseDelegateDefault"
3379 CGMDecodeDelegate="$CGMDecodeDelegateDefault"
3380 CatDelegate="$CatDelegateDefault"
3381 ConvertDelegate="$ConvertDelegateDefault"
3382 DisplayDelegate="$DisplayDelegateDefault"
3383 DNGDecodeDelegate="$DNGDecodeDelegateDefault"
3384 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3385 EchoDelegate="$EchoDelegateDefault"
3386 EditorDelegate="$EditorDelegateDefault"
3387 FIGDecodeDelegate="$FIGDecodeDelegateDefault"
3388 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3389 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3390 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3391 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3392 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3393 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3394 JXRDecodeDelegate="$JXRDecodeDelegateDefault"
3395 JXREncodeDelegate="$JXREncodeDelegateDefault"
3396 LPDelegate="$LPDelegateDefault"
3397 LaunchDelegate="$LaunchDelegateDefault"
3398 MANDelegate="$MANDelegateDefault"
3399 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3400 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3401 MogrifyDelegate="$MogrifyDelegateDefault"
3402 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3403 MVDelegate="$MVDelegateDefault"
3404 PCLDelegate="$PCLDelegateDefault"
3405 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3406 POVDelegate="$POVDelegateDefault"
3407 PSDelegate="$PSDelegateDefault"
3408 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3409 RMDelegate="$RMDelegateDefault"
3410 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3411 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3412 SVGDecodeDelegate="$SVGDecodeDelegateDefault"
3413 ShowImageDelegate="$ShowImageDelegateDefault"
3414 TXTDelegate="$TXTDelegateDefault"
3415 UniconvertorDelegate="$UniconvertorDelegateDefault"
3416 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3417 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3418 XPSDelegate="$XPSDelegateDefault"
3419 ZipDelegate="$ZipDelegateDefault"
3422 # Delegate substitutions
3423 AC_SUBST(AutotraceDecodeDelegate)
3424 AC_SUBST(BlenderDecodeDelegate)
3425 AC_SUBST(BZIPDelegate)
3426 AC_SUBST(BrowseDelegate)
3427 AC_SUBST(CGMDecodeDelegate)
3428 AC_SUBST(CatDelegate)
3429 AC_SUBST(ConvertDelegate)
3430 AC_SUBST(GVCDecodeDelegate)
3431 AC_SUBST(DVIDecodeDelegate)
3432 AC_SUBST(EchoDelegate)
3433 AC_SUBST(EditorDelegate)
3434 AC_SUBST(FIGDecodeDelegate)
3435 AC_SUBST(GnuplotDecodeDelegate)
3436 AC_SUBST(HPGLDecodeDelegate)
3437 AC_SUBST(HTMLDecodeDelegate)
3438 AC_SUBST(ILBMDecodeDelegate)
3439 AC_SUBST(ILBMEncodeDelegate)
3440 AC_SUBST(JXRDecodeDelegate)
3441 AC_SUBST(JXREncodeDelegate)
3442 AC_SUBST(LPDelegate)
3443 AC_SUBST(LaunchDelegate)
3444 AC_SUBST(MANDelegate)
3445 AC_SUBST(MPEGDecodeDelegate)
3446 AC_SUBST(MPEGEncodeDelegate)
3447 AC_SUBST(MogrifyDelegate)
3448 AC_SUBST(MrSIDDecodeDelegate)
3449 AC_SUBST(MVDelegate)
3450 AC_SUBST(PCLDelegate)
3451 AC_SUBST(PGPDecodeDelegate)
3452 AC_SUBST(POVDelegate)
3453 AC_SUBST(PSDelegate)
3454 AC_SUBST(RLEEncodeDelegate)
3455 AC_SUBST(RMDelegate)
3456 AC_SUBST(SCANDecodeDelegate)
3457 AC_SUBST(ShowImageDelegate)
3458 AC_SUBST(TXTDelegate)
3459 AC_SUBST(UniconvertorDelegate)
3460 AC_SUBST(WMFDecodeDelegate)
3461 AC_SUBST(WWWDecodeDelegate)
3462 AC_SUBST(XPSDelegate)
3463 AC_SUBST(ZipDelegate)
3469 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3470 AC_CHECK_PROGS(PERL,perl)
3471 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3472 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3473 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3474 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3475 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3477 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3480 # 7ZIP support (http://p7zip.sourceforge.net/)
3483 AC_CHECK_PROGS(P7ZIP,[7za])
3485 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3488 # ZIP support (http://www.info-zip.org/Zip.html)
3491 AC_CHECK_PROGS(ZIP,[zip])
3493 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3496 # GhostPCL related configuration.
3498 PCLColorDevice=ppmraw
3499 PCLCMYKDevice=pamcmyk32
3500 PCLMonoDevice=pbmraw
3501 if test -z "$PCLVersion"; then
3502 PCLVersion='unknown'
3504 if test $have_pcl = 'yes'; then
3505 AC_MSG_RESULT([-------------------------------------------------------------])
3506 AC_MSG_CHECKING([for PCL])
3509 AC_MSG_CHECKING([for pcl color device])
3510 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3513 PCLColorDevice=ppmraw
3515 AC_MSG_RESULT([$PCLColorDevice])
3518 AC_MSG_CHECKING([for pcl CMYK device])
3519 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3522 PCLCMYKDevice=$PCLColorDevice
3524 AC_MSG_RESULT([$PCLCMYKDevice])
3527 AC_MSG_CHECKING([for pcl mono device])
3528 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3531 PCLMonoDevice=$PCLColorDevice
3533 AC_MSG_RESULT([$PCLMonoDevice])
3536 AC_SUBST(PCLMonoDevice)
3537 AC_SUBST(PCLColorDevice)
3538 AC_SUBST(PCLCMYKDevice)
3539 AC_SUBST(PCLVersion)
3542 # GhostXPS related configuration.
3544 XPSColorDevice=ppmraw
3545 XPSCMYKDevice=bmpsep8
3546 XPSMonoDevice=pbmraw
3547 if test -z "$XPSVersion"; then
3548 XPSVersion='unknown'
3550 if test $have_xps = 'yes'; then
3551 AC_MSG_RESULT([-------------------------------------------------------------])
3552 AC_MSG_CHECKING([for XPS])
3555 AC_MSG_CHECKING([for xps color device])
3556 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3559 XPSColorDevice=ppmraw
3561 AC_MSG_RESULT([$XPSColorDevice])
3564 AC_MSG_CHECKING([for xps CMYK device])
3565 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3568 XPSCMYKDevice=$XPSColorDevice
3570 AC_MSG_RESULT([$XPSCMYKDevice])
3573 AC_MSG_CHECKING([for xps mono device])
3574 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3577 XPSMonoDevice=$XPSColorDevice
3579 AC_MSG_RESULT([$XPSMonoDevice])
3582 AC_SUBST(XPSMonoDevice)
3583 AC_SUBST(XPSColorDevice)
3584 AC_SUBST(XPSCMYKDevice)
3585 AC_SUBST(XPSVersion)
3588 # Ghostscript related configuration.
3590 GSAlphaDevice=pngalpha
3591 GSColorDevice=pnmraw
3594 GSPDFDevice=pdfwrite
3596 GSEPSDevice=epswrite
3598 if test $have_gs = 'yes'; then
3599 AC_MSG_RESULT([-------------------------------------------------------------])
3600 AC_MSG_CHECKING([for Ghostscript])
3602 AC_MSG_CHECKING([for Ghostscript version])
3603 if GSVersion=`$PSDelegate --version`; then
3606 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3608 AC_MSG_RESULT([$GSVersion])
3611 AC_MSG_CHECKING([for gs alpha device])
3612 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3615 GSAlphaDevice=pnmraw
3617 AC_MSG_RESULT([$GSAlphaDevice])
3620 AC_MSG_CHECKING([for gs color device])
3621 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3624 GSColorDevice=pnmraw
3626 AC_MSG_RESULT([$GSColorDevice])
3629 AC_MSG_CHECKING([for gs CMYK device])
3630 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3633 GSCMYKDevice=bmpsep8
3635 AC_MSG_RESULT([$GSCMYKDevice])
3638 AC_MSG_CHECKING([for gs mono device])
3639 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3642 GSMonoDevice=$GSColorDevice
3644 AC_MSG_RESULT([$GSMonoDevice])
3647 AC_MSG_CHECKING([for gs PDF writing device])
3648 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3651 GSPDFDevice=nodevice
3653 AC_MSG_RESULT([$GSPDFDevice])
3656 AC_MSG_CHECKING([for gs PS writing device])
3657 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3662 AC_MSG_RESULT([$GSPSDevice])
3665 AC_MSG_CHECKING([for gs EPS writing device])
3666 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3669 GSEPSDevice=nodevice
3671 AC_MSG_RESULT([$GSEPSDevice])
3674 AC_SUBST(GSAlphaDevice)
3675 AC_SUBST(GSCMYKDevice)
3676 AC_SUBST(GSColorDevice)
3677 AC_SUBST(GSEPSDevice)
3678 AC_SUBST(GSMonoDevice)
3679 AC_SUBST(GSPDFDevice)
3680 AC_SUBST(GSPSDevice)
3684 # PerlMagick-related configuration
3687 # Look for PERL if PerlMagick requested
3688 # If name/path of desired PERL interpreter is specified, look for that one first
3690 if test "$with_perl" != 'no'; then
3691 AC_MSG_RESULT([-------------------------------------------------------------])
3692 AC_MSG_CHECKING([for Perl])
3694 if test "$with_perl" != 'yes'; then
3695 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3696 PERL=$ac_cv_path_PERL
3698 have_perl="$ac_cv_path_PERL"
3700 AC_PATH_PROGS(PERL,perl perl5,)dnl
3701 if test "$ac_cv_path_PERL"; then
3702 have_perl="$ac_cv_path_PERL"
3707 if test "$with_perl" != 'yes' ; then
3708 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3711 PERL_SUPPORTS_DESTDIR='no'
3713 with_perl_static='no'
3714 with_perl_dynamic='no'
3715 if test "$have_perl" != 'no'; then
3716 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3717 with_perl_static='yes'
3719 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3720 with_perl_dynamic='yes'
3722 # Is PERL's MakeMaker new enough to support DESTDIR?
3723 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3725 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3726 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3727 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3728 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3730 # Determine path to pick up MagickCore library from for use with building PerlMagick
3731 MAGICKCORE_PATH="${LIB_DIR}"
3732 if test $with_perl_static = 'yes'; then
3733 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3734 libtool_objdir=$objdir
3736 # Linker search path to library, followed by -lMagickCore
3737 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3739 AC_SUBST(MAGICKCORE_PATH)
3741 # Create a simple string containing format names for all delegate libraries.
3743 if test "$have_autotrace" = 'yes' ; then
3744 MAGICK_DELEGATES="$MAGICK_DELEGATES autotrace"
3746 if test "$have_bzlib" = 'yes' ; then
3747 MAGICK_DELEGATES="$MAGICK_DELEGATES bzlib"
3749 if test "$have_dps" = 'yes' ; then
3750 MAGICK_DELEGATES="$MAGICK_DELEGATES dps"
3752 if test "$have_djvu" = 'yes' ; then
3753 MAGICK_DELEGATES="$MAGICK_DELEGATES djvu"
3755 if test "$have_ffmpeg" = 'yes' ; then
3756 MAGICK_DELEGATES="$MAGICK_DELEGATES mpeg"
3758 if test "$have_fftw" = 'yes' ; then
3759 MAGICK_DELEGATES="$MAGICK_DELEGATES fftw"
3761 if test "$have_fig2dev" = 'yes' && test "$have_ps" = 'yes' ; then
3762 MAGICK_DELEGATES="$MAGICK_DELEGATES xfig"
3764 if test "$have_fpx" = 'yes' ; then
3765 MAGICK_DELEGATES="$MAGICK_DELEGATES fpx"
3767 if test "$have_fontconfig" = 'yes' ; then
3768 MAGICK_DELEGATES="$MAGICK_DELEGATES fontconfig"
3770 if test "$have_freetype" = 'yes' ; then
3771 MAGICK_DELEGATES="$MAGICK_DELEGATES freetype"
3773 if test "$have_gslib" = 'yes' ; then
3774 MAGICK_DELEGATES="$MAGICK_DELEGATES gslib"
3776 if test "$have_jbig" = 'yes' ; then
3777 MAGICK_DELEGATES="$MAGICK_DELEGATES jbig"
3779 if test "$have_png$have_jpeg" = 'yesyes' ; then
3780 MAGICK_DELEGATES="$MAGICK_DELEGATES jng"
3782 if test "$have_jp2" = 'yes' ; then
3783 MAGICK_DELEGATES="$MAGICK_DELEGATES jp2"
3785 if test "$have_jpeg" = 'yes' ; then
3786 MAGICK_DELEGATES="$MAGICK_DELEGATES jpeg"
3788 if test "$have_lcms" = 'yes' || test "$have_lcms2" = 'yes' ; then
3789 MAGICK_DELEGATES="$MAGICK_DELEGATES lcms"
3791 if test "$have_lqr" = 'yes' ; then
3792 MAGICK_DELEGATES="$MAGICK_DELEGATES lqr"
3794 if test "$have_lzma" = 'yes' ; then
3795 MAGICK_DELEGATES="$MAGICK_DELEGATES lzma"
3797 if test "$have_openexr" = 'yes' ; then
3798 MAGICK_DELEGATES="$MAGICK_DELEGATES openexr"
3800 if test "$have_pango" = 'yes' ; then
3801 MAGICK_DELEGATES="$MAGICK_DELEGATES pango"
3803 if test "$have_png" = 'yes' ; then
3804 MAGICK_DELEGATES="$MAGICK_DELEGATES png"
3807 if test "$have_dps" = 'yes' || \
3808 test "$have_gs" = 'yes' || \
3809 test "${native_win32_build}" = 'yes' ; then
3812 if test "$have_ps" = 'yes' ; then
3813 MAGICK_DELEGATES="$MAGICK_DELEGATES ps"
3815 if test "$have_ralcgm" = 'yes' ; then
3816 MAGICK_DELEGATES="$MAGICK_DELEGATES cgm"
3818 if test "$have_ra_ppm" = 'yes' ; then
3819 MAGICK_DELEGATES="$MAGICK_DELEGATES rad"
3821 if test "$have_rsvg" = 'yes' ; then
3822 MAGICK_DELEGATES="$MAGICK_DELEGATES rsvg"
3824 if test "$have_tiff" = 'yes' ; then
3825 MAGICK_DELEGATES="$MAGICK_DELEGATES tiff"
3827 if test "$have_ttf" = 'yes' ; then
3828 MAGICK_DELEGATES="$MAGICK_DELEGATES ttf"
3830 if test "$have_wmf" = 'yes' ; then
3831 MAGICK_DELEGATES="$MAGICK_DELEGATES wmf"
3833 if test "$have_x" = 'yes' ; then
3834 MAGICK_DELEGATES="$MAGICK_DELEGATES x"
3836 if test "$have_xml" = 'yes' ; then
3837 MAGICK_DELEGATES="$MAGICK_DELEGATES xml"
3839 if test "$have_zlib" = 'yes' ; then
3840 MAGICK_DELEGATES="$MAGICK_DELEGATES zlib"
3842 # Remove extraneous spaces from output variables (asthetic)
3843 MAGICK_DELEGATES=`echo $MAGICK_DELEGATES | sed -e 's/ */ /g'`
3844 MAGICK_FEATURES=`echo $MAGICK_FEATURES | sed -e 's/ */ /g'`
3845 AC_SUBST(MAGICK_DELEGATES)
3846 AC_SUBST(MAGICK_FEATURES)
3849 # Handle special compiler flags
3852 # Add '-p' if prof source profiling support enabled
3853 if test "$enable_prof" = 'yes'; then
3855 CXXFLAGS="-p $CXXFLAGS"
3856 LDFLAGS="-p $LDFLAGS"
3859 # Add '-pg' if gprof source profiling support enabled
3860 if test "$enable_gprof" = 'yes'; then
3861 CFLAGS="-pg $CFLAGS"
3862 CXXFLAGS="-pg $CXXFLAGS"
3863 LDFLAGS="-pg $LDFLAGS"
3866 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3867 # This is a gcc-specific feature
3868 if test "$enable_gcov" = 'yes'; then
3869 AC_CHECK_LIB(gcov,_gcov_init)
3870 AC_CHECK_LIB(gcov,__gcov_init)
3871 case "$target_os" in
3873 OSX_GCOV_LDFLAG="-Wl,-single_module"
3879 AC_SUBST(OSX_GCOV_LDFLAG)
3880 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3881 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3882 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3886 # Build library dependency list for libMagickCore
3889 if test "$build_modules" != 'no'; then
3890 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"
3892 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"
3894 AC_SUBST(MAGICK_DEP_LIBS)
3897 # Remove extraneous spaces from output variables (asthetic)
3899 X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'`
3900 X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'`
3901 X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'`
3902 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'`
3904 CC=`echo $CC | sed -e 's/ */ /g'`
3905 CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'`
3906 CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'`
3907 CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'`
3908 DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'`
3909 LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'`
3910 TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3911 MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
3912 #LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3914 # Pass only user-provided LIBS as "global" libraries
3920 #AC_SUBST(X_PRE_LIBS)
3922 #AC_SUBST(X_EXTRA_LIBS)
3924 MAGICK_CFLAGS=$CFLAGS
3925 MAGICK_CXXFLAGS="$CXXFLAGS"
3926 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3927 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3928 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3929 MAGICK_LIBS="-lMagickCore $MAGICK_DEP_LIBS"
3931 AC_SUBST(MAGICK_CFLAGS)
3932 AC_SUBST(MAGICK_CXXFLAGS)
3933 AC_SUBST(MAGICK_CPPFLAGS)
3934 AC_SUBST(MAGICK_PCFLAGS)
3935 AC_SUBST(MAGICK_LDFLAGS)
3936 AC_SUBST(MAGICK_LIBS)
3938 # Set configured scripts to executable.
3939 AC_CONFIG_COMMANDS([default],[],[])
3940 AC_CONFIG_COMMANDS([magick.sh.in],[chmod +x magick.sh])
3941 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3942 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3943 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3944 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3946 AC_MSG_RESULT([-------------------------------------------------------------])
3947 AC_MSG_RESULT([Update ImageMagick configuration])
3950 rm -f magick-version
3952 result_dejavu_font_dir='none'
3953 if test "${dejavu_font_dir}x" != 'x'; then
3954 result_dejavu_font_dir=$dejavu_font_dir
3957 result_ghostscript_font_dir='none'
3958 if test "${ghostscript_font_dir}x" != 'x'; then
3959 result_ghostscript_font_dir=$ghostscript_font_dir
3962 result_windows_font_dir='none'
3963 if test "${windows_font_dir}x" != 'x'; then
3964 result_windows_font_dir=${windows_font_dir}
3968 ImageMagick is configured as follows. Please verify that this configuration
3969 matches your expectations.
3971 Host system type: $host
3972 Build system type: $build
3975 -------------------------------------------------------------------------------
3976 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3977 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3978 Module support --with-modules=$build_modules $build_modules
3979 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3980 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3981 High Dynamic Range Imagery
3982 --enable-hdri=$enable_hdri $enable_hdri
3984 Delegate Configuration:
3985 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3986 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3987 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3988 DJVU --with-djvu=$with_djvu $have_djvu
3989 DPS --with-dps=$with_dps $have_dps
3990 FFTW --with-fftw=$with_fftw $have_fftw
3991 FlashPIX --with-fpx=$with_fpx $have_fpx
3992 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3993 FreeType --with-freetype=$with_freetype $have_freetype
3994 GhostPCL None $PCLDelegate ($PCLVersion)
3995 GhostXPS None $XPSDelegate ($XPSVersion)
3996 Ghostscript None $PSDelegate ($GSVersion)
3997 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3998 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3999 Graphviz --with-gvc=$with_gvc $have_gvc
4000 JBIG --with-jbig=$with_jbig $have_jbig
4001 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
4002 JPEG-2000 --with-jp2=$with_jp2 $have_jp2
4003 LCMS v1 --with-lcms=$with_lcms $have_lcms
4004 LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
4005 LQR --with-lqr=$with_lqr $have_lqr
4006 LTDL --with-ltdl=$with_ltdl $have_ltdl
4007 LZMA --with-lzma=$with_lzma $have_lzma
4008 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
4009 OpenEXR --with-openexr=$with_openexr $have_openexr
4010 PANGO --with-pango=$with_pango $have_pango
4011 PERL --with-perl=$with_perl $have_perl
4012 PNG --with-png=$with_png $have_png
4013 RSVG --with-rsvg=$with_rsvg $have_rsvg
4014 TIFF --with-tiff=$with_tiff $have_tiff
4015 WEBP --with-webp=$with_webp $have_webp
4016 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
4017 WMF --with-wmf=$with_wmf $have_wmf
4018 X11 --with-x=$with_x $have_x
4019 XML --with-xml=$with_xml $have_xml
4020 ZLIB --with-zlib=$with_zlib $have_zlib
4023 X_CFLAGS = $X_CFLAGS
4024 X_PRE_LIBS = $X_PRE_LIBS
4026 X_EXTRA_LIBS = $X_EXTRA_LIBS
4028 Options used to compile and link:
4029 PREFIX = $PREFIX_DIR
4030 EXEC-PREFIX = $EXEC_PREFIX_DIR
4031 VERSION = $PACKAGE_VERSION
4034 CPPFLAGS = $MAGICK_CPPFLAGS
4035 PCFLAGS = $MAGICK_PCFLAGS
4038 MAGICK_LDFLAGS = $MAGICK_LDFLAGS
4041 CXXFLAGS = $CXXFLAGS
4042 FEATURES = $MAGICK_FEATURES
4043 DELEGATES = $MAGICK_DELEGATES