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], [18])
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])
300 AX_GCC_ARCHFLAG([yes])
301 PKG_PROG_PKG_CONFIG([0.20])
305 # Test for 64-bit build.
306 AC_CHECK_SIZEOF([size_t])
310 if test "x$GCC" = "xyes"; then
311 CFLAGS="$CFLAGS -fexceptions"
314 cat > local.exp <<EOF
315 set CC_FOR_TARGET "$CC"
319 # Check for linker script support
323 # Enable run-time checking.
325 AC_ARG_ENABLE([bounds-checking],
326 [AC_HELP_STRING([--enable-bounds-checking],
327 [enable run-time bounds-checking])],
328 [enable_bounds_checking=$enableval],
329 [enable_bounds_checking='no'])
331 if test "$enable_bounds_checking" = yes; then
332 AC_DEFINE([_FORTIFY_SOURCE], [2],
333 [enable run-time bounds-checking])
344 native_win32_build='no'
352 native_win32_build='yes'
354 OLE_LIBS='-loleaut32'
355 WS2_32_LIBS="-lws2_32"
358 if test "${GDI32_LIBS}x" != 'x'; then
359 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
363 AC_SUBST(WS2_32_LIBS)
364 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
365 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
366 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
367 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
369 WinPathScript="${srcdirfull}/winpath.sh"
370 AC_SUBST(WinPathScript)
373 # Compiler flags tweaks
375 if test "${GCC}" != "yes"; then
378 # aCC: HP ANSI C++ B3910B A.03.34
379 CFLAGS="${CFLAGS} -Wp,-H30000"
380 if test -n "${CXXFLAGS}"; then
383 CXXFLAGS="${CXXFLAGS} -AA"
387 # Compaq alphaev68-dec-osf5.1 compiler
388 if test -n "${CXXFLAGS}"; then
389 CXXFLAGS='-std strict_ansi -noimplicit_include'
391 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
396 # Check for lazy-loading.
397 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
399 im_cv_ld_lazyload='none'
401 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
402 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
403 im_cv_ld_lazyload='-Wl,-zlazyload'
408 if test "${im_cv_ld_lazyload}" != 'none' ; then
409 if test -z "${LDFLAGS}" ; then
410 LDFLAGS="${im_cv_ld_lazyload}"
412 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
416 dnl Platform-specific stuff
418 *darwin* | *-macos10*)
419 dnl Disable FORTIFY_SOURCE to fix a bug in LVVM / OpenMP support
420 CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=0"
421 dnl OS X universal binary support, requires --disable-dependency-tracking
422 AC_ARG_ENABLE([osx-universal-binary],
423 AC_HELP_STRING([--enable-osx-universal-binary],
424 [build universal binary on OS X [[default=no]]]),
425 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
427 if test "${build_osxuniversal}" != no ; then
428 if test "$enable_dependency_tracking" != no ; then
429 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
430 Please re-run configure with these options:
431 --disable-dependency-tracking --enable-osx-universal-binary
434 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
435 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
436 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
442 # ARCH specific include directory
444 AC_ARG_WITH([includearch-dir],
445 [AC_HELP_STRING([--includearch-dir=DIR],
446 [ARCH specific include directory])],
447 [includearch_dir=$withval],
448 [includearch_dir=$INCLUDE_DIR])
450 eval "eval INCLUDEARCH_DIR=$includearch_dir"
451 AC_SUBST(INCLUDEARCH_DIR)
454 # ARCH specific configuration directory
456 AC_ARG_WITH([sharearch-dir],
457 [AC_HELP_STRING([--sharearch-dir=DIR],
458 [ARCH specific config directory])],
459 [sharearch_dir=$withval],
460 [sharearch_dir="${LIB_DIR}"])
462 eval "eval SHAREARCH_DIR=$sharearch_dir"
463 AC_SUBST(SHAREARCH_DIR)
465 # Path to the pkgconfig folder
466 AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=DIR],
467 [Path to the pkgconfig directory @<:@LIBDIR/pkgconfig@:>@]),
468 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
469 AC_SUBST([pkgconfigdir])
472 # Enable support for POSIX thread APIs
474 AC_ARG_WITH([threads],
475 [AC_HELP_STRING([--without-threads], [disable POSIX threads API support])],
476 [with_threads=$withval],
477 [with_threads='yes'])
481 if test "$with_threads" != 'no'; then
483 if test "$ax_pthread_ok" = yes; then
485 DEF_THREAD="$PTHREAD_CFLAGS"
486 CFLAGS="$CFLAGS $DEF_THREAD"
487 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
488 THREAD_LIBS="$PTHREAD_LIBS"
489 if test "$CC" != "$PTHREAD_CC"; then
490 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
493 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
496 LIBS="$LIBS $THREAD_LIBS"
497 AC_SUBST(THREAD_LIBS)
499 # Enable support for OpenMP
500 if test "$have_threads" != 'yes'; then
501 ac_cv_prog_c_openmp=unsupported
504 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
505 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
506 AC_SUBST(OPENMP_CFLAGS)
507 if test "$enable_openmp" != no; then
508 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
509 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
513 # Enable support for OpenCL
515 CFLAGS="$CL_CFLAGS $CFLAGS"
516 CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
517 LIBS="$CL_LIBS $LIBS"
519 if test "$enable_opencl" != no; then
520 if test "X$ax_cv_check_cl_libcl" != Xno; then :
521 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
527 # Check for large file support
533 if test "$enable_largefile" != no; then
534 case $ac_cv_sys_file_offset_bits in
536 # nothing to do here as the host supports LFS fine
539 AC_MSG_CHECKING([for native large file support])
540 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
542 exit(!(sizeof(off_t) == 8));
544 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
545 AC_MSG_RESULT([yes])],
546 [AC_MSG_RESULT([no])])
549 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
552 if test "$ac_cv_sys_large_files" != 'no'; then
553 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
555 if test "$ac_cv_sys_largefile_source" != 'no'; then
556 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
559 AC_SUBST(LFS_CPPFLAGS)
565 AC_SUBST(LIBTOOL_DEPS)
567 # Check to see if building shared libraries
568 libtool_build_shared_libs='no'
569 if test "$enable_shared" = 'yes'; then
570 libtool_build_shared_libs='yes'
573 # Check to see if building static libraries
574 libtool_build_static_libs='no'
575 if test "$enable_static" = 'yes'; then
576 libtool_build_static_libs='yes'
579 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
581 # Enable support for building loadable modules
584 AC_ARG_WITH([modules],
585 [AC_HELP_STRING([--with-modules],
586 [enable building dynamically loadable modules])],
587 [with_modules=$withval],
590 # Only allow building loadable modules if we are building shared libraries
591 if test "$with_modules" != 'no' ; then
592 if test "$libtool_build_shared_libs" = 'no'; then
593 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
599 if test "$build_modules" != 'no' ; then
600 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
601 MAGICK_FEATURES="$MAGICK_FEATURES Modules"
603 AM_CONDITIONAL(WITH_MODULES, test "$build_modules" != 'no')
605 # Enable build using delegate libraries built in subdirectories rather than installed
606 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
607 AC_ARG_ENABLE([delegate-build],
608 [AC_HELP_STRING([--enable-delegate-build],
609 [look for delegate libraries in build directory])],
610 [enable_delegate_build=$enableval],
611 [enable_delegate_build='no'])
613 AC_ARG_ENABLE([deprecated],
614 [AC_HELP_STRING([--disable-deprecated],
615 [exclude deprecated methods in MagickCore and MagickWand APIs])],
616 [enable_deprecated=$enableval],
617 [enable_deprecated='no'])
619 if test "$enable_deprecated" = 'yes'; then
620 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
622 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
625 # Build a version of ImageMagick which operates uninstalled.
626 # Used to build distributions located via MAGICK_HOME / executable path
627 AC_ARG_ENABLE([installed],
628 [AC_HELP_STRING([--disable-installed],
629 [Formally install ImageMagick under PREFIX])],
630 [enable_installed=$enableval],
631 [enable_installed='yes'])
633 if test "$enable_installed" = 'yes'; then
634 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
636 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
639 # Permit enciphering and deciphering image pixels.
640 AC_ARG_ENABLE([cipher],
641 [AC_HELP_STRING([--disable-cipher],
642 [disable enciphering and deciphering image pixels])],
643 [enable_cipher=$enableval],
644 [enable_cipher='yes'])
646 if test "$enable_cipher" = 'yes'; then
647 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
648 MAGICK_FEATURES="Cipher $MAGICK_FEATURES"
651 # Build a zero-configuration version of ImageMagick.
652 AC_ARG_ENABLE([zero-configuration],
653 [AC_HELP_STRING([--enable-zero-configuration],
654 [enable self-contained, embeddable, zero-configuration ImageMagick])],
655 [enable_zero_configuration=$enableval],
656 [enable_zero_configuration='no'])
658 if test "$enable_zero_configuration" = 'yes'; then
659 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
660 MAGICK_FEATURES="Zero-configuration $MAGICK_FEATURES"
663 # Build a high dynamic range version of ImageMagick.
664 AC_ARG_ENABLE([hdri],
665 [AC_HELP_STRING([--enable-hdri],
666 [accurately represent the wide range of intensity levels found in real scenes])],
667 [enable_hdri=$enableval],
671 if test "$enable_hdri" = 'yes'; then
673 magick_hdri_enable='1';
674 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
676 magick_hdri_enable='0'
678 AC_DEFINE_UNQUOTED(HDRI_ENABLE_OBSOLETE_IN_H,$magick_hdri_enable,[Whether hdri is enabled or not])
679 AC_SUBST(MAGICK_HDRI)dnl
680 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
681 CFLAGS="$CFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
682 CPPFLAGS="$CPPFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
684 # Enable pipes (|) in filenames.
685 AC_ARG_ENABLE([pipes],
686 [AC_HELP_STRING([--enable-pipes],
687 [enable pipes (|) in filenames])],
688 [enable_pipes=$enableval],
691 if test "$enable_pipes" = 'yes'; then
692 AC_DEFINE(PIPES_SUPPORT,1,[enable pipes (|) in filenames])
693 MAGICK_FEATURES="Pipes $MAGICK_FEATURES"
696 # Build a version of ImageMagick with assert statements.
697 AC_ARG_ENABLE([assert],
698 [AC_HELP_STRING([--disable-assert],
699 [disable assert() statements in build])],
700 [enable_assert=$enableval],
701 [enable_assert='yes'])
703 if test "$enable_assert" = 'no'; then
704 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
707 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
710 # Enable hugepages support
711 AC_ARG_ENABLE([hugepages],
712 [AC_HELP_STRING([--enable-hugepages],
713 [enable 'huge pages' support])],
714 [enable_hugepages=$enableval],
715 [enable_hugepages='no'])
717 # Enable ccmalloc memory debugging support
718 AC_ARG_ENABLE([ccmalloc],
719 [AC_HELP_STRING([--enable-ccmalloc],
720 [enable 'ccmalloc' memory debug support])],
721 [enable_ccmalloc=$enableval],
722 [enable_ccmalloc='no'])
724 # Enable Electric Fence memory debugging support
725 AC_ARG_ENABLE([efence],
726 [AC_HELP_STRING([--enable-efence],
727 [enable 'efence' memory debug support])],
728 [enable_efence=$enableval],
729 [enable_efence='no'])
731 # Enable prof-based profiling support
732 AC_ARG_ENABLE([prof],
733 [AC_HELP_STRING([--enable-prof],
734 [enable 'prof' profiling support])],
735 [enable_prof=$enableval],
738 # Enable gprof-based profiling support
739 AC_ARG_ENABLE([gprof],
740 [AC_HELP_STRING([--enable-gprof],
741 [enable 'gprof' profiling support])],
742 [enable_gprof=$enableval],
745 # Enable gcov-based profiling support
746 AC_ARG_ENABLE([gcov],
747 [AC_HELP_STRING([--enable-gcov],
748 [enable 'gcov' profiling support])],
749 [enable_gcov=$enableval],
752 enable_profiling='no'
753 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
754 enable_profiling='yes'
755 if test "$libtool_build_shared_libs" = 'yes'; then
756 echo "Warning: Can not profile code using shared libraries"
760 # Magick API method prefix
761 AC_ARG_WITH([method-prefix],
762 [AC_HELP_STRING([--with-method-prefix=PREFIX],
763 [prefix MagickCore API methods])],
764 [with_method_prefix=$withval],
765 [with_method_prefix='no'])
767 if test "$with_method_prefix" != 'no'; then
768 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
769 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX_TAG,["$with_method_prefix"],[Magick API method prefix tag])
770 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
773 # Enable legacy support (default no)
774 AC_ARG_ENABLE(legacy-support,
775 [ --enable-legacy-support install legacy command-line utilities (default disabled)],
776 [with_legacy_support=$enableval],
777 [with_legacy_support='no'])
778 AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no')
780 # Enable building command line utilities (default yes)
781 AC_ARG_WITH(utilities,
782 [ --with-utilities enable building command-line utilities (default yes)],
783 [with_utilities=$withval], [with_utilities='yes'])
784 AM_CONDITIONAL(WITH_UTILITIES, test "$with_utilities" = 'yes')
786 # Number of bits in a Quantum
787 AC_ARG_WITH([quantum-depth],
788 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
789 [number of bits in a pixel quantum (default 16)])],
790 [with_quantum_depth=$withval],
791 [with_quantum_depth=16])
793 if test "$with_quantum_depth" != '8'; then
794 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
797 case "${with_quantum_depth}" in
802 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
804 QUANTUM_DEPTH="$with_quantum_depth"
805 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH_OBSOLETE_IN_H,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
806 AC_SUBST(QUANTUM_DEPTH)dnl
807 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
808 CFLAGS="$CFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
809 CPPFLAGS="$CPPFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
811 # define a lib suffix for abi purpose
812 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}"
813 if test "$enable_hdri" = 'yes'; then
814 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}${MAGICK_HDRI}"
816 AC_SUBST(MAGICK_ABI_SUFFIX)
818 # Set pixel cache threshold
820 [AC_HELP_STRING([--with-cache=THRESHOLD],
821 [set pixel cache threshhold in MB (default available memory)])],
822 [with_cache=$withval],
825 if test "$with_cache" != ''; then
826 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
827 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
830 # Disable/Enable support for full delegate paths
831 AC_ARG_WITH([frozenpaths],
832 [AC_HELP_STRING([--with-frozenpaths],
833 [freeze delegate paths])],
834 [with_frozenpaths=$withval],
835 [with_frozenpaths='no'])
837 # Enable build/install of Magick++
838 AC_ARG_WITH([magick-plus-plus],
839 [AC_HELP_STRING([--without-magick-plus-plus],
840 [disable build/install of Magick++])],
841 [with_magick_plus_plus=$withval],
842 [with_magick_plus_plus='yes'])
844 # Encode the this name into the shared library.
845 AC_ARG_WITH([package-release-name],
846 [AC_HELP_STRING([--with-package-release-name=NAME],
847 [encode this name into the shared library])],
848 [MAGICK_LT_RELEASE_OPTS="-release $withval"])
849 AC_SUBST(MAGICK_LT_RELEASE_OPTS)
851 # Disable build/install of PerlMagick.
853 [AC_HELP_STRING([--with-perl],
854 [enable build/install of PerlMagick])],
855 [with_perl=$withval],
858 # Options to pass when configuring PerlMagick
859 AC_ARG_WITH([perl-options],
860 [AC_HELP_STRING([--with-perl-options=OPTIONS],
861 [options to pass on command-line when generating PerlMagick build file])],
862 PERL_MAKE_OPTIONS=$withval)
863 AC_SUBST(PERL_MAKE_OPTIONS)
865 # Enable jemalloc, object-caching memory allocation library.
866 AC_ARG_WITH(jemalloc,
867 [ --with-jemalloc enable jemalloc memory allocation library support],
868 [with_jemalloc=$withval],
869 [with_jemalloc='no'])
870 if test "$with_jemalloc" != 'yes' ; then
871 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jemalloc=$with_jemalloc "
874 # Enable umem, object-caching memory allocation library.
876 [ --with-umem enable umem memory allocation library support],
877 [with_umem=$withval],
879 if test "$with_umem" != 'yes' ; then
880 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
884 # Specify path to shared libstdc++ if not in normal location
886 AC_ARG_WITH([libstdc],
887 [AC_HELP_STRING([--with-libstdc=DIR],
888 [ use libstdc++ in DIR (for GNU C++)])],
889 [with_libstdc=$withval],
892 if test "$with_libstdc" != ''; then
893 if test -d "$with_libstdc"; then
894 LIBSTDCLDFLAGS="-L$with_libstdc"
897 AC_SUBST(LIBSTDCLDFLAGS)
899 # Does gcc required -traditional?
900 AC_PROG_GCC_TRADITIONAL
904 # Set defines required to build DLLs and modules using MinGW
907 # These options are set for multi-thread DLL module build
908 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
910 # executable/Magick++: _DLL _MAGICKMOD_
911 MODULE_EXTRA_CPPFLAGS=''
912 LIBRARY_EXTRA_CPPFLAGS=''
913 if test "${native_win32_build}" = 'yes'; then
914 if test "${libtool_build_shared_libs}" = 'yes'; then
915 CPPFLAGS="$CPPFLAGS -D_DLL"
916 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
917 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
918 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
919 if test "$build_modules" = 'yes'; then
920 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
922 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
925 CPPFLAGS="$CPPFLAGS -D_LIB"
926 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
927 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
929 if test "$with_threads" = 'yes'; then
930 CPPFLAGS="$CPPFLAGS -D_MT"
931 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
932 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
935 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
936 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
938 # Check standard headers
940 if ! test x"$ac_cv_header_stdc" = x"yes"; then
941 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
942 header files. Compilation cannot proceed. Please install the ANSI C
943 headers and rerun this script.]);
948 # Check additional headers
949 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)
953 # Checks for typedefs, structures, and compiler characteristics.
967 # Checks for language qualifiers and semantics.
975 # If words are stored with the most significant byte first (like
976 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
979 # Define to a suitable type, if standard headers do not define it.
987 AC_TYPE_LONG_DOUBLE_WIDER
988 AC_TYPE_LONG_LONG_INT
1002 AC_TYPE_UNSIGNED_LONG_LONG_INT
1004 AC_CHECK_TYPES([locale_t], [], [], [[#include <xlocale.h>]])
1006 # Float_t and double_t are intended to be the the most efficient type.
1007 AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]])
1008 AC_CHECK_TYPES([double_t], [], [], [[#include <math.h>]])
1009 AC_CHECK_SIZEOF([float_t], [], [[#include <math.h>]])
1010 AC_CHECK_SIZEOF([double_t], [], [[#include <math.h>]])
1012 # Get size of float, double and long double for comparaison.
1013 AC_CHECK_SIZEOF([float])
1014 AC_CHECK_SIZEOF([double])
1015 AC_CHECK_SIZEOF([long double])
1017 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
1018 AC_CHECK_SIZEOF(signed short)
1020 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
1021 AC_CHECK_SIZEOF(unsigned short)
1023 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
1024 AC_CHECK_SIZEOF(signed int)
1026 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
1027 AC_CHECK_SIZEOF(unsigned int)
1029 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
1030 AC_CHECK_SIZEOF(signed long)
1032 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
1033 AC_CHECK_SIZEOF(unsigned long)
1035 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
1036 # 'signed long long' is not supported then the value defined is zero.
1037 AC_CHECK_SIZEOF(signed long long)
1039 # Obtain size of a 'unsigned long long' and define as
1040 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
1041 # supported then the value defined is zero.
1042 AC_CHECK_SIZEOF(unsigned long long)
1044 # Obtain size of off_t and define as SIZEOF_OFF_T
1045 AC_CHECK_SIZEOF(off_t)
1047 # Obtain size of size_t and define as SIZEOF_SIZE_T
1048 AC_CHECK_SIZEOF(size_t)
1050 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
1051 AC_CHECK_SIZEOF(ssize_t)
1053 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
1054 AC_CHECK_SIZEOF(unsigned int*)
1057 # Compute sized types for current CPU and compiler options.
1060 AC_MSG_CHECKING(for signed 8-bit type)
1061 INT8_T='signed char'
1062 AC_MSG_RESULT($INT8_T)
1065 AC_MSG_CHECKING(for unsigned 8-bit type)
1066 UINT8_T='unsigned char'
1067 AC_MSG_RESULT($UINT8_T)
1070 AC_MSG_CHECKING(for signed 16-bit type)
1071 INT16_T='signed short'
1072 AC_MSG_RESULT($INT16_T)
1075 AC_MSG_CHECKING(for unsigned 16-bit type)
1076 UINT16_T='unsigned short'
1077 AC_MSG_RESULT($UINT16_T)
1080 AC_MSG_CHECKING(for signed 32-bit type)
1083 if test $ac_cv_sizeof_signed_int -eq 4; then
1084 INT32_T='signed int'
1086 elif test $ac_cv_sizeof_signed_long -eq 4; then
1087 INT32_T='signed long'
1090 AC_MSG_RESULT($INT32_T)
1094 AC_MSG_CHECKING(for unsigned 32-bit type)
1097 if test $ac_cv_sizeof_unsigned_int -eq 4; then
1098 UINT32_T='unsigned int'
1100 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
1101 UINT32_T='unsigned long'
1104 AC_MSG_RESULT($UINT32_T)
1108 AC_MSG_CHECKING(for signed 64-bit type)
1111 if test $ac_cv_sizeof_signed_long -eq 8; then
1112 INT64_T='signed long'
1114 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
1115 INT64_T='signed long long'
1118 case "${host_os}" in
1123 AC_MSG_RESULT($INT64_T)
1127 AC_MSG_CHECKING(for unsigned 64-bit type)
1130 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1131 UINT64_T='unsigned long'
1133 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1134 UINT64_T='unsigned long long'
1137 case "${host_os}" in
1142 AC_MSG_RESULT($UINT64_T)
1146 AC_MSG_CHECKING(for unsigned maximum type)
1149 if test "$UINT64_T" != 'none'; then
1152 elif test "$UINT32_T" != 'none'; then
1156 AC_MSG_RESULT($UINTMAX_T)
1160 AC_MSG_CHECKING(for pointer difference type)
1163 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1164 UINTPTR_T='unsigned long'
1166 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1167 UINTPTR_T='unsigned long long'
1170 AC_MSG_RESULT($UINTPTR_T)
1174 AC_MSG_CHECKING([whether our compiler supports __func__])
1176 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1177 AC_MSG_RESULT([yes]),
1179 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1181 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1182 AC_MSG_RESULT([yes])
1183 AC_DEFINE(__func__, __FUNCTION__,
1184 [Define to appropriate substitue if compiler does not have __func__]),
1186 AC_DEFINE(__func__, __FILE__,
1187 [Define to appropriate substitue if compiler does not have __func__])))
1191 # Check for functions
1194 AC_FUNC_CLOSEDIR_VOID
1198 AC_FUNC_SELECT_ARGTYPES
1199 AC_FUNC_SETVBUF_REVERSED
1209 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1210 LIBS="$MATH_LIBS $LIBS"
1214 # Find socket library
1216 AC_SEARCH_LIBS(gethostbyname, resolv nsl)
1217 AC_SEARCH_LIBS(socket, socket,
1219 AC_DEFINE([HAVE_SOCKET],[1],[Define to 1 if you have socket support.])
1220 MAGICK_FEATURES="DPC $MAGICK_FEATURES"
1223 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])
1226 # Check for clock_gettime().
1228 AC_SEARCH_LIBS(clock_gettime, rt,
1230 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1231 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1234 [[#include <time.h>]],
1235 [[clockid_t clockType = CLOCK_REALTIME;]])],
1238 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1239 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1245 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1251 # Check for function prototypes
1255 AC_CHECK_DECLS([pread, pwrite],[],[],[
1256 #include <unistd.h>])
1258 AC_CHECK_DECLS([strlcpy],[],[],[
1259 #include <strings.h>])
1261 AC_CHECK_DECLS([vsnprintf],[],[],[
1263 #include <stdarg.h>])
1267 # C++ Support Tests (For Magick++)
1270 have_magick_plus_plus='no'
1271 if test "$with_magick_plus_plus" = 'yes'; then
1276 # Full set of headers used...
1277 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1278 # functional iomanip iosfwd iostream iterator list string strstream utility
1283 AX_CXX_NAMESPACE_STD
1284 AC_CXX_HAVE_STD_LIBS
1288 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1290 test $ax_cv_cxx_bool = 'yes' && \
1291 test $ax_cv_cxx_namespaces = 'yes' && \
1292 test $ac_cv_cxx_have_std_libs = 'yes' && \
1293 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1294 have_magick_plus_plus='yes'
1296 have_magick_plus_plus='no (failed tests)'
1298 AC_MSG_RESULT([$have_magick_plus_plus])
1301 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1303 # Only check for delegate libraries in subdirectories if requested.
1304 if test "$enable_delegate_build" != 'no'; then
1305 # Check for delegate sub-directories and add -I & -L options as required.
1306 # This presumes that delegates are installed as detailed in the ImageMagick
1307 # README. If delegates are installed in a standard location where the
1308 # compiler will automatically find them then these options should not be
1312 # Most delegates have includes in the same directory as the library, but not all...
1315 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
1316 if test -d "$builddir/$dir"; then
1317 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1319 if test -d "$srcdirfull/$dir"; then
1320 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1326 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
1327 if test -d "$builddir/$dir/.libs"; then
1328 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1330 if test -d "$srcdirfull/$dir/.libs"; then
1331 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1334 if test -d "$builddir/$dir"; then
1335 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1337 if test -d "$srcdirfull/$dir"; then
1338 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1344 # Assume that delegate headers reside under same directory as ImageMagick
1345 # installation prefix.
1346 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/${PACKAGE_NAME}-$MAGICK_MAJOR_VERSION $MAGICK_CPPFLAGS"
1349 # Find the X11 RGB database
1351 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1352 [# Look for the header file in a standard set of common directories.
1353 # Check X11 before X11Rn because it is often a symlink to the current release.
1362 /usr/XFree86/lib/X11 \
1370 /usr/local/X11/lib \
1371 /usr/local/X11R4/lib \
1372 /usr/local/X11R5/lib \
1373 /usr/local/X11R6/lib \
1375 /usr/local/lib/X11 \
1376 /usr/local/lib/X11R4 \
1377 /usr/local/lib/X11R5 \
1378 /usr/local/lib/X11R6 \
1379 /usr/local/lib/X11R7 \
1380 /usr/local/x11r5/lib \
1381 /usr/lpp/Xamples/lib \
1383 /usr/openwin/share/lib \
1384 /usr/unsupported/lib \
1387 if test -f "$ac_dir/X11/rgb.txt"; then
1388 im_cv_x_configure="$ac_dir/X11/"
1390 elif test -f "$ac_dir/rgb.txt"; then
1391 im_cv_x_configure="$ac_dir/"
1396 X11_CONFIGURE_PATH="$im_cv_x_configure"
1397 case "${build_os}" in
1399 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1402 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",[Location of X11 configure files])
1405 # Find OpenMP library
1408 if test "$enable_openmp" != 'no'; then
1409 if test "${GCC}" = "yes"; then
1410 # Open64 (passes for GCC but uses different OpenMP implementation)
1411 if test "x$GOMP_LIBS" = x ; then
1412 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1413 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1416 # Clang (passes for GCC but uses different OpenMP implementation)
1417 if test "x$LIB_OMP" = x ; then
1418 if $CC --version 2>&1 | grep clang > /dev/null ; then
1419 AC_CHECK_LIB(omp,GOMP_parallel_start,LIB_OMP="-lomp",,)
1423 if test "x$GOMP_LIBS" = x ; then
1424 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1428 if test "x$GOMP_LIBS" = x ; then
1429 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1432 if test "x$GOMP_LIBS" = x ; then
1433 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1435 # SGI IRIX 6.5 MIPSpro C/C++
1436 if test "x$GOMP_LIBS" = x ; then
1437 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1440 LIBS="$GOMP_LIBS $LIBS"
1445 # Check for jemalloc.
1449 if test "$with_jemalloc" != 'no'; then
1450 AC_MSG_CHECKING(for JEMALLOC support )
1454 AC_CHECK_HEADER([jemalloc/jemalloc.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1455 AC_CHECK_LIB(jemalloc,[malloc_stats_print],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1456 AC_MSG_CHECKING(if jemalloc memory allocation library is complete)
1457 if test $passed -gt 0; then
1458 if test $failed -gt 0; then
1459 AC_MSG_RESULT(no -- some components failed test)
1460 have_jemalloc='no (failed tests)'
1462 JEMALLOC_LIBS='-ljemalloc'
1463 LIBS="$JEMALLOC_LIBS $LIBS"
1464 AC_DEFINE(HasJEMALLOC,1,Define if you have jemalloc memory allocation library)
1472 AM_CONDITIONAL(HasJEMALLOC, test "$have_jemalloc" = 'yes')
1473 AC_SUBST(JEMALLOC_LIBS)
1480 if test "$with_umem" != 'no'; then
1481 AC_MSG_CHECKING(for UMEM support )
1485 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1486 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1487 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1488 AC_MSG_CHECKING(if umem memory allocation library is complete)
1489 if test $passed -gt 0; then
1490 if test $failed -gt 0; then
1491 AC_MSG_RESULT(no -- some components failed test)
1492 have_umem='no (failed tests)'
1495 LIBS="$UMEM_LIBS $LIBS"
1496 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1504 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1508 # Add support for ccmalloc memory debugging library if requested
1512 if test "$enable_ccmalloc" = 'yes'; then
1513 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1514 if test -n "$CCMALLOCDelegate"; then
1515 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1517 # Assume that gcc is used with ccmalloc.
1518 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1519 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1520 if test -n "$CCMALLOC_LIBS"; then
1522 LIBS="$LIBS $CCMALLOC_LIBS"
1531 # Add support for 'huge pages' if requested
1533 AS_IF([test "x$enable_hugepages" != "xno"],[
1534 AC_DEFINE(HAVE_HUGEPAGES, 1, [Compile with hugepage support])
1538 # Add support for efence memory debugging library if requested
1540 if test "$enable_efence" = 'yes'; then
1541 EFENCE_LIBS='-lefence'
1542 LIBS="$EFENCE_LIBS $LIBS"
1545 dnl ===========================================================================
1551 AC_ARG_WITH([bzlib],
1552 [AC_HELP_STRING([--without-bzlib],
1553 [disable BZLIB support])],
1554 [with_bzlib=$withval],
1557 if test "$with_bzlib" != 'yes'; then
1558 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1562 if test "$with_bzlib" != 'no'; then
1564 AC_MSG_RESULT([-------------------------------------------------------------])
1565 AC_MSG_CHECKING([for BZLIB])
1570 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1571 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1572 if test "$native_win32_build" = 'yes'; then
1573 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1575 if test $found_libbz -gt 0; then
1576 passed=`expr $passed + 1`
1578 failed=`expr $failed + 1`
1580 AC_MSG_CHECKING(if BZLIB package is complete)
1581 if test $passed -gt 0; then
1582 if test $failed -gt 0; then
1583 AC_MSG_RESULT(no -- some components failed test)
1584 have_bzlib='no (failed tests)'
1587 LIBS="$BZLIB_LIBS $LIBS"
1588 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1596 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1597 AC_SUBST(BZLIB_LIBS)
1600 # Find the X11 include and library directories.
1607 if test "$no_x" != 'yes'; then
1608 AC_MSG_RESULT([-------------------------------------------------------------])
1609 AC_MSG_CHECKING([for X11])
1611 LDFLAGS="$LDFLAGS $X_LIBS"
1612 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1613 LIBS="$X11_LIBS $LIBS"
1614 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1616 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1619 # Check for X11 shared memory extension
1621 # shmctl is required to support the shared memory extension
1622 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1623 if test "$have_shmctl" != 'yes'; then
1625 LIBS="$LIBS -lcygipc"
1626 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1630 if test "$have_shmctl" = 'yes'; then
1631 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1635 # Check for X11 shape extension
1637 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1638 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1639 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1641 if test "$no_x" != 'yes'; then
1646 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1650 dnl ===========================================================================
1656 [AC_HELP_STRING([--without-zlib],
1657 [disable ZLIB support])],
1658 [with_zlib=$withval],
1661 if test "$with_zlib" != 'yes'; then
1662 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1669 if test "x$with_zlib" = "xyes"; then
1670 AC_MSG_RESULT([-------------------------------------------------------------])
1671 PKG_CHECK_MODULES(ZLIB,[zlib >= 1.0.0], have_zlib=yes, have_zlib=no)
1675 if test "$have_zlib" = 'yes'; then
1676 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have ZLIB library)
1677 CFLAGS="$ZLIB_CFLAGS $CFLAGS"
1678 LIBS="$ZLIB_LIBS $LIBS"
1681 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1682 AC_SUBST(ZLIB_CFLAGS)
1685 dnl ===========================================================================
1691 [AC_HELP_STRING([--without-zstd],
1692 [disable ZSTD support])],
1693 [with_zstd=$withval],
1696 if test "$with_zstd" != 'yes'; then
1697 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zstd=$with_zstd "
1704 if test "x$with_zstd" = "xyes"; then
1705 AC_MSG_RESULT([-------------------------------------------------------------])
1706 PKG_CHECK_MODULES(LIBZSTD,[libzstd >= 1.0.0], have_zstd=yes, have_zstd=no)
1710 if test "$have_zstd" = 'yes'; then
1711 AC_DEFINE(ZSTD_DELEGATE,1,Define if you have ZSTD library)
1712 CFLAGS="$ZSTD_CFLAGS $CFLAGS"
1713 LIBS="$ZSTD_LIBS $LIBS"
1716 AM_CONDITIONAL(ZSTD_DELEGATE, test "$have_zstd" = 'yes')
1717 AC_SUBST(ZSTD_CFLAGS)
1720 dnl ===========================================================================
1722 # whether modules are built or not.
1726 if test "$build_modules" != 'no' || test "X$ax_cv_check_cl_libcl" != Xno; then
1727 AC_MSG_RESULT([-------------------------------------------------------------])
1728 AC_MSG_CHECKING([for libltdl])
1732 AC_CHECK_HEADER([ltdl.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1733 AC_CHECK_LIB([ltdl],[lt_dlinit],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1734 AC_MSG_CHECKING([if libltdl package is complete])
1735 if test $passed -gt 0 ; then
1736 if test $failed -gt 0 ; then
1737 AC_MSG_RESULT([no -- some components failed test])
1738 have_ltdl='no (failed tests)'
1741 LIBS="$LTDL_LIBS $LIBS"
1742 AC_DEFINE(LTDL_DELEGATE,1,[Define if using libltdl to support dynamically loadable modules and OpenCL])
1743 AC_DEFINE_UNQUOTED([LTDL_MODULE_EXT],["${shrext_cmds}"],[Native module suffix])
1744 AC_MSG_RESULT([yes])
1750 if test "$have_ltdl" != 'yes' ; then
1751 AC_MSG_FAILURE([libltdl is required for modules and OpenCL builds],[1])
1754 AM_CONDITIONAL(WITH_LTDL, test "$have_ltdl" != 'no')
1757 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1760 if test "$enable_profiling" = 'yes'; then
1761 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1762 LIBS="$LIB_DL $LIBS"
1766 dnl ===========================================================================
1769 # Set Apple font directory.
1771 AC_ARG_WITH([apple-font-dir],
1772 [AC_HELP_STRING([--with-apple-font-dir=DIR],
1773 [Apple font directory])],
1774 [with_apple_font_dir=$withval],
1775 [with_apple_font_dir='default'])
1777 if test "$with_apple_font_dir" != 'default'; then
1778 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-apple-font-dir=$with_apple_font_dir "
1781 dnl ===========================================================================
1784 # Check for Autotrace delegate library.
1786 AC_ARG_WITH([autotrace],
1787 [AC_HELP_STRING([--with-autotrace],
1788 [enable autotrace support])],
1789 [with_autotrace=$withval],
1790 [with_autotrace='no'])
1792 if test "$with_autotrace" != 'yes'; then
1793 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1800 if test "x$with_autotrace" = "xyes"; then
1801 AC_MSG_RESULT([-------------------------------------------------------------])
1802 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1806 if test "$have_autotrace" = 'yes'; then
1807 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1808 CFLAGS="$AUTOTRACE_CFLAGS $CFLAGS"
1811 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1812 AC_SUBST(AUTOTRACE_CFLAGS)
1813 AC_SUBST(AUTOTRACE_LIBS)
1815 dnl ===========================================================================
1818 # Check for Display Postscript delegate library.
1821 [AC_HELP_STRING([--without-dps],
1822 [disable Display Postscript support])],
1823 [with_dps=$withval],
1826 if test "$with_dps" != 'yes'; then
1827 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1832 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1833 AC_MSG_RESULT([-------------------------------------------------------------])
1834 AC_MSG_CHECKING([for DPS])
1838 PERSIST_CPPFLAGS="$CPPFLAGS"
1839 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1840 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1842 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1843 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1844 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1845 # ImageMagick itself doesn't use -lXt.
1848 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1849 if test "$have_libdps" != 'yes'; then
1850 # Unset cache variable so we can try again.
1851 unset ac_cv_lib_dps_DPSInitialize
1852 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1853 if test "$have_libdps" = 'yes'; then
1857 if test "$have_libdps" = 'yes'; then
1858 passed=`expr $passed + 1`
1860 failed=`expr $failed + 1`
1862 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1863 AC_MSG_CHECKING([if DPS package is complete])
1864 if test $passed -gt 0; then
1865 if test $failed -gt 0; then
1866 AC_MSG_RESULT([no -- some components failed test])
1867 have_dps='no (failed tests)'
1868 CPPFLAGS="$PERSIST_CPPFLAGS"
1870 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1871 LIBS="$DPS_LIBS $LIBS"
1872 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1873 AC_MSG_RESULT([yes])
1878 CPPFLAGS=$PERSIST_CPPFLAGS
1881 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1884 dnl ===========================================================================
1887 # Set DejaVu font directory.
1889 AC_ARG_WITH([dejavu-font-dir],
1890 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1891 [DejaVu font directory])],
1892 [with_dejavu_font_dir=$withval],
1893 [with_dejavu_font_dir='default'])
1895 if test "$with_dejavu_font_dir" != 'default'; then
1896 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1899 dnl ===========================================================================
1902 # Check for FFTW delegate library.
1905 [AC_HELP_STRING([--without-fftw],
1906 [disable FFTW support])],
1907 [with_fftw=$withval],
1910 if test "$with_fftw" != 'yes'; then
1911 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1918 if test "x$with_fftw" = "xyes"; then
1919 AC_MSG_RESULT([-------------------------------------------------------------])
1920 PKG_CHECK_MODULES(fftw3,[fftw3 >= 3.0.0], have_fftw=yes, have_fftw=no)
1924 if test "$have_fftw" = 'yes'; then
1925 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1926 FFTW_CFLAGS="$fftw3_CFLAGS"
1927 FFTW_LIBS="$fftw3_LIBS"
1928 CFLAGS="$fftw3_CFLAGS $CFLAGS"
1931 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1932 AC_SUBST(FFTW_CFLAGS)
1935 dnl ===========================================================================
1938 # Check for FLIF delegate library.
1941 [AC_HELP_STRING([--without-flif],
1942 [disable FLIF support])],
1943 [with_flif=$withval],
1946 if test "$with_flif" != 'yes'; then
1947 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-flif=$with_flif "
1952 if test "$with_flif" != 'no'; then
1953 AC_MSG_RESULT([-------------------------------------------------------------])
1954 AC_MSG_CHECKING([for FLIF])
1958 AC_CHECK_HEADER(flif.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1959 AC_CHECK_LIB(flif,flif_create_decoder,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1960 AC_MSG_CHECKING([if FLIF package is complete])
1961 if test $passed -gt 0; then
1962 if test $failed -gt 0; then
1963 AC_MSG_RESULT([no -- some components failed test])
1964 have_flif='no (failed tests)'
1967 LIBS="$FLIF_LIBS $LIBS"
1968 AC_DEFINE(FLIF_DELEGATE,1,Define if you have FLIF library)
1969 AC_MSG_RESULT([yes])
1976 AM_CONDITIONAL(FLIF_DELEGATE,test "$have_flif" = 'yes')
1979 dnl ===========================================================================
1982 # Check for FlashPIX delegate library.
1985 [AC_HELP_STRING([--without-fpx],
1986 [disable FlashPIX support])],
1987 [with_fpx=$withval],
1990 if test "$with_fpx" != 'yes'; then
1991 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1996 if test "$with_fpx" != 'no'; then
1997 AC_MSG_RESULT([-------------------------------------------------------------])
1998 AC_MSG_CHECKING([for FlashPIX])
2003 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2004 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2006 AC_MSG_CHECKING([if FlashPIX package is complete])
2007 if test $passed -gt 0; then
2008 if test $failed -gt 0; then
2009 AC_MSG_RESULT([no -- some components failed test])
2010 have_fpx='no (failed tests)'
2013 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
2014 AC_MSG_RESULT([yes])
2022 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
2025 dnl ===========================================================================
2028 # Check for DJVU delegate library.
2031 [AC_HELP_STRING([--without-djvu],
2032 [disable DjVu support])],
2033 [with_djvu=$withval],
2036 if test "$with_djvu" != 'yes'; then
2037 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
2044 if test "x$with_djvu" = "xyes"; then
2045 AC_MSG_RESULT([-------------------------------------------------------------])
2046 PKG_CHECK_MODULES(ddjvuapi,[ddjvuapi >= 3.5.0], have_djvu=yes, have_djvu=no)
2050 if test "$have_djvu" = 'yes'; then
2051 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
2052 DJVU_CFLAGS="$ddjvuapi_CFLAGS"
2053 DJVU_LIBS="$ddjvuapi_LIBS"
2054 CFLAGS="$ddjvuapi_CFLAGS $CFLAGS"
2057 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
2058 AC_SUBST(DJVU_CFLAGS)
2061 dnl ===========================================================================
2064 # Check for fontconfig delegate library.
2066 AC_ARG_WITH([fontconfig],
2067 [AC_HELP_STRING([--without-fontconfig],
2068 [disable fontconfig support])],
2069 [with_fontconfig=$withval],
2070 [with_fontconfig='yes'])
2072 if test "$with_fontconfig" != 'yes'; then
2073 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
2076 have_fontconfig='no'
2077 FONTCONFIG_CFLAGS=""
2080 if test "x$with_fontconfig" = "xyes"; then
2081 AC_MSG_RESULT([-------------------------------------------------------------])
2082 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
2086 if test "$have_fontconfig" = 'yes'; then
2087 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
2088 CFLAGS="$FONTCONFIG_CFLAGS $CFLAGS"
2091 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
2092 AC_SUBST(FONTCONFIG_CFLAGS)
2093 AC_SUBST(FONTCONFIG_LIBS)
2095 dnl ===========================================================================
2098 # Check for the Freetype delegate library.
2100 AC_ARG_WITH([freetype],
2101 [AC_HELP_STRING([--without-freetype],
2102 [disable Freetype support])],
2103 [with_freetype=$withval],
2104 [with_freetype='yes'])
2106 if test "$with_freetype" != 'yes'; then
2107 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
2114 if test "x$with_freetype" = "xyes"; then
2115 AC_MSG_RESULT([-------------------------------------------------------------])
2116 PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no)
2120 if test "$have_freetype" = 'yes'; then
2121 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library)
2122 CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
2125 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
2126 AC_SUBST(FREETYPE_CFLAGS)
2127 AC_SUBST(FREETYPE_LIBS)
2129 dnl ===========================================================================
2132 # Check for the raqm delegate library.
2135 [AC_HELP_STRING([--without-raqm],
2136 [disable Raqm support])],
2137 [with_raqm=$withval],
2140 if test "$with_raqm" != 'yes'; then
2141 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-raqm=$with_raqm "
2148 if test "x$with_raqm" = "xyes"; then
2149 AC_MSG_RESULT([-------------------------------------------------------------])
2150 PKG_CHECK_MODULES(RAQM,[raqm], have_raqm=yes, have_raqm=no)
2154 if test "$have_raqm" = 'yes'; then
2155 AC_DEFINE(RAQM_DELEGATE,1,Define if you have RAQM library)
2156 CFLAGS="$RAQM_CFLAGS $CFLAGS"
2159 AM_CONDITIONAL(RAQM_DELEGATE, test "$have_raqm" = 'yes')
2160 AC_SUBST(RAQM_CFLAGS)
2163 dnl ===========================================================================
2166 # Check for Ghostscript library or framework.
2168 # Test for iapi.h & test for gsapi_new_instance in -lgs
2169 # or -framework Ghostscript
2171 AC_ARG_WITH([gslib],
2172 [AC_HELP_STRING([--with-gslib],
2173 [enable Ghostscript library support])],
2174 [with_gslib=$withval],
2177 gslib_framework='no'
2178 if test "$with_gslib" != 'yes'; then
2179 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
2184 if test "$with_gslib" != 'no'; then
2185 AC_MSG_RESULT([-------------------------------------------------------------])
2186 AC_MSG_CHECKING([for Ghostscript])
2191 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
2192 failed=`expr $failed + 1`,)
2193 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
2194 failed=`expr $failed + 1`,)
2195 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
2196 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
2197 AC_MSG_CHECKING([if Ghostscript package is complete])
2198 if test $passed -gt 0; then
2199 if test $failed -gt 0; then
2200 AC_MSG_RESULT([no -- some components failed test])
2201 have_gslib='no (failed tests)'
2203 if test $framework -gt 0; then
2204 GS_LIBS='-framework Ghostscript'
2205 gslib_framework='yes'
2206 AC_MSG_RESULT([yes, using framework.])
2208 AC_MSG_RESULT([yes, using library.])
2211 LIBS="$GS_LIBS $LIBS"
2212 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
2219 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
2222 # Set default font search path
2223 AC_ARG_WITH([fontpath],
2224 [AC_HELP_STRING([--with-fontpath=DIR],
2225 [prepend to default font search path])],
2226 [with_fontpath=$withval],
2229 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2232 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",[Define to prepend to default font search path.])
2234 if test "$with_fontpath=" != ''; then
2235 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2238 # Set Ghostscript font directory
2239 AC_ARG_WITH([gs-font-dir],
2240 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2241 [Ghostscript font directory])],
2242 [with_gs_font_dir=$withval],
2243 [with_gs_font_dir='default'])
2245 if test "$with_gs_font_dir" != 'default'; then
2246 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2249 dnl ===========================================================================
2252 # Check for GVC delegate library.
2255 [AC_HELP_STRING([--with-gvc],
2256 [enable GVC support])],
2257 [with_gvc=$withval],
2260 if test "$with_gvc" != 'yes'; then
2261 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2265 if test "x$with_gvc" = "xyes"; then
2266 AC_MSG_RESULT([-------------------------------------------------------------])
2267 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2271 if test "$have_gvc" = 'yes'; then
2272 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2273 CFLAGS="$GVC_CFLAGS $CFLAGS"
2276 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2277 AC_SUBST(GVC_CFLAGS)
2280 dnl ===========================================================================
2283 # Check for the HEIC delegate library.
2286 [AC_HELP_STRING([--without-heic],
2287 [disable HEIC support])],
2288 [with_heic=$withval],
2291 if test "$with_heic" != 'yes'; then
2292 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-heic=$with_heic "
2299 if test "x$with_heic" = "xyes"; then
2300 AC_MSG_RESULT([-------------------------------------------------------------])
2301 PKG_CHECK_MODULES(HEIF,[libheif], have_heic=yes, have_heic=no)
2305 if test "$have_heic" = 'yes'; then
2306 AC_DEFINE(HEIC_DELEGATE,1,Define if you have libheif library)
2307 CFLAGS="$HEIF_CFLAGS $CFLAGS"
2310 AM_CONDITIONAL(HEIC_DELEGATE, test "$have_heic" = 'yes')
2311 AC_SUBST(HEIF_CFLAGS)
2314 dnl ===========================================================================
2317 # Check for JBIG delegate library.
2320 [AC_HELP_STRING([--without-jbig],
2321 [disable JBIG support])],
2322 [with_jbig=$withval],
2327 if test "$with_jbig" != 'no'; then
2328 AC_MSG_RESULT([-------------------------------------------------------------])
2329 AC_MSG_CHECKING([for JBIG])
2333 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2334 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2335 AC_MSG_CHECKING([if JBIG package is complete])
2336 if test $passed -gt 0; then
2337 if test $failed -gt 0; then
2338 AC_MSG_RESULT([no -- some components failed test])
2339 have_jbig='no (failed tests)'
2342 LIBS="$JBIG_LIBS $LIBS"
2343 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2344 AC_MSG_RESULT([yes])
2351 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2354 dnl ===========================================================================
2357 # Check for JPEG delegate library.
2360 [AC_HELP_STRING([--without-jpeg],
2361 [disable JPEG support])],
2362 [with_jpeg=$withval],
2365 if test "$with_jpeg" != 'yes'; then
2366 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2371 if test "$with_jpeg" != 'no'; then
2372 AC_MSG_RESULT([-------------------------------------------------------------])
2373 AC_MSG_CHECKING([for JPEG])
2377 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2378 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2379 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2380 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2381 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2383 # Test for compatible JPEG library
2384 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2385 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2389 #include <jpeglib.h>
2391 changequote(<<, >>)dnl
2393 #if JPEG_LIB_VERSION < 62
2394 #error IJG JPEG library must be version 6b or newer!
2398 changequote([, ])dnl
2399 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2400 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2402 AC_MSG_CHECKING([if JPEG package is complete])
2403 if test $passed -gt 0; then
2404 if test $failed -gt 0; then
2405 AC_MSG_RESULT([no -- some components failed test])
2406 have_jpeg='no (failed tests)'
2409 LIBS="$JPEG_LIBS $LIBS"
2410 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2411 AC_MSG_RESULT([yes])
2418 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2421 dnl ===========================================================================
2424 # Check for LCMS delegate library.
2427 [ --without-lcms disable lcms (v1.1X) support],
2428 [with_lcms=$withval],
2430 if test "$with_lcms" != 'yes' ; then
2431 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2438 if test "x$with_lcms" = "xyes"; then
2439 AC_MSG_RESULT([-------------------------------------------------------------])
2440 PKG_CHECK_MODULES(LCMS2,[lcms2 >= 2.0.0], have_lcms=yes, have_lcms=no)
2444 if test "$have_lcms" = 'yes'; then
2445 AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library)
2446 LCMS_CFLAGS="$LCMS2_CFLAGS"
2447 LCMS_LIBS="$LCMS2_LIBS"
2448 CFLAGS="$LCMS2_CFLAGS $CFLAGS"
2449 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2450 if test "$have_lcms_header" = 'yes'; then
2451 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2453 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2457 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms" = 'yes')
2458 AC_SUBST(LCMS_CFLAGS)
2461 dnl ===========================================================================
2464 # Check for the OpenJP2 delegate library.
2466 AC_ARG_WITH([openjp2],
2467 [AC_HELP_STRING([--without-openjp2],
2468 [disable OpenJP2 support])],
2469 [with_openjp2=$withval],
2470 [with_openjp2='yes'])
2472 if test "$with_openjp2" != 'yes'; then
2473 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openjp2=$with_openjp2 "
2477 LIBOPENJP2_CFLAGS=""
2480 if test "x$with_openjp2" = "xyes"; then
2481 AC_MSG_RESULT([-------------------------------------------------------------])
2482 PKG_CHECK_MODULES(LIBOPENJP2,[libopenjp2 >= 2.1.0], have_openjp2=yes, have_openjp2=no)
2486 if test "$have_openjp2" = 'yes'; then
2487 AC_DEFINE(LIBOPENJP2_DELEGATE,1,Define if you have OPENJP2 library)
2488 CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS"
2491 AM_CONDITIONAL(LIBOPENJP2_DELEGATE, test "$have_openjp2" = 'yes')
2492 AC_SUBST(LIBOPENJP2_CFLAGS)
2493 AC_SUBST(LIBOPENJP2_LIBS)
2496 dnl ===========================================================================
2499 # Check for the LQR (Liquid Rescale) delegate library.
2502 [AC_HELP_STRING([--without-lqr],
2503 [disable Liquid Rescale support])],
2504 [with_lqr=$withval],
2507 if test "$with_lqr" != 'yes'; then
2508 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2515 if test "x$with_lqr" = "xyes"; then
2516 AC_MSG_RESULT([-------------------------------------------------------------])
2517 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2521 if test "$have_lqr" = 'yes'; then
2522 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2523 CFLAGS="$LQR_CFLAGS $CFLAGS"
2526 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2527 AC_SUBST(LQR_CFLAGS)
2530 dnl ===========================================================================
2532 # Disable LZMA (lzma library)
2534 [ --without-lzma disable LZMA support],
2535 [with_lzma=$withval],
2537 if test "$with_lzma" != 'yes' ; then
2538 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2542 if test "x$with_lzma" = "xyes"; then
2543 AC_MSG_RESULT([-------------------------------------------------------------])
2544 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2548 if test "$have_lzma" = 'yes'; then
2549 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2550 CFLAGS="$LZMA_CFLAGS $CFLAGS"
2553 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2554 AC_SUBST(LZMA_CFLAGS)
2557 dnl ===========================================================================
2560 # Check for the OpenEXR delegate library.
2562 AC_ARG_WITH([openexr],
2563 [AC_HELP_STRING([--without-openexr],
2564 [disable OpenEXR support])],
2565 [with_openexr=$withval],
2566 [with_openexr='yes'])
2568 if test "$with_openexr" != 'yes'; then
2569 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2576 if test "x$with_openexr" = "xyes"; then
2577 AC_MSG_RESULT([-------------------------------------------------------------])
2578 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2582 if test "$have_openexr" = 'yes'; then
2583 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2584 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2587 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2588 AC_SUBST(OPENEXR_CFLAGS)
2589 AC_SUBST(OPENEXR_LIBS)
2591 dnl ===========================================================================
2594 # Check for PANGO delegate library.
2596 AC_ARG_WITH([pango],
2597 [AC_HELP_STRING([--without-pango],
2598 [disable PANGO support])],
2599 [with_pango=$withval],
2602 if test "$with_pango" != 'yes'; then
2603 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2607 have_pangocairo='no'
2611 if test "x$with_pango" = "xyes"; then
2612 AC_MSG_RESULT([-------------------------------------------------------------])
2613 PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
2615 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2619 if test "$have_pango" = 'yes'; then
2620 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2621 CFLAGS="$PANGO_CFLAGS $CFLAGS"
2624 if test "$have_pangocairo" = 'yes'; then
2625 AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
2626 CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
2629 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2630 AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes')
2631 AC_SUBST(PANGO_CFLAGS)
2632 AC_SUBST(PANGO_LIBS)
2634 dnl ===========================================================================
2637 # Check for PNG delegate library.
2640 [AC_HELP_STRING([--without-png],
2641 [disable PNG support])],
2642 [with_png=$withval],
2645 if test "$with_png" != 'yes'; then
2646 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2653 if test "x$with_png" = "xyes"; then
2654 AC_MSG_RESULT([-------------------------------------------------------------])
2655 PKG_CHECK_MODULES(PNG,[libpng >= 1.0.0], have_png=yes, have_png=no)
2659 if test "$have_png" = 'yes'; then
2660 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2661 CFLAGS="$PNG_CFLAGS $CFLAGS"
2664 AM_CONDITIONAL(PNG_DELEGATE, test "$have_png" = 'yes')
2665 AC_SUBST(PNG_CFLAGS)
2668 dnl ===========================================================================
2671 # Check for the Raw delegate library.
2674 [AC_HELP_STRING([--without-raw],
2675 [disable Raw support])],
2676 [with_raw=$withval],
2679 if test "$with_raw" != 'yes'; then
2680 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-libraw=$with_raw "
2687 if test "x$with_raw" = "xyes"; then
2688 AC_MSG_RESULT([-------------------------------------------------------------])
2689 PKG_CHECK_MODULES(RAW_R,[libraw_r >= 0.14.8], have_raw=yes, have_raw=no)
2693 if test "$have_raw" = 'yes'; then
2694 AC_DEFINE(RAW_R_DELEGATE,1,Define if you have LIBRAW library)
2695 CFLAGS="$RAW_R_CFLAGS $CFLAGS"
2698 AM_CONDITIONAL(RAW_R_DELEGATE, test "$have_raw" = 'yes')
2699 AC_SUBST(RAW_R_CFLAGS)
2700 AC_SUBST(RAW_R_LIBS)
2702 dnl ===========================================================================
2705 # Check for RSVG delegate library.
2708 [AC_HELP_STRING([--with-rsvg],
2709 [enable RSVG support])],
2710 [with_rsvg=$withval],
2713 if test "$with_rsvg" != 'yes'; then
2714 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2722 if test "x$with_rsvg" = "xyes"; then
2723 AC_MSG_RESULT([-------------------------------------------------------------])
2724 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2726 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2730 if test "$have_rsvg" = 'yes'; then
2731 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2732 CFLAGS="$RSVG_CFLAGS $CFLAGS"
2735 if test "$have_cairo" = 'yes'; then
2736 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2737 CFLAGS="$CAIRO_SVG_CFLAGS $CFLAGS"
2740 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2741 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2742 AC_SUBST(RSVG_CFLAGS)
2745 dnl ===========================================================================
2748 # Check for TIFF delegate library.
2751 [AC_HELP_STRING([--without-tiff],
2752 [disable TIFF support])],
2753 [with_tiff=$withval],
2756 if test "$with_tiff" != 'yes'; then
2757 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2762 if test "$with_tiff" != 'no'; then
2763 AC_MSG_RESULT([-------------------------------------------------------------])
2764 AC_MSG_CHECKING([for TIFF])
2768 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2769 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2770 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2771 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2772 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2773 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2774 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2775 AC_MSG_CHECKING([if TIFF package is complete])
2776 if test $passed -gt 0; then
2777 if test $failed -gt 0; then
2778 AC_MSG_RESULT([no -- some components failed test])
2779 have_tiff='no (failed tests)'
2782 LIBS="$TIFF_LIBS $LIBS"
2783 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2784 AC_MSG_RESULT([yes])
2786 AC_CHECK_HEADERS(tiffconf.h)
2787 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2788 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2789 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2790 TIFFSwabArrayOfTriples])
2796 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2800 # Set URW Base35 font directory.
2802 AC_ARG_WITH([urw-base35-font-dir],
2803 [AC_HELP_STRING([--with-urw-base35-font-dir=DIR],
2804 [URW-base35 font directory])],
2805 [with_urw_base35_font_dir=$withval],
2806 [with_urw_base35_font_dir='default'])
2808 if test "$with_urw_base35_font_dir" != 'default'; then
2809 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-urw-base35-font-dir=$with_urw_base35_font_dir "
2812 dnl ===========================================================================
2815 # Check for the WEBP delegate library.
2818 [AC_HELP_STRING([--without-webp],
2819 [disable WEBP support])],
2820 [with_webp=$withval],
2823 if test "$with_webp" != 'yes'; then
2824 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2835 if test "x$with_webp" = "xyes"; then
2836 AC_MSG_RESULT([-------------------------------------------------------------])
2837 PKG_CHECK_MODULES(WEBP,[libwebp], have_webp=yes, have_webp=no)
2838 PKG_CHECK_MODULES(WEBPMUX,[libwebpmux >= 0.4.4], have_webpmux=yes, have_webpmux=no)
2842 if test "$have_webp" = 'yes'; then
2843 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2844 CFLAGS="$WEBP_CFLAGS $CFLAGS"
2847 if test "$have_webpmux" = 'yes'; then
2848 AC_DEFINE(WEBPMUX_DELEGATE,1,Define if you have WEBPMUX library)
2849 CFLAGS="$WEBPMUX_CFLAGS $CFLAGS"
2852 AM_CONDITIONAL(WEBP_DELEGATE, test "$have_webp" = 'yes')
2853 AM_CONDITIONAL(WEBPMUX_DELEGATE, test "$have_webpmux" = 'yes')
2854 AC_SUBST(WEBPMUX_CFLAGS)
2855 AC_SUBST(WEBPMUX_LIBS)
2856 AC_SUBST(WEBP_CFLAGS)
2859 dnl ===========================================================================
2862 # Set Windows font directory.
2864 AC_ARG_WITH([windows-font-dir],
2865 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2866 [Windows font directory])],
2867 [with_windows_font_dir=$withval],
2868 [with_windows_font_dir='default'])
2870 if test "$with_windows_font_dir" != 'default'; then
2871 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2874 dnl ===========================================================================
2877 # Check for WMF delegate library.
2880 [AC_HELP_STRING([--with-wmf],
2881 [enable WMF support])],
2882 [with_wmf=$withval],
2885 if test "$with_wmf" != 'yes'; then
2886 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2893 if test "$with_wmf" != 'no'; then
2894 AC_MSG_CHECKING([for WMF support ])
2897 have_libwmflite='no'
2898 have_libwmf_ipa_h='no'
2900 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],[],[$FT2BUILD_H])
2901 if test "$have_libwmf_ipa_h" = 'yes'; then
2902 AC_CHECK_LIB([wmflite],[wmf_lite_create],[have_libwmflite='yes'],[],[])
2903 if test "$have_libwmflite" = 'yes'; then
2904 AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
2905 WMF_LIBS='-lwmflite'
2906 LIBS="$WMF_LIBS $LIBS"
2909 AC_MSG_RESULT([no -- some components failed test])
2910 have_wmf='no (failed tests)'
2911 have_wmflite='no (failed tests)'
2917 AC_MSG_CHECKING([if WMF package is complete ])
2918 if test "$have_wmf" = 'yes'; then
2919 AC_MSG_RESULT([yes])
2923 AM_CONDITIONAL([WMF_DELEGATE], [test "$have_wmf" = 'yes'])
2924 AC_SUBST([WMF_CFLAGS])
2925 AC_SUBST([WMF_LIBS])
2927 dnl ===========================================================================
2930 # Check for XML delegate library.
2933 [AC_HELP_STRING([--without-xml],
2934 [disable XML support])],
2935 [with_xml=$withval],
2938 if test "$with_xml" != 'yes' ; then
2939 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2946 if test "x$with_xml" = "xyes"; then
2947 AC_MSG_RESULT([-------------------------------------------------------------])
2948 PKG_CHECK_MODULES(XML,[libxml-2.0 >= 2.0.0], have_xml=yes, have_xml=no)
2952 if test "$have_xml" = 'yes'; then
2953 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2954 CFLAGS="$XML_CFLAGS $CFLAGS"
2957 AM_CONDITIONAL(XML_DELEGATE, test "$have_xml" = 'yes')
2958 AC_SUBST(XML_CFLAGS)
2961 dnl ===========================================================================
2963 # Substitute compiler name to build/link PerlMagick
2965 AC_SUBST([PERLMAINCC])
2968 # Configure install Paths
2971 # Path to ImageMagick header files
2972 INCLUDE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
2973 INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}"
2974 DEFINE_INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}/"
2975 case "${build_os}" in
2977 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2980 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick headers live.])
2981 AC_SUBST(INCLUDE_PATH)
2983 # Path to ImageMagick header files (arch part)
2984 INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
2985 DEFINE_INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
2986 case "${build_os}" in
2988 DEFINE_INCLUDEARCH_PATH=`$WinPathScript "$DEFINE_INCLUDEARCH_PATH" 1`
2991 AC_DEFINE_UNQUOTED(INCLUDEARCH_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick architecture headers live.])
2992 AC_SUBST(INCLUDEARCH_PATH)
2994 # Subdirectory under lib to place ImageMagick lib files
2995 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2996 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",[Subdirectory of lib where ImageMagick architecture dependent files are installed.])
2998 # Path to ImageMagick bin directory
2999 EXECUTABLE_PATH="${BIN_DIR}"
3000 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
3001 case "${build_os}" in
3003 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
3006 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",[Directory where executables are installed.])
3007 AC_SUBST(EXECUTABLE_PATH)
3009 # Path to ImageMagick lib
3010 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
3011 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
3012 case "${build_os}" in
3014 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
3017 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",[Directory where architecture-dependent files live.])
3018 AC_SUBST(LIBRARY_PATH)
3021 # path to local binaries
3022 if test "x$LIB_BIN_BASEDIRNAME" = "x"; then
3023 LIB_BIN_BASEDIRNAME="bin"
3025 AC_DEFINE_UNQUOTED(LIB_BIN_BASEDIRNAME,"$LIB_BIN_BASEDIRNAME",[Binaries in libraries path base name (will be during install linked to bin)])
3026 AC_SUBST(LIB_BIN_BASEDIRNAME)
3028 if test "x$LIB_BIN_DIR" = "x"; then
3029 LIB_BIN_DIR=${LIB_BIN_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3031 AC_SUBST(LIB_BIN_DIR)
3033 LIB_BIN_DIR_RELATIVE_PATH=$LIB_BIN_DIR
3034 AC_SUBST(LIB_BIN_DIR_RELATIVE_PATH)
3035 LIB_BIN_DIR_PATH="${LIBRARY_PATH}/${LIB_BIN_DIR_RELATIVE_PATH}"
3036 AC_SUBST(LIB_BIN_DIR_PATH)
3039 # path to modules lib
3040 if test "x$MODULES_BASEDIRNAME" = "x"; then
3041 MODULES_BASEDIRNAME="modules"
3043 AC_DEFINE_UNQUOTED(MODULES_BASEDIRNAME,"$MODULES_BASEDIRNAME",[Module directory name without ABI part.])
3044 AC_SUBST(MODULES_BASEDIRNAME)
3046 if test "x$MODULES_DIRNAME" = "x"; then
3047 MODULES_DIRNAME=${MODULES_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3049 AC_DEFINE_UNQUOTED(MODULES_DIRNAME,"$MODULES_DIRNAME",[Module directory dirname])
3051 AC_SUBST(MODULES_DIRNAME)
3053 MODULES_RELATIVE_PATH="${MODULES_DIRNAME}"
3054 AC_SUBST(MODULES_RELATIVE_PATH)
3055 MODULES_PATH="${LIBRARY_PATH}/${MODULES_RELATIVE_PATH}"
3056 AC_SUBST(MODULES_PATH)
3059 # path to coders lib
3060 if test "x$CODER_DIRNAME" = "x"; then
3061 CODER_DIRNAME="coders"
3063 AC_DEFINE_UNQUOTED(CODER_DIRNAME,"$CODER_DIRNAME",[coders subdirectory.])
3064 AC_SUBST(CODER_DIRNAME)
3066 CODER_RELATIVE_PATH="${CODER_DIRNAME}"
3067 CODER_PATH="${MODULES_PATH}/${CODER_DIRNAME}"
3068 AC_SUBST(CODER_PATH)
3071 # Subdirectory under lib to place ImageMagick filter module files
3073 # path to coders lib
3074 if test "x$FILTER_DIRNAME" = "x"; then
3075 FILTER_DIRNAME="filters"
3077 AC_DEFINE_UNQUOTED(FILTER_DIRNAME,"$FILTER_DIRNAME",[filter subdirectory.])
3078 AC_SUBST(FILTER_DIRNAME)
3080 FILTER_RELATIVE_PATH="${FILTER_DIRNAME}"
3081 FILTER_PATH="${MODULES_PATH}/${FILTER_DIRNAME}"
3082 AC_SUBST(FILTER_PATH)
3085 # Path to ImageMagick documentation files
3086 DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3087 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
3088 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
3089 case "${build_os}" in
3091 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
3094 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",[Directory where ImageMagick documents live.])
3095 AC_SUBST(DOCUMENTATION_PATH)
3098 # Enable/Disable documentation
3099 AC_ARG_ENABLE([docs],
3100 [AS_HELP_STRING([--disable-docs],
3101 [disable building of documentation])],
3102 wantdocs=$enableval, wantdocs=yes)
3103 AM_CONDITIONAL([INSTALL_DOC], [test "$wantdocs" = "yes"])
3105 # Subdirectory to place architecture-dependent configuration files
3106 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3107 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",[Subdirectory of lib where architecture-dependent configuration files live.])
3108 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3109 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3110 case "${build_os}" in
3112 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
3115 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",[Directory where architecture-dependent configuration files live.])
3116 AC_SUBST(CONFIGURE_PATH)
3118 # Subdirectory to place architecture-independent configuration files
3119 SHARE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
3120 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",[Subdirectory of lib where architecture-independent configuration files live.])
3121 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
3122 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
3123 case "${build_os}" in
3125 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
3128 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",[Directory where architecture-independent configuration files live.])
3129 AC_SUBST(SHARE_PATH)
3132 # Subdirectory to place architecture-dependent configuration files.
3133 if test "x$SHAREARCH_BASEDIRNAME" = "x"; then
3134 SHAREARCH_BASEDIRNAME="config"
3136 AC_DEFINE_UNQUOTED(SHAREARCH_BASEDIRNAME,"$SHAREARCH_BASEDIRNAME",[Sharearch directory name without ABI part.])
3137 AC_SUBST(SHAREARCH_BASEDIRNAME)
3139 if test "x$SHAREARCH_DIRNAME" = "x"; then
3140 SHAREARCH_DIRNAME=${SHAREARCH_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3142 AC_DEFINE_UNQUOTED(SHAREARCH_DIRNAME,"$SHAREARCH_DIRNAME",[Sharearch directory dirname])
3144 AC_SUBST(SHAREARCH_DIRNAME)
3146 SHAREARCH_RELATIVE_PATH="${SHAREARCH_DIRNAME}"
3147 AC_SUBST(SHAREARCH_RELATIVE_PATH)
3148 SHAREARCH_PATH="${LIBRARY_PATH}/${SHAREARCH_RELATIVE_PATH}"
3149 AC_SUBST(SHAREARCH_PATH)
3152 # program_transform_name is formed for use in a Makefile, so create a
3153 # modified version for use in a shell script.
3154 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3156 # Default delegate definitions
3157 AC_MSG_RESULT([-------------------------------------------------------------])
3158 AC_MSG_CHECKING([for ImageMagick delegate programs])
3160 BPGDecodeDelegateDefault='bpgdec'
3161 BPGEncodeDelegateDefault='bpgenc'
3162 BlenderDecodeDelegateDefault='blender'
3163 BrowseDelegateDefault='xdg-open'
3164 DNGDecodeDelegateDefault='ufraw-batch'
3165 DOCDecodeDelegateDefault='soffice'
3166 GVCDecodeDelegateDefault='dot'
3167 DVIDecodeDelegateDefault='dvips'
3168 EditorDelegateDefault='xterm'
3169 ConvertDelegateDefault=`echo magick | sed ${configure_transform_name}`
3170 DisplayDelegateDefault=`echo magick | sed ${configure_transform_name}`
3171 MogrifyDelegateDefault=`echo magick | sed ${configure_transform_name}`
3172 HPGLDecodeDelegateDefault='hp2xx'
3173 HTMLDecodeDelegateDefault='html2ps'
3174 ILBMDecodeDelegateDefault='ilbmtoppm'
3175 ILBMEncodeDelegateDefault='ppmtoilbm'
3176 JXRDecodeDelegateDefault='JxrDecApp'
3177 JXREncodeDelegateDefault='JxrEncApp'
3178 LEPDelegateDefault='lepton'
3179 LPDelegateDefault='lp'
3180 LPRDelegateDefault='lpr'
3181 LaunchDelegateDefault='gimp'
3182 MPEGDecodeDelegateDefault='avconv'
3183 MPEGEncodeDelegateDefault='avconv'
3184 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3185 MVDelegateDefault='mv'
3186 PCLDelegateDefault='pcl6'
3187 if test "$native_win32_build" = 'yes'; then
3188 PSDelegateDefault='gswin32c'
3189 elif test "$gslib_framework" = 'yes'; then
3190 PSDelegateDefault='gsc'
3192 PSDelegateDefault='gs'
3194 RMDelegateDefault='rm'
3195 RSVGDecodeDelegateDefault='rsvg-convert'
3196 SVGDecodeDelegateDefault='inkscape'
3197 UniconvertorDelegateDefault='uniconvertor'
3198 WebPDecodeDelegateDefault='dwebp'
3199 WebPEncodeDelegateDefault='cwebp'
3200 WWWDecodeDelegateDefault='curl'
3201 XPSDelegateDefault='gxps'
3203 # Search for delegates
3204 AC_PATH_PROG(BPGDecodeDelegate, "$BPGDecodeDelegateDefault", "$BPGDecodeDelegateDefault")
3205 AC_PATH_PROG(BPGEncodeDelegate, "$BPGEncodeDelegateDefault", "$BPGEncodeDelegateDefault")
3206 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3207 AC_PATH_PROGS(BrowseDelegate, "$BrowseDelegateDefault" google-chrome firefox konqueror mozilla lynx, "$BrowseDelegateDefault")
3208 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3209 AC_PATH_PROG(DOCDecodeDelegate, "$DOCDecodeDelegateDefault", "$DOCDecodeDelegateDefault")
3210 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3211 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3212 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3213 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3214 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3215 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3216 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3217 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3218 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3219 AC_PATH_PROG(JXRDecodeDelegate, "$JXRDecodeDelegateDefault", "$JXRDecodeDelegateDefault")
3220 AC_PATH_PROG(JXREncodeDelegate, "$JXREncodeDelegateDefault", "$JXREncodeDelegateDefault")
3221 AC_PATH_PROG(LEPDelegate, "$LEPDelegateDefault", "$LEPDelegateDefault")
3222 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3223 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3224 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3225 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3226 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3227 if test "$MPEGDecodeDelegate" = "$MPEGDecodeDelegateDefault" ; then
3228 MPEGDecodeDelegateDefault='ffmpeg'
3229 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3231 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3232 if test "$MPEGEncodeDelegate" = "$MPEGEncodeDelegateDefault" ; then
3233 MPEGEncodeDelegateDefault='ffmpeg'
3234 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3236 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3237 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3238 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3239 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3240 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3241 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3242 AC_PATH_PROG(SVGDecodeDelegate, "$SVGDecodeDelegateDefault", "$SVGDecodeDelegateDefault")
3243 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3244 AC_PATH_PROG(WebPDecodeDelegate, "$WebPDecodeDelegateDefault", "$WebPDecodeDelegateDefault")
3245 AC_PATH_PROG(WebPEncodeDelegate, "$WebPEncodeDelegateDefault", "$WebPEncodeDelegateDefault")
3246 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDelegateDefault")
3247 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3249 # Prefer lpr to lp; lp needs options tacked on.
3250 if test "$LPRDelegate" != no; then
3251 PrintDelegate="$LPRDelegate"
3253 PrintDelegate="$LPDelegate -c -s"
3255 AC_SUBST(PrintDelegate)
3257 # Installed ImageMagick utiltity paths
3258 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3259 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3260 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3262 # Set delegate booleans
3263 have_avconv='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_avconv='yes'; fi
3264 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3265 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3266 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3267 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3268 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3269 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3270 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3273 # Test for font directories
3275 type_include_files=''
3278 AC_MSG_CHECKING(for Apple fonts directory)
3280 if test "${with_apple_font_dir}" != 'default'; then
3281 apple_font_dir="${with_apple_font_dir}/"
3283 for font_dir in '/Library/Fonts/'; do
3284 if test -f "${font_dir}Arial.ttf"; then
3285 apple_font_dir="${font_dir}"
3290 if test "${apple_font_dir}x" != 'x'; then
3291 type_include_files="${type_include_files} "'<include file="type-apple.xml" />'
3292 AC_MSG_RESULT([$apple_font_dir])
3294 AC_MSG_RESULT([not found!]);
3296 AC_SUBST(apple_font_dir)
3299 AC_MSG_CHECKING(for Dejavu fonts directory)
3301 if test "${with_dejavu_font_dir}" != 'default'; then
3302 dejavu_font_dir="${with_dejavu_font_dir}/"
3304 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3305 if test -f "${font_dir}DejaVuSerif.ttf"; then
3306 dejavu_font_dir="${font_dir}"
3311 if test "${dejavu_font_dir}x" != 'x'; then
3312 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3313 AC_MSG_RESULT([$dejavu_font_dir])
3315 AC_MSG_RESULT([not found!]);
3317 AC_SUBST(dejavu_font_dir)
3320 AC_MSG_CHECKING(for Ghostscript fonts directory)
3321 ghostscript_font_dir=''
3322 if test "${with_gs_font_dir}" != 'default'; then
3323 ghostscript_font_dir="${with_gs_font_dir}/"
3325 if test "${native_win32_build}" = 'yes'; then
3326 # Native Windows Build
3327 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3328 if test -f "${font_dir}a010013l.pfb"; then
3329 ghostscript_font_dir="$font_dir"
3333 if test "${PSDelegate}" != 'gswin32c'; then
3334 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3337 # Linux / Mac OS X / Unix Build
3338 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
3339 if test -f "${font_dir}a010013l.pfb"; then
3340 ghostscript_font_dir="${font_dir}"
3344 if test "${ghostscript_font_dir}x" = 'x'; then
3345 if test "$PSDelegate" != 'gs'; then
3346 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3351 if test "${ghostscript_font_dir}x" != 'x'; then
3352 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3353 AC_MSG_RESULT([$ghostscript_font_dir])
3355 AC_MSG_RESULT([not found!]);
3357 AC_SUBST(ghostscript_font_dir)
3358 case "${build_os}" in
3360 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3365 AC_MSG_CHECKING(for URW-base35 fonts directory)
3366 urw_base35_font_dir=''
3367 if test "${with_urw_base35_font_dir}" != 'default'; then
3368 urw_base35_font_dir="${with_urw_base35_font_dir}/"
3370 for font_dir in "${prefix}/share/urw-base35/fonts/" '/usr/share/fonts/urw-base35/'; do
3371 if test -f "${font_dir}StandardSymbolsPS.t1"; then
3372 urw_base35_font_dir="${font_dir}"
3377 if test "${urw_base35_font_dir}x" != 'x'; then
3378 type_include_files="${type_include_files} "'<include file="type-urw-base35.xml" />'
3379 AC_MSG_RESULT([$urw_base35_font_dir])
3381 AC_MSG_RESULT([not found!]);
3383 AC_SUBST(urw_base35_font_dir)
3386 AC_MSG_CHECKING(for Windows fonts directory)
3388 if test "${with_windows_font_dir}" != 'default'; then
3389 windows_font_dir="${with_windows_font_dir}/"
3391 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
3392 if test -f "${font_dir}arial.ttf"; then
3393 windows_font_dir="${font_dir}"
3398 if test "${windows_font_dir}x" != 'x'; then
3399 type_include_files="${type_include_files} "'<include file="type-windows.xml" />'
3400 AC_MSG_RESULT([$windows_font_dir])
3402 AC_MSG_RESULT([not found!]);
3404 AC_SUBST(windows_font_dir)
3406 AC_SUBST(type_include_files)
3409 # Handle case where user doesn't want frozen paths
3411 if test "$with_frozenpaths" != 'yes'; then
3412 # Re-set delegate definitions to default (no paths)
3413 BPGDecodeDelegate="$BPGDecodeDelegateDefault"
3414 BPGEncodeDelegate="$BPGEncodeDelegateDefault"
3415 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3416 BrowseDelegate="$BrowseDelegateDefault"
3417 ConvertDelegate="$ConvertDelegateDefault"
3418 DisplayDelegate="$DisplayDelegateDefault"
3419 DNGDecodeDelegate="$DNGDecodeDelegateDefault"
3420 DOCDecodeDelegate="$DOCDecodeDelegateDefault"
3421 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3422 EditorDelegate="$EditorDelegateDefault"
3423 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3424 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3425 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3426 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3427 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3428 JXRDecodeDelegate="$JXRDecodeDelegateDefault"
3429 JXREncodeDelegate="$JXREncodeDelegateDefault"
3430 LEPDelegate="$LEPDelegateDefault"
3431 LPDelegate="$LPDelegateDefault"
3432 LaunchDelegate="$LaunchDelegateDefault"
3433 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3434 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3435 MogrifyDelegate="$MogrifyDelegateDefault"
3436 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3437 PCLDelegate="$PCLDelegateDefault"
3438 PSDelegate="$PSDelegateDefault"
3439 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3440 SVGDecodeDelegate="$SVGDecodeDelegateDefault"
3441 ShowImageDelegate="$ShowImageDelegateDefault"
3442 UniconvertorDelegate="$UniconvertorDelegateDefault"
3443 WebPDecodeDelegate="$WebPDecodeDelegateDefault"
3444 WebPEncodeDelegate="$WebPEncodeDelegateDefault"
3445 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3446 XPSDelegate="$XPSDelegateDefault"
3449 # Delegate substitutions
3450 AC_SUBST(BPGDecodeDelegate)
3451 AC_SUBST(BPGEncodeDelegate)
3452 AC_SUBST(BlenderDecodeDelegate)
3453 AC_SUBST(BrowseDelegate)
3454 AC_SUBST(ConvertDelegate)
3455 AC_SUBST(GVCDecodeDelegate)
3456 AC_SUBST(DVIDecodeDelegate)
3457 AC_SUBST(EditorDelegate)
3458 AC_SUBST(HPGLDecodeDelegate)
3459 AC_SUBST(HTMLDecodeDelegate)
3460 AC_SUBST(ILBMDecodeDelegate)
3461 AC_SUBST(ILBMEncodeDelegate)
3462 AC_SUBST(JXRDecodeDelegate)
3463 AC_SUBST(JXREncodeDelegate)
3464 AC_SUBST(LEPDelegate)
3465 AC_SUBST(LPDelegate)
3466 AC_SUBST(LaunchDelegate)
3467 AC_SUBST(MPEGDecodeDelegate)
3468 AC_SUBST(MPEGEncodeDelegate)
3469 AC_SUBST(MogrifyDelegate)
3470 AC_SUBST(MrSIDDecodeDelegate)
3471 AC_SUBST(PCLDelegate)
3472 AC_SUBST(PSDelegate)
3473 AC_SUBST(ShowImageDelegate)
3474 AC_SUBST(UniconvertorDelegate)
3475 AC_SUBST(WebPDecodeDelegate)
3476 AC_SUBST(WebPEncodeDelegate)
3477 AC_SUBST(WWWDecodeDelegate)
3478 AC_SUBST(XPSDelegate)
3484 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3485 AC_CHECK_PROGS(PERL,perl)
3486 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3487 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3488 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3489 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3490 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3492 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3495 # 7ZIP support (http://p7zip.sourceforge.net/)
3498 AC_CHECK_PROGS(P7ZIP,[7za])
3500 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3503 # ZIP support (http://www.info-zip.org/Zip.html)
3506 AC_CHECK_PROGS(ZIP,[zip])
3508 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3511 # GhostPCL related configuration.
3513 PCLColorDevice=ppmraw
3514 PCLCMYKDevice=pamcmyk32
3515 PCLMonoDevice=pbmraw
3516 if test -z "$PCLVersion"; then
3517 PCLVersion='unknown'
3519 if test $have_pcl = 'yes'; then
3520 AC_MSG_RESULT([-------------------------------------------------------------])
3521 AC_MSG_CHECKING([for PCL])
3524 AC_MSG_CHECKING([for pcl color device])
3525 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3528 PCLColorDevice=ppmraw
3530 AC_MSG_RESULT([$PCLColorDevice])
3533 AC_MSG_CHECKING([for pcl CMYK device])
3534 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3537 PCLCMYKDevice=$PCLColorDevice
3539 AC_MSG_RESULT([$PCLCMYKDevice])
3542 AC_MSG_CHECKING([for pcl mono device])
3543 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3546 PCLMonoDevice=$PCLColorDevice
3548 AC_MSG_RESULT([$PCLMonoDevice])
3551 AC_SUBST(PCLMonoDevice)
3552 AC_SUBST(PCLColorDevice)
3553 AC_SUBST(PCLCMYKDevice)
3554 AC_SUBST(PCLVersion)
3557 # GhostXPS related configuration.
3559 XPSColorDevice=ppmraw
3560 XPSCMYKDevice=bmpsep8
3561 XPSMonoDevice=pbmraw
3562 if test -z "$XPSVersion"; then
3563 XPSVersion='unknown'
3565 if test $have_xps = 'yes'; then
3566 AC_MSG_RESULT([-------------------------------------------------------------])
3567 AC_MSG_CHECKING([for XPS])
3570 AC_MSG_CHECKING([for xps color device])
3571 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3574 XPSColorDevice=ppmraw
3576 AC_MSG_RESULT([$XPSColorDevice])
3579 AC_MSG_CHECKING([for xps CMYK device])
3580 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3583 XPSCMYKDevice=$XPSColorDevice
3585 AC_MSG_RESULT([$XPSCMYKDevice])
3588 AC_MSG_CHECKING([for xps mono device])
3589 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3592 XPSMonoDevice=$XPSColorDevice
3594 AC_MSG_RESULT([$XPSMonoDevice])
3597 AC_SUBST(XPSMonoDevice)
3598 AC_SUBST(XPSColorDevice)
3599 AC_SUBST(XPSCMYKDevice)
3600 AC_SUBST(XPSVersion)
3603 # Ghostscript related configuration.
3605 GSAlphaDevice=pngalpha
3606 GSColorDevice=pnmraw
3607 GSCMYKDevice=pamcmyk32
3609 GSPDFDevice=pdfwrite
3611 GSEPSDevice=eps2write
3613 if test $have_gs = 'yes'; then
3614 AC_MSG_RESULT([-------------------------------------------------------------])
3615 AC_MSG_CHECKING([for Ghostscript])
3617 AC_MSG_CHECKING([for Ghostscript version])
3618 if GSVersion=`$PSDelegate --version`; then
3621 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3623 AC_MSG_RESULT([$GSVersion])
3626 AC_MSG_CHECKING([for gs color device])
3627 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3630 GSColorDevice=ppmraw
3632 AC_MSG_RESULT([$GSColorDevice])
3635 AC_MSG_CHECKING([for gs alpha device])
3636 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3639 GSAlphaDevice=$GSColorDevice
3641 AC_MSG_RESULT([$GSAlphaDevice])
3644 AC_MSG_CHECKING([for gs CMYK device])
3645 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3650 AC_MSG_RESULT([$GSCMYKDevice])
3653 AC_MSG_CHECKING([for gs mono device])
3654 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3657 GSMonoDevice=$GSColorDevice
3659 AC_MSG_RESULT([$GSMonoDevice])
3662 AC_MSG_CHECKING([for gs PDF writing device])
3663 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3666 GSPDFDevice=nodevice
3668 AC_MSG_RESULT([$GSPDFDevice])
3671 AC_MSG_CHECKING([for gs PS writing device])
3672 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3677 AC_MSG_RESULT([$GSPSDevice])
3680 AC_MSG_CHECKING([for gs EPS writing device])
3681 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3684 GSEPSDevice=epswrite
3686 AC_MSG_RESULT([$GSEPSDevice])
3689 AC_SUBST(GSAlphaDevice)
3690 AC_SUBST(GSCMYKDevice)
3691 AC_SUBST(GSColorDevice)
3692 AC_SUBST(GSEPSDevice)
3693 AC_SUBST(GSMonoDevice)
3694 AC_SUBST(GSPDFDevice)
3695 AC_SUBST(GSPSDevice)
3699 # PerlMagick-related configuration
3702 # Look for PERL if PerlMagick requested
3703 # If name/path of desired PERL interpreter is specified, look for that one first
3705 if test "$with_perl" != 'no'; then
3706 AC_MSG_RESULT([-------------------------------------------------------------])
3707 AC_MSG_CHECKING([for Perl])
3709 if test "$with_perl" != 'yes'; then
3710 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3711 PERL=$ac_cv_path_PERL
3713 have_perl="$ac_cv_path_PERL"
3715 AC_PATH_PROGS(PERL,perl perl5,)dnl
3716 if test "$ac_cv_path_PERL"; then
3717 have_perl="$ac_cv_path_PERL"
3722 if test "$with_perl" != 'yes' ; then
3723 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3726 PERL_SUPPORTS_DESTDIR='no'
3728 with_perl_static='no'
3729 with_perl_dynamic='no'
3730 if test "$have_perl" != 'no'; then
3731 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3732 with_perl_static='yes'
3734 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3735 with_perl_dynamic='yes'
3737 # Is PERL's MakeMaker new enough to support DESTDIR?
3738 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3740 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3741 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3742 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3743 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3745 # Determine path to pick up MagickCore library from for use with building PerlMagick
3746 MAGICKCORE_PATH="${LIB_DIR}"
3747 if test $with_perl_static = 'yes'; then
3748 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3749 libtool_objdir=$objdir
3751 # Linker search path to library, followed by -lMagickCore
3752 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3754 AC_SUBST(MAGICKCORE_PATH)
3756 # Create a simple string containing format names for all delegate libraries.
3758 if test "$have_autotrace" = 'yes' ; then
3759 MAGICK_DELEGATES="$MAGICK_DELEGATES autotrace"
3761 if test "$have_bzlib" = 'yes' ; then
3762 MAGICK_DELEGATES="$MAGICK_DELEGATES bzlib"
3764 if test "$have_dps" = 'yes' ; then
3765 MAGICK_DELEGATES="$MAGICK_DELEGATES dps"
3767 if test "$have_djvu" = 'yes' ; then
3768 MAGICK_DELEGATES="$MAGICK_DELEGATES djvu"
3770 if test "$have_avconv" = 'yes' ; then
3771 MAGICK_DELEGATES="$MAGICK_DELEGATES mpeg"
3773 if test "$have_fftw" = 'yes' ; then
3774 MAGICK_DELEGATES="$MAGICK_DELEGATES fftw"
3776 if test "$have_flif" = 'yes' ; then
3777 MAGICK_DELEGATES="$MAGICK_DELEGATES flif"
3779 if test "$have_fpx" = 'yes' ; then
3780 MAGICK_DELEGATES="$MAGICK_DELEGATES fpx"
3782 if test "$have_fontconfig" = 'yes' ; then
3783 MAGICK_DELEGATES="$MAGICK_DELEGATES fontconfig"
3785 if test "$have_freetype" = 'yes' ; then
3786 MAGICK_DELEGATES="$MAGICK_DELEGATES freetype"
3788 if test "$have_gslib" = 'yes' ; then
3789 MAGICK_DELEGATES="$MAGICK_DELEGATES gslib"
3791 if test "$have_heic" = 'yes' ; then
3792 MAGICK_DELEGATES="$MAGICK_DELEGATES heic"
3794 if test "$have_jbig" = 'yes' ; then
3795 MAGICK_DELEGATES="$MAGICK_DELEGATES jbig"
3797 if test "$have_png$have_jpeg" = 'yesyes' ; then
3798 MAGICK_DELEGATES="$MAGICK_DELEGATES jng"
3800 if test "$have_jpeg" = 'yes' ; then
3801 MAGICK_DELEGATES="$MAGICK_DELEGATES jpeg"
3803 if test "$have_lcms" = 'yes' || test "$have_lcms2" = 'yes' ; then
3804 MAGICK_DELEGATES="$MAGICK_DELEGATES lcms"
3806 if test "$have_lqr" = 'yes' ; then
3807 MAGICK_DELEGATES="$MAGICK_DELEGATES lqr"
3809 if test "$have_lzma" = 'yes' ; then
3810 MAGICK_DELEGATES="$MAGICK_DELEGATES lzma"
3812 if test "$have_openexr" = 'yes' ; then
3813 MAGICK_DELEGATES="$MAGICK_DELEGATES openexr"
3815 if test "$have_openjp2" = 'yes' ; then
3816 MAGICK_DELEGATES="$MAGICK_DELEGATES openjp2"
3818 if test "$have_pango" = 'yes' ; then
3819 MAGICK_DELEGATES="$MAGICK_DELEGATES pango"
3821 if test "$have_png" = 'yes' ; then
3822 MAGICK_DELEGATES="$MAGICK_DELEGATES png"
3825 if test "$have_dps" = 'yes' || \
3826 test "$have_gs" = 'yes' || \
3827 test "${native_win32_build}" = 'yes' ; then
3830 if test "$have_ps" = 'yes' ; then
3831 MAGICK_DELEGATES="$MAGICK_DELEGATES ps"
3833 if test "$have_raw" = 'yes' ; then
3834 MAGICK_DELEGATES="$MAGICK_DELEGATES raw"
3836 if test "$have_raqm" = 'yes' ; then
3837 MAGICK_DELEGATES="$MAGICK_DELEGATES raqm"
3839 if test "$have_ra_ppm" = 'yes' ; then
3840 MAGICK_DELEGATES="$MAGICK_DELEGATES rad"
3842 if test "$have_rsvg" = 'yes' ; then
3843 MAGICK_DELEGATES="$MAGICK_DELEGATES rsvg"
3845 if test "$have_tiff" = 'yes' ; then
3846 MAGICK_DELEGATES="$MAGICK_DELEGATES tiff"
3848 if test "$have_ttf" = 'yes' ; then
3849 MAGICK_DELEGATES="$MAGICK_DELEGATES ttf"
3851 if test "$have_webp" = 'yes' ; then
3852 MAGICK_DELEGATES="$MAGICK_DELEGATES webp"
3854 if test "$have_wmf" = 'yes' ; then
3855 MAGICK_DELEGATES="$MAGICK_DELEGATES wmf"
3857 if test "$have_x" = 'yes' ; then
3858 MAGICK_DELEGATES="$MAGICK_DELEGATES x"
3860 if test "$have_xml" = 'yes' ; then
3861 MAGICK_DELEGATES="$MAGICK_DELEGATES xml"
3863 if test "$have_zlib" = 'yes' ; then
3864 MAGICK_DELEGATES="$MAGICK_DELEGATES zlib"
3866 if test "$have_zstd" = 'yes' ; then
3867 MAGICK_DELEGATES="$MAGICK_DELEGATES zstd"
3870 # Remove extraneous spaces from output variables (asthetic)
3871 MAGICK_DELEGATES=`echo $MAGICK_DELEGATES | sed -e 's/ */ /g'`
3872 MAGICK_FEATURES=`echo $MAGICK_FEATURES | sed -e 's/ */ /g'`
3873 AC_SUBST(MAGICK_DELEGATES)
3874 AC_SUBST(MAGICK_FEATURES)
3877 # Handle special compiler flags
3880 # Add '-p' if prof source profiling support enabled
3881 if test "$enable_prof" = 'yes'; then
3883 CXXFLAGS="-p $CXXFLAGS"
3884 LDFLAGS="-p $LDFLAGS"
3887 # Add '-pg' if gprof source profiling support enabled
3888 if test "$enable_gprof" = 'yes'; then
3889 CFLAGS="-pg $CFLAGS"
3890 CXXFLAGS="-pg $CXXFLAGS"
3891 LDFLAGS="-pg $LDFLAGS"
3894 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3895 # This is a gcc-specific feature
3896 if test "$enable_gcov" = 'yes'; then
3897 AC_CHECK_LIB(gcov,_gcov_init)
3898 AC_CHECK_LIB(gcov,__gcov_init)
3899 case "$target_os" in
3901 OSX_GCOV_LDFLAG="-Wl,-single_module"
3907 AC_SUBST(OSX_GCOV_LDFLAG)
3908 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3909 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3910 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3914 # Build library dependency list for libMagickCore
3917 if test "$build_modules" != 'no'; then
3918 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"
3920 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"
3922 MAGICK_EXTRA_DEP_LIBS="$GOMP_LIBS"
3923 AC_SUBST(MAGICK_DEP_LIBS)
3924 AC_SUBST(MAGICK_EXTRA_DEP_LIBS)
3926 # Pass only user-provided LIBS as "global" libraries
3932 #AC_SUBST(X_PRE_LIBS)
3934 #AC_SUBST(X_EXTRA_LIBS)
3936 MAGICK_CFLAGS=$CFLAGS
3937 MAGICK_CXXFLAGS="$CXXFLAGS"
3938 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3939 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3940 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3941 MAGICK_LIBS="$MAGICK_DEP_LIBS $MAGICK_EXTRA_DEP_LIBS"
3943 AC_SUBST(MAGICK_CFLAGS)
3944 AC_SUBST(MAGICK_CXXFLAGS)
3945 AC_SUBST(MAGICK_CPPFLAGS)
3946 AC_SUBST(MAGICK_PCFLAGS)
3947 AC_SUBST(MAGICK_LDFLAGS)
3948 AC_SUBST(MAGICK_LIBS)
3950 # Set configured scripts to executable.
3951 AC_CONFIG_COMMANDS([default],[],[])
3952 AC_CONFIG_COMMANDS([magick.sh.in],[chmod +x magick.sh])
3953 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3954 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3955 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3956 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3958 AC_MSG_RESULT([-------------------------------------------------------------])
3959 AC_MSG_RESULT([Update ImageMagick configuration])
3961 rm -f magick-version
3963 result_dejavu_font_dir='none'
3964 if test "${dejavu_font_dir}x" != 'x'; then
3965 result_dejavu_font_dir=$dejavu_font_dir
3968 result_ghostscript_font_dir='none'
3969 if test "${ghostscript_font_dir}x" != 'x'; then
3970 result_ghostscript_font_dir=$ghostscript_font_dir
3973 result_urw_base35_font_dir='none'
3974 if test "${urw_base35_font_dir}x" != 'x'; then
3975 result_urw_base35_font_dir=$urw_base35_font_dir
3978 result_windows_font_dir='none'
3979 if test "${windows_font_dir}x" != 'x'; then
3980 result_windows_font_dir=${windows_font_dir}
3983 # ==============================================================================
3984 # Generate build environment
3985 # ==============================================================================
3988 config/configure.xml \
3989 config/delegates.xml \
3990 config/ImageMagick.rdf \
3991 config/MagickCore.dox \
3992 config/MagickWand.dox \
3993 config/Magick++.dox \
3994 config/type-apple.xml \
3995 config/type-dejavu.xml \
3996 config/type-ghostscript.xml \
3997 config/type-urw-base35.xml \
3998 config/type-windows.xml \
4001 Magick++/bin/Magick++-config \
4002 MagickCore/ImageMagick.pc \
4003 Magick++/lib/Magick++.pc \
4004 MagickCore/MagickCore-config \
4005 MagickCore/MagickCore.pc \
4006 MagickCore/version.h \
4009 PerlMagick/check.sh \
4010 PerlMagick/default/Magick.pm \
4011 PerlMagick/Makefile.PL \
4012 PerlMagick/default/Makefile.PL \
4013 PerlMagick/quantum/Makefile.PL \
4014 PerlMagick/quantum/quantum.pm \
4015 PerlMagick/quantum/quantum.xs \
4016 PerlMagick/quantum/typemap \
4017 utilities/animate.1 \
4018 utilities/compare.1 \
4019 utilities/composite.1 \
4020 utilities/conjure.1 \
4021 utilities/convert.1 \
4022 utilities/display.1 \
4023 utilities/identify.1 \
4024 utilities/ImageMagick.1 \
4025 utilities/import.1 \
4026 utilities/magick.1 \
4027 utilities/magick-script.1 \
4028 utilities/mogrify.1 \
4029 utilities/montage.1 \
4030 utilities/stream.1 \
4031 MagickWand/MagickWand-config \
4032 MagickWand/MagickWand.pc ])
4035 # ==============================================================================
4036 # ImageMagick Configuration
4037 # ==============================================================================
4039 ==============================================================================
4040 ImageMagick is configured as follows. Please verify that this configuration
4041 matches your expectations.
4043 Host system type: $host
4044 Build system type: $build
4047 ------------------------------------------------------------------------------
4048 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
4049 Static libraries --enable-static=$enable_static $libtool_build_static_libs
4050 Build utilities --with-utilities=$with_utilities $with_utilities
4051 Module support --with-modules=$build_modules $build_modules
4052 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
4053 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
4054 High Dynamic Range Imagery
4055 --enable-hdri=$enable_hdri $enable_hdri
4057 Install documentation: $wantdocs
4059 Delegate Library Configuration:
4060 BZLIB --with-bzlib=$with_bzlib $have_bzlib
4061 Autotrace --with-autotrace=$with_autotrace $have_autotrace
4062 DJVU --with-djvu=$with_djvu $have_djvu
4063 DPS --with-dps=$with_dps $have_dps
4064 FFTW --with-fftw=$with_fftw $have_fftw
4065 FLIF --with-flif=$with_flif $have_flif
4066 FlashPIX --with-fpx=$with_fpx $have_fpx
4067 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
4068 FreeType --with-freetype=$with_freetype $have_freetype
4069 Ghostscript lib --with-gslib=$with_gslib $have_gslib
4070 Graphviz --with-gvc=$with_gvc $have_gvc
4071 HEIC --with-heic=$with_heic $have_heic
4072 JBIG --with-jbig=$with_jbig $have_jbig
4073 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
4074 LCMS --with-lcms=$with_lcms $have_lcms
4075 LQR --with-lqr=$with_lqr $have_lqr
4076 LTDL --with-ltdl=$with_ltdl $have_ltdl
4077 LZMA --with-lzma=$with_lzma $have_lzma
4078 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
4079 OpenEXR --with-openexr=$with_openexr $have_openexr
4080 OpenJP2 --with-openjp2=$with_openjp2 $have_openjp2
4081 PANGO --with-pango=$with_pango $have_pango
4082 PERL --with-perl=$with_perl $have_perl
4083 PNG --with-png=$with_png $have_png
4084 RAQM --with-raqm=$with_raqm $have_raqm
4085 RAW --with-raw=$with_raw $have_raw
4086 RSVG --with-rsvg=$with_rsvg $have_rsvg
4087 TIFF --with-tiff=$with_tiff $have_tiff
4088 WEBP --with-webp=$with_webp $have_webp
4089 WMF --with-wmf=$with_wmf $have_wmf
4090 X11 --with-x=$with_x $have_x
4091 XML --with-xml=$with_xml $have_xml
4092 ZLIB --with-zlib=$with_zlib $have_zlib
4093 ZSTD --with-zstd=$with_zstd $have_zstd
4095 Delegate Program Configuration:
4096 GhostPCL None $PCLDelegate ($PCLVersion)
4097 GhostXPS None $XPSDelegate ($XPSVersion)
4098 Ghostscript None $PSDelegate ($GSVersion)
4101 Apple fonts --with-apple-font-dir=$with_apple_font_dir $result_apple_font_dir
4102 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
4103 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
4104 URW-base35 fonts --with-urw-base35-font-dir=$with_urw_base35_font_dir $result_urw_base35_font_dir
4105 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
4108 X_CFLAGS = $X_CFLAGS
4109 X_PRE_LIBS = $X_PRE_LIBS
4111 X_EXTRA_LIBS = $X_EXTRA_LIBS
4113 Options used to compile and link:
4114 PREFIX = $PREFIX_DIR
4115 EXEC-PREFIX = $EXEC_PREFIX_DIR
4116 VERSION = $PACKAGE_VERSION
4119 CPPFLAGS = $CPPFLAGS
4123 LIBS = $MAGICK_DEP_LIBS
4125 CXXFLAGS = $CXXFLAGS
4126 FEATURES = $MAGICK_FEATURES
4127 DELEGATES = $MAGICK_DELEGATES
4128 ==============================================================================