blob: a433322f6898dc4a5313065ea5d83b4f9866d1fa [file] [log] [blame]
Cristyf6ff9ea2016-12-05 09:53:35 -05001# Copyright 1999-2017 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#
Cristy64599592016-11-04 22:32:09 -04007# https://www.imagemagick.org/script/license.php
cristy3ed852e2009-09-05 21:47:34 +00008#
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
cristy568c2d42012-07-27 01:41:20 +000016#
17# Copying and distribution of this file, with or without modification,
18# are permitted in any medium without royalty provided the copyright
19# notice and this notice are preserved.
cristy3ed852e2009-09-05 21:47:34 +000020
cristy9af1cbf2014-12-28 22:03:09 +000021# Process this file with autoconf to create configure script.
cristyc8051dc2012-08-20 23:50:31 +000022AC_PREREQ(2.69)
cristyfddf7752011-02-26 19:25:10 +000023
cristy9af1cbf2014-12-28 22:03:09 +000024# ==============================================================================
25# ImageMagick release.
26# ==============================================================================
cristy4c08aed2011-07-01 19:47:50 +000027m4_define([magick_major_version], [7])
28m4_define([magick_minor_version], [0])
Cristy1484a8a2017-06-03 08:09:22 -040029m4_define([magick_micro_version], [6])
Cristy74d482e2017-06-11 14:54:20 -040030m4_define([magick_patchlevel_version], [1])
cristyfddf7752011-02-26 19:25:10 +000031m4_define([magick_version],
cristy29eb34e2011-10-16 00:46:08 +000032 [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version])
Cristy26278232017-07-04 07:35:26 -040033m4_define([magick_git_revision], esyscmd([sh -c "(gitversion.sh .) | tr -d '\n'"]))
Cristyff282552015-09-19 16:49:39 -040034m4_define([magick_tar_name],[ImageMagick])
cristyfddf7752011-02-26 19:25:10 +000035
cristy9af1cbf2014-12-28 22:03:09 +000036# ==============================================================================
37# Initalize Automake
38# ==============================================================================
Cristy6720ed72016-02-09 09:27:35 -050039AC_INIT([ImageMagick],
40 [magick_version],
41 [https://github.com/ImageMagick/ImageMagick/issues],
42 [magick_tar_name],
Cristy64599592016-11-04 22:32:09 -040043 [https://www.imagemagick.org])
cristy4c08aed2011-07-01 19:47:50 +000044AC_CONFIG_SRCDIR([MagickCore/MagickCore.h])
cristy3ed852e2009-09-05 21:47:34 +000045AC_CONFIG_AUX_DIR([config])
cristybc556452012-08-17 19:44:03 +000046AC_REQUIRE_AUX_FILE([tap-driver.sh])
cristy3ed852e2009-09-05 21:47:34 +000047AC_CONFIG_MACRO_DIR([m4])
cristy3ed852e2009-09-05 21:47:34 +000048AC_CONFIG_HEADERS([config/config.h])
cristy01ff9f32012-12-01 18:15:29 +000049AX_PREFIX_CONFIG_H([MagickCore/magick-baseconfig.h],[MagickCore])
cristy9af1cbf2014-12-28 22:03:09 +000050AC_CANONICAL_SYSTEM
51AC_CANONICAL_TARGET
Cristyc442e4f2016-02-11 20:59:06 -050052AM_INIT_AUTOMAKE([foreign color-tests -Wall -Wno-portability subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip tar-ustar])
Cristy6720ed72016-02-09 09:27:35 -050053AM_SILENT_RULES([yes])
cristy3ed852e2009-09-05 21:47:34 +000054
55#
56# Save initial user-tunable values
57#
58USER_LIBS=$LIBS
59for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do
60 eval isset=\${$var+set}
61 if test "$isset" = 'set'; then
62 eval val=$`echo $var`
63 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' "
64 fi
65done
66AC_SUBST(DISTCHECK_CONFIG_FLAGS)
67
68CONFIGURE_ARGS="$0 ${ac_configure_args}"
69AC_SUBST(CONFIGURE_ARGS)
70
cristy187791c2015-05-03 22:17:00 +000071AC_ARG_ENABLE([reproducible-build],
72 [AC_HELP_STRING([--enable-reproducible-build],
73 [enable reproducible build])],
74 [enable_reproducible_build=$enableval],
75 [enable_reproducible_build='no'])
76
cristy3ed852e2009-09-05 21:47:34 +000077# Source file containing package/library versioning information.
78. ${srcdir}/version.sh
79
cristy15a88782010-01-31 23:24:49 +000080echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
cristy3ed852e2009-09-05 21:47:34 +000081
cristy19615b82011-04-13 20:02:01 +000082MAGICK_TARGET_CPU=$host_cpu
cristy3225a072010-04-17 01:47:28 +000083AC_SUBST(MAGICK_TARGET_CPU)
cristy27d53d62012-07-29 23:30:07 +000084AC_DEFINE_UNQUOTED(MAGICK_TARGET_CPU,$MAGICK_TARGET_CPU,[Target Host CPU])
cristy3225a072010-04-17 01:47:28 +000085
cristy19615b82011-04-13 20:02:01 +000086MAGICK_TARGET_VENDOR=$host_vendor
cristy3225a072010-04-17 01:47:28 +000087AC_SUBST(MAGICK_TARGET_VENDOR)
cristy27d53d62012-07-29 23:30:07 +000088AC_DEFINE_UNQUOTED(MAGICK_TARGET_VENDOR,$MAGICK_TARGET_VENDOR,[Target Host Vendor])
cristy3225a072010-04-17 01:47:28 +000089
cristy19615b82011-04-13 20:02:01 +000090MAGICK_TARGET_OS=$host_os
cristy3225a072010-04-17 01:47:28 +000091AC_SUBST(MAGICK_TARGET_OS)
cristy27d53d62012-07-29 23:30:07 +000092AC_DEFINE_UNQUOTED(MAGICK_TARGET_OS,$MAGICK_TARGET_OS,[Target Host OS])
cristy3225a072010-04-17 01:47:28 +000093
cristy37442762013-02-10 21:07:23 +000094
95# Substitute versioning
96AC_SUBST([MAGICK_MAJOR_VERSION],[magick_major_version])
97AC_SUBST([MAGICK_MINOR_VERSION],[magick_minor_version])
98AC_SUBST([MAGICK_MICRO_VERSION],[magick_micro_version])
99AC_SUBST([MAGICK_PATCHLEVEL_VERSION],[magick_patchlevel_version])
100AC_SUBST([MAGICK_VERSION],[magick_version])
Cristyfbb8d802015-09-02 11:41:34 -0400101AC_SUBST([MAGICK_GIT_REVISION],[magick_git_revision])
cristy37442762013-02-10 21:07:23 +0000102
cristy3ed852e2009-09-05 21:47:34 +0000103# Substitute library versioning
104AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl
105AC_SUBST(MAGICK_LIBRARY_REVISION)dnl
106AC_SUBST(MAGICK_LIBRARY_AGE)dnl
cristybab87c32010-02-09 20:54:22 +0000107AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN],
108 [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`])
109AC_SUBST([MAGICK_LIBRARY_VERSION_INFO],
110 [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE])
cristy37442762013-02-10 21:07:23 +0000111
cristy5ed9c6e2013-07-14 21:20:31 +0000112AC_SUBST(MAGICKPP_LIBRARY_CURRENT)dnl
113AC_SUBST(MAGICKPP_LIBRARY_REVISION)dnl
114AC_SUBST(MAGICKPP_LIBRARY_AGE)dnl
115AC_SUBST([MAGICKPP_LIBRARY_CURRENT_MIN],
116 [`expr $MAGICKPP_LIBRARY_CURRENT - $MAGICKPP_LIBRARY_AGE`])
117AC_SUBST([MAGICKPP_LIBRARY_VERSION_INFO],
118 [$MAGICKPP_LIBRARY_CURRENT:$MAGICKPP_LIBRARY_REVISION:$MAGICKPP_LIBRARY_AGE])
119
cristy3ed852e2009-09-05 21:47:34 +0000120AC_SUBST(PACKAGE_NAME)dnl
121AC_SUBST(PACKAGE_VERSION)dnl
cristy878c2f12011-08-19 00:25:19 +0000122AC_SUBST(PACKAGE_PERL_VERSION)dnl
cristy3ed852e2009-09-05 21:47:34 +0000123AC_SUBST(PACKAGE_RELEASE)dnl
124AC_SUBST(PACKAGE_CHANGE_DATE)dnl
125AC_SUBST(PACKAGE_LIB_VERSION)dnl
126AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl
cristy187791c2015-05-03 22:17:00 +0000127AS_IF([test X$enable_reproducible_build = Xyes],
128 [PACKAGE_RELEASE_DATE=$PACKAGE_RELEASE_DATE_REPRODUCIBLE],
129 [PACKAGE_RELEASE_DATE=$PACKAGE_RELEASE_DATE_RAW],
130)
cristy3ed852e2009-09-05 21:47:34 +0000131AC_SUBST(PACKAGE_RELEASE_DATE)dnl
cristy187791c2015-05-03 22:17:00 +0000132
cristy15a88782010-01-31 23:24:49 +0000133AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl
cristy3ed852e2009-09-05 21:47:34 +0000134
135# Ensure that make can run correctly
136AM_SANITY_CHECK
137
cristyf279b692014-08-13 12:01:27 +0000138# versioning of library
cristy3ed852e2009-09-05 21:47:34 +0000139MAGICK_LIB_VERSION="0x"
140if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then
141 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
142fi
143MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT}
144if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then
145 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
146fi
147MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE}
148if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then
149 MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0
150fi
151MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION}
152AC_SUBST(MAGICK_LIB_VERSION)
153
154# Definition used to define MagickLibVersionText in version.h
155MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
156AC_SUBST(MAGICK_LIB_VERSION_TEXT)
157
158# Definition used to define MagickLibVersionNumber in version.h
159MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
160AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
161
cristy5ed9c6e2013-07-14 21:20:31 +0000162MAGICKPP_LIB_VERSION="0x"
163if test ${MAGICKPP_LIBRARY_CURRENT} -lt 10 ; then
164 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0
165fi
166MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_CURRENT}
167if test ${MAGICKPP_LIBRARY_AGE} -lt 10 ; then
168 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0
169fi
170MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_AGE}
171if test ${MAGICKPP_LIBRARY_REVISION} -lt 10 ; then
172 MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0
173fi
174MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_REVISION}
175AC_SUBST(MAGICKPP_LIB_VERSION)
176
177# Definition used to define MagickLibVersionText in version.h
178MAGICKPP_LIB_VERSION_TEXT="${PACKAGE_VERSION}"
179AC_SUBST(MAGICKPP_LIB_VERSION_TEXT)
180
181# Definition used to define MagickLibVersionNumber in version.h
182MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}"
183AC_SUBST(MAGICK_LIB_VERSION_NUMBER)
184
185
186
cristy3ed852e2009-09-05 21:47:34 +0000187# Regenerate config.status if ChangeLog or version.sh is updated.
188AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh'])
189
190PERLMAINCC=$CC
191
192MAGICK_CFLAGS=''
193MAGICK_CPPFLAGS=$CPPFLAGS_USER
194MAGICK_PCFLAGS=$CPPFLAGS_USER
195MAGICK_LDFLAGS=''
196MAGICK_LIBS=''
cristyfd9dcd42010-08-08 18:07:02 +0000197MAGICK_FEATURES=''
cristy3ed852e2009-09-05 21:47:34 +0000198
199#
200# Evaluate shell variable equivalents to Makefile directory variables
201#
202if test "x$prefix" = xNONE; then
203 prefix=$ac_default_prefix
204fi
205# Let make expand exec_prefix.
206if test "x$exec_prefix" = xNONE; then
207 exec_prefix='${prefix}'
208fi
209
210#
211eval "eval PREFIX_DIR=${prefix}"
212AC_SUBST(PREFIX_DIR)
213eval "eval EXEC_PREFIX_DIR=${exec_prefix}"
214AC_SUBST(EXEC_PREFIX_DIR)
215eval "eval BIN_DIR=$bindir"
216AC_SUBST(BIN_DIR)
217eval "eval SBIN_DIR=$sbindir"
218AC_SUBST(SBIN_DIR)
219eval "eval LIBEXEC_DIR=$libexecdir"
220AC_SUBST(LIBEXEC_DIR)
221eval "eval DATA_DIR=$datadir"
222AC_SUBST(DATA_DIR)
Cristye35bdc62015-09-19 18:29:00 -0400223eval "eval DOC_DIR=$datadir/doc"
cristyd55889c2011-03-27 00:50:24 +0000224AC_SUBST(DOC_DIR)
cristy3ed852e2009-09-05 21:47:34 +0000225eval "eval SYSCONF_DIR=$sysconfdir"
226AC_SUBST(SYSCONF_DIR)
227eval "eval SHAREDSTATE_DIR=$sharedstatedir"
228AC_SUBST(SHAREDSTATE_DIR)
229eval "eval LOCALSTATE_DIR=$localstatedir"
230AC_SUBST(LOCALSTATE_DIR)
231eval "eval LIB_DIR=$libdir"
232AC_SUBST(LIB_DIR)
233eval "eval INCLUDE_DIR=$includedir"
234AC_SUBST(INCLUDE_DIR)
235eval "eval PERSISTINCLUDE_DIR=$oldincludedir"
236AC_SUBST(PERSISTINCLUDE_DIR)
237eval "eval INFO_DIR=$infodir"
238AC_SUBST(INFO_DIR)
239eval "eval MAN_DIR=$mandir"
240AC_SUBST(MAN_DIR)
241
242# Get full paths to source and build directories
243srcdirfull="`cd $srcdir && pwd`"
244builddir="`pwd`"
245
246#
247# Compute variables useful for running uninstalled software.
248#
249MAGICK_CODER_MODULE_PATH="${builddir}/coders"
250MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config"
251MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config"
252MAGICK_FILTER_MODULE_PATH="${builddir}/filters"
253DIRSEP=':'
254case "${build_os}" in
255 mingw* )
256 MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0`
257 MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0`
258 MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0`
259 MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0`
260 DIRSEP=';'
261 ;;
262esac
263case "${host_os}" in
264 mingw* )
265 DIRSEP=';'
266 ;;
267esac
268AC_SUBST(MAGICK_CODER_MODULE_PATH)
269AC_SUBST(MAGICK_CONFIGURE_SRC_PATH)
270AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH)
271AC_SUBST(MAGICK_FILTER_MODULE_PATH)
272AC_SUBST(DIRSEP)
273
cristya0b81c32010-01-22 02:54:33 +0000274
275#
276# Enable OS features.
277#
278AC_USE_SYSTEM_EXTENSIONS
279
cristy9af1cbf2014-12-28 22:03:09 +0000280# ==============================================================================
281# Find required base packages
282# ==============================================================================
283m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
cristy3ed852e2009-09-05 21:47:34 +0000284AC_PROG_CC
cristy95646052009-11-28 23:05:30 +0000285AC_PROG_CXX
cristy3ed852e2009-09-05 21:47:34 +0000286AC_PROG_CC_STDC
287AC_PROG_CPP
288AC_PROG_LD
cristy3ed852e2009-09-05 21:47:34 +0000289AC_SUBST(LD)
cristy837d6dc2010-02-27 01:16:57 +0000290AC_PROG_CC_C99
cristy3ed852e2009-09-05 21:47:34 +0000291AM_PROG_CC_C_O
cristy92703d82010-04-26 00:18:18 +0000292AX_CFLAGS_WARN_ALL
cristy3ed852e2009-09-05 21:47:34 +0000293AC_PROG_INSTALL
294AC_PROG_MAKE_SET
cristy3ed852e2009-09-05 21:47:34 +0000295AC_PROG_LN_S
cristy8d0ff762013-03-10 20:33:28 +0000296AC_PROG_SED
cristybc556452012-08-17 19:44:03 +0000297AC_PROG_AWK
cristy3ed852e2009-09-05 21:47:34 +0000298AM_WITH_DMALLOC
cristy92703d82010-04-26 00:18:18 +0000299AX_C___ATTRIBUTE__
cristyc7329a22015-05-17 22:21:37 +0000300AX_GCC_ARCHFLAG([yes])
Cristy6720ed72016-02-09 09:27:35 -0500301PKG_PROG_PKG_CONFIG([0.20])
cristy9af1cbf2014-12-28 22:03:09 +0000302AC_CANONICAL_BUILD
303AC_CANONICAL_HOST
cristy3ed852e2009-09-05 21:47:34 +0000304
cristyd95b7a52013-10-23 13:12:53 +0000305# Test for 64-bit build.
306AC_CHECK_SIZEOF([size_t])
307
308AX_COMPILER_VENDOR
Cristy6720ed72016-02-09 09:27:35 -0500309AX_COMPILER_FLAGS
cristyd95b7a52013-10-23 13:12:53 +0000310# The AX_CFLAGS_WARN_ALL macro doesn't currently work for sunpro
311# compiler.
312if test "$ax_cv_c_compiler_vendor" != "sun"; then
313 AX_CFLAGS_WARN_ALL
314fi
315
316if test "x$GCC" = "xyes"; then
317 CFLAGS="$CFLAGS -fexceptions"
318 touch local.exp
319else
320 cat > local.exp <<EOF
321set CC_FOR_TARGET "$CC"
322EOF
323fi
324
cristy496c0902013-02-26 12:57:44 +0000325# Check for linker script support
cristy9b86f202012-11-28 21:55:35 +0000326gl_LD_VERSION_SCRIPT
327
cristy3ed852e2009-09-05 21:47:34 +0000328#
cristy3ed852e2009-09-05 21:47:34 +0000329# Enable run-time checking.
330#
331AC_ARG_ENABLE([bounds-checking],
cristya3824692012-03-30 17:22:07 +0000332 [AC_HELP_STRING([--enable-bounds-checking],
cristy3ed852e2009-09-05 21:47:34 +0000333 [enable run-time bounds-checking])],
334 [enable_bounds_checking=$enableval],
335 [enable_bounds_checking='no'])
336
337if test "$enable_bounds_checking" = yes; then
338 AC_DEFINE([_FORTIFY_SOURCE], [2],
339 [enable run-time bounds-checking])
340fi
341
342#
343# Tests for Windows
344#
345AC_EXEEXT
346AC_OBJEXT
347
348GDI32_LIBS=''
cristy3ed852e2009-09-05 21:47:34 +0000349native_win32_build='no'
350cygwin_build='no'
351case "${host_os}" in
352 cygwin* )
cristy3ed852e2009-09-05 21:47:34 +0000353 cygwin_build='yes'
354 GDI32_LIBS='-lgdi32'
355 ;;
356 mingw* )
cristy3ed852e2009-09-05 21:47:34 +0000357 native_win32_build='yes'
358 GDI32_LIBS='-lgdi32'
Cristy4cff7472016-11-08 06:30:29 -0500359 OLE_LIBS='-loleaut32'
cristy3ed852e2009-09-05 21:47:34 +0000360 ;;
361esac
362if test "${GDI32_LIBS}x" != 'x'; then
363 AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library)
364fi
365AC_SUBST(GDI32_LIBS)
Cristy4cff7472016-11-08 06:30:29 -0500366AC_SUBST(OLE_LIBS)
cristy3ed852e2009-09-05 21:47:34 +0000367AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' )
368AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' )
369AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' )
370AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' )
371
372WinPathScript="${srcdirfull}/winpath.sh"
373AC_SUBST(WinPathScript)
374
375#
376# Compiler flags tweaks
377#
378if test "${GCC}" != "yes"; then
379 case "${host}" in
380 *-*-hpux* )
381 # aCC: HP ANSI C++ B3910B A.03.34
382 CFLAGS="${CFLAGS} -Wp,-H30000"
383 if test -n "${CXXFLAGS}"; then
384 CXXFLAGS='-AA'
385 else
386 CXXFLAGS="${CXXFLAGS} -AA"
387 fi
388 ;;
389 *-dec-osf5.* )
390 # Compaq alphaev68-dec-osf5.1 compiler
391 if test -n "${CXXFLAGS}"; then
392 CXXFLAGS='-std strict_ansi -noimplicit_include'
393 else
394 CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include"
395 fi
396 esac
397fi
398
399# Check for lazy-loading.
400AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload],
401[
402im_cv_ld_lazyload='none'
403case "${host}" in
404 *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
405 if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
406 im_cv_ld_lazyload='-Wl,-zlazyload'
407 fi
408 ;;
409esac
410])
411if test "${im_cv_ld_lazyload}" != 'none' ; then
412 if test -z "${LDFLAGS}" ; then
413 LDFLAGS="${im_cv_ld_lazyload}"
414 else
415 LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}"
416 fi
417fi
418
419dnl Platform-specific stuff
420case "$host" in
cristyc37574e2013-02-16 01:04:55 +0000421 *darwin* | *-macos10*)
422 dnl Disable FORTIFY_SOURCE to fix a bug in LVVM / OpenMP support
cristyb3b90d32013-02-16 15:44:08 +0000423 CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=0"
cristyc37574e2013-02-16 01:04:55 +0000424 dnl OS X universal binary support, requires --disable-dependency-tracking
425 AC_ARG_ENABLE([osx-universal-binary],
cristy3ed852e2009-09-05 21:47:34 +0000426 AC_HELP_STRING([--enable-osx-universal-binary],
427 [build universal binary on OS X [[default=no]]]),
428 [build_osxuniversal="${enableval}"], [build_osxuniversal=no])
429
cristyc37574e2013-02-16 01:04:55 +0000430 if test "${build_osxuniversal}" != no ; then
431 if test "$enable_dependency_tracking" != no ; then
432 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
cristy3ed852e2009-09-05 21:47:34 +0000433Please re-run configure with these options:
434 --disable-dependency-tracking --enable-osx-universal-binary
435 ])
cristyc37574e2013-02-16 01:04:55 +0000436 fi
437 CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
438 CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
439 LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
cristy3ed852e2009-09-05 21:47:34 +0000440 fi
441 ;;
442esac
443
cristy0151ae12011-10-28 16:32:29 +0000444#
445# ARCH specific include directory
446#
cristy670aa3c2011-11-03 00:54:00 +0000447AC_ARG_WITH([includearch-dir],
448 [AC_HELP_STRING([--includearch-dir=DIR],
cristy0151ae12011-10-28 16:32:29 +0000449 [ARCH specific include directory])],
cristy670aa3c2011-11-03 00:54:00 +0000450 [includearch_dir=$withval],
451 [includearch_dir=$INCLUDE_DIR])
cristy0151ae12011-10-28 16:32:29 +0000452
cristyd286fd72013-02-24 19:25:33 +0000453eval "eval INCLUDEARCH_DIR=$includearch_dir"
cristy670aa3c2011-11-03 00:54:00 +0000454AC_SUBST(INCLUDEARCH_DIR)
cristy0151ae12011-10-28 16:32:29 +0000455
456#
457# ARCH specific configuration directory
458#
cristy670aa3c2011-11-03 00:54:00 +0000459AC_ARG_WITH([sharearch-dir],
460 [AC_HELP_STRING([--sharearch-dir=DIR],
cristy0151ae12011-10-28 16:32:29 +0000461 [ARCH specific config directory])],
cristy670aa3c2011-11-03 00:54:00 +0000462 [sharearch_dir=$withval],
cristy408ebcd2011-11-14 01:36:57 +0000463 [sharearch_dir="${LIB_DIR}"])
cristy0151ae12011-10-28 16:32:29 +0000464
cristy670aa3c2011-11-03 00:54:00 +0000465eval "eval SHAREARCH_DIR=$sharearch_dir"
cristy670aa3c2011-11-03 00:54:00 +0000466AC_SUBST(SHAREARCH_DIR)
cristy0151ae12011-10-28 16:32:29 +0000467
cristy496c0902013-02-26 12:57:44 +0000468# Path to the pkgconfig folder
cristy2ec87cc2013-02-18 17:46:50 +0000469AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=DIR],
470 [Path to the pkgconfig directory @<:@LIBDIR/pkgconfig@:>@]),
471 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
472AC_SUBST([pkgconfigdir])
473
cristy0151ae12011-10-28 16:32:29 +0000474#
cristy3ed852e2009-09-05 21:47:34 +0000475# Enable support for threads
cristy1ae5c992013-07-30 14:55:07 +0000476#
477# Find Posix threads library
478#
cristy3ed852e2009-09-05 21:47:34 +0000479AC_ARG_WITH([threads],
cristy55bf91c2010-09-24 00:29:41 +0000480 [AC_HELP_STRING([--without-threads], [disable threads support])],
cristy3ed852e2009-09-05 21:47:34 +0000481 [with_threads=$withval],
482 [with_threads='yes'])
483
cristy1ae5c992013-07-30 14:55:07 +0000484THREAD_LIBS=''
cristy3ed852e2009-09-05 21:47:34 +0000485have_threads=no
486if test "$with_threads" != 'no'; then
cristyf6fcb5d2010-09-24 01:19:13 +0000487 AX_PTHREAD()
cristy7acf8fb2010-09-23 19:58:53 +0000488 if test "$ax_pthread_ok" = yes; then
cristy3ed852e2009-09-05 21:47:34 +0000489 have_threads=yes
490 DEF_THREAD="$PTHREAD_CFLAGS"
491 CFLAGS="$CFLAGS $DEF_THREAD"
492 CXXFLAGS="$CXXFLAGS $DEF_THREAD"
cristy1ae5c992013-07-30 14:55:07 +0000493 THREAD_LIBS="$PTHREAD_LIBS"
cristy3ed852e2009-09-05 21:47:34 +0000494 if test "$CC" != "$PTHREAD_CC"; then
495 AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
496 CC="$PTHREAD_CC"
497 fi
cristy55bf91c2010-09-24 00:29:41 +0000498 AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
cristy3ed852e2009-09-05 21:47:34 +0000499 fi
500fi
cristy1ae5c992013-07-30 14:55:07 +0000501LIBS="$LIBS $THREAD_LIBS"
502AC_SUBST(THREAD_LIBS)
cristy3ed852e2009-09-05 21:47:34 +0000503
504# Enable support for OpenMP
505if test "$have_threads" != 'yes'; then
506 ac_cv_prog_c_openmp=unsupported
507fi
508AC_OPENMP([C])
509CFLAGS="$OPENMP_CFLAGS $CFLAGS"
510MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
511AC_SUBST(OPENMP_CFLAGS)
cristy391f1ce2010-09-09 17:23:28 +0000512if test "$enable_openmp" != no; then
513 if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
514 MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
515 fi
516fi
cristy3ed852e2009-09-05 21:47:34 +0000517
cristy736173a2009-09-20 21:18:22 +0000518# Enable support for OpenCL
cristy7141bca2010-01-21 16:51:24 +0000519AX_OPENCL([C])
cristyc7083c12009-10-14 03:16:55 +0000520CFLAGS="$CL_CFLAGS $CFLAGS"
cristyfdc7d122013-08-17 20:46:45 +0000521CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
cristyc7083c12009-10-14 03:16:55 +0000522LIBS="$CL_LIBS $LIBS"
cristy18d9cfe2009-12-31 03:55:21 +0000523AC_SUBST(CL_CFLAGS)
cristy391f1ce2010-09-09 17:23:28 +0000524if test "$enable_opencl" != no; then
cristyf864d422011-09-12 17:57:53 +0000525 if test "X$ax_cv_check_cl_libcl" != Xno; then :
cristy391f1ce2010-09-09 17:23:28 +0000526 MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
527 fi
cristyfd9dcd42010-08-08 18:07:02 +0000528fi
cristy736173a2009-09-20 21:18:22 +0000529
cristy3ed852e2009-09-05 21:47:34 +0000530########
531#
532# Check for large file support
533#
534########
535AC_SYS_LARGEFILE
536AC_FUNC_FSEEKO
537LFS_CPPFLAGS=''
538if test "$enable_largefile" != no; then
cristyc1e0cc12011-09-21 16:41:16 +0000539 case $ac_cv_sys_file_offset_bits in
540 no)
541 # nothing to do here as the host supports LFS fine
542 ;;
543 unknown)
cristy3ed852e2009-09-05 21:47:34 +0000544 AC_MSG_CHECKING([for native large file support])
cristyda16f162011-02-19 23:52:17 +0000545 AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
cristy3ed852e2009-09-05 21:47:34 +0000546 main () {
547 exit(!(sizeof(off_t) == 8));
cristyda16f162011-02-19 23:52:17 +0000548 }])],
cristy3ed852e2009-09-05 21:47:34 +0000549 [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64)
cristyad38abe2012-12-23 23:03:21 +0000550 AC_MSG_RESULT([yes])],
551 [AC_MSG_RESULT([no])])
cristyc1e0cc12011-09-21 16:41:16 +0000552 ;;
553 *)
554 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
555 ;;
556 esac
cristy3ed852e2009-09-05 21:47:34 +0000557 if test "$ac_cv_sys_large_files" != 'no'; then
558 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1"
559 fi
560 if test "$ac_cv_sys_largefile_source" != 'no'; then
561 LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1"
562 fi
563fi
564AC_SUBST(LFS_CPPFLAGS)
565
cristy3ed852e2009-09-05 21:47:34 +0000566# Configure libtool
567AC_LIBTOOL_DLOPEN
568LT_INIT([win32-dll])
569LT_LANG([C++])
570AC_SUBST(LIBTOOL_DEPS)
571
cristy3ed852e2009-09-05 21:47:34 +0000572# Check to see if building shared libraries
573libtool_build_shared_libs='no'
574if test "$enable_shared" = 'yes'; then
575 libtool_build_shared_libs='yes'
576fi
577
578# Check to see if building static libraries
579libtool_build_static_libs='no'
580if test "$enable_static" = 'yes'; then
581 libtool_build_static_libs='yes'
582fi
583
cristyfa112112010-01-04 17:48:07 +0000584AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes')
cristy3ed852e2009-09-05 21:47:34 +0000585#
586# Enable support for building loadable modules
587#
cristyaf4cbf32012-10-16 23:47:41 +0000588build_modules='no'
cristy3ed852e2009-09-05 21:47:34 +0000589AC_ARG_WITH([modules],
590 [AC_HELP_STRING([--with-modules],
591 [enable building dynamically loadable modules])],
592 [with_modules=$withval],
cristy5a1cefd2010-01-06 20:42:35 +0000593 [with_modules='no'])
cristy3ed852e2009-09-05 21:47:34 +0000594
595# Only allow building loadable modules if we are building shared libraries
596if test "$with_modules" != 'no' ; then
597 if test "$libtool_build_shared_libs" = 'no'; then
598 AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.])
cristyc6722092012-10-14 00:19:31 +0000599 build_modules='no'
600 else
601 build_modules='yes'
602 fi
cristy3ed852e2009-09-05 21:47:34 +0000603fi
cristyc6722092012-10-14 00:19:31 +0000604if test "$build_modules" != 'no' ; then
cristy3ed852e2009-09-05 21:47:34 +0000605 AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.)
cristye78d2532012-12-17 20:41:10 +0000606 MAGICK_FEATURES="$MAGICK_FEATURES Modules"
cristy3ed852e2009-09-05 21:47:34 +0000607fi
cristyc6722092012-10-14 00:19:31 +0000608AM_CONDITIONAL(WITH_MODULES, test "$build_modules" != 'no')
cristy3ed852e2009-09-05 21:47:34 +0000609
cristy3ed852e2009-09-05 21:47:34 +0000610# Enable build using delegate libraries built in subdirectories rather than installed
cristyfbb0ef02010-12-19 02:32:11 +0000611# delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib)
cristy3ed852e2009-09-05 21:47:34 +0000612AC_ARG_ENABLE([delegate-build],
613 [AC_HELP_STRING([--enable-delegate-build],
614 [look for delegate libraries in build directory])],
615 [enable_delegate_build=$enableval],
616 [enable_delegate_build='no'])
617
618AC_ARG_ENABLE([deprecated],
619 [AC_HELP_STRING([--disable-deprecated],
cristy3a75f062012-09-08 23:29:40 +0000620 [exclude deprecated methods in MagickCore and MagickWand APIs])],
cristy3ed852e2009-09-05 21:47:34 +0000621 [enable_deprecated=$enableval],
622 [enable_deprecated='no'])
623
624if test "$enable_deprecated" = 'yes'; then
625 AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API])
626else
627 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated "
628fi
629
630# Build a version of ImageMagick which operates uninstalled.
631# Used to build distributions located via MAGICK_HOME / executable path
632AC_ARG_ENABLE([installed],
633 [AC_HELP_STRING([--disable-installed],
634 [Formally install ImageMagick under PREFIX])],
635 [enable_installed=$enableval],
636 [enable_installed='yes'])
637
638if test "$enable_installed" = 'yes'; then
639 AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix])
640else
641 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed "
642fi
643
644# Permit enciphering and deciphering image pixels.
645AC_ARG_ENABLE([cipher],
646 [AC_HELP_STRING([--disable-cipher],
647 [disable enciphering and deciphering image pixels])],
648 [enable_cipher=$enableval],
649 [enable_cipher='yes'])
650
651if test "$enable_cipher" = 'yes'; then
652 AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels])
cristy0f6fc2d2015-05-30 00:49:11 +0000653 MAGICK_FEATURES="Cipher $MAGICK_FEATURES"
cristy3ed852e2009-09-05 21:47:34 +0000654fi
655
cristy6e3607c2011-09-13 13:59:17 +0000656# Build a zero-configuration version of ImageMagick.
657AC_ARG_ENABLE([zero-configuration],
658 [AC_HELP_STRING([--enable-zero-configuration],
cristy3ed852e2009-09-05 21:47:34 +0000659 [enable self-contained, embeddable, zero-configuration ImageMagick])],
cristy6e3607c2011-09-13 13:59:17 +0000660 [enable_zero_configuration=$enableval],
661 [enable_zero_configuration='no'])
cristy3ed852e2009-09-05 21:47:34 +0000662
cristy6e3607c2011-09-13 13:59:17 +0000663if test "$enable_zero_configuration" = 'yes'; then
664 AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick])
cristy0f6fc2d2015-05-30 00:49:11 +0000665 MAGICK_FEATURES="Zero-configuration $MAGICK_FEATURES"
cristy3ed852e2009-09-05 21:47:34 +0000666fi
667
668# Build a high dynamic range version of ImageMagick.
669AC_ARG_ENABLE([hdri],
cristyf314dbd2012-11-15 13:35:28 +0000670 [AC_HELP_STRING([--enable-hdri],
cristy3ed852e2009-09-05 21:47:34 +0000671 [accurately represent the wide range of intensity levels found in real scenes])],
672 [enable_hdri=$enableval],
cristy191c0b72012-08-12 16:29:52 +0000673 [enable_hdri='yes'])
cristy3ed852e2009-09-05 21:47:34 +0000674
675MAGICK_HDRI=""
676if test "$enable_hdri" = 'yes'; then
677 MAGICK_HDRI="HDRI"
cristye52f12f2012-12-31 15:32:36 +0000678 magick_hdri_enable='1';
cristyfd9dcd42010-08-08 18:07:02 +0000679 MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
cristye52f12f2012-12-31 15:32:36 +0000680else
681 magick_hdri_enable='0'
cristy3ed852e2009-09-05 21:47:34 +0000682fi
cristye52f12f2012-12-31 15:32:36 +0000683AC_DEFINE_UNQUOTED(HDRI_ENABLE_OBSOLETE_IN_H,$magick_hdri_enable,[Whether hdri is enabled or not])
cristy3ed852e2009-09-05 21:47:34 +0000684AC_SUBST(MAGICK_HDRI)dnl
cristye52f12f2012-12-31 15:32:36 +0000685MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
686CFLAGS="$CFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
cristy72062382012-12-31 16:49:52 +0000687CPPFLAGS="$CPPFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable"
cristy3ed852e2009-09-05 21:47:34 +0000688
Cristy697159d2016-05-31 07:21:31 -0400689# Enable pipes (|) in filenames.
690AC_ARG_ENABLE([pipes],
691 [AC_HELP_STRING([--enable-pipes],
692 [enable pipes (|) in filenames])],
693 [enable_pipes=$enableval],
694 [enable_pipes='no'])
695
696if test "$enable_pipes" = 'yes'; then
697 AC_DEFINE(PIPES_SUPPORT,1,[enable pipes (|) in filenames])
698 MAGICK_FEATURES="Pipes $MAGICK_FEATURES"
699fi
700
cristy3ed852e2009-09-05 21:47:34 +0000701# Build a version of ImageMagick with assert statements.
702AC_ARG_ENABLE([assert],
703 [AC_HELP_STRING([--disable-assert],
704 [disable assert() statements in build])],
705 [enable_assert=$enableval],
706 [enable_assert='yes'])
707
708if test "$enable_assert" = 'no'; then
709 AC_DEFINE(NDEBUG,1,[Turn off assert statements])
710fi
711
cristya448bd22011-10-14 12:38:13 +0000712# Don't emit "rebuild rules" for configure, Makefile.ins, etc.
cristy3ed852e2009-09-05 21:47:34 +0000713AM_MAINTAINER_MODE
714
cristy944e51f2013-04-16 18:45:02 +0000715# Enable hugepages support
716AC_ARG_ENABLE([hugepages],
717 [AC_HELP_STRING([--enable-hugepages],
718 [enable 'huge pages' support])],
719 [enable_hugepages=$enableval],
720 [enable_hugepages='no'])
721
cristy3ed852e2009-09-05 21:47:34 +0000722# Enable ccmalloc memory debugging support
723AC_ARG_ENABLE([ccmalloc],
724 [AC_HELP_STRING([--enable-ccmalloc],
725 [enable 'ccmalloc' memory debug support])],
726 [enable_ccmalloc=$enableval],
727 [enable_ccmalloc='no'])
728
729# Enable Electric Fence memory debugging support
730AC_ARG_ENABLE([efence],
731 [AC_HELP_STRING([--enable-efence],
732 [enable 'efence' memory debug support])],
733 [enable_efence=$enableval],
734 [enable_efence='no'])
735
736# Enable prof-based profiling support
737AC_ARG_ENABLE([prof],
738 [AC_HELP_STRING([--enable-prof],
739 [enable 'prof' profiling support])],
740 [enable_prof=$enableval],
741 [enable_prof='no'])
742
743# Enable gprof-based profiling support
744AC_ARG_ENABLE([gprof],
745 [AC_HELP_STRING([--enable-gprof],
746 [enable 'gprof' profiling support])],
747 [enable_gprof=$enableval],
748 [enable_gprof='no'])
749
750# Enable gcov-based profiling support
751AC_ARG_ENABLE([gcov],
752 [AC_HELP_STRING([--enable-gcov],
753 [enable 'gcov' profiling support])],
754 [enable_gcov=$enableval],
755 [enable_gcov='no'])
756
757enable_profiling='no'
758if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then
759 enable_profiling='yes'
760 if test "$libtool_build_shared_libs" = 'yes'; then
761 echo "Warning: Can not profile code using shared libraries"
762 fi
763fi
764
765# Magick API method prefix
766AC_ARG_WITH([method-prefix],
767 [AC_HELP_STRING([--with-method-prefix=PREFIX],
768 [prefix MagickCore API methods])],
cristyfc3d0222012-02-07 15:05:57 +0000769 [with_method_prefix=$withval],
770 [with_method_prefix='no'])
cristy3ed852e2009-09-05 21:47:34 +0000771
cristyfc3d0222012-02-07 15:05:57 +0000772if test "$with_method_prefix" != 'no'; then
cristy3ed852e2009-09-05 21:47:34 +0000773 AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix])
cristyfc3d0222012-02-07 15:05:57 +0000774 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix "
cristy3ed852e2009-09-05 21:47:34 +0000775fi
776
cristy71d8c202012-03-20 17:05:01 +0000777# Enable legacy support (default no)
778AC_ARG_ENABLE(legacy-support,
Cristy519e0052016-10-16 15:28:40 -0400779 [ --enable-legacy-support install legacy command-line utilities (default disabled)],
cristy71d8c202012-03-20 17:05:01 +0000780 [with_legacy_support=$enableval],
781 [with_legacy_support='no'])
782AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no')
783
cristy3ed852e2009-09-05 21:47:34 +0000784# Number of bits in a Quantum
785AC_ARG_WITH([quantum-depth],
786 [AC_HELP_STRING([--with-quantum-depth=DEPTH],
787 [number of bits in a pixel quantum (default 16)])],
788 [with_quantum_depth=$withval],
789 [with_quantum_depth=16])
790
791if test "$with_quantum_depth" != '8'; then
792 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth "
793fi
794
795case "${with_quantum_depth}" in
796 8 ) ;;
797 16 ) ;;
798 32 ) ;;
799 64 ) ;;
cristycdae12a2010-09-19 02:24:31 +0000800 * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
cristy3ed852e2009-09-05 21:47:34 +0000801esac
802QUANTUM_DEPTH="$with_quantum_depth"
cristye52f12f2012-12-31 15:32:36 +0000803AC_DEFINE_UNQUOTED(QUANTUM_DEPTH_OBSOLETE_IN_H,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
cristy3ed852e2009-09-05 21:47:34 +0000804AC_SUBST(QUANTUM_DEPTH)dnl
cristy0a9565b2013-01-30 19:57:08 +0000805MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
cristye52f12f2012-12-31 15:32:36 +0000806CFLAGS="$CFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
cristy72062382012-12-31 16:49:52 +0000807CPPFLAGS="$CPPFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH"
cristy3ed852e2009-09-05 21:47:34 +0000808
cristy01ff9f32012-12-01 18:15:29 +0000809# define a lib suffix for abi purpose
cristy7a26abd2012-12-03 00:18:59 +0000810MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}"
cristye386d192012-12-01 21:05:20 +0000811if test "$enable_hdri" = 'yes'; then
cristy7a26abd2012-12-03 00:18:59 +0000812 MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}${MAGICK_HDRI}"
cristye386d192012-12-01 21:05:20 +0000813fi
cristy7a26abd2012-12-03 00:18:59 +0000814AC_SUBST(MAGICK_ABI_SUFFIX)
cristy01ff9f32012-12-01 18:15:29 +0000815
cristy3ed852e2009-09-05 21:47:34 +0000816# Set pixel cache threshold
817AC_ARG_WITH([cache],
818 [AC_HELP_STRING([--with-cache=THRESHOLD],
819 [set pixel cache threshhold in MB (default available memory)])],
820 [with_cache=$withval],
821 [with_cache=''])
822
823if test "$with_cache" != ''; then
824 AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)])
825 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache "
826fi
827
828# Disable/Enable support for full delegate paths
829AC_ARG_WITH([frozenpaths],
830 [AC_HELP_STRING([--with-frozenpaths],
831 [freeze delegate paths])],
832 [with_frozenpaths=$withval],
833 [with_frozenpaths='no'])
834
835# Enable build/install of Magick++
836AC_ARG_WITH([magick-plus-plus],
837 [AC_HELP_STRING([--without-magick-plus-plus],
838 [disable build/install of Magick++])],
839 [with_magick_plus_plus=$withval],
840 [with_magick_plus_plus='yes'])
841
cristy3a75f062012-09-08 23:29:40 +0000842# Encode the this name into the shared library.
843AC_ARG_WITH([package-release-name],
844 [AC_HELP_STRING([--with-package-release-name=NAME],
845 [encode this name into the shared library])],
846[MAGICK_LT_RELEASE_OPTS="-release $withval"])
847AC_SUBST(MAGICK_LT_RELEASE_OPTS)
848
cristy3ed852e2009-09-05 21:47:34 +0000849# Disable build/install of PerlMagick.
850AC_ARG_WITH([perl],
851 [AC_HELP_STRING([--with-perl],
852 [enable build/install of PerlMagick])],
853 [with_perl=$withval],
cristyb5f4e2f2010-04-25 00:49:11 +0000854 [with_perl='no'])
cristy3ed852e2009-09-05 21:47:34 +0000855
856# Options to pass when configuring PerlMagick
857AC_ARG_WITH([perl-options],
858 [AC_HELP_STRING([--with-perl-options=OPTIONS],
cristyfc3d0222012-02-07 15:05:57 +0000859 [options to pass on command-line when generating PerlMagick build file])],
cristy949301e2010-01-06 01:38:40 +0000860PERL_MAKE_OPTIONS=$withval)
cristy3ed852e2009-09-05 21:47:34 +0000861AC_SUBST(PERL_MAKE_OPTIONS)
862
cristy3b0097d2014-11-04 15:34:47 +0000863# Enable jemalloc, object-caching memory allocation library.
864AC_ARG_WITH(jemalloc,
865 [ --with-jemalloc enable jemalloc memory allocation library support],
866 [with_jemalloc=$withval],
867 [with_jemalloc='no'])
868if test "$with_jemalloc" != 'yes' ; then
869 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jemalloc=$with_jemalloc "
870fi
871
cristy3ed852e2009-09-05 21:47:34 +0000872# Enable umem, object-caching memory allocation library.
873AC_ARG_WITH(umem,
874 [ --with-umem enable umem memory allocation library support],
875 [with_umem=$withval],
876 [with_umem='no'])
877if test "$with_umem" != 'yes' ; then
878 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem "
879fi
880
881#
882# Specify path to shared libstdc++ if not in normal location
883#
884AC_ARG_WITH([libstdc],
885 [AC_HELP_STRING([--with-libstdc=DIR],
886 [ use libstdc++ in DIR (for GNU C++)])],
887 [with_libstdc=$withval],
888 [with_libstdc=''])
889
890if test "$with_libstdc" != ''; then
891 if test -d "$with_libstdc"; then
892 LIBSTDCLDFLAGS="-L$with_libstdc"
893 fi
894fi
895AC_SUBST(LIBSTDCLDFLAGS)
896
897# Does gcc required -traditional?
898AC_PROG_GCC_TRADITIONAL
899
900########
901#
902# Set defines required to build DLLs and modules using MinGW
903#
904########
905# These options are set for multi-thread DLL module build
906# libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_
907# module: _DLL
908# executable/Magick++: _DLL _MAGICKMOD_
909MODULE_EXTRA_CPPFLAGS=''
910LIBRARY_EXTRA_CPPFLAGS=''
911if test "${native_win32_build}" = 'yes'; then
912 if test "${libtool_build_shared_libs}" = 'yes'; then
913 CPPFLAGS="$CPPFLAGS -D_DLL"
914 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL"
915 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL"
916 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_"
cristyc6722092012-10-14 00:19:31 +0000917 if test "$build_modules" = 'yes'; then
cristy3ed852e2009-09-05 21:47:34 +0000918 LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_"
919 else
920 MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_"
921 fi
922 else
923 CPPFLAGS="$CPPFLAGS -D_LIB"
924 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB"
925 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB"
926 fi
927 if test "$with_threads" = 'yes'; then
928 CPPFLAGS="$CPPFLAGS -D_MT"
929 MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT"
930 MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT"
931 fi
932fi
933AC_SUBST(MODULE_EXTRA_CPPFLAGS)
934AC_SUBST(LIBRARY_EXTRA_CPPFLAGS)
935
936# Check standard headers
937AC_HEADER_STDC
938if ! test x"$ac_cv_header_stdc" = x"yes"; then
939 AC_MSG_WARN([configure has detected that you do not have the ANSI standard C
940 header files. Compilation cannot proceed. Please install the ANSI C
941 headers and rerun this script.]);
942fi
cristya0b81c32010-01-22 02:54:33 +0000943AC_HEADER_ASSERT
cristy3ed852e2009-09-05 21:47:34 +0000944AC_HEADER_DIRENT
945
946# Check additional headers
Cristy4bb3ba92016-04-24 14:28:07 -0400947AC_CHECK_HEADERS(arm/limits.h arpa/inet.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h sys/ipc.h sys/mman.h sys/resource.h sys/sendfile.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h utime.h wchar.h xlocale.h)
cristy3ed852e2009-09-05 21:47:34 +0000948
949########
950#
951# Checks for typedefs, structures, and compiler characteristics.
952#
953########
954
955AC_HEADER_STDBOOL
956AC_C_VOLATILE
957AC_C_STRINGIZE
958AC_HEADER_STAT
959AC_HEADER_TIME
960AC_STRUCT_TM
cristy92703d82010-04-26 00:18:18 +0000961AC_STRUCT_TIMEZONE
cristy3ed852e2009-09-05 21:47:34 +0000962AC_SYS_INTERPRETER
963
cristya9ee2842013-01-08 15:56:39 +0000964#
965# Checks for language qualifiers and semantics.
966#
967AC_C_CHAR_UNSIGNED
968AC_C_CONST
cristy3ed852e2009-09-05 21:47:34 +0000969AC_C_INLINE
cristy3ed852e2009-09-05 21:47:34 +0000970AC_C_RESTRICT
cristya9ee2842013-01-08 15:56:39 +0000971AC_C_VOLATILE
cristy3ed852e2009-09-05 21:47:34 +0000972
973# If words are stored with the most significant byte first (like
974# Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
975AC_C_BIGENDIAN
976
cristy501c8042011-05-26 17:46:28 +0000977# Define to a suitable type, if standard headers do not define it.
978AC_TYPE_INT8_T
979AC_TYPE_INT16_T
980AC_TYPE_INT32_T
981AC_TYPE_INT64_T
982AC_TYPE_INTMAX_T
983AC_TYPE_INTPTR_T
984AC_TYPE_LONG_DOUBLE
cristy3ed852e2009-09-05 21:47:34 +0000985AC_TYPE_LONG_DOUBLE_WIDER
cristy501c8042011-05-26 17:46:28 +0000986AC_TYPE_LONG_LONG_INT
987AC_TYPE_MBSTATE_T
988AC_TYPE_MODE_T
989AC_TYPE_OFF_T
990AC_TYPE_PID_T
991AC_TYPE_SIZE_T
992AC_TYPE_SSIZE_T
993AC_TYPE_UID_T
994AC_TYPE_UINT8_T
995AC_TYPE_UINT16_T
996AC_TYPE_UINT32_T
997AC_TYPE_UINT64_T
998AC_TYPE_UINTMAX_T
999AC_TYPE_UINTPTR_T
1000AC_TYPE_UNSIGNED_LONG_LONG_INT
cristy3ed852e2009-09-05 21:47:34 +00001001
cristy708922a2015-05-17 02:33:56 +00001002AC_CHECK_TYPES([locale_t], [], [], [[#include <xlocale.h>]])
cristy98beafc2015-05-14 19:55:55 +00001003
cristyfec31822013-05-23 12:32:12 +00001004# Float_t and double_t are intended to be the the most efficient type.
1005AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]])
1006AC_CHECK_TYPES([double_t], [], [], [[#include <math.h>]])
1007AC_CHECK_SIZEOF([float_t], [], [[#include <math.h>]])
1008AC_CHECK_SIZEOF([double_t], [], [[#include <math.h>]])
1009
cristy9b86f202012-11-28 21:55:35 +00001010# Get size of float, double and long double for comparaison.
1011AC_CHECK_SIZEOF([float])
1012AC_CHECK_SIZEOF([double])
cristy9e2b6242014-03-25 11:49:41 +00001013AC_CHECK_SIZEOF([long double])
cristyf0cf9a22012-10-24 12:05:01 +00001014
cristy3ed852e2009-09-05 21:47:34 +00001015# Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
1016AC_CHECK_SIZEOF(signed short)
1017
1018# Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT
1019AC_CHECK_SIZEOF(unsigned short)
1020
1021# Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT
1022AC_CHECK_SIZEOF(signed int)
1023
1024# Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT
1025AC_CHECK_SIZEOF(unsigned int)
1026
1027# Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
1028AC_CHECK_SIZEOF(signed long)
1029
1030# Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG
1031AC_CHECK_SIZEOF(unsigned long)
1032
1033# Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If
1034# 'signed long long' is not supported then the value defined is zero.
1035AC_CHECK_SIZEOF(signed long long)
1036
1037# Obtain size of a 'unsigned long long' and define as
1038# SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not
1039# supported then the value defined is zero.
1040AC_CHECK_SIZEOF(unsigned long long)
1041
cristyfec31822013-05-23 12:32:12 +00001042# Obtain size of off_t and define as SIZEOF_OFF_T
1043AC_CHECK_SIZEOF(off_t)
1044
1045# Obtain size of size_t and define as SIZEOF_SIZE_T
1046AC_CHECK_SIZEOF(size_t)
1047
1048# Obtain size of ssize_t and define as SIZEOF_SSIZE_T
1049AC_CHECK_SIZEOF(ssize_t)
1050
cristy3ed852e2009-09-05 21:47:34 +00001051# Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
1052AC_CHECK_SIZEOF(unsigned int*)
1053
1054#
1055# Compute sized types for current CPU and compiler options.
1056#
1057
1058AC_MSG_CHECKING(for signed 8-bit type)
1059INT8_T='signed char'
cristyad38abe2012-12-23 23:03:21 +00001060AC_MSG_RESULT($INT8_T)
cristy3ed852e2009-09-05 21:47:34 +00001061AC_SUBST(INT8_T)
1062
1063AC_MSG_CHECKING(for unsigned 8-bit type)
1064UINT8_T='unsigned char'
cristyad38abe2012-12-23 23:03:21 +00001065AC_MSG_RESULT($UINT8_T)
cristy3ed852e2009-09-05 21:47:34 +00001066AC_SUBST(UINT8_T)
1067
1068AC_MSG_CHECKING(for signed 16-bit type)
1069INT16_T='signed short'
cristyad38abe2012-12-23 23:03:21 +00001070AC_MSG_RESULT($INT16_T)
cristy3ed852e2009-09-05 21:47:34 +00001071AC_SUBST(INT16_T)
1072
1073AC_MSG_CHECKING(for unsigned 16-bit type)
1074UINT16_T='unsigned short'
cristyad38abe2012-12-23 23:03:21 +00001075AC_MSG_RESULT($UINT16_T)
cristy3ed852e2009-09-05 21:47:34 +00001076AC_SUBST(UINT16_T)
1077
1078AC_MSG_CHECKING(for signed 32-bit type)
1079INT32_T='none'
cristy6d5e20f2011-04-25 13:48:54 +00001080INT32_F='none'
cristy3ed852e2009-09-05 21:47:34 +00001081if test $ac_cv_sizeof_signed_int -eq 4; then
1082 INT32_T='signed int'
cristy6d5e20f2011-04-25 13:48:54 +00001083 INT32_F='""'
cristy3ed852e2009-09-05 21:47:34 +00001084elif test $ac_cv_sizeof_signed_long -eq 4; then
1085 INT32_T='signed long'
cristy6d5e20f2011-04-25 13:48:54 +00001086 INT32_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +00001087fi
cristyad38abe2012-12-23 23:03:21 +00001088AC_MSG_RESULT($INT32_T)
cristy3ed852e2009-09-05 21:47:34 +00001089AC_SUBST(INT32_T)
cristy6d5e20f2011-04-25 13:48:54 +00001090AC_SUBST(INT32_F)
cristy3ed852e2009-09-05 21:47:34 +00001091
1092AC_MSG_CHECKING(for unsigned 32-bit type)
1093UINT32_T='none'
cristy6d5e20f2011-04-25 13:48:54 +00001094UINT32_F='none'
cristy3ed852e2009-09-05 21:47:34 +00001095if test $ac_cv_sizeof_unsigned_int -eq 4; then
1096 UINT32_T='unsigned int'
cristy6d5e20f2011-04-25 13:48:54 +00001097 UINT32_F='""'
cristy3ed852e2009-09-05 21:47:34 +00001098elif test $ac_cv_sizeof_unsigned_long -eq 4; then
1099 UINT32_T='unsigned long'
cristy6d5e20f2011-04-25 13:48:54 +00001100 UINT32_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +00001101fi
cristyad38abe2012-12-23 23:03:21 +00001102AC_MSG_RESULT($UINT32_T)
cristy3ed852e2009-09-05 21:47:34 +00001103AC_SUBST(UINT32_T)
cristy6d5e20f2011-04-25 13:48:54 +00001104AC_SUBST(UINT32_F)
cristy3ed852e2009-09-05 21:47:34 +00001105
1106AC_MSG_CHECKING(for signed 64-bit type)
1107INT64_T='none'
cristy6d5e20f2011-04-25 13:48:54 +00001108INT64_F='none'
cristy3ed852e2009-09-05 21:47:34 +00001109if test $ac_cv_sizeof_signed_long -eq 8; then
1110 INT64_T='signed long'
cristy6d5e20f2011-04-25 13:48:54 +00001111 INT64_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +00001112elif test $ac_cv_sizeof_signed_long_long -eq 8; then
1113 INT64_T='signed long long'
cristy6d5e20f2011-04-25 13:48:54 +00001114 INT64_F='"ll"'
cristy3ed852e2009-09-05 21:47:34 +00001115fi
cristy3a99dcf2011-12-17 01:29:40 +00001116case "${host_os}" in
cristy6d5e20f2011-04-25 13:48:54 +00001117 mingw* )
1118 INT64_F='"I64"'
1119 ;;
1120esac
cristyad38abe2012-12-23 23:03:21 +00001121AC_MSG_RESULT($INT64_T)
cristy3ed852e2009-09-05 21:47:34 +00001122AC_SUBST(INT64_T)
cristy6d5e20f2011-04-25 13:48:54 +00001123AC_SUBST(INT64_F)
cristy3ed852e2009-09-05 21:47:34 +00001124
1125AC_MSG_CHECKING(for unsigned 64-bit type)
1126UINT64_T='none'
cristy6d5e20f2011-04-25 13:48:54 +00001127UINT64_F='none'
cristy3ed852e2009-09-05 21:47:34 +00001128if test $ac_cv_sizeof_unsigned_long -eq 8; then
1129 UINT64_T='unsigned long'
cristy6d5e20f2011-04-25 13:48:54 +00001130 UINT64_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +00001131elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then
1132 UINT64_T='unsigned long long'
cristy6d5e20f2011-04-25 13:48:54 +00001133 UINT64_F='"ll"'
cristy3ed852e2009-09-05 21:47:34 +00001134fi
cristy3a99dcf2011-12-17 01:29:40 +00001135case "${host_os}" in
cristy6d5e20f2011-04-25 13:48:54 +00001136 mingw* )
1137 UINT64_F='"I64"'
1138 ;;
1139esac
cristyad38abe2012-12-23 23:03:21 +00001140AC_MSG_RESULT($UINT64_T)
cristy3ed852e2009-09-05 21:47:34 +00001141AC_SUBST(UINT64_T)
cristy6d5e20f2011-04-25 13:48:54 +00001142AC_SUBST(UINT64_F)
cristy3ed852e2009-09-05 21:47:34 +00001143
1144AC_MSG_CHECKING(for unsigned maximum type)
1145UINTMAX_T='none'
cristy6d5e20f2011-04-25 13:48:54 +00001146UINTMAX_F='none'
cristy3ed852e2009-09-05 21:47:34 +00001147if test "$UINT64_T" != 'none'; then
1148 UINTMAX_T=$UINT64_T
cristy6d5e20f2011-04-25 13:48:54 +00001149 UINTMAX_F=$UINT64_F
cristy3ed852e2009-09-05 21:47:34 +00001150elif test "$UINT32_T" != 'none'; then
1151 UINTMAX_T=$UINT32_T
cristy6d5e20f2011-04-25 13:48:54 +00001152 UINTMAX_F=$UINT32_F
cristy3ed852e2009-09-05 21:47:34 +00001153fi
cristyad38abe2012-12-23 23:03:21 +00001154AC_MSG_RESULT($UINTMAX_T)
cristy3ed852e2009-09-05 21:47:34 +00001155AC_SUBST(UINTMAX_T)
cristy6d5e20f2011-04-25 13:48:54 +00001156AC_SUBST(UINTMAX_F)
cristy3ed852e2009-09-05 21:47:34 +00001157
1158AC_MSG_CHECKING(for pointer difference type)
1159UINTPTR_T='none'
cristy6d5e20f2011-04-25 13:48:54 +00001160UINTPTR_F='none'
cristy3ed852e2009-09-05 21:47:34 +00001161if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then
1162 UINTPTR_T='unsigned long'
cristy6d5e20f2011-04-25 13:48:54 +00001163 UINTPTR_F='"l"'
cristy3ed852e2009-09-05 21:47:34 +00001164elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then
1165 UINTPTR_T='unsigned long long'
cristy6d5e20f2011-04-25 13:48:54 +00001166 UINTPTR_F='"ll"'
cristy3ed852e2009-09-05 21:47:34 +00001167fi
cristyad38abe2012-12-23 23:03:21 +00001168AC_MSG_RESULT($UINTPTR_T)
cristy3ed852e2009-09-05 21:47:34 +00001169AC_SUBST(UINTPTR_T)
cristy6d5e20f2011-04-25 13:48:54 +00001170AC_SUBST(UINTPTR_F)
cristy3ed852e2009-09-05 21:47:34 +00001171
1172AC_MSG_CHECKING([whether our compiler supports __func__])
1173AC_TRY_COMPILE([],
1174 [{ const char *func = __func__; return(func != 0 ? 0 : 1); }],
cristyad38abe2012-12-23 23:03:21 +00001175 AC_MSG_RESULT([yes]),
1176 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00001177 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
1178 AC_TRY_COMPILE([],
1179 [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }],
cristyad38abe2012-12-23 23:03:21 +00001180 AC_MSG_RESULT([yes])
cristy3ed852e2009-09-05 21:47:34 +00001181 AC_DEFINE(__func__, __FUNCTION__,
1182 [Define to appropriate substitue if compiler does not have __func__]),
cristyad38abe2012-12-23 23:03:21 +00001183 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00001184 AC_DEFINE(__func__, __FILE__,
1185 [Define to appropriate substitue if compiler does not have __func__])))
1186
1187########
1188#
1189# Check for functions
1190#
1191########
cristy3ed852e2009-09-05 21:47:34 +00001192AC_FUNC_CLOSEDIR_VOID
1193AC_FUNC_MMAP
1194AC_FUNC_FORK
1195AC_FUNC_MEMCMP
1196AC_FUNC_SELECT_ARGTYPES
1197AC_FUNC_SETVBUF_REVERSED
1198AC_TYPE_SIGNAL
1199AC_FUNC_STRTOD
cristy7d4a1d62011-10-13 15:54:12 +00001200AC_FUNC_STRERROR_R
cristy3ed852e2009-09-05 21:47:34 +00001201AC_FUNC_VPRINTF
1202
cristy161b9262010-03-20 19:34:32 +00001203#
1204# Find math library
1205#
1206MATH_LIBS=''
1207AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
1208LIBS="$MATH_LIBS $LIBS"
1209AC_SUBST(MATH_LIBS)
1210
cristy85572162013-01-04 19:19:32 +00001211#
1212# Find socket library
1213#
cristy85572162013-01-04 19:19:32 +00001214AC_SEARCH_LIBS(gethostbyname, resolv nsl)
cristy8a5d7f42013-01-06 15:24:33 +00001215AC_SEARCH_LIBS(socket, socket,
1216[
1217 AC_DEFINE([HAVE_SOCKET],[1],[Define to 1 if you have socket support.])
cristyfac03342013-01-12 02:03:32 +00001218 MAGICK_FEATURES="DPC $MAGICK_FEATURES"
cristy8a5d7f42013-01-06 15:24:33 +00001219])
cristy85572162013-01-04 19:19:32 +00001220
Cristy5aceded2016-11-25 09:12:59 -05001221AC_CHECK_FUNCS([acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock clock_getres clock_gettime ctime_r directio erf _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink realpath select seekdir sendfile setlocale socket sqrt setvbuf stat strchr strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vfprintf vfprintf_l vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
cristye43a45e2009-09-28 14:49:00 +00001222
1223#
1224# Check for clock_gettime().
1225#
1226AC_SEARCH_LIBS(clock_gettime, rt,
1227[
1228 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.])
1229 AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME])
cristyda16f162011-02-19 23:52:17 +00001230 AC_COMPILE_IFELSE([
cristye43a45e2009-09-28 14:49:00 +00001231 AC_LANG_PROGRAM(
1232 [[#include <time.h>]],
cristyda16f162011-02-19 23:52:17 +00001233 [[clockid_t clockType = CLOCK_REALTIME;]])],
cristye43a45e2009-09-28 14:49:00 +00001234 [
cristyad38abe2012-12-23 23:03:21 +00001235 AC_MSG_RESULT(yes)
glennrp3fc1c212013-01-10 01:52:32 +00001236 AC_DEFINE([HAVE_CLOCK_REALTIME],[1],
cristye43a45e2009-09-28 14:49:00 +00001237 [Define to 1 if clock_gettime supports CLOCK_REALTIME.])
1238 ],
cristyad38abe2012-12-23 23:03:21 +00001239 AC_MSG_RESULT(no)
cristye43a45e2009-09-28 14:49:00 +00001240 )
1241 ],
1242 [
1243 AC_CHECK_FUNCS([gettimeofday ftime], [break])
1244 ]
1245)
cristy3ed852e2009-09-05 21:47:34 +00001246
1247########
1248#
1249# Check for function prototypes
1250#
1251########
1252
1253AC_CHECK_DECLS([pread, pwrite],[],[],[
1254#include <unistd.h>])
1255
1256AC_CHECK_DECLS([strlcpy],[],[],[
1257#include <strings.h>])
1258
1259AC_CHECK_DECLS([vsnprintf],[],[],[
1260#include <stdio.h>
1261#include <stdarg.h>])
1262
1263########
1264#
1265# C++ Support Tests (For Magick++)
1266#
1267########
1268have_magick_plus_plus='no'
1269if test "$with_magick_plus_plus" = 'yes'; then
1270 OLIBS="$LIBS"
1271 LIBS=''
1272 AC_LANG_PUSH(C++)
1273
1274 # Full set of headers used...
1275 # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception
1276 # functional iomanip iosfwd iostream iterator list string strstream utility
1277 AC_LANG([C++])
1278 AC_PROG_CXX
cristy964cb7f2010-04-25 23:18:00 +00001279 AX_CXX_BOOL
1280 AX_CXX_NAMESPACES
1281 AX_CXX_NAMESPACE_STD
cristy3ed852e2009-09-05 21:47:34 +00001282 AC_CXX_HAVE_STD_LIBS
cristy3ed852e2009-09-05 21:47:34 +00001283 AC_OPENMP([C++])
1284 AC_LANG_POP
1285
1286 AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++])
1287 if \
cristy964cb7f2010-04-25 23:18:00 +00001288 test $ax_cv_cxx_bool = 'yes' && \
cristy964cb7f2010-04-25 23:18:00 +00001289 test $ax_cv_cxx_namespaces = 'yes' && \
cristy3ed852e2009-09-05 21:47:34 +00001290 test $ac_cv_cxx_have_std_libs = 'yes' && \
cristy964cb7f2010-04-25 23:18:00 +00001291 test $ax_cv_cxx_have_std_namespace = 'yes'; then
cristy3ed852e2009-09-05 21:47:34 +00001292 have_magick_plus_plus='yes'
1293 else
1294 have_magick_plus_plus='no (failed tests)'
1295 fi
cristyad38abe2012-12-23 23:03:21 +00001296 AC_MSG_RESULT([$have_magick_plus_plus])
cristy3ed852e2009-09-05 21:47:34 +00001297 LIBS="$OLIBS"
1298fi
1299AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes')
1300
1301# Only check for delegate libraries in subdirectories if requested.
1302if test "$enable_delegate_build" != 'no'; then
1303 # Check for delegate sub-directories and add -I & -L options as required.
1304 # This presumes that delegates are installed as detailed in the ImageMagick
1305 # README. If delegates are installed in a standard location where the
1306 # compiler will automatically find them then these options should not be
1307 # required.
1308
1309 #
1310 # Most delegates have includes in the same directory as the library, but not all...
1311 #
1312 # Includes
cristy834307f2015-01-25 00:43:41 +00001313 for dir in bzlib fftw fpx gslib/src jp2 jbig/libjbig jpeg lcms/include lzma magick openjp2/include png tiff/libtiff ttf/include wand webp/src wmf/include xml/include zlib; do
cristy3ed852e2009-09-05 21:47:34 +00001314 if test -d "$builddir/$dir"; then
1315 CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
1316 else
1317 if test -d "$srcdirfull/$dir"; then
1318 CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
1319 fi
1320 fi
1321 done
1322
1323 # Libraries
cristy834307f2015-01-25 00:43:41 +00001324 for dir in bzlib fftw fpx gslib/src jbig/libjbig jpeg lcms/src lzma magick openjp2 png tiff/libtiff ttf/objs wand webp wmf/src xml zlib; do
cristy3ed852e2009-09-05 21:47:34 +00001325 if test -d "$builddir/$dir/.libs"; then
1326 LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
1327 else
1328 if test -d "$srcdirfull/$dir/.libs"; then
1329 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs"
1330 fi
1331 fi
1332 if test -d "$builddir/$dir"; then
1333 LDFLAGS="$LDFLAGS -L$builddir/$dir"
1334 else
1335 if test -d "$srcdirfull/$dir"; then
1336 LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
1337 fi
1338 fi
1339 done
1340fi
1341
1342# Assume that delegate headers reside under same directory as ImageMagick
1343# installation prefix.
cristybdabdd62013-03-04 17:43:36 +00001344MAGICK_CPPFLAGS="-I$INCLUDE_DIR/${PACKAGE_NAME}-$MAGICK_MAJOR_VERSION $MAGICK_CPPFLAGS"
cristy3ed852e2009-09-05 21:47:34 +00001345
1346#
1347# Find the X11 RGB database
1348#
1349AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure,
1350[# Look for the header file in a standard set of common directories.
1351# Check X11 before X11Rn because it is often a symlink to the current release.
1352 for ac_dir in \
1353 /lib/usr/lib/X11 \
1354 /usr/X11/lib \
1355 /usr/X11R4/lib \
1356 /usr/X11R5/lib \
1357 /usr/X11R6/lib \
1358 /usr/X11R7/lib \
1359 /usr/X386/lib \
1360 /usr/XFree86/lib/X11 \
1361 /usr/athena/lib \
1362 /usr/lib \
1363 /usr/lib/X11 \
1364 /usr/lib/X11R4 \
1365 /usr/lib/X11R5 \
1366 /usr/lib/X11R6 \
1367 /usr/lib/X11R7 \
1368 /usr/local/X11/lib \
1369 /usr/local/X11R4/lib \
1370 /usr/local/X11R5/lib \
1371 /usr/local/X11R6/lib \
1372 /usr/local/lib \
1373 /usr/local/lib/X11 \
1374 /usr/local/lib/X11R4 \
1375 /usr/local/lib/X11R5 \
1376 /usr/local/lib/X11R6 \
1377 /usr/local/lib/X11R7 \
1378 /usr/local/x11r5/lib \
1379 /usr/lpp/Xamples/lib \
1380 /usr/openwin/lib \
1381 /usr/openwin/share/lib \
1382 /usr/unsupported/lib \
1383 /usr/x386/lib \
1384 ; do
1385 if test -f "$ac_dir/X11/rgb.txt"; then
1386 im_cv_x_configure="$ac_dir/X11/"
1387 break
1388 elif test -f "$ac_dir/rgb.txt"; then
1389 im_cv_x_configure="$ac_dir/"
1390 break
1391 fi
1392
1393 done])
1394X11_CONFIGURE_PATH="$im_cv_x_configure"
1395case "${build_os}" in
1396 mingw* )
1397 X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1`
1398 ;;
1399esac
cristy9c151dc2012-12-02 22:30:16 +00001400AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",[Location of X11 configure files])
cristy3ed852e2009-09-05 21:47:34 +00001401
1402#
1403# Find OpenMP library
1404#
1405GOMP_LIBS=''
1406if test "$enable_openmp" != 'no'; then
1407 if test "${GCC}" = "yes"; then
cristy18307f12011-12-30 01:20:16 +00001408 # Open64 (passes for GCC but uses different OpenMP implementation)
1409 if test "x$GOMP_LIBS" = x ; then
1410 if $CC --version 2>&1 | grep Open64 > /dev/null ; then
1411 AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,)
1412 fi
1413 fi
Cristy530d3d72016-08-07 08:42:26 -04001414 # Clang (passes for GCC but uses different OpenMP implementation)
1415 if test "x$LIB_OMP" = x ; then
1416 if $CC --version 2>&1 | grep clang > /dev/null ; then
1417 AC_CHECK_LIB(omp,GOMP_parallel_start,LIB_OMP="-lomp",,)
1418 fi
1419 fi
cristy18307f12011-12-30 01:20:16 +00001420 # GCC
1421 if test "x$GOMP_LIBS" = x ; then
1422 AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
1423 fi
cristy3ed852e2009-09-05 21:47:34 +00001424 else
cristy18307f12011-12-30 01:20:16 +00001425 # Sun CC
1426 if test "x$GOMP_LIBS" = x ; then
1427 AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
1428 fi
1429 # AIX xlc
1430 if test "x$GOMP_LIBS" = x ; then
1431 AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,)
1432 fi
1433 # SGI IRIX 6.5 MIPSpro C/C++
1434 if test "x$GOMP_LIBS" = x ; then
1435 AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,)
1436 fi
cristy3ed852e2009-09-05 21:47:34 +00001437 fi
1438 LIBS="$GOMP_LIBS $LIBS"
1439fi
1440AC_SUBST(GOMP_LIBS)
1441
cristy12ac8192014-11-04 13:59:13 +00001442#
cristy3b0097d2014-11-04 15:34:47 +00001443# Check for jemalloc.
cristy12ac8192014-11-04 13:59:13 +00001444#
cristy3b0097d2014-11-04 15:34:47 +00001445have_jemalloc='no'
1446JEMALLOC_LIBS=''
1447if test "$with_jemalloc" != 'no'; then
1448 AC_MSG_CHECKING(for JEMALLOC support )
1449 AC_MSG_RESULT()
1450 failed=0
1451 passed=0
cristy22007ae2014-11-04 15:59:22 +00001452 AC_CHECK_HEADER([jemalloc/jemalloc.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1453 AC_CHECK_LIB(jemalloc,[malloc_stats_print],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
cristy3b0097d2014-11-04 15:34:47 +00001454 AC_MSG_CHECKING(if jemalloc memory allocation library is complete)
1455 if test $passed -gt 0; then
1456 if test $failed -gt 0; then
1457 AC_MSG_RESULT(no -- some components failed test)
1458 have_jemalloc='no (failed tests)'
1459 else
1460 JEMALLOC_LIBS='-ljemalloc'
1461 LIBS="$JEMALLOC_LIBS $LIBS"
1462 AC_DEFINE(HasJEMALLOC,1,Define if you have jemalloc memory allocation library)
1463 AC_MSG_RESULT(yes)
1464 have_jemalloc='yes'
1465 fi
1466 else
1467 AC_MSG_RESULT(no)
1468 fi
1469fi
1470AM_CONDITIONAL(HasJEMALLOC, test "$have_jemalloc" = 'yes')
1471AC_SUBST(JEMALLOC_LIBS)
cristy3ed852e2009-09-05 21:47:34 +00001472
1473#
1474# Check for umem.
1475#
1476have_umem='no'
1477UMEM_LIBS=''
1478if test "$with_umem" != 'no'; then
1479 AC_MSG_CHECKING(for UMEM support )
cristyad38abe2012-12-23 23:03:21 +00001480 AC_MSG_RESULT()
cristy3ed852e2009-09-05 21:47:34 +00001481 failed=0
1482 passed=0
1483 AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1484 AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1485 AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1486 AC_MSG_CHECKING(if umem memory allocation library is complete)
1487 if test $passed -gt 0; then
1488 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00001489 AC_MSG_RESULT(no -- some components failed test)
cristy3ed852e2009-09-05 21:47:34 +00001490 have_umem='no (failed tests)'
1491 else
1492 UMEM_LIBS='-lumem'
1493 LIBS="$UMEM_LIBS $LIBS"
1494 AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
cristyad38abe2012-12-23 23:03:21 +00001495 AC_MSG_RESULT(yes)
cristy3ed852e2009-09-05 21:47:34 +00001496 have_umem='yes'
1497 fi
1498 else
cristyad38abe2012-12-23 23:03:21 +00001499 AC_MSG_RESULT(no)
cristy3ed852e2009-09-05 21:47:34 +00001500 fi
1501fi
1502AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
1503AC_SUBST(UMEM_LIBS)
1504
1505#
1506# Add support for ccmalloc memory debugging library if requested
1507#
1508have_ccmalloc='no'
1509CCMALLOC_LIBS=''
1510if test "$enable_ccmalloc" = 'yes'; then
1511 AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,)
1512 if test -n "$CCMALLOCDelegate"; then
1513 eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'`
1514 OLIBS="$LIBS"
1515 # Assume that gcc is used with ccmalloc.
1516 LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o"
1517 AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl)
1518 if test -n "$CCMALLOC_LIBS"; then
1519 LIBS="$OLIBS"
1520 LIBS="$LIBS $CCMALLOC_LIBS"
1521 have_ccmalloc='yes'
1522 else
1523 LIBS="$OLIBS"
1524 fi
1525 fi
1526fi
1527
1528#
cristy944e51f2013-04-16 18:45:02 +00001529# Add support for 'huge pages' if requested
1530#
1531AS_IF([test "x$enable_hugepages" != "xno"],[
1532 AC_DEFINE(HAVE_HUGEPAGES, 1, [Compile with hugepage support])
1533])
1534
1535#
cristy3ed852e2009-09-05 21:47:34 +00001536# Add support for efence memory debugging library if requested
1537#
1538if test "$enable_efence" = 'yes'; then
1539 EFENCE_LIBS='-lefence'
1540 LIBS="$EFENCE_LIBS $LIBS"
1541fi
1542
cristy3ed852e2009-09-05 21:47:34 +00001543dnl ===========================================================================
1544
1545#
1546# Check for BZLIB
1547#
1548
1549AC_ARG_WITH([bzlib],
1550 [AC_HELP_STRING([--without-bzlib],
1551 [disable BZLIB support])],
1552 [with_bzlib=$withval],
1553 [with_bzlib='yes'])
1554
1555if test "$with_bzlib" != 'yes'; then
1556 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib "
1557fi
1558
1559have_bzlib='no'
1560if test "$with_bzlib" != 'no'; then
1561 BZLIB_LIBS=''
cristyad38abe2012-12-23 23:03:21 +00001562 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00001563 AC_MSG_CHECKING([for BZLIB])
cristyad38abe2012-12-23 23:03:21 +00001564 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00001565 failed=0
1566 passed=0
1567 found_libbz=0
1568 AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1569 AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,)
1570 if test "$native_win32_build" = 'yes'; then
1571 AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,)
1572 fi
1573 if test $found_libbz -gt 0; then
1574 passed=`expr $passed + 1`
1575 else
1576 failed=`expr $failed + 1`
1577 fi
1578 AC_MSG_CHECKING(if BZLIB package is complete)
1579 if test $passed -gt 0; then
1580 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00001581 AC_MSG_RESULT(no -- some components failed test)
cristy3ed852e2009-09-05 21:47:34 +00001582 have_bzlib='no (failed tests)'
1583 else
1584 BZLIB_LIBS='-lbz2'
1585 LIBS="$BZLIB_LIBS $LIBS"
1586 AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library)
cristyad38abe2012-12-23 23:03:21 +00001587 AC_MSG_RESULT(yes)
cristy3ed852e2009-09-05 21:47:34 +00001588 have_bzlib='yes'
1589 fi
1590 else
cristyad38abe2012-12-23 23:03:21 +00001591 AC_MSG_RESULT(no)
cristy3ed852e2009-09-05 21:47:34 +00001592 fi
1593fi
1594AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes')
1595AC_SUBST(BZLIB_LIBS)
1596
1597#
1598# Find the X11 include and library directories.
1599#
1600IPC_LIBS=''
1601X11_LIBS=''
1602XEXT_LIBS=''
1603XT_LIBS=''
1604AC_PATH_XTRA
1605if test "$no_x" != 'yes'; then
cristyad38abe2012-12-23 23:03:21 +00001606 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00001607 AC_MSG_CHECKING([for X11])
cristyad38abe2012-12-23 23:03:21 +00001608 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00001609 LDFLAGS="$LDFLAGS $X_LIBS"
1610 X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
1611 LIBS="$X11_LIBS $LIBS"
1612 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1613
1614 AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl
1615
1616 #
1617 # Check for X11 shared memory extension
1618 #
1619 # shmctl is required to support the shared memory extension
1620 AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[])
1621 if test "$have_shmctl" != 'yes'; then
1622 PERSIST_LIBS=$LIBS
1623 LIBS="$LIBS -lcygipc"
1624 AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[])
1625 LIBS=$PERSIST_LIBS
1626 fi
1627
1628 if test "$have_shmctl" = 'yes'; then
1629 AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[])
1630 fi
1631
1632 #
1633 # Check for X11 shape extension
1634 #
1635 AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[])
1636 AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,)
1637 LIBS="$XEXT_LIBS $XT_LIBS $LIBS"
1638fi
1639if test "$no_x" != 'yes'; then
1640 have_x='yes'
1641else
1642 have_x='no'
1643fi
1644AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes')
1645AC_SUBST(X11_LIBS)
1646AC_SUBST(XEXT_LIBS)
1647
1648dnl ===========================================================================
1649
1650#
1651# Check for ZLIB
1652#
1653AC_ARG_WITH([zlib],
1654 [AC_HELP_STRING([--without-zlib],
1655 [disable ZLIB support])],
1656 [with_zlib=$withval],
1657 [with_zlib='yes'])
1658
1659if test "$with_zlib" != 'yes'; then
1660 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib "
1661fi
1662
1663have_zlib='no'
cristy32f75d42015-06-05 18:46:23 +00001664ZLIB_CFLAGS=""
1665ZLIB_LIBS=""
1666ZLIB_PKG=""
1667if test "x$with_zlib" = "xyes"; then
1668 AC_MSG_RESULT([-------------------------------------------------------------])
1669 PKG_CHECK_MODULES(ZLIB,[zlib >= 1.0.0], have_zlib=yes, have_zlib=no)
1670 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00001671fi
cristy32f75d42015-06-05 18:46:23 +00001672
1673if test "$have_zlib" = 'yes'; then
1674 AC_DEFINE(ZLIB_DELEGATE,1,Define if you have ZLIB library)
1675 CFLAGS="$ZLIB_CFLAGS $CFLAGS"
Cristyb94e76e2017-06-22 19:18:20 -04001676 LIBS="$ZLIB_LIBS $LIBS"
cristy32f75d42015-06-05 18:46:23 +00001677fi
1678
cristy3ed852e2009-09-05 21:47:34 +00001679AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes')
cristy32f75d42015-06-05 18:46:23 +00001680AC_SUBST(ZLIB_CFLAGS)
cristy3ed852e2009-09-05 21:47:34 +00001681AC_SUBST(ZLIB_LIBS)
1682
cristy32f75d42015-06-05 18:46:23 +00001683dnl ===========================================================================
1684
cristy5eef09f2012-10-16 12:08:28 +00001685# whether modules are built or not.
1686with_ltdl='yes'
1687have_ltdl='no'
1688LTDL_LIBS=''
1689if test "$build_modules" != 'no' ; then
cristyad38abe2012-12-23 23:03:21 +00001690 AC_MSG_RESULT([-------------------------------------------------------------])
cristy5eef09f2012-10-16 12:08:28 +00001691 AC_MSG_CHECKING([for libltdl])
cristyad38abe2012-12-23 23:03:21 +00001692 AC_MSG_RESULT([])
cristy5eef09f2012-10-16 12:08:28 +00001693 failed=0
1694 passed=0
cristyaf4cbf32012-10-16 23:47:41 +00001695 AC_CHECK_HEADER([ltdl.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
1696 AC_CHECK_LIB([ltdl],[lt_dlinit],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
1697 AC_MSG_CHECKING([if libltdl package is complete])
cristy5eef09f2012-10-16 12:08:28 +00001698 if test $passed -gt 0 ; then
1699 if test $failed -gt 0 ; then
cristyaf4cbf32012-10-16 23:47:41 +00001700 AC_MSG_RESULT([no -- some components failed test])
cristy5eef09f2012-10-16 12:08:28 +00001701 have_ltdl='no (failed tests)'
1702 else
1703 LTDL_LIBS='-lltdl'
1704 LIBS="$LTDL_LIBS $LIBS"
cristyaf4cbf32012-10-16 23:47:41 +00001705 AC_DEFINE(LTDL_DELEGATE,1,[Define if using libltdl to support dynamically loadable modules])
1706 AC_MSG_RESULT([yes])
cristy5eef09f2012-10-16 12:08:28 +00001707 have_ltdl='yes'
1708 fi
1709 else
cristyaf4cbf32012-10-16 23:47:41 +00001710 AC_MSG_RESULT([no])
1711 fi
1712 if test "$have_ltdl" != 'yes' ; then
1713 AC_MSG_FAILURE([libltdl is required for modules build],[1])
cristy5eef09f2012-10-16 12:08:28 +00001714 fi
1715fi
1716AM_CONDITIONAL(WITH_LTDL, test "$have_ltdl" != 'no')
1717
cristy3ed852e2009-09-05 21:47:34 +00001718#
1719# If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
1720#
1721LIB_DL=''
1722if test "$enable_profiling" = 'yes'; then
1723 AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,)
1724 LIBS="$LIB_DL $LIBS"
1725fi
1726AC_SUBST(LIB_DL)
1727
1728dnl ===========================================================================
1729
1730#
cristy5a3dc992014-12-05 19:50:04 +00001731# Set Apple font directory.
1732#
1733AC_ARG_WITH([apple-font-dir],
1734 [AC_HELP_STRING([--with-apple-font-dir=DIR],
1735 [Apple font directory])],
1736 [with_apple_font_dir=$withval],
1737 [with_apple_font_dir='default'])
1738
1739if test "$with_apple_font_dir" != 'default'; then
1740 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-apple-font-dir=$with_apple_font_dir "
1741fi
1742
1743dnl ===========================================================================
1744
1745#
cristy3ed852e2009-09-05 21:47:34 +00001746# Check for Autotrace delegate library.
1747#
1748AC_ARG_WITH([autotrace],
1749 [AC_HELP_STRING([--with-autotrace],
1750 [enable autotrace support])],
1751 [with_autotrace=$withval],
1752 [with_autotrace='no'])
1753
1754if test "$with_autotrace" != 'yes'; then
1755 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace "
1756fi
1757
1758have_autotrace='no'
1759AUTOTRACE_CFLAGS=""
1760AUTOTRACE_LIBS=""
1761AUTOTRACE_PKG=""
1762if test "x$with_autotrace" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00001763 AC_MSG_RESULT([-------------------------------------------------------------])
1764 PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no)
1765 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00001766fi
1767
1768if test "$have_autotrace" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00001769 AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library)
1770 CFLAGS="$AUTOTRACE_CFLAGS $CFLAGS"
cristy3ed852e2009-09-05 21:47:34 +00001771fi
1772
1773AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes')
1774AC_SUBST(AUTOTRACE_CFLAGS)
1775AC_SUBST(AUTOTRACE_LIBS)
1776
1777dnl ===========================================================================
1778
1779#
1780# Check for Display Postscript delegate library.
1781#
1782AC_ARG_WITH([dps],
1783 [AC_HELP_STRING([--without-dps],
1784 [disable Display Postscript support])],
1785 [with_dps=$withval],
1786 [with_dps='yes'])
1787
1788if test "$with_dps" != 'yes'; then
1789 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps "
1790fi
1791
1792have_dps='no'
1793DPS_LIBS=''
1794if test "$with_dps" != 'no' && test "$with_x" != 'no'; then
cristyad38abe2012-12-23 23:03:21 +00001795 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00001796 AC_MSG_CHECKING([for DPS])
cristyad38abe2012-12-23 23:03:21 +00001797 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00001798 failed=0
1799 passed=0
1800 PERSIST_CPPFLAGS="$CPPFLAGS"
1801 CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
1802 AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1803 # DPS issues:
1804 # XFree86-4.x needs -lXt to provide XtMalloc for -ldps.
1805 # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build.
1806 # Adobe DPS (as delivered on Solaris) doesn't require -lXt.
1807 # ImageMagick itself doesn't use -lXt.
1808 have_libdps='no'
1809 LIBDPS_XT=''
1810 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',)
1811 if test "$have_libdps" != 'yes'; then
1812 # Unset cache variable so we can try again.
1813 unset ac_cv_lib_dps_DPSInitialize
1814 AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt)
1815 if test "$have_libdps" = 'yes'; then
1816 LIBDPS_XT='-lXt'
1817 fi
1818 fi
1819 if test "$have_libdps" = 'yes'; then
1820 passed=`expr $passed + 1`
1821 else
1822 failed=`expr $failed + 1`
1823 fi
1824 AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT)
1825 AC_MSG_CHECKING([if DPS package is complete])
1826 if test $passed -gt 0; then
1827 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00001828 AC_MSG_RESULT([no -- some components failed test])
cristy3ed852e2009-09-05 21:47:34 +00001829 have_dps='no (failed tests)'
1830 CPPFLAGS="$PERSIST_CPPFLAGS"
1831 else
1832 DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}"
1833 LIBS="$DPS_LIBS $LIBS"
1834 AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript)
cristyad38abe2012-12-23 23:03:21 +00001835 AC_MSG_RESULT([yes])
cristy3ed852e2009-09-05 21:47:34 +00001836 have_dps='yes'
1837 fi
1838 else
cristyad38abe2012-12-23 23:03:21 +00001839 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00001840 CPPFLAGS=$PERSIST_CPPFLAGS
1841 fi
1842fi
1843AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes')
1844AC_SUBST(DPS_LIBS)
1845
1846dnl ===========================================================================
1847
1848#
cristy430a7312010-01-21 20:44:04 +00001849# Set DejaVu font directory.
1850#
1851AC_ARG_WITH([dejavu-font-dir],
1852 [AC_HELP_STRING([--with-dejavu-font-dir=DIR],
1853 [DejaVu font directory])],
1854 [with_dejavu_font_dir=$withval],
1855 [with_dejavu_font_dir='default'])
1856
1857if test "$with_dejavu_font_dir" != 'default'; then
1858 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir "
1859fi
1860
1861dnl ===========================================================================
1862
1863#
cristy3ed852e2009-09-05 21:47:34 +00001864# Check for FFTW delegate library.
1865#
cristy81beccd2011-10-03 18:17:24 +00001866AC_ARG_WITH([fftw],
cristy3ed852e2009-09-05 21:47:34 +00001867 [AC_HELP_STRING([--without-fftw],
1868 [disable FFTW support])],
1869 [with_fftw=$withval],
1870 [with_fftw='yes'])
1871
1872if test "$with_fftw" != 'yes'; then
1873 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw "
1874fi
1875
cristy81beccd2011-10-03 18:17:24 +00001876have_fftw='no'
cristy32f75d42015-06-05 18:46:23 +00001877FFTW_CFLAGS=""
1878FFTW_LIBS=""
1879FFTW_PKG=""
1880if test "x$with_fftw" = "xyes"; then
1881 AC_MSG_RESULT([-------------------------------------------------------------])
1882 PKG_CHECK_MODULES(fftw3,[fftw3 >= 3.0.0], have_fftw=yes, have_fftw=no)
1883 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00001884fi
cristy32f75d42015-06-05 18:46:23 +00001885
1886if test "$have_fftw" = 'yes'; then
1887 AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library)
cristyb74ab6e2015-06-06 12:39:54 +00001888 FFTW_CFLAGS="$fftw3_CFLAGS"
1889 FFTW_LIBS="$fftw3_LIBS"
cristy32f75d42015-06-05 18:46:23 +00001890 CFLAGS="$fftw3_CFLAGS $CFLAGS"
1891fi
1892
cristy3ed852e2009-09-05 21:47:34 +00001893AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes')
cristy32f75d42015-06-05 18:46:23 +00001894AC_SUBST(FFTW_CFLAGS)
cristy3ed852e2009-09-05 21:47:34 +00001895AC_SUBST(FFTW_LIBS)
1896
1897dnl ===========================================================================
1898
1899#
Cristy6d2f14b2016-04-26 01:41:09 -04001900# Check for FLIF delegate library.
1901#
1902AC_ARG_WITH(flif,
1903 [AC_HELP_STRING([--without-flif],
1904 [disable FLIF support])],
1905 [with_flif=$withval],
1906 [with_flif='yes'])
1907
1908if test "$with_flif" != 'yes'; then
1909 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-flif=$with_flif "
1910fi
1911
1912have_flif='no'
1913FLIF_LIBS=''
1914if test "$with_flif" != 'no'; then
1915 AC_MSG_RESULT([-------------------------------------------------------------])
1916 AC_MSG_CHECKING([for FLIF])
1917 AC_MSG_RESULT([])
1918 failed=0
1919 passed=0
1920 AC_CHECK_HEADER(flif.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1921 AC_CHECK_LIB(flif,flif_create_decoder,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1922 AC_MSG_CHECKING([if FLIF package is complete])
1923 if test $passed -gt 0; then
1924 if test $failed -gt 0; then
1925 AC_MSG_RESULT([no -- some components failed test])
1926 have_flif='no (failed tests)'
1927 else
1928 FLIF_LIBS='-lflif'
1929 LIBS="$FLIF_LIBS $LIBS"
1930 AC_DEFINE(FLIF_DELEGATE,1,Define if you have FLIF library)
1931 AC_MSG_RESULT([yes])
1932 have_flif='yes'
1933 fi
1934 else
1935 AC_MSG_RESULT([no])
1936 fi
1937fi
1938AM_CONDITIONAL(FLIF_DELEGATE,test "$have_flif" = 'yes')
1939AC_SUBST(FLIF_LIBS)
1940
1941dnl ===========================================================================
1942
1943#
cristy3ed852e2009-09-05 21:47:34 +00001944# Check for FlashPIX delegate library.
1945#
1946AC_ARG_WITH([fpx],
1947 [AC_HELP_STRING([--without-fpx],
1948 [disable FlashPIX support])],
1949 [with_fpx=$withval],
1950 [with_fpx='yes'])
1951
1952if test "$with_fpx" != 'yes'; then
1953 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx "
1954fi
1955
1956have_fpx='no'
1957FPX_LIBS=''
1958if test "$with_fpx" != 'no'; then
cristyad38abe2012-12-23 23:03:21 +00001959 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00001960 AC_MSG_CHECKING([for FlashPIX])
cristyad38abe2012-12-23 23:03:21 +00001961 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00001962 failed=0
1963 passed=0
1964 AC_LANG_PUSH(C++)
1965 AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
1966 AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
1967 AC_LANG_POP
1968 AC_MSG_CHECKING([if FlashPIX package is complete])
1969 if test $passed -gt 0; then
1970 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00001971 AC_MSG_RESULT([no -- some components failed test])
cristy3ed852e2009-09-05 21:47:34 +00001972 have_fpx='no (failed tests)'
1973 else
1974 FPX_LIBS='-lfpx'
1975 AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library)
cristyad38abe2012-12-23 23:03:21 +00001976 AC_MSG_RESULT([yes])
cristy3ed852e2009-09-05 21:47:34 +00001977 have_fpx='yes'
1978 PERLMAINCC="$CXX"
1979 fi
1980 else
cristyad38abe2012-12-23 23:03:21 +00001981 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00001982 fi
1983fi
1984AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes')
1985AC_SUBST(FPX_LIBS)
cristy853d9902014-08-21 18:50:43 +00001986
1987dnl ===========================================================================
1988
1989#
1990# Check for DJVU delegate library.
1991#
1992AC_ARG_WITH([djvu],
1993 [AC_HELP_STRING([--without-djvu],
1994 [disable DjVu support])],
1995 [with_djvu=$withval],
1996 [with_djvu='yes'])
1997
1998if test "$with_djvu" != 'yes'; then
1999 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu "
2000fi
2001
2002have_djvu='no'
cristy32f75d42015-06-05 18:46:23 +00002003DJVU_CFLAGS=""
2004DJVU_LIBS=""
2005DJVU_PKG=""
2006if test "x$with_djvu" = "xyes"; then
2007 AC_MSG_RESULT([-------------------------------------------------------------])
2008 PKG_CHECK_MODULES(ddjvuapi,[ddjvuapi >= 3.5.0], have_djvu=yes, have_djvu=no)
2009 AC_MSG_RESULT([])
cristy853d9902014-08-21 18:50:43 +00002010fi
cristy32f75d42015-06-05 18:46:23 +00002011
2012if test "$have_djvu" = 'yes'; then
2013 AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library)
cristyc83c2cc2015-06-06 16:35:26 +00002014 DJVU_CFLAGS="$ddjvuapi_CFLAGS"
2015 DJVU_LIBS="$ddjvuapi_LIBS"
2016 CFLAGS="$ddjvuapi_CFLAGS $CFLAGS"
cristy32f75d42015-06-05 18:46:23 +00002017fi
2018
cristy853d9902014-08-21 18:50:43 +00002019AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes')
cristy32f75d42015-06-05 18:46:23 +00002020AC_SUBST(DJVU_CFLAGS)
cristy853d9902014-08-21 18:50:43 +00002021AC_SUBST(DJVU_LIBS)
cristy3ed852e2009-09-05 21:47:34 +00002022
2023dnl ===========================================================================
2024
2025#
2026# Check for fontconfig delegate library.
2027#
2028AC_ARG_WITH([fontconfig],
2029 [AC_HELP_STRING([--without-fontconfig],
2030 [disable fontconfig support])],
2031 [with_fontconfig=$withval],
cristyfc3d0222012-02-07 15:05:57 +00002032 [with_fontconfig='yes'])
cristy3ed852e2009-09-05 21:47:34 +00002033
2034if test "$with_fontconfig" != 'yes'; then
2035 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig "
2036fi
2037
2038have_fontconfig='no'
2039FONTCONFIG_CFLAGS=""
2040FONTCONFIG_LIBS=""
2041FONTCONFIG_PKG=""
2042if test "x$with_fontconfig" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002043 AC_MSG_RESULT([-------------------------------------------------------------])
2044 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no)
2045 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002046fi
2047
2048if test "$have_fontconfig" = 'yes'; then
cristyd09bcf92010-03-25 03:04:45 +00002049 AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library)
cristy32f75d42015-06-05 18:46:23 +00002050 CFLAGS="$FONTCONFIG_CFLAGS $CFLAGS"
cristy3ed852e2009-09-05 21:47:34 +00002051fi
2052
2053AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes')
2054AC_SUBST(FONTCONFIG_CFLAGS)
2055AC_SUBST(FONTCONFIG_LIBS)
2056
2057dnl ===========================================================================
2058
2059#
cristy03f187e2013-01-24 00:22:19 +00002060# Check for the Freetype delegate library.
cristy3ed852e2009-09-05 21:47:34 +00002061#
cristy81beccd2011-10-03 18:17:24 +00002062AC_ARG_WITH([freetype],
cristy3ed852e2009-09-05 21:47:34 +00002063 [AC_HELP_STRING([--without-freetype],
cristy81beccd2011-10-03 18:17:24 +00002064 [disable Freetype support])],
cristy3ed852e2009-09-05 21:47:34 +00002065 [with_freetype=$withval],
2066 [with_freetype='yes'])
2067
cristy3ed852e2009-09-05 21:47:34 +00002068if test "$with_freetype" != 'yes'; then
2069 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype "
2070fi
2071
cristy81beccd2011-10-03 18:17:24 +00002072have_freetype='no'
cristy03f187e2013-01-24 00:22:19 +00002073FREETYPE_CFLAGS=""
2074FREETYPE_LIBS=""
2075FREETYPE_PKG=""
2076if test "x$with_freetype" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002077 AC_MSG_RESULT([-------------------------------------------------------------])
2078 PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no)
2079 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002080fi
cristy03f187e2013-01-24 00:22:19 +00002081
2082if test "$have_freetype" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002083 AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library)
2084 CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
cristy03f187e2013-01-24 00:22:19 +00002085fi
2086
cristy98ca0f52011-10-08 23:19:10 +00002087AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes')
cristy03f187e2013-01-24 00:22:19 +00002088AC_SUBST(FREETYPE_CFLAGS)
cristy3ed852e2009-09-05 21:47:34 +00002089AC_SUBST(FREETYPE_LIBS)
2090
2091dnl ===========================================================================
2092
cristy3ed852e2009-09-05 21:47:34 +00002093#
Cristy17f8c722016-01-31 09:42:56 -05002094# Check for the raqm delegate library.
2095#
2096AC_ARG_WITH([raqm],
2097 [AC_HELP_STRING([--without-raqm],
2098 [disable Raqm support])],
2099 [with_raqm=$withval],
2100 [with_raqm='yes'])
2101
2102if test "$with_raqm" != 'yes'; then
2103 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-raqm=$with_raqm "
2104fi
2105
2106have_raqm='no'
2107RAQM_CFLAGS=""
2108RAQM_LIBS=""
2109RAQM_PKG=""
2110if test "x$with_raqm" = "xyes"; then
2111 AC_MSG_RESULT([-------------------------------------------------------------])
2112 PKG_CHECK_MODULES(RAQM,[raqm], have_raqm=yes, have_raqm=no)
2113 AC_MSG_RESULT([])
2114fi
2115
2116if test "$have_raqm" = 'yes'; then
2117 AC_DEFINE(RAQM_DELEGATE,1,Define if you have RAQM library)
2118 CFLAGS="$RAQM_CFLAGS $CFLAGS"
2119fi
2120
2121AM_CONDITIONAL(RAQM_DELEGATE, test "$have_raqm" = 'yes')
2122AC_SUBST(RAQM_CFLAGS)
2123AC_SUBST(RAQM_LIBS)
2124
2125dnl ===========================================================================
2126
2127#
cristy3ed852e2009-09-05 21:47:34 +00002128# Check for Ghostscript library or framework.
2129#
2130# Test for iapi.h & test for gsapi_new_instance in -lgs
2131# or -framework Ghostscript
2132
2133AC_ARG_WITH([gslib],
cristy8d733f42013-03-04 11:27:54 +00002134 [AC_HELP_STRING([--with-gslib],
cristy3ed852e2009-09-05 21:47:34 +00002135 [enable Ghostscript library support])],
2136 [with_gslib=$withval],
2137 [with_gslib='no'])
2138
cristyb7931f12009-09-25 10:22:21 +00002139gslib_framework='no'
cristy3ed852e2009-09-05 21:47:34 +00002140if test "$with_gslib" != 'yes'; then
2141 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib "
2142fi
2143
2144have_gslib='no'
2145GS_LIBS=''
2146if test "$with_gslib" != 'no'; then
cristyad38abe2012-12-23 23:03:21 +00002147 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00002148 AC_MSG_CHECKING([for Ghostscript])
cristyad38abe2012-12-23 23:03:21 +00002149 AC_MSG_RESULT([])
cristyb7931f12009-09-25 10:22:21 +00002150 framework=0
cristy3ed852e2009-09-05 21:47:34 +00002151 failed=0
2152 passed=0
2153 AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`,
2154 failed=`expr $failed + 1`,)
2155 AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`,
2156 failed=`expr $failed + 1`,)
2157 AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`,
2158 AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),)
2159 AC_MSG_CHECKING([if Ghostscript package is complete])
2160 if test $passed -gt 0; then
2161 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00002162 AC_MSG_RESULT([no -- some components failed test])
cristy3ed852e2009-09-05 21:47:34 +00002163 have_gslib='no (failed tests)'
2164 else
2165 if test $framework -gt 0; then
2166 GS_LIBS='-framework Ghostscript'
cristyb7931f12009-09-25 10:22:21 +00002167 gslib_framework='yes'
cristyad38abe2012-12-23 23:03:21 +00002168 AC_MSG_RESULT([yes, using framework.])
cristy3ed852e2009-09-05 21:47:34 +00002169 else
cristyad38abe2012-12-23 23:03:21 +00002170 AC_MSG_RESULT([yes, using library.])
cristy3ed852e2009-09-05 21:47:34 +00002171 GS_LIBS='-lgs'
2172 fi
2173 LIBS="$GS_LIBS $LIBS"
2174 AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework)
2175 have_gslib='yes'
2176 fi
2177 else
cristyad38abe2012-12-23 23:03:21 +00002178 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00002179 fi
2180fi
2181AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes')
2182AC_SUBST(GS_LIBS)
2183
2184# Set default font search path
2185AC_ARG_WITH([fontpath],
2186 [AC_HELP_STRING([--with-fontpath=DIR],
2187 [prepend to default font search path])],
2188 [with_fontpath=$withval],
2189 [with_fontpath=''])
2190
2191if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then
2192 with_fontpath=''
2193else
cristy9c151dc2012-12-02 22:30:16 +00002194 AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",[Define to prepend to default font search path.])
cristy3ed852e2009-09-05 21:47:34 +00002195fi
2196if test "$with_fontpath=" != ''; then
2197 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath "
2198fi
2199
2200# Set Ghostscript font directory
2201AC_ARG_WITH([gs-font-dir],
2202 [AC_HELP_STRING([--with-gs-font-dir=DIR],
2203 [Ghostscript font directory])],
2204 [with_gs_font_dir=$withval],
2205 [with_gs_font_dir='default'])
2206
2207if test "$with_gs_font_dir" != 'default'; then
2208 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir "
2209fi
2210
2211dnl ===========================================================================
2212
2213#
2214# Check for GVC delegate library.
2215#
2216AC_ARG_WITH(gvc,
cristy24aeba92012-06-26 12:22:26 +00002217 [AC_HELP_STRING([--with-gvc],
cristy8d733f42013-03-04 11:27:54 +00002218 [enable GVC support])],
cristy3ed852e2009-09-05 21:47:34 +00002219 [with_gvc=$withval],
cristy86e31f32015-06-06 15:47:32 +00002220 [with_gvc='yes'])
cristy3ed852e2009-09-05 21:47:34 +00002221
2222if test "$with_gvc" != 'yes'; then
2223 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc "
2224fi
2225
2226GVC_PKG=""
2227if test "x$with_gvc" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002228 AC_MSG_RESULT([-------------------------------------------------------------])
2229 PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no)
2230 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002231fi
2232
2233if test "$have_gvc" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002234 AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library)
2235 CFLAGS="$GVC_CFLAGS $CFLAGS"
cristy3ed852e2009-09-05 21:47:34 +00002236fi
2237
2238AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes')
2239AC_SUBST(GVC_CFLAGS)
2240AC_SUBST(GVC_LIBS)
2241
2242dnl ===========================================================================
2243
2244#
2245# Check for JBIG delegate library.
2246#
2247
2248AC_ARG_WITH([jbig],
2249 [AC_HELP_STRING([--without-jbig],
2250 [disable JBIG support])],
2251 [with_jbig=$withval],
2252 [with_jbig='yes'])
2253
2254have_jbig='no'
2255JBIG_LIBS=''
2256if test "$with_jbig" != 'no'; then
cristyad38abe2012-12-23 23:03:21 +00002257 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00002258 AC_MSG_CHECKING([for JBIG])
cristyad38abe2012-12-23 23:03:21 +00002259 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002260 failed=0
2261 passed=0
2262 AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2263 AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2264 AC_MSG_CHECKING([if JBIG package is complete])
2265 if test $passed -gt 0; then
2266 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00002267 AC_MSG_RESULT([no -- some components failed test])
cristy3ed852e2009-09-05 21:47:34 +00002268 have_jbig='no (failed tests)'
2269 else
2270 JBIG_LIBS='-ljbig'
2271 LIBS="$JBIG_LIBS $LIBS"
2272 AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library)
cristyad38abe2012-12-23 23:03:21 +00002273 AC_MSG_RESULT([yes])
cristy3ed852e2009-09-05 21:47:34 +00002274 have_jbig='yes'
2275 fi
2276 else
cristyad38abe2012-12-23 23:03:21 +00002277 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00002278 fi
2279fi
2280AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes')
2281AC_SUBST(JBIG_LIBS)
2282
2283dnl ===========================================================================
2284
2285#
2286# Check for JPEG delegate library.
2287#
2288AC_ARG_WITH([jpeg],
2289 [AC_HELP_STRING([--without-jpeg],
2290 [disable JPEG support])],
2291 [with_jpeg=$withval],
2292 [with_jpeg='yes'])
2293
2294if test "$with_jpeg" != 'yes'; then
2295 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg "
2296fi
2297
2298have_jpeg='no'
2299JPEG_LIBS=''
2300if test "$with_jpeg" != 'no'; then
cristyad38abe2012-12-23 23:03:21 +00002301 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00002302 AC_MSG_CHECKING([for JPEG])
cristyad38abe2012-12-23 23:03:21 +00002303 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002304 failed=0
2305 passed=0
2306 AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2307 AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2308 AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2309 AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2310 AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2311
2312# Test for compatible JPEG library
2313if test "$ac_cv_jpeg_version_ok" != 'yes'; then
2314AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok,
2315[AC_TRY_COMPILE(
2316#include <stdio.h>
2317#include <stdlib.h>
2318#include <jpeglib.h>
2319,
2320changequote(<<, >>)dnl
2321<<
2322#if JPEG_LIB_VERSION < 62
2323#error IJG JPEG library must be version 6b or newer!
2324#endif
2325return 0;
2326>>,
2327changequote([, ])dnl
2328ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`,
2329ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)])
2330fi
2331 AC_MSG_CHECKING([if JPEG package is complete])
2332 if test $passed -gt 0; then
2333 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00002334 AC_MSG_RESULT([no -- some components failed test])
cristy3ed852e2009-09-05 21:47:34 +00002335 have_jpeg='no (failed tests)'
2336 else
2337 JPEG_LIBS='-ljpeg'
2338 LIBS="$JPEG_LIBS $LIBS"
2339 AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library)
cristyad38abe2012-12-23 23:03:21 +00002340 AC_MSG_RESULT([yes])
cristy3ed852e2009-09-05 21:47:34 +00002341 have_jpeg='yes'
2342 fi
2343 else
cristyad38abe2012-12-23 23:03:21 +00002344 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00002345 fi
2346fi
2347AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes')
2348AC_SUBST(JPEG_LIBS)
2349
2350dnl ===========================================================================
2351
2352#
cristy3ed852e2009-09-05 21:47:34 +00002353# Check for LCMS delegate library.
2354#
2355AC_ARG_WITH(lcms,
cristy71203402010-06-18 13:12:03 +00002356 [ --without-lcms disable lcms (v1.1X) support],
2357 [with_lcms=$withval],
2358 [with_lcms='yes'])
2359if test "$with_lcms" != 'yes' ; then
cristy3ed852e2009-09-05 21:47:34 +00002360 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
2361fi
2362
cristy71203402010-06-18 13:12:03 +00002363have_lcms='no'
cristy32f75d42015-06-05 18:46:23 +00002364LCMS_CFLAGS=""
2365LCMS_LIBS=""
2366LCMS_PKG=""
2367if test "x$with_lcms" = "xyes"; then
2368 AC_MSG_RESULT([-------------------------------------------------------------])
cristyb054e072015-06-05 20:35:43 +00002369 PKG_CHECK_MODULES(LCMS2,[lcms2 >= 2.0.0], have_lcms=yes, have_lcms=no)
cristy32f75d42015-06-05 18:46:23 +00002370 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002371fi
cristy71203402010-06-18 13:12:03 +00002372
cristy32f75d42015-06-05 18:46:23 +00002373if test "$have_lcms" = 'yes'; then
2374 AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library)
cristyb74ab6e2015-06-06 12:39:54 +00002375 LCMS_CFLAGS="$LCMS2_CFLAGS"
2376 LCMS_LIBS="$LCMS2_LIBS"
cristyb054e072015-06-05 20:35:43 +00002377 CFLAGS="$LCMS2_CFLAGS $CFLAGS"
cristyd6ac47f2015-06-06 13:46:55 +00002378 AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
2379 if test "$have_lcms_header" = 'yes'; then
2380 AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
cristybc8ef1c2015-06-06 14:32:21 +00002381 else
2382 AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
cristyd6ac47f2015-06-06 13:46:55 +00002383 fi
cristyd09bcf92010-03-25 03:04:45 +00002384fi
cristy32f75d42015-06-05 18:46:23 +00002385
2386AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms" = 'yes')
2387AC_SUBST(LCMS_CFLAGS)
cristy3ed852e2009-09-05 21:47:34 +00002388AC_SUBST(LCMS_LIBS)
2389
2390dnl ===========================================================================
2391
2392#
cristy99db3872014-01-01 15:11:34 +00002393# Check for the OpenJP2 delegate library.
2394#
2395AC_ARG_WITH([openjp2],
2396 [AC_HELP_STRING([--without-openjp2],
2397 [disable OpenJP2 support])],
2398 [with_openjp2=$withval],
2399 [with_openjp2='yes'])
2400
2401if test "$with_openjp2" != 'yes'; then
2402 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openjp2=$with_openjp2 "
2403fi
2404
2405have_openjp2='no'
2406LIBOPENJP2_CFLAGS=""
2407LIBOPENJP2_LIBS=""
2408LIBOPENJP2_PKG=""
2409if test "x$with_openjp2" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002410 AC_MSG_RESULT([-------------------------------------------------------------])
2411 PKG_CHECK_MODULES(LIBOPENJP2,[libopenjp2 >= 2.1.0], have_openjp2=yes, have_openjp2=no)
2412 AC_MSG_RESULT([])
cristy99db3872014-01-01 15:11:34 +00002413fi
2414
2415if test "$have_openjp2" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002416 AC_DEFINE(LIBOPENJP2_DELEGATE,1,Define if you have OPENJP2 library)
2417 CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS"
cristy99db3872014-01-01 15:11:34 +00002418fi
2419
2420AM_CONDITIONAL(LIBOPENJP2_DELEGATE, test "$have_openjp2" = 'yes')
2421AC_SUBST(LIBOPENJP2_CFLAGS)
2422AC_SUBST(LIBOPENJP2_LIBS)
2423
2424
2425dnl ===========================================================================
2426
2427#
cristy3ed852e2009-09-05 21:47:34 +00002428# Check for the LQR (Liquid Rescale) delegate library.
2429#
2430AC_ARG_WITH([lqr],
2431 [AC_HELP_STRING([--without-lqr],
cristyec501352010-03-13 18:43:34 +00002432 [disable Liquid Rescale support])],
cristy3ed852e2009-09-05 21:47:34 +00002433 [with_lqr=$withval],
2434 [with_lqr='yes'])
2435
2436if test "$with_lqr" != 'yes'; then
2437 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr "
2438fi
2439
2440have_lqr='no'
2441LQR_CFLAGS=""
2442LQR_LIBS=""
2443LQR_PKG=""
2444if test "x$with_lqr" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002445 AC_MSG_RESULT([-------------------------------------------------------------])
2446 PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no)
2447 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002448fi
2449
2450if test "$have_lqr" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002451 AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library)
2452 CFLAGS="$LQR_CFLAGS $CFLAGS"
cristy3ed852e2009-09-05 21:47:34 +00002453fi
2454
2455AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes')
2456AC_SUBST(LQR_CFLAGS)
2457AC_SUBST(LQR_LIBS)
2458
2459dnl ===========================================================================
2460
cristy81beccd2011-10-03 18:17:24 +00002461# Disable LZMA (lzma library)
cristyfbb0ef02010-12-19 02:32:11 +00002462AC_ARG_WITH(lzma,
glennrp3fc1c212013-01-10 01:52:32 +00002463 [ --without-lzma disable LZMA support],
2464 [with_lzma=$withval],
2465 [with_lzma='yes'])
cristy81beccd2011-10-03 18:17:24 +00002466if test "$with_lzma" != 'yes' ; then
cristyfbb0ef02010-12-19 02:32:11 +00002467 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma "
2468fi
2469
cristy56bbc922011-11-14 13:18:39 +00002470LZMA_PKG=""
2471if test "x$with_lzma" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002472 AC_MSG_RESULT([-------------------------------------------------------------])
2473 PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no)
2474 AC_MSG_RESULT([])
cristyf805afb2011-10-03 17:17:37 +00002475fi
cristy56bbc922011-11-14 13:18:39 +00002476
2477if test "$have_lzma" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002478 AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library)
2479 CFLAGS="$LZMA_CFLAGS $CFLAGS"
cristy56bbc922011-11-14 13:18:39 +00002480fi
2481
cristyfbb0ef02010-12-19 02:32:11 +00002482AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes')
cristy56bbc922011-11-14 13:18:39 +00002483AC_SUBST(LZMA_CFLAGS)
cristyfbb0ef02010-12-19 02:32:11 +00002484AC_SUBST(LZMA_LIBS)
2485
2486dnl ===========================================================================
2487
cristy3ed852e2009-09-05 21:47:34 +00002488#
2489# Check for the OpenEXR delegate library.
2490#
2491AC_ARG_WITH([openexr],
2492 [AC_HELP_STRING([--without-openexr],
2493 [disable OpenEXR support])],
2494 [with_openexr=$withval],
2495 [with_openexr='yes'])
2496
2497if test "$with_openexr" != 'yes'; then
2498 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr "
2499fi
2500
2501have_openexr='no'
2502OPENEXR_CFLAGS=""
2503OPENEXR_LIBS=""
2504OPENEXR_PKG=""
2505if test "x$with_openexr" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002506 AC_MSG_RESULT([-------------------------------------------------------------])
2507 PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no)
2508 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002509fi
2510
2511if test "$have_openexr" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002512 AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library)
2513 CFLAGS="$OPENEXR_CFLAGS $CFLAGS"
cristy3ed852e2009-09-05 21:47:34 +00002514fi
2515
2516AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes')
2517AC_SUBST(OPENEXR_CFLAGS)
2518AC_SUBST(OPENEXR_LIBS)
2519
2520dnl ===========================================================================
2521
2522#
cristy41cbe8a2011-10-27 01:35:18 +00002523# Check for PANGO delegate library.
2524#
2525AC_ARG_WITH([pango],
2526 [AC_HELP_STRING([--without-pango],
2527 [disable PANGO support])],
2528 [with_pango=$withval],
cristyfc3d0222012-02-07 15:05:57 +00002529 [with_pango='yes'])
cristy41cbe8a2011-10-27 01:35:18 +00002530
2531if test "$with_pango" != 'yes'; then
2532 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango "
2533fi
2534
2535have_pango='no'
cristya054b762012-03-26 23:16:00 +00002536have_pangocairo='no'
cristy41cbe8a2011-10-27 01:35:18 +00002537PANGO_CFLAGS=""
2538PANGO_LIBS=""
2539PANGO_PKG=""
2540if test "x$with_pango" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002541 AC_MSG_RESULT([-------------------------------------------------------------])
2542 PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no)
2543 AC_MSG_RESULT([])
2544 PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no)
2545 AC_MSG_RESULT([])
cristy41cbe8a2011-10-27 01:35:18 +00002546fi
2547
2548if test "$have_pango" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002549 AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library)
2550 CFLAGS="$PANGO_CFLAGS $CFLAGS"
cristy41cbe8a2011-10-27 01:35:18 +00002551fi
2552
cristya054b762012-03-26 23:16:00 +00002553if test "$have_pangocairo" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002554 AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library)
2555 CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS"
cristy41cbe8a2011-10-27 01:35:18 +00002556fi
2557
2558AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes')
cristya054b762012-03-26 23:16:00 +00002559AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes')
cristy41cbe8a2011-10-27 01:35:18 +00002560AC_SUBST(PANGO_CFLAGS)
2561AC_SUBST(PANGO_LIBS)
2562
2563dnl ===========================================================================
2564
2565#
cristy3ed852e2009-09-05 21:47:34 +00002566# Check for PNG delegate library.
2567#
2568AC_ARG_WITH(png,
2569 [AC_HELP_STRING([--without-png],
2570 [disable PNG support])],
2571 [with_png=$withval],
2572 [with_png='yes'])
2573
2574if test "$with_png" != 'yes'; then
2575 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png "
2576fi
2577
cristy81beccd2011-10-03 18:17:24 +00002578have_png='no'
cristy32f75d42015-06-05 18:46:23 +00002579PNG_CFLAGS=""
2580PNG_LIBS=""
2581PNG_PKG=""
2582if test "x$with_png" = "xyes"; then
cristyad38abe2012-12-23 23:03:21 +00002583 AC_MSG_RESULT([-------------------------------------------------------------])
cristy32f75d42015-06-05 18:46:23 +00002584 PKG_CHECK_MODULES(PNG,[libpng >= 1.0.0], have_png=yes, have_png=no)
2585 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002586fi
cristy64877302011-08-23 19:10:31 +00002587
cristy32f75d42015-06-05 18:46:23 +00002588if test "$have_png" = 'yes'; then
2589 AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library)
2590 CFLAGS="$PNG_CFLAGS $CFLAGS"
2591fi
cristy3ed852e2009-09-05 21:47:34 +00002592
cristy32f75d42015-06-05 18:46:23 +00002593AM_CONDITIONAL(PNG_DELEGATE, test "$have_png" = 'yes')
2594AC_SUBST(PNG_CFLAGS)
2595AC_SUBST(PNG_LIBS)
cristy81beccd2011-10-03 18:17:24 +00002596
cristy3ed852e2009-09-05 21:47:34 +00002597dnl ===========================================================================
2598
2599#
2600# Check for RSVG delegate library.
2601#
2602AC_ARG_WITH([rsvg],
cristy51633f52013-04-23 14:03:19 +00002603 [AC_HELP_STRING([--with-rsvg],
cristy1164d5f2012-08-15 00:58:25 +00002604 [enable RSVG support])],
cristy3ed852e2009-09-05 21:47:34 +00002605 [with_rsvg=$withval],
cristy1164d5f2012-08-15 00:58:25 +00002606 [with_rsvg='no'])
cristy3ed852e2009-09-05 21:47:34 +00002607
2608if test "$with_rsvg" != 'yes'; then
2609 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg "
2610fi
2611
2612have_rsvg='no'
2613have_cairo='no'
2614RSVG_CFLAGS=""
2615RSVG_LIBS=""
2616RSVG_PKG=""
2617if test "x$with_rsvg" = "xyes"; then
cristy32f75d42015-06-05 18:46:23 +00002618 AC_MSG_RESULT([-------------------------------------------------------------])
2619 PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no)
2620 AC_MSG_RESULT([])
2621 PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no)
2622 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002623fi
2624
2625if test "$have_rsvg" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002626 AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library)
2627 CFLAGS="$RSVG_CFLAGS $CFLAGS"
cristy3ed852e2009-09-05 21:47:34 +00002628fi
2629
2630if test "$have_cairo" = 'yes'; then
cristy32f75d42015-06-05 18:46:23 +00002631 AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library)
2632 CFLAGS="$CAIRO_SVG_CFLAGS $CFLAGS"
cristy3ed852e2009-09-05 21:47:34 +00002633fi
2634
2635AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes')
2636AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes')
2637AC_SUBST(RSVG_CFLAGS)
2638AC_SUBST(RSVG_LIBS)
2639
2640dnl ===========================================================================
2641
2642#
2643# Check for TIFF delegate library.
2644#
2645AC_ARG_WITH([tiff],
2646 [AC_HELP_STRING([--without-tiff],
2647 [disable TIFF support])],
2648 [with_tiff=$withval],
2649 [with_tiff='yes'])
2650
2651if test "$with_tiff" != 'yes'; then
2652 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff "
2653fi
2654
2655have_tiff='no'
2656TIFF_LIBS=''
2657if test "$with_tiff" != 'no'; then
cristyad38abe2012-12-23 23:03:21 +00002658 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00002659 AC_MSG_CHECKING([for TIFF])
cristyad38abe2012-12-23 23:03:21 +00002660 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002661 failed=0
2662 passed=0
2663 AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2664 AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
2665 AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2666 AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2667 AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2668 AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2669 AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
2670 AC_MSG_CHECKING([if TIFF package is complete])
2671 if test $passed -gt 0; then
2672 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00002673 AC_MSG_RESULT([no -- some components failed test])
cristy3ed852e2009-09-05 21:47:34 +00002674 have_tiff='no (failed tests)'
2675 else
2676 TIFF_LIBS='-ltiff'
2677 LIBS="$TIFF_LIBS $LIBS"
2678 AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library)
cristyad38abe2012-12-23 23:03:21 +00002679 AC_MSG_RESULT([yes])
cristy3ed852e2009-09-05 21:47:34 +00002680 have_tiff='yes'
2681 AC_CHECK_HEADERS(tiffconf.h)
2682 AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \
cristy3f590e52011-11-14 14:29:44 +00002683 TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \
2684 TIFFSetTagExtender TIFFSetWarningHandlerExt \
2685 TIFFSwabArrayOfTriples])
cristy3ed852e2009-09-05 21:47:34 +00002686 fi
2687 else
cristyad38abe2012-12-23 23:03:21 +00002688 AC_MSG_RESULT([no])
cristy3ed852e2009-09-05 21:47:34 +00002689 fi
2690fi
2691AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes')
2692AC_SUBST(TIFF_LIBS)
2693
2694dnl ===========================================================================
2695
2696#
cristyb1860752011-03-14 00:27:46 +00002697# Check for WEBP delegate library.
2698#
2699AC_ARG_WITH(webp,
2700 [AC_HELP_STRING([--without-webp],
2701 [disable WEBP support])],
2702 [with_webp=$withval],
2703 [with_webp='yes'])
2704
2705if test "$with_webp" != 'yes'; then
2706 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp "
2707fi
2708
2709have_webp='no'
2710WEBP_LIBS=''
2711if test "$with_webp" != 'no'; then
cristyad38abe2012-12-23 23:03:21 +00002712 AC_MSG_RESULT([-------------------------------------------------------------])
cristyb1860752011-03-14 00:27:46 +00002713 AC_MSG_CHECKING([for WEBP])
cristyad38abe2012-12-23 23:03:21 +00002714 AC_MSG_RESULT([])
cristyb1860752011-03-14 00:27:46 +00002715 failed=0
2716 passed=0
2717 AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
cristy6d670312013-03-22 23:23:01 +00002718 AC_CHECK_LIB(webp,WebPPictureInitInternal,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
cristyb1860752011-03-14 00:27:46 +00002719 AC_MSG_CHECKING([if WEBP package is complete])
2720 if test $passed -gt 0; then
2721 if test $failed -gt 0; then
cristyad38abe2012-12-23 23:03:21 +00002722 AC_MSG_RESULT([no -- some components failed test])
cristyb1860752011-03-14 00:27:46 +00002723 have_webp='no (failed tests)'
2724 else
2725 WEBP_LIBS='-lwebp'
2726 LIBS="$WEBP_LIBS $LIBS"
2727 AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library)
cristyad38abe2012-12-23 23:03:21 +00002728 AC_MSG_RESULT([yes])
cristyb1860752011-03-14 00:27:46 +00002729 have_webp='yes'
2730 fi
2731 else
cristyad38abe2012-12-23 23:03:21 +00002732 AC_MSG_RESULT([no])
cristyb1860752011-03-14 00:27:46 +00002733 fi
2734fi
2735AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes')
2736AC_SUBST(WEBP_LIBS)
2737
2738dnl ===========================================================================
2739
2740#
cristy3ed852e2009-09-05 21:47:34 +00002741# Set Windows font directory.
2742#
cristy74554ef2011-10-27 12:56:11 +00002743AC_ARG_WITH([windows-font-dir],
cristy3ed852e2009-09-05 21:47:34 +00002744 [AC_HELP_STRING([--with-windows-font-dir=DIR],
cristy5a3dc992014-12-05 19:50:04 +00002745 [Windows font directory])],
2746 [with_windows_font_dir=$withval],
2747 [with_windows_font_dir='default'])
2748
2749if test "$with_windows_font_dir" != 'default'; then
cristy3ed852e2009-09-05 21:47:34 +00002750 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir "
2751fi
2752
2753dnl ===========================================================================
2754
2755#
2756# Check for WMF delegate library.
2757#
2758AC_ARG_WITH([wmf],
cristyd0a9a682012-02-11 00:21:53 +00002759 [AC_HELP_STRING([--with-wmf],
2760 [enable WMF support])],
cristy3ed852e2009-09-05 21:47:34 +00002761 [with_wmf=$withval],
cristy32f75d42015-06-05 18:46:23 +00002762 [with_wmf='yes'])
cristy3ed852e2009-09-05 21:47:34 +00002763
2764if test "$with_wmf" != 'yes'; then
2765 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf "
2766fi
2767
2768have_wmf='no'
cristyebc8f692015-06-16 10:36:30 +00002769WMF_LIBS=''
2770WMF_CFLAGS=''
2771OLIBS="$LIBS"
2772if test "$with_wmf" != 'no'; then
2773 AC_MSG_CHECKING([for WMF support ])
cristy32f75d42015-06-05 18:46:23 +00002774 AC_MSG_RESULT([])
cristy735e8942010-04-02 20:32:57 +00002775
cristyebc8f692015-06-16 10:36:30 +00002776 have_libwmflite='no'
2777 have_libwmf_ipa_h='no'
2778
2779 AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],[],[$FT2BUILD_H])
2780 if test "$have_libwmf_ipa_h" = 'yes'; then
2781 AC_CHECK_LIB([wmflite],[wmf_lite_create],[have_libwmflite='yes'],[],[])
2782 if test "$have_libwmflite" = 'yes'; then
2783 AC_DEFINE(WMF_DELEGATE,1,Define if you have WMF library)
2784 WMF_LIBS='-lwmflite'
2785 LIBS="$WMF_LIBS $LIBS"
2786 have_wmf='yes'
2787 else
2788 AC_MSG_RESULT([no -- some components failed test])
2789 have_wmf='no (failed tests)'
2790 have_wmflite='no (failed tests)'
2791 LIBS="$OLIBS"
2792 WMF_LIBS=''
2793 fi
2794 fi
2795fi
2796AC_MSG_CHECKING([if WMF package is complete ])
cristy32f75d42015-06-05 18:46:23 +00002797if test "$have_wmf" = 'yes'; then
cristyebc8f692015-06-16 10:36:30 +00002798 AC_MSG_RESULT([yes])
2799else
2800 AC_MSG_RESULT([no])
cristy32f75d42015-06-05 18:46:23 +00002801fi
cristyebc8f692015-06-16 10:36:30 +00002802AM_CONDITIONAL([WMF_DELEGATE], [test "$have_wmf" = 'yes'])
2803AC_SUBST([WMF_CFLAGS])
2804AC_SUBST([WMF_LIBS])
cristy81beccd2011-10-03 18:17:24 +00002805
2806dnl ===========================================================================
2807
cristy3ed852e2009-09-05 21:47:34 +00002808#
2809# Check for XML delegate library.
2810#
cristy81beccd2011-10-03 18:17:24 +00002811AC_ARG_WITH([xml],
cristy3ed852e2009-09-05 21:47:34 +00002812 [AC_HELP_STRING([--without-xml],
2813 [disable XML support])],
2814 [with_xml=$withval],
cristyfc3d0222012-02-07 15:05:57 +00002815 [with_xml='yes'])
cristy3ed852e2009-09-05 21:47:34 +00002816
cristy81beccd2011-10-03 18:17:24 +00002817if test "$with_xml" != 'yes' ; then
cristy3ed852e2009-09-05 21:47:34 +00002818 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml "
2819fi
2820
cristy81beccd2011-10-03 18:17:24 +00002821have_xml='no'
cristy32f75d42015-06-05 18:46:23 +00002822XML_CFLAGS=""
2823XML_LIBS=""
2824XML_PKG=""
2825if test "x$with_xml" = "xyes"; then
2826 AC_MSG_RESULT([-------------------------------------------------------------])
2827 PKG_CHECK_MODULES(XML,[libxml-2.0 >= 2.0.0], have_xml=yes, have_xml=no)
2828 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00002829fi
cristy32f75d42015-06-05 18:46:23 +00002830
2831if test "$have_xml" = 'yes'; then
2832 AC_DEFINE(XML_DELEGATE,1,Define if you have XML library)
2833 CFLAGS="$XML_CFLAGS $CFLAGS"
2834fi
2835
2836AM_CONDITIONAL(XML_DELEGATE, test "$have_xml" = 'yes')
2837AC_SUBST(XML_CFLAGS)
cristy3ed852e2009-09-05 21:47:34 +00002838AC_SUBST(XML_LIBS)
2839
2840dnl ===========================================================================
2841
2842# Substitute compiler name to build/link PerlMagick
2843#
cristy86b6e552015-06-06 13:25:16 +00002844AC_SUBST([PERLMAINCC])
cristy3ed852e2009-09-05 21:47:34 +00002845
2846#
2847# Configure install Paths
2848#
cristy7def36a2011-10-28 19:04:41 +00002849
cristy2a11bef2011-10-28 18:33:11 +00002850# Path to ImageMagick header files
cristybdabdd62013-03-04 17:43:36 +00002851INCLUDE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
cristye52f12f2012-12-31 15:32:36 +00002852INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}"
2853DEFINE_INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}/"
cristy2a11bef2011-10-28 18:33:11 +00002854case "${build_os}" in
2855 mingw* )
2856 DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
2857 ;;
2858esac
cristy9c151dc2012-12-02 22:30:16 +00002859AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick headers live.])
cristy2a11bef2011-10-28 18:33:11 +00002860AC_SUBST(INCLUDE_PATH)
cristy3ed852e2009-09-05 21:47:34 +00002861
cristye52f12f2012-12-31 15:32:36 +00002862# Path to ImageMagick header files (arch part)
2863INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}"
2864DEFINE_INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/"
2865case "${build_os}" in
2866 mingw* )
2867 DEFINE_INCLUDEARCH_PATH=`$WinPathScript "$DEFINE_INCLUDEARCH_PATH" 1`
2868 ;;
2869esac
2870AC_DEFINE_UNQUOTED(INCLUDEARCH_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick architecture headers live.])
2871AC_SUBST(INCLUDEARCH_PATH)
2872
cristy3ed852e2009-09-05 21:47:34 +00002873# Subdirectory under lib to place ImageMagick lib files
2874LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
cristy9c151dc2012-12-02 22:30:16 +00002875AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",[Subdirectory of lib where ImageMagick architecture dependent files are installed.])
cristy3ed852e2009-09-05 21:47:34 +00002876
2877# Path to ImageMagick bin directory
2878EXECUTABLE_PATH="${BIN_DIR}"
2879DEFINE_EXECUTABLE_PATH="${BIN_DIR}/"
2880case "${build_os}" in
2881 mingw* )
2882 DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1`
2883 ;;
2884esac
cristy9c151dc2012-12-02 22:30:16 +00002885AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",[Directory where executables are installed.])
cristy3ed852e2009-09-05 21:47:34 +00002886AC_SUBST(EXECUTABLE_PATH)
2887
2888# Path to ImageMagick lib
2889LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}"
2890DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/"
2891case "${build_os}" in
2892 mingw* )
2893 DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1`
2894 ;;
2895esac
cristy9c151dc2012-12-02 22:30:16 +00002896AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",[Directory where architecture-dependent files live.])
cristy3ed852e2009-09-05 21:47:34 +00002897AC_SUBST(LIBRARY_PATH)
2898
cristy3ed852e2009-09-05 21:47:34 +00002899#
cristy8d0ff762013-03-10 20:33:28 +00002900# path to local binaries
2901if test "x$LIB_BIN_BASEDIRNAME" = "x"; then
2902 LIB_BIN_BASEDIRNAME="bin"
2903fi
2904AC_DEFINE_UNQUOTED(LIB_BIN_BASEDIRNAME,"$LIB_BIN_BASEDIRNAME",[Binaries in libraries path base name (will be during install linked to bin)])
2905AC_SUBST(LIB_BIN_BASEDIRNAME)
2906
2907if test "x$LIB_BIN_DIR" = "x"; then
2908 LIB_BIN_DIR=${LIB_BIN_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
2909fi
2910AC_SUBST(LIB_BIN_DIR)
2911
2912LIB_BIN_DIR_RELATIVE_PATH=$LIB_BIN_DIR
2913AC_SUBST(LIB_BIN_DIR_RELATIVE_PATH)
2914LIB_BIN_DIR_PATH="${LIBRARY_PATH}/${LIB_BIN_DIR_RELATIVE_PATH}"
2915AC_SUBST(LIB_BIN_DIR_PATH)
2916
2917#
cristy01ff9f32012-12-01 18:15:29 +00002918# path to modules lib
2919if test "x$MODULES_BASEDIRNAME" = "x"; then
2920 MODULES_BASEDIRNAME="modules"
2921fi
cristy9c151dc2012-12-02 22:30:16 +00002922AC_DEFINE_UNQUOTED(MODULES_BASEDIRNAME,"$MODULES_BASEDIRNAME",[Module directory name without ABI part.])
cristy01ff9f32012-12-01 18:15:29 +00002923AC_SUBST(MODULES_BASEDIRNAME)
2924
2925if test "x$MODULES_DIRNAME" = "x"; then
cristy7a26abd2012-12-03 00:18:59 +00002926 MODULES_DIRNAME=${MODULES_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
cristy4bdbd342012-12-03 18:41:18 +00002927else
2928 AC_DEFINE_UNQUOTED(MODULES_DIRNAME,"$MODULES_DIRNAME",[Module directory dirname])
cristy01ff9f32012-12-01 18:15:29 +00002929fi
2930AC_SUBST(MODULES_DIRNAME)
2931
cristy371d4812012-12-01 19:48:10 +00002932MODULES_RELATIVE_PATH="${MODULES_DIRNAME}"
cristy01ff9f32012-12-01 18:15:29 +00002933AC_SUBST(MODULES_RELATIVE_PATH)
2934MODULES_PATH="${LIBRARY_PATH}/${MODULES_RELATIVE_PATH}"
2935AC_SUBST(MODULES_PATH)
2936
2937#
2938# path to coders lib
2939if test "x$CODER_DIRNAME" = "x"; then
2940 CODER_DIRNAME="coders"
2941fi
cristy9c151dc2012-12-02 22:30:16 +00002942AC_DEFINE_UNQUOTED(CODER_DIRNAME,"$CODER_DIRNAME",[coders subdirectory.])
cristy01ff9f32012-12-01 18:15:29 +00002943AC_SUBST(CODER_DIRNAME)
2944
cristy371d4812012-12-01 19:48:10 +00002945CODER_RELATIVE_PATH="${CODER_DIRNAME}"
cristy01ff9f32012-12-01 18:15:29 +00002946CODER_PATH="${MODULES_PATH}/${CODER_DIRNAME}"
cristy3ed852e2009-09-05 21:47:34 +00002947AC_SUBST(CODER_PATH)
2948
2949#
2950# Subdirectory under lib to place ImageMagick filter module files
cristy01ff9f32012-12-01 18:15:29 +00002951#
2952# path to coders lib
2953if test "x$FILTER_DIRNAME" = "x"; then
2954 FILTER_DIRNAME="filters"
2955fi
cristy9c151dc2012-12-02 22:30:16 +00002956AC_DEFINE_UNQUOTED(FILTER_DIRNAME,"$FILTER_DIRNAME",[filter subdirectory.])
cristy01ff9f32012-12-01 18:15:29 +00002957AC_SUBST(FILTER_DIRNAME)
2958
cristy371d4812012-12-01 19:48:10 +00002959FILTER_RELATIVE_PATH="${FILTER_DIRNAME}"
cristy01ff9f32012-12-01 18:15:29 +00002960FILTER_PATH="${MODULES_PATH}/${FILTER_DIRNAME}"
cristy3ed852e2009-09-05 21:47:34 +00002961AC_SUBST(FILTER_PATH)
2962
2963#
2964# Path to ImageMagick documentation files
Cristye35bdc62015-09-19 18:29:00 -04002965DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
2966DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}"
2967DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/"
cristy3ed852e2009-09-05 21:47:34 +00002968case "${build_os}" in
2969 mingw* )
2970 DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1`
2971 ;;
2972esac
cristy9c151dc2012-12-02 22:30:16 +00002973AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",[Directory where ImageMagick documents live.])
cristy3ed852e2009-09-05 21:47:34 +00002974AC_SUBST(DOCUMENTATION_PATH)
2975
cristydd17feb2014-03-05 02:06:32 +00002976#
2977# Enable/Disable documentation
2978AC_ARG_ENABLE([docs],
2979 [AS_HELP_STRING([--disable-docs],
2980 [disable building of documentation])],
cristy02272312014-03-07 00:55:25 +00002981 wantdocs=$enableval, wantdocs=yes)
2982AM_CONDITIONAL([INSTALL_DOC], [test "$wantdocs" = "yes"])
cristydd17feb2014-03-05 02:06:32 +00002983
cristy2a11bef2011-10-28 18:33:11 +00002984# Subdirectory to place architecture-dependent configuration files
cristybdabdd62013-03-04 17:43:36 +00002985CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
cristy9c151dc2012-12-02 22:30:16 +00002986AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",[Subdirectory of lib where architecture-dependent configuration files live.])
cristy7def36a2011-10-28 19:04:41 +00002987CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
cristy29b1f6f2011-03-27 14:02:38 +00002988DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
2989case "${build_os}" in
2990 mingw* )
2991 DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1`
2992 ;;
2993esac
cristy9c151dc2012-12-02 22:30:16 +00002994AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",[Directory where architecture-dependent configuration files live.])
cristy29b1f6f2011-03-27 14:02:38 +00002995AC_SUBST(CONFIGURE_PATH)
2996
cristy2a11bef2011-10-28 18:33:11 +00002997# Subdirectory to place architecture-independent configuration files
cristybdabdd62013-03-04 17:43:36 +00002998SHARE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}"
cristy9c151dc2012-12-02 22:30:16 +00002999AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",[Subdirectory of lib where architecture-independent configuration files live.])
cristy670aa3c2011-11-03 00:54:00 +00003000SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
cristy4f820712011-04-01 12:35:43 +00003001DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/"
cristy3ed852e2009-09-05 21:47:34 +00003002case "${build_os}" in
3003 mingw* )
cristy4f820712011-04-01 12:35:43 +00003004 DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1`
cristy3ed852e2009-09-05 21:47:34 +00003005 ;;
3006esac
cristy9c151dc2012-12-02 22:30:16 +00003007AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",[Directory where architecture-independent configuration files live.])
cristy4f820712011-04-01 12:35:43 +00003008AC_SUBST(SHARE_PATH)
cristy3ed852e2009-09-05 21:47:34 +00003009
cristy23c7e9a2012-12-04 15:47:57 +00003010#
3011# Subdirectory to place architecture-dependent configuration files.
3012if test "x$SHAREARCH_BASEDIRNAME" = "x"; then
3013 SHAREARCH_BASEDIRNAME="config"
3014fi
cristyad38abe2012-12-23 23:03:21 +00003015AC_DEFINE_UNQUOTED(SHAREARCH_BASEDIRNAME,"$SHAREARCH_BASEDIRNAME",[Sharearch directory name without ABI part.])
cristy23c7e9a2012-12-04 15:47:57 +00003016AC_SUBST(SHAREARCH_BASEDIRNAME)
3017
3018if test "x$SHAREARCH_DIRNAME" = "x"; then
3019 SHAREARCH_DIRNAME=${SHAREARCH_BASEDIRNAME}-${MAGICK_ABI_SUFFIX}
3020else
cristyad38abe2012-12-23 23:03:21 +00003021 AC_DEFINE_UNQUOTED(SHAREARCH_DIRNAME,"$SHAREARCH_DIRNAME",[Sharearch directory dirname])
cristy23c7e9a2012-12-04 15:47:57 +00003022fi
3023AC_SUBST(SHAREARCH_DIRNAME)
3024
3025SHAREARCH_RELATIVE_PATH="${SHAREARCH_DIRNAME}"
3026AC_SUBST(SHAREARCH_RELATIVE_PATH)
3027SHAREARCH_PATH="${LIBRARY_PATH}/${SHAREARCH_RELATIVE_PATH}"
cristy670aa3c2011-11-03 00:54:00 +00003028AC_SUBST(SHAREARCH_PATH)
3029
cristy3ed852e2009-09-05 21:47:34 +00003030#
3031# program_transform_name is formed for use in a Makefile, so create a
3032# modified version for use in a shell script.
3033configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'`
3034
3035# Default delegate definitions
cristyad38abe2012-12-23 23:03:21 +00003036AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00003037AC_MSG_CHECKING([for ImageMagick delegate programs])
cristyad38abe2012-12-23 23:03:21 +00003038AC_MSG_RESULT([])
cristy212cd792014-12-12 00:51:03 +00003039BPGDecodeDelegateDefault='bpgdec'
3040BPGEncodeDelegateDefault='bpgenc'
cristy3d7f8062009-09-24 20:45:35 +00003041BlenderDecodeDelegateDefault='blender'
cristy3ed852e2009-09-05 21:47:34 +00003042BrowseDelegateDefault='xdg-open'
cristy3ed852e2009-09-05 21:47:34 +00003043DNGDecodeDelegateDefault='ufraw-batch'
cristy66f238e2014-05-16 12:21:48 +00003044DOCDecodeDelegateDefault='soffice'
cristy3ed852e2009-09-05 21:47:34 +00003045GVCDecodeDelegateDefault='dot'
3046DVIDecodeDelegateDefault='dvips'
cristy3ed852e2009-09-05 21:47:34 +00003047EditorDelegateDefault='xterm'
Cristy59748702016-05-12 21:35:47 -04003048ConvertDelegateDefault=`echo magick | sed ${configure_transform_name}`
3049DisplayDelegateDefault=`echo magick | sed ${configure_transform_name}`
3050MogrifyDelegateDefault=`echo magick | sed ${configure_transform_name}`
cristy3ed852e2009-09-05 21:47:34 +00003051HPGLDecodeDelegateDefault='hp2xx'
3052HTMLDecodeDelegateDefault='html2ps'
3053ILBMDecodeDelegateDefault='ilbmtoppm'
3054ILBMEncodeDelegateDefault='ppmtoilbm'
cristy71f53d52013-04-27 13:33:59 +00003055JXRDecodeDelegateDefault='JxrDecApp'
3056JXREncodeDelegateDefault='JxrEncApp'
Cristy3ef15c02017-01-02 07:41:13 -05003057LEPDelegateDefault='lepton'
cristy3ed852e2009-09-05 21:47:34 +00003058LPDelegateDefault='lp'
3059LPRDelegateDefault='lpr'
cristy3ed852e2009-09-05 21:47:34 +00003060LaunchDelegateDefault='gimp'
cristy81ab5af2013-10-06 18:28:39 +00003061MPEGDecodeDelegateDefault='avconv'
3062MPEGEncodeDelegateDefault='avconv'
cristy935c86e2010-06-05 23:50:07 +00003063MrSIDDecodeDelegateDefault='mrsidgeodecode'
cristy3ed852e2009-09-05 21:47:34 +00003064MVDelegateDefault='mv'
3065PCLDelegateDefault='pcl6'
cristy3ed852e2009-09-05 21:47:34 +00003066if test "$native_win32_build" = 'yes'; then
3067 PSDelegateDefault='gswin32c'
cristyb7931f12009-09-25 10:22:21 +00003068elif test "$gslib_framework" = 'yes'; then
cristy3ed852e2009-09-05 21:47:34 +00003069 PSDelegateDefault='gsc'
3070else
3071 PSDelegateDefault='gs'
3072fi
cristy3ed852e2009-09-05 21:47:34 +00003073RMDelegateDefault='rm'
cristy5281e322012-02-09 21:12:45 +00003074RSVGDecodeDelegateDefault='rsvg-convert'
cristyec6934f2012-08-14 18:38:40 +00003075SVGDecodeDelegateDefault='inkscape'
cristy16db5ed2010-07-29 13:32:02 +00003076UniconvertorDelegateDefault='uniconvertor'
cristy86e86092013-08-04 17:43:57 +00003077WebPDecodeDelegateDefault='dwebp'
3078WebPEncodeDelegateDefault='cwebp'
Cristydc553c12016-05-09 13:27:06 -04003079WWWDecodeDelegateDefault='curl'
cristy3ed852e2009-09-05 21:47:34 +00003080XPSDelegateDefault='gxps'
cristy3ed852e2009-09-05 21:47:34 +00003081
3082# Search for delegates
Cristy06c41ab2016-04-30 10:23:22 -04003083AC_PATH_PROG(BPGDecodeDelegate, "$BPGDecodeDelegateDefault", "$BPGDecodeDelegateDefault")
3084AC_PATH_PROG(BPGEncodeDelegate, "$BPGEncodeDelegateDefault", "$BPGEncodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003085AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault")
cristyc59f0e72012-08-27 12:59:33 +00003086AC_PATH_PROGS(BrowseDelegate, "$BrowseDelegateDefault" google-chrome firefox konqueror mozilla lynx, "$BrowseDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003087AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault")
cristy66f238e2014-05-16 12:21:48 +00003088AC_PATH_PROG(DOCDecodeDelegate, "$DOCDecodeDelegateDefault", "$DOCDecodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003089AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003090AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault")
3091AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault")
cristy66f238e2014-05-16 12:21:48 +00003092AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault")
cristy66f238e2014-05-16 12:21:48 +00003093AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003094AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault")
3095AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault")
3096AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault")
3097AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault")
cristy71f53d52013-04-27 13:33:59 +00003098AC_PATH_PROG(JXRDecodeDelegate, "$JXRDecodeDelegateDefault", "$JXRDecodeDelegateDefault")
3099AC_PATH_PROG(JXREncodeDelegate, "$JXREncodeDelegateDefault", "$JXREncodeDelegateDefault")
Cristy3ef15c02017-01-02 07:41:13 -05003100AC_PATH_PROG(LEPDelegate, "$LEPDelegateDefault", "$LEPDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003101AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no)
3102AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003103AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault")
cristy66f238e2014-05-16 12:21:48 +00003104AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003105AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
cristy058d15f2014-08-21 18:53:03 +00003106if test "$MPEGDecodeDelegate" = "$MPEGDecodeDelegateDefault" ; then
cristy81ab5af2013-10-06 18:28:39 +00003107 MPEGDecodeDelegateDefault='ffmpeg'
3108 AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
3109fi;
cristy3ed852e2009-09-05 21:47:34 +00003110AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
cristy058d15f2014-08-21 18:53:03 +00003111if test "$MPEGEncodeDelegate" = "$MPEGEncodeDelegateDefault" ; then
cristy81ab5af2013-10-06 18:28:39 +00003112 MPEGEncodeDelegateDefault='ffmpeg'
3113 AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
3114fi;
cristy935c86e2010-06-05 23:50:07 +00003115AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003116AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
3117AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003118AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003119AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault")
cristy4689cf02010-02-17 21:15:45 +00003120AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
cristyec6934f2012-08-14 18:38:40 +00003121AC_PATH_PROG(SVGDecodeDelegate, "$SVGDecodeDelegateDefault", "$SVGDecodeDelegateDefault")
cristy5ac9ac82010-07-29 13:24:24 +00003122AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
cristy86e86092013-08-04 17:43:57 +00003123AC_PATH_PROG(WebPDecodeDelegate, "$WebPDecodeDelegateDefault", "$WebPDecodeDelegateDefault")
3124AC_PATH_PROG(WebPEncodeDelegate, "$WebPEncodeDelegateDefault", "$WebPEncodeDelegateDefault")
Cristydc553c12016-05-09 13:27:06 -04003125AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003126AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
cristy3ed852e2009-09-05 21:47:34 +00003127
3128# Prefer lpr to lp; lp needs options tacked on.
3129if test "$LPRDelegate" != no; then
3130 PrintDelegate="$LPRDelegate"
3131else
3132 PrintDelegate="$LPDelegate -c -s"
3133fi
3134AC_SUBST(PrintDelegate)
3135
3136# Installed ImageMagick utiltity paths
3137ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}"
3138DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}"
3139MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}"
3140
3141# Set delegate booleans
cristy81ab5af2013-10-06 18:28:39 +00003142have_avconv='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_avconv='yes'; fi
cristy3ed852e2009-09-05 21:47:34 +00003143have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi
3144have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
3145have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
cristy935c86e2010-06-05 23:50:07 +00003146have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
cristy3ed852e2009-09-05 21:47:34 +00003147have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
3148have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
cristy3ed852e2009-09-05 21:47:34 +00003149have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi
3150
3151#
3152# Test for font directories
3153#
3154type_include_files=''
3155
Cristy6263d532016-05-01 18:39:52 -04003156# Apple fonts.
cristy5a3dc992014-12-05 19:50:04 +00003157AC_MSG_CHECKING(for Apple fonts directory)
3158apple_font_dir=''
3159if test "${with_apple_font_dir}" != 'default'; then
3160 apple_font_dir="${with_apple_font_dir}/"
3161else
3162 for font_dir in '/Library/Fonts/'; do
3163 if test -f "${font_dir}Arial.ttf"; then
3164 apple_font_dir="${font_dir}"
3165 break 1
3166 fi
3167 done
3168fi
3169if test "${apple_font_dir}x" != 'x'; then
3170 type_include_files="${type_include_files} "'<include file="type-apple.xml" />'
3171 AC_MSG_RESULT([$apple_font_dir])
3172else
3173 AC_MSG_RESULT([not found!]);
3174fi
3175AC_SUBST(apple_font_dir)
3176
cristy430a7312010-01-21 20:44:04 +00003177# Dejavu fonts.
3178AC_MSG_CHECKING(for Dejavu fonts directory)
3179dejavu_font_dir=''
3180if test "${with_dejavu_font_dir}" != 'default'; then
3181 dejavu_font_dir="${with_dejavu_font_dir}/"
3182else
3183 for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do
3184 if test -f "${font_dir}DejaVuSerif.ttf"; then
3185 dejavu_font_dir="${font_dir}"
3186 break 1
3187 fi
3188 done
3189fi
3190if test "${dejavu_font_dir}x" != 'x'; then
3191 type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />'
cristyad38abe2012-12-23 23:03:21 +00003192 AC_MSG_RESULT([$dejavu_font_dir])
cristy430a7312010-01-21 20:44:04 +00003193else
cristyad38abe2012-12-23 23:03:21 +00003194 AC_MSG_RESULT([not found!]);
cristy430a7312010-01-21 20:44:04 +00003195fi
3196AC_SUBST(dejavu_font_dir)
3197
cristy3ed852e2009-09-05 21:47:34 +00003198# Ghostscript
3199AC_MSG_CHECKING(for Ghostscript fonts directory)
3200ghostscript_font_dir=''
3201if test "${with_gs_font_dir}" != 'default'; then
3202 ghostscript_font_dir="${with_gs_font_dir}/"
3203else
3204 if test "${native_win32_build}" = 'yes'; then
3205 # Native Windows Build
3206 for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do
3207 if test -f "${font_dir}a010013l.pfb"; then
3208 ghostscript_font_dir="$font_dir"
3209 break 1
3210 fi
3211 done
3212 if test "${PSDelegate}" != 'gswin32c'; then
3213 ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
3214 fi
3215 else
3216 # Linux / Mac OS X / Unix Build
3217 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
3218 if test -f "${font_dir}a010013l.pfb"; then
3219 ghostscript_font_dir="${font_dir}"
3220 break 1
3221 fi
3222 done
3223 if test "${ghostscript_font_dir}x" = 'x'; then
3224 if test "$PSDelegate" != 'gs'; then
3225 ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/"
3226 fi
3227 fi
3228 fi
3229fi
3230if test "${ghostscript_font_dir}x" != 'x'; then
3231 type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />'
cristyad38abe2012-12-23 23:03:21 +00003232 AC_MSG_RESULT([$ghostscript_font_dir])
cristy3ed852e2009-09-05 21:47:34 +00003233else
cristyad38abe2012-12-23 23:03:21 +00003234 AC_MSG_RESULT([not found!]);
cristy3ed852e2009-09-05 21:47:34 +00003235fi
3236AC_SUBST(ghostscript_font_dir)
3237case "${build_os}" in
3238 mingw* )
3239 PSDelegate=`$WinPathScript "$PSDelegate" 1`
3240 ;;
3241esac
3242
cristy5a3dc992014-12-05 19:50:04 +00003243# Windows fonts.
3244AC_MSG_CHECKING(for Windows fonts directory)
3245windows_font_dir=''
3246if test "${with_windows_font_dir}" != 'default'; then
3247 windows_font_dir="${with_windows_font_dir}/"
3248else
3249 for font_dir in '/usr/X11R6/lib/X11/fonts/truetype/' '/usr/X11R7/lib/X11/fonts/truetype/' '/usr/share/fonts/msttcore/'; do
3250 if test -f "${font_dir}arial.ttf"; then
3251 windows_font_dir="${font_dir}"
3252 break 1
3253 fi
3254 done
3255fi
3256if test "${windows_font_dir}x" != 'x'; then
3257 type_include_files="${type_include_files} "'<include file="type-windows.xml" />'
3258 AC_MSG_RESULT([$windows_font_dir])
3259else
3260 AC_MSG_RESULT([not found!]);
3261fi
3262AC_SUBST(windows_font_dir)
3263
cristy3ed852e2009-09-05 21:47:34 +00003264AC_SUBST(type_include_files)
3265
3266#
3267# Handle case where user doesn't want frozen paths
3268#
3269if test "$with_frozenpaths" != 'yes'; then
3270 # Re-set delegate definitions to default (no paths)
Cristy06c41ab2016-04-30 10:23:22 -04003271 BPGDecodeDelegate="$BPGDecodeDelegateDefault"
3272 BPGEncodeDelegate="$BPGEncodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003273 BlenderDecodeDelegate="$BlenderDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003274 BrowseDelegate="$BrowseDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003275 ConvertDelegate="$ConvertDelegateDefault"
cristy71f53d52013-04-27 13:33:59 +00003276 DisplayDelegate="$DisplayDelegateDefault"
3277 DNGDecodeDelegate="$DNGDecodeDelegateDefault"
cristy66f238e2014-05-16 12:21:48 +00003278 DOCDecodeDelegate="$DOCDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003279 DVIDecodeDelegate="$DVIDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003280 EditorDelegate="$EditorDelegateDefault"
cristy71f53d52013-04-27 13:33:59 +00003281 GVCDecodeDelegate="$GVCDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003282 HPGLDecodeDelegate="$HPGLDecodeDelegateDefault"
3283 HTMLDecodeDelegate="$HTMLDecodeDelegateDefault"
3284 ILBMDecodeDelegate="$ILBMDecodeDelegateDefault"
3285 ILBMEncodeDelegate="$ILBMEncodeDelegateDefault"
cristy71f53d52013-04-27 13:33:59 +00003286 JXRDecodeDelegate="$JXRDecodeDelegateDefault"
3287 JXREncodeDelegate="$JXREncodeDelegateDefault"
Cristy3ef15c02017-01-02 07:41:13 -05003288 LEPDelegate="$LEPDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003289 LPDelegate="$LPDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003290 LaunchDelegate="$LaunchDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003291 MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
3292 MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003293 MogrifyDelegate="$MogrifyDelegateDefault"
cristy935c86e2010-06-05 23:50:07 +00003294 MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003295 PCLDelegate="$PCLDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003296 PSDelegate="$PSDelegateDefault"
cristy4689cf02010-02-17 21:15:45 +00003297 RSVGDecodeDelegate="$RSVGDecodeDelegateDefault"
cristyec6934f2012-08-14 18:38:40 +00003298 SVGDecodeDelegate="$SVGDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003299 ShowImageDelegate="$ShowImageDelegateDefault"
cristy5ac9ac82010-07-29 13:24:24 +00003300 UniconvertorDelegate="$UniconvertorDelegateDefault"
cristy86e86092013-08-04 17:43:57 +00003301 WebPDecodeDelegate="$WebPDecodeDelegateDefault"
3302 WebPEncodeDelegate="$WebPEncodeDelegateDefault"
Cristydc553c12016-05-09 13:27:06 -04003303 WWWDecodeDelegate="$WWWDecodeDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003304 XPSDelegate="$XPSDelegateDefault"
cristy3ed852e2009-09-05 21:47:34 +00003305fi
3306
3307# Delegate substitutions
Cristy06c41ab2016-04-30 10:23:22 -04003308AC_SUBST(BPGDecodeDelegate)
3309AC_SUBST(BPGEncodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003310AC_SUBST(BlenderDecodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003311AC_SUBST(BrowseDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003312AC_SUBST(ConvertDelegate)
3313AC_SUBST(GVCDecodeDelegate)
3314AC_SUBST(DVIDecodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003315AC_SUBST(EditorDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003316AC_SUBST(HPGLDecodeDelegate)
3317AC_SUBST(HTMLDecodeDelegate)
3318AC_SUBST(ILBMDecodeDelegate)
3319AC_SUBST(ILBMEncodeDelegate)
cristy71f53d52013-04-27 13:33:59 +00003320AC_SUBST(JXRDecodeDelegate)
3321AC_SUBST(JXREncodeDelegate)
Cristy3ef15c02017-01-02 07:41:13 -05003322AC_SUBST(LEPDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003323AC_SUBST(LPDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003324AC_SUBST(LaunchDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003325AC_SUBST(MPEGDecodeDelegate)
3326AC_SUBST(MPEGEncodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003327AC_SUBST(MogrifyDelegate)
cristy935c86e2010-06-05 23:50:07 +00003328AC_SUBST(MrSIDDecodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003329AC_SUBST(PCLDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003330AC_SUBST(PSDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003331AC_SUBST(ShowImageDelegate)
cristy5ac9ac82010-07-29 13:24:24 +00003332AC_SUBST(UniconvertorDelegate)
cristy86e86092013-08-04 17:43:57 +00003333AC_SUBST(WebPDecodeDelegate)
3334AC_SUBST(WebPEncodeDelegate)
Cristydc553c12016-05-09 13:27:06 -04003335AC_SUBST(WWWDecodeDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003336AC_SUBST(XPSDelegate)
cristy3ed852e2009-09-05 21:47:34 +00003337
3338#
3339# RPM support.
3340#
3341RPM=''
3342AC_CHECK_PROGS(TAR,gnutar gtar tar)
3343AC_CHECK_PROGS(PERL,perl)
3344AC_CHECK_PROGS(RPM,rpmbuild rpm)
3345AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
3346AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
3347AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
3348AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
3349AC_SUBST(RPM)
3350AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" )
3351
3352#
3353# 7ZIP support (http://p7zip.sourceforge.net/)
3354#
3355P7ZIP=''
3356AC_CHECK_PROGS(P7ZIP,[7za])
3357AC_SUBST(P7ZIP)
3358AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" )
3359
3360#
3361# ZIP support (http://www.info-zip.org/Zip.html)
3362#
3363ZIP=''
3364AC_CHECK_PROGS(ZIP,[zip])
3365AC_SUBST(ZIP)
3366AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" )
3367
3368#
3369# GhostPCL related configuration.
3370#
3371PCLColorDevice=ppmraw
cristy8bc84082011-09-07 13:57:00 +00003372PCLCMYKDevice=pamcmyk32
cristy3ed852e2009-09-05 21:47:34 +00003373PCLMonoDevice=pbmraw
3374if test -z "$PCLVersion"; then
3375 PCLVersion='unknown'
3376fi
3377if test $have_pcl = 'yes'; then
cristyad38abe2012-12-23 23:03:21 +00003378 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00003379 AC_MSG_CHECKING([for PCL])
cristyad38abe2012-12-23 23:03:21 +00003380 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00003381 # PCLColorDevice
3382 AC_MSG_CHECKING([for pcl color device])
cristy86e31f32015-06-06 15:47:32 +00003383 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003384 :
3385 else
3386 PCLColorDevice=ppmraw
3387 fi
cristyad38abe2012-12-23 23:03:21 +00003388 AC_MSG_RESULT([$PCLColorDevice])
cristy3ed852e2009-09-05 21:47:34 +00003389
3390 # PCLCMYKDevice
3391 AC_MSG_CHECKING([for pcl CMYK device])
cristy86e31f32015-06-06 15:47:32 +00003392 if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003393 :
3394 else
3395 PCLCMYKDevice=$PCLColorDevice
3396 fi
cristyad38abe2012-12-23 23:03:21 +00003397 AC_MSG_RESULT([$PCLCMYKDevice])
cristy3ed852e2009-09-05 21:47:34 +00003398
3399 # PCLMonoDevice
3400 AC_MSG_CHECKING([for pcl mono device])
cristy86e31f32015-06-06 15:47:32 +00003401 if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003402 :
3403 else
3404 PCLMonoDevice=$PCLColorDevice
3405 fi
cristyad38abe2012-12-23 23:03:21 +00003406 AC_MSG_RESULT([$PCLMonoDevice])
cristy3ed852e2009-09-05 21:47:34 +00003407fi
3408
3409AC_SUBST(PCLMonoDevice)
3410AC_SUBST(PCLColorDevice)
3411AC_SUBST(PCLCMYKDevice)
3412AC_SUBST(PCLVersion)
3413
3414#
3415# GhostXPS related configuration.
3416#
3417XPSColorDevice=ppmraw
3418XPSCMYKDevice=bmpsep8
3419XPSMonoDevice=pbmraw
3420if test -z "$XPSVersion"; then
3421 XPSVersion='unknown'
3422fi
3423if test $have_xps = 'yes'; then
cristyad38abe2012-12-23 23:03:21 +00003424 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00003425 AC_MSG_CHECKING([for XPS])
cristyad38abe2012-12-23 23:03:21 +00003426 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00003427 # XPSColorDevice
3428 AC_MSG_CHECKING([for xps color device])
cristy86e31f32015-06-06 15:47:32 +00003429 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003430 :
3431 else
3432 XPSColorDevice=ppmraw
3433 fi
cristyad38abe2012-12-23 23:03:21 +00003434 AC_MSG_RESULT([$XPSColorDevice])
cristy3ed852e2009-09-05 21:47:34 +00003435
3436 # XPSCMYKDevice
3437 AC_MSG_CHECKING([for xps CMYK device])
cristy86e31f32015-06-06 15:47:32 +00003438 if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003439 :
3440 else
3441 XPSCMYKDevice=$XPSColorDevice
3442 fi
cristyad38abe2012-12-23 23:03:21 +00003443 AC_MSG_RESULT([$XPSCMYKDevice])
cristy3ed852e2009-09-05 21:47:34 +00003444
3445 # XPSMonoDevice
3446 AC_MSG_CHECKING([for xps mono device])
cristy86e31f32015-06-06 15:47:32 +00003447 if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003448 :
3449 else
3450 XPSMonoDevice=$XPSColorDevice
3451 fi
cristyad38abe2012-12-23 23:03:21 +00003452 AC_MSG_RESULT([$XPSMonoDevice])
cristy3ed852e2009-09-05 21:47:34 +00003453fi
3454
3455AC_SUBST(XPSMonoDevice)
3456AC_SUBST(XPSColorDevice)
3457AC_SUBST(XPSCMYKDevice)
3458AC_SUBST(XPSVersion)
3459
3460#
3461# Ghostscript related configuration.
3462#
cristya97426c2011-02-04 01:41:27 +00003463GSAlphaDevice=pngalpha
cristy3ed852e2009-09-05 21:47:34 +00003464GSColorDevice=pnmraw
cristy63970c52015-06-06 16:09:04 +00003465GSCMYKDevice=pamcmyk32
cristy3ed852e2009-09-05 21:47:34 +00003466GSMonoDevice=pbmraw
3467GSPDFDevice=pdfwrite
cristyb096ea52013-10-26 20:56:38 +00003468GSPSDevice=ps2write
cristya5b91e72015-01-07 15:39:36 +00003469GSEPSDevice=eps2write
cristy3ed852e2009-09-05 21:47:34 +00003470GSVersion='unknown'
3471if test $have_gs = 'yes'; then
cristyad38abe2012-12-23 23:03:21 +00003472 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00003473 AC_MSG_CHECKING([for Ghostscript])
cristyad38abe2012-12-23 23:03:21 +00003474 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00003475 AC_MSG_CHECKING([for Ghostscript version])
3476 if GSVersion=`$PSDelegate --version`; then
3477 :
3478 else
3479 GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'`
3480 fi
cristyad38abe2012-12-23 23:03:21 +00003481 AC_MSG_RESULT([$GSVersion])
cristy3ed852e2009-09-05 21:47:34 +00003482
cristy3ed852e2009-09-05 21:47:34 +00003483 # GSColorDevice
3484 AC_MSG_CHECKING([for gs color device])
cristy86e31f32015-06-06 15:47:32 +00003485 if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003486 :
3487 else
cristy63970c52015-06-06 16:09:04 +00003488 GSColorDevice=ppmraw
cristy3ed852e2009-09-05 21:47:34 +00003489 fi
cristyad38abe2012-12-23 23:03:21 +00003490 AC_MSG_RESULT([$GSColorDevice])
cristy3ed852e2009-09-05 21:47:34 +00003491
cristy63970c52015-06-06 16:09:04 +00003492 # GSAlphaDevice
3493 AC_MSG_CHECKING([for gs alpha device])
3494 if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
3495 :
3496 else
3497 GSAlphaDevice=$GSColorDevice
3498 fi
3499 AC_MSG_RESULT([$GSAlphaDevice])
3500
cristy3ed852e2009-09-05 21:47:34 +00003501 # GSCMYKDevice
3502 AC_MSG_CHECKING([for gs CMYK device])
cristy86e31f32015-06-06 15:47:32 +00003503 if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003504 :
3505 else
cristy63970c52015-06-06 16:09:04 +00003506 GSCMYKDevice=pam
cristy3ed852e2009-09-05 21:47:34 +00003507 fi
cristyad38abe2012-12-23 23:03:21 +00003508 AC_MSG_RESULT([$GSCMYKDevice])
cristy3ed852e2009-09-05 21:47:34 +00003509
3510 # GSMonoDevice
3511 AC_MSG_CHECKING([for gs mono device])
cristy86e31f32015-06-06 15:47:32 +00003512 if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003513 :
3514 else
3515 GSMonoDevice=$GSColorDevice
3516 fi
cristyad38abe2012-12-23 23:03:21 +00003517 AC_MSG_RESULT([$GSMonoDevice])
cristy3ed852e2009-09-05 21:47:34 +00003518
3519 # GSPDFDevice
3520 AC_MSG_CHECKING([for gs PDF writing device])
cristy86e31f32015-06-06 15:47:32 +00003521 if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003522 :
3523 else
3524 GSPDFDevice=nodevice
3525 fi
cristy63970c52015-06-06 16:09:04 +00003526 AC_MSG_RESULT([$GSPDFDevice])
cristy3ed852e2009-09-05 21:47:34 +00003527
3528 # GSPSDevice
3529 AC_MSG_CHECKING([for gs PS writing device])
cristy86e31f32015-06-06 15:47:32 +00003530 if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003531 :
3532 else
cristy15308162015-01-09 23:43:12 +00003533 GSPSDevice=pswrite
cristy3ed852e2009-09-05 21:47:34 +00003534 fi
cristyad38abe2012-12-23 23:03:21 +00003535 AC_MSG_RESULT([$GSPSDevice])
cristy3ed852e2009-09-05 21:47:34 +00003536
3537 # GSEPSDevice
3538 AC_MSG_CHECKING([for gs EPS writing device])
cristy86e31f32015-06-06 15:47:32 +00003539 if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
cristy3ed852e2009-09-05 21:47:34 +00003540 :
3541 else
cristy15308162015-01-09 23:43:12 +00003542 GSEPSDevice=epswrite
cristy3ed852e2009-09-05 21:47:34 +00003543 fi
cristyad38abe2012-12-23 23:03:21 +00003544 AC_MSG_RESULT([$GSEPSDevice])
cristy3ed852e2009-09-05 21:47:34 +00003545fi
3546
3547AC_SUBST(GSAlphaDevice)
3548AC_SUBST(GSCMYKDevice)
3549AC_SUBST(GSColorDevice)
3550AC_SUBST(GSEPSDevice)
3551AC_SUBST(GSMonoDevice)
3552AC_SUBST(GSPDFDevice)
3553AC_SUBST(GSPSDevice)
3554AC_SUBST(GSVersion)
3555
3556#
3557# PerlMagick-related configuration
3558#
3559
3560# Look for PERL if PerlMagick requested
3561# If name/path of desired PERL interpreter is specified, look for that one first
3562have_perl='no'
3563if test "$with_perl" != 'no'; then
cristyad38abe2012-12-23 23:03:21 +00003564 AC_MSG_RESULT([-------------------------------------------------------------])
cristy3ed852e2009-09-05 21:47:34 +00003565 AC_MSG_CHECKING([for Perl])
cristyad38abe2012-12-23 23:03:21 +00003566 AC_MSG_RESULT([])
cristy3ed852e2009-09-05 21:47:34 +00003567 if test "$with_perl" != 'yes'; then
3568 AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl");
3569 PERL=$ac_cv_path_PERL
3570 AC_SUBST(PERL)dnl
3571 have_perl="$ac_cv_path_PERL"
3572 else
3573 AC_PATH_PROGS(PERL,perl perl5,)dnl
3574 if test "$ac_cv_path_PERL"; then
3575 have_perl="$ac_cv_path_PERL"
3576 fi
3577 fi
3578fi
3579
cristy949301e2010-01-06 01:38:40 +00003580if test "$with_perl" != 'yes' ; then
3581 DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl "
3582fi
3583
3584PERL_SUPPORTS_DESTDIR='no'
3585
cristy3ed852e2009-09-05 21:47:34 +00003586with_perl_static='no'
3587with_perl_dynamic='no'
3588if test "$have_perl" != 'no'; then
3589 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then
3590 with_perl_static='yes'
3591 fi
3592 if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then
3593 with_perl_dynamic='yes'
3594 fi
3595 # Is PERL's MakeMaker new enough to support DESTDIR?
cristy964cb7f2010-04-25 23:18:00 +00003596 AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no'])
cristy3ed852e2009-09-05 21:47:34 +00003597fi
3598AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no')
3599AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes')
3600AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes')
3601AC_SUBST(PERL_SUPPORTS_DESTDIR)
3602
3603# Determine path to pick up MagickCore library from for use with building PerlMagick
3604MAGICKCORE_PATH="${LIB_DIR}"
3605if test $with_perl_static = 'yes'; then
3606 # Find out where libtool hides its uninstalled libraries (as libtool_objdir)
3607 libtool_objdir=$objdir
3608
3609 # Linker search path to library, followed by -lMagickCore
cristy4c08aed2011-07-01 19:47:50 +00003610 MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}"
cristy3ed852e2009-09-05 21:47:34 +00003611fi
3612AC_SUBST(MAGICKCORE_PATH)
3613
cristy2a3eb392012-12-17 13:39:20 +00003614# Create a simple string containing format names for all delegate libraries.
cristy422d5502012-12-22 22:20:57 +00003615MAGICK_DELEGATES=''
cristy2a3eb392012-12-17 13:39:20 +00003616if test "$have_autotrace" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003617 MAGICK_DELEGATES="$MAGICK_DELEGATES autotrace"
cristy3ed852e2009-09-05 21:47:34 +00003618fi
cristy2a3eb392012-12-17 13:39:20 +00003619if test "$have_bzlib" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003620 MAGICK_DELEGATES="$MAGICK_DELEGATES bzlib"
cristy2a3eb392012-12-17 13:39:20 +00003621fi
3622if test "$have_dps" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003623 MAGICK_DELEGATES="$MAGICK_DELEGATES dps"
cristy2a3eb392012-12-17 13:39:20 +00003624fi
3625if test "$have_djvu" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003626 MAGICK_DELEGATES="$MAGICK_DELEGATES djvu"
cristy2a3eb392012-12-17 13:39:20 +00003627fi
cristy81ab5af2013-10-06 18:28:39 +00003628if test "$have_avconv" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003629 MAGICK_DELEGATES="$MAGICK_DELEGATES mpeg"
cristy2a3eb392012-12-17 13:39:20 +00003630fi
3631if test "$have_fftw" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003632 MAGICK_DELEGATES="$MAGICK_DELEGATES fftw"
cristy2a3eb392012-12-17 13:39:20 +00003633fi
Cristy6d2f14b2016-04-26 01:41:09 -04003634if test "$have_flif" = 'yes' ; then
3635 MAGICK_DELEGATES="$MAGICK_DELEGATES flif"
3636fi
cristy2a3eb392012-12-17 13:39:20 +00003637if test "$have_fpx" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003638 MAGICK_DELEGATES="$MAGICK_DELEGATES fpx"
cristy2a3eb392012-12-17 13:39:20 +00003639fi
3640if test "$have_fontconfig" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003641 MAGICK_DELEGATES="$MAGICK_DELEGATES fontconfig"
cristy2a3eb392012-12-17 13:39:20 +00003642fi
3643if test "$have_freetype" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003644 MAGICK_DELEGATES="$MAGICK_DELEGATES freetype"
cristy2a3eb392012-12-17 13:39:20 +00003645fi
3646if test "$have_gslib" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003647 MAGICK_DELEGATES="$MAGICK_DELEGATES gslib"
cristy2a3eb392012-12-17 13:39:20 +00003648fi
3649if test "$have_jbig" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003650 MAGICK_DELEGATES="$MAGICK_DELEGATES jbig"
cristy2a3eb392012-12-17 13:39:20 +00003651fi
3652if test "$have_png$have_jpeg" = 'yesyes' ; then
cristy422d5502012-12-22 22:20:57 +00003653 MAGICK_DELEGATES="$MAGICK_DELEGATES jng"
cristy2a3eb392012-12-17 13:39:20 +00003654fi
cristy2a3eb392012-12-17 13:39:20 +00003655if test "$have_jpeg" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003656 MAGICK_DELEGATES="$MAGICK_DELEGATES jpeg"
cristy2a3eb392012-12-17 13:39:20 +00003657fi
3658if test "$have_lcms" = 'yes' || test "$have_lcms2" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003659 MAGICK_DELEGATES="$MAGICK_DELEGATES lcms"
cristy2a3eb392012-12-17 13:39:20 +00003660fi
3661if test "$have_lqr" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003662 MAGICK_DELEGATES="$MAGICK_DELEGATES lqr"
cristy2a3eb392012-12-17 13:39:20 +00003663fi
3664if test "$have_lzma" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003665 MAGICK_DELEGATES="$MAGICK_DELEGATES lzma"
cristy2a3eb392012-12-17 13:39:20 +00003666fi
3667if test "$have_openexr" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003668 MAGICK_DELEGATES="$MAGICK_DELEGATES openexr"
cristy2a3eb392012-12-17 13:39:20 +00003669fi
cristy99db3872014-01-01 15:11:34 +00003670if test "$have_openjp2" = 'yes' ; then
3671 MAGICK_DELEGATES="$MAGICK_DELEGATES openjp2"
cristy3fe09452014-01-01 12:29:14 +00003672fi
cristy2a3eb392012-12-17 13:39:20 +00003673if test "$have_pango" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003674 MAGICK_DELEGATES="$MAGICK_DELEGATES pango"
cristy2a3eb392012-12-17 13:39:20 +00003675fi
3676if test "$have_png" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003677 MAGICK_DELEGATES="$MAGICK_DELEGATES png"
cristy2a3eb392012-12-17 13:39:20 +00003678fi
3679have_ps='no'
3680if test "$have_dps" = 'yes' || \
3681 test "$have_gs" = 'yes' || \
3682 test "${native_win32_build}" = 'yes' ; then
3683 have_ps='yes'
3684fi
3685if test "$have_ps" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003686 MAGICK_DELEGATES="$MAGICK_DELEGATES ps"
cristy2a3eb392012-12-17 13:39:20 +00003687fi
Cristy5572ef62016-02-06 16:10:00 -05003688if test "$have_raqm" = 'yes' ; then
3689 MAGICK_DELEGATES="$MAGICK_DELEGATES raqm"
3690fi
cristy2a3eb392012-12-17 13:39:20 +00003691if test "$have_ra_ppm" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003692 MAGICK_DELEGATES="$MAGICK_DELEGATES rad"
cristy2a3eb392012-12-17 13:39:20 +00003693fi
3694if test "$have_rsvg" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003695 MAGICK_DELEGATES="$MAGICK_DELEGATES rsvg"
cristy2a3eb392012-12-17 13:39:20 +00003696fi
3697if test "$have_tiff" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003698 MAGICK_DELEGATES="$MAGICK_DELEGATES tiff"
cristy2a3eb392012-12-17 13:39:20 +00003699fi
3700if test "$have_ttf" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003701 MAGICK_DELEGATES="$MAGICK_DELEGATES ttf"
cristy2a3eb392012-12-17 13:39:20 +00003702fi
cristy3b640ed2013-07-29 00:27:59 +00003703if test "$have_webp" = 'yes' ; then
3704 MAGICK_DELEGATES="$MAGICK_DELEGATES webp"
3705fi
cristy2a3eb392012-12-17 13:39:20 +00003706if test "$have_wmf" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003707 MAGICK_DELEGATES="$MAGICK_DELEGATES wmf"
cristy2a3eb392012-12-17 13:39:20 +00003708fi
3709if test "$have_x" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003710 MAGICK_DELEGATES="$MAGICK_DELEGATES x"
cristy2a3eb392012-12-17 13:39:20 +00003711fi
3712if test "$have_xml" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003713 MAGICK_DELEGATES="$MAGICK_DELEGATES xml"
cristy2a3eb392012-12-17 13:39:20 +00003714fi
3715if test "$have_zlib" = 'yes' ; then
cristy422d5502012-12-22 22:20:57 +00003716 MAGICK_DELEGATES="$MAGICK_DELEGATES zlib"
cristy2a3eb392012-12-17 13:39:20 +00003717fi
cristyead532a2015-06-05 00:49:30 +00003718
cristy2a3eb392012-12-17 13:39:20 +00003719# Remove extraneous spaces from output variables (asthetic)
cristy422d5502012-12-22 22:20:57 +00003720MAGICK_DELEGATES=`echo $MAGICK_DELEGATES | sed -e 's/ */ /g'`
cristy2a3eb392012-12-17 13:39:20 +00003721MAGICK_FEATURES=`echo $MAGICK_FEATURES | sed -e 's/ */ /g'`
cristy422d5502012-12-22 22:20:57 +00003722AC_SUBST(MAGICK_DELEGATES)
cristyfa161182012-12-19 15:45:28 +00003723AC_SUBST(MAGICK_FEATURES)
cristy3ed852e2009-09-05 21:47:34 +00003724
3725#
3726# Handle special compiler flags
3727#
3728
3729# Add '-p' if prof source profiling support enabled
3730if test "$enable_prof" = 'yes'; then
3731 CFLAGS="-p $CFLAGS"
3732 CXXFLAGS="-p $CXXFLAGS"
3733 LDFLAGS="-p $LDFLAGS"
3734fi
3735
3736# Add '-pg' if gprof source profiling support enabled
3737if test "$enable_gprof" = 'yes'; then
3738 CFLAGS="-pg $CFLAGS"
3739 CXXFLAGS="-pg $CXXFLAGS"
3740 LDFLAGS="-pg $LDFLAGS"
3741fi
3742
3743# Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
3744# This is a gcc-specific feature
3745if test "$enable_gcov" = 'yes'; then
3746 AC_CHECK_LIB(gcov,_gcov_init)
3747 AC_CHECK_LIB(gcov,__gcov_init)
3748 case "$target_os" in
3749 darwin*)
3750 OSX_GCOV_LDFLAG="-Wl,-single_module"
3751 ;;
3752 *)
3753 OSX_GCOV_LDFLAG=""
3754 ;;
3755 esac
3756 AC_SUBST(OSX_GCOV_LDFLAG)
3757 CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS"
3758 CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS"
3759 LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
3760fi
3761
3762#
3763# Build library dependency list for libMagickCore
3764#
3765
cristyc6722092012-10-14 00:19:31 +00003766if test "$build_modules" != 'no'; then
Cristy6d2f14b2016-04-26 01:41:09 -04003767 MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
cristy3ed852e2009-09-05 21:47:34 +00003768else
Cristy6d2f14b2016-04-26 01:41:09 -04003769 MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
cristy3ed852e2009-09-05 21:47:34 +00003770fi
3771AC_SUBST(MAGICK_DEP_LIBS)
3772
cristy3ed852e2009-09-05 21:47:34 +00003773# Pass only user-provided LIBS as "global" libraries
3774LIBS=$USER_LIBS
3775
3776#AC_SUBST(CPPFLAGS)
3777AC_SUBST(X_CFLAGS)
3778#AC_SUBST(LDFLAGS)
3779#AC_SUBST(X_PRE_LIBS)
3780#AC_SUBST(X_LIBS)
3781#AC_SUBST(X_EXTRA_LIBS)
3782
3783MAGICK_CFLAGS=$CFLAGS
3784MAGICK_CXXFLAGS="$CXXFLAGS"
3785MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'`
3786MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'`
3787MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS"
cristyd4ef6122013-10-17 15:00:03 +00003788MAGICK_LIBS="$MAGICK_DEP_LIBS"
cristy3ed852e2009-09-05 21:47:34 +00003789
3790AC_SUBST(MAGICK_CFLAGS)
3791AC_SUBST(MAGICK_CXXFLAGS)
3792AC_SUBST(MAGICK_CPPFLAGS)
3793AC_SUBST(MAGICK_PCFLAGS)
3794AC_SUBST(MAGICK_LDFLAGS)
3795AC_SUBST(MAGICK_LIBS)
cristy154f9fa2012-12-05 19:30:42 +00003796
cristy3ed852e2009-09-05 21:47:34 +00003797# Set configured scripts to executable.
3798AC_CONFIG_COMMANDS([default],[],[])
cristy2bd4b6e2012-07-22 15:29:11 +00003799AC_CONFIG_COMMANDS([magick.sh.in],[chmod +x magick.sh])
cristy4c08aed2011-07-01 19:47:50 +00003800AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config])
cristy4c08aed2011-07-01 19:47:50 +00003801AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config])
cristy3ed852e2009-09-05 21:47:34 +00003802AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config])
3803AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
3804
cristyad38abe2012-12-23 23:03:21 +00003805AC_MSG_RESULT([-------------------------------------------------------------])
3806AC_MSG_RESULT([Update ImageMagick configuration])
cristy3ed852e2009-09-05 21:47:34 +00003807
3808rm -f magick-version
3809
cristy430a7312010-01-21 20:44:04 +00003810result_dejavu_font_dir='none'
3811if test "${dejavu_font_dir}x" != 'x'; then
3812 result_dejavu_font_dir=$dejavu_font_dir
3813fi
3814
cristy3ed852e2009-09-05 21:47:34 +00003815result_ghostscript_font_dir='none'
3816if test "${ghostscript_font_dir}x" != 'x'; then
3817 result_ghostscript_font_dir=$ghostscript_font_dir
3818fi
3819
3820result_windows_font_dir='none'
3821if test "${windows_font_dir}x" != 'x'; then
3822 result_windows_font_dir=${windows_font_dir}
3823fi
3824
cristy9af1cbf2014-12-28 22:03:09 +00003825# ==============================================================================
3826# Generate build environment
3827# ==============================================================================
3828AC_CONFIG_FILES([\
3829 common.shi \
3830 config/configure.xml \
3831 config/delegates.xml \
3832 config/ImageMagick.rdf \
3833 config/MagickCore.dox \
3834 config/MagickWand.dox \
3835 config/Magick++.dox \
3836 config/type-apple.xml \
3837 config/type-dejavu.xml \
3838 config/type-ghostscript.xml \
3839 config/type-windows.xml \
3840 config/type.xml \
3841 ImageMagick.spec \
3842 Magick++/bin/Magick++-config \
3843 MagickCore/ImageMagick.pc \
3844 Magick++/lib/Magick++.pc \
3845 MagickCore/MagickCore-config \
3846 MagickCore/MagickCore.pc \
3847 MagickCore/version.h \
3848 Makefile \
3849 magick.sh \
3850 PerlMagick/check.sh \
3851 PerlMagick/default/Magick.pm \
3852 PerlMagick/Makefile.PL \
3853 PerlMagick/default/Makefile.PL \
3854 PerlMagick/quantum/Makefile.PL \
3855 PerlMagick/quantum/quantum.pm \
3856 PerlMagick/quantum/quantum.xs \
3857 PerlMagick/quantum/typemap \
3858 utilities/animate.1 \
3859 utilities/compare.1 \
3860 utilities/composite.1 \
3861 utilities/conjure.1 \
3862 utilities/convert.1 \
3863 utilities/display.1 \
3864 utilities/identify.1 \
3865 utilities/ImageMagick.1 \
3866 utilities/import.1 \
Cristy540ea6e2016-04-01 12:06:50 -04003867 utilities/magick.1 \
3868 utilities/magick-script.1 \
cristy9af1cbf2014-12-28 22:03:09 +00003869 utilities/mogrify.1 \
3870 utilities/montage.1 \
3871 utilities/stream.1 \
3872 MagickWand/MagickWand-config \
3873 MagickWand/MagickWand.pc ])
3874AC_OUTPUT
3875
3876# ==============================================================================
3877# ImageMagick Configuration
3878# ==============================================================================
3879AC_MSG_NOTICE([
3880==============================================================================
cristy3ed852e2009-09-05 21:47:34 +00003881ImageMagick is configured as follows. Please verify that this configuration
3882matches your expectations.
cristy15308162015-01-09 23:43:12 +00003883
cristy9af1cbf2014-12-28 22:03:09 +00003884 Host system type: $host
3885 Build system type: $build
cristy15308162015-01-09 23:43:12 +00003886
Cristy428ba722015-11-08 15:49:24 -05003887 Option Value
cristy9af1cbf2014-12-28 22:03:09 +00003888 ------------------------------------------------------------------------------
3889 Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs
3890 Static libraries --enable-static=$enable_static $libtool_build_static_libs
3891 Module support --with-modules=$build_modules $build_modules
3892 GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld
3893 Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth
3894 High Dynamic Range Imagery
3895 --enable-hdri=$enable_hdri $enable_hdri
cristy3ed852e2009-09-05 21:47:34 +00003896
Cristy428ba722015-11-08 15:49:24 -05003897 Install documentation: $wantdocs
cristy15308162015-01-09 23:43:12 +00003898
cristy9af1cbf2014-12-28 22:03:09 +00003899 Delegate Library Configuration:
3900 BZLIB --with-bzlib=$with_bzlib $have_bzlib
3901 Autotrace --with-autotrace=$with_autotrace $have_autotrace
3902 DJVU --with-djvu=$with_djvu $have_djvu
3903 DPS --with-dps=$with_dps $have_dps
3904 FFTW --with-fftw=$with_fftw $have_fftw
Cristy6d2f14b2016-04-26 01:41:09 -04003905 FLIF --with-flif=$with_flif $have_flif
cristy9af1cbf2014-12-28 22:03:09 +00003906 FlashPIX --with-fpx=$with_fpx $have_fpx
cristybc8ef1c2015-06-06 14:32:21 +00003907 FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig
cristy9af1cbf2014-12-28 22:03:09 +00003908 FreeType --with-freetype=$with_freetype $have_freetype
3909 Ghostscript lib --with-gslib=$with_gslib $have_gslib
3910 Graphviz --with-gvc=$with_gvc $have_gvc
3911 JBIG --with-jbig=$with_jbig $have_jbig
3912 JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
cristyd6ac47f2015-06-06 13:46:55 +00003913 LCMS --with-lcms=$with_lcms $have_lcms
cristy9af1cbf2014-12-28 22:03:09 +00003914 LQR --with-lqr=$with_lqr $have_lqr
3915 LTDL --with-ltdl=$with_ltdl $have_ltdl
3916 LZMA --with-lzma=$with_lzma $have_lzma
3917 Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
3918 OpenEXR --with-openexr=$with_openexr $have_openexr
Cristy428ba722015-11-08 15:49:24 -05003919 OpenJP2 --with-openjp2=$with_openjp2 $have_openjp2
cristy9af1cbf2014-12-28 22:03:09 +00003920 PANGO --with-pango=$with_pango $have_pango
3921 PERL --with-perl=$with_perl $have_perl
3922 PNG --with-png=$with_png $have_png
Cristy5572ef62016-02-06 16:10:00 -05003923 RAQM --with-raqm=$with_raqm $have_raqm
cristy9af1cbf2014-12-28 22:03:09 +00003924 RSVG --with-rsvg=$with_rsvg $have_rsvg
3925 TIFF --with-tiff=$with_tiff $have_tiff
3926 WEBP --with-webp=$with_webp $have_webp
3927 WMF --with-wmf=$with_wmf $have_wmf
3928 X11 --with-x=$with_x $have_x
3929 XML --with-xml=$with_xml $have_xml
3930 ZLIB --with-zlib=$with_zlib $have_zlib
cristy15308162015-01-09 23:43:12 +00003931
cristy9af1cbf2014-12-28 22:03:09 +00003932 Delegate Program Configuration:
3933 GhostPCL None $PCLDelegate ($PCLVersion)
3934 GhostXPS None $XPSDelegate ($XPSVersion)
3935 Ghostscript None $PSDelegate ($GSVersion)
cristy15308162015-01-09 23:43:12 +00003936
cristy9af1cbf2014-12-28 22:03:09 +00003937 Font Configuration:
3938 Apple fonts --with-apple-font-dir=$with_apple_font_dir $result_apple_font_dir
3939 Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir
3940 Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir
3941 Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir
cristy15308162015-01-09 23:43:12 +00003942
cristy9af1cbf2014-12-28 22:03:09 +00003943 X11 Configuration:
3944 X_CFLAGS = $X_CFLAGS
3945 X_PRE_LIBS = $X_PRE_LIBS
3946 X_LIBS = $X_LIBS
3947 X_EXTRA_LIBS = $X_EXTRA_LIBS
cristy15308162015-01-09 23:43:12 +00003948
cristy9af1cbf2014-12-28 22:03:09 +00003949 Options used to compile and link:
3950 PREFIX = $PREFIX_DIR
3951 EXEC-PREFIX = $EXEC_PREFIX_DIR
3952 VERSION = $PACKAGE_VERSION
3953 CC = $CC
3954 CFLAGS = $CFLAGS
3955 CPPFLAGS = $CPPFLAGS
3956 PCFLAGS = $PCFLAGS
3957 DEFS = $DEFS
3958 LDFLAGS = $LDFLAGS
3959 LIBS = $LIBS
3960 CXX = $CXX
3961 CXXFLAGS = $CXXFLAGS
3962 FEATURES = $MAGICK_FEATURES
3963 DELEGATES = $MAGICK_DELEGATES
3964==============================================================================
cristy3ed852e2009-09-05 21:47:34 +00003965])