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
17 # Copying and distribution of this file, with or without modification,
18 # are permitted in any medium without royalty provided the copyright
19 # notice and this notice are preserved.
23 m4_define([magick_major_version], [7])
24 m4_define([magick_minor_version], [0])
25 m4_define([magick_micro_version], [0])
26 m4_define([magick_patchlevel_version], [0])
27 m4_define([magick_version],
28 [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
29 m4_define([magick_svn_revision], esyscmd([sh -c "(svnversion .) | awk '{ print \$1 }' | tr -d '\n'"]))
31 AC_INIT([ImageMagick],[magick_version],[http://www.imagemagick.org],[ImageMagick])
32 AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
33 AC_CONFIG_AUX_DIR([config])
34 AC_CONFIG_MACRO_DIR([m4])
35 AC_CONFIG_LIBOBJ_DIR([ltdl])
36 AC_CONFIG_HEADERS([config/config.h])
37 AX_PREFIX_CONFIG_H([MagickCore/magick-config.h],[MagickCore])
39 config/configure.xml \
40 config/delegates.xml \
41 config/ImageMagick.rdf \
42 config/MagickCore.dox \
43 config/MagickWand.dox \
44 config/type-dejavu.xml \
45 config/type-ghostscript.xml \
46 config/type-windows.xml \
49 Magick++/bin/Magick++-config \
50 MagickCore/ImageMagick.pc \
51 Magick++/lib/ImageMagick++.pc \
52 Magick++/lib/Magick++.pc \
53 MagickCore/MagickCore-config \
54 MagickCore/MagickCore.pc \
55 MagickCore/version.h \
58 PerlMagick/Magick.pm \
59 PerlMagick/Makefile.PL \
63 utilities/composite.1 \
67 utilities/identify.1 \
68 utilities/ImageMagick.1 \
73 MagickWand/MagickWand-config \
74 MagickWand/MagickWand.pc ])
77 # Save initial user-tunable values
80 for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
81 eval isset=\${$var+set}
82 if test "$isset" = 'set'; then
84 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
87 AC_SUBST(DISTCHECK_CONFIG_FLAGS)
89 CONFIGURE_ARGS="$0 ${ac_configure_args}"
90 AC_SUBST(CONFIGURE_ARGS)
92 # Source file containing package/library versioning information.
93 . ${srcdir}/version.sh
95 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
101 MAGICK_TARGET_CPU=$host_cpu
102 AC_SUBST(MAGICK_TARGET_CPU)
103 AC_DEFINE_UNQUOTED(MAGICK_TARGET_CPU,$MAGICK_TARGET_CPU,[Target Host CPU])
105 MAGICK_TARGET_VENDOR=$host_vendor
106 AC_SUBST(MAGICK_TARGET_VENDOR)
107 AC_DEFINE_UNQUOTED(MAGICK_TARGET_VENDOR,$MAGICK_TARGET_VENDOR,[Target Host Vendor])
109 MAGICK_TARGET_OS=$host_os
110 AC_SUBST(MAGICK_TARGET_OS)
111 AC_DEFINE_UNQUOTED(MAGICK_TARGET_OS,$MAGICK_TARGET_OS,[Target Host OS])
113 # Substitute library versioning
114 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
115 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
116 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
117 AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
118 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
119 AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
120 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
121 AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision])
123 AC_SUBST(PACKAGE_NAME)dnl
124 AC_SUBST(PACKAGE_VERSION)dnl
125 AC_SUBST(PACKAGE_PERL_VERSION)dnl
126 AC_SUBST(PACKAGE_RELEASE)dnl
127 AC_SUBST(PACKAGE_CHANGE_DATE)dnl
128 AC_SUBST(PACKAGE_LIB_VERSION)dnl
129 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
130 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
131 AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
133 # Ensure that make can run correctly
136 AM_INIT_AUTOMAKE([1.11 color-tests foreign parallel-tests silent-rules subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip])
138 # Enable support for silent build rules
139 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
141 MAGICK_LIB_VERSION="0x"
142 if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
143 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
145 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
146 if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
147 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
149 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
150 if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
151 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
153 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
154 AC_SUBST(MAGICK_LIB_VERSION)
156 # Definition used to define MagickLibVersionText in version.h
157 MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
158 AC_SUBST(MAGICK_LIB_VERSION_TEXT)
160 # Definition used to define MagickLibVersionNumber in version.h
161 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
162 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
164 # Regenerate config.status if ChangeLog or version.sh is updated.
165 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
170 MAGICK_CPPFLAGS=$CPPFLAGS_USER
171 MAGICK_PCFLAGS=$CPPFLAGS_USER
177 # Evaluate shell variable equivalents to Makefile directory variables
179 if test "x$prefix" = xNONE; then
180 prefix=$ac_default_prefix
182 # Let make expand exec_prefix.
183 if test "x$exec_prefix" = xNONE; then
184 exec_prefix='${prefix}'
188 eval "eval PREFIX_DIR=${prefix}"
190 eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
191 AC_SUBST(EXEC_PREFIX_DIR)
192 eval "eval BIN_DIR=$bindir"
194 eval "eval SBIN_DIR=$sbindir"
196 eval "eval LIBEXEC_DIR=$libexecdir"
197 AC_SUBST(LIBEXEC_DIR)
198 eval "eval DATA_DIR=$datadir"
200 eval "eval DOC_DIR=$datadir/doc"
202 eval "eval SYSCONF_DIR=$sysconfdir"
203 AC_SUBST(SYSCONF_DIR)
204 eval "eval SHAREDSTATE_DIR=$sharedstatedir"
205 AC_SUBST(SHAREDSTATE_DIR)
206 eval "eval LOCALSTATE_DIR=$localstatedir"
207 AC_SUBST(LOCALSTATE_DIR)
208 eval "eval LIB_DIR=$libdir"
210 eval "eval INCLUDE_DIR=$includedir"
211 AC_SUBST(INCLUDE_DIR)
212 eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
213 AC_SUBST(PERSISTINCLUDE_DIR)
214 eval "eval INFO_DIR=$infodir"
216 eval "eval MAN_DIR=$mandir"
219 # Get full paths to source and build directories
220 srcdirfull="`cd $srcdir && pwd`"
224 # Compute variables useful for running uninstalled software.
226 MAGICK_CODER_MODULE_PATH="${builddir}/coders"
227 MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
228 MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
229 MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
231 case "${build_os}" in
233 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
234 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
235 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
236 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
245 AC_SUBST(MAGICK_CODER_MODULE_PATH)
246 AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
247 AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
248 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
253 # Enable OS features.
255 AC_USE_SYSTEM_EXTENSIONS
273 AX_GCC_ARCHFLAG([no])
277 # Enable run-time checking.
279 AC_ARG_ENABLE([bounds-checking],
280 [AC_HELP_STRING([--enable-bounds-checking],
281 [enable run-time bounds-checking])],
282 [enable_bounds_checking=$enableval],
283 [enable_bounds_checking='no'])
285 if test "$enable_bounds_checking" = yes; then
286 AC_DEFINE([_FORTIFY_SOURCE], [2],
287 [enable run-time bounds-checking])
297 native_win32_build='no'
305 native_win32_build='yes'
309 if test "${GDI32_LIBS}x" != 'x'; then
310 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
313 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
314 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
315 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
316 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
318 WinPathScript="${srcdirfull}/winpath.sh"
319 AC_SUBST(WinPathScript)
322 # Compiler flags tweaks
324 if test "${GCC}" != "yes"; then
327 # aCC: HP ANSI C++ B3910B A.03.34
328 CFLAGS="${CFLAGS} -Wp,-H30000"
329 if test -n "${CXXFLAGS}"; then
332 CXXFLAGS="${CXXFLAGS} -AA"
336 # Compaq alphaev68-dec-osf5.1 compiler
337 if test -n "${CXXFLAGS}"; then
338 CXXFLAGS='-std strict_ansi -noimplicit_include'
340 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
345 # Check for lazy-loading.
346 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
348 im_cv_ld_lazyload='none'
350 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
351 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
352 im_cv_ld_lazyload='-Wl,-zlazyload'
357 if test "${im_cv_ld_lazyload}" != 'none' ; then
358 if test -z "${LDFLAGS}" ; then
359 LDFLAGS="${im_cv_ld_lazyload}"
361 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
365 dnl Platform-specific stuff
367 *darwin* | *-macos10*)
368 dnl OS X universal binary support, requires --disable-dependency-tracking
369 AC_ARG_ENABLE([osx-universal-binary],
370 AC_HELP_STRING([--enable-osx-universal-binary],
371 [build universal binary on OS X [[default=no]]]),
372 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
374 if test "${build_osxuniversal}" != no ; then
375 if test "$enable_dependency_tracking" != no ; then
376 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
377 Please re-run configure with these options:
378 --disable-dependency-tracking --enable-osx-universal-binary
381 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
382 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
383 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
389 # ARCH specific include directory
391 AC_ARG_WITH([includearch-dir],
392 [AC_HELP_STRING([--includearch-dir=DIR],
393 [ARCH specific include directory])],
394 [includearch_dir=$withval],
395 [includearch_dir=$INCLUDE_DIR])
397 eval "eval INCLUDEARCH_DIR=$includearch_dir"
398 AC_SUBST(INCLUDEARCH_DIR)
401 # ARCH specific configuration directory
403 AC_ARG_WITH([sharearch-dir],
404 [AC_HELP_STRING([--sharearch-dir=DIR],
405 [ARCH specific config directory])],
406 [sharearch_dir=$withval],
407 [sharearch_dir="${LIB_DIR}"])
409 eval "eval SHAREARCH_DIR=$sharearch_dir"
410 SHAREARCH_DIR="$sharearch_dir"
411 AC_SUBST(SHAREARCH_DIR)
414 # Enable support for threads
415 AC_ARG_WITH([threads],
416 [AC_HELP_STRING([--without-threads], [disable threads support])],
417 [with_threads=$withval],
418 [with_threads='yes'])
421 if test "$with_threads" != 'no'; then
423 if test "$ax_pthread_ok" = yes; then
425 DEF_THREAD="$PTHREAD_CFLAGS"
426 CFLAGS="$CFLAGS $DEF_THREAD"
427 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
428 if test "$CC" != "$PTHREAD_CC"; then
429 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
432 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
436 # Enable support for OpenMP
437 if test "$have_threads" != 'yes'; then
438 ac_cv_prog_c_openmp=unsupported
441 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
442 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
443 AC_SUBST(OPENMP_CFLAGS)
444 if test "$enable_openmp" != no; then
445 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
446 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
450 # Enable support for OpenCL
452 CFLAGS="$CL_CFLAGS $CFLAGS"
453 LIBS="$CL_LIBS $LIBS"
455 if test "$enable_opencl" != no; then
456 if test "X$ax_cv_check_cl_libcl" != Xno; then :
457 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
463 # Check for large file support
469 if test "$enable_largefile" != no; then
470 case $ac_cv_sys_file_offset_bits in
472 # nothing to do here as the host supports LFS fine
475 AC_MSG_CHECKING([for native large file support])
476 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
478 exit(!(sizeof(off_t) == 8));
480 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
481 AC_MSG_NOTICE([yes])],
482 [AC_MSG_NOTICE([no])])
485 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
488 if test "$ac_cv_sys_large_files" != 'no'; then
489 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
491 if test "$ac_cv_sys_largefile_source" != 'no'; then
492 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
495 AC_SUBST(LFS_CPPFLAGS)
501 AC_SUBST(LIBTOOL_DEPS)
504 LT_CONFIG_LTDL_DIR([ltdl])
505 LTDL_INIT([convenience nonrecursive])
507 # Check to see if building shared libraries
508 libtool_build_shared_libs='no'
509 if test "$enable_shared" = 'yes'; then
510 libtool_build_shared_libs='yes'
513 # Check to see if building static libraries
514 libtool_build_static_libs='no'
515 if test "$enable_static" = 'yes'; then
516 libtool_build_static_libs='yes'
519 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
521 # Enable support for building loadable modules
523 AC_ARG_WITH([modules],
524 [AC_HELP_STRING([--with-modules],
525 [enable building dynamically loadable modules])],
526 [with_modules=$withval],
529 # Only allow building loadable modules if we are building shared libraries
530 if test "$with_modules" != 'no' ; then
531 if test "$libtool_build_shared_libs" = 'no'; then
532 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
536 if test "$with_modules" != 'no'; then
537 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
539 AM_CONDITIONAL(WITH_MODULES, test "$with_modules" != 'no')
541 # Enable building/use of libltdl if we are building shared libraries regardless
542 # of whether modules are built or not.
544 if test "$libtool_build_shared_libs" != 'no'; then
548 AM_CONDITIONAL(WITH_LTDL, test "$with_ltdl" != 'no')
549 if test "$with_ltdl" != 'no'; then
550 AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules)
553 if test X"$enable_shared" = Xyes; then
554 DLLDFLAGS=-export-dynamic
559 # Enable build using delegate libraries built in subdirectories rather than installed
560 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
561 AC_ARG_ENABLE([delegate-build],
562 [AC_HELP_STRING([--enable-delegate-build],
563 [look for delegate libraries in build directory])],
564 [enable_delegate_build=$enableval],
565 [enable_delegate_build='no'])
567 AC_ARG_ENABLE([deprecated],
568 [AC_HELP_STRING([--disable-deprecated],
569 [exclude deprecated methods in MagickCore and MagickWand API's])],
570 [enable_deprecated=$enableval],
571 [enable_deprecated='no'])
573 if test "$enable_deprecated" = 'yes'; then
574 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
576 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
579 # Build a version of ImageMagick which operates uninstalled.
580 # Used to build distributions located via MAGICK_HOME / executable path
581 AC_ARG_ENABLE([installed],
582 [AC_HELP_STRING([--disable-installed],
583 [Formally install ImageMagick under PREFIX])],
584 [enable_installed=$enableval],
585 [enable_installed='yes'])
587 if test "$enable_installed" = 'yes'; then
588 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
590 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
593 # Permit enciphering and deciphering image pixels.
594 AC_ARG_ENABLE([cipher],
595 [AC_HELP_STRING([--disable-cipher],
596 [disable enciphering and deciphering image pixels])],
597 [enable_cipher=$enableval],
598 [enable_cipher='yes'])
600 if test "$enable_cipher" = 'yes'; then
601 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
604 # Build a zero-configuration version of ImageMagick.
605 AC_ARG_ENABLE([zero-configuration],
606 [AC_HELP_STRING([--enable-zero-configuration],
607 [enable self-contained, embeddable, zero-configuration ImageMagick])],
608 [enable_zero_configuration=$enableval],
609 [enable_zero_configuration='no'])
611 if test "$enable_zero_configuration" = 'yes'; then
612 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
613 MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES"
616 # Build a high dynamic range version of ImageMagick.
617 AC_ARG_ENABLE([hdri],
618 [AC_HELP_STRING([--enable-hdri],
619 [accurately represent the wide range of intensity levels found in real scenes])],
620 [enable_hdri=$enableval],
624 if test "$enable_hdri" = 'yes'; then
626 AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
627 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
629 AC_SUBST(MAGICK_HDRI)dnl
631 # Build a version of ImageMagick with assert statements.
632 AC_ARG_ENABLE([assert],
633 [AC_HELP_STRING([--disable-assert],
634 [disable assert() statements in build])],
635 [enable_assert=$enableval],
636 [enable_assert='yes'])
638 if test "$enable_assert" = 'no'; then
639 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
642 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
645 # Enable ccmalloc memory debugging support
646 AC_ARG_ENABLE([ccmalloc],
647 [AC_HELP_STRING([--enable-ccmalloc],
648 [enable 'ccmalloc' memory debug support])],
649 [enable_ccmalloc=$enableval],
650 [enable_ccmalloc='no'])
652 # Enable Electric Fence memory debugging support
653 AC_ARG_ENABLE([efence],
654 [AC_HELP_STRING([--enable-efence],
655 [enable 'efence' memory debug support])],
656 [enable_efence=$enableval],
657 [enable_efence='no'])
659 # Enable prof-based profiling support
660 AC_ARG_ENABLE([prof],
661 [AC_HELP_STRING([--enable-prof],
662 [enable 'prof' profiling support])],
663 [enable_prof=$enableval],
666 # Enable gprof-based profiling support
667 AC_ARG_ENABLE([gprof],
668 [AC_HELP_STRING([--enable-gprof],
669 [enable 'gprof' profiling support])],
670 [enable_gprof=$enableval],
673 # Enable gcov-based profiling support
674 AC_ARG_ENABLE([gcov],
675 [AC_HELP_STRING([--enable-gcov],
676 [enable 'gcov' profiling support])],
677 [enable_gcov=$enableval],
680 enable_profiling='no'
681 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
682 enable_profiling='yes'
683 if test "$libtool_build_shared_libs" = 'yes'; then
684 echo "Warning: Can not profile code using shared libraries"
688 # Magick API method prefix
689 AC_ARG_WITH([method-prefix],
690 [AC_HELP_STRING([--with-method-prefix=PREFIX],
691 [prefix MagickCore API methods])],
692 [with_method_prefix=$withval],
693 [with_method_prefix='no'])
695 if test "$with_method_prefix" != 'no'; then
696 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
697 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
700 # Enable legacy support (default no)
701 AC_ARG_ENABLE(legacy-support,
702 [ --enable-legacy-support install legacy command-line utilities (default disabled)],
703 [with_legacy_support=$enableval],
704 [with_legacy_support='no'])
705 AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no')
707 # Number of bits in a Quantum
708 AC_ARG_WITH([quantum-depth],
709 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
710 [number of bits in a pixel quantum (default 16)])],
711 [with_quantum_depth=$withval],
712 [with_quantum_depth=16])
714 if test "$with_quantum_depth" != '8'; then
715 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
718 case "${with_quantum_depth}" in
723 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
725 QUANTUM_DEPTH="$with_quantum_depth"
726 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
727 AC_SUBST(QUANTUM_DEPTH)dnl
729 # Set pixel cache threshold
731 [AC_HELP_STRING([--with-cache=THRESHOLD],
732 [set pixel cache threshhold in MB (default available memory)])],
733 [with_cache=$withval],
736 if test "$with_cache" != ''; then
737 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
738 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
741 # Disable/Enable support for full delegate paths
742 AC_ARG_WITH([frozenpaths],
743 [AC_HELP_STRING([--with-frozenpaths],
744 [freeze delegate paths])],
745 [with_frozenpaths=$withval],
746 [with_frozenpaths='no'])
748 # Enable build/install of Magick++
749 AC_ARG_WITH([magick-plus-plus],
750 [AC_HELP_STRING([--without-magick-plus-plus],
751 [disable build/install of Magick++])],
752 [with_magick_plus_plus=$withval],
753 [with_magick_plus_plus='yes'])
755 # Disable build/install of PerlMagick.
757 [AC_HELP_STRING([--with-perl],
758 [enable build/install of PerlMagick])],
759 [with_perl=$withval],
762 # Options to pass when configuring PerlMagick
763 AC_ARG_WITH([perl-options],
764 [AC_HELP_STRING([--with-perl-options=OPTIONS],
765 [options to pass on command-line when generating PerlMagick build file])],
766 PERL_MAKE_OPTIONS=$withval)
767 AC_SUBST(PERL_MAKE_OPTIONS)
769 # Enable umem, object-caching memory allocation library.
771 [ --with-umem enable umem memory allocation library support],
772 [with_umem=$withval],
774 if test "$with_umem" != 'yes' ; then
775 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
779 # Specify path to shared libstdc++ if not in normal location
781 AC_ARG_WITH([libstdc],
782 [AC_HELP_STRING([--with-libstdc=DIR],
783 [ use libstdc++ in DIR (for GNU C++)])],
784 [with_libstdc=$withval],
787 if test "$with_libstdc" != ''; then
788 if test -d "$with_libstdc"; then
789 LIBSTDCLDFLAGS="-L$with_libstdc"
792 AC_SUBST(LIBSTDCLDFLAGS)
794 # Does gcc required -traditional?
795 AC_PROG_GCC_TRADITIONAL
799 # Set defines required to build DLLs and modules using MinGW
802 # These options are set for multi-thread DLL module build
803 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
805 # executable/Magick++: _DLL _MAGICKMOD_
806 MODULE_EXTRA_CPPFLAGS=''
807 LIBRARY_EXTRA_CPPFLAGS=''
808 if test "${native_win32_build}" = 'yes'; then
809 if test "${libtool_build_shared_libs}" = 'yes'; then
810 CPPFLAGS="$CPPFLAGS -D_DLL"
811 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
812 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
813 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
814 if test "$with_modules" = 'yes'; then
815 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
817 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
820 CPPFLAGS="$CPPFLAGS -D_LIB"
821 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
822 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
824 if test "$with_threads" = 'yes'; then
825 CPPFLAGS="$CPPFLAGS -D_MT"
826 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
827 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
830 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
831 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
833 # Check standard headers
835 if ! test x"$ac_cv_header_stdc" = x"yes"; then
836 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
837 header files. Compilation cannot proceed. Please install the ANSI C
838 headers and rerun this script.]);
843 # Check additional headers
844 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)
848 # Checks for typedefs, structures, and compiler characteristics.
861 # If the C compiler supports the keyword inline, do nothing. Otherwise
862 # define inline to __inline__ or __inline if it accepts one of those,
863 # otherwise define inline to be empty.
866 # If the C compiler supports the keyword restrict, do nothing. Otherwise
867 # define restrict to __restrict__ or __restrict if it accepts one of those,
868 # otherwise define restrict to be empty.
871 # If words are stored with the most significant byte first (like
872 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
875 # Define to a suitable type, if standard headers do not define it.
883 AC_TYPE_LONG_DOUBLE_WIDER
884 AC_TYPE_LONG_LONG_INT
898 AC_TYPE_UNSIGNED_LONG_LONG_INT
900 # If the C type char is unsigned, define __CHAR_UNSIGNED__, unless the
901 # C compiler predefines it.
904 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
905 AC_CHECK_SIZEOF(signed short)
907 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
908 AC_CHECK_SIZEOF(unsigned short)
910 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
911 AC_CHECK_SIZEOF(signed int)
913 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
914 AC_CHECK_SIZEOF(unsigned int)
916 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
917 AC_CHECK_SIZEOF(signed long)
919 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
920 AC_CHECK_SIZEOF(unsigned long)
922 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
923 # 'signed long long' is not supported then the value defined is zero.
924 AC_CHECK_SIZEOF(signed long long)
926 # Obtain size of a 'unsigned long long' and define as
927 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
928 # supported then the value defined is zero.
929 AC_CHECK_SIZEOF(unsigned long long)
931 # Obtain size of off_t and define as SIZEOF_OFF_T
932 AC_CHECK_SIZEOF(off_t)
934 # Obtain size of size_t and define as SIZEOF_SIZE_T
935 AC_CHECK_SIZEOF(size_t)
937 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
938 AC_CHECK_SIZEOF(ssize_t)
940 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
941 AC_CHECK_SIZEOF(unsigned int*)
944 # Compute sized types for current CPU and compiler options.
947 AC_MSG_CHECKING(for signed 8-bit type)
949 AC_MSG_NOTICE($INT8_T)
952 AC_MSG_CHECKING(for unsigned 8-bit type)
953 UINT8_T='unsigned char'
954 AC_MSG_NOTICE($UINT8_T)
957 AC_MSG_CHECKING(for signed 16-bit type)
958 INT16_T='signed short'
959 AC_MSG_NOTICE($INT16_T)
962 AC_MSG_CHECKING(for unsigned 16-bit type)
963 UINT16_T='unsigned short'
964 AC_MSG_NOTICE($UINT16_T)
967 AC_MSG_CHECKING(for signed 32-bit type)
970 if test $ac_cv_sizeof_signed_int -eq 4; then
973 elif test $ac_cv_sizeof_signed_long -eq 4; then
974 INT32_T='signed long'
977 AC_MSG_NOTICE($INT32_T)
981 AC_MSG_CHECKING(for unsigned 32-bit type)
984 if test $ac_cv_sizeof_unsigned_int -eq 4; then
985 UINT32_T='unsigned int'
987 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
988 UINT32_T='unsigned long'
991 AC_MSG_NOTICE($UINT32_T)
995 AC_MSG_CHECKING(for signed 64-bit type)
998 if test $ac_cv_sizeof_signed_long -eq 8; then
999 INT64_T='signed long'
1001 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
1002 INT64_T='signed long long'
1005 case "${host_os}" in
1010 AC_MSG_NOTICE($INT64_T)
1014 AC_MSG_CHECKING(for unsigned 64-bit type)
1017 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1018 UINT64_T='unsigned long'
1020 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1021 UINT64_T='unsigned long long'
1024 case "${host_os}" in
1029 AC_MSG_NOTICE($UINT64_T)
1033 AC_MSG_CHECKING(for unsigned maximum type)
1036 if test "$UINT64_T" != 'none'; then
1039 elif test "$UINT32_T" != 'none'; then
1043 AC_MSG_NOTICE($UINTMAX_T)
1047 AC_MSG_CHECKING(for pointer difference type)
1050 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1051 UINTPTR_T='unsigned long'
1053 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1054 UINTPTR_T='unsigned long long'
1057 AC_MSG_NOTICE($UINTPTR_T)
1061 AC_MSG_CHECKING([whether our compiler supports __func__])
1063 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1064 AC_MSG_NOTICE([yes]),
1066 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1068 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1069 AC_MSG_NOTICE([yes])
1070 AC_DEFINE(__func__, __FUNCTION__,
1071 [Define to appropriate substitue if compiler does not have __func__]),
1073 AC_DEFINE(__func__, __FILE__,
1074 [Define to appropriate substitue if compiler does not have __func__])))
1078 # Check for functions
1081 MAGICK_FUNC_MMAP_FILEIO
1082 AC_FUNC_CLOSEDIR_VOID
1086 AC_FUNC_SELECT_ARGTYPES
1087 AC_FUNC_SETVBUF_REVERSED
1097 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1098 LIBS="$MATH_LIBS $LIBS"
1101 AC_CHECK_FUNCS([acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir 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])
1104 # Check for clock_gettime().
1106 AC_SEARCH_LIBS(clock_gettime, rt,
1108 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1109 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1112 [[#include <time.h>]],
1113 [[clockid_t clockType = CLOCK_REALTIME;]])],
1116 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1117 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1123 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1129 # Check for function prototypes
1133 AC_CHECK_DECLS([pread, pwrite],[],[],[
1134 #include <unistd.h>])
1136 AC_CHECK_DECLS([strlcpy],[],[],[
1137 #include <strings.h>])
1139 AC_CHECK_DECLS([vsnprintf],[],[],[
1141 #include <stdarg.h>])
1145 # C++ Support Tests (For Magick++)
1148 have_magick_plus_plus='no'
1149 if test "$with_magick_plus_plus" = 'yes'; then
1154 # Full set of headers used...
1155 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1156 # functional iomanip iosfwd iostream iterator list string strstream utility
1161 AX_CXX_NAMESPACE_STD
1162 AC_CXX_HAVE_STD_LIBS
1166 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1168 test $ax_cv_cxx_bool = 'yes' && \
1169 test $ax_cv_cxx_namespaces = 'yes' && \
1170 test $ac_cv_cxx_have_std_libs = 'yes' && \
1171 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1172 have_magick_plus_plus='yes'
1174 have_magick_plus_plus='no (failed tests)'
1176 AC_MSG_NOTICE([$have_magick_plus_plus])
1179 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1181 # Only check for delegate libraries in subdirectories if requested.
1182 if test "$enable_delegate_build" != 'no'; then
1183 # Check for delegate sub-directories and add -I & -L options as required.
1184 # This presumes that delegates are installed as detailed in the ImageMagick
1185 # README. If delegates are installed in a standard location where the
1186 # compiler will automatically find them then these options should not be
1190 # Most delegates have includes in the same directory as the library, but not all...
1193 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
1194 if test -d "$builddir/$dir"; then
1195 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1197 if test -d "$srcdirfull/$dir"; then
1198 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1204 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
1205 if test -d "$builddir/$dir/.libs"; then
1206 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1208 if test -d "$srcdirfull/$dir/.libs"; then
1209 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1212 if test -d "$builddir/$dir"; then
1213 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1215 if test -d "$srcdirfull/$dir"; then
1216 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1222 # Assume that delegate headers reside under same directory as ImageMagick
1223 # installation prefix.
1224 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/ImageMagick $MAGICK_CPPFLAGS"
1227 # Find the X11 RGB database
1229 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1230 [# Look for the header file in a standard set of common directories.
1231 # Check X11 before X11Rn because it is often a symlink to the current release.
1240 /usr/XFree86/lib/X11 \
1248 /usr/local/X11/lib \
1249 /usr/local/X11R4/lib \
1250 /usr/local/X11R5/lib \
1251 /usr/local/X11R6/lib \
1253 /usr/local/lib/X11 \
1254 /usr/local/lib/X11R4 \
1255 /usr/local/lib/X11R5 \
1256 /usr/local/lib/X11R6 \
1257 /usr/local/lib/X11R7 \
1258 /usr/local/x11r5/lib \
1259 /usr/lpp/Xamples/lib \
1261 /usr/openwin/share/lib \
1262 /usr/unsupported/lib \
1265 if test -f "$ac_dir/X11/rgb.txt"; then
1266 im_cv_x_configure="$ac_dir/X11/"
1268 elif test -f "$ac_dir/rgb.txt"; then
1269 im_cv_x_configure="$ac_dir/"
1274 X11_CONFIGURE_PATH="$im_cv_x_configure"
1275 case "${build_os}" in
1277 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1280 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",Location of X11 configure files)
1283 # Find OpenMP library
1286 if test "$enable_openmp" != 'no'; then
1287 if test "${GCC}" = "yes"; then
1288 # Open64 (passes for GCC but uses different OpenMP implementation)
1289 if test "x$GOMP_LIBS" = x ; then
1290 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1291 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1295 if test "x$GOMP_LIBS" = x ; then
1296 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1300 if test "x$GOMP_LIBS" = x ; then
1301 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1304 if test "x$GOMP_LIBS" = x ; then
1305 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1307 # SGI IRIX 6.5 MIPSpro C/C++
1308 if test "x$GOMP_LIBS" = x ; then
1309 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1312 LIBS="$GOMP_LIBS $LIBS"
1317 # Find Posix threads library
1320 if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then
1322 if test "x$PTHREAD_LIBS" = "x"; then
1323 case "${host_cpu}-${host_os}" in
1325 MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;;
1329 for lib in pthread pthreads; do
1330 if test "x$PTHREAD_LIBS" = "x"; then
1331 MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib])
1335 THREAD_LIBS="$PTHREAD_LIBS"
1336 LIBS="$LIBS $THREAD_LIBS"
1338 AC_SUBST(THREAD_LIBS)
1345 if test "$with_umem" != 'no'; then
1346 AC_MSG_CHECKING(for UMEM support )
1350 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1351 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1352 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1353 AC_MSG_CHECKING(if umem memory allocation library is complete)
1354 if test $passed -gt 0; then
1355 if test $failed -gt 0; then
1356 AC_MSG_NOTICE(no -- some components failed test)
1357 have_umem='no (failed tests)'
1360 LIBS="$UMEM_LIBS $LIBS"
1361 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1369 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1373 # Add support for ccmalloc memory debugging library if requested
1377 if test "$enable_ccmalloc" = 'yes'; then
1378 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1379 if test -n "$CCMALLOCDelegate"; then
1380 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1382 # Assume that gcc is used with ccmalloc.
1383 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1384 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1385 if test -n "$CCMALLOC_LIBS"; then
1387 LIBS="$LIBS $CCMALLOC_LIBS"
1396 # Add support for efence memory debugging library if requested
1398 if test "$enable_efence" = 'yes'; then
1399 EFENCE_LIBS='-lefence'
1400 LIBS="$EFENCE_LIBS $LIBS"
1403 dnl ===========================================================================
1409 AC_ARG_WITH([bzlib],
1410 [AC_HELP_STRING([--without-bzlib],
1411 [disable BZLIB support])],
1412 [with_bzlib=$withval],
1415 if test "$with_bzlib" != 'yes'; then
1416 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1420 if test "$with_bzlib" != 'no'; then
1422 AC_MSG_NOTICE([-------------------------------------------------------------])
1423 AC_MSG_CHECKING([for BZLIB])
1428 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1429 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1430 if test "$native_win32_build" = 'yes'; then
1431 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1433 if test $found_libbz -gt 0; then
1434 passed=`expr $passed + 1`
1436 failed=`expr $failed + 1`
1438 AC_MSG_CHECKING(if BZLIB package is complete)
1439 if test $passed -gt 0; then
1440 if test $failed -gt 0; then
1441 AC_MSG_NOTICE(no -- some components failed test)
1442 have_bzlib='no (failed tests)'
1445 LIBS="$BZLIB_LIBS $LIBS"
1446 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1454 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1455 AC_SUBST(BZLIB_LIBS)
1458 # Find the X11 include and library directories.
1465 if test "$no_x" != 'yes'; then
1466 AC_MSG_NOTICE([-------------------------------------------------------------])
1467 AC_MSG_CHECKING([for X11])
1469 LDFLAGS="$LDFLAGS $X_LIBS"
1470 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1471 LIBS="$X11_LIBS $LIBS"
1472 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1474 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1477 # Check for X11 shared memory extension
1479 # shmctl is required to support the shared memory extension
1480 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1481 if test "$have_shmctl" != 'yes'; then
1483 LIBS="$LIBS -lcygipc"
1484 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1488 if test "$have_shmctl" = 'yes'; then
1489 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1493 # Check for X11 shape extension
1495 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1496 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1497 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1499 if test "$no_x" != 'yes'; then
1504 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1508 dnl ===========================================================================
1514 [AC_HELP_STRING([--without-zlib],
1515 [disable ZLIB support])],
1516 [with_zlib=$withval],
1519 if test "$with_zlib" != 'yes'; then
1520 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1525 dnl PNG requires zlib so enable zlib check if PNG is requested
1526 if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
1527 AC_MSG_NOTICE([-------------------------------------------------------------])
1528 AC_MSG_CHECKING([for ZLIB])
1533 AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1534 AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1535 AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1536 AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1537 AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1538 AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1539 AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1540 AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1541 AC_MSG_CHECKING([if ZLIB package is complete])
1542 if test $passed -gt 0; then
1543 if test $failed -gt 0; then
1544 AC_MSG_NOTICE([no -- some components failed test])
1545 have_zlib='no (failed tests)'
1548 LIBS="$ZLIB_LIBS $LIBS"
1549 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
1550 AC_MSG_NOTICE([yes])
1557 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1561 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1564 if test "$enable_profiling" = 'yes'; then
1565 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1566 LIBS="$LIB_DL $LIBS"
1570 dnl ===========================================================================
1573 # Check for Autotrace delegate library.
1575 AC_ARG_WITH([autotrace],
1576 [AC_HELP_STRING([--with-autotrace],
1577 [enable autotrace support])],
1578 [with_autotrace=$withval],
1579 [with_autotrace='no'])
1581 if test "$with_autotrace" != 'yes'; then
1582 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1589 if test "x$with_autotrace" = "xyes"; then
1590 AC_MSG_NOTICE([-------------------------------------------------------------])
1591 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1595 if test "$have_autotrace" = 'yes'; then
1597 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1598 if test "$with_modules" = 'no'; then
1599 CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
1603 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1604 AC_SUBST(AUTOTRACE_CFLAGS)
1605 AC_SUBST(AUTOTRACE_LIBS)
1607 dnl ===========================================================================
1610 # Check for Display Postscript delegate library.
1613 [AC_HELP_STRING([--without-dps],
1614 [disable Display Postscript support])],
1615 [with_dps=$withval],
1618 if test "$with_dps" != 'yes'; then
1619 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1624 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1625 AC_MSG_NOTICE([-------------------------------------------------------------])
1626 AC_MSG_CHECKING([for DPS])
1630 PERSIST_CPPFLAGS="$CPPFLAGS"
1631 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1632 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1634 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1635 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1636 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1637 # ImageMagick itself doesn't use -lXt.
1640 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1641 if test "$have_libdps" != 'yes'; then
1642 # Unset cache variable so we can try again.
1643 unset ac_cv_lib_dps_DPSInitialize
1644 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1645 if test "$have_libdps" = 'yes'; then
1649 if test "$have_libdps" = 'yes'; then
1650 passed=`expr $passed + 1`
1652 failed=`expr $failed + 1`
1654 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1655 AC_MSG_CHECKING([if DPS package is complete])
1656 if test $passed -gt 0; then
1657 if test $failed -gt 0; then
1658 AC_MSG_NOTICE([no -- some components failed test])
1659 have_dps='no (failed tests)'
1660 CPPFLAGS="$PERSIST_CPPFLAGS"
1662 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1663 LIBS="$DPS_LIBS $LIBS"
1664 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1665 AC_MSG_NOTICE([yes])
1670 CPPFLAGS=$PERSIST_CPPFLAGS
1673 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1676 dnl ===========================================================================
1679 # Check for DJVU delegate library.
1682 [AC_HELP_STRING([--without-djvu],
1683 [disable DjVu support])],
1684 [with_djvu=$withval],
1687 if test "$with_djvu" != 'yes'; then
1688 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1693 if test "$with_djvu" != 'no'; then
1694 AC_MSG_NOTICE([-------------------------------------------------------------])
1695 AC_MSG_CHECKING([for DJVU])
1699 AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1700 AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1701 AC_MSG_CHECKING([if DJVU package is complete])
1702 if test $passed -gt 0; then
1703 if test $failed -gt 0; then
1704 AC_MSG_NOTICE([no -- some components failed test])
1705 have_djvu='no (failed tests)'
1707 DJVU_LIBS='-ldjvulibre'
1708 LIBS="$DJVU_LIBS $LIBS"
1709 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1710 AC_MSG_NOTICE([yes])
1717 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1720 dnl ===========================================================================
1723 # Set DejaVu font directory.
1725 AC_ARG_WITH([dejavu-font-dir],
1726 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1727 [DejaVu font directory])],
1728 [with_dejavu_font_dir=$withval],
1729 [with_dejavu_font_dir='default'])
1731 if test "$with_dejavu_font_dir" != 'default'; then
1732 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1735 dnl ===========================================================================
1738 # Check for FFTW delegate library.
1741 [AC_HELP_STRING([--without-fftw],
1742 [disable FFTW support])],
1743 [with_fftw=$withval],
1746 if test "$with_fftw" != 'yes'; then
1747 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1752 if test "$with_fftw" != 'no'; then
1753 AC_MSG_NOTICE([-------------------------------------------------------------])
1754 AC_MSG_CHECKING([for FFTW])
1758 AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1759 AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1760 AC_MSG_CHECKING([if FFTW package is complete])
1761 if test $passed -gt 0; then
1762 if test $failed -gt 0; then
1763 AC_MSG_NOTICE([no -- some components failed test])
1764 have_fftw='no (failed tests)'
1767 LIBS="$FFTW_LIBS $LIBS"
1768 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1769 AC_MSG_NOTICE([yes])
1776 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1779 dnl ===========================================================================
1782 # Check for FlashPIX delegate library.
1785 [AC_HELP_STRING([--without-fpx],
1786 [disable FlashPIX support])],
1787 [with_fpx=$withval],
1790 if test "$with_fpx" != 'yes'; then
1791 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1796 if test "$with_fpx" != 'no'; then
1797 AC_MSG_NOTICE([-------------------------------------------------------------])
1798 AC_MSG_CHECKING([for FlashPIX])
1803 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1804 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1806 AC_MSG_CHECKING([if FlashPIX package is complete])
1807 if test $passed -gt 0; then
1808 if test $failed -gt 0; then
1809 AC_MSG_NOTICE([no -- some components failed test])
1810 have_fpx='no (failed tests)'
1813 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1814 AC_MSG_NOTICE([yes])
1822 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1825 dnl ===========================================================================
1828 # Check for fontconfig delegate library.
1830 AC_ARG_WITH([fontconfig],
1831 [AC_HELP_STRING([--without-fontconfig],
1832 [disable fontconfig support])],
1833 [with_fontconfig=$withval],
1834 [with_fontconfig='yes'])
1836 if test "$with_fontconfig" != 'yes'; then
1837 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
1840 have_fontconfig='no'
1841 FONTCONFIG_CFLAGS=""
1844 if test "x$with_fontconfig" = "xyes"; then
1845 AC_MSG_NOTICE([-------------------------------------------------------------])
1846 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
1850 if test "$have_fontconfig" = 'yes'; then
1851 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
1852 if test "$with_modules" = 'no'; then
1853 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1857 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
1858 AC_SUBST(FONTCONFIG_CFLAGS)
1859 AC_SUBST(FONTCONFIG_LIBS)
1861 dnl ===========================================================================
1864 # Check for freetype delegate library.
1866 AC_ARG_WITH([freetype],
1867 [AC_HELP_STRING([--without-freetype],
1868 [disable Freetype support])],
1869 [with_freetype=$withval],
1870 [with_freetype='yes'])
1873 if test "$with_freetype" != 'yes'; then
1874 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
1879 if test "$with_freetype" != 'no'; then
1880 AC_MSG_NOTICE([-------------------------------------------------------------])
1881 AC_MSG_CHECKING(for FreeType 2.0 )
1885 PERSIST_LDFLAGS="$LDFLAGS"
1886 PERSIST_CPPFLAGS="$CPPFLAGS"
1888 # Allow the user to specify the location of freetype.
1889 if test "$with_freetype" != 'yes'; then
1890 if test -x "${with_freetype}/bin/freetype-config"; then
1891 freetype_config="${with_freetype}/bin/freetype-config"
1892 elif test -x "${with_freetype}"; then
1893 freetype_config=${with_freetype}
1896 if test -z "$freetype_config"; then
1897 AC_PATH_PROG(freetype_config,freetype-config,)dnl
1899 if test -n "$freetype_config"; then
1900 freetype_prefix=`${freetype_config} --prefix`
1901 freetype_exec_prefix=`${freetype_config} --exec-prefix`
1902 LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
1903 CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
1906 dnl First see if there is a library
1907 if test "$FREETYPE_LIBS" = ''; then
1908 AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,)
1909 if test "$FREETYPE_LIBS" != ''; then
1910 passed=`expr $passed + 1`
1912 failed=`expr $failed + 1`
1913 LDFLAGS="$PERSIST_LDFLAGS"
1917 dnl Now test for the headers
1918 AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include <ft2build.h>'],[ft2build=''],[])
1919 AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H])
1920 if test "$have_freetype_h" = 'yes'; then
1921 passed=`expr $passed + 1`
1923 failed=`expr $failed + 1`
1924 CPPFLAGS="$PERSIST_CPPFLAGS"
1927 AC_MSG_CHECKING(if FreeType package is complete)
1928 if test $passed -gt 0; then
1929 if test $failed -gt 0; then
1931 AC_MSG_NOTICE(no -- some components failed test)
1932 have_freetype='no (failed tests)'
1934 LIBS="$FREETYPE_LIBS $LIBS"
1935 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library)
1936 if test "$ac_cv_header_ft2build_h" = 'yes'; then
1937 AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the <ft2build.h> header file.])
1946 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
1947 AC_SUBST(FREETYPE_LIBS)
1949 dnl ===========================================================================
1952 # Check for Ghostscript library or framework.
1954 # Test for iapi.h & test for gsapi_new_instance in -lgs
1955 # or -framework Ghostscript
1957 AC_ARG_WITH([gslib],
1958 [AC_HELP_STRING([--without-gslib],
1959 [enable Ghostscript library support])],
1960 [with_gslib=$withval],
1963 gslib_framework='no'
1964 if test "$with_gslib" != 'yes'; then
1965 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
1970 if test "$with_gslib" != 'no'; then
1971 AC_MSG_NOTICE([-------------------------------------------------------------])
1972 AC_MSG_CHECKING([for Ghostscript])
1977 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
1978 failed=`expr $failed + 1`,)
1979 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
1980 failed=`expr $failed + 1`,)
1981 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
1982 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
1983 AC_MSG_CHECKING([if Ghostscript package is complete])
1984 if test $passed -gt 0; then
1985 if test $failed -gt 0; then
1986 AC_MSG_NOTICE([no -- some components failed test])
1987 have_gslib='no (failed tests)'
1989 if test $framework -gt 0; then
1990 GS_LIBS='-framework Ghostscript'
1991 gslib_framework='yes'
1992 AC_MSG_NOTICE([yes, using framework.])
1994 AC_MSG_NOTICE([yes, using library.])
1997 LIBS="$GS_LIBS $LIBS"
1998 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
2005 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
2008 # Set default font search path
2009 AC_ARG_WITH([fontpath],
2010 [AC_HELP_STRING([--with-fontpath=DIR],
2011 [prepend to default font search path])],
2012 [with_fontpath=$withval],
2015 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2018 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",Define to prepend to default font search path.)
2020 if test "$with_fontpath=" != ''; then
2021 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2024 # Set Ghostscript font directory
2025 AC_ARG_WITH([gs-font-dir],
2026 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2027 [Ghostscript font directory])],
2028 [with_gs_font_dir=$withval],
2029 [with_gs_font_dir='default'])
2031 if test "$with_gs_font_dir" != 'default'; then
2032 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2035 dnl ===========================================================================
2038 # Check for GVC delegate library.
2041 [AC_HELP_STRING([--with-gvc],
2042 [disable GVC support])],
2043 [with_gvc=$withval],
2046 if test "$with_gvc" != 'yes'; then
2047 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2051 if test "x$with_gvc" = "xyes"; then
2052 AC_MSG_NOTICE([-------------------------------------------------------------])
2053 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2057 if test "$have_gvc" = 'yes'; then
2058 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2059 if test "$with_modules" = 'no'; then
2060 CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
2064 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2065 AC_SUBST(GVC_CFLAGS)
2068 dnl ===========================================================================
2071 # Check for JBIG delegate library.
2075 [AC_HELP_STRING([--without-jbig],
2076 [disable JBIG support])],
2077 [with_jbig=$withval],
2082 if test "$with_jbig" != 'no'; then
2083 AC_MSG_NOTICE([-------------------------------------------------------------])
2084 AC_MSG_CHECKING([for JBIG])
2088 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2089 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2090 AC_MSG_CHECKING([if JBIG package is complete])
2091 if test $passed -gt 0; then
2092 if test $failed -gt 0; then
2093 AC_MSG_NOTICE([no -- some components failed test])
2094 have_jbig='no (failed tests)'
2097 LIBS="$JBIG_LIBS $LIBS"
2098 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2099 AC_MSG_NOTICE([yes])
2106 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2109 dnl ===========================================================================
2112 # Check for JPEG delegate library.
2115 [AC_HELP_STRING([--without-jpeg],
2116 [disable JPEG support])],
2117 [with_jpeg=$withval],
2120 if test "$with_jpeg" != 'yes'; then
2121 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2126 if test "$with_jpeg" != 'no'; then
2127 AC_MSG_NOTICE([-------------------------------------------------------------])
2128 AC_MSG_CHECKING([for JPEG])
2132 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2133 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2134 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2135 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2136 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2138 # Test for compatible JPEG library
2139 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2140 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2144 #include <jpeglib.h>
2146 changequote(<<, >>)dnl
2148 #if JPEG_LIB_VERSION < 62
2149 #error IJG JPEG library must be version 6b or newer!
2153 changequote([, ])dnl
2154 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2155 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2157 AC_MSG_CHECKING([if JPEG package is complete])
2158 if test $passed -gt 0; then
2159 if test $failed -gt 0; then
2160 AC_MSG_NOTICE([no -- some components failed test])
2161 have_jpeg='no (failed tests)'
2164 LIBS="$JPEG_LIBS $LIBS"
2165 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2166 AC_MSG_NOTICE([yes])
2173 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2176 dnl ===========================================================================
2179 # Check for JPEG Version 2 delegate library.
2182 [AC_HELP_STRING([--without-jp2],
2183 [disable JPEG-2000 support])],
2184 [with_jp2=$withval],
2187 if test "$with_jp2" != 'yes'; then
2188 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 "
2193 if test "$with_jp2" != 'no'; then
2194 AC_MSG_NOTICE([-------------------------------------------------------------])
2195 AC_MSG_CHECKING([for JPEG Version 2])
2199 AC_CHECK_HEADER(jasper/jasper.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2200 AC_CHECK_LIB(jasper,jas_stream_fopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2201 AC_MSG_CHECKING([if JPEG version 2 support package is complete])
2202 if test $passed -gt 0; then
2203 if test $failed -gt 0; then
2204 AC_MSG_NOTICE([no -- some components failed test])
2205 have_jp2='no (failed tests)'
2208 LIBS="$JP2_LIBS $LIBS"
2209 AC_DEFINE(JP2_DELEGATE,1,Define if you have JPEG version 2 "Jasper" library)
2210 AC_MSG_NOTICE([yes])
2217 AM_CONDITIONAL(JP2_DELEGATE, test "$have_jp2" = 'yes')
2220 dnl ===========================================================================
2223 # Check for LCMS delegate library.
2227 [ --without-lcms disable lcms (v1.1X) support],
2228 [with_lcms=$withval],
2230 if test "$with_lcms" != 'yes' ; then
2231 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2236 [ --without-lcms2 disable lcms (v2.X) support],
2237 [with_lcms2=$withval],
2239 if test "$with_lcms2" != 'yes' ; then
2240 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
2245 if test "$with_lcms2" != 'no'; then
2246 AC_MSG_NOTICE([-------------------------------------------------------------])
2247 AC_MSG_CHECKING([for LCMS v2])
2251 have_lcms_header='no'
2253 # Check for <lcms2.h>
2254 AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
2255 if test "$have_lcms_header" = 'yes'; then
2256 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2257 passed=`expr $passed + 1`
2260 # Check for <lcms2/lcms2.h)
2261 if test "$have_lcms_header" != 'yes'; then
2262 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2263 if test "$have_lcms_header" = 'yes'; then
2264 passed=`expr $passed + 1`
2265 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2269 # Failed to find lcms header?
2270 if test "$have_lcms_header" != 'yes'; then
2271 failed=`expr $failed + 1`
2274 AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2275 AC_MSG_CHECKING(if LCMS v2 package is complete)
2276 if test $passed -gt 0; then
2277 if test $failed -gt 0; then
2278 AC_MSG_NOTICE(no -- some components failed test)
2279 have_lcms2='no (failed tests)'
2282 LIBS="$LCMS_LIBS $LIBS"
2292 # Check for LCMS v1 (1.11 or later)
2294 if test $have_lcms2 = 'yes'; then
2299 if test "$with_lcms" != 'no'; then
2300 AC_MSG_NOTICE([-------------------------------------------------------------])
2301 AC_MSG_CHECKING([for LCMS v1.1X])
2305 have_lcms_header='no'
2307 # Check for <lcms.h>
2308 if test "$have_lcms_header" != 'yes'; then
2309 AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
2310 if test "$have_lcms_header" = 'yes'; then
2311 passed=`expr $passed + 1`
2312 AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
2316 # Check for <lcms/lcms.h>
2317 if test "$have_lcms_header" != 'yes'; then
2318 AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
2319 if test "$have_lcms_header" = 'yes'; then
2320 passed=`expr $passed + 1`
2321 AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
2325 # Failed to find lcms header?
2326 if test "$have_lcms_header" != 'yes'; then
2327 failed=`expr $failed + 1`
2330 AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2331 AC_MSG_CHECKING(if LCMS package is complete)
2332 if test $passed -gt 0; then
2333 if test $failed -gt 0; then
2334 AC_MSG_NOTICE(no -- some components failed test)
2335 have_lcms='no (failed tests)'
2338 LIBS="$LCMS_LIBS $LIBS"
2347 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
2348 if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
2349 AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
2354 dnl ===========================================================================
2357 # Check for the LQR (Liquid Rescale) delegate library.
2360 [AC_HELP_STRING([--without-lqr],
2361 [disable Liquid Rescale support])],
2362 [with_lqr=$withval],
2365 if test "$with_lqr" != 'yes'; then
2366 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2373 if test "x$with_lqr" = "xyes"; then
2374 AC_MSG_NOTICE([-------------------------------------------------------------])
2375 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2379 if test "$have_lqr" = 'yes'; then
2380 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2381 CFLAGS="$LQR_CFLAGS $CFLAGS"
2384 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2385 AC_SUBST(LQR_CFLAGS)
2388 dnl ===========================================================================
2390 # Disable LZMA (lzma library)
2392 [ --without-lzma disable LZMA support],
2393 [with_lzma=$withval],
2395 if test "$with_lzma" != 'yes' ; then
2396 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2400 if test "x$with_lzma" = "xyes"; then
2401 AC_MSG_NOTICE([-------------------------------------------------------------])
2402 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2406 if test "$have_lzma" = 'yes'; then
2407 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2408 if test "$with_modules" = 'no'; then
2409 CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS"
2413 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2414 AC_SUBST(LZMA_CFLAGS)
2417 dnl ===========================================================================
2420 # Check for the OpenEXR delegate library.
2422 AC_ARG_WITH([openexr],
2423 [AC_HELP_STRING([--without-openexr],
2424 [disable OpenEXR support])],
2425 [with_openexr=$withval],
2426 [with_openexr='yes'])
2428 if test "$with_openexr" != 'yes'; then
2429 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2436 if test "x$with_openexr" = "xyes"; then
2437 AC_MSG_NOTICE([-------------------------------------------------------------])
2438 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2442 if test "$have_openexr" = 'yes'; then
2443 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2444 if test "$with_modules" = 'no'; then
2445 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2449 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2450 AC_SUBST(OPENEXR_CFLAGS)
2451 AC_SUBST(OPENEXR_LIBS)
2453 dnl ===========================================================================
2456 # Check for PANGO delegate library.
2458 AC_ARG_WITH([pango],
2459 [AC_HELP_STRING([--without-pango],
2460 [disable PANGO support])],
2461 [with_pango=$withval],
2464 if test "$with_pango" != 'yes'; then
2465 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2469 have_pangocairo='no'
2473 if test "x$with_pango" = "xyes"; then
2474 AC_MSG_RESULT([-------------------------------------------------------------])
2475 PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
2477 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2481 if test "$have_pango" = 'yes'; then
2482 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2483 if test "$with_modules" = 'no'; then
2484 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
2488 if test "$have_pangocairo" = 'yes'; then
2489 AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
2490 if test "$with_modules" = 'no'; then
2491 CPPFLAGS="$PANGOCAIRO_CFLAGS $CPPFLAGS"
2495 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2496 AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes')
2497 AC_SUBST(PANGO_CFLAGS)
2498 AC_SUBST(PANGO_LIBS)
2500 dnl ===========================================================================
2503 # Check for PNG delegate library.
2506 [AC_HELP_STRING([--without-png],
2507 [disable PNG support])],
2508 [with_png=$withval],
2511 if test "$with_png" != 'yes'; then
2512 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2518 if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
2519 AC_MSG_NOTICE([-------------------------------------------------------------])
2520 AC_MSG_CHECKING(for PNG support )
2524 AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
2525 failed=`expr $failed + 1`,)
2527 if test $passed -gt 0; then
2528 for var in 5 4 2 '' ; do
2529 if test "$have_png" = 'no' ; then
2530 if test "x${var}" = 'x' ; then
2536 # Test for compatible LIBPNG library
2539 if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
2540 if test "${pnglib}" != 'png' ; then
2541 AC_MSG_CHECKING(for LIBPNG1${var} support )
2547 changequote(<<, >>)dnl
2549 #if PNG_LIBPNG_VER_MINOR != ${var}
2550 #error LIBPNG library must be version 1${var}!
2555 changequote([, ])dnl
2556 ac_cv_libpng_ok='yes',
2557 ac_cv_libpng_ok='no')
2558 if test "$ac_cv_libpng_ok" = 'yes' ; then
2559 passed=`expr $passed + 1`
2562 failed=`expr $failed + 1`
2566 passed=`expr $passed + 1`
2571 if test $passed -gt 0 -a $failed -le 0; then
2572 if test "1${var}" = '15' ; then
2573 AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
2574 failed=`expr $failed + 1`,)
2575 AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
2576 failed=`expr $failed + 1`,)
2578 if test "1${var}" = '14' ; then
2579 AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
2580 failed=`expr $failed + 1`,)
2581 AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
2582 failed=`expr $failed + 1`,)
2584 if test "1${var}" = '12' ; then
2585 AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
2586 failed=`expr $failed + 1`,)
2588 if test "1${var}" = '1' ; then
2589 AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
2590 failed=`expr $failed + 1`,)
2592 if test $passed -gt 0 -a $failed -le 0 ; then
2593 AC_MSG_CHECKING(if ${pnglib} package is complete)
2594 if test $passed -gt 0 ; then
2595 if test $failed -gt 0 ; then
2596 AC_MSG_NOTICE(no -- some components failed test)
2597 have_png='no (failed tests)'
2599 PNG_LIBS="-l${pnglib}"
2600 LIBS="$PNG_LIBS $LIBS"
2601 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2613 AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
2617 dnl ===========================================================================
2620 # Check for RSVG delegate library.
2623 [AC_HELP_STRING([--without-rsvg],
2624 [disable RSVG support])],
2625 [with_rsvg=$withval],
2628 if test "$with_rsvg" != 'yes'; then
2629 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2637 if test "x$with_rsvg" = "xyes"; then
2638 AC_MSG_NOTICE([-------------------------------------------------------------])
2639 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2641 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2645 if test "$have_rsvg" = 'yes'; then
2646 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2647 if test "$with_modules" = 'no'; then
2648 CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
2652 if test "$have_cairo" = 'yes'; then
2653 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2654 if test "$with_modules" = 'no'; then
2655 CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
2659 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2660 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2661 AC_SUBST(RSVG_CFLAGS)
2664 dnl ===========================================================================
2667 # Check for TIFF delegate library.
2670 [AC_HELP_STRING([--without-tiff],
2671 [disable TIFF support])],
2672 [with_tiff=$withval],
2675 if test "$with_tiff" != 'yes'; then
2676 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2681 if test "$with_tiff" != 'no'; then
2682 AC_MSG_NOTICE([-------------------------------------------------------------])
2683 AC_MSG_CHECKING([for TIFF])
2687 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2688 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2689 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2690 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2691 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2692 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2693 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2694 AC_MSG_CHECKING([if TIFF package is complete])
2695 if test $passed -gt 0; then
2696 if test $failed -gt 0; then
2697 AC_MSG_NOTICE([no -- some components failed test])
2698 have_tiff='no (failed tests)'
2701 LIBS="$TIFF_LIBS $LIBS"
2702 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2703 AC_MSG_NOTICE([yes])
2705 AC_CHECK_HEADERS(tiffconf.h)
2706 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2707 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2708 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2709 TIFFSwabArrayOfTriples])
2715 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2718 dnl ===========================================================================
2721 # Check for WEBP delegate library.
2724 [AC_HELP_STRING([--without-webp],
2725 [disable WEBP support])],
2726 [with_webp=$withval],
2729 if test "$with_webp" != 'yes'; then
2730 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2735 if test "$with_webp" != 'no'; then
2736 AC_MSG_NOTICE([-------------------------------------------------------------])
2737 AC_MSG_CHECKING([for WEBP])
2741 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2742 AC_CHECK_LIB(webp,WebPDecodeRGB,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2743 AC_MSG_CHECKING([if WEBP package is complete])
2744 if test $passed -gt 0; then
2745 if test $failed -gt 0; then
2746 AC_MSG_NOTICE([no -- some components failed test])
2747 have_webp='no (failed tests)'
2750 LIBS="$WEBP_LIBS $LIBS"
2751 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2752 AC_MSG_NOTICE([yes])
2759 AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2762 dnl ===========================================================================
2765 # Set Windows font directory.
2767 AC_ARG_WITH([windows-font-dir],
2768 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2769 [directory containing MS-Windows fonts])],
2770 [with_windows_font_dir=$withval],
2771 [with_windows_font_dir=''])
2772 if test "$with_windows_font_dir" != '' ; then
2773 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2776 dnl ===========================================================================
2779 # Check for WMF delegate library.
2782 [AC_HELP_STRING([--with-wmf],
2783 [enable WMF support])],
2784 [with_wmf=$withval],
2787 if test "$with_wmf" != 'yes'; then
2788 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2795 if test "$with_wmf" != 'no'; then
2796 AC_MSG_RESULT([-------------------------------------------------------------])
2797 AC_MSG_CHECKING([for WMF])
2800 have_libwmflite='no'
2801 have_libwmf_ipa_h='no'
2803 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H])
2804 if test "$have_libwmf_ipa_h" = 'yes'; then
2805 AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,)
2806 if test "$have_libwmflite" = 'yes'; then
2807 AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library)
2808 WMF_LIBS='-lwmflite'
2809 LIBS="$WMF_LIBS $LIBS"
2813 WMF_CONFIG_LIBS=`libwmf-config --libs`
2814 for lib in xml2 expat freetype jpeg png z; do
2816 echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib"
2818 AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS)
2819 if test "$have_libwmf" = 'yes'; then
2820 AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library)
2822 LIBS="$WMF_LIBS $LIBS"
2825 AC_MSG_RESULT([no -- some components failed test])
2826 have_wmf='no (failed tests)'
2827 have_wmflite='no (failed tests)'
2833 AC_MSG_CHECKING([if WMF package is complete])
2834 if test "$have_wmf" = 'yes'; then
2835 AC_MSG_RESULT([yes])
2840 AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes')
2842 AC_SUBST(WMF_LIBS_DEPS)
2845 dnl ===========================================================================
2848 # Check for XML delegate library.
2851 [AC_HELP_STRING([--without-xml],
2852 [disable XML support])],
2853 [with_xml=$withval],
2856 if test "$with_xml" != 'yes' ; then
2857 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2862 if test "$with_xml" != 'no'; then
2863 AC_MSG_NOTICE([-------------------------------------------------------------])
2864 AC_MSG_CHECKING([for XML])
2866 PERSIST_LDFLAGS=$LDFLAGS
2867 PERSIST_CPPFLAGS=$CPPFLAGS
2869 AC_PATH_PROG(xml2_config,xml2-config,)dnl
2870 if test -n "$xml2_config"; then
2871 # Debian installs libxml headers under /usr/include/libxml2/libxml with
2872 # the shared library installed under /usr/lib, whereas the package
2873 # installs itself under $prefix/libxml and $prefix/lib.
2874 xml2_prefix=`xml2-config --prefix`
2875 if test -d "${xml2_prefix}/include/libxml2"; then
2876 CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
2878 if test "${xml2_prefix}" != '/usr'; then
2879 LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
2884 AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2885 AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2886 AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2887 AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2888 AC_MSG_CHECKING([if XML package is complete])
2889 if test $passed -gt 0; then
2890 if test $failed -gt 0; then
2891 AC_MSG_NOTICE([no -- some components failed test])
2892 have_xml='no (failed tests)'
2893 LDFLAGS="$PERSIST_LDFLAGS"
2894 CPPFLAGS="$PERSIST_CPPFLAGS"
2897 LIBS="$XML_LIBS $LIBS"
2898 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2899 AC_MSG_NOTICE([yes])
2906 AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
2909 dnl ===========================================================================
2911 # Substitute compiler name to build/link PerlMagick
2913 AC_SUBST(PERLMAINCC)
2916 # Configure install Paths
2919 # Path to ImageMagick header files
2920 INCLUDE_RELATIVE_PATH="ImageMagick"
2921 INCLUDE_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
2922 DEFINE_INCLUDE_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
2923 case "${build_os}" in
2925 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2928 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",Directory where ImageMagick headers live.)
2929 AC_SUBST(INCLUDE_PATH)
2931 # Subdirectory under lib to place ImageMagick lib files
2932 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2933 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",Subdirectory of lib where ImageMagick architecture dependent files are installed)
2935 # Path to ImageMagick bin directory
2936 EXECUTABLE_PATH="${BIN_DIR}"
2937 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2938 case "${build_os}" in
2940 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2943 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",Directory where executables are installed.)
2944 AC_SUBST(EXECUTABLE_PATH)
2946 # Path to ImageMagick lib
2947 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2948 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2949 case "${build_os}" in
2951 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2954 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",Directory where architecture-dependent files live.)
2955 AC_SUBST(LIBRARY_PATH)
2958 # Subdirectory under lib to place ImageMagick coder module files
2959 CODER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/coders"
2960 AC_DEFINE_UNQUOTED(CODER_RELATIVE_PATH,"$CODER_RELATIVE_PATH",Subdirectory of lib where coder modules are installed)
2961 CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}"
2962 DEFINE_CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}/"
2963 case "${build_os}" in
2965 DEFINE_CODER_PATH=`$WinPathScript "$DEFINE_CODER_PATH" 1`
2968 AC_DEFINE_UNQUOTED(CODER_PATH,"$DEFINE_CODER_PATH",Location of coder modules)
2969 AC_SUBST(CODER_PATH)
2972 # Subdirectory under lib to place ImageMagick filter module files
2973 FILTER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/filters"
2974 AC_DEFINE_UNQUOTED(FILTER_RELATIVE_PATH,"$FILTER_RELATIVE_PATH",Subdirectory of lib where filter modules are installed)
2975 FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}"
2976 DEFINE_FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}/"
2977 case "${build_os}" in
2979 DEFINE_FILTER_PATH=`$WinPathScript "$DEFINE_FILTER_PATH" 1`
2982 AC_DEFINE_UNQUOTED(FILTER_PATH,"$DEFINE_FILTER_PATH",Location of filter modules)
2983 AC_SUBST(FILTER_PATH)
2986 # Path to ImageMagick documentation files
2987 DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2988 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
2989 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
2990 case "${build_os}" in
2992 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
2995 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",Directory where ImageMagick documents live.)
2996 AC_SUBST(DOCUMENTATION_PATH)
2998 # Subdirectory to place architecture-dependent configuration files
2999 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
3000 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",Subdirectory of lib where architecture-dependent configuration files live.)
3001 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3002 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
3003 case "${build_os}" in
3005 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
3008 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",Directory where architecture-dependent configuration files live.)
3009 AC_SUBST(CONFIGURE_PATH)
3011 # Subdirectory to place architecture-independent configuration files
3012 SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
3013 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
3014 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
3015 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
3016 case "${build_os}" in
3018 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
3021 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",Directory where architecture-independent configuration files live.)
3022 AC_SUBST(SHARE_PATH)
3024 # Subdirectory to place architecture-dependent configuration files
3025 SHAREARCH_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/config"
3026 AC_DEFINE_UNQUOTED(SHAREARCH_RELATIVE_PATH,"$SHAREARCH_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
3027 SHAREARCH_PATH="${SHAREARCH_DIR}/${SHAREARCH_RELATIVE_PATH}"
3028 DEFINE_SHAREARCH_PATH="${SHAREARCH_DIR}/${SHAREARCH_RELATIVE_PATH}/"
3029 case "${build_os}" in
3031 DEFINE_SHAREARCH_PATH=`$WinPathScript "$DEFINE_SHAREARCH_PATH" 1`
3034 AC_DEFINE_UNQUOTED(SHAREARCH_PATH,"$DEFINE_SHAREARCH_PATH",Directory where architecture-independent configuration files live.)
3035 AC_SUBST(SHAREARCH_PATH)
3038 # program_transform_name is formed for use in a Makefile, so create a
3039 # modified version for use in a shell script.
3040 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3042 # Default delegate definitions
3043 AC_MSG_NOTICE([-------------------------------------------------------------])
3044 AC_MSG_CHECKING([for ImageMagick delegate programs])
3046 AutotraceDecodeDelegateDefault='autotrace'
3047 BlenderDecodeDelegateDefault='blender'
3048 BZIPDelegateDefault='bzip2'
3049 BrowseDelegateDefault='xdg-open'
3050 CGMDecodeDelegateDefault='ralcgm'
3051 CatDelegateDefault='cat'
3052 DNGDecodeDelegateDefault='ufraw-batch'
3053 GVCDecodeDelegateDefault='dot'
3054 DVIDecodeDelegateDefault='dvips'
3055 EchoDelegateDefault='echo'
3056 EditorDelegateDefault='xterm'
3057 FIGDecodeDelegateDefault='fig2dev'
3058 ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
3059 DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
3060 MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
3061 GnuplotDecodeDelegateDefault='gnuplot'
3062 HPGLDecodeDelegateDefault='hp2xx'
3063 HTMLDecodeDelegateDefault='html2ps'
3064 ILBMDecodeDelegateDefault='ilbmtoppm'
3065 ILBMEncodeDelegateDefault='ppmtoilbm'
3066 LPDelegateDefault='lp'
3067 LPRDelegateDefault='lpr'
3068 LZWDecodeDelegateDefault='uncompress'
3069 LZWEncodeDelegateDefault='compress'
3070 LaunchDelegateDefault='gimp'
3071 MANDelegateDefault='groff'
3072 MPEGDecodeDelegateDefault='ffmpeg'
3073 MPEGEncodeDelegateDefault='ffmpeg'
3074 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3075 MVDelegateDefault='mv'
3076 PCLDelegateDefault='pcl6'
3077 PGPDecodeDelegateDefault='pgpv'
3078 POVDelegateDefault='povray'
3079 if test "$native_win32_build" = 'yes'; then
3080 PSDelegateDefault='gswin32c'
3081 elif test "$gslib_framework" = 'yes'; then
3082 PSDelegateDefault='gsc'
3084 PSDelegateDefault='gs'
3086 RLEEncodeDelegateDefault='rawtorle'
3087 RMDelegateDefault='rm'
3088 RSVGDecodeDelegateDefault='rsvg-convert'
3089 SCANDecodeDelegateDefault='scanimage'
3090 TXTDelegateDefault='enscript'
3091 UniconvertorDelegateDefault='uniconvertor'
3092 WMFDecodeDelegateDefault='wmf2eps'
3093 WWWDecodeDelegateDefault='curl'
3094 XPSDelegateDefault='gxps'
3095 ZipDelegateDefault='gzip'
3097 # Search for delegates
3098 AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
3099 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3100 AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
3101 AC_PATH_PROG(BrowseDelegate, "$BrowseDelegateDefault" mozilla firefox netscape, "$BrowseDelegateDefault")
3102 AC_PATH_PROG(CGMDecodeDelegate, "$CGMDecodeDelegateDefault", "$CGMDecodeDelegateDefault")
3103 AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
3104 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3105 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3106 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3107 AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
3108 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3109 AC_PATH_PROG(FIGDecodeDelegate, "$FIGDecodeDelegateDefault", "$FIGDecodeDelegateDefault")
3110 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3111 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3112 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3113 AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
3114 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3115 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3116 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3117 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3118 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3119 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3120 AC_PATH_PROG(LZWDecodeDelegate, "$LZWDecodeDelegateDefault", "$LZWDecodeDelegateDefault")
3121 AC_PATH_PROG(LZWEncodeDelegate, "$LZWEncodeDelegateDefault", "$LZWEncodeDelegateDefault")
3122 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3123 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
3124 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3125 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3126 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3127 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3128 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3129 AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
3130 AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
3131 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3132 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
3133 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3134 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3135 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
3136 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
3137 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3138 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
3139 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
3140 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3141 AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
3143 # Prefer lpr to lp; lp needs options tacked on.
3144 if test "$LPRDelegate" != no; then
3145 PrintDelegate="$LPRDelegate"
3147 PrintDelegate="$LPDelegate -c -s"
3149 AC_SUBST(PrintDelegate)
3151 # Installed ImageMagick utiltity paths
3152 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3153 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3154 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3156 # Set delegate booleans
3157 have_ffmpeg='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_ffmpeg='yes'; fi
3158 have_fig2dev='no' ; if test "$FIGDecodeDelegate" != "$FIGDecodeDelegateDefault" ; then have_fig2dev='yes'; fi
3159 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3160 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3161 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3162 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3163 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3164 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3165 have_ralcgm='no' ; if test "$CGMDecodeDelegate" != "$CGMDecodeDelegateDefault" ; then have_ralcgm='yes'; fi
3166 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3169 # Test for font directories
3171 type_include_files=''
3174 AC_MSG_CHECKING(for Dejavu fonts directory)
3176 if test "${with_dejavu_font_dir}" != 'default'; then
3177 dejavu_font_dir="${with_dejavu_font_dir}/"
3179 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3180 if test -f "${font_dir}DejaVuSerif.ttf"; then
3181 dejavu_font_dir="${font_dir}"
3186 if test "${dejavu_font_dir}x" != 'x'; then
3187 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3188 AC_MSG_NOTICE([$dejavu_font_dir])
3190 AC_MSG_NOTICE([not found!]);
3192 AC_SUBST(dejavu_font_dir)
3196 if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
3197 windows_font_dir="${with_windows_font_dir}/"
3199 if test "${windows_font_dir}x" != 'x'; then
3200 if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
3201 windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
3203 if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then
3204 windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/'
3206 if test -f '/usr/share/fonts/msttcore/arial.ttf'; then
3207 windows_font_dir='/usr/share/fonts/msttcore/truetype/'
3210 if test "${windows_font_dir}x" != 'x'; then
3211 type_include_files="$type_include_files "'<include file="type-windows.xml" />'
3213 AC_SUBST(windows_font_dir)
3216 AC_MSG_CHECKING(for Ghostscript fonts directory)
3217 ghostscript_font_dir=''
3218 if test "${with_gs_font_dir}" != 'default'; then
3219 ghostscript_font_dir="${with_gs_font_dir}/"
3221 if test "${native_win32_build}" = 'yes'; then
3222 # Native Windows Build
3223 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3224 if test -f "${font_dir}a010013l.pfb"; then
3225 ghostscript_font_dir="$font_dir"
3229 if test "${PSDelegate}" != 'gswin32c'; then
3230 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3233 # Linux / Mac OS X / Unix Build
3234 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
3235 if test -f "${font_dir}a010013l.pfb"; then
3236 ghostscript_font_dir="${font_dir}"
3240 if test "${ghostscript_font_dir}x" = 'x'; then
3241 if test "$PSDelegate" != 'gs'; then
3242 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3247 if test "${ghostscript_font_dir}x" != 'x'; then
3248 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3249 AC_MSG_NOTICE([$ghostscript_font_dir])
3251 AC_MSG_NOTICE([not found!]);
3253 AC_SUBST(ghostscript_font_dir)
3254 case "${build_os}" in
3256 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3260 AC_SUBST(type_include_files)
3263 # Handle case where user doesn't want frozen paths
3265 if test "$with_frozenpaths" != 'yes'; then
3266 # Re-set delegate definitions to default (no paths)
3267 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
3268 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3269 BZIPDelegate="$BZIPDelegateDefault"
3270 BrowseDelegate="$BrowseDelegateDefault"
3271 CGMDecodeDelegate="$CGMDecodeDelegateDefault"
3272 CatDelegate="$CatDelegateDefault"
3273 ConvertDelegate="$ConvertDelegateDefault"
3274 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3275 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3276 EchoDelegate="$EchoDelegateDefault"
3277 EditorDelegate="$EditorDelegateDefault"
3278 FIGDecodeDelegate="$FIGDecodeDelegateDefault"
3279 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3280 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3281 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3282 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3283 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3284 LPDelegate="$LPDelegateDefault"
3285 LZWDecodeDelegate="$LZWDecodeDelegateDefault"
3286 LZWEncodeDelegate="$LZWEncodeDelegateDefault"
3287 LaunchDelegate="$LaunchDelegateDefault"
3288 MANDelegate="$MANDelegateDefault"
3289 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3290 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3291 MogrifyDelegate="$MogrifyDelegateDefault"
3292 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3293 MVDelegate="$MVDelegateDefault"
3294 PCLDelegate="$PCLDelegateDefault"
3295 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3296 POVDelegate="$POVDelegateDefault"
3297 PSDelegate="$PSDelegateDefault"
3298 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3299 RMDelegate="$RMDelegateDefault"
3300 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3301 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3302 ShowImageDelegate="$ShowImageDelegateDefault"
3303 TXTDelegate="$TXTDelegateDefault"
3304 UniconvertorDelegate="$UniconvertorDelegateDefault"
3305 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3306 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3307 XPSDelegate="$XPSDelegateDefault"
3308 ZipDelegate="$ZipDelegateDefault"
3311 # Delegate substitutions
3312 AC_SUBST(AutotraceDecodeDelegate)
3313 AC_SUBST(BlenderDecodeDelegate)
3314 AC_SUBST(BZIPDelegate)
3315 AC_SUBST(BrowseDelegate)
3316 AC_SUBST(CGMDecodeDelegate)
3317 AC_SUBST(CatDelegate)
3318 AC_SUBST(ConvertDelegate)
3319 AC_SUBST(GVCDecodeDelegate)
3320 AC_SUBST(DVIDecodeDelegate)
3321 AC_SUBST(EchoDelegate)
3322 AC_SUBST(EditorDelegate)
3323 AC_SUBST(FIGDecodeDelegate)
3324 AC_SUBST(GnuplotDecodeDelegate)
3325 AC_SUBST(HPGLDecodeDelegate)
3326 AC_SUBST(HTMLDecodeDelegate)
3327 AC_SUBST(ILBMDecodeDelegate)
3328 AC_SUBST(ILBMEncodeDelegate)
3329 AC_SUBST(LPDelegate)
3330 AC_SUBST(LZWDecodeDelegate)
3331 AC_SUBST(LZWEncodeDelegate)
3332 AC_SUBST(LaunchDelegate)
3333 AC_SUBST(MANDelegate)
3334 AC_SUBST(MPEGDecodeDelegate)
3335 AC_SUBST(MPEGEncodeDelegate)
3336 AC_SUBST(MogrifyDelegate)
3337 AC_SUBST(MrSIDDecodeDelegate)
3338 AC_SUBST(MVDelegate)
3339 AC_SUBST(PCLDelegate)
3340 AC_SUBST(PGPDecodeDelegate)
3341 AC_SUBST(POVDelegate)
3342 AC_SUBST(PSDelegate)
3343 AC_SUBST(RLEEncodeDelegate)
3344 AC_SUBST(RMDelegate)
3345 AC_SUBST(SCANDecodeDelegate)
3346 AC_SUBST(ShowImageDelegate)
3347 AC_SUBST(TXTDelegate)
3348 AC_SUBST(UniconvertorDelegate)
3349 AC_SUBST(WMFDecodeDelegate)
3350 AC_SUBST(WWWDecodeDelegate)
3351 AC_SUBST(XPSDelegate)
3352 AC_SUBST(ZipDelegate)
3358 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3359 AC_CHECK_PROGS(PERL,perl)
3360 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3361 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3362 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3363 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3364 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3366 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3369 # 7ZIP support (http://p7zip.sourceforge.net/)
3372 AC_CHECK_PROGS(P7ZIP,[7za])
3374 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3377 # ZIP support (http://www.info-zip.org/Zip.html)
3380 AC_CHECK_PROGS(ZIP,[zip])
3382 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3385 # GhostPCL related configuration.
3387 PCLColorDevice=ppmraw
3388 PCLCMYKDevice=pamcmyk32
3389 PCLMonoDevice=pbmraw
3390 if test -z "$PCLVersion"; then
3391 PCLVersion='unknown'
3393 if test $have_pcl = 'yes'; then
3394 AC_MSG_NOTICE([-------------------------------------------------------------])
3395 AC_MSG_CHECKING([for PCL])
3398 AC_MSG_CHECKING([for pcl color device])
3399 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3402 PCLColorDevice=ppmraw
3404 AC_MSG_NOTICE([$PCLColorDevice])
3407 AC_MSG_CHECKING([for pcl CMYK device])
3408 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3411 PCLCMYKDevice=$PCLColorDevice
3413 AC_MSG_NOTICE([$PCLCMYKDevice])
3416 AC_MSG_CHECKING([for pcl mono device])
3417 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3420 PCLMonoDevice=$PCLColorDevice
3422 AC_MSG_NOTICE([$PCLMonoDevice])
3425 AC_SUBST(PCLMonoDevice)
3426 AC_SUBST(PCLColorDevice)
3427 AC_SUBST(PCLCMYKDevice)
3428 AC_SUBST(PCLVersion)
3431 # GhostXPS related configuration.
3433 XPSColorDevice=ppmraw
3434 XPSCMYKDevice=bmpsep8
3435 XPSMonoDevice=pbmraw
3436 if test -z "$XPSVersion"; then
3437 XPSVersion='unknown'
3439 if test $have_xps = 'yes'; then
3440 AC_MSG_NOTICE([-------------------------------------------------------------])
3441 AC_MSG_CHECKING([for XPS])
3444 AC_MSG_CHECKING([for xps color device])
3445 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3448 XPSColorDevice=ppmraw
3450 AC_MSG_NOTICE([$XPSColorDevice])
3453 AC_MSG_CHECKING([for xps CMYK device])
3454 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3457 XPSCMYKDevice=$XPSColorDevice
3459 AC_MSG_NOTICE([$XPSCMYKDevice])
3462 AC_MSG_CHECKING([for xps mono device])
3463 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3466 XPSMonoDevice=$XPSColorDevice
3468 AC_MSG_NOTICE([$XPSMonoDevice])
3471 AC_SUBST(XPSMonoDevice)
3472 AC_SUBST(XPSColorDevice)
3473 AC_SUBST(XPSCMYKDevice)
3474 AC_SUBST(XPSVersion)
3477 # Ghostscript related configuration.
3479 GSAlphaDevice=pngalpha
3480 GSColorDevice=pnmraw
3483 GSPDFDevice=pdfwrite
3485 GSEPSDevice=epswrite
3487 if test $have_gs = 'yes'; then
3488 AC_MSG_NOTICE([-------------------------------------------------------------])
3489 AC_MSG_CHECKING([for Ghostscript])
3491 AC_MSG_CHECKING([for Ghostscript version])
3492 if GSVersion=`$PSDelegate --version`; then
3495 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3497 AC_MSG_NOTICE([$GSVersion])
3500 AC_MSG_CHECKING([for gs alpha device])
3501 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3504 GSAlphaDevice=pnmraw
3506 AC_MSG_NOTICE([$GSAlphaDevice])
3509 AC_MSG_CHECKING([for gs color device])
3510 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3513 GSColorDevice=pnmraw
3515 AC_MSG_NOTICE([$GSColorDevice])
3518 AC_MSG_CHECKING([for gs CMYK device])
3519 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3522 GSCMYKDevice=bmpsep8
3524 AC_MSG_NOTICE([$GSCMYKDevice])
3527 AC_MSG_CHECKING([for gs mono device])
3528 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3531 GSMonoDevice=$GSColorDevice
3533 AC_MSG_NOTICE([$GSMonoDevice])
3536 AC_MSG_CHECKING([for gs PDF writing device])
3537 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3540 GSPDFDevice=nodevice
3542 AC_MSG_NOTICE([$GSPDFDevice])
3545 AC_MSG_CHECKING([for gs PS writing device])
3546 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3551 AC_MSG_NOTICE([$GSPSDevice])
3554 AC_MSG_CHECKING([for gs EPS writing device])
3555 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3558 GSEPSDevice=nodevice
3560 AC_MSG_NOTICE([$GSEPSDevice])
3563 AC_SUBST(GSAlphaDevice)
3564 AC_SUBST(GSCMYKDevice)
3565 AC_SUBST(GSColorDevice)
3566 AC_SUBST(GSEPSDevice)
3567 AC_SUBST(GSMonoDevice)
3568 AC_SUBST(GSPDFDevice)
3569 AC_SUBST(GSPSDevice)
3573 # PerlMagick-related configuration
3576 # Look for PERL if PerlMagick requested
3577 # If name/path of desired PERL interpreter is specified, look for that one first
3579 if test "$with_perl" != 'no'; then
3580 AC_MSG_NOTICE([-------------------------------------------------------------])
3581 AC_MSG_CHECKING([for Perl])
3583 if test "$with_perl" != 'yes'; then
3584 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3585 PERL=$ac_cv_path_PERL
3587 have_perl="$ac_cv_path_PERL"
3589 AC_PATH_PROGS(PERL,perl perl5,)dnl
3590 if test "$ac_cv_path_PERL"; then
3591 have_perl="$ac_cv_path_PERL"
3596 if test "$with_perl" != 'yes' ; then
3597 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3600 PERL_SUPPORTS_DESTDIR='no'
3602 with_perl_static='no'
3603 with_perl_dynamic='no'
3604 if test "$have_perl" != 'no'; then
3605 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3606 with_perl_static='yes'
3608 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3609 with_perl_dynamic='yes'
3611 # Is PERL's MakeMaker new enough to support DESTDIR?
3612 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3614 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3615 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3616 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3617 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3619 # Determine path to pick up MagickCore library from for use with building PerlMagick
3620 MAGICKCORE_PATH="${LIB_DIR}"
3621 if test $with_perl_static = 'yes'; then
3622 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3623 libtool_objdir=$objdir
3625 # Linker search path to library, followed by -lMagickCore
3626 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3628 AC_SUBST(MAGICKCORE_PATH)
3630 # Create a simple string containing format names for all delegate libraries
3632 if test "$have_autotrace" = 'yes'; then DELEGATES="$DELEGATES autotrace"; fi
3633 if test "$have_bzlib" = 'yes'; then DELEGATES="$DELEGATES bzlib"; fi
3634 if test "$have_djvu" = 'yes'; then DELEGATES="$DELEGATES djvu"; fi
3635 if test "$have_dps" = 'yes'; then DELEGATES="$DELEGATES dps"; fi
3636 if test "$have_fftw" = 'yes'; then DELEGATES="$DELEGATES fftw"; fi
3637 if test "$have_fpx" = 'yes'; then DELEGATES="$DELEGATES fpx"; fi
3638 if test "$have_fontconfig" = 'yes'; then DELEGATES="$DELEGATES fontconfig"; fi
3639 if test "$have_freetype" = 'yes'; then DELEGATES="$DELEGATES freetype"; fi
3640 if test "$have_gslib" = 'yes'; then DELEGATES="$DELEGATES gs"; fi
3641 if test "$have_gvc" = 'yes'; then DELEGATES="$DELEGATES gvc"; fi
3642 if test "$have_jbig" = 'yes'; then DELEGATES="$DELEGATES jbig"; fi
3643 if test "$have_jpeg" = 'yes'; then
3644 DELEGATES="$DELEGATES jpeg";
3645 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi
3647 if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi
3648 if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi
3649 if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi
3650 if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi
3651 if test "$have_lzma" = 'yes'; then DELEGATES="$DELEGATES lzma"; fi
3652 if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi
3653 if test "$have_openexr" = 'yes'; then DELEGATES="$DELEGATES openexr"; fi
3654 if test "$have_pango" = 'yes'; then DELEGATES="$DELEGATES pango"; fi
3655 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES png"; fi
3656 if test "$have_rsvg" = 'yes'; then DELEGATES="$DELEGATES rsvg"; fi
3657 if test "$have_tiff" = 'yes'; then DELEGATES="$DELEGATES tiff"; fi
3658 if test "$have_x" = 'yes'; then DELEGATES="$DELEGATES x11"; fi
3659 if test "$have_xml" = 'yes'; then DELEGATES="$DELEGATES xml"; fi
3660 if test "$have_wmf" = 'yes'; then DELEGATES="$DELEGATES wmf"; fi
3661 if test "$have_zlib" = 'yes'; then DELEGATES="$DELEGATES zlib"; fi
3666 # Handle special compiler flags
3669 # Add '-p' if prof source profiling support enabled
3670 if test "$enable_prof" = 'yes'; then
3672 CXXFLAGS="-p $CXXFLAGS"
3673 LDFLAGS="-p $LDFLAGS"
3676 # Add '-pg' if gprof source profiling support enabled
3677 if test "$enable_gprof" = 'yes'; then
3678 CFLAGS="-pg $CFLAGS"
3679 CXXFLAGS="-pg $CXXFLAGS"
3680 LDFLAGS="-pg $LDFLAGS"
3683 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3684 # This is a gcc-specific feature
3685 if test "$enable_gcov" = 'yes'; then
3686 AC_CHECK_LIB(gcov,_gcov_init)
3687 AC_CHECK_LIB(gcov,__gcov_init)
3688 case "$target_os" in
3690 OSX_GCOV_LDFLAG="-Wl,-single_module"
3696 AC_SUBST(OSX_GCOV_LDFLAG)
3697 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3698 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3699 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3703 # Build library dependency list for libMagickCore
3706 MAGICK_LIBLTDL='' # Libltdl for build
3707 MAGICK_API_LIBLTDL='' # libltdl for dependent application (API) build
3708 MAGICK_LTDLDEPS='' # extra libltdl dependencies
3709 if test "$with_ltdl" != 'no'
3711 if test \( "$with_included_ltdl" = 'no' -o "$enable_ltdl_convenience" = 'no' \) -o "$enable_ltdl_install" = 'yes'; then
3712 MAGICK_API_LIBLTDL='-lltdl'
3714 MAGICK_LIBLTDL=${LIBLTDL}
3715 MAGICK_LTDLDEPS=${LTDLDEPS}
3717 AC_SUBST(MAGICK_LIBLTDL)
3718 AC_SUBST(MAGICK_LTDLDEPS)
3720 if test "$with_modules" != 'no'; then
3721 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"
3723 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"
3725 AC_SUBST(MAGICK_DEP_LIBS)
3728 # Remove extraneous spaces from output variables (asthetic)
3730 X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'`
3731 X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'`
3732 X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'`
3733 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'`
3735 CC=`echo $CC | sed -e 's/ */ /g'`
3736 CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'`
3737 CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'`
3738 CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'`
3739 DELEGATES=`echo $DELEGATES | sed -e 's/^ //g'`
3740 DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'`
3741 LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'`
3742 TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3743 MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
3744 #LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3746 # Pass only user-provided LIBS as "global" libraries
3752 #AC_SUBST(X_PRE_LIBS)
3754 #AC_SUBST(X_EXTRA_LIBS)
3756 MAGICK_CFLAGS=$CFLAGS
3757 MAGICK_CXXFLAGS="$CXXFLAGS"
3758 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3759 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3760 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3761 MAGICK_LIBS="-lMagickCore $MAGICK_DEP_LIBS $MAGICK_API_LIBLTDL"
3763 AC_SUBST(MAGICK_CFLAGS)
3764 AC_SUBST(MAGICK_CXXFLAGS)
3765 AC_SUBST(MAGICK_CPPFLAGS)
3766 AC_SUBST(MAGICK_PCFLAGS)
3767 AC_SUBST(MAGICK_LDFLAGS)
3768 AC_SUBST(MAGICK_LIBS)
3769 AC_SUBST(MAGICK_FEATURES)
3771 # Set configured scripts to executable.
3772 AC_CONFIG_COMMANDS([default],[],[])
3773 AC_CONFIG_COMMANDS([magick.sh.in],[chmod +x magick.sh])
3774 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3775 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3776 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3777 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3779 AC_MSG_NOTICE([-------------------------------------------------------------])
3780 AC_MSG_NOTICE([Update ImageMagick configuration])
3783 rm -f magick-version
3785 result_dejavu_font_dir='none'
3786 if test "${dejavu_font_dir}x" != 'x'; then
3787 result_dejavu_font_dir=$dejavu_font_dir
3790 result_ghostscript_font_dir='none'
3791 if test "${ghostscript_font_dir}x" != 'x'; then
3792 result_ghostscript_font_dir=$ghostscript_font_dir
3795 result_windows_font_dir='none'
3796 if test "${windows_font_dir}x" != 'x'; then
3797 result_windows_font_dir=${windows_font_dir}
3801 ImageMagick is configured as follows. Please verify that this configuration
3802 matches your expectations.
3804 Host system type: $host
3805 Build system type: $build
3808 -------------------------------------------------------------------------------
3809 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3810 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3811 Module support --with-modules=$with_modules $with_modules
3812 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3813 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3814 High Dynamic Range Imagery
3815 --enable-hdri=$enable_hdri $enable_hdri
3817 Delegate Configuration:
3818 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3819 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3820 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3821 DJVU --with-djvu=$with_djvu $have_djvu
3822 DPS --with-dps=$with_dps $have_dps
3823 FFTW --with-fftw=$with_fftw $have_fftw
3824 FlashPIX --with-fpx=$with_fpx $have_fpx
3825 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3826 FreeType --with-freetype=$with_freetype $have_freetype
3827 GhostPCL None $PCLDelegate ($PCLVersion)
3828 GhostXPS None $XPSDelegate ($XPSVersion)
3829 Ghostscript None $PSDelegate ($GSVersion)
3830 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3831 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3832 Graphviz --with-gvc=$with_gvc $have_gvc
3833 JBIG --with-jbig=$with_jbig $have_jbig
3834 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
3835 JPEG-2000 --with-jp2=$with_jp2 $have_jp2
3836 LCMS v1 --with-lcms=$with_lcms $have_lcms
3837 LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
3838 LQR --with-lqr=$with_lqr $have_lqr
3839 LZMA --with-lzma=$with_lzma $have_lzma
3840 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3841 OpenEXR --with-openexr=$with_openexr $have_openexr
3842 PANGO --with-pango=$with_pango $have_pango
3843 PERL --with-perl=$with_perl $have_perl
3844 PNG --with-png=$with_png $have_png
3845 RSVG --with-rsvg=$with_rsvg $have_rsvg
3846 TIFF --with-tiff=$with_tiff $have_tiff
3847 WEBP --with-webp=$with_webp $have_webp
3848 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
3849 WMF --with-wmf=$with_wmf $have_wmf
3850 X11 --with-x=$with_x $have_x
3851 XML --with-xml=$with_xml $have_xml
3852 ZLIB --with-zlib=$with_zlib $have_zlib
3855 X_CFLAGS = $X_CFLAGS
3856 X_PRE_LIBS = $X_PRE_LIBS
3858 X_EXTRA_LIBS = $X_EXTRA_LIBS
3860 Options used to compile and link:
3861 PREFIX = $PREFIX_DIR
3862 EXEC-PREFIX = $EXEC_PREFIX_DIR
3863 VERSION = $PACKAGE_VERSION
3866 CPPFLAGS = $MAGICK_CPPFLAGS
3867 PCFLAGS = $MAGICK_PCFLAGS
3870 MAGICK_LDFLAGS = $MAGICK_LDFLAGS
3873 CXXFLAGS = $CXXFLAGS
3874 FEATURES = $MAGICK_FEATURES