1 # Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
2 # dedicated to making software imaging solutions freely available.
4 # You may not use this file except in compliance with the License. You may
5 # obtain a copy of the License at
7 # http://www.imagemagick.org/script/license.php
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Copyright (C) 2003 - 2008 GraphicsMagick Group
19 m4_define([magick_major_version], [7])
20 m4_define([magick_minor_version], [0])
21 m4_define([magick_micro_version], [0])
22 m4_define([magick_patchlevel_version], [0])
23 m4_define([magick_version],
24 [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
25 m4_define([magick_svn_revision], esyscmd([sh -c "svnversion | sed -r 's/([0-9]+).*/\1/'"]))
27 AC_INIT([ImageMagick],[magick_version],[http://www.imagemagick.org],[ImageMagick])
28 AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
29 AC_CONFIG_AUX_DIR([config])
30 AC_CONFIG_MACRO_DIR([m4])
31 AC_CONFIG_LIBOBJ_DIR([ltdl])
32 AC_CONFIG_HEADERS([config/config.h])
33 AX_PREFIX_CONFIG_H([MagickCore/magick-config.h],[MagickCore])
35 config/configure.xml \
36 config/delegates.xml \
37 config/ImageMagick.rdf \
38 config/MagickCore.dox \
39 config/MagickWand.dox \
40 config/type-dejavu.xml \
41 config/type-ghostscript.xml \
42 config/type-windows.xml \
45 Magick++/bin/Magick++-config \
46 MagickCore/ImageMagick.pc \
47 Magick++/lib/ImageMagick++.pc \
48 Magick++/lib/Magick++.pc \
49 MagickCore/MagickCore-config \
50 MagickCore/MagickCore.pc \
51 MagickCore/version.h \
54 PerlMagick/Magick.pm \
55 PerlMagick/Makefile.PL \
59 utilities/composite.1 \
63 utilities/identify.1 \
64 utilities/ImageMagick.1 \
69 MagickWand/MagickWand-config \
70 MagickWand/MagickWand.pc ])
73 # Save initial user-tunable values
76 for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
77 eval isset=\${$var+set}
78 if test "$isset" = 'set'; then
80 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
83 AC_SUBST(DISTCHECK_CONFIG_FLAGS)
85 CONFIGURE_ARGS="$0 ${ac_configure_args}"
86 AC_SUBST(CONFIGURE_ARGS)
88 # Source file containing package/library versioning information.
89 . ${srcdir}/version.sh
91 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
96 MAGICK_TARGET_CPU=$host_cpu
97 AC_SUBST(MAGICK_TARGET_CPU)
99 MAGICK_TARGET_VENDOR=$host_vendor
100 AC_SUBST(MAGICK_TARGET_VENDOR)
102 MAGICK_TARGET_OS=$host_os
103 AC_SUBST(MAGICK_TARGET_OS)
105 # Substitute library versioning
106 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
107 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
108 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
109 AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
110 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
111 AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
112 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
113 AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision])
115 AC_SUBST(PACKAGE_NAME)dnl
116 AC_SUBST(PACKAGE_VERSION)dnl
117 AC_SUBST(PACKAGE_PERL_VERSION)dnl
118 AC_SUBST(PACKAGE_RELEASE)dnl
119 AC_SUBST(PACKAGE_CHANGE_DATE)dnl
120 AC_SUBST(PACKAGE_LIB_VERSION)dnl
121 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
122 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
123 AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
125 # Ensure that make can run correctly
128 AM_INIT_AUTOMAKE([1.11 color-tests foreign parallel-tests silent-rules subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip])
130 # Enable support for silent build rules
131 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
133 MAGICK_LIB_VERSION="0x"
134 if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
135 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
137 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
138 if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
139 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
141 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
142 if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
143 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
145 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
146 AC_SUBST(MAGICK_LIB_VERSION)
148 # Definition used to define MagickLibVersionText in version.h
149 MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
150 AC_SUBST(MAGICK_LIB_VERSION_TEXT)
152 # Definition used to define MagickLibVersionNumber in version.h
153 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
154 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
156 # Regenerate config.status if ChangeLog or version.sh is updated.
157 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
162 MAGICK_CPPFLAGS=$CPPFLAGS_USER
163 MAGICK_PCFLAGS=$CPPFLAGS_USER
169 # Evaluate shell variable equivalents to Makefile directory variables
171 if test "x$prefix" = xNONE; then
172 prefix=$ac_default_prefix
174 # Let make expand exec_prefix.
175 if test "x$exec_prefix" = xNONE; then
176 exec_prefix='${prefix}'
180 eval "eval PREFIX_DIR=${prefix}"
182 eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
183 AC_SUBST(EXEC_PREFIX_DIR)
184 eval "eval BIN_DIR=$bindir"
186 eval "eval SBIN_DIR=$sbindir"
188 eval "eval LIBEXEC_DIR=$libexecdir"
189 AC_SUBST(LIBEXEC_DIR)
190 eval "eval DATA_DIR=$datadir"
192 eval "eval DOC_DIR=$docdir"
194 eval "eval SYSCONF_DIR=$sysconfdir"
195 AC_SUBST(SYSCONF_DIR)
196 eval "eval SHAREDSTATE_DIR=$sharedstatedir"
197 AC_SUBST(SHAREDSTATE_DIR)
198 eval "eval LOCALSTATE_DIR=$localstatedir"
199 AC_SUBST(LOCALSTATE_DIR)
200 eval "eval LIB_DIR=$libdir"
202 eval "eval INCLUDE_DIR=$includedir"
203 AC_SUBST(INCLUDE_DIR)
204 eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
205 AC_SUBST(PERSISTINCLUDE_DIR)
206 eval "eval INFO_DIR=$infodir"
208 eval "eval MAN_DIR=$mandir"
211 # Get full paths to source and build directories
212 srcdirfull="`cd $srcdir && pwd`"
216 # Compute variables useful for running uninstalled software.
218 MAGICK_CODER_MODULE_PATH="${builddir}/coders"
219 MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
220 MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
221 MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
223 case "${build_os}" in
225 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
226 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
227 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
228 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
237 AC_SUBST(MAGICK_CODER_MODULE_PATH)
238 AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
239 AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
240 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
245 # Enable OS features.
247 AC_USE_SYSTEM_EXTENSIONS
267 # Enable run-time checking.
269 AC_ARG_ENABLE([bounds-checking],
270 [AC_HELP_STRING([--bounds-checking],
271 [enable run-time bounds-checking])],
272 [enable_bounds_checking=$enableval],
273 [enable_bounds_checking='no'])
275 if test "$enable_bounds_checking" = yes; then
276 AC_DEFINE([_FORTIFY_SOURCE], [2],
277 [enable run-time bounds-checking])
288 native_win32_build='no'
296 native_win32_build='yes'
300 if test "${GDI32_LIBS}x" != 'x'; then
301 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
304 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
305 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
306 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
307 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
309 WinPathScript="${srcdirfull}/winpath.sh"
310 AC_SUBST(WinPathScript)
313 # Compiler flags tweaks
315 if test "${GCC}" != "yes"; then
318 # aCC: HP ANSI C++ B3910B A.03.34
319 CFLAGS="${CFLAGS} -Wp,-H30000"
320 if test -n "${CXXFLAGS}"; then
323 CXXFLAGS="${CXXFLAGS} -AA"
327 # Compaq alphaev68-dec-osf5.1 compiler
328 if test -n "${CXXFLAGS}"; then
329 CXXFLAGS='-std strict_ansi -noimplicit_include'
331 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
336 # Check for lazy-loading.
337 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
339 im_cv_ld_lazyload='none'
341 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
342 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
343 im_cv_ld_lazyload='-Wl,-zlazyload'
348 if test "${im_cv_ld_lazyload}" != 'none' ; then
349 if test -z "${LDFLAGS}" ; then
350 LDFLAGS="${im_cv_ld_lazyload}"
352 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
356 dnl Platform-specific stuff
358 *darwin* | *-macos10*)
359 dnl OS X universal binary support, requires --disable-dependency-tracking
360 AC_ARG_ENABLE([osx-universal-binary],
361 AC_HELP_STRING([--enable-osx-universal-binary],
362 [build universal binary on OS X [[default=no]]]),
363 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
365 if test "${build_osxuniversal}" != no ; then
366 if test "$enable_dependency_tracking" != no ; then
367 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
368 Please re-run configure with these options:
369 --disable-dependency-tracking --enable-osx-universal-binary
372 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
373 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
374 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
380 # ARCH specific include directory
382 AC_ARG_WITH([includearch-dir],
383 [AC_HELP_STRING([--includearch-dir=DIR],
384 [ARCH specific include directory])],
385 [includearch_dir=$withval],
386 [includearch_dir=$INCLUDE_DIR])
388 eval "eval INCLUDEARCH_DIR=$includearch_dir"
389 AC_SUBST(INCLUDEARCH_DIR)
392 # ARCH specific configuration directory
394 AC_ARG_WITH([sharearch-dir],
395 [AC_HELP_STRING([--sharearch-dir=DIR],
396 [ARCH specific config directory])],
397 [sharearch_dir=$withval],
398 [sharearch_dir="${LIB_DIR}"])
400 eval "eval SHAREARCH_DIR=$sharearch_dir"
401 SHAREARCH_DIR="$sharearch_dir"
402 AC_SUBST(SHAREARCH_DIR)
405 # Enable support for threads
406 AC_ARG_WITH([threads],
407 [AC_HELP_STRING([--without-threads], [disable threads support])],
408 [with_threads=$withval],
409 [with_threads='yes'])
412 if test "$with_threads" != 'no'; then
414 if test "$ax_pthread_ok" = yes; then
416 DEF_THREAD="$PTHREAD_CFLAGS"
417 CFLAGS="$CFLAGS $DEF_THREAD"
418 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
419 if test "$CC" != "$PTHREAD_CC"; then
420 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
423 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
427 # Enable support for OpenMP
428 if test "$have_threads" != 'yes'; then
429 ac_cv_prog_c_openmp=unsupported
432 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
433 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
434 AC_SUBST(OPENMP_CFLAGS)
435 if test "$enable_openmp" != no; then
436 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
437 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
441 # Enable support for OpenCL
443 CFLAGS="$CL_CFLAGS $CFLAGS"
444 LIBS="$CL_LIBS $LIBS"
446 if test "$enable_opencl" != no; then
447 if test "X$ax_cv_check_cl_libcl" != Xno; then :
448 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
454 # Check for large file support
460 if test "$enable_largefile" != no; then
461 case $ac_cv_sys_file_offset_bits in
463 # nothing to do here as the host supports LFS fine
466 AC_MSG_CHECKING([for native large file support])
467 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
469 exit(!(sizeof(off_t) == 8));
471 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
472 AC_MSG_NOTICE([yes])],
473 [AC_MSG_NOTICE([no])])
476 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
479 if test "$ac_cv_sys_large_files" != 'no'; then
480 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
482 if test "$ac_cv_sys_largefile_source" != 'no'; then
483 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
486 AC_SUBST(LFS_CPPFLAGS)
492 AC_SUBST(LIBTOOL_DEPS)
495 LT_CONFIG_LTDL_DIR([ltdl])
496 LTDL_INIT([convenience nonrecursive])
498 # Check to see if building shared libraries
499 libtool_build_shared_libs='no'
500 if test "$enable_shared" = 'yes'; then
501 libtool_build_shared_libs='yes'
504 # Check to see if building static libraries
505 libtool_build_static_libs='no'
506 if test "$enable_static" = 'yes'; then
507 libtool_build_static_libs='yes'
510 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
512 # Enable support for building loadable modules
514 AC_ARG_WITH([modules],
515 [AC_HELP_STRING([--with-modules],
516 [enable building dynamically loadable modules])],
517 [with_modules=$withval],
520 # Only allow building loadable modules if we are building shared libraries
521 if test "$with_modules" != 'no' ; then
522 if test "$libtool_build_shared_libs" = 'no'; then
523 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
527 if test "$with_modules" != 'no'; then
528 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
530 AM_CONDITIONAL(WITH_MODULES, test "$with_modules" != 'no')
532 # Enable building/use of libltdl if we are building shared libraries regardless
533 # of whether modules are built or not.
535 if test "$libtool_build_shared_libs" != 'no'; then
539 AM_CONDITIONAL(WITH_LTDL, test "$with_ltdl" != 'no')
540 if test "$with_ltdl" != 'no'; then
541 AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules)
544 if test X"$enable_shared" = Xyes; then
545 DLLDFLAGS=-export-dynamic
550 # Enable build using delegate libraries built in subdirectories rather than installed
551 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
552 AC_ARG_ENABLE([delegate-build],
553 [AC_HELP_STRING([--enable-delegate-build],
554 [look for delegate libraries in build directory])],
555 [enable_delegate_build=$enableval],
556 [enable_delegate_build='no'])
558 AC_ARG_ENABLE([deprecated],
559 [AC_HELP_STRING([--disable-deprecated],
560 [exclude deprecated methods in MagickCore and MagickWand API's])],
561 [enable_deprecated=$enableval],
562 [enable_deprecated='no'])
564 if test "$enable_deprecated" = 'yes'; then
565 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
567 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
570 # Build a version of ImageMagick which operates uninstalled.
571 # Used to build distributions located via MAGICK_HOME / executable path
572 AC_ARG_ENABLE([installed],
573 [AC_HELP_STRING([--disable-installed],
574 [Formally install ImageMagick under PREFIX])],
575 [enable_installed=$enableval],
576 [enable_installed='yes'])
578 if test "$enable_installed" = 'yes'; then
579 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
581 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
584 # Permit enciphering and deciphering image pixels.
585 AC_ARG_ENABLE([cipher],
586 [AC_HELP_STRING([--disable-cipher],
587 [disable enciphering and deciphering image pixels])],
588 [enable_cipher=$enableval],
589 [enable_cipher='yes'])
591 if test "$enable_cipher" = 'yes'; then
592 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
595 # Build a zero-configuration version of ImageMagick.
596 AC_ARG_ENABLE([zero-configuration],
597 [AC_HELP_STRING([--enable-zero-configuration],
598 [enable self-contained, embeddable, zero-configuration ImageMagick])],
599 [enable_zero_configuration=$enableval],
600 [enable_zero_configuration='no'])
602 if test "$enable_zero_configuration" = 'yes'; then
603 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
604 MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES"
607 # Build a high dynamic range version of ImageMagick.
608 AC_ARG_ENABLE([hdri],
609 [AC_HELP_STRING([--enable-hdri],
610 [accurately represent the wide range of intensity levels found in real scenes])],
611 [enable_hdri=$enableval],
615 if test "$enable_hdri" = 'yes'; then
617 AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
618 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
620 AC_SUBST(MAGICK_HDRI)dnl
622 # Build a version of ImageMagick with assert statements.
623 AC_ARG_ENABLE([assert],
624 [AC_HELP_STRING([--disable-assert],
625 [disable assert() statements in build])],
626 [enable_assert=$enableval],
627 [enable_assert='yes'])
629 if test "$enable_assert" = 'no'; then
630 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
633 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
636 # Enable ccmalloc memory debugging support
637 AC_ARG_ENABLE([ccmalloc],
638 [AC_HELP_STRING([--enable-ccmalloc],
639 [enable 'ccmalloc' memory debug support])],
640 [enable_ccmalloc=$enableval],
641 [enable_ccmalloc='no'])
643 # Enable Electric Fence memory debugging support
644 AC_ARG_ENABLE([efence],
645 [AC_HELP_STRING([--enable-efence],
646 [enable 'efence' memory debug support])],
647 [enable_efence=$enableval],
648 [enable_efence='no'])
650 # Enable prof-based profiling support
651 AC_ARG_ENABLE([prof],
652 [AC_HELP_STRING([--enable-prof],
653 [enable 'prof' profiling support])],
654 [enable_prof=$enableval],
657 # Enable gprof-based profiling support
658 AC_ARG_ENABLE([gprof],
659 [AC_HELP_STRING([--enable-gprof],
660 [enable 'gprof' profiling support])],
661 [enable_gprof=$enableval],
664 # Enable gcov-based profiling support
665 AC_ARG_ENABLE([gcov],
666 [AC_HELP_STRING([--enable-gcov],
667 [enable 'gcov' profiling support])],
668 [enable_gcov=$enableval],
671 enable_profiling='no'
672 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
673 enable_profiling='yes'
674 if test "$libtool_build_shared_libs" = 'yes'; then
675 echo "Warning: Can not profile code using shared libraries"
679 # Magick API method prefix
680 AC_ARG_WITH([method-prefix],
681 [AC_HELP_STRING([--with-method-prefix=PREFIX],
682 [prefix MagickCore API methods])],
683 [with_method_prefix=$withval],
684 [with_method_prefix='no'])
686 if test "$with_method_prefix" != 'no'; then
687 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
688 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
691 # Number of bits in a Quantum
692 AC_ARG_WITH([quantum-depth],
693 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
694 [number of bits in a pixel quantum (default 16)])],
695 [with_quantum_depth=$withval],
696 [with_quantum_depth=16])
698 if test "$with_quantum_depth" != '8'; then
699 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
702 case "${with_quantum_depth}" in
707 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
709 QUANTUM_DEPTH="$with_quantum_depth"
710 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
711 AC_SUBST(QUANTUM_DEPTH)dnl
713 # Set pixel cache threshold
715 [AC_HELP_STRING([--with-cache=THRESHOLD],
716 [set pixel cache threshhold in MB (default available memory)])],
717 [with_cache=$withval],
720 if test "$with_cache" != ''; then
721 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
722 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
725 # Disable/Enable support for full delegate paths
726 AC_ARG_WITH([frozenpaths],
727 [AC_HELP_STRING([--with-frozenpaths],
728 [freeze delegate paths])],
729 [with_frozenpaths=$withval],
730 [with_frozenpaths='no'])
732 # Enable build/install of Magick++
733 AC_ARG_WITH([magick-plus-plus],
734 [AC_HELP_STRING([--without-magick-plus-plus],
735 [disable build/install of Magick++])],
736 [with_magick_plus_plus=$withval],
737 [with_magick_plus_plus='yes'])
739 # Disable build/install of PerlMagick.
741 [AC_HELP_STRING([--with-perl],
742 [enable build/install of PerlMagick])],
743 [with_perl=$withval],
746 # Options to pass when configuring PerlMagick
747 AC_ARG_WITH([perl-options],
748 [AC_HELP_STRING([--with-perl-options=OPTIONS],
749 [options to pass on command-line when generating PerlMagick build file])],
750 PERL_MAKE_OPTIONS=$withval)
751 AC_SUBST(PERL_MAKE_OPTIONS)
753 # Enable umem, object-caching memory allocation library.
755 [ --with-umem enable umem memory allocation library support],
756 [with_umem=$withval],
758 if test "$with_umem" != 'yes' ; then
759 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
763 # Specify path to shared libstdc++ if not in normal location
765 AC_ARG_WITH([libstdc],
766 [AC_HELP_STRING([--with-libstdc=DIR],
767 [ use libstdc++ in DIR (for GNU C++)])],
768 [with_libstdc=$withval],
771 if test "$with_libstdc" != ''; then
772 if test -d "$with_libstdc"; then
773 LIBSTDCLDFLAGS="-L$with_libstdc"
776 AC_SUBST(LIBSTDCLDFLAGS)
778 # Does gcc required -traditional?
779 AC_PROG_GCC_TRADITIONAL
783 # Set defines required to build DLLs and modules using MinGW
786 # These options are set for multi-thread DLL module build
787 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
789 # executable/Magick++: _DLL _MAGICKMOD_
790 MODULE_EXTRA_CPPFLAGS=''
791 LIBRARY_EXTRA_CPPFLAGS=''
792 if test "${native_win32_build}" = 'yes'; then
793 if test "${libtool_build_shared_libs}" = 'yes'; then
794 CPPFLAGS="$CPPFLAGS -D_DLL"
795 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
796 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
797 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
798 if test "$with_modules" = 'yes'; then
799 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
801 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
804 CPPFLAGS="$CPPFLAGS -D_LIB"
805 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
806 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
808 if test "$with_threads" = 'yes'; then
809 CPPFLAGS="$CPPFLAGS -D_MT"
810 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
811 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
814 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
815 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
817 # Check standard headers
819 if ! test x"$ac_cv_header_stdc" = x"yes"; then
820 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
821 header files. Compilation cannot proceed. Please install the ANSI C
822 headers and rerun this script.]);
827 # Check additional headers
828 AC_CHECK_HEADERS(arm/limits.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h OS.h process.h stdarg.h sys/ipc.h sys/resource.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h xlocale.h)
832 # Checks for typedefs, structures, and compiler characteristics.
845 # If the C compiler supports the keyword inline, do nothing. Otherwise
846 # define inline to __inline__ or __inline if it accepts one of those,
847 # otherwise define inline to be empty.
850 # If the C compiler supports the keyword restrict, do nothing. Otherwise
851 # define restrict to __restrict__ or __restrict if it accepts one of those,
852 # otherwise define restrict to be empty.
855 # If words are stored with the most significant byte first (like
856 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
859 # Define to a suitable type, if standard headers do not define it.
867 AC_TYPE_LONG_DOUBLE_WIDER
868 AC_TYPE_LONG_LONG_INT
882 AC_TYPE_UNSIGNED_LONG_LONG_INT
884 # If the C type char is unsigned, define __CHAR_UNSIGNED__, unless the
885 # C compiler predefines it.
888 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
889 AC_CHECK_SIZEOF(signed short)
891 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
892 AC_CHECK_SIZEOF(unsigned short)
894 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
895 AC_CHECK_SIZEOF(signed int)
897 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
898 AC_CHECK_SIZEOF(unsigned int)
900 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
901 AC_CHECK_SIZEOF(signed long)
903 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
904 AC_CHECK_SIZEOF(unsigned long)
906 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
907 # 'signed long long' is not supported then the value defined is zero.
908 AC_CHECK_SIZEOF(signed long long)
910 # Obtain size of a 'unsigned long long' and define as
911 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
912 # supported then the value defined is zero.
913 AC_CHECK_SIZEOF(unsigned long long)
915 # Obtain size of off_t and define as SIZEOF_OFF_T
916 AC_CHECK_SIZEOF(off_t)
918 # Obtain size of size_t and define as SIZEOF_SIZE_T
919 AC_CHECK_SIZEOF(size_t)
921 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
922 AC_CHECK_SIZEOF(ssize_t)
924 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
925 AC_CHECK_SIZEOF(unsigned int*)
928 # Compute sized types for current CPU and compiler options.
931 AC_MSG_CHECKING(for signed 8-bit type)
933 AC_MSG_NOTICE($INT8_T)
936 AC_MSG_CHECKING(for unsigned 8-bit type)
937 UINT8_T='unsigned char'
938 AC_MSG_NOTICE($UINT8_T)
941 AC_MSG_CHECKING(for signed 16-bit type)
942 INT16_T='signed short'
943 AC_MSG_NOTICE($INT16_T)
946 AC_MSG_CHECKING(for unsigned 16-bit type)
947 UINT16_T='unsigned short'
948 AC_MSG_NOTICE($UINT16_T)
951 AC_MSG_CHECKING(for signed 32-bit type)
954 if test $ac_cv_sizeof_signed_int -eq 4; then
957 elif test $ac_cv_sizeof_signed_long -eq 4; then
958 INT32_T='signed long'
961 AC_MSG_NOTICE($INT32_T)
965 AC_MSG_CHECKING(for unsigned 32-bit type)
968 if test $ac_cv_sizeof_unsigned_int -eq 4; then
969 UINT32_T='unsigned int'
971 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
972 UINT32_T='unsigned long'
975 AC_MSG_NOTICE($UINT32_T)
979 AC_MSG_CHECKING(for signed 64-bit type)
982 if test $ac_cv_sizeof_signed_long -eq 8; then
983 INT64_T='signed long'
985 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
986 INT64_T='signed long long'
994 AC_MSG_NOTICE($INT64_T)
998 AC_MSG_CHECKING(for unsigned 64-bit type)
1001 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1002 UINT64_T='unsigned long'
1004 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1005 UINT64_T='unsigned long long'
1008 case "${host_os}" in
1013 AC_MSG_NOTICE($UINT64_T)
1017 AC_MSG_CHECKING(for unsigned maximum type)
1020 if test "$UINT64_T" != 'none'; then
1023 elif test "$UINT32_T" != 'none'; then
1027 AC_MSG_NOTICE($UINTMAX_T)
1031 AC_MSG_CHECKING(for pointer difference type)
1034 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1035 UINTPTR_T='unsigned long'
1037 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1038 UINTPTR_T='unsigned long long'
1041 AC_MSG_NOTICE($UINTPTR_T)
1045 AC_MSG_CHECKING([whether our compiler supports __func__])
1047 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1048 AC_MSG_NOTICE([yes]),
1050 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1052 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1053 AC_MSG_NOTICE([yes])
1054 AC_DEFINE(__func__, __FUNCTION__,
1055 [Define to appropriate substitue if compiler does not have __func__]),
1057 AC_DEFINE(__func__, __FILE__,
1058 [Define to appropriate substitue if compiler does not have __func__])))
1062 # Check for functions
1065 MAGICK_FUNC_MMAP_FILEIO
1066 AC_FUNC_CLOSEDIR_VOID
1070 AC_FUNC_SELECT_ARGTYPES
1071 AC_FUNC_SETVBUF_REVERSED
1081 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1082 LIBS="$MATH_LIBS $LIBS"
1085 AC_CHECK_FUNCS([acosh asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale 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])
1088 # Check for clock_gettime().
1090 AC_SEARCH_LIBS(clock_gettime, rt,
1092 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1093 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1096 [[#include <time.h>]],
1097 [[clockid_t clockType = CLOCK_REALTIME;]])],
1100 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1101 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1107 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1113 # Check for function prototypes
1117 AC_CHECK_DECLS([pread, pwrite],[],[],[
1118 #include <unistd.h>])
1120 AC_CHECK_DECLS([strlcpy],[],[],[
1121 #include <strings.h>])
1123 AC_CHECK_DECLS([vsnprintf],[],[],[
1125 #include <stdarg.h>])
1129 # C++ Support Tests (For Magick++)
1132 have_magick_plus_plus='no'
1133 if test "$with_magick_plus_plus" = 'yes'; then
1138 # Full set of headers used...
1139 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1140 # functional iomanip iosfwd iostream iterator list string strstream utility
1145 AX_CXX_NAMESPACE_STD
1146 AC_CXX_HAVE_STD_LIBS
1150 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1152 test $ax_cv_cxx_bool = 'yes' && \
1153 test $ax_cv_cxx_namespaces = 'yes' && \
1154 test $ac_cv_cxx_have_std_libs = 'yes' && \
1155 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1156 have_magick_plus_plus='yes'
1158 have_magick_plus_plus='no (failed tests)'
1160 AC_MSG_NOTICE([$have_magick_plus_plus])
1163 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1165 # Only check for delegate libraries in subdirectories if requested.
1166 if test "$enable_delegate_build" != 'no'; then
1167 # Check for delegate sub-directories and add -I & -L options as required.
1168 # This presumes that delegates are installed as detailed in the ImageMagick
1169 # README. If delegates are installed in a standard location where the
1170 # compiler will automatically find them then these options should not be
1174 # Most delegates have includes in the same directory as the library, but not all...
1177 for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper/include jbig/libjbig jpeg lcms/include lzma magick png tiff/libtiff ttf/include wand webp wmf/include xml/include zlib; do
1178 if test -d "$builddir/$dir"; then
1179 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1181 if test -d "$srcdirfull/$dir"; then
1182 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1188 for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src lzma magick png tiff/libtiff ttf/objs wand webp wmf/src xml zlib; do
1189 if test -d "$builddir/$dir/.libs"; then
1190 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1192 if test -d "$srcdirfull/$dir/.libs"; then
1193 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1196 if test -d "$builddir/$dir"; then
1197 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1199 if test -d "$srcdirfull/$dir"; then
1200 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1206 # Assume that delegate headers reside under same directory as ImageMagick
1207 # installation prefix.
1208 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/ImageMagick $MAGICK_CPPFLAGS"
1211 # Find the X11 RGB database
1213 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1214 [# Look for the header file in a standard set of common directories.
1215 # Check X11 before X11Rn because it is often a symlink to the current release.
1224 /usr/XFree86/lib/X11 \
1232 /usr/local/X11/lib \
1233 /usr/local/X11R4/lib \
1234 /usr/local/X11R5/lib \
1235 /usr/local/X11R6/lib \
1237 /usr/local/lib/X11 \
1238 /usr/local/lib/X11R4 \
1239 /usr/local/lib/X11R5 \
1240 /usr/local/lib/X11R6 \
1241 /usr/local/lib/X11R7 \
1242 /usr/local/x11r5/lib \
1243 /usr/lpp/Xamples/lib \
1245 /usr/openwin/share/lib \
1246 /usr/unsupported/lib \
1249 if test -f "$ac_dir/X11/rgb.txt"; then
1250 im_cv_x_configure="$ac_dir/X11/"
1252 elif test -f "$ac_dir/rgb.txt"; then
1253 im_cv_x_configure="$ac_dir/"
1258 X11_CONFIGURE_PATH="$im_cv_x_configure"
1259 case "${build_os}" in
1261 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1264 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",Location of X11 configure files)
1267 # Find OpenMP library
1270 if test "$enable_openmp" != 'no'; then
1271 if test "${GCC}" = "yes"; then
1272 # Open64 (passes for GCC but uses different OpenMP implementation)
1273 if test "x$GOMP_LIBS" = x ; then
1274 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1275 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1279 if test "x$GOMP_LIBS" = x ; then
1280 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1284 if test "x$GOMP_LIBS" = x ; then
1285 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1288 if test "x$GOMP_LIBS" = x ; then
1289 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1291 # SGI IRIX 6.5 MIPSpro C/C++
1292 if test "x$GOMP_LIBS" = x ; then
1293 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1296 LIBS="$GOMP_LIBS $LIBS"
1301 # Find Posix threads library
1304 if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then
1306 if test "x$PTHREAD_LIBS" = "x"; then
1307 case "${host_cpu}-${host_os}" in
1309 MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;;
1313 for lib in pthread pthreads; do
1314 if test "x$PTHREAD_LIBS" = "x"; then
1315 MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib])
1319 THREAD_LIBS="$PTHREAD_LIBS"
1320 LIBS="$LIBS $THREAD_LIBS"
1322 AC_SUBST(THREAD_LIBS)
1329 if test "$with_umem" != 'no'; then
1330 AC_MSG_CHECKING(for UMEM support )
1334 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1335 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1336 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1337 AC_MSG_CHECKING(if umem memory allocation library is complete)
1338 if test $passed -gt 0; then
1339 if test $failed -gt 0; then
1340 AC_MSG_NOTICE(no -- some components failed test)
1341 have_umem='no (failed tests)'
1344 LIBS="$UMEM_LIBS $LIBS"
1345 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1353 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1357 # Add support for ccmalloc memory debugging library if requested
1361 if test "$enable_ccmalloc" = 'yes'; then
1362 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1363 if test -n "$CCMALLOCDelegate"; then
1364 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1366 # Assume that gcc is used with ccmalloc.
1367 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1368 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1369 if test -n "$CCMALLOC_LIBS"; then
1371 LIBS="$LIBS $CCMALLOC_LIBS"
1380 # Add support for efence memory debugging library if requested
1382 if test "$enable_efence" = 'yes'; then
1383 EFENCE_LIBS='-lefence'
1384 LIBS="$EFENCE_LIBS $LIBS"
1387 dnl ===========================================================================
1393 AC_ARG_WITH([bzlib],
1394 [AC_HELP_STRING([--without-bzlib],
1395 [disable BZLIB support])],
1396 [with_bzlib=$withval],
1399 if test "$with_bzlib" != 'yes'; then
1400 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1404 if test "$with_bzlib" != 'no'; then
1406 AC_MSG_NOTICE([-------------------------------------------------------------])
1407 AC_MSG_CHECKING([for BZLIB])
1412 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1413 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1414 if test "$native_win32_build" = 'yes'; then
1415 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1417 if test $found_libbz -gt 0; then
1418 passed=`expr $passed + 1`
1420 failed=`expr $failed + 1`
1422 AC_MSG_CHECKING(if BZLIB package is complete)
1423 if test $passed -gt 0; then
1424 if test $failed -gt 0; then
1425 AC_MSG_NOTICE(no -- some components failed test)
1426 have_bzlib='no (failed tests)'
1429 LIBS="$BZLIB_LIBS $LIBS"
1430 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1438 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1439 AC_SUBST(BZLIB_LIBS)
1442 # Find the X11 include and library directories.
1449 if test "$no_x" != 'yes'; then
1450 AC_MSG_NOTICE([-------------------------------------------------------------])
1451 AC_MSG_CHECKING([for X11])
1453 LDFLAGS="$LDFLAGS $X_LIBS"
1454 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1455 LIBS="$X11_LIBS $LIBS"
1456 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1458 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1461 # Check for X11 shared memory extension
1463 # shmctl is required to support the shared memory extension
1464 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1465 if test "$have_shmctl" != 'yes'; then
1467 LIBS="$LIBS -lcygipc"
1468 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1472 if test "$have_shmctl" = 'yes'; then
1473 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1477 # Check for X11 shape extension
1479 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1480 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1481 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1483 if test "$no_x" != 'yes'; then
1488 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1492 dnl ===========================================================================
1498 [AC_HELP_STRING([--without-zlib],
1499 [disable ZLIB support])],
1500 [with_zlib=$withval],
1503 if test "$with_zlib" != 'yes'; then
1504 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1509 dnl PNG requires zlib so enable zlib check if PNG is requested
1510 if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
1511 AC_MSG_NOTICE([-------------------------------------------------------------])
1512 AC_MSG_CHECKING([for ZLIB])
1517 AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1518 AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1519 AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1520 AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1521 AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1522 AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1523 AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1524 AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1525 AC_MSG_CHECKING([if ZLIB package is complete])
1526 if test $passed -gt 0; then
1527 if test $failed -gt 0; then
1528 AC_MSG_NOTICE([no -- some components failed test])
1529 have_zlib='no (failed tests)'
1532 LIBS="$ZLIB_LIBS $LIBS"
1533 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
1534 AC_MSG_NOTICE([yes])
1541 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1545 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1548 if test "$enable_profiling" = 'yes'; then
1549 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1550 LIBS="$LIB_DL $LIBS"
1554 dnl ===========================================================================
1557 # Check for Autotrace delegate library.
1559 AC_ARG_WITH([autotrace],
1560 [AC_HELP_STRING([--with-autotrace],
1561 [enable autotrace support])],
1562 [with_autotrace=$withval],
1563 [with_autotrace='no'])
1565 if test "$with_autotrace" != 'yes'; then
1566 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1573 if test "x$with_autotrace" = "xyes"; then
1574 AC_MSG_NOTICE([-------------------------------------------------------------])
1575 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1579 if test "$have_autotrace" = 'yes'; then
1581 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1582 if test "$with_modules" = 'no'; then
1583 CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
1587 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1588 AC_SUBST(AUTOTRACE_CFLAGS)
1589 AC_SUBST(AUTOTRACE_LIBS)
1591 dnl ===========================================================================
1594 # Check for Display Postscript delegate library.
1597 [AC_HELP_STRING([--without-dps],
1598 [disable Display Postscript support])],
1599 [with_dps=$withval],
1602 if test "$with_dps" != 'yes'; then
1603 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1608 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1609 AC_MSG_NOTICE([-------------------------------------------------------------])
1610 AC_MSG_CHECKING([for DPS])
1614 PERSIST_CPPFLAGS="$CPPFLAGS"
1615 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1616 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1618 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1619 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1620 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1621 # ImageMagick itself doesn't use -lXt.
1624 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1625 if test "$have_libdps" != 'yes'; then
1626 # Unset cache variable so we can try again.
1627 unset ac_cv_lib_dps_DPSInitialize
1628 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1629 if test "$have_libdps" = 'yes'; then
1633 if test "$have_libdps" = 'yes'; then
1634 passed=`expr $passed + 1`
1636 failed=`expr $failed + 1`
1638 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1639 AC_MSG_CHECKING([if DPS package is complete])
1640 if test $passed -gt 0; then
1641 if test $failed -gt 0; then
1642 AC_MSG_NOTICE([no -- some components failed test])
1643 have_dps='no (failed tests)'
1644 CPPFLAGS="$PERSIST_CPPFLAGS"
1646 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1647 LIBS="$DPS_LIBS $LIBS"
1648 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1649 AC_MSG_NOTICE([yes])
1654 CPPFLAGS=$PERSIST_CPPFLAGS
1657 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1660 dnl ===========================================================================
1663 # Check for DJVU delegate library.
1666 [AC_HELP_STRING([--without-djvu],
1667 [disable DjVu support])],
1668 [with_djvu=$withval],
1671 if test "$with_djvu" != 'yes'; then
1672 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1677 if test "$with_djvu" != 'no'; then
1678 AC_MSG_NOTICE([-------------------------------------------------------------])
1679 AC_MSG_CHECKING([for DJVU])
1683 AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1684 AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1685 AC_MSG_CHECKING([if DJVU package is complete])
1686 if test $passed -gt 0; then
1687 if test $failed -gt 0; then
1688 AC_MSG_NOTICE([no -- some components failed test])
1689 have_djvu='no (failed tests)'
1691 DJVU_LIBS='-ldjvulibre'
1692 LIBS="$DJVU_LIBS $LIBS"
1693 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1694 AC_MSG_NOTICE([yes])
1701 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1704 dnl ===========================================================================
1707 # Set DejaVu font directory.
1709 AC_ARG_WITH([dejavu-font-dir],
1710 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1711 [DejaVu font directory])],
1712 [with_dejavu_font_dir=$withval],
1713 [with_dejavu_font_dir='default'])
1715 if test "$with_dejavu_font_dir" != 'default'; then
1716 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1719 dnl ===========================================================================
1722 # Check for FFTW delegate library.
1725 [AC_HELP_STRING([--without-fftw],
1726 [disable FFTW support])],
1727 [with_fftw=$withval],
1730 if test "$with_fftw" != 'yes'; then
1731 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1736 if test "$with_fftw" != 'no'; then
1737 AC_MSG_NOTICE([-------------------------------------------------------------])
1738 AC_MSG_CHECKING([for FFTW])
1742 AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1743 AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1744 AC_MSG_CHECKING([if FFTW package is complete])
1745 if test $passed -gt 0; then
1746 if test $failed -gt 0; then
1747 AC_MSG_NOTICE([no -- some components failed test])
1748 have_fftw='no (failed tests)'
1751 LIBS="$FFTW_LIBS $LIBS"
1752 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1753 AC_MSG_NOTICE([yes])
1760 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1763 dnl ===========================================================================
1766 # Check for FlashPIX delegate library.
1769 [AC_HELP_STRING([--without-fpx],
1770 [disable FlashPIX support])],
1771 [with_fpx=$withval],
1774 if test "$with_fpx" != 'yes'; then
1775 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1780 if test "$with_fpx" != 'no'; then
1781 AC_MSG_NOTICE([-------------------------------------------------------------])
1782 AC_MSG_CHECKING([for FlashPIX])
1787 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1788 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1790 AC_MSG_CHECKING([if FlashPIX package is complete])
1791 if test $passed -gt 0; then
1792 if test $failed -gt 0; then
1793 AC_MSG_NOTICE([no -- some components failed test])
1794 have_fpx='no (failed tests)'
1797 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1798 AC_MSG_NOTICE([yes])
1806 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1809 dnl ===========================================================================
1812 # Check for fontconfig delegate library.
1814 AC_ARG_WITH([fontconfig],
1815 [AC_HELP_STRING([--without-fontconfig],
1816 [disable fontconfig support])],
1817 [with_fontconfig=$withval],
1818 [with_fontconfig='yes'])
1820 if test "$with_fontconfig" != 'yes'; then
1821 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
1824 have_fontconfig='no'
1825 FONTCONFIG_CFLAGS=""
1828 if test "x$with_fontconfig" = "xyes"; then
1829 AC_MSG_NOTICE([-------------------------------------------------------------])
1830 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
1834 if test "$have_fontconfig" = 'yes'; then
1835 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
1836 if test "$with_modules" = 'no'; then
1837 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1841 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
1842 AC_SUBST(FONTCONFIG_CFLAGS)
1843 AC_SUBST(FONTCONFIG_LIBS)
1845 dnl ===========================================================================
1848 # Check for freetype delegate library.
1850 AC_ARG_WITH([freetype],
1851 [AC_HELP_STRING([--without-freetype],
1852 [disable Freetype support])],
1853 [with_freetype=$withval],
1854 [with_freetype='yes'])
1857 if test "$with_freetype" != 'yes'; then
1858 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
1863 if test "$with_freetype" != 'no'; then
1864 AC_MSG_NOTICE([-------------------------------------------------------------])
1865 AC_MSG_CHECKING(for FreeType 2.0 )
1869 PERSIST_LDFLAGS="$LDFLAGS"
1870 PERSIST_CPPFLAGS="$CPPFLAGS"
1872 # Allow the user to specify the location of freetype.
1873 if test "$with_freetype" != 'yes'; then
1874 if test -x "${with_freetype}/bin/freetype-config"; then
1875 freetype_config="${with_freetype}/bin/freetype-config"
1876 elif test -x "${with_freetype}"; then
1877 freetype_config=${with_freetype}
1880 if test -z "$freetype_config"; then
1881 AC_PATH_PROG(freetype_config,freetype-config,)dnl
1883 if test -n "$freetype_config"; then
1884 freetype_prefix=`${freetype_config} --prefix`
1885 freetype_exec_prefix=`${freetype_config} --exec-prefix`
1886 LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
1887 CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
1890 dnl First see if there is a library
1891 if test "$FREETYPE_LIBS" = ''; then
1892 AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,)
1893 if test "$FREETYPE_LIBS" != ''; then
1894 passed=`expr $passed + 1`
1896 failed=`expr $failed + 1`
1897 LDFLAGS="$PERSIST_LDFLAGS"
1901 dnl Now test for the headers
1902 AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include <ft2build.h>'],[ft2build=''],[])
1903 AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H])
1904 if test "$have_freetype_h" = 'yes'; then
1905 passed=`expr $passed + 1`
1907 failed=`expr $failed + 1`
1908 CPPFLAGS="$PERSIST_CPPFLAGS"
1911 AC_MSG_CHECKING(if FreeType package is complete)
1912 if test $passed -gt 0; then
1913 if test $failed -gt 0; then
1915 AC_MSG_NOTICE(no -- some components failed test)
1916 have_freetype='no (failed tests)'
1918 LIBS="$FREETYPE_LIBS $LIBS"
1919 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library)
1920 if test "$ac_cv_header_ft2build_h" = 'yes'; then
1921 AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the <ft2build.h> header file.])
1930 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
1931 AC_SUBST(FREETYPE_LIBS)
1933 dnl ===========================================================================
1936 # Check for Ghostscript library or framework.
1938 # Test for iapi.h & test for gsapi_new_instance in -lgs
1939 # or -framework Ghostscript
1941 AC_ARG_WITH([gslib],
1942 [AC_HELP_STRING([--without-gslib],
1943 [enable Ghostscript library support])],
1944 [with_gslib=$withval],
1947 gslib_framework='no'
1948 if test "$with_gslib" != 'yes'; then
1949 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
1954 if test "$with_gslib" != 'no'; then
1955 AC_MSG_NOTICE([-------------------------------------------------------------])
1956 AC_MSG_CHECKING([for Ghostscript])
1961 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
1962 failed=`expr $failed + 1`,)
1963 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
1964 failed=`expr $failed + 1`,)
1965 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
1966 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
1967 AC_MSG_CHECKING([if Ghostscript package is complete])
1968 if test $passed -gt 0; then
1969 if test $failed -gt 0; then
1970 AC_MSG_NOTICE([no -- some components failed test])
1971 have_gslib='no (failed tests)'
1973 if test $framework -gt 0; then
1974 GS_LIBS='-framework Ghostscript'
1975 gslib_framework='yes'
1976 AC_MSG_NOTICE([yes, using framework.])
1978 AC_MSG_NOTICE([yes, using library.])
1981 LIBS="$GS_LIBS $LIBS"
1982 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
1989 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
1992 # Set default font search path
1993 AC_ARG_WITH([fontpath],
1994 [AC_HELP_STRING([--with-fontpath=DIR],
1995 [prepend to default font search path])],
1996 [with_fontpath=$withval],
1999 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2002 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",Define to prepend to default font search path.)
2004 if test "$with_fontpath=" != ''; then
2005 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2008 # Set Ghostscript font directory
2009 AC_ARG_WITH([gs-font-dir],
2010 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2011 [Ghostscript font directory])],
2012 [with_gs_font_dir=$withval],
2013 [with_gs_font_dir='default'])
2015 if test "$with_gs_font_dir" != 'default'; then
2016 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2019 dnl ===========================================================================
2022 # Check for GVC delegate library.
2025 [AC_HELP_STRING([--without-gvc],
2026 [disable GVC support])],
2027 [with_gvc=$withval],
2030 if test "$with_gvc" != 'yes'; then
2031 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2035 if test "x$with_gvc" = "xyes"; then
2036 AC_MSG_NOTICE([-------------------------------------------------------------])
2037 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2041 if test "$have_gvc" = 'yes'; then
2042 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2043 if test "$with_modules" = 'no'; then
2044 CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
2048 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2049 AC_SUBST(GVC_CFLAGS)
2052 dnl ===========================================================================
2055 # Check for JBIG delegate library.
2059 [AC_HELP_STRING([--without-jbig],
2060 [disable JBIG support])],
2061 [with_jbig=$withval],
2066 if test "$with_jbig" != 'no'; then
2067 AC_MSG_NOTICE([-------------------------------------------------------------])
2068 AC_MSG_CHECKING([for JBIG])
2072 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2073 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2074 AC_MSG_CHECKING([if JBIG package is complete])
2075 if test $passed -gt 0; then
2076 if test $failed -gt 0; then
2077 AC_MSG_NOTICE([no -- some components failed test])
2078 have_jbig='no (failed tests)'
2081 LIBS="$JBIG_LIBS $LIBS"
2082 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2083 AC_MSG_NOTICE([yes])
2090 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2093 dnl ===========================================================================
2096 # Check for JPEG delegate library.
2099 [AC_HELP_STRING([--without-jpeg],
2100 [disable JPEG support])],
2101 [with_jpeg=$withval],
2104 if test "$with_jpeg" != 'yes'; then
2105 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2110 if test "$with_jpeg" != 'no'; then
2111 AC_MSG_NOTICE([-------------------------------------------------------------])
2112 AC_MSG_CHECKING([for JPEG])
2116 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2117 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2118 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2119 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2120 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2122 # Test for compatible JPEG library
2123 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2124 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2128 #include <jpeglib.h>
2130 changequote(<<, >>)dnl
2132 #if JPEG_LIB_VERSION < 62
2133 #error IJG JPEG library must be version 6b or newer!
2137 changequote([, ])dnl
2138 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2139 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2141 AC_MSG_CHECKING([if JPEG package is complete])
2142 if test $passed -gt 0; then
2143 if test $failed -gt 0; then
2144 AC_MSG_NOTICE([no -- some components failed test])
2145 have_jpeg='no (failed tests)'
2148 LIBS="$JPEG_LIBS $LIBS"
2149 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2150 AC_MSG_NOTICE([yes])
2157 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2160 dnl ===========================================================================
2163 # Check for JPEG Version 2 delegate library.
2166 [AC_HELP_STRING([--without-jp2],
2167 [disable JPEG-2000 support])],
2168 [with_jp2=$withval],
2171 if test "$with_jp2" != 'yes'; then
2172 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 "
2177 if test "$with_jp2" != 'no'; then
2178 AC_MSG_NOTICE([-------------------------------------------------------------])
2179 AC_MSG_CHECKING([for JPEG Version 2])
2183 AC_CHECK_HEADER(jasper/jasper.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2184 AC_CHECK_LIB(jasper,jas_stream_fopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2185 AC_MSG_CHECKING([if JPEG version 2 support package is complete])
2186 if test $passed -gt 0; then
2187 if test $failed -gt 0; then
2188 AC_MSG_NOTICE([no -- some components failed test])
2189 have_jp2='no (failed tests)'
2192 LIBS="$JP2_LIBS $LIBS"
2193 AC_DEFINE(JP2_DELEGATE,1,Define if you have JPEG version 2 "Jasper" library)
2194 AC_MSG_NOTICE([yes])
2201 AM_CONDITIONAL(JP2_DELEGATE, test "$have_jp2" = 'yes')
2204 dnl ===========================================================================
2207 # Check for LCMS delegate library.
2211 [ --without-lcms disable lcms (v1.1X) support],
2212 [with_lcms=$withval],
2214 if test "$with_lcms" != 'yes' ; then
2215 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2220 [ --without-lcms2 disable lcms (v2.X) support],
2221 [with_lcms2=$withval],
2223 if test "$with_lcms2" != 'yes' ; then
2224 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
2229 if test "$with_lcms2" != 'no'; then
2230 AC_MSG_NOTICE([-------------------------------------------------------------])
2231 AC_MSG_CHECKING([for LCMS v2])
2235 have_lcms_header='no'
2237 # Check for <lcms2.h>
2238 AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
2239 if test "$have_lcms_header" = 'yes'; then
2240 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2241 passed=`expr $passed + 1`
2244 # Check for <lcms2/lcms2.h)
2245 if test "$have_lcms_header" != 'yes'; then
2246 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2247 if test "$have_lcms_header" = 'yes'; then
2248 passed=`expr $passed + 1`
2249 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2253 # Failed to find lcms header?
2254 if test "$have_lcms_header" != 'yes'; then
2255 failed=`expr $failed + 1`
2258 AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2259 AC_MSG_CHECKING(if LCMS v2 package is complete)
2260 if test $passed -gt 0; then
2261 if test $failed -gt 0; then
2262 AC_MSG_NOTICE(no -- some components failed test)
2263 have_lcms2='no (failed tests)'
2266 LIBS="$LCMS_LIBS $LIBS"
2276 # Check for LCMS v1 (1.11 or later)
2278 if test $have_lcms2 = 'yes'; then
2283 if test "$with_lcms" != 'no'; then
2284 AC_MSG_NOTICE([-------------------------------------------------------------])
2285 AC_MSG_CHECKING([for LCMS v1.1X])
2289 have_lcms_header='no'
2291 # Check for <lcms.h>
2292 if test "$have_lcms_header" != 'yes'; then
2293 AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
2294 if test "$have_lcms_header" = 'yes'; then
2295 passed=`expr $passed + 1`
2296 AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
2300 # Check for <lcms/lcms.h>
2301 if test "$have_lcms_header" != 'yes'; then
2302 AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
2303 if test "$have_lcms_header" = 'yes'; then
2304 passed=`expr $passed + 1`
2305 AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
2309 # Failed to find lcms header?
2310 if test "$have_lcms_header" != 'yes'; then
2311 failed=`expr $failed + 1`
2314 AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2315 AC_MSG_CHECKING(if LCMS package is complete)
2316 if test $passed -gt 0; then
2317 if test $failed -gt 0; then
2318 AC_MSG_NOTICE(no -- some components failed test)
2319 have_lcms='no (failed tests)'
2322 LIBS="$LCMS_LIBS $LIBS"
2331 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
2332 if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
2333 AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
2338 dnl ===========================================================================
2341 # Check for the LQR (Liquid Rescale) delegate library.
2344 [AC_HELP_STRING([--without-lqr],
2345 [disable Liquid Rescale support])],
2346 [with_lqr=$withval],
2349 if test "$with_lqr" != 'yes'; then
2350 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2357 if test "x$with_lqr" = "xyes"; then
2358 AC_MSG_NOTICE([-------------------------------------------------------------])
2359 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2363 if test "$have_lqr" = 'yes'; then
2364 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2365 CFLAGS="$LQR_CFLAGS $CFLAGS"
2368 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2369 AC_SUBST(LQR_CFLAGS)
2372 dnl ===========================================================================
2374 # Disable LZMA (lzma library)
2376 [ --without-lzma disable LZMA support],
2377 [with_lzma=$withval],
2379 if test "$with_lzma" != 'yes' ; then
2380 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2384 if test "x$with_lzma" = "xyes"; then
2385 AC_MSG_NOTICE([-------------------------------------------------------------])
2386 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2390 if test "$have_lzma" = 'yes'; then
2391 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2392 if test "$with_modules" = 'no'; then
2393 CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS"
2397 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2398 AC_SUBST(LZMA_CFLAGS)
2401 dnl ===========================================================================
2404 # Check for the OpenEXR delegate library.
2406 AC_ARG_WITH([openexr],
2407 [AC_HELP_STRING([--without-openexr],
2408 [disable OpenEXR support])],
2409 [with_openexr=$withval],
2410 [with_openexr='yes'])
2412 if test "$with_openexr" != 'yes'; then
2413 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2420 if test "x$with_openexr" = "xyes"; then
2421 AC_MSG_NOTICE([-------------------------------------------------------------])
2422 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2426 if test "$have_openexr" = 'yes'; then
2427 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2428 if test "$with_modules" = 'no'; then
2429 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2433 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2434 AC_SUBST(OPENEXR_CFLAGS)
2435 AC_SUBST(OPENEXR_LIBS)
2437 dnl ===========================================================================
2440 # Check for PANGO delegate library.
2442 AC_ARG_WITH([pango],
2443 [AC_HELP_STRING([--without-pango],
2444 [disable PANGO support])],
2445 [with_pango=$withval],
2448 if test "$with_pango" != 'yes'; then
2449 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2457 if test "x$with_pango" = "xyes"; then
2458 AC_MSG_RESULT([-------------------------------------------------------------])
2459 PKG_CHECK_MODULES(PANGO, [pangoft2 >= 1.28.1], have_pangoft2=yes, have_pangoft2=no)
2461 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2465 if test "$have_pango" = 'yes'; then
2466 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2467 if test "$with_modules" = 'no'; then
2468 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
2472 if test "$have_pangoft2" = 'yes'; then
2473 AC_DEFINE(PANGOFT2_DELEGATE,1,Define if you have PANGOFT2 library)
2474 if test "$with_modules" = 'no'; then
2475 CPPFLAGS="$PANGOFT2_CFLAGS $CPPFLAGS"
2479 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2480 AM_CONDITIONAL(PANGOFT2_DELEGATE, test "$have_pangoft2" = 'yes')
2481 AC_SUBST(PANGO_CFLAGS)
2482 AC_SUBST(PANGO_LIBS)
2484 dnl ===========================================================================
2487 # Check for PNG delegate library.
2490 [AC_HELP_STRING([--without-png],
2491 [disable PNG support])],
2492 [with_png=$withval],
2495 if test "$with_png" != 'yes'; then
2496 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2502 if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
2503 AC_MSG_NOTICE([-------------------------------------------------------------])
2504 AC_MSG_CHECKING(for PNG support )
2508 AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
2509 failed=`expr $failed + 1`,)
2511 if test $passed -gt 0; then
2512 for var in 5 4 2 '' ; do
2513 if test "$have_png" = 'no' ; then
2514 if test "x${var}" = 'x' ; then
2520 # Test for compatible LIBPNG library
2523 if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
2524 if test "${pnglib}" != 'png' ; then
2525 AC_MSG_CHECKING(for LIBPNG1${var} support )
2531 changequote(<<, >>)dnl
2533 #if PNG_LIBPNG_VER_MINOR != ${var}
2534 #error LIBPNG library must be version 1${var}!
2539 changequote([, ])dnl
2540 ac_cv_libpng_ok='yes',
2541 ac_cv_libpng_ok='no')
2542 if test "$ac_cv_libpng_ok" = 'yes' ; then
2543 passed=`expr $passed + 1`
2546 failed=`expr $failed + 1`
2550 passed=`expr $passed + 1`
2555 if test $passed -gt 0 -a $failed -le 0; then
2556 if test "1${var}" = '15' ; then
2557 AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
2558 failed=`expr $failed + 1`,)
2559 AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
2560 failed=`expr $failed + 1`,)
2562 if test "1${var}" = '14' ; then
2563 AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
2564 failed=`expr $failed + 1`,)
2565 AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
2566 failed=`expr $failed + 1`,)
2568 if test "1${var}" = '12' ; then
2569 AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
2570 failed=`expr $failed + 1`,)
2572 if test "1${var}" = '1' ; then
2573 AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
2574 failed=`expr $failed + 1`,)
2576 if test $passed -gt 0 -a $failed -le 0 ; then
2577 AC_MSG_CHECKING(if ${pnglib} package is complete)
2578 if test $passed -gt 0 ; then
2579 if test $failed -gt 0 ; then
2580 AC_MSG_NOTICE(no -- some components failed test)
2581 have_png='no (failed tests)'
2583 PNG_LIBS="-l${pnglib}"
2584 LIBS="$PNG_LIBS $LIBS"
2585 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2597 AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
2601 dnl ===========================================================================
2604 # Check for RSVG delegate library.
2607 [AC_HELP_STRING([--without-rsvg],
2608 [disable RSVG support])],
2609 [with_rsvg=$withval],
2612 if test "$with_rsvg" != 'yes'; then
2613 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2621 if test "x$with_rsvg" = "xyes"; then
2622 AC_MSG_NOTICE([-------------------------------------------------------------])
2623 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2625 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2629 if test "$have_rsvg" = 'yes'; then
2630 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2631 if test "$with_modules" = 'no'; then
2632 CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
2636 if test "$have_cairo" = 'yes'; then
2637 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2638 if test "$with_modules" = 'no'; then
2639 CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
2643 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2644 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2645 AC_SUBST(RSVG_CFLAGS)
2648 dnl ===========================================================================
2651 # Check for TIFF delegate library.
2654 [AC_HELP_STRING([--without-tiff],
2655 [disable TIFF support])],
2656 [with_tiff=$withval],
2659 if test "$with_tiff" != 'yes'; then
2660 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2665 if test "$with_tiff" != 'no'; then
2666 AC_MSG_NOTICE([-------------------------------------------------------------])
2667 AC_MSG_CHECKING([for TIFF])
2671 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2672 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2673 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2674 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2675 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2676 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2677 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2678 AC_MSG_CHECKING([if TIFF package is complete])
2679 if test $passed -gt 0; then
2680 if test $failed -gt 0; then
2681 AC_MSG_NOTICE([no -- some components failed test])
2682 have_tiff='no (failed tests)'
2685 LIBS="$TIFF_LIBS $LIBS"
2686 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2687 AC_MSG_NOTICE([yes])
2689 AC_CHECK_HEADERS(tiffconf.h)
2690 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2691 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2692 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2693 TIFFSwabArrayOfTriples])
2699 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2702 dnl ===========================================================================
2705 # Check for WEBP delegate library.
2708 [AC_HELP_STRING([--without-webp],
2709 [disable WEBP support])],
2710 [with_webp=$withval],
2713 if test "$with_webp" != 'yes'; then
2714 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2719 if test "$with_webp" != 'no'; then
2720 AC_MSG_NOTICE([-------------------------------------------------------------])
2721 AC_MSG_CHECKING([for WEBP])
2725 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2726 AC_CHECK_LIB(webp,WebPDecodeRGB,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2727 AC_MSG_CHECKING([if WEBP package is complete])
2728 if test $passed -gt 0; then
2729 if test $failed -gt 0; then
2730 AC_MSG_NOTICE([no -- some components failed test])
2731 have_webp='no (failed tests)'
2734 LIBS="$WEBP_LIBS $LIBS"
2735 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2736 AC_MSG_NOTICE([yes])
2743 AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2746 dnl ===========================================================================
2749 # Set Windows font directory.
2751 AC_ARG_WITH([windows-font-dir],
2752 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2753 [directory containing MS-Windows fonts])],
2754 [with_windows_font_dir=$withval],
2755 [with_windows_font_dir=''])
2756 if test "$with_windows_font_dir" != '' ; then
2757 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2760 dnl ===========================================================================
2763 # Check for WMF delegate library.
2766 [AC_HELP_STRING([--without-wmf],
2767 [disable WMF support])],
2768 [with_wmf=$withval],
2771 if test "$with_wmf" != 'yes'; then
2772 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2779 if test "$with_wmf" != 'no'; then
2780 AC_MSG_RESULT([-------------------------------------------------------------])
2781 AC_MSG_CHECKING([for WMF])
2784 have_libwmflite='no'
2785 have_libwmf_ipa_h='no'
2787 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H])
2788 if test "$have_libwmf_ipa_h" = 'yes'; then
2789 AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,)
2790 if test "$have_libwmflite" = 'yes'; then
2791 AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library)
2792 WMF_LIBS='-lwmflite'
2793 LIBS="$WMF_LIBS $LIBS"
2797 WMF_CONFIG_LIBS=`libwmf-config --libs`
2798 for lib in xml2 expat freetype jpeg png z; do
2800 echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib"
2802 AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS)
2803 if test "$have_libwmf" = 'yes'; then
2804 AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library)
2806 LIBS="$WMF_LIBS $LIBS"
2809 AC_MSG_RESULT([no -- some components failed test])
2810 have_wmf='no (failed tests)'
2811 have_wmflite='no (failed tests)'
2817 AC_MSG_CHECKING([if WMF package is complete])
2818 if test "$have_wmf" = 'yes'; then
2819 AC_MSG_RESULT([yes])
2824 AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes')
2826 AC_SUBST(WMF_LIBS_DEPS)
2829 dnl ===========================================================================
2832 # Check for XML delegate library.
2835 [AC_HELP_STRING([--without-xml],
2836 [disable XML support])],
2837 [with_xml=$withval],
2840 if test "$with_xml" != 'yes' ; then
2841 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2846 if test "$with_xml" != 'no'; then
2847 AC_MSG_NOTICE([-------------------------------------------------------------])
2848 AC_MSG_CHECKING([for XML])
2850 PERSIST_LDFLAGS=$LDFLAGS
2851 PERSIST_CPPFLAGS=$CPPFLAGS
2853 AC_PATH_PROG(xml2_config,xml2-config,)dnl
2854 if test -n "$xml2_config"; then
2855 # Debian installs libxml headers under /usr/include/libxml2/libxml with
2856 # the shared library installed under /usr/lib, whereas the package
2857 # installs itself under $prefix/libxml and $prefix/lib.
2858 xml2_prefix=`xml2-config --prefix`
2859 if test -d "${xml2_prefix}/include/libxml2"; then
2860 CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
2862 if test "${xml2_prefix}" != '/usr'; then
2863 LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
2868 AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2869 AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2870 AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2871 AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2872 AC_MSG_CHECKING([if XML package is complete])
2873 if test $passed -gt 0; then
2874 if test $failed -gt 0; then
2875 AC_MSG_NOTICE([no -- some components failed test])
2876 have_xml='no (failed tests)'
2877 LDFLAGS="$PERSIST_LDFLAGS"
2878 CPPFLAGS="$PERSIST_CPPFLAGS"
2881 LIBS="$XML_LIBS $LIBS"
2882 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2883 AC_MSG_NOTICE([yes])
2890 AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
2893 dnl ===========================================================================
2895 # Substitute compiler name to build/link PerlMagick
2897 AC_SUBST(PERLMAINCC)
2900 # Configure install Paths
2903 # Path to ImageMagick header files
2904 INCLUDE_RELATIVE_PATH="ImageMagick"
2905 INCLUDE_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
2906 DEFINE_INCLUDE_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
2907 case "${build_os}" in
2909 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2912 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",Directory where ImageMagick headers live.)
2913 AC_SUBST(INCLUDE_PATH)
2915 # Subdirectory under lib to place ImageMagick lib files
2916 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2917 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",Subdirectory of lib where ImageMagick architecture dependent files are installed)
2919 # Path to ImageMagick bin directory
2920 EXECUTABLE_PATH="${BIN_DIR}"
2921 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2922 case "${build_os}" in
2924 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2927 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",Directory where executables are installed.)
2928 AC_SUBST(EXECUTABLE_PATH)
2930 # Path to ImageMagick lib
2931 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2932 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2933 case "${build_os}" in
2935 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2938 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",Directory where architecture-dependent files live.)
2939 AC_SUBST(LIBRARY_PATH)
2942 # Subdirectory under lib to place ImageMagick coder module files
2943 CODER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/coders"
2944 AC_DEFINE_UNQUOTED(CODER_RELATIVE_PATH,"$CODER_RELATIVE_PATH",Subdirectory of lib where coder modules are installed)
2945 CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}"
2946 DEFINE_CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}/"
2947 case "${build_os}" in
2949 DEFINE_CODER_PATH=`$WinPathScript "$DEFINE_CODER_PATH" 1`
2952 AC_DEFINE_UNQUOTED(CODER_PATH,"$DEFINE_CODER_PATH",Location of coder modules)
2953 AC_SUBST(CODER_PATH)
2956 # Subdirectory under lib to place ImageMagick filter module files
2957 FILTER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/filters"
2958 AC_DEFINE_UNQUOTED(FILTER_RELATIVE_PATH,"$FILTER_RELATIVE_PATH",Subdirectory of lib where filter modules are installed)
2959 FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}"
2960 DEFINE_FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}/"
2961 case "${build_os}" in
2963 DEFINE_FILTER_PATH=`$WinPathScript "$DEFINE_FILTER_PATH" 1`
2966 AC_DEFINE_UNQUOTED(FILTER_PATH,"$DEFINE_FILTER_PATH",Location of filter modules)
2967 AC_SUBST(FILTER_PATH)
2970 # Path to ImageMagick documentation files
2971 DOCUMENTATION_RELATIVE_PATH=""
2972 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
2973 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
2974 case "${build_os}" in
2976 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
2979 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",Directory where ImageMagick documents live.)
2980 AC_SUBST(DOCUMENTATION_PATH)
2982 # Subdirectory to place architecture-dependent configuration files
2983 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
2984 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",Subdirectory of lib where architecture-dependent configuration files live.)
2985 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2986 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2987 case "${build_os}" in
2989 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
2992 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",Directory where architecture-dependent configuration files live.)
2993 AC_SUBST(CONFIGURE_PATH)
2995 # Subdirectory to place architecture-independent configuration files
2996 SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
2997 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
2998 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
2999 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
3000 case "${build_os}" in
3002 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
3005 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",Directory where architecture-independent configuration files live.)
3006 AC_SUBST(SHARE_PATH)
3008 # Subdirectory to place architecture-dependent configuration files
3009 SHAREARCH_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/config"
3010 AC_DEFINE_UNQUOTED(SHAREARCH_RELATIVE_PATH,"$SHAREARCH_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
3011 SHAREARCH_PATH="${SHAREARCH_DIR}/${SHAREARCH_RELATIVE_PATH}"
3012 DEFINE_SHAREARCH_PATH="${SHAREARCH_DIR}/${SHAREARCH_RELATIVE_PATH}/"
3013 case "${build_os}" in
3015 DEFINE_SHAREARCH_PATH=`$WinPathScript "$DEFINE_SHAREARCH_PATH" 1`
3018 AC_DEFINE_UNQUOTED(SHAREARCH_PATH,"$DEFINE_SHAREARCH_PATH",Directory where architecture-independent configuration files live.)
3019 AC_SUBST(SHAREARCH_PATH)
3022 # program_transform_name is formed for use in a Makefile, so create a
3023 # modified version for use in a shell script.
3024 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3026 # Default delegate definitions
3027 AC_MSG_NOTICE([-------------------------------------------------------------])
3028 AC_MSG_CHECKING([for ImageMagick delegate programs])
3030 AutotraceDecodeDelegateDefault='autotrace'
3031 BlenderDecodeDelegateDefault='blender'
3032 BZIPDelegateDefault='bzip2'
3033 BrowseDelegateDefault='xdg-open'
3034 CGMDecodeDelegateDefault='ralcgm'
3035 CatDelegateDefault='cat'
3036 DNGDecodeDelegateDefault='ufraw-batch'
3037 GVCDecodeDelegateDefault='dot'
3038 DVIDecodeDelegateDefault='dvips'
3039 EchoDelegateDefault='echo'
3040 EditorDelegateDefault='xterm'
3041 FIGDecodeDelegateDefault='fig2dev'
3042 ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
3043 DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
3044 MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
3045 GnuplotDecodeDelegateDefault='gnuplot'
3046 HPGLDecodeDelegateDefault='hp2xx'
3047 HTMLDecodeDelegateDefault='html2ps'
3048 ILBMDecodeDelegateDefault='ilbmtoppm'
3049 ILBMEncodeDelegateDefault='ppmtoilbm'
3050 LPDelegateDefault='lp'
3051 LPRDelegateDefault='lpr'
3052 LZWDecodeDelegateDefault='uncompress'
3053 LZWEncodeDelegateDefault='compress'
3054 LaunchDelegateDefault='gimp'
3055 MANDelegateDefault='groff'
3056 MPEGDecodeDelegateDefault='ffmpeg'
3057 MPEGEncodeDelegateDefault='ffmpeg'
3058 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3059 MVDelegateDefault='mv'
3060 PCLDelegateDefault='pcl6'
3061 PGPDecodeDelegateDefault='pgpv'
3062 POVDelegateDefault='povray'
3063 if test "$native_win32_build" = 'yes'; then
3064 PSDelegateDefault='gswin32c'
3065 elif test "$gslib_framework" = 'yes'; then
3066 PSDelegateDefault='gsc'
3068 PSDelegateDefault='gs'
3070 RLEEncodeDelegateDefault='rawtorle'
3071 RMDelegateDefault='rm'
3072 RSVGDecodeDelegateDefault='rsvg'
3073 SCANDecodeDelegateDefault='scanimage'
3074 TXTDelegateDefault='enscript'
3075 UniconvertorDelegateDefault='uniconvertor'
3076 WMFDecodeDelegateDefault='wmf2eps'
3077 WWWDecodeDelegateDefault='curl'
3078 XPSDelegateDefault='gxps'
3079 ZipDelegateDefault='gzip'
3081 # Search for delegates
3082 AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
3083 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3084 AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
3085 AC_PATH_PROG(BrowseDelegate, "$BrowseDelegateDefault" mozilla firefox netscape, "$BrowseDelegateDefault")
3086 AC_PATH_PROG(CGMDecodeDelegate, "$CGMDecodeDelegateDefault", "$CGMDecodeDelegateDefault")
3087 AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
3088 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3089 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3090 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3091 AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
3092 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3093 AC_PATH_PROG(FIGDecodeDelegate, "$FIGDecodeDelegateDefault", "$FIGDecodeDelegateDefault")
3094 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3095 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3096 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3097 AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
3098 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3099 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3100 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3101 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3102 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3103 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3104 AC_PATH_PROG(LZWDecodeDelegate, "$LZWDecodeDelegateDefault", "$LZWDecodeDelegateDefault")
3105 AC_PATH_PROG(LZWEncodeDelegate, "$LZWEncodeDelegateDefault", "$LZWEncodeDelegateDefault")
3106 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3107 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
3108 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3109 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3110 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3111 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3112 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3113 AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
3114 AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
3115 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3116 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
3117 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3118 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3119 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
3120 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
3121 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3122 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
3123 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
3124 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3125 AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
3127 # Prefer lpr to lp; lp needs options tacked on.
3128 if test "$LPRDelegate" != no; then
3129 PrintDelegate="$LPRDelegate"
3131 PrintDelegate="$LPDelegate -c -s"
3133 AC_SUBST(PrintDelegate)
3135 # Installed ImageMagick utiltity paths
3136 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3137 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3138 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3140 # Set delegate booleans
3141 have_ffmpeg='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_ffmpeg='yes'; fi
3142 have_fig2dev='no' ; if test "$FIGDecodeDelegate" != "$FIGDecodeDelegateDefault" ; then have_fig2dev='yes'; fi
3143 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3144 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3145 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3146 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3147 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3148 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3149 have_ralcgm='no' ; if test "$CGMDecodeDelegate" != "$CGMDecodeDelegateDefault" ; then have_ralcgm='yes'; fi
3150 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3153 # Test for font directories
3155 type_include_files=''
3158 AC_MSG_CHECKING(for Dejavu fonts directory)
3160 if test "${with_dejavu_font_dir}" != 'default'; then
3161 dejavu_font_dir="${with_dejavu_font_dir}/"
3163 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3164 if test -f "${font_dir}DejaVuSerif.ttf"; then
3165 dejavu_font_dir="${font_dir}"
3170 if test "${dejavu_font_dir}x" != 'x'; then
3171 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3172 AC_MSG_NOTICE([$dejavu_font_dir])
3174 AC_MSG_NOTICE([not found!]);
3176 AC_SUBST(dejavu_font_dir)
3180 if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
3181 windows_font_dir="${with_windows_font_dir}/"
3183 if test "${windows_font_dir}x" != 'x'; then
3184 if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
3185 windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
3187 if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then
3188 windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/'
3190 if test -f '/usr/share/fonts/msttcore/arial.ttf'; then
3191 windows_font_dir='/usr/share/fonts/msttcore/truetype/'
3194 if test "${windows_font_dir}x" != 'x'; then
3195 type_include_files="$type_include_files "'<include file="type-windows.xml" />'
3197 AC_SUBST(windows_font_dir)
3200 AC_MSG_CHECKING(for Ghostscript fonts directory)
3201 ghostscript_font_dir=''
3202 if test "${with_gs_font_dir}" != 'default'; then
3203 ghostscript_font_dir="${with_gs_font_dir}/"
3205 if test "${native_win32_build}" = 'yes'; then
3206 # Native Windows Build
3207 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3208 if test -f "${font_dir}a010013l.pfb"; then
3209 ghostscript_font_dir="$font_dir"
3213 if test "${PSDelegate}" != 'gswin32c'; then
3214 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3217 # Linux / Mac OS X / Unix Build
3218 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
3219 if test -f "${font_dir}a010013l.pfb"; then
3220 ghostscript_font_dir="${font_dir}"
3224 if test "${ghostscript_font_dir}x" = 'x'; then
3225 if test "$PSDelegate" != 'gs'; then
3226 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3231 if test "${ghostscript_font_dir}x" != 'x'; then
3232 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3233 AC_MSG_NOTICE([$ghostscript_font_dir])
3235 AC_MSG_NOTICE([not found!]);
3237 AC_SUBST(ghostscript_font_dir)
3238 case "${build_os}" in
3240 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3244 AC_SUBST(type_include_files)
3247 # Handle case where user doesn't want frozen paths
3249 if test "$with_frozenpaths" != 'yes'; then
3250 # Re-set delegate definitions to default (no paths)
3251 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
3252 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3253 BZIPDelegate="$BZIPDelegateDefault"
3254 BrowseDelegate="$BrowseDelegateDefault"
3255 CGMDecodeDelegate="$CGMDecodeDelegateDefault"
3256 CatDelegate="$CatDelegateDefault"
3257 ConvertDelegate="$ConvertDelegateDefault"
3258 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3259 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3260 EchoDelegate="$EchoDelegateDefault"
3261 EditorDelegate="$EditorDelegateDefault"
3262 FIGDecodeDelegate="$FIGDecodeDelegateDefault"
3263 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3264 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3265 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3266 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3267 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3268 LPDelegate="$LPDelegateDefault"
3269 LZWDecodeDelegate="$LZWDecodeDelegateDefault"
3270 LZWEncodeDelegate="$LZWEncodeDelegateDefault"
3271 LaunchDelegate="$LaunchDelegateDefault"
3272 MANDelegate="$MANDelegateDefault"
3273 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3274 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3275 MogrifyDelegate="$MogrifyDelegateDefault"
3276 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3277 MVDelegate="$MVDelegateDefault"
3278 PCLDelegate="$PCLDelegateDefault"
3279 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3280 POVDelegate="$POVDelegateDefault"
3281 PSDelegate="$PSDelegateDefault"
3282 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3283 RMDelegate="$RMDelegateDefault"
3284 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3285 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3286 ShowImageDelegate="$ShowImageDelegateDefault"
3287 TXTDelegate="$TXTDelegateDefault"
3288 UniconvertorDelegate="$UniconvertorDelegateDefault"
3289 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3290 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3291 XPSDelegate="$XPSDelegateDefault"
3292 ZipDelegate="$ZipDelegateDefault"
3295 # Delegate substitutions
3296 AC_SUBST(AutotraceDecodeDelegate)
3297 AC_SUBST(BlenderDecodeDelegate)
3298 AC_SUBST(BZIPDelegate)
3299 AC_SUBST(BrowseDelegate)
3300 AC_SUBST(CGMDecodeDelegate)
3301 AC_SUBST(CatDelegate)
3302 AC_SUBST(ConvertDelegate)
3303 AC_SUBST(GVCDecodeDelegate)
3304 AC_SUBST(DVIDecodeDelegate)
3305 AC_SUBST(EchoDelegate)
3306 AC_SUBST(EditorDelegate)
3307 AC_SUBST(FIGDecodeDelegate)
3308 AC_SUBST(GnuplotDecodeDelegate)
3309 AC_SUBST(HPGLDecodeDelegate)
3310 AC_SUBST(HTMLDecodeDelegate)
3311 AC_SUBST(ILBMDecodeDelegate)
3312 AC_SUBST(ILBMEncodeDelegate)
3313 AC_SUBST(LPDelegate)
3314 AC_SUBST(LZWDecodeDelegate)
3315 AC_SUBST(LZWEncodeDelegate)
3316 AC_SUBST(LaunchDelegate)
3317 AC_SUBST(MANDelegate)
3318 AC_SUBST(MPEGDecodeDelegate)
3319 AC_SUBST(MPEGEncodeDelegate)
3320 AC_SUBST(MogrifyDelegate)
3321 AC_SUBST(MrSIDDecodeDelegate)
3322 AC_SUBST(MVDelegate)
3323 AC_SUBST(PCLDelegate)
3324 AC_SUBST(PGPDecodeDelegate)
3325 AC_SUBST(POVDelegate)
3326 AC_SUBST(PSDelegate)
3327 AC_SUBST(RLEEncodeDelegate)
3328 AC_SUBST(RMDelegate)
3329 AC_SUBST(SCANDecodeDelegate)
3330 AC_SUBST(ShowImageDelegate)
3331 AC_SUBST(TXTDelegate)
3332 AC_SUBST(UniconvertorDelegate)
3333 AC_SUBST(WMFDecodeDelegate)
3334 AC_SUBST(WWWDecodeDelegate)
3335 AC_SUBST(XPSDelegate)
3336 AC_SUBST(ZipDelegate)
3342 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3343 AC_CHECK_PROGS(PERL,perl)
3344 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3345 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3346 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3347 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3348 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3350 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3353 # 7ZIP support (http://p7zip.sourceforge.net/)
3356 AC_CHECK_PROGS(P7ZIP,[7za])
3358 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3361 # ZIP support (http://www.info-zip.org/Zip.html)
3364 AC_CHECK_PROGS(ZIP,[zip])
3366 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3369 # GhostPCL related configuration.
3371 PCLColorDevice=ppmraw
3372 PCLCMYKDevice=pamcmyk32
3373 PCLMonoDevice=pbmraw
3374 if test -z "$PCLVersion"; then
3375 PCLVersion='unknown'
3377 if test $have_pcl = 'yes'; then
3378 AC_MSG_NOTICE([-------------------------------------------------------------])
3379 AC_MSG_CHECKING([for PCL])
3382 AC_MSG_CHECKING([for pcl color device])
3383 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3386 PCLColorDevice=ppmraw
3388 AC_MSG_NOTICE([$PCLColorDevice])
3391 AC_MSG_CHECKING([for pcl CMYK device])
3392 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3395 PCLCMYKDevice=$PCLColorDevice
3397 AC_MSG_NOTICE([$PCLCMYKDevice])
3400 AC_MSG_CHECKING([for pcl mono device])
3401 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3404 PCLMonoDevice=$PCLColorDevice
3406 AC_MSG_NOTICE([$PCLMonoDevice])
3409 AC_SUBST(PCLMonoDevice)
3410 AC_SUBST(PCLColorDevice)
3411 AC_SUBST(PCLCMYKDevice)
3412 AC_SUBST(PCLVersion)
3415 # GhostXPS related configuration.
3417 XPSColorDevice=ppmraw
3418 XPSCMYKDevice=bmpsep8
3419 XPSMonoDevice=pbmraw
3420 if test -z "$XPSVersion"; then
3421 XPSVersion='unknown'
3423 if test $have_xps = 'yes'; then
3424 AC_MSG_NOTICE([-------------------------------------------------------------])
3425 AC_MSG_CHECKING([for XPS])
3428 AC_MSG_CHECKING([for xps color device])
3429 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3432 XPSColorDevice=ppmraw
3434 AC_MSG_NOTICE([$XPSColorDevice])
3437 AC_MSG_CHECKING([for xps CMYK device])
3438 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3441 XPSCMYKDevice=$XPSColorDevice
3443 AC_MSG_NOTICE([$XPSCMYKDevice])
3446 AC_MSG_CHECKING([for xps mono device])
3447 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3450 XPSMonoDevice=$XPSColorDevice
3452 AC_MSG_NOTICE([$XPSMonoDevice])
3455 AC_SUBST(XPSMonoDevice)
3456 AC_SUBST(XPSColorDevice)
3457 AC_SUBST(XPSCMYKDevice)
3458 AC_SUBST(XPSVersion)
3461 # Ghostscript related configuration.
3463 GSAlphaDevice=pngalpha
3464 GSColorDevice=pnmraw
3467 GSPDFDevice=pdfwrite
3469 GSEPSDevice=epswrite
3471 if test $have_gs = 'yes'; then
3472 AC_MSG_NOTICE([-------------------------------------------------------------])
3473 AC_MSG_CHECKING([for Ghostscript])
3475 AC_MSG_CHECKING([for Ghostscript version])
3476 if GSVersion=`$PSDelegate --version`; then
3479 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3481 AC_MSG_NOTICE([$GSVersion])
3484 AC_MSG_CHECKING([for gs alpha device])
3485 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3488 GSAlphaDevice=pnmraw
3490 AC_MSG_NOTICE([$GSAlphaDevice])
3493 AC_MSG_CHECKING([for gs color device])
3494 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3497 GSColorDevice=pnmraw
3499 AC_MSG_NOTICE([$GSColorDevice])
3502 AC_MSG_CHECKING([for gs CMYK device])
3503 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3506 GSCMYKDevice=bmpsep8
3508 AC_MSG_NOTICE([$GSCMYKDevice])
3511 AC_MSG_CHECKING([for gs mono device])
3512 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3515 GSMonoDevice=$GSColorDevice
3517 AC_MSG_NOTICE([$GSMonoDevice])
3520 AC_MSG_CHECKING([for gs PDF writing device])
3521 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3524 GSPDFDevice=nodevice
3526 AC_MSG_NOTICE([$GSPDFDevice])
3529 AC_MSG_CHECKING([for gs PS writing device])
3530 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3535 AC_MSG_NOTICE([$GSPSDevice])
3538 AC_MSG_CHECKING([for gs EPS writing device])
3539 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3542 GSEPSDevice=nodevice
3544 AC_MSG_NOTICE([$GSEPSDevice])
3547 AC_SUBST(GSAlphaDevice)
3548 AC_SUBST(GSCMYKDevice)
3549 AC_SUBST(GSColorDevice)
3550 AC_SUBST(GSEPSDevice)
3551 AC_SUBST(GSMonoDevice)
3552 AC_SUBST(GSPDFDevice)
3553 AC_SUBST(GSPSDevice)
3557 # PerlMagick-related configuration
3560 # Look for PERL if PerlMagick requested
3561 # If name/path of desired PERL interpreter is specified, look for that one first
3563 if test "$with_perl" != 'no'; then
3564 AC_MSG_NOTICE([-------------------------------------------------------------])
3565 AC_MSG_CHECKING([for Perl])
3567 if test "$with_perl" != 'yes'; then
3568 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3569 PERL=$ac_cv_path_PERL
3571 have_perl="$ac_cv_path_PERL"
3573 AC_PATH_PROGS(PERL,perl perl5,)dnl
3574 if test "$ac_cv_path_PERL"; then
3575 have_perl="$ac_cv_path_PERL"
3580 if test "$with_perl" != 'yes' ; then
3581 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3584 PERL_SUPPORTS_DESTDIR='no'
3586 with_perl_static='no'
3587 with_perl_dynamic='no'
3588 if test "$have_perl" != 'no'; then
3589 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3590 with_perl_static='yes'
3592 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3593 with_perl_dynamic='yes'
3595 # Is PERL's MakeMaker new enough to support DESTDIR?
3596 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3598 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3599 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3600 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3601 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3603 # Determine path to pick up MagickCore library from for use with building PerlMagick
3604 MAGICKCORE_PATH="${LIB_DIR}"
3605 if test $with_perl_static = 'yes'; then
3606 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3607 libtool_objdir=$objdir
3609 # Linker search path to library, followed by -lMagickCore
3610 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3612 AC_SUBST(MAGICKCORE_PATH)
3614 # Create a simple string containing format names for all delegate libraries
3616 if test "$have_autotrace" = 'yes'; then DELEGATES="$DELEGATES autotrace"; fi
3617 if test "$have_bzlib" = 'yes'; then DELEGATES="$DELEGATES bzlib"; fi
3618 if test "$have_djvu" = 'yes'; then DELEGATES="$DELEGATES djvu"; fi
3619 if test "$have_dps" = 'yes'; then DELEGATES="$DELEGATES dps"; fi
3620 if test "$have_fftw" = 'yes'; then DELEGATES="$DELEGATES fftw"; fi
3621 if test "$have_fpx" = 'yes'; then DELEGATES="$DELEGATES fpx"; fi
3622 if test "$have_fontconfig" = 'yes'; then DELEGATES="$DELEGATES fontconfig"; fi
3623 if test "$have_freetype" = 'yes'; then DELEGATES="$DELEGATES freetype"; fi
3624 if test "$have_gslib" = 'yes'; then DELEGATES="$DELEGATES gs"; fi
3625 if test "$have_gvc" = 'yes'; then DELEGATES="$DELEGATES gvc"; fi
3626 if test "$have_jbig" = 'yes'; then DELEGATES="$DELEGATES jbig"; fi
3627 if test "$have_jpeg" = 'yes'; then
3628 DELEGATES="$DELEGATES jpeg";
3629 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi
3631 if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi
3632 if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi
3633 if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi
3634 if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi
3635 if test "$have_lzma" = 'yes'; then DELEGATES="$DELEGATES lzma"; fi
3636 if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi
3637 if test "$have_openexr" = 'yes'; then DELEGATES="$DELEGATES openexr"; fi
3638 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES png"; fi
3639 if test "$have_rsvg" = 'yes'; then DELEGATES="$DELEGATES rsvg"; fi
3640 if test "$have_tiff" = 'yes'; then DELEGATES="$DELEGATES tiff"; fi
3641 if test "$have_x" = 'yes'; then DELEGATES="$DELEGATES x11"; fi
3642 if test "$have_xml" = 'yes'; then DELEGATES="$DELEGATES xml"; fi
3643 if test "$have_wmf" = 'yes'; then DELEGATES="$DELEGATES wmf"; fi
3644 if test "$have_zlib" = 'yes'; then DELEGATES="$DELEGATES zlib"; fi
3649 # Handle special compiler flags
3652 # Add '-p' if prof source profiling support enabled
3653 if test "$enable_prof" = 'yes'; then
3655 CXXFLAGS="-p $CXXFLAGS"
3656 LDFLAGS="-p $LDFLAGS"
3659 # Add '-pg' if gprof source profiling support enabled
3660 if test "$enable_gprof" = 'yes'; then
3661 CFLAGS="-pg $CFLAGS"
3662 CXXFLAGS="-pg $CXXFLAGS"
3663 LDFLAGS="-pg $LDFLAGS"
3666 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3667 # This is a gcc-specific feature
3668 if test "$enable_gcov" = 'yes'; then
3669 AC_CHECK_LIB(gcov,_gcov_init)
3670 AC_CHECK_LIB(gcov,__gcov_init)
3671 case "$target_os" in
3673 OSX_GCOV_LDFLAG="-Wl,-single_module"
3679 AC_SUBST(OSX_GCOV_LDFLAG)
3680 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3681 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3682 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3686 # Build library dependency list for libMagickCore
3689 MAGICK_LIBLTDL='' # Libltdl for build
3690 MAGICK_API_LIBLTDL='' # libltdl for dependent application (API) build
3691 MAGICK_LTDLDEPS='' # extra libltdl dependencies
3692 if test "$with_ltdl" != 'no'
3694 if test \( "$with_included_ltdl" = 'no' -o "$enable_ltdl_convenience" = 'no' \) -o "$enable_ltdl_install" = 'yes'; then
3695 MAGICK_API_LIBLTDL='-lltdl'
3697 MAGICK_LIBLTDL=${LIBLTDL}
3698 MAGICK_LTDLDEPS=${LTDLDEPS}
3700 AC_SUBST(MAGICK_LIBLTDL)
3701 AC_SUBST(MAGICK_LTDLDEPS)
3703 if test "$with_modules" != 'no'; then
3704 MAGICK_DEP_LIBS="$LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
3706 MAGICK_DEP_LIBS="$JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JP2_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
3708 AC_SUBST(MAGICK_DEP_LIBS)
3711 # Remove extraneous spaces from output variables (asthetic)
3713 X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'`
3714 X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'`
3715 X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'`
3716 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'`
3718 CC=`echo $CC | sed -e 's/ */ /g'`
3719 CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'`
3720 CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'`
3721 CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'`
3722 DELEGATES=`echo $DELEGATES | sed -e 's/^ //g'`
3723 DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'`
3724 LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'`
3725 TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3726 MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
3727 #LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3729 # Pass only user-provided LIBS as "global" libraries
3735 #AC_SUBST(X_PRE_LIBS)
3737 #AC_SUBST(X_EXTRA_LIBS)
3739 MAGICK_CFLAGS=$CFLAGS
3740 MAGICK_CXXFLAGS="$CXXFLAGS"
3741 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3742 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3743 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3744 MAGICK_LIBS="-lMagickCore $MAGICK_DEP_LIBS $MAGICK_API_LIBLTDL"
3746 AC_SUBST(MAGICK_CFLAGS)
3747 AC_SUBST(MAGICK_CXXFLAGS)
3748 AC_SUBST(MAGICK_CPPFLAGS)
3749 AC_SUBST(MAGICK_PCFLAGS)
3750 AC_SUBST(MAGICK_LDFLAGS)
3751 AC_SUBST(MAGICK_LIBS)
3752 AC_SUBST(MAGICK_FEATURES)
3754 # Set configured scripts to executable.
3755 AC_CONFIG_COMMANDS([default],[],[])
3756 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3757 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3758 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3759 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3761 AC_MSG_NOTICE([-------------------------------------------------------------])
3762 AC_MSG_NOTICE([Update ImageMagick configuration])
3765 rm -f magick-version
3767 result_dejavu_font_dir='none'
3768 if test "${dejavu_font_dir}x" != 'x'; then
3769 result_dejavu_font_dir=$dejavu_font_dir
3772 result_ghostscript_font_dir='none'
3773 if test "${ghostscript_font_dir}x" != 'x'; then
3774 result_ghostscript_font_dir=$ghostscript_font_dir
3777 result_windows_font_dir='none'
3778 if test "${windows_font_dir}x" != 'x'; then
3779 result_windows_font_dir=${windows_font_dir}
3783 ImageMagick is configured as follows. Please verify that this configuration
3784 matches your expectations.
3786 Host system type: $host
3787 Build system type: $build
3790 -------------------------------------------------------------------------------
3791 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3792 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3793 Module support --with-modules=$with_modules $with_modules
3794 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3795 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3796 High Dynamic Range Imagery
3797 --enable-hdri=$enable_hdri $enable_hdri
3799 Delegate Configuration:
3800 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3801 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3802 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3803 DJVU --with-djvu=$with_djvu $have_djvu
3804 DPS --with-dps=$with_dps $have_dps
3805 FFTW --with-fftw=$with_fftw $have_fftw
3806 FlashPIX --with-fpx=$with_fpx $have_fpx
3807 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3808 FreeType --with-freetype=$with_freetype $have_freetype
3809 GhostPCL None $PCLDelegate ($PCLVersion)
3810 GhostXPS None $XPSDelegate ($XPSVersion)
3811 Ghostscript None $PSDelegate ($GSVersion)
3812 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3813 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3814 Graphviz --with-gvc=$with_gvc $have_gvc
3815 JBIG --with-jbig=$with_jbig $have_jbig
3816 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
3817 JPEG-2000 --with-jp2=$with_jp2 $have_jp2
3818 LCMS v1 --with-lcms=$with_lcms $have_lcms
3819 LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
3820 LQR --with-lqr=$with_lqr $have_lqr
3821 LZMA --with-lzma=$with_lzma $have_lzma
3822 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3823 OpenEXR --with-openexr=$with_openexr $have_openexr
3824 PANGO --with-pango=$with_pango $have_pango
3825 PERL --with-perl=$with_perl $have_perl
3826 PNG --with-png=$with_png $have_png
3827 RSVG --with-rsvg=$with_rsvg $have_rsvg
3828 TIFF --with-tiff=$with_tiff $have_tiff
3829 WEBP --with-webp=$with_webp $have_webp
3830 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
3831 WMF --with-wmf=$with_wmf $have_wmf
3832 X11 --with-x=$with_x $have_x
3833 XML --with-xml=$with_xml $have_xml
3834 ZLIB --with-zlib=$with_zlib $have_zlib
3837 X_CFLAGS = $X_CFLAGS
3838 X_PRE_LIBS = $X_PRE_LIBS
3840 X_EXTRA_LIBS = $X_EXTRA_LIBS
3842 Options used to compile and link:
3843 PREFIX = $PREFIX_DIR
3844 EXEC-PREFIX = $EXEC_PREFIX_DIR
3845 VERSION = $PACKAGE_VERSION
3848 CPPFLAGS = $MAGICK_CPPFLAGS
3849 PCFLAGS = $MAGICK_PCFLAGS
3852 MAGICK_LDFLAGS = $MAGICK_LDFLAGS
3855 CXXFLAGS = $CXXFLAGS
3856 FEATURES = $MAGICK_FEATURES