1 # Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization
2 # dedicated to making software imaging solutions freely available.
4 # You may not use this file except in compliance with the License. You may
5 # obtain a copy of the License at
7 # http://www.imagemagick.org/script/license.php
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Copyright (C) 2003 - 2008 GraphicsMagick Group
17 # Copying and distribution of this file, with or without modification,
18 # are permitted in any medium without royalty provided the copyright
19 # notice and this notice are preserved.
21 # Process this file with autoconf to create configure script.
24 # ==============================================================================
25 # ImageMagick release.
26 # ==============================================================================
27 m4_define([magick_major_version], [7])
28 m4_define([magick_minor_version], [0])
29 m4_define([magick_micro_version], [1])
30 m4_define([magick_patchlevel_version], [1])
31 m4_define([magick_version],
32 [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
33 m4_define([magick_git_revision], esyscmd([sh -c "(gitversion .) | tr -d '\n'"]))
34 m4_define([magick_tar_name],[ImageMagick])
36 # ==============================================================================
38 # ==============================================================================
39 AC_INIT([ImageMagick],
41 [https://github.com/ImageMagick/ImageMagick/issues],
43 [http://www.imagemagick.org])
44 AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
45 AC_CONFIG_AUX_DIR([config])
46 AC_REQUIRE_AUX_FILE([tap-driver.sh])
47 AC_CONFIG_MACRO_DIR([m4])
48 AC_CONFIG_HEADERS([config/config.h])
49 AX_PREFIX_CONFIG_H([MagickCore/magick-baseconfig.h],[MagickCore])
52 AM_INIT_AUTOMAKE([foreign color-tests -Wall -Wno-portability subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip tar-ustar])
53 AM_SILENT_RULES([yes])
56 # Save initial user-tunable values
59 for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
60 eval isset=\${$var+set}
61 if test "$isset" = 'set'; then
63 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
66 AC_SUBST(DISTCHECK_CONFIG_FLAGS)
68 CONFIGURE_ARGS="$0 ${ac_configure_args}"
69 AC_SUBST(CONFIGURE_ARGS)
71 AC_ARG_ENABLE([reproducible-build],
72 [AC_HELP_STRING([--enable-reproducible-build],
73 [enable reproducible build])],
74 [enable_reproducible_build=$enableval],
75 [enable_reproducible_build='no'])
77 # Source file containing package/library versioning information.
78 . ${srcdir}/version.sh
80 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
82 MAGICK_TARGET_CPU=$host_cpu
83 AC_SUBST(MAGICK_TARGET_CPU)
84 AC_DEFINE_UNQUOTED(MAGICK_TARGET_CPU,$MAGICK_TARGET_CPU,[Target Host CPU])
86 MAGICK_TARGET_VENDOR=$host_vendor
87 AC_SUBST(MAGICK_TARGET_VENDOR)
88 AC_DEFINE_UNQUOTED(MAGICK_TARGET_VENDOR,$MAGICK_TARGET_VENDOR,[Target Host Vendor])
90 MAGICK_TARGET_OS=$host_os
91 AC_SUBST(MAGICK_TARGET_OS)
92 AC_DEFINE_UNQUOTED(MAGICK_TARGET_OS,$MAGICK_TARGET_OS,[Target Host OS])
95 # Substitute versioning
96 AC_SUBST([MAGICK_MAJOR_VERSION],[magick_major_version])
97 AC_SUBST([MAGICK_MINOR_VERSION],[magick_minor_version])
98 AC_SUBST([MAGICK_MICRO_VERSION],[magick_micro_version])
99 AC_SUBST([MAGICK_PATCHLEVEL_VERSION],[magick_patchlevel_version])
100 AC_SUBST([MAGICK_VERSION],[magick_version])
101 AC_SUBST([MAGICK_GIT_REVISION],[magick_git_revision])
103 # Substitute library versioning
104 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
105 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
106 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
107 AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
108 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
109 AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
110 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
112 AC_SUBST(MAGICKPP_LIBRARY_CURRENT)dnl
113 AC_SUBST(MAGICKPP_LIBRARY_REVISION)dnl
114 AC_SUBST(MAGICKPP_LIBRARY_AGE)dnl
115 AC_SUBST([MAGICKPP_LIBRARY_CURRENT_MIN],
116 [`expr $MAGICKPP_LIBRARY_CURRENT - $MAGICKPP_LIBRARY_AGE`])
117 AC_SUBST([MAGICKPP_LIBRARY_VERSION_INFO],
118 [$MAGICKPP_LIBRARY_CURRENT:$MAGICKPP_LIBRARY_REVISION:$MAGICKPP_LIBRARY_AGE])
120 AC_SUBST(PACKAGE_NAME)dnl
121 AC_SUBST(PACKAGE_VERSION)dnl
122 AC_SUBST(PACKAGE_PERL_VERSION)dnl
123 AC_SUBST(PACKAGE_RELEASE)dnl
124 AC_SUBST(PACKAGE_CHANGE_DATE)dnl
125 AC_SUBST(PACKAGE_LIB_VERSION)dnl
126 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
127 AS_IF([test X$enable_reproducible_build = Xyes],
128 [PACKAGE_RELEASE_DATE=$PACKAGE_RELEASE_DATE_REPRODUCIBLE],
129 [PACKAGE_RELEASE_DATE=$PACKAGE_RELEASE_DATE_RAW],
131 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
133 AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
135 # Ensure that make can run correctly
138 # versioning of library
139 MAGICK_LIB_VERSION="0x"
140 if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
141 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
143 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
144 if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
145 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
147 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
148 if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
149 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
151 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
152 AC_SUBST(MAGICK_LIB_VERSION)
154 # Definition used to define MagickLibVersionText in version.h
155 MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
156 AC_SUBST(MAGICK_LIB_VERSION_TEXT)
158 # Definition used to define MagickLibVersionNumber in version.h
159 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
160 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
162 MAGICKPP_LIB_VERSION="0x"
163 if test ${MAGICKPP_LIBRARY_CURRENT} -lt 10 ; then
164 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0
166 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_CURRENT}
167 if test ${MAGICKPP_LIBRARY_AGE} -lt 10 ; then
168 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0
170 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_AGE}
171 if test ${MAGICKPP_LIBRARY_REVISION} -lt 10 ; then
172 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0
174 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_REVISION}
175 AC_SUBST(MAGICKPP_LIB_VERSION)
177 # Definition used to define MagickLibVersionText in version.h
178 MAGICKPP_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
179 AC_SUBST(MAGICKPP_LIB_VERSION_TEXT)
181 # Definition used to define MagickLibVersionNumber in version.h
182 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
183 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
187 # Regenerate config.status if ChangeLog or version.sh is updated.
188 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
193 MAGICK_CPPFLAGS=$CPPFLAGS_USER
194 MAGICK_PCFLAGS=$CPPFLAGS_USER
200 # Evaluate shell variable equivalents to Makefile directory variables
202 if test "x$prefix" = xNONE; then
203 prefix=$ac_default_prefix
205 # Let make expand exec_prefix.
206 if test "x$exec_prefix" = xNONE; then
207 exec_prefix='${prefix}'
211 eval "eval PREFIX_DIR=${prefix}"
213 eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
214 AC_SUBST(EXEC_PREFIX_DIR)
215 eval "eval BIN_DIR=$bindir"
217 eval "eval SBIN_DIR=$sbindir"
219 eval "eval LIBEXEC_DIR=$libexecdir"
220 AC_SUBST(LIBEXEC_DIR)
221 eval "eval DATA_DIR=$datadir"
223 eval "eval DOC_DIR=$datadir/doc"
225 eval "eval SYSCONF_DIR=$sysconfdir"
226 AC_SUBST(SYSCONF_DIR)
227 eval "eval SHAREDSTATE_DIR=$sharedstatedir"
228 AC_SUBST(SHAREDSTATE_DIR)
229 eval "eval LOCALSTATE_DIR=$localstatedir"
230 AC_SUBST(LOCALSTATE_DIR)
231 eval "eval LIB_DIR=$libdir"
233 eval "eval INCLUDE_DIR=$includedir"
234 AC_SUBST(INCLUDE_DIR)
235 eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
236 AC_SUBST(PERSISTINCLUDE_DIR)
237 eval "eval INFO_DIR=$infodir"
239 eval "eval MAN_DIR=$mandir"
242 # Get full paths to source and build directories
243 srcdirfull="`cd $srcdir && pwd`"
247 # Compute variables useful for running uninstalled software.
249 MAGICK_CODER_MODULE_PATH="${builddir}/coders"
250 MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
251 MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
252 MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
254 case "${build_os}" in
256 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
257 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
258 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
259 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
268 AC_SUBST(MAGICK_CODER_MODULE_PATH)
269 AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
270 AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
271 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
276 # Enable OS features.
278 AC_USE_SYSTEM_EXTENSIONS
280 # ==============================================================================
281 # Find required base packages
282 # ==============================================================================
283 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
300 AX_GCC_ARCHFLAG([yes])
301 PKG_PROG_PKG_CONFIG([0.20])
305 # Test for 64-bit build.
306 AC_CHECK_SIZEOF([size_t])
310 # The AX_CFLAGS_WARN_ALL macro doesn't currently work for sunpro
312 if test "$ax_cv_c_compiler_vendor" != "sun"; then
316 if test "x$GCC" = "xyes"; then
317 CFLAGS="$CFLAGS -fexceptions"
320 cat > local.exp <<EOF
321 set CC_FOR_TARGET "$CC"
325 # Check for linker script support
329 # Enable run-time checking.
331 AC_ARG_ENABLE([bounds-checking],
332 [AC_HELP_STRING([--enable-bounds-checking],
333 [enable run-time bounds-checking])],
334 [enable_bounds_checking=$enableval],
335 [enable_bounds_checking='no'])
337 if test "$enable_bounds_checking" = yes; then
338 AC_DEFINE([_FORTIFY_SOURCE], [2],
339 [enable run-time bounds-checking])
349 native_win32_build='no'
357 native_win32_build='yes'
361 if test "${GDI32_LIBS}x" != 'x'; then
362 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
365 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
366 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
367 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
368 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
370 WinPathScript="${srcdirfull}/winpath.sh"
371 AC_SUBST(WinPathScript)
374 # Compiler flags tweaks
376 if test "${GCC}" != "yes"; then
379 # aCC: HP ANSI C++ B3910B A.03.34
380 CFLAGS="${CFLAGS} -Wp,-H30000"
381 if test -n "${CXXFLAGS}"; then
384 CXXFLAGS="${CXXFLAGS} -AA"
388 # Compaq alphaev68-dec-osf5.1 compiler
389 if test -n "${CXXFLAGS}"; then
390 CXXFLAGS='-std strict_ansi -noimplicit_include'
392 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
397 # Check for lazy-loading.
398 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
400 im_cv_ld_lazyload='none'
402 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
403 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
404 im_cv_ld_lazyload='-Wl,-zlazyload'
409 if test "${im_cv_ld_lazyload}" != 'none' ; then
410 if test -z "${LDFLAGS}" ; then
411 LDFLAGS="${im_cv_ld_lazyload}"
413 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
417 dnl Platform-specific stuff
419 *darwin* | *-macos10*)
420 dnl Disable FORTIFY_SOURCE to fix a bug in LVVM / OpenMP support
421 CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=0"
422 dnl OS X universal binary support, requires --disable-dependency-tracking
423 AC_ARG_ENABLE([osx-universal-binary],
424 AC_HELP_STRING([--enable-osx-universal-binary],
425 [build universal binary on OS X [[default=no]]]),
426 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
428 if test "${build_osxuniversal}" != no ; then
429 if test "$enable_dependency_tracking" != no ; then
430 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
431 Please re-run configure with these options:
432 --disable-dependency-tracking --enable-osx-universal-binary
435 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
436 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
437 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
443 # ARCH specific include directory
445 AC_ARG_WITH([includearch-dir],
446 [AC_HELP_STRING([--includearch-dir=DIR],
447 [ARCH specific include directory])],
448 [includearch_dir=$withval],
449 [includearch_dir=$INCLUDE_DIR])
451 eval "eval INCLUDEARCH_DIR=$includearch_dir"
452 AC_SUBST(INCLUDEARCH_DIR)
455 # ARCH specific configuration directory
457 AC_ARG_WITH([sharearch-dir],
458 [AC_HELP_STRING([--sharearch-dir=DIR],
459 [ARCH specific config directory])],
460 [sharearch_dir=$withval],
461 [sharearch_dir="${LIB_DIR}"])
463 eval "eval SHAREARCH_DIR=$sharearch_dir"
464 AC_SUBST(SHAREARCH_DIR)
466 # Path to the pkgconfig folder
467 AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=DIR],
468 [Path to the pkgconfig directory @<:@LIBDIR/pkgconfig@:>@]),
469 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
470 AC_SUBST([pkgconfigdir])
473 # Enable support for threads
475 # Find Posix threads library
477 AC_ARG_WITH([threads],
478 [AC_HELP_STRING([--without-threads], [disable threads support])],
479 [with_threads=$withval],
480 [with_threads='yes'])
484 if test "$with_threads" != 'no'; then
486 if test "$ax_pthread_ok" = yes; then
488 DEF_THREAD="$PTHREAD_CFLAGS"
489 CFLAGS="$CFLAGS $DEF_THREAD"
490 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
491 THREAD_LIBS="$PTHREAD_LIBS"
492 if test "$CC" != "$PTHREAD_CC"; then
493 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
496 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
499 LIBS="$LIBS $THREAD_LIBS"
500 AC_SUBST(THREAD_LIBS)
502 # Enable support for OpenMP
503 if test "$have_threads" != 'yes'; then
504 ac_cv_prog_c_openmp=unsupported
507 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
508 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
509 AC_SUBST(OPENMP_CFLAGS)
510 if test "$enable_openmp" != no; then
511 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
512 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
516 # Enable support for OpenCL
518 CFLAGS="$CL_CFLAGS $CFLAGS"
519 CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
520 LIBS="$CL_LIBS $LIBS"
522 if test "$enable_opencl" != no; then
523 if test "X$ax_cv_check_cl_libcl" != Xno; then :
524 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
530 # Check for large file support
536 if test "$enable_largefile" != no; then
537 case $ac_cv_sys_file_offset_bits in
539 # nothing to do here as the host supports LFS fine
542 AC_MSG_CHECKING([for native large file support])
543 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
545 exit(!(sizeof(off_t) == 8));
547 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
548 AC_MSG_RESULT([yes])],
549 [AC_MSG_RESULT([no])])
552 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
555 if test "$ac_cv_sys_large_files" != 'no'; then
556 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
558 if test "$ac_cv_sys_largefile_source" != 'no'; then
559 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
562 AC_SUBST(LFS_CPPFLAGS)
568 AC_SUBST(LIBTOOL_DEPS)
570 # Check to see if building shared libraries
571 libtool_build_shared_libs='no'
572 if test "$enable_shared" = 'yes'; then
573 libtool_build_shared_libs='yes'
576 # Check to see if building static libraries
577 libtool_build_static_libs='no'
578 if test "$enable_static" = 'yes'; then
579 libtool_build_static_libs='yes'
582 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
584 # Enable support for building loadable modules
587 AC_ARG_WITH([modules],
588 [AC_HELP_STRING([--with-modules],
589 [enable building dynamically loadable modules])],
590 [with_modules=$withval],
593 # Only allow building loadable modules if we are building shared libraries
594 if test "$with_modules" != 'no' ; then
595 if test "$libtool_build_shared_libs" = 'no'; then
596 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
602 if test "$build_modules" != 'no' ; then
603 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
604 MAGICK_FEATURES="$MAGICK_FEATURES Modules"
606 AM_CONDITIONAL(WITH_MODULES, test "$build_modules" != 'no')
608 # Enable build using delegate libraries built in subdirectories rather than installed
609 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
610 AC_ARG_ENABLE([delegate-build],
611 [AC_HELP_STRING([--enable-delegate-build],
612 [look for delegate libraries in build directory])],
613 [enable_delegate_build=$enableval],
614 [enable_delegate_build='no'])
616 AC_ARG_ENABLE([deprecated],
617 [AC_HELP_STRING([--disable-deprecated],
618 [exclude deprecated methods in MagickCore and MagickWand APIs])],
619 [enable_deprecated=$enableval],
620 [enable_deprecated='no'])
622 if test "$enable_deprecated" = 'yes'; then
623 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
625 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
628 # Build a version of ImageMagick which operates uninstalled.
629 # Used to build distributions located via MAGICK_HOME / executable path
630 AC_ARG_ENABLE([installed],
631 [AC_HELP_STRING([--disable-installed],
632 [Formally install ImageMagick under PREFIX])],
633 [enable_installed=$enableval],
634 [enable_installed='yes'])
636 if test "$enable_installed" = 'yes'; then
637 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
639 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
642 # Permit enciphering and deciphering image pixels.
643 AC_ARG_ENABLE([cipher],
644 [AC_HELP_STRING([--disable-cipher],
645 [disable enciphering and deciphering image pixels])],
646 [enable_cipher=$enableval],
647 [enable_cipher='yes'])
649 if test "$enable_cipher" = 'yes'; then
650 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
651 MAGICK_FEATURES="Cipher $MAGICK_FEATURES"
654 # Build a zero-configuration version of ImageMagick.
655 AC_ARG_ENABLE([zero-configuration],
656 [AC_HELP_STRING([--enable-zero-configuration],
657 [enable self-contained, embeddable, zero-configuration ImageMagick])],
658 [enable_zero_configuration=$enableval],
659 [enable_zero_configuration='no'])
661 if test "$enable_zero_configuration" = 'yes'; then
662 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
663 MAGICK_FEATURES="Zero-configuration $MAGICK_FEATURES"
666 # Build a high dynamic range version of ImageMagick.
667 AC_ARG_ENABLE([hdri],
668 [AC_HELP_STRING([--enable-hdri],
669 [accurately represent the wide range of intensity levels found in real scenes])],
670 [enable_hdri=$enableval],
674 if test "$enable_hdri" = 'yes'; then
676 magick_hdri_enable='1';
677 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
679 magick_hdri_enable='0'
681 AC_DEFINE_UNQUOTED(HDRI_ENABLE_OBSOLETE_IN_H,$magick_hdri_enable,[Whether hdri is enabled or not])
682 AC_SUBST(MAGICK_HDRI)dnl
683 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
684 CFLAGS="$CFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
685 CPPFLAGS="$CPPFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
687 # Build a version of ImageMagick with assert statements.
688 AC_ARG_ENABLE([assert],
689 [AC_HELP_STRING([--disable-assert],
690 [disable assert() statements in build])],
691 [enable_assert=$enableval],
692 [enable_assert='yes'])
694 if test "$enable_assert" = 'no'; then
695 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
698 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
701 # Enable hugepages support
702 AC_ARG_ENABLE([hugepages],
703 [AC_HELP_STRING([--enable-hugepages],
704 [enable 'huge pages' support])],
705 [enable_hugepages=$enableval],
706 [enable_hugepages='no'])
708 # Enable ccmalloc memory debugging support
709 AC_ARG_ENABLE([ccmalloc],
710 [AC_HELP_STRING([--enable-ccmalloc],
711 [enable 'ccmalloc' memory debug support])],
712 [enable_ccmalloc=$enableval],
713 [enable_ccmalloc='no'])
715 # Enable Electric Fence memory debugging support
716 AC_ARG_ENABLE([efence],
717 [AC_HELP_STRING([--enable-efence],
718 [enable 'efence' memory debug support])],
719 [enable_efence=$enableval],
720 [enable_efence='no'])
722 # Enable prof-based profiling support
723 AC_ARG_ENABLE([prof],
724 [AC_HELP_STRING([--enable-prof],
725 [enable 'prof' profiling support])],
726 [enable_prof=$enableval],
729 # Enable gprof-based profiling support
730 AC_ARG_ENABLE([gprof],
731 [AC_HELP_STRING([--enable-gprof],
732 [enable 'gprof' profiling support])],
733 [enable_gprof=$enableval],
736 # Enable gcov-based profiling support
737 AC_ARG_ENABLE([gcov],
738 [AC_HELP_STRING([--enable-gcov],
739 [enable 'gcov' profiling support])],
740 [enable_gcov=$enableval],
743 enable_profiling='no'
744 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
745 enable_profiling='yes'
746 if test "$libtool_build_shared_libs" = 'yes'; then
747 echo "Warning: Can not profile code using shared libraries"
751 # Magick API method prefix
752 AC_ARG_WITH([method-prefix],
753 [AC_HELP_STRING([--with-method-prefix=PREFIX],
754 [prefix MagickCore API methods])],
755 [with_method_prefix=$withval],
756 [with_method_prefix='no'])
758 if test "$with_method_prefix" != 'no'; then
759 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
760 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
763 # Enable legacy support (default no)
764 AC_ARG_ENABLE(legacy-support,
765 [ --enable-legacy-support install legacy command-line utilities (default disabled)],
766 [with_legacy_support=$enableval],
767 [with_legacy_support='no'])
768 AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no')
770 # Number of bits in a Quantum
771 AC_ARG_WITH([quantum-depth],
772 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
773 [number of bits in a pixel quantum (default 16)])],
774 [with_quantum_depth=$withval],
775 [with_quantum_depth=16])
777 if test "$with_quantum_depth" != '8'; then
778 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
781 case "${with_quantum_depth}" in
786 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
788 QUANTUM_DEPTH="$with_quantum_depth"
789 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH_OBSOLETE_IN_H,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
790 AC_SUBST(QUANTUM_DEPTH)dnl
791 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
792 CFLAGS="$CFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
793 CPPFLAGS="$CPPFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
795 # define a lib suffix for abi purpose
796 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}"
797 if test "$enable_hdri" = 'yes'; then
798 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}${MAGICK_HDRI}"
800 AC_SUBST(MAGICK_ABI_SUFFIX)
802 # Set pixel cache threshold
804 [AC_HELP_STRING([--with-cache=THRESHOLD],
805 [set pixel cache threshhold in MB (default available memory)])],
806 [with_cache=$withval],
809 if test "$with_cache" != ''; then
810 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
811 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
814 # Disable/Enable support for full delegate paths
815 AC_ARG_WITH([frozenpaths],
816 [AC_HELP_STRING([--with-frozenpaths],
817 [freeze delegate paths])],
818 [with_frozenpaths=$withval],
819 [with_frozenpaths='no'])
821 # Enable build/install of Magick++
822 AC_ARG_WITH([magick-plus-plus],
823 [AC_HELP_STRING([--without-magick-plus-plus],
824 [disable build/install of Magick++])],
825 [with_magick_plus_plus=$withval],
826 [with_magick_plus_plus='yes'])
828 # Encode the this name into the shared library.
829 AC_ARG_WITH([package-release-name],
830 [AC_HELP_STRING([--with-package-release-name=NAME],
831 [encode this name into the shared library])],
832 [MAGICK_LT_RELEASE_OPTS="-release $withval"])
833 AC_SUBST(MAGICK_LT_RELEASE_OPTS)
835 # Disable build/install of PerlMagick.
837 [AC_HELP_STRING([--with-perl],
838 [enable build/install of PerlMagick])],
839 [with_perl=$withval],
842 # Options to pass when configuring PerlMagick
843 AC_ARG_WITH([perl-options],
844 [AC_HELP_STRING([--with-perl-options=OPTIONS],
845 [options to pass on command-line when generating PerlMagick build file])],
846 PERL_MAKE_OPTIONS=$withval)
847 AC_SUBST(PERL_MAKE_OPTIONS)
849 # Enable jemalloc, object-caching memory allocation library.
850 AC_ARG_WITH(jemalloc,
851 [ --with-jemalloc enable jemalloc memory allocation library support],
852 [with_jemalloc=$withval],
853 [with_jemalloc='no'])
854 if test "$with_jemalloc" != 'yes' ; then
855 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jemalloc=$with_jemalloc "
858 # Enable umem, object-caching memory allocation library.
860 [ --with-umem enable umem memory allocation library support],
861 [with_umem=$withval],
863 if test "$with_umem" != 'yes' ; then
864 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
868 # Specify path to shared libstdc++ if not in normal location
870 AC_ARG_WITH([libstdc],
871 [AC_HELP_STRING([--with-libstdc=DIR],
872 [ use libstdc++ in DIR (for GNU C++)])],
873 [with_libstdc=$withval],
876 if test "$with_libstdc" != ''; then
877 if test -d "$with_libstdc"; then
878 LIBSTDCLDFLAGS="-L$with_libstdc"
881 AC_SUBST(LIBSTDCLDFLAGS)
883 # Does gcc required -traditional?
884 AC_PROG_GCC_TRADITIONAL
888 # Set defines required to build DLLs and modules using MinGW
891 # These options are set for multi-thread DLL module build
892 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
894 # executable/Magick++: _DLL _MAGICKMOD_
895 MODULE_EXTRA_CPPFLAGS=''
896 LIBRARY_EXTRA_CPPFLAGS=''
897 if test "${native_win32_build}" = 'yes'; then
898 if test "${libtool_build_shared_libs}" = 'yes'; then
899 CPPFLAGS="$CPPFLAGS -D_DLL"
900 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
901 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
902 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
903 if test "$build_modules" = 'yes'; then
904 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
906 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
909 CPPFLAGS="$CPPFLAGS -D_LIB"
910 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
911 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
913 if test "$with_threads" = 'yes'; then
914 CPPFLAGS="$CPPFLAGS -D_MT"
915 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
916 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
919 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
920 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
922 # Check standard headers
924 if ! test x"$ac_cv_header_stdc" = x"yes"; then
925 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
926 header files. Compilation cannot proceed. Please install the ANSI C
927 headers and rerun this script.]);
932 # Check additional headers
933 AC_CHECK_HEADERS(arm/limits.h arpa/inet.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h sys/ipc.h sys/mman.h sys/resource.h sys/sendfile.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h utime.h wchar.h xlocale.h)
937 # Checks for typedefs, structures, and compiler characteristics.
951 # Checks for language qualifiers and semantics.
959 # If words are stored with the most significant byte first (like
960 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
963 # Define to a suitable type, if standard headers do not define it.
971 AC_TYPE_LONG_DOUBLE_WIDER
972 AC_TYPE_LONG_LONG_INT
986 AC_TYPE_UNSIGNED_LONG_LONG_INT
988 AC_CHECK_TYPES([locale_t], [], [], [[#include <xlocale.h>]])
990 # Float_t and double_t are intended to be the the most efficient type.
991 AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]])
992 AC_CHECK_TYPES([double_t], [], [], [[#include <math.h>]])
993 AC_CHECK_SIZEOF([float_t], [], [[#include <math.h>]])
994 AC_CHECK_SIZEOF([double_t], [], [[#include <math.h>]])
996 # Get size of float, double and long double for comparaison.
997 AC_CHECK_SIZEOF([float])
998 AC_CHECK_SIZEOF([double])
999 AC_CHECK_SIZEOF([long double])
1001 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
1002 AC_CHECK_SIZEOF(signed short)
1004 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
1005 AC_CHECK_SIZEOF(unsigned short)
1007 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
1008 AC_CHECK_SIZEOF(signed int)
1010 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
1011 AC_CHECK_SIZEOF(unsigned int)
1013 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
1014 AC_CHECK_SIZEOF(signed long)
1016 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
1017 AC_CHECK_SIZEOF(unsigned long)
1019 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
1020 # 'signed long long' is not supported then the value defined is zero.
1021 AC_CHECK_SIZEOF(signed long long)
1023 # Obtain size of a 'unsigned long long' and define as
1024 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
1025 # supported then the value defined is zero.
1026 AC_CHECK_SIZEOF(unsigned long long)
1028 # Obtain size of off_t and define as SIZEOF_OFF_T
1029 AC_CHECK_SIZEOF(off_t)
1031 # Obtain size of size_t and define as SIZEOF_SIZE_T
1032 AC_CHECK_SIZEOF(size_t)
1034 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
1035 AC_CHECK_SIZEOF(ssize_t)
1037 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
1038 AC_CHECK_SIZEOF(unsigned int*)
1041 # Compute sized types for current CPU and compiler options.
1044 AC_MSG_CHECKING(for signed 8-bit type)
1045 INT8_T='signed char'
1046 AC_MSG_RESULT($INT8_T)
1049 AC_MSG_CHECKING(for unsigned 8-bit type)
1050 UINT8_T='unsigned char'
1051 AC_MSG_RESULT($UINT8_T)
1054 AC_MSG_CHECKING(for signed 16-bit type)
1055 INT16_T='signed short'
1056 AC_MSG_RESULT($INT16_T)
1059 AC_MSG_CHECKING(for unsigned 16-bit type)
1060 UINT16_T='unsigned short'
1061 AC_MSG_RESULT($UINT16_T)
1064 AC_MSG_CHECKING(for signed 32-bit type)
1067 if test $ac_cv_sizeof_signed_int -eq 4; then
1068 INT32_T='signed int'
1070 elif test $ac_cv_sizeof_signed_long -eq 4; then
1071 INT32_T='signed long'
1074 AC_MSG_RESULT($INT32_T)
1078 AC_MSG_CHECKING(for unsigned 32-bit type)
1081 if test $ac_cv_sizeof_unsigned_int -eq 4; then
1082 UINT32_T='unsigned int'
1084 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
1085 UINT32_T='unsigned long'
1088 AC_MSG_RESULT($UINT32_T)
1092 AC_MSG_CHECKING(for signed 64-bit type)
1095 if test $ac_cv_sizeof_signed_long -eq 8; then
1096 INT64_T='signed long'
1098 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
1099 INT64_T='signed long long'
1102 case "${host_os}" in
1107 AC_MSG_RESULT($INT64_T)
1111 AC_MSG_CHECKING(for unsigned 64-bit type)
1114 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1115 UINT64_T='unsigned long'
1117 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1118 UINT64_T='unsigned long long'
1121 case "${host_os}" in
1126 AC_MSG_RESULT($UINT64_T)
1130 AC_MSG_CHECKING(for unsigned maximum type)
1133 if test "$UINT64_T" != 'none'; then
1136 elif test "$UINT32_T" != 'none'; then
1140 AC_MSG_RESULT($UINTMAX_T)
1144 AC_MSG_CHECKING(for pointer difference type)
1147 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1148 UINTPTR_T='unsigned long'
1150 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1151 UINTPTR_T='unsigned long long'
1154 AC_MSG_RESULT($UINTPTR_T)
1158 AC_MSG_CHECKING([whether our compiler supports __func__])
1160 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1161 AC_MSG_RESULT([yes]),
1163 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1165 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1166 AC_MSG_RESULT([yes])
1167 AC_DEFINE(__func__, __FUNCTION__,
1168 [Define to appropriate substitue if compiler does not have __func__]),
1170 AC_DEFINE(__func__, __FILE__,
1171 [Define to appropriate substitue if compiler does not have __func__])))
1175 # Check for functions
1178 AC_FUNC_CLOSEDIR_VOID
1182 AC_FUNC_SELECT_ARGTYPES
1183 AC_FUNC_SETVBUF_REVERSED
1193 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1194 LIBS="$MATH_LIBS $LIBS"
1198 # Find socket library
1200 AC_SEARCH_LIBS(gethostbyname, resolv nsl)
1201 AC_SEARCH_LIBS(socket, socket,
1203 AC_DEFINE([HAVE_SOCKET],[1],[Define to 1 if you have socket support.])
1204 MAGICK_FEATURES="DPC $MAGICK_FEATURES"
1207 AC_CHECK_FUNCS([acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir sendfile setlocale socket sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
1210 # Check for clock_gettime().
1212 AC_SEARCH_LIBS(clock_gettime, rt,
1214 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1215 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1218 [[#include <time.h>]],
1219 [[clockid_t clockType = CLOCK_REALTIME;]])],
1222 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1223 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1229 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1235 # Check for function prototypes
1239 AC_CHECK_DECLS([pread, pwrite],[],[],[
1240 #include <unistd.h>])
1242 AC_CHECK_DECLS([strlcpy],[],[],[
1243 #include <strings.h>])
1245 AC_CHECK_DECLS([vsnprintf],[],[],[
1247 #include <stdarg.h>])
1251 # C++ Support Tests (For Magick++)
1254 have_magick_plus_plus='no'
1255 if test "$with_magick_plus_plus" = 'yes'; then
1260 # Full set of headers used...
1261 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1262 # functional iomanip iosfwd iostream iterator list string strstream utility
1267 AX_CXX_NAMESPACE_STD
1268 AC_CXX_HAVE_STD_LIBS
1272 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1274 test $ax_cv_cxx_bool = 'yes' && \
1275 test $ax_cv_cxx_namespaces = 'yes' && \
1276 test $ac_cv_cxx_have_std_libs = 'yes' && \
1277 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1278 have_magick_plus_plus='yes'
1280 have_magick_plus_plus='no (failed tests)'
1282 AC_MSG_RESULT([$have_magick_plus_plus])
1285 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1287 # Only check for delegate libraries in subdirectories if requested.
1288 if test "$enable_delegate_build" != 'no'; then
1289 # Check for delegate sub-directories and add -I & -L options as required.
1290 # This presumes that delegates are installed as detailed in the ImageMagick
1291 # README. If delegates are installed in a standard location where the
1292 # compiler will automatically find them then these options should not be
1296 # Most delegates have includes in the same directory as the library, but not all...
1299 for dir in bzlib fftw fpx gslib/src jp2 jbig/libjbig jpeg lcms/include lzma magick openjp2/include png tiff/libtiff ttf/include wand webp/src wmf/include xml/include zlib; do
1300 if test -d "$builddir/$dir"; then
1301 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1303 if test -d "$srcdirfull/$dir"; then
1304 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1310 for dir in bzlib fftw fpx gslib/src jbig/libjbig jpeg lcms/src lzma magick openjp2 png tiff/libtiff ttf/objs wand webp wmf/src xml zlib; do
1311 if test -d "$builddir/$dir/.libs"; then
1312 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1314 if test -d "$srcdirfull/$dir/.libs"; then
1315 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1318 if test -d "$builddir/$dir"; then
1319 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1321 if test -d "$srcdirfull/$dir"; then
1322 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1328 # Assume that delegate headers reside under same directory as ImageMagick
1329 # installation prefix.
1330 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/${PACKAGE_NAME}-$MAGICK_MAJOR_VERSION $MAGICK_CPPFLAGS"
1333 # Find the X11 RGB database
1335 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1336 [# Look for the header file in a standard set of common directories.
1337 # Check X11 before X11Rn because it is often a symlink to the current release.
1346 /usr/XFree86/lib/X11 \
1354 /usr/local/X11/lib \
1355 /usr/local/X11R4/lib \
1356 /usr/local/X11R5/lib \
1357 /usr/local/X11R6/lib \
1359 /usr/local/lib/X11 \
1360 /usr/local/lib/X11R4 \
1361 /usr/local/lib/X11R5 \
1362 /usr/local/lib/X11R6 \
1363 /usr/local/lib/X11R7 \
1364 /usr/local/x11r5/lib \
1365 /usr/lpp/Xamples/lib \
1367 /usr/openwin/share/lib \
1368 /usr/unsupported/lib \
1371 if test -f "$ac_dir/X11/rgb.txt"; then
1372 im_cv_x_configure="$ac_dir/X11/"
1374 elif test -f "$ac_dir/rgb.txt"; then
1375 im_cv_x_configure="$ac_dir/"
1380 X11_CONFIGURE_PATH="$im_cv_x_configure"
1381 case "${build_os}" in
1383 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1386 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",[Location of X11 configure files])
1389 # Find OpenMP library
1392 if test "$enable_openmp" != 'no'; then
1393 if test "${GCC}" = "yes"; then
1394 # Open64 (passes for GCC but uses different OpenMP implementation)
1395 if test "x$GOMP_LIBS" = x ; then
1396 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1397 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1401 if test "x$GOMP_LIBS" = x ; then
1402 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1406 if test "x$GOMP_LIBS" = x ; then
1407 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1410 if test "x$GOMP_LIBS" = x ; then
1411 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1413 # SGI IRIX 6.5 MIPSpro C/C++
1414 if test "x$GOMP_LIBS" = x ; then
1415 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1418 LIBS="$GOMP_LIBS $LIBS"
1423 # Check for jemalloc.
1427 if test "$with_jemalloc" != 'no'; then
1428 AC_MSG_CHECKING(for JEMALLOC support )
1432 AC_CHECK_HEADER([jemalloc/jemalloc.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1433 AC_CHECK_LIB(jemalloc,[malloc_stats_print],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1434 AC_MSG_CHECKING(if jemalloc memory allocation library is complete)
1435 if test $passed -gt 0; then
1436 if test $failed -gt 0; then
1437 AC_MSG_RESULT(no -- some components failed test)
1438 have_jemalloc='no (failed tests)'
1440 JEMALLOC_LIBS='-ljemalloc'
1441 LIBS="$JEMALLOC_LIBS $LIBS"
1442 AC_DEFINE(HasJEMALLOC,1,Define if you have jemalloc memory allocation library)
1450 AM_CONDITIONAL(HasJEMALLOC, test "$have_jemalloc" = 'yes')
1451 AC_SUBST(JEMALLOC_LIBS)
1458 if test "$with_umem" != 'no'; then
1459 AC_MSG_CHECKING(for UMEM support )
1463 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1464 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1465 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1466 AC_MSG_CHECKING(if umem memory allocation library is complete)
1467 if test $passed -gt 0; then
1468 if test $failed -gt 0; then
1469 AC_MSG_RESULT(no -- some components failed test)
1470 have_umem='no (failed tests)'
1473 LIBS="$UMEM_LIBS $LIBS"
1474 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1482 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1486 # Add support for ccmalloc memory debugging library if requested
1490 if test "$enable_ccmalloc" = 'yes'; then
1491 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1492 if test -n "$CCMALLOCDelegate"; then
1493 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1495 # Assume that gcc is used with ccmalloc.
1496 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1497 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1498 if test -n "$CCMALLOC_LIBS"; then
1500 LIBS="$LIBS $CCMALLOC_LIBS"
1509 # Add support for 'huge pages' if requested
1511 AS_IF([test "x$enable_hugepages" != "xno"],[
1512 AC_DEFINE(HAVE_HUGEPAGES, 1, [Compile with hugepage support])
1516 # Add support for efence memory debugging library if requested
1518 if test "$enable_efence" = 'yes'; then
1519 EFENCE_LIBS='-lefence'
1520 LIBS="$EFENCE_LIBS $LIBS"
1523 dnl ===========================================================================
1529 AC_ARG_WITH([bzlib],
1530 [AC_HELP_STRING([--without-bzlib],
1531 [disable BZLIB support])],
1532 [with_bzlib=$withval],
1535 if test "$with_bzlib" != 'yes'; then
1536 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1540 if test "$with_bzlib" != 'no'; then
1542 AC_MSG_RESULT([-------------------------------------------------------------])
1543 AC_MSG_CHECKING([for BZLIB])
1548 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1549 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1550 if test "$native_win32_build" = 'yes'; then
1551 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1553 if test $found_libbz -gt 0; then
1554 passed=`expr $passed + 1`
1556 failed=`expr $failed + 1`
1558 AC_MSG_CHECKING(if BZLIB package is complete)
1559 if test $passed -gt 0; then
1560 if test $failed -gt 0; then
1561 AC_MSG_RESULT(no -- some components failed test)
1562 have_bzlib='no (failed tests)'
1565 LIBS="$BZLIB_LIBS $LIBS"
1566 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1574 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1575 AC_SUBST(BZLIB_LIBS)
1578 # Find the X11 include and library directories.
1585 if test "$no_x" != 'yes'; then
1586 AC_MSG_RESULT([-------------------------------------------------------------])
1587 AC_MSG_CHECKING([for X11])
1589 LDFLAGS="$LDFLAGS $X_LIBS"
1590 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1591 LIBS="$X11_LIBS $LIBS"
1592 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1594 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1597 # Check for X11 shared memory extension
1599 # shmctl is required to support the shared memory extension
1600 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1601 if test "$have_shmctl" != 'yes'; then
1603 LIBS="$LIBS -lcygipc"
1604 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1608 if test "$have_shmctl" = 'yes'; then
1609 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1613 # Check for X11 shape extension
1615 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1616 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1617 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1619 if test "$no_x" != 'yes'; then
1624 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1628 dnl ===========================================================================
1634 [AC_HELP_STRING([--without-zlib],
1635 [disable ZLIB support])],
1636 [with_zlib=$withval],
1639 if test "$with_zlib" != 'yes'; then
1640 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1647 if test "x$with_zlib" = "xyes"; then
1648 AC_MSG_RESULT([-------------------------------------------------------------])
1649 PKG_CHECK_MODULES(ZLIB,[zlib >= 1.0.0], have_zlib=yes, have_zlib=no)
1653 if test "$have_zlib" = 'yes'; then
1654 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have ZLIB library)
1655 CFLAGS="$ZLIB_CFLAGS $CFLAGS"
1658 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1659 AC_SUBST(ZLIB_CFLAGS)
1662 dnl ===========================================================================
1664 # whether modules are built or not.
1668 if test "$build_modules" != 'no' ; then
1669 AC_MSG_RESULT([-------------------------------------------------------------])
1670 AC_MSG_CHECKING([for libltdl])
1674 AC_CHECK_HEADER([ltdl.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1675 AC_CHECK_LIB([ltdl],[lt_dlinit],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1676 AC_MSG_CHECKING([if libltdl package is complete])
1677 if test $passed -gt 0 ; then
1678 if test $failed -gt 0 ; then
1679 AC_MSG_RESULT([no -- some components failed test])
1680 have_ltdl='no (failed tests)'
1683 LIBS="$LTDL_LIBS $LIBS"
1684 AC_DEFINE(LTDL_DELEGATE,1,[Define if using libltdl to support dynamically loadable modules])
1685 AC_MSG_RESULT([yes])
1691 if test "$have_ltdl" != 'yes' ; then
1692 AC_MSG_FAILURE([libltdl is required for modules build],[1])
1695 AM_CONDITIONAL(WITH_LTDL, test "$have_ltdl" != 'no')
1698 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1701 if test "$enable_profiling" = 'yes'; then
1702 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1703 LIBS="$LIB_DL $LIBS"
1707 dnl ===========================================================================
1710 # Set Apple font directory.
1712 AC_ARG_WITH([apple-font-dir],
1713 [AC_HELP_STRING([--with-apple-font-dir=DIR],
1714 [Apple font directory])],
1715 [with_apple_font_dir=$withval],
1716 [with_apple_font_dir='default'])
1718 if test "$with_apple_font_dir" != 'default'; then
1719 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-apple-font-dir=$with_apple_font_dir "
1722 dnl ===========================================================================
1725 # Check for Autotrace delegate library.
1727 AC_ARG_WITH([autotrace],
1728 [AC_HELP_STRING([--with-autotrace],
1729 [enable autotrace support])],
1730 [with_autotrace=$withval],
1731 [with_autotrace='no'])
1733 if test "$with_autotrace" != 'yes'; then
1734 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1741 if test "x$with_autotrace" = "xyes"; then
1742 AC_MSG_RESULT([-------------------------------------------------------------])
1743 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1747 if test "$have_autotrace" = 'yes'; then
1748 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1749 CFLAGS="$AUTOTRACE_CFLAGS $CFLAGS"
1752 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1753 AC_SUBST(AUTOTRACE_CFLAGS)
1754 AC_SUBST(AUTOTRACE_LIBS)
1756 dnl ===========================================================================
1759 # Check for Display Postscript delegate library.
1762 [AC_HELP_STRING([--without-dps],
1763 [disable Display Postscript support])],
1764 [with_dps=$withval],
1767 if test "$with_dps" != 'yes'; then
1768 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1773 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1774 AC_MSG_RESULT([-------------------------------------------------------------])
1775 AC_MSG_CHECKING([for DPS])
1779 PERSIST_CPPFLAGS="$CPPFLAGS"
1780 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1781 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1783 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1784 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1785 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1786 # ImageMagick itself doesn't use -lXt.
1789 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1790 if test "$have_libdps" != 'yes'; then
1791 # Unset cache variable so we can try again.
1792 unset ac_cv_lib_dps_DPSInitialize
1793 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1794 if test "$have_libdps" = 'yes'; then
1798 if test "$have_libdps" = 'yes'; then
1799 passed=`expr $passed + 1`
1801 failed=`expr $failed + 1`
1803 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1804 AC_MSG_CHECKING([if DPS package is complete])
1805 if test $passed -gt 0; then
1806 if test $failed -gt 0; then
1807 AC_MSG_RESULT([no -- some components failed test])
1808 have_dps='no (failed tests)'
1809 CPPFLAGS="$PERSIST_CPPFLAGS"
1811 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1812 LIBS="$DPS_LIBS $LIBS"
1813 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1814 AC_MSG_RESULT([yes])
1819 CPPFLAGS=$PERSIST_CPPFLAGS
1822 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1825 dnl ===========================================================================
1828 # Set DejaVu font directory.
1830 AC_ARG_WITH([dejavu-font-dir],
1831 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1832 [DejaVu font directory])],
1833 [with_dejavu_font_dir=$withval],
1834 [with_dejavu_font_dir='default'])
1836 if test "$with_dejavu_font_dir" != 'default'; then
1837 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1840 dnl ===========================================================================
1843 # Check for FFTW delegate library.
1846 [AC_HELP_STRING([--without-fftw],
1847 [disable FFTW support])],
1848 [with_fftw=$withval],
1851 if test "$with_fftw" != 'yes'; then
1852 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1859 if test "x$with_fftw" = "xyes"; then
1860 AC_MSG_RESULT([-------------------------------------------------------------])
1861 PKG_CHECK_MODULES(fftw3,[fftw3 >= 3.0.0], have_fftw=yes, have_fftw=no)
1865 if test "$have_fftw" = 'yes'; then
1866 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1867 FFTW_CFLAGS="$fftw3_CFLAGS"
1868 FFTW_LIBS="$fftw3_LIBS"
1869 CFLAGS="$fftw3_CFLAGS $CFLAGS"
1872 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1873 AC_SUBST(FFTW_CFLAGS)
1876 dnl ===========================================================================
1879 # Check for FLIF delegate library.
1882 [AC_HELP_STRING([--without-flif],
1883 [disable FLIF support])],
1884 [with_flif=$withval],
1887 if test "$with_flif" != 'yes'; then
1888 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-flif=$with_flif "
1893 if test "$with_flif" != 'no'; then
1894 AC_MSG_RESULT([-------------------------------------------------------------])
1895 AC_MSG_CHECKING([for FLIF])
1899 AC_CHECK_HEADER(flif.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1900 AC_CHECK_LIB(flif,flif_create_decoder,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1901 AC_MSG_CHECKING([if FLIF package is complete])
1902 if test $passed -gt 0; then
1903 if test $failed -gt 0; then
1904 AC_MSG_RESULT([no -- some components failed test])
1905 have_flif='no (failed tests)'
1908 LIBS="$FLIF_LIBS $LIBS"
1909 AC_DEFINE(FLIF_DELEGATE,1,Define if you have FLIF library)
1910 AC_MSG_RESULT([yes])
1917 AM_CONDITIONAL(FLIF_DELEGATE,test "$have_flif" = 'yes')
1920 dnl ===========================================================================
1923 # Check for FlashPIX delegate library.
1926 [AC_HELP_STRING([--without-fpx],
1927 [disable FlashPIX support])],
1928 [with_fpx=$withval],
1931 if test "$with_fpx" != 'yes'; then
1932 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1937 if test "$with_fpx" != 'no'; then
1938 AC_MSG_RESULT([-------------------------------------------------------------])
1939 AC_MSG_CHECKING([for FlashPIX])
1944 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1945 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1947 AC_MSG_CHECKING([if FlashPIX package is complete])
1948 if test $passed -gt 0; then
1949 if test $failed -gt 0; then
1950 AC_MSG_RESULT([no -- some components failed test])
1951 have_fpx='no (failed tests)'
1954 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1955 AC_MSG_RESULT([yes])
1963 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1966 dnl ===========================================================================
1969 # Check for DJVU delegate library.
1972 [AC_HELP_STRING([--without-djvu],
1973 [disable DjVu support])],
1974 [with_djvu=$withval],
1977 if test "$with_djvu" != 'yes'; then
1978 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1985 if test "x$with_djvu" = "xyes"; then
1986 AC_MSG_RESULT([-------------------------------------------------------------])
1987 PKG_CHECK_MODULES(ddjvuapi,[ddjvuapi >= 3.5.0], have_djvu=yes, have_djvu=no)
1991 if test "$have_djvu" = 'yes'; then
1992 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1993 DJVU_CFLAGS="$ddjvuapi_CFLAGS"
1994 DJVU_LIBS="$ddjvuapi_LIBS"
1995 CFLAGS="$ddjvuapi_CFLAGS $CFLAGS"
1998 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1999 AC_SUBST(DJVU_CFLAGS)
2002 dnl ===========================================================================
2005 # Check for fontconfig delegate library.
2007 AC_ARG_WITH([fontconfig],
2008 [AC_HELP_STRING([--without-fontconfig],
2009 [disable fontconfig support])],
2010 [with_fontconfig=$withval],
2011 [with_fontconfig='yes'])
2013 if test "$with_fontconfig" != 'yes'; then
2014 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
2017 have_fontconfig='no'
2018 FONTCONFIG_CFLAGS=""
2021 if test "x$with_fontconfig" = "xyes"; then
2022 AC_MSG_RESULT([-------------------------------------------------------------])
2023 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
2027 if test "$have_fontconfig" = 'yes'; then
2028 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
2029 CFLAGS="$FONTCONFIG_CFLAGS $CFLAGS"
2032 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
2033 AC_SUBST(FONTCONFIG_CFLAGS)
2034 AC_SUBST(FONTCONFIG_LIBS)
2036 dnl ===========================================================================
2039 # Check for the Freetype delegate library.
2041 AC_ARG_WITH([freetype],
2042 [AC_HELP_STRING([--without-freetype],
2043 [disable Freetype support])],
2044 [with_freetype=$withval],
2045 [with_freetype='yes'])
2047 if test "$with_freetype" != 'yes'; then
2048 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
2055 if test "x$with_freetype" = "xyes"; then
2056 AC_MSG_RESULT([-------------------------------------------------------------])
2057 PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no)
2061 if test "$have_freetype" = 'yes'; then
2062 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library)
2063 CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
2066 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
2067 AC_SUBST(FREETYPE_CFLAGS)
2068 AC_SUBST(FREETYPE_LIBS)
2070 dnl ===========================================================================
2073 # Check for the raqm delegate library.
2076 [AC_HELP_STRING([--without-raqm],
2077 [disable Raqm support])],
2078 [with_raqm=$withval],
2081 if test "$with_raqm" != 'yes'; then
2082 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-raqm=$with_raqm "
2089 if test "x$with_raqm" = "xyes"; then
2090 AC_MSG_RESULT([-------------------------------------------------------------])
2091 PKG_CHECK_MODULES(RAQM,[raqm], have_raqm=yes, have_raqm=no)
2095 if test "$have_raqm" = 'yes'; then
2096 AC_DEFINE(RAQM_DELEGATE,1,Define if you have RAQM library)
2097 CFLAGS="$RAQM_CFLAGS $CFLAGS"
2100 AM_CONDITIONAL(RAQM_DELEGATE, test "$have_raqm" = 'yes')
2101 AC_SUBST(RAQM_CFLAGS)
2104 dnl ===========================================================================
2107 # Check for Ghostscript library or framework.
2109 # Test for iapi.h & test for gsapi_new_instance in -lgs
2110 # or -framework Ghostscript
2112 AC_ARG_WITH([gslib],
2113 [AC_HELP_STRING([--with-gslib],
2114 [enable Ghostscript library support])],
2115 [with_gslib=$withval],
2118 gslib_framework='no'
2119 if test "$with_gslib" != 'yes'; then
2120 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
2125 if test "$with_gslib" != 'no'; then
2126 AC_MSG_RESULT([-------------------------------------------------------------])
2127 AC_MSG_CHECKING([for Ghostscript])
2132 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
2133 failed=`expr $failed + 1`,)
2134 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
2135 failed=`expr $failed + 1`,)
2136 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
2137 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
2138 AC_MSG_CHECKING([if Ghostscript package is complete])
2139 if test $passed -gt 0; then
2140 if test $failed -gt 0; then
2141 AC_MSG_RESULT([no -- some components failed test])
2142 have_gslib='no (failed tests)'
2144 if test $framework -gt 0; then
2145 GS_LIBS='-framework Ghostscript'
2146 gslib_framework='yes'
2147 AC_MSG_RESULT([yes, using framework.])
2149 AC_MSG_RESULT([yes, using library.])
2152 LIBS="$GS_LIBS $LIBS"
2153 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
2160 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
2163 # Set default font search path
2164 AC_ARG_WITH([fontpath],
2165 [AC_HELP_STRING([--with-fontpath=DIR],
2166 [prepend to default font search path])],
2167 [with_fontpath=$withval],
2170 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2173 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",[Define to prepend to default font search path.])
2175 if test "$with_fontpath=" != ''; then
2176 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2179 # Set Ghostscript font directory
2180 AC_ARG_WITH([gs-font-dir],
2181 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2182 [Ghostscript font directory])],
2183 [with_gs_font_dir=$withval],
2184 [with_gs_font_dir='default'])
2186 if test "$with_gs_font_dir" != 'default'; then
2187 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2190 dnl ===========================================================================
2193 # Check for GVC delegate library.
2196 [AC_HELP_STRING([--with-gvc],
2197 [enable GVC support])],
2198 [with_gvc=$withval],
2201 if test "$with_gvc" != 'yes'; then
2202 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2206 if test "x$with_gvc" = "xyes"; then
2207 AC_MSG_RESULT([-------------------------------------------------------------])
2208 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2212 if test "$have_gvc" = 'yes'; then
2213 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2214 CFLAGS="$GVC_CFLAGS $CFLAGS"
2217 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2218 AC_SUBST(GVC_CFLAGS)
2221 dnl ===========================================================================
2224 # Check for JBIG delegate library.
2228 [AC_HELP_STRING([--without-jbig],
2229 [disable JBIG support])],
2230 [with_jbig=$withval],
2235 if test "$with_jbig" != 'no'; then
2236 AC_MSG_RESULT([-------------------------------------------------------------])
2237 AC_MSG_CHECKING([for JBIG])
2241 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2242 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2243 AC_MSG_CHECKING([if JBIG package is complete])
2244 if test $passed -gt 0; then
2245 if test $failed -gt 0; then
2246 AC_MSG_RESULT([no -- some components failed test])
2247 have_jbig='no (failed tests)'
2250 LIBS="$JBIG_LIBS $LIBS"
2251 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2252 AC_MSG_RESULT([yes])
2259 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2262 dnl ===========================================================================
2265 # Check for JPEG delegate library.
2268 [AC_HELP_STRING([--without-jpeg],
2269 [disable JPEG support])],
2270 [with_jpeg=$withval],
2273 if test "$with_jpeg" != 'yes'; then
2274 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2279 if test "$with_jpeg" != 'no'; then
2280 AC_MSG_RESULT([-------------------------------------------------------------])
2281 AC_MSG_CHECKING([for JPEG])
2285 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2286 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2287 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2288 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2289 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2291 # Test for compatible JPEG library
2292 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2293 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2297 #include <jpeglib.h>
2299 changequote(<<, >>)dnl
2301 #if JPEG_LIB_VERSION < 62
2302 #error IJG JPEG library must be version 6b or newer!
2306 changequote([, ])dnl
2307 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2308 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2310 AC_MSG_CHECKING([if JPEG package is complete])
2311 if test $passed -gt 0; then
2312 if test $failed -gt 0; then
2313 AC_MSG_RESULT([no -- some components failed test])
2314 have_jpeg='no (failed tests)'
2317 LIBS="$JPEG_LIBS $LIBS"
2318 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2319 AC_MSG_RESULT([yes])
2326 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2329 dnl ===========================================================================
2332 # Check for LCMS delegate library.
2335 [ --without-lcms disable lcms (v1.1X) support],
2336 [with_lcms=$withval],
2338 if test "$with_lcms" != 'yes' ; then
2339 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2346 if test "x$with_lcms" = "xyes"; then
2347 AC_MSG_RESULT([-------------------------------------------------------------])
2348 PKG_CHECK_MODULES(LCMS2,[lcms2 >= 2.0.0], have_lcms=yes, have_lcms=no)
2352 if test "$have_lcms" = 'yes'; then
2353 AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library)
2354 LCMS_CFLAGS="$LCMS2_CFLAGS"
2355 LCMS_LIBS="$LCMS2_LIBS"
2356 CFLAGS="$LCMS2_CFLAGS $CFLAGS"
2357 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2358 if test "$have_lcms_header" = 'yes'; then
2359 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2361 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2365 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms" = 'yes')
2366 AC_SUBST(LCMS_CFLAGS)
2369 dnl ===========================================================================
2372 # Check for the OpenJP2 delegate library.
2374 AC_ARG_WITH([openjp2],
2375 [AC_HELP_STRING([--without-openjp2],
2376 [disable OpenJP2 support])],
2377 [with_openjp2=$withval],
2378 [with_openjp2='yes'])
2380 if test "$with_openjp2" != 'yes'; then
2381 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openjp2=$with_openjp2 "
2385 LIBOPENJP2_CFLAGS=""
2388 if test "x$with_openjp2" = "xyes"; then
2389 AC_MSG_RESULT([-------------------------------------------------------------])
2390 PKG_CHECK_MODULES(LIBOPENJP2,[libopenjp2 >= 2.1.0], have_openjp2=yes, have_openjp2=no)
2394 if test "$have_openjp2" = 'yes'; then
2395 AC_DEFINE(LIBOPENJP2_DELEGATE,1,Define if you have OPENJP2 library)
2396 CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS"
2399 AM_CONDITIONAL(LIBOPENJP2_DELEGATE, test "$have_openjp2" = 'yes')
2400 AC_SUBST(LIBOPENJP2_CFLAGS)
2401 AC_SUBST(LIBOPENJP2_LIBS)
2404 dnl ===========================================================================
2407 # Check for the LQR (Liquid Rescale) delegate library.
2410 [AC_HELP_STRING([--without-lqr],
2411 [disable Liquid Rescale support])],
2412 [with_lqr=$withval],
2415 if test "$with_lqr" != 'yes'; then
2416 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2423 if test "x$with_lqr" = "xyes"; then
2424 AC_MSG_RESULT([-------------------------------------------------------------])
2425 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2429 if test "$have_lqr" = 'yes'; then
2430 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2431 CFLAGS="$LQR_CFLAGS $CFLAGS"
2434 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2435 AC_SUBST(LQR_CFLAGS)
2438 dnl ===========================================================================
2440 # Disable LZMA (lzma library)
2442 [ --without-lzma disable LZMA support],
2443 [with_lzma=$withval],
2445 if test "$with_lzma" != 'yes' ; then
2446 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2450 if test "x$with_lzma" = "xyes"; then
2451 AC_MSG_RESULT([-------------------------------------------------------------])
2452 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2456 if test "$have_lzma" = 'yes'; then
2457 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2458 CFLAGS="$LZMA_CFLAGS $CFLAGS"
2461 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2462 AC_SUBST(LZMA_CFLAGS)
2465 dnl ===========================================================================
2468 # Check for the OpenEXR delegate library.
2470 AC_ARG_WITH([openexr],
2471 [AC_HELP_STRING([--without-openexr],
2472 [disable OpenEXR support])],
2473 [with_openexr=$withval],
2474 [with_openexr='yes'])
2476 if test "$with_openexr" != 'yes'; then
2477 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2484 if test "x$with_openexr" = "xyes"; then
2485 AC_MSG_RESULT([-------------------------------------------------------------])
2486 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2490 if test "$have_openexr" = 'yes'; then
2491 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2492 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2495 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2496 AC_SUBST(OPENEXR_CFLAGS)
2497 AC_SUBST(OPENEXR_LIBS)
2499 dnl ===========================================================================
2502 # Check for PANGO delegate library.
2504 AC_ARG_WITH([pango],
2505 [AC_HELP_STRING([--without-pango],
2506 [disable PANGO support])],
2507 [with_pango=$withval],
2510 if test "$with_pango" != 'yes'; then
2511 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2515 have_pangocairo='no'
2519 if test "x$with_pango" = "xyes"; then
2520 AC_MSG_RESULT([-------------------------------------------------------------])
2521 PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
2523 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2527 if test "$have_pango" = 'yes'; then
2528 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2529 CFLAGS="$PANGO_CFLAGS $CFLAGS"
2532 if test "$have_pangocairo" = 'yes'; then
2533 AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
2534 CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
2537 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2538 AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes')
2539 AC_SUBST(PANGO_CFLAGS)
2540 AC_SUBST(PANGO_LIBS)
2542 dnl ===========================================================================
2545 # Check for PNG delegate library.
2548 [AC_HELP_STRING([--without-png],
2549 [disable PNG support])],
2550 [with_png=$withval],
2553 if test "$with_png" != 'yes'; then
2554 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2561 if test "x$with_png" = "xyes"; then
2562 AC_MSG_RESULT([-------------------------------------------------------------])
2563 PKG_CHECK_MODULES(PNG,[libpng >= 1.0.0], have_png=yes, have_png=no)
2567 if test "$have_png" = 'yes'; then
2568 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2569 CFLAGS="$PNG_CFLAGS $CFLAGS"
2572 AM_CONDITIONAL(PNG_DELEGATE, test "$have_png" = 'yes')
2573 AC_SUBST(PNG_CFLAGS)
2576 dnl ===========================================================================
2579 # Check for RSVG delegate library.
2582 [AC_HELP_STRING([--with-rsvg],
2583 [enable RSVG support])],
2584 [with_rsvg=$withval],
2587 if test "$with_rsvg" != 'yes'; then
2588 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2596 if test "x$with_rsvg" = "xyes"; then
2597 AC_MSG_RESULT([-------------------------------------------------------------])
2598 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2600 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2604 if test "$have_rsvg" = 'yes'; then
2605 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2606 CFLAGS="$RSVG_CFLAGS $CFLAGS"
2609 if test "$have_cairo" = 'yes'; then
2610 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2611 CFLAGS="$CAIRO_SVG_CFLAGS $CFLAGS"
2614 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2615 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2616 AC_SUBST(RSVG_CFLAGS)
2619 dnl ===========================================================================
2622 # Check for TIFF delegate library.
2625 [AC_HELP_STRING([--without-tiff],
2626 [disable TIFF support])],
2627 [with_tiff=$withval],
2630 if test "$with_tiff" != 'yes'; then
2631 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2636 if test "$with_tiff" != 'no'; then
2637 AC_MSG_RESULT([-------------------------------------------------------------])
2638 AC_MSG_CHECKING([for TIFF])
2642 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2643 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2644 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2645 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2646 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2647 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2648 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2649 AC_MSG_CHECKING([if TIFF package is complete])
2650 if test $passed -gt 0; then
2651 if test $failed -gt 0; then
2652 AC_MSG_RESULT([no -- some components failed test])
2653 have_tiff='no (failed tests)'
2656 LIBS="$TIFF_LIBS $LIBS"
2657 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2658 AC_MSG_RESULT([yes])
2660 AC_CHECK_HEADERS(tiffconf.h)
2661 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2662 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2663 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2664 TIFFSwabArrayOfTriples])
2670 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2673 dnl ===========================================================================
2676 # Check for WEBP delegate library.
2679 [AC_HELP_STRING([--without-webp],
2680 [disable WEBP support])],
2681 [with_webp=$withval],
2684 if test "$with_webp" != 'yes'; then
2685 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2690 if test "$with_webp" != 'no'; then
2691 AC_MSG_RESULT([-------------------------------------------------------------])
2692 AC_MSG_CHECKING([for WEBP])
2696 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2697 AC_CHECK_LIB(webp,WebPPictureInitInternal,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2698 AC_MSG_CHECKING([if WEBP package is complete])
2699 if test $passed -gt 0; then
2700 if test $failed -gt 0; then
2701 AC_MSG_RESULT([no -- some components failed test])
2702 have_webp='no (failed tests)'
2705 LIBS="$WEBP_LIBS $LIBS"
2706 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2707 AC_MSG_RESULT([yes])
2714 AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2717 dnl ===========================================================================
2720 # Set Windows font directory.
2722 AC_ARG_WITH([windows-font-dir],
2723 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2724 [Windows font directory])],
2725 [with_windows_font_dir=$withval],
2726 [with_windows_font_dir='default'])
2728 if test "$with_windows_font_dir" != 'default'; then
2729 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2732 dnl ===========================================================================
2735 # Check for WMF delegate library.
2738 [AC_HELP_STRING([--with-wmf],
2739 [enable WMF support])],
2740 [with_wmf=$withval],
2743 if test "$with_wmf" != 'yes'; then
2744 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2751 if test "$with_wmf" != 'no'; then
2752 AC_MSG_CHECKING([for WMF support ])
2755 have_libwmflite='no'
2756 have_libwmf_ipa_h='no'
2758 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],[],[$FT2BUILD_H])
2759 if test "$have_libwmf_ipa_h" = 'yes'; then
2760 AC_CHECK_LIB([wmflite],[wmf_lite_create],[have_libwmflite='yes'],[],[])
2761 if test "$have_libwmflite" = 'yes'; then
2762 AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
2763 WMF_LIBS='-lwmflite'
2764 LIBS="$WMF_LIBS $LIBS"
2767 AC_MSG_RESULT([no -- some components failed test])
2768 have_wmf='no (failed tests)'
2769 have_wmflite='no (failed tests)'
2775 AC_MSG_CHECKING([if WMF package is complete ])
2776 if test "$have_wmf" = 'yes'; then
2777 AC_MSG_RESULT([yes])
2781 AM_CONDITIONAL([WMF_DELEGATE], [test "$have_wmf" = 'yes'])
2782 AC_SUBST([WMF_CFLAGS])
2783 AC_SUBST([WMF_LIBS])
2785 dnl ===========================================================================
2788 # Check for XML delegate library.
2791 [AC_HELP_STRING([--without-xml],
2792 [disable XML support])],
2793 [with_xml=$withval],
2796 if test "$with_xml" != 'yes' ; then
2797 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2804 if test "x$with_xml" = "xyes"; then
2805 AC_MSG_RESULT([-------------------------------------------------------------])
2806 PKG_CHECK_MODULES(XML,[libxml-2.0 >= 2.0.0], have_xml=yes, have_xml=no)
2810 if test "$have_xml" = 'yes'; then
2811 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2812 CFLAGS="$XML_CFLAGS $CFLAGS"
2815 AM_CONDITIONAL(XML_DELEGATE, test "$have_xml" = 'yes')
2816 AC_SUBST(XML_CFLAGS)
2819 dnl ===========================================================================
2821 # Substitute compiler name to build/link PerlMagick
2823 AC_SUBST([PERLMAINCC])
2826 # Configure install Paths
2829 # Path to ImageMagick header files
2830 INCLUDE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
2831 INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}"
2832 DEFINE_INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}/"
2833 case "${build_os}" in
2835 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2838 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick headers live.])
2839 AC_SUBST(INCLUDE_PATH)
2841 # Path to ImageMagick header files (arch part)
2842 INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
2843 DEFINE_INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
2844 case "${build_os}" in
2846 DEFINE_INCLUDEARCH_PATH=`$WinPathScript "$DEFINE_INCLUDEARCH_PATH" 1`
2849 AC_DEFINE_UNQUOTED(INCLUDEARCH_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick architecture headers live.])
2850 AC_SUBST(INCLUDEARCH_PATH)
2852 # Subdirectory under lib to place ImageMagick lib files
2853 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2854 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",[Subdirectory of lib where ImageMagick architecture dependent files are installed.])
2856 # Path to ImageMagick bin directory
2857 EXECUTABLE_PATH="${BIN_DIR}"
2858 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2859 case "${build_os}" in
2861 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2864 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",[Directory where executables are installed.])
2865 AC_SUBST(EXECUTABLE_PATH)
2867 # Path to ImageMagick lib
2868 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2869 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2870 case "${build_os}" in
2872 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2875 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",[Directory where architecture-dependent files live.])
2876 AC_SUBST(LIBRARY_PATH)
2879 # path to local binaries
2880 if test "x$LIB_BIN_BASEDIRNAME" = "x"; then
2881 LIB_BIN_BASEDIRNAME="bin"
2883 AC_DEFINE_UNQUOTED(LIB_BIN_BASEDIRNAME,"$LIB_BIN_BASEDIRNAME",[Binaries in libraries path base name (will be during install linked to bin)])
2884 AC_SUBST(LIB_BIN_BASEDIRNAME)
2886 if test "x$LIB_BIN_DIR" = "x"; then
2887 LIB_BIN_DIR=${LIB_BIN_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
2889 AC_SUBST(LIB_BIN_DIR)
2891 LIB_BIN_DIR_RELATIVE_PATH=$LIB_BIN_DIR
2892 AC_SUBST(LIB_BIN_DIR_RELATIVE_PATH)
2893 LIB_BIN_DIR_PATH="${LIBRARY_PATH}/${LIB_BIN_DIR_RELATIVE_PATH}"
2894 AC_SUBST(LIB_BIN_DIR_PATH)
2897 # path to modules lib
2898 if test "x$MODULES_BASEDIRNAME" = "x"; then
2899 MODULES_BASEDIRNAME="modules"
2901 AC_DEFINE_UNQUOTED(MODULES_BASEDIRNAME,"$MODULES_BASEDIRNAME",[Module directory name without ABI part.])
2902 AC_SUBST(MODULES_BASEDIRNAME)
2904 if test "x$MODULES_DIRNAME" = "x"; then
2905 MODULES_DIRNAME=${MODULES_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
2907 AC_DEFINE_UNQUOTED(MODULES_DIRNAME,"$MODULES_DIRNAME",[Module directory dirname])
2909 AC_SUBST(MODULES_DIRNAME)
2911 MODULES_RELATIVE_PATH="${MODULES_DIRNAME}"
2912 AC_SUBST(MODULES_RELATIVE_PATH)
2913 MODULES_PATH="${LIBRARY_PATH}/${MODULES_RELATIVE_PATH}"
2914 AC_SUBST(MODULES_PATH)
2917 # path to coders lib
2918 if test "x$CODER_DIRNAME" = "x"; then
2919 CODER_DIRNAME="coders"
2921 AC_DEFINE_UNQUOTED(CODER_DIRNAME,"$CODER_DIRNAME",[coders subdirectory.])
2922 AC_SUBST(CODER_DIRNAME)
2924 CODER_RELATIVE_PATH="${CODER_DIRNAME}"
2925 CODER_PATH="${MODULES_PATH}/${CODER_DIRNAME}"
2926 AC_SUBST(CODER_PATH)
2929 # Subdirectory under lib to place ImageMagick filter module files
2931 # path to coders lib
2932 if test "x$FILTER_DIRNAME" = "x"; then
2933 FILTER_DIRNAME="filters"
2935 AC_DEFINE_UNQUOTED(FILTER_DIRNAME,"$FILTER_DIRNAME",[filter subdirectory.])
2936 AC_SUBST(FILTER_DIRNAME)
2938 FILTER_RELATIVE_PATH="${FILTER_DIRNAME}"
2939 FILTER_PATH="${MODULES_PATH}/${FILTER_DIRNAME}"
2940 AC_SUBST(FILTER_PATH)
2943 # Path to ImageMagick documentation files
2944 DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
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)
2956 # Enable/Disable documentation
2957 AC_ARG_ENABLE([docs],
2958 [AS_HELP_STRING([--disable-docs],
2959 [disable building of documentation])],
2960 wantdocs=$enableval, wantdocs=yes)
2961 AM_CONDITIONAL([INSTALL_DOC], [test "$wantdocs" = "yes"])
2963 # Subdirectory to place architecture-dependent configuration files
2964 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
2965 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",[Subdirectory of lib where architecture-dependent configuration files live.])
2966 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2967 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2968 case "${build_os}" in
2970 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
2973 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",[Directory where architecture-dependent configuration files live.])
2974 AC_SUBST(CONFIGURE_PATH)
2976 # Subdirectory to place architecture-independent configuration files
2977 SHARE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
2978 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",[Subdirectory of lib where architecture-independent configuration files live.])
2979 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
2980 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
2981 case "${build_os}" in
2983 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
2986 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",[Directory where architecture-independent configuration files live.])
2987 AC_SUBST(SHARE_PATH)
2990 # Subdirectory to place architecture-dependent configuration files.
2991 if test "x$SHAREARCH_BASEDIRNAME" = "x"; then
2992 SHAREARCH_BASEDIRNAME="config"
2994 AC_DEFINE_UNQUOTED(SHAREARCH_BASEDIRNAME,"$SHAREARCH_BASEDIRNAME",[Sharearch directory name without ABI part.])
2995 AC_SUBST(SHAREARCH_BASEDIRNAME)
2997 if test "x$SHAREARCH_DIRNAME" = "x"; then
2998 SHAREARCH_DIRNAME=${SHAREARCH_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3000 AC_DEFINE_UNQUOTED(SHAREARCH_DIRNAME,"$SHAREARCH_DIRNAME",[Sharearch directory dirname])
3002 AC_SUBST(SHAREARCH_DIRNAME)
3004 SHAREARCH_RELATIVE_PATH="${SHAREARCH_DIRNAME}"
3005 AC_SUBST(SHAREARCH_RELATIVE_PATH)
3006 SHAREARCH_PATH="${LIBRARY_PATH}/${SHAREARCH_RELATIVE_PATH}"
3007 AC_SUBST(SHAREARCH_PATH)
3010 # program_transform_name is formed for use in a Makefile, so create a
3011 # modified version for use in a shell script.
3012 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3014 # Default delegate definitions
3015 AC_MSG_RESULT([-------------------------------------------------------------])
3016 AC_MSG_CHECKING([for ImageMagick delegate programs])
3018 AutotraceDecodeDelegateDefault='autotrace'
3019 BPGDecodeDelegateDefault='bpgdec'
3020 BPGEncodeDelegateDefault='bpgenc'
3021 BlenderDecodeDelegateDefault='blender'
3022 BZIPDelegateDefault='bzip2'
3023 BrowseDelegateDefault='xdg-open'
3024 CatDelegateDefault='cat'
3025 DNGDecodeDelegateDefault='ufraw-batch'
3026 DOCDecodeDelegateDefault='soffice'
3027 GVCDecodeDelegateDefault='dot'
3028 DVIDecodeDelegateDefault='dvips'
3029 EchoDelegateDefault='echo'
3030 EditorDelegateDefault='xterm'
3031 ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
3032 DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
3033 MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
3034 GnuplotDecodeDelegateDefault='gnuplot'
3035 HPGLDecodeDelegateDefault='hp2xx'
3036 HTMLDecodeDelegateDefault='html2ps'
3037 ILBMDecodeDelegateDefault='ilbmtoppm'
3038 ILBMEncodeDelegateDefault='ppmtoilbm'
3039 JXRDecodeDelegateDefault='JxrDecApp'
3040 JXREncodeDelegateDefault='JxrEncApp'
3041 LPDelegateDefault='lp'
3042 LPRDelegateDefault='lpr'
3043 LaunchDelegateDefault='gimp'
3044 MANDelegateDefault='groff'
3045 MPEGDecodeDelegateDefault='avconv'
3046 MPEGEncodeDelegateDefault='avconv'
3047 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3048 MVDelegateDefault='mv'
3049 PCLDelegateDefault='pcl6'
3050 PGPDecodeDelegateDefault='pgpv'
3051 POVDelegateDefault='povray'
3052 if test "$native_win32_build" = 'yes'; then
3053 PSDelegateDefault='gswin32c'
3054 elif test "$gslib_framework" = 'yes'; then
3055 PSDelegateDefault='gsc'
3057 PSDelegateDefault='gs'
3059 RLEEncodeDelegateDefault='rawtorle'
3060 RMDelegateDefault='rm'
3061 RSVGDecodeDelegateDefault='rsvg-convert'
3062 SCANDecodeDelegateDefault='scanimage'
3063 SVGDecodeDelegateDefault='inkscape'
3064 TXTDelegateDefault='enscript'
3065 UniconvertorDelegateDefault='uniconvertor'
3066 WebPDecodeDelegateDefault='dwebp'
3067 WebPEncodeDelegateDefault='cwebp'
3068 WMFDecodeDelegateDefault='wmf2eps'
3069 WWWDecodeDelegateDefault='curl'
3070 XPSDelegateDefault='gxps'
3071 ZipDelegateDefault='gzip'
3073 # Search for delegates
3074 AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
3075 AC_PATH_PROG(BPGDecodeDelegate, "$BPGDecodeDelegateDefault", "$BPGDecodeDelegateDefault")
3076 AC_PATH_PROG(BPGEncodeDelegate, "$BPGEncodeDelegateDefault", "$BPGEncodeDelegateDefault")
3077 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3078 AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
3079 AC_PATH_PROGS(BrowseDelegate, "$BrowseDelegateDefault" google-chrome firefox konqueror mozilla lynx, "$BrowseDelegateDefault")
3080 AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
3081 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3082 AC_PATH_PROG(DOCDecodeDelegate, "$DOCDecodeDelegateDefault", "$DOCDecodeDelegateDefault")
3083 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3084 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3085 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3086 AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
3087 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3088 AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
3089 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3090 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3091 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3092 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3093 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3094 AC_PATH_PROG(JXRDecodeDelegate, "$JXRDecodeDelegateDefault", "$JXRDecodeDelegateDefault")
3095 AC_PATH_PROG(JXREncodeDelegate, "$JXREncodeDelegateDefault", "$JXREncodeDelegateDefault")
3096 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3097 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3098 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3099 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
3100 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3101 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3102 if test "$MPEGDecodeDelegate" = "$MPEGDecodeDelegateDefault" ; then
3103 MPEGDecodeDelegateDefault='ffmpeg'
3104 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3106 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3107 if test "$MPEGEncodeDelegate" = "$MPEGEncodeDelegateDefault" ; then
3108 MPEGEncodeDelegateDefault='ffmpeg'
3109 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3111 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3112 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3113 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3114 AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
3115 AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
3116 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3117 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
3118 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3119 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3120 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
3121 AC_PATH_PROG(SVGDecodeDelegate, "$SVGDecodeDelegateDefault", "$SVGDecodeDelegateDefault")
3122 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
3123 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3124 AC_PATH_PROG(WebPDecodeDelegate, "$WebPDecodeDelegateDefault", "$WebPDecodeDelegateDefault")
3125 AC_PATH_PROG(WebPEncodeDelegate, "$WebPEncodeDelegateDefault", "$WebPEncodeDelegateDefault")
3126 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
3127 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
3128 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3129 AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
3131 # Prefer lpr to lp; lp needs options tacked on.
3132 if test "$LPRDelegate" != no; then
3133 PrintDelegate="$LPRDelegate"
3135 PrintDelegate="$LPDelegate -c -s"
3137 AC_SUBST(PrintDelegate)
3139 # Installed ImageMagick utiltity paths
3140 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3141 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3142 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3144 # Set delegate booleans
3145 have_avconv='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_avconv='yes'; fi
3146 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3147 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3148 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3149 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3150 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3151 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3152 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3155 # Test for font directories
3157 type_include_files=''
3160 AC_MSG_CHECKING(for Apple fonts directory)
3162 if test "${with_apple_font_dir}" != 'default'; then
3163 apple_font_dir="${with_apple_font_dir}/"
3165 for font_dir in '/Library/Fonts/'; do
3166 if test -f "${font_dir}Arial.ttf"; then
3167 apple_font_dir="${font_dir}"
3172 if test "${apple_font_dir}x" != 'x'; then
3173 type_include_files="${type_include_files} "'<include file="type-apple.xml" />'
3174 AC_MSG_RESULT([$apple_font_dir])
3176 AC_MSG_RESULT([not found!]);
3178 AC_SUBST(apple_font_dir)
3181 AC_MSG_CHECKING(for Dejavu fonts directory)
3183 if test "${with_dejavu_font_dir}" != 'default'; then
3184 dejavu_font_dir="${with_dejavu_font_dir}/"
3186 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3187 if test -f "${font_dir}DejaVuSerif.ttf"; then
3188 dejavu_font_dir="${font_dir}"
3193 if test "${dejavu_font_dir}x" != 'x'; then
3194 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3195 AC_MSG_RESULT([$dejavu_font_dir])
3197 AC_MSG_RESULT([not found!]);
3199 AC_SUBST(dejavu_font_dir)
3202 AC_MSG_CHECKING(for Ghostscript fonts directory)
3203 ghostscript_font_dir=''
3204 if test "${with_gs_font_dir}" != 'default'; then
3205 ghostscript_font_dir="${with_gs_font_dir}/"
3207 if test "${native_win32_build}" = 'yes'; then
3208 # Native Windows Build
3209 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3210 if test -f "${font_dir}a010013l.pfb"; then
3211 ghostscript_font_dir="$font_dir"
3215 if test "${PSDelegate}" != 'gswin32c'; then
3216 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3219 # Linux / Mac OS X / Unix Build
3220 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
3221 if test -f "${font_dir}a010013l.pfb"; then
3222 ghostscript_font_dir="${font_dir}"
3226 if test "${ghostscript_font_dir}x" = 'x'; then
3227 if test "$PSDelegate" != 'gs'; then
3228 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3233 if test "${ghostscript_font_dir}x" != 'x'; then
3234 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3235 AC_MSG_RESULT([$ghostscript_font_dir])
3237 AC_MSG_RESULT([not found!]);
3239 AC_SUBST(ghostscript_font_dir)
3240 case "${build_os}" in
3242 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3247 AC_MSG_CHECKING(for Windows fonts directory)
3249 if test "${with_windows_font_dir}" != 'default'; then
3250 windows_font_dir="${with_windows_font_dir}/"
3252 for font_dir in '/usr/X11R6/lib/X11/fonts/truetype/' '/usr/X11R7/lib/X11/fonts/truetype/' '/usr/share/fonts/msttcore/'; do
3253 if test -f "${font_dir}arial.ttf"; then
3254 windows_font_dir="${font_dir}"
3259 if test "${windows_font_dir}x" != 'x'; then
3260 type_include_files="${type_include_files} "'<include file="type-windows.xml" />'
3261 AC_MSG_RESULT([$windows_font_dir])
3263 AC_MSG_RESULT([not found!]);
3265 AC_SUBST(windows_font_dir)
3267 AC_SUBST(type_include_files)
3270 # Handle case where user doesn't want frozen paths
3272 if test "$with_frozenpaths" != 'yes'; then
3273 # Re-set delegate definitions to default (no paths)
3274 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
3275 BPGDecodeDelegate="$BPGDecodeDelegateDefault"
3276 BPGEncodeDelegate="$BPGEncodeDelegateDefault"
3277 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3278 BZIPDelegate="$BZIPDelegateDefault"
3279 BrowseDelegate="$BrowseDelegateDefault"
3280 CatDelegate="$CatDelegateDefault"
3281 ConvertDelegate="$ConvertDelegateDefault"
3282 DisplayDelegate="$DisplayDelegateDefault"
3283 DNGDecodeDelegate="$DNGDecodeDelegateDefault"
3284 DOCDecodeDelegate="$DOCDecodeDelegateDefault"
3285 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3286 EchoDelegate="$EchoDelegateDefault"
3287 EditorDelegate="$EditorDelegateDefault"
3288 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3289 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3290 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3291 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3292 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3293 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3294 JXRDecodeDelegate="$JXRDecodeDelegateDefault"
3295 JXREncodeDelegate="$JXREncodeDelegateDefault"
3296 LPDelegate="$LPDelegateDefault"
3297 LaunchDelegate="$LaunchDelegateDefault"
3298 MANDelegate="$MANDelegateDefault"
3299 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3300 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3301 MogrifyDelegate="$MogrifyDelegateDefault"
3302 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3303 MVDelegate="$MVDelegateDefault"
3304 PCLDelegate="$PCLDelegateDefault"
3305 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3306 POVDelegate="$POVDelegateDefault"
3307 PSDelegate="$PSDelegateDefault"
3308 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3309 RMDelegate="$RMDelegateDefault"
3310 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3311 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3312 SVGDecodeDelegate="$SVGDecodeDelegateDefault"
3313 ShowImageDelegate="$ShowImageDelegateDefault"
3314 TXTDelegate="$TXTDelegateDefault"
3315 UniconvertorDelegate="$UniconvertorDelegateDefault"
3316 WebPDecodeDelegate="$WebPDecodeDelegateDefault"
3317 WebPEncodeDelegate="$WebPEncodeDelegateDefault"
3318 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3319 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3320 XPSDelegate="$XPSDelegateDefault"
3321 ZipDelegate="$ZipDelegateDefault"
3324 # Delegate substitutions
3325 AC_SUBST(AutotraceDecodeDelegate)
3326 AC_SUBST(BPGDecodeDelegate)
3327 AC_SUBST(BPGEncodeDelegate)
3328 AC_SUBST(BlenderDecodeDelegate)
3329 AC_SUBST(BZIPDelegate)
3330 AC_SUBST(BrowseDelegate)
3331 AC_SUBST(CatDelegate)
3332 AC_SUBST(ConvertDelegate)
3333 AC_SUBST(GVCDecodeDelegate)
3334 AC_SUBST(DVIDecodeDelegate)
3335 AC_SUBST(EchoDelegate)
3336 AC_SUBST(EditorDelegate)
3337 AC_SUBST(GnuplotDecodeDelegate)
3338 AC_SUBST(HPGLDecodeDelegate)
3339 AC_SUBST(HTMLDecodeDelegate)
3340 AC_SUBST(ILBMDecodeDelegate)
3341 AC_SUBST(ILBMEncodeDelegate)
3342 AC_SUBST(JXRDecodeDelegate)
3343 AC_SUBST(JXREncodeDelegate)
3344 AC_SUBST(LPDelegate)
3345 AC_SUBST(LaunchDelegate)
3346 AC_SUBST(MANDelegate)
3347 AC_SUBST(MPEGDecodeDelegate)
3348 AC_SUBST(MPEGEncodeDelegate)
3349 AC_SUBST(MogrifyDelegate)
3350 AC_SUBST(MrSIDDecodeDelegate)
3351 AC_SUBST(MVDelegate)
3352 AC_SUBST(PCLDelegate)
3353 AC_SUBST(PGPDecodeDelegate)
3354 AC_SUBST(POVDelegate)
3355 AC_SUBST(PSDelegate)
3356 AC_SUBST(RLEEncodeDelegate)
3357 AC_SUBST(RMDelegate)
3358 AC_SUBST(SCANDecodeDelegate)
3359 AC_SUBST(ShowImageDelegate)
3360 AC_SUBST(TXTDelegate)
3361 AC_SUBST(UniconvertorDelegate)
3362 AC_SUBST(WMFDecodeDelegate)
3363 AC_SUBST(WebPDecodeDelegate)
3364 AC_SUBST(WebPEncodeDelegate)
3365 AC_SUBST(WWWDecodeDelegate)
3366 AC_SUBST(XPSDelegate)
3367 AC_SUBST(ZipDelegate)
3373 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3374 AC_CHECK_PROGS(PERL,perl)
3375 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3376 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3377 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3378 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3379 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3381 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3384 # 7ZIP support (http://p7zip.sourceforge.net/)
3387 AC_CHECK_PROGS(P7ZIP,[7za])
3389 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3392 # ZIP support (http://www.info-zip.org/Zip.html)
3395 AC_CHECK_PROGS(ZIP,[zip])
3397 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3400 # GhostPCL related configuration.
3402 PCLColorDevice=ppmraw
3403 PCLCMYKDevice=pamcmyk32
3404 PCLMonoDevice=pbmraw
3405 if test -z "$PCLVersion"; then
3406 PCLVersion='unknown'
3408 if test $have_pcl = 'yes'; then
3409 AC_MSG_RESULT([-------------------------------------------------------------])
3410 AC_MSG_CHECKING([for PCL])
3413 AC_MSG_CHECKING([for pcl color device])
3414 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3417 PCLColorDevice=ppmraw
3419 AC_MSG_RESULT([$PCLColorDevice])
3422 AC_MSG_CHECKING([for pcl CMYK device])
3423 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3426 PCLCMYKDevice=$PCLColorDevice
3428 AC_MSG_RESULT([$PCLCMYKDevice])
3431 AC_MSG_CHECKING([for pcl mono device])
3432 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3435 PCLMonoDevice=$PCLColorDevice
3437 AC_MSG_RESULT([$PCLMonoDevice])
3440 AC_SUBST(PCLMonoDevice)
3441 AC_SUBST(PCLColorDevice)
3442 AC_SUBST(PCLCMYKDevice)
3443 AC_SUBST(PCLVersion)
3446 # GhostXPS related configuration.
3448 XPSColorDevice=ppmraw
3449 XPSCMYKDevice=bmpsep8
3450 XPSMonoDevice=pbmraw
3451 if test -z "$XPSVersion"; then
3452 XPSVersion='unknown'
3454 if test $have_xps = 'yes'; then
3455 AC_MSG_RESULT([-------------------------------------------------------------])
3456 AC_MSG_CHECKING([for XPS])
3459 AC_MSG_CHECKING([for xps color device])
3460 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3463 XPSColorDevice=ppmraw
3465 AC_MSG_RESULT([$XPSColorDevice])
3468 AC_MSG_CHECKING([for xps CMYK device])
3469 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3472 XPSCMYKDevice=$XPSColorDevice
3474 AC_MSG_RESULT([$XPSCMYKDevice])
3477 AC_MSG_CHECKING([for xps mono device])
3478 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3481 XPSMonoDevice=$XPSColorDevice
3483 AC_MSG_RESULT([$XPSMonoDevice])
3486 AC_SUBST(XPSMonoDevice)
3487 AC_SUBST(XPSColorDevice)
3488 AC_SUBST(XPSCMYKDevice)
3489 AC_SUBST(XPSVersion)
3492 # Ghostscript related configuration.
3494 GSAlphaDevice=pngalpha
3495 GSColorDevice=pnmraw
3496 GSCMYKDevice=pamcmyk32
3498 GSPDFDevice=pdfwrite
3500 GSEPSDevice=eps2write
3502 if test $have_gs = 'yes'; then
3503 AC_MSG_RESULT([-------------------------------------------------------------])
3504 AC_MSG_CHECKING([for Ghostscript])
3506 AC_MSG_CHECKING([for Ghostscript version])
3507 if GSVersion=`$PSDelegate --version`; then
3510 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3512 AC_MSG_RESULT([$GSVersion])
3515 AC_MSG_CHECKING([for gs color device])
3516 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3519 GSColorDevice=ppmraw
3521 AC_MSG_RESULT([$GSColorDevice])
3524 AC_MSG_CHECKING([for gs alpha device])
3525 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3528 GSAlphaDevice=$GSColorDevice
3530 AC_MSG_RESULT([$GSAlphaDevice])
3533 AC_MSG_CHECKING([for gs CMYK device])
3534 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3539 AC_MSG_RESULT([$GSCMYKDevice])
3542 AC_MSG_CHECKING([for gs mono device])
3543 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3546 GSMonoDevice=$GSColorDevice
3548 AC_MSG_RESULT([$GSMonoDevice])
3551 AC_MSG_CHECKING([for gs PDF writing device])
3552 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3555 GSPDFDevice=nodevice
3557 AC_MSG_RESULT([$GSPDFDevice])
3560 AC_MSG_CHECKING([for gs PS writing device])
3561 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3566 AC_MSG_RESULT([$GSPSDevice])
3569 AC_MSG_CHECKING([for gs EPS writing device])
3570 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3573 GSEPSDevice=epswrite
3575 AC_MSG_RESULT([$GSEPSDevice])
3578 AC_SUBST(GSAlphaDevice)
3579 AC_SUBST(GSCMYKDevice)
3580 AC_SUBST(GSColorDevice)
3581 AC_SUBST(GSEPSDevice)
3582 AC_SUBST(GSMonoDevice)
3583 AC_SUBST(GSPDFDevice)
3584 AC_SUBST(GSPSDevice)
3588 # PerlMagick-related configuration
3591 # Look for PERL if PerlMagick requested
3592 # If name/path of desired PERL interpreter is specified, look for that one first
3594 if test "$with_perl" != 'no'; then
3595 AC_MSG_RESULT([-------------------------------------------------------------])
3596 AC_MSG_CHECKING([for Perl])
3598 if test "$with_perl" != 'yes'; then
3599 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3600 PERL=$ac_cv_path_PERL
3602 have_perl="$ac_cv_path_PERL"
3604 AC_PATH_PROGS(PERL,perl perl5,)dnl
3605 if test "$ac_cv_path_PERL"; then
3606 have_perl="$ac_cv_path_PERL"
3611 if test "$with_perl" != 'yes' ; then
3612 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3615 PERL_SUPPORTS_DESTDIR='no'
3617 with_perl_static='no'
3618 with_perl_dynamic='no'
3619 if test "$have_perl" != 'no'; then
3620 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3621 with_perl_static='yes'
3623 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3624 with_perl_dynamic='yes'
3626 # Is PERL's MakeMaker new enough to support DESTDIR?
3627 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3629 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3630 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3631 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3632 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3634 # Determine path to pick up MagickCore library from for use with building PerlMagick
3635 MAGICKCORE_PATH="${LIB_DIR}"
3636 if test $with_perl_static = 'yes'; then
3637 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3638 libtool_objdir=$objdir
3640 # Linker search path to library, followed by -lMagickCore
3641 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3643 AC_SUBST(MAGICKCORE_PATH)
3645 # Create a simple string containing format names for all delegate libraries.
3647 if test "$have_autotrace" = 'yes' ; then
3648 MAGICK_DELEGATES="$MAGICK_DELEGATES autotrace"
3650 if test "$have_bzlib" = 'yes' ; then
3651 MAGICK_DELEGATES="$MAGICK_DELEGATES bzlib"
3653 if test "$have_dps" = 'yes' ; then
3654 MAGICK_DELEGATES="$MAGICK_DELEGATES dps"
3656 if test "$have_djvu" = 'yes' ; then
3657 MAGICK_DELEGATES="$MAGICK_DELEGATES djvu"
3659 if test "$have_avconv" = 'yes' ; then
3660 MAGICK_DELEGATES="$MAGICK_DELEGATES mpeg"
3662 if test "$have_fftw" = 'yes' ; then
3663 MAGICK_DELEGATES="$MAGICK_DELEGATES fftw"
3665 if test "$have_flif" = 'yes' ; then
3666 MAGICK_DELEGATES="$MAGICK_DELEGATES flif"
3668 if test "$have_fpx" = 'yes' ; then
3669 MAGICK_DELEGATES="$MAGICK_DELEGATES fpx"
3671 if test "$have_fontconfig" = 'yes' ; then
3672 MAGICK_DELEGATES="$MAGICK_DELEGATES fontconfig"
3674 if test "$have_freetype" = 'yes' ; then
3675 MAGICK_DELEGATES="$MAGICK_DELEGATES freetype"
3677 if test "$have_gslib" = 'yes' ; then
3678 MAGICK_DELEGATES="$MAGICK_DELEGATES gslib"
3680 if test "$have_jbig" = 'yes' ; then
3681 MAGICK_DELEGATES="$MAGICK_DELEGATES jbig"
3683 if test "$have_png$have_jpeg" = 'yesyes' ; then
3684 MAGICK_DELEGATES="$MAGICK_DELEGATES jng"
3686 if test "$have_jpeg" = 'yes' ; then
3687 MAGICK_DELEGATES="$MAGICK_DELEGATES jpeg"
3689 if test "$have_lcms" = 'yes' || test "$have_lcms2" = 'yes' ; then
3690 MAGICK_DELEGATES="$MAGICK_DELEGATES lcms"
3692 if test "$have_lqr" = 'yes' ; then
3693 MAGICK_DELEGATES="$MAGICK_DELEGATES lqr"
3695 if test "$have_lzma" = 'yes' ; then
3696 MAGICK_DELEGATES="$MAGICK_DELEGATES lzma"
3698 if test "$have_openexr" = 'yes' ; then
3699 MAGICK_DELEGATES="$MAGICK_DELEGATES openexr"
3701 if test "$have_openjp2" = 'yes' ; then
3702 MAGICK_DELEGATES="$MAGICK_DELEGATES openjp2"
3704 if test "$have_pango" = 'yes' ; then
3705 MAGICK_DELEGATES="$MAGICK_DELEGATES pango"
3707 if test "$have_png" = 'yes' ; then
3708 MAGICK_DELEGATES="$MAGICK_DELEGATES png"
3711 if test "$have_dps" = 'yes' || \
3712 test "$have_gs" = 'yes' || \
3713 test "${native_win32_build}" = 'yes' ; then
3716 if test "$have_ps" = 'yes' ; then
3717 MAGICK_DELEGATES="$MAGICK_DELEGATES ps"
3719 if test "$have_raqm" = 'yes' ; then
3720 MAGICK_DELEGATES="$MAGICK_DELEGATES raqm"
3722 if test "$have_ra_ppm" = 'yes' ; then
3723 MAGICK_DELEGATES="$MAGICK_DELEGATES rad"
3725 if test "$have_rsvg" = 'yes' ; then
3726 MAGICK_DELEGATES="$MAGICK_DELEGATES rsvg"
3728 if test "$have_tiff" = 'yes' ; then
3729 MAGICK_DELEGATES="$MAGICK_DELEGATES tiff"
3731 if test "$have_ttf" = 'yes' ; then
3732 MAGICK_DELEGATES="$MAGICK_DELEGATES ttf"
3734 if test "$have_webp" = 'yes' ; then
3735 MAGICK_DELEGATES="$MAGICK_DELEGATES webp"
3737 if test "$have_wmf" = 'yes' ; then
3738 MAGICK_DELEGATES="$MAGICK_DELEGATES wmf"
3740 if test "$have_x" = 'yes' ; then
3741 MAGICK_DELEGATES="$MAGICK_DELEGATES x"
3743 if test "$have_xml" = 'yes' ; then
3744 MAGICK_DELEGATES="$MAGICK_DELEGATES xml"
3746 if test "$have_zlib" = 'yes' ; then
3747 MAGICK_DELEGATES="$MAGICK_DELEGATES zlib"
3750 # Remove extraneous spaces from output variables (asthetic)
3751 MAGICK_DELEGATES=`echo $MAGICK_DELEGATES | sed -e 's/ */ /g'`
3752 MAGICK_FEATURES=`echo $MAGICK_FEATURES | sed -e 's/ */ /g'`
3753 AC_SUBST(MAGICK_DELEGATES)
3754 AC_SUBST(MAGICK_FEATURES)
3757 # Handle special compiler flags
3760 # Add '-p' if prof source profiling support enabled
3761 if test "$enable_prof" = 'yes'; then
3763 CXXFLAGS="-p $CXXFLAGS"
3764 LDFLAGS="-p $LDFLAGS"
3767 # Add '-pg' if gprof source profiling support enabled
3768 if test "$enable_gprof" = 'yes'; then
3769 CFLAGS="-pg $CFLAGS"
3770 CXXFLAGS="-pg $CXXFLAGS"
3771 LDFLAGS="-pg $LDFLAGS"
3774 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3775 # This is a gcc-specific feature
3776 if test "$enable_gcov" = 'yes'; then
3777 AC_CHECK_LIB(gcov,_gcov_init)
3778 AC_CHECK_LIB(gcov,__gcov_init)
3779 case "$target_os" in
3781 OSX_GCOV_LDFLAG="-Wl,-single_module"
3787 AC_SUBST(OSX_GCOV_LDFLAG)
3788 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3789 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3790 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3794 # Build library dependency list for libMagickCore
3797 if test "$build_modules" != 'no'; then
3798 MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
3800 MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_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 $LIBOPENJP2_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
3802 AC_SUBST(MAGICK_DEP_LIBS)
3804 # Pass only user-provided LIBS as "global" libraries
3810 #AC_SUBST(X_PRE_LIBS)
3812 #AC_SUBST(X_EXTRA_LIBS)
3814 MAGICK_CFLAGS=$CFLAGS
3815 MAGICK_CXXFLAGS="$CXXFLAGS"
3816 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3817 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3818 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3819 MAGICK_LIBS="$MAGICK_DEP_LIBS"
3821 AC_SUBST(MAGICK_CFLAGS)
3822 AC_SUBST(MAGICK_CXXFLAGS)
3823 AC_SUBST(MAGICK_CPPFLAGS)
3824 AC_SUBST(MAGICK_PCFLAGS)
3825 AC_SUBST(MAGICK_LDFLAGS)
3826 AC_SUBST(MAGICK_LIBS)
3828 # Set configured scripts to executable.
3829 AC_CONFIG_COMMANDS([default],[],[])
3830 AC_CONFIG_COMMANDS([magick.sh.in],[chmod +x magick.sh])
3831 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3832 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3833 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3834 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3836 AC_MSG_RESULT([-------------------------------------------------------------])
3837 AC_MSG_RESULT([Update ImageMagick configuration])
3839 rm -f magick-version
3841 result_dejavu_font_dir='none'
3842 if test "${dejavu_font_dir}x" != 'x'; then
3843 result_dejavu_font_dir=$dejavu_font_dir
3846 result_ghostscript_font_dir='none'
3847 if test "${ghostscript_font_dir}x" != 'x'; then
3848 result_ghostscript_font_dir=$ghostscript_font_dir
3851 result_windows_font_dir='none'
3852 if test "${windows_font_dir}x" != 'x'; then
3853 result_windows_font_dir=${windows_font_dir}
3856 # ==============================================================================
3857 # Generate build environment
3858 # ==============================================================================
3861 config/configure.xml \
3862 config/delegates.xml \
3863 config/ImageMagick.rdf \
3864 config/MagickCore.dox \
3865 config/MagickWand.dox \
3866 config/Magick++.dox \
3867 config/type-apple.xml \
3868 config/type-dejavu.xml \
3869 config/type-ghostscript.xml \
3870 config/type-windows.xml \
3873 Magick++/bin/Magick++-config \
3874 MagickCore/ImageMagick.pc \
3875 Magick++/lib/Magick++.pc \
3876 MagickCore/MagickCore-config \
3877 MagickCore/MagickCore.pc \
3878 MagickCore/version.h \
3881 PerlMagick/check.sh \
3882 PerlMagick/default/Magick.pm \
3883 PerlMagick/Makefile.PL \
3884 PerlMagick/default/Makefile.PL \
3885 PerlMagick/quantum/Makefile.PL \
3886 PerlMagick/quantum/quantum.pm \
3887 PerlMagick/quantum/quantum.xs \
3888 PerlMagick/quantum/typemap \
3889 utilities/animate.1 \
3890 utilities/compare.1 \
3891 utilities/composite.1 \
3892 utilities/conjure.1 \
3893 utilities/convert.1 \
3894 utilities/display.1 \
3895 utilities/identify.1 \
3896 utilities/ImageMagick.1 \
3897 utilities/import.1 \
3898 utilities/magick.1 \
3899 utilities/magick-script.1 \
3900 utilities/mogrify.1 \
3901 utilities/montage.1 \
3902 utilities/stream.1 \
3903 MagickWand/MagickWand-config \
3904 MagickWand/MagickWand.pc ])
3907 # ==============================================================================
3908 # ImageMagick Configuration
3909 # ==============================================================================
3911 ==============================================================================
3912 ImageMagick is configured as follows. Please verify that this configuration
3913 matches your expectations.
3915 Host system type: $host
3916 Build system type: $build
3919 ------------------------------------------------------------------------------
3920 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3921 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3922 Module support --with-modules=$build_modules $build_modules
3923 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3924 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3925 High Dynamic Range Imagery
3926 --enable-hdri=$enable_hdri $enable_hdri
3928 Install documentation: $wantdocs
3930 Delegate Library Configuration:
3931 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3932 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3933 DJVU --with-djvu=$with_djvu $have_djvu
3934 DPS --with-dps=$with_dps $have_dps
3935 FFTW --with-fftw=$with_fftw $have_fftw
3936 FLIF --with-flif=$with_flif $have_flif
3937 FlashPIX --with-fpx=$with_fpx $have_fpx
3938 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3939 FreeType --with-freetype=$with_freetype $have_freetype
3940 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3941 Graphviz --with-gvc=$with_gvc $have_gvc
3942 JBIG --with-jbig=$with_jbig $have_jbig
3943 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
3944 LCMS --with-lcms=$with_lcms $have_lcms
3945 LQR --with-lqr=$with_lqr $have_lqr
3946 LTDL --with-ltdl=$with_ltdl $have_ltdl
3947 LZMA --with-lzma=$with_lzma $have_lzma
3948 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3949 OpenEXR --with-openexr=$with_openexr $have_openexr
3950 OpenJP2 --with-openjp2=$with_openjp2 $have_openjp2
3951 PANGO --with-pango=$with_pango $have_pango
3952 PERL --with-perl=$with_perl $have_perl
3953 PNG --with-png=$with_png $have_png
3954 RAQM --with-raqm=$with_raqm $have_raqm
3955 RSVG --with-rsvg=$with_rsvg $have_rsvg
3956 TIFF --with-tiff=$with_tiff $have_tiff
3957 WEBP --with-webp=$with_webp $have_webp
3958 WMF --with-wmf=$with_wmf $have_wmf
3959 X11 --with-x=$with_x $have_x
3960 XML --with-xml=$with_xml $have_xml
3961 ZLIB --with-zlib=$with_zlib $have_zlib
3963 Delegate Program Configuration:
3964 GhostPCL None $PCLDelegate ($PCLVersion)
3965 GhostXPS None $XPSDelegate ($XPSVersion)
3966 Ghostscript None $PSDelegate ($GSVersion)
3969 Apple fonts --with-apple-font-dir=$with_apple_font_dir $result_apple_font_dir
3970 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3971 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3972 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
3975 X_CFLAGS = $X_CFLAGS
3976 X_PRE_LIBS = $X_PRE_LIBS
3978 X_EXTRA_LIBS = $X_EXTRA_LIBS
3980 Options used to compile and link:
3981 PREFIX = $PREFIX_DIR
3982 EXEC-PREFIX = $EXEC_PREFIX_DIR
3983 VERSION = $PACKAGE_VERSION
3986 CPPFLAGS = $CPPFLAGS
3992 CXXFLAGS = $CXXFLAGS
3993 FEATURES = $MAGICK_FEATURES
3994 DELEGATES = $MAGICK_DELEGATES
3995 ==============================================================================