1 # Copyright 1999-2019 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 # https://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], [8])
30 m4_define([magick_patchlevel_version], [68])
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.sh .) | awk '{ print \$1 }' | tr -d '\n'"]))
34 m4_define([magick_tar_name],[ImageMagick])
36 # ==============================================================================
38 # ==============================================================================
39 AC_INIT([ImageMagick],
41 [https://github.com/ImageMagick/ImageMagick/issues],
43 [https://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])
301 AX_GCC_ARCHFLAG([yes], [
302 CFLAGS="$CFLAGS $ax_cv_gcc_archflag"
303 CXXFLAGS="$CXXFLAGS $ax_cv_gcc_archflag"])
304 PKG_PROG_PKG_CONFIG([0.20])
308 # Test for 64-bit build.
309 AC_CHECK_SIZEOF([size_t])
313 if test "x$GCC" = "xyes"; then
314 CFLAGS="$CFLAGS -fexceptions"
317 cat > local.exp <<EOF
318 set CC_FOR_TARGET "$CC"
322 # Check for linker script support
326 # Enable run-time checking.
328 AC_ARG_ENABLE([bounds-checking],
329 [AC_HELP_STRING([--enable-bounds-checking],
330 [enable run-time bounds-checking])],
331 [enable_bounds_checking=$enableval],
332 [enable_bounds_checking='no'])
334 if test "$enable_bounds_checking" = yes; then
335 AC_DEFINE([_FORTIFY_SOURCE], [2],
336 [enable run-time bounds-checking])
347 native_win32_build='no'
355 native_win32_build='yes'
357 OLE_LIBS='-loleaut32'
358 WS2_32_LIBS="-lws2_32"
361 if test "${GDI32_LIBS}x" != 'x'; then
362 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
366 AC_SUBST(WS2_32_LIBS)
367 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
368 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
369 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
370 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
372 WinPathScript="${srcdirfull}/winpath.sh"
373 AC_SUBST(WinPathScript)
376 # Compiler flags tweaks
378 if test "${GCC}" != "yes"; then
381 # aCC: HP ANSI C++ B3910B A.03.34
382 CFLAGS="${CFLAGS} -Wp,-H30000"
383 if test -n "${CXXFLAGS}"; then
386 CXXFLAGS="${CXXFLAGS} -AA"
390 # Compaq alphaev68-dec-osf5.1 compiler
391 if test -n "${CXXFLAGS}"; then
392 CXXFLAGS='-std strict_ansi -noimplicit_include'
394 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
399 # Check for lazy-loading.
400 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
402 im_cv_ld_lazyload='none'
404 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
405 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
406 im_cv_ld_lazyload='-Wl,-zlazyload'
411 if test "${im_cv_ld_lazyload}" != 'none' ; then
412 if test -z "${LDFLAGS}" ; then
413 LDFLAGS="${im_cv_ld_lazyload}"
415 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
419 dnl Platform-specific stuff
421 *darwin* | *-macos10*)
422 dnl Disable FORTIFY_SOURCE to fix a bug in LVVM / OpenMP support
423 CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=0"
424 dnl OS X universal binary support, requires --disable-dependency-tracking
425 AC_ARG_ENABLE([osx-universal-binary],
426 AC_HELP_STRING([--enable-osx-universal-binary],
427 [build universal binary on OS X [[default=no]]]),
428 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
430 if test "${build_osxuniversal}" != no ; then
431 if test "$enable_dependency_tracking" != no ; then
432 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
433 Please re-run configure with these options:
434 --disable-dependency-tracking --enable-osx-universal-binary
437 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
438 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
439 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
445 # ARCH specific include directory
447 AC_ARG_WITH([includearch-dir],
448 [AC_HELP_STRING([--includearch-dir=DIR],
449 [ARCH specific include directory])],
450 [includearch_dir=$withval],
451 [includearch_dir=$INCLUDE_DIR])
453 eval "eval INCLUDEARCH_DIR=$includearch_dir"
454 AC_SUBST(INCLUDEARCH_DIR)
457 # ARCH specific configuration directory
459 AC_ARG_WITH([sharearch-dir],
460 [AC_HELP_STRING([--sharearch-dir=DIR],
461 [ARCH specific config directory])],
462 [sharearch_dir=$withval],
463 [sharearch_dir="${LIB_DIR}"])
465 eval "eval SHAREARCH_DIR=$sharearch_dir"
466 AC_SUBST(SHAREARCH_DIR)
468 # Path to the pkgconfig folder
469 AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=DIR],
470 [Path to the pkgconfig directory @<:@LIBDIR/pkgconfig@:>@]),
471 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
472 AC_SUBST([pkgconfigdir])
475 # Enable support for POSIX thread APIs
477 AC_ARG_WITH([threads],
478 [AC_HELP_STRING([--without-threads], [disable POSIX threads API 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 # Enable pipes (|) in filenames.
688 AC_ARG_ENABLE([pipes],
689 [AC_HELP_STRING([--enable-pipes],
690 [enable pipes (|) in filenames])],
691 [enable_pipes=$enableval],
694 if test "$enable_pipes" = 'yes'; then
695 AC_DEFINE(PIPES_SUPPORT,1,[enable pipes (|) in filenames])
696 MAGICK_FEATURES="Pipes $MAGICK_FEATURES"
699 # Build a version of ImageMagick with assert statements.
700 AC_ARG_ENABLE([assert],
701 [AC_HELP_STRING([--disable-assert],
702 [disable assert() statements in build])],
703 [enable_assert=$enableval],
704 [enable_assert='yes'])
706 if test "$enable_assert" = 'no'; then
707 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
710 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
713 # Enable hugepages support
714 AC_ARG_ENABLE([hugepages],
715 [AC_HELP_STRING([--enable-hugepages],
716 [enable 'huge pages' support])],
717 [enable_hugepages=$enableval],
718 [enable_hugepages='no'])
720 # Enable ccmalloc memory debugging support
721 AC_ARG_ENABLE([ccmalloc],
722 [AC_HELP_STRING([--enable-ccmalloc],
723 [enable 'ccmalloc' memory debug support])],
724 [enable_ccmalloc=$enableval],
725 [enable_ccmalloc='no'])
727 # Enable Electric Fence memory debugging support
728 AC_ARG_ENABLE([efence],
729 [AC_HELP_STRING([--enable-efence],
730 [enable 'efence' memory debug support])],
731 [enable_efence=$enableval],
732 [enable_efence='no'])
734 # Enable prof-based profiling support
735 AC_ARG_ENABLE([prof],
736 [AC_HELP_STRING([--enable-prof],
737 [enable 'prof' profiling support])],
738 [enable_prof=$enableval],
741 # Enable gprof-based profiling support
742 AC_ARG_ENABLE([gprof],
743 [AC_HELP_STRING([--enable-gprof],
744 [enable 'gprof' profiling support])],
745 [enable_gprof=$enableval],
748 # Enable gcov-based profiling support
749 AC_ARG_ENABLE([gcov],
750 [AC_HELP_STRING([--enable-gcov],
751 [enable 'gcov' profiling support])],
752 [enable_gcov=$enableval],
755 enable_profiling='no'
756 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
757 enable_profiling='yes'
758 if test "$libtool_build_shared_libs" = 'yes'; then
759 echo "Warning: Can not profile code using shared libraries"
763 # Magick API method prefix
764 AC_ARG_WITH([method-prefix],
765 [AC_HELP_STRING([--with-method-prefix=PREFIX],
766 [prefix MagickCore API methods])],
767 [with_method_prefix=$withval],
768 [with_method_prefix='no'])
770 if test "$with_method_prefix" != 'no'; then
771 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
772 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX_TAG,["$with_method_prefix"],[Magick API method prefix tag])
773 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
776 # Enable legacy support (default no)
777 AC_ARG_ENABLE(legacy-support,
778 [ --enable-legacy-support install legacy command-line utilities (default disabled)],
779 [with_legacy_support=$enableval],
780 [with_legacy_support='no'])
781 AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no')
783 # Enable building command line utilities (default yes)
784 AC_ARG_WITH(utilities,
785 [ --with-utilities enable building command-line utilities (default yes)],
786 [with_utilities=$withval], [with_utilities='yes'])
787 AM_CONDITIONAL(WITH_UTILITIES, test "$with_utilities" = 'yes')
789 # Number of bits in a Quantum
790 AC_ARG_WITH([quantum-depth],
791 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
792 [number of bits in a pixel quantum (default 16)])],
793 [with_quantum_depth=$withval],
794 [with_quantum_depth=16])
796 if test "$with_quantum_depth" != '8'; then
797 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
800 case "${with_quantum_depth}" in
805 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
807 QUANTUM_DEPTH="$with_quantum_depth"
808 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH_OBSOLETE_IN_H,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
809 AC_SUBST(QUANTUM_DEPTH)dnl
810 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
811 CFLAGS="$CFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
812 CPPFLAGS="$CPPFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
814 # define a lib suffix for abi purpose
815 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}"
816 if test "$enable_hdri" = 'yes'; then
817 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}${MAGICK_HDRI}"
819 AC_SUBST(MAGICK_ABI_SUFFIX)
821 # Set pixel cache threshold
823 [AC_HELP_STRING([--with-cache=THRESHOLD],
824 [set pixel cache threshhold in MB (default available memory)])],
825 [with_cache=$withval],
828 if test "$with_cache" != ''; then
829 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
830 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
833 # Disable/Enable support for full delegate paths
834 AC_ARG_WITH([frozenpaths],
835 [AC_HELP_STRING([--with-frozenpaths],
836 [freeze delegate paths])],
837 [with_frozenpaths=$withval],
838 [with_frozenpaths='no'])
840 # Enable build/install of Magick++
841 AC_ARG_WITH([magick-plus-plus],
842 [AC_HELP_STRING([--without-magick-plus-plus],
843 [disable build/install of Magick++])],
844 [with_magick_plus_plus=$withval],
845 [with_magick_plus_plus='yes'])
847 # Encode the this name into the shared library.
848 AC_ARG_WITH([package-release-name],
849 [AC_HELP_STRING([--with-package-release-name=NAME],
850 [encode this name into the shared library])],
851 [MAGICK_LT_RELEASE_OPTS="-release $withval"])
852 AC_SUBST(MAGICK_LT_RELEASE_OPTS)
854 # Disable build/install of PerlMagick.
856 [AC_HELP_STRING([--with-perl],
857 [enable build/install of PerlMagick])],
858 [with_perl=$withval],
861 # Options to pass when configuring PerlMagick
862 AC_ARG_WITH([perl-options],
863 [AC_HELP_STRING([--with-perl-options=OPTIONS],
864 [options to pass on command-line when generating PerlMagick build file])],
865 PERL_MAKE_OPTIONS=$withval)
866 AC_SUBST(PERL_MAKE_OPTIONS)
868 # Enable jemalloc, object-caching memory allocation library.
869 AC_ARG_WITH(jemalloc,
870 [ --with-jemalloc enable jemalloc memory allocation library support],
871 [with_jemalloc=$withval],
872 [with_jemalloc='no'])
873 if test "$with_jemalloc" != 'yes' ; then
874 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jemalloc=$with_jemalloc "
877 # Enable use of TCMalloc library.
878 AC_ARG_WITH(tcmalloc,
879 AS_HELP_STRING([--with-tcmalloc],
880 [enable tcmalloc memory allocation library support]),
881 [with_tcmalloc=$withval],
882 [with_tcmalloc='no'])
883 if test "$with_tcmalloc" != 'no' ; then
884 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tcmalloc=$with_tcmalloc "
887 # Enable umem, object-caching memory allocation library.
889 [ --with-umem enable umem memory allocation library support],
890 [with_umem=$withval],
892 if test "$with_umem" != 'yes' ; then
893 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
897 # Specify path to shared libstdc++ if not in normal location
899 AC_ARG_WITH([libstdc],
900 [AC_HELP_STRING([--with-libstdc=DIR],
901 [ use libstdc++ in DIR (for GNU C++)])],
902 [with_libstdc=$withval],
905 if test "$with_libstdc" != ''; then
906 if test -d "$with_libstdc"; then
907 LIBSTDCLDFLAGS="-L$with_libstdc"
910 AC_SUBST(LIBSTDCLDFLAGS)
912 # Does gcc required -traditional?
913 AC_PROG_GCC_TRADITIONAL
917 # Set defines required to build DLLs and modules using MinGW
920 # These options are set for multi-thread DLL module build
921 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
923 # executable/Magick++: _DLL _MAGICKMOD_
924 MODULE_EXTRA_CPPFLAGS=''
925 LIBRARY_EXTRA_CPPFLAGS=''
926 if test "${native_win32_build}" = 'yes'; then
927 if test "${libtool_build_shared_libs}" = 'yes'; then
928 CPPFLAGS="$CPPFLAGS -D_DLL"
929 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
930 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
931 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
932 if test "$build_modules" = 'yes'; then
933 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
935 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
938 CPPFLAGS="$CPPFLAGS -D_LIB"
939 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
940 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
942 if test "$with_threads" = 'yes'; then
943 CPPFLAGS="$CPPFLAGS -D_MT"
944 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
945 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
948 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
949 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
951 # Check standard headers
953 if ! test x"$ac_cv_header_stdc" = x"yes"; then
954 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
955 header files. Compilation cannot proceed. Please install the ANSI C
956 headers and rerun this script.]);
961 # Check additional headers
962 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)
966 # Checks for typedefs, structures, and compiler characteristics.
980 # Checks for language qualifiers and semantics.
988 # If words are stored with the most significant byte first (like
989 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
992 # Define to a suitable type, if standard headers do not define it.
1000 AC_TYPE_LONG_DOUBLE_WIDER
1001 AC_TYPE_LONG_LONG_INT
1015 AC_TYPE_UNSIGNED_LONG_LONG_INT
1017 AC_CHECK_TYPES([locale_t], [], [], [[#include <xlocale.h>]])
1019 # Float_t and double_t are intended to be the the most efficient type.
1020 AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]])
1021 AC_CHECK_TYPES([double_t], [], [], [[#include <math.h>]])
1022 AC_CHECK_SIZEOF([float_t], [], [[#include <math.h>]])
1023 AC_CHECK_SIZEOF([double_t], [], [[#include <math.h>]])
1025 # Get size of float, double and long double for comparaison.
1026 AC_CHECK_SIZEOF([float])
1027 AC_CHECK_SIZEOF([double])
1028 AC_CHECK_SIZEOF([long double])
1030 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
1031 AC_CHECK_SIZEOF(signed short)
1033 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
1034 AC_CHECK_SIZEOF(unsigned short)
1036 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
1037 AC_CHECK_SIZEOF(signed int)
1039 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
1040 AC_CHECK_SIZEOF(unsigned int)
1042 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
1043 AC_CHECK_SIZEOF(signed long)
1045 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
1046 AC_CHECK_SIZEOF(unsigned long)
1048 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
1049 # 'signed long long' is not supported then the value defined is zero.
1050 AC_CHECK_SIZEOF(signed long long)
1052 # Obtain size of a 'unsigned long long' and define as
1053 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
1054 # supported then the value defined is zero.
1055 AC_CHECK_SIZEOF(unsigned long long)
1057 # Obtain size of off_t and define as SIZEOF_OFF_T
1058 AC_CHECK_SIZEOF(off_t)
1060 # Obtain size of size_t and define as SIZEOF_SIZE_T
1061 AC_CHECK_SIZEOF(size_t)
1063 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
1064 AC_CHECK_SIZEOF(ssize_t)
1066 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
1067 AC_CHECK_SIZEOF(unsigned int*)
1070 # Compute sized types for current CPU and compiler options.
1073 AC_MSG_CHECKING(for signed 8-bit type)
1074 INT8_T='signed char'
1075 AC_MSG_RESULT($INT8_T)
1078 AC_MSG_CHECKING(for unsigned 8-bit type)
1079 UINT8_T='unsigned char'
1080 AC_MSG_RESULT($UINT8_T)
1083 AC_MSG_CHECKING(for signed 16-bit type)
1084 INT16_T='signed short'
1085 AC_MSG_RESULT($INT16_T)
1088 AC_MSG_CHECKING(for unsigned 16-bit type)
1089 UINT16_T='unsigned short'
1090 AC_MSG_RESULT($UINT16_T)
1093 AC_MSG_CHECKING(for signed 32-bit type)
1096 if test $ac_cv_sizeof_signed_int -eq 4; then
1097 INT32_T='signed int'
1099 elif test $ac_cv_sizeof_signed_long -eq 4; then
1100 INT32_T='signed long'
1103 AC_MSG_RESULT($INT32_T)
1107 AC_MSG_CHECKING(for unsigned 32-bit type)
1110 if test $ac_cv_sizeof_unsigned_int -eq 4; then
1111 UINT32_T='unsigned int'
1113 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
1114 UINT32_T='unsigned long'
1117 AC_MSG_RESULT($UINT32_T)
1121 AC_MSG_CHECKING(for signed 64-bit type)
1124 if test $ac_cv_sizeof_signed_long -eq 8; then
1125 INT64_T='signed long'
1127 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
1128 INT64_T='signed long long'
1131 case "${host_os}" in
1136 AC_MSG_RESULT($INT64_T)
1140 AC_MSG_CHECKING(for unsigned 64-bit type)
1143 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1144 UINT64_T='unsigned long'
1146 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1147 UINT64_T='unsigned long long'
1150 case "${host_os}" in
1155 AC_MSG_RESULT($UINT64_T)
1159 AC_MSG_CHECKING(for unsigned maximum type)
1162 if test "$UINT64_T" != 'none'; then
1165 elif test "$UINT32_T" != 'none'; then
1169 AC_MSG_RESULT($UINTMAX_T)
1173 AC_MSG_CHECKING(for pointer difference type)
1176 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1177 UINTPTR_T='unsigned long'
1179 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1180 UINTPTR_T='unsigned long long'
1183 AC_MSG_RESULT($UINTPTR_T)
1187 AC_MSG_CHECKING([whether our compiler supports __func__])
1189 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1190 AC_MSG_RESULT([yes]),
1192 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1194 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1195 AC_MSG_RESULT([yes])
1196 AC_DEFINE(__func__, __FUNCTION__,
1197 [Define to appropriate substitute if compiler does not have __func__]),
1199 AC_DEFINE(__func__, __FILE__,
1200 [Define to appropriate substitute if compiler does not have __func__])))
1204 # Check for functions
1207 AC_FUNC_CLOSEDIR_VOID
1211 AC_FUNC_SELECT_ARGTYPES
1212 AC_FUNC_SETVBUF_REVERSED
1222 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1223 LIBS="$MATH_LIBS $LIBS"
1227 # Find socket library
1229 AC_SEARCH_LIBS(gethostbyname, resolv nsl)
1230 AC_SEARCH_LIBS(socket, socket,
1232 AC_DEFINE([HAVE_SOCKET],[1],[Define to 1 if you have socket support.])
1233 MAGICK_FEATURES="DPC $MAGICK_FEATURES"
1237 # Check for clock_gettime().
1239 AC_SEARCH_LIBS(clock_gettime, rt,
1241 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1242 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1245 [[#include <time.h>]],
1246 [[clockid_t clockType = CLOCK_REALTIME;]])],
1249 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1250 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1256 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1262 # Check for function prototypes
1266 AC_CHECK_DECLS([pread, pwrite],[],[],[
1267 #include <unistd.h>])
1269 AC_CHECK_DECLS([strlcpy],[],[],[
1270 #include <strings.h>])
1272 AC_CHECK_DECLS([vsnprintf],[],[],[
1274 #include <stdarg.h>])
1278 # C++ Support Tests (For Magick++)
1281 have_magick_plus_plus='no'
1282 if test "$with_magick_plus_plus" = 'yes'; then
1287 # Full set of headers used...
1288 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1289 # functional iomanip iosfwd iostream iterator list string strstream utility
1294 AX_CXX_NAMESPACE_STD
1295 AC_CXX_HAVE_STD_LIBS
1299 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1301 test $ax_cv_cxx_bool = 'yes' && \
1302 test $ax_cv_cxx_namespaces = 'yes' && \
1303 test $ac_cv_cxx_have_std_libs = 'yes' && \
1304 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1305 have_magick_plus_plus='yes'
1307 have_magick_plus_plus='no (failed tests)'
1309 AC_MSG_RESULT([$have_magick_plus_plus])
1312 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1314 # Only check for delegate libraries in subdirectories if requested.
1315 if test "$enable_delegate_build" != 'no'; then
1316 # Check for delegate sub-directories and add -I & -L options as required.
1317 # This presumes that delegates are installed as detailed in the ImageMagick
1318 # README. If delegates are installed in a standard location where the
1319 # compiler will automatically find them then these options should not be
1323 # Most delegates have includes in the same directory as the library, but not all...
1326 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
1327 if test -d "$builddir/$dir"; then
1328 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1330 if test -d "$srcdirfull/$dir"; then
1331 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1337 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
1338 if test -d "$builddir/$dir/.libs"; then
1339 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1341 if test -d "$srcdirfull/$dir/.libs"; then
1342 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1345 if test -d "$builddir/$dir"; then
1346 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1348 if test -d "$srcdirfull/$dir"; then
1349 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1355 # Assume that delegate headers reside under same directory as ImageMagick
1356 # installation prefix.
1357 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/${PACKAGE_NAME}-$MAGICK_MAJOR_VERSION $MAGICK_CPPFLAGS"
1360 # Find the X11 RGB database
1362 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1363 [# Look for the header file in a standard set of common directories.
1364 # Check X11 before X11Rn because it is often a symlink to the current release.
1373 /usr/XFree86/lib/X11 \
1381 /usr/local/X11/lib \
1382 /usr/local/X11R4/lib \
1383 /usr/local/X11R5/lib \
1384 /usr/local/X11R6/lib \
1386 /usr/local/lib/X11 \
1387 /usr/local/lib/X11R4 \
1388 /usr/local/lib/X11R5 \
1389 /usr/local/lib/X11R6 \
1390 /usr/local/lib/X11R7 \
1391 /usr/local/x11r5/lib \
1392 /usr/lpp/Xamples/lib \
1394 /usr/openwin/share/lib \
1395 /usr/unsupported/lib \
1398 if test -f "$ac_dir/X11/rgb.txt"; then
1399 im_cv_x_configure="$ac_dir/X11/"
1401 elif test -f "$ac_dir/rgb.txt"; then
1402 im_cv_x_configure="$ac_dir/"
1407 X11_CONFIGURE_PATH="$im_cv_x_configure"
1408 case "${build_os}" in
1410 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1413 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",[Location of X11 configure files])
1416 # Find OpenMP library
1419 if test "$enable_openmp" != 'no'; then
1420 if test "${GCC}" = "yes"; then
1421 # Open64 (passes for GCC but uses different OpenMP implementation)
1422 if test "x$GOMP_LIBS" = x ; then
1423 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1424 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1427 # Clang (passes for GCC but uses different OpenMP implementation)
1428 if test "x$LIB_OMP" = x ; then
1429 if $CC --version 2>&1 | grep clang > /dev/null ; then
1430 AC_CHECK_LIB(omp,GOMP_parallel_start,LIB_OMP="-lomp",,)
1434 if test "x$GOMP_LIBS" = x ; then
1435 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1439 if test "x$GOMP_LIBS" = x ; then
1440 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1443 if test "x$GOMP_LIBS" = x ; then
1444 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1446 # SGI IRIX 6.5 MIPSpro C/C++
1447 if test "x$GOMP_LIBS" = x ; then
1448 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1451 LIBS="$GOMP_LIBS $LIBS"
1456 # Check for jemalloc.
1460 if test "$with_jemalloc" != 'no'; then
1461 AC_MSG_CHECKING(for JEMALLOC support )
1465 AC_CHECK_HEADER([jemalloc/jemalloc.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1466 AC_CHECK_LIB(jemalloc,[malloc_stats_print],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1467 AC_MSG_CHECKING(if jemalloc memory allocation library is complete)
1468 if test $passed -gt 0; then
1469 if test $failed -gt 0; then
1470 AC_MSG_RESULT(no -- some components failed test)
1471 have_jemalloc='no (failed tests)'
1473 JEMALLOC_LIBS='-ljemalloc'
1474 LIBS="$JEMALLOC_LIBS $LIBS"
1475 AC_DEFINE(HasJEMALLOC,1,Define if you have jemalloc memory allocation library)
1483 AM_CONDITIONAL(HasJEMALLOC, test "$have_jemalloc" = 'yes')
1484 AC_SUBST(JEMALLOC_LIBS)
1487 # Check for TCMalloc library
1492 if test "$have_threads" = 'yes' -a "$with_tcmalloc" != 'no'; then
1493 AC_MSG_CHECKING([tcmalloc library support ])
1498 AC_CHECK_LIB([tcmalloc_minimal],[mallinfo],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[])
1500 if test $passed -gt 0; then
1501 if test $failed -gt 0; then
1502 have_tcmalloc='no (some components failed test)'
1504 TCMALLOC_LIBS=-ltcmalloc_minimal
1505 LIBS="$TCMALLOC_LIBS $LIBS"
1506 CFLAGS="$CFLAGS -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"
1507 AC_DEFINE([HAVE_TCMALLOC],[1],[Define if you have the tcmalloc memory allocation library])
1511 AC_MSG_CHECKING([if tcmalloc memory allocation library is complete ])
1512 AC_MSG_RESULT([$have_tcmalloc])
1514 AM_CONDITIONAL([HAVE_TCMALLOC], [test "$have_tcmalloc" = 'yes'])
1515 AC_SUBST([TCMALLOC_LIBS])
1522 if test "$with_umem" != 'no'; then
1523 AC_MSG_CHECKING(for UMEM support )
1527 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1528 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1529 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1530 AC_MSG_CHECKING(if umem memory allocation library is complete)
1531 if test $passed -gt 0; then
1532 if test $failed -gt 0; then
1533 AC_MSG_RESULT(no -- some components failed test)
1534 have_umem='no (failed tests)'
1537 LIBS="$UMEM_LIBS $LIBS"
1538 AC_DEFINE(HAVE_UMEM,1,Define if you have umem memory allocation library)
1546 AM_CONDITIONAL(HAVE_UMEM, test "$have_umem" = 'yes')
1550 # Add support for ccmalloc memory debugging library if requested
1554 if test "$enable_ccmalloc" = 'yes'; then
1555 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1556 if test -n "$CCMALLOCDelegate"; then
1557 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1559 # Assume that gcc is used with ccmalloc.
1560 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1561 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1562 if test -n "$CCMALLOC_LIBS"; then
1564 LIBS="$LIBS $CCMALLOC_LIBS"
1573 # Add support for 'huge pages' if requested
1575 AS_IF([test "x$enable_hugepages" != "xno"],[
1576 AC_DEFINE(HAVE_HUGEPAGES, 1, [Compile with hugepage support])
1580 # Add support for efence memory debugging library if requested
1582 if test "$enable_efence" = 'yes'; then
1583 EFENCE_LIBS='-lefence'
1584 LIBS="$EFENCE_LIBS $LIBS"
1587 dnl ===========================================================================
1593 AC_ARG_WITH([bzlib],
1594 [AC_HELP_STRING([--without-bzlib],
1595 [disable BZLIB support])],
1596 [with_bzlib=$withval],
1599 if test "$with_bzlib" != 'yes'; then
1600 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1604 if test "$with_bzlib" != 'no'; then
1606 AC_MSG_RESULT([-------------------------------------------------------------])
1607 AC_MSG_CHECKING([for BZLIB])
1612 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1613 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1614 if test "$native_win32_build" = 'yes'; then
1615 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1617 if test $found_libbz -gt 0; then
1618 passed=`expr $passed + 1`
1620 failed=`expr $failed + 1`
1622 AC_MSG_CHECKING(if BZLIB package is complete)
1623 if test $passed -gt 0; then
1624 if test $failed -gt 0; then
1625 AC_MSG_RESULT(no -- some components failed test)
1626 have_bzlib='no (failed tests)'
1629 LIBS="$BZLIB_LIBS $LIBS"
1630 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1638 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1639 AC_SUBST(BZLIB_LIBS)
1642 # Find the X11 include and library directories.
1649 if test "$no_x" != 'yes'; then
1650 AC_MSG_RESULT([-------------------------------------------------------------])
1651 AC_MSG_CHECKING([for X11])
1653 LDFLAGS="$LDFLAGS $X_LIBS"
1654 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1655 LIBS="$X11_LIBS $LIBS"
1656 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1658 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1661 # Check for X11 shared memory extension
1663 # shmctl is required to support the shared memory extension
1664 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1665 if test "$have_shmctl" != 'yes'; then
1667 LIBS="$LIBS -lcygipc"
1668 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1672 if test "$have_shmctl" = 'yes'; then
1673 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1677 # Check for X11 shape extension
1679 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1680 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1681 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1683 if test "$no_x" != 'yes'; then
1688 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1692 dnl ===========================================================================
1698 [AC_HELP_STRING([--without-zlib],
1699 [disable ZLIB support])],
1700 [with_zlib=$withval],
1703 if test "$with_zlib" != 'yes'; then
1704 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1711 if test "x$with_zlib" = "xyes"; then
1712 AC_MSG_RESULT([-------------------------------------------------------------])
1713 PKG_CHECK_MODULES(ZLIB,[zlib >= 1.0.0], have_zlib=yes, have_zlib=no)
1717 if test "$have_zlib" = 'yes'; then
1718 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have ZLIB library)
1719 CFLAGS="$ZLIB_CFLAGS $CFLAGS"
1720 LIBS="$ZLIB_LIBS $LIBS"
1723 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1724 AC_SUBST(ZLIB_CFLAGS)
1727 dnl ===========================================================================
1733 [AC_HELP_STRING([--without-zstd],
1734 [disable ZSTD support])],
1735 [with_zstd=$withval],
1738 if test "$with_zstd" != 'yes'; then
1739 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zstd=$with_zstd "
1746 if test "x$with_zstd" = "xyes"; then
1747 AC_MSG_RESULT([-------------------------------------------------------------])
1748 PKG_CHECK_MODULES(LIBZSTD,[libzstd >= 1.0.0], have_zstd=yes, have_zstd=no)
1752 if test "$have_zstd" = 'yes'; then
1753 AC_DEFINE(ZSTD_DELEGATE,1,Define if you have ZSTD library)
1754 CFLAGS="$ZSTD_CFLAGS $CFLAGS"
1755 LIBS="$ZSTD_LIBS $LIBS"
1758 AM_CONDITIONAL(ZSTD_DELEGATE, test "$have_zstd" = 'yes')
1759 AC_SUBST(ZSTD_CFLAGS)
1762 dnl ===========================================================================
1764 # whether modules are built or not.
1768 if test "$build_modules" != 'no' || test "X$ax_cv_check_cl_libcl" != Xno; then
1769 AC_MSG_RESULT([-------------------------------------------------------------])
1770 AC_MSG_CHECKING([for libltdl])
1774 AC_CHECK_HEADER([ltdl.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1775 AC_CHECK_LIB([ltdl],[lt_dlinit],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1776 AC_MSG_CHECKING([if libltdl package is complete])
1777 if test $passed -gt 0 ; then
1778 if test $failed -gt 0 ; then
1779 AC_MSG_RESULT([no -- some components failed test])
1780 have_ltdl='no (failed tests)'
1783 LIBS="$LTDL_LIBS $LIBS"
1784 AC_DEFINE(LTDL_DELEGATE,1,[Define if using libltdl to support dynamically loadable modules and OpenCL])
1785 AC_DEFINE_UNQUOTED([LTDL_MODULE_EXT],["${shrext_cmds}"],[Native module suffix])
1786 AC_MSG_RESULT([yes])
1792 if test "$have_ltdl" != 'yes' ; then
1793 AC_MSG_FAILURE([libltdl is required for modules and OpenCL builds],[1])
1796 AM_CONDITIONAL(WITH_LTDL, test "$have_ltdl" != 'no')
1799 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1802 if test "$enable_profiling" = 'yes'; then
1803 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1804 LIBS="$LIB_DL $LIBS"
1808 dnl ===========================================================================
1811 # Set Apple font directory.
1813 AC_ARG_WITH([apple-font-dir],
1814 [AC_HELP_STRING([--with-apple-font-dir=DIR],
1815 [Apple font directory])],
1816 [with_apple_font_dir=$withval],
1817 [with_apple_font_dir='default'])
1819 if test "$with_apple_font_dir" != 'default'; then
1820 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-apple-font-dir=$with_apple_font_dir "
1823 dnl ===========================================================================
1826 # Check for Autotrace delegate library.
1828 AC_ARG_WITH([autotrace],
1829 [AC_HELP_STRING([--with-autotrace],
1830 [enable autotrace support])],
1831 [with_autotrace=$withval],
1832 [with_autotrace='no'])
1834 if test "$with_autotrace" != 'yes'; then
1835 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1842 if test "x$with_autotrace" = "xyes"; then
1843 AC_MSG_RESULT([-------------------------------------------------------------])
1844 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1848 if test "$have_autotrace" = 'yes'; then
1849 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1850 CFLAGS="$AUTOTRACE_CFLAGS $CFLAGS"
1853 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1854 AC_SUBST(AUTOTRACE_CFLAGS)
1855 AC_SUBST(AUTOTRACE_LIBS)
1857 dnl ===========================================================================
1860 # Check for Display Postscript delegate library.
1863 [AC_HELP_STRING([--without-dps],
1864 [disable Display Postscript support])],
1865 [with_dps=$withval],
1868 if test "$with_dps" != 'yes'; then
1869 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1874 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1875 AC_MSG_RESULT([-------------------------------------------------------------])
1876 AC_MSG_CHECKING([for DPS])
1880 PERSIST_CPPFLAGS="$CPPFLAGS"
1881 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1882 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1884 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1885 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1886 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1887 # ImageMagick itself doesn't use -lXt.
1890 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1891 if test "$have_libdps" != 'yes'; then
1892 # Unset cache variable so we can try again.
1893 unset ac_cv_lib_dps_DPSInitialize
1894 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1895 if test "$have_libdps" = 'yes'; then
1899 if test "$have_libdps" = 'yes'; then
1900 passed=`expr $passed + 1`
1902 failed=`expr $failed + 1`
1904 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1905 AC_MSG_CHECKING([if DPS package is complete])
1906 if test $passed -gt 0; then
1907 if test $failed -gt 0; then
1908 AC_MSG_RESULT([no -- some components failed test])
1909 have_dps='no (failed tests)'
1910 CPPFLAGS="$PERSIST_CPPFLAGS"
1912 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1913 LIBS="$DPS_LIBS $LIBS"
1914 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1915 AC_MSG_RESULT([yes])
1920 CPPFLAGS=$PERSIST_CPPFLAGS
1923 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1926 dnl ===========================================================================
1929 # Set DejaVu font directory.
1931 AC_ARG_WITH([dejavu-font-dir],
1932 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1933 [DejaVu font directory])],
1934 [with_dejavu_font_dir=$withval],
1935 [with_dejavu_font_dir='default'])
1937 if test "$with_dejavu_font_dir" != 'default'; then
1938 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1941 dnl ===========================================================================
1944 # Check for FFTW delegate library.
1947 [AC_HELP_STRING([--without-fftw],
1948 [disable FFTW support])],
1949 [with_fftw=$withval],
1952 if test "$with_fftw" != 'yes'; then
1953 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1960 if test "x$with_fftw" = "xyes"; then
1961 AC_MSG_RESULT([-------------------------------------------------------------])
1962 PKG_CHECK_MODULES(fftw3,[fftw3 >= 3.0.0], have_fftw=yes, have_fftw=no)
1966 if test "$have_fftw" = 'yes'; then
1967 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1968 FFTW_CFLAGS="$fftw3_CFLAGS"
1969 FFTW_LIBS="$fftw3_LIBS"
1970 CFLAGS="$fftw3_CFLAGS $CFLAGS"
1973 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1974 AC_SUBST(FFTW_CFLAGS)
1977 dnl ===========================================================================
1980 # Check for FLIF delegate library.
1983 [AC_HELP_STRING([--without-flif],
1984 [disable FLIF support])],
1985 [with_flif=$withval],
1988 if test "$with_flif" != 'yes'; then
1989 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-flif=$with_flif "
1994 if test "$with_flif" != 'no'; then
1995 AC_MSG_RESULT([-------------------------------------------------------------])
1996 AC_MSG_CHECKING([for FLIF])
2000 AC_CHECK_HEADER(flif.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2001 AC_CHECK_LIB(flif,flif_create_decoder,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2002 AC_MSG_CHECKING([if FLIF package is complete])
2003 if test $passed -gt 0; then
2004 if test $failed -gt 0; then
2005 AC_MSG_RESULT([no -- some components failed test])
2006 have_flif='no (failed tests)'
2009 LIBS="$FLIF_LIBS $LIBS"
2010 AC_DEFINE(FLIF_DELEGATE,1,Define if you have FLIF library)
2011 AC_MSG_RESULT([yes])
2018 AM_CONDITIONAL(FLIF_DELEGATE,test "$have_flif" = 'yes')
2021 dnl ===========================================================================
2024 # Check for FlashPIX delegate library.
2027 [AC_HELP_STRING([--without-fpx],
2028 [disable FlashPIX support])],
2029 [with_fpx=$withval],
2032 if test "$with_fpx" != 'yes'; then
2033 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
2038 if test "$with_fpx" != 'no'; then
2039 AC_MSG_RESULT([-------------------------------------------------------------])
2040 AC_MSG_CHECKING([for FlashPIX])
2045 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2046 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2048 AC_MSG_CHECKING([if FlashPIX package is complete])
2049 if test $passed -gt 0; then
2050 if test $failed -gt 0; then
2051 AC_MSG_RESULT([no -- some components failed test])
2052 have_fpx='no (failed tests)'
2055 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
2056 AC_MSG_RESULT([yes])
2064 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
2067 dnl ===========================================================================
2070 # Check for DJVU delegate library.
2073 [AC_HELP_STRING([--without-djvu],
2074 [disable DjVu support])],
2075 [with_djvu=$withval],
2078 if test "$with_djvu" != 'yes'; then
2079 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
2086 if test "x$with_djvu" = "xyes"; then
2087 AC_MSG_RESULT([-------------------------------------------------------------])
2088 PKG_CHECK_MODULES(ddjvuapi,[ddjvuapi >= 3.5.0], have_djvu=yes, have_djvu=no)
2092 if test "$have_djvu" = 'yes'; then
2093 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
2094 DJVU_CFLAGS="$ddjvuapi_CFLAGS"
2095 DJVU_LIBS="$ddjvuapi_LIBS"
2096 CFLAGS="$ddjvuapi_CFLAGS $CFLAGS"
2099 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
2100 AC_SUBST(DJVU_CFLAGS)
2103 dnl ===========================================================================
2106 # Check for fontconfig delegate library.
2108 AC_ARG_WITH([fontconfig],
2109 [AC_HELP_STRING([--without-fontconfig],
2110 [disable fontconfig support])],
2111 [with_fontconfig=$withval],
2112 [with_fontconfig='yes'])
2114 if test "$with_fontconfig" != 'yes'; then
2115 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
2118 have_fontconfig='no'
2119 FONTCONFIG_CFLAGS=""
2122 if test "x$with_fontconfig" = "xyes"; then
2123 AC_MSG_RESULT([-------------------------------------------------------------])
2124 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
2128 if test "$have_fontconfig" = 'yes'; then
2129 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
2130 CFLAGS="$FONTCONFIG_CFLAGS $CFLAGS"
2133 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
2134 AC_SUBST(FONTCONFIG_CFLAGS)
2135 AC_SUBST(FONTCONFIG_LIBS)
2137 dnl ===========================================================================
2140 # Check for the Freetype delegate library.
2142 AC_ARG_WITH([freetype],
2143 [AC_HELP_STRING([--without-freetype],
2144 [disable Freetype support])],
2145 [with_freetype=$withval],
2146 [with_freetype='yes'])
2148 if test "$with_freetype" != 'yes'; then
2149 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
2156 if test "x$with_freetype" = "xyes"; then
2157 AC_MSG_RESULT([-------------------------------------------------------------])
2158 PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no)
2162 if test "$have_freetype" = 'yes'; then
2163 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library)
2164 CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
2167 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
2168 AC_SUBST(FREETYPE_CFLAGS)
2169 AC_SUBST(FREETYPE_LIBS)
2171 dnl ===========================================================================
2174 # Check for the raqm delegate library.
2177 [AC_HELP_STRING([--without-raqm],
2178 [disable Raqm support])],
2179 [with_raqm=$withval],
2182 if test "$with_raqm" != 'yes'; then
2183 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-raqm=$with_raqm "
2190 if test "x$with_raqm" = "xyes"; then
2191 AC_MSG_RESULT([-------------------------------------------------------------])
2192 PKG_CHECK_MODULES(RAQM,[raqm], have_raqm=yes, have_raqm=no)
2196 if test "$have_raqm" = 'yes'; then
2197 AC_DEFINE(RAQM_DELEGATE,1,Define if you have RAQM library)
2198 CFLAGS="$RAQM_CFLAGS $CFLAGS"
2201 AM_CONDITIONAL(RAQM_DELEGATE, test "$have_raqm" = 'yes')
2202 AC_SUBST(RAQM_CFLAGS)
2205 dnl ===========================================================================
2208 # Check for Ghostscript library or framework.
2210 # Test for iapi.h & test for gsapi_new_instance in -lgs
2211 # or -framework Ghostscript
2213 AC_ARG_WITH([gslib],
2214 [AC_HELP_STRING([--with-gslib],
2215 [enable Ghostscript library support])],
2216 [with_gslib=$withval],
2219 gslib_framework='no'
2220 if test "$with_gslib" != 'yes'; then
2221 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
2226 if test "$with_gslib" != 'no'; then
2227 AC_MSG_RESULT([-------------------------------------------------------------])
2228 AC_MSG_CHECKING([for Ghostscript])
2233 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
2234 failed=`expr $failed + 1`,)
2235 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
2236 failed=`expr $failed + 1`,)
2237 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
2238 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
2239 AC_MSG_CHECKING([if Ghostscript package is complete])
2240 if test $passed -gt 0; then
2241 if test $failed -gt 0; then
2242 AC_MSG_RESULT([no -- some components failed test])
2243 have_gslib='no (failed tests)'
2245 if test $framework -gt 0; then
2246 GS_LIBS='-framework Ghostscript'
2247 gslib_framework='yes'
2248 AC_MSG_RESULT([yes, using framework.])
2250 AC_MSG_RESULT([yes, using library.])
2253 LIBS="$GS_LIBS $LIBS"
2254 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
2261 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
2264 # Set default font search path
2265 AC_ARG_WITH([fontpath],
2266 [AC_HELP_STRING([--with-fontpath=DIR],
2267 [prepend to default font search path])],
2268 [with_fontpath=$withval],
2271 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2274 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",[Define to prepend to default font search path.])
2276 if test "$with_fontpath=" != ''; then
2277 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2280 # Set Ghostscript font directory
2281 AC_ARG_WITH([gs-font-dir],
2282 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2283 [Ghostscript font directory])],
2284 [with_gs_font_dir=$withval],
2285 [with_gs_font_dir='default'])
2287 if test "$with_gs_font_dir" != 'default'; then
2288 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2291 dnl ===========================================================================
2294 # Check for GVC delegate library.
2297 [AC_HELP_STRING([--with-gvc],
2298 [enable GVC support])],
2299 [with_gvc=$withval],
2302 if test "$with_gvc" != 'yes'; then
2303 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2307 if test "x$with_gvc" = "xyes"; then
2308 AC_MSG_RESULT([-------------------------------------------------------------])
2309 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2313 if test "$have_gvc" = 'yes'; then
2314 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2315 CFLAGS="$GVC_CFLAGS $CFLAGS"
2318 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2319 AC_SUBST(GVC_CFLAGS)
2322 dnl ===========================================================================
2325 # Check for the HEIC delegate library.
2328 [AC_HELP_STRING([--without-heic],
2329 [disable HEIC support])],
2330 [with_heic=$withval],
2333 if test "$with_heic" != 'yes'; then
2334 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-heic=$with_heic "
2341 if test "x$with_heic" = "xyes"; then
2342 AC_MSG_RESULT([-------------------------------------------------------------])
2343 PKG_CHECK_MODULES(HEIF,[libheif], have_heic=yes, have_heic=no)
2347 if test "$have_heic" = 'yes'; then
2348 AC_DEFINE(HEIC_DELEGATE,1,Define if you have libheif library)
2349 CFLAGS="$HEIF_CFLAGS $CFLAGS"
2352 AM_CONDITIONAL(HEIC_DELEGATE, test "$have_heic" = 'yes')
2353 AC_SUBST(HEIF_CFLAGS)
2356 dnl ===========================================================================
2359 # Check for JBIG delegate library.
2362 [AC_HELP_STRING([--without-jbig],
2363 [disable JBIG support])],
2364 [with_jbig=$withval],
2369 if test "$with_jbig" != 'no'; then
2370 AC_MSG_RESULT([-------------------------------------------------------------])
2371 AC_MSG_CHECKING([for JBIG])
2375 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2376 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2377 AC_MSG_CHECKING([if JBIG package is complete])
2378 if test $passed -gt 0; then
2379 if test $failed -gt 0; then
2380 AC_MSG_RESULT([no -- some components failed test])
2381 have_jbig='no (failed tests)'
2384 LIBS="$JBIG_LIBS $LIBS"
2385 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2386 AC_MSG_RESULT([yes])
2393 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2396 dnl ===========================================================================
2399 # Check for JPEG delegate library.
2402 [AC_HELP_STRING([--without-jpeg],
2403 [disable JPEG support])],
2404 [with_jpeg=$withval],
2407 if test "$with_jpeg" != 'yes'; then
2408 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2413 if test "$with_jpeg" != 'no'; then
2414 AC_MSG_RESULT([-------------------------------------------------------------])
2415 AC_MSG_CHECKING([for JPEG])
2419 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2420 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2421 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2422 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2423 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2425 # Test for compatible JPEG library
2426 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2427 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2431 #include <jpeglib.h>
2433 changequote(<<, >>)dnl
2435 #if JPEG_LIB_VERSION < 62
2436 #error IJG JPEG library must be version 6b or newer!
2440 changequote([, ])dnl
2441 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2442 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2444 AC_MSG_CHECKING([if JPEG package is complete])
2445 if test $passed -gt 0; then
2446 if test $failed -gt 0; then
2447 AC_MSG_RESULT([no -- some components failed test])
2448 have_jpeg='no (failed tests)'
2451 LIBS="$JPEG_LIBS $LIBS"
2452 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2453 AC_MSG_RESULT([yes])
2460 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2463 dnl ===========================================================================
2466 # Check for LCMS delegate library.
2469 [ --without-lcms disable lcms (v1.1X) support],
2470 [with_lcms=$withval],
2472 if test "$with_lcms" != 'yes' ; then
2473 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2480 if test "x$with_lcms" = "xyes"; then
2481 AC_MSG_RESULT([-------------------------------------------------------------])
2482 PKG_CHECK_MODULES(LCMS2,[lcms2 >= 2.0.0], have_lcms=yes, have_lcms=no)
2486 if test "$have_lcms" = 'yes'; then
2487 AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library)
2488 LCMS_CFLAGS="$LCMS2_CFLAGS"
2489 LCMS_LIBS="$LCMS2_LIBS"
2490 CFLAGS="$LCMS2_CFLAGS $CFLAGS"
2491 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2492 if test "$have_lcms_header" = 'yes'; then
2493 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2495 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2499 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms" = 'yes')
2500 AC_SUBST(LCMS_CFLAGS)
2503 dnl ===========================================================================
2506 # Check for the OpenJP2 delegate library.
2508 AC_ARG_WITH([openjp2],
2509 [AC_HELP_STRING([--without-openjp2],
2510 [disable OpenJP2 support])],
2511 [with_openjp2=$withval],
2512 [with_openjp2='yes'])
2514 if test "$with_openjp2" != 'yes'; then
2515 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openjp2=$with_openjp2 "
2519 LIBOPENJP2_CFLAGS=""
2522 if test "x$with_openjp2" = "xyes"; then
2523 AC_MSG_RESULT([-------------------------------------------------------------])
2524 PKG_CHECK_MODULES(LIBOPENJP2,[libopenjp2 >= 2.1.0], have_openjp2=yes, have_openjp2=no)
2528 if test "$have_openjp2" = 'yes'; then
2529 AC_DEFINE(LIBOPENJP2_DELEGATE,1,Define if you have OPENJP2 library)
2530 CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS"
2533 AM_CONDITIONAL(LIBOPENJP2_DELEGATE, test "$have_openjp2" = 'yes')
2534 AC_SUBST(LIBOPENJP2_CFLAGS)
2535 AC_SUBST(LIBOPENJP2_LIBS)
2538 dnl ===========================================================================
2541 # Check for the LQR (Liquid Rescale) delegate library.
2544 [AC_HELP_STRING([--without-lqr],
2545 [disable Liquid Rescale support])],
2546 [with_lqr=$withval],
2549 if test "$with_lqr" != 'yes'; then
2550 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2557 if test "x$with_lqr" = "xyes"; then
2558 AC_MSG_RESULT([-------------------------------------------------------------])
2559 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2563 if test "$have_lqr" = 'yes'; then
2564 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2565 CFLAGS="$LQR_CFLAGS $CFLAGS"
2568 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2569 AC_SUBST(LQR_CFLAGS)
2572 dnl ===========================================================================
2574 # Disable LZMA (lzma library)
2576 [ --without-lzma disable LZMA support],
2577 [with_lzma=$withval],
2579 if test "$with_lzma" != 'yes' ; then
2580 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2584 if test "x$with_lzma" = "xyes"; then
2585 AC_MSG_RESULT([-------------------------------------------------------------])
2586 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2590 if test "$have_lzma" = 'yes'; then
2591 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2592 CFLAGS="$LZMA_CFLAGS $CFLAGS"
2595 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2596 AC_SUBST(LZMA_CFLAGS)
2599 dnl ===========================================================================
2602 # Check for the OpenEXR delegate library.
2604 AC_ARG_WITH([openexr],
2605 [AC_HELP_STRING([--without-openexr],
2606 [disable OpenEXR support])],
2607 [with_openexr=$withval],
2608 [with_openexr='yes'])
2610 if test "$with_openexr" != 'yes'; then
2611 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2618 if test "x$with_openexr" = "xyes"; then
2619 AC_MSG_RESULT([-------------------------------------------------------------])
2620 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2624 if test "$have_openexr" = 'yes'; then
2625 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2626 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2629 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2630 AC_SUBST(OPENEXR_CFLAGS)
2631 AC_SUBST(OPENEXR_LIBS)
2633 dnl ===========================================================================
2636 # Check for PANGO delegate library.
2638 AC_ARG_WITH([pango],
2639 [AC_HELP_STRING([--without-pango],
2640 [disable PANGO support])],
2641 [with_pango=$withval],
2644 if test "$with_pango" != 'yes'; then
2645 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2649 have_pangocairo='no'
2653 if test "x$with_pango" = "xyes"; then
2654 AC_MSG_RESULT([-------------------------------------------------------------])
2655 PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
2657 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2661 if test "$have_pango" = 'yes'; then
2662 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2663 CFLAGS="$PANGO_CFLAGS $CFLAGS"
2666 if test "$have_pangocairo" = 'yes'; then
2667 AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
2668 CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
2671 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2672 AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes')
2673 AC_SUBST(PANGO_CFLAGS)
2674 AC_SUBST(PANGO_LIBS)
2676 dnl ===========================================================================
2679 # Check for PNG delegate library.
2682 [AC_HELP_STRING([--without-png],
2683 [disable PNG support])],
2684 [with_png=$withval],
2687 if test "$with_png" != 'yes'; then
2688 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2695 if test "x$with_png" = "xyes"; then
2696 AC_MSG_RESULT([-------------------------------------------------------------])
2697 PKG_CHECK_MODULES(PNG,[libpng >= 1.0.0], have_png=yes, have_png=no)
2701 if test "$have_png" = 'yes'; then
2702 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2703 CFLAGS="$PNG_CFLAGS $CFLAGS"
2706 AM_CONDITIONAL(PNG_DELEGATE, test "$have_png" = 'yes')
2707 AC_SUBST(PNG_CFLAGS)
2710 dnl ===========================================================================
2713 # Check for the Raw delegate library.
2716 [AC_HELP_STRING([--without-raw],
2717 [disable Raw support])],
2718 [with_raw=$withval],
2721 if test "$with_raw" != 'yes'; then
2722 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-libraw=$with_raw "
2729 if test "x$with_raw" = "xyes"; then
2730 AC_MSG_RESULT([-------------------------------------------------------------])
2731 PKG_CHECK_MODULES(RAW_R,[libraw_r >= 0.14.8], have_raw=yes, have_raw=no)
2735 if test "$have_raw" = 'yes'; then
2736 AC_DEFINE(RAW_R_DELEGATE,1,Define if you have LIBRAW library)
2737 CFLAGS="$RAW_R_CFLAGS $CFLAGS"
2740 AM_CONDITIONAL(RAW_R_DELEGATE, test "$have_raw" = 'yes')
2741 AC_SUBST(RAW_R_CFLAGS)
2742 AC_SUBST(RAW_R_LIBS)
2744 dnl ===========================================================================
2747 # Check for RSVG delegate library.
2750 [AC_HELP_STRING([--with-rsvg],
2751 [enable RSVG support])],
2752 [with_rsvg=$withval],
2755 if test "$with_rsvg" != 'yes'; then
2756 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2764 if test "x$with_rsvg" = "xyes"; then
2765 AC_MSG_RESULT([-------------------------------------------------------------])
2766 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2768 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2772 if test "$have_rsvg" = 'yes'; then
2773 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2774 CFLAGS="$RSVG_CFLAGS $CFLAGS"
2777 if test "$have_cairo" = 'yes'; then
2778 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2779 CFLAGS="$CAIRO_SVG_CFLAGS $CFLAGS"
2782 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2783 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2784 AC_SUBST(RSVG_CFLAGS)
2787 dnl ===========================================================================
2790 # Check for TIFF delegate library.
2793 [AC_HELP_STRING([--without-tiff],
2794 [disable TIFF support])],
2795 [with_tiff=$withval],
2798 if test "$with_tiff" != 'yes'; then
2799 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2804 if test "$with_tiff" != 'no'; then
2805 AC_MSG_RESULT([-------------------------------------------------------------])
2806 AC_MSG_CHECKING([for TIFF])
2810 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2811 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2812 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2813 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2814 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2815 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2816 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2817 AC_MSG_CHECKING([if TIFF package is complete])
2818 if test $passed -gt 0; then
2819 if test $failed -gt 0; then
2820 AC_MSG_RESULT([no -- some components failed test])
2821 have_tiff='no (failed tests)'
2824 LIBS="$TIFF_LIBS $LIBS"
2825 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2826 AC_MSG_RESULT([yes])
2828 AC_CHECK_HEADERS(tiffconf.h)
2829 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2830 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2831 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2832 TIFFSwabArrayOfTriples])
2838 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2842 # Set URW Base35 font directory.
2844 AC_ARG_WITH([urw-base35-font-dir],
2845 [AC_HELP_STRING([--with-urw-base35-font-dir=DIR],
2846 [URW-base35 font directory])],
2847 [with_urw_base35_font_dir=$withval],
2848 [with_urw_base35_font_dir='default'])
2850 if test "$with_urw_base35_font_dir" != 'default'; then
2851 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-urw-base35-font-dir=$with_urw_base35_font_dir "
2854 dnl ===========================================================================
2857 # Check for the WEBP delegate library.
2860 [AC_HELP_STRING([--without-webp],
2861 [disable WEBP support])],
2862 [with_webp=$withval],
2865 if test "$with_webp" != 'yes'; then
2866 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2877 if test "x$with_webp" = "xyes"; then
2878 AC_MSG_RESULT([-------------------------------------------------------------])
2879 PKG_CHECK_MODULES(WEBP,[libwebp], have_webp=yes, have_webp=no)
2880 PKG_CHECK_MODULES(WEBPMUX,[libwebpmux >= 0.4.4], have_webpmux=yes, have_webpmux=no)
2884 if test "$have_webp" = 'yes'; then
2885 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2886 CFLAGS="$WEBP_CFLAGS $CFLAGS"
2889 if test "$have_webpmux" = 'yes'; then
2890 AC_DEFINE(WEBPMUX_DELEGATE,1,Define if you have WEBPMUX library)
2891 CFLAGS="$WEBPMUX_CFLAGS $CFLAGS"
2894 AM_CONDITIONAL(WEBP_DELEGATE, test "$have_webp" = 'yes')
2895 AM_CONDITIONAL(WEBPMUX_DELEGATE, test "$have_webpmux" = 'yes')
2896 AC_SUBST(WEBPMUX_CFLAGS)
2897 AC_SUBST(WEBPMUX_LIBS)
2898 AC_SUBST(WEBP_CFLAGS)
2901 dnl ===========================================================================
2904 # Set Windows font directory.
2906 AC_ARG_WITH([windows-font-dir],
2907 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2908 [Windows font directory])],
2909 [with_windows_font_dir=$withval],
2910 [with_windows_font_dir='default'])
2912 if test "$with_windows_font_dir" != 'default'; then
2913 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2916 dnl ===========================================================================
2919 # Check for WMF delegate library.
2922 [AC_HELP_STRING([--with-wmf],
2923 [enable WMF support])],
2924 [with_wmf=$withval],
2927 if test "$with_wmf" != 'yes'; then
2928 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2935 if test "$with_wmf" != 'no'; then
2936 AC_MSG_CHECKING([for WMF support ])
2939 have_libwmflite='no'
2940 have_libwmf_ipa_h='no'
2942 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],[],[$FT2BUILD_H])
2943 if test "$have_libwmf_ipa_h" = 'yes'; then
2944 AC_CHECK_LIB([wmflite],[wmf_lite_create],[have_libwmflite='yes'],[],[])
2945 if test "$have_libwmflite" = 'yes'; then
2946 AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
2947 WMF_LIBS='-lwmflite'
2948 LIBS="$WMF_LIBS $LIBS"
2951 AC_MSG_RESULT([no -- some components failed test])
2952 have_wmf='no (failed tests)'
2953 have_wmflite='no (failed tests)'
2959 AC_MSG_CHECKING([if WMF package is complete ])
2960 if test "$have_wmf" = 'yes'; then
2961 AC_MSG_RESULT([yes])
2965 AM_CONDITIONAL([WMF_DELEGATE], [test "$have_wmf" = 'yes'])
2966 AC_SUBST([WMF_CFLAGS])
2967 AC_SUBST([WMF_LIBS])
2969 dnl ===========================================================================
2972 # Check for XML delegate library.
2975 [AC_HELP_STRING([--without-xml],
2976 [disable XML support])],
2977 [with_xml=$withval],
2980 if test "$with_xml" != 'yes' ; then
2981 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2988 if test "x$with_xml" = "xyes"; then
2989 AC_MSG_RESULT([-------------------------------------------------------------])
2990 PKG_CHECK_MODULES(XML,[libxml-2.0 >= 2.0.0], have_xml=yes, have_xml=no)
2994 if test "$have_xml" = 'yes'; then
2995 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2996 CFLAGS="$XML_CFLAGS $CFLAGS"
2999 AM_CONDITIONAL(XML_DELEGATE, test "$have_xml" = 'yes')
3000 AC_SUBST(XML_CFLAGS)
3003 dnl ===========================================================================
3005 # Check for functions
3007 AC_CHECK_FUNCS([acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock clock_getres clock_gettime ctime_r directio erf _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 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])
3009 # Substitute compiler name to build/link PerlMagick
3011 AC_SUBST([PERLMAINCC])
3014 # Configure install Paths
3017 # Path to ImageMagick header files
3018 INCLUDE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3019 INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}"
3020 DEFINE_INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}/"
3021 case "${build_os}" in
3023 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
3026 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick headers live.])
3027 AC_SUBST(INCLUDE_PATH)
3029 # Path to ImageMagick header files (arch part)
3030 INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
3031 DEFINE_INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
3032 case "${build_os}" in
3034 DEFINE_INCLUDEARCH_PATH=`$WinPathScript "$DEFINE_INCLUDEARCH_PATH" 1`
3037 AC_DEFINE_UNQUOTED(INCLUDEARCH_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick architecture headers live.])
3038 AC_SUBST(INCLUDEARCH_PATH)
3040 # Subdirectory under lib to place ImageMagick lib files
3041 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
3042 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",[Subdirectory of lib where ImageMagick architecture dependent files are installed.])
3044 # Path to ImageMagick bin directory
3045 EXECUTABLE_PATH="${BIN_DIR}"
3046 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
3047 case "${build_os}" in
3049 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
3052 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",[Directory where executables are installed.])
3053 AC_SUBST(EXECUTABLE_PATH)
3055 # Path to ImageMagick lib
3056 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
3057 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
3058 case "${build_os}" in
3060 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
3063 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",[Directory where architecture-dependent files live.])
3064 AC_SUBST(LIBRARY_PATH)
3067 # path to local binaries
3068 if test "x$LIB_BIN_BASEDIRNAME" = "x"; then
3069 LIB_BIN_BASEDIRNAME="bin"
3071 AC_DEFINE_UNQUOTED(LIB_BIN_BASEDIRNAME,"$LIB_BIN_BASEDIRNAME",[Binaries in libraries path base name (will be during install linked to bin)])
3072 AC_SUBST(LIB_BIN_BASEDIRNAME)
3074 if test "x$LIB_BIN_DIR" = "x"; then
3075 LIB_BIN_DIR=${LIB_BIN_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3077 AC_SUBST(LIB_BIN_DIR)
3079 LIB_BIN_DIR_RELATIVE_PATH=$LIB_BIN_DIR
3080 AC_SUBST(LIB_BIN_DIR_RELATIVE_PATH)
3081 LIB_BIN_DIR_PATH="${LIBRARY_PATH}/${LIB_BIN_DIR_RELATIVE_PATH}"
3082 AC_SUBST(LIB_BIN_DIR_PATH)
3085 # path to modules lib
3086 if test "x$MODULES_BASEDIRNAME" = "x"; then
3087 MODULES_BASEDIRNAME="modules"
3089 AC_DEFINE_UNQUOTED(MODULES_BASEDIRNAME,"$MODULES_BASEDIRNAME",[Module directory name without ABI part.])
3090 AC_SUBST(MODULES_BASEDIRNAME)
3092 if test "x$MODULES_DIRNAME" = "x"; then
3093 MODULES_DIRNAME=${MODULES_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3095 AC_DEFINE_UNQUOTED(MODULES_DIRNAME,"$MODULES_DIRNAME",[Module directory dirname])
3097 AC_SUBST(MODULES_DIRNAME)
3099 MODULES_RELATIVE_PATH="${MODULES_DIRNAME}"
3100 AC_SUBST(MODULES_RELATIVE_PATH)
3101 MODULES_PATH="${LIBRARY_PATH}/${MODULES_RELATIVE_PATH}"
3102 AC_SUBST(MODULES_PATH)
3105 # path to coders lib
3106 if test "x$CODER_DIRNAME" = "x"; then
3107 CODER_DIRNAME="coders"
3109 AC_DEFINE_UNQUOTED(CODER_DIRNAME,"$CODER_DIRNAME",[coders subdirectory.])
3110 AC_SUBST(CODER_DIRNAME)
3112 CODER_RELATIVE_PATH="${CODER_DIRNAME}"
3113 CODER_PATH="${MODULES_PATH}/${CODER_DIRNAME}"
3114 AC_SUBST(CODER_PATH)
3117 # Subdirectory under lib to place ImageMagick filter module files
3119 # path to coders lib
3120 if test "x$FILTER_DIRNAME" = "x"; then
3121 FILTER_DIRNAME="filters"
3123 AC_DEFINE_UNQUOTED(FILTER_DIRNAME,"$FILTER_DIRNAME",[filter subdirectory.])
3124 AC_SUBST(FILTER_DIRNAME)
3126 FILTER_RELATIVE_PATH="${FILTER_DIRNAME}"
3127 FILTER_PATH="${MODULES_PATH}/${FILTER_DIRNAME}"
3128 AC_SUBST(FILTER_PATH)
3131 # Path to ImageMagick documentation files
3132 DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3133 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
3134 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
3135 case "${build_os}" in
3137 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
3140 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",[Directory where ImageMagick documents live.])
3141 AC_SUBST(DOCUMENTATION_PATH)
3144 # Enable/Disable documentation
3145 AC_ARG_ENABLE([docs],
3146 [AS_HELP_STRING([--disable-docs],
3147 [disable building of documentation])],
3148 wantdocs=$enableval, wantdocs=yes)
3149 AM_CONDITIONAL([INSTALL_DOC], [test "$wantdocs" = "yes"])
3151 # Subdirectory to place architecture-dependent configuration files
3152 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3153 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",[Subdirectory of lib where architecture-dependent configuration files live.])
3154 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3155 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3156 case "${build_os}" in
3158 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
3161 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",[Directory where architecture-dependent configuration files live.])
3162 AC_SUBST(CONFIGURE_PATH)
3164 # Subdirectory to place architecture-independent configuration files
3165 SHARE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3166 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",[Subdirectory of lib where architecture-independent configuration files live.])
3167 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
3168 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
3169 case "${build_os}" in
3171 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
3174 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",[Directory where architecture-independent configuration files live.])
3175 AC_SUBST(SHARE_PATH)
3178 # Subdirectory to place architecture-dependent configuration files.
3179 if test "x$SHAREARCH_BASEDIRNAME" = "x"; then
3180 SHAREARCH_BASEDIRNAME="config"
3182 AC_DEFINE_UNQUOTED(SHAREARCH_BASEDIRNAME,"$SHAREARCH_BASEDIRNAME",[Sharearch directory name without ABI part.])
3183 AC_SUBST(SHAREARCH_BASEDIRNAME)
3185 if test "x$SHAREARCH_DIRNAME" = "x"; then
3186 SHAREARCH_DIRNAME=${SHAREARCH_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3188 AC_DEFINE_UNQUOTED(SHAREARCH_DIRNAME,"$SHAREARCH_DIRNAME",[Sharearch directory dirname])
3190 AC_SUBST(SHAREARCH_DIRNAME)
3192 SHAREARCH_RELATIVE_PATH="${SHAREARCH_DIRNAME}"
3193 AC_SUBST(SHAREARCH_RELATIVE_PATH)
3194 SHAREARCH_PATH="${LIBRARY_PATH}/${SHAREARCH_RELATIVE_PATH}"
3195 AC_SUBST(SHAREARCH_PATH)
3198 # program_transform_name is formed for use in a Makefile, so create a
3199 # modified version for use in a shell script.
3200 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3202 # Default delegate definitions
3203 AC_MSG_RESULT([-------------------------------------------------------------])
3204 AC_MSG_CHECKING([for ImageMagick delegate programs])
3206 BPGDecodeDelegateDefault='bpgdec'
3207 BPGEncodeDelegateDefault='bpgenc'
3208 BlenderDecodeDelegateDefault='blender'
3209 BrowseDelegateDefault='xdg-open'
3210 DNGDecodeDelegateDefault='ufraw-batch'
3211 DOCDecodeDelegateDefault='soffice'
3212 GVCDecodeDelegateDefault='dot'
3213 DVIDecodeDelegateDefault='dvips'
3214 EditorDelegateDefault='xterm'
3215 ConvertDelegateDefault=`echo magick | sed ${configure_transform_name}`
3216 DisplayDelegateDefault=`echo magick | sed ${configure_transform_name}`
3217 MogrifyDelegateDefault=`echo magick | sed ${configure_transform_name}`
3218 HPGLDecodeDelegateDefault='hp2xx'
3219 HTMLDecodeDelegateDefault='html2ps'
3220 ILBMDecodeDelegateDefault='ilbmtoppm'
3221 ILBMEncodeDelegateDefault='ppmtoilbm'
3222 JXRDecodeDelegateDefault='JxrDecApp'
3223 JXREncodeDelegateDefault='JxrEncApp'
3224 LEPDelegateDefault='lepton'
3225 LPDelegateDefault='lp'
3226 LPRDelegateDefault='lpr'
3227 LaunchDelegateDefault='gimp'
3228 MPEGDecodeDelegateDefault='avconv'
3229 MPEGEncodeDelegateDefault='avconv'
3230 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3231 MVDelegateDefault='mv'
3232 PCLDelegateDefault='pcl6'
3233 if test "$native_win32_build" = 'yes'; then
3234 PSDelegateDefault='gswin32c'
3235 elif test "$gslib_framework" = 'yes'; then
3236 PSDelegateDefault='gsc'
3238 PSDelegateDefault='gs'
3240 RMDelegateDefault='rm'
3241 RSVGDecodeDelegateDefault='rsvg-convert'
3242 SVGDecodeDelegateDefault='inkscape'
3243 TraceEncodeDelegateDefault='potrace'
3244 UniconvertorDelegateDefault='uniconvertor'
3245 WebPDecodeDelegateDefault='dwebp'
3246 WebPEncodeDelegateDefault='cwebp'
3247 WWWDecodeDelegateDefault='curl'
3248 XPSDelegateDefault='gxps'
3250 # Search for delegates
3251 AC_PATH_PROG(BPGDecodeDelegate, "$BPGDecodeDelegateDefault", "$BPGDecodeDelegateDefault")
3252 AC_PATH_PROG(BPGEncodeDelegate, "$BPGEncodeDelegateDefault", "$BPGEncodeDelegateDefault")
3253 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3254 AC_PATH_PROGS(BrowseDelegate, "$BrowseDelegateDefault" google-chrome firefox konqueror mozilla lynx, "$BrowseDelegateDefault")
3255 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3256 AC_PATH_PROG(DOCDecodeDelegate, "$DOCDecodeDelegateDefault", "$DOCDecodeDelegateDefault")
3257 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3258 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3259 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3260 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3261 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3262 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3263 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3264 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3265 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3266 AC_PATH_PROG(JXRDecodeDelegate, "$JXRDecodeDelegateDefault", "$JXRDecodeDelegateDefault")
3267 AC_PATH_PROG(JXREncodeDelegate, "$JXREncodeDelegateDefault", "$JXREncodeDelegateDefault")
3268 AC_PATH_PROG(LEPDelegate, "$LEPDelegateDefault", "$LEPDelegateDefault")
3269 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3270 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3271 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3272 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3273 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3274 if test "$MPEGDecodeDelegate" = "$MPEGDecodeDelegateDefault" ; then
3275 MPEGDecodeDelegateDefault='ffmpeg'
3276 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3278 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3279 if test "$MPEGEncodeDelegate" = "$MPEGEncodeDelegateDefault" ; then
3280 MPEGEncodeDelegateDefault='ffmpeg'
3281 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3283 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3284 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3285 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3286 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3287 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3288 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3289 AC_PATH_PROG(SVGDecodeDelegate, "$SVGDecodeDelegateDefault", "$SVGDecodeDelegateDefault")
3290 AC_PATH_PROG(TraceEncodeDelegate, "$TraceEncodeDelegateDefault", "$TraceEncodeDelegateDefault")
3291 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3292 AC_PATH_PROG(WebPDecodeDelegate, "$WebPDecodeDelegateDefault", "$WebPDecodeDelegateDefault")
3293 AC_PATH_PROG(WebPEncodeDelegate, "$WebPEncodeDelegateDefault", "$WebPEncodeDelegateDefault")
3294 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDelegateDefault")
3295 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3297 # Prefer lpr to lp; lp needs options tacked on.
3298 if test "$LPRDelegate" != no; then
3299 PrintDelegate="$LPRDelegate"
3301 PrintDelegate="$LPDelegate -c -s"
3303 AC_SUBST(PrintDelegate)
3305 # Installed ImageMagick utiltity paths
3306 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3307 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3308 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3310 # Set delegate booleans
3311 have_avconv='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_avconv='yes'; fi
3312 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3313 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3314 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3315 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3316 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3317 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3318 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3321 # Test for font directories
3323 type_include_files=''
3326 AC_MSG_CHECKING(for Apple fonts directory)
3328 if test "${with_apple_font_dir}" != 'default'; then
3329 apple_font_dir="${with_apple_font_dir}/"
3331 for font_dir in '/Library/Fonts/'; do
3332 if test -f "${font_dir}Arial.ttf"; then
3333 apple_font_dir="${font_dir}"
3338 if test "${apple_font_dir}x" != 'x'; then
3339 type_include_files="${type_include_files} "'<include file="type-apple.xml" />'
3340 AC_MSG_RESULT([$apple_font_dir])
3342 AC_MSG_RESULT([not found!]);
3344 AC_SUBST(apple_font_dir)
3347 AC_MSG_CHECKING(for Dejavu fonts directory)
3349 if test "${with_dejavu_font_dir}" != 'default'; then
3350 dejavu_font_dir="${with_dejavu_font_dir}/"
3352 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3353 if test -f "${font_dir}DejaVuSerif.ttf"; then
3354 dejavu_font_dir="${font_dir}"
3359 if test "${dejavu_font_dir}x" != 'x'; then
3360 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3361 AC_MSG_RESULT([$dejavu_font_dir])
3363 AC_MSG_RESULT([not found!]);
3365 AC_SUBST(dejavu_font_dir)
3368 AC_MSG_CHECKING(for Ghostscript fonts directory)
3369 ghostscript_font_dir=''
3370 if test "${with_gs_font_dir}" != 'default'; then
3371 ghostscript_font_dir="${with_gs_font_dir}/"
3373 if test "${native_win32_build}" = 'yes'; then
3374 # Native Windows Build
3375 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3376 if test -f "${font_dir}a010013l.pfb"; then
3377 ghostscript_font_dir="$font_dir"
3381 if test "${PSDelegate}" != 'gswin32c'; then
3382 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3385 # Linux / Mac OS X / Unix Build
3386 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
3387 if test -f "${font_dir}a010013l.pfb"; then
3388 ghostscript_font_dir="${font_dir}"
3392 if test "${ghostscript_font_dir}x" = 'x'; then
3393 if test "$PSDelegate" != 'gs'; then
3394 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3399 if test "${ghostscript_font_dir}x" != 'x'; then
3400 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3401 AC_MSG_RESULT([$ghostscript_font_dir])
3403 AC_MSG_RESULT([not found!]);
3405 AC_SUBST(ghostscript_font_dir)
3406 case "${build_os}" in
3408 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3413 AC_MSG_CHECKING(for URW-base35 fonts directory)
3414 urw_base35_font_dir=''
3415 if test "${with_urw_base35_font_dir}" != 'default'; then
3416 urw_base35_font_dir="${with_urw_base35_font_dir}/"
3418 for font_dir in "${prefix}/share/urw-base35/fonts/" '/usr/share/fonts/urw-base35/'; do
3419 if test -f "${font_dir}StandardSymbolsPS.t1"; then
3420 urw_base35_font_dir="${font_dir}"
3425 if test "${urw_base35_font_dir}x" != 'x'; then
3426 type_include_files="${type_include_files} "'<include file="type-urw-base35.xml" />'
3427 AC_MSG_RESULT([$urw_base35_font_dir])
3429 AC_MSG_RESULT([not found!]);
3431 AC_SUBST(urw_base35_font_dir)
3434 AC_MSG_CHECKING(for Windows fonts directory)
3436 if test "${with_windows_font_dir}" != 'default'; then
3437 windows_font_dir="${with_windows_font_dir}/"
3439 for font_dir in '/usr/X11R6/lib/X11/fonts/truetype/' '/usr/X11R7/lib/X11/fonts/truetype/' '/usr/share/fonts/msttcore/' '/usr/share/fonts/microsoft/' '/usr/share/fonts/truetype/msttcorefonts/'; do
3440 if test -f "${font_dir}arial.ttf"; then
3441 windows_font_dir="${font_dir}"
3446 if test "${windows_font_dir}x" != 'x'; then
3447 type_include_files="${type_include_files} "'<include file="type-windows.xml" />'
3448 AC_MSG_RESULT([$windows_font_dir])
3450 AC_MSG_RESULT([not found!]);
3452 AC_SUBST(windows_font_dir)
3454 AC_SUBST(type_include_files)
3457 # Handle case where user doesn't want frozen paths
3459 if test "$with_frozenpaths" != 'yes'; then
3460 # Re-set delegate definitions to default (no paths)
3461 BPGDecodeDelegate="$BPGDecodeDelegateDefault"
3462 BPGEncodeDelegate="$BPGEncodeDelegateDefault"
3463 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3464 BrowseDelegate="$BrowseDelegateDefault"
3465 ConvertDelegate="$ConvertDelegateDefault"
3466 DisplayDelegate="$DisplayDelegateDefault"
3467 DNGDecodeDelegate="$DNGDecodeDelegateDefault"
3468 DOCDecodeDelegate="$DOCDecodeDelegateDefault"
3469 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3470 EditorDelegate="$EditorDelegateDefault"
3471 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3472 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3473 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3474 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3475 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3476 JXRDecodeDelegate="$JXRDecodeDelegateDefault"
3477 JXREncodeDelegate="$JXREncodeDelegateDefault"
3478 LEPDelegate="$LEPDelegateDefault"
3479 LPDelegate="$LPDelegateDefault"
3480 LaunchDelegate="$LaunchDelegateDefault"
3481 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3482 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3483 MogrifyDelegate="$MogrifyDelegateDefault"
3484 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3485 PCLDelegate="$PCLDelegateDefault"
3486 PSDelegate="$PSDelegateDefault"
3487 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3488 SVGDecodeDelegate="$SVGDecodeDelegateDefault"
3489 ShowImageDelegate="$ShowImageDelegateDefault"
3490 TraceEncodeDelegate="$TraceEncodeDelegateDefault"
3491 UniconvertorDelegate="$UniconvertorDelegateDefault"
3492 WebPDecodeDelegate="$WebPDecodeDelegateDefault"
3493 WebPEncodeDelegate="$WebPEncodeDelegateDefault"
3494 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3495 XPSDelegate="$XPSDelegateDefault"
3498 # Delegate substitutions
3499 AC_SUBST(BPGDecodeDelegate)
3500 AC_SUBST(BPGEncodeDelegate)
3501 AC_SUBST(BlenderDecodeDelegate)
3502 AC_SUBST(BrowseDelegate)
3503 AC_SUBST(ConvertDelegate)
3504 AC_SUBST(GVCDecodeDelegate)
3505 AC_SUBST(DVIDecodeDelegate)
3506 AC_SUBST(EditorDelegate)
3507 AC_SUBST(HPGLDecodeDelegate)
3508 AC_SUBST(HTMLDecodeDelegate)
3509 AC_SUBST(ILBMDecodeDelegate)
3510 AC_SUBST(ILBMEncodeDelegate)
3511 AC_SUBST(JXRDecodeDelegate)
3512 AC_SUBST(JXREncodeDelegate)
3513 AC_SUBST(LEPDelegate)
3514 AC_SUBST(LPDelegate)
3515 AC_SUBST(LaunchDelegate)
3516 AC_SUBST(MPEGDecodeDelegate)
3517 AC_SUBST(MPEGEncodeDelegate)
3518 AC_SUBST(MogrifyDelegate)
3519 AC_SUBST(MrSIDDecodeDelegate)
3520 AC_SUBST(PCLDelegate)
3521 AC_SUBST(PSDelegate)
3522 AC_SUBST(ShowImageDelegate)
3523 AC_SUBST(TraceEncodeDelegate)
3524 AC_SUBST(UniconvertorDelegate)
3525 AC_SUBST(WebPDecodeDelegate)
3526 AC_SUBST(WebPEncodeDelegate)
3527 AC_SUBST(WWWDecodeDelegate)
3528 AC_SUBST(XPSDelegate)
3534 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3535 AC_CHECK_PROGS(PERL,perl)
3536 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3537 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3538 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3539 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3540 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3542 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3545 # 7ZIP support (http://p7zip.sourceforge.net/)
3548 AC_CHECK_PROGS(P7ZIP,[7za])
3550 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3553 # ZIP support (http://www.info-zip.org/Zip.html)
3556 AC_CHECK_PROGS(ZIP,[zip])
3558 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3561 # GhostPCL related configuration.
3563 PCLColorDevice=ppmraw
3564 PCLCMYKDevice=pamcmyk32
3565 PCLMonoDevice=pbmraw
3566 if test -z "$PCLVersion"; then
3567 PCLVersion='unknown'
3569 if test $have_pcl = 'yes'; then
3570 AC_MSG_RESULT([-------------------------------------------------------------])
3571 AC_MSG_CHECKING([for PCL])
3574 AC_MSG_CHECKING([for pcl color device])
3575 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3578 PCLColorDevice=ppmraw
3580 AC_MSG_RESULT([$PCLColorDevice])
3583 AC_MSG_CHECKING([for pcl CMYK device])
3584 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3587 PCLCMYKDevice=$PCLColorDevice
3589 AC_MSG_RESULT([$PCLCMYKDevice])
3592 AC_MSG_CHECKING([for pcl mono device])
3593 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3596 PCLMonoDevice=$PCLColorDevice
3598 AC_MSG_RESULT([$PCLMonoDevice])
3601 AC_SUBST(PCLMonoDevice)
3602 AC_SUBST(PCLColorDevice)
3603 AC_SUBST(PCLCMYKDevice)
3604 AC_SUBST(PCLVersion)
3607 # GhostXPS related configuration.
3609 XPSColorDevice=ppmraw
3610 XPSCMYKDevice=bmpsep8
3611 XPSMonoDevice=pbmraw
3612 if test -z "$XPSVersion"; then
3613 XPSVersion='unknown'
3615 if test $have_xps = 'yes'; then
3616 AC_MSG_RESULT([-------------------------------------------------------------])
3617 AC_MSG_CHECKING([for XPS])
3620 AC_MSG_CHECKING([for xps color device])
3621 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3624 XPSColorDevice=ppmraw
3626 AC_MSG_RESULT([$XPSColorDevice])
3629 AC_MSG_CHECKING([for xps CMYK device])
3630 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3633 XPSCMYKDevice=$XPSColorDevice
3635 AC_MSG_RESULT([$XPSCMYKDevice])
3638 AC_MSG_CHECKING([for xps mono device])
3639 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3642 XPSMonoDevice=$XPSColorDevice
3644 AC_MSG_RESULT([$XPSMonoDevice])
3647 AC_SUBST(XPSMonoDevice)
3648 AC_SUBST(XPSColorDevice)
3649 AC_SUBST(XPSCMYKDevice)
3650 AC_SUBST(XPSVersion)
3653 # Ghostscript related configuration.
3655 GSAlphaDevice=pngalpha
3656 GSColorDevice=pnmraw
3657 GSCMYKDevice=pamcmyk32
3659 GSPDFDevice=pdfwrite
3661 GSEPSDevice=eps2write
3663 if test $have_gs = 'yes'; then
3664 AC_MSG_RESULT([-------------------------------------------------------------])
3665 AC_MSG_CHECKING([for Ghostscript])
3667 AC_MSG_CHECKING([for Ghostscript version])
3668 if GSVersion=`$PSDelegate --version`; then
3671 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3673 AC_MSG_RESULT([$GSVersion])
3676 AC_MSG_CHECKING([for gs color device])
3677 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3680 GSColorDevice=ppmraw
3682 AC_MSG_RESULT([$GSColorDevice])
3685 AC_MSG_CHECKING([for gs alpha device])
3686 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3689 GSAlphaDevice=$GSColorDevice
3691 AC_MSG_RESULT([$GSAlphaDevice])
3694 AC_MSG_CHECKING([for gs CMYK device])
3695 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3700 AC_MSG_RESULT([$GSCMYKDevice])
3703 AC_MSG_CHECKING([for gs mono device])
3704 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3707 GSMonoDevice=$GSColorDevice
3709 AC_MSG_RESULT([$GSMonoDevice])
3712 AC_MSG_CHECKING([for gs PDF writing device])
3713 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3716 GSPDFDevice=nodevice
3718 AC_MSG_RESULT([$GSPDFDevice])
3721 AC_MSG_CHECKING([for gs PS writing device])
3722 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3727 AC_MSG_RESULT([$GSPSDevice])
3730 AC_MSG_CHECKING([for gs EPS writing device])
3731 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3734 GSEPSDevice=epswrite
3736 AC_MSG_RESULT([$GSEPSDevice])
3739 AC_SUBST(GSAlphaDevice)
3740 AC_SUBST(GSCMYKDevice)
3741 AC_SUBST(GSColorDevice)
3742 AC_SUBST(GSEPSDevice)
3743 AC_SUBST(GSMonoDevice)
3744 AC_SUBST(GSPDFDevice)
3745 AC_SUBST(GSPSDevice)
3749 # PerlMagick-related configuration
3752 # Look for PERL if PerlMagick requested
3753 # If name/path of desired PERL interpreter is specified, look for that one first
3755 if test "$with_perl" != 'no'; then
3756 AC_MSG_RESULT([-------------------------------------------------------------])
3757 AC_MSG_CHECKING([for Perl])
3759 if test "$with_perl" != 'yes'; then
3760 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3761 PERL=$ac_cv_path_PERL
3763 have_perl="$ac_cv_path_PERL"
3765 AC_PATH_PROGS(PERL,perl perl5,)dnl
3766 if test "$ac_cv_path_PERL"; then
3767 have_perl="$ac_cv_path_PERL"
3772 if test "$with_perl" != 'yes' ; then
3773 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3776 PERL_SUPPORTS_DESTDIR='no'
3778 with_perl_static='no'
3779 with_perl_dynamic='no'
3780 if test "$have_perl" != 'no'; then
3781 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3782 with_perl_static='yes'
3784 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3785 with_perl_dynamic='yes'
3787 # Is PERL's MakeMaker new enough to support DESTDIR?
3788 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3790 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3791 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3792 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3793 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3795 # Determine path to pick up MagickCore library from for use with building PerlMagick
3796 MAGICKCORE_PATH="${LIB_DIR}"
3797 if test $with_perl_static = 'yes'; then
3798 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3799 libtool_objdir=$objdir
3801 # Linker search path to library, followed by -lMagickCore
3802 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3804 AC_SUBST(MAGICKCORE_PATH)
3806 # Create a simple string containing format names for all delegate libraries.
3808 if test "$have_autotrace" = 'yes' ; then
3809 MAGICK_DELEGATES="$MAGICK_DELEGATES autotrace"
3811 if test "$have_bzlib" = 'yes' ; then
3812 MAGICK_DELEGATES="$MAGICK_DELEGATES bzlib"
3814 if test "$have_dps" = 'yes' ; then
3815 MAGICK_DELEGATES="$MAGICK_DELEGATES dps"
3817 if test "$have_djvu" = 'yes' ; then
3818 MAGICK_DELEGATES="$MAGICK_DELEGATES djvu"
3820 if test "$have_avconv" = 'yes' ; then
3821 MAGICK_DELEGATES="$MAGICK_DELEGATES mpeg"
3823 if test "$have_fftw" = 'yes' ; then
3824 MAGICK_DELEGATES="$MAGICK_DELEGATES fftw"
3826 if test "$have_flif" = 'yes' ; then
3827 MAGICK_DELEGATES="$MAGICK_DELEGATES flif"
3829 if test "$have_fpx" = 'yes' ; then
3830 MAGICK_DELEGATES="$MAGICK_DELEGATES fpx"
3832 if test "$have_fontconfig" = 'yes' ; then
3833 MAGICK_DELEGATES="$MAGICK_DELEGATES fontconfig"
3835 if test "$have_freetype" = 'yes' ; then
3836 MAGICK_DELEGATES="$MAGICK_DELEGATES freetype"
3838 if test "$have_gslib" = 'yes' ; then
3839 MAGICK_DELEGATES="$MAGICK_DELEGATES gslib"
3841 if test "$have_heic" = 'yes' ; then
3842 MAGICK_DELEGATES="$MAGICK_DELEGATES heic"
3844 if test "$have_jbig" = 'yes' ; then
3845 MAGICK_DELEGATES="$MAGICK_DELEGATES jbig"
3847 if test "$have_png$have_jpeg" = 'yesyes' ; then
3848 MAGICK_DELEGATES="$MAGICK_DELEGATES jng"
3850 if test "$have_jpeg" = 'yes' ; then
3851 MAGICK_DELEGATES="$MAGICK_DELEGATES jpeg"
3853 if test "$have_lcms" = 'yes' || test "$have_lcms2" = 'yes' ; then
3854 MAGICK_DELEGATES="$MAGICK_DELEGATES lcms"
3856 if test "$have_lqr" = 'yes' ; then
3857 MAGICK_DELEGATES="$MAGICK_DELEGATES lqr"
3859 if test "$have_lzma" = 'yes' ; then
3860 MAGICK_DELEGATES="$MAGICK_DELEGATES lzma"
3862 if test "$have_openexr" = 'yes' ; then
3863 MAGICK_DELEGATES="$MAGICK_DELEGATES openexr"
3865 if test "$have_openjp2" = 'yes' ; then
3866 MAGICK_DELEGATES="$MAGICK_DELEGATES openjp2"
3868 if test "$have_pango" = 'yes' ; then
3869 MAGICK_DELEGATES="$MAGICK_DELEGATES pango"
3871 if test "$have_png" = 'yes' ; then
3872 MAGICK_DELEGATES="$MAGICK_DELEGATES png"
3875 if test "$have_dps" = 'yes' || \
3876 test "$have_gs" = 'yes' || \
3877 test "${native_win32_build}" = 'yes' ; then
3880 if test "$have_ps" = 'yes' ; then
3881 MAGICK_DELEGATES="$MAGICK_DELEGATES ps"
3883 if test "$have_raw" = 'yes' ; then
3884 MAGICK_DELEGATES="$MAGICK_DELEGATES raw"
3886 if test "$have_raqm" = 'yes' ; then
3887 MAGICK_DELEGATES="$MAGICK_DELEGATES raqm"
3889 if test "$have_ra_ppm" = 'yes' ; then
3890 MAGICK_DELEGATES="$MAGICK_DELEGATES rad"
3892 if test "$have_rsvg" = 'yes' ; then
3893 MAGICK_DELEGATES="$MAGICK_DELEGATES rsvg"
3895 if test "$have_tiff" = 'yes' ; then
3896 MAGICK_DELEGATES="$MAGICK_DELEGATES tiff"
3898 if test "$have_ttf" = 'yes' ; then
3899 MAGICK_DELEGATES="$MAGICK_DELEGATES ttf"
3901 if test "$have_webp" = 'yes' ; then
3902 MAGICK_DELEGATES="$MAGICK_DELEGATES webp"
3904 if test "$have_wmf" = 'yes' ; then
3905 MAGICK_DELEGATES="$MAGICK_DELEGATES wmf"
3907 if test "$have_x" = 'yes' ; then
3908 MAGICK_DELEGATES="$MAGICK_DELEGATES x"
3910 if test "$have_xml" = 'yes' ; then
3911 MAGICK_DELEGATES="$MAGICK_DELEGATES xml"
3913 if test "$have_zlib" = 'yes' ; then
3914 MAGICK_DELEGATES="$MAGICK_DELEGATES zlib"
3916 if test "$have_zstd" = 'yes' ; then
3917 MAGICK_DELEGATES="$MAGICK_DELEGATES zstd"
3920 # Remove extraneous spaces from output variables (asthetic)
3921 MAGICK_DELEGATES=`echo $MAGICK_DELEGATES | sed -e 's/ */ /g'`
3922 MAGICK_FEATURES=`echo $MAGICK_FEATURES | sed -e 's/ */ /g'`
3923 AC_SUBST(MAGICK_DELEGATES)
3924 AC_SUBST(MAGICK_FEATURES)
3927 # Handle special compiler flags
3930 # Add '-p' if prof source profiling support enabled
3931 if test "$enable_prof" = 'yes'; then
3933 CXXFLAGS="-p $CXXFLAGS"
3934 LDFLAGS="-p $LDFLAGS"
3937 # Add '-pg' if gprof source profiling support enabled
3938 if test "$enable_gprof" = 'yes'; then
3939 CFLAGS="-pg $CFLAGS"
3940 CXXFLAGS="-pg $CXXFLAGS"
3941 LDFLAGS="-pg $LDFLAGS"
3944 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3945 # This is a gcc-specific feature
3946 if test "$enable_gcov" = 'yes'; then
3947 AC_CHECK_LIB(gcov,_gcov_init)
3948 AC_CHECK_LIB(gcov,__gcov_init)
3949 case "$target_os" in
3951 OSX_GCOV_LDFLAG="-Wl,-single_module"
3957 AC_SUBST(OSX_GCOV_LDFLAG)
3958 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3959 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3960 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3964 # Build library dependency list for libMagickCore
3967 if test "$build_modules" != 'no'; then
3968 MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $XML_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
3970 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 $HEIF_LIBS $WEBPMUX_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 $RAW_R_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
3972 MAGICK_EXTRA_DEP_LIBS="$GOMP_LIBS"
3973 AC_SUBST(MAGICK_DEP_LIBS)
3974 AC_SUBST(MAGICK_EXTRA_DEP_LIBS)
3976 # Pass only user-provided LIBS as "global" libraries
3982 #AC_SUBST(X_PRE_LIBS)
3984 #AC_SUBST(X_EXTRA_LIBS)
3986 MAGICK_CFLAGS=$CFLAGS
3987 MAGICK_CXXFLAGS="$CXXFLAGS"
3988 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3989 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3990 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3991 MAGICK_LIBS="$MAGICK_DEP_LIBS $MAGICK_EXTRA_DEP_LIBS"
3993 AC_SUBST(MAGICK_CFLAGS)
3994 AC_SUBST(MAGICK_CXXFLAGS)
3995 AC_SUBST(MAGICK_CPPFLAGS)
3996 AC_SUBST(MAGICK_PCFLAGS)
3997 AC_SUBST(MAGICK_LDFLAGS)
3998 AC_SUBST(MAGICK_LIBS)
4000 # Set configured scripts to executable.
4001 AC_CONFIG_COMMANDS([default],[],[])
4002 AC_CONFIG_COMMANDS([magick.sh.in],[chmod +x magick.sh])
4003 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
4004 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
4005 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
4006 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
4008 AC_MSG_RESULT([-------------------------------------------------------------])
4009 AC_MSG_RESULT([Update ImageMagick configuration])
4011 rm -f magick-version
4013 result_dejavu_font_dir='none'
4014 if test "${dejavu_font_dir}x" != 'x'; then
4015 result_dejavu_font_dir=$dejavu_font_dir
4018 result_ghostscript_font_dir='none'
4019 if test "${ghostscript_font_dir}x" != 'x'; then
4020 result_ghostscript_font_dir=$ghostscript_font_dir
4023 result_urw_base35_font_dir='none'
4024 if test "${urw_base35_font_dir}x" != 'x'; then
4025 result_urw_base35_font_dir=$urw_base35_font_dir
4028 result_windows_font_dir='none'
4029 if test "${windows_font_dir}x" != 'x'; then
4030 result_windows_font_dir=${windows_font_dir}
4033 # ==============================================================================
4034 # Generate build environment
4035 # ==============================================================================
4038 config/configure.xml \
4039 config/delegates.xml \
4040 config/ImageMagick.rdf \
4041 config/MagickCore.dox \
4042 config/MagickWand.dox \
4043 config/Magick++.dox \
4044 config/type-apple.xml \
4045 config/type-dejavu.xml \
4046 config/type-ghostscript.xml \
4047 config/type-urw-base35.xml \
4048 config/type-windows.xml \
4051 Magick++/bin/Magick++-config \
4052 MagickCore/ImageMagick.pc \
4053 Magick++/lib/Magick++.pc \
4054 MagickCore/MagickCore-config \
4055 MagickCore/MagickCore.pc \
4056 MagickCore/version.h \
4059 PerlMagick/check.sh \
4060 PerlMagick/default/Magick.pm \
4061 PerlMagick/Makefile.PL \
4062 PerlMagick/default/Makefile.PL \
4063 PerlMagick/quantum/Makefile.PL \
4064 PerlMagick/quantum/quantum.pm \
4065 PerlMagick/quantum/quantum.xs \
4066 PerlMagick/quantum/typemap \
4067 utilities/animate.1 \
4068 utilities/compare.1 \
4069 utilities/composite.1 \
4070 utilities/conjure.1 \
4071 utilities/convert.1 \
4072 utilities/display.1 \
4073 utilities/identify.1 \
4074 utilities/ImageMagick.1 \
4075 utilities/import.1 \
4076 utilities/magick.1 \
4077 utilities/magick-script.1 \
4078 utilities/mogrify.1 \
4079 utilities/montage.1 \
4080 utilities/stream.1 \
4081 MagickWand/MagickWand-config \
4082 MagickWand/MagickWand.pc ])
4085 # ==============================================================================
4086 # ImageMagick Configuration
4087 # ==============================================================================
4089 ==============================================================================
4090 ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM} is configured as follows. Please verify that this
4091 configuration matches your expectations.
4093 Host system type: $host
4094 Build system type: $build
4097 ------------------------------------------------------------------------------
4098 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
4099 Static libraries --enable-static=$enable_static $libtool_build_static_libs
4100 Build utilities --with-utilities=$with_utilities $with_utilities
4101 Module support --with-modules=$build_modules $build_modules
4102 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
4103 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
4104 High Dynamic Range Imagery
4105 --enable-hdri=$enable_hdri $enable_hdri
4107 Install documentation: $wantdocs
4109 Memory allocation library:
4110 JEMalloc --with-jemalloc=$with_jemalloc $have_jemalloc
4111 TCMalloc --with-tcmalloc=$with_tcmalloc $have_tcmalloc
4112 UMem --with-umem=$with_umem $have_umem
4114 Delegate library configuration:
4115 BZLIB --with-bzlib=$with_bzlib $have_bzlib
4116 Autotrace --with-autotrace=$with_autotrace $have_autotrace
4117 DJVU --with-djvu=$with_djvu $have_djvu
4118 DPS --with-dps=$with_dps $have_dps
4119 FFTW --with-fftw=$with_fftw $have_fftw
4120 FLIF --with-flif=$with_flif $have_flif
4121 FlashPIX --with-fpx=$with_fpx $have_fpx
4122 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
4123 FreeType --with-freetype=$with_freetype $have_freetype
4124 Ghostscript lib --with-gslib=$with_gslib $have_gslib
4125 Graphviz --with-gvc=$with_gvc $have_gvc
4126 HEIC --with-heic=$with_heic $have_heic
4127 JBIG --with-jbig=$with_jbig $have_jbig
4128 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
4129 LCMS --with-lcms=$with_lcms $have_lcms
4130 LQR --with-lqr=$with_lqr $have_lqr
4131 LTDL --with-ltdl=$with_ltdl $have_ltdl
4132 LZMA --with-lzma=$with_lzma $have_lzma
4133 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
4134 OpenEXR --with-openexr=$with_openexr $have_openexr
4135 OpenJP2 --with-openjp2=$with_openjp2 $have_openjp2
4136 PANGO --with-pango=$with_pango $have_pango
4137 PERL --with-perl=$with_perl $have_perl
4138 PNG --with-png=$with_png $have_png
4139 RAQM --with-raqm=$with_raqm $have_raqm
4140 RAW --with-raw=$with_raw $have_raw
4141 RSVG --with-rsvg=$with_rsvg $have_rsvg
4142 TIFF --with-tiff=$with_tiff $have_tiff
4143 WEBP --with-webp=$with_webp $have_webp
4144 WMF --with-wmf=$with_wmf $have_wmf
4145 X11 --with-x=$with_x $have_x
4146 XML --with-xml=$with_xml $have_xml
4147 ZLIB --with-zlib=$with_zlib $have_zlib
4148 ZSTD --with-zstd=$with_zstd $have_zstd
4150 Delegate program configuration:
4151 GhostPCL None $PCLDelegate ($PCLVersion)
4152 GhostXPS None $XPSDelegate ($XPSVersion)
4153 Ghostscript None $PSDelegate ($GSVersion)
4156 Apple fonts --with-apple-font-dir=$with_apple_font_dir $result_apple_font_dir
4157 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
4158 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
4159 URW-base35 fonts --with-urw-base35-font-dir=$with_urw_base35_font_dir $result_urw_base35_font_dir
4160 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
4163 X_CFLAGS = $X_CFLAGS
4164 X_PRE_LIBS = $X_PRE_LIBS
4166 X_EXTRA_LIBS = $X_EXTRA_LIBS
4168 Options used to compile and link:
4169 PREFIX = $PREFIX_DIR
4170 EXEC-PREFIX = $EXEC_PREFIX_DIR
4171 VERSION = $PACKAGE_VERSION
4174 CPPFLAGS = $CPPFLAGS
4178 LIBS = $MAGICK_DEP_LIBS
4180 CXXFLAGS = $CXXFLAGS
4181 FEATURES = $MAGICK_FEATURES
4182 DELEGATES = $MAGICK_DELEGATES
4183 ==============================================================================