1 # Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
2 # dedicated to making software imaging solutions freely available.
4 # You may not use this file except in compliance with the License. You may
5 # obtain a copy of the License at
7 # http://www.imagemagick.org/script/license.php
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Copyright (C) 2003 - 2008 GraphicsMagick Group
19 m4_define([magick_major_version], [7])
20 m4_define([magick_minor_version], [0])
21 m4_define([magick_micro_version], [0])
22 m4_define([magick_patchlevel_version], [0])
23 m4_define([magick_version],
24 [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
25 m4_define([magick_svn_revision], esyscmd([sh -c "svnversion | sed -r 's/([0-9]+).*/\1/'"]))
27 AC_INIT([ImageMagick],[magick_version],[http://www.imagemagick.org],[ImageMagick])
28 AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
29 AC_CONFIG_AUX_DIR([config])
30 AC_CONFIG_MACRO_DIR([m4])
31 AC_CONFIG_LIBOBJ_DIR([ltdl])
32 AC_CONFIG_HEADERS([config/config.h])
33 AX_PREFIX_CONFIG_H([MagickCore/magick-config.h],[MagickCore])
35 config/configure.xml \
36 config/delegates.xml \
37 config/ImageMagick.rdf \
38 config/MagickCore.dox \
39 config/MagickWand.dox \
40 config/type-dejavu.xml \
41 config/type-ghostscript.xml \
42 config/type-windows.xml \
45 Magick++/bin/Magick++-config \
46 MagickCore/ImageMagick.pc \
47 Magick++/lib/ImageMagick++.pc \
48 Magick++/lib/Magick++.pc \
49 MagickCore/MagickCore-config \
50 MagickCore/MagickCore.pc \
51 MagickCore/version.h \
54 PerlMagick/Magick.pm \
55 PerlMagick/Makefile.PL \
59 utilities/composite.1 \
63 utilities/identify.1 \
64 utilities/ImageMagick.1 \
69 MagickWand/MagickWand-config \
70 MagickWand/MagickWand.pc ])
73 # Save initial user-tunable values
76 for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
77 eval isset=\${$var+set}
78 if test "$isset" = 'set'; then
80 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
83 AC_SUBST(DISTCHECK_CONFIG_FLAGS)
85 CONFIGURE_ARGS="$0 ${ac_configure_args}"
86 AC_SUBST(CONFIGURE_ARGS)
88 # Source file containing package/library versioning information.
89 . ${srcdir}/version.sh
91 echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
97 MAGICK_TARGET_CPU=$host_cpu
98 AC_SUBST(MAGICK_TARGET_CPU)
100 MAGICK_TARGET_VENDOR=$host_vendor
101 AC_SUBST(MAGICK_TARGET_VENDOR)
103 MAGICK_TARGET_OS=$host_os
104 AC_SUBST(MAGICK_TARGET_OS)
106 # Substitute library versioning
107 AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
108 AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
109 AC_SUBST(MAGICK_LIBRARY_AGE)dnl
110 AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
111 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
112 AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
113 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
114 AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision])
116 AC_SUBST(PACKAGE_NAME)dnl
117 AC_SUBST(PACKAGE_VERSION)dnl
118 AC_SUBST(PACKAGE_PERL_VERSION)dnl
119 AC_SUBST(PACKAGE_RELEASE)dnl
120 AC_SUBST(PACKAGE_CHANGE_DATE)dnl
121 AC_SUBST(PACKAGE_LIB_VERSION)dnl
122 AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
123 AC_SUBST(PACKAGE_RELEASE_DATE)dnl
124 AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
126 # Ensure that make can run correctly
129 AM_INIT_AUTOMAKE([1.11 color-tests foreign parallel-tests silent-rules subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip])
131 # Enable support for silent build rules
132 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
134 MAGICK_LIB_VERSION="0x"
135 if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
136 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
138 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
139 if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
140 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
142 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
143 if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
144 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
146 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
147 AC_SUBST(MAGICK_LIB_VERSION)
149 # Definition used to define MagickLibVersionText in version.h
150 MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
151 AC_SUBST(MAGICK_LIB_VERSION_TEXT)
153 # Definition used to define MagickLibVersionNumber in version.h
154 MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
155 AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
157 # Regenerate config.status if ChangeLog or version.sh is updated.
158 AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
163 MAGICK_CPPFLAGS=$CPPFLAGS_USER
164 MAGICK_PCFLAGS=$CPPFLAGS_USER
170 # Evaluate shell variable equivalents to Makefile directory variables
172 if test "x$prefix" = xNONE; then
173 prefix=$ac_default_prefix
175 # Let make expand exec_prefix.
176 if test "x$exec_prefix" = xNONE; then
177 exec_prefix='${prefix}'
181 eval "eval PREFIX_DIR=${prefix}"
183 eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
184 AC_SUBST(EXEC_PREFIX_DIR)
185 eval "eval BIN_DIR=$bindir"
187 eval "eval SBIN_DIR=$sbindir"
189 eval "eval LIBEXEC_DIR=$libexecdir"
190 AC_SUBST(LIBEXEC_DIR)
191 eval "eval DATA_DIR=$datadir"
193 eval "eval DOC_DIR=$datadir/doc"
195 eval "eval SYSCONF_DIR=$sysconfdir"
196 AC_SUBST(SYSCONF_DIR)
197 eval "eval SHAREDSTATE_DIR=$sharedstatedir"
198 AC_SUBST(SHAREDSTATE_DIR)
199 eval "eval LOCALSTATE_DIR=$localstatedir"
200 AC_SUBST(LOCALSTATE_DIR)
201 eval "eval LIB_DIR=$libdir"
203 eval "eval INCLUDE_DIR=$includedir"
204 AC_SUBST(INCLUDE_DIR)
205 eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
206 AC_SUBST(PERSISTINCLUDE_DIR)
207 eval "eval INFO_DIR=$infodir"
209 eval "eval MAN_DIR=$mandir"
212 # Get full paths to source and build directories
213 srcdirfull="`cd $srcdir && pwd`"
217 # Compute variables useful for running uninstalled software.
219 MAGICK_CODER_MODULE_PATH="${builddir}/coders"
220 MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
221 MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
222 MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
224 case "${build_os}" in
226 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
227 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
228 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
229 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
238 AC_SUBST(MAGICK_CODER_MODULE_PATH)
239 AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
240 AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
241 AC_SUBST(MAGICK_FILTER_MODULE_PATH)
246 # Enable OS features.
248 AC_USE_SYSTEM_EXTENSIONS
265 AX_GCC_ARCHFLAG([no])
269 # Enable run-time checking.
271 AC_ARG_ENABLE([bounds-checking],
272 [AC_HELP_STRING([--enable-bounds-checking],
273 [enable run-time bounds-checking])],
274 [enable_bounds_checking=$enableval],
275 [enable_bounds_checking='no'])
277 if test "$enable_bounds_checking" = yes; then
278 AC_DEFINE([_FORTIFY_SOURCE], [2],
279 [enable run-time bounds-checking])
290 native_win32_build='no'
298 native_win32_build='yes'
302 if test "${GDI32_LIBS}x" != 'x'; then
303 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
306 AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
307 AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
308 AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
309 AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
311 WinPathScript="${srcdirfull}/winpath.sh"
312 AC_SUBST(WinPathScript)
315 # Compiler flags tweaks
317 if test "${GCC}" != "yes"; then
320 # aCC: HP ANSI C++ B3910B A.03.34
321 CFLAGS="${CFLAGS} -Wp,-H30000"
322 if test -n "${CXXFLAGS}"; then
325 CXXFLAGS="${CXXFLAGS} -AA"
329 # Compaq alphaev68-dec-osf5.1 compiler
330 if test -n "${CXXFLAGS}"; then
331 CXXFLAGS='-std strict_ansi -noimplicit_include'
333 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
338 # Check for lazy-loading.
339 AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
341 im_cv_ld_lazyload='none'
343 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
344 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
345 im_cv_ld_lazyload='-Wl,-zlazyload'
350 if test "${im_cv_ld_lazyload}" != 'none' ; then
351 if test -z "${LDFLAGS}" ; then
352 LDFLAGS="${im_cv_ld_lazyload}"
354 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
358 dnl Platform-specific stuff
360 *darwin* | *-macos10*)
361 dnl OS X universal binary support, requires --disable-dependency-tracking
362 AC_ARG_ENABLE([osx-universal-binary],
363 AC_HELP_STRING([--enable-osx-universal-binary],
364 [build universal binary on OS X [[default=no]]]),
365 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
367 if test "${build_osxuniversal}" != no ; then
368 if test "$enable_dependency_tracking" != no ; then
369 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
370 Please re-run configure with these options:
371 --disable-dependency-tracking --enable-osx-universal-binary
374 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
375 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
376 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
382 # ARCH specific include directory
384 AC_ARG_WITH([includearch-dir],
385 [AC_HELP_STRING([--includearch-dir=DIR],
386 [ARCH specific include directory])],
387 [includearch_dir=$withval],
388 [includearch_dir=$INCLUDE_DIR])
390 eval "eval INCLUDEARCH_DIR=$includearch_dir"
391 AC_SUBST(INCLUDEARCH_DIR)
394 # ARCH specific configuration directory
396 AC_ARG_WITH([sharearch-dir],
397 [AC_HELP_STRING([--sharearch-dir=DIR],
398 [ARCH specific config directory])],
399 [sharearch_dir=$withval],
400 [sharearch_dir="${LIB_DIR}"])
402 eval "eval SHAREARCH_DIR=$sharearch_dir"
403 SHAREARCH_DIR="$sharearch_dir"
404 AC_SUBST(SHAREARCH_DIR)
407 # Enable support for threads
408 AC_ARG_WITH([threads],
409 [AC_HELP_STRING([--without-threads], [disable threads support])],
410 [with_threads=$withval],
411 [with_threads='yes'])
414 if test "$with_threads" != 'no'; then
416 if test "$ax_pthread_ok" = yes; then
418 DEF_THREAD="$PTHREAD_CFLAGS"
419 CFLAGS="$CFLAGS $DEF_THREAD"
420 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
421 if test "$CC" != "$PTHREAD_CC"; then
422 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
425 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
429 # Enable support for OpenMP
430 if test "$have_threads" != 'yes'; then
431 ac_cv_prog_c_openmp=unsupported
434 CFLAGS="$OPENMP_CFLAGS $CFLAGS"
435 MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
436 AC_SUBST(OPENMP_CFLAGS)
437 if test "$enable_openmp" != no; then
438 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
439 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
443 # Enable support for OpenCL
445 CFLAGS="$CL_CFLAGS $CFLAGS"
446 LIBS="$CL_LIBS $LIBS"
448 if test "$enable_opencl" != no; then
449 if test "X$ax_cv_check_cl_libcl" != Xno; then :
450 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
456 # Check for large file support
462 if test "$enable_largefile" != no; then
463 case $ac_cv_sys_file_offset_bits in
465 # nothing to do here as the host supports LFS fine
468 AC_MSG_CHECKING([for native large file support])
469 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
471 exit(!(sizeof(off_t) == 8));
473 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
474 AC_MSG_NOTICE([yes])],
475 [AC_MSG_NOTICE([no])])
478 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
481 if test "$ac_cv_sys_large_files" != 'no'; then
482 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
484 if test "$ac_cv_sys_largefile_source" != 'no'; then
485 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
488 AC_SUBST(LFS_CPPFLAGS)
494 AC_SUBST(LIBTOOL_DEPS)
497 LT_CONFIG_LTDL_DIR([ltdl])
498 LTDL_INIT([convenience nonrecursive])
500 # Check to see if building shared libraries
501 libtool_build_shared_libs='no'
502 if test "$enable_shared" = 'yes'; then
503 libtool_build_shared_libs='yes'
506 # Check to see if building static libraries
507 libtool_build_static_libs='no'
508 if test "$enable_static" = 'yes'; then
509 libtool_build_static_libs='yes'
512 AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
514 # Enable support for building loadable modules
516 AC_ARG_WITH([modules],
517 [AC_HELP_STRING([--with-modules],
518 [enable building dynamically loadable modules])],
519 [with_modules=$withval],
522 # Only allow building loadable modules if we are building shared libraries
523 if test "$with_modules" != 'no' ; then
524 if test "$libtool_build_shared_libs" = 'no'; then
525 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
529 if test "$with_modules" != 'no'; then
530 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
532 AM_CONDITIONAL(WITH_MODULES, test "$with_modules" != 'no')
534 # Enable building/use of libltdl if we are building shared libraries regardless
535 # of whether modules are built or not.
537 if test "$libtool_build_shared_libs" != 'no'; then
541 AM_CONDITIONAL(WITH_LTDL, test "$with_ltdl" != 'no')
542 if test "$with_ltdl" != 'no'; then
543 AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules)
546 if test X"$enable_shared" = Xyes; then
547 DLLDFLAGS=-export-dynamic
552 # Enable build using delegate libraries built in subdirectories rather than installed
553 # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
554 AC_ARG_ENABLE([delegate-build],
555 [AC_HELP_STRING([--enable-delegate-build],
556 [look for delegate libraries in build directory])],
557 [enable_delegate_build=$enableval],
558 [enable_delegate_build='no'])
560 AC_ARG_ENABLE([deprecated],
561 [AC_HELP_STRING([--disable-deprecated],
562 [exclude deprecated methods in MagickCore and MagickWand API's])],
563 [enable_deprecated=$enableval],
564 [enable_deprecated='no'])
566 if test "$enable_deprecated" = 'yes'; then
567 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
569 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
572 # Build a version of ImageMagick which operates uninstalled.
573 # Used to build distributions located via MAGICK_HOME / executable path
574 AC_ARG_ENABLE([installed],
575 [AC_HELP_STRING([--disable-installed],
576 [Formally install ImageMagick under PREFIX])],
577 [enable_installed=$enableval],
578 [enable_installed='yes'])
580 if test "$enable_installed" = 'yes'; then
581 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
583 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
586 # Permit enciphering and deciphering image pixels.
587 AC_ARG_ENABLE([cipher],
588 [AC_HELP_STRING([--disable-cipher],
589 [disable enciphering and deciphering image pixels])],
590 [enable_cipher=$enableval],
591 [enable_cipher='yes'])
593 if test "$enable_cipher" = 'yes'; then
594 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
597 # Build a zero-configuration version of ImageMagick.
598 AC_ARG_ENABLE([zero-configuration],
599 [AC_HELP_STRING([--enable-zero-configuration],
600 [enable self-contained, embeddable, zero-configuration ImageMagick])],
601 [enable_zero_configuration=$enableval],
602 [enable_zero_configuration='no'])
604 if test "$enable_zero_configuration" = 'yes'; then
605 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
606 MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES"
609 # Build a high dynamic range version of ImageMagick.
610 AC_ARG_ENABLE([hdri],
611 [AC_HELP_STRING([--enable-hdri],
612 [accurately represent the wide range of intensity levels found in real scenes])],
613 [enable_hdri=$enableval],
617 if test "$enable_hdri" = 'yes'; then
619 AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
620 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
622 AC_SUBST(MAGICK_HDRI)dnl
624 # Build a version of ImageMagick with assert statements.
625 AC_ARG_ENABLE([assert],
626 [AC_HELP_STRING([--disable-assert],
627 [disable assert() statements in build])],
628 [enable_assert=$enableval],
629 [enable_assert='yes'])
631 if test "$enable_assert" = 'no'; then
632 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
635 # Don't emit "rebuild rules" for configure, Makefile.ins, etc.
638 # Enable ccmalloc memory debugging support
639 AC_ARG_ENABLE([ccmalloc],
640 [AC_HELP_STRING([--enable-ccmalloc],
641 [enable 'ccmalloc' memory debug support])],
642 [enable_ccmalloc=$enableval],
643 [enable_ccmalloc='no'])
645 # Enable Electric Fence memory debugging support
646 AC_ARG_ENABLE([efence],
647 [AC_HELP_STRING([--enable-efence],
648 [enable 'efence' memory debug support])],
649 [enable_efence=$enableval],
650 [enable_efence='no'])
652 # Enable prof-based profiling support
653 AC_ARG_ENABLE([prof],
654 [AC_HELP_STRING([--enable-prof],
655 [enable 'prof' profiling support])],
656 [enable_prof=$enableval],
659 # Enable gprof-based profiling support
660 AC_ARG_ENABLE([gprof],
661 [AC_HELP_STRING([--enable-gprof],
662 [enable 'gprof' profiling support])],
663 [enable_gprof=$enableval],
666 # Enable gcov-based profiling support
667 AC_ARG_ENABLE([gcov],
668 [AC_HELP_STRING([--enable-gcov],
669 [enable 'gcov' profiling support])],
670 [enable_gcov=$enableval],
673 enable_profiling='no'
674 if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
675 enable_profiling='yes'
676 if test "$libtool_build_shared_libs" = 'yes'; then
677 echo "Warning: Can not profile code using shared libraries"
681 # Magick API method prefix
682 AC_ARG_WITH([method-prefix],
683 [AC_HELP_STRING([--with-method-prefix=PREFIX],
684 [prefix MagickCore API methods])],
685 [with_method_prefix=$withval],
686 [with_method_prefix='no'])
688 if test "$with_method_prefix" != 'no'; then
689 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
690 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
693 # Enable legacy support (default no)
694 AC_ARG_ENABLE(legacy-support,
695 [ --enable-legacy-support install legacy command-line utilities (default disabled)],
696 [with_legacy_support=$enableval],
697 [with_legacy_support='no'])
698 AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no')
700 # Number of bits in a Quantum
701 AC_ARG_WITH([quantum-depth],
702 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
703 [number of bits in a pixel quantum (default 16)])],
704 [with_quantum_depth=$withval],
705 [with_quantum_depth=16])
707 if test "$with_quantum_depth" != '8'; then
708 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
711 case "${with_quantum_depth}" in
716 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
718 QUANTUM_DEPTH="$with_quantum_depth"
719 AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
720 AC_SUBST(QUANTUM_DEPTH)dnl
722 # Set pixel cache threshold
724 [AC_HELP_STRING([--with-cache=THRESHOLD],
725 [set pixel cache threshhold in MB (default available memory)])],
726 [with_cache=$withval],
729 if test "$with_cache" != ''; then
730 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
731 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
734 # Disable/Enable support for full delegate paths
735 AC_ARG_WITH([frozenpaths],
736 [AC_HELP_STRING([--with-frozenpaths],
737 [freeze delegate paths])],
738 [with_frozenpaths=$withval],
739 [with_frozenpaths='no'])
741 # Enable build/install of Magick++
742 AC_ARG_WITH([magick-plus-plus],
743 [AC_HELP_STRING([--without-magick-plus-plus],
744 [disable build/install of Magick++])],
745 [with_magick_plus_plus=$withval],
746 [with_magick_plus_plus='yes'])
748 # Disable build/install of PerlMagick.
750 [AC_HELP_STRING([--with-perl],
751 [enable build/install of PerlMagick])],
752 [with_perl=$withval],
755 # Options to pass when configuring PerlMagick
756 AC_ARG_WITH([perl-options],
757 [AC_HELP_STRING([--with-perl-options=OPTIONS],
758 [options to pass on command-line when generating PerlMagick build file])],
759 PERL_MAKE_OPTIONS=$withval)
760 AC_SUBST(PERL_MAKE_OPTIONS)
762 # Enable umem, object-caching memory allocation library.
764 [ --with-umem enable umem memory allocation library support],
765 [with_umem=$withval],
767 if test "$with_umem" != 'yes' ; then
768 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
772 # Specify path to shared libstdc++ if not in normal location
774 AC_ARG_WITH([libstdc],
775 [AC_HELP_STRING([--with-libstdc=DIR],
776 [ use libstdc++ in DIR (for GNU C++)])],
777 [with_libstdc=$withval],
780 if test "$with_libstdc" != ''; then
781 if test -d "$with_libstdc"; then
782 LIBSTDCLDFLAGS="-L$with_libstdc"
785 AC_SUBST(LIBSTDCLDFLAGS)
787 # Does gcc required -traditional?
788 AC_PROG_GCC_TRADITIONAL
792 # Set defines required to build DLLs and modules using MinGW
795 # These options are set for multi-thread DLL module build
796 # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
798 # executable/Magick++: _DLL _MAGICKMOD_
799 MODULE_EXTRA_CPPFLAGS=''
800 LIBRARY_EXTRA_CPPFLAGS=''
801 if test "${native_win32_build}" = 'yes'; then
802 if test "${libtool_build_shared_libs}" = 'yes'; then
803 CPPFLAGS="$CPPFLAGS -D_DLL"
804 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
805 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
806 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
807 if test "$with_modules" = 'yes'; then
808 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
810 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
813 CPPFLAGS="$CPPFLAGS -D_LIB"
814 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
815 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
817 if test "$with_threads" = 'yes'; then
818 CPPFLAGS="$CPPFLAGS -D_MT"
819 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
820 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
823 AC_SUBST(MODULE_EXTRA_CPPFLAGS)
824 AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
826 # Check standard headers
828 if ! test x"$ac_cv_header_stdc" = x"yes"; then
829 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
830 header files. Compilation cannot proceed. Please install the ANSI C
831 headers and rerun this script.]);
836 # Check additional headers
837 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)
841 # Checks for typedefs, structures, and compiler characteristics.
854 # If the C compiler supports the keyword inline, do nothing. Otherwise
855 # define inline to __inline__ or __inline if it accepts one of those,
856 # otherwise define inline to be empty.
859 # If the C compiler supports the keyword restrict, do nothing. Otherwise
860 # define restrict to __restrict__ or __restrict if it accepts one of those,
861 # otherwise define restrict to be empty.
864 # If words are stored with the most significant byte first (like
865 # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
868 # Define to a suitable type, if standard headers do not define it.
876 AC_TYPE_LONG_DOUBLE_WIDER
877 AC_TYPE_LONG_LONG_INT
891 AC_TYPE_UNSIGNED_LONG_LONG_INT
893 # If the C type char is unsigned, define __CHAR_UNSIGNED__, unless the
894 # C compiler predefines it.
897 # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
898 AC_CHECK_SIZEOF(signed short)
900 # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
901 AC_CHECK_SIZEOF(unsigned short)
903 # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
904 AC_CHECK_SIZEOF(signed int)
906 # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
907 AC_CHECK_SIZEOF(unsigned int)
909 # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
910 AC_CHECK_SIZEOF(signed long)
912 # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
913 AC_CHECK_SIZEOF(unsigned long)
915 # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
916 # 'signed long long' is not supported then the value defined is zero.
917 AC_CHECK_SIZEOF(signed long long)
919 # Obtain size of a 'unsigned long long' and define as
920 # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
921 # supported then the value defined is zero.
922 AC_CHECK_SIZEOF(unsigned long long)
924 # Obtain size of off_t and define as SIZEOF_OFF_T
925 AC_CHECK_SIZEOF(off_t)
927 # Obtain size of size_t and define as SIZEOF_SIZE_T
928 AC_CHECK_SIZEOF(size_t)
930 # Obtain size of ssize_t and define as SIZEOF_SSIZE_T
931 AC_CHECK_SIZEOF(ssize_t)
933 # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
934 AC_CHECK_SIZEOF(unsigned int*)
937 # Compute sized types for current CPU and compiler options.
940 AC_MSG_CHECKING(for signed 8-bit type)
942 AC_MSG_NOTICE($INT8_T)
945 AC_MSG_CHECKING(for unsigned 8-bit type)
946 UINT8_T='unsigned char'
947 AC_MSG_NOTICE($UINT8_T)
950 AC_MSG_CHECKING(for signed 16-bit type)
951 INT16_T='signed short'
952 AC_MSG_NOTICE($INT16_T)
955 AC_MSG_CHECKING(for unsigned 16-bit type)
956 UINT16_T='unsigned short'
957 AC_MSG_NOTICE($UINT16_T)
960 AC_MSG_CHECKING(for signed 32-bit type)
963 if test $ac_cv_sizeof_signed_int -eq 4; then
966 elif test $ac_cv_sizeof_signed_long -eq 4; then
967 INT32_T='signed long'
970 AC_MSG_NOTICE($INT32_T)
974 AC_MSG_CHECKING(for unsigned 32-bit type)
977 if test $ac_cv_sizeof_unsigned_int -eq 4; then
978 UINT32_T='unsigned int'
980 elif test $ac_cv_sizeof_unsigned_long -eq 4; then
981 UINT32_T='unsigned long'
984 AC_MSG_NOTICE($UINT32_T)
988 AC_MSG_CHECKING(for signed 64-bit type)
991 if test $ac_cv_sizeof_signed_long -eq 8; then
992 INT64_T='signed long'
994 elif test $ac_cv_sizeof_signed_long_long -eq 8; then
995 INT64_T='signed long long'
1003 AC_MSG_NOTICE($INT64_T)
1007 AC_MSG_CHECKING(for unsigned 64-bit type)
1010 if test $ac_cv_sizeof_unsigned_long -eq 8; then
1011 UINT64_T='unsigned long'
1013 elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1014 UINT64_T='unsigned long long'
1017 case "${host_os}" in
1022 AC_MSG_NOTICE($UINT64_T)
1026 AC_MSG_CHECKING(for unsigned maximum type)
1029 if test "$UINT64_T" != 'none'; then
1032 elif test "$UINT32_T" != 'none'; then
1036 AC_MSG_NOTICE($UINTMAX_T)
1040 AC_MSG_CHECKING(for pointer difference type)
1043 if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1044 UINTPTR_T='unsigned long'
1046 elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1047 UINTPTR_T='unsigned long long'
1050 AC_MSG_NOTICE($UINTPTR_T)
1054 AC_MSG_CHECKING([whether our compiler supports __func__])
1056 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1057 AC_MSG_NOTICE([yes]),
1059 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1061 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1062 AC_MSG_NOTICE([yes])
1063 AC_DEFINE(__func__, __FUNCTION__,
1064 [Define to appropriate substitue if compiler does not have __func__]),
1066 AC_DEFINE(__func__, __FILE__,
1067 [Define to appropriate substitue if compiler does not have __func__])))
1071 # Check for functions
1074 MAGICK_FUNC_MMAP_FILEIO
1075 AC_FUNC_CLOSEDIR_VOID
1079 AC_FUNC_SELECT_ARGTYPES
1080 AC_FUNC_SETVBUF_REVERSED
1090 AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1091 LIBS="$MATH_LIBS $LIBS"
1094 AC_CHECK_FUNCS([acosh asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
1097 # Check for clock_gettime().
1099 AC_SEARCH_LIBS(clock_gettime, rt,
1101 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1102 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
1105 [[#include <time.h>]],
1106 [[clockid_t clockType = CLOCK_REALTIME;]])],
1109 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1110 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1116 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1122 # Check for function prototypes
1126 AC_CHECK_DECLS([pread, pwrite],[],[],[
1127 #include <unistd.h>])
1129 AC_CHECK_DECLS([strlcpy],[],[],[
1130 #include <strings.h>])
1132 AC_CHECK_DECLS([vsnprintf],[],[],[
1134 #include <stdarg.h>])
1138 # C++ Support Tests (For Magick++)
1141 have_magick_plus_plus='no'
1142 if test "$with_magick_plus_plus" = 'yes'; then
1147 # Full set of headers used...
1148 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1149 # functional iomanip iosfwd iostream iterator list string strstream utility
1154 AX_CXX_NAMESPACE_STD
1155 AC_CXX_HAVE_STD_LIBS
1159 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1161 test $ax_cv_cxx_bool = 'yes' && \
1162 test $ax_cv_cxx_namespaces = 'yes' && \
1163 test $ac_cv_cxx_have_std_libs = 'yes' && \
1164 test $ax_cv_cxx_have_std_namespace = 'yes'; then
1165 have_magick_plus_plus='yes'
1167 have_magick_plus_plus='no (failed tests)'
1169 AC_MSG_NOTICE([$have_magick_plus_plus])
1172 AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1174 # Only check for delegate libraries in subdirectories if requested.
1175 if test "$enable_delegate_build" != 'no'; then
1176 # Check for delegate sub-directories and add -I & -L options as required.
1177 # This presumes that delegates are installed as detailed in the ImageMagick
1178 # README. If delegates are installed in a standard location where the
1179 # compiler will automatically find them then these options should not be
1183 # Most delegates have includes in the same directory as the library, but not all...
1186 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
1187 if test -d "$builddir/$dir"; then
1188 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1190 if test -d "$srcdirfull/$dir"; then
1191 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1197 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
1198 if test -d "$builddir/$dir/.libs"; then
1199 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1201 if test -d "$srcdirfull/$dir/.libs"; then
1202 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1205 if test -d "$builddir/$dir"; then
1206 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1208 if test -d "$srcdirfull/$dir"; then
1209 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1215 # Assume that delegate headers reside under same directory as ImageMagick
1216 # installation prefix.
1217 MAGICK_CPPFLAGS="-I$INCLUDE_DIR/ImageMagick $MAGICK_CPPFLAGS"
1220 # Find the X11 RGB database
1222 AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1223 [# Look for the header file in a standard set of common directories.
1224 # Check X11 before X11Rn because it is often a symlink to the current release.
1233 /usr/XFree86/lib/X11 \
1241 /usr/local/X11/lib \
1242 /usr/local/X11R4/lib \
1243 /usr/local/X11R5/lib \
1244 /usr/local/X11R6/lib \
1246 /usr/local/lib/X11 \
1247 /usr/local/lib/X11R4 \
1248 /usr/local/lib/X11R5 \
1249 /usr/local/lib/X11R6 \
1250 /usr/local/lib/X11R7 \
1251 /usr/local/x11r5/lib \
1252 /usr/lpp/Xamples/lib \
1254 /usr/openwin/share/lib \
1255 /usr/unsupported/lib \
1258 if test -f "$ac_dir/X11/rgb.txt"; then
1259 im_cv_x_configure="$ac_dir/X11/"
1261 elif test -f "$ac_dir/rgb.txt"; then
1262 im_cv_x_configure="$ac_dir/"
1267 X11_CONFIGURE_PATH="$im_cv_x_configure"
1268 case "${build_os}" in
1270 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1273 AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",Location of X11 configure files)
1276 # Find OpenMP library
1279 if test "$enable_openmp" != 'no'; then
1280 if test "${GCC}" = "yes"; then
1281 # Open64 (passes for GCC but uses different OpenMP implementation)
1282 if test "x$GOMP_LIBS" = x ; then
1283 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1284 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1288 if test "x$GOMP_LIBS" = x ; then
1289 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1293 if test "x$GOMP_LIBS" = x ; then
1294 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1297 if test "x$GOMP_LIBS" = x ; then
1298 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1300 # SGI IRIX 6.5 MIPSpro C/C++
1301 if test "x$GOMP_LIBS" = x ; then
1302 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1305 LIBS="$GOMP_LIBS $LIBS"
1310 # Find Posix threads library
1313 if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then
1315 if test "x$PTHREAD_LIBS" = "x"; then
1316 case "${host_cpu}-${host_os}" in
1318 MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;;
1322 for lib in pthread pthreads; do
1323 if test "x$PTHREAD_LIBS" = "x"; then
1324 MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib])
1328 THREAD_LIBS="$PTHREAD_LIBS"
1329 LIBS="$LIBS $THREAD_LIBS"
1331 AC_SUBST(THREAD_LIBS)
1338 if test "$with_umem" != 'no'; then
1339 AC_MSG_CHECKING(for UMEM support )
1343 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1344 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1345 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1346 AC_MSG_CHECKING(if umem memory allocation library is complete)
1347 if test $passed -gt 0; then
1348 if test $failed -gt 0; then
1349 AC_MSG_NOTICE(no -- some components failed test)
1350 have_umem='no (failed tests)'
1353 LIBS="$UMEM_LIBS $LIBS"
1354 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1362 AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1366 # Add support for ccmalloc memory debugging library if requested
1370 if test "$enable_ccmalloc" = 'yes'; then
1371 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1372 if test -n "$CCMALLOCDelegate"; then
1373 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1375 # Assume that gcc is used with ccmalloc.
1376 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1377 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1378 if test -n "$CCMALLOC_LIBS"; then
1380 LIBS="$LIBS $CCMALLOC_LIBS"
1389 # Add support for efence memory debugging library if requested
1391 if test "$enable_efence" = 'yes'; then
1392 EFENCE_LIBS='-lefence'
1393 LIBS="$EFENCE_LIBS $LIBS"
1396 dnl ===========================================================================
1402 AC_ARG_WITH([bzlib],
1403 [AC_HELP_STRING([--without-bzlib],
1404 [disable BZLIB support])],
1405 [with_bzlib=$withval],
1408 if test "$with_bzlib" != 'yes'; then
1409 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1413 if test "$with_bzlib" != 'no'; then
1415 AC_MSG_NOTICE([-------------------------------------------------------------])
1416 AC_MSG_CHECKING([for BZLIB])
1421 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1422 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1423 if test "$native_win32_build" = 'yes'; then
1424 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1426 if test $found_libbz -gt 0; then
1427 passed=`expr $passed + 1`
1429 failed=`expr $failed + 1`
1431 AC_MSG_CHECKING(if BZLIB package is complete)
1432 if test $passed -gt 0; then
1433 if test $failed -gt 0; then
1434 AC_MSG_NOTICE(no -- some components failed test)
1435 have_bzlib='no (failed tests)'
1438 LIBS="$BZLIB_LIBS $LIBS"
1439 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1447 AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1448 AC_SUBST(BZLIB_LIBS)
1451 # Find the X11 include and library directories.
1458 if test "$no_x" != 'yes'; then
1459 AC_MSG_NOTICE([-------------------------------------------------------------])
1460 AC_MSG_CHECKING([for X11])
1462 LDFLAGS="$LDFLAGS $X_LIBS"
1463 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1464 LIBS="$X11_LIBS $LIBS"
1465 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1467 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1470 # Check for X11 shared memory extension
1472 # shmctl is required to support the shared memory extension
1473 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1474 if test "$have_shmctl" != 'yes'; then
1476 LIBS="$LIBS -lcygipc"
1477 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1481 if test "$have_shmctl" = 'yes'; then
1482 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1486 # Check for X11 shape extension
1488 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1489 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1490 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1492 if test "$no_x" != 'yes'; then
1497 AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1501 dnl ===========================================================================
1507 [AC_HELP_STRING([--without-zlib],
1508 [disable ZLIB support])],
1509 [with_zlib=$withval],
1512 if test "$with_zlib" != 'yes'; then
1513 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1518 dnl PNG requires zlib so enable zlib check if PNG is requested
1519 if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
1520 AC_MSG_NOTICE([-------------------------------------------------------------])
1521 AC_MSG_CHECKING([for ZLIB])
1526 AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1527 AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1528 AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1529 AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1530 AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1531 AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1532 AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1533 AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1534 AC_MSG_CHECKING([if ZLIB package is complete])
1535 if test $passed -gt 0; then
1536 if test $failed -gt 0; then
1537 AC_MSG_NOTICE([no -- some components failed test])
1538 have_zlib='no (failed tests)'
1541 LIBS="$ZLIB_LIBS $LIBS"
1542 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
1543 AC_MSG_NOTICE([yes])
1550 AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1554 # If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1557 if test "$enable_profiling" = 'yes'; then
1558 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1559 LIBS="$LIB_DL $LIBS"
1563 dnl ===========================================================================
1566 # Check for Autotrace delegate library.
1568 AC_ARG_WITH([autotrace],
1569 [AC_HELP_STRING([--with-autotrace],
1570 [enable autotrace support])],
1571 [with_autotrace=$withval],
1572 [with_autotrace='no'])
1574 if test "$with_autotrace" != 'yes'; then
1575 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1582 if test "x$with_autotrace" = "xyes"; then
1583 AC_MSG_NOTICE([-------------------------------------------------------------])
1584 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1588 if test "$have_autotrace" = 'yes'; then
1590 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1591 if test "$with_modules" = 'no'; then
1592 CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
1596 AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1597 AC_SUBST(AUTOTRACE_CFLAGS)
1598 AC_SUBST(AUTOTRACE_LIBS)
1600 dnl ===========================================================================
1603 # Check for Display Postscript delegate library.
1606 [AC_HELP_STRING([--without-dps],
1607 [disable Display Postscript support])],
1608 [with_dps=$withval],
1611 if test "$with_dps" != 'yes'; then
1612 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1617 if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1618 AC_MSG_NOTICE([-------------------------------------------------------------])
1619 AC_MSG_CHECKING([for DPS])
1623 PERSIST_CPPFLAGS="$CPPFLAGS"
1624 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1625 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1627 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1628 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1629 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1630 # ImageMagick itself doesn't use -lXt.
1633 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1634 if test "$have_libdps" != 'yes'; then
1635 # Unset cache variable so we can try again.
1636 unset ac_cv_lib_dps_DPSInitialize
1637 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1638 if test "$have_libdps" = 'yes'; then
1642 if test "$have_libdps" = 'yes'; then
1643 passed=`expr $passed + 1`
1645 failed=`expr $failed + 1`
1647 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1648 AC_MSG_CHECKING([if DPS package is complete])
1649 if test $passed -gt 0; then
1650 if test $failed -gt 0; then
1651 AC_MSG_NOTICE([no -- some components failed test])
1652 have_dps='no (failed tests)'
1653 CPPFLAGS="$PERSIST_CPPFLAGS"
1655 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1656 LIBS="$DPS_LIBS $LIBS"
1657 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1658 AC_MSG_NOTICE([yes])
1663 CPPFLAGS=$PERSIST_CPPFLAGS
1666 AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1669 dnl ===========================================================================
1672 # Check for DJVU delegate library.
1675 [AC_HELP_STRING([--without-djvu],
1676 [disable DjVu support])],
1677 [with_djvu=$withval],
1680 if test "$with_djvu" != 'yes'; then
1681 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1686 if test "$with_djvu" != 'no'; then
1687 AC_MSG_NOTICE([-------------------------------------------------------------])
1688 AC_MSG_CHECKING([for DJVU])
1692 AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1693 AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1694 AC_MSG_CHECKING([if DJVU package is complete])
1695 if test $passed -gt 0; then
1696 if test $failed -gt 0; then
1697 AC_MSG_NOTICE([no -- some components failed test])
1698 have_djvu='no (failed tests)'
1700 DJVU_LIBS='-ldjvulibre'
1701 LIBS="$DJVU_LIBS $LIBS"
1702 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1703 AC_MSG_NOTICE([yes])
1710 AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1713 dnl ===========================================================================
1716 # Set DejaVu font directory.
1718 AC_ARG_WITH([dejavu-font-dir],
1719 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1720 [DejaVu font directory])],
1721 [with_dejavu_font_dir=$withval],
1722 [with_dejavu_font_dir='default'])
1724 if test "$with_dejavu_font_dir" != 'default'; then
1725 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1728 dnl ===========================================================================
1731 # Check for FFTW delegate library.
1734 [AC_HELP_STRING([--without-fftw],
1735 [disable FFTW support])],
1736 [with_fftw=$withval],
1739 if test "$with_fftw" != 'yes'; then
1740 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1745 if test "$with_fftw" != 'no'; then
1746 AC_MSG_NOTICE([-------------------------------------------------------------])
1747 AC_MSG_CHECKING([for FFTW])
1751 AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1752 AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1753 AC_MSG_CHECKING([if FFTW package is complete])
1754 if test $passed -gt 0; then
1755 if test $failed -gt 0; then
1756 AC_MSG_NOTICE([no -- some components failed test])
1757 have_fftw='no (failed tests)'
1760 LIBS="$FFTW_LIBS $LIBS"
1761 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1762 AC_MSG_NOTICE([yes])
1769 AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1772 dnl ===========================================================================
1775 # Check for FlashPIX delegate library.
1778 [AC_HELP_STRING([--without-fpx],
1779 [disable FlashPIX support])],
1780 [with_fpx=$withval],
1783 if test "$with_fpx" != 'yes'; then
1784 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1789 if test "$with_fpx" != 'no'; then
1790 AC_MSG_NOTICE([-------------------------------------------------------------])
1791 AC_MSG_CHECKING([for FlashPIX])
1796 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1797 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1799 AC_MSG_CHECKING([if FlashPIX package is complete])
1800 if test $passed -gt 0; then
1801 if test $failed -gt 0; then
1802 AC_MSG_NOTICE([no -- some components failed test])
1803 have_fpx='no (failed tests)'
1806 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1807 AC_MSG_NOTICE([yes])
1815 AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1818 dnl ===========================================================================
1821 # Check for fontconfig delegate library.
1823 AC_ARG_WITH([fontconfig],
1824 [AC_HELP_STRING([--without-fontconfig],
1825 [disable fontconfig support])],
1826 [with_fontconfig=$withval],
1827 [with_fontconfig='yes'])
1829 if test "$with_fontconfig" != 'yes'; then
1830 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
1833 have_fontconfig='no'
1834 FONTCONFIG_CFLAGS=""
1837 if test "x$with_fontconfig" = "xyes"; then
1838 AC_MSG_NOTICE([-------------------------------------------------------------])
1839 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
1843 if test "$have_fontconfig" = 'yes'; then
1844 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
1845 if test "$with_modules" = 'no'; then
1846 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
1850 AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
1851 AC_SUBST(FONTCONFIG_CFLAGS)
1852 AC_SUBST(FONTCONFIG_LIBS)
1854 dnl ===========================================================================
1857 # Check for freetype delegate library.
1859 AC_ARG_WITH([freetype],
1860 [AC_HELP_STRING([--without-freetype],
1861 [disable Freetype support])],
1862 [with_freetype=$withval],
1863 [with_freetype='yes'])
1866 if test "$with_freetype" != 'yes'; then
1867 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
1872 if test "$with_freetype" != 'no'; then
1873 AC_MSG_NOTICE([-------------------------------------------------------------])
1874 AC_MSG_CHECKING(for FreeType 2.0 )
1878 PERSIST_LDFLAGS="$LDFLAGS"
1879 PERSIST_CPPFLAGS="$CPPFLAGS"
1881 # Allow the user to specify the location of freetype.
1882 if test "$with_freetype" != 'yes'; then
1883 if test -x "${with_freetype}/bin/freetype-config"; then
1884 freetype_config="${with_freetype}/bin/freetype-config"
1885 elif test -x "${with_freetype}"; then
1886 freetype_config=${with_freetype}
1889 if test -z "$freetype_config"; then
1890 AC_PATH_PROG(freetype_config,freetype-config,)dnl
1892 if test -n "$freetype_config"; then
1893 freetype_prefix=`${freetype_config} --prefix`
1894 freetype_exec_prefix=`${freetype_config} --exec-prefix`
1895 LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
1896 CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
1899 dnl First see if there is a library
1900 if test "$FREETYPE_LIBS" = ''; then
1901 AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,)
1902 if test "$FREETYPE_LIBS" != ''; then
1903 passed=`expr $passed + 1`
1905 failed=`expr $failed + 1`
1906 LDFLAGS="$PERSIST_LDFLAGS"
1910 dnl Now test for the headers
1911 AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include <ft2build.h>'],[ft2build=''],[])
1912 AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H])
1913 if test "$have_freetype_h" = 'yes'; then
1914 passed=`expr $passed + 1`
1916 failed=`expr $failed + 1`
1917 CPPFLAGS="$PERSIST_CPPFLAGS"
1920 AC_MSG_CHECKING(if FreeType package is complete)
1921 if test $passed -gt 0; then
1922 if test $failed -gt 0; then
1924 AC_MSG_NOTICE(no -- some components failed test)
1925 have_freetype='no (failed tests)'
1927 LIBS="$FREETYPE_LIBS $LIBS"
1928 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library)
1929 if test "$ac_cv_header_ft2build_h" = 'yes'; then
1930 AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the <ft2build.h> header file.])
1939 AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
1940 AC_SUBST(FREETYPE_LIBS)
1942 dnl ===========================================================================
1945 # Check for Ghostscript library or framework.
1947 # Test for iapi.h & test for gsapi_new_instance in -lgs
1948 # or -framework Ghostscript
1950 AC_ARG_WITH([gslib],
1951 [AC_HELP_STRING([--without-gslib],
1952 [enable Ghostscript library support])],
1953 [with_gslib=$withval],
1956 gslib_framework='no'
1957 if test "$with_gslib" != 'yes'; then
1958 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
1963 if test "$with_gslib" != 'no'; then
1964 AC_MSG_NOTICE([-------------------------------------------------------------])
1965 AC_MSG_CHECKING([for Ghostscript])
1970 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
1971 failed=`expr $failed + 1`,)
1972 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
1973 failed=`expr $failed + 1`,)
1974 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
1975 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
1976 AC_MSG_CHECKING([if Ghostscript package is complete])
1977 if test $passed -gt 0; then
1978 if test $failed -gt 0; then
1979 AC_MSG_NOTICE([no -- some components failed test])
1980 have_gslib='no (failed tests)'
1982 if test $framework -gt 0; then
1983 GS_LIBS='-framework Ghostscript'
1984 gslib_framework='yes'
1985 AC_MSG_NOTICE([yes, using framework.])
1987 AC_MSG_NOTICE([yes, using library.])
1990 LIBS="$GS_LIBS $LIBS"
1991 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
1998 AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
2001 # Set default font search path
2002 AC_ARG_WITH([fontpath],
2003 [AC_HELP_STRING([--with-fontpath=DIR],
2004 [prepend to default font search path])],
2005 [with_fontpath=$withval],
2008 if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2011 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",Define to prepend to default font search path.)
2013 if test "$with_fontpath=" != ''; then
2014 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2017 # Set Ghostscript font directory
2018 AC_ARG_WITH([gs-font-dir],
2019 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2020 [Ghostscript font directory])],
2021 [with_gs_font_dir=$withval],
2022 [with_gs_font_dir='default'])
2024 if test "$with_gs_font_dir" != 'default'; then
2025 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2028 dnl ===========================================================================
2031 # Check for GVC delegate library.
2034 [AC_HELP_STRING([--without-gvc],
2035 [disable GVC support])],
2036 [with_gvc=$withval],
2039 if test "$with_gvc" != 'yes'; then
2040 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2044 if test "x$with_gvc" = "xyes"; then
2045 AC_MSG_NOTICE([-------------------------------------------------------------])
2046 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2050 if test "$have_gvc" = 'yes'; then
2051 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2052 if test "$with_modules" = 'no'; then
2053 CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
2057 AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2058 AC_SUBST(GVC_CFLAGS)
2061 dnl ===========================================================================
2064 # Check for JBIG delegate library.
2068 [AC_HELP_STRING([--without-jbig],
2069 [disable JBIG support])],
2070 [with_jbig=$withval],
2075 if test "$with_jbig" != 'no'; then
2076 AC_MSG_NOTICE([-------------------------------------------------------------])
2077 AC_MSG_CHECKING([for JBIG])
2081 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2082 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2083 AC_MSG_CHECKING([if JBIG package is complete])
2084 if test $passed -gt 0; then
2085 if test $failed -gt 0; then
2086 AC_MSG_NOTICE([no -- some components failed test])
2087 have_jbig='no (failed tests)'
2090 LIBS="$JBIG_LIBS $LIBS"
2091 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2092 AC_MSG_NOTICE([yes])
2099 AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2102 dnl ===========================================================================
2105 # Check for JPEG delegate library.
2108 [AC_HELP_STRING([--without-jpeg],
2109 [disable JPEG support])],
2110 [with_jpeg=$withval],
2113 if test "$with_jpeg" != 'yes'; then
2114 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2119 if test "$with_jpeg" != 'no'; then
2120 AC_MSG_NOTICE([-------------------------------------------------------------])
2121 AC_MSG_CHECKING([for JPEG])
2125 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2126 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2127 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2128 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2129 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2131 # Test for compatible JPEG library
2132 if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2133 AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2137 #include <jpeglib.h>
2139 changequote(<<, >>)dnl
2141 #if JPEG_LIB_VERSION < 62
2142 #error IJG JPEG library must be version 6b or newer!
2146 changequote([, ])dnl
2147 ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2148 ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2150 AC_MSG_CHECKING([if JPEG package is complete])
2151 if test $passed -gt 0; then
2152 if test $failed -gt 0; then
2153 AC_MSG_NOTICE([no -- some components failed test])
2154 have_jpeg='no (failed tests)'
2157 LIBS="$JPEG_LIBS $LIBS"
2158 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2159 AC_MSG_NOTICE([yes])
2166 AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2169 dnl ===========================================================================
2172 # Check for JPEG Version 2 delegate library.
2175 [AC_HELP_STRING([--without-jp2],
2176 [disable JPEG-2000 support])],
2177 [with_jp2=$withval],
2180 if test "$with_jp2" != 'yes'; then
2181 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 "
2186 if test "$with_jp2" != 'no'; then
2187 AC_MSG_NOTICE([-------------------------------------------------------------])
2188 AC_MSG_CHECKING([for JPEG Version 2])
2192 AC_CHECK_HEADER(jasper/jasper.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2193 AC_CHECK_LIB(jasper,jas_stream_fopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2194 AC_MSG_CHECKING([if JPEG version 2 support package is complete])
2195 if test $passed -gt 0; then
2196 if test $failed -gt 0; then
2197 AC_MSG_NOTICE([no -- some components failed test])
2198 have_jp2='no (failed tests)'
2201 LIBS="$JP2_LIBS $LIBS"
2202 AC_DEFINE(JP2_DELEGATE,1,Define if you have JPEG version 2 "Jasper" library)
2203 AC_MSG_NOTICE([yes])
2210 AM_CONDITIONAL(JP2_DELEGATE, test "$have_jp2" = 'yes')
2213 dnl ===========================================================================
2216 # Check for LCMS delegate library.
2220 [ --without-lcms disable lcms (v1.1X) support],
2221 [with_lcms=$withval],
2223 if test "$with_lcms" != 'yes' ; then
2224 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2229 [ --without-lcms2 disable lcms (v2.X) support],
2230 [with_lcms2=$withval],
2232 if test "$with_lcms2" != 'yes' ; then
2233 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
2238 if test "$with_lcms2" != 'no'; then
2239 AC_MSG_NOTICE([-------------------------------------------------------------])
2240 AC_MSG_CHECKING([for LCMS v2])
2244 have_lcms_header='no'
2246 # Check for <lcms2.h>
2247 AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
2248 if test "$have_lcms_header" = 'yes'; then
2249 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2250 passed=`expr $passed + 1`
2253 # Check for <lcms2/lcms2.h)
2254 if test "$have_lcms_header" != 'yes'; then
2255 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2256 if test "$have_lcms_header" = 'yes'; then
2257 passed=`expr $passed + 1`
2258 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2262 # Failed to find lcms header?
2263 if test "$have_lcms_header" != 'yes'; then
2264 failed=`expr $failed + 1`
2267 AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2268 AC_MSG_CHECKING(if LCMS v2 package is complete)
2269 if test $passed -gt 0; then
2270 if test $failed -gt 0; then
2271 AC_MSG_NOTICE(no -- some components failed test)
2272 have_lcms2='no (failed tests)'
2275 LIBS="$LCMS_LIBS $LIBS"
2285 # Check for LCMS v1 (1.11 or later)
2287 if test $have_lcms2 = 'yes'; then
2292 if test "$with_lcms" != 'no'; then
2293 AC_MSG_NOTICE([-------------------------------------------------------------])
2294 AC_MSG_CHECKING([for LCMS v1.1X])
2298 have_lcms_header='no'
2300 # Check for <lcms.h>
2301 if test "$have_lcms_header" != 'yes'; then
2302 AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
2303 if test "$have_lcms_header" = 'yes'; then
2304 passed=`expr $passed + 1`
2305 AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
2309 # Check for <lcms/lcms.h>
2310 if test "$have_lcms_header" != 'yes'; then
2311 AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
2312 if test "$have_lcms_header" = 'yes'; then
2313 passed=`expr $passed + 1`
2314 AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
2318 # Failed to find lcms header?
2319 if test "$have_lcms_header" != 'yes'; then
2320 failed=`expr $failed + 1`
2323 AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2324 AC_MSG_CHECKING(if LCMS package is complete)
2325 if test $passed -gt 0; then
2326 if test $failed -gt 0; then
2327 AC_MSG_NOTICE(no -- some components failed test)
2328 have_lcms='no (failed tests)'
2331 LIBS="$LCMS_LIBS $LIBS"
2340 AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
2341 if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
2342 AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
2347 dnl ===========================================================================
2350 # Check for the LQR (Liquid Rescale) delegate library.
2353 [AC_HELP_STRING([--without-lqr],
2354 [disable Liquid Rescale support])],
2355 [with_lqr=$withval],
2358 if test "$with_lqr" != 'yes'; then
2359 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2366 if test "x$with_lqr" = "xyes"; then
2367 AC_MSG_NOTICE([-------------------------------------------------------------])
2368 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2372 if test "$have_lqr" = 'yes'; then
2373 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2374 CFLAGS="$LQR_CFLAGS $CFLAGS"
2377 AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2378 AC_SUBST(LQR_CFLAGS)
2381 dnl ===========================================================================
2383 # Disable LZMA (lzma library)
2385 [ --without-lzma disable LZMA support],
2386 [with_lzma=$withval],
2388 if test "$with_lzma" != 'yes' ; then
2389 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2393 if test "x$with_lzma" = "xyes"; then
2394 AC_MSG_NOTICE([-------------------------------------------------------------])
2395 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2399 if test "$have_lzma" = 'yes'; then
2400 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2401 if test "$with_modules" = 'no'; then
2402 CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS"
2406 AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2407 AC_SUBST(LZMA_CFLAGS)
2410 dnl ===========================================================================
2413 # Check for the OpenEXR delegate library.
2415 AC_ARG_WITH([openexr],
2416 [AC_HELP_STRING([--without-openexr],
2417 [disable OpenEXR support])],
2418 [with_openexr=$withval],
2419 [with_openexr='yes'])
2421 if test "$with_openexr" != 'yes'; then
2422 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2429 if test "x$with_openexr" = "xyes"; then
2430 AC_MSG_NOTICE([-------------------------------------------------------------])
2431 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2435 if test "$have_openexr" = 'yes'; then
2436 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2437 if test "$with_modules" = 'no'; then
2438 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2442 AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2443 AC_SUBST(OPENEXR_CFLAGS)
2444 AC_SUBST(OPENEXR_LIBS)
2446 dnl ===========================================================================
2449 # Check for PANGO delegate library.
2451 AC_ARG_WITH([pango],
2452 [AC_HELP_STRING([--without-pango],
2453 [disable PANGO support])],
2454 [with_pango=$withval],
2457 if test "$with_pango" != 'yes'; then
2458 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2462 have_pangocairo='no'
2466 if test "x$with_pango" = "xyes"; then
2467 AC_MSG_RESULT([-------------------------------------------------------------])
2468 PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
2470 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2474 if test "$have_pango" = 'yes'; then
2475 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2476 if test "$with_modules" = 'no'; then
2477 CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
2481 if test "$have_pangocairo" = 'yes'; then
2482 AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
2483 if test "$with_modules" = 'no'; then
2484 CPPFLAGS="$PANGOCAIRO_CFLAGS $CPPFLAGS"
2488 AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
2489 AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes')
2490 AC_SUBST(PANGO_CFLAGS)
2491 AC_SUBST(PANGO_LIBS)
2493 dnl ===========================================================================
2496 # Check for PNG delegate library.
2499 [AC_HELP_STRING([--without-png],
2500 [disable PNG support])],
2501 [with_png=$withval],
2504 if test "$with_png" != 'yes'; then
2505 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2511 if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
2512 AC_MSG_NOTICE([-------------------------------------------------------------])
2513 AC_MSG_CHECKING(for PNG support )
2517 AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
2518 failed=`expr $failed + 1`,)
2520 if test $passed -gt 0; then
2521 for var in 5 4 2 '' ; do
2522 if test "$have_png" = 'no' ; then
2523 if test "x${var}" = 'x' ; then
2529 # Test for compatible LIBPNG library
2532 if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
2533 if test "${pnglib}" != 'png' ; then
2534 AC_MSG_CHECKING(for LIBPNG1${var} support )
2540 changequote(<<, >>)dnl
2542 #if PNG_LIBPNG_VER_MINOR != ${var}
2543 #error LIBPNG library must be version 1${var}!
2548 changequote([, ])dnl
2549 ac_cv_libpng_ok='yes',
2550 ac_cv_libpng_ok='no')
2551 if test "$ac_cv_libpng_ok" = 'yes' ; then
2552 passed=`expr $passed + 1`
2555 failed=`expr $failed + 1`
2559 passed=`expr $passed + 1`
2564 if test $passed -gt 0 -a $failed -le 0; then
2565 if test "1${var}" = '15' ; then
2566 AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
2567 failed=`expr $failed + 1`,)
2568 AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
2569 failed=`expr $failed + 1`,)
2571 if test "1${var}" = '14' ; then
2572 AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
2573 failed=`expr $failed + 1`,)
2574 AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
2575 failed=`expr $failed + 1`,)
2577 if test "1${var}" = '12' ; then
2578 AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
2579 failed=`expr $failed + 1`,)
2581 if test "1${var}" = '1' ; then
2582 AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
2583 failed=`expr $failed + 1`,)
2585 if test $passed -gt 0 -a $failed -le 0 ; then
2586 AC_MSG_CHECKING(if ${pnglib} package is complete)
2587 if test $passed -gt 0 ; then
2588 if test $failed -gt 0 ; then
2589 AC_MSG_NOTICE(no -- some components failed test)
2590 have_png='no (failed tests)'
2592 PNG_LIBS="-l${pnglib}"
2593 LIBS="$PNG_LIBS $LIBS"
2594 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2606 AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
2610 dnl ===========================================================================
2613 # Check for RSVG delegate library.
2616 [AC_HELP_STRING([--without-rsvg],
2617 [disable RSVG support])],
2618 [with_rsvg=$withval],
2621 if test "$with_rsvg" != 'yes'; then
2622 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2630 if test "x$with_rsvg" = "xyes"; then
2631 AC_MSG_NOTICE([-------------------------------------------------------------])
2632 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2634 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2638 if test "$have_rsvg" = 'yes'; then
2639 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2640 if test "$with_modules" = 'no'; then
2641 CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
2645 if test "$have_cairo" = 'yes'; then
2646 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2647 if test "$with_modules" = 'no'; then
2648 CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
2652 AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2653 AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2654 AC_SUBST(RSVG_CFLAGS)
2657 dnl ===========================================================================
2660 # Check for TIFF delegate library.
2663 [AC_HELP_STRING([--without-tiff],
2664 [disable TIFF support])],
2665 [with_tiff=$withval],
2668 if test "$with_tiff" != 'yes'; then
2669 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2674 if test "$with_tiff" != 'no'; then
2675 AC_MSG_NOTICE([-------------------------------------------------------------])
2676 AC_MSG_CHECKING([for TIFF])
2680 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2681 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2682 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2683 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2684 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2685 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2686 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2687 AC_MSG_CHECKING([if TIFF package is complete])
2688 if test $passed -gt 0; then
2689 if test $failed -gt 0; then
2690 AC_MSG_NOTICE([no -- some components failed test])
2691 have_tiff='no (failed tests)'
2694 LIBS="$TIFF_LIBS $LIBS"
2695 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2696 AC_MSG_NOTICE([yes])
2698 AC_CHECK_HEADERS(tiffconf.h)
2699 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2700 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2701 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2702 TIFFSwabArrayOfTriples])
2708 AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2711 dnl ===========================================================================
2714 # Check for WEBP delegate library.
2717 [AC_HELP_STRING([--without-webp],
2718 [disable WEBP support])],
2719 [with_webp=$withval],
2722 if test "$with_webp" != 'yes'; then
2723 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2728 if test "$with_webp" != 'no'; then
2729 AC_MSG_NOTICE([-------------------------------------------------------------])
2730 AC_MSG_CHECKING([for WEBP])
2734 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2735 AC_CHECK_LIB(webp,WebPDecodeRGB,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2736 AC_MSG_CHECKING([if WEBP package is complete])
2737 if test $passed -gt 0; then
2738 if test $failed -gt 0; then
2739 AC_MSG_NOTICE([no -- some components failed test])
2740 have_webp='no (failed tests)'
2743 LIBS="$WEBP_LIBS $LIBS"
2744 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2745 AC_MSG_NOTICE([yes])
2752 AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2755 dnl ===========================================================================
2758 # Set Windows font directory.
2760 AC_ARG_WITH([windows-font-dir],
2761 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2762 [directory containing MS-Windows fonts])],
2763 [with_windows_font_dir=$withval],
2764 [with_windows_font_dir=''])
2765 if test "$with_windows_font_dir" != '' ; then
2766 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2769 dnl ===========================================================================
2772 # Check for WMF delegate library.
2775 [AC_HELP_STRING([--with-wmf],
2776 [enable WMF support])],
2777 [with_wmf=$withval],
2780 if test "$with_wmf" != 'yes'; then
2781 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2788 if test "$with_wmf" != 'no'; then
2789 AC_MSG_RESULT([-------------------------------------------------------------])
2790 AC_MSG_CHECKING([for WMF])
2793 have_libwmflite='no'
2794 have_libwmf_ipa_h='no'
2796 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H])
2797 if test "$have_libwmf_ipa_h" = 'yes'; then
2798 AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,)
2799 if test "$have_libwmflite" = 'yes'; then
2800 AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library)
2801 WMF_LIBS='-lwmflite'
2802 LIBS="$WMF_LIBS $LIBS"
2806 WMF_CONFIG_LIBS=`libwmf-config --libs`
2807 for lib in xml2 expat freetype jpeg png z; do
2809 echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib"
2811 AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS)
2812 if test "$have_libwmf" = 'yes'; then
2813 AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library)
2815 LIBS="$WMF_LIBS $LIBS"
2818 AC_MSG_RESULT([no -- some components failed test])
2819 have_wmf='no (failed tests)'
2820 have_wmflite='no (failed tests)'
2826 AC_MSG_CHECKING([if WMF package is complete])
2827 if test "$have_wmf" = 'yes'; then
2828 AC_MSG_RESULT([yes])
2833 AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes')
2835 AC_SUBST(WMF_LIBS_DEPS)
2838 dnl ===========================================================================
2841 # Check for XML delegate library.
2844 [AC_HELP_STRING([--without-xml],
2845 [disable XML support])],
2846 [with_xml=$withval],
2849 if test "$with_xml" != 'yes' ; then
2850 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2855 if test "$with_xml" != 'no'; then
2856 AC_MSG_NOTICE([-------------------------------------------------------------])
2857 AC_MSG_CHECKING([for XML])
2859 PERSIST_LDFLAGS=$LDFLAGS
2860 PERSIST_CPPFLAGS=$CPPFLAGS
2862 AC_PATH_PROG(xml2_config,xml2-config,)dnl
2863 if test -n "$xml2_config"; then
2864 # Debian installs libxml headers under /usr/include/libxml2/libxml with
2865 # the shared library installed under /usr/lib, whereas the package
2866 # installs itself under $prefix/libxml and $prefix/lib.
2867 xml2_prefix=`xml2-config --prefix`
2868 if test -d "${xml2_prefix}/include/libxml2"; then
2869 CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
2871 if test "${xml2_prefix}" != '/usr'; then
2872 LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
2877 AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2878 AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2879 AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2880 AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2881 AC_MSG_CHECKING([if XML package is complete])
2882 if test $passed -gt 0; then
2883 if test $failed -gt 0; then
2884 AC_MSG_NOTICE([no -- some components failed test])
2885 have_xml='no (failed tests)'
2886 LDFLAGS="$PERSIST_LDFLAGS"
2887 CPPFLAGS="$PERSIST_CPPFLAGS"
2890 LIBS="$XML_LIBS $LIBS"
2891 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2892 AC_MSG_NOTICE([yes])
2899 AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
2902 dnl ===========================================================================
2904 # Substitute compiler name to build/link PerlMagick
2906 AC_SUBST(PERLMAINCC)
2909 # Configure install Paths
2912 # Path to ImageMagick header files
2913 INCLUDE_RELATIVE_PATH="ImageMagick"
2914 INCLUDE_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
2915 DEFINE_INCLUDE_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
2916 case "${build_os}" in
2918 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2921 AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",Directory where ImageMagick headers live.)
2922 AC_SUBST(INCLUDE_PATH)
2924 # Subdirectory under lib to place ImageMagick lib files
2925 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2926 AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",Subdirectory of lib where ImageMagick architecture dependent files are installed)
2928 # Path to ImageMagick bin directory
2929 EXECUTABLE_PATH="${BIN_DIR}"
2930 DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2931 case "${build_os}" in
2933 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2936 AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",Directory where executables are installed.)
2937 AC_SUBST(EXECUTABLE_PATH)
2939 # Path to ImageMagick lib
2940 LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2941 DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2942 case "${build_os}" in
2944 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2947 AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",Directory where architecture-dependent files live.)
2948 AC_SUBST(LIBRARY_PATH)
2951 # Subdirectory under lib to place ImageMagick coder module files
2952 CODER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/coders"
2953 AC_DEFINE_UNQUOTED(CODER_RELATIVE_PATH,"$CODER_RELATIVE_PATH",Subdirectory of lib where coder modules are installed)
2954 CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}"
2955 DEFINE_CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}/"
2956 case "${build_os}" in
2958 DEFINE_CODER_PATH=`$WinPathScript "$DEFINE_CODER_PATH" 1`
2961 AC_DEFINE_UNQUOTED(CODER_PATH,"$DEFINE_CODER_PATH",Location of coder modules)
2962 AC_SUBST(CODER_PATH)
2965 # Subdirectory under lib to place ImageMagick filter module files
2966 FILTER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/filters"
2967 AC_DEFINE_UNQUOTED(FILTER_RELATIVE_PATH,"$FILTER_RELATIVE_PATH",Subdirectory of lib where filter modules are installed)
2968 FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}"
2969 DEFINE_FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}/"
2970 case "${build_os}" in
2972 DEFINE_FILTER_PATH=`$WinPathScript "$DEFINE_FILTER_PATH" 1`
2975 AC_DEFINE_UNQUOTED(FILTER_PATH,"$DEFINE_FILTER_PATH",Location of filter modules)
2976 AC_SUBST(FILTER_PATH)
2979 # Path to ImageMagick documentation files
2980 DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2981 DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
2982 DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
2983 case "${build_os}" in
2985 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
2988 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",Directory where ImageMagick documents live.)
2989 AC_SUBST(DOCUMENTATION_PATH)
2991 # Subdirectory to place architecture-dependent configuration files
2992 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
2993 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",Subdirectory of lib where architecture-dependent configuration files live.)
2994 CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2995 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2996 case "${build_os}" in
2998 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
3001 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",Directory where architecture-dependent configuration files live.)
3002 AC_SUBST(CONFIGURE_PATH)
3004 # Subdirectory to place architecture-independent configuration files
3005 SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
3006 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
3007 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
3008 DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
3009 case "${build_os}" in
3011 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
3014 AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",Directory where architecture-independent configuration files live.)
3015 AC_SUBST(SHARE_PATH)
3017 # Subdirectory to place architecture-dependent configuration files
3018 SHAREARCH_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/config"
3019 AC_DEFINE_UNQUOTED(SHAREARCH_RELATIVE_PATH,"$SHAREARCH_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
3020 SHAREARCH_PATH="${SHAREARCH_DIR}/${SHAREARCH_RELATIVE_PATH}"
3021 DEFINE_SHAREARCH_PATH="${SHAREARCH_DIR}/${SHAREARCH_RELATIVE_PATH}/"
3022 case "${build_os}" in
3024 DEFINE_SHAREARCH_PATH=`$WinPathScript "$DEFINE_SHAREARCH_PATH" 1`
3027 AC_DEFINE_UNQUOTED(SHAREARCH_PATH,"$DEFINE_SHAREARCH_PATH",Directory where architecture-independent configuration files live.)
3028 AC_SUBST(SHAREARCH_PATH)
3031 # program_transform_name is formed for use in a Makefile, so create a
3032 # modified version for use in a shell script.
3033 configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3035 # Default delegate definitions
3036 AC_MSG_NOTICE([-------------------------------------------------------------])
3037 AC_MSG_CHECKING([for ImageMagick delegate programs])
3039 AutotraceDecodeDelegateDefault='autotrace'
3040 BlenderDecodeDelegateDefault='blender'
3041 BZIPDelegateDefault='bzip2'
3042 BrowseDelegateDefault='xdg-open'
3043 CGMDecodeDelegateDefault='ralcgm'
3044 CatDelegateDefault='cat'
3045 DNGDecodeDelegateDefault='ufraw-batch'
3046 GVCDecodeDelegateDefault='dot'
3047 DVIDecodeDelegateDefault='dvips'
3048 EchoDelegateDefault='echo'
3049 EditorDelegateDefault='xterm'
3050 FIGDecodeDelegateDefault='fig2dev'
3051 ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
3052 DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
3053 MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
3054 GnuplotDecodeDelegateDefault='gnuplot'
3055 HPGLDecodeDelegateDefault='hp2xx'
3056 HTMLDecodeDelegateDefault='html2ps'
3057 ILBMDecodeDelegateDefault='ilbmtoppm'
3058 ILBMEncodeDelegateDefault='ppmtoilbm'
3059 LPDelegateDefault='lp'
3060 LPRDelegateDefault='lpr'
3061 LZWDecodeDelegateDefault='uncompress'
3062 LZWEncodeDelegateDefault='compress'
3063 LaunchDelegateDefault='gimp'
3064 MANDelegateDefault='groff'
3065 MPEGDecodeDelegateDefault='ffmpeg'
3066 MPEGEncodeDelegateDefault='ffmpeg'
3067 MrSIDDecodeDelegateDefault='mrsidgeodecode'
3068 MVDelegateDefault='mv'
3069 PCLDelegateDefault='pcl6'
3070 PGPDecodeDelegateDefault='pgpv'
3071 POVDelegateDefault='povray'
3072 if test "$native_win32_build" = 'yes'; then
3073 PSDelegateDefault='gswin32c'
3074 elif test "$gslib_framework" = 'yes'; then
3075 PSDelegateDefault='gsc'
3077 PSDelegateDefault='gs'
3079 RLEEncodeDelegateDefault='rawtorle'
3080 RMDelegateDefault='rm'
3081 RSVGDecodeDelegateDefault='rsvg-convert'
3082 SCANDecodeDelegateDefault='scanimage'
3083 TXTDelegateDefault='enscript'
3084 UniconvertorDelegateDefault='uniconvertor'
3085 WMFDecodeDelegateDefault='wmf2eps'
3086 WWWDecodeDelegateDefault='curl'
3087 XPSDelegateDefault='gxps'
3088 ZipDelegateDefault='gzip'
3090 # Search for delegates
3091 AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
3092 AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
3093 AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
3094 AC_PATH_PROG(BrowseDelegate, "$BrowseDelegateDefault" mozilla firefox netscape, "$BrowseDelegateDefault")
3095 AC_PATH_PROG(CGMDecodeDelegate, "$CGMDecodeDelegateDefault", "$CGMDecodeDelegateDefault")
3096 AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
3097 AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
3098 AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
3099 AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
3100 AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
3101 AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
3102 AC_PATH_PROG(FIGDecodeDelegate, "$FIGDecodeDelegateDefault", "$FIGDecodeDelegateDefault")
3103 AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3104 AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
3105 AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
3106 AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
3107 AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3108 AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3109 AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3110 AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
3111 AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3112 AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
3113 AC_PATH_PROG(LZWDecodeDelegate, "$LZWDecodeDelegateDefault", "$LZWDecodeDelegateDefault")
3114 AC_PATH_PROG(LZWEncodeDelegate, "$LZWEncodeDelegateDefault", "$LZWEncodeDelegateDefault")
3115 AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
3116 AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
3117 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3118 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3119 AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
3120 AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3121 AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
3122 AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
3123 AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
3124 AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
3125 AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
3126 AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
3127 AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
3128 AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
3129 AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
3130 AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
3131 AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
3132 AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
3133 AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
3134 AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
3136 # Prefer lpr to lp; lp needs options tacked on.
3137 if test "$LPRDelegate" != no; then
3138 PrintDelegate="$LPRDelegate"
3140 PrintDelegate="$LPDelegate -c -s"
3142 AC_SUBST(PrintDelegate)
3144 # Installed ImageMagick utiltity paths
3145 ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3146 DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3147 MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3149 # Set delegate booleans
3150 have_ffmpeg='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_ffmpeg='yes'; fi
3151 have_fig2dev='no' ; if test "$FIGDecodeDelegate" != "$FIGDecodeDelegateDefault" ; then have_fig2dev='yes'; fi
3152 have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3153 have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3154 have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
3155 have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
3156 have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3157 have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
3158 have_ralcgm='no' ; if test "$CGMDecodeDelegate" != "$CGMDecodeDelegateDefault" ; then have_ralcgm='yes'; fi
3159 have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3162 # Test for font directories
3164 type_include_files=''
3167 AC_MSG_CHECKING(for Dejavu fonts directory)
3169 if test "${with_dejavu_font_dir}" != 'default'; then
3170 dejavu_font_dir="${with_dejavu_font_dir}/"
3172 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3173 if test -f "${font_dir}DejaVuSerif.ttf"; then
3174 dejavu_font_dir="${font_dir}"
3179 if test "${dejavu_font_dir}x" != 'x'; then
3180 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3181 AC_MSG_NOTICE([$dejavu_font_dir])
3183 AC_MSG_NOTICE([not found!]);
3185 AC_SUBST(dejavu_font_dir)
3189 if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
3190 windows_font_dir="${with_windows_font_dir}/"
3192 if test "${windows_font_dir}x" != 'x'; then
3193 if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
3194 windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
3196 if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then
3197 windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/'
3199 if test -f '/usr/share/fonts/msttcore/arial.ttf'; then
3200 windows_font_dir='/usr/share/fonts/msttcore/truetype/'
3203 if test "${windows_font_dir}x" != 'x'; then
3204 type_include_files="$type_include_files "'<include file="type-windows.xml" />'
3206 AC_SUBST(windows_font_dir)
3209 AC_MSG_CHECKING(for Ghostscript fonts directory)
3210 ghostscript_font_dir=''
3211 if test "${with_gs_font_dir}" != 'default'; then
3212 ghostscript_font_dir="${with_gs_font_dir}/"
3214 if test "${native_win32_build}" = 'yes'; then
3215 # Native Windows Build
3216 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3217 if test -f "${font_dir}a010013l.pfb"; then
3218 ghostscript_font_dir="$font_dir"
3222 if test "${PSDelegate}" != 'gswin32c'; then
3223 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3226 # Linux / Mac OS X / Unix Build
3227 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
3228 if test -f "${font_dir}a010013l.pfb"; then
3229 ghostscript_font_dir="${font_dir}"
3233 if test "${ghostscript_font_dir}x" = 'x'; then
3234 if test "$PSDelegate" != 'gs'; then
3235 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3240 if test "${ghostscript_font_dir}x" != 'x'; then
3241 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3242 AC_MSG_NOTICE([$ghostscript_font_dir])
3244 AC_MSG_NOTICE([not found!]);
3246 AC_SUBST(ghostscript_font_dir)
3247 case "${build_os}" in
3249 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3253 AC_SUBST(type_include_files)
3256 # Handle case where user doesn't want frozen paths
3258 if test "$with_frozenpaths" != 'yes'; then
3259 # Re-set delegate definitions to default (no paths)
3260 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
3261 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3262 BZIPDelegate="$BZIPDelegateDefault"
3263 BrowseDelegate="$BrowseDelegateDefault"
3264 CGMDecodeDelegate="$CGMDecodeDelegateDefault"
3265 CatDelegate="$CatDelegateDefault"
3266 ConvertDelegate="$ConvertDelegateDefault"
3267 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3268 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3269 EchoDelegate="$EchoDelegateDefault"
3270 EditorDelegate="$EditorDelegateDefault"
3271 FIGDecodeDelegate="$FIGDecodeDelegateDefault"
3272 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3273 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3274 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3275 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3276 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3277 LPDelegate="$LPDelegateDefault"
3278 LZWDecodeDelegate="$LZWDecodeDelegateDefault"
3279 LZWEncodeDelegate="$LZWEncodeDelegateDefault"
3280 LaunchDelegate="$LaunchDelegateDefault"
3281 MANDelegate="$MANDelegateDefault"
3282 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3283 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
3284 MogrifyDelegate="$MogrifyDelegateDefault"
3285 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3286 MVDelegate="$MVDelegateDefault"
3287 PCLDelegate="$PCLDelegateDefault"
3288 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3289 POVDelegate="$POVDelegateDefault"
3290 PSDelegate="$PSDelegateDefault"
3291 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3292 RMDelegate="$RMDelegateDefault"
3293 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
3294 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3295 ShowImageDelegate="$ShowImageDelegateDefault"
3296 TXTDelegate="$TXTDelegateDefault"
3297 UniconvertorDelegate="$UniconvertorDelegateDefault"
3298 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3299 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3300 XPSDelegate="$XPSDelegateDefault"
3301 ZipDelegate="$ZipDelegateDefault"
3304 # Delegate substitutions
3305 AC_SUBST(AutotraceDecodeDelegate)
3306 AC_SUBST(BlenderDecodeDelegate)
3307 AC_SUBST(BZIPDelegate)
3308 AC_SUBST(BrowseDelegate)
3309 AC_SUBST(CGMDecodeDelegate)
3310 AC_SUBST(CatDelegate)
3311 AC_SUBST(ConvertDelegate)
3312 AC_SUBST(GVCDecodeDelegate)
3313 AC_SUBST(DVIDecodeDelegate)
3314 AC_SUBST(EchoDelegate)
3315 AC_SUBST(EditorDelegate)
3316 AC_SUBST(FIGDecodeDelegate)
3317 AC_SUBST(GnuplotDecodeDelegate)
3318 AC_SUBST(HPGLDecodeDelegate)
3319 AC_SUBST(HTMLDecodeDelegate)
3320 AC_SUBST(ILBMDecodeDelegate)
3321 AC_SUBST(ILBMEncodeDelegate)
3322 AC_SUBST(LPDelegate)
3323 AC_SUBST(LZWDecodeDelegate)
3324 AC_SUBST(LZWEncodeDelegate)
3325 AC_SUBST(LaunchDelegate)
3326 AC_SUBST(MANDelegate)
3327 AC_SUBST(MPEGDecodeDelegate)
3328 AC_SUBST(MPEGEncodeDelegate)
3329 AC_SUBST(MogrifyDelegate)
3330 AC_SUBST(MrSIDDecodeDelegate)
3331 AC_SUBST(MVDelegate)
3332 AC_SUBST(PCLDelegate)
3333 AC_SUBST(PGPDecodeDelegate)
3334 AC_SUBST(POVDelegate)
3335 AC_SUBST(PSDelegate)
3336 AC_SUBST(RLEEncodeDelegate)
3337 AC_SUBST(RMDelegate)
3338 AC_SUBST(SCANDecodeDelegate)
3339 AC_SUBST(ShowImageDelegate)
3340 AC_SUBST(TXTDelegate)
3341 AC_SUBST(UniconvertorDelegate)
3342 AC_SUBST(WMFDecodeDelegate)
3343 AC_SUBST(WWWDecodeDelegate)
3344 AC_SUBST(XPSDelegate)
3345 AC_SUBST(ZipDelegate)
3351 AC_CHECK_PROGS(TAR,gnutar gtar tar)
3352 AC_CHECK_PROGS(PERL,perl)
3353 AC_CHECK_PROGS(RPM,rpmbuild rpm)
3354 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3355 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3356 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3357 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3359 AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3362 # 7ZIP support (http://p7zip.sourceforge.net/)
3365 AC_CHECK_PROGS(P7ZIP,[7za])
3367 AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3370 # ZIP support (http://www.info-zip.org/Zip.html)
3373 AC_CHECK_PROGS(ZIP,[zip])
3375 AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3378 # GhostPCL related configuration.
3380 PCLColorDevice=ppmraw
3381 PCLCMYKDevice=pamcmyk32
3382 PCLMonoDevice=pbmraw
3383 if test -z "$PCLVersion"; then
3384 PCLVersion='unknown'
3386 if test $have_pcl = 'yes'; then
3387 AC_MSG_NOTICE([-------------------------------------------------------------])
3388 AC_MSG_CHECKING([for PCL])
3391 AC_MSG_CHECKING([for pcl color device])
3392 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3395 PCLColorDevice=ppmraw
3397 AC_MSG_NOTICE([$PCLColorDevice])
3400 AC_MSG_CHECKING([for pcl CMYK device])
3401 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3404 PCLCMYKDevice=$PCLColorDevice
3406 AC_MSG_NOTICE([$PCLCMYKDevice])
3409 AC_MSG_CHECKING([for pcl mono device])
3410 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3413 PCLMonoDevice=$PCLColorDevice
3415 AC_MSG_NOTICE([$PCLMonoDevice])
3418 AC_SUBST(PCLMonoDevice)
3419 AC_SUBST(PCLColorDevice)
3420 AC_SUBST(PCLCMYKDevice)
3421 AC_SUBST(PCLVersion)
3424 # GhostXPS related configuration.
3426 XPSColorDevice=ppmraw
3427 XPSCMYKDevice=bmpsep8
3428 XPSMonoDevice=pbmraw
3429 if test -z "$XPSVersion"; then
3430 XPSVersion='unknown'
3432 if test $have_xps = 'yes'; then
3433 AC_MSG_NOTICE([-------------------------------------------------------------])
3434 AC_MSG_CHECKING([for XPS])
3437 AC_MSG_CHECKING([for xps color device])
3438 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3441 XPSColorDevice=ppmraw
3443 AC_MSG_NOTICE([$XPSColorDevice])
3446 AC_MSG_CHECKING([for xps CMYK device])
3447 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3450 XPSCMYKDevice=$XPSColorDevice
3452 AC_MSG_NOTICE([$XPSCMYKDevice])
3455 AC_MSG_CHECKING([for xps mono device])
3456 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3459 XPSMonoDevice=$XPSColorDevice
3461 AC_MSG_NOTICE([$XPSMonoDevice])
3464 AC_SUBST(XPSMonoDevice)
3465 AC_SUBST(XPSColorDevice)
3466 AC_SUBST(XPSCMYKDevice)
3467 AC_SUBST(XPSVersion)
3470 # Ghostscript related configuration.
3472 GSAlphaDevice=pngalpha
3473 GSColorDevice=pnmraw
3476 GSPDFDevice=pdfwrite
3478 GSEPSDevice=epswrite
3480 if test $have_gs = 'yes'; then
3481 AC_MSG_NOTICE([-------------------------------------------------------------])
3482 AC_MSG_CHECKING([for Ghostscript])
3484 AC_MSG_CHECKING([for Ghostscript version])
3485 if GSVersion=`$PSDelegate --version`; then
3488 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3490 AC_MSG_NOTICE([$GSVersion])
3493 AC_MSG_CHECKING([for gs alpha device])
3494 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3497 GSAlphaDevice=pnmraw
3499 AC_MSG_NOTICE([$GSAlphaDevice])
3502 AC_MSG_CHECKING([for gs color device])
3503 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3506 GSColorDevice=pnmraw
3508 AC_MSG_NOTICE([$GSColorDevice])
3511 AC_MSG_CHECKING([for gs CMYK device])
3512 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3515 GSCMYKDevice=bmpsep8
3517 AC_MSG_NOTICE([$GSCMYKDevice])
3520 AC_MSG_CHECKING([for gs mono device])
3521 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3524 GSMonoDevice=$GSColorDevice
3526 AC_MSG_NOTICE([$GSMonoDevice])
3529 AC_MSG_CHECKING([for gs PDF writing device])
3530 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3533 GSPDFDevice=nodevice
3535 AC_MSG_NOTICE([$GSPDFDevice])
3538 AC_MSG_CHECKING([for gs PS writing device])
3539 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3544 AC_MSG_NOTICE([$GSPSDevice])
3547 AC_MSG_CHECKING([for gs EPS writing device])
3548 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3551 GSEPSDevice=nodevice
3553 AC_MSG_NOTICE([$GSEPSDevice])
3556 AC_SUBST(GSAlphaDevice)
3557 AC_SUBST(GSCMYKDevice)
3558 AC_SUBST(GSColorDevice)
3559 AC_SUBST(GSEPSDevice)
3560 AC_SUBST(GSMonoDevice)
3561 AC_SUBST(GSPDFDevice)
3562 AC_SUBST(GSPSDevice)
3566 # PerlMagick-related configuration
3569 # Look for PERL if PerlMagick requested
3570 # If name/path of desired PERL interpreter is specified, look for that one first
3572 if test "$with_perl" != 'no'; then
3573 AC_MSG_NOTICE([-------------------------------------------------------------])
3574 AC_MSG_CHECKING([for Perl])
3576 if test "$with_perl" != 'yes'; then
3577 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3578 PERL=$ac_cv_path_PERL
3580 have_perl="$ac_cv_path_PERL"
3582 AC_PATH_PROGS(PERL,perl perl5,)dnl
3583 if test "$ac_cv_path_PERL"; then
3584 have_perl="$ac_cv_path_PERL"
3589 if test "$with_perl" != 'yes' ; then
3590 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3593 PERL_SUPPORTS_DESTDIR='no'
3595 with_perl_static='no'
3596 with_perl_dynamic='no'
3597 if test "$have_perl" != 'no'; then
3598 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3599 with_perl_static='yes'
3601 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3602 with_perl_dynamic='yes'
3604 # Is PERL's MakeMaker new enough to support DESTDIR?
3605 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
3607 AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3608 AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3609 AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3610 AC_SUBST(PERL_SUPPORTS_DESTDIR)
3612 # Determine path to pick up MagickCore library from for use with building PerlMagick
3613 MAGICKCORE_PATH="${LIB_DIR}"
3614 if test $with_perl_static = 'yes'; then
3615 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3616 libtool_objdir=$objdir
3618 # Linker search path to library, followed by -lMagickCore
3619 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
3621 AC_SUBST(MAGICKCORE_PATH)
3623 # Create a simple string containing format names for all delegate libraries
3625 if test "$have_autotrace" = 'yes'; then DELEGATES="$DELEGATES autotrace"; fi
3626 if test "$have_bzlib" = 'yes'; then DELEGATES="$DELEGATES bzlib"; fi
3627 if test "$have_djvu" = 'yes'; then DELEGATES="$DELEGATES djvu"; fi
3628 if test "$have_dps" = 'yes'; then DELEGATES="$DELEGATES dps"; fi
3629 if test "$have_fftw" = 'yes'; then DELEGATES="$DELEGATES fftw"; fi
3630 if test "$have_fpx" = 'yes'; then DELEGATES="$DELEGATES fpx"; fi
3631 if test "$have_fontconfig" = 'yes'; then DELEGATES="$DELEGATES fontconfig"; fi
3632 if test "$have_freetype" = 'yes'; then DELEGATES="$DELEGATES freetype"; fi
3633 if test "$have_gslib" = 'yes'; then DELEGATES="$DELEGATES gs"; fi
3634 if test "$have_gvc" = 'yes'; then DELEGATES="$DELEGATES gvc"; fi
3635 if test "$have_jbig" = 'yes'; then DELEGATES="$DELEGATES jbig"; fi
3636 if test "$have_jpeg" = 'yes'; then
3637 DELEGATES="$DELEGATES jpeg";
3638 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi
3640 if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi
3641 if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi
3642 if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi
3643 if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi
3644 if test "$have_lzma" = 'yes'; then DELEGATES="$DELEGATES lzma"; fi
3645 if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi
3646 if test "$have_openexr" = 'yes'; then DELEGATES="$DELEGATES openexr"; fi
3647 if test "$have_pango" = 'yes'; then DELEGATES="$DELEGATES pango"; fi
3648 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES png"; fi
3649 if test "$have_rsvg" = 'yes'; then DELEGATES="$DELEGATES rsvg"; fi
3650 if test "$have_tiff" = 'yes'; then DELEGATES="$DELEGATES tiff"; fi
3651 if test "$have_x" = 'yes'; then DELEGATES="$DELEGATES x11"; fi
3652 if test "$have_xml" = 'yes'; then DELEGATES="$DELEGATES xml"; fi
3653 if test "$have_wmf" = 'yes'; then DELEGATES="$DELEGATES wmf"; fi
3654 if test "$have_zlib" = 'yes'; then DELEGATES="$DELEGATES zlib"; fi
3659 # Handle special compiler flags
3662 # Add '-p' if prof source profiling support enabled
3663 if test "$enable_prof" = 'yes'; then
3665 CXXFLAGS="-p $CXXFLAGS"
3666 LDFLAGS="-p $LDFLAGS"
3669 # Add '-pg' if gprof source profiling support enabled
3670 if test "$enable_gprof" = 'yes'; then
3671 CFLAGS="-pg $CFLAGS"
3672 CXXFLAGS="-pg $CXXFLAGS"
3673 LDFLAGS="-pg $LDFLAGS"
3676 # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3677 # This is a gcc-specific feature
3678 if test "$enable_gcov" = 'yes'; then
3679 AC_CHECK_LIB(gcov,_gcov_init)
3680 AC_CHECK_LIB(gcov,__gcov_init)
3681 case "$target_os" in
3683 OSX_GCOV_LDFLAG="-Wl,-single_module"
3689 AC_SUBST(OSX_GCOV_LDFLAG)
3690 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3691 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3692 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3696 # Build library dependency list for libMagickCore
3699 MAGICK_LIBLTDL='' # Libltdl for build
3700 MAGICK_API_LIBLTDL='' # libltdl for dependent application (API) build
3701 MAGICK_LTDLDEPS='' # extra libltdl dependencies
3702 if test "$with_ltdl" != 'no'
3704 if test \( "$with_included_ltdl" = 'no' -o "$enable_ltdl_convenience" = 'no' \) -o "$enable_ltdl_install" = 'yes'; then
3705 MAGICK_API_LIBLTDL='-lltdl'
3707 MAGICK_LIBLTDL=${LIBLTDL}
3708 MAGICK_LTDLDEPS=${LTDLDEPS}
3710 AC_SUBST(MAGICK_LIBLTDL)
3711 AC_SUBST(MAGICK_LTDLDEPS)
3713 if test "$with_modules" != 'no'; then
3714 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"
3716 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"
3718 AC_SUBST(MAGICK_DEP_LIBS)
3721 # Remove extraneous spaces from output variables (asthetic)
3723 X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'`
3724 X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'`
3725 X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'`
3726 X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'`
3728 CC=`echo $CC | sed -e 's/ */ /g'`
3729 CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'`
3730 CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'`
3731 CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'`
3732 DELEGATES=`echo $DELEGATES | sed -e 's/^ //g'`
3733 DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'`
3734 LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'`
3735 TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3736 MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
3737 #LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3739 # Pass only user-provided LIBS as "global" libraries
3745 #AC_SUBST(X_PRE_LIBS)
3747 #AC_SUBST(X_EXTRA_LIBS)
3749 MAGICK_CFLAGS=$CFLAGS
3750 MAGICK_CXXFLAGS="$CXXFLAGS"
3751 MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3752 MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3753 MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3754 MAGICK_LIBS="-lMagickCore $MAGICK_DEP_LIBS $MAGICK_API_LIBLTDL"
3756 AC_SUBST(MAGICK_CFLAGS)
3757 AC_SUBST(MAGICK_CXXFLAGS)
3758 AC_SUBST(MAGICK_CPPFLAGS)
3759 AC_SUBST(MAGICK_PCFLAGS)
3760 AC_SUBST(MAGICK_LDFLAGS)
3761 AC_SUBST(MAGICK_LIBS)
3762 AC_SUBST(MAGICK_FEATURES)
3764 # Set configured scripts to executable.
3765 AC_CONFIG_COMMANDS([default],[],[])
3766 AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
3767 AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
3768 AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3769 AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3771 AC_MSG_NOTICE([-------------------------------------------------------------])
3772 AC_MSG_NOTICE([Update ImageMagick configuration])
3775 rm -f magick-version
3777 result_dejavu_font_dir='none'
3778 if test "${dejavu_font_dir}x" != 'x'; then
3779 result_dejavu_font_dir=$dejavu_font_dir
3782 result_ghostscript_font_dir='none'
3783 if test "${ghostscript_font_dir}x" != 'x'; then
3784 result_ghostscript_font_dir=$ghostscript_font_dir
3787 result_windows_font_dir='none'
3788 if test "${windows_font_dir}x" != 'x'; then
3789 result_windows_font_dir=${windows_font_dir}
3793 ImageMagick is configured as follows. Please verify that this configuration
3794 matches your expectations.
3796 Host system type: $host
3797 Build system type: $build
3800 -------------------------------------------------------------------------------
3801 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3802 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3803 Module support --with-modules=$with_modules $with_modules
3804 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3805 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3806 High Dynamic Range Imagery
3807 --enable-hdri=$enable_hdri $enable_hdri
3809 Delegate Configuration:
3810 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3811 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3812 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3813 DJVU --with-djvu=$with_djvu $have_djvu
3814 DPS --with-dps=$with_dps $have_dps
3815 FFTW --with-fftw=$with_fftw $have_fftw
3816 FlashPIX --with-fpx=$with_fpx $have_fpx
3817 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3818 FreeType --with-freetype=$with_freetype $have_freetype
3819 GhostPCL None $PCLDelegate ($PCLVersion)
3820 GhostXPS None $XPSDelegate ($XPSVersion)
3821 Ghostscript None $PSDelegate ($GSVersion)
3822 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3823 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3824 Graphviz --with-gvc=$with_gvc $have_gvc
3825 JBIG --with-jbig=$with_jbig $have_jbig
3826 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
3827 JPEG-2000 --with-jp2=$with_jp2 $have_jp2
3828 LCMS v1 --with-lcms=$with_lcms $have_lcms
3829 LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
3830 LQR --with-lqr=$with_lqr $have_lqr
3831 LZMA --with-lzma=$with_lzma $have_lzma
3832 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3833 OpenEXR --with-openexr=$with_openexr $have_openexr
3834 PANGO --with-pango=$with_pango $have_pango
3835 PERL --with-perl=$with_perl $have_perl
3836 PNG --with-png=$with_png $have_png
3837 RSVG --with-rsvg=$with_rsvg $have_rsvg
3838 TIFF --with-tiff=$with_tiff $have_tiff
3839 WEBP --with-webp=$with_webp $have_webp
3840 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
3841 WMF --with-wmf=$with_wmf $have_wmf
3842 X11 --with-x=$with_x $have_x
3843 XML --with-xml=$with_xml $have_xml
3844 ZLIB --with-zlib=$with_zlib $have_zlib
3847 X_CFLAGS = $X_CFLAGS
3848 X_PRE_LIBS = $X_PRE_LIBS
3850 X_EXTRA_LIBS = $X_EXTRA_LIBS
3852 Options used to compile and link:
3853 PREFIX = $PREFIX_DIR
3854 EXEC-PREFIX = $EXEC_PREFIX_DIR
3855 VERSION = $PACKAGE_VERSION
3858 CPPFLAGS = $MAGICK_CPPFLAGS
3859 PCFLAGS = $MAGICK_PCFLAGS
3862 MAGICK_LDFLAGS = $MAGICK_LDFLAGS
3865 CXXFLAGS = $CXXFLAGS
3866 FEATURES = $MAGICK_FEATURES