1 # Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
2 # dedicated to making software imaging solutions freely available.
4 # You may not use this file except in compliance with the License. You may
5 # obtain a copy of the License at
7 # http://www.imagemagick.org/script/license.php
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Copyright (C) 2003 - 2008 GraphicsMagick Group
19 m4_define([magick_major_version], [7])
20 m4_define([magick_minor_version], [0])
21 m4_define([magick_micro_version], [0])
22 m4_define([magick_patchlevel_version], [0])
23 m4_define([magick_version],
24 [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
25 m4_define([magick_svn_revision], esyscmd([sh -c "svnversion | sed -r 's/([0-9]+).*/\1/'"]))
27 AC_INIT([ImageMagick],[magick_version],[http://www.imagemagick.org],[ImageMagick])
28 AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
29 AC_CONFIG_AUX_DIR([config])
30 AC_CONFIG_MACRO_DIR([m4])
31 AC_CONFIG_LIBOBJ_DIR([ltdl])
32 AC_CONFIG_HEADERS([config/config.h])
33 AX_PREFIX_CONFIG_H([MagickCore/magick-config.h],[MagickCore])
35 config/configure.xml \
36 config/delegates.xml \
37 config/ImageMagick.rdf \
38 config/MagickCore.dox \
39 config/MagickWand.dox \
40 config/type-dejavu.xml \
41 config/type-ghostscript.xml \
42 config/type-windows.xml \
45 Magick++/bin/Magick++-config \
46 MagickCore/ImageMagick.pc \
47 Magick++/lib/ImageMagick++.pc \
48 Magick++/lib/Magick++.pc \
49 MagickCore/MagickCore-config \
50 MagickCore/MagickCore.pc \
51 MagickCore/version.h \
54 PerlMagick/Magick.pm \
55 PerlMagick/Makefile.PL \
59 utilities/composite.1 \
63 utilities/identify.1 \
64 utilities/ImageMagick.1 \
69 MagickWand/MagickWand-config \
70 MagickWand/MagickWand.pc ])
73 # Save initial user-tunable values
76 for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
77 eval isset=\${$var+set}
78 if test "$isset" = 'set'; then
80 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
83 AC_SUBST(DISTCHECK_CONFIG_FLAGS)
85 CONFIGURE_ARGS="$0 ${ac_configure_args}"
86 AC_SUBST(CONFIGURE_ARGS)
88 # Source file containing package/library versioning information.
89 . ${srcdir}/version.sh
91 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
96 MAGICK_TARGET_CPU=$host_cpu
97 AC_SUBST(MAGICK_TARGET_CPU)
99 MAGICK_TARGET_VENDOR=$host_vendor
100 AC_SUBST(MAGICK_TARGET_VENDOR)
102 MAGICK_TARGET_OS=$host_os
103 AC_SUBST(MAGICK_TARGET_OS)
105 # Substitute library versioning
106 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
107 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
108 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
109 AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
110 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
111 AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
112 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
113 AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision])
115 AC_SUBST(PACKAGE_NAME)dnl
116 AC_SUBST(PACKAGE_VERSION)dnl
117 AC_SUBST(PACKAGE_PERL_VERSION)dnl
118 AC_SUBST(PACKAGE_RELEASE)dnl
119 AC_SUBST(PACKAGE_CHANGE_DATE)dnl
120 AC_SUBST(PACKAGE_LIB_VERSION)dnl
121 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
122 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
123 AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
125 # Ensure that make can run correctly
128 AM_INIT_AUTOMAKE([1.11 color-tests foreign parallel-tests silent-rules subdir-objects dist-zip dist-bzip2 dist-xz])
130 # Enable support for silent build rules
131 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
133 MAGICK_LIB_VERSION="0x"
134 if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
135 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
137 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
138 if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
139 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
141 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
142 if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
143 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
145 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
146 AC_SUBST(MAGICK_LIB_VERSION)
148 # Definition used to define MagickLibVersionText in version.h
149 MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
150 AC_SUBST(MAGICK_LIB_VERSION_TEXT)
152 # Definition used to define MagickLibVersionNumber in version.h
153 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
154 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
156 # Regenerate config.status if ChangeLog or version.sh is updated.
157 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
162 MAGICK_CPPFLAGS=$CPPFLAGS_USER
163 MAGICK_PCFLAGS=$CPPFLAGS_USER
169 # Evaluate shell variable equivalents to Makefile directory variables
171 if test "x$prefix" = xNONE; then
172 prefix=$ac_default_prefix
174 # Let make expand exec_prefix.
175 if test "x$exec_prefix" = xNONE; then
176 exec_prefix='${prefix}'
180 eval "eval PREFIX_DIR=${prefix}"
182 eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
183 AC_SUBST(EXEC_PREFIX_DIR)
184 eval "eval BIN_DIR=$bindir"
186 eval "eval SBIN_DIR=$sbindir"
188 eval "eval LIBEXEC_DIR=$libexecdir"
189 AC_SUBST(LIBEXEC_DIR)
190 eval "eval DATA_DIR=$datadir"
192 eval "eval DOC_DIR=$docdir"
194 eval "eval SYSCONF_DIR=$sysconfdir"
195 AC_SUBST(SYSCONF_DIR)
196 eval "eval SHAREDSTATE_DIR=$sharedstatedir"
197 AC_SUBST(SHAREDSTATE_DIR)
198 eval "eval LOCALSTATE_DIR=$localstatedir"
199 AC_SUBST(LOCALSTATE_DIR)
200 eval "eval LIB_DIR=$libdir"
202 eval "eval INCLUDE_DIR=$includedir"
203 AC_SUBST(INCLUDE_DIR)
204 eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
205 AC_SUBST(PERSISTINCLUDE_DIR)
206 eval "eval INFO_DIR=$infodir"
208 eval "eval MAN_DIR=$mandir"
211 # Get full paths to source and build directories
212 srcdirfull="`cd $srcdir && pwd`"
216 # Compute variables useful for running uninstalled software.
218 MAGICK_CODER_MODULE_PATH="${builddir}/coders"
219 MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
220 MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
221 MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
223 case "${build_os}" in
225 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
226 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
227 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
228 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
237 AC_SUBST(MAGICK_CODER_MODULE_PATH)
238 AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
239 AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
240 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
245 # Enable OS features.
247 AC_USE_SYSTEM_EXTENSIONS
267 # Enable run-time checking.
269 AC_ARG_ENABLE([bounds-checking],
270 [AC_HELP_STRING([--bounds-checking],
271 [enable run-time bounds-checking])],
272 [enable_bounds_checking=$enableval],
273 [enable_bounds_checking='no'])
275 if test "$enable_bounds_checking" = yes; then
276 AC_DEFINE([_FORTIFY_SOURCE], [2],
277 [enable run-time bounds-checking])
288 native_win32_build='no'
296 native_win32_build='yes'
300 if test "${GDI32_LIBS}x" != 'x'; then
301 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
304 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
305 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
306 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
307 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
309 WinPathScript="${srcdirfull}/winpath.sh"
310 AC_SUBST(WinPathScript)
313 # Compiler flags tweaks
315 if test "${GCC}" != "yes"; then
318 # aCC: HP ANSI C++ B3910B A.03.34
319 CFLAGS="${CFLAGS} -Wp,-H30000"
320 if test -n "${CXXFLAGS}"; then
323 CXXFLAGS="${CXXFLAGS} -AA"
327 # Compaq alphaev68-dec-osf5.1 compiler
328 if test -n "${CXXFLAGS}"; then
329 CXXFLAGS='-std strict_ansi -noimplicit_include'
331 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
336 # Check for lazy-loading.
337 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
339 im_cv_ld_lazyload='none'
341 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
342 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
343 im_cv_ld_lazyload='-Wl,-zlazyload'
348 if test "${im_cv_ld_lazyload}" != 'none' ; then
349 if test -z "${LDFLAGS}" ; then
350 LDFLAGS="${im_cv_ld_lazyload}"
352 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
356 dnl Platform-specific stuff
358 *darwin* | *-macos10*)
359 dnl OS X universal binary support, requires --disable-dependency-tracking
360 AC_ARG_ENABLE([osx-universal-binary],
361 AC_HELP_STRING([--enable-osx-universal-binary],
362 [build universal binary on OS X [[default=no]]]),
363 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
365 if test "${build_osxuniversal}" != no ; then
366 if test "$enable_dependency_tracking" != no ; then
367 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
368 Please re-run configure with these options:
369 --disable-dependency-tracking --enable-osx-universal-binary
372 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
373 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
374 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
380 # ARCH specific include directory
382 AC_ARG_WITH([includedir-arch],
383 [AC_HELP_STRING([--includedir-arch=DIR],
384 [ARCH specific include directory])],
385 [includedir_arch=$withval],
386 [includedir_arch=$INCLUDE_DIR])
388 eval "eval INCLUDEDIR_ARCH=$includedir_arch"
389 AC_SUBST(INCLUDEDIR_ARCH)
392 # ARCH specific configuration directory
394 AC_ARG_WITH([sharedir-arch],
395 [AC_HELP_STRING([--sharedir-arch=DIR],
396 [ARCH specific config directory])],
397 [sharedir_arch=$withval],
398 [sharedir_arch="${DATA_DIR}"])
400 eval "eval SHAREDIR_ARCH=$sharedir_arch"
401 SHAREDIR_ARCH="$sharedir_arch"
402 AC_SUBST(SHAREDIR_ARCH)
405 # Enable support for threads
406 AC_ARG_WITH([threads],
407 [AC_HELP_STRING([--without-threads], [disable threads support])],
408 [with_threads=$withval],
409 [with_threads='yes'])
412 if test "$with_threads" != 'no'; then
414 if test "$ax_pthread_ok" = yes; then
416 DEF_THREAD="$PTHREAD_CFLAGS"
417 CFLAGS="$CFLAGS $DEF_THREAD"
418 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
419 if test "$CC" != "$PTHREAD_CC"; then
420 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
423 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
427 # Enable support for OpenMP
428 if test "$have_threads" != 'yes'; then
429 ac_cv_prog_c_openmp=unsupported
432 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
433 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
434 AC_SUBST(OPENMP_CFLAGS)
435 if test "$enable_openmp" != no; then
436 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
437 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
441 # Enable support for OpenCL
443 CFLAGS="$CL_CFLAGS $CFLAGS"
444 LIBS="$CL_LIBS $LIBS"
446 if test "$enable_opencl" != no; then
447 if test "X$ax_cv_check_cl_libcl" != Xno; then :
448 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
454 # Check for large file support
460 if test "$enable_largefile" != no; then
461 case $ac_cv_sys_file_offset_bits in
463 # nothing to do here as the host supports LFS fine
466 AC_MSG_CHECKING([for native large file support])
467 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
469 exit(!(sizeof(off_t) == 8));
471 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
472 AC_MSG_NOTICE([yes])],
473 [AC_MSG_NOTICE([no])])
476 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
479 if test "$ac_cv_sys_large_files" != 'no'; then
480 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
482 if test "$ac_cv_sys_largefile_source" != 'no'; then
483 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
486 AC_SUBST(LFS_CPPFLAGS)
492 AC_SUBST(LIBTOOL_DEPS)
495 LT_CONFIG_LTDL_DIR([ltdl])
496 LTDL_INIT([convenience nonrecursive])
498 # Check to see if building shared libraries
499 libtool_build_shared_libs='no'
500 if test "$enable_shared" = 'yes'; then
501 libtool_build_shared_libs='yes'
504 # Check to see if building static libraries
505 libtool_build_static_libs='no'
506 if test "$enable_static" = 'yes'; then
507 libtool_build_static_libs='yes'
510 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
512 # Enable support for building loadable modules
514 AC_ARG_WITH([modules],
515 [AC_HELP_STRING([--with-modules],
516 [enable building dynamically loadable modules])],
517 [with_modules=$withval],
520 # Only allow building loadable modules if we are building shared libraries
521 if test "$with_modules" != 'no' ; then
522 if test "$libtool_build_shared_libs" = 'no'; then
523 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
527 if test "$with_modules" != 'no'; then
528 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
530 AM_CONDITIONAL(WITH_MODULES, test "$with_modules" != 'no')
532 # Enable building/use of libltdl if we are building shared libraries regardless
533 # of whether modules are built or not.
535 if test "$libtool_build_shared_libs" != 'no'; then
539 AM_CONDITIONAL(WITH_LTDL, test "$with_ltdl" != 'no')
540 if test "$with_ltdl" != 'no'; then
541 AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules)
544 if test X"$enable_shared" = Xyes; then
545 DLLDFLAGS=-export-dynamic
550 # Enable build using delegate libraries built in subdirectories rather than installed
551 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
552 AC_ARG_ENABLE([delegate-build],
553 [AC_HELP_STRING([--enable-delegate-build],
554 [look for delegate libraries in build directory])],
555 [enable_delegate_build=$enableval],
556 [enable_delegate_build='no'])
558 AC_ARG_ENABLE([deprecated],
559 [AC_HELP_STRING([--disable-deprecated],
560 [exclude deprecated methods in MagickCore and MagickWand API's])],
561 [enable_deprecated=$enableval],
562 [enable_deprecated='no'])
564 if test "$enable_deprecated" = 'yes'; then
565 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
567 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
570 # Build a version of ImageMagick which operates uninstalled.
571 # Used to build distributions located via MAGICK_HOME / executable path
572 AC_ARG_ENABLE([installed],
573 [AC_HELP_STRING([--disable-installed],
574 [Formally install ImageMagick under PREFIX])],
575 [enable_installed=$enableval],
576 [enable_installed='yes'])
578 if test "$enable_installed" = 'yes'; then
579 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
581 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
584 # Permit enciphering and deciphering image pixels.
585 AC_ARG_ENABLE([cipher],
586 [AC_HELP_STRING([--disable-cipher],
587 [disable enciphering and deciphering image pixels])],
588 [enable_cipher=$enableval],
589 [enable_cipher='yes'])
591 if test "$enable_cipher" = 'yes'; then
592 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
595 # Build a zero-configuration version of ImageMagick.
596 AC_ARG_ENABLE([zero-configuration],
597 [AC_HELP_STRING([--enable-zero-configuration],
598 [enable self-contained, embeddable, zero-configuration ImageMagick])],
599 [enable_zero_configuration=$enableval],
600 [enable_zero_configuration='no'])
602 if test "$enable_zero_configuration" = 'yes'; then
603 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
604 MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES"
607 # Build a high dynamic range version of ImageMagick.
608 AC_ARG_ENABLE([hdri],
609 [AC_HELP_STRING([--enable-hdri],
610 [accurately represent the wide range of intensity levels found in real scenes])],
611 [enable_hdri=$enableval],
615 if test "$enable_hdri" = 'yes'; then
617 AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
618 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
620 AC_SUBST(MAGICK_HDRI)dnl
622 # Build a version of ImageMagick with assert statements.
623 AC_ARG_ENABLE([assert],
624 [AC_HELP_STRING([--disable-assert],
625 [disable assert() statements in build])],
626 [enable_assert=$enableval],
627 [enable_assert='yes'])
629 if test "$enable_assert" = 'no'; then
630 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
633 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
636 # Enable ccmalloc memory debugging support
637 AC_ARG_ENABLE([ccmalloc],
638 [AC_HELP_STRING([--enable-ccmalloc],
639 [enable 'ccmalloc' memory debug support])],
640 [enable_ccmalloc=$enableval],
641 [enable_ccmalloc='no'])
643 # Enable Electric Fence memory debugging support
644 AC_ARG_ENABLE([efence],
645 [AC_HELP_STRING([--enable-efence],
646 [enable 'efence' memory debug support])],
647 [enable_efence=$enableval],
648 [enable_efence='no'])
650 # Enable prof-based profiling support
651 AC_ARG_ENABLE([prof],
652 [AC_HELP_STRING([--enable-prof],
653 [enable 'prof' profiling support])],
654 [enable_prof=$enableval],
657 # Enable gprof-based profiling support
658 AC_ARG_ENABLE([gprof],
659 [AC_HELP_STRING([--enable-gprof],
660 [enable 'gprof' profiling support])],
661 [enable_gprof=$enableval],
664 # Enable gcov-based profiling support
665 AC_ARG_ENABLE([gcov],
666 [AC_HELP_STRING([--enable-gcov],
667 [enable 'gcov' profiling support])],
668 [enable_gcov=$enableval],
671 enable_profiling='no'
672 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
673 enable_profiling='yes'
674 if test "$libtool_build_shared_libs" = 'yes'; then
675 echo "Warning: Can not profile code using shared libraries"
679 # Magick API method prefix
680 AC_ARG_WITH([method-prefix],
681 [AC_HELP_STRING([--with-method-prefix=PREFIX],
682 [prefix MagickCore API methods])],
683 [with_method_prefix=$enableval],
684 [with_method_prefix=''])
686 if test "$with_method_prefix" != ''; then
687 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
690 # Number of bits in a Quantum
691 AC_ARG_WITH([quantum-depth],
692 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
693 [number of bits in a pixel quantum (default 16)])],
694 [with_quantum_depth=$withval],
695 [with_quantum_depth=16])
697 if test "$with_quantum_depth" != '8'; then
698 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
701 case "${with_quantum_depth}" in
706 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
708 QUANTUM_DEPTH="$with_quantum_depth"
709 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
710 AC_SUBST(QUANTUM_DEPTH)dnl
712 # Set pixel cache threshold
714 [AC_HELP_STRING([--with-cache=THRESHOLD],
715 [set pixel cache threshhold in MB (default available memory)])],
716 [with_cache=$withval],
719 if test "$with_cache" != ''; then
720 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
721 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
724 # Disable/Enable support for full delegate paths
725 AC_ARG_WITH([frozenpaths],
726 [AC_HELP_STRING([--with-frozenpaths],
727 [freeze delegate paths])],
728 [with_frozenpaths=$withval],
729 [with_frozenpaths='no'])
731 # Enable build/install of Magick++
732 AC_ARG_WITH([magick-plus-plus],
733 [AC_HELP_STRING([--without-magick-plus-plus],
734 [disable build/install of Magick++])],
735 [with_magick_plus_plus=$withval],
736 [with_magick_plus_plus='yes'])
738 # Disable build/install of PerlMagick.
740 [AC_HELP_STRING([--with-perl],
741 [enable build/install of PerlMagick])],
742 [with_perl=$withval],
745 # Options to pass when configuring PerlMagick
746 AC_ARG_WITH([perl-options],
747 [AC_HELP_STRING([--with-perl-options=OPTIONS],
748 [options to pass on command-line when generating PerlMagick's build file])],
749 PERL_MAKE_OPTIONS=$withval)
750 AC_SUBST(PERL_MAKE_OPTIONS)
752 # Enable umem, object-caching memory allocation library.
754 [ --with-umem enable umem memory allocation library support],
755 [with_umem=$withval],
757 if test "$with_umem" != 'yes' ; then
758 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
762 # Specify path to shared libstdc++ if not in normal location
764 AC_ARG_WITH([libstdc],
765 [AC_HELP_STRING([--with-libstdc=DIR],
766 [ use libstdc++ in DIR (for GNU C++)])],
767 [with_libstdc=$withval],
770 if test "$with_libstdc" != ''; then
771 if test -d "$with_libstdc"; then
772 LIBSTDCLDFLAGS="-L$with_libstdc"
775 AC_SUBST(LIBSTDCLDFLAGS)
777 # Does gcc required -traditional?
778 AC_PROG_GCC_TRADITIONAL
782 # Set defines required to build DLLs and modules using MinGW
785 # These options are set for multi-thread DLL module build
786 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
788 # executable/Magick++: _DLL _MAGICKMOD_
789 MODULE_EXTRA_CPPFLAGS=''
790 LIBRARY_EXTRA_CPPFLAGS=''
791 if test "${native_win32_build}" = 'yes'; then
792 if test "${libtool_build_shared_libs}" = 'yes'; then
793 CPPFLAGS="$CPPFLAGS -D_DLL"
794 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
795 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
796 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
797 if test "$with_modules" = 'yes'; then
798 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
800 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
803 CPPFLAGS="$CPPFLAGS -D_LIB"
804 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
805 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
807 if test "$with_threads" = 'yes'; then
808 CPPFLAGS="$CPPFLAGS -D_MT"
809 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
810 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
813 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
814 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
816 # Check standard headers
818 if ! test x"$ac_cv_header_stdc" = x"yes"; then
819 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
820 header files. Compilation cannot proceed. Please install the ANSI C
821 headers and rerun this script.]);
826 # Check additional headers
827 AC_CHECK_HEADERS(arm/limits.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h OS.h process.h stdarg.h sys/ipc.h sys/resource.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h xlocale.h)
831 # Checks for typedefs, structures, and compiler characteristics.
844 # If the C compiler supports the keyword inline, do nothing. Otherwise
845 # define inline to __inline__ or __inline if it accepts one of those,
846 # otherwise define inline to be empty.
849 # If the C compiler supports the keyword restrict, do nothing. Otherwise
850 # define restrict to __restrict__ or __restrict if it accepts one of those,
851 # otherwise define restrict to be empty.
854 # If words are stored with the most significant byte first (like
855 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
858 # Define to a suitable type, if standard headers do not define it.
866 AC_TYPE_LONG_DOUBLE_WIDER
867 AC_TYPE_LONG_LONG_INT
881 AC_TYPE_UNSIGNED_LONG_LONG_INT
883 # If the C type char is unsigned, define __CHAR_UNSIGNED__, unless the
884 # C compiler predefines it.
887 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
888 AC_CHECK_SIZEOF(signed short)
890 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
891 AC_CHECK_SIZEOF(unsigned short)
893 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
894 AC_CHECK_SIZEOF(signed int)
896 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
897 AC_CHECK_SIZEOF(unsigned int)
899 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
900 AC_CHECK_SIZEOF(signed long)
902 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
903 AC_CHECK_SIZEOF(unsigned long)
905 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
906 # 'signed long long' is not supported then the value defined is zero.
907 AC_CHECK_SIZEOF(signed long long)
909 # Obtain size of a 'unsigned long long' and define as
910 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
911 # supported then the value defined is zero.
912 AC_CHECK_SIZEOF(unsigned long long)
914 # Obtain size of off_t and define as SIZEOF_OFF_T
915 AC_CHECK_SIZEOF(off_t)
917 # Obtain size of size_t and define as SIZEOF_SIZE_T
918 AC_CHECK_SIZEOF(size_t)
920 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
921 AC_CHECK_SIZEOF(ssize_t)
923 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
924 AC_CHECK_SIZEOF(unsigned int*)
927 # Compute sized types for current CPU and compiler options.
930 AC_MSG_CHECKING(for signed 8-bit type)
932 AC_MSG_NOTICE($INT8_T)
935 AC_MSG_CHECKING(for unsigned 8-bit type)
936 UINT8_T='unsigned char'
937 AC_MSG_NOTICE($UINT8_T)
940 AC_MSG_CHECKING(for signed 16-bit type)
941 INT16_T='signed short'
942 AC_MSG_NOTICE($INT16_T)
945 AC_MSG_CHECKING(for unsigned 16-bit type)
946 UINT16_T='unsigned short'
947 AC_MSG_NOTICE($UINT16_T)
950 AC_MSG_CHECKING(for signed 32-bit type)
953 if test $ac_cv_sizeof_signed_int -eq 4; then
956 elif test $ac_cv_sizeof_signed_long -eq 4; then
957 INT32_T='signed long'
960 AC_MSG_NOTICE($INT32_T)
964 AC_MSG_CHECKING(for unsigned 32-bit type)
967 if test $ac_cv_sizeof_unsigned_int -eq 4; then
968 UINT32_T='unsigned int'
970 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
971 UINT32_T='unsigned long'
974 AC_MSG_NOTICE($UINT32_T)
978 AC_MSG_CHECKING(for signed 64-bit type)
981 if test $ac_cv_sizeof_signed_long -eq 8; then
982 INT64_T='signed long'
984 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
985 INT64_T='signed long long'
988 case "${build_os}" in
993 AC_MSG_NOTICE($INT64_T)
997 AC_MSG_CHECKING(for unsigned 64-bit type)
1000 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1001 UINT64_T='unsigned long'
1003 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1004 UINT64_T='unsigned long long'
1007 case "${build_os}" in
1012 AC_MSG_NOTICE($UINT64_T)
1016 AC_MSG_CHECKING(for unsigned maximum type)
1019 if test "$UINT64_T" != 'none'; then
1022 elif test "$UINT32_T" != 'none'; then
1026 AC_MSG_NOTICE($UINTMAX_T)
1030 AC_MSG_CHECKING(for pointer difference type)
1033 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1034 UINTPTR_T='unsigned long'
1036 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1037 UINTPTR_T='unsigned long long'
1040 AC_MSG_NOTICE($UINTPTR_T)
1044 AC_MSG_CHECKING([whether our compiler supports __func__])
1046 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1047 AC_MSG_NOTICE([yes]),
1049 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1051 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1052 AC_MSG_NOTICE([yes])
1053 AC_DEFINE(__func__, __FUNCTION__,
1054 [Define to appropriate substitue if compiler does not have __func__]),
1056 AC_DEFINE(__func__, __FILE__,
1057 [Define to appropriate substitue if compiler does not have __func__])))
1061 # Check for functions
1064 MAGICK_FUNC_MMAP_FILEIO
1065 AC_FUNC_CLOSEDIR_VOID
1069 AC_FUNC_SELECT_ARGTYPES
1070 AC_FUNC_SETVBUF_REVERSED
1080 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1081 LIBS="$MATH_LIBS $LIBS"
1084 AC_CHECK_FUNCS([acosh asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
1087 # Check for clock_gettime().
1089 AC_SEARCH_LIBS(clock_gettime, rt,
1091 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1092 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1095 [[#include <time.h>]],
1096 [[clockid_t clockType = CLOCK_REALTIME;]])],
1099 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1100 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1106 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1112 # Check for function prototypes
1116 AC_CHECK_DECLS([pread, pwrite],[],[],[
1117 #include <unistd.h>])
1119 AC_CHECK_DECLS([strlcpy],[],[],[
1120 #include <strings.h>])
1122 AC_CHECK_DECLS([vsnprintf],[],[],[
1124 #include <stdarg.h>])
1128 # C++ Support Tests (For Magick++)
1131 have_magick_plus_plus='no'
1132 if test "$with_magick_plus_plus" = 'yes'; then
1137 # Full set of headers used...
1138 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1139 # functional iomanip iosfwd iostream iterator list string strstream utility
1144 AX_CXX_NAMESPACE_STD
1145 AC_CXX_HAVE_STD_LIBS
1149 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1151 test $ax_cv_cxx_bool = 'yes' && \
1152 test $ax_cv_cxx_namespaces = 'yes' && \
1153 test $ac_cv_cxx_have_std_libs = 'yes' && \
1154 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1155 have_magick_plus_plus='yes'
1157 have_magick_plus_plus='no (failed tests)'
1159 AC_MSG_NOTICE([$have_magick_plus_plus])
1162 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1164 # Only check for delegate libraries in subdirectories if requested.
1165 if test "$enable_delegate_build" != 'no'; then
1166 # Check for delegate sub-directories and add -I & -L options as required.
1167 # This presumes that delegates are installed as detailed in the ImageMagick
1168 # README. If delegates are installed in a standard location where the
1169 # compiler will automatically find them then these options should not be
1173 # Most delegates have includes in the same directory as the library, but not all...
1176 for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper/include jbig/libjbig jpeg lcms/include lzma magick png tiff/libtiff ttf/include wand wmf/include xml/include zlib; do
1177 if test -d "$builddir/$dir"; then
1178 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1180 if test -d "$srcdirfull/$dir"; then
1181 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1187 for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src lzma magick png tiff/libtiff ttf/objs wand wmf/src xml zlib; do
1188 if test -d "$builddir/$dir/.libs"; then
1189 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1191 if test -d "$srcdirfull/$dir/.libs"; then
1192 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1195 if test -d "$builddir/$dir"; then
1196 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1198 if test -d "$srcdirfull/$dir"; then
1199 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1205 # Assume that delegate headers reside under same directory as ImageMagick
1206 # installation prefix.
1207 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/ImageMagick $MAGICK_CPPFLAGS"
1210 # Find the X11 RGB database
1212 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1213 [# Look for the header file in a standard set of common directories.
1214 # Check X11 before X11Rn because it is often a symlink to the current release.
1223 /usr/XFree86/lib/X11 \
1231 /usr/local/X11/lib \
1232 /usr/local/X11R4/lib \
1233 /usr/local/X11R5/lib \
1234 /usr/local/X11R6/lib \
1236 /usr/local/lib/X11 \
1237 /usr/local/lib/X11R4 \
1238 /usr/local/lib/X11R5 \
1239 /usr/local/lib/X11R6 \
1240 /usr/local/lib/X11R7 \
1241 /usr/local/x11r5/lib \
1242 /usr/lpp/Xamples/lib \
1244 /usr/openwin/share/lib \
1245 /usr/unsupported/lib \
1248 if test -f "$ac_dir/X11/rgb.txt"; then
1249 im_cv_x_configure="$ac_dir/X11/"
1251 elif test -f "$ac_dir/rgb.txt"; then
1252 im_cv_x_configure="$ac_dir/"
1257 X11_CONFIGURE_PATH="$im_cv_x_configure"
1258 case "${build_os}" in
1260 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1263 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",Location of X11 configure files)
1266 # Find OpenMP library
1269 if test "$enable_openmp" != 'no'; then
1270 if test "${GCC}" = "yes"; then
1271 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,) # gcc
1273 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,) # solaris cc
1274 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,) # AIX xlc
1275 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,) # SGI IRIX 6.5 MIPSpro C/C++
1277 LIBS="$GOMP_LIBS $LIBS"
1282 # Find Posix threads library
1285 if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then
1287 if test "x$PTHREAD_LIBS" = "x"; then
1288 case "${host_cpu}-${host_os}" in
1290 MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;;
1294 for lib in pthread pthreads; do
1295 if test "x$PTHREAD_LIBS" = "x"; then
1296 MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib])
1300 THREAD_LIBS="$PTHREAD_LIBS"
1301 LIBS="$LIBS $THREAD_LIBS"
1303 AC_SUBST(THREAD_LIBS)
1310 if test "$with_umem" != 'no'; then
1311 AC_MSG_CHECKING(for UMEM support )
1315 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1316 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1317 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1318 AC_MSG_CHECKING(if umem memory allocation library is complete)
1319 if test $passed -gt 0; then
1320 if test $failed -gt 0; then
1321 AC_MSG_NOTICE(no -- some components failed test)
1322 have_umem='no (failed tests)'
1325 LIBS="$UMEM_LIBS $LIBS"
1326 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1334 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1338 # Add support for ccmalloc memory debugging library if requested
1342 if test "$enable_ccmalloc" = 'yes'; then
1343 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1344 if test -n "$CCMALLOCDelegate"; then
1345 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1347 # Assume that gcc is used with ccmalloc.
1348 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1349 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1350 if test -n "$CCMALLOC_LIBS"; then
1352 LIBS="$LIBS $CCMALLOC_LIBS"
1361 # Add support for efence memory debugging library if requested
1363 if test "$enable_efence" = 'yes'; then
1364 EFENCE_LIBS='-lefence'
1365 LIBS="$EFENCE_LIBS $LIBS"
1368 dnl ===========================================================================
1374 AC_ARG_WITH([bzlib],
1375 [AC_HELP_STRING([--without-bzlib],
1376 [disable BZLIB support])],
1377 [with_bzlib=$withval],
1380 if test "$with_bzlib" != 'yes'; then
1381 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1385 if test "$with_bzlib" != 'no'; then
1387 AC_MSG_NOTICE([-------------------------------------------------------------])
1388 AC_MSG_CHECKING([for BZLIB])
1393 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1394 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1395 if test "$native_win32_build" = 'yes'; then
1396 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1398 if test $found_libbz -gt 0; then
1399 passed=`expr $passed + 1`
1401 failed=`expr $failed + 1`
1403 AC_MSG_CHECKING(if BZLIB package is complete)
1404 if test $passed -gt 0; then
1405 if test $failed -gt 0; then
1406 AC_MSG_NOTICE(no -- some components failed test)
1407 have_bzlib='no (failed tests)'
1410 LIBS="$BZLIB_LIBS $LIBS"
1411 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1419 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1420 AC_SUBST(BZLIB_LIBS)
1423 # Find the X11 include and library directories.
1430 if test "$no_x" != 'yes'; then
1431 AC_MSG_NOTICE([-------------------------------------------------------------])
1432 AC_MSG_CHECKING([for X11])
1434 LDFLAGS="$LDFLAGS $X_LIBS"
1435 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1436 LIBS="$X11_LIBS $LIBS"
1437 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1439 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1442 # Check for X11 shared memory extension
1444 # shmctl is required to support the shared memory extension
1445 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1446 if test "$have_shmctl" != 'yes'; then
1448 LIBS="$LIBS -lcygipc"
1449 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1453 if test "$have_shmctl" = 'yes'; then
1454 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1458 # Check for X11 shape extension
1460 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1461 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1462 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1464 if test "$no_x" != 'yes'; then
1469 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1473 dnl ===========================================================================
1479 [AC_HELP_STRING([--without-zlib],
1480 [disable ZLIB support])],
1481 [with_zlib=$withval],
1484 if test "$with_zlib" != 'yes'; then
1485 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1490 dnl PNG requires zlib so enable zlib check if PNG is requested
1491 if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
1492 AC_MSG_NOTICE([-------------------------------------------------------------])
1493 AC_MSG_CHECKING([for ZLIB])
1498 AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1499 AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1500 AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1501 AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1502 AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1503 AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1504 AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1505 AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1506 AC_MSG_CHECKING([if ZLIB package is complete])
1507 if test $passed -gt 0; then
1508 if test $failed -gt 0; then
1509 AC_MSG_NOTICE([no -- some components failed test])
1510 have_zlib='no (failed tests)'
1513 LIBS="$ZLIB_LIBS $LIBS"
1514 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
1515 AC_MSG_NOTICE([yes])
1522 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1526 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1529 if test "$enable_profiling" = 'yes'; then
1530 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1531 LIBS="$LIB_DL $LIBS"
1535 dnl ===========================================================================
1538 # Check for Autotrace delegate library.
1540 AC_ARG_WITH([autotrace],
1541 [AC_HELP_STRING([--with-autotrace],
1542 [enable autotrace support])],
1543 [with_autotrace=$withval],
1544 [with_autotrace='no'])
1546 if test "$with_autotrace" != 'yes'; then
1547 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1554 if test "x$with_autotrace" = "xyes"; then
1555 AC_MSG_NOTICE([-------------------------------------------------------------])
1556 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1560 if test "$have_autotrace" = 'yes'; then
1562 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1563 if test "$with_modules" = 'no'; then
1564 CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
1568 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1569 AC_SUBST(AUTOTRACE_CFLAGS)
1570 AC_SUBST(AUTOTRACE_LIBS)
1572 dnl ===========================================================================
1575 # Check for Display Postscript delegate library.
1578 [AC_HELP_STRING([--without-dps],
1579 [disable Display Postscript support])],
1580 [with_dps=$withval],
1583 if test "$with_dps" != 'yes'; then
1584 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1589 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1590 AC_MSG_NOTICE([-------------------------------------------------------------])
1591 AC_MSG_CHECKING([for DPS])
1595 PERSIST_CPPFLAGS="$CPPFLAGS"
1596 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1597 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1599 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1600 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1601 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1602 # ImageMagick itself doesn't use -lXt.
1605 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1606 if test "$have_libdps" != 'yes'; then
1607 # Unset cache variable so we can try again.
1608 unset ac_cv_lib_dps_DPSInitialize
1609 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1610 if test "$have_libdps" = 'yes'; then
1614 if test "$have_libdps" = 'yes'; then
1615 passed=`expr $passed + 1`
1617 failed=`expr $failed + 1`
1619 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1620 AC_MSG_CHECKING([if DPS package is complete])
1621 if test $passed -gt 0; then
1622 if test $failed -gt 0; then
1623 AC_MSG_NOTICE([no -- some components failed test])
1624 have_dps='no (failed tests)'
1625 CPPFLAGS="$PERSIST_CPPFLAGS"
1627 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1628 LIBS="$DPS_LIBS $LIBS"
1629 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1630 AC_MSG_NOTICE([yes])
1635 CPPFLAGS=$PERSIST_CPPFLAGS
1638 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1641 dnl ===========================================================================
1644 # Check for DJVU delegate library.
1647 [AC_HELP_STRING([--without-djvu],
1648 [disable DjVu support])],
1649 [with_djvu=$withval],
1652 if test "$with_djvu" != 'yes'; then
1653 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1658 if test "$with_djvu" != 'no'; then
1659 AC_MSG_NOTICE([-------------------------------------------------------------])
1660 AC_MSG_CHECKING([for DJVU])
1664 AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1665 AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1666 AC_MSG_CHECKING([if DJVU package is complete])
1667 if test $passed -gt 0; then
1668 if test $failed -gt 0; then
1669 AC_MSG_NOTICE([no -- some components failed test])
1670 have_djvu='no (failed tests)'
1672 DJVU_LIBS='-ldjvulibre'
1673 LIBS="$DJVU_LIBS $LIBS"
1674 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1675 AC_MSG_NOTICE([yes])
1682 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1685 dnl ===========================================================================
1688 # Set DejaVu font directory.
1690 AC_ARG_WITH([dejavu-font-dir],
1691 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1692 [DejaVu font directory])],
1693 [with_dejavu_font_dir=$withval],
1694 [with_dejavu_font_dir='default'])
1696 if test "$with_dejavu_font_dir" != 'default'; then
1697 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1700 dnl ===========================================================================
1703 # Check for FFTW delegate library.
1706 [AC_HELP_STRING([--without-fftw],
1707 [disable FFTW support])],
1708 [with_fftw=$withval],
1711 if test "$with_fftw" != 'yes'; then
1712 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1717 if test "$with_fftw" != 'no'; then
1718 AC_MSG_NOTICE([-------------------------------------------------------------])
1719 AC_MSG_CHECKING([for FFTW])
1723 AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1724 AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1725 AC_MSG_CHECKING([if FFTW package is complete])
1726 if test $passed -gt 0; then
1727 if test $failed -gt 0; then
1728 AC_MSG_NOTICE([no -- some components failed test])
1729 have_fftw='no (failed tests)'
1732 LIBS="$FFTW_LIBS $LIBS"
1733 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1734 AC_MSG_NOTICE([yes])
1741 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1744 dnl ===========================================================================
1747 # Check for FlashPIX delegate library.
1750 [AC_HELP_STRING([--without-fpx],
1751 [disable FlashPIX support])],
1752 [with_fpx=$withval],
1755 if test "$with_fpx" != 'yes'; then
1756 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1761 if test "$with_fpx" != 'no'; then
1762 AC_MSG_NOTICE([-------------------------------------------------------------])
1763 AC_MSG_CHECKING([for FlashPIX])
1768 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1769 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1771 AC_MSG_CHECKING([if FlashPIX package is complete])
1772 if test $passed -gt 0; then
1773 if test $failed -gt 0; then
1774 AC_MSG_NOTICE([no -- some components failed test])
1775 have_fpx='no (failed tests)'
1778 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1779 AC_MSG_NOTICE([yes])
1787 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1790 dnl ===========================================================================
1793 # Check for fontconfig delegate library.
1795 AC_ARG_WITH([fontconfig],
1796 [AC_HELP_STRING([--without-fontconfig],
1797 [disable fontconfig support])],
1798 [with_fontconfig=$withval],
1799 [with_fontconfig=$have_x])
1801 if test "$with_fontconfig" != 'yes'; then
1802 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
1805 have_fontconfig='no'
1806 FONTCONFIG_CFLAGS=""
1809 if test "x$with_fontconfig" = "xyes"; then
1810 AC_MSG_NOTICE([-------------------------------------------------------------])
1811 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
1815 if test "$have_fontconfig" = 'yes'; then
1816 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
1817 if test "$with_modules" = 'no'; then
1818 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1822 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
1823 AC_SUBST(FONTCONFIG_CFLAGS)
1824 AC_SUBST(FONTCONFIG_LIBS)
1826 dnl ===========================================================================
1829 # Check for freetype delegate library.
1831 AC_ARG_WITH([freetype],
1832 [AC_HELP_STRING([--without-freetype],
1833 [disable Freetype support])],
1834 [with_freetype=$withval],
1835 [with_freetype='yes'])
1838 if test "$with_freetype" != 'yes'; then
1839 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
1844 if test "$with_freetype" != 'no'; then
1845 AC_MSG_NOTICE([-------------------------------------------------------------])
1846 AC_MSG_CHECKING(for FreeType 2.0 )
1850 PERSIST_LDFLAGS="$LDFLAGS"
1851 PERSIST_CPPFLAGS="$CPPFLAGS"
1853 # Allow the user to specify the location of freetype.
1854 if test "$with_freetype" != 'yes'; then
1855 if test -x "${with_freetype}/bin/freetype-config"; then
1856 freetype_config="${with_freetype}/bin/freetype-config"
1857 elif test -x "${with_freetype}"; then
1858 freetype_config=${with_freetype}
1861 if test -z "$freetype_config"; then
1862 AC_PATH_PROG(freetype_config,freetype-config,)dnl
1864 if test -n "$freetype_config"; then
1865 freetype_prefix=`${freetype_config} --prefix`
1866 freetype_exec_prefix=`${freetype_config} --exec-prefix`
1867 LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
1868 CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
1871 dnl First see if there is a library
1872 if test "$FREETYPE_LIBS" = ''; then
1873 AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,)
1874 if test "$FREETYPE_LIBS" != ''; then
1875 passed=`expr $passed + 1`
1877 failed=`expr $failed + 1`
1878 LDFLAGS="$PERSIST_LDFLAGS"
1882 dnl Now test for the headers
1883 AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include <ft2build.h>'],[ft2build=''],[])
1884 AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H])
1885 if test "$have_freetype_h" = 'yes'; then
1886 passed=`expr $passed + 1`
1888 failed=`expr $failed + 1`
1889 CPPFLAGS="$PERSIST_CPPFLAGS"
1892 AC_MSG_CHECKING(if FreeType package is complete)
1893 if test $passed -gt 0; then
1894 if test $failed -gt 0; then
1896 AC_MSG_NOTICE(no -- some components failed test)
1897 have_freetype='no (failed tests)'
1899 LIBS="$FREETYPE_LIBS $LIBS"
1900 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library)
1901 if test "$ac_cv_header_ft2build_h" = 'yes'; then
1902 AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the <ft2build.h> header file.])
1911 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
1912 AC_SUBST(FREETYPE_LIBS)
1914 dnl ===========================================================================
1917 # Check for Ghostscript library or framework.
1919 # Test for iapi.h & test for gsapi_new_instance in -lgs
1920 # or -framework Ghostscript
1922 AC_ARG_WITH([gslib],
1923 [AC_HELP_STRING([--without-gslib],
1924 [enable Ghostscript library support])],
1925 [with_gslib=$withval],
1928 gslib_framework='no'
1929 if test "$with_gslib" != 'yes'; then
1930 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
1935 if test "$with_gslib" != 'no'; then
1936 AC_MSG_NOTICE([-------------------------------------------------------------])
1937 AC_MSG_CHECKING([for Ghostscript])
1942 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
1943 failed=`expr $failed + 1`,)
1944 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
1945 failed=`expr $failed + 1`,)
1946 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
1947 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
1948 AC_MSG_CHECKING([if Ghostscript package is complete])
1949 if test $passed -gt 0; then
1950 if test $failed -gt 0; then
1951 AC_MSG_NOTICE([no -- some components failed test])
1952 have_gslib='no (failed tests)'
1954 if test $framework -gt 0; then
1955 GS_LIBS='-framework Ghostscript'
1956 gslib_framework='yes'
1957 AC_MSG_NOTICE([yes, using framework.])
1959 AC_MSG_NOTICE([yes, using library.])
1962 LIBS="$GS_LIBS $LIBS"
1963 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
1970 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
1973 # Set default font search path
1974 AC_ARG_WITH([fontpath],
1975 [AC_HELP_STRING([--with-fontpath=DIR],
1976 [prepend to default font search path])],
1977 [with_fontpath=$withval],
1980 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
1983 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",Define to prepend to default font search path.)
1985 if test "$with_fontpath=" != ''; then
1986 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
1989 # Set Ghostscript font directory
1990 AC_ARG_WITH([gs-font-dir],
1991 [AC_HELP_STRING([--with-gs-font-dir=DIR],
1992 [Ghostscript font directory])],
1993 [with_gs_font_dir=$withval],
1994 [with_gs_font_dir='default'])
1996 if test "$with_gs_font_dir" != 'default'; then
1997 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2000 dnl ===========================================================================
2003 # Check for GVC delegate library.
2006 [AC_HELP_STRING([--without-gvc],
2007 [disable GVC support])],
2008 [with_gvc=$withval],
2011 if test "$with_gvc" != 'yes'; then
2012 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2016 if test "x$with_gvc" = "xyes"; then
2017 AC_MSG_NOTICE([-------------------------------------------------------------])
2018 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2022 if test "$have_gvc" = 'yes'; then
2023 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2024 if test "$with_modules" = 'no'; then
2025 CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
2029 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2030 AC_SUBST(GVC_CFLAGS)
2033 dnl ===========================================================================
2036 # Check for JBIG delegate library.
2040 [AC_HELP_STRING([--without-jbig],
2041 [disable JBIG support])],
2042 [with_jbig=$withval],
2047 if test "$with_jbig" != 'no'; then
2048 AC_MSG_NOTICE([-------------------------------------------------------------])
2049 AC_MSG_CHECKING([for JBIG])
2053 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2054 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2055 AC_MSG_CHECKING([if JBIG package is complete])
2056 if test $passed -gt 0; then
2057 if test $failed -gt 0; then
2058 AC_MSG_NOTICE([no -- some components failed test])
2059 have_jbig='no (failed tests)'
2062 LIBS="$JBIG_LIBS $LIBS"
2063 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2064 AC_MSG_NOTICE([yes])
2071 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2074 dnl ===========================================================================
2077 # Check for JPEG delegate library.
2080 [AC_HELP_STRING([--without-jpeg],
2081 [disable JPEG support])],
2082 [with_jpeg=$withval],
2085 if test "$with_jpeg" != 'yes'; then
2086 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2091 if test "$with_jpeg" != 'no'; then
2092 AC_MSG_NOTICE([-------------------------------------------------------------])
2093 AC_MSG_CHECKING([for JPEG])
2097 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2098 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2099 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2100 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2101 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2103 # Test for compatible JPEG library
2104 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2105 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2109 #include <jpeglib.h>
2111 changequote(<<, >>)dnl
2113 #if JPEG_LIB_VERSION < 62
2114 #error IJG JPEG library must be version 6b or newer!
2118 changequote([, ])dnl
2119 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2120 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2122 AC_MSG_CHECKING([if JPEG package is complete])
2123 if test $passed -gt 0; then
2124 if test $failed -gt 0; then
2125 AC_MSG_NOTICE([no -- some components failed test])
2126 have_jpeg='no (failed tests)'
2129 LIBS="$JPEG_LIBS $LIBS"
2130 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2131 AC_MSG_NOTICE([yes])
2138 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2141 dnl ===========================================================================
2144 # Check for JPEG Version 2 delegate library.
2147 [AC_HELP_STRING([--without-jp2],
2148 [disable JPEG-2000 support])],
2149 [with_jp2=$withval],
2152 if test "$with_jp2" != 'yes'; then
2153 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 "
2158 if test "$with_jp2" != 'no'; then
2159 AC_MSG_NOTICE([-------------------------------------------------------------])
2160 AC_MSG_CHECKING([for JPEG Version 2])
2164 AC_CHECK_HEADER(jasper/jasper.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2165 AC_CHECK_LIB(jasper,jas_stream_fopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2166 AC_MSG_CHECKING([if JPEG version 2 support package is complete])
2167 if test $passed -gt 0; then
2168 if test $failed -gt 0; then
2169 AC_MSG_NOTICE([no -- some components failed test])
2170 have_jp2='no (failed tests)'
2173 LIBS="$JP2_LIBS $LIBS"
2174 AC_DEFINE(JP2_DELEGATE,1,Define if you have JPEG version 2 "Jasper" library)
2175 AC_MSG_NOTICE([yes])
2182 AM_CONDITIONAL(JP2_DELEGATE, test "$have_jp2" = 'yes')
2185 dnl ===========================================================================
2188 # Check for LCMS delegate library.
2192 [ --without-lcms disable lcms (v1.1X) support],
2193 [with_lcms=$withval],
2195 if test "$with_lcms" != 'yes' ; then
2196 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2201 [ --without-lcms2 disable lcms (v2.X) support],
2202 [with_lcms2=$withval],
2204 if test "$with_lcms2" != 'yes' ; then
2205 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
2210 if test "$with_lcms2" != 'no'; then
2211 AC_MSG_NOTICE([-------------------------------------------------------------])
2212 AC_MSG_CHECKING([for LCMS v2])
2216 have_lcms_header='no'
2218 # Check for <lcms2.h>
2219 AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
2220 if test "$have_lcms_header" = 'yes'; then
2221 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2222 passed=`expr $passed + 1`
2225 # Check for <lcms2/lcms2.h)
2226 if test "$have_lcms_header" != 'yes'; then
2227 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2228 if test "$have_lcms_header" = 'yes'; then
2229 passed=`expr $passed + 1`
2230 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2234 # Failed to find lcms header?
2235 if test "$have_lcms_header" != 'yes'; then
2236 failed=`expr $failed + 1`
2239 AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2240 AC_MSG_CHECKING(if LCMS v2 package is complete)
2241 if test $passed -gt 0; then
2242 if test $failed -gt 0; then
2243 AC_MSG_NOTICE(no -- some components failed test)
2244 have_lcms2='no (failed tests)'
2247 LIBS="$LCMS_LIBS $LIBS"
2257 # Check for LCMS v1 (1.11 or later)
2259 if test $have_lcms2 = 'yes'; then
2264 if test "$with_lcms" != 'no'; then
2265 AC_MSG_NOTICE([-------------------------------------------------------------])
2266 AC_MSG_CHECKING([for LCMS v1.1X])
2270 have_lcms_header='no'
2272 # Check for <lcms.h>
2273 if test "$have_lcms_header" != 'yes'; then
2274 AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
2275 if test "$have_lcms_header" = 'yes'; then
2276 passed=`expr $passed + 1`
2277 AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
2281 # Check for <lcms/lcms.h>
2282 if test "$have_lcms_header" != 'yes'; then
2283 AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
2284 if test "$have_lcms_header" = 'yes'; then
2285 passed=`expr $passed + 1`
2286 AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
2290 # Failed to find lcms header?
2291 if test "$have_lcms_header" != 'yes'; then
2292 failed=`expr $failed + 1`
2295 AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2296 AC_MSG_CHECKING(if LCMS package is complete)
2297 if test $passed -gt 0; then
2298 if test $failed -gt 0; then
2299 AC_MSG_NOTICE(no -- some components failed test)
2300 have_lcms='no (failed tests)'
2303 LIBS="$LCMS_LIBS $LIBS"
2312 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
2313 if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
2314 AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
2319 dnl ===========================================================================
2322 # Check for the LQR (Liquid Rescale) delegate library.
2325 [AC_HELP_STRING([--without-lqr],
2326 [disable Liquid Rescale support])],
2327 [with_lqr=$withval],
2330 if test "$with_lqr" != 'yes'; then
2331 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2338 if test "x$with_lqr" = "xyes"; then
2339 AC_MSG_NOTICE([-------------------------------------------------------------])
2340 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2344 if test "$have_lqr" = 'yes'; then
2345 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2346 CFLAGS="$LQR_CFLAGS $CFLAGS"
2349 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2350 AC_SUBST(LQR_CFLAGS)
2353 dnl ===========================================================================
2355 # Disable LZMA (lzma library)
2357 [ --without-lzma disable LZMA support],
2358 [with_lzma=$withval],
2360 if test "$with_lzma" != 'yes' ; then
2361 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2369 if test "$with_lzma" != 'no' || test "$with_tiff" != 'no'; then
2370 AC_MSG_NOTICE([-------------------------------------------------------------])
2371 AC_MSG_CHECKING(for LZMA)
2375 AC_CHECK_HEADER(lzma.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2376 AC_CHECK_LIB(lzma,lzma_code,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2377 AC_MSG_CHECKING(if LZMA package is complete)
2378 if test $passed -gt 0; then
2379 if test $failed -gt 0; then
2380 AC_MSG_NOTICE(no -- some components failed test)
2381 have_lzma='no (failed tests)'
2384 LIBS="$LZMA_LIBS $LIBS"
2385 AC_DEFINE(LZMA_DELEGATE,1,Define if you have lzma compression library)
2393 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2396 dnl ===========================================================================
2399 # Check for the OpenEXR delegate library.
2401 AC_ARG_WITH([openexr],
2402 [AC_HELP_STRING([--without-openexr],
2403 [disable OpenEXR support])],
2404 [with_openexr=$withval],
2405 [with_openexr='yes'])
2407 if test "$with_openexr" != 'yes'; then
2408 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2415 if test "x$with_openexr" = "xyes"; then
2416 AC_MSG_NOTICE([-------------------------------------------------------------])
2417 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2421 if test "$have_openexr" = 'yes'; then
2422 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2423 if test "$with_modules" = 'no'; then
2424 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2428 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2429 AC_SUBST(OPENEXR_CFLAGS)
2430 AC_SUBST(OPENEXR_LIBS)
2432 dnl ===========================================================================
2435 # Check for PANGO delegate library.
2437 AC_ARG_WITH([pango],
2438 [AC_HELP_STRING([--without-pango],
2439 [disable PANGO support])],
2440 [with_pango=$withval],
2441 [with_pango=$have_x])
2443 if test "$with_pango" != 'yes'; then
2444 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2452 if test "x$with_pango" = "xyes"; then
2453 AC_MSG_RESULT([-------------------------------------------------------------])
2454 PKG_CHECK_MODULES(PANGO, pangoft2, have_pangoft2=yes, have_pangoft2=no)
2456 PKG_CHECK_MODULES(PANGO, pango, have_pango=yes, have_pango=no)
2460 if test "$have_pango" = 'yes'; then
2461 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2462 if test "$with_modules" = 'no'; then
2463 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
2467 if test "$have_pangoft2" = 'yes'; then
2468 AC_DEFINE(PANGOFT2_DELEGATE,1,Define if you have PANGOFT2 library)
2469 if test "$with_modules" = 'no'; then
2470 CPPFLAGS="$PANGOFT2_CFLAGS $CPPFLAGS"
2474 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2475 AM_CONDITIONAL(PANGOFT2_DELEGATE, test "$have_pangoft2" = 'yes')
2476 AC_SUBST(PANGO_CFLAGS)
2477 AC_SUBST(PANGO_LIBS)
2479 dnl ===========================================================================
2482 # Check for PNG delegate library.
2485 [AC_HELP_STRING([--without-png],
2486 [disable PNG support])],
2487 [with_png=$withval],
2490 if test "$with_png" != 'yes'; then
2491 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2497 if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
2498 AC_MSG_NOTICE([-------------------------------------------------------------])
2499 AC_MSG_CHECKING(for PNG support )
2503 AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
2504 failed=`expr $failed + 1`,)
2506 if test $passed -gt 0; then
2507 for var in 5 4 2 '' ; do
2508 if test "$have_png" = 'no' ; then
2509 if test "x${var}" = 'x' ; then
2515 # Test for compatible LIBPNG library
2518 if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
2519 if test "${pnglib}" != 'png' ; then
2520 AC_MSG_CHECKING(for LIBPNG1${var} support )
2526 changequote(<<, >>)dnl
2528 #if PNG_LIBPNG_VER_MINOR != ${var}
2529 #error LIBPNG library must be version 1${var}!
2534 changequote([, ])dnl
2535 ac_cv_libpng_ok='yes',
2536 ac_cv_libpng_ok='no')
2537 if test "$ac_cv_libpng_ok" = 'yes' ; then
2538 passed=`expr $passed + 1`
2541 failed=`expr $failed + 1`
2545 passed=`expr $passed + 1`
2550 if test $passed -gt 0 -a $failed -le 0; then
2551 if test "1${var}" = '15' ; then
2552 AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
2553 failed=`expr $failed + 1`,)
2554 AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
2555 failed=`expr $failed + 1`,)
2557 if test "1${var}" = '14' ; then
2558 AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
2559 failed=`expr $failed + 1`,)
2560 AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
2561 failed=`expr $failed + 1`,)
2563 if test "1${var}" = '12' ; then
2564 AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
2565 failed=`expr $failed + 1`,)
2567 if test "1${var}" = '1' ; then
2568 AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
2569 failed=`expr $failed + 1`,)
2571 if test $passed -gt 0 -a $failed -le 0 ; then
2572 AC_MSG_CHECKING(if ${pnglib} package is complete)
2573 if test $passed -gt 0 ; then
2574 if test $failed -gt 0 ; then
2575 AC_MSG_NOTICE(no -- some components failed test)
2576 have_png='no (failed tests)'
2578 PNG_LIBS="-l${pnglib}"
2579 LIBS="$PNG_LIBS $LIBS"
2580 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2592 AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
2596 dnl ===========================================================================
2599 # Check for RSVG delegate library.
2602 [AC_HELP_STRING([--without-rsvg],
2603 [disable RSVG support])],
2604 [with_rsvg=$withval],
2605 [with_rsvg=$have_x])
2607 if test "$with_rsvg" != 'yes'; then
2608 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2616 if test "x$with_rsvg" = "xyes"; then
2617 AC_MSG_NOTICE([-------------------------------------------------------------])
2618 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2620 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2624 if test "$have_rsvg" = 'yes'; then
2625 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2626 if test "$with_modules" = 'no'; then
2627 CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
2631 if test "$have_cairo" = 'yes'; then
2632 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2633 if test "$with_modules" = 'no'; then
2634 CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
2638 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2639 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2640 AC_SUBST(RSVG_CFLAGS)
2643 dnl ===========================================================================
2646 # Check for TIFF delegate library.
2649 [AC_HELP_STRING([--without-tiff],
2650 [disable TIFF support])],
2651 [with_tiff=$withval],
2654 if test "$with_tiff" != 'yes'; then
2655 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2660 if test "$with_tiff" != 'no'; then
2661 AC_MSG_NOTICE([-------------------------------------------------------------])
2662 AC_MSG_CHECKING([for TIFF])
2666 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2667 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2668 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2669 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2670 AC_CHECK_LIB(tiff,TIFFIsBigEndian,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2671 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2672 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2673 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2674 AC_MSG_CHECKING([if TIFF package is complete])
2675 if test $passed -gt 0; then
2676 if test $failed -gt 0; then
2677 AC_MSG_NOTICE([no -- some components failed test])
2678 have_tiff='no (failed tests)'
2681 LIBS="$TIFF_LIBS $LIBS"
2682 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2683 AC_MSG_NOTICE([yes])
2685 AC_CHECK_HEADERS(tiffconf.h)
2686 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2687 TIFFReadEXIFDirectory TIFFSetErrorHandlerExt TIFFSetTagExtender \
2688 TIFFSetWarningHandlerExt TIFFSwabArrayOfTriples])
2694 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2697 dnl ===========================================================================
2700 # Check for WEBP delegate library.
2703 [AC_HELP_STRING([--without-webp],
2704 [disable WEBP support])],
2705 [with_webp=$withval],
2708 if test "$with_webp" != 'yes'; then
2709 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2714 if test "$with_webp" != 'no'; then
2715 AC_MSG_NOTICE([-------------------------------------------------------------])
2716 AC_MSG_CHECKING([for WEBP])
2720 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2721 AC_CHECK_LIB(webp,WebPDecodeRGB,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2722 AC_MSG_CHECKING([if WEBP package is complete])
2723 if test $passed -gt 0; then
2724 if test $failed -gt 0; then
2725 AC_MSG_NOTICE([no -- some components failed test])
2726 have_webp='no (failed tests)'
2729 LIBS="$WEBP_LIBS $LIBS"
2730 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2731 AC_MSG_NOTICE([yes])
2738 AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2741 dnl ===========================================================================
2744 # Set Windows font directory.
2746 AC_ARG_WITH([windows-font-dir],
2747 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2748 [directory containing MS-Windows fonts])],
2749 [with_windows_font_dir=$withval],
2750 [with_windows_font_dir=''])
2751 if test "$with_windows_font_dir" != '' ; then
2752 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2755 dnl ===========================================================================
2758 # Check for WMF delegate library.
2761 [AC_HELP_STRING([--without-wmf],
2762 [disable WMF support])],
2763 [with_wmf=$withval],
2766 if test "$with_wmf" != 'yes'; then
2767 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2772 if test "$with_wmf" != 'no'; then
2773 AC_MSG_NOTICE([-------------------------------------------------------------])
2774 AC_MSG_CHECKING([for WMF])
2778 AC_CHECK_HEADER(libwmf/eps.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2779 AC_CHECK_LIB(wmf,wmf_eps_function,passed=`expr $passed + 1`,failed=`expr $failed + 1`,"-lwmflite")
2780 AC_MSG_CHECKING([if WMF package is complete])
2781 if test $passed -gt 0; then
2782 if test $failed -gt 0; then
2783 AC_MSG_NOTICE([no -- some components failed test])
2784 have_wmf='no (failed tests)'
2786 WMF_LIBS='-lwmf -lwmflite'
2787 LIBS="$WMF_LIBS $LIBS"
2788 AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
2789 AC_MSG_NOTICE([yes])
2796 AM_CONDITIONAL(WMF_DELEGATE,test "$have_wmf" = 'yes')
2799 dnl ===========================================================================
2802 dnl ===========================================================================
2805 # Check for XML delegate library.
2808 [AC_HELP_STRING([--without-xml],
2809 [disable XML support])],
2810 [with_xml=$withval],
2813 if test "$with_xml" != 'yes' ; then
2814 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2819 if test "$with_xml" != 'no'; then
2820 AC_MSG_NOTICE([-------------------------------------------------------------])
2821 AC_MSG_CHECKING([for XML])
2823 PERSIST_LDFLAGS=$LDFLAGS
2824 PERSIST_CPPFLAGS=$CPPFLAGS
2826 AC_PATH_PROG(xml2_config,xml2-config,)dnl
2827 if test -n "$xml2_config"; then
2828 # Debian installs libxml headers under /usr/include/libxml2/libxml with
2829 # the shared library installed under /usr/lib, whereas the package
2830 # installs itself under $prefix/libxml and $prefix/lib.
2831 xml2_prefix=`xml2-config --prefix`
2832 if test -d "${xml2_prefix}/include/libxml2"; then
2833 CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
2835 if test "${xml2_prefix}" != '/usr'; then
2836 LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
2841 AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2842 AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2843 AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2844 AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2845 AC_MSG_CHECKING([if XML package is complete])
2846 if test $passed -gt 0; then
2847 if test $failed -gt 0; then
2848 AC_MSG_NOTICE([no -- some components failed test])
2849 have_xml='no (failed tests)'
2850 LDFLAGS="$PERSIST_LDFLAGS"
2851 CPPFLAGS="$PERSIST_CPPFLAGS"
2854 LIBS="$XML_LIBS $LIBS"
2855 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2856 AC_MSG_NOTICE([yes])
2863 AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
2866 dnl ===========================================================================
2868 # Substitute compiler name to build/link PerlMagick
2870 AC_SUBST(PERLMAINCC)
2873 # Configure install Paths
2876 # Path to ImageMagick header files
2877 INCLUDE_RELATIVE_PATH="ImageMagick"
2878 INCLUDE_PATH="${INCLUDEDIR_ARCH}/${INCLUDE_RELATIVE_PATH}"
2879 DEFINE_INCLUDE_PATH="${INCLUDEDIR_ARCH}/${INCLUDE_RELATIVE_PATH}/"
2880 case "${build_os}" in
2882 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2885 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",Directory where ImageMagick headers live.)
2886 AC_SUBST(INCLUDE_PATH)
2888 # Subdirectory under lib to place ImageMagick lib files
2889 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2890 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",Subdirectory of lib where ImageMagick architecture dependent files are installed)
2892 # Path to ImageMagick bin directory
2893 EXECUTABLE_PATH="${BIN_DIR}"
2894 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2895 case "${build_os}" in
2897 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2900 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",Directory where executables are installed.)
2901 AC_SUBST(EXECUTABLE_PATH)
2903 # Path to ImageMagick lib
2904 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2905 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2906 case "${build_os}" in
2908 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2911 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",Directory where architecture-dependent files live.)
2912 AC_SUBST(LIBRARY_PATH)
2915 # Subdirectory under lib to place ImageMagick coder module files
2916 CODER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/coders"
2917 AC_DEFINE_UNQUOTED(CODER_RELATIVE_PATH,"$CODER_RELATIVE_PATH",Subdirectory of lib where coder modules are installed)
2918 CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}"
2919 DEFINE_CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}/"
2920 case "${build_os}" in
2922 DEFINE_CODER_PATH=`$WinPathScript "$DEFINE_CODER_PATH" 1`
2925 AC_DEFINE_UNQUOTED(CODER_PATH,"$DEFINE_CODER_PATH",Location of coder modules)
2926 AC_SUBST(CODER_PATH)
2929 # Subdirectory under lib to place ImageMagick filter module files
2930 FILTER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/filters"
2931 AC_DEFINE_UNQUOTED(FILTER_RELATIVE_PATH,"$FILTER_RELATIVE_PATH",Subdirectory of lib where filter modules are installed)
2932 FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}"
2933 DEFINE_FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}/"
2934 case "${build_os}" in
2936 DEFINE_FILTER_PATH=`$WinPathScript "$DEFINE_FILTER_PATH" 1`
2939 AC_DEFINE_UNQUOTED(FILTER_PATH,"$DEFINE_FILTER_PATH",Location of filter modules)
2940 AC_SUBST(FILTER_PATH)
2943 # Path to ImageMagick documentation files
2944 DOCUMENTATION_RELATIVE_PATH=""
2945 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
2946 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
2947 case "${build_os}" in
2949 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
2952 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",Directory where ImageMagick documents live.)
2953 AC_SUBST(DOCUMENTATION_PATH)
2955 # Subdirectory to place architecture-dependent configuration files
2956 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
2957 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",Subdirectory of lib where architecture-dependent configuration files live.)
2958 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2959 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2960 case "${build_os}" in
2962 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
2965 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",Directory where architecture-dependent configuration files live.)
2966 AC_SUBST(CONFIGURE_PATH)
2968 # Subdirectory to place architecture-independent configuration files
2969 SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
2970 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
2971 SHARE_PATH="${SHAREDIR_ARCH}/${SHARE_RELATIVE_PATH}"
2972 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
2973 case "${build_os}" in
2975 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
2978 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",Directory where architecture-independent configuration files live.)
2979 AC_SUBST(SHARE_PATH)
2982 # program_transform_name is formed for use in a Makefile, so create a
2983 # modified version for use in a shell script.
2984 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
2986 # Default delegate definitions
2987 AC_MSG_NOTICE([-------------------------------------------------------------])
2988 AC_MSG_CHECKING([for ImageMagick delegate programs])
2990 AutotraceDecodeDelegateDefault='autotrace'
2991 BlenderDecodeDelegateDefault='blender'
2992 BZIPDelegateDefault='bzip2'
2993 BrowseDelegateDefault='xdg-open'
2994 CGMDecodeDelegateDefault='ralcgm'
2995 CatDelegateDefault='cat'
2996 DNGDecodeDelegateDefault='ufraw-batch'
2997 GVCDecodeDelegateDefault='dot'
2998 DVIDecodeDelegateDefault='dvips'
2999 EchoDelegateDefault='echo'
3000 EditorDelegateDefault='xterm'
3001 FIGDecodeDelegateDefault='fig2dev'
3002 ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
3003 DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
3004 MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
3005 GnuplotDecodeDelegateDefault='gnuplot'
3006 HPGLDecodeDelegateDefault='hp2xx'
3007 HTMLDecodeDelegateDefault='html2ps'
3008 ILBMDecodeDelegateDefault='ilbmtoppm'
3009 ILBMEncodeDelegateDefault='ppmtoilbm'
3010 LPDelegateDefault='lp'
3011 LPRDelegateDefault='lpr'
3012 LZWDecodeDelegateDefault='uncompress'
3013 LZWEncodeDelegateDefault='compress'
3014 LaunchDelegateDefault='gimp'
3015 MANDelegateDefault='groff'
3016 MPEGDecodeDelegateDefault='ffmpeg'
3017 MPEGEncodeDelegateDefault='ffmpeg'
3018 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3019 MVDelegateDefault='mv'
3020 PCLDelegateDefault='pcl6'
3021 PGPDecodeDelegateDefault='pgpv'
3022 POVDelegateDefault='povray'
3023 if test "$native_win32_build" = 'yes'; then
3024 PSDelegateDefault='gswin32c'
3025 elif test "$gslib_framework" = 'yes'; then
3026 PSDelegateDefault='gsc'
3028 PSDelegateDefault='gs'
3030 RLEEncodeDelegateDefault='rawtorle'
3031 RMDelegateDefault='rm'
3032 RSVGDecodeDelegateDefault='rsvg'
3033 SCANDecodeDelegateDefault='scanimage'
3034 TXTDelegateDefault='enscript'
3035 UniconvertorDelegateDefault='uniconvertor'
3036 WMFDecodeDelegateDefault='wmf2eps'
3037 WWWDecodeDelegateDefault='curl'
3038 XPSDelegateDefault='gxps'
3039 ZipDelegateDefault='gzip'
3041 # Search for delegates
3042 AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
3043 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3044 AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
3045 AC_PATH_PROG(BrowseDelegate, "$BrowseDelegateDefault" mozilla firefox netscape, "$BrowseDelegateDefault")
3046 AC_PATH_PROG(CGMDecodeDelegate, "$CGMDecodeDelegateDefault", "$CGMDecodeDelegateDefault")
3047 AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
3048 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3049 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3050 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3051 AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
3052 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3053 AC_PATH_PROG(FIGDecodeDelegate, "$FIGDecodeDelegateDefault", "$FIGDecodeDelegateDefault")
3054 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3055 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3056 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3057 AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
3058 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3059 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3060 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3061 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3062 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3063 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3064 AC_PATH_PROG(LZWDecodeDelegate, "$LZWDecodeDelegateDefault", "$LZWDecodeDelegateDefault")
3065 AC_PATH_PROG(LZWEncodeDelegate, "$LZWEncodeDelegateDefault", "$LZWEncodeDelegateDefault")
3066 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3067 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
3068 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3069 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3070 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3071 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3072 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3073 AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
3074 AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
3075 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3076 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
3077 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3078 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3079 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
3080 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
3081 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3082 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
3083 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
3084 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3085 AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
3087 # Prefer lpr to lp; lp needs options tacked on.
3088 if test "$LPRDelegate" != no; then
3089 PrintDelegate="$LPRDelegate"
3091 PrintDelegate="$LPDelegate -c -s"
3093 AC_SUBST(PrintDelegate)
3095 # Installed ImageMagick utiltity paths
3096 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3097 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3098 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3100 # Set delegate booleans
3101 have_ffmpeg='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_ffmpeg='yes'; fi
3102 have_fig2dev='no' ; if test "$FIGDecodeDelegate" != "$FIGDecodeDelegateDefault" ; then have_fig2dev='yes'; fi
3103 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3104 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3105 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3106 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3107 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3108 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3109 have_ralcgm='no' ; if test "$CGMDecodeDelegate" != "$CGMDecodeDelegateDefault" ; then have_ralcgm='yes'; fi
3110 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3113 # Test for font directories
3115 type_include_files=''
3118 AC_MSG_CHECKING(for Dejavu fonts directory)
3120 if test "${with_dejavu_font_dir}" != 'default'; then
3121 dejavu_font_dir="${with_dejavu_font_dir}/"
3123 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3124 if test -f "${font_dir}DejaVuSerif.ttf"; then
3125 dejavu_font_dir="${font_dir}"
3130 if test "${dejavu_font_dir}x" != 'x'; then
3131 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3132 AC_MSG_NOTICE([$dejavu_font_dir])
3134 AC_MSG_NOTICE([not found!]);
3136 AC_SUBST(dejavu_font_dir)
3140 if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
3141 windows_font_dir="${with_windows_font_dir}/"
3143 if test "${windows_font_dir}x" != 'x'; then
3144 if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
3145 windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
3147 if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then
3148 windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/'
3150 if test -f '/usr/share/fonts/msttcore/arial.ttf'; then
3151 windows_font_dir='/usr/share/fonts/msttcore/truetype/'
3154 if test "${windows_font_dir}x" != 'x'; then
3155 type_include_files="$type_include_files "'<include file="type-windows.xml" />'
3157 AC_SUBST(windows_font_dir)
3160 AC_MSG_CHECKING(for Ghostscript fonts directory)
3161 ghostscript_font_dir=''
3162 if test "${with_gs_font_dir}" != 'default'; then
3163 ghostscript_font_dir="${with_gs_font_dir}/"
3165 if test "${native_win32_build}" = 'yes'; then
3166 # Native Windows Build
3167 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3168 if test -f "${font_dir}a010013l.pfb"; then
3169 ghostscript_font_dir="$font_dir"
3173 if test "${PSDelegate}" != 'gswin32c'; then
3174 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3177 # Linux / Mac OS X / Unix Build
3178 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
3179 if test -f "${font_dir}a010013l.pfb"; then
3180 ghostscript_font_dir="${font_dir}"
3184 if test "${ghostscript_font_dir}x" = 'x'; then
3185 if test "$PSDelegate" != 'gs'; then
3186 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3191 if test "${ghostscript_font_dir}x" != 'x'; then
3192 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3193 AC_MSG_NOTICE([$ghostscript_font_dir])
3195 AC_MSG_NOTICE([not found!]);
3197 AC_SUBST(ghostscript_font_dir)
3198 case "${build_os}" in
3200 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3204 AC_SUBST(type_include_files)
3207 # Handle case where user doesn't want frozen paths
3209 if test "$with_frozenpaths" != 'yes'; then
3210 # Re-set delegate definitions to default (no paths)
3211 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
3212 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3213 BZIPDelegate="$BZIPDelegateDefault"
3214 BrowseDelegate="$BrowseDelegateDefault"
3215 CGMDecodeDelegate="$CGMDecodeDelegateDefault"
3216 CatDelegate="$CatDelegateDefault"
3217 ConvertDelegate="$ConvertDelegateDefault"
3218 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3219 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3220 EchoDelegate="$EchoDelegateDefault"
3221 EditorDelegate="$EditorDelegateDefault"
3222 FIGDecodeDelegate="$FIGDecodeDelegateDefault"
3223 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3224 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3225 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3226 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3227 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3228 LPDelegate="$LPDelegateDefault"
3229 LZWDecodeDelegate="$LZWDecodeDelegateDefault"
3230 LZWEncodeDelegate="$LZWEncodeDelegateDefault"
3231 LaunchDelegate="$LaunchDelegateDefault"
3232 MANDelegate="$MANDelegateDefault"
3233 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3234 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3235 MogrifyDelegate="$MogrifyDelegateDefault"
3236 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3237 MVDelegate="$MVDelegateDefault"
3238 PCLDelegate="$PCLDelegateDefault"
3239 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3240 POVDelegate="$POVDelegateDefault"
3241 PSDelegate="$PSDelegateDefault"
3242 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3243 RMDelegate="$RMDelegateDefault"
3244 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3245 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3246 ShowImageDelegate="$ShowImageDelegateDefault"
3247 TXTDelegate="$TXTDelegateDefault"
3248 UniconvertorDelegate="$UniconvertorDelegateDefault"
3249 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3250 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3251 XPSDelegate="$XPSDelegateDefault"
3252 ZipDelegate="$ZipDelegateDefault"
3255 # Delegate substitutions
3256 AC_SUBST(AutotraceDecodeDelegate)
3257 AC_SUBST(BlenderDecodeDelegate)
3258 AC_SUBST(BZIPDelegate)
3259 AC_SUBST(BrowseDelegate)
3260 AC_SUBST(CGMDecodeDelegate)
3261 AC_SUBST(CatDelegate)
3262 AC_SUBST(ConvertDelegate)
3263 AC_SUBST(GVCDecodeDelegate)
3264 AC_SUBST(DVIDecodeDelegate)
3265 AC_SUBST(EchoDelegate)
3266 AC_SUBST(EditorDelegate)
3267 AC_SUBST(FIGDecodeDelegate)
3268 AC_SUBST(GnuplotDecodeDelegate)
3269 AC_SUBST(HPGLDecodeDelegate)
3270 AC_SUBST(HTMLDecodeDelegate)
3271 AC_SUBST(ILBMDecodeDelegate)
3272 AC_SUBST(ILBMEncodeDelegate)
3273 AC_SUBST(LPDelegate)
3274 AC_SUBST(LZWDecodeDelegate)
3275 AC_SUBST(LZWEncodeDelegate)
3276 AC_SUBST(LaunchDelegate)
3277 AC_SUBST(MANDelegate)
3278 AC_SUBST(MPEGDecodeDelegate)
3279 AC_SUBST(MPEGEncodeDelegate)
3280 AC_SUBST(MogrifyDelegate)
3281 AC_SUBST(MrSIDDecodeDelegate)
3282 AC_SUBST(MVDelegate)
3283 AC_SUBST(PCLDelegate)
3284 AC_SUBST(PGPDecodeDelegate)
3285 AC_SUBST(POVDelegate)
3286 AC_SUBST(PSDelegate)
3287 AC_SUBST(RLEEncodeDelegate)
3288 AC_SUBST(RMDelegate)
3289 AC_SUBST(SCANDecodeDelegate)
3290 AC_SUBST(ShowImageDelegate)
3291 AC_SUBST(TXTDelegate)
3292 AC_SUBST(UniconvertorDelegate)
3293 AC_SUBST(WMFDecodeDelegate)
3294 AC_SUBST(WWWDecodeDelegate)
3295 AC_SUBST(XPSDelegate)
3296 AC_SUBST(ZipDelegate)
3302 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3303 AC_CHECK_PROGS(PERL,perl)
3304 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3305 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3306 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3307 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3308 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3310 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3313 # 7ZIP support (http://p7zip.sourceforge.net/)
3316 AC_CHECK_PROGS(P7ZIP,[7za])
3318 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3321 # ZIP support (http://www.info-zip.org/Zip.html)
3324 AC_CHECK_PROGS(ZIP,[zip])
3326 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3329 # GhostPCL related configuration.
3331 PCLColorDevice=ppmraw
3332 PCLCMYKDevice=pamcmyk32
3333 PCLMonoDevice=pbmraw
3334 if test -z "$PCLVersion"; then
3335 PCLVersion='unknown'
3337 if test $have_pcl = 'yes'; then
3338 AC_MSG_NOTICE([-------------------------------------------------------------])
3339 AC_MSG_CHECKING([for PCL])
3342 AC_MSG_CHECKING([for pcl color device])
3343 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3346 PCLColorDevice=ppmraw
3348 AC_MSG_NOTICE([$PCLColorDevice])
3351 AC_MSG_CHECKING([for pcl CMYK device])
3352 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3355 PCLCMYKDevice=$PCLColorDevice
3357 AC_MSG_NOTICE([$PCLCMYKDevice])
3360 AC_MSG_CHECKING([for pcl mono device])
3361 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3364 PCLMonoDevice=$PCLColorDevice
3366 AC_MSG_NOTICE([$PCLMonoDevice])
3369 AC_SUBST(PCLMonoDevice)
3370 AC_SUBST(PCLColorDevice)
3371 AC_SUBST(PCLCMYKDevice)
3372 AC_SUBST(PCLVersion)
3375 # GhostXPS related configuration.
3377 XPSColorDevice=ppmraw
3378 XPSCMYKDevice=bmpsep8
3379 XPSMonoDevice=pbmraw
3380 if test -z "$XPSVersion"; then
3381 XPSVersion='unknown'
3383 if test $have_xps = 'yes'; then
3384 AC_MSG_NOTICE([-------------------------------------------------------------])
3385 AC_MSG_CHECKING([for XPS])
3388 AC_MSG_CHECKING([for xps color device])
3389 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3392 XPSColorDevice=ppmraw
3394 AC_MSG_NOTICE([$XPSColorDevice])
3397 AC_MSG_CHECKING([for xps CMYK device])
3398 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3401 XPSCMYKDevice=$XPSColorDevice
3403 AC_MSG_NOTICE([$XPSCMYKDevice])
3406 AC_MSG_CHECKING([for xps mono device])
3407 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3410 XPSMonoDevice=$XPSColorDevice
3412 AC_MSG_NOTICE([$XPSMonoDevice])
3415 AC_SUBST(XPSMonoDevice)
3416 AC_SUBST(XPSColorDevice)
3417 AC_SUBST(XPSCMYKDevice)
3418 AC_SUBST(XPSVersion)
3421 # Ghostscript related configuration.
3423 GSAlphaDevice=pngalpha
3424 GSColorDevice=pnmraw
3427 GSPDFDevice=pdfwrite
3429 GSEPSDevice=epswrite
3431 if test $have_gs = 'yes'; then
3432 AC_MSG_NOTICE([-------------------------------------------------------------])
3433 AC_MSG_CHECKING([for Ghostscript])
3435 AC_MSG_CHECKING([for Ghostscript version])
3436 if GSVersion=`$PSDelegate --version`; then
3439 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3441 AC_MSG_NOTICE([$GSVersion])
3444 AC_MSG_CHECKING([for gs alpha device])
3445 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3448 GSAlphaDevice=pnmraw
3450 AC_MSG_NOTICE([$GSAlphaDevice])
3453 AC_MSG_CHECKING([for gs color device])
3454 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3457 GSColorDevice=pnmraw
3459 AC_MSG_NOTICE([$GSColorDevice])
3462 AC_MSG_CHECKING([for gs CMYK device])
3463 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3466 GSCMYKDevice=bmpsep8
3468 AC_MSG_NOTICE([$GSCMYKDevice])
3471 AC_MSG_CHECKING([for gs mono device])
3472 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3475 GSMonoDevice=$GSColorDevice
3477 AC_MSG_NOTICE([$GSMonoDevice])
3480 AC_MSG_CHECKING([for gs PDF writing device])
3481 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3484 GSPDFDevice=nodevice
3486 AC_MSG_NOTICE([$GSPDFDevice])
3489 AC_MSG_CHECKING([for gs PS writing device])
3490 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3495 AC_MSG_NOTICE([$GSPSDevice])
3498 AC_MSG_CHECKING([for gs EPS writing device])
3499 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3502 GSEPSDevice=nodevice
3504 AC_MSG_NOTICE([$GSEPSDevice])
3507 AC_SUBST(GSAlphaDevice)
3508 AC_SUBST(GSCMYKDevice)
3509 AC_SUBST(GSColorDevice)
3510 AC_SUBST(GSEPSDevice)
3511 AC_SUBST(GSMonoDevice)
3512 AC_SUBST(GSPDFDevice)
3513 AC_SUBST(GSPSDevice)
3517 # PerlMagick-related configuration
3520 # Look for PERL if PerlMagick requested
3521 # If name/path of desired PERL interpreter is specified, look for that one first
3523 if test "$with_perl" != 'no'; then
3524 AC_MSG_NOTICE([-------------------------------------------------------------])
3525 AC_MSG_CHECKING([for Perl])
3527 if test "$with_perl" != 'yes'; then
3528 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3529 PERL=$ac_cv_path_PERL
3531 have_perl="$ac_cv_path_PERL"
3533 AC_PATH_PROGS(PERL,perl perl5,)dnl
3534 if test "$ac_cv_path_PERL"; then
3535 have_perl="$ac_cv_path_PERL"
3540 if test "$with_perl" != 'yes' ; then
3541 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3544 PERL_SUPPORTS_DESTDIR='no'
3546 with_perl_static='no'
3547 with_perl_dynamic='no'
3548 if test "$have_perl" != 'no'; then
3549 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3550 with_perl_static='yes'
3552 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3553 with_perl_dynamic='yes'
3555 # Is PERL's MakeMaker new enough to support DESTDIR?
3556 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3558 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3559 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3560 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3561 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3563 # Determine path to pick up MagickCore library from for use with building PerlMagick
3564 MAGICKCORE_PATH="${LIB_DIR}"
3565 if test $with_perl_static = 'yes'; then
3566 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3567 libtool_objdir=$objdir
3569 # Linker search path to library, followed by -lMagickCore
3570 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3572 AC_SUBST(MAGICKCORE_PATH)
3574 # Create a simple string containing format names for all delegate libraries
3576 if test "$have_autotrace" = 'yes'; then DELEGATES="$DELEGATES autotrace"; fi
3577 if test "$have_bzlib" = 'yes'; then DELEGATES="$DELEGATES bzlib"; fi
3578 if test "$have_djvu" = 'yes'; then DELEGATES="$DELEGATES djvu"; fi
3579 if test "$have_dps" = 'yes'; then DELEGATES="$DELEGATES dps"; fi
3580 if test "$have_fftw" = 'yes'; then DELEGATES="$DELEGATES fftw"; fi
3581 if test "$have_fpx" = 'yes'; then DELEGATES="$DELEGATES fpx"; fi
3582 if test "$have_fontconfig" = 'yes'; then DELEGATES="$DELEGATES fontconfig"; fi
3583 if test "$have_freetype" = 'yes'; then DELEGATES="$DELEGATES freetype"; fi
3584 if test "$have_gslib" = 'yes'; then DELEGATES="$DELEGATES gs"; fi
3585 if test "$have_gvc" = 'yes'; then DELEGATES="$DELEGATES gvc"; fi
3586 if test "$have_jbig" = 'yes'; then DELEGATES="$DELEGATES jbig"; fi
3587 if test "$have_jpeg" = 'yes'; then
3588 DELEGATES="$DELEGATES jpeg";
3589 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi
3591 if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi
3592 if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi
3593 if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi
3594 if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi
3595 if test "$have_lzma" = 'yes'; then DELEGATES="$DELEGATES lzma"; fi
3596 if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi
3597 if test "$have_openexr" = 'yes'; then DELEGATES="$DELEGATES openexr"; fi
3598 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES png"; fi
3599 if test "$have_rsvg" = 'yes'; then DELEGATES="$DELEGATES rsvg"; fi
3600 if test "$have_tiff" = 'yes'; then DELEGATES="$DELEGATES tiff"; fi
3601 if test "$have_x" = 'yes'; then DELEGATES="$DELEGATES x11"; fi
3602 if test "$have_xml" = 'yes'; then DELEGATES="$DELEGATES xml"; fi
3603 if test "$have_wmf" = 'yes'; then DELEGATES="$DELEGATES wmf"; fi
3604 if test "$have_zlib" = 'yes'; then DELEGATES="$DELEGATES zlib"; fi
3609 # Handle special compiler flags
3612 # Add '-p' if prof source profiling support enabled
3613 if test "$enable_prof" = 'yes'; then
3615 CXXFLAGS="-p $CXXFLAGS"
3616 LDFLAGS="-p $LDFLAGS"
3619 # Add '-pg' if gprof source profiling support enabled
3620 if test "$enable_gprof" = 'yes'; then
3621 CFLAGS="-pg $CFLAGS"
3622 CXXFLAGS="-pg $CXXFLAGS"
3623 LDFLAGS="-pg $LDFLAGS"
3626 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3627 # This is a gcc-specific feature
3628 if test "$enable_gcov" = 'yes'; then
3629 AC_CHECK_LIB(gcov,_gcov_init)
3630 AC_CHECK_LIB(gcov,__gcov_init)
3631 case "$target_os" in
3633 OSX_GCOV_LDFLAG="-Wl,-single_module"
3639 AC_SUBST(OSX_GCOV_LDFLAG)
3640 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3641 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3642 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3646 # Build library dependency list for libMagickCore
3649 MAGICK_LIBLTDL='' # Libltdl for build
3650 MAGICK_API_LIBLTDL='' # libltdl for dependent application (API) build
3651 MAGICK_LTDLDEPS='' # extra libltdl dependencies
3652 if test "$with_ltdl" != 'no'
3654 if test \( "$with_included_ltdl" = 'no' -o "$enable_ltdl_convenience" = 'no' \) -o "$enable_ltdl_install" = 'yes'; then
3655 MAGICK_API_LIBLTDL='-lltdl'
3657 MAGICK_LIBLTDL=${LIBLTDL}
3658 MAGICK_LTDLDEPS=${LTDLDEPS}
3660 AC_SUBST(MAGICK_LIBLTDL)
3661 AC_SUBST(MAGICK_LTDLDEPS)
3663 if test "$with_modules" != 'no'; then
3664 MAGICK_DEP_LIBS="$LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
3666 MAGICK_DEP_LIBS="$JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JP2_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
3668 AC_SUBST(MAGICK_DEP_LIBS)
3671 # Remove extraneous spaces from output variables (asthetic)
3673 X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'`
3674 X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'`
3675 X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'`
3676 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'`
3678 CC=`echo $CC | sed -e 's/ */ /g'`
3679 CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'`
3680 CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'`
3681 CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'`
3682 DELEGATES=`echo $DELEGATES | sed -e 's/^ //g'`
3683 DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'`
3684 LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'`
3685 TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3686 MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
3687 #LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3689 # Pass only user-provided LIBS as "global" libraries
3695 #AC_SUBST(X_PRE_LIBS)
3697 #AC_SUBST(X_EXTRA_LIBS)
3699 MAGICK_CFLAGS=$CFLAGS
3700 MAGICK_CXXFLAGS="$CXXFLAGS"
3701 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3702 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3703 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3704 MAGICK_LIBS="-lMagickCore $MAGICK_DEP_LIBS $MAGICK_API_LIBLTDL"
3706 AC_SUBST(MAGICK_CFLAGS)
3707 AC_SUBST(MAGICK_CXXFLAGS)
3708 AC_SUBST(MAGICK_CPPFLAGS)
3709 AC_SUBST(MAGICK_PCFLAGS)
3710 AC_SUBST(MAGICK_LDFLAGS)
3711 AC_SUBST(MAGICK_LIBS)
3712 AC_SUBST(MAGICK_FEATURES)
3714 # Set configured scripts to executable.
3715 AC_CONFIG_COMMANDS([default],[],[])
3716 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3717 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3718 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3719 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3721 AC_MSG_NOTICE([-------------------------------------------------------------])
3722 AC_MSG_NOTICE([Update ImageMagick configuration])
3725 rm -f magick-version
3727 result_dejavu_font_dir='none'
3728 if test "${dejavu_font_dir}x" != 'x'; then
3729 result_dejavu_font_dir=$dejavu_font_dir
3732 result_ghostscript_font_dir='none'
3733 if test "${ghostscript_font_dir}x" != 'x'; then
3734 result_ghostscript_font_dir=$ghostscript_font_dir
3737 result_windows_font_dir='none'
3738 if test "${windows_font_dir}x" != 'x'; then
3739 result_windows_font_dir=${windows_font_dir}
3743 ImageMagick is configured as follows. Please verify that this configuration
3744 matches your expectations.
3746 Host system type: $host
3747 Build system type: $build
3750 -------------------------------------------------------------------------------
3751 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3752 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3753 Module support --with-modules=$with_modules $with_modules
3754 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3755 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3756 High Dynamic Range Imagery
3757 --enable-hdri=$enable_hdri $enable_hdri
3759 Delegate Configuration:
3760 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3761 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3762 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3763 DJVU --with-djvu=$with_djvu $have_djvu
3764 DPS --with-dps=$with_dps $have_dps
3765 FFTW --with-fftw=$with_fftw $have_fftw
3766 FlashPIX --with-fpx=$with_fpx $have_fpx
3767 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3768 FreeType --with-freetype=$with_freetype $have_freetype
3769 GhostPCL None $PCLDelegate ($PCLVersion)
3770 GhostXPS None $XPSDelegate ($XPSVersion)
3771 Ghostscript None $PSDelegate ($GSVersion)
3772 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3773 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3774 Graphviz --with-gvc=$with_gvc $have_gvc
3775 JBIG --with-jbig=$with_jbig $have_jbig
3776 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
3777 JPEG-2000 --with-jp2=$with_jp2 $have_jp2
3778 LCMS v1 --with-lcms=$with_lcms $have_lcms
3779 LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
3780 LQR --with-lqr=$with_lqr $have_lqr
3781 LZMA --with-lzma=$with_lzma $have_lzma
3782 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3783 OpenEXR --with-openexr=$with_openexr $have_openexr
3784 PANGO --with-pango=$with_pango $have_pango
3785 PERL --with-perl=$with_perl $have_perl
3786 PNG --with-png=$with_png $have_png
3787 RSVG --with-rsvg=$with_rsvg $have_rsvg
3788 TIFF --with-tiff=$with_tiff $have_tiff
3789 WEBP --with-webp=$with_webp $have_webp
3790 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
3791 WMF --with-wmf=$with_wmf $have_wmf
3792 X11 --with-x=$with_x $have_x
3793 XML --with-xml=$with_xml $have_xml
3794 ZLIB --with-zlib=$with_zlib $have_zlib
3797 X_CFLAGS = $X_CFLAGS
3798 X_PRE_LIBS = $X_PRE_LIBS
3800 X_EXTRA_LIBS = $X_EXTRA_LIBS
3802 Options used to compile and link:
3803 PREFIX = $PREFIX_DIR
3804 EXEC-PREFIX = $EXEC_PREFIX_DIR
3805 VERSION = $PACKAGE_VERSION
3808 CPPFLAGS = $MAGICK_CPPFLAGS
3809 PCFLAGS = $MAGICK_PCFLAGS
3812 MAGICK_LDFLAGS = $MAGICK_LDFLAGS
3815 CXXFLAGS = $CXXFLAGS
3816 FEATURES = $MAGICK_FEATURES