blob: f4edf7583cfaeb630e4b7b809f88775c6a91a9d3 [file] [log] [blame]
cristy7e41fe82010-12-04 23:12:08 +00001# Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00002# dedicated to making software imaging solutions freely available.
3#
4# You may not use this file except in compliance with the License. You may
5# obtain a copy of the License at
6#
7# http://www.imagemagick.org/script/license.php
8#
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.
14#
15# Copyright (C) 2003 - 2008 GraphicsMagick Group
16
cristy7b1ac1a2011-03-04 19:35:03 +000017AC_PREREQ(2.64)
cristyfddf7752011-02-26 19:25:10 +000018
cristy4c08aed2011-07-01 19:47:50 +000019m4_define([magick_major_version], [7])
20m4_define([magick_minor_version], [0])
21m4_define([magick_micro_version], [0])
cristyfddf7752011-02-26 19:25:10 +000022m4_define([magick_version],
23 [magick_major_version.magick_minor_version.magick_micro_version])
cristyd694ca32011-03-27 21:42:54 +000024m4_define([magick_svn_revision], esyscmd([sh -c "svnversion | sed -r 's/([0-9]+).*/\1/'"]))
cristyfddf7752011-02-26 19:25:10 +000025
cristyd55889c2011-03-27 00:50:24 +000026AC_INIT([ImageMagick],[magick_version],[http://www.imagemagick.org],[ImageMagick-magick_version])
cristy4c08aed2011-07-01 19:47:50 +000027AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
cristy3ed852e2009-09-05 21:47:34 +000028AC_CONFIG_AUX_DIR([config])
29AC_CONFIG_MACRO_DIR([m4])
30AC_CONFIG_LIBOBJ_DIR([ltdl])
31AC_CONFIG_HEADERS([config/config.h])
cristy4c08aed2011-07-01 19:47:50 +000032AX_PREFIX_CONFIG_H([MagickCore/magick-config.h],[MagickCore])
cristy3ed852e2009-09-05 21:47:34 +000033AC_CONFIG_FILES([\
34 config/configure.xml \
35 config/delegates.xml \
36 config/ImageMagick.rdf \
37 config/MagickCore.dox \
38 config/MagickWand.dox \
cristy430a7312010-01-21 20:44:04 +000039 config/type-dejavu.xml \
cristy3ed852e2009-09-05 21:47:34 +000040 config/type-ghostscript.xml \
41 config/type-windows.xml \
42 config/type.xml \
43 ImageMagick.spec \
44 Magick++/bin/Magick++-config \
cristy4c08aed2011-07-01 19:47:50 +000045 MagickCore/ImageMagick.pc \
cristy3ed852e2009-09-05 21:47:34 +000046 Magick++/lib/ImageMagick++.pc \
47 Magick++/lib/Magick++.pc \
cristy4c08aed2011-07-01 19:47:50 +000048 MagickCore/MagickCore-config \
49 MagickCore/MagickCore.pc \
50 MagickCore/version.h \
cristy3ed852e2009-09-05 21:47:34 +000051 Makefile \
52 magick.sh \
53 PerlMagick/Magick.pm \
54 PerlMagick/Makefile.PL \
55 PerlMagick/check.sh \
56 utilities/animate.1 \
57 utilities/compare.1 \
58 utilities/composite.1 \
59 utilities/conjure.1 \
60 utilities/convert.1 \
61 utilities/display.1 \
62 utilities/identify.1 \
63 utilities/ImageMagick.1 \
64 utilities/import.1 \
65 utilities/mogrify.1 \
66 utilities/montage.1 \
67 utilities/stream.1 \
cristy4c08aed2011-07-01 19:47:50 +000068 MagickWand/MagickWand-config \
69 MagickWand/MagickWand.pc ])
cristy3ed852e2009-09-05 21:47:34 +000070
71#
72# Save initial user-tunable values
73#
74USER_LIBS=$LIBS
75for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
76 eval isset=\${$var+set}
77 if test "$isset" = 'set'; then
78 eval val=$`echo $var`
79 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
80 fi
81done
82AC_SUBST(DISTCHECK_CONFIG_FLAGS)
83
84CONFIGURE_ARGS="$0 ${ac_configure_args}"
85AC_SUBST(CONFIGURE_ARGS)
86
87# Source file containing package/library versioning information.
88. ${srcdir}/version.sh
89
cristy15a88782010-01-31 23:24:49 +000090echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
cristy837d6dc2010-02-27 01:16:57 +000091AC_CANONICAL_SYSTEM
cristy95646052009-11-28 23:05:30 +000092AC_CANONICAL_BUILD
93AC_CANONICAL_HOST
cristy3ed852e2009-09-05 21:47:34 +000094
cristy19615b82011-04-13 20:02:01 +000095MAGICK_TARGET_CPU=$host_cpu
cristy3225a072010-04-17 01:47:28 +000096AC_SUBST(MAGICK_TARGET_CPU)
97
cristy19615b82011-04-13 20:02:01 +000098MAGICK_TARGET_VENDOR=$host_vendor
cristy3225a072010-04-17 01:47:28 +000099AC_SUBST(MAGICK_TARGET_VENDOR)
100
cristy19615b82011-04-13 20:02:01 +0000101MAGICK_TARGET_OS=$host_os
cristy3225a072010-04-17 01:47:28 +0000102AC_SUBST(MAGICK_TARGET_OS)
103
cristy3ed852e2009-09-05 21:47:34 +0000104# Substitute library versioning
105AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
106AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
107AC_SUBST(MAGICK_LIBRARY_AGE)dnl
cristybab87c32010-02-09 20:54:22 +0000108AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
109 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
110AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
111 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
cristyd694ca32011-03-27 21:42:54 +0000112AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision])
cristy3ed852e2009-09-05 21:47:34 +0000113
114AC_SUBST(PACKAGE_NAME)dnl
115AC_SUBST(PACKAGE_VERSION)dnl
cristy878c2f12011-08-19 00:25:19 +0000116AC_SUBST(PACKAGE_PERL_VERSION)dnl
cristy3ed852e2009-09-05 21:47:34 +0000117AC_SUBST(PACKAGE_RELEASE)dnl
118AC_SUBST(PACKAGE_CHANGE_DATE)dnl
119AC_SUBST(PACKAGE_LIB_VERSION)dnl
120AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
121AC_SUBST(PACKAGE_RELEASE_DATE)dnl
cristy15a88782010-01-31 23:24:49 +0000122AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
cristy3ed852e2009-09-05 21:47:34 +0000123
124# Ensure that make can run correctly
125AM_SANITY_CHECK
126
cristy15a88782010-01-31 23:24:49 +0000127AM_INIT_AUTOMAKE($PACKAGE_NAME,"${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}", ' ')
cristy3ed852e2009-09-05 21:47:34 +0000128
129# Enable support for silent build rules
cristyfddf7752011-02-26 19:25:10 +0000130m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
cristy3ed852e2009-09-05 21:47:34 +0000131
132MAGICK_LIB_VERSION="0x"
133if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
134 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
135fi
136MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
137if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
138 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
139fi
140MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
141if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
142 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
143fi
144MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
145AC_SUBST(MAGICK_LIB_VERSION)
146
147# Definition used to define MagickLibVersionText in version.h
148MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
149AC_SUBST(MAGICK_LIB_VERSION_TEXT)
150
151# Definition used to define MagickLibVersionNumber in version.h
152MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
153AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
154
155# Regenerate config.status if ChangeLog or version.sh is updated.
156AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
157
158PERLMAINCC=$CC
159
160MAGICK_CFLAGS=''
161MAGICK_CPPFLAGS=$CPPFLAGS_USER
162MAGICK_PCFLAGS=$CPPFLAGS_USER
163MAGICK_LDFLAGS=''
164MAGICK_LIBS=''
cristyfd9dcd42010-08-08 18:07:02 +0000165MAGICK_FEATURES=''
cristy3ed852e2009-09-05 21:47:34 +0000166
167#
168# Evaluate shell variable equivalents to Makefile directory variables
169#
170if test "x$prefix" = xNONE; then
171 prefix=$ac_default_prefix
172fi
173# Let make expand exec_prefix.
174if test "x$exec_prefix" = xNONE; then
175 exec_prefix='${prefix}'
176fi
177
178#
179eval "eval PREFIX_DIR=${prefix}"
180AC_SUBST(PREFIX_DIR)
181eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
182AC_SUBST(EXEC_PREFIX_DIR)
183eval "eval BIN_DIR=$bindir"
184AC_SUBST(BIN_DIR)
185eval "eval SBIN_DIR=$sbindir"
186AC_SUBST(SBIN_DIR)
187eval "eval LIBEXEC_DIR=$libexecdir"
188AC_SUBST(LIBEXEC_DIR)
189eval "eval DATA_DIR=$datadir"
190AC_SUBST(DATA_DIR)
cristyd55889c2011-03-27 00:50:24 +0000191eval "eval DOC_DIR=$docdir"
192AC_SUBST(DOC_DIR)
cristy3ed852e2009-09-05 21:47:34 +0000193eval "eval SYSCONF_DIR=$sysconfdir"
194AC_SUBST(SYSCONF_DIR)
195eval "eval SHAREDSTATE_DIR=$sharedstatedir"
196AC_SUBST(SHAREDSTATE_DIR)
197eval "eval LOCALSTATE_DIR=$localstatedir"
198AC_SUBST(LOCALSTATE_DIR)
199eval "eval LIB_DIR=$libdir"
200AC_SUBST(LIB_DIR)
201eval "eval INCLUDE_DIR=$includedir"
202AC_SUBST(INCLUDE_DIR)
203eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
204AC_SUBST(PERSISTINCLUDE_DIR)
205eval "eval INFO_DIR=$infodir"
206AC_SUBST(INFO_DIR)
207eval "eval MAN_DIR=$mandir"
208AC_SUBST(MAN_DIR)
209
210# Get full paths to source and build directories
211srcdirfull="`cd $srcdir && pwd`"
212builddir="`pwd`"
213
214#
215# Compute variables useful for running uninstalled software.
216#
217MAGICK_CODER_MODULE_PATH="${builddir}/coders"
218MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
219MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
220MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
221DIRSEP=':'
222case "${build_os}" in
223 mingw* )
224 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
225 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
226 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
227 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
228 DIRSEP=';'
229 ;;
230esac
231case "${host_os}" in
232 mingw* )
233 DIRSEP=';'
234 ;;
235esac
236AC_SUBST(MAGICK_CODER_MODULE_PATH)
237AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
238AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
239AC_SUBST(MAGICK_FILTER_MODULE_PATH)
240AC_SUBST(DIRSEP)
241
cristya0b81c32010-01-22 02:54:33 +0000242
243#
244# Enable OS features.
245#
246AC_USE_SYSTEM_EXTENSIONS
247
cristy3ed852e2009-09-05 21:47:34 +0000248# Check for programs
249AC_PROG_CC
cristy95646052009-11-28 23:05:30 +0000250AC_PROG_CXX
cristy3ed852e2009-09-05 21:47:34 +0000251AC_PROG_CC_STDC
252AC_PROG_CPP
253AC_PROG_LD
cristy3ed852e2009-09-05 21:47:34 +0000254AC_SUBST(LD)
cristy837d6dc2010-02-27 01:16:57 +0000255AC_PROG_CC_C99
cristy3ed852e2009-09-05 21:47:34 +0000256AM_PROG_CC_C_O
cristy92703d82010-04-26 00:18:18 +0000257AX_CFLAGS_WARN_ALL
cristy3ed852e2009-09-05 21:47:34 +0000258AC_PROG_INSTALL
259AC_PROG_MAKE_SET
cristy3ed852e2009-09-05 21:47:34 +0000260AC_PROG_LN_S
261AM_WITH_DMALLOC
cristy92703d82010-04-26 00:18:18 +0000262AX_C___ATTRIBUTE__
cristy0d3a6382010-04-26 00:45:55 +0000263PKG_PROG_PKG_CONFIG
cristy3ed852e2009-09-05 21:47:34 +0000264
265#
cristy3ed852e2009-09-05 21:47:34 +0000266# Enable run-time checking.
267#
268AC_ARG_ENABLE([bounds-checking],
269 [AC_HELP_STRING([--bounds-checking],
270 [enable run-time bounds-checking])],
271 [enable_bounds_checking=$enableval],
272 [enable_bounds_checking='no'])
273
274if test "$enable_bounds_checking" = yes; then
275 AC_DEFINE([_FORTIFY_SOURCE], [2],
276 [enable run-time bounds-checking])
277fi
278
279#
280# Tests for Windows
281#
282AC_EXEEXT
283AC_OBJEXT
cristy0d3a6382010-04-26 00:45:55 +0000284AX_LANG_COMPILER_MS
cristy3ed852e2009-09-05 21:47:34 +0000285
286GDI32_LIBS=''
cristy3ed852e2009-09-05 21:47:34 +0000287native_win32_build='no'
288cygwin_build='no'
289case "${host_os}" in
290 cygwin* )
cristy3ed852e2009-09-05 21:47:34 +0000291 cygwin_build='yes'
292 GDI32_LIBS='-lgdi32'
293 ;;
294 mingw* )
cristy3ed852e2009-09-05 21:47:34 +0000295 native_win32_build='yes'
296 GDI32_LIBS='-lgdi32'
297 ;;
298esac
299if test "${GDI32_LIBS}x" != 'x'; then
300 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
301fi
302AC_SUBST(GDI32_LIBS)
303AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
304AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
305AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
306AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
307
308WinPathScript="${srcdirfull}/winpath.sh"
309AC_SUBST(WinPathScript)
310
311#
312# Compiler flags tweaks
313#
314if test "${GCC}" != "yes"; then
315 case "${host}" in
316 *-*-hpux* )
317 # aCC: HP ANSI C++ B3910B A.03.34
318 CFLAGS="${CFLAGS} -Wp,-H30000"
319 if test -n "${CXXFLAGS}"; then
320 CXXFLAGS='-AA'
321 else
322 CXXFLAGS="${CXXFLAGS} -AA"
323 fi
324 ;;
325 *-dec-osf5.* )
326 # Compaq alphaev68-dec-osf5.1 compiler
327 if test -n "${CXXFLAGS}"; then
328 CXXFLAGS='-std strict_ansi -noimplicit_include'
329 else
330 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
331 fi
332 esac
333fi
334
335# Check for lazy-loading.
336AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
337[
338im_cv_ld_lazyload='none'
339case "${host}" in
340 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
341 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
342 im_cv_ld_lazyload='-Wl,-zlazyload'
343 fi
344 ;;
345esac
346])
347if test "${im_cv_ld_lazyload}" != 'none' ; then
348 if test -z "${LDFLAGS}" ; then
349 LDFLAGS="${im_cv_ld_lazyload}"
350 else
351 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
352 fi
353fi
354
355dnl Platform-specific stuff
356case "$host" in
357*darwin* | *-macos10*)
cristy3ed852e2009-09-05 21:47:34 +0000358 dnl OS X universal binary support, requires --disable-dependency-tracking
cristy43596fe2010-01-21 16:46:08 +0000359 AC_ARG_ENABLE([osx-universal-binary],
cristy3ed852e2009-09-05 21:47:34 +0000360 AC_HELP_STRING([--enable-osx-universal-binary],
361 [build universal binary on OS X [[default=no]]]),
362 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
363
364 if test "${build_osxuniversal}" != no ; then
365 if test "$enable_dependency_tracking" != no ; then
366 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
367Please re-run configure with these options:
368 --disable-dependency-tracking --enable-osx-universal-binary
369 ])
370 fi
371 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
372 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
373 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
374 fi
375 ;;
376esac
377
378# Enable support for threads
379AC_ARG_WITH([threads],
cristy55bf91c2010-09-24 00:29:41 +0000380 [AC_HELP_STRING([--without-threads], [disable threads support])],
cristy3ed852e2009-09-05 21:47:34 +0000381 [with_threads=$withval],
382 [with_threads='yes'])
383
384have_threads=no
385if test "$with_threads" != 'no'; then
cristyf6fcb5d2010-09-24 01:19:13 +0000386 AX_PTHREAD()
cristy7acf8fb2010-09-23 19:58:53 +0000387 if test "$ax_pthread_ok" = yes; then
cristy3ed852e2009-09-05 21:47:34 +0000388 have_threads=yes
389 DEF_THREAD="$PTHREAD_CFLAGS"
390 CFLAGS="$CFLAGS $DEF_THREAD"
391 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
392 if test "$CC" != "$PTHREAD_CC"; then
393 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
394 CC="$PTHREAD_CC"
395 fi
cristy55bf91c2010-09-24 00:29:41 +0000396 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
cristy3ed852e2009-09-05 21:47:34 +0000397 fi
398fi
399
400# Enable support for OpenMP
401if test "$have_threads" != 'yes'; then
402 ac_cv_prog_c_openmp=unsupported
403fi
404AC_OPENMP([C])
405CFLAGS="$OPENMP_CFLAGS $CFLAGS"
406MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
407AC_SUBST(OPENMP_CFLAGS)
cristy391f1ce2010-09-09 17:23:28 +0000408if test "$enable_openmp" != no; then
409 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
410 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
411 fi
412fi
cristy3ed852e2009-09-05 21:47:34 +0000413
cristy736173a2009-09-20 21:18:22 +0000414# Enable support for OpenCL
cristy7141bca2010-01-21 16:51:24 +0000415AX_OPENCL([C])
cristyc7083c12009-10-14 03:16:55 +0000416CFLAGS="$CL_CFLAGS $CFLAGS"
417LIBS="$CL_LIBS $LIBS"
cristy18d9cfe2009-12-31 03:55:21 +0000418AC_SUBST(CL_CFLAGS)
cristy391f1ce2010-09-09 17:23:28 +0000419if test "$enable_opencl" != no; then
cristyf864d422011-09-12 17:57:53 +0000420 if test "X$ax_cv_check_cl_libcl" != Xno; then :
cristy391f1ce2010-09-09 17:23:28 +0000421 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
422 fi
cristyfd9dcd42010-08-08 18:07:02 +0000423fi
cristy736173a2009-09-20 21:18:22 +0000424
cristy3ed852e2009-09-05 21:47:34 +0000425########
426#
427# Check for large file support
428#
429########
430AC_SYS_LARGEFILE
431AC_FUNC_FSEEKO
432LFS_CPPFLAGS=''
433if test "$enable_largefile" != no; then
434 if test "$ac_cv_sys_file_offset_bits" != 'no'; then
435 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
436 else
437 AC_MSG_CHECKING([for native large file support])
cristyda16f162011-02-19 23:52:17 +0000438 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
cristy3ed852e2009-09-05 21:47:34 +0000439 main () {
440 exit(!(sizeof(off_t) == 8));
cristyda16f162011-02-19 23:52:17 +0000441 }])],
cristy3ed852e2009-09-05 21:47:34 +0000442 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
443 AC_MSG_RESULT([yes])],
444 [AC_MSG_RESULT([no])])
445 fi
446 if test "$ac_cv_sys_large_files" != 'no'; then
447 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
448 fi
449 if test "$ac_cv_sys_largefile_source" != 'no'; then
450 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
451 fi
452fi
453AC_SUBST(LFS_CPPFLAGS)
454
455#
456# Configure libtool & libltdl
457#
458# Configure libtool
459AC_LIBTOOL_DLOPEN
460LT_INIT([win32-dll])
461LT_LANG([C++])
462AC_SUBST(LIBTOOL_DEPS)
463
464# Configure libltdl
465LT_CONFIG_LTDL_DIR([ltdl])
466LTDL_INIT([convenience nonrecursive])
467
468# Check to see if building shared libraries
469libtool_build_shared_libs='no'
470if test "$enable_shared" = 'yes'; then
471 libtool_build_shared_libs='yes'
472fi
473
474# Check to see if building static libraries
475libtool_build_static_libs='no'
476if test "$enable_static" = 'yes'; then
477 libtool_build_static_libs='yes'
478fi
479
cristyfa112112010-01-04 17:48:07 +0000480AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
cristy3ed852e2009-09-05 21:47:34 +0000481#
482# Enable support for building loadable modules
483#
484AC_ARG_WITH([modules],
485 [AC_HELP_STRING([--with-modules],
486 [enable building dynamically loadable modules])],
487 [with_modules=$withval],
cristy5a1cefd2010-01-06 20:42:35 +0000488 [with_modules='no'])
cristy3ed852e2009-09-05 21:47:34 +0000489
490# Only allow building loadable modules if we are building shared libraries
491if test "$with_modules" != 'no' ; then
492 if test "$libtool_build_shared_libs" = 'no'; then
493 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
494 with_modules='no'
495 fi
496fi
497if test "$with_modules" != 'no'; then
498 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
499fi
500AM_CONDITIONAL(WITH_MODULES, test "$with_modules" != 'no')
501
502# Enable building/use of libltdl if we are building shared libraries regardless
503# of whether modules are built or not.
504with_ltdl='no'
505if test "$libtool_build_shared_libs" != 'no'; then
506 with_ltdl='yes'
507fi
508
509AM_CONDITIONAL(WITH_LTDL, test "$with_ltdl" != 'no')
510if test "$with_ltdl" != 'no'; then
511 AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules)
512
513 # Set DLLDFLAGS
514 if test X"$enable_shared" = Xyes; then
515 DLLDFLAGS=-export-dynamic
516 AC_SUBST(DLLDFLAGS)
517 fi
518fi
519
520# Enable build using delegate libraries built in subdirectories rather than installed
cristyfbb0ef02010-12-19 02:32:11 +0000521# delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
cristy3ed852e2009-09-05 21:47:34 +0000522AC_ARG_ENABLE([delegate-build],
523 [AC_HELP_STRING([--enable-delegate-build],
524 [look for delegate libraries in build directory])],
525 [enable_delegate_build=$enableval],
526 [enable_delegate_build='no'])
527
528AC_ARG_ENABLE([deprecated],
529 [AC_HELP_STRING([--disable-deprecated],
530 [exclude deprecated methods in MagickCore and MagickWand API's])],
531 [enable_deprecated=$enableval],
532 [enable_deprecated='no'])
533
534if test "$enable_deprecated" = 'yes'; then
535 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
536else
537 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
538fi
539
540# Build a version of ImageMagick which operates uninstalled.
541# Used to build distributions located via MAGICK_HOME / executable path
542AC_ARG_ENABLE([installed],
543 [AC_HELP_STRING([--disable-installed],
544 [Formally install ImageMagick under PREFIX])],
545 [enable_installed=$enableval],
546 [enable_installed='yes'])
547
548if test "$enable_installed" = 'yes'; then
549 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
550else
551 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
552fi
553
554# Permit enciphering and deciphering image pixels.
555AC_ARG_ENABLE([cipher],
556 [AC_HELP_STRING([--disable-cipher],
557 [disable enciphering and deciphering image pixels])],
558 [enable_cipher=$enableval],
559 [enable_cipher='yes'])
560
561if test "$enable_cipher" = 'yes'; then
562 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
563fi
564
cristy6e3607c2011-09-13 13:59:17 +0000565# Build a zero-configuration version of ImageMagick.
566AC_ARG_ENABLE([zero-configuration],
567 [AC_HELP_STRING([--enable-zero-configuration],
cristy3ed852e2009-09-05 21:47:34 +0000568 [enable self-contained, embeddable, zero-configuration ImageMagick])],
cristy6e3607c2011-09-13 13:59:17 +0000569 [enable_zero_configuration=$enableval],
570 [enable_zero_configuration='no'])
cristy3ed852e2009-09-05 21:47:34 +0000571
cristy6e3607c2011-09-13 13:59:17 +0000572if test "$enable_zero_configuration" = 'yes'; then
573 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
cristy81af5702011-09-13 14:20:58 +0000574 MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES"
cristy3ed852e2009-09-05 21:47:34 +0000575fi
576
577# Build a high dynamic range version of ImageMagick.
578AC_ARG_ENABLE([hdri],
579 [AC_HELP_STRING([--enable-hdri],
580 [accurately represent the wide range of intensity levels found in real scenes])],
581 [enable_hdri=$enableval],
582 [enable_hdri='no'])
583
584MAGICK_HDRI=""
585if test "$enable_hdri" = 'yes'; then
586 MAGICK_HDRI="HDRI"
cristyfa112112010-01-04 17:48:07 +0000587 AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
cristyfd9dcd42010-08-08 18:07:02 +0000588 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
cristy3ed852e2009-09-05 21:47:34 +0000589fi
590AC_SUBST(MAGICK_HDRI)dnl
591
cristy3ed852e2009-09-05 21:47:34 +0000592# Build a version of ImageMagick with assert statements.
593AC_ARG_ENABLE([assert],
594 [AC_HELP_STRING([--disable-assert],
595 [disable assert() statements in build])],
596 [enable_assert=$enableval],
597 [enable_assert='yes'])
598
599if test "$enable_assert" = 'no'; then
600 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
601fi
602
603# Add configure option --enable-maintainer-mode which enables dependency
604# checking and generation useful to package maintainers. This is made an
605# option to avoid confusing end users.
606AM_MAINTAINER_MODE
607
608
609# Enable ccmalloc memory debugging support
610AC_ARG_ENABLE([ccmalloc],
611 [AC_HELP_STRING([--enable-ccmalloc],
612 [enable 'ccmalloc' memory debug support])],
613 [enable_ccmalloc=$enableval],
614 [enable_ccmalloc='no'])
615
616# Enable Electric Fence memory debugging support
617AC_ARG_ENABLE([efence],
618 [AC_HELP_STRING([--enable-efence],
619 [enable 'efence' memory debug support])],
620 [enable_efence=$enableval],
621 [enable_efence='no'])
622
623# Enable prof-based profiling support
624AC_ARG_ENABLE([prof],
625 [AC_HELP_STRING([--enable-prof],
626 [enable 'prof' profiling support])],
627 [enable_prof=$enableval],
628 [enable_prof='no'])
629
630# Enable gprof-based profiling support
631AC_ARG_ENABLE([gprof],
632 [AC_HELP_STRING([--enable-gprof],
633 [enable 'gprof' profiling support])],
634 [enable_gprof=$enableval],
635 [enable_gprof='no'])
636
637# Enable gcov-based profiling support
638AC_ARG_ENABLE([gcov],
639 [AC_HELP_STRING([--enable-gcov],
640 [enable 'gcov' profiling support])],
641 [enable_gcov=$enableval],
642 [enable_gcov='no'])
643
644enable_profiling='no'
645if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
646 enable_profiling='yes'
647 if test "$libtool_build_shared_libs" = 'yes'; then
648 echo "Warning: Can not profile code using shared libraries"
649 fi
650fi
651
652# Magick API method prefix
653AC_ARG_WITH([method-prefix],
654 [AC_HELP_STRING([--with-method-prefix=PREFIX],
655 [prefix MagickCore API methods])],
656 [with_method_prefix=$enableval],
657 [with_method_prefix=''])
658
659if test "$with_method_prefix" != ''; then
660 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
661fi
662
663# Number of bits in a Quantum
664AC_ARG_WITH([quantum-depth],
665 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
666 [number of bits in a pixel quantum (default 16)])],
667 [with_quantum_depth=$withval],
668 [with_quantum_depth=16])
669
670if test "$with_quantum_depth" != '8'; then
671 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
672fi
673
674case "${with_quantum_depth}" in
675 8 ) ;;
676 16 ) ;;
677 32 ) ;;
678 64 ) ;;
cristycdae12a2010-09-19 02:24:31 +0000679 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
cristy3ed852e2009-09-05 21:47:34 +0000680esac
681QUANTUM_DEPTH="$with_quantum_depth"
682AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
683AC_SUBST(QUANTUM_DEPTH)dnl
684
685# Set pixel cache threshold
686AC_ARG_WITH([cache],
687 [AC_HELP_STRING([--with-cache=THRESHOLD],
688 [set pixel cache threshhold in MB (default available memory)])],
689 [with_cache=$withval],
690 [with_cache=''])
691
692if test "$with_cache" != ''; then
693 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
694 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
695fi
696
697# Disable/Enable support for full delegate paths
698AC_ARG_WITH([frozenpaths],
699 [AC_HELP_STRING([--with-frozenpaths],
700 [freeze delegate paths])],
701 [with_frozenpaths=$withval],
702 [with_frozenpaths='no'])
703
704# Enable build/install of Magick++
705AC_ARG_WITH([magick-plus-plus],
706 [AC_HELP_STRING([--without-magick-plus-plus],
707 [disable build/install of Magick++])],
708 [with_magick_plus_plus=$withval],
709 [with_magick_plus_plus='yes'])
710
711# Disable build/install of PerlMagick.
712AC_ARG_WITH([perl],
713 [AC_HELP_STRING([--with-perl],
714 [enable build/install of PerlMagick])],
715 [with_perl=$withval],
cristyb5f4e2f2010-04-25 00:49:11 +0000716 [with_perl='no'])
cristy3ed852e2009-09-05 21:47:34 +0000717
718# Options to pass when configuring PerlMagick
719AC_ARG_WITH([perl-options],
720 [AC_HELP_STRING([--with-perl-options=OPTIONS],
cristy949301e2010-01-06 01:38:40 +0000721 [options to pass on command-line when generating PerlMagick's build file])],
722PERL_MAKE_OPTIONS=$withval)
cristy3ed852e2009-09-05 21:47:34 +0000723AC_SUBST(PERL_MAKE_OPTIONS)
724
cristy3ed852e2009-09-05 21:47:34 +0000725# Enable umem, object-caching memory allocation library.
726AC_ARG_WITH(umem,
727 [ --with-umem enable umem memory allocation library support],
728 [with_umem=$withval],
729 [with_umem='no'])
730if test "$with_umem" != 'yes' ; then
731 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
732fi
733
734#
735# Specify path to shared libstdc++ if not in normal location
736#
737AC_ARG_WITH([libstdc],
738 [AC_HELP_STRING([--with-libstdc=DIR],
739 [ use libstdc++ in DIR (for GNU C++)])],
740 [with_libstdc=$withval],
741 [with_libstdc=''])
742
743if test "$with_libstdc" != ''; then
744 if test -d "$with_libstdc"; then
745 LIBSTDCLDFLAGS="-L$with_libstdc"
746 fi
747fi
748AC_SUBST(LIBSTDCLDFLAGS)
749
750# Does gcc required -traditional?
751AC_PROG_GCC_TRADITIONAL
752
753########
754#
755# Set defines required to build DLLs and modules using MinGW
756#
757########
758# These options are set for multi-thread DLL module build
759# libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
760# module: _DLL
761# executable/Magick++: _DLL _MAGICKMOD_
762MODULE_EXTRA_CPPFLAGS=''
763LIBRARY_EXTRA_CPPFLAGS=''
764if test "${native_win32_build}" = 'yes'; then
765 if test "${libtool_build_shared_libs}" = 'yes'; then
766 CPPFLAGS="$CPPFLAGS -D_DLL"
767 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
768 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
769 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
770 if test "$with_modules" = 'yes'; then
771 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
772 else
773 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
774 fi
775 else
776 CPPFLAGS="$CPPFLAGS -D_LIB"
777 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
778 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
779 fi
780 if test "$with_threads" = 'yes'; then
781 CPPFLAGS="$CPPFLAGS -D_MT"
782 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
783 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
784 fi
785fi
786AC_SUBST(MODULE_EXTRA_CPPFLAGS)
787AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
788
789# Check standard headers
790AC_HEADER_STDC
791if ! test x"$ac_cv_header_stdc" = x"yes"; then
792 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
793 header files. Compilation cannot proceed. Please install the ANSI C
794 headers and rerun this script.]);
795fi
cristya0b81c32010-01-22 02:54:33 +0000796AC_HEADER_ASSERT
cristy3ed852e2009-09-05 21:47:34 +0000797AC_HEADER_DIRENT
798
799# Check additional headers
cristya8549b12011-05-18 19:05:08 +0000800AC_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)
cristy3ed852e2009-09-05 21:47:34 +0000801
802########
803#
804# Checks for typedefs, structures, and compiler characteristics.
805#
806########
807
808AC_HEADER_STDBOOL
809AC_C_VOLATILE
810AC_C_STRINGIZE
811AC_HEADER_STAT
812AC_HEADER_TIME
813AC_STRUCT_TM
cristy92703d82010-04-26 00:18:18 +0000814AC_STRUCT_TIMEZONE
cristy3ed852e2009-09-05 21:47:34 +0000815AC_SYS_INTERPRETER
816
cristy3ed852e2009-09-05 21:47:34 +0000817# If the C compiler supports the keyword inline, do nothing. Otherwise
818# define inline to __inline__ or __inline if it accepts one of those,
819# otherwise define inline to be empty.
820AC_C_INLINE
821
822# If the C compiler supports the keyword restrict, do nothing. Otherwise
823# define restrict to __restrict__ or __restrict if it accepts one of those,
824# otherwise define restrict to be empty.
825AC_C_RESTRICT
826
827# If words are stored with the most significant byte first (like
828# Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
829AC_C_BIGENDIAN
830
cristy501c8042011-05-26 17:46:28 +0000831# Define to a suitable type, if standard headers do not define it.
832AC_TYPE_INT8_T
833AC_TYPE_INT16_T
834AC_TYPE_INT32_T
835AC_TYPE_INT64_T
836AC_TYPE_INTMAX_T
837AC_TYPE_INTPTR_T
838AC_TYPE_LONG_DOUBLE
cristy3ed852e2009-09-05 21:47:34 +0000839AC_TYPE_LONG_DOUBLE_WIDER
cristy501c8042011-05-26 17:46:28 +0000840AC_TYPE_LONG_LONG_INT
841AC_TYPE_MBSTATE_T
842AC_TYPE_MODE_T
843AC_TYPE_OFF_T
844AC_TYPE_PID_T
845AC_TYPE_SIZE_T
846AC_TYPE_SSIZE_T
847AC_TYPE_UID_T
848AC_TYPE_UINT8_T
849AC_TYPE_UINT16_T
850AC_TYPE_UINT32_T
851AC_TYPE_UINT64_T
852AC_TYPE_UINTMAX_T
853AC_TYPE_UINTPTR_T
854AC_TYPE_UNSIGNED_LONG_LONG_INT
cristy3ed852e2009-09-05 21:47:34 +0000855
856# If the C type char is unsigned, define __CHAR_UNSIGNED__, unless the
857# C compiler predefines it.
858AC_C_CHAR_UNSIGNED
859
860# Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
861AC_CHECK_SIZEOF(signed short)
862
863# Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
864AC_CHECK_SIZEOF(unsigned short)
865
866# Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
867AC_CHECK_SIZEOF(signed int)
868
869# Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
870AC_CHECK_SIZEOF(unsigned int)
871
872# Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
873AC_CHECK_SIZEOF(signed long)
874
875# Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
876AC_CHECK_SIZEOF(unsigned long)
877
878# Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
879# 'signed long long' is not supported then the value defined is zero.
880AC_CHECK_SIZEOF(signed long long)
881
882# Obtain size of a 'unsigned long long' and define as
883# SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
884# supported then the value defined is zero.
885AC_CHECK_SIZEOF(unsigned long long)
886
887# Obtain size of off_t and define as SIZEOF_OFF_T
888AC_CHECK_SIZEOF(off_t)
889
890# Obtain size of size_t and define as SIZEOF_SIZE_T
891AC_CHECK_SIZEOF(size_t)
892
cristy330e9352010-06-01 18:42:49 +0000893# Obtain size of ssize_t and define as SIZEOF_SSIZE_T
894AC_CHECK_SIZEOF(ssize_t)
895
cristy3ed852e2009-09-05 21:47:34 +0000896# Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
897AC_CHECK_SIZEOF(unsigned int*)
898
899#
900# Compute sized types for current CPU and compiler options.
901#
902
903AC_MSG_CHECKING(for signed 8-bit type)
904INT8_T='signed char'
905AC_MSG_RESULT($INT8_T)
906AC_SUBST(INT8_T)
907
908AC_MSG_CHECKING(for unsigned 8-bit type)
909UINT8_T='unsigned char'
910AC_MSG_RESULT($UINT8_T)
911AC_SUBST(UINT8_T)
912
913AC_MSG_CHECKING(for signed 16-bit type)
914INT16_T='signed short'
915AC_MSG_RESULT($INT16_T)
916AC_SUBST(INT16_T)
917
918AC_MSG_CHECKING(for unsigned 16-bit type)
919UINT16_T='unsigned short'
920AC_MSG_RESULT($UINT16_T)
921AC_SUBST(UINT16_T)
922
923AC_MSG_CHECKING(for signed 32-bit type)
924INT32_T='none'
cristy6d5e20f2011-04-25 13:48:54 +0000925INT32_F='none'
cristy3ed852e2009-09-05 21:47:34 +0000926if test $ac_cv_sizeof_signed_int -eq 4; then
927 INT32_T='signed int'
cristy6d5e20f2011-04-25 13:48:54 +0000928 INT32_F='""'
cristy3ed852e2009-09-05 21:47:34 +0000929elif test $ac_cv_sizeof_signed_long -eq 4; then
930 INT32_T='signed long'
cristy6d5e20f2011-04-25 13:48:54 +0000931 INT32_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +0000932fi
933AC_MSG_RESULT($INT32_T)
934AC_SUBST(INT32_T)
cristy6d5e20f2011-04-25 13:48:54 +0000935AC_SUBST(INT32_F)
cristy3ed852e2009-09-05 21:47:34 +0000936
937AC_MSG_CHECKING(for unsigned 32-bit type)
938UINT32_T='none'
cristy6d5e20f2011-04-25 13:48:54 +0000939UINT32_F='none'
cristy3ed852e2009-09-05 21:47:34 +0000940if test $ac_cv_sizeof_unsigned_int -eq 4; then
941 UINT32_T='unsigned int'
cristy6d5e20f2011-04-25 13:48:54 +0000942 UINT32_F='""'
cristy3ed852e2009-09-05 21:47:34 +0000943elif test $ac_cv_sizeof_unsigned_long -eq 4; then
944 UINT32_T='unsigned long'
cristy6d5e20f2011-04-25 13:48:54 +0000945 UINT32_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +0000946fi
947AC_MSG_RESULT($UINT32_T)
948AC_SUBST(UINT32_T)
cristy6d5e20f2011-04-25 13:48:54 +0000949AC_SUBST(UINT32_F)
cristy3ed852e2009-09-05 21:47:34 +0000950
951AC_MSG_CHECKING(for signed 64-bit type)
952INT64_T='none'
cristy6d5e20f2011-04-25 13:48:54 +0000953INT64_F='none'
cristy3ed852e2009-09-05 21:47:34 +0000954if test $ac_cv_sizeof_signed_long -eq 8; then
955 INT64_T='signed long'
cristy6d5e20f2011-04-25 13:48:54 +0000956 INT64_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +0000957elif test $ac_cv_sizeof_signed_long_long -eq 8; then
958 INT64_T='signed long long'
cristy6d5e20f2011-04-25 13:48:54 +0000959 INT64_F='"ll"'
cristy3ed852e2009-09-05 21:47:34 +0000960fi
cristy6d5e20f2011-04-25 13:48:54 +0000961case "${build_os}" in
962 mingw* )
963 INT64_F='"I64"'
964 ;;
965esac
cristy3ed852e2009-09-05 21:47:34 +0000966AC_MSG_RESULT($INT64_T)
967AC_SUBST(INT64_T)
cristy6d5e20f2011-04-25 13:48:54 +0000968AC_SUBST(INT64_F)
cristy3ed852e2009-09-05 21:47:34 +0000969
970AC_MSG_CHECKING(for unsigned 64-bit type)
971UINT64_T='none'
cristy6d5e20f2011-04-25 13:48:54 +0000972UINT64_F='none'
cristy3ed852e2009-09-05 21:47:34 +0000973if test $ac_cv_sizeof_unsigned_long -eq 8; then
974 UINT64_T='unsigned long'
cristy6d5e20f2011-04-25 13:48:54 +0000975 UINT64_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +0000976elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
977 UINT64_T='unsigned long long'
cristy6d5e20f2011-04-25 13:48:54 +0000978 UINT64_F='"ll"'
cristy3ed852e2009-09-05 21:47:34 +0000979fi
cristy6d5e20f2011-04-25 13:48:54 +0000980case "${build_os}" in
981 mingw* )
982 UINT64_F='"I64"'
983 ;;
984esac
cristy3ed852e2009-09-05 21:47:34 +0000985AC_MSG_RESULT($UINT64_T)
986AC_SUBST(UINT64_T)
cristy6d5e20f2011-04-25 13:48:54 +0000987AC_SUBST(UINT64_F)
cristy3ed852e2009-09-05 21:47:34 +0000988
989AC_MSG_CHECKING(for unsigned maximum type)
990UINTMAX_T='none'
cristy6d5e20f2011-04-25 13:48:54 +0000991UINTMAX_F='none'
cristy3ed852e2009-09-05 21:47:34 +0000992if test "$UINT64_T" != 'none'; then
993 UINTMAX_T=$UINT64_T
cristy6d5e20f2011-04-25 13:48:54 +0000994 UINTMAX_F=$UINT64_F
cristy3ed852e2009-09-05 21:47:34 +0000995elif test "$UINT32_T" != 'none'; then
996 UINTMAX_T=$UINT32_T
cristy6d5e20f2011-04-25 13:48:54 +0000997 UINTMAX_F=$UINT32_F
cristy3ed852e2009-09-05 21:47:34 +0000998fi
999AC_MSG_RESULT($UINTMAX_T)
1000AC_SUBST(UINTMAX_T)
cristy6d5e20f2011-04-25 13:48:54 +00001001AC_SUBST(UINTMAX_F)
cristy3ed852e2009-09-05 21:47:34 +00001002
1003AC_MSG_CHECKING(for pointer difference type)
1004UINTPTR_T='none'
cristy6d5e20f2011-04-25 13:48:54 +00001005UINTPTR_F='none'
cristy3ed852e2009-09-05 21:47:34 +00001006if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1007 UINTPTR_T='unsigned long'
cristy6d5e20f2011-04-25 13:48:54 +00001008 UINTPTR_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +00001009elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1010 UINTPTR_T='unsigned long long'
cristy6d5e20f2011-04-25 13:48:54 +00001011 UINTPTR_F='"ll"'
cristy3ed852e2009-09-05 21:47:34 +00001012fi
1013AC_MSG_RESULT($UINTPTR_T)
1014AC_SUBST(UINTPTR_T)
cristy6d5e20f2011-04-25 13:48:54 +00001015AC_SUBST(UINTPTR_F)
cristy3ed852e2009-09-05 21:47:34 +00001016
1017AC_MSG_CHECKING([whether our compiler supports __func__])
1018AC_TRY_COMPILE([],
1019 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
1020 AC_MSG_RESULT([yes]),
1021 AC_MSG_RESULT([no])
1022 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1023 AC_TRY_COMPILE([],
1024 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
1025 AC_MSG_RESULT([yes])
1026 AC_DEFINE(__func__, __FUNCTION__,
1027 [Define to appropriate substitue if compiler does not have __func__]),
1028 AC_MSG_RESULT([no])
1029 AC_DEFINE(__func__, __FILE__,
1030 [Define to appropriate substitue if compiler does not have __func__])))
1031
1032########
1033#
1034# Check for functions
1035#
1036########
1037MAGICK_FUNC_MMAP_FILEIO
1038AC_FUNC_CLOSEDIR_VOID
1039AC_FUNC_MMAP
1040AC_FUNC_FORK
1041AC_FUNC_MEMCMP
1042AC_FUNC_SELECT_ARGTYPES
1043AC_FUNC_SETVBUF_REVERSED
1044AC_TYPE_SIGNAL
1045AC_FUNC_STRTOD
1046AC_FUNC_VPRINTF
1047
cristy161b9262010-03-20 19:34:32 +00001048#
1049# Find math library
1050#
1051MATH_LIBS=''
1052AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1053LIBS="$MATH_LIBS $LIBS"
1054AC_SUBST(MATH_LIBS)
1055
cristyb33454f2011-08-03 02:10:45 +00001056AC_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 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 strerror_r 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])
cristye43a45e2009-09-28 14:49:00 +00001057
1058#
1059# Check for clock_gettime().
1060#
1061AC_SEARCH_LIBS(clock_gettime, rt,
1062[
1063 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1064 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
cristyda16f162011-02-19 23:52:17 +00001065 AC_COMPILE_IFELSE([
cristye43a45e2009-09-28 14:49:00 +00001066 AC_LANG_PROGRAM(
1067 [[#include <time.h>]],
cristyda16f162011-02-19 23:52:17 +00001068 [[clockid_t clockType = CLOCK_REALTIME;]])],
cristye43a45e2009-09-28 14:49:00 +00001069 [
1070 AC_MSG_RESULT(yes)
1071 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
1072 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1073 ],
1074 AC_MSG_RESULT(no)
1075 )
1076 ],
1077 [
1078 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1079 ]
1080)
cristy3ed852e2009-09-05 21:47:34 +00001081
1082########
1083#
1084# Check for function prototypes
1085#
1086########
1087
1088AC_CHECK_DECLS([pread, pwrite],[],[],[
1089#include <unistd.h>])
1090
1091AC_CHECK_DECLS([strlcpy],[],[],[
1092#include <strings.h>])
1093
1094AC_CHECK_DECLS([vsnprintf],[],[],[
1095#include <stdio.h>
1096#include <stdarg.h>])
1097
1098########
1099#
1100# C++ Support Tests (For Magick++)
1101#
1102########
1103have_magick_plus_plus='no'
1104if test "$with_magick_plus_plus" = 'yes'; then
1105 OLIBS="$LIBS"
1106 LIBS=''
1107 AC_LANG_PUSH(C++)
1108
1109 # Full set of headers used...
1110 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1111 # functional iomanip iosfwd iostream iterator list string strstream utility
1112 AC_LANG([C++])
1113 AC_PROG_CXX
cristy964cb7f2010-04-25 23:18:00 +00001114 AX_CXX_BOOL
1115 AX_CXX_NAMESPACES
1116 AX_CXX_NAMESPACE_STD
cristy3ed852e2009-09-05 21:47:34 +00001117 AC_CXX_HAVE_STD_LIBS
cristy3ed852e2009-09-05 21:47:34 +00001118 AC_OPENMP([C++])
1119 AC_LANG_POP
1120
1121 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1122 if \
cristy964cb7f2010-04-25 23:18:00 +00001123 test $ax_cv_cxx_bool = 'yes' && \
cristy964cb7f2010-04-25 23:18:00 +00001124 test $ax_cv_cxx_namespaces = 'yes' && \
cristy3ed852e2009-09-05 21:47:34 +00001125 test $ac_cv_cxx_have_std_libs = 'yes' && \
cristy964cb7f2010-04-25 23:18:00 +00001126 test $ax_cv_cxx_have_std_namespace = 'yes'; then
cristy3ed852e2009-09-05 21:47:34 +00001127 have_magick_plus_plus='yes'
1128 else
1129 have_magick_plus_plus='no (failed tests)'
1130 fi
1131 AC_MSG_RESULT([$have_magick_plus_plus])
1132 LIBS="$OLIBS"
1133fi
1134AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1135
1136# Only check for delegate libraries in subdirectories if requested.
1137if test "$enable_delegate_build" != 'no'; then
1138 # Check for delegate sub-directories and add -I & -L options as required.
1139 # This presumes that delegates are installed as detailed in the ImageMagick
1140 # README. If delegates are installed in a standard location where the
1141 # compiler will automatically find them then these options should not be
1142 # required.
1143
1144 #
1145 # Most delegates have includes in the same directory as the library, but not all...
1146 #
1147 # Includes
cristyfbb0ef02010-12-19 02:32:11 +00001148 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 wmf/include xml/include zlib; do
cristy3ed852e2009-09-05 21:47:34 +00001149 if test -d "$builddir/$dir"; then
1150 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1151 else
1152 if test -d "$srcdirfull/$dir"; then
1153 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1154 fi
1155 fi
1156 done
1157
1158 # Libraries
cristyfbb0ef02010-12-19 02:32:11 +00001159 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 wmf/src xml zlib; do
cristy3ed852e2009-09-05 21:47:34 +00001160 if test -d "$builddir/$dir/.libs"; then
1161 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1162 else
1163 if test -d "$srcdirfull/$dir/.libs"; then
1164 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1165 fi
1166 fi
1167 if test -d "$builddir/$dir"; then
1168 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1169 else
1170 if test -d "$srcdirfull/$dir"; then
1171 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1172 fi
1173 fi
1174 done
1175fi
1176
1177# Assume that delegate headers reside under same directory as ImageMagick
1178# installation prefix.
1179MAGICK_CPPFLAGS="-I$INCLUDE_DIR/ImageMagick $MAGICK_CPPFLAGS"
1180
1181#
1182# Find the X11 RGB database
1183#
1184AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1185[# Look for the header file in a standard set of common directories.
1186# Check X11 before X11Rn because it is often a symlink to the current release.
1187 for ac_dir in \
1188 /lib/usr/lib/X11 \
1189 /usr/X11/lib \
1190 /usr/X11R4/lib \
1191 /usr/X11R5/lib \
1192 /usr/X11R6/lib \
1193 /usr/X11R7/lib \
1194 /usr/X386/lib \
1195 /usr/XFree86/lib/X11 \
1196 /usr/athena/lib \
1197 /usr/lib \
1198 /usr/lib/X11 \
1199 /usr/lib/X11R4 \
1200 /usr/lib/X11R5 \
1201 /usr/lib/X11R6 \
1202 /usr/lib/X11R7 \
1203 /usr/local/X11/lib \
1204 /usr/local/X11R4/lib \
1205 /usr/local/X11R5/lib \
1206 /usr/local/X11R6/lib \
1207 /usr/local/lib \
1208 /usr/local/lib/X11 \
1209 /usr/local/lib/X11R4 \
1210 /usr/local/lib/X11R5 \
1211 /usr/local/lib/X11R6 \
1212 /usr/local/lib/X11R7 \
1213 /usr/local/x11r5/lib \
1214 /usr/lpp/Xamples/lib \
1215 /usr/openwin/lib \
1216 /usr/openwin/share/lib \
1217 /usr/unsupported/lib \
1218 /usr/x386/lib \
1219 ; do
1220 if test -f "$ac_dir/X11/rgb.txt"; then
1221 im_cv_x_configure="$ac_dir/X11/"
1222 break
1223 elif test -f "$ac_dir/rgb.txt"; then
1224 im_cv_x_configure="$ac_dir/"
1225 break
1226 fi
1227
1228 done])
1229X11_CONFIGURE_PATH="$im_cv_x_configure"
1230case "${build_os}" in
1231 mingw* )
1232 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1233 ;;
1234esac
1235AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",Location of X11 configure files)
1236
1237#
1238# Find OpenMP library
1239#
1240GOMP_LIBS=''
1241if test "$enable_openmp" != 'no'; then
1242 if test "${GCC}" = "yes"; then
1243 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,) # gcc
1244 else
1245 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,) # solaris cc
1246 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,) # AIX xlc
1247 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,) # SGI IRIX 6.5 MIPSpro C/C++
1248 fi
1249 LIBS="$GOMP_LIBS $LIBS"
1250fi
1251AC_SUBST(GOMP_LIBS)
1252
1253#
1254# Find Posix threads library
1255#
1256THREAD_LIBS=''
1257if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then
1258
1259 if test "x$PTHREAD_LIBS" = "x"; then
1260 case "${host_cpu}-${host_os}" in
1261 *-freebsd*)
1262 MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;;
1263 esac
1264 fi
1265
1266 for lib in pthread pthreads; do
1267 if test "x$PTHREAD_LIBS" = "x"; then
1268 MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib])
1269 fi
1270 done
1271
1272 THREAD_LIBS="$PTHREAD_LIBS"
1273 LIBS="$LIBS $THREAD_LIBS"
1274fi
1275AC_SUBST(THREAD_LIBS)
1276
1277#
1278# Check for umem.
1279#
1280have_umem='no'
1281UMEM_LIBS=''
1282if test "$with_umem" != 'no'; then
1283 AC_MSG_CHECKING(for UMEM support )
1284 AC_MSG_RESULT()
1285 failed=0
1286 passed=0
1287 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1288 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1289 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1290 AC_MSG_CHECKING(if umem memory allocation library is complete)
1291 if test $passed -gt 0; then
1292 if test $failed -gt 0; then
1293 AC_MSG_RESULT(no -- some components failed test)
1294 have_umem='no (failed tests)'
1295 else
1296 UMEM_LIBS='-lumem'
1297 LIBS="$UMEM_LIBS $LIBS"
1298 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
1299 AC_MSG_RESULT(yes)
1300 have_umem='yes'
1301 fi
1302 else
1303 AC_MSG_RESULT(no)
1304 fi
1305fi
1306AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1307AC_SUBST(UMEM_LIBS)
1308
1309#
1310# Add support for ccmalloc memory debugging library if requested
1311#
1312have_ccmalloc='no'
1313CCMALLOC_LIBS=''
1314if test "$enable_ccmalloc" = 'yes'; then
1315 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1316 if test -n "$CCMALLOCDelegate"; then
1317 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1318 OLIBS="$LIBS"
1319 # Assume that gcc is used with ccmalloc.
1320 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1321 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1322 if test -n "$CCMALLOC_LIBS"; then
1323 LIBS="$OLIBS"
1324 LIBS="$LIBS $CCMALLOC_LIBS"
1325 have_ccmalloc='yes'
1326 else
1327 LIBS="$OLIBS"
1328 fi
1329 fi
1330fi
1331
1332#
1333# Add support for efence memory debugging library if requested
1334#
1335if test "$enable_efence" = 'yes'; then
1336 EFENCE_LIBS='-lefence'
1337 LIBS="$EFENCE_LIBS $LIBS"
1338fi
1339
cristy3ed852e2009-09-05 21:47:34 +00001340dnl ===========================================================================
1341
1342#
1343# Check for BZLIB
1344#
1345
1346AC_ARG_WITH([bzlib],
1347 [AC_HELP_STRING([--without-bzlib],
1348 [disable BZLIB support])],
1349 [with_bzlib=$withval],
1350 [with_bzlib='yes'])
1351
1352if test "$with_bzlib" != 'yes'; then
1353 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1354fi
1355
1356have_bzlib='no'
1357if test "$with_bzlib" != 'no'; then
1358 BZLIB_LIBS=''
1359 AC_MSG_RESULT([-------------------------------------------------------------])
1360 AC_MSG_CHECKING([for BZLIB])
1361 AC_MSG_RESULT([])
1362 failed=0
1363 passed=0
1364 found_libbz=0
1365 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1366 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1367 if test "$native_win32_build" = 'yes'; then
1368 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1369 fi
1370 if test $found_libbz -gt 0; then
1371 passed=`expr $passed + 1`
1372 else
1373 failed=`expr $failed + 1`
1374 fi
1375 AC_MSG_CHECKING(if BZLIB package is complete)
1376 if test $passed -gt 0; then
1377 if test $failed -gt 0; then
1378 AC_MSG_RESULT(no -- some components failed test)
1379 have_bzlib='no (failed tests)'
1380 else
1381 BZLIB_LIBS='-lbz2'
1382 LIBS="$BZLIB_LIBS $LIBS"
1383 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
1384 AC_MSG_RESULT(yes)
1385 have_bzlib='yes'
1386 fi
1387 else
1388 AC_MSG_RESULT(no)
1389 fi
1390fi
1391AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1392AC_SUBST(BZLIB_LIBS)
1393
1394#
1395# Find the X11 include and library directories.
1396#
1397IPC_LIBS=''
1398X11_LIBS=''
1399XEXT_LIBS=''
1400XT_LIBS=''
1401AC_PATH_XTRA
1402if test "$no_x" != 'yes'; then
1403 AC_MSG_RESULT([-------------------------------------------------------------])
1404 AC_MSG_CHECKING([for X11])
1405 AC_MSG_RESULT([])
1406 LDFLAGS="$LDFLAGS $X_LIBS"
1407 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1408 LIBS="$X11_LIBS $LIBS"
1409 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1410
1411 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1412
1413 #
1414 # Check for X11 shared memory extension
1415 #
1416 # shmctl is required to support the shared memory extension
1417 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1418 if test "$have_shmctl" != 'yes'; then
1419 PERSIST_LIBS=$LIBS
1420 LIBS="$LIBS -lcygipc"
1421 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1422 LIBS=$PERSIST_LIBS
1423 fi
1424
1425 if test "$have_shmctl" = 'yes'; then
1426 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1427 fi
1428
1429 #
1430 # Check for X11 shape extension
1431 #
1432 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1433 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1434 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1435fi
1436if test "$no_x" != 'yes'; then
1437 have_x='yes'
1438else
1439 have_x='no'
1440fi
1441AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1442AC_SUBST(X11_LIBS)
1443AC_SUBST(XEXT_LIBS)
1444
1445dnl ===========================================================================
1446
1447#
1448# Check for ZLIB
1449#
1450AC_ARG_WITH([zlib],
1451 [AC_HELP_STRING([--without-zlib],
1452 [disable ZLIB support])],
1453 [with_zlib=$withval],
1454 [with_zlib='yes'])
1455
1456if test "$with_zlib" != 'yes'; then
1457 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1458fi
1459
1460have_zlib='no'
1461ZLIB_LIBS=''
1462dnl PNG requires zlib so enable zlib check if PNG is requested
1463if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then
1464 AC_MSG_RESULT([-------------------------------------------------------------])
1465 AC_MSG_CHECKING([for ZLIB])
1466 AC_MSG_RESULT([])
1467 ZLIB_LIBS=''
1468 failed=0
1469 passed=0
1470 AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1471 AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1472 AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1473 AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1474 AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1475 AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1476 AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1477 AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1478 AC_MSG_CHECKING([if ZLIB package is complete])
1479 if test $passed -gt 0; then
1480 if test $failed -gt 0; then
1481 AC_MSG_RESULT([no -- some components failed test])
1482 have_zlib='no (failed tests)'
1483 else
1484 ZLIB_LIBS='-lz'
1485 LIBS="$ZLIB_LIBS $LIBS"
1486 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library)
1487 AC_MSG_RESULT([yes])
1488 have_zlib='yes'
1489 fi
1490 else
1491 AC_MSG_RESULT([no])
1492 fi
1493fi
1494AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
1495AC_SUBST(ZLIB_LIBS)
1496
1497#
1498# If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1499#
1500LIB_DL=''
1501if test "$enable_profiling" = 'yes'; then
1502 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1503 LIBS="$LIB_DL $LIBS"
1504fi
1505AC_SUBST(LIB_DL)
1506
1507dnl ===========================================================================
1508
1509#
1510# Check for Autotrace delegate library.
1511#
1512AC_ARG_WITH([autotrace],
1513 [AC_HELP_STRING([--with-autotrace],
1514 [enable autotrace support])],
1515 [with_autotrace=$withval],
1516 [with_autotrace='no'])
1517
1518if test "$with_autotrace" != 'yes'; then
1519 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1520fi
1521
1522have_autotrace='no'
1523AUTOTRACE_CFLAGS=""
1524AUTOTRACE_LIBS=""
1525AUTOTRACE_PKG=""
1526if test "x$with_autotrace" = "xyes"; then
1527 AC_MSG_RESULT([-------------------------------------------------------------])
1528 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1529 AC_MSG_RESULT([])
1530fi
1531
1532if test "$have_autotrace" = 'yes'; then
1533 failed=0
1534 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1535 if test "$with_modules" = 'no'; then
1536 CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS"
1537 fi
1538fi
1539
1540AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1541AC_SUBST(AUTOTRACE_CFLAGS)
1542AC_SUBST(AUTOTRACE_LIBS)
1543
1544dnl ===========================================================================
1545
1546#
1547# Check for Display Postscript delegate library.
1548#
1549AC_ARG_WITH([dps],
1550 [AC_HELP_STRING([--without-dps],
1551 [disable Display Postscript support])],
1552 [with_dps=$withval],
1553 [with_dps='yes'])
1554
1555if test "$with_dps" != 'yes'; then
1556 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1557fi
1558
1559have_dps='no'
1560DPS_LIBS=''
1561if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
1562 AC_MSG_RESULT([-------------------------------------------------------------])
1563 AC_MSG_CHECKING([for DPS])
1564 AC_MSG_RESULT([])
1565 failed=0
1566 passed=0
1567 PERSIST_CPPFLAGS="$CPPFLAGS"
1568 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1569 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1570 # DPS issues:
1571 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1572 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1573 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1574 # ImageMagick itself doesn't use -lXt.
1575 have_libdps='no'
1576 LIBDPS_XT=''
1577 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1578 if test "$have_libdps" != 'yes'; then
1579 # Unset cache variable so we can try again.
1580 unset ac_cv_lib_dps_DPSInitialize
1581 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1582 if test "$have_libdps" = 'yes'; then
1583 LIBDPS_XT='-lXt'
1584 fi
1585 fi
1586 if test "$have_libdps" = 'yes'; then
1587 passed=`expr $passed + 1`
1588 else
1589 failed=`expr $failed + 1`
1590 fi
1591 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1592 AC_MSG_CHECKING([if DPS package is complete])
1593 if test $passed -gt 0; then
1594 if test $failed -gt 0; then
1595 AC_MSG_RESULT([no -- some components failed test])
1596 have_dps='no (failed tests)'
1597 CPPFLAGS="$PERSIST_CPPFLAGS"
1598 else
1599 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1600 LIBS="$DPS_LIBS $LIBS"
1601 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
1602 AC_MSG_RESULT([yes])
1603 have_dps='yes'
1604 fi
1605 else
1606 AC_MSG_RESULT([no])
1607 CPPFLAGS=$PERSIST_CPPFLAGS
1608 fi
1609fi
1610AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1611AC_SUBST(DPS_LIBS)
1612
1613dnl ===========================================================================
1614
1615#
1616# Check for DJVU delegate library.
1617#
1618AC_ARG_WITH([djvu],
1619 [AC_HELP_STRING([--without-djvu],
1620 [disable DjVu support])],
1621 [with_djvu=$withval],
1622 [with_djvu='yes'])
1623
1624if test "$with_djvu" != 'yes'; then
1625 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
1626fi
1627
1628have_djvu='no'
1629DJVU_LIBS=''
1630if test "$with_djvu" != 'no'; then
1631 AC_MSG_RESULT([-------------------------------------------------------------])
1632 AC_MSG_CHECKING([for DJVU])
1633 AC_MSG_RESULT([])
1634 failed=0
1635 passed=0
1636 AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1637 AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1638 AC_MSG_CHECKING([if DJVU package is complete])
1639 if test $passed -gt 0; then
1640 if test $failed -gt 0; then
1641 AC_MSG_RESULT([no -- some components failed test])
1642 have_djvu='no (failed tests)'
1643 else
1644 DJVU_LIBS='-ldjvulibre'
1645 LIBS="$DJVU_LIBS $LIBS"
1646 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
1647 AC_MSG_RESULT([yes])
1648 have_djvu='yes'
1649 fi
1650 else
1651 AC_MSG_RESULT([no])
1652 fi
1653fi
1654AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
1655AC_SUBST(DJVU_LIBS)
1656
1657dnl ===========================================================================
1658
1659#
cristy430a7312010-01-21 20:44:04 +00001660# Set DejaVu font directory.
1661#
1662AC_ARG_WITH([dejavu-font-dir],
1663 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1664 [DejaVu font directory])],
1665 [with_dejavu_font_dir=$withval],
1666 [with_dejavu_font_dir='default'])
1667
1668if test "$with_dejavu_font_dir" != 'default'; then
1669 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1670fi
1671
1672dnl ===========================================================================
1673
1674#
cristy3ed852e2009-09-05 21:47:34 +00001675# Check for FFTW delegate library.
1676#
1677AC_ARG_WITH([fftw],
1678 [AC_HELP_STRING([--without-fftw],
1679 [disable FFTW support])],
1680 [with_fftw=$withval],
1681 [with_fftw='yes'])
1682
1683if test "$with_fftw" != 'yes'; then
1684 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1685fi
1686
1687have_fftw='no'
1688FFTW_LIBS=''
1689if test "$with_fftw" != 'no'; then
1690 AC_MSG_RESULT([-------------------------------------------------------------])
1691 AC_MSG_CHECKING([for FFTW])
1692 AC_MSG_RESULT([])
1693 failed=0
1694 passed=0
1695 AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1696 AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1697 AC_MSG_CHECKING([if FFTW package is complete])
1698 if test $passed -gt 0; then
1699 if test $failed -gt 0; then
1700 AC_MSG_RESULT([no -- some components failed test])
1701 have_fftw='no (failed tests)'
1702 else
1703 FFTW_LIBS='-lfftw3'
1704 LIBS="$FFTW_LIBS $LIBS"
1705 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
1706 AC_MSG_RESULT([yes])
1707 have_fftw='yes'
1708 fi
1709 else
1710 AC_MSG_RESULT([no])
1711 fi
1712fi
1713AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
1714AC_SUBST(FFTW_LIBS)
1715
1716dnl ===========================================================================
1717
1718#
1719# Check for FlashPIX delegate library.
1720#
1721AC_ARG_WITH([fpx],
1722 [AC_HELP_STRING([--without-fpx],
1723 [disable FlashPIX support])],
1724 [with_fpx=$withval],
1725 [with_fpx='yes'])
1726
1727if test "$with_fpx" != 'yes'; then
1728 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1729fi
1730
1731have_fpx='no'
1732FPX_LIBS=''
1733if test "$with_fpx" != 'no'; then
1734 AC_MSG_RESULT([-------------------------------------------------------------])
1735 AC_MSG_CHECKING([for FlashPIX])
1736 AC_MSG_RESULT([])
1737 failed=0
1738 passed=0
1739 AC_LANG_PUSH(C++)
1740 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1741 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1742 AC_LANG_POP
1743 AC_MSG_CHECKING([if FlashPIX package is complete])
1744 if test $passed -gt 0; then
1745 if test $failed -gt 0; then
1746 AC_MSG_RESULT([no -- some components failed test])
1747 have_fpx='no (failed tests)'
1748 else
1749 FPX_LIBS='-lfpx'
1750 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
1751 AC_MSG_RESULT([yes])
1752 have_fpx='yes'
1753 PERLMAINCC="$CXX"
1754 fi
1755 else
1756 AC_MSG_RESULT([no])
1757 fi
1758fi
1759AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1760AC_SUBST(FPX_LIBS)
1761
1762dnl ===========================================================================
1763
1764#
1765# Check for fontconfig delegate library.
1766#
1767AC_ARG_WITH([fontconfig],
1768 [AC_HELP_STRING([--without-fontconfig],
1769 [disable fontconfig support])],
1770 [with_fontconfig=$withval],
1771 [with_fontconfig=$have_x])
1772
1773if test "$with_fontconfig" != 'yes'; then
1774 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
1775fi
1776
1777have_fontconfig='no'
1778FONTCONFIG_CFLAGS=""
1779FONTCONFIG_LIBS=""
1780FONTCONFIG_PKG=""
1781if test "x$with_fontconfig" = "xyes"; then
1782 AC_MSG_RESULT([-------------------------------------------------------------])
1783 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
1784 AC_MSG_RESULT([])
1785fi
1786
1787if test "$have_fontconfig" = 'yes'; then
cristyd09bcf92010-03-25 03:04:45 +00001788 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
1789 if test "$with_modules" = 'no'; then
cristy3ed852e2009-09-05 21:47:34 +00001790 CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
cristyd09bcf92010-03-25 03:04:45 +00001791 fi
cristy3ed852e2009-09-05 21:47:34 +00001792fi
1793
1794AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
1795AC_SUBST(FONTCONFIG_CFLAGS)
1796AC_SUBST(FONTCONFIG_LIBS)
1797
1798dnl ===========================================================================
1799
1800#
1801# Check for freetype delegate library.
1802#
1803AC_ARG_WITH([freetype],
1804 [AC_HELP_STRING([--without-freetype],
1805 [disable Freetype support])],
1806 [with_freetype=$withval],
1807 [with_freetype='yes'])
1808
1809
1810if test "$with_freetype" != 'yes'; then
1811 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
1812fi
1813
1814have_freetype='no'
1815FREETYPE_LIBS=''
1816if test "$with_freetype" != 'no'; then
1817 AC_MSG_RESULT([-------------------------------------------------------------])
1818 AC_MSG_CHECKING([for FreeType 2.0])
1819 AC_MSG_RESULT([])
1820 failed=0
1821 passed=0
cristy66291112009-10-03 22:44:36 +00001822 PERSIST_LIBS="$LIBS"
cristy3ed852e2009-09-05 21:47:34 +00001823 PERSIST_CPPFLAGS="$CPPFLAGS"
1824 if test "$enable_delegate_build" != 'no' && test -d "$builddir/freetype/include"; then
1825 :
1826 else
1827 freetype_config=''
1828 AC_CHECK_PROGS(freetype_config,freetype-config,)dnl
1829 if test -n "$freetype_config"; then
1830 freetype_cflags=`$freetype_config --cflags`
1831 freetype_libs=`$freetype_config --libs`
cristy66291112009-10-03 22:44:36 +00001832 LIBS="$LIBS $freetype_libs"
cristy3ed852e2009-09-05 21:47:34 +00001833 CPPFLAGS="$freetype_cflags $CPPFLAGS"
1834 fi
1835 fi
1836
1837dnl First see if there is a library
1838 if test "$FREETYPE_LIBS" = ''; then
1839 AC_CHECK_LIB(freetype,FT_Init_FreeType,FREETYPE_LIBS='-lfreetype',,)
1840 if test "$FREETYPE_LIBS" != ''; then
1841 passed=`expr $passed + 1`
1842 else
1843 failed=`expr $failed + 1`
cristy66291112009-10-03 22:44:36 +00001844 LIBS="$PERSIST_LIBS"
cristy3ed852e2009-09-05 21:47:34 +00001845 fi
1846 fi
1847
1848dnl Now test for the headers
1849 AC_CHECK_HEADER([ft2build.h],[FT2BUILD_H='#include <ft2build.h>'],[ft2build=''],[])
1850 AC_CHECK_HEADER(freetype/freetype.h,[have_freetype_h='yes'],[have_freetype_h='no'],[$FT2BUILD_H])
1851 if test "$ac_cv_header_ft2build_h" = 'yes' || test "$have_freetype_h" = 'yes'; then
1852 passed=`expr $passed + 1`
1853 else
1854 failed=`expr $failed + 1`
1855 CPPFLAGS="$PERSIST_CPPFLAGS"
1856 fi
1857
1858 AC_MSG_CHECKING([if FreeType package is complete])
1859 if test $passed -gt 0; then
1860 if test $failed -gt 0; then
1861 FREETYPE_LIBS=''
1862 AC_MSG_RESULT([no -- some components failed test])
1863 have_freetype='no (failed tests)'
1864 else
1865 LIBS="$FREETYPE_LIBS $LIBS"
1866 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FreeType (TrueType font) library)
1867 if test "$ac_cv_header_ft2build_h" = 'yes'; then
1868 AC_DEFINE([HAVE_FT2BUILD_H],[1],[Define to 1 if you have the <ft2build.h> header file.])
1869 fi
1870 AC_MSG_RESULT([yes])
1871 have_freetype='yes'
1872 fi
1873 else
1874 AC_MSG_RESULT([no])
1875 fi
1876fi
1877AM_CONDITIONAL(FREETYPE_DELEGATE,test "$have_freetype" = 'yes')
1878AC_SUBST(FREETYPE_LIBS)
1879
1880dnl ===========================================================================
1881
1882dnl ===========================================================================
1883
1884#
1885# Check for Ghostscript library or framework.
1886#
1887# Test for iapi.h & test for gsapi_new_instance in -lgs
1888# or -framework Ghostscript
1889
1890AC_ARG_WITH([gslib],
1891 [AC_HELP_STRING([--without-gslib],
1892 [enable Ghostscript library support])],
1893 [with_gslib=$withval],
1894 [with_gslib='no'])
1895
cristyb7931f12009-09-25 10:22:21 +00001896gslib_framework='no'
cristy3ed852e2009-09-05 21:47:34 +00001897if test "$with_gslib" != 'yes'; then
1898 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
1899fi
1900
1901have_gslib='no'
1902GS_LIBS=''
1903if test "$with_gslib" != 'no'; then
1904 AC_MSG_RESULT([-------------------------------------------------------------])
1905 AC_MSG_CHECKING([for Ghostscript])
1906 AC_MSG_RESULT([])
cristyb7931f12009-09-25 10:22:21 +00001907 framework=0
cristy3ed852e2009-09-05 21:47:34 +00001908 failed=0
1909 passed=0
1910 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
1911 failed=`expr $failed + 1`,)
1912 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
1913 failed=`expr $failed + 1`,)
1914 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
1915 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
1916 AC_MSG_CHECKING([if Ghostscript package is complete])
1917 if test $passed -gt 0; then
1918 if test $failed -gt 0; then
1919 AC_MSG_RESULT([no -- some components failed test])
1920 have_gslib='no (failed tests)'
1921 else
1922 if test $framework -gt 0; then
1923 GS_LIBS='-framework Ghostscript'
cristyb7931f12009-09-25 10:22:21 +00001924 gslib_framework='yes'
cristy3ed852e2009-09-05 21:47:34 +00001925 AC_MSG_RESULT([yes, using framework.])
1926 else
1927 AC_MSG_RESULT([yes, using library.])
1928 GS_LIBS='-lgs'
1929 fi
1930 LIBS="$GS_LIBS $LIBS"
1931 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
1932 have_gslib='yes'
1933 fi
1934 else
1935 AC_MSG_RESULT([no])
1936 fi
1937fi
1938AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
1939AC_SUBST(GS_LIBS)
1940
1941# Set default font search path
1942AC_ARG_WITH([fontpath],
1943 [AC_HELP_STRING([--with-fontpath=DIR],
1944 [prepend to default font search path])],
1945 [with_fontpath=$withval],
1946 [with_fontpath=''])
1947
1948if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
1949 with_fontpath=''
1950else
1951 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",Define to prepend to default font search path.)
1952fi
1953if test "$with_fontpath=" != ''; then
1954 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
1955fi
1956
1957# Set Ghostscript font directory
1958AC_ARG_WITH([gs-font-dir],
1959 [AC_HELP_STRING([--with-gs-font-dir=DIR],
1960 [Ghostscript font directory])],
1961 [with_gs_font_dir=$withval],
1962 [with_gs_font_dir='default'])
1963
1964if test "$with_gs_font_dir" != 'default'; then
1965 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
1966fi
1967
1968dnl ===========================================================================
1969
1970#
1971# Check for GVC delegate library.
1972#
1973AC_ARG_WITH(gvc,
1974 [AC_HELP_STRING([--without-gvc],
1975 [disable GVC support])],
1976 [with_gvc=$withval],
1977 [with_gvc='yes'])
1978
1979if test "$with_gvc" != 'yes'; then
1980 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
1981fi
1982
1983GVC_PKG=""
1984if test "x$with_gvc" = "xyes"; then
1985 AC_MSG_RESULT([-------------------------------------------------------------])
1986 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
1987 AC_MSG_RESULT([])
1988fi
1989
1990if test "$have_gvc" = 'yes'; then
1991 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
1992 if test "$with_modules" = 'no'; then
1993 CPPFLAGS="$GVC_CFLAGS $CPPFLAGS"
1994 fi
1995fi
1996
1997AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
1998AC_SUBST(GVC_CFLAGS)
1999AC_SUBST(GVC_LIBS)
2000
2001dnl ===========================================================================
2002
2003#
2004# Check for JBIG delegate library.
2005#
2006
2007AC_ARG_WITH([jbig],
2008 [AC_HELP_STRING([--without-jbig],
2009 [disable JBIG support])],
2010 [with_jbig=$withval],
2011 [with_jbig='yes'])
2012
2013have_jbig='no'
2014JBIG_LIBS=''
2015if test "$with_jbig" != 'no'; then
2016 AC_MSG_RESULT([-------------------------------------------------------------])
2017 AC_MSG_CHECKING([for JBIG])
2018 AC_MSG_RESULT([])
2019 failed=0
2020 passed=0
2021 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2022 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2023 AC_MSG_CHECKING([if JBIG package is complete])
2024 if test $passed -gt 0; then
2025 if test $failed -gt 0; then
2026 AC_MSG_RESULT([no -- some components failed test])
2027 have_jbig='no (failed tests)'
2028 else
2029 JBIG_LIBS='-ljbig'
2030 LIBS="$JBIG_LIBS $LIBS"
2031 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
2032 AC_MSG_RESULT([yes])
2033 have_jbig='yes'
2034 fi
2035 else
2036 AC_MSG_RESULT([no])
2037 fi
2038fi
2039AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2040AC_SUBST(JBIG_LIBS)
2041
2042dnl ===========================================================================
2043
2044#
2045# Check for JPEG delegate library.
2046#
2047AC_ARG_WITH([jpeg],
2048 [AC_HELP_STRING([--without-jpeg],
2049 [disable JPEG support])],
2050 [with_jpeg=$withval],
2051 [with_jpeg='yes'])
2052
2053if test "$with_jpeg" != 'yes'; then
2054 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2055fi
2056
2057have_jpeg='no'
2058JPEG_LIBS=''
2059if test "$with_jpeg" != 'no'; then
2060 AC_MSG_RESULT([-------------------------------------------------------------])
2061 AC_MSG_CHECKING([for JPEG])
2062 AC_MSG_RESULT([])
2063 failed=0
2064 passed=0
2065 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2066 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2067 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2068 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2069 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2070
2071# Test for compatible JPEG library
2072if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2073AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2074[AC_TRY_COMPILE(
2075#include <stdio.h>
2076#include <stdlib.h>
2077#include <jpeglib.h>
2078,
2079changequote(<<, >>)dnl
2080<<
2081#if JPEG_LIB_VERSION < 62
2082#error IJG JPEG library must be version 6b or newer!
2083#endif
2084return 0;
2085>>,
2086changequote([, ])dnl
2087ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2088ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2089fi
2090 AC_MSG_CHECKING([if JPEG package is complete])
2091 if test $passed -gt 0; then
2092 if test $failed -gt 0; then
2093 AC_MSG_RESULT([no -- some components failed test])
2094 have_jpeg='no (failed tests)'
2095 else
2096 JPEG_LIBS='-ljpeg'
2097 LIBS="$JPEG_LIBS $LIBS"
2098 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
2099 AC_MSG_RESULT([yes])
2100 have_jpeg='yes'
2101 fi
2102 else
2103 AC_MSG_RESULT([no])
2104 fi
2105fi
2106AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2107AC_SUBST(JPEG_LIBS)
2108
2109dnl ===========================================================================
2110
2111#
2112# Check for JPEG Version 2 delegate library.
2113#
2114AC_ARG_WITH([jp2],
2115 [AC_HELP_STRING([--without-jp2],
2116 [disable JPEG-2000 support])],
2117 [with_jp2=$withval],
2118 [with_jp2='yes'])
2119
2120if test "$with_jp2" != 'yes'; then
2121 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 "
2122fi
2123
2124have_jp2='no'
2125JP2_LIBS=''
2126if test "$with_jp2" != 'no'; then
2127 AC_MSG_RESULT([-------------------------------------------------------------])
2128 AC_MSG_CHECKING([for JPEG Version 2])
2129 AC_MSG_RESULT([])
2130 failed=0
2131 passed=0
2132 AC_CHECK_HEADER(jasper/jasper.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2133 AC_CHECK_LIB(jasper,jas_stream_fopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2134 AC_MSG_CHECKING([if JPEG version 2 support package is complete])
2135 if test $passed -gt 0; then
2136 if test $failed -gt 0; then
2137 AC_MSG_RESULT([no -- some components failed test])
2138 have_jp2='no (failed tests)'
2139 else
2140 JP2_LIBS='-ljasper'
2141 LIBS="$JP2_LIBS $LIBS"
2142 AC_DEFINE(JP2_DELEGATE,1,Define if you have JPEG version 2 "Jasper" library)
2143 AC_MSG_RESULT([yes])
2144 have_jp2='yes'
2145 fi
2146 else
2147 AC_MSG_RESULT([no])
2148 fi
2149fi
2150AM_CONDITIONAL(JP2_DELEGATE, test "$have_jp2" = 'yes')
2151AC_SUBST(JP2_LIBS)
2152
2153dnl ===========================================================================
2154
2155#
2156# Check for LCMS delegate library.
2157#
cristy71203402010-06-18 13:12:03 +00002158# Disable LCMS.
cristy3ed852e2009-09-05 21:47:34 +00002159AC_ARG_WITH(lcms,
cristy71203402010-06-18 13:12:03 +00002160 [ --without-lcms disable lcms (v1.1X) support],
2161 [with_lcms=$withval],
2162 [with_lcms='yes'])
2163if test "$with_lcms" != 'yes' ; then
cristy3ed852e2009-09-05 21:47:34 +00002164 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2165fi
2166
cristy71203402010-06-18 13:12:03 +00002167# Disable LCMS2.
2168AC_ARG_WITH(lcms2,
2169 [ --without-lcms2 disable lcms (v2.X) support],
2170 [with_lcms2=$withval],
2171 [with_lcms2='yes'])
2172if test "$with_lcms2" != 'yes' ; then
2173 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
2174fi
2175
2176have_lcms2='no'
cristy3ed852e2009-09-05 21:47:34 +00002177LCMS_LIBS=''
cristy71203402010-06-18 13:12:03 +00002178if test "$with_lcms2" != 'no'; then
cristy3ed852e2009-09-05 21:47:34 +00002179 AC_MSG_RESULT([-------------------------------------------------------------])
cristy71203402010-06-18 13:12:03 +00002180 AC_MSG_CHECKING([for LCMS v2])
2181 AC_MSG_RESULT()
cristy3ed852e2009-09-05 21:47:34 +00002182 failed=0
2183 passed=0
2184 have_lcms_header='no'
cristy71203402010-06-18 13:12:03 +00002185
2186 # Check for <lcms2.h>
cristyd09bcf92010-03-25 03:04:45 +00002187 AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
2188 if test "$have_lcms_header" = 'yes'; then
cristy71203402010-06-18 13:12:03 +00002189 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
2190 passed=`expr $passed + 1`
cristyd09bcf92010-03-25 03:04:45 +00002191 fi
cristy71203402010-06-18 13:12:03 +00002192
2193 # Check for <lcms2/lcms2.h)
2194 if test "$have_lcms_header" != 'yes'; then
2195 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2196 if test "$have_lcms_header" = 'yes'; then
2197 passed=`expr $passed + 1`
2198 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
2199 fi
2200 fi
2201
2202 # Failed to find lcms header?
2203 if test "$have_lcms_header" != 'yes'; then
2204 failed=`expr $failed + 1`
2205 fi
2206
2207 AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2208 AC_MSG_CHECKING(if LCMS v2 package is complete)
cristyd09bcf92010-03-25 03:04:45 +00002209 if test $passed -gt 0; then
cristy71203402010-06-18 13:12:03 +00002210 if test $failed -gt 0; then
2211 AC_MSG_RESULT(no -- some components failed test)
2212 have_lcms2='no (failed tests)'
2213 else
2214 LCMS_LIBS='-llcms2'
2215 LIBS="$LCMS_LIBS $LIBS"
2216 AC_MSG_RESULT(yes)
2217 have_lcms2='yes'
2218 fi
cristyd09bcf92010-03-25 03:04:45 +00002219 else
cristy71203402010-06-18 13:12:03 +00002220 AC_MSG_RESULT(no)
cristyd09bcf92010-03-25 03:04:45 +00002221 fi
2222fi
2223
cristy71203402010-06-18 13:12:03 +00002224#
2225# Check for LCMS v1 (1.11 or later)
2226#
2227if test $have_lcms2 = 'yes'; then
2228 with_lcms='no'
2229fi
2230
2231have_lcms='no'
cristyd09bcf92010-03-25 03:04:45 +00002232if test "$with_lcms" != 'no'; then
cristyd09bcf92010-03-25 03:04:45 +00002233 AC_MSG_RESULT([-------------------------------------------------------------])
cristy71203402010-06-18 13:12:03 +00002234 AC_MSG_CHECKING([for LCMS v1.1X])
2235 AC_MSG_RESULT()
cristyd09bcf92010-03-25 03:04:45 +00002236 failed=0
2237 passed=0
2238 have_lcms_header='no'
cristy71203402010-06-18 13:12:03 +00002239
2240 # Check for <lcms.h>
2241 if test "$have_lcms_header" != 'yes'; then
2242 AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
2243 if test "$have_lcms_header" = 'yes'; then
cristy3ed852e2009-09-05 21:47:34 +00002244 passed=`expr $passed + 1`
2245 AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
cristy71203402010-06-18 13:12:03 +00002246 fi
cristy3ed852e2009-09-05 21:47:34 +00002247 fi
cristy71203402010-06-18 13:12:03 +00002248
2249 # Check for <lcms/lcms.h>
2250 if test "$have_lcms_header" != 'yes'; then
2251 AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
2252 if test "$have_lcms_header" = 'yes'; then
2253 passed=`expr $passed + 1`
2254 AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
2255 fi
2256 fi
2257
2258 # Failed to find lcms header?
2259 if test "$have_lcms_header" != 'yes'; then
2260 failed=`expr $failed + 1`
2261 fi
2262
2263 AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2264 AC_MSG_CHECKING(if LCMS package is complete)
cristy3ed852e2009-09-05 21:47:34 +00002265 if test $passed -gt 0; then
cristy71203402010-06-18 13:12:03 +00002266 if test $failed -gt 0; then
2267 AC_MSG_RESULT(no -- some components failed test)
2268 have_lcms='no (failed tests)'
2269 else
2270 LCMS_LIBS='-llcms'
2271 LIBS="$LCMS_LIBS $LIBS"
2272 AC_MSG_RESULT(yes)
2273 have_lcms='yes'
2274 fi
cristy3ed852e2009-09-05 21:47:34 +00002275 else
cristy71203402010-06-18 13:12:03 +00002276 AC_MSG_RESULT(no)
cristy3ed852e2009-09-05 21:47:34 +00002277 fi
2278fi
cristy71203402010-06-18 13:12:03 +00002279
2280AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
2281if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
2282 AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
cristyd09bcf92010-03-25 03:04:45 +00002283fi
cristy3ed852e2009-09-05 21:47:34 +00002284AC_SUBST(LCMS_LIBS)
2285
cristy71203402010-06-18 13:12:03 +00002286
cristy3ed852e2009-09-05 21:47:34 +00002287dnl ===========================================================================
2288
2289#
2290# Check for the LQR (Liquid Rescale) delegate library.
2291#
2292AC_ARG_WITH([lqr],
2293 [AC_HELP_STRING([--without-lqr],
cristyec501352010-03-13 18:43:34 +00002294 [disable Liquid Rescale support])],
cristy3ed852e2009-09-05 21:47:34 +00002295 [with_lqr=$withval],
2296 [with_lqr='yes'])
2297
2298if test "$with_lqr" != 'yes'; then
2299 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2300fi
2301
2302have_lqr='no'
2303LQR_CFLAGS=""
2304LQR_LIBS=""
2305LQR_PKG=""
2306if test "x$with_lqr" = "xyes"; then
2307 AC_MSG_RESULT([-------------------------------------------------------------])
2308 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2309 AC_MSG_RESULT([])
2310fi
2311
2312if test "$have_lqr" = 'yes'; then
2313 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2314 CFLAGS="$LQR_CFLAGS $CFLAGS"
2315fi
2316
2317AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2318AC_SUBST(LQR_CFLAGS)
2319AC_SUBST(LQR_LIBS)
2320
2321dnl ===========================================================================
2322
cristyfbb0ef02010-12-19 02:32:11 +00002323# Disable LZMA (lzma library)
2324AC_ARG_WITH(lzma,
2325 [ --without-lzma disable LZMA support],
2326 [with_lzma=$withval],
2327 [with_lzma='yes'])
2328if test "$with_lzma" != 'yes' ; then
2329 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2330fi
2331
2332#
2333# Check for LZMA
2334#
2335have_lzma='no'
2336LZMA_LIBS=''
2337if test "$with_lzma" != 'no' || test "$with_tiff" != 'no'; then
2338 AC_MSG_RESULT([-------------------------------------------------------------])
2339 AC_MSG_CHECKING(for LZMA)
2340 AC_MSG_RESULT()
2341 failed=0
2342 passed=0
2343 AC_CHECK_HEADER(lzma.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2344 AC_CHECK_LIB(lzma,lzma_code,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2345 AC_MSG_CHECKING(if LZMA package is complete)
2346 if test $passed -gt 0; then
2347 if test $failed -gt 0; then
2348 AC_MSG_RESULT(no -- some components failed test)
2349 have_lzma='no (failed tests)'
2350 else
2351 LZMA_LIBS='-llzma'
2352 LIBS="$LZMA_LIBS $LIBS"
2353 AC_DEFINE(LZMA_DELEGATE,1,Define if you have lzma compression library)
2354 AC_MSG_RESULT(yes)
2355 have_lzma='yes'
2356 fi
2357 else
2358 AC_MSG_RESULT(no)
2359 fi
2360fi
2361AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
2362AC_SUBST(LZMA_LIBS)
2363
2364dnl ===========================================================================
2365
cristy3ed852e2009-09-05 21:47:34 +00002366#
2367# Check for the OpenEXR delegate library.
2368#
2369AC_ARG_WITH([openexr],
2370 [AC_HELP_STRING([--without-openexr],
2371 [disable OpenEXR support])],
2372 [with_openexr=$withval],
2373 [with_openexr='yes'])
2374
2375if test "$with_openexr" != 'yes'; then
2376 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2377fi
2378
2379have_openexr='no'
2380OPENEXR_CFLAGS=""
2381OPENEXR_LIBS=""
2382OPENEXR_PKG=""
2383if test "x$with_openexr" = "xyes"; then
2384 AC_MSG_RESULT([-------------------------------------------------------------])
2385 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2386 AC_MSG_RESULT([])
2387fi
2388
2389if test "$have_openexr" = 'yes'; then
2390 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2391 if test "$with_modules" = 'no'; then
2392 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
2393 fi
2394fi
2395
2396AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2397AC_SUBST(OPENEXR_CFLAGS)
2398AC_SUBST(OPENEXR_LIBS)
2399
2400dnl ===========================================================================
2401
2402#
2403# Check for PNG delegate library.
2404#
2405AC_ARG_WITH(png,
2406 [AC_HELP_STRING([--without-png],
2407 [disable PNG support])],
2408 [with_png=$withval],
2409 [with_png='yes'])
2410
2411if test "$with_png" != 'yes'; then
2412 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2413fi
2414
2415have_png='no'
2416PNG_LIBS=''
cristy64877302011-08-23 19:10:31 +00002417
cristy50d3f5c2011-09-10 20:09:06 +00002418if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then
cristy64877302011-08-23 19:10:31 +00002419 AC_MSG_RESULT([-------------------------------------------------------------])
2420 AC_MSG_CHECKING(for PNG support )
2421 AC_MSG_RESULT()
2422 failed=0
2423 passed=0
glennrp84cc1bd2011-08-24 14:01:52 +00002424 AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`,
2425 failed=`expr $failed + 1`,)
cristy64877302011-08-23 19:10:31 +00002426
2427 if test $passed -gt 0; then
2428 for var in 5 4 2 '' ; do
cristy64877302011-08-23 19:10:31 +00002429 if test "$have_png" == 'no' ; then
cristy50d3f5c2011-09-10 20:09:06 +00002430 if test "x${var}" == 'x' ; then
2431 pnglib='png'
2432 else
2433 pnglib="png1${var}"
2434 fi
cristy64877302011-08-23 19:10:31 +00002435
2436# Test for compatible LIBPNG library
2437 failed=0
2438 passed=0
2439 if test "$with_png" == 'yes' -o "$with_png" == "libpng1${var}" ; then
2440 if test "${pnglib}" != 'png' ; then
2441 AC_MSG_CHECKING(for LIBPNG1${var} support )
2442 AC_TRY_COMPILE(
2443#include <stdio.h>
2444#include <stdlib.h>
2445#include <png.h>
2446,
2447changequote(<<, >>)dnl
2448<<
2449#if PNG_LIBPNG_VER_MINOR != ${var}
2450#error LIBPNG library must be version 1${var}!
2451Kaboom, Kaboom
2452#endif
2453return 0;
2454>>,
2455 changequote([, ])dnl
2456 ac_cv_libpng_ok='yes',
2457 ac_cv_libpng_ok='no')
2458 if test "$ac_cv_libpng_ok" = 'yes' ; then
2459 passed=`expr $passed + 1`
2460 AC_MSG_RESULT(yes)
2461 else
2462 failed=`expr $failed + 1`
2463 AC_MSG_RESULT(no)
2464 fi
2465 else
2466 passed=`expr $passed + 1`
2467 AC_MSG_RESULT(yes)
2468 fi
cristy3ed852e2009-09-05 21:47:34 +00002469 fi
cristy64877302011-08-23 19:10:31 +00002470
cristy8be61c22011-08-24 18:35:43 +00002471 if test $passed -gt 0 -a $failed -le 0; then
cristy64877302011-08-23 19:10:31 +00002472 if test "1${var}" = '15' ; then
2473 AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`,
2474 failed=`expr $failed + 1`,)
2475 AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`,
2476 failed=`expr $failed + 1`,)
2477 fi
2478 if test "1${var}" = '14' ; then
2479 AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`,
2480 failed=`expr $failed + 1`,)
2481 AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`,
2482 failed=`expr $failed + 1`,)
2483 fi
2484 if test "1${var}" = '12' ; then
2485 AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`,
2486 failed=`expr $failed + 1`,)
2487 fi
2488 if test "1${var}" = '1' ; then
2489 AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`,
2490 failed=`expr $failed + 1`,)
2491 fi
2492 if test $passed -gt 0 -a $failed -le 0 ; then
2493 AC_MSG_CHECKING(if ${pnglib} package is complete)
2494 if test $passed -gt 0 ; then
2495 if test $failed -gt 0 ; then
cristy50d3f5c2011-09-10 20:09:06 +00002496 AC_MSG_RESULT(no -- some components failed test)
2497 have_png='no (failed tests)'
cristy64877302011-08-23 19:10:31 +00002498 else
cristy50d3f5c2011-09-10 20:09:06 +00002499 PNG_LIBS="-l${pnglib}"
2500 LIBS="$PNG_LIBS $LIBS"
2501 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2502 AC_MSG_RESULT(yes)
2503 have_png='yes'
cristy64877302011-08-23 19:10:31 +00002504 fi
2505 fi
2506 fi
2507 fi
2508 fi
2509 done
2510 fi
cristy3ed852e2009-09-05 21:47:34 +00002511fi
cristy64877302011-08-23 19:10:31 +00002512
cristy3ed852e2009-09-05 21:47:34 +00002513AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes')
2514AC_SUBST(PNG_LIBS)
cristy50d3f5c2011-09-10 20:09:06 +00002515
cristy3ed852e2009-09-05 21:47:34 +00002516
2517dnl ===========================================================================
2518
2519#
2520# Check for RSVG delegate library.
2521#
2522AC_ARG_WITH([rsvg],
2523 [AC_HELP_STRING([--without-rsvg],
2524 [disable RSVG support])],
2525 [with_rsvg=$withval],
2526 [with_rsvg=$have_x])
2527
2528if test "$with_rsvg" != 'yes'; then
2529 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2530fi
2531
2532have_rsvg='no'
2533have_cairo='no'
2534RSVG_CFLAGS=""
2535RSVG_LIBS=""
2536RSVG_PKG=""
2537if test "x$with_rsvg" = "xyes"; then
2538 AC_MSG_RESULT([-------------------------------------------------------------])
2539 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2540 AC_MSG_RESULT([])
2541 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2542 AC_MSG_RESULT([])
2543fi
2544
2545if test "$have_rsvg" = 'yes'; then
2546 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2547 if test "$with_modules" = 'no'; then
2548 CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS"
2549 fi
2550fi
2551
2552if test "$have_cairo" = 'yes'; then
2553 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2554 if test "$with_modules" = 'no'; then
2555 CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS"
2556 fi
2557fi
2558
2559AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2560AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2561AC_SUBST(RSVG_CFLAGS)
2562AC_SUBST(RSVG_LIBS)
2563
2564dnl ===========================================================================
2565
2566#
2567# Check for TIFF delegate library.
2568#
2569AC_ARG_WITH([tiff],
2570 [AC_HELP_STRING([--without-tiff],
2571 [disable TIFF support])],
2572 [with_tiff=$withval],
2573 [with_tiff='yes'])
2574
2575if test "$with_tiff" != 'yes'; then
2576 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2577fi
2578
2579have_tiff='no'
2580TIFF_LIBS=''
2581if test "$with_tiff" != 'no'; then
2582 AC_MSG_RESULT([-------------------------------------------------------------])
2583 AC_MSG_CHECKING([for TIFF])
2584 AC_MSG_RESULT([])
2585 failed=0
2586 passed=0
2587 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2588 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2589 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2590 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
cristyb97f1002010-07-26 14:02:57 +00002591 AC_CHECK_LIB(tiff,TIFFIsBigEndian,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
cristy3ed852e2009-09-05 21:47:34 +00002592 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2593 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2594 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2595 AC_MSG_CHECKING([if TIFF package is complete])
2596 if test $passed -gt 0; then
2597 if test $failed -gt 0; then
2598 AC_MSG_RESULT([no -- some components failed test])
2599 have_tiff='no (failed tests)'
2600 else
2601 TIFF_LIBS='-ltiff'
2602 LIBS="$TIFF_LIBS $LIBS"
2603 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
2604 AC_MSG_RESULT([yes])
2605 have_tiff='yes'
2606 AC_CHECK_HEADERS(tiffconf.h)
2607 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
2608 TIFFReadEXIFDirectory TIFFSetErrorHandlerExt TIFFSetTagExtender \
2609 TIFFSetWarningHandlerExt TIFFSwabArrayOfTriples])
2610 fi
2611 else
2612 AC_MSG_RESULT([no])
2613 fi
2614fi
2615AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2616AC_SUBST(TIFF_LIBS)
2617
2618dnl ===========================================================================
2619
2620#
cristyb1860752011-03-14 00:27:46 +00002621# Check for WEBP delegate library.
2622#
2623AC_ARG_WITH(webp,
2624 [AC_HELP_STRING([--without-webp],
2625 [disable WEBP support])],
2626 [with_webp=$withval],
2627 [with_webp='yes'])
2628
2629if test "$with_webp" != 'yes'; then
2630 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2631fi
2632
2633have_webp='no'
2634WEBP_LIBS=''
2635if test "$with_webp" != 'no'; then
2636 AC_MSG_RESULT([-------------------------------------------------------------])
2637 AC_MSG_CHECKING([for WEBP])
2638 AC_MSG_RESULT([])
2639 failed=0
2640 passed=0
2641 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2642 AC_CHECK_LIB(webp,WebPDecodeRGB,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2643 AC_MSG_CHECKING([if WEBP package is complete])
2644 if test $passed -gt 0; then
2645 if test $failed -gt 0; then
2646 AC_MSG_RESULT([no -- some components failed test])
2647 have_webp='no (failed tests)'
2648 else
2649 WEBP_LIBS='-lwebp'
2650 LIBS="$WEBP_LIBS $LIBS"
2651 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
2652 AC_MSG_RESULT([yes])
2653 have_webp='yes'
2654 fi
2655 else
2656 AC_MSG_RESULT([no])
2657 fi
2658fi
2659AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2660AC_SUBST(WEBP_LIBS)
2661
2662dnl ===========================================================================
2663
2664#
cristy3ed852e2009-09-05 21:47:34 +00002665# Set Windows font directory.
2666#
2667AC_ARG_WITH(windows-font-dir,
2668 [AC_HELP_STRING([--with-windows-font-dir=DIR],
2669 [directory containing MS-Windows fonts])],
2670 [with_windows_font_dir=$withval],
2671 [with_windows_font_dir=''])
2672if test "$with_windows_font_dir" != '' ; then
2673 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2674fi
2675
2676dnl ===========================================================================
2677
2678#
2679# Check for WMF delegate library.
2680#
2681AC_ARG_WITH([wmf],
2682 [AC_HELP_STRING([--without-wmf],
2683 [disable WMF support])],
2684 [with_wmf=$withval],
cristy8d63d1d2010-01-06 20:38:37 +00002685 [with_wmf='yes'])
cristy3ed852e2009-09-05 21:47:34 +00002686
2687if test "$with_wmf" != 'yes'; then
2688 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2689fi
2690
2691have_wmf='no'
2692WMF_LIBS=''
cristy3ed852e2009-09-05 21:47:34 +00002693if test "$with_wmf" != 'no'; then
glennrp84cc1bd2011-08-24 14:01:52 +00002694 AC_MSG_RESULT([-------------------------------------------------------------])
2695 AC_MSG_CHECKING([for WMF])
2696 AC_MSG_RESULT([])
2697 failed=0
2698 passed=0
2699 AC_CHECK_HEADER(libwmf/eps.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2700 AC_CHECK_LIB(wmf,wmf_eps_function,passed=`expr $passed + 1`,failed=`expr $failed + 1`,"-lwmflite")
2701 AC_MSG_CHECKING([if WMF package is complete])
2702 if test $passed -gt 0; then
2703 if test $failed -gt 0; then
2704 AC_MSG_RESULT([no -- some components failed test])
2705 have_wmf='no (failed tests)'
2706 else
2707 WMF_LIBS='-lwmf -lwmflite'
2708 LIBS="$WMF_LIBS $LIBS"
2709 AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
2710 AC_MSG_RESULT([yes])
2711 have_wmf='yes'
2712 fi
cristy3ed852e2009-09-05 21:47:34 +00002713 else
glennrp84cc1bd2011-08-24 14:01:52 +00002714 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00002715 fi
2716fi
glennrp84cc1bd2011-08-24 14:01:52 +00002717AM_CONDITIONAL(WMF_DELEGATE,test "$have_wmf" = 'yes')
cristy3ed852e2009-09-05 21:47:34 +00002718AC_SUBST(WMF_LIBS)
cristy735e8942010-04-02 20:32:57 +00002719
2720dnl ===========================================================================
2721
cristy3ed852e2009-09-05 21:47:34 +00002722
2723dnl ===========================================================================
2724
2725#
2726# Check for XML delegate library.
2727#
2728AC_ARG_WITH([xml],
2729 [AC_HELP_STRING([--without-xml],
2730 [disable XML support])],
2731 [with_xml=$withval],
2732 [with_xml=$have_x])
2733
2734if test "$with_xml" != 'yes' ; then
2735 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2736fi
2737
2738have_xml='no'
2739XML_LIBS=''
2740if test "$with_xml" != 'no'; then
2741 AC_MSG_RESULT([-------------------------------------------------------------])
2742 AC_MSG_CHECKING([for XML])
2743 AC_MSG_RESULT([])
2744 PERSIST_LDFLAGS=$LDFLAGS
2745 PERSIST_CPPFLAGS=$CPPFLAGS
2746 xml2_config=''
2747 AC_CHECK_PROGS(xml2_config,xml2-config,)dnl
2748 if test -n "$xml2_config"; then
2749 # Debian installs libxml headers under /usr/include/libxml2/libxml with
2750 # the shared library installed under /usr/lib, whereas the package
2751 # installs itself under $prefix/libxml and $prefix/lib.
2752 xml2_prefix=`xml2-config --prefix`
2753 if test -d "${xml2_prefix}/include/libxml2"; then
2754 CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2"
2755 fi
2756 if test "${xml2_prefix}" != '/usr'; then
2757 LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib"
2758 fi
2759 fi
2760 failed=0
2761 passed=0
2762 AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2763 AC_CHECK_LIB(xml2,xmlParseExternalEntity,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2764 AC_MSG_CHECKING([if XML package is complete])
2765 if test $passed -gt 0; then
2766 if test $failed -gt 0; then
2767 AC_MSG_RESULT([no -- some components failed test])
2768 have_xml='no (failed tests)'
2769 LDFLAGS="$PERSIST_LDFLAGS"
2770 CPPFLAGS="$PERSIST_CPPFLAGS"
2771 else
2772 XML_LIBS='-lxml2'
2773 LIBS="$XML_LIBS $LIBS"
2774 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2775 AC_MSG_RESULT([yes])
2776 have_xml='yes'
2777 fi
2778 else
2779 AC_MSG_RESULT([no])
2780 fi
2781fi
2782AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes')
2783AC_SUBST(XML_LIBS)
2784
2785dnl ===========================================================================
2786
2787# Substitute compiler name to build/link PerlMagick
2788#
2789AC_SUBST(PERLMAINCC)
2790
2791#
2792# Configure install Paths
2793#
2794
2795# Subdirectory under lib to place ImageMagick lib files
2796LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
2797AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",Subdirectory of lib where ImageMagick architecture dependent files are installed)
2798
2799# Path to ImageMagick bin directory
2800EXECUTABLE_PATH="${BIN_DIR}"
2801DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2802case "${build_os}" in
2803 mingw* )
2804 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2805 ;;
2806esac
2807AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",Directory where executables are installed.)
2808AC_SUBST(EXECUTABLE_PATH)
2809
2810# Path to ImageMagick lib
2811LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2812DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2813case "${build_os}" in
2814 mingw* )
2815 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2816 ;;
2817esac
2818AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",Directory where architecture-dependent files live.)
2819AC_SUBST(LIBRARY_PATH)
2820
cristy3ed852e2009-09-05 21:47:34 +00002821#
2822# Subdirectory under lib to place ImageMagick coder module files
2823CODER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/coders"
2824AC_DEFINE_UNQUOTED(CODER_RELATIVE_PATH,"$CODER_RELATIVE_PATH",Subdirectory of lib where coder modules are installed)
2825CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}"
2826DEFINE_CODER_PATH="${LIB_DIR}/${CODER_RELATIVE_PATH}/"
2827case "${build_os}" in
2828 mingw* )
2829 DEFINE_CODER_PATH=`$WinPathScript "$DEFINE_CODER_PATH" 1`
2830 ;;
2831esac
2832AC_DEFINE_UNQUOTED(CODER_PATH,"$DEFINE_CODER_PATH",Location of coder modules)
2833AC_SUBST(CODER_PATH)
2834
2835#
2836# Subdirectory under lib to place ImageMagick filter module files
2837FILTER_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}/modules-Q${QUANTUM_DEPTH}/filters"
2838AC_DEFINE_UNQUOTED(FILTER_RELATIVE_PATH,"$FILTER_RELATIVE_PATH",Subdirectory of lib where filter modules are installed)
2839FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}"
2840DEFINE_FILTER_PATH="${LIB_DIR}/${FILTER_RELATIVE_PATH}/"
2841case "${build_os}" in
2842 mingw* )
2843 DEFINE_FILTER_PATH=`$WinPathScript "$DEFINE_FILTER_PATH" 1`
2844 ;;
2845esac
2846AC_DEFINE_UNQUOTED(FILTER_PATH,"$DEFINE_FILTER_PATH",Location of filter modules)
2847AC_SUBST(FILTER_PATH)
2848
2849#
2850# Path to ImageMagick documentation files
cristyd55889c2011-03-27 00:50:24 +00002851DOCUMENTATION_RELATIVE_PATH=""
2852DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
2853DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
cristy3ed852e2009-09-05 21:47:34 +00002854case "${build_os}" in
2855 mingw* )
2856 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
2857 ;;
2858esac
2859AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",Directory where ImageMagick documents live.)
2860AC_SUBST(DOCUMENTATION_PATH)
2861
cristy3cf8a722011-03-20 23:32:22 +00002862# Subdirectory to place ImageMagick configuration files
cristyba0f1972011-03-28 12:42:52 +00002863CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
cristy29b1f6f2011-03-27 14:02:38 +00002864AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",Subdirectory of lib where architecture-dependent configuration files live.)
2865CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2866DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2867case "${build_os}" in
2868 mingw* )
2869 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
2870 ;;
2871esac
2872AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",Directory where architecture-dependent configuration files live.)
2873AC_SUBST(CONFIGURE_PATH)
2874
2875# Subdirectory to place ImageMagick configuration files
cristy4f820712011-04-01 12:35:43 +00002876SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
2877AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
2878SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
2879DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
cristy3ed852e2009-09-05 21:47:34 +00002880case "${build_os}" in
2881 mingw* )
cristy4f820712011-04-01 12:35:43 +00002882 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
cristy3ed852e2009-09-05 21:47:34 +00002883 ;;
2884esac
cristy4f820712011-04-01 12:35:43 +00002885AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",Directory where architecture-independent configuration files live.)
2886AC_SUBST(SHARE_PATH)
cristy3ed852e2009-09-05 21:47:34 +00002887
2888#
2889# program_transform_name is formed for use in a Makefile, so create a
2890# modified version for use in a shell script.
2891configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
2892
2893# Default delegate definitions
2894AC_MSG_RESULT([-------------------------------------------------------------])
2895AC_MSG_CHECKING([for ImageMagick delegate programs])
2896AC_MSG_RESULT([])
2897AutotraceDecodeDelegateDefault='autotrace'
cristy3d7f8062009-09-24 20:45:35 +00002898BlenderDecodeDelegateDefault='blender'
cristy3ed852e2009-09-05 21:47:34 +00002899BZIPDelegateDefault='bzip2'
2900BrowseDelegateDefault='xdg-open'
2901CGMDecodeDelegateDefault='ralcgm'
2902CatDelegateDefault='cat'
2903DNGDecodeDelegateDefault='ufraw-batch'
2904GVCDecodeDelegateDefault='dot'
2905DVIDecodeDelegateDefault='dvips'
2906EchoDelegateDefault='echo'
2907EditorDelegateDefault='xterm'
2908FIGDecodeDelegateDefault='fig2dev'
2909ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}`
2910DisplayDelegateDefault=`echo display | sed ${configure_transform_name}`
2911MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}`
2912GnuplotDecodeDelegateDefault='gnuplot'
cristy3ed852e2009-09-05 21:47:34 +00002913HPGLDecodeDelegateDefault='hp2xx'
2914HTMLDecodeDelegateDefault='html2ps'
2915ILBMDecodeDelegateDefault='ilbmtoppm'
2916ILBMEncodeDelegateDefault='ppmtoilbm'
2917LPDelegateDefault='lp'
2918LPRDelegateDefault='lpr'
2919LZWDecodeDelegateDefault='uncompress'
2920LZWEncodeDelegateDefault='compress'
2921LaunchDelegateDefault='gimp'
2922MANDelegateDefault='groff'
2923MPEGDecodeDelegateDefault='ffmpeg'
2924MPEGEncodeDelegateDefault='ffmpeg'
cristy935c86e2010-06-05 23:50:07 +00002925MrSIDDecodeDelegateDefault='mrsidgeodecode'
cristy3ed852e2009-09-05 21:47:34 +00002926MVDelegateDefault='mv'
2927PCLDelegateDefault='pcl6'
2928PGPDecodeDelegateDefault='pgpv'
2929POVDelegateDefault='povray'
2930if test "$native_win32_build" = 'yes'; then
2931 PSDelegateDefault='gswin32c'
cristyb7931f12009-09-25 10:22:21 +00002932elif test "$gslib_framework" = 'yes'; then
cristy3ed852e2009-09-05 21:47:34 +00002933 PSDelegateDefault='gsc'
2934else
2935 PSDelegateDefault='gs'
2936fi
2937RLEEncodeDelegateDefault='rawtorle'
2938RMDelegateDefault='rm'
cristy4689cf02010-02-17 21:15:45 +00002939RSVGDecodeDelegateDefault='rsvg'
cristy3ed852e2009-09-05 21:47:34 +00002940SCANDecodeDelegateDefault='scanimage'
2941TXTDelegateDefault='enscript'
cristy16db5ed2010-07-29 13:32:02 +00002942UniconvertorDelegateDefault='uniconvertor'
cristy3ed852e2009-09-05 21:47:34 +00002943WMFDecodeDelegateDefault='wmf2eps'
2944WWWDecodeDelegateDefault='curl'
2945XPSDelegateDefault='gxps'
2946ZipDelegateDefault='gzip'
2947
2948# Search for delegates
2949AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00002950AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
2951AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault")
2952AC_PATH_PROG(BrowseDelegate, "$BrowseDelegateDefault" mozilla firefox netscape, "$BrowseDelegateDefault")
2953AC_PATH_PROG(CGMDecodeDelegate, "$CGMDecodeDelegateDefault", "$CGMDecodeDelegateDefault")
2954AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault")
2955AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
2956AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
2957AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
2958AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault")
2959AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
2960AC_PATH_PROG(FIGDecodeDelegate, "$FIGDecodeDelegateDefault", "$FIGDecodeDelegateDefault")
2961AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
2962AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
2963AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
2964AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00002965AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
2966AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
2967AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
2968AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
2969AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
2970AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
2971AC_PATH_PROG(LZWDecodeDelegate, "$LZWDecodeDelegateDefault", "$LZWDecodeDelegateDefault")
2972AC_PATH_PROG(LZWEncodeDelegate, "$LZWEncodeDelegateDefault", "$LZWEncodeDelegateDefault")
2973AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
2974AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
2975AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
2976AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
cristy935c86e2010-06-05 23:50:07 +00002977AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00002978AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
2979AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
2980AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
2981AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault")
2982AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
2983AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault")
2984AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
cristy4689cf02010-02-17 21:15:45 +00002985AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00002986AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
2987AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
cristy5ac9ac82010-07-29 13:24:24 +00002988AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00002989AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
2990AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
2991AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
2992AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault")
2993
2994# Prefer lpr to lp; lp needs options tacked on.
2995if test "$LPRDelegate" != no; then
2996 PrintDelegate="$LPRDelegate"
2997else
2998 PrintDelegate="$LPDelegate -c -s"
2999fi
3000AC_SUBST(PrintDelegate)
3001
3002# Installed ImageMagick utiltity paths
3003ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3004DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3005MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3006
3007# Set delegate booleans
3008have_ffmpeg='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_ffmpeg='yes'; fi
3009have_fig2dev='no' ; if test "$FIGDecodeDelegate" != "$FIGDecodeDelegateDefault" ; then have_fig2dev='yes'; fi
3010have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3011have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3012have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
cristy935c86e2010-06-05 23:50:07 +00003013have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
cristy3ed852e2009-09-05 21:47:34 +00003014have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3015have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
cristy3ed852e2009-09-05 21:47:34 +00003016have_ralcgm='no' ; if test "$CGMDecodeDelegate" != "$CGMDecodeDelegateDefault" ; then have_ralcgm='yes'; fi
3017have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3018
3019#
3020# Test for font directories
3021#
3022type_include_files=''
3023
cristy430a7312010-01-21 20:44:04 +00003024# Dejavu fonts.
3025AC_MSG_CHECKING(for Dejavu fonts directory)
3026dejavu_font_dir=''
3027if test "${with_dejavu_font_dir}" != 'default'; then
3028 dejavu_font_dir="${with_dejavu_font_dir}/"
3029else
3030 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3031 if test -f "${font_dir}DejaVuSerif.ttf"; then
3032 dejavu_font_dir="${font_dir}"
3033 break 1
3034 fi
3035 done
3036fi
3037if test "${dejavu_font_dir}x" != 'x'; then
3038 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
3039 AC_MSG_RESULT([$dejavu_font_dir])
3040else
3041 AC_MSG_RESULT([not found!]);
3042fi
3043AC_SUBST(dejavu_font_dir)
3044
cristy3ed852e2009-09-05 21:47:34 +00003045# Windows
3046windows_font_dir=''
3047if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then
3048 windows_font_dir="${with_windows_font_dir}/"
3049fi
cristy430a7312010-01-21 20:44:04 +00003050if test "${windows_font_dir}x" != 'x'; then
cristy3ed852e2009-09-05 21:47:34 +00003051 if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then
3052 windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/'
3053 fi
3054 if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then
3055 windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/'
3056 fi
3057 if test -f '/usr/share/fonts/msttcore/arial.ttf'; then
3058 windows_font_dir='/usr/share/fonts/msttcore/truetype/'
3059 fi
3060fi
cristy430a7312010-01-21 20:44:04 +00003061if test "${windows_font_dir}x" != 'x'; then
cristy3ed852e2009-09-05 21:47:34 +00003062 type_include_files="$type_include_files "'<include file="type-windows.xml" />'
3063fi
3064AC_SUBST(windows_font_dir)
3065
3066# Ghostscript
3067AC_MSG_CHECKING(for Ghostscript fonts directory)
3068ghostscript_font_dir=''
3069if test "${with_gs_font_dir}" != 'default'; then
3070 ghostscript_font_dir="${with_gs_font_dir}/"
3071else
3072 if test "${native_win32_build}" = 'yes'; then
3073 # Native Windows Build
3074 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3075 if test -f "${font_dir}a010013l.pfb"; then
3076 ghostscript_font_dir="$font_dir"
3077 break 1
3078 fi
3079 done
3080 if test "${PSDelegate}" != 'gswin32c'; then
3081 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3082 fi
3083 else
3084 # Linux / Mac OS X / Unix Build
3085 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
3086 if test -f "${font_dir}a010013l.pfb"; then
3087 ghostscript_font_dir="${font_dir}"
3088 break 1
3089 fi
3090 done
3091 if test "${ghostscript_font_dir}x" = 'x'; then
3092 if test "$PSDelegate" != 'gs'; then
3093 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3094 fi
3095 fi
3096 fi
3097fi
3098if test "${ghostscript_font_dir}x" != 'x'; then
3099 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
3100 AC_MSG_RESULT([$ghostscript_font_dir])
3101else
3102 AC_MSG_RESULT([not found!]);
3103fi
3104AC_SUBST(ghostscript_font_dir)
3105case "${build_os}" in
3106 mingw* )
3107 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3108 ;;
3109esac
3110
3111AC_SUBST(type_include_files)
3112
3113#
3114# Handle case where user doesn't want frozen paths
3115#
3116if test "$with_frozenpaths" != 'yes'; then
3117 # Re-set delegate definitions to default (no paths)
3118 AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003119 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
3120 BZIPDelegate="$BZIPDelegateDefault"
3121 BrowseDelegate="$BrowseDelegateDefault"
3122 CGMDecodeDelegate="$CGMDecodeDelegateDefault"
3123 CatDelegate="$CatDelegateDefault"
3124 ConvertDelegate="$ConvertDelegateDefault"
3125 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
3126 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
3127 EchoDelegate="$EchoDelegateDefault"
3128 EditorDelegate="$EditorDelegateDefault"
3129 FIGDecodeDelegate="$FIGDecodeDelegateDefault"
3130 GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault"
3131 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3132 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3133 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3134 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
3135 LPDelegate="$LPDelegateDefault"
3136 LZWDecodeDelegate="$LZWDecodeDelegateDefault"
3137 LZWEncodeDelegate="$LZWEncodeDelegateDefault"
3138 LaunchDelegate="$LaunchDelegateDefault"
3139 MANDelegate="$MANDelegateDefault"
3140 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3141 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003142 MogrifyDelegate="$MogrifyDelegateDefault"
cristy935c86e2010-06-05 23:50:07 +00003143 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
3144 MVDelegate="$MVDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003145 PCLDelegate="$PCLDelegateDefault"
3146 PGPDecodeDelegate="$PGPDecodeDelegateDefault"
3147 POVDelegate="$POVDelegateDefault"
3148 PSDelegate="$PSDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003149 RLEEncodeDelegate="$RLEEncodeDelegateDefault"
3150 RMDelegate="$RMDelegateDefault"
cristy4689cf02010-02-17 21:15:45 +00003151 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003152 SCANDecodeDelegate="$SCANDecodeDelegateDefault"
3153 ShowImageDelegate="$ShowImageDelegateDefault"
3154 TXTDelegate="$TXTDelegateDefault"
cristy5ac9ac82010-07-29 13:24:24 +00003155 UniconvertorDelegate="$UniconvertorDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003156 WMFDecodeDelegate="$WMFDecodeDelegateDefault"
3157 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
3158 XPSDelegate="$XPSDelegateDefault"
3159 ZipDelegate="$ZipDelegateDefault"
3160fi
3161
3162# Delegate substitutions
3163AC_SUBST(AutotraceDecodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003164AC_SUBST(BlenderDecodeDelegate)
3165AC_SUBST(BZIPDelegate)
3166AC_SUBST(BrowseDelegate)
3167AC_SUBST(CGMDecodeDelegate)
3168AC_SUBST(CatDelegate)
3169AC_SUBST(ConvertDelegate)
3170AC_SUBST(GVCDecodeDelegate)
3171AC_SUBST(DVIDecodeDelegate)
3172AC_SUBST(EchoDelegate)
3173AC_SUBST(EditorDelegate)
3174AC_SUBST(FIGDecodeDelegate)
3175AC_SUBST(GnuplotDecodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003176AC_SUBST(HPGLDecodeDelegate)
3177AC_SUBST(HTMLDecodeDelegate)
3178AC_SUBST(ILBMDecodeDelegate)
3179AC_SUBST(ILBMEncodeDelegate)
3180AC_SUBST(LPDelegate)
3181AC_SUBST(LZWDecodeDelegate)
3182AC_SUBST(LZWEncodeDelegate)
3183AC_SUBST(LaunchDelegate)
3184AC_SUBST(MANDelegate)
3185AC_SUBST(MPEGDecodeDelegate)
3186AC_SUBST(MPEGEncodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003187AC_SUBST(MogrifyDelegate)
cristy935c86e2010-06-05 23:50:07 +00003188AC_SUBST(MrSIDDecodeDelegate)
3189AC_SUBST(MVDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003190AC_SUBST(PCLDelegate)
3191AC_SUBST(PGPDecodeDelegate)
3192AC_SUBST(POVDelegate)
3193AC_SUBST(PSDelegate)
3194AC_SUBST(RLEEncodeDelegate)
3195AC_SUBST(RMDelegate)
3196AC_SUBST(SCANDecodeDelegate)
3197AC_SUBST(ShowImageDelegate)
3198AC_SUBST(TXTDelegate)
cristy5ac9ac82010-07-29 13:24:24 +00003199AC_SUBST(UniconvertorDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003200AC_SUBST(WMFDecodeDelegate)
3201AC_SUBST(WWWDecodeDelegate)
3202AC_SUBST(XPSDelegate)
3203AC_SUBST(ZipDelegate)
3204
3205#
3206# RPM support.
3207#
3208RPM=''
3209AC_CHECK_PROGS(TAR,gnutar gtar tar)
3210AC_CHECK_PROGS(PERL,perl)
3211AC_CHECK_PROGS(RPM,rpmbuild rpm)
3212AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3213AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3214AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3215AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3216AC_SUBST(RPM)
3217AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3218
3219#
3220# 7ZIP support (http://p7zip.sourceforge.net/)
3221#
3222P7ZIP=''
3223AC_CHECK_PROGS(P7ZIP,[7za])
3224AC_SUBST(P7ZIP)
3225AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3226
3227#
3228# ZIP support (http://www.info-zip.org/Zip.html)
3229#
3230ZIP=''
3231AC_CHECK_PROGS(ZIP,[zip])
3232AC_SUBST(ZIP)
3233AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3234
3235#
3236# GhostPCL related configuration.
3237#
3238PCLColorDevice=ppmraw
cristy8bc84082011-09-07 13:57:00 +00003239PCLCMYKDevice=pamcmyk32
cristy3ed852e2009-09-05 21:47:34 +00003240PCLMonoDevice=pbmraw
3241if test -z "$PCLVersion"; then
3242 PCLVersion='unknown'
3243fi
3244if test $have_pcl = 'yes'; then
3245 AC_MSG_RESULT([-------------------------------------------------------------])
3246 AC_MSG_CHECKING([for PCL])
3247 AC_MSG_RESULT([])
3248 # PCLColorDevice
3249 AC_MSG_CHECKING([for pcl color device])
3250 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3251 :
3252 else
3253 PCLColorDevice=ppmraw
3254 fi
3255 AC_MSG_RESULT([$PCLColorDevice])
3256
3257 # PCLCMYKDevice
3258 AC_MSG_CHECKING([for pcl CMYK device])
3259 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3260 :
3261 else
3262 PCLCMYKDevice=$PCLColorDevice
3263 fi
3264 AC_MSG_RESULT([$PCLCMYKDevice])
3265
3266 # PCLMonoDevice
3267 AC_MSG_CHECKING([for pcl mono device])
3268 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3269 :
3270 else
3271 PCLMonoDevice=$PCLColorDevice
3272 fi
3273 AC_MSG_RESULT([$PCLMonoDevice])
3274fi
3275
3276AC_SUBST(PCLMonoDevice)
3277AC_SUBST(PCLColorDevice)
3278AC_SUBST(PCLCMYKDevice)
3279AC_SUBST(PCLVersion)
3280
3281#
3282# GhostXPS related configuration.
3283#
3284XPSColorDevice=ppmraw
3285XPSCMYKDevice=bmpsep8
3286XPSMonoDevice=pbmraw
3287if test -z "$XPSVersion"; then
3288 XPSVersion='unknown'
3289fi
3290if test $have_xps = 'yes'; then
3291 AC_MSG_RESULT([-------------------------------------------------------------])
3292 AC_MSG_CHECKING([for XPS])
3293 AC_MSG_RESULT([])
3294 # XPSColorDevice
3295 AC_MSG_CHECKING([for xps color device])
3296 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3297 :
3298 else
3299 XPSColorDevice=ppmraw
3300 fi
3301 AC_MSG_RESULT([$XPSColorDevice])
3302
3303 # XPSCMYKDevice
3304 AC_MSG_CHECKING([for xps CMYK device])
3305 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3306 :
3307 else
3308 XPSCMYKDevice=$XPSColorDevice
3309 fi
3310 AC_MSG_RESULT([$XPSCMYKDevice])
3311
3312 # XPSMonoDevice
3313 AC_MSG_CHECKING([for xps mono device])
3314 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3315 :
3316 else
3317 XPSMonoDevice=$XPSColorDevice
3318 fi
3319 AC_MSG_RESULT([$XPSMonoDevice])
3320fi
3321
3322AC_SUBST(XPSMonoDevice)
3323AC_SUBST(XPSColorDevice)
3324AC_SUBST(XPSCMYKDevice)
3325AC_SUBST(XPSVersion)
3326
3327#
3328# Ghostscript related configuration.
3329#
cristya97426c2011-02-04 01:41:27 +00003330GSAlphaDevice=pngalpha
cristy3ed852e2009-09-05 21:47:34 +00003331GSColorDevice=pnmraw
3332GSCMYKDevice=pam
3333GSMonoDevice=pbmraw
3334GSPDFDevice=pdfwrite
3335GSPSDevice=pswrite
3336GSEPSDevice=epswrite
3337GSVersion='unknown'
3338if test $have_gs = 'yes'; then
3339 AC_MSG_RESULT([-------------------------------------------------------------])
3340 AC_MSG_CHECKING([for Ghostscript])
3341 AC_MSG_RESULT([])
3342 AC_MSG_CHECKING([for Ghostscript version])
3343 if GSVersion=`$PSDelegate --version`; then
3344 :
3345 else
3346 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3347 fi
3348 AC_MSG_RESULT([$GSVersion])
3349
3350 # GSAlphaDevice
3351 AC_MSG_CHECKING([for gs alpha device])
3352 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3353 :
3354 else
3355 GSAlphaDevice=pnmraw
3356 fi
3357 AC_MSG_RESULT([$GSAlphaDevice])
3358
3359 # GSColorDevice
3360 AC_MSG_CHECKING([for gs color device])
3361 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3362 :
3363 else
3364 GSColorDevice=pnmraw
3365 fi
3366 AC_MSG_RESULT([$GSColorDevice])
3367
3368 # GSCMYKDevice
3369 AC_MSG_CHECKING([for gs CMYK device])
3370 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3371 :
3372 else
3373 GSCMYKDevice=bmpsep8
3374 fi
3375 AC_MSG_RESULT([$GSCMYKDevice])
3376
3377 # GSMonoDevice
3378 AC_MSG_CHECKING([for gs mono device])
3379 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3380 :
3381 else
3382 GSMonoDevice=$GSColorDevice
3383 fi
3384 AC_MSG_RESULT([$GSMonoDevice])
3385
3386 # GSPDFDevice
3387 AC_MSG_CHECKING([for gs PDF writing device])
3388 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3389 :
3390 else
3391 GSPDFDevice=nodevice
3392 fi
3393 AC_MSG_RESULT([$GSPDFDevice])
3394
3395 # GSPSDevice
3396 AC_MSG_CHECKING([for gs PS writing device])
3397 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3398 :
3399 else
3400 GSPSDevice=nodevice
3401 fi
3402 AC_MSG_RESULT([$GSPSDevice])
3403
3404 # GSEPSDevice
3405 AC_MSG_CHECKING([for gs EPS writing device])
3406 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then
3407 :
3408 else
3409 GSEPSDevice=nodevice
3410 fi
3411 AC_MSG_RESULT([$GSEPSDevice])
3412fi
3413
3414AC_SUBST(GSAlphaDevice)
3415AC_SUBST(GSCMYKDevice)
3416AC_SUBST(GSColorDevice)
3417AC_SUBST(GSEPSDevice)
3418AC_SUBST(GSMonoDevice)
3419AC_SUBST(GSPDFDevice)
3420AC_SUBST(GSPSDevice)
3421AC_SUBST(GSVersion)
3422
3423#
3424# PerlMagick-related configuration
3425#
3426
3427# Look for PERL if PerlMagick requested
3428# If name/path of desired PERL interpreter is specified, look for that one first
3429have_perl='no'
3430if test "$with_perl" != 'no'; then
3431 AC_MSG_RESULT([-------------------------------------------------------------])
3432 AC_MSG_CHECKING([for Perl])
3433 AC_MSG_RESULT([])
3434 if test "$with_perl" != 'yes'; then
3435 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3436 PERL=$ac_cv_path_PERL
3437 AC_SUBST(PERL)dnl
3438 have_perl="$ac_cv_path_PERL"
3439 else
3440 AC_PATH_PROGS(PERL,perl perl5,)dnl
3441 if test "$ac_cv_path_PERL"; then
3442 have_perl="$ac_cv_path_PERL"
3443 fi
3444 fi
3445fi
3446
cristy949301e2010-01-06 01:38:40 +00003447if test "$with_perl" != 'yes' ; then
3448 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3449fi
3450
3451PERL_SUPPORTS_DESTDIR='no'
3452
cristy3ed852e2009-09-05 21:47:34 +00003453with_perl_static='no'
3454with_perl_dynamic='no'
3455if test "$have_perl" != 'no'; then
3456 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3457 with_perl_static='yes'
3458 fi
3459 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3460 with_perl_dynamic='yes'
3461 fi
3462 # Is PERL's MakeMaker new enough to support DESTDIR?
cristy964cb7f2010-04-25 23:18:00 +00003463 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
cristy3ed852e2009-09-05 21:47:34 +00003464fi
3465AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3466AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3467AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3468AC_SUBST(PERL_SUPPORTS_DESTDIR)
3469
3470# Determine path to pick up MagickCore library from for use with building PerlMagick
3471MAGICKCORE_PATH="${LIB_DIR}"
3472if test $with_perl_static = 'yes'; then
3473 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3474 libtool_objdir=$objdir
3475
3476 # Linker search path to library, followed by -lMagickCore
cristy4c08aed2011-07-01 19:47:50 +00003477 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
cristy3ed852e2009-09-05 21:47:34 +00003478fi
3479AC_SUBST(MAGICKCORE_PATH)
3480
3481# Create a simple string containing format names for all delegate libraries
3482DELEGATES=''
3483if test "$have_autotrace" = 'yes'; then DELEGATES="$DELEGATES autotrace"; fi
3484if test "$have_bzlib" = 'yes'; then DELEGATES="$DELEGATES bzlib"; fi
3485if test "$have_djvu" = 'yes'; then DELEGATES="$DELEGATES djvu"; fi
3486if test "$have_dps" = 'yes'; then DELEGATES="$DELEGATES dps"; fi
3487if test "$have_fftw" = 'yes'; then DELEGATES="$DELEGATES fftw"; fi
3488if test "$have_fpx" = 'yes'; then DELEGATES="$DELEGATES fpx"; fi
3489if test "$have_fontconfig" = 'yes'; then DELEGATES="$DELEGATES fontconfig"; fi
3490if test "$have_freetype" = 'yes'; then DELEGATES="$DELEGATES freetype"; fi
3491if test "$have_gslib" = 'yes'; then DELEGATES="$DELEGATES gs"; fi
3492if test "$have_gvc" = 'yes'; then DELEGATES="$DELEGATES gvc"; fi
3493if test "$have_jbig" = 'yes'; then DELEGATES="$DELEGATES jbig"; fi
3494if test "$have_jpeg" = 'yes'; then
3495 DELEGATES="$DELEGATES jpeg";
3496 if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi
3497fi
3498if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi
cristy71203402010-06-18 13:12:03 +00003499if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi
cristy3ed852e2009-09-05 21:47:34 +00003500if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi
3501if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi
cristyfbb0ef02010-12-19 02:32:11 +00003502if test "$have_lzma" = 'yes'; then DELEGATES="$DELEGATES lzma"; fi
cristy3ed852e2009-09-05 21:47:34 +00003503if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi
3504if test "$have_openexr" = 'yes'; then DELEGATES="$DELEGATES openexr"; fi
3505if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES png"; fi
3506if test "$have_rsvg" = 'yes'; then DELEGATES="$DELEGATES rsvg"; fi
3507if test "$have_tiff" = 'yes'; then DELEGATES="$DELEGATES tiff"; fi
3508if test "$have_x" = 'yes'; then DELEGATES="$DELEGATES x11"; fi
3509if test "$have_xml" = 'yes'; then DELEGATES="$DELEGATES xml"; fi
3510if test "$have_wmf" = 'yes'; then DELEGATES="$DELEGATES wmf"; fi
3511if test "$have_zlib" = 'yes'; then DELEGATES="$DELEGATES zlib"; fi
3512
3513AC_SUBST(DELEGATES)
3514
3515#
3516# Handle special compiler flags
3517#
3518
3519# Add '-p' if prof source profiling support enabled
3520if test "$enable_prof" = 'yes'; then
3521 CFLAGS="-p $CFLAGS"
3522 CXXFLAGS="-p $CXXFLAGS"
3523 LDFLAGS="-p $LDFLAGS"
3524fi
3525
3526# Add '-pg' if gprof source profiling support enabled
3527if test "$enable_gprof" = 'yes'; then
3528 CFLAGS="-pg $CFLAGS"
3529 CXXFLAGS="-pg $CXXFLAGS"
3530 LDFLAGS="-pg $LDFLAGS"
3531fi
3532
3533# Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3534# This is a gcc-specific feature
3535if test "$enable_gcov" = 'yes'; then
3536 AC_CHECK_LIB(gcov,_gcov_init)
3537 AC_CHECK_LIB(gcov,__gcov_init)
3538 case "$target_os" in
3539 darwin*)
3540 OSX_GCOV_LDFLAG="-Wl,-single_module"
3541 ;;
3542 *)
3543 OSX_GCOV_LDFLAG=""
3544 ;;
3545 esac
3546 AC_SUBST(OSX_GCOV_LDFLAG)
3547 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3548 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3549 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3550fi
3551
3552#
3553# Build library dependency list for libMagickCore
3554#
3555
3556MAGICK_LIBLTDL='' # Libltdl for build
3557MAGICK_API_LIBLTDL='' # libltdl for dependent application (API) build
3558MAGICK_LTDLDEPS='' # extra libltdl dependencies
3559if test "$with_ltdl" != 'no'
3560then
3561 if test \( "$with_included_ltdl" = 'no' -o "$enable_ltdl_convenience" = 'no' \) -o "$enable_ltdl_install" = 'yes'; then
3562 MAGICK_API_LIBLTDL='-lltdl'
3563 fi
3564 MAGICK_LIBLTDL=${LIBLTDL}
3565 MAGICK_LTDLDEPS=${LTDLDEPS}
3566fi
3567AC_SUBST(MAGICK_LIBLTDL)
3568AC_SUBST(MAGICK_LTDLDEPS)
3569
3570if test "$with_modules" != 'no'; then
cristyfbb0ef02010-12-19 02:32:11 +00003571 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"
cristy3ed852e2009-09-05 21:47:34 +00003572else
cristyb1860752011-03-14 00:27:46 +00003573 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 $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
cristy3ed852e2009-09-05 21:47:34 +00003574fi
3575AC_SUBST(MAGICK_DEP_LIBS)
3576
3577#
3578# Remove extraneous spaces from output variables (asthetic)
3579#
3580X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'`
3581X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'`
3582X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'`
3583X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'`
3584
3585CC=`echo $CC | sed -e 's/ */ /g'`
3586CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'`
3587CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'`
3588CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'`
3589DELEGATES=`echo $DELEGATES | sed -e 's/^ //g'`
3590DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'`
3591LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'`
3592TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3593MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
3594#LIBS=`echo $LIBS | sed -e 's/ */ /g'`
3595
3596# Pass only user-provided LIBS as "global" libraries
3597LIBS=$USER_LIBS
3598
3599#AC_SUBST(CPPFLAGS)
3600AC_SUBST(X_CFLAGS)
3601#AC_SUBST(LDFLAGS)
3602#AC_SUBST(X_PRE_LIBS)
3603#AC_SUBST(X_LIBS)
3604#AC_SUBST(X_EXTRA_LIBS)
3605
3606MAGICK_CFLAGS=$CFLAGS
3607MAGICK_CXXFLAGS="$CXXFLAGS"
3608MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3609MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3610MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
3611MAGICK_LIBS="-lMagickCore $MAGICK_DEP_LIBS $MAGICK_API_LIBLTDL"
3612
3613AC_SUBST(MAGICK_CFLAGS)
3614AC_SUBST(MAGICK_CXXFLAGS)
3615AC_SUBST(MAGICK_CPPFLAGS)
3616AC_SUBST(MAGICK_PCFLAGS)
3617AC_SUBST(MAGICK_LDFLAGS)
3618AC_SUBST(MAGICK_LIBS)
cristyfd9dcd42010-08-08 18:07:02 +00003619AC_SUBST(MAGICK_FEATURES)
cristy3ed852e2009-09-05 21:47:34 +00003620
3621# Set configured scripts to executable.
3622AC_CONFIG_COMMANDS([default],[],[])
cristy4c08aed2011-07-01 19:47:50 +00003623AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
cristy4c08aed2011-07-01 19:47:50 +00003624AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
cristy3ed852e2009-09-05 21:47:34 +00003625AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3626AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3627
3628AC_MSG_RESULT([-------------------------------------------------------------])
3629AC_MSG_RESULT([Update ImageMagick configuration])
3630AC_OUTPUT
3631
3632rm -f magick-version
3633
cristy430a7312010-01-21 20:44:04 +00003634result_dejavu_font_dir='none'
3635if test "${dejavu_font_dir}x" != 'x'; then
3636 result_dejavu_font_dir=$dejavu_font_dir
3637fi
3638
cristy3ed852e2009-09-05 21:47:34 +00003639result_ghostscript_font_dir='none'
3640if test "${ghostscript_font_dir}x" != 'x'; then
3641 result_ghostscript_font_dir=$ghostscript_font_dir
3642fi
3643
3644result_windows_font_dir='none'
3645if test "${windows_font_dir}x" != 'x'; then
3646 result_windows_font_dir=${windows_font_dir}
3647fi
3648
3649AC_MSG_RESULT([
3650ImageMagick is configured as follows. Please verify that this configuration
3651matches your expectations.
3652
3653Host system type: $host
3654Build system type: $build
3655
3656 Option Value
3657-------------------------------------------------------------------------------
3658Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3659Static libraries --enable-static=$enable_static $libtool_build_static_libs
3660Module support --with-modules=$with_modules $with_modules
3661GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3662Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3663High Dynamic Range Imagery
3664 --enable-hdri=$enable_hdri $enable_hdri
3665
3666Delegate Configuration:
3667BZLIB --with-bzlib=$with_bzlib $have_bzlib
3668Autotrace --with-autotrace=$with_autotrace $have_autotrace
cristy430a7312010-01-21 20:44:04 +00003669Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
cristy3ed852e2009-09-05 21:47:34 +00003670DJVU --with-djvu=$with_djvu $have_djvu
3671DPS --with-dps=$with_dps $have_dps
3672FFTW --with-fftw=$with_fftw $have_fftw
3673FlashPIX --with-fpx=$with_fpx $have_fpx
3674FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
3675FreeType --with-freetype=$with_freetype $have_freetype
3676GhostPCL None $PCLDelegate ($PCLVersion)
3677GhostXPS None $XPSDelegate ($XPSVersion)
3678Ghostscript None $PSDelegate ($GSVersion)
3679Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3680Ghostscript lib --with-gslib=$with_gslib $have_gslib
3681Graphviz --with-gvc=$with_gvc $have_gvc
3682JBIG --with-jbig=$with_jbig $have_jbig
3683JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
3684JPEG-2000 --with-jp2=$with_jp2 $have_jp2
cristy71203402010-06-18 13:12:03 +00003685LCMS v1 --with-lcms=$with_lcms $have_lcms
3686LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
cristy3ed852e2009-09-05 21:47:34 +00003687LQR --with-lqr=$with_lqr $have_lqr
cristyfbb0ef02010-12-19 02:32:11 +00003688LZMA --with-lzma=$with_lzma $have_lzma
cristy3ed852e2009-09-05 21:47:34 +00003689Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3690OpenEXR --with-openexr=$with_openexr $have_openexr
3691PERL --with-perl=$with_perl $have_perl
3692PNG --with-png=$with_png $have_png
3693RSVG --with-rsvg=$with_rsvg $have_rsvg
3694TIFF --with-tiff=$with_tiff $have_tiff
cristyb1860752011-03-14 00:27:46 +00003695WEBP --with-webp=$with_webp $have_webp
cristy3ed852e2009-09-05 21:47:34 +00003696Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
3697WMF --with-wmf=$with_wmf $have_wmf
3698X11 --with-x=$with_x $have_x
3699XML --with-xml=$with_xml $have_xml
3700ZLIB --with-zlib=$with_zlib $have_zlib
3701
3702X11 Configuration:
3703 X_CFLAGS = $X_CFLAGS
3704 X_PRE_LIBS = $X_PRE_LIBS
3705 X_LIBS = $X_LIBS
3706 X_EXTRA_LIBS = $X_EXTRA_LIBS
3707
3708Options used to compile and link:
3709 PREFIX = $PREFIX_DIR
3710 EXEC-PREFIX = $EXEC_PREFIX_DIR
3711 VERSION = $PACKAGE_VERSION
3712 CC = $CC
3713 CFLAGS = $CFLAGS
cristy3ed852e2009-09-05 21:47:34 +00003714 CPPFLAGS = $MAGICK_CPPFLAGS
3715 PCFLAGS = $MAGICK_PCFLAGS
3716 DEFS = $DEFS
3717 LDFLAGS = $LDFLAGS
3718 MAGICK_LDFLAGS = $MAGICK_LDFLAGS
3719 LIBS = $MAGICK_LIBS
3720 CXX = $CXX
3721 CXXFLAGS = $CXXFLAGS
cristyfd9dcd42010-08-08 18:07:02 +00003722 FEATURES = $MAGICK_FEATURES
cristy3ed852e2009-09-05 21:47:34 +00003723])