cristy | fe676ee | 2013-11-18 13:03:38 +0000 | [diff] [blame] | 1 | # Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2 | # dedicated to making software imaging solutions freely available. |
| 3 | # |
| 4 | # You may not use this file except in compliance with the License. You may |
| 5 | # obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.imagemagick.org/script/license.php |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # |
| 15 | # Copyright (C) 2003 - 2008 GraphicsMagick Group |
cristy | 568c2d4 | 2012-07-27 01:41:20 +0000 | [diff] [blame] | 16 | # |
| 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. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 20 | |
cristy | c8051dc | 2012-08-20 23:50:31 +0000 | [diff] [blame] | 21 | AC_PREREQ(2.69) |
cristy | fddf775 | 2011-02-26 19:25:10 +0000 | [diff] [blame] | 22 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 23 | m4_define([magick_major_version], [7]) |
| 24 | m4_define([magick_minor_version], [0]) |
| 25 | m4_define([magick_micro_version], [0]) |
cristy | 7ebf509 | 2013-08-29 00:08:15 +0000 | [diff] [blame] | 26 | m4_define([magick_patchlevel_version], [0]) |
cristy | fddf775 | 2011-02-26 19:25:10 +0000 | [diff] [blame] | 27 | m4_define([magick_version], |
cristy | 29eb34e | 2011-10-16 00:46:08 +0000 | [diff] [blame] | 28 | [magick_major_version.magick_minor_version.magick_micro_version-magick_patchlevel_version]) |
cristy | 5b93af1 | 2012-08-02 18:02:48 +0000 | [diff] [blame] | 29 | m4_define([magick_svn_revision], esyscmd([sh -c "(svnversion .) | awk '{ print \$1 }' | tr -d '\n'"])) |
cristy | fddf775 | 2011-02-26 19:25:10 +0000 | [diff] [blame] | 30 | |
cristy | 09b53e1 | 2011-10-14 12:47:22 +0000 | [diff] [blame] | 31 | AC_INIT([ImageMagick],[magick_version],[http://www.imagemagick.org],[ImageMagick]) |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 32 | AC_CONFIG_SRCDIR([MagickCore/MagickCore.h]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 33 | AC_CONFIG_AUX_DIR([config]) |
cristy | bc55645 | 2012-08-17 19:44:03 +0000 | [diff] [blame] | 34 | AC_REQUIRE_AUX_FILE([tap-driver.sh]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 35 | AC_CONFIG_MACRO_DIR([m4]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 36 | AC_CONFIG_HEADERS([config/config.h]) |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 37 | AX_PREFIX_CONFIG_H([MagickCore/magick-baseconfig.h],[MagickCore]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 38 | AC_CONFIG_FILES([\ |
cristy | 305c5dd | 2012-09-13 00:30:13 +0000 | [diff] [blame] | 39 | common.shi \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 40 | config/configure.xml \ |
| 41 | config/delegates.xml \ |
| 42 | config/ImageMagick.rdf \ |
| 43 | config/MagickCore.dox \ |
| 44 | config/MagickWand.dox \ |
cristy | 2df3280 | 2012-09-17 01:15:28 +0000 | [diff] [blame] | 45 | config/Magick++.dox \ |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 46 | config/type-dejavu.xml \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 47 | config/type-ghostscript.xml \ |
| 48 | config/type-windows.xml \ |
| 49 | config/type.xml \ |
| 50 | ImageMagick.spec \ |
| 51 | Magick++/bin/Magick++-config \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 52 | MagickCore/ImageMagick.pc \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 53 | Magick++/lib/Magick++.pc \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 54 | MagickCore/MagickCore-config \ |
| 55 | MagickCore/MagickCore.pc \ |
| 56 | MagickCore/version.h \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 57 | Makefile \ |
| 58 | magick.sh \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 59 | PerlMagick/check.sh \ |
cristy | 8d0ff76 | 2013-03-10 20:33:28 +0000 | [diff] [blame] | 60 | PerlMagick/default/Magick.pm \ |
cristy | 3e049f8 | 2013-02-13 13:26:53 +0000 | [diff] [blame] | 61 | PerlMagick/Makefile.PL \ |
cristy | 8d0ff76 | 2013-03-10 20:33:28 +0000 | [diff] [blame] | 62 | PerlMagick/default/Makefile.PL \ |
cristy | cf0cbcc | 2013-02-13 23:32:58 +0000 | [diff] [blame] | 63 | PerlMagick/quantum/Makefile.PL \ |
| 64 | PerlMagick/quantum/quantum.pm \ |
| 65 | PerlMagick/quantum/quantum.xs \ |
| 66 | PerlMagick/quantum/typemap \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 67 | utilities/animate.1 \ |
| 68 | utilities/compare.1 \ |
| 69 | utilities/composite.1 \ |
| 70 | utilities/conjure.1 \ |
| 71 | utilities/convert.1 \ |
| 72 | utilities/display.1 \ |
| 73 | utilities/identify.1 \ |
| 74 | utilities/ImageMagick.1 \ |
| 75 | utilities/import.1 \ |
| 76 | utilities/mogrify.1 \ |
| 77 | utilities/montage.1 \ |
| 78 | utilities/stream.1 \ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 79 | MagickWand/MagickWand-config \ |
| 80 | MagickWand/MagickWand.pc ]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 81 | |
| 82 | # |
| 83 | # Save initial user-tunable values |
| 84 | # |
| 85 | USER_LIBS=$LIBS |
| 86 | for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do |
| 87 | eval isset=\${$var+set} |
| 88 | if test "$isset" = 'set'; then |
| 89 | eval val=$`echo $var` |
| 90 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' " |
| 91 | fi |
| 92 | done |
| 93 | AC_SUBST(DISTCHECK_CONFIG_FLAGS) |
| 94 | |
| 95 | CONFIGURE_ARGS="$0 ${ac_configure_args}" |
| 96 | AC_SUBST(CONFIGURE_ARGS) |
| 97 | |
| 98 | # Source file containing package/library versioning information. |
| 99 | . ${srcdir}/version.sh |
| 100 | |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 101 | echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}" |
cristy | 837d6dc | 2010-02-27 01:16:57 +0000 | [diff] [blame] | 102 | AC_CANONICAL_SYSTEM |
cristy | 9564605 | 2009-11-28 23:05:30 +0000 | [diff] [blame] | 103 | AC_CANONICAL_BUILD |
| 104 | AC_CANONICAL_HOST |
cristy | 8be3414 | 2012-06-17 14:07:18 +0000 | [diff] [blame] | 105 | AC_CANONICAL_TARGET |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 106 | |
cristy | 19615b8 | 2011-04-13 20:02:01 +0000 | [diff] [blame] | 107 | MAGICK_TARGET_CPU=$host_cpu |
cristy | 3225a07 | 2010-04-17 01:47:28 +0000 | [diff] [blame] | 108 | AC_SUBST(MAGICK_TARGET_CPU) |
cristy | 27d53d6 | 2012-07-29 23:30:07 +0000 | [diff] [blame] | 109 | AC_DEFINE_UNQUOTED(MAGICK_TARGET_CPU,$MAGICK_TARGET_CPU,[Target Host CPU]) |
cristy | 3225a07 | 2010-04-17 01:47:28 +0000 | [diff] [blame] | 110 | |
cristy | 19615b8 | 2011-04-13 20:02:01 +0000 | [diff] [blame] | 111 | MAGICK_TARGET_VENDOR=$host_vendor |
cristy | 3225a07 | 2010-04-17 01:47:28 +0000 | [diff] [blame] | 112 | AC_SUBST(MAGICK_TARGET_VENDOR) |
cristy | 27d53d6 | 2012-07-29 23:30:07 +0000 | [diff] [blame] | 113 | AC_DEFINE_UNQUOTED(MAGICK_TARGET_VENDOR,$MAGICK_TARGET_VENDOR,[Target Host Vendor]) |
cristy | 3225a07 | 2010-04-17 01:47:28 +0000 | [diff] [blame] | 114 | |
cristy | 19615b8 | 2011-04-13 20:02:01 +0000 | [diff] [blame] | 115 | MAGICK_TARGET_OS=$host_os |
cristy | 3225a07 | 2010-04-17 01:47:28 +0000 | [diff] [blame] | 116 | AC_SUBST(MAGICK_TARGET_OS) |
cristy | 27d53d6 | 2012-07-29 23:30:07 +0000 | [diff] [blame] | 117 | AC_DEFINE_UNQUOTED(MAGICK_TARGET_OS,$MAGICK_TARGET_OS,[Target Host OS]) |
cristy | 3225a07 | 2010-04-17 01:47:28 +0000 | [diff] [blame] | 118 | |
cristy | 3744276 | 2013-02-10 21:07:23 +0000 | [diff] [blame] | 119 | |
| 120 | # Substitute versioning |
| 121 | AC_SUBST([MAGICK_MAJOR_VERSION],[magick_major_version]) |
| 122 | AC_SUBST([MAGICK_MINOR_VERSION],[magick_minor_version]) |
| 123 | AC_SUBST([MAGICK_MICRO_VERSION],[magick_micro_version]) |
| 124 | AC_SUBST([MAGICK_PATCHLEVEL_VERSION],[magick_patchlevel_version]) |
| 125 | AC_SUBST([MAGICK_VERSION],[magick_version]) |
| 126 | AC_SUBST([MAGICK_SVN_REVISION],[magick_svn_revision]) |
| 127 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 128 | # Substitute library versioning |
| 129 | AC_SUBST(MAGICK_LIBRARY_CURRENT)dnl |
| 130 | AC_SUBST(MAGICK_LIBRARY_REVISION)dnl |
| 131 | AC_SUBST(MAGICK_LIBRARY_AGE)dnl |
cristy | bab87c3 | 2010-02-09 20:54:22 +0000 | [diff] [blame] | 132 | AC_SUBST([MAGICK_LIBRARY_CURRENT_MIN], |
| 133 | [`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`]) |
| 134 | AC_SUBST([MAGICK_LIBRARY_VERSION_INFO], |
| 135 | [$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE]) |
cristy | 3744276 | 2013-02-10 21:07:23 +0000 | [diff] [blame] | 136 | |
cristy | 5ed9c6e | 2013-07-14 21:20:31 +0000 | [diff] [blame] | 137 | AC_SUBST(MAGICKPP_LIBRARY_CURRENT)dnl |
| 138 | AC_SUBST(MAGICKPP_LIBRARY_REVISION)dnl |
| 139 | AC_SUBST(MAGICKPP_LIBRARY_AGE)dnl |
| 140 | AC_SUBST([MAGICKPP_LIBRARY_CURRENT_MIN], |
| 141 | [`expr $MAGICKPP_LIBRARY_CURRENT - $MAGICKPP_LIBRARY_AGE`]) |
| 142 | AC_SUBST([MAGICKPP_LIBRARY_VERSION_INFO], |
| 143 | [$MAGICKPP_LIBRARY_CURRENT:$MAGICKPP_LIBRARY_REVISION:$MAGICKPP_LIBRARY_AGE]) |
| 144 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 145 | AC_SUBST(PACKAGE_NAME)dnl |
| 146 | AC_SUBST(PACKAGE_VERSION)dnl |
cristy | 878c2f1 | 2011-08-19 00:25:19 +0000 | [diff] [blame] | 147 | AC_SUBST(PACKAGE_PERL_VERSION)dnl |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 148 | AC_SUBST(PACKAGE_RELEASE)dnl |
| 149 | AC_SUBST(PACKAGE_CHANGE_DATE)dnl |
| 150 | AC_SUBST(PACKAGE_LIB_VERSION)dnl |
| 151 | AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl |
| 152 | AC_SUBST(PACKAGE_RELEASE_DATE)dnl |
cristy | 15a8878 | 2010-01-31 23:24:49 +0000 | [diff] [blame] | 153 | AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 154 | |
| 155 | # Ensure that make can run correctly |
| 156 | AM_SANITY_CHECK |
| 157 | |
cristy | 30841e6 | 2014-05-19 00:45:15 +0000 | [diff] [blame] | 158 | AM_INIT_AUTOMAKE([1.12 nostdinc color-tests foreign parallel-tests silent-rules subdir-objects dist-bzip2 dist-lzip dist-xz dist-zip]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 159 | |
| 160 | # Enable support for silent build rules |
cristy | fddf775 | 2011-02-26 19:25:10 +0000 | [diff] [blame] | 161 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 162 | |
cristy | 5ed9c6e | 2013-07-14 21:20:31 +0000 | [diff] [blame] | 163 | # versionning of library |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 164 | MAGICK_LIB_VERSION="0x" |
| 165 | if test ${MAGICK_LIBRARY_CURRENT} -lt 10 ; then |
| 166 | MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0 |
| 167 | fi |
| 168 | MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_CURRENT} |
| 169 | if test ${MAGICK_LIBRARY_AGE} -lt 10 ; then |
| 170 | MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0 |
| 171 | fi |
| 172 | MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_AGE} |
| 173 | if test ${MAGICK_LIBRARY_REVISION} -lt 10 ; then |
| 174 | MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}0 |
| 175 | fi |
| 176 | MAGICK_LIB_VERSION=${MAGICK_LIB_VERSION}${MAGICK_LIBRARY_REVISION} |
| 177 | AC_SUBST(MAGICK_LIB_VERSION) |
| 178 | |
| 179 | # Definition used to define MagickLibVersionText in version.h |
| 180 | MAGICK_LIB_VERSION_TEXT="${PACKAGE_VERSION}" |
| 181 | AC_SUBST(MAGICK_LIB_VERSION_TEXT) |
| 182 | |
| 183 | # Definition used to define MagickLibVersionNumber in version.h |
| 184 | MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}" |
| 185 | AC_SUBST(MAGICK_LIB_VERSION_NUMBER) |
| 186 | |
cristy | 5ed9c6e | 2013-07-14 21:20:31 +0000 | [diff] [blame] | 187 | MAGICKPP_LIB_VERSION="0x" |
| 188 | if test ${MAGICKPP_LIBRARY_CURRENT} -lt 10 ; then |
| 189 | MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0 |
| 190 | fi |
| 191 | MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_CURRENT} |
| 192 | if test ${MAGICKPP_LIBRARY_AGE} -lt 10 ; then |
| 193 | MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0 |
| 194 | fi |
| 195 | MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_AGE} |
| 196 | if test ${MAGICKPP_LIBRARY_REVISION} -lt 10 ; then |
| 197 | MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}0 |
| 198 | fi |
| 199 | MAGICKPP_LIB_VERSION=${MAGICKPP_LIB_VERSION}${MAGICKPP_LIBRARY_REVISION} |
| 200 | AC_SUBST(MAGICKPP_LIB_VERSION) |
| 201 | |
| 202 | # Definition used to define MagickLibVersionText in version.h |
| 203 | MAGICKPP_LIB_VERSION_TEXT="${PACKAGE_VERSION}" |
| 204 | AC_SUBST(MAGICKPP_LIB_VERSION_TEXT) |
| 205 | |
| 206 | # Definition used to define MagickLibVersionNumber in version.h |
| 207 | MAGICK_LIB_VERSION_NUMBER="${MAGICK_LIBRARY_CURRENT},${MAGICK_LIBRARY_AGE},${MAGICK_LIBRARY_REVISION}" |
| 208 | AC_SUBST(MAGICK_LIB_VERSION_NUMBER) |
| 209 | |
| 210 | |
| 211 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 212 | # Regenerate config.status if ChangeLog or version.sh is updated. |
| 213 | AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/version.sh']) |
| 214 | |
| 215 | PERLMAINCC=$CC |
| 216 | |
| 217 | MAGICK_CFLAGS='' |
| 218 | MAGICK_CPPFLAGS=$CPPFLAGS_USER |
| 219 | MAGICK_PCFLAGS=$CPPFLAGS_USER |
| 220 | MAGICK_LDFLAGS='' |
| 221 | MAGICK_LIBS='' |
cristy | fd9dcd4 | 2010-08-08 18:07:02 +0000 | [diff] [blame] | 222 | MAGICK_FEATURES='' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 223 | |
| 224 | # |
| 225 | # Evaluate shell variable equivalents to Makefile directory variables |
| 226 | # |
| 227 | if test "x$prefix" = xNONE; then |
| 228 | prefix=$ac_default_prefix |
| 229 | fi |
| 230 | # Let make expand exec_prefix. |
| 231 | if test "x$exec_prefix" = xNONE; then |
| 232 | exec_prefix='${prefix}' |
| 233 | fi |
| 234 | |
| 235 | # |
| 236 | eval "eval PREFIX_DIR=${prefix}" |
| 237 | AC_SUBST(PREFIX_DIR) |
| 238 | eval "eval EXEC_PREFIX_DIR=${exec_prefix}" |
| 239 | AC_SUBST(EXEC_PREFIX_DIR) |
| 240 | eval "eval BIN_DIR=$bindir" |
| 241 | AC_SUBST(BIN_DIR) |
| 242 | eval "eval SBIN_DIR=$sbindir" |
| 243 | AC_SUBST(SBIN_DIR) |
| 244 | eval "eval LIBEXEC_DIR=$libexecdir" |
| 245 | AC_SUBST(LIBEXEC_DIR) |
| 246 | eval "eval DATA_DIR=$datadir" |
| 247 | AC_SUBST(DATA_DIR) |
cristy | 4e65ec2 | 2012-04-08 01:33:27 +0000 | [diff] [blame] | 248 | eval "eval DOC_DIR=$datadir/doc" |
cristy | d55889c | 2011-03-27 00:50:24 +0000 | [diff] [blame] | 249 | AC_SUBST(DOC_DIR) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 250 | eval "eval SYSCONF_DIR=$sysconfdir" |
| 251 | AC_SUBST(SYSCONF_DIR) |
| 252 | eval "eval SHAREDSTATE_DIR=$sharedstatedir" |
| 253 | AC_SUBST(SHAREDSTATE_DIR) |
| 254 | eval "eval LOCALSTATE_DIR=$localstatedir" |
| 255 | AC_SUBST(LOCALSTATE_DIR) |
| 256 | eval "eval LIB_DIR=$libdir" |
| 257 | AC_SUBST(LIB_DIR) |
| 258 | eval "eval INCLUDE_DIR=$includedir" |
| 259 | AC_SUBST(INCLUDE_DIR) |
| 260 | eval "eval PERSISTINCLUDE_DIR=$oldincludedir" |
| 261 | AC_SUBST(PERSISTINCLUDE_DIR) |
| 262 | eval "eval INFO_DIR=$infodir" |
| 263 | AC_SUBST(INFO_DIR) |
| 264 | eval "eval MAN_DIR=$mandir" |
| 265 | AC_SUBST(MAN_DIR) |
| 266 | |
| 267 | # Get full paths to source and build directories |
| 268 | srcdirfull="`cd $srcdir && pwd`" |
| 269 | builddir="`pwd`" |
| 270 | |
| 271 | # |
| 272 | # Compute variables useful for running uninstalled software. |
| 273 | # |
| 274 | MAGICK_CODER_MODULE_PATH="${builddir}/coders" |
| 275 | MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config" |
| 276 | MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config" |
| 277 | MAGICK_FILTER_MODULE_PATH="${builddir}/filters" |
| 278 | DIRSEP=':' |
| 279 | case "${build_os}" in |
| 280 | mingw* ) |
| 281 | MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0` |
| 282 | MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0` |
| 283 | MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0` |
| 284 | MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0` |
| 285 | DIRSEP=';' |
| 286 | ;; |
| 287 | esac |
| 288 | case "${host_os}" in |
| 289 | mingw* ) |
| 290 | DIRSEP=';' |
| 291 | ;; |
| 292 | esac |
| 293 | AC_SUBST(MAGICK_CODER_MODULE_PATH) |
| 294 | AC_SUBST(MAGICK_CONFIGURE_SRC_PATH) |
| 295 | AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH) |
| 296 | AC_SUBST(MAGICK_FILTER_MODULE_PATH) |
| 297 | AC_SUBST(DIRSEP) |
| 298 | |
cristy | a0b81c3 | 2010-01-22 02:54:33 +0000 | [diff] [blame] | 299 | |
| 300 | # |
| 301 | # Enable OS features. |
| 302 | # |
| 303 | AC_USE_SYSTEM_EXTENSIONS |
| 304 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 305 | # Check for programs |
| 306 | AC_PROG_CC |
cristy | 9564605 | 2009-11-28 23:05:30 +0000 | [diff] [blame] | 307 | AC_PROG_CXX |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 308 | AC_PROG_CC_STDC |
| 309 | AC_PROG_CPP |
| 310 | AC_PROG_LD |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 311 | AC_SUBST(LD) |
cristy | 837d6dc | 2010-02-27 01:16:57 +0000 | [diff] [blame] | 312 | AC_PROG_CC_C99 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 313 | AM_PROG_CC_C_O |
cristy | 92703d8 | 2010-04-26 00:18:18 +0000 | [diff] [blame] | 314 | AX_CFLAGS_WARN_ALL |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 315 | AC_PROG_INSTALL |
| 316 | AC_PROG_MAKE_SET |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 317 | AC_PROG_LN_S |
cristy | 8d0ff76 | 2013-03-10 20:33:28 +0000 | [diff] [blame] | 318 | AC_PROG_SED |
cristy | bc55645 | 2012-08-17 19:44:03 +0000 | [diff] [blame] | 319 | AC_PROG_AWK |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 320 | AM_WITH_DMALLOC |
cristy | 92703d8 | 2010-04-26 00:18:18 +0000 | [diff] [blame] | 321 | AX_C___ATTRIBUTE__ |
cristy | a045997 | 2013-11-03 18:09:35 +0000 | [diff] [blame] | 322 | AX_GCC_ARCHFLAG([no]) |
cristy | 0d3a638 | 2010-04-26 00:45:55 +0000 | [diff] [blame] | 323 | PKG_PROG_PKG_CONFIG |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 324 | |
cristy | d95b7a5 | 2013-10-23 13:12:53 +0000 | [diff] [blame] | 325 | # Test for 64-bit build. |
| 326 | AC_CHECK_SIZEOF([size_t]) |
| 327 | |
| 328 | AX_COMPILER_VENDOR |
cristy | d95b7a5 | 2013-10-23 13:12:53 +0000 | [diff] [blame] | 329 | # The AX_CFLAGS_WARN_ALL macro doesn't currently work for sunpro |
| 330 | # compiler. |
| 331 | if test "$ax_cv_c_compiler_vendor" != "sun"; then |
| 332 | AX_CFLAGS_WARN_ALL |
| 333 | fi |
| 334 | |
| 335 | if test "x$GCC" = "xyes"; then |
| 336 | CFLAGS="$CFLAGS -fexceptions" |
| 337 | touch local.exp |
| 338 | else |
| 339 | cat > local.exp <<EOF |
| 340 | set CC_FOR_TARGET "$CC" |
| 341 | EOF |
| 342 | fi |
| 343 | |
cristy | 496c090 | 2013-02-26 12:57:44 +0000 | [diff] [blame] | 344 | # Check for linker script support |
cristy | 9b86f20 | 2012-11-28 21:55:35 +0000 | [diff] [blame] | 345 | gl_LD_VERSION_SCRIPT |
| 346 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 347 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 348 | # Enable run-time checking. |
| 349 | # |
| 350 | AC_ARG_ENABLE([bounds-checking], |
cristy | a382469 | 2012-03-30 17:22:07 +0000 | [diff] [blame] | 351 | [AC_HELP_STRING([--enable-bounds-checking], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 352 | [enable run-time bounds-checking])], |
| 353 | [enable_bounds_checking=$enableval], |
| 354 | [enable_bounds_checking='no']) |
| 355 | |
| 356 | if test "$enable_bounds_checking" = yes; then |
| 357 | AC_DEFINE([_FORTIFY_SOURCE], [2], |
| 358 | [enable run-time bounds-checking]) |
| 359 | fi |
| 360 | |
| 361 | # |
| 362 | # Tests for Windows |
| 363 | # |
| 364 | AC_EXEEXT |
| 365 | AC_OBJEXT |
| 366 | |
| 367 | GDI32_LIBS='' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 368 | native_win32_build='no' |
| 369 | cygwin_build='no' |
| 370 | case "${host_os}" in |
| 371 | cygwin* ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 372 | cygwin_build='yes' |
| 373 | GDI32_LIBS='-lgdi32' |
| 374 | ;; |
| 375 | mingw* ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 376 | native_win32_build='yes' |
| 377 | GDI32_LIBS='-lgdi32' |
| 378 | ;; |
| 379 | esac |
| 380 | if test "${GDI32_LIBS}x" != 'x'; then |
| 381 | AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library) |
| 382 | fi |
| 383 | AC_SUBST(GDI32_LIBS) |
| 384 | AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' ) |
| 385 | AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' ) |
| 386 | AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' ) |
| 387 | AM_CONDITIONAL(USING_CL, test "x${CC}" = 'xcl.exe' ) |
| 388 | |
| 389 | WinPathScript="${srcdirfull}/winpath.sh" |
| 390 | AC_SUBST(WinPathScript) |
| 391 | |
| 392 | # |
| 393 | # Compiler flags tweaks |
| 394 | # |
| 395 | if test "${GCC}" != "yes"; then |
| 396 | case "${host}" in |
| 397 | *-*-hpux* ) |
| 398 | # aCC: HP ANSI C++ B3910B A.03.34 |
| 399 | CFLAGS="${CFLAGS} -Wp,-H30000" |
| 400 | if test -n "${CXXFLAGS}"; then |
| 401 | CXXFLAGS='-AA' |
| 402 | else |
| 403 | CXXFLAGS="${CXXFLAGS} -AA" |
| 404 | fi |
| 405 | ;; |
| 406 | *-dec-osf5.* ) |
| 407 | # Compaq alphaev68-dec-osf5.1 compiler |
| 408 | if test -n "${CXXFLAGS}"; then |
| 409 | CXXFLAGS='-std strict_ansi -noimplicit_include' |
| 410 | else |
| 411 | CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include" |
| 412 | fi |
| 413 | esac |
| 414 | fi |
| 415 | |
| 416 | # Check for lazy-loading. |
| 417 | AC_CACHE_CHECK([for linker lazyload option],[im_cv_ld_lazyload], |
| 418 | [ |
| 419 | im_cv_ld_lazyload='none' |
| 420 | case "${host}" in |
| 421 | *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? ) |
| 422 | if test "$lt_cv_prog_gnu_ld" != 'yes' ; then |
| 423 | im_cv_ld_lazyload='-Wl,-zlazyload' |
| 424 | fi |
| 425 | ;; |
| 426 | esac |
| 427 | ]) |
| 428 | if test "${im_cv_ld_lazyload}" != 'none' ; then |
| 429 | if test -z "${LDFLAGS}" ; then |
| 430 | LDFLAGS="${im_cv_ld_lazyload}" |
| 431 | else |
| 432 | LDFLAGS="${im_cv_ld_lazyload} ${LDFLAGS}" |
| 433 | fi |
| 434 | fi |
| 435 | |
| 436 | dnl Platform-specific stuff |
| 437 | case "$host" in |
cristy | c37574e | 2013-02-16 01:04:55 +0000 | [diff] [blame] | 438 | *darwin* | *-macos10*) |
| 439 | dnl Disable FORTIFY_SOURCE to fix a bug in LVVM / OpenMP support |
cristy | b3b90d3 | 2013-02-16 15:44:08 +0000 | [diff] [blame] | 440 | CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=0" |
cristy | c37574e | 2013-02-16 01:04:55 +0000 | [diff] [blame] | 441 | dnl OS X universal binary support, requires --disable-dependency-tracking |
| 442 | AC_ARG_ENABLE([osx-universal-binary], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 443 | AC_HELP_STRING([--enable-osx-universal-binary], |
| 444 | [build universal binary on OS X [[default=no]]]), |
| 445 | [build_osxuniversal="${enableval}"], [build_osxuniversal=no]) |
| 446 | |
cristy | c37574e | 2013-02-16 01:04:55 +0000 | [diff] [blame] | 447 | if test "${build_osxuniversal}" != no ; then |
| 448 | if test "$enable_dependency_tracking" != no ; then |
| 449 | AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 450 | Please re-run configure with these options: |
| 451 | --disable-dependency-tracking --enable-osx-universal-binary |
| 452 | ]) |
cristy | c37574e | 2013-02-16 01:04:55 +0000 | [diff] [blame] | 453 | fi |
| 454 | CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386" |
| 455 | CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386" |
| 456 | LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 457 | fi |
| 458 | ;; |
| 459 | esac |
| 460 | |
cristy | 0151ae1 | 2011-10-28 16:32:29 +0000 | [diff] [blame] | 461 | # |
| 462 | # ARCH specific include directory |
| 463 | # |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 464 | AC_ARG_WITH([includearch-dir], |
| 465 | [AC_HELP_STRING([--includearch-dir=DIR], |
cristy | 0151ae1 | 2011-10-28 16:32:29 +0000 | [diff] [blame] | 466 | [ARCH specific include directory])], |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 467 | [includearch_dir=$withval], |
| 468 | [includearch_dir=$INCLUDE_DIR]) |
cristy | 0151ae1 | 2011-10-28 16:32:29 +0000 | [diff] [blame] | 469 | |
cristy | d286fd7 | 2013-02-24 19:25:33 +0000 | [diff] [blame] | 470 | eval "eval INCLUDEARCH_DIR=$includearch_dir" |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 471 | AC_SUBST(INCLUDEARCH_DIR) |
cristy | 0151ae1 | 2011-10-28 16:32:29 +0000 | [diff] [blame] | 472 | |
| 473 | # |
| 474 | # ARCH specific configuration directory |
| 475 | # |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 476 | AC_ARG_WITH([sharearch-dir], |
| 477 | [AC_HELP_STRING([--sharearch-dir=DIR], |
cristy | 0151ae1 | 2011-10-28 16:32:29 +0000 | [diff] [blame] | 478 | [ARCH specific config directory])], |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 479 | [sharearch_dir=$withval], |
cristy | 408ebcd | 2011-11-14 01:36:57 +0000 | [diff] [blame] | 480 | [sharearch_dir="${LIB_DIR}"]) |
cristy | 0151ae1 | 2011-10-28 16:32:29 +0000 | [diff] [blame] | 481 | |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 482 | eval "eval SHAREARCH_DIR=$sharearch_dir" |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 483 | AC_SUBST(SHAREARCH_DIR) |
cristy | 0151ae1 | 2011-10-28 16:32:29 +0000 | [diff] [blame] | 484 | |
cristy | 496c090 | 2013-02-26 12:57:44 +0000 | [diff] [blame] | 485 | # Path to the pkgconfig folder |
cristy | 2ec87cc | 2013-02-18 17:46:50 +0000 | [diff] [blame] | 486 | AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=DIR], |
| 487 | [Path to the pkgconfig directory @<:@LIBDIR/pkgconfig@:>@]), |
| 488 | [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig']) |
| 489 | AC_SUBST([pkgconfigdir]) |
| 490 | |
cristy | 0151ae1 | 2011-10-28 16:32:29 +0000 | [diff] [blame] | 491 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 492 | # Enable support for threads |
cristy | 1ae5c99 | 2013-07-30 14:55:07 +0000 | [diff] [blame] | 493 | # |
| 494 | # Find Posix threads library |
| 495 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 496 | AC_ARG_WITH([threads], |
cristy | 55bf91c | 2010-09-24 00:29:41 +0000 | [diff] [blame] | 497 | [AC_HELP_STRING([--without-threads], [disable threads support])], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 498 | [with_threads=$withval], |
| 499 | [with_threads='yes']) |
| 500 | |
cristy | 1ae5c99 | 2013-07-30 14:55:07 +0000 | [diff] [blame] | 501 | THREAD_LIBS='' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 502 | have_threads=no |
| 503 | if test "$with_threads" != 'no'; then |
cristy | f6fcb5d | 2010-09-24 01:19:13 +0000 | [diff] [blame] | 504 | AX_PTHREAD() |
cristy | 7acf8fb | 2010-09-23 19:58:53 +0000 | [diff] [blame] | 505 | if test "$ax_pthread_ok" = yes; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 506 | have_threads=yes |
| 507 | DEF_THREAD="$PTHREAD_CFLAGS" |
| 508 | CFLAGS="$CFLAGS $DEF_THREAD" |
| 509 | CXXFLAGS="$CXXFLAGS $DEF_THREAD" |
cristy | 1ae5c99 | 2013-07-30 14:55:07 +0000 | [diff] [blame] | 510 | THREAD_LIBS="$PTHREAD_LIBS" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 511 | if test "$CC" != "$PTHREAD_CC"; then |
| 512 | AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.]) |
| 513 | CC="$PTHREAD_CC" |
| 514 | fi |
cristy | 55bf91c | 2010-09-24 00:29:41 +0000 | [diff] [blame] | 515 | AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 516 | fi |
| 517 | fi |
cristy | 1ae5c99 | 2013-07-30 14:55:07 +0000 | [diff] [blame] | 518 | LIBS="$LIBS $THREAD_LIBS" |
| 519 | AC_SUBST(THREAD_LIBS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 520 | |
| 521 | # Enable support for OpenMP |
| 522 | if test "$have_threads" != 'yes'; then |
| 523 | ac_cv_prog_c_openmp=unsupported |
| 524 | fi |
| 525 | AC_OPENMP([C]) |
| 526 | CFLAGS="$OPENMP_CFLAGS $CFLAGS" |
| 527 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS" |
| 528 | AC_SUBST(OPENMP_CFLAGS) |
cristy | 391f1ce | 2010-09-09 17:23:28 +0000 | [diff] [blame] | 529 | if test "$enable_openmp" != no; then |
| 530 | if test "$ac_cv_prog_c_openmp" != 'unsupported'; then |
| 531 | MAGICK_FEATURES="OpenMP $MAGICK_FEATURES" |
| 532 | fi |
| 533 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 534 | |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 535 | # Enable support for OpenCL |
cristy | 7141bca | 2010-01-21 16:51:24 +0000 | [diff] [blame] | 536 | AX_OPENCL([C]) |
cristy | c7083c1 | 2009-10-14 03:16:55 +0000 | [diff] [blame] | 537 | CFLAGS="$CL_CFLAGS $CFLAGS" |
cristy | fdc7d12 | 2013-08-17 20:46:45 +0000 | [diff] [blame] | 538 | CPPFLAGS="$CL_CFLAGS $CPPFLAGS" |
cristy | c7083c1 | 2009-10-14 03:16:55 +0000 | [diff] [blame] | 539 | LIBS="$CL_LIBS $LIBS" |
cristy | 18d9cfe | 2009-12-31 03:55:21 +0000 | [diff] [blame] | 540 | AC_SUBST(CL_CFLAGS) |
cristy | 391f1ce | 2010-09-09 17:23:28 +0000 | [diff] [blame] | 541 | if test "$enable_opencl" != no; then |
cristy | f864d42 | 2011-09-12 17:57:53 +0000 | [diff] [blame] | 542 | if test "X$ax_cv_check_cl_libcl" != Xno; then : |
cristy | 391f1ce | 2010-09-09 17:23:28 +0000 | [diff] [blame] | 543 | MAGICK_FEATURES="OpenCL $MAGICK_FEATURES" |
| 544 | fi |
cristy | fd9dcd4 | 2010-08-08 18:07:02 +0000 | [diff] [blame] | 545 | fi |
cristy | 736173a | 2009-09-20 21:18:22 +0000 | [diff] [blame] | 546 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 547 | ######## |
| 548 | # |
| 549 | # Check for large file support |
| 550 | # |
| 551 | ######## |
| 552 | AC_SYS_LARGEFILE |
| 553 | AC_FUNC_FSEEKO |
| 554 | LFS_CPPFLAGS='' |
| 555 | if test "$enable_largefile" != no; then |
cristy | c1e0cc1 | 2011-09-21 16:41:16 +0000 | [diff] [blame] | 556 | case $ac_cv_sys_file_offset_bits in |
| 557 | no) |
| 558 | # nothing to do here as the host supports LFS fine |
| 559 | ;; |
| 560 | unknown) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 561 | AC_MSG_CHECKING([for native large file support]) |
cristy | da16f16 | 2011-02-19 23:52:17 +0000 | [diff] [blame] | 562 | AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <unistd.h> |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 563 | main () { |
| 564 | exit(!(sizeof(off_t) == 8)); |
cristy | da16f16 | 2011-02-19 23:52:17 +0000 | [diff] [blame] | 565 | }])], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 566 | [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 567 | AC_MSG_RESULT([yes])], |
| 568 | [AC_MSG_RESULT([no])]) |
cristy | c1e0cc1 | 2011-09-21 16:41:16 +0000 | [diff] [blame] | 569 | ;; |
| 570 | *) |
| 571 | LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" |
| 572 | ;; |
| 573 | esac |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 574 | if test "$ac_cv_sys_large_files" != 'no'; then |
| 575 | LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1" |
| 576 | fi |
| 577 | if test "$ac_cv_sys_largefile_source" != 'no'; then |
| 578 | LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1" |
| 579 | fi |
| 580 | fi |
| 581 | AC_SUBST(LFS_CPPFLAGS) |
| 582 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 583 | # Configure libtool |
| 584 | AC_LIBTOOL_DLOPEN |
| 585 | LT_INIT([win32-dll]) |
| 586 | LT_LANG([C++]) |
| 587 | AC_SUBST(LIBTOOL_DEPS) |
| 588 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 589 | # Check to see if building shared libraries |
| 590 | libtool_build_shared_libs='no' |
| 591 | if test "$enable_shared" = 'yes'; then |
| 592 | libtool_build_shared_libs='yes' |
| 593 | fi |
| 594 | |
| 595 | # Check to see if building static libraries |
| 596 | libtool_build_static_libs='no' |
| 597 | if test "$enable_static" = 'yes'; then |
| 598 | libtool_build_static_libs='yes' |
| 599 | fi |
| 600 | |
cristy | fa11211 | 2010-01-04 17:48:07 +0000 | [diff] [blame] | 601 | AM_CONDITIONAL(WITH_SHARED_LIBS, test "${libtool_build_shared_libs}" = 'yes') |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 602 | # |
| 603 | # Enable support for building loadable modules |
| 604 | # |
cristy | af4cbf3 | 2012-10-16 23:47:41 +0000 | [diff] [blame] | 605 | build_modules='no' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 606 | AC_ARG_WITH([modules], |
| 607 | [AC_HELP_STRING([--with-modules], |
| 608 | [enable building dynamically loadable modules])], |
| 609 | [with_modules=$withval], |
cristy | 5a1cefd | 2010-01-06 20:42:35 +0000 | [diff] [blame] | 610 | [with_modules='no']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 611 | |
| 612 | # Only allow building loadable modules if we are building shared libraries |
| 613 | if test "$with_modules" != 'no' ; then |
| 614 | if test "$libtool_build_shared_libs" = 'no'; then |
| 615 | AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.]) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 616 | build_modules='no' |
| 617 | else |
| 618 | build_modules='yes' |
| 619 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 620 | fi |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 621 | if test "$build_modules" != 'no' ; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 622 | AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.) |
cristy | e78d253 | 2012-12-17 20:41:10 +0000 | [diff] [blame] | 623 | MAGICK_FEATURES="$MAGICK_FEATURES Modules" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 624 | fi |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 625 | AM_CONDITIONAL(WITH_MODULES, test "$build_modules" != 'no') |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 626 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 627 | # Enable build using delegate libraries built in subdirectories rather than installed |
cristy | fbb0ef0 | 2010-12-19 02:32:11 +0000 | [diff] [blame] | 628 | # delegate libraries (bzlib fftw fpx gslib jp2 jbig jpeg lcms lzma png tiff ttf wmf xml zlib) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 629 | AC_ARG_ENABLE([delegate-build], |
| 630 | [AC_HELP_STRING([--enable-delegate-build], |
| 631 | [look for delegate libraries in build directory])], |
| 632 | [enable_delegate_build=$enableval], |
| 633 | [enable_delegate_build='no']) |
| 634 | |
| 635 | AC_ARG_ENABLE([deprecated], |
| 636 | [AC_HELP_STRING([--disable-deprecated], |
cristy | 3a75f06 | 2012-09-08 23:29:40 +0000 | [diff] [blame] | 637 | [exclude deprecated methods in MagickCore and MagickWand APIs])], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 638 | [enable_deprecated=$enableval], |
| 639 | [enable_deprecated='no']) |
| 640 | |
| 641 | if test "$enable_deprecated" = 'yes'; then |
| 642 | AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API]) |
| 643 | else |
| 644 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecated " |
| 645 | fi |
| 646 | |
| 647 | # Build a version of ImageMagick which operates uninstalled. |
| 648 | # Used to build distributions located via MAGICK_HOME / executable path |
| 649 | AC_ARG_ENABLE([installed], |
| 650 | [AC_HELP_STRING([--disable-installed], |
| 651 | [Formally install ImageMagick under PREFIX])], |
| 652 | [enable_installed=$enableval], |
| 653 | [enable_installed='yes']) |
| 654 | |
| 655 | if test "$enable_installed" = 'yes'; then |
| 656 | AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix]) |
| 657 | else |
| 658 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed " |
| 659 | fi |
| 660 | |
| 661 | # Permit enciphering and deciphering image pixels. |
| 662 | AC_ARG_ENABLE([cipher], |
| 663 | [AC_HELP_STRING([--disable-cipher], |
| 664 | [disable enciphering and deciphering image pixels])], |
| 665 | [enable_cipher=$enableval], |
| 666 | [enable_cipher='yes']) |
| 667 | |
| 668 | if test "$enable_cipher" = 'yes'; then |
| 669 | AC_DEFINE(CIPHER_SUPPORT,1,[permit enciphering and deciphering image pixels]) |
| 670 | fi |
| 671 | |
cristy | 6e3607c | 2011-09-13 13:59:17 +0000 | [diff] [blame] | 672 | # Build a zero-configuration version of ImageMagick. |
| 673 | AC_ARG_ENABLE([zero-configuration], |
| 674 | [AC_HELP_STRING([--enable-zero-configuration], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 675 | [enable self-contained, embeddable, zero-configuration ImageMagick])], |
cristy | 6e3607c | 2011-09-13 13:59:17 +0000 | [diff] [blame] | 676 | [enable_zero_configuration=$enableval], |
| 677 | [enable_zero_configuration='no']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 678 | |
cristy | 6e3607c | 2011-09-13 13:59:17 +0000 | [diff] [blame] | 679 | if test "$enable_zero_configuration" = 'yes'; then |
| 680 | AC_DEFINE(ZERO_CONFIGURATION_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick]) |
cristy | 81af570 | 2011-09-13 14:20:58 +0000 | [diff] [blame] | 681 | MAGICK_FEATURES="Zero-Configuration $MAGICK_FEATURES" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 682 | fi |
| 683 | |
| 684 | # Build a high dynamic range version of ImageMagick. |
| 685 | AC_ARG_ENABLE([hdri], |
cristy | f314dbd | 2012-11-15 13:35:28 +0000 | [diff] [blame] | 686 | [AC_HELP_STRING([--enable-hdri], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 687 | [accurately represent the wide range of intensity levels found in real scenes])], |
| 688 | [enable_hdri=$enableval], |
cristy | 191c0b7 | 2012-08-12 16:29:52 +0000 | [diff] [blame] | 689 | [enable_hdri='yes']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 690 | |
| 691 | MAGICK_HDRI="" |
| 692 | if test "$enable_hdri" = 'yes'; then |
| 693 | MAGICK_HDRI="HDRI" |
cristy | e52f12f | 2012-12-31 15:32:36 +0000 | [diff] [blame] | 694 | magick_hdri_enable='1'; |
cristy | fd9dcd4 | 2010-08-08 18:07:02 +0000 | [diff] [blame] | 695 | MAGICK_FEATURES="HDRI $MAGICK_FEATURES" |
cristy | e52f12f | 2012-12-31 15:32:36 +0000 | [diff] [blame] | 696 | else |
| 697 | magick_hdri_enable='0' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 698 | fi |
cristy | e52f12f | 2012-12-31 15:32:36 +0000 | [diff] [blame] | 699 | AC_DEFINE_UNQUOTED(HDRI_ENABLE_OBSOLETE_IN_H,$magick_hdri_enable,[Whether hdri is enabled or not]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 700 | AC_SUBST(MAGICK_HDRI)dnl |
cristy | e52f12f | 2012-12-31 15:32:36 +0000 | [diff] [blame] | 701 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable" |
| 702 | CFLAGS="$CFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable" |
cristy | 7206238 | 2012-12-31 16:49:52 +0000 | [diff] [blame] | 703 | CPPFLAGS="$CPPFLAGS -DMAGICKCORE_HDRI_ENABLE=$magick_hdri_enable" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 704 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 705 | # Build a version of ImageMagick with assert statements. |
| 706 | AC_ARG_ENABLE([assert], |
| 707 | [AC_HELP_STRING([--disable-assert], |
| 708 | [disable assert() statements in build])], |
| 709 | [enable_assert=$enableval], |
| 710 | [enable_assert='yes']) |
| 711 | |
| 712 | if test "$enable_assert" = 'no'; then |
| 713 | AC_DEFINE(NDEBUG,1,[Turn off assert statements]) |
| 714 | fi |
| 715 | |
cristy | a448bd2 | 2011-10-14 12:38:13 +0000 | [diff] [blame] | 716 | # Don't emit "rebuild rules" for configure, Makefile.ins, etc. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 717 | AM_MAINTAINER_MODE |
| 718 | |
cristy | 944e51f | 2013-04-16 18:45:02 +0000 | [diff] [blame] | 719 | # Enable hugepages support |
| 720 | AC_ARG_ENABLE([hugepages], |
| 721 | [AC_HELP_STRING([--enable-hugepages], |
| 722 | [enable 'huge pages' support])], |
| 723 | [enable_hugepages=$enableval], |
| 724 | [enable_hugepages='no']) |
| 725 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 726 | # Enable ccmalloc memory debugging support |
| 727 | AC_ARG_ENABLE([ccmalloc], |
| 728 | [AC_HELP_STRING([--enable-ccmalloc], |
| 729 | [enable 'ccmalloc' memory debug support])], |
| 730 | [enable_ccmalloc=$enableval], |
| 731 | [enable_ccmalloc='no']) |
| 732 | |
| 733 | # Enable Electric Fence memory debugging support |
| 734 | AC_ARG_ENABLE([efence], |
| 735 | [AC_HELP_STRING([--enable-efence], |
| 736 | [enable 'efence' memory debug support])], |
| 737 | [enable_efence=$enableval], |
| 738 | [enable_efence='no']) |
| 739 | |
| 740 | # Enable prof-based profiling support |
| 741 | AC_ARG_ENABLE([prof], |
| 742 | [AC_HELP_STRING([--enable-prof], |
| 743 | [enable 'prof' profiling support])], |
| 744 | [enable_prof=$enableval], |
| 745 | [enable_prof='no']) |
| 746 | |
| 747 | # Enable gprof-based profiling support |
| 748 | AC_ARG_ENABLE([gprof], |
| 749 | [AC_HELP_STRING([--enable-gprof], |
| 750 | [enable 'gprof' profiling support])], |
| 751 | [enable_gprof=$enableval], |
| 752 | [enable_gprof='no']) |
| 753 | |
| 754 | # Enable gcov-based profiling support |
| 755 | AC_ARG_ENABLE([gcov], |
| 756 | [AC_HELP_STRING([--enable-gcov], |
| 757 | [enable 'gcov' profiling support])], |
| 758 | [enable_gcov=$enableval], |
| 759 | [enable_gcov='no']) |
| 760 | |
| 761 | enable_profiling='no' |
| 762 | if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then |
| 763 | enable_profiling='yes' |
| 764 | if test "$libtool_build_shared_libs" = 'yes'; then |
| 765 | echo "Warning: Can not profile code using shared libraries" |
| 766 | fi |
| 767 | fi |
| 768 | |
| 769 | # Magick API method prefix |
| 770 | AC_ARG_WITH([method-prefix], |
| 771 | [AC_HELP_STRING([--with-method-prefix=PREFIX], |
| 772 | [prefix MagickCore API methods])], |
cristy | fc3d022 | 2012-02-07 15:05:57 +0000 | [diff] [blame] | 773 | [with_method_prefix=$withval], |
| 774 | [with_method_prefix='no']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 775 | |
cristy | fc3d022 | 2012-02-07 15:05:57 +0000 | [diff] [blame] | 776 | if test "$with_method_prefix" != 'no'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 777 | AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix]) |
cristy | fc3d022 | 2012-02-07 15:05:57 +0000 | [diff] [blame] | 778 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-method-prefix " |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 779 | fi |
| 780 | |
cristy | 71d8c20 | 2012-03-20 17:05:01 +0000 | [diff] [blame] | 781 | # Enable legacy support (default no) |
| 782 | AC_ARG_ENABLE(legacy-support, |
| 783 | [ --enable-legacy-support install legacy command-line utilities (default disabled)], |
| 784 | [with_legacy_support=$enableval], |
| 785 | [with_legacy_support='no']) |
| 786 | AM_CONDITIONAL(LEGACY_SUPPORT, test "$with_legacy_support" != 'no') |
| 787 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 788 | # Number of bits in a Quantum |
| 789 | AC_ARG_WITH([quantum-depth], |
| 790 | [AC_HELP_STRING([--with-quantum-depth=DEPTH], |
| 791 | [number of bits in a pixel quantum (default 16)])], |
| 792 | [with_quantum_depth=$withval], |
| 793 | [with_quantum_depth=16]) |
| 794 | |
| 795 | if test "$with_quantum_depth" != '8'; then |
| 796 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth " |
| 797 | fi |
| 798 | |
| 799 | case "${with_quantum_depth}" in |
| 800 | 8 ) ;; |
| 801 | 16 ) ;; |
| 802 | 32 ) ;; |
| 803 | 64 ) ;; |
cristy | cdae12a | 2010-09-19 02:24:31 +0000 | [diff] [blame] | 804 | * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 805 | esac |
| 806 | QUANTUM_DEPTH="$with_quantum_depth" |
cristy | e52f12f | 2012-12-31 15:32:36 +0000 | [diff] [blame] | 807 | AC_DEFINE_UNQUOTED(QUANTUM_DEPTH_OBSOLETE_IN_H,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 808 | AC_SUBST(QUANTUM_DEPTH)dnl |
cristy | 0a9565b | 2013-01-30 19:57:08 +0000 | [diff] [blame] | 809 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH" |
cristy | e52f12f | 2012-12-31 15:32:36 +0000 | [diff] [blame] | 810 | CFLAGS="$CFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH" |
cristy | 7206238 | 2012-12-31 16:49:52 +0000 | [diff] [blame] | 811 | CPPFLAGS="$CPPFLAGS -DMAGICKCORE_QUANTUM_DEPTH=$QUANTUM_DEPTH" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 812 | |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 813 | # define a lib suffix for abi purpose |
cristy | 7a26abd | 2012-12-03 00:18:59 +0000 | [diff] [blame] | 814 | MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}" |
cristy | e386d19 | 2012-12-01 21:05:20 +0000 | [diff] [blame] | 815 | if test "$enable_hdri" = 'yes'; then |
cristy | 7a26abd | 2012-12-03 00:18:59 +0000 | [diff] [blame] | 816 | MAGICK_ABI_SUFFIX="Q${QUANTUM_DEPTH}${MAGICK_HDRI}" |
cristy | e386d19 | 2012-12-01 21:05:20 +0000 | [diff] [blame] | 817 | fi |
cristy | 7a26abd | 2012-12-03 00:18:59 +0000 | [diff] [blame] | 818 | AC_SUBST(MAGICK_ABI_SUFFIX) |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 819 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 820 | # Set pixel cache threshold |
| 821 | AC_ARG_WITH([cache], |
| 822 | [AC_HELP_STRING([--with-cache=THRESHOLD], |
| 823 | [set pixel cache threshhold in MB (default available memory)])], |
| 824 | [with_cache=$withval], |
| 825 | [with_cache='']) |
| 826 | |
| 827 | if test "$with_cache" != ''; then |
| 828 | AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)]) |
| 829 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache " |
| 830 | fi |
| 831 | |
| 832 | # Disable/Enable support for full delegate paths |
| 833 | AC_ARG_WITH([frozenpaths], |
| 834 | [AC_HELP_STRING([--with-frozenpaths], |
| 835 | [freeze delegate paths])], |
| 836 | [with_frozenpaths=$withval], |
| 837 | [with_frozenpaths='no']) |
| 838 | |
| 839 | # Enable build/install of Magick++ |
| 840 | AC_ARG_WITH([magick-plus-plus], |
| 841 | [AC_HELP_STRING([--without-magick-plus-plus], |
| 842 | [disable build/install of Magick++])], |
| 843 | [with_magick_plus_plus=$withval], |
| 844 | [with_magick_plus_plus='yes']) |
| 845 | |
cristy | 3a75f06 | 2012-09-08 23:29:40 +0000 | [diff] [blame] | 846 | # Encode the this name into the shared library. |
| 847 | AC_ARG_WITH([package-release-name], |
| 848 | [AC_HELP_STRING([--with-package-release-name=NAME], |
| 849 | [encode this name into the shared library])], |
| 850 | [MAGICK_LT_RELEASE_OPTS="-release $withval"]) |
| 851 | AC_SUBST(MAGICK_LT_RELEASE_OPTS) |
| 852 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 853 | # Disable build/install of PerlMagick. |
| 854 | AC_ARG_WITH([perl], |
| 855 | [AC_HELP_STRING([--with-perl], |
| 856 | [enable build/install of PerlMagick])], |
| 857 | [with_perl=$withval], |
cristy | b5f4e2f | 2010-04-25 00:49:11 +0000 | [diff] [blame] | 858 | [with_perl='no']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 859 | |
| 860 | # Options to pass when configuring PerlMagick |
| 861 | AC_ARG_WITH([perl-options], |
| 862 | [AC_HELP_STRING([--with-perl-options=OPTIONS], |
cristy | fc3d022 | 2012-02-07 15:05:57 +0000 | [diff] [blame] | 863 | [options to pass on command-line when generating PerlMagick build file])], |
cristy | 949301e | 2010-01-06 01:38:40 +0000 | [diff] [blame] | 864 | PERL_MAKE_OPTIONS=$withval) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 865 | AC_SUBST(PERL_MAKE_OPTIONS) |
| 866 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 867 | # Enable umem, object-caching memory allocation library. |
| 868 | AC_ARG_WITH(umem, |
| 869 | [ --with-umem enable umem memory allocation library support], |
| 870 | [with_umem=$withval], |
| 871 | [with_umem='no']) |
| 872 | if test "$with_umem" != 'yes' ; then |
| 873 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-umem=$with_umem " |
| 874 | fi |
| 875 | |
| 876 | # |
| 877 | # Specify path to shared libstdc++ if not in normal location |
| 878 | # |
| 879 | AC_ARG_WITH([libstdc], |
| 880 | [AC_HELP_STRING([--with-libstdc=DIR], |
| 881 | [ use libstdc++ in DIR (for GNU C++)])], |
| 882 | [with_libstdc=$withval], |
| 883 | [with_libstdc='']) |
| 884 | |
| 885 | if test "$with_libstdc" != ''; then |
| 886 | if test -d "$with_libstdc"; then |
| 887 | LIBSTDCLDFLAGS="-L$with_libstdc" |
| 888 | fi |
| 889 | fi |
| 890 | AC_SUBST(LIBSTDCLDFLAGS) |
| 891 | |
| 892 | # Does gcc required -traditional? |
| 893 | AC_PROG_GCC_TRADITIONAL |
| 894 | |
| 895 | ######## |
| 896 | # |
| 897 | # Set defines required to build DLLs and modules using MinGW |
| 898 | # |
| 899 | ######## |
| 900 | # These options are set for multi-thread DLL module build |
| 901 | # libMagickCore: _DLL _MAGICKMOD_ _MAGICKLIB_ |
| 902 | # module: _DLL |
| 903 | # executable/Magick++: _DLL _MAGICKMOD_ |
| 904 | MODULE_EXTRA_CPPFLAGS='' |
| 905 | LIBRARY_EXTRA_CPPFLAGS='' |
| 906 | if test "${native_win32_build}" = 'yes'; then |
| 907 | if test "${libtool_build_shared_libs}" = 'yes'; then |
| 908 | CPPFLAGS="$CPPFLAGS -D_DLL" |
| 909 | MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL" |
| 910 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL" |
| 911 | LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_" |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 912 | if test "$build_modules" = 'yes'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 913 | LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_" |
| 914 | else |
| 915 | MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_" |
| 916 | fi |
| 917 | else |
| 918 | CPPFLAGS="$CPPFLAGS -D_LIB" |
| 919 | MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB" |
| 920 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB" |
| 921 | fi |
| 922 | if test "$with_threads" = 'yes'; then |
| 923 | CPPFLAGS="$CPPFLAGS -D_MT" |
| 924 | MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT" |
| 925 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT" |
| 926 | fi |
| 927 | fi |
| 928 | AC_SUBST(MODULE_EXTRA_CPPFLAGS) |
| 929 | AC_SUBST(LIBRARY_EXTRA_CPPFLAGS) |
| 930 | |
| 931 | # Check standard headers |
| 932 | AC_HEADER_STDC |
| 933 | if ! test x"$ac_cv_header_stdc" = x"yes"; then |
| 934 | AC_MSG_WARN([configure has detected that you do not have the ANSI standard C |
| 935 | header files. Compilation cannot proceed. Please install the ANSI C |
| 936 | headers and rerun this script.]); |
| 937 | fi |
cristy | a0b81c3 | 2010-01-22 02:54:33 +0000 | [diff] [blame] | 938 | AC_HEADER_ASSERT |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 939 | AC_HEADER_DIRENT |
| 940 | |
| 941 | # Check additional headers |
cristy | b7516c0 | 2013-01-14 13:58:17 +0000 | [diff] [blame] | 942 | AC_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/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h xlocale.h) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 943 | |
| 944 | ######## |
| 945 | # |
| 946 | # Checks for typedefs, structures, and compiler characteristics. |
| 947 | # |
| 948 | ######## |
| 949 | |
| 950 | AC_HEADER_STDBOOL |
| 951 | AC_C_VOLATILE |
| 952 | AC_C_STRINGIZE |
| 953 | AC_HEADER_STAT |
| 954 | AC_HEADER_TIME |
| 955 | AC_STRUCT_TM |
cristy | 92703d8 | 2010-04-26 00:18:18 +0000 | [diff] [blame] | 956 | AC_STRUCT_TIMEZONE |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 957 | AC_SYS_INTERPRETER |
| 958 | |
cristy | a9ee284 | 2013-01-08 15:56:39 +0000 | [diff] [blame] | 959 | # |
| 960 | # Checks for language qualifiers and semantics. |
| 961 | # |
| 962 | AC_C_CHAR_UNSIGNED |
| 963 | AC_C_CONST |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 964 | AC_C_INLINE |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 965 | AC_C_RESTRICT |
cristy | a9ee284 | 2013-01-08 15:56:39 +0000 | [diff] [blame] | 966 | AC_C_VOLATILE |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 967 | |
| 968 | # If words are stored with the most significant byte first (like |
| 969 | # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'. |
| 970 | AC_C_BIGENDIAN |
| 971 | |
cristy | 501c804 | 2011-05-26 17:46:28 +0000 | [diff] [blame] | 972 | # Define to a suitable type, if standard headers do not define it. |
| 973 | AC_TYPE_INT8_T |
| 974 | AC_TYPE_INT16_T |
| 975 | AC_TYPE_INT32_T |
| 976 | AC_TYPE_INT64_T |
| 977 | AC_TYPE_INTMAX_T |
| 978 | AC_TYPE_INTPTR_T |
| 979 | AC_TYPE_LONG_DOUBLE |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 980 | AC_TYPE_LONG_DOUBLE_WIDER |
cristy | 501c804 | 2011-05-26 17:46:28 +0000 | [diff] [blame] | 981 | AC_TYPE_LONG_LONG_INT |
| 982 | AC_TYPE_MBSTATE_T |
| 983 | AC_TYPE_MODE_T |
| 984 | AC_TYPE_OFF_T |
| 985 | AC_TYPE_PID_T |
| 986 | AC_TYPE_SIZE_T |
| 987 | AC_TYPE_SSIZE_T |
| 988 | AC_TYPE_UID_T |
| 989 | AC_TYPE_UINT8_T |
| 990 | AC_TYPE_UINT16_T |
| 991 | AC_TYPE_UINT32_T |
| 992 | AC_TYPE_UINT64_T |
| 993 | AC_TYPE_UINTMAX_T |
| 994 | AC_TYPE_UINTPTR_T |
| 995 | AC_TYPE_UNSIGNED_LONG_LONG_INT |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 996 | |
cristy | fec3182 | 2013-05-23 12:32:12 +0000 | [diff] [blame] | 997 | # Float_t and double_t are intended to be the the most efficient type. |
| 998 | AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]]) |
| 999 | AC_CHECK_TYPES([double_t], [], [], [[#include <math.h>]]) |
| 1000 | AC_CHECK_SIZEOF([float_t], [], [[#include <math.h>]]) |
| 1001 | AC_CHECK_SIZEOF([double_t], [], [[#include <math.h>]]) |
| 1002 | |
cristy | 9b86f20 | 2012-11-28 21:55:35 +0000 | [diff] [blame] | 1003 | # Get size of float, double and long double for comparaison. |
| 1004 | AC_CHECK_SIZEOF([float]) |
| 1005 | AC_CHECK_SIZEOF([double]) |
cristy | 9e2b624 | 2014-03-25 11:49:41 +0000 | [diff] [blame] | 1006 | AC_CHECK_SIZEOF([long double]) |
cristy | f0cf9a2 | 2012-10-24 12:05:01 +0000 | [diff] [blame] | 1007 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1008 | # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT |
| 1009 | AC_CHECK_SIZEOF(signed short) |
| 1010 | |
| 1011 | # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT |
| 1012 | AC_CHECK_SIZEOF(unsigned short) |
| 1013 | |
| 1014 | # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT |
| 1015 | AC_CHECK_SIZEOF(signed int) |
| 1016 | |
| 1017 | # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT |
| 1018 | AC_CHECK_SIZEOF(unsigned int) |
| 1019 | |
| 1020 | # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG |
| 1021 | AC_CHECK_SIZEOF(signed long) |
| 1022 | |
| 1023 | # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG |
| 1024 | AC_CHECK_SIZEOF(unsigned long) |
| 1025 | |
| 1026 | # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If |
| 1027 | # 'signed long long' is not supported then the value defined is zero. |
| 1028 | AC_CHECK_SIZEOF(signed long long) |
| 1029 | |
| 1030 | # Obtain size of a 'unsigned long long' and define as |
| 1031 | # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not |
| 1032 | # supported then the value defined is zero. |
| 1033 | AC_CHECK_SIZEOF(unsigned long long) |
| 1034 | |
cristy | fec3182 | 2013-05-23 12:32:12 +0000 | [diff] [blame] | 1035 | # Obtain size of off_t and define as SIZEOF_OFF_T |
| 1036 | AC_CHECK_SIZEOF(off_t) |
| 1037 | |
| 1038 | # Obtain size of size_t and define as SIZEOF_SIZE_T |
| 1039 | AC_CHECK_SIZEOF(size_t) |
| 1040 | |
| 1041 | # Obtain size of ssize_t and define as SIZEOF_SSIZE_T |
| 1042 | AC_CHECK_SIZEOF(ssize_t) |
| 1043 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1044 | # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP |
| 1045 | AC_CHECK_SIZEOF(unsigned int*) |
| 1046 | |
| 1047 | # |
| 1048 | # Compute sized types for current CPU and compiler options. |
| 1049 | # |
| 1050 | |
| 1051 | AC_MSG_CHECKING(for signed 8-bit type) |
| 1052 | INT8_T='signed char' |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1053 | AC_MSG_RESULT($INT8_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1054 | AC_SUBST(INT8_T) |
| 1055 | |
| 1056 | AC_MSG_CHECKING(for unsigned 8-bit type) |
| 1057 | UINT8_T='unsigned char' |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1058 | AC_MSG_RESULT($UINT8_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1059 | AC_SUBST(UINT8_T) |
| 1060 | |
| 1061 | AC_MSG_CHECKING(for signed 16-bit type) |
| 1062 | INT16_T='signed short' |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1063 | AC_MSG_RESULT($INT16_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1064 | AC_SUBST(INT16_T) |
| 1065 | |
| 1066 | AC_MSG_CHECKING(for unsigned 16-bit type) |
| 1067 | UINT16_T='unsigned short' |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1068 | AC_MSG_RESULT($UINT16_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1069 | AC_SUBST(UINT16_T) |
| 1070 | |
| 1071 | AC_MSG_CHECKING(for signed 32-bit type) |
| 1072 | INT32_T='none' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1073 | INT32_F='none' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1074 | if test $ac_cv_sizeof_signed_int -eq 4; then |
| 1075 | INT32_T='signed int' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1076 | INT32_F='""' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1077 | elif test $ac_cv_sizeof_signed_long -eq 4; then |
| 1078 | INT32_T='signed long' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1079 | INT32_F='"l"' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1080 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1081 | AC_MSG_RESULT($INT32_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1082 | AC_SUBST(INT32_T) |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1083 | AC_SUBST(INT32_F) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1084 | |
| 1085 | AC_MSG_CHECKING(for unsigned 32-bit type) |
| 1086 | UINT32_T='none' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1087 | UINT32_F='none' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1088 | if test $ac_cv_sizeof_unsigned_int -eq 4; then |
| 1089 | UINT32_T='unsigned int' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1090 | UINT32_F='""' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1091 | elif test $ac_cv_sizeof_unsigned_long -eq 4; then |
| 1092 | UINT32_T='unsigned long' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1093 | UINT32_F='"l"' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1094 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1095 | AC_MSG_RESULT($UINT32_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1096 | AC_SUBST(UINT32_T) |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1097 | AC_SUBST(UINT32_F) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1098 | |
| 1099 | AC_MSG_CHECKING(for signed 64-bit type) |
| 1100 | INT64_T='none' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1101 | INT64_F='none' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1102 | if test $ac_cv_sizeof_signed_long -eq 8; then |
| 1103 | INT64_T='signed long' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1104 | INT64_F='"l"' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1105 | elif test $ac_cv_sizeof_signed_long_long -eq 8; then |
| 1106 | INT64_T='signed long long' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1107 | INT64_F='"ll"' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1108 | fi |
cristy | 3a99dcf | 2011-12-17 01:29:40 +0000 | [diff] [blame] | 1109 | case "${host_os}" in |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1110 | mingw* ) |
| 1111 | INT64_F='"I64"' |
| 1112 | ;; |
| 1113 | esac |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1114 | AC_MSG_RESULT($INT64_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1115 | AC_SUBST(INT64_T) |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1116 | AC_SUBST(INT64_F) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1117 | |
| 1118 | AC_MSG_CHECKING(for unsigned 64-bit type) |
| 1119 | UINT64_T='none' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1120 | UINT64_F='none' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1121 | if test $ac_cv_sizeof_unsigned_long -eq 8; then |
| 1122 | UINT64_T='unsigned long' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1123 | UINT64_F='"l"' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1124 | elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then |
| 1125 | UINT64_T='unsigned long long' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1126 | UINT64_F='"ll"' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1127 | fi |
cristy | 3a99dcf | 2011-12-17 01:29:40 +0000 | [diff] [blame] | 1128 | case "${host_os}" in |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1129 | mingw* ) |
| 1130 | UINT64_F='"I64"' |
| 1131 | ;; |
| 1132 | esac |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1133 | AC_MSG_RESULT($UINT64_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1134 | AC_SUBST(UINT64_T) |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1135 | AC_SUBST(UINT64_F) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1136 | |
| 1137 | AC_MSG_CHECKING(for unsigned maximum type) |
| 1138 | UINTMAX_T='none' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1139 | UINTMAX_F='none' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1140 | if test "$UINT64_T" != 'none'; then |
| 1141 | UINTMAX_T=$UINT64_T |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1142 | UINTMAX_F=$UINT64_F |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1143 | elif test "$UINT32_T" != 'none'; then |
| 1144 | UINTMAX_T=$UINT32_T |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1145 | UINTMAX_F=$UINT32_F |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1146 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1147 | AC_MSG_RESULT($UINTMAX_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1148 | AC_SUBST(UINTMAX_T) |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1149 | AC_SUBST(UINTMAX_F) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1150 | |
| 1151 | AC_MSG_CHECKING(for pointer difference type) |
| 1152 | UINTPTR_T='none' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1153 | UINTPTR_F='none' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1154 | if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then |
| 1155 | UINTPTR_T='unsigned long' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1156 | UINTPTR_F='"l"' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1157 | elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then |
| 1158 | UINTPTR_T='unsigned long long' |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1159 | UINTPTR_F='"ll"' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1160 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1161 | AC_MSG_RESULT($UINTPTR_T) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1162 | AC_SUBST(UINTPTR_T) |
cristy | 6d5e20f | 2011-04-25 13:48:54 +0000 | [diff] [blame] | 1163 | AC_SUBST(UINTPTR_F) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1164 | |
| 1165 | AC_MSG_CHECKING([whether our compiler supports __func__]) |
| 1166 | AC_TRY_COMPILE([], |
| 1167 | [{ const char *func = __func__; return(func != 0 ? 0 : 1); }], |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1168 | AC_MSG_RESULT([yes]), |
| 1169 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1170 | AC_MSG_CHECKING([whether our compiler supports __FUNCTION__]) |
| 1171 | AC_TRY_COMPILE([], |
| 1172 | [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }], |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1173 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1174 | AC_DEFINE(__func__, __FUNCTION__, |
| 1175 | [Define to appropriate substitue if compiler does not have __func__]), |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1176 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1177 | AC_DEFINE(__func__, __FILE__, |
| 1178 | [Define to appropriate substitue if compiler does not have __func__]))) |
| 1179 | |
| 1180 | ######## |
| 1181 | # |
| 1182 | # Check for functions |
| 1183 | # |
| 1184 | ######## |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1185 | AC_FUNC_CLOSEDIR_VOID |
| 1186 | AC_FUNC_MMAP |
| 1187 | AC_FUNC_FORK |
| 1188 | AC_FUNC_MEMCMP |
| 1189 | AC_FUNC_SELECT_ARGTYPES |
| 1190 | AC_FUNC_SETVBUF_REVERSED |
| 1191 | AC_TYPE_SIGNAL |
| 1192 | AC_FUNC_STRTOD |
cristy | 7d4a1d6 | 2011-10-13 15:54:12 +0000 | [diff] [blame] | 1193 | AC_FUNC_STRERROR_R |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1194 | AC_FUNC_VPRINTF |
| 1195 | |
cristy | 161b926 | 2010-03-20 19:34:32 +0000 | [diff] [blame] | 1196 | # |
| 1197 | # Find math library |
| 1198 | # |
| 1199 | MATH_LIBS='' |
| 1200 | AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,) |
| 1201 | LIBS="$MATH_LIBS $LIBS" |
| 1202 | AC_SUBST(MATH_LIBS) |
| 1203 | |
cristy | 8557216 | 2013-01-04 19:19:32 +0000 | [diff] [blame] | 1204 | # |
| 1205 | # Find socket library |
| 1206 | # |
cristy | 8557216 | 2013-01-04 19:19:32 +0000 | [diff] [blame] | 1207 | AC_SEARCH_LIBS(gethostbyname, resolv nsl) |
cristy | 8a5d7f4 | 2013-01-06 15:24:33 +0000 | [diff] [blame] | 1208 | AC_SEARCH_LIBS(socket, socket, |
| 1209 | [ |
| 1210 | AC_DEFINE([HAVE_SOCKET],[1],[Define to 1 if you have socket support.]) |
cristy | fac0334 | 2013-01-12 02:03:32 +0000 | [diff] [blame] | 1211 | MAGICK_FEATURES="DPC $MAGICK_FEATURES" |
cristy | 8a5d7f4 | 2013-01-06 15:24:33 +0000 | [diff] [blame] | 1212 | ]) |
cristy | 8557216 | 2013-01-04 19:19:32 +0000 | [diff] [blame] | 1213 | |
| 1214 | AC_CHECK_FUNCS([acosh _aligned_malloc asinh atanh atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r isnan j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale 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]) |
cristy | e43a45e | 2009-09-28 14:49:00 +0000 | [diff] [blame] | 1215 | |
| 1216 | # |
| 1217 | # Check for clock_gettime(). |
| 1218 | # |
| 1219 | AC_SEARCH_LIBS(clock_gettime, rt, |
| 1220 | [ |
| 1221 | AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define to 1 if you have clock_gettime.]) |
| 1222 | AC_MSG_CHECKING([whether clock_gettime supports CLOCK_REALTIME]) |
cristy | da16f16 | 2011-02-19 23:52:17 +0000 | [diff] [blame] | 1223 | AC_COMPILE_IFELSE([ |
cristy | e43a45e | 2009-09-28 14:49:00 +0000 | [diff] [blame] | 1224 | AC_LANG_PROGRAM( |
| 1225 | [[#include <time.h>]], |
cristy | da16f16 | 2011-02-19 23:52:17 +0000 | [diff] [blame] | 1226 | [[clockid_t clockType = CLOCK_REALTIME;]])], |
cristy | e43a45e | 2009-09-28 14:49:00 +0000 | [diff] [blame] | 1227 | [ |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1228 | AC_MSG_RESULT(yes) |
glennrp | 3fc1c21 | 2013-01-10 01:52:32 +0000 | [diff] [blame] | 1229 | AC_DEFINE([HAVE_CLOCK_REALTIME],[1], |
cristy | e43a45e | 2009-09-28 14:49:00 +0000 | [diff] [blame] | 1230 | [Define to 1 if clock_gettime supports CLOCK_REALTIME.]) |
| 1231 | ], |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1232 | AC_MSG_RESULT(no) |
cristy | e43a45e | 2009-09-28 14:49:00 +0000 | [diff] [blame] | 1233 | ) |
| 1234 | ], |
| 1235 | [ |
| 1236 | AC_CHECK_FUNCS([gettimeofday ftime], [break]) |
| 1237 | ] |
| 1238 | ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1239 | |
| 1240 | ######## |
| 1241 | # |
| 1242 | # Check for function prototypes |
| 1243 | # |
| 1244 | ######## |
| 1245 | |
| 1246 | AC_CHECK_DECLS([pread, pwrite],[],[],[ |
| 1247 | #include <unistd.h>]) |
| 1248 | |
| 1249 | AC_CHECK_DECLS([strlcpy],[],[],[ |
| 1250 | #include <strings.h>]) |
| 1251 | |
| 1252 | AC_CHECK_DECLS([vsnprintf],[],[],[ |
| 1253 | #include <stdio.h> |
| 1254 | #include <stdarg.h>]) |
| 1255 | |
| 1256 | ######## |
| 1257 | # |
| 1258 | # C++ Support Tests (For Magick++) |
| 1259 | # |
| 1260 | ######## |
| 1261 | have_magick_plus_plus='no' |
| 1262 | if test "$with_magick_plus_plus" = 'yes'; then |
| 1263 | OLIBS="$LIBS" |
| 1264 | LIBS='' |
| 1265 | AC_LANG_PUSH(C++) |
| 1266 | |
| 1267 | # Full set of headers used... |
| 1268 | # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception |
| 1269 | # functional iomanip iosfwd iostream iterator list string strstream utility |
| 1270 | AC_LANG([C++]) |
| 1271 | AC_PROG_CXX |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 1272 | AX_CXX_BOOL |
| 1273 | AX_CXX_NAMESPACES |
| 1274 | AX_CXX_NAMESPACE_STD |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1275 | AC_CXX_HAVE_STD_LIBS |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1276 | AC_OPENMP([C++]) |
| 1277 | AC_LANG_POP |
| 1278 | |
| 1279 | AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++]) |
| 1280 | if \ |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 1281 | test $ax_cv_cxx_bool = 'yes' && \ |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 1282 | test $ax_cv_cxx_namespaces = 'yes' && \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1283 | test $ac_cv_cxx_have_std_libs = 'yes' && \ |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 1284 | test $ax_cv_cxx_have_std_namespace = 'yes'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1285 | have_magick_plus_plus='yes' |
| 1286 | else |
| 1287 | have_magick_plus_plus='no (failed tests)' |
| 1288 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1289 | AC_MSG_RESULT([$have_magick_plus_plus]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1290 | LIBS="$OLIBS" |
| 1291 | fi |
| 1292 | AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes') |
| 1293 | |
| 1294 | # Only check for delegate libraries in subdirectories if requested. |
| 1295 | if test "$enable_delegate_build" != 'no'; then |
| 1296 | # Check for delegate sub-directories and add -I & -L options as required. |
| 1297 | # This presumes that delegates are installed as detailed in the ImageMagick |
| 1298 | # README. If delegates are installed in a standard location where the |
| 1299 | # compiler will automatically find them then these options should not be |
| 1300 | # required. |
| 1301 | |
| 1302 | # |
| 1303 | # Most delegates have includes in the same directory as the library, but not all... |
| 1304 | # |
| 1305 | # Includes |
cristy | 31269aa | 2014-04-06 13:07:35 +0000 | [diff] [blame] | 1306 | for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper/include jbig/libjbig jpeg lcms/include lzma magick openjp2/include png tiff/libtiff ttf/include wand webp/src wmf/include xml/include zlib; do |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1307 | if test -d "$builddir/$dir"; then |
| 1308 | CPPFLAGS="$CPPFLAGS -I$builddir/$dir" |
| 1309 | else |
| 1310 | if test -d "$srcdirfull/$dir"; then |
| 1311 | CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir" |
| 1312 | fi |
| 1313 | fi |
| 1314 | done |
| 1315 | |
| 1316 | # Libraries |
cristy | 31269aa | 2014-04-06 13:07:35 +0000 | [diff] [blame] | 1317 | for dir in bzlib fftw fpx gslib/src jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src lzma magick openjp2 png tiff/libtiff ttf/objs wand webp wmf/src xml zlib; do |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1318 | if test -d "$builddir/$dir/.libs"; then |
| 1319 | LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs" |
| 1320 | else |
| 1321 | if test -d "$srcdirfull/$dir/.libs"; then |
| 1322 | LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs" |
| 1323 | fi |
| 1324 | fi |
| 1325 | if test -d "$builddir/$dir"; then |
| 1326 | LDFLAGS="$LDFLAGS -L$builddir/$dir" |
| 1327 | else |
| 1328 | if test -d "$srcdirfull/$dir"; then |
| 1329 | LDFLAGS="$LDFLAGS -L$srcdirfull/$dir" |
| 1330 | fi |
| 1331 | fi |
| 1332 | done |
| 1333 | fi |
| 1334 | |
| 1335 | # Assume that delegate headers reside under same directory as ImageMagick |
| 1336 | # installation prefix. |
cristy | bdabdd6 | 2013-03-04 17:43:36 +0000 | [diff] [blame] | 1337 | MAGICK_CPPFLAGS="-I$INCLUDE_DIR/${PACKAGE_NAME}-$MAGICK_MAJOR_VERSION $MAGICK_CPPFLAGS" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1338 | |
| 1339 | # |
| 1340 | # Find the X11 RGB database |
| 1341 | # |
| 1342 | AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure, |
| 1343 | [# Look for the header file in a standard set of common directories. |
| 1344 | # Check X11 before X11Rn because it is often a symlink to the current release. |
| 1345 | for ac_dir in \ |
| 1346 | /lib/usr/lib/X11 \ |
| 1347 | /usr/X11/lib \ |
| 1348 | /usr/X11R4/lib \ |
| 1349 | /usr/X11R5/lib \ |
| 1350 | /usr/X11R6/lib \ |
| 1351 | /usr/X11R7/lib \ |
| 1352 | /usr/X386/lib \ |
| 1353 | /usr/XFree86/lib/X11 \ |
| 1354 | /usr/athena/lib \ |
| 1355 | /usr/lib \ |
| 1356 | /usr/lib/X11 \ |
| 1357 | /usr/lib/X11R4 \ |
| 1358 | /usr/lib/X11R5 \ |
| 1359 | /usr/lib/X11R6 \ |
| 1360 | /usr/lib/X11R7 \ |
| 1361 | /usr/local/X11/lib \ |
| 1362 | /usr/local/X11R4/lib \ |
| 1363 | /usr/local/X11R5/lib \ |
| 1364 | /usr/local/X11R6/lib \ |
| 1365 | /usr/local/lib \ |
| 1366 | /usr/local/lib/X11 \ |
| 1367 | /usr/local/lib/X11R4 \ |
| 1368 | /usr/local/lib/X11R5 \ |
| 1369 | /usr/local/lib/X11R6 \ |
| 1370 | /usr/local/lib/X11R7 \ |
| 1371 | /usr/local/x11r5/lib \ |
| 1372 | /usr/lpp/Xamples/lib \ |
| 1373 | /usr/openwin/lib \ |
| 1374 | /usr/openwin/share/lib \ |
| 1375 | /usr/unsupported/lib \ |
| 1376 | /usr/x386/lib \ |
| 1377 | ; do |
| 1378 | if test -f "$ac_dir/X11/rgb.txt"; then |
| 1379 | im_cv_x_configure="$ac_dir/X11/" |
| 1380 | break |
| 1381 | elif test -f "$ac_dir/rgb.txt"; then |
| 1382 | im_cv_x_configure="$ac_dir/" |
| 1383 | break |
| 1384 | fi |
| 1385 | |
| 1386 | done]) |
| 1387 | X11_CONFIGURE_PATH="$im_cv_x_configure" |
| 1388 | case "${build_os}" in |
| 1389 | mingw* ) |
| 1390 | X11ConfigurePath=`$WinPathScript "$X11ConfigurePath=" 1` |
| 1391 | ;; |
| 1392 | esac |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 1393 | AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",[Location of X11 configure files]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1394 | |
| 1395 | # |
| 1396 | # Find OpenMP library |
| 1397 | # |
| 1398 | GOMP_LIBS='' |
| 1399 | if test "$enable_openmp" != 'no'; then |
| 1400 | if test "${GCC}" = "yes"; then |
cristy | 18307f1 | 2011-12-30 01:20:16 +0000 | [diff] [blame] | 1401 | # Open64 (passes for GCC but uses different OpenMP implementation) |
| 1402 | if test "x$GOMP_LIBS" = x ; then |
| 1403 | if $CC --version 2>&1 | grep Open64 > /dev/null ; then |
| 1404 | AC_CHECK_LIB(openmp,omp_get_num_procs,GOMP_LIBS="-lopenmp",,) |
| 1405 | fi |
| 1406 | fi |
| 1407 | # GCC |
| 1408 | if test "x$GOMP_LIBS" = x ; then |
| 1409 | AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,) |
| 1410 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1411 | else |
cristy | 18307f1 | 2011-12-30 01:20:16 +0000 | [diff] [blame] | 1412 | # Sun CC |
| 1413 | if test "x$GOMP_LIBS" = x ; then |
| 1414 | AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,) |
| 1415 | fi |
| 1416 | # AIX xlc |
| 1417 | if test "x$GOMP_LIBS" = x ; then |
| 1418 | AC_CHECK_LIB(xlsmp,_xlsmpFlush,GOMP_LIBS="-lxlsmp",,) |
| 1419 | fi |
| 1420 | # SGI IRIX 6.5 MIPSpro C/C++ |
| 1421 | if test "x$GOMP_LIBS" = x ; then |
| 1422 | AC_CHECK_LIB(mp,mp_destroy,GOMP_LIBS="-lmp",,) |
| 1423 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1424 | fi |
| 1425 | LIBS="$GOMP_LIBS $LIBS" |
| 1426 | fi |
| 1427 | AC_SUBST(GOMP_LIBS) |
| 1428 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1429 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1430 | |
| 1431 | # |
| 1432 | # Check for umem. |
| 1433 | # |
| 1434 | have_umem='no' |
| 1435 | UMEM_LIBS='' |
| 1436 | if test "$with_umem" != 'no'; then |
| 1437 | AC_MSG_CHECKING(for UMEM support ) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1438 | AC_MSG_RESULT() |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1439 | failed=0 |
| 1440 | passed=0 |
| 1441 | AC_CHECK_HEADER(umem.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 1442 | AC_CHECK_LIB(umem,umem_alloc,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1443 | AC_CHECK_LIB(umem,umem_free,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1444 | AC_MSG_CHECKING(if umem memory allocation library is complete) |
| 1445 | if test $passed -gt 0; then |
| 1446 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1447 | AC_MSG_RESULT(no -- some components failed test) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1448 | have_umem='no (failed tests)' |
| 1449 | else |
| 1450 | UMEM_LIBS='-lumem' |
| 1451 | LIBS="$UMEM_LIBS $LIBS" |
| 1452 | AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1453 | AC_MSG_RESULT(yes) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1454 | have_umem='yes' |
| 1455 | fi |
| 1456 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1457 | AC_MSG_RESULT(no) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1458 | fi |
| 1459 | fi |
| 1460 | AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes') |
| 1461 | AC_SUBST(UMEM_LIBS) |
| 1462 | |
| 1463 | # |
| 1464 | # Add support for ccmalloc memory debugging library if requested |
| 1465 | # |
| 1466 | have_ccmalloc='no' |
| 1467 | CCMALLOC_LIBS='' |
| 1468 | if test "$enable_ccmalloc" = 'yes'; then |
| 1469 | AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,) |
| 1470 | if test -n "$CCMALLOCDelegate"; then |
| 1471 | eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'` |
| 1472 | OLIBS="$LIBS" |
| 1473 | # Assume that gcc is used with ccmalloc. |
| 1474 | LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o" |
| 1475 | AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl) |
| 1476 | if test -n "$CCMALLOC_LIBS"; then |
| 1477 | LIBS="$OLIBS" |
| 1478 | LIBS="$LIBS $CCMALLOC_LIBS" |
| 1479 | have_ccmalloc='yes' |
| 1480 | else |
| 1481 | LIBS="$OLIBS" |
| 1482 | fi |
| 1483 | fi |
| 1484 | fi |
| 1485 | |
| 1486 | # |
cristy | 944e51f | 2013-04-16 18:45:02 +0000 | [diff] [blame] | 1487 | # Add support for 'huge pages' if requested |
| 1488 | # |
| 1489 | AS_IF([test "x$enable_hugepages" != "xno"],[ |
| 1490 | AC_DEFINE(HAVE_HUGEPAGES, 1, [Compile with hugepage support]) |
| 1491 | ]) |
| 1492 | |
| 1493 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1494 | # Add support for efence memory debugging library if requested |
| 1495 | # |
| 1496 | if test "$enable_efence" = 'yes'; then |
| 1497 | EFENCE_LIBS='-lefence' |
| 1498 | LIBS="$EFENCE_LIBS $LIBS" |
| 1499 | fi |
| 1500 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1501 | dnl =========================================================================== |
| 1502 | |
| 1503 | # |
| 1504 | # Check for BZLIB |
| 1505 | # |
| 1506 | |
| 1507 | AC_ARG_WITH([bzlib], |
| 1508 | [AC_HELP_STRING([--without-bzlib], |
| 1509 | [disable BZLIB support])], |
| 1510 | [with_bzlib=$withval], |
| 1511 | [with_bzlib='yes']) |
| 1512 | |
| 1513 | if test "$with_bzlib" != 'yes'; then |
| 1514 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib " |
| 1515 | fi |
| 1516 | |
| 1517 | have_bzlib='no' |
| 1518 | if test "$with_bzlib" != 'no'; then |
| 1519 | BZLIB_LIBS='' |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1520 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1521 | AC_MSG_CHECKING([for BZLIB]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1522 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1523 | failed=0 |
| 1524 | passed=0 |
| 1525 | found_libbz=0 |
| 1526 | AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 1527 | AC_CHECK_LIB(bz2,BZ2_bzDecompress,found_libbz=`expr $found_libbz + 1`,,) |
| 1528 | if test "$native_win32_build" = 'yes'; then |
| 1529 | AC_CHECK_LIB(bz2,_imp__BZ2_decompress,found_libbz=`expr $found_libbz + 1`,,) |
| 1530 | fi |
| 1531 | if test $found_libbz -gt 0; then |
| 1532 | passed=`expr $passed + 1` |
| 1533 | else |
| 1534 | failed=`expr $failed + 1` |
| 1535 | fi |
| 1536 | AC_MSG_CHECKING(if BZLIB package is complete) |
| 1537 | if test $passed -gt 0; then |
| 1538 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1539 | AC_MSG_RESULT(no -- some components failed test) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1540 | have_bzlib='no (failed tests)' |
| 1541 | else |
| 1542 | BZLIB_LIBS='-lbz2' |
| 1543 | LIBS="$BZLIB_LIBS $LIBS" |
| 1544 | AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1545 | AC_MSG_RESULT(yes) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1546 | have_bzlib='yes' |
| 1547 | fi |
| 1548 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1549 | AC_MSG_RESULT(no) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1550 | fi |
| 1551 | fi |
| 1552 | AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes') |
| 1553 | AC_SUBST(BZLIB_LIBS) |
| 1554 | |
| 1555 | # |
| 1556 | # Find the X11 include and library directories. |
| 1557 | # |
| 1558 | IPC_LIBS='' |
| 1559 | X11_LIBS='' |
| 1560 | XEXT_LIBS='' |
| 1561 | XT_LIBS='' |
| 1562 | AC_PATH_XTRA |
| 1563 | if test "$no_x" != 'yes'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1564 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1565 | AC_MSG_CHECKING([for X11]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1566 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1567 | LDFLAGS="$LDFLAGS $X_LIBS" |
| 1568 | X11_LIBS="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS" |
| 1569 | LIBS="$X11_LIBS $LIBS" |
| 1570 | CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
| 1571 | |
| 1572 | AC_DEFINE(X11_DELEGATE,1,Define if you have X11 library)dnl |
| 1573 | |
| 1574 | # |
| 1575 | # Check for X11 shared memory extension |
| 1576 | # |
| 1577 | # shmctl is required to support the shared memory extension |
| 1578 | AC_CHECK_FUNC([shmctl],[have_shmctl='yes'],[]) |
| 1579 | if test "$have_shmctl" != 'yes'; then |
| 1580 | PERSIST_LIBS=$LIBS |
| 1581 | LIBS="$LIBS -lcygipc" |
| 1582 | AC_TRY_LINK_FUNC([shmctl],[have_shmctl='yes'; IPC_LIBS='-lcygipc'],[]) |
| 1583 | LIBS=$PERSIST_LIBS |
| 1584 | fi |
| 1585 | |
| 1586 | if test "$have_shmctl" = 'yes'; then |
| 1587 | AC_CHECK_LIB([Xext],[XShmAttach],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHARED_MEMORY,1,X11 server supports shared memory extension)],[],[]) |
| 1588 | fi |
| 1589 | |
| 1590 | # |
| 1591 | # Check for X11 shape extension |
| 1592 | # |
| 1593 | AC_CHECK_LIB([Xext],[XShapeCombineMask],[XEXT_LIBS='-lXext' ; AC_DEFINE(HAVE_SHAPE,1,X11 server supports shape extension)],[],[]) |
| 1594 | AC_CHECK_LIB(Xt,XtSetEventDispatcher,XT_LIBS='-lXt',,) |
| 1595 | LIBS="$XEXT_LIBS $XT_LIBS $LIBS" |
| 1596 | fi |
| 1597 | if test "$no_x" != 'yes'; then |
| 1598 | have_x='yes' |
| 1599 | else |
| 1600 | have_x='no' |
| 1601 | fi |
| 1602 | AM_CONDITIONAL(X11_DELEGATE, test "$have_x" = 'yes') |
| 1603 | AC_SUBST(X11_LIBS) |
| 1604 | AC_SUBST(XEXT_LIBS) |
| 1605 | |
| 1606 | dnl =========================================================================== |
| 1607 | |
| 1608 | # |
| 1609 | # Check for ZLIB |
| 1610 | # |
| 1611 | AC_ARG_WITH([zlib], |
| 1612 | [AC_HELP_STRING([--without-zlib], |
| 1613 | [disable ZLIB support])], |
| 1614 | [with_zlib=$withval], |
| 1615 | [with_zlib='yes']) |
| 1616 | |
| 1617 | if test "$with_zlib" != 'yes'; then |
| 1618 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib " |
| 1619 | fi |
| 1620 | |
| 1621 | have_zlib='no' |
| 1622 | ZLIB_LIBS='' |
| 1623 | dnl PNG requires zlib so enable zlib check if PNG is requested |
| 1624 | if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1625 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1626 | AC_MSG_CHECKING([for ZLIB]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1627 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1628 | ZLIB_LIBS='' |
| 1629 | failed=0 |
| 1630 | passed=0 |
| 1631 | AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 1632 | AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 1633 | AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1634 | AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1635 | AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1636 | AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1637 | AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1638 | AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1639 | AC_MSG_CHECKING([if ZLIB package is complete]) |
| 1640 | if test $passed -gt 0; then |
| 1641 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1642 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1643 | have_zlib='no (failed tests)' |
| 1644 | else |
| 1645 | ZLIB_LIBS='-lz' |
| 1646 | LIBS="$ZLIB_LIBS $LIBS" |
| 1647 | AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1648 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1649 | have_zlib='yes' |
| 1650 | fi |
| 1651 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1652 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1653 | fi |
| 1654 | fi |
| 1655 | AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes') |
| 1656 | AC_SUBST(ZLIB_LIBS) |
| 1657 | |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 1658 | # whether modules are built or not. |
| 1659 | with_ltdl='yes' |
| 1660 | have_ltdl='no' |
| 1661 | LTDL_LIBS='' |
| 1662 | if test "$build_modules" != 'no' ; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1663 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 1664 | AC_MSG_CHECKING([for libltdl]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1665 | AC_MSG_RESULT([]) |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 1666 | failed=0 |
| 1667 | passed=0 |
cristy | af4cbf3 | 2012-10-16 23:47:41 +0000 | [diff] [blame] | 1668 | AC_CHECK_HEADER([ltdl.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`]) |
| 1669 | AC_CHECK_LIB([ltdl],[lt_dlinit],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],) |
| 1670 | AC_MSG_CHECKING([if libltdl package is complete]) |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 1671 | if test $passed -gt 0 ; then |
| 1672 | if test $failed -gt 0 ; then |
cristy | af4cbf3 | 2012-10-16 23:47:41 +0000 | [diff] [blame] | 1673 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 1674 | have_ltdl='no (failed tests)' |
| 1675 | else |
| 1676 | LTDL_LIBS='-lltdl' |
| 1677 | LIBS="$LTDL_LIBS $LIBS" |
cristy | af4cbf3 | 2012-10-16 23:47:41 +0000 | [diff] [blame] | 1678 | AC_DEFINE(LTDL_DELEGATE,1,[Define if using libltdl to support dynamically loadable modules]) |
| 1679 | AC_MSG_RESULT([yes]) |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 1680 | have_ltdl='yes' |
| 1681 | fi |
| 1682 | else |
cristy | af4cbf3 | 2012-10-16 23:47:41 +0000 | [diff] [blame] | 1683 | AC_MSG_RESULT([no]) |
| 1684 | fi |
| 1685 | if test "$have_ltdl" != 'yes' ; then |
| 1686 | AC_MSG_FAILURE([libltdl is required for modules build],[1]) |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 1687 | fi |
| 1688 | fi |
| 1689 | AM_CONDITIONAL(WITH_LTDL, test "$have_ltdl" != 'no') |
| 1690 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1691 | # |
| 1692 | # If profiling, then check for -ldl and dlopen (required for Solaris & gcc) |
| 1693 | # |
| 1694 | LIB_DL='' |
| 1695 | if test "$enable_profiling" = 'yes'; then |
| 1696 | AC_CHECK_LIB(dl,dlopen,LIB_DL='-ldl',,) |
| 1697 | LIBS="$LIB_DL $LIBS" |
| 1698 | fi |
| 1699 | AC_SUBST(LIB_DL) |
| 1700 | |
| 1701 | dnl =========================================================================== |
| 1702 | |
| 1703 | # |
| 1704 | # Check for Autotrace delegate library. |
| 1705 | # |
| 1706 | AC_ARG_WITH([autotrace], |
| 1707 | [AC_HELP_STRING([--with-autotrace], |
| 1708 | [enable autotrace support])], |
| 1709 | [with_autotrace=$withval], |
| 1710 | [with_autotrace='no']) |
| 1711 | |
| 1712 | if test "$with_autotrace" != 'yes'; then |
| 1713 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-autotrace=$with_autotrace " |
| 1714 | fi |
| 1715 | |
| 1716 | have_autotrace='no' |
| 1717 | AUTOTRACE_CFLAGS="" |
| 1718 | AUTOTRACE_LIBS="" |
| 1719 | AUTOTRACE_PKG="" |
| 1720 | if test "x$with_autotrace" = "xyes"; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1721 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1722 | PKG_CHECK_MODULES(AUTOTRACE,[autotrace >= 0.31.1], have_autotrace=yes, have_autotrace=no) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1723 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1724 | fi |
| 1725 | |
| 1726 | if test "$have_autotrace" = 'yes'; then |
| 1727 | failed=0 |
| 1728 | AC_DEFINE(AUTOTRACE_DELEGATE,1,Define if you have AUTOTRACE library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 1729 | if test "$build_modules" = 'no'; then |
cristy | e78d253 | 2012-12-17 20:41:10 +0000 | [diff] [blame] | 1730 | CPPFLAGS="$AUTOTRACE_CFLAGS $CPPFLAGS" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1731 | fi |
| 1732 | fi |
| 1733 | |
| 1734 | AM_CONDITIONAL(AUTOTRACE_DELEGATE,test "$have_autotrace" = 'yes') |
| 1735 | AC_SUBST(AUTOTRACE_CFLAGS) |
| 1736 | AC_SUBST(AUTOTRACE_LIBS) |
| 1737 | |
| 1738 | dnl =========================================================================== |
| 1739 | |
| 1740 | # |
| 1741 | # Check for Display Postscript delegate library. |
| 1742 | # |
| 1743 | AC_ARG_WITH([dps], |
| 1744 | [AC_HELP_STRING([--without-dps], |
| 1745 | [disable Display Postscript support])], |
| 1746 | [with_dps=$withval], |
| 1747 | [with_dps='yes']) |
| 1748 | |
| 1749 | if test "$with_dps" != 'yes'; then |
| 1750 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps " |
| 1751 | fi |
| 1752 | |
| 1753 | have_dps='no' |
| 1754 | DPS_LIBS='' |
| 1755 | if test "$with_dps" != 'no' && test "$with_x" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1756 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1757 | AC_MSG_CHECKING([for DPS]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1758 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1759 | failed=0 |
| 1760 | passed=0 |
| 1761 | PERSIST_CPPFLAGS="$CPPFLAGS" |
| 1762 | CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11" |
| 1763 | AC_CHECK_HEADER(DPS/dpsXclient.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 1764 | # DPS issues: |
| 1765 | # XFree86-4.x needs -lXt to provide XtMalloc for -ldps. |
| 1766 | # Cygwin doesn't deliver -lXt as a DLL, which prevents a DLL build. |
| 1767 | # Adobe DPS (as delivered on Solaris) doesn't require -lXt. |
| 1768 | # ImageMagick itself doesn't use -lXt. |
| 1769 | have_libdps='no' |
| 1770 | LIBDPS_XT='' |
| 1771 | AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',) |
| 1772 | if test "$have_libdps" != 'yes'; then |
| 1773 | # Unset cache variable so we can try again. |
| 1774 | unset ac_cv_lib_dps_DPSInitialize |
| 1775 | AC_CHECK_LIB(dps,DPSInitialize,have_libdps='yes',have_libdps='no',-lXt) |
| 1776 | if test "$have_libdps" = 'yes'; then |
| 1777 | LIBDPS_XT='-lXt' |
| 1778 | fi |
| 1779 | fi |
| 1780 | if test "$have_libdps" = 'yes'; then |
| 1781 | passed=`expr $passed + 1` |
| 1782 | else |
| 1783 | failed=`expr $failed + 1` |
| 1784 | fi |
| 1785 | AC_CHECK_LIB(dpstk,XDPSPixelsPerPoint,passed=`expr $passed + 1`,failed=`expr $failed + 1`,-ldps $LIBDPS_XT) |
| 1786 | AC_MSG_CHECKING([if DPS package is complete]) |
| 1787 | if test $passed -gt 0; then |
| 1788 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1789 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1790 | have_dps='no (failed tests)' |
| 1791 | CPPFLAGS="$PERSIST_CPPFLAGS" |
| 1792 | else |
| 1793 | DPS_LIBS="-ldpstk -ldps ${LIBDPS_XT}" |
| 1794 | LIBS="$DPS_LIBS $LIBS" |
| 1795 | AC_DEFINE(DPS_DELEGATE,1,Define if you have Display Postscript) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1796 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1797 | have_dps='yes' |
| 1798 | fi |
| 1799 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1800 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1801 | CPPFLAGS=$PERSIST_CPPFLAGS |
| 1802 | fi |
| 1803 | fi |
| 1804 | AM_CONDITIONAL(DPS_DELEGATE, test "$have_dps" = 'yes') |
| 1805 | AC_SUBST(DPS_LIBS) |
| 1806 | |
| 1807 | dnl =========================================================================== |
| 1808 | |
| 1809 | # |
| 1810 | # Check for DJVU delegate library. |
| 1811 | # |
| 1812 | AC_ARG_WITH([djvu], |
| 1813 | [AC_HELP_STRING([--without-djvu], |
| 1814 | [disable DjVu support])], |
| 1815 | [with_djvu=$withval], |
| 1816 | [with_djvu='yes']) |
| 1817 | |
| 1818 | if test "$with_djvu" != 'yes'; then |
| 1819 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu " |
| 1820 | fi |
| 1821 | |
| 1822 | have_djvu='no' |
| 1823 | DJVU_LIBS='' |
| 1824 | if test "$with_djvu" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1825 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1826 | AC_MSG_CHECKING([for DJVU]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1827 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1828 | failed=0 |
| 1829 | passed=0 |
| 1830 | AC_CHECK_HEADER(libdjvu/ddjvuapi.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1831 | AC_CHECK_LIB(djvulibre,ddjvu_context_create,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1832 | AC_MSG_CHECKING([if DJVU package is complete]) |
| 1833 | if test $passed -gt 0; then |
| 1834 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1835 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1836 | have_djvu='no (failed tests)' |
| 1837 | else |
| 1838 | DJVU_LIBS='-ldjvulibre' |
| 1839 | LIBS="$DJVU_LIBS $LIBS" |
| 1840 | AC_DEFINE(DJVU_DELEGATE,1,Define if you have DJVU library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1841 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1842 | have_djvu='yes' |
| 1843 | fi |
| 1844 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1845 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1846 | fi |
| 1847 | fi |
| 1848 | AM_CONDITIONAL(DJVU_DELEGATE, test "$have_djvu" = 'yes') |
| 1849 | AC_SUBST(DJVU_LIBS) |
| 1850 | |
| 1851 | dnl =========================================================================== |
| 1852 | |
| 1853 | # |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 1854 | # Set DejaVu font directory. |
| 1855 | # |
| 1856 | AC_ARG_WITH([dejavu-font-dir], |
| 1857 | [AC_HELP_STRING([--with-dejavu-font-dir=DIR], |
| 1858 | [DejaVu font directory])], |
| 1859 | [with_dejavu_font_dir=$withval], |
| 1860 | [with_dejavu_font_dir='default']) |
| 1861 | |
| 1862 | if test "$with_dejavu_font_dir" != 'default'; then |
| 1863 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dejavu-font-dir=$with_dejavu_font_dir " |
| 1864 | fi |
| 1865 | |
| 1866 | dnl =========================================================================== |
| 1867 | |
| 1868 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1869 | # Check for FFTW delegate library. |
| 1870 | # |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 1871 | AC_ARG_WITH([fftw], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1872 | [AC_HELP_STRING([--without-fftw], |
| 1873 | [disable FFTW support])], |
| 1874 | [with_fftw=$withval], |
| 1875 | [with_fftw='yes']) |
| 1876 | |
| 1877 | if test "$with_fftw" != 'yes'; then |
| 1878 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fftw=$with_fftw " |
| 1879 | fi |
| 1880 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 1881 | have_fftw='no' |
| 1882 | FFTW_LIBS='' |
| 1883 | if test "$with_fftw" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1884 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 1885 | AC_MSG_CHECKING([for FFTW]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1886 | AC_MSG_RESULT([]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 1887 | failed=0 |
| 1888 | passed=0 |
| 1889 | AC_CHECK_HEADER(fftw3.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1890 | AC_CHECK_LIB(fftw3,fftw_execute,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1891 | AC_MSG_CHECKING([if FFTW package is complete]) |
| 1892 | if test $passed -gt 0; then |
| 1893 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1894 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 1895 | have_fftw='no (failed tests)' |
| 1896 | else |
| 1897 | FFTW_LIBS='-lfftw3' |
| 1898 | LIBS="$FFTW_LIBS $LIBS" |
| 1899 | AC_DEFINE(FFTW_DELEGATE,1,Define if you have FFTW library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1900 | AC_MSG_RESULT([yes]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 1901 | have_fftw='yes' |
| 1902 | fi |
| 1903 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1904 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1905 | fi |
| 1906 | fi |
| 1907 | AM_CONDITIONAL(FFTW_DELEGATE, test "$have_fftw" = 'yes') |
| 1908 | AC_SUBST(FFTW_LIBS) |
| 1909 | |
| 1910 | dnl =========================================================================== |
| 1911 | |
| 1912 | # |
| 1913 | # Check for FlashPIX delegate library. |
| 1914 | # |
| 1915 | AC_ARG_WITH([fpx], |
| 1916 | [AC_HELP_STRING([--without-fpx], |
| 1917 | [disable FlashPIX support])], |
| 1918 | [with_fpx=$withval], |
| 1919 | [with_fpx='yes']) |
| 1920 | |
| 1921 | if test "$with_fpx" != 'yes'; then |
| 1922 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx " |
| 1923 | fi |
| 1924 | |
| 1925 | have_fpx='no' |
| 1926 | FPX_LIBS='' |
cristy | d7f73ad | 2014-03-05 00:25:29 +0000 | [diff] [blame] | 1927 | SAVED_LIBS=${LIBS} |
| 1928 | LIBS=${LIBS/-ldjvulibre/} |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1929 | if test "$with_fpx" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1930 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1931 | AC_MSG_CHECKING([for FlashPIX]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1932 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1933 | failed=0 |
| 1934 | passed=0 |
| 1935 | AC_LANG_PUSH(C++) |
| 1936 | AC_CHECK_HEADER(fpxlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 1937 | AC_CHECK_LIB(fpx,FPX_OpenImageByFilename,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 1938 | AC_LANG_POP |
| 1939 | AC_MSG_CHECKING([if FlashPIX package is complete]) |
| 1940 | if test $passed -gt 0; then |
| 1941 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1942 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1943 | have_fpx='no (failed tests)' |
| 1944 | else |
| 1945 | FPX_LIBS='-lfpx' |
| 1946 | AC_DEFINE(FPX_DELEGATE,1,Define if you have FlashPIX library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1947 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1948 | have_fpx='yes' |
| 1949 | PERLMAINCC="$CXX" |
| 1950 | fi |
| 1951 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1952 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1953 | fi |
| 1954 | fi |
| 1955 | AM_CONDITIONAL(FPX_DELEGATE, test "$have_fpx" = 'yes') |
| 1956 | AC_SUBST(FPX_LIBS) |
cristy | d7f73ad | 2014-03-05 00:25:29 +0000 | [diff] [blame] | 1957 | LIBS=${SAVED_LIBS} |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1958 | |
| 1959 | dnl =========================================================================== |
| 1960 | |
| 1961 | # |
| 1962 | # Check for fontconfig delegate library. |
| 1963 | # |
| 1964 | AC_ARG_WITH([fontconfig], |
| 1965 | [AC_HELP_STRING([--without-fontconfig], |
| 1966 | [disable fontconfig support])], |
| 1967 | [with_fontconfig=$withval], |
cristy | fc3d022 | 2012-02-07 15:05:57 +0000 | [diff] [blame] | 1968 | [with_fontconfig='yes']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1969 | |
| 1970 | if test "$with_fontconfig" != 'yes'; then |
| 1971 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontconfig=$with_fontconfig " |
| 1972 | fi |
| 1973 | |
| 1974 | have_fontconfig='no' |
| 1975 | FONTCONFIG_CFLAGS="" |
| 1976 | FONTCONFIG_LIBS="" |
| 1977 | FONTCONFIG_PKG="" |
| 1978 | if test "x$with_fontconfig" = "xyes"; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1979 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1980 | PKG_CHECK_MODULES(FONTCONFIG,[fontconfig >= 2.1.0], have_fontconfig=yes, have_fontconfig=no) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 1981 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1982 | fi |
| 1983 | |
| 1984 | if test "$have_fontconfig" = 'yes'; then |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 1985 | AC_DEFINE(FONTCONFIG_DELEGATE,1,Define if you have FONTCONFIG library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 1986 | if test "$build_modules" = 'no'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1987 | CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS" |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 1988 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1989 | fi |
| 1990 | |
| 1991 | AM_CONDITIONAL(FONTCONFIG_DELEGATE,test "$have_fontconfig" = 'yes') |
| 1992 | AC_SUBST(FONTCONFIG_CFLAGS) |
| 1993 | AC_SUBST(FONTCONFIG_LIBS) |
| 1994 | |
| 1995 | dnl =========================================================================== |
| 1996 | |
| 1997 | # |
cristy | 03f187e | 2013-01-24 00:22:19 +0000 | [diff] [blame] | 1998 | # Check for the Freetype delegate library. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1999 | # |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2000 | AC_ARG_WITH([freetype], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2001 | [AC_HELP_STRING([--without-freetype], |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2002 | [disable Freetype support])], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2003 | [with_freetype=$withval], |
| 2004 | [with_freetype='yes']) |
| 2005 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2006 | if test "$with_freetype" != 'yes'; then |
| 2007 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-freetype=$with_freetype " |
| 2008 | fi |
| 2009 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2010 | have_freetype='no' |
cristy | 03f187e | 2013-01-24 00:22:19 +0000 | [diff] [blame] | 2011 | FREETYPE_CFLAGS="" |
| 2012 | FREETYPE_LIBS="" |
| 2013 | FREETYPE_PKG="" |
| 2014 | if test "x$with_freetype" = "xyes"; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2015 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 03f187e | 2013-01-24 00:22:19 +0000 | [diff] [blame] | 2016 | PKG_CHECK_MODULES(FREETYPE,[freetype2], have_freetype=yes, have_freetype=no) |
| 2017 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2018 | fi |
cristy | 03f187e | 2013-01-24 00:22:19 +0000 | [diff] [blame] | 2019 | |
| 2020 | if test "$have_freetype" = 'yes'; then |
| 2021 | AC_DEFINE(FREETYPE_DELEGATE,1,Define if you have FREETYPE library) |
| 2022 | CFLAGS="$FREETYPE_CFLAGS $CFLAGS" |
| 2023 | fi |
| 2024 | |
cristy | 98ca0f5 | 2011-10-08 23:19:10 +0000 | [diff] [blame] | 2025 | AM_CONDITIONAL(FREETYPE_DELEGATE, test "$have_freetype" = 'yes') |
cristy | 03f187e | 2013-01-24 00:22:19 +0000 | [diff] [blame] | 2026 | AC_SUBST(FREETYPE_CFLAGS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2027 | AC_SUBST(FREETYPE_LIBS) |
| 2028 | |
| 2029 | dnl =========================================================================== |
| 2030 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2031 | # |
| 2032 | # Check for Ghostscript library or framework. |
| 2033 | # |
| 2034 | # Test for iapi.h & test for gsapi_new_instance in -lgs |
| 2035 | # or -framework Ghostscript |
| 2036 | |
| 2037 | AC_ARG_WITH([gslib], |
cristy | 8d733f4 | 2013-03-04 11:27:54 +0000 | [diff] [blame] | 2038 | [AC_HELP_STRING([--with-gslib], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2039 | [enable Ghostscript library support])], |
| 2040 | [with_gslib=$withval], |
| 2041 | [with_gslib='no']) |
| 2042 | |
cristy | b7931f1 | 2009-09-25 10:22:21 +0000 | [diff] [blame] | 2043 | gslib_framework='no' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2044 | if test "$with_gslib" != 'yes'; then |
| 2045 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib " |
| 2046 | fi |
| 2047 | |
| 2048 | have_gslib='no' |
| 2049 | GS_LIBS='' |
| 2050 | if test "$with_gslib" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2051 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2052 | AC_MSG_CHECKING([for Ghostscript]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2053 | AC_MSG_RESULT([]) |
cristy | b7931f1 | 2009-09-25 10:22:21 +0000 | [diff] [blame] | 2054 | framework=0 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2055 | failed=0 |
| 2056 | passed=0 |
| 2057 | AC_CHECK_HEADER(ghostscript/iapi.h,passed=`expr $passed + 1`, |
| 2058 | failed=`expr $failed + 1`,) |
| 2059 | AC_CHECK_HEADER(ghostscript/ierrors.h,passed=`expr $passed + 1`, |
| 2060 | failed=`expr $failed + 1`,) |
| 2061 | AC_CHECK_FRAMEWORK(Ghostscript,gsapi_new_instance,framework=`expr $framework + 1`, |
| 2062 | AC_CHECK_LIB(gs,gsapi_new_instance,passed=`expr $passed + 1`,failed=`expr $failed + 1`,),) |
| 2063 | AC_MSG_CHECKING([if Ghostscript package is complete]) |
| 2064 | if test $passed -gt 0; then |
| 2065 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2066 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2067 | have_gslib='no (failed tests)' |
| 2068 | else |
| 2069 | if test $framework -gt 0; then |
| 2070 | GS_LIBS='-framework Ghostscript' |
cristy | b7931f1 | 2009-09-25 10:22:21 +0000 | [diff] [blame] | 2071 | gslib_framework='yes' |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2072 | AC_MSG_RESULT([yes, using framework.]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2073 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2074 | AC_MSG_RESULT([yes, using library.]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2075 | GS_LIBS='-lgs' |
| 2076 | fi |
| 2077 | LIBS="$GS_LIBS $LIBS" |
| 2078 | AC_DEFINE(GS_DELEGATE,1,Define if you have Ghostscript library or framework) |
| 2079 | have_gslib='yes' |
| 2080 | fi |
| 2081 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2082 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2083 | fi |
| 2084 | fi |
| 2085 | AM_CONDITIONAL(GS_DELEGATE, test "$have_gslib" = 'yes') |
| 2086 | AC_SUBST(GS_LIBS) |
| 2087 | |
| 2088 | # Set default font search path |
| 2089 | AC_ARG_WITH([fontpath], |
| 2090 | [AC_HELP_STRING([--with-fontpath=DIR], |
| 2091 | [prepend to default font search path])], |
| 2092 | [with_fontpath=$withval], |
| 2093 | [with_fontpath='']) |
| 2094 | |
| 2095 | if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then |
| 2096 | with_fontpath='' |
| 2097 | else |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 2098 | AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",[Define to prepend to default font search path.]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2099 | fi |
| 2100 | if test "$with_fontpath=" != ''; then |
| 2101 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath " |
| 2102 | fi |
| 2103 | |
| 2104 | # Set Ghostscript font directory |
| 2105 | AC_ARG_WITH([gs-font-dir], |
| 2106 | [AC_HELP_STRING([--with-gs-font-dir=DIR], |
| 2107 | [Ghostscript font directory])], |
| 2108 | [with_gs_font_dir=$withval], |
| 2109 | [with_gs_font_dir='default']) |
| 2110 | |
| 2111 | if test "$with_gs_font_dir" != 'default'; then |
| 2112 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir " |
| 2113 | fi |
| 2114 | |
| 2115 | dnl =========================================================================== |
| 2116 | |
| 2117 | # |
| 2118 | # Check for GVC delegate library. |
| 2119 | # |
| 2120 | AC_ARG_WITH(gvc, |
cristy | 24aeba9 | 2012-06-26 12:22:26 +0000 | [diff] [blame] | 2121 | [AC_HELP_STRING([--with-gvc], |
cristy | 8d733f4 | 2013-03-04 11:27:54 +0000 | [diff] [blame] | 2122 | [enable GVC support])], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2123 | [with_gvc=$withval], |
cristy | 24aeba9 | 2012-06-26 12:22:26 +0000 | [diff] [blame] | 2124 | [with_gvc='no']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2125 | |
| 2126 | if test "$with_gvc" != 'yes'; then |
| 2127 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gvc=$with_gvc " |
| 2128 | fi |
| 2129 | |
| 2130 | GVC_PKG="" |
| 2131 | if test "x$with_gvc" = "xyes"; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2132 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2133 | PKG_CHECK_MODULES(GVC,[libgvc >= 2.9.0], have_gvc=yes, have_gvc=no) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2134 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2135 | fi |
| 2136 | |
| 2137 | if test "$have_gvc" = 'yes'; then |
| 2138 | AC_DEFINE(GVC_DELEGATE,1,Define if you have GVC library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 2139 | if test "$build_modules" = 'no'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2140 | CPPFLAGS="$GVC_CFLAGS $CPPFLAGS" |
| 2141 | fi |
| 2142 | fi |
| 2143 | |
| 2144 | AM_CONDITIONAL(GVC_DELEGATE, test "$have_gvc" = 'yes') |
| 2145 | AC_SUBST(GVC_CFLAGS) |
| 2146 | AC_SUBST(GVC_LIBS) |
| 2147 | |
| 2148 | dnl =========================================================================== |
| 2149 | |
| 2150 | # |
| 2151 | # Check for JBIG delegate library. |
| 2152 | # |
| 2153 | |
| 2154 | AC_ARG_WITH([jbig], |
| 2155 | [AC_HELP_STRING([--without-jbig], |
| 2156 | [disable JBIG support])], |
| 2157 | [with_jbig=$withval], |
| 2158 | [with_jbig='yes']) |
| 2159 | |
| 2160 | have_jbig='no' |
| 2161 | JBIG_LIBS='' |
| 2162 | if test "$with_jbig" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2163 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2164 | AC_MSG_CHECKING([for JBIG]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2165 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2166 | failed=0 |
| 2167 | passed=0 |
| 2168 | AC_CHECK_HEADER(jbig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 2169 | AC_CHECK_LIB(jbig,jbg_dec_init,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2170 | AC_MSG_CHECKING([if JBIG package is complete]) |
| 2171 | if test $passed -gt 0; then |
| 2172 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2173 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2174 | have_jbig='no (failed tests)' |
| 2175 | else |
| 2176 | JBIG_LIBS='-ljbig' |
| 2177 | LIBS="$JBIG_LIBS $LIBS" |
| 2178 | AC_DEFINE(JBIG_DELEGATE,1,Define if you have JBIG library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2179 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2180 | have_jbig='yes' |
| 2181 | fi |
| 2182 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2183 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2184 | fi |
| 2185 | fi |
| 2186 | AM_CONDITIONAL(JBIG_DELEGATE, test "$have_jbig" = 'yes') |
| 2187 | AC_SUBST(JBIG_LIBS) |
| 2188 | |
| 2189 | dnl =========================================================================== |
| 2190 | |
| 2191 | # |
| 2192 | # Check for JPEG delegate library. |
| 2193 | # |
| 2194 | AC_ARG_WITH([jpeg], |
| 2195 | [AC_HELP_STRING([--without-jpeg], |
| 2196 | [disable JPEG support])], |
| 2197 | [with_jpeg=$withval], |
| 2198 | [with_jpeg='yes']) |
| 2199 | |
| 2200 | if test "$with_jpeg" != 'yes'; then |
| 2201 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg " |
| 2202 | fi |
| 2203 | |
| 2204 | have_jpeg='no' |
| 2205 | JPEG_LIBS='' |
| 2206 | if test "$with_jpeg" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2207 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2208 | AC_MSG_CHECKING([for JPEG]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2209 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2210 | failed=0 |
| 2211 | passed=0 |
| 2212 | AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 2213 | AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 2214 | AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 2215 | AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 2216 | AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2217 | |
| 2218 | # Test for compatible JPEG library |
| 2219 | if test "$ac_cv_jpeg_version_ok" != 'yes'; then |
| 2220 | AC_CACHE_CHECK(for JPEG library is version 6b or later, ac_cv_jpeg_version_ok, |
| 2221 | [AC_TRY_COMPILE( |
| 2222 | #include <stdio.h> |
| 2223 | #include <stdlib.h> |
| 2224 | #include <jpeglib.h> |
| 2225 | , |
| 2226 | changequote(<<, >>)dnl |
| 2227 | << |
| 2228 | #if JPEG_LIB_VERSION < 62 |
| 2229 | #error IJG JPEG library must be version 6b or newer! |
| 2230 | #endif |
| 2231 | return 0; |
| 2232 | >>, |
| 2233 | changequote([, ])dnl |
| 2234 | ac_cv_jpeg_version_ok='yes'; passed=`expr $passed + 1`, |
| 2235 | ac_cv_jpeg_version_ok='no'; failed=`expr $failed + 1`)]) |
| 2236 | fi |
| 2237 | AC_MSG_CHECKING([if JPEG package is complete]) |
| 2238 | if test $passed -gt 0; then |
| 2239 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2240 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2241 | have_jpeg='no (failed tests)' |
| 2242 | else |
| 2243 | JPEG_LIBS='-ljpeg' |
| 2244 | LIBS="$JPEG_LIBS $LIBS" |
| 2245 | AC_DEFINE(JPEG_DELEGATE,1,Define if you have JPEG library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2246 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2247 | have_jpeg='yes' |
| 2248 | fi |
| 2249 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2250 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2251 | fi |
| 2252 | fi |
| 2253 | AM_CONDITIONAL(JPEG_DELEGATE, test "$have_jpeg" = 'yes') |
| 2254 | AC_SUBST(JPEG_LIBS) |
| 2255 | |
| 2256 | dnl =========================================================================== |
| 2257 | |
| 2258 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2259 | # Check for LCMS delegate library. |
| 2260 | # |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2261 | # Disable LCMS. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2262 | AC_ARG_WITH(lcms, |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2263 | [ --without-lcms disable lcms (v1.1X) support], |
| 2264 | [with_lcms=$withval], |
| 2265 | [with_lcms='yes']) |
| 2266 | if test "$with_lcms" != 'yes' ; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2267 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms " |
| 2268 | fi |
| 2269 | |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2270 | # Disable LCMS2. |
| 2271 | AC_ARG_WITH(lcms2, |
| 2272 | [ --without-lcms2 disable lcms (v2.X) support], |
| 2273 | [with_lcms2=$withval], |
| 2274 | [with_lcms2='yes']) |
| 2275 | if test "$with_lcms2" != 'yes' ; then |
| 2276 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 " |
| 2277 | fi |
| 2278 | |
| 2279 | have_lcms2='no' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2280 | LCMS_LIBS='' |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2281 | if test "$with_lcms2" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2282 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2283 | AC_MSG_CHECKING([for LCMS v2]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2284 | AC_MSG_RESULT() |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2285 | failed=0 |
| 2286 | passed=0 |
| 2287 | have_lcms_header='no' |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2288 | |
| 2289 | # Check for <lcms2.h> |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 2290 | AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,) |
| 2291 | if test "$have_lcms_header" = 'yes'; then |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2292 | AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.) |
| 2293 | passed=`expr $passed + 1` |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 2294 | fi |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2295 | |
| 2296 | # Check for <lcms2/lcms2.h) |
| 2297 | if test "$have_lcms_header" != 'yes'; then |
| 2298 | AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,) |
| 2299 | if test "$have_lcms_header" = 'yes'; then |
| 2300 | passed=`expr $passed + 1` |
| 2301 | AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.) |
| 2302 | fi |
| 2303 | fi |
| 2304 | |
| 2305 | # Failed to find lcms header? |
| 2306 | if test "$have_lcms_header" != 'yes'; then |
| 2307 | failed=`expr $failed + 1` |
| 2308 | fi |
| 2309 | |
| 2310 | AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2311 | AC_MSG_CHECKING(if LCMS v2 package is complete) |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 2312 | if test $passed -gt 0; then |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2313 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2314 | AC_MSG_RESULT(no -- some components failed test) |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2315 | have_lcms2='no (failed tests)' |
| 2316 | else |
| 2317 | LCMS_LIBS='-llcms2' |
| 2318 | LIBS="$LCMS_LIBS $LIBS" |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2319 | AC_MSG_RESULT(yes) |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2320 | have_lcms2='yes' |
| 2321 | fi |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 2322 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2323 | AC_MSG_RESULT(no) |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 2324 | fi |
| 2325 | fi |
| 2326 | |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2327 | # |
| 2328 | # Check for LCMS v1 (1.11 or later) |
| 2329 | # |
| 2330 | if test $have_lcms2 = 'yes'; then |
| 2331 | with_lcms='no' |
| 2332 | fi |
| 2333 | |
| 2334 | have_lcms='no' |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 2335 | if test "$with_lcms" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2336 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2337 | AC_MSG_CHECKING([for LCMS v1.1X]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2338 | AC_MSG_RESULT() |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 2339 | failed=0 |
| 2340 | passed=0 |
| 2341 | have_lcms_header='no' |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2342 | |
| 2343 | # Check for <lcms.h> |
| 2344 | if test "$have_lcms_header" != 'yes'; then |
| 2345 | AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,) |
| 2346 | if test "$have_lcms_header" = 'yes'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2347 | passed=`expr $passed + 1` |
| 2348 | AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.) |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2349 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2350 | fi |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2351 | |
| 2352 | # Check for <lcms/lcms.h> |
| 2353 | if test "$have_lcms_header" != 'yes'; then |
| 2354 | AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,) |
| 2355 | if test "$have_lcms_header" = 'yes'; then |
| 2356 | passed=`expr $passed + 1` |
| 2357 | AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.) |
| 2358 | fi |
| 2359 | fi |
| 2360 | |
| 2361 | # Failed to find lcms header? |
| 2362 | if test "$have_lcms_header" != 'yes'; then |
| 2363 | failed=`expr $failed + 1` |
| 2364 | fi |
| 2365 | |
| 2366 | AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2367 | AC_MSG_CHECKING(if LCMS package is complete) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2368 | if test $passed -gt 0; then |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2369 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2370 | AC_MSG_RESULT(no -- some components failed test) |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2371 | have_lcms='no (failed tests)' |
| 2372 | else |
| 2373 | LCMS_LIBS='-llcms' |
| 2374 | LIBS="$LCMS_LIBS $LIBS" |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2375 | AC_MSG_RESULT(yes) |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2376 | have_lcms='yes' |
| 2377 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2378 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2379 | AC_MSG_RESULT(no) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2380 | fi |
| 2381 | fi |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2382 | |
| 2383 | AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes') |
| 2384 | if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then |
| 2385 | AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library]) |
cristy | d09bcf9 | 2010-03-25 03:04:45 +0000 | [diff] [blame] | 2386 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2387 | AC_SUBST(LCMS_LIBS) |
| 2388 | |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 2389 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2390 | dnl =========================================================================== |
| 2391 | |
| 2392 | # |
cristy | 99db387 | 2014-01-01 15:11:34 +0000 | [diff] [blame] | 2393 | # Check for the OpenJP2 delegate library. |
| 2394 | # |
| 2395 | AC_ARG_WITH([openjp2], |
| 2396 | [AC_HELP_STRING([--without-openjp2], |
| 2397 | [disable OpenJP2 support])], |
| 2398 | [with_openjp2=$withval], |
| 2399 | [with_openjp2='yes']) |
| 2400 | |
| 2401 | if test "$with_openjp2" != 'yes'; then |
| 2402 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openjp2=$with_openjp2 " |
| 2403 | fi |
| 2404 | |
| 2405 | have_openjp2='no' |
| 2406 | LIBOPENJP2_CFLAGS="" |
| 2407 | LIBOPENJP2_LIBS="" |
| 2408 | LIBOPENJP2_PKG="" |
| 2409 | if test "x$with_openjp2" = "xyes"; then |
| 2410 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | bc96493 | 2014-05-08 21:45:03 +0000 | [diff] [blame] | 2411 | PKG_CHECK_MODULES(LIBOPENJP2,[libopenjp2 >= 2.1.0], have_openjp2=yes, have_openjp2=no) |
cristy | 99db387 | 2014-01-01 15:11:34 +0000 | [diff] [blame] | 2412 | AC_MSG_RESULT([]) |
| 2413 | fi |
| 2414 | |
| 2415 | if test "$have_openjp2" = 'yes'; then |
| 2416 | AC_DEFINE(LIBOPENJP2_DELEGATE,1,Define if you have OPENJP2 library) |
| 2417 | if test "$build_modules" = 'no'; then |
| 2418 | CFLAGS="$LIBOPENJP2_CFLAGS $CFLAGS" |
| 2419 | fi |
| 2420 | fi |
| 2421 | |
| 2422 | AM_CONDITIONAL(LIBOPENJP2_DELEGATE, test "$have_openjp2" = 'yes') |
| 2423 | AC_SUBST(LIBOPENJP2_CFLAGS) |
| 2424 | AC_SUBST(LIBOPENJP2_LIBS) |
| 2425 | |
| 2426 | |
| 2427 | dnl =========================================================================== |
| 2428 | |
| 2429 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2430 | # Check for the LQR (Liquid Rescale) delegate library. |
| 2431 | # |
| 2432 | AC_ARG_WITH([lqr], |
| 2433 | [AC_HELP_STRING([--without-lqr], |
cristy | ec50135 | 2010-03-13 18:43:34 +0000 | [diff] [blame] | 2434 | [disable Liquid Rescale support])], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2435 | [with_lqr=$withval], |
| 2436 | [with_lqr='yes']) |
| 2437 | |
| 2438 | if test "$with_lqr" != 'yes'; then |
| 2439 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lqr=$with_lqr " |
| 2440 | fi |
| 2441 | |
| 2442 | have_lqr='no' |
| 2443 | LQR_CFLAGS="" |
| 2444 | LQR_LIBS="" |
| 2445 | LQR_PKG="" |
| 2446 | if test "x$with_lqr" = "xyes"; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2447 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2448 | PKG_CHECK_MODULES(LQR,[lqr-1 >= 0.1.0], have_lqr=yes, have_lqr=no) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2449 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2450 | fi |
| 2451 | |
| 2452 | if test "$have_lqr" = 'yes'; then |
| 2453 | AC_DEFINE(LQR_DELEGATE,1,Define if you have LQR library) |
| 2454 | CFLAGS="$LQR_CFLAGS $CFLAGS" |
| 2455 | fi |
| 2456 | |
| 2457 | AM_CONDITIONAL(LQR_DELEGATE, test "$have_lqr" = 'yes') |
| 2458 | AC_SUBST(LQR_CFLAGS) |
| 2459 | AC_SUBST(LQR_LIBS) |
| 2460 | |
| 2461 | dnl =========================================================================== |
| 2462 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2463 | # Disable LZMA (lzma library) |
cristy | fbb0ef0 | 2010-12-19 02:32:11 +0000 | [diff] [blame] | 2464 | AC_ARG_WITH(lzma, |
glennrp | 3fc1c21 | 2013-01-10 01:52:32 +0000 | [diff] [blame] | 2465 | [ --without-lzma disable LZMA support], |
| 2466 | [with_lzma=$withval], |
| 2467 | [with_lzma='yes']) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2468 | if test "$with_lzma" != 'yes' ; then |
cristy | fbb0ef0 | 2010-12-19 02:32:11 +0000 | [diff] [blame] | 2469 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lzma=$with_lzma " |
| 2470 | fi |
| 2471 | |
cristy | 56bbc92 | 2011-11-14 13:18:39 +0000 | [diff] [blame] | 2472 | LZMA_PKG="" |
| 2473 | if test "x$with_lzma" = "xyes"; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2474 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 56bbc92 | 2011-11-14 13:18:39 +0000 | [diff] [blame] | 2475 | PKG_CHECK_MODULES(LZMA,[liblzma >= 2.9.0], have_lzma=yes, have_lzma=no) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2476 | AC_MSG_RESULT([]) |
cristy | f805afb | 2011-10-03 17:17:37 +0000 | [diff] [blame] | 2477 | fi |
cristy | 56bbc92 | 2011-11-14 13:18:39 +0000 | [diff] [blame] | 2478 | |
| 2479 | if test "$have_lzma" = 'yes'; then |
| 2480 | AC_DEFINE(LZMA_DELEGATE,1,Define if you have LZMA library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 2481 | if test "$build_modules" = 'no'; then |
cristy | 56bbc92 | 2011-11-14 13:18:39 +0000 | [diff] [blame] | 2482 | CPPFLAGS="$LZMA_CFLAGS $CPPFLAGS" |
| 2483 | fi |
| 2484 | fi |
| 2485 | |
cristy | fbb0ef0 | 2010-12-19 02:32:11 +0000 | [diff] [blame] | 2486 | AM_CONDITIONAL(LZMA_DELEGATE, test "$have_lzma" = 'yes') |
cristy | 56bbc92 | 2011-11-14 13:18:39 +0000 | [diff] [blame] | 2487 | AC_SUBST(LZMA_CFLAGS) |
cristy | fbb0ef0 | 2010-12-19 02:32:11 +0000 | [diff] [blame] | 2488 | AC_SUBST(LZMA_LIBS) |
| 2489 | |
| 2490 | dnl =========================================================================== |
| 2491 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2492 | # |
| 2493 | # Check for the OpenEXR delegate library. |
| 2494 | # |
| 2495 | AC_ARG_WITH([openexr], |
| 2496 | [AC_HELP_STRING([--without-openexr], |
| 2497 | [disable OpenEXR support])], |
| 2498 | [with_openexr=$withval], |
| 2499 | [with_openexr='yes']) |
| 2500 | |
| 2501 | if test "$with_openexr" != 'yes'; then |
| 2502 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-openexr=$with_openexr " |
| 2503 | fi |
| 2504 | |
| 2505 | have_openexr='no' |
| 2506 | OPENEXR_CFLAGS="" |
| 2507 | OPENEXR_LIBS="" |
| 2508 | OPENEXR_PKG="" |
| 2509 | if test "x$with_openexr" = "xyes"; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2510 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2511 | PKG_CHECK_MODULES(OPENEXR,[OpenEXR >= 1.0.6], have_openexr=yes, have_openexr=no) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2512 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2513 | fi |
| 2514 | |
| 2515 | if test "$have_openexr" = 'yes'; then |
| 2516 | AC_DEFINE(OPENEXR_DELEGATE,1,Define if you have OPENEXR library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 2517 | if test "$build_modules" = 'no'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2518 | CFLAGS="$OPENEXR_CFLAGS $CFLAGS" |
| 2519 | fi |
| 2520 | fi |
| 2521 | |
| 2522 | AM_CONDITIONAL(OPENEXR_DELEGATE, test "$have_openexr" = 'yes') |
| 2523 | AC_SUBST(OPENEXR_CFLAGS) |
| 2524 | AC_SUBST(OPENEXR_LIBS) |
| 2525 | |
| 2526 | dnl =========================================================================== |
| 2527 | |
| 2528 | # |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 2529 | # Check for PANGO delegate library. |
| 2530 | # |
| 2531 | AC_ARG_WITH([pango], |
| 2532 | [AC_HELP_STRING([--without-pango], |
| 2533 | [disable PANGO support])], |
| 2534 | [with_pango=$withval], |
cristy | fc3d022 | 2012-02-07 15:05:57 +0000 | [diff] [blame] | 2535 | [with_pango='yes']) |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 2536 | |
| 2537 | if test "$with_pango" != 'yes'; then |
| 2538 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-pango=$with_pango " |
| 2539 | fi |
| 2540 | |
| 2541 | have_pango='no' |
cristy | a054b76 | 2012-03-26 23:16:00 +0000 | [diff] [blame] | 2542 | have_pangocairo='no' |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 2543 | PANGO_CFLAGS="" |
| 2544 | PANGO_LIBS="" |
| 2545 | PANGO_PKG="" |
| 2546 | if test "x$with_pango" = "xyes"; then |
| 2547 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | a054b76 | 2012-03-26 23:16:00 +0000 | [diff] [blame] | 2548 | PKG_CHECK_MODULES(PANGO, [pangocairo >= 1.28.1], have_pangocairo=yes, have_pangocairo=no) |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 2549 | AC_MSG_RESULT([]) |
cristy | d325d04 | 2011-12-06 17:36:51 +0000 | [diff] [blame] | 2550 | PKG_CHECK_MODULES(PANGO, [pango >= 1.28.1], have_pango=yes, have_pango=no) |
cristy | 7dc48ed | 2011-10-28 14:11:43 +0000 | [diff] [blame] | 2551 | AC_MSG_RESULT([]) |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 2552 | fi |
| 2553 | |
| 2554 | if test "$have_pango" = 'yes'; then |
| 2555 | AC_DEFINE(PANGO_DELEGATE,1,Define if you have PANGO library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 2556 | if test "$build_modules" = 'no'; then |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 2557 | CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS" |
| 2558 | fi |
| 2559 | fi |
| 2560 | |
cristy | a054b76 | 2012-03-26 23:16:00 +0000 | [diff] [blame] | 2561 | if test "$have_pangocairo" = 'yes'; then |
| 2562 | AC_DEFINE(PANGOCAIRO_DELEGATE,1,Define if you have PANGOCAIRO library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 2563 | if test "$build_modules" = 'no'; then |
cristy | a054b76 | 2012-03-26 23:16:00 +0000 | [diff] [blame] | 2564 | CPPFLAGS="$PANGOCAIRO_CFLAGS $CPPFLAGS" |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 2565 | fi |
| 2566 | fi |
| 2567 | |
| 2568 | AM_CONDITIONAL(PANGO_DELEGATE, test "$have_pango" = 'yes') |
cristy | a054b76 | 2012-03-26 23:16:00 +0000 | [diff] [blame] | 2569 | AM_CONDITIONAL(PANGOCAIRO_DELEGATE, test "$have_pangocairo" = 'yes') |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 2570 | AC_SUBST(PANGO_CFLAGS) |
| 2571 | AC_SUBST(PANGO_LIBS) |
| 2572 | |
| 2573 | dnl =========================================================================== |
| 2574 | |
| 2575 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2576 | # Check for PNG delegate library. |
| 2577 | # |
| 2578 | AC_ARG_WITH(png, |
| 2579 | [AC_HELP_STRING([--without-png], |
| 2580 | [disable PNG support])], |
| 2581 | [with_png=$withval], |
| 2582 | [with_png='yes']) |
| 2583 | |
| 2584 | if test "$with_png" != 'yes'; then |
| 2585 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-png=$with_png " |
| 2586 | fi |
| 2587 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2588 | have_png='no' |
| 2589 | PNG_LIBS='' |
| 2590 | |
| 2591 | if test "$with_png" != 'no' -a "$have_zlib" != 'no' ; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2592 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2593 | AC_MSG_CHECKING(for PNG support ) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2594 | AC_MSG_RESULT() |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2595 | failed=0 |
| 2596 | passed=0 |
| 2597 | AC_CHECK_HEADER(png.h,passed=`expr $passed + 1`, |
| 2598 | failed=`expr $failed + 1`,) |
| 2599 | |
| 2600 | if test $passed -gt 0; then |
glennrp | 3fc1c21 | 2013-01-10 01:52:32 +0000 | [diff] [blame] | 2601 | for var in 7 6 5 4 2 '' ; do |
cristy | 0615f0e | 2011-10-12 11:36:46 +0000 | [diff] [blame] | 2602 | if test "$have_png" = 'no' ; then |
| 2603 | if test "x${var}" = 'x' ; then |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2604 | pnglib='png' |
| 2605 | else |
| 2606 | pnglib="png1${var}" |
| 2607 | fi |
| 2608 | |
| 2609 | # Test for compatible LIBPNG library |
| 2610 | failed=0 |
| 2611 | passed=0 |
cristy | 0615f0e | 2011-10-12 11:36:46 +0000 | [diff] [blame] | 2612 | if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2613 | if test "${pnglib}" != 'png' ; then |
| 2614 | AC_MSG_CHECKING(for LIBPNG1${var} support ) |
| 2615 | AC_TRY_COMPILE( |
| 2616 | #include <stdio.h> |
| 2617 | #include <stdlib.h> |
| 2618 | #include <png.h> |
| 2619 | , |
| 2620 | changequote(<<, >>)dnl |
| 2621 | << |
| 2622 | #if PNG_LIBPNG_VER_MINOR != ${var} |
| 2623 | #error LIBPNG library must be version 1${var}! |
| 2624 | Kaboom, Kaboom |
| 2625 | #endif |
| 2626 | return 0; |
| 2627 | >>, |
| 2628 | changequote([, ])dnl |
| 2629 | ac_cv_libpng_ok='yes', |
| 2630 | ac_cv_libpng_ok='no') |
| 2631 | if test "$ac_cv_libpng_ok" = 'yes' ; then |
| 2632 | passed=`expr $passed + 1` |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2633 | AC_MSG_RESULT(yes) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2634 | else |
| 2635 | failed=`expr $failed + 1` |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2636 | AC_MSG_RESULT(no) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2637 | fi |
| 2638 | else |
| 2639 | passed=`expr $passed + 1` |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2640 | AC_MSG_RESULT(yes) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2641 | fi |
| 2642 | fi |
| 2643 | |
| 2644 | if test $passed -gt 0 -a $failed -le 0; then |
glennrp | 01969c4 | 2013-01-10 02:06:14 +0000 | [diff] [blame] | 2645 | if test "1${var}" = '17' ; then |
| 2646 | AC_CHECK_LIB(png17,png_get_io_ptr,passed=`expr $passed + 1`, |
| 2647 | failed=`expr $failed + 1`,) |
| 2648 | AC_CHECK_LIB(png17,png_longjmp,passed=`expr $passed + 1`, |
| 2649 | failed=`expr $failed + 1`,) |
| 2650 | fi |
| 2651 | if test "1${var}" = '16' ; then |
| 2652 | AC_CHECK_LIB(png16,png_get_io_ptr,passed=`expr $passed + 1`, |
| 2653 | failed=`expr $failed + 1`,) |
| 2654 | AC_CHECK_LIB(png16,png_longjmp,passed=`expr $passed + 1`, |
| 2655 | failed=`expr $failed + 1`,) |
| 2656 | fi |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2657 | if test "1${var}" = '15' ; then |
| 2658 | AC_CHECK_LIB(png15,png_get_io_ptr,passed=`expr $passed + 1`, |
| 2659 | failed=`expr $failed + 1`,) |
| 2660 | AC_CHECK_LIB(png15,png_longjmp,passed=`expr $passed + 1`, |
| 2661 | failed=`expr $failed + 1`,) |
| 2662 | fi |
| 2663 | if test "1${var}" = '14' ; then |
| 2664 | AC_CHECK_LIB(png14,png_get_io_ptr,passed=`expr $passed + 1`, |
| 2665 | failed=`expr $failed + 1`,) |
| 2666 | AC_CHECK_LIB(png14,png_get_io_state,passed=`expr $passed + 1`, |
| 2667 | failed=`expr $failed + 1`,) |
| 2668 | fi |
| 2669 | if test "1${var}" = '12' ; then |
| 2670 | AC_CHECK_LIB(png12,png_get_io_ptr,passed=`expr $passed + 1`, |
| 2671 | failed=`expr $failed + 1`,) |
| 2672 | fi |
| 2673 | if test "1${var}" = '1' ; then |
| 2674 | AC_CHECK_LIB(png,png_get_io_ptr,passed=`expr $passed + 1`, |
| 2675 | failed=`expr $failed + 1`,) |
| 2676 | fi |
| 2677 | if test $passed -gt 0 -a $failed -le 0 ; then |
| 2678 | AC_MSG_CHECKING(if ${pnglib} package is complete) |
| 2679 | if test $passed -gt 0 ; then |
| 2680 | if test $failed -gt 0 ; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2681 | AC_MSG_RESULT(no -- some components failed test) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2682 | have_png='no (failed tests)' |
| 2683 | else |
| 2684 | PNG_LIBS="-l${pnglib}" |
| 2685 | LIBS="$PNG_LIBS $LIBS" |
| 2686 | AC_DEFINE(PNG_DELEGATE,1,Define if you have PNG library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2687 | AC_MSG_RESULT(yes) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2688 | have_png='yes' |
| 2689 | fi |
| 2690 | fi |
| 2691 | fi |
| 2692 | fi |
| 2693 | fi |
| 2694 | done |
| 2695 | fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2696 | fi |
cristy | 6487730 | 2011-08-23 19:10:31 +0000 | [diff] [blame] | 2697 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2698 | AM_CONDITIONAL(PNG_DELEGATE,test "$have_png" = 'yes') |
cristy | f805afb | 2011-10-03 17:17:37 +0000 | [diff] [blame] | 2699 | AC_SUBST(PNG_LIBS) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2700 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2701 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2702 | dnl =========================================================================== |
| 2703 | |
| 2704 | # |
| 2705 | # Check for RSVG delegate library. |
| 2706 | # |
| 2707 | AC_ARG_WITH([rsvg], |
cristy | 51633f5 | 2013-04-23 14:03:19 +0000 | [diff] [blame] | 2708 | [AC_HELP_STRING([--with-rsvg], |
cristy | 1164d5f | 2012-08-15 00:58:25 +0000 | [diff] [blame] | 2709 | [enable RSVG support])], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2710 | [with_rsvg=$withval], |
cristy | 1164d5f | 2012-08-15 00:58:25 +0000 | [diff] [blame] | 2711 | [with_rsvg='no']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2712 | |
| 2713 | if test "$with_rsvg" != 'yes'; then |
| 2714 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-rsvg=$with_rsvg " |
| 2715 | fi |
| 2716 | |
| 2717 | have_rsvg='no' |
| 2718 | have_cairo='no' |
| 2719 | RSVG_CFLAGS="" |
| 2720 | RSVG_LIBS="" |
| 2721 | RSVG_PKG="" |
| 2722 | if test "x$with_rsvg" = "xyes"; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2723 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2724 | PKG_CHECK_MODULES(RSVG,[librsvg-2.0 >= 2.9.0], have_rsvg=yes, have_rsvg=no) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2725 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2726 | PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, have_cairo=yes, have_cairo=no) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2727 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2728 | fi |
| 2729 | |
| 2730 | if test "$have_rsvg" = 'yes'; then |
| 2731 | AC_DEFINE(RSVG_DELEGATE,1,Define if you have RSVG library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 2732 | if test "$build_modules" = 'no'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2733 | CPPFLAGS="$RSVG_CFLAGS $CPPFLAGS" |
| 2734 | fi |
| 2735 | fi |
| 2736 | |
| 2737 | if test "$have_cairo" = 'yes'; then |
| 2738 | AC_DEFINE(CAIRO_DELEGATE,1,Define if you have CAIRO library) |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 2739 | if test "$build_modules" = 'no'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2740 | CPPFLAGS="$CAIRO_SVG_CFLAGS $CPPFLAGS" |
| 2741 | fi |
| 2742 | fi |
| 2743 | |
| 2744 | AM_CONDITIONAL(RSVG_DELEGATE, test "$have_rsvg" = 'yes') |
| 2745 | AM_CONDITIONAL(CAIRO_DELEGATE, test "$have_cairo" = 'yes') |
| 2746 | AC_SUBST(RSVG_CFLAGS) |
| 2747 | AC_SUBST(RSVG_LIBS) |
| 2748 | |
| 2749 | dnl =========================================================================== |
| 2750 | |
| 2751 | # |
| 2752 | # Check for TIFF delegate library. |
| 2753 | # |
| 2754 | AC_ARG_WITH([tiff], |
| 2755 | [AC_HELP_STRING([--without-tiff], |
| 2756 | [disable TIFF support])], |
| 2757 | [with_tiff=$withval], |
| 2758 | [with_tiff='yes']) |
| 2759 | |
| 2760 | if test "$with_tiff" != 'yes'; then |
| 2761 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff " |
| 2762 | fi |
| 2763 | |
| 2764 | have_tiff='no' |
| 2765 | TIFF_LIBS='' |
| 2766 | if test "$with_tiff" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2767 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2768 | AC_MSG_CHECKING([for TIFF]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2769 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2770 | failed=0 |
| 2771 | passed=0 |
| 2772 | AC_CHECK_HEADER(tiff.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 2773 | AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 2774 | AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2775 | AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2776 | AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2777 | AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2778 | AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2779 | AC_MSG_CHECKING([if TIFF package is complete]) |
| 2780 | if test $passed -gt 0; then |
| 2781 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2782 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2783 | have_tiff='no (failed tests)' |
| 2784 | else |
| 2785 | TIFF_LIBS='-ltiff' |
| 2786 | LIBS="$TIFF_LIBS $LIBS" |
| 2787 | AC_DEFINE(TIFF_DELEGATE,1,Define if you have TIFF library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2788 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2789 | have_tiff='yes' |
| 2790 | AC_CHECK_HEADERS(tiffconf.h) |
| 2791 | AC_CHECK_FUNCS([TIFFIsCODECConfigured TIFFMergeFieldInfo \ |
cristy | 3f590e5 | 2011-11-14 14:29:44 +0000 | [diff] [blame] | 2792 | TIFFIsBigEndian TIFFReadEXIFDirectory TIFFSetErrorHandlerExt \ |
| 2793 | TIFFSetTagExtender TIFFSetWarningHandlerExt \ |
| 2794 | TIFFSwabArrayOfTriples]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2795 | fi |
| 2796 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2797 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2798 | fi |
| 2799 | fi |
| 2800 | AM_CONDITIONAL(TIFF_DELEGATE, test "$have_tiff" = 'yes') |
| 2801 | AC_SUBST(TIFF_LIBS) |
| 2802 | |
| 2803 | dnl =========================================================================== |
| 2804 | |
| 2805 | # |
cristy | b186075 | 2011-03-14 00:27:46 +0000 | [diff] [blame] | 2806 | # Check for WEBP delegate library. |
| 2807 | # |
| 2808 | AC_ARG_WITH(webp, |
| 2809 | [AC_HELP_STRING([--without-webp], |
| 2810 | [disable WEBP support])], |
| 2811 | [with_webp=$withval], |
| 2812 | [with_webp='yes']) |
| 2813 | |
| 2814 | if test "$with_webp" != 'yes'; then |
| 2815 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-webp=$with_webp " |
| 2816 | fi |
| 2817 | |
| 2818 | have_webp='no' |
| 2819 | WEBP_LIBS='' |
| 2820 | if test "$with_webp" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2821 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | b186075 | 2011-03-14 00:27:46 +0000 | [diff] [blame] | 2822 | AC_MSG_CHECKING([for WEBP]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2823 | AC_MSG_RESULT([]) |
cristy | b186075 | 2011-03-14 00:27:46 +0000 | [diff] [blame] | 2824 | failed=0 |
| 2825 | passed=0 |
| 2826 | AC_CHECK_HEADER(webp/decode.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
cristy | 6d67031 | 2013-03-22 23:23:01 +0000 | [diff] [blame] | 2827 | AC_CHECK_LIB(webp,WebPPictureInitInternal,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
cristy | b186075 | 2011-03-14 00:27:46 +0000 | [diff] [blame] | 2828 | AC_MSG_CHECKING([if WEBP package is complete]) |
| 2829 | if test $passed -gt 0; then |
| 2830 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2831 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | b186075 | 2011-03-14 00:27:46 +0000 | [diff] [blame] | 2832 | have_webp='no (failed tests)' |
| 2833 | else |
| 2834 | WEBP_LIBS='-lwebp' |
| 2835 | LIBS="$WEBP_LIBS $LIBS" |
| 2836 | AC_DEFINE(WEBP_DELEGATE,1,Define if you have WEBP library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2837 | AC_MSG_RESULT([yes]) |
cristy | b186075 | 2011-03-14 00:27:46 +0000 | [diff] [blame] | 2838 | have_webp='yes' |
| 2839 | fi |
| 2840 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2841 | AC_MSG_RESULT([no]) |
cristy | b186075 | 2011-03-14 00:27:46 +0000 | [diff] [blame] | 2842 | fi |
| 2843 | fi |
| 2844 | AM_CONDITIONAL(WEBP_DELEGATE,test "$have_webp" = 'yes') |
| 2845 | AC_SUBST(WEBP_LIBS) |
| 2846 | |
| 2847 | dnl =========================================================================== |
| 2848 | |
| 2849 | # |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2850 | # Set Windows font directory. |
| 2851 | # |
cristy | 74554ef | 2011-10-27 12:56:11 +0000 | [diff] [blame] | 2852 | AC_ARG_WITH([windows-font-dir], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2853 | [AC_HELP_STRING([--with-windows-font-dir=DIR], |
| 2854 | [directory containing MS-Windows fonts])], |
| 2855 | [with_windows_font_dir=$withval], |
| 2856 | [with_windows_font_dir='']) |
| 2857 | if test "$with_windows_font_dir" != '' ; then |
| 2858 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir " |
| 2859 | fi |
| 2860 | |
| 2861 | dnl =========================================================================== |
| 2862 | |
| 2863 | # |
| 2864 | # Check for WMF delegate library. |
| 2865 | # |
| 2866 | AC_ARG_WITH([wmf], |
cristy | d0a9a68 | 2012-02-11 00:21:53 +0000 | [diff] [blame] | 2867 | [AC_HELP_STRING([--with-wmf], |
| 2868 | [enable WMF support])], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2869 | [with_wmf=$withval], |
cristy | fc3d022 | 2012-02-07 15:05:57 +0000 | [diff] [blame] | 2870 | [with_wmf='no']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2871 | |
| 2872 | if test "$with_wmf" != 'yes'; then |
| 2873 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf " |
| 2874 | fi |
| 2875 | |
| 2876 | have_wmf='no' |
| 2877 | WMF_LIBS='' |
cristy | 03f7cf9 | 2011-12-15 01:40:41 +0000 | [diff] [blame] | 2878 | WMF_LIBS_DEPS='' |
| 2879 | OLIBS="$LIBS" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2880 | if test "$with_wmf" != 'no'; then |
cristy | 03f7cf9 | 2011-12-15 01:40:41 +0000 | [diff] [blame] | 2881 | AC_MSG_RESULT([-------------------------------------------------------------]) |
glennrp | 84cc1bd | 2011-08-24 14:01:52 +0000 | [diff] [blame] | 2882 | AC_MSG_CHECKING([for WMF]) |
cristy | 03f7cf9 | 2011-12-15 01:40:41 +0000 | [diff] [blame] | 2883 | AC_MSG_RESULT([]) |
| 2884 | have_libwmf='no' |
| 2885 | have_libwmflite='no' |
| 2886 | have_libwmf_ipa_h='no' |
| 2887 | |
| 2888 | AC_CHECK_HEADER([libwmf/ipa.h],[have_libwmf_ipa_h='yes'],,[$FT2BUILD_H]) |
| 2889 | if test "$have_libwmf_ipa_h" = 'yes'; then |
| 2890 | AC_CHECK_LIB(wmflite,wmf_lite_create,have_libwmflite='yes',,) |
| 2891 | if test "$have_libwmflite" = 'yes'; then |
| 2892 | AC_DEFINE(WMFLITE_DELEGATE,1,Define if you have wmflite library) |
| 2893 | WMF_LIBS='-lwmflite' |
glennrp | 84cc1bd | 2011-08-24 14:01:52 +0000 | [diff] [blame] | 2894 | LIBS="$WMF_LIBS $LIBS" |
glennrp | 84cc1bd | 2011-08-24 14:01:52 +0000 | [diff] [blame] | 2895 | have_wmf='yes' |
cristy | 03f7cf9 | 2011-12-15 01:40:41 +0000 | [diff] [blame] | 2896 | else |
| 2897 | WMF_LIBS_DEPS='' |
| 2898 | WMF_CONFIG_LIBS=`libwmf-config --libs` |
| 2899 | for lib in xml2 expat freetype jpeg png z; do |
| 2900 | testlib="-l${lib}" |
| 2901 | echo "$WMF_CONFIG_LIBS" | grep -- "$testlib" > /dev/null && WMF_LIBS_DEPS="$WMF_LIBS_DEPS $testlib" |
| 2902 | done |
| 2903 | AC_CHECK_LIB(wmf,wmf_api_create,have_libwmf='yes',,$WMF_LIBS_DEPS) |
| 2904 | if test "$have_libwmf" = 'yes'; then |
| 2905 | AC_DEFINE(WMF_DELEGATE,1,Define if you have wmf library) |
| 2906 | WMF_LIBS='-lwmf' |
| 2907 | LIBS="$WMF_LIBS $LIBS" |
| 2908 | have_wmf='yes' |
| 2909 | else |
| 2910 | AC_MSG_RESULT([no -- some components failed test]) |
| 2911 | have_wmf='no (failed tests)' |
| 2912 | have_wmflite='no (failed tests)' |
| 2913 | LIBS="$OLIBS" |
| 2914 | WMF_LIBS='' |
| 2915 | fi |
glennrp | 84cc1bd | 2011-08-24 14:01:52 +0000 | [diff] [blame] | 2916 | fi |
cristy | 03f7cf9 | 2011-12-15 01:40:41 +0000 | [diff] [blame] | 2917 | fi |
| 2918 | AC_MSG_CHECKING([if WMF package is complete]) |
| 2919 | if test "$have_wmf" = 'yes'; then |
| 2920 | AC_MSG_RESULT([yes]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2921 | else |
cristy | 03f7cf9 | 2011-12-15 01:40:41 +0000 | [diff] [blame] | 2922 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2923 | fi |
| 2924 | fi |
cristy | 03f7cf9 | 2011-12-15 01:40:41 +0000 | [diff] [blame] | 2925 | AM_CONDITIONAL(WMF_DELEGATE, test "$have_wmf" = 'yes') |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2926 | AC_SUBST(WMF_LIBS) |
cristy | 03f7cf9 | 2011-12-15 01:40:41 +0000 | [diff] [blame] | 2927 | AC_SUBST(WMF_LIBS_DEPS) |
cristy | 735e894 | 2010-04-02 20:32:57 +0000 | [diff] [blame] | 2928 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2929 | |
| 2930 | dnl =========================================================================== |
| 2931 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2932 | # |
| 2933 | # Check for XML delegate library. |
| 2934 | # |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2935 | AC_ARG_WITH([xml], |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2936 | [AC_HELP_STRING([--without-xml], |
| 2937 | [disable XML support])], |
| 2938 | [with_xml=$withval], |
cristy | fc3d022 | 2012-02-07 15:05:57 +0000 | [diff] [blame] | 2939 | [with_xml='yes']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2940 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2941 | if test "$with_xml" != 'yes' ; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2942 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-xml=$with_xml " |
| 2943 | fi |
| 2944 | |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2945 | have_xml='no' |
| 2946 | XML_LIBS='' |
| 2947 | if test "$with_xml" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2948 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2949 | AC_MSG_CHECKING([for XML]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2950 | AC_MSG_RESULT([]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2951 | PERSIST_LDFLAGS=$LDFLAGS |
| 2952 | PERSIST_CPPFLAGS=$CPPFLAGS |
| 2953 | xml2_config='' |
| 2954 | AC_PATH_PROG(xml2_config,xml2-config,)dnl |
| 2955 | if test -n "$xml2_config"; then |
| 2956 | # Debian installs libxml headers under /usr/include/libxml2/libxml with |
| 2957 | # the shared library installed under /usr/lib, whereas the package |
| 2958 | # installs itself under $prefix/libxml and $prefix/lib. |
| 2959 | xml2_prefix=`xml2-config --prefix` |
| 2960 | if test -d "${xml2_prefix}/include/libxml2"; then |
| 2961 | CPPFLAGS="$CPPFLAGS -I${xml2_prefix}/include/libxml2" |
| 2962 | fi |
| 2963 | if test "${xml2_prefix}" != '/usr'; then |
| 2964 | LDFLAGS="$LDFLAGS -L${xml2_prefix}/lib" |
| 2965 | fi |
| 2966 | fi |
| 2967 | failed=0 |
| 2968 | passed=0 |
| 2969 | AC_CHECK_HEADER(libxml/parser.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
| 2970 | AC_CHECK_LIB(xml2,xmlSAXVersion,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2971 | AC_CHECK_LIB(xml2,xmlParseChunk,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2972 | AC_CHECK_LIB(xml2,xmlCreatePushParserCtxt,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
| 2973 | AC_MSG_CHECKING([if XML package is complete]) |
| 2974 | if test $passed -gt 0; then |
| 2975 | if test $failed -gt 0; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2976 | AC_MSG_RESULT([no -- some components failed test]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2977 | have_xml='no (failed tests)' |
| 2978 | LDFLAGS="$PERSIST_LDFLAGS" |
| 2979 | CPPFLAGS="$PERSIST_CPPFLAGS" |
| 2980 | else |
| 2981 | XML_LIBS='-lxml2' |
| 2982 | LIBS="$XML_LIBS $LIBS" |
| 2983 | AC_DEFINE(XML_DELEGATE,1,Define if you have XML library) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2984 | AC_MSG_RESULT([yes]) |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2985 | have_xml='yes' |
| 2986 | fi |
| 2987 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 2988 | AC_MSG_RESULT([no]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2989 | fi |
| 2990 | fi |
cristy | 81beccd | 2011-10-03 18:17:24 +0000 | [diff] [blame] | 2991 | AM_CONDITIONAL(XML_DELEGATE,test "$have_xml" = 'yes') |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 2992 | AC_SUBST(XML_LIBS) |
| 2993 | |
| 2994 | dnl =========================================================================== |
| 2995 | |
| 2996 | # Substitute compiler name to build/link PerlMagick |
| 2997 | # |
| 2998 | AC_SUBST(PERLMAINCC) |
| 2999 | |
| 3000 | # |
| 3001 | # Configure install Paths |
| 3002 | # |
cristy | 7def36a | 2011-10-28 19:04:41 +0000 | [diff] [blame] | 3003 | |
cristy | 2a11bef | 2011-10-28 18:33:11 +0000 | [diff] [blame] | 3004 | # Path to ImageMagick header files |
cristy | bdabdd6 | 2013-03-04 17:43:36 +0000 | [diff] [blame] | 3005 | INCLUDE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}" |
cristy | e52f12f | 2012-12-31 15:32:36 +0000 | [diff] [blame] | 3006 | INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}" |
| 3007 | DEFINE_INCLUDE_PATH="${INCLUDE_DIR}/${INCLUDE_RELATIVE_PATH}/" |
cristy | 2a11bef | 2011-10-28 18:33:11 +0000 | [diff] [blame] | 3008 | case "${build_os}" in |
| 3009 | mingw* ) |
| 3010 | DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1` |
| 3011 | ;; |
| 3012 | esac |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3013 | AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick headers live.]) |
cristy | 2a11bef | 2011-10-28 18:33:11 +0000 | [diff] [blame] | 3014 | AC_SUBST(INCLUDE_PATH) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3015 | |
cristy | e52f12f | 2012-12-31 15:32:36 +0000 | [diff] [blame] | 3016 | # Path to ImageMagick header files (arch part) |
| 3017 | INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}" |
| 3018 | DEFINE_INCLUDEARCH_PATH="${INCLUDEARCH_DIR}/${INCLUDE_RELATIVE_PATH}/" |
| 3019 | case "${build_os}" in |
| 3020 | mingw* ) |
| 3021 | DEFINE_INCLUDEARCH_PATH=`$WinPathScript "$DEFINE_INCLUDEARCH_PATH" 1` |
| 3022 | ;; |
| 3023 | esac |
| 3024 | AC_DEFINE_UNQUOTED(INCLUDEARCH_PATH,"$DEFINE_INCLUDE_PATH",[Directory where ImageMagick architecture headers live.]) |
| 3025 | AC_SUBST(INCLUDEARCH_PATH) |
| 3026 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3027 | # Subdirectory under lib to place ImageMagick lib files |
| 3028 | LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}" |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3029 | AC_DEFINE_UNQUOTED(LIBRARY_RELATIVE_PATH,"$LIBRARY_RELATIVE_PATH",[Subdirectory of lib where ImageMagick architecture dependent files are installed.]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3030 | |
| 3031 | # Path to ImageMagick bin directory |
| 3032 | EXECUTABLE_PATH="${BIN_DIR}" |
| 3033 | DEFINE_EXECUTABLE_PATH="${BIN_DIR}/" |
| 3034 | case "${build_os}" in |
| 3035 | mingw* ) |
| 3036 | DEFINE_EXECUTABLE_PATH=`$WinPathScript "$DEFINE_EXECUTABLE_PATH" 1` |
| 3037 | ;; |
| 3038 | esac |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3039 | AC_DEFINE_UNQUOTED(EXECUTABLE_PATH,"$DEFINE_EXECUTABLE_PATH",[Directory where executables are installed.]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3040 | AC_SUBST(EXECUTABLE_PATH) |
| 3041 | |
| 3042 | # Path to ImageMagick lib |
| 3043 | LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}" |
| 3044 | DEFINE_LIBRARY_PATH="${LIB_DIR}/${LIBRARY_RELATIVE_PATH}/" |
| 3045 | case "${build_os}" in |
| 3046 | mingw* ) |
| 3047 | DEFINE_LIBRARY_PATH=`$WinPathScript "$DEFINE_LIBRARY_PATH" 1` |
| 3048 | ;; |
| 3049 | esac |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3050 | AC_DEFINE_UNQUOTED(LIBRARY_PATH,"$DEFINE_LIBRARY_PATH",[Directory where architecture-dependent files live.]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3051 | AC_SUBST(LIBRARY_PATH) |
| 3052 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3053 | # |
cristy | 8d0ff76 | 2013-03-10 20:33:28 +0000 | [diff] [blame] | 3054 | # path to local binaries |
| 3055 | if test "x$LIB_BIN_BASEDIRNAME" = "x"; then |
| 3056 | LIB_BIN_BASEDIRNAME="bin" |
| 3057 | fi |
| 3058 | AC_DEFINE_UNQUOTED(LIB_BIN_BASEDIRNAME,"$LIB_BIN_BASEDIRNAME",[Binaries in libraries path base name (will be during install linked to bin)]) |
| 3059 | AC_SUBST(LIB_BIN_BASEDIRNAME) |
| 3060 | |
| 3061 | if test "x$LIB_BIN_DIR" = "x"; then |
| 3062 | LIB_BIN_DIR=${LIB_BIN_BASEDIRNAME}-${MAGICK_ABI_SUFFIX} |
| 3063 | fi |
| 3064 | AC_SUBST(LIB_BIN_DIR) |
| 3065 | |
| 3066 | LIB_BIN_DIR_RELATIVE_PATH=$LIB_BIN_DIR |
| 3067 | AC_SUBST(LIB_BIN_DIR_RELATIVE_PATH) |
| 3068 | LIB_BIN_DIR_PATH="${LIBRARY_PATH}/${LIB_BIN_DIR_RELATIVE_PATH}" |
| 3069 | AC_SUBST(LIB_BIN_DIR_PATH) |
| 3070 | |
| 3071 | # |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3072 | # path to modules lib |
| 3073 | if test "x$MODULES_BASEDIRNAME" = "x"; then |
| 3074 | MODULES_BASEDIRNAME="modules" |
| 3075 | fi |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3076 | AC_DEFINE_UNQUOTED(MODULES_BASEDIRNAME,"$MODULES_BASEDIRNAME",[Module directory name without ABI part.]) |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3077 | AC_SUBST(MODULES_BASEDIRNAME) |
| 3078 | |
| 3079 | if test "x$MODULES_DIRNAME" = "x"; then |
cristy | 7a26abd | 2012-12-03 00:18:59 +0000 | [diff] [blame] | 3080 | MODULES_DIRNAME=${MODULES_BASEDIRNAME}-${MAGICK_ABI_SUFFIX} |
cristy | 4bdbd34 | 2012-12-03 18:41:18 +0000 | [diff] [blame] | 3081 | else |
| 3082 | AC_DEFINE_UNQUOTED(MODULES_DIRNAME,"$MODULES_DIRNAME",[Module directory dirname]) |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3083 | fi |
| 3084 | AC_SUBST(MODULES_DIRNAME) |
| 3085 | |
cristy | 371d481 | 2012-12-01 19:48:10 +0000 | [diff] [blame] | 3086 | MODULES_RELATIVE_PATH="${MODULES_DIRNAME}" |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3087 | AC_SUBST(MODULES_RELATIVE_PATH) |
| 3088 | MODULES_PATH="${LIBRARY_PATH}/${MODULES_RELATIVE_PATH}" |
| 3089 | AC_SUBST(MODULES_PATH) |
| 3090 | |
| 3091 | # |
| 3092 | # path to coders lib |
| 3093 | if test "x$CODER_DIRNAME" = "x"; then |
| 3094 | CODER_DIRNAME="coders" |
| 3095 | fi |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3096 | AC_DEFINE_UNQUOTED(CODER_DIRNAME,"$CODER_DIRNAME",[coders subdirectory.]) |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3097 | AC_SUBST(CODER_DIRNAME) |
| 3098 | |
cristy | 371d481 | 2012-12-01 19:48:10 +0000 | [diff] [blame] | 3099 | CODER_RELATIVE_PATH="${CODER_DIRNAME}" |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3100 | CODER_PATH="${MODULES_PATH}/${CODER_DIRNAME}" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3101 | AC_SUBST(CODER_PATH) |
| 3102 | |
| 3103 | # |
| 3104 | # Subdirectory under lib to place ImageMagick filter module files |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3105 | # |
| 3106 | # path to coders lib |
| 3107 | if test "x$FILTER_DIRNAME" = "x"; then |
| 3108 | FILTER_DIRNAME="filters" |
| 3109 | fi |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3110 | AC_DEFINE_UNQUOTED(FILTER_DIRNAME,"$FILTER_DIRNAME",[filter subdirectory.]) |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3111 | AC_SUBST(FILTER_DIRNAME) |
| 3112 | |
cristy | 371d481 | 2012-12-01 19:48:10 +0000 | [diff] [blame] | 3113 | FILTER_RELATIVE_PATH="${FILTER_DIRNAME}" |
cristy | 01ff9f3 | 2012-12-01 18:15:29 +0000 | [diff] [blame] | 3114 | FILTER_PATH="${MODULES_PATH}/${FILTER_DIRNAME}" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3115 | AC_SUBST(FILTER_PATH) |
| 3116 | |
| 3117 | # |
| 3118 | # Path to ImageMagick documentation files |
cristy | bdabdd6 | 2013-03-04 17:43:36 +0000 | [diff] [blame] | 3119 | DOCUMENTATION_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}" |
cristy | d55889c | 2011-03-27 00:50:24 +0000 | [diff] [blame] | 3120 | DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}" |
| 3121 | DEFINE_DOCUMENTATION_PATH="${DOC_DIR}/${DOCUMENTATION_RELATIVE_PATH}/" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3122 | case "${build_os}" in |
| 3123 | mingw* ) |
| 3124 | DEFINE_DOCUMENTATION_PATH=`$WinPathScript "$DEFINE_DOCUMENTATION_PATH" 1` |
| 3125 | ;; |
| 3126 | esac |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3127 | AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",[Directory where ImageMagick documents live.]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3128 | AC_SUBST(DOCUMENTATION_PATH) |
| 3129 | |
cristy | dd17feb | 2014-03-05 02:06:32 +0000 | [diff] [blame] | 3130 | # |
| 3131 | # Enable/Disable documentation |
| 3132 | AC_ARG_ENABLE([docs], |
| 3133 | [AS_HELP_STRING([--disable-docs], |
| 3134 | [disable building of documentation])], |
cristy | 0227231 | 2014-03-07 00:55:25 +0000 | [diff] [blame] | 3135 | wantdocs=$enableval, wantdocs=yes) |
| 3136 | AM_CONDITIONAL([INSTALL_DOC], [test "$wantdocs" = "yes"]) |
cristy | dd17feb | 2014-03-05 02:06:32 +0000 | [diff] [blame] | 3137 | |
cristy | 2a11bef | 2011-10-28 18:33:11 +0000 | [diff] [blame] | 3138 | # Subdirectory to place architecture-dependent configuration files |
cristy | bdabdd6 | 2013-03-04 17:43:36 +0000 | [diff] [blame] | 3139 | CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}" |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3140 | AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",[Subdirectory of lib where architecture-dependent configuration files live.]) |
cristy | 7def36a | 2011-10-28 19:04:41 +0000 | [diff] [blame] | 3141 | CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/" |
cristy | 29b1f6f | 2011-03-27 14:02:38 +0000 | [diff] [blame] | 3142 | DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/" |
| 3143 | case "${build_os}" in |
| 3144 | mingw* ) |
| 3145 | DEFINE_CONFIGURE_PATH=`$WinPathScript "$DEFINE_CONFIGURE_PATH" 1` |
| 3146 | ;; |
| 3147 | esac |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3148 | AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",[Directory where architecture-dependent configuration files live.]) |
cristy | 29b1f6f | 2011-03-27 14:02:38 +0000 | [diff] [blame] | 3149 | AC_SUBST(CONFIGURE_PATH) |
| 3150 | |
cristy | 2a11bef | 2011-10-28 18:33:11 +0000 | [diff] [blame] | 3151 | # Subdirectory to place architecture-independent configuration files |
cristy | bdabdd6 | 2013-03-04 17:43:36 +0000 | [diff] [blame] | 3152 | SHARE_RELATIVE_PATH="${PACKAGE_NAME}-${MAGICK_MAJOR_VERSION}" |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3153 | AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",[Subdirectory of lib where architecture-independent configuration files live.]) |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 3154 | SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}" |
cristy | 4f82071 | 2011-04-01 12:35:43 +0000 | [diff] [blame] | 3155 | DEFINE_SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}/" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3156 | case "${build_os}" in |
| 3157 | mingw* ) |
cristy | 4f82071 | 2011-04-01 12:35:43 +0000 | [diff] [blame] | 3158 | DEFINE_SHARE_PATH=`$WinPathScript "$DEFINE_SHARE_PATH" 1` |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3159 | ;; |
| 3160 | esac |
cristy | 9c151dc | 2012-12-02 22:30:16 +0000 | [diff] [blame] | 3161 | AC_DEFINE_UNQUOTED(SHARE_PATH,"$DEFINE_SHARE_PATH",[Directory where architecture-independent configuration files live.]) |
cristy | 4f82071 | 2011-04-01 12:35:43 +0000 | [diff] [blame] | 3162 | AC_SUBST(SHARE_PATH) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3163 | |
cristy | 23c7e9a | 2012-12-04 15:47:57 +0000 | [diff] [blame] | 3164 | # |
| 3165 | # Subdirectory to place architecture-dependent configuration files. |
| 3166 | if test "x$SHAREARCH_BASEDIRNAME" = "x"; then |
| 3167 | SHAREARCH_BASEDIRNAME="config" |
| 3168 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3169 | AC_DEFINE_UNQUOTED(SHAREARCH_BASEDIRNAME,"$SHAREARCH_BASEDIRNAME",[Sharearch directory name without ABI part.]) |
cristy | 23c7e9a | 2012-12-04 15:47:57 +0000 | [diff] [blame] | 3170 | AC_SUBST(SHAREARCH_BASEDIRNAME) |
| 3171 | |
| 3172 | if test "x$SHAREARCH_DIRNAME" = "x"; then |
| 3173 | SHAREARCH_DIRNAME=${SHAREARCH_BASEDIRNAME}-${MAGICK_ABI_SUFFIX} |
| 3174 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3175 | AC_DEFINE_UNQUOTED(SHAREARCH_DIRNAME,"$SHAREARCH_DIRNAME",[Sharearch directory dirname]) |
cristy | 23c7e9a | 2012-12-04 15:47:57 +0000 | [diff] [blame] | 3176 | fi |
| 3177 | AC_SUBST(SHAREARCH_DIRNAME) |
| 3178 | |
| 3179 | SHAREARCH_RELATIVE_PATH="${SHAREARCH_DIRNAME}" |
| 3180 | AC_SUBST(SHAREARCH_RELATIVE_PATH) |
| 3181 | SHAREARCH_PATH="${LIBRARY_PATH}/${SHAREARCH_RELATIVE_PATH}" |
cristy | 670aa3c | 2011-11-03 00:54:00 +0000 | [diff] [blame] | 3182 | AC_SUBST(SHAREARCH_PATH) |
| 3183 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3184 | # |
| 3185 | # program_transform_name is formed for use in a Makefile, so create a |
| 3186 | # modified version for use in a shell script. |
| 3187 | configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'` |
| 3188 | |
| 3189 | # Default delegate definitions |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3190 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3191 | AC_MSG_CHECKING([for ImageMagick delegate programs]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3192 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3193 | AutotraceDecodeDelegateDefault='autotrace' |
cristy | 3d7f806 | 2009-09-24 20:45:35 +0000 | [diff] [blame] | 3194 | BlenderDecodeDelegateDefault='blender' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3195 | BZIPDelegateDefault='bzip2' |
| 3196 | BrowseDelegateDefault='xdg-open' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3197 | CatDelegateDefault='cat' |
| 3198 | DNGDecodeDelegateDefault='ufraw-batch' |
cristy | 66f238e | 2014-05-16 12:21:48 +0000 | [diff] [blame] | 3199 | DOCDecodeDelegateDefault='soffice' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3200 | GVCDecodeDelegateDefault='dot' |
| 3201 | DVIDecodeDelegateDefault='dvips' |
| 3202 | EchoDelegateDefault='echo' |
| 3203 | EditorDelegateDefault='xterm' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3204 | ConvertDelegateDefault=`echo convert | sed ${configure_transform_name}` |
| 3205 | DisplayDelegateDefault=`echo display | sed ${configure_transform_name}` |
| 3206 | MogrifyDelegateDefault=`echo mogrify | sed ${configure_transform_name}` |
| 3207 | GnuplotDecodeDelegateDefault='gnuplot' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3208 | HPGLDecodeDelegateDefault='hp2xx' |
| 3209 | HTMLDecodeDelegateDefault='html2ps' |
| 3210 | ILBMDecodeDelegateDefault='ilbmtoppm' |
| 3211 | ILBMEncodeDelegateDefault='ppmtoilbm' |
cristy | 71f53d5 | 2013-04-27 13:33:59 +0000 | [diff] [blame] | 3212 | JXRDecodeDelegateDefault='JxrDecApp' |
| 3213 | JXREncodeDelegateDefault='JxrEncApp' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3214 | LPDelegateDefault='lp' |
| 3215 | LPRDelegateDefault='lpr' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3216 | LaunchDelegateDefault='gimp' |
| 3217 | MANDelegateDefault='groff' |
cristy | 81ab5af | 2013-10-06 18:28:39 +0000 | [diff] [blame] | 3218 | MPEGDecodeDelegateDefault='avconv' |
| 3219 | MPEGEncodeDelegateDefault='avconv' |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 3220 | MrSIDDecodeDelegateDefault='mrsidgeodecode' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3221 | MVDelegateDefault='mv' |
| 3222 | PCLDelegateDefault='pcl6' |
| 3223 | PGPDecodeDelegateDefault='pgpv' |
| 3224 | POVDelegateDefault='povray' |
| 3225 | if test "$native_win32_build" = 'yes'; then |
| 3226 | PSDelegateDefault='gswin32c' |
cristy | b7931f1 | 2009-09-25 10:22:21 +0000 | [diff] [blame] | 3227 | elif test "$gslib_framework" = 'yes'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3228 | PSDelegateDefault='gsc' |
| 3229 | else |
| 3230 | PSDelegateDefault='gs' |
| 3231 | fi |
| 3232 | RLEEncodeDelegateDefault='rawtorle' |
| 3233 | RMDelegateDefault='rm' |
cristy | 5281e32 | 2012-02-09 21:12:45 +0000 | [diff] [blame] | 3234 | RSVGDecodeDelegateDefault='rsvg-convert' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3235 | SCANDecodeDelegateDefault='scanimage' |
cristy | ec6934f | 2012-08-14 18:38:40 +0000 | [diff] [blame] | 3236 | SVGDecodeDelegateDefault='inkscape' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3237 | TXTDelegateDefault='enscript' |
cristy | 16db5ed | 2010-07-29 13:32:02 +0000 | [diff] [blame] | 3238 | UniconvertorDelegateDefault='uniconvertor' |
cristy | 86e8609 | 2013-08-04 17:43:57 +0000 | [diff] [blame] | 3239 | WebPDecodeDelegateDefault='dwebp' |
| 3240 | WebPEncodeDelegateDefault='cwebp' |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3241 | WMFDecodeDelegateDefault='wmf2eps' |
| 3242 | WWWDecodeDelegateDefault='curl' |
| 3243 | XPSDelegateDefault='gxps' |
| 3244 | ZipDelegateDefault='gzip' |
| 3245 | |
| 3246 | # Search for delegates |
| 3247 | AC_PATH_PROG(AutotraceDecodeDelegate, "$AutotraceDecodeDelegateDefault", "$AutotraceDecodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3248 | AC_PATH_PROG(BlenderDecodeDelegate, "$BlenderDecodeDelegateDefault", "$BlenderDecodeDelegateDefault") |
| 3249 | AC_PATH_PROG(BZIPDelegate, "$BZIPDelegateDefault", "$BZIPDelegateDefault") |
cristy | c59f0e7 | 2012-08-27 12:59:33 +0000 | [diff] [blame] | 3250 | AC_PATH_PROGS(BrowseDelegate, "$BrowseDelegateDefault" google-chrome firefox konqueror mozilla lynx, "$BrowseDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3251 | AC_PATH_PROG(CatDelegate, "$CatDelegateDefault", "$CatDelegateDefault") |
| 3252 | AC_PATH_PROG(DNGDecodeDelegate, "$DNGDecodeDelegateDefault", "$DNGDecodeDelegateDefault") |
cristy | 66f238e | 2014-05-16 12:21:48 +0000 | [diff] [blame] | 3253 | AC_PATH_PROG(DOCDecodeDelegate, "$DOCDecodeDelegateDefault", "$DOCDecodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3254 | AC_PATH_PROG(DVIDecodeDelegate, "$DVIDecodeDelegateDefault", "$DVIDecodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3255 | AC_PATH_PROG(ConvertDelegate, "$ConvertDelegateDefault", "$ConvertDelegateDefault") |
| 3256 | AC_PATH_PROG(DisplayDelegate, "$DisplayDelegateDefault", "$DisplayDelegateDefault") |
cristy | 66f238e | 2014-05-16 12:21:48 +0000 | [diff] [blame] | 3257 | AC_PATH_PROG(EchoDelegate, "$EchoDelegateDefault", "$EchoDelegateDefault") |
| 3258 | AC_PATH_PROG(EditorDelegate, "$EditorDelegateDefault", "$EditorDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3259 | AC_PATH_PROG(GnuplotDecodeDelegate, "$GnuplotDecodeDelegateDefault", "$GnuplotDecodeDelegateDefault") |
cristy | 66f238e | 2014-05-16 12:21:48 +0000 | [diff] [blame] | 3260 | AC_PATH_PROG(GVCDecodeDelegate, "$GVCDecodeDelegateDefault", "$GVCDecodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3261 | AC_PATH_PROG(HPGLDecodeDelegate, "$HPGLDecodeDelegateDefault", "$HPGLDecodeDelegateDefault") |
| 3262 | AC_PATH_PROG(HTMLDecodeDelegate, "$HTMLDecodeDelegateDefault", "$HTMLDecodeDelegateDefault") |
| 3263 | AC_PATH_PROG(ILBMDecodeDelegate, "$ILBMDecodeDelegateDefault", "$ILBMDecodeDelegateDefault") |
| 3264 | AC_PATH_PROG(ILBMEncodeDelegate, "$ILBMEncodeDelegateDefault", "$ILBMEncodeDelegateDefault") |
cristy | 71f53d5 | 2013-04-27 13:33:59 +0000 | [diff] [blame] | 3265 | AC_PATH_PROG(JXRDecodeDelegate, "$JXRDecodeDelegateDefault", "$JXRDecodeDelegateDefault") |
| 3266 | AC_PATH_PROG(JXREncodeDelegate, "$JXREncodeDelegateDefault", "$JXREncodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3267 | AC_PATH_PROG(LPDelegate, "$LPDelegateDefault", no) |
| 3268 | AC_PATH_PROG(LPRDelegate, "$LPRDelegateDefault", "$LPRDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3269 | AC_PATH_PROG(LaunchDelegate, "$LaunchDelegateDefault", "$LaunchDelegateDefault") |
| 3270 | AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault") |
cristy | 66f238e | 2014-05-16 12:21:48 +0000 | [diff] [blame] | 3271 | AC_PATH_PROG(MogrifyDelegate, "$MogrifyDelegateDefault", "$MogrifyDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3272 | AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault") |
cristy | 81ab5af | 2013-10-06 18:28:39 +0000 | [diff] [blame] | 3273 | if test "$MPEGDecodeDelegate" == "$MPEGDecodeDelegateDefault" ; then |
| 3274 | MPEGDecodeDelegateDefault='ffmpeg' |
| 3275 | AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault") |
| 3276 | fi; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3277 | AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault") |
cristy | 81ab5af | 2013-10-06 18:28:39 +0000 | [diff] [blame] | 3278 | if test "$MPEGEncodeDelegate" == "$MPEGEncodeDelegateDefault" ; then |
| 3279 | MPEGEncodeDelegateDefault='ffmpeg' |
| 3280 | AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault") |
| 3281 | fi; |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 3282 | AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3283 | AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault") |
| 3284 | AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault") |
| 3285 | AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault") |
| 3286 | AC_PATH_PROG(POVDelegate, "$POVDelegateDefault", "$POVDelegateDefault") |
| 3287 | AC_PATH_PROGS(PSDelegate, gsx gsc "$PSDelegateDefault", "$PSDelegateDefault") |
| 3288 | AC_PATH_PROG(RLEEncodeDelegate, "$RLEEncodeDelegateDefault", "$RLEEncodeDelegateDefault") |
| 3289 | AC_PATH_PROG(RMDelegate, "$RMDelegateDefault", "$RMDelegateDefault") |
cristy | 4689cf0 | 2010-02-17 21:15:45 +0000 | [diff] [blame] | 3290 | AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3291 | AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault") |
cristy | ec6934f | 2012-08-14 18:38:40 +0000 | [diff] [blame] | 3292 | AC_PATH_PROG(SVGDecodeDelegate, "$SVGDecodeDelegateDefault", "$SVGDecodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3293 | AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault") |
cristy | 5ac9ac8 | 2010-07-29 13:24:24 +0000 | [diff] [blame] | 3294 | AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault") |
cristy | 86e8609 | 2013-08-04 17:43:57 +0000 | [diff] [blame] | 3295 | AC_PATH_PROG(WebPDecodeDelegate, "$WebPDecodeDelegateDefault", "$WebPDecodeDelegateDefault") |
| 3296 | AC_PATH_PROG(WebPEncodeDelegate, "$WebPEncodeDelegateDefault", "$WebPEncodeDelegateDefault") |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3297 | AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault") |
| 3298 | AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault") |
| 3299 | AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault") |
| 3300 | AC_PATH_PROG(ZipDelegate, "$ZipDelegateDefault", "$ZipDelegateDefault") |
| 3301 | |
| 3302 | # Prefer lpr to lp; lp needs options tacked on. |
| 3303 | if test "$LPRDelegate" != no; then |
| 3304 | PrintDelegate="$LPRDelegate" |
| 3305 | else |
| 3306 | PrintDelegate="$LPDelegate -c -s" |
| 3307 | fi |
| 3308 | AC_SUBST(PrintDelegate) |
| 3309 | |
| 3310 | # Installed ImageMagick utiltity paths |
| 3311 | ConvertDelegate="${BIN_DIR}/${ConvertDelegateDefault}" |
| 3312 | DisplayDelegate="${BIN_DIR}/${DisplayDelegateDefault}" |
| 3313 | MogrifyDelegate="${BIN_DIR}/${MogrifyDelegateDefault}" |
| 3314 | |
| 3315 | # Set delegate booleans |
cristy | 81ab5af | 2013-10-06 18:28:39 +0000 | [diff] [blame] | 3316 | have_avconv='no'; if test "$MPEGDecodeDelegate" != "$MPEGDecodeDelegateDefault" ; then have_avconv='yes'; fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3317 | have_gs='no' ; if test "$PSDelegate" != "$PSDelegateDefault"; then have_gs='yes'; fi |
| 3318 | have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi |
| 3319 | have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 3320 | have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3321 | have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi |
| 3322 | have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3323 | have_xps='no' ; if test "$XPSDelegate" != "$XPSDelegateDefault"; then have_xps='yes'; fi |
| 3324 | |
| 3325 | # |
| 3326 | # Test for font directories |
| 3327 | # |
| 3328 | type_include_files='' |
| 3329 | |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 3330 | # Dejavu fonts. |
| 3331 | AC_MSG_CHECKING(for Dejavu fonts directory) |
| 3332 | dejavu_font_dir='' |
| 3333 | if test "${with_dejavu_font_dir}" != 'default'; then |
| 3334 | dejavu_font_dir="${with_dejavu_font_dir}/" |
| 3335 | else |
| 3336 | for font_dir in "${prefix}/share/dejavu/fonts/" '/usr/share/fonts/dejavu/'; do |
| 3337 | if test -f "${font_dir}DejaVuSerif.ttf"; then |
| 3338 | dejavu_font_dir="${font_dir}" |
| 3339 | break 1 |
| 3340 | fi |
| 3341 | done |
| 3342 | fi |
| 3343 | if test "${dejavu_font_dir}x" != 'x'; then |
| 3344 | type_include_files="${type_include_files} "'<include file="type-dejavu.xml" />' |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3345 | AC_MSG_RESULT([$dejavu_font_dir]) |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 3346 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3347 | AC_MSG_RESULT([not found!]); |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 3348 | fi |
| 3349 | AC_SUBST(dejavu_font_dir) |
| 3350 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3351 | # Windows |
| 3352 | windows_font_dir='' |
| 3353 | if test "$with_windows_font_dir" != "no" && test -n "$with_windows_font_dir"; then |
| 3354 | windows_font_dir="${with_windows_font_dir}/" |
| 3355 | fi |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 3356 | if test "${windows_font_dir}x" != 'x'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3357 | if test -f '/usr/X11R6/lib/X11/fonts/truetype/arial.ttf'; then |
| 3358 | windows_font_dir='/usr/X11R6/lib/X11/fonts/truetype/' |
| 3359 | fi |
| 3360 | if test -f '/usr/X11R7/lib/X11/fonts/truetype/arial.ttf'; then |
| 3361 | windows_font_dir='/usr/X11R7/lib/X11/fonts/truetype/' |
| 3362 | fi |
| 3363 | if test -f '/usr/share/fonts/msttcore/arial.ttf'; then |
| 3364 | windows_font_dir='/usr/share/fonts/msttcore/truetype/' |
| 3365 | fi |
| 3366 | fi |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 3367 | if test "${windows_font_dir}x" != 'x'; then |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3368 | type_include_files="$type_include_files "'<include file="type-windows.xml" />' |
| 3369 | fi |
| 3370 | AC_SUBST(windows_font_dir) |
| 3371 | |
| 3372 | # Ghostscript |
| 3373 | AC_MSG_CHECKING(for Ghostscript fonts directory) |
| 3374 | ghostscript_font_dir='' |
| 3375 | if test "${with_gs_font_dir}" != 'default'; then |
| 3376 | ghostscript_font_dir="${with_gs_font_dir}/" |
| 3377 | else |
| 3378 | if test "${native_win32_build}" = 'yes'; then |
| 3379 | # Native Windows Build |
| 3380 | for font_dir in "c:\\Program Files\\gs\\fonts\\" "c:\\Program Files \(x86\)\\gs\\fonts\\" "c:\\gs\\fonts\\"; do |
| 3381 | if test -f "${font_dir}a010013l.pfb"; then |
| 3382 | ghostscript_font_dir="$font_dir" |
| 3383 | break 1 |
| 3384 | fi |
| 3385 | done |
| 3386 | if test "${PSDelegate}" != 'gswin32c'; then |
| 3387 | ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\" |
| 3388 | fi |
| 3389 | else |
| 3390 | # Linux / Mac OS X / Unix Build |
| 3391 | 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 |
| 3392 | if test -f "${font_dir}a010013l.pfb"; then |
| 3393 | ghostscript_font_dir="${font_dir}" |
| 3394 | break 1 |
| 3395 | fi |
| 3396 | done |
| 3397 | if test "${ghostscript_font_dir}x" = 'x'; then |
| 3398 | if test "$PSDelegate" != 'gs'; then |
| 3399 | ghostscript_font_dir=`echo "$PSDelegate" | sed -e 's:/bin/gs:/share/ghostscript/fonts:'`"/" |
| 3400 | fi |
| 3401 | fi |
| 3402 | fi |
| 3403 | fi |
| 3404 | if test "${ghostscript_font_dir}x" != 'x'; then |
| 3405 | type_include_files="${type_include_files} "'<include file="type-ghostscript.xml" />' |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3406 | AC_MSG_RESULT([$ghostscript_font_dir]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3407 | else |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3408 | AC_MSG_RESULT([not found!]); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3409 | fi |
| 3410 | AC_SUBST(ghostscript_font_dir) |
| 3411 | case "${build_os}" in |
| 3412 | mingw* ) |
| 3413 | PSDelegate=`$WinPathScript "$PSDelegate" 1` |
| 3414 | ;; |
| 3415 | esac |
| 3416 | |
| 3417 | AC_SUBST(type_include_files) |
| 3418 | |
| 3419 | # |
| 3420 | # Handle case where user doesn't want frozen paths |
| 3421 | # |
| 3422 | if test "$with_frozenpaths" != 'yes'; then |
| 3423 | # Re-set delegate definitions to default (no paths) |
| 3424 | AutotraceDecodeDelegate="$AutotraceDecodeDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3425 | BlenderDecodeDelegate="$BlenderDecodeDelegateDefault" |
| 3426 | BZIPDelegate="$BZIPDelegateDefault" |
| 3427 | BrowseDelegate="$BrowseDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3428 | CatDelegate="$CatDelegateDefault" |
| 3429 | ConvertDelegate="$ConvertDelegateDefault" |
cristy | 71f53d5 | 2013-04-27 13:33:59 +0000 | [diff] [blame] | 3430 | DisplayDelegate="$DisplayDelegateDefault" |
| 3431 | DNGDecodeDelegate="$DNGDecodeDelegateDefault" |
cristy | 66f238e | 2014-05-16 12:21:48 +0000 | [diff] [blame] | 3432 | DOCDecodeDelegate="$DOCDecodeDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3433 | DVIDecodeDelegate="$DVIDecodeDelegateDefault" |
| 3434 | EchoDelegate="$EchoDelegateDefault" |
| 3435 | EditorDelegate="$EditorDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3436 | GnuplotDecodeDelegate="$GnuplotDecodeDelegateDefault" |
cristy | 71f53d5 | 2013-04-27 13:33:59 +0000 | [diff] [blame] | 3437 | GVCDecodeDelegate="$GVCDecodeDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3438 | HPGLDecodeDelegate="$HPGLDecodeDelegateDefault" |
| 3439 | HTMLDecodeDelegate="$HTMLDecodeDelegateDefault" |
| 3440 | ILBMDecodeDelegate="$ILBMDecodeDelegateDefault" |
| 3441 | ILBMEncodeDelegate="$ILBMEncodeDelegateDefault" |
cristy | 71f53d5 | 2013-04-27 13:33:59 +0000 | [diff] [blame] | 3442 | JXRDecodeDelegate="$JXRDecodeDelegateDefault" |
| 3443 | JXREncodeDelegate="$JXREncodeDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3444 | LPDelegate="$LPDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3445 | LaunchDelegate="$LaunchDelegateDefault" |
| 3446 | MANDelegate="$MANDelegateDefault" |
| 3447 | MPEGDecodeDelegate="$MPEGDecodeDelegateDefault" |
| 3448 | MPEGEncodeDelegate="$MPEGEncodeDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3449 | MogrifyDelegate="$MogrifyDelegateDefault" |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 3450 | MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault" |
| 3451 | MVDelegate="$MVDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3452 | PCLDelegate="$PCLDelegateDefault" |
| 3453 | PGPDecodeDelegate="$PGPDecodeDelegateDefault" |
| 3454 | POVDelegate="$POVDelegateDefault" |
| 3455 | PSDelegate="$PSDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3456 | RLEEncodeDelegate="$RLEEncodeDelegateDefault" |
| 3457 | RMDelegate="$RMDelegateDefault" |
cristy | 4689cf0 | 2010-02-17 21:15:45 +0000 | [diff] [blame] | 3458 | RSVGDecodeDelegate="$RSVGDecodeDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3459 | SCANDecodeDelegate="$SCANDecodeDelegateDefault" |
cristy | ec6934f | 2012-08-14 18:38:40 +0000 | [diff] [blame] | 3460 | SVGDecodeDelegate="$SVGDecodeDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3461 | ShowImageDelegate="$ShowImageDelegateDefault" |
| 3462 | TXTDelegate="$TXTDelegateDefault" |
cristy | 5ac9ac8 | 2010-07-29 13:24:24 +0000 | [diff] [blame] | 3463 | UniconvertorDelegate="$UniconvertorDelegateDefault" |
cristy | 86e8609 | 2013-08-04 17:43:57 +0000 | [diff] [blame] | 3464 | WebPDecodeDelegate="$WebPDecodeDelegateDefault" |
| 3465 | WebPEncodeDelegate="$WebPEncodeDelegateDefault" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3466 | WMFDecodeDelegate="$WMFDecodeDelegateDefault" |
| 3467 | WWWDecodeDelegate="$WWWDecodeDelegateDefault" |
| 3468 | XPSDelegate="$XPSDelegateDefault" |
| 3469 | ZipDelegate="$ZipDelegateDefault" |
| 3470 | fi |
| 3471 | |
| 3472 | # Delegate substitutions |
| 3473 | AC_SUBST(AutotraceDecodeDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3474 | AC_SUBST(BlenderDecodeDelegate) |
| 3475 | AC_SUBST(BZIPDelegate) |
| 3476 | AC_SUBST(BrowseDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3477 | AC_SUBST(CatDelegate) |
| 3478 | AC_SUBST(ConvertDelegate) |
| 3479 | AC_SUBST(GVCDecodeDelegate) |
| 3480 | AC_SUBST(DVIDecodeDelegate) |
| 3481 | AC_SUBST(EchoDelegate) |
| 3482 | AC_SUBST(EditorDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3483 | AC_SUBST(GnuplotDecodeDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3484 | AC_SUBST(HPGLDecodeDelegate) |
| 3485 | AC_SUBST(HTMLDecodeDelegate) |
| 3486 | AC_SUBST(ILBMDecodeDelegate) |
| 3487 | AC_SUBST(ILBMEncodeDelegate) |
cristy | 71f53d5 | 2013-04-27 13:33:59 +0000 | [diff] [blame] | 3488 | AC_SUBST(JXRDecodeDelegate) |
| 3489 | AC_SUBST(JXREncodeDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3490 | AC_SUBST(LPDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3491 | AC_SUBST(LaunchDelegate) |
| 3492 | AC_SUBST(MANDelegate) |
| 3493 | AC_SUBST(MPEGDecodeDelegate) |
| 3494 | AC_SUBST(MPEGEncodeDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3495 | AC_SUBST(MogrifyDelegate) |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 3496 | AC_SUBST(MrSIDDecodeDelegate) |
| 3497 | AC_SUBST(MVDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3498 | AC_SUBST(PCLDelegate) |
| 3499 | AC_SUBST(PGPDecodeDelegate) |
| 3500 | AC_SUBST(POVDelegate) |
| 3501 | AC_SUBST(PSDelegate) |
| 3502 | AC_SUBST(RLEEncodeDelegate) |
| 3503 | AC_SUBST(RMDelegate) |
| 3504 | AC_SUBST(SCANDecodeDelegate) |
| 3505 | AC_SUBST(ShowImageDelegate) |
| 3506 | AC_SUBST(TXTDelegate) |
cristy | 5ac9ac8 | 2010-07-29 13:24:24 +0000 | [diff] [blame] | 3507 | AC_SUBST(UniconvertorDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3508 | AC_SUBST(WMFDecodeDelegate) |
cristy | 86e8609 | 2013-08-04 17:43:57 +0000 | [diff] [blame] | 3509 | AC_SUBST(WebPDecodeDelegate) |
| 3510 | AC_SUBST(WebPEncodeDelegate) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3511 | AC_SUBST(WWWDecodeDelegate) |
| 3512 | AC_SUBST(XPSDelegate) |
| 3513 | AC_SUBST(ZipDelegate) |
| 3514 | |
| 3515 | # |
| 3516 | # RPM support. |
| 3517 | # |
| 3518 | RPM='' |
| 3519 | AC_CHECK_PROGS(TAR,gnutar gtar tar) |
| 3520 | AC_CHECK_PROGS(PERL,perl) |
| 3521 | AC_CHECK_PROGS(RPM,rpmbuild rpm) |
| 3522 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
| 3523 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
| 3524 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
| 3525 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
| 3526 | AC_SUBST(RPM) |
| 3527 | AM_CONDITIONAL(RPM_DELEGATE, test "x$RPM" != "x" ) |
| 3528 | |
| 3529 | # |
| 3530 | # 7ZIP support (http://p7zip.sourceforge.net/) |
| 3531 | # |
| 3532 | P7ZIP='' |
| 3533 | AC_CHECK_PROGS(P7ZIP,[7za]) |
| 3534 | AC_SUBST(P7ZIP) |
| 3535 | AM_CONDITIONAL(P7ZIP_DELEGATE, test "x$P7ZIP" != "x" ) |
| 3536 | |
| 3537 | # |
| 3538 | # ZIP support (http://www.info-zip.org/Zip.html) |
| 3539 | # |
| 3540 | ZIP='' |
| 3541 | AC_CHECK_PROGS(ZIP,[zip]) |
| 3542 | AC_SUBST(ZIP) |
| 3543 | AM_CONDITIONAL(ZIP_DELEGATE, test "x$ZIP" != "x" ) |
| 3544 | |
| 3545 | # |
| 3546 | # GhostPCL related configuration. |
| 3547 | # |
| 3548 | PCLColorDevice=ppmraw |
cristy | 8bc8408 | 2011-09-07 13:57:00 +0000 | [diff] [blame] | 3549 | PCLCMYKDevice=pamcmyk32 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3550 | PCLMonoDevice=pbmraw |
| 3551 | if test -z "$PCLVersion"; then |
| 3552 | PCLVersion='unknown' |
| 3553 | fi |
| 3554 | if test $have_pcl = 'yes'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3555 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3556 | AC_MSG_CHECKING([for PCL]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3557 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3558 | # PCLColorDevice |
| 3559 | AC_MSG_CHECKING([for pcl color device]) |
| 3560 | if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3561 | : |
| 3562 | else |
| 3563 | PCLColorDevice=ppmraw |
| 3564 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3565 | AC_MSG_RESULT([$PCLColorDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3566 | |
| 3567 | # PCLCMYKDevice |
| 3568 | AC_MSG_CHECKING([for pcl CMYK device]) |
| 3569 | if $PCLDelegate -dBATCH -sDEVICE=$PCLColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3570 | : |
| 3571 | else |
| 3572 | PCLCMYKDevice=$PCLColorDevice |
| 3573 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3574 | AC_MSG_RESULT([$PCLCMYKDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3575 | |
| 3576 | # PCLMonoDevice |
| 3577 | AC_MSG_CHECKING([for pcl mono device]) |
| 3578 | if $PCLDelegate -dBATCH -sDEVICE=$PCLMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3579 | : |
| 3580 | else |
| 3581 | PCLMonoDevice=$PCLColorDevice |
| 3582 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3583 | AC_MSG_RESULT([$PCLMonoDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3584 | fi |
| 3585 | |
| 3586 | AC_SUBST(PCLMonoDevice) |
| 3587 | AC_SUBST(PCLColorDevice) |
| 3588 | AC_SUBST(PCLCMYKDevice) |
| 3589 | AC_SUBST(PCLVersion) |
| 3590 | |
| 3591 | # |
| 3592 | # GhostXPS related configuration. |
| 3593 | # |
| 3594 | XPSColorDevice=ppmraw |
| 3595 | XPSCMYKDevice=bmpsep8 |
| 3596 | XPSMonoDevice=pbmraw |
| 3597 | if test -z "$XPSVersion"; then |
| 3598 | XPSVersion='unknown' |
| 3599 | fi |
| 3600 | if test $have_xps = 'yes'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3601 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3602 | AC_MSG_CHECKING([for XPS]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3603 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3604 | # XPSColorDevice |
| 3605 | AC_MSG_CHECKING([for xps color device]) |
| 3606 | if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3607 | : |
| 3608 | else |
| 3609 | XPSColorDevice=ppmraw |
| 3610 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3611 | AC_MSG_RESULT([$XPSColorDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3612 | |
| 3613 | # XPSCMYKDevice |
| 3614 | AC_MSG_CHECKING([for xps CMYK device]) |
| 3615 | if $XPSDelegate -dBATCH -sDEVICE=$XPSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3616 | : |
| 3617 | else |
| 3618 | XPSCMYKDevice=$XPSColorDevice |
| 3619 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3620 | AC_MSG_RESULT([$XPSCMYKDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3621 | |
| 3622 | # XPSMonoDevice |
| 3623 | AC_MSG_CHECKING([for xps mono device]) |
| 3624 | if $XPSDelegate -dBATCH -sDEVICE=$XPSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3625 | : |
| 3626 | else |
| 3627 | XPSMonoDevice=$XPSColorDevice |
| 3628 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3629 | AC_MSG_RESULT([$XPSMonoDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3630 | fi |
| 3631 | |
| 3632 | AC_SUBST(XPSMonoDevice) |
| 3633 | AC_SUBST(XPSColorDevice) |
| 3634 | AC_SUBST(XPSCMYKDevice) |
| 3635 | AC_SUBST(XPSVersion) |
| 3636 | |
| 3637 | # |
| 3638 | # Ghostscript related configuration. |
| 3639 | # |
cristy | a97426c | 2011-02-04 01:41:27 +0000 | [diff] [blame] | 3640 | GSAlphaDevice=pngalpha |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3641 | GSColorDevice=pnmraw |
| 3642 | GSCMYKDevice=pam |
| 3643 | GSMonoDevice=pbmraw |
| 3644 | GSPDFDevice=pdfwrite |
cristy | b096ea5 | 2013-10-26 20:56:38 +0000 | [diff] [blame] | 3645 | GSPSDevice=ps2write |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3646 | GSEPSDevice=epswrite |
| 3647 | GSVersion='unknown' |
| 3648 | if test $have_gs = 'yes'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3649 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3650 | AC_MSG_CHECKING([for Ghostscript]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3651 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3652 | AC_MSG_CHECKING([for Ghostscript version]) |
| 3653 | if GSVersion=`$PSDelegate --version`; then |
| 3654 | : |
| 3655 | else |
| 3656 | GSVersion=`$PSDelegate --help | sed -e '1q' | awk '{ print $3 }'` |
| 3657 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3658 | AC_MSG_RESULT([$GSVersion]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3659 | |
| 3660 | # GSAlphaDevice |
| 3661 | AC_MSG_CHECKING([for gs alpha device]) |
| 3662 | if $PSDelegate -q -dBATCH -sDEVICE=$GSAlphaDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3663 | : |
| 3664 | else |
| 3665 | GSAlphaDevice=pnmraw |
| 3666 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3667 | AC_MSG_RESULT([$GSAlphaDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3668 | |
| 3669 | # GSColorDevice |
| 3670 | AC_MSG_CHECKING([for gs color device]) |
| 3671 | if $PSDelegate -q -dBATCH -sDEVICE=$GSColorDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3672 | : |
| 3673 | else |
| 3674 | GSColorDevice=pnmraw |
| 3675 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3676 | AC_MSG_RESULT([$GSColorDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3677 | |
| 3678 | # GSCMYKDevice |
| 3679 | AC_MSG_CHECKING([for gs CMYK device]) |
| 3680 | if $PSDelegate -q -dBATCH -sDEVICE=$GSCMYKDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3681 | : |
| 3682 | else |
| 3683 | GSCMYKDevice=bmpsep8 |
| 3684 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3685 | AC_MSG_RESULT([$GSCMYKDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3686 | |
| 3687 | # GSMonoDevice |
| 3688 | AC_MSG_CHECKING([for gs mono device]) |
| 3689 | if $PSDelegate -q -dBATCH -sDEVICE=$GSMonoDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3690 | : |
| 3691 | else |
| 3692 | GSMonoDevice=$GSColorDevice |
| 3693 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3694 | AC_MSG_RESULT([$GSMonoDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3695 | |
| 3696 | # GSPDFDevice |
| 3697 | AC_MSG_CHECKING([for gs PDF writing device]) |
| 3698 | if $PSDelegate -q -dBATCH -sDEVICE=$GSPDFDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3699 | : |
| 3700 | else |
| 3701 | GSPDFDevice=nodevice |
| 3702 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3703 | AC_MSG_RESULT([$GSPDFDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3704 | |
| 3705 | # GSPSDevice |
| 3706 | AC_MSG_CHECKING([for gs PS writing device]) |
| 3707 | if $PSDelegate -q -dBATCH -sDEVICE=$GSPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3708 | : |
| 3709 | else |
| 3710 | GSPSDevice=nodevice |
| 3711 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3712 | AC_MSG_RESULT([$GSPSDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3713 | |
| 3714 | # GSEPSDevice |
| 3715 | AC_MSG_CHECKING([for gs EPS writing device]) |
| 3716 | if $PSDelegate -q -dBATCH -sDEVICE=$GSEPSDevice -sOutputFile=/dev/null < /dev/null 2> /dev/null; then |
| 3717 | : |
| 3718 | else |
| 3719 | GSEPSDevice=nodevice |
| 3720 | fi |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3721 | AC_MSG_RESULT([$GSEPSDevice]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3722 | fi |
| 3723 | |
| 3724 | AC_SUBST(GSAlphaDevice) |
| 3725 | AC_SUBST(GSCMYKDevice) |
| 3726 | AC_SUBST(GSColorDevice) |
| 3727 | AC_SUBST(GSEPSDevice) |
| 3728 | AC_SUBST(GSMonoDevice) |
| 3729 | AC_SUBST(GSPDFDevice) |
| 3730 | AC_SUBST(GSPSDevice) |
| 3731 | AC_SUBST(GSVersion) |
| 3732 | |
| 3733 | # |
| 3734 | # PerlMagick-related configuration |
| 3735 | # |
| 3736 | |
| 3737 | # Look for PERL if PerlMagick requested |
| 3738 | # If name/path of desired PERL interpreter is specified, look for that one first |
| 3739 | have_perl='no' |
| 3740 | if test "$with_perl" != 'no'; then |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3741 | AC_MSG_RESULT([-------------------------------------------------------------]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3742 | AC_MSG_CHECKING([for Perl]) |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3743 | AC_MSG_RESULT([]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3744 | if test "$with_perl" != 'yes'; then |
| 3745 | AC_CACHE_CHECK(for perl,ac_cv_path_PERL,ac_cv_path_PERL="$with_perl"); |
| 3746 | PERL=$ac_cv_path_PERL |
| 3747 | AC_SUBST(PERL)dnl |
| 3748 | have_perl="$ac_cv_path_PERL" |
| 3749 | else |
| 3750 | AC_PATH_PROGS(PERL,perl perl5,)dnl |
| 3751 | if test "$ac_cv_path_PERL"; then |
| 3752 | have_perl="$ac_cv_path_PERL" |
| 3753 | fi |
| 3754 | fi |
| 3755 | fi |
| 3756 | |
cristy | 949301e | 2010-01-06 01:38:40 +0000 | [diff] [blame] | 3757 | if test "$with_perl" != 'yes' ; then |
| 3758 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-perl=$with_perl " |
| 3759 | fi |
| 3760 | |
| 3761 | PERL_SUPPORTS_DESTDIR='no' |
| 3762 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3763 | with_perl_static='no' |
| 3764 | with_perl_dynamic='no' |
| 3765 | if test "$have_perl" != 'no'; then |
| 3766 | if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'; then |
| 3767 | with_perl_static='yes' |
| 3768 | fi |
| 3769 | if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'; then |
| 3770 | with_perl_dynamic='yes' |
| 3771 | fi |
| 3772 | # Is PERL's MakeMaker new enough to support DESTDIR? |
cristy | 964cb7f | 2010-04-25 23:18:00 +0000 | [diff] [blame] | 3773 | AX_PROG_PERL_VERSION(5.8.1,[PERL_SUPPORTS_DESTDIR='yes'],[PERL_SUPPORTS_DESTDIR='no']) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3774 | fi |
| 3775 | AM_CONDITIONAL(WITH_PERL, test "$have_perl" != 'no') |
| 3776 | AM_CONDITIONAL(WITH_PERL_STATIC, test $with_perl_static = 'yes') |
| 3777 | AM_CONDITIONAL(WITH_PERL_DYNAMIC, test $with_perl_dynamic = 'yes') |
| 3778 | AC_SUBST(PERL_SUPPORTS_DESTDIR) |
| 3779 | |
| 3780 | # Determine path to pick up MagickCore library from for use with building PerlMagick |
| 3781 | MAGICKCORE_PATH="${LIB_DIR}" |
| 3782 | if test $with_perl_static = 'yes'; then |
| 3783 | # Find out where libtool hides its uninstalled libraries (as libtool_objdir) |
| 3784 | libtool_objdir=$objdir |
| 3785 | |
| 3786 | # Linker search path to library, followed by -lMagickCore |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 3787 | MAGICKCORE_PATH="${builddir}/MagickCore/${libtool_objdir}" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3788 | fi |
| 3789 | AC_SUBST(MAGICKCORE_PATH) |
| 3790 | |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3791 | # Create a simple string containing format names for all delegate libraries. |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3792 | MAGICK_DELEGATES='' |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3793 | if test "$have_autotrace" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3794 | MAGICK_DELEGATES="$MAGICK_DELEGATES autotrace" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3795 | fi |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3796 | if test "$have_bzlib" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3797 | MAGICK_DELEGATES="$MAGICK_DELEGATES bzlib" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3798 | fi |
| 3799 | if test "$have_dps" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3800 | MAGICK_DELEGATES="$MAGICK_DELEGATES dps" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3801 | fi |
| 3802 | if test "$have_djvu" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3803 | MAGICK_DELEGATES="$MAGICK_DELEGATES djvu" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3804 | fi |
cristy | 81ab5af | 2013-10-06 18:28:39 +0000 | [diff] [blame] | 3805 | if test "$have_avconv" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3806 | MAGICK_DELEGATES="$MAGICK_DELEGATES mpeg" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3807 | fi |
| 3808 | if test "$have_fftw" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3809 | MAGICK_DELEGATES="$MAGICK_DELEGATES fftw" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3810 | fi |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3811 | if test "$have_fpx" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3812 | MAGICK_DELEGATES="$MAGICK_DELEGATES fpx" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3813 | fi |
| 3814 | if test "$have_fontconfig" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3815 | MAGICK_DELEGATES="$MAGICK_DELEGATES fontconfig" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3816 | fi |
| 3817 | if test "$have_freetype" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3818 | MAGICK_DELEGATES="$MAGICK_DELEGATES freetype" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3819 | fi |
| 3820 | if test "$have_gslib" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3821 | MAGICK_DELEGATES="$MAGICK_DELEGATES gslib" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3822 | fi |
| 3823 | if test "$have_jbig" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3824 | MAGICK_DELEGATES="$MAGICK_DELEGATES jbig" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3825 | fi |
| 3826 | if test "$have_png$have_jpeg" = 'yesyes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3827 | MAGICK_DELEGATES="$MAGICK_DELEGATES jng" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3828 | fi |
| 3829 | if test "$have_jp2" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3830 | MAGICK_DELEGATES="$MAGICK_DELEGATES jp2" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3831 | fi |
| 3832 | if test "$have_jpeg" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3833 | MAGICK_DELEGATES="$MAGICK_DELEGATES jpeg" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3834 | fi |
| 3835 | if test "$have_lcms" = 'yes' || test "$have_lcms2" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3836 | MAGICK_DELEGATES="$MAGICK_DELEGATES lcms" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3837 | fi |
| 3838 | if test "$have_lqr" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3839 | MAGICK_DELEGATES="$MAGICK_DELEGATES lqr" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3840 | fi |
| 3841 | if test "$have_lzma" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3842 | MAGICK_DELEGATES="$MAGICK_DELEGATES lzma" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3843 | fi |
| 3844 | if test "$have_openexr" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3845 | MAGICK_DELEGATES="$MAGICK_DELEGATES openexr" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3846 | fi |
cristy | 99db387 | 2014-01-01 15:11:34 +0000 | [diff] [blame] | 3847 | if test "$have_openjp2" = 'yes' ; then |
| 3848 | MAGICK_DELEGATES="$MAGICK_DELEGATES openjp2" |
cristy | 3fe0945 | 2014-01-01 12:29:14 +0000 | [diff] [blame] | 3849 | fi |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3850 | if test "$have_pango" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3851 | MAGICK_DELEGATES="$MAGICK_DELEGATES pango" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3852 | fi |
| 3853 | if test "$have_png" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3854 | MAGICK_DELEGATES="$MAGICK_DELEGATES png" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3855 | fi |
| 3856 | have_ps='no' |
| 3857 | if test "$have_dps" = 'yes' || \ |
| 3858 | test "$have_gs" = 'yes' || \ |
| 3859 | test "${native_win32_build}" = 'yes' ; then |
| 3860 | have_ps='yes' |
| 3861 | fi |
| 3862 | if test "$have_ps" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3863 | MAGICK_DELEGATES="$MAGICK_DELEGATES ps" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3864 | fi |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3865 | if test "$have_ra_ppm" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3866 | MAGICK_DELEGATES="$MAGICK_DELEGATES rad" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3867 | fi |
| 3868 | if test "$have_rsvg" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3869 | MAGICK_DELEGATES="$MAGICK_DELEGATES rsvg" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3870 | fi |
| 3871 | if test "$have_tiff" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3872 | MAGICK_DELEGATES="$MAGICK_DELEGATES tiff" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3873 | fi |
| 3874 | if test "$have_ttf" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3875 | MAGICK_DELEGATES="$MAGICK_DELEGATES ttf" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3876 | fi |
cristy | 3b640ed | 2013-07-29 00:27:59 +0000 | [diff] [blame] | 3877 | if test "$have_webp" = 'yes' ; then |
| 3878 | MAGICK_DELEGATES="$MAGICK_DELEGATES webp" |
| 3879 | fi |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3880 | if test "$have_wmf" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3881 | MAGICK_DELEGATES="$MAGICK_DELEGATES wmf" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3882 | fi |
| 3883 | if test "$have_x" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3884 | MAGICK_DELEGATES="$MAGICK_DELEGATES x" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3885 | fi |
| 3886 | if test "$have_xml" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3887 | MAGICK_DELEGATES="$MAGICK_DELEGATES xml" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3888 | fi |
| 3889 | if test "$have_zlib" = 'yes' ; then |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3890 | MAGICK_DELEGATES="$MAGICK_DELEGATES zlib" |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3891 | fi |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3892 | # Remove extraneous spaces from output variables (asthetic) |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3893 | MAGICK_DELEGATES=`echo $MAGICK_DELEGATES | sed -e 's/ */ /g'` |
cristy | 2a3eb39 | 2012-12-17 13:39:20 +0000 | [diff] [blame] | 3894 | MAGICK_FEATURES=`echo $MAGICK_FEATURES | sed -e 's/ */ /g'` |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 3895 | AC_SUBST(MAGICK_DELEGATES) |
cristy | fa16118 | 2012-12-19 15:45:28 +0000 | [diff] [blame] | 3896 | AC_SUBST(MAGICK_FEATURES) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3897 | |
| 3898 | # |
| 3899 | # Handle special compiler flags |
| 3900 | # |
| 3901 | |
| 3902 | # Add '-p' if prof source profiling support enabled |
| 3903 | if test "$enable_prof" = 'yes'; then |
| 3904 | CFLAGS="-p $CFLAGS" |
| 3905 | CXXFLAGS="-p $CXXFLAGS" |
| 3906 | LDFLAGS="-p $LDFLAGS" |
| 3907 | fi |
| 3908 | |
| 3909 | # Add '-pg' if gprof source profiling support enabled |
| 3910 | if test "$enable_gprof" = 'yes'; then |
| 3911 | CFLAGS="-pg $CFLAGS" |
| 3912 | CXXFLAGS="-pg $CXXFLAGS" |
| 3913 | LDFLAGS="-pg $LDFLAGS" |
| 3914 | fi |
| 3915 | |
| 3916 | # Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled |
| 3917 | # This is a gcc-specific feature |
| 3918 | if test "$enable_gcov" = 'yes'; then |
| 3919 | AC_CHECK_LIB(gcov,_gcov_init) |
| 3920 | AC_CHECK_LIB(gcov,__gcov_init) |
| 3921 | case "$target_os" in |
| 3922 | darwin*) |
| 3923 | OSX_GCOV_LDFLAG="-Wl,-single_module" |
| 3924 | ;; |
| 3925 | *) |
| 3926 | OSX_GCOV_LDFLAG="" |
| 3927 | ;; |
| 3928 | esac |
| 3929 | AC_SUBST(OSX_GCOV_LDFLAG) |
| 3930 | CFLAGS="-ftest-coverage -fprofile-arcs $CFLAGS" |
| 3931 | CXXFLAGS="-ftest-coverage -fprofile-arcs $CXXFLAGS" |
| 3932 | LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS" |
| 3933 | fi |
| 3934 | |
| 3935 | # |
| 3936 | # Build library dependency list for libMagickCore |
| 3937 | # |
| 3938 | |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 3939 | if test "$build_modules" != 'no'; then |
cristy | 5e2e238 | 2014-04-20 02:06:01 +0000 | [diff] [blame] | 3940 | MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_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 $THREAD_LIBS" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3941 | else |
cristy | 5e2e238 | 2014-04-20 02:06:01 +0000 | [diff] [blame] | 3942 | MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $OPENJPEG_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3943 | fi |
| 3944 | AC_SUBST(MAGICK_DEP_LIBS) |
| 3945 | |
| 3946 | # |
| 3947 | # Remove extraneous spaces from output variables (asthetic) |
| 3948 | # |
| 3949 | X_CFLAGS=`echo $X_CFLAGS | sed -e 's/ */ /g'` |
| 3950 | X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/ */ /g'` |
| 3951 | X_LIBS=`echo $X_LIBS | sed -e 's/ */ /g'` |
| 3952 | X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/ */ /g'` |
| 3953 | |
| 3954 | CC=`echo $CC | sed -e 's/ */ /g'` |
| 3955 | CFLAGS=`echo $CFLAGS | sed -e 's/ */ /g'` |
| 3956 | CPPFLAGS=`echo $CPPFLAGS | sed -e 's/ */ /g'` |
| 3957 | CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ */ /g'` |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3958 | DISTCHECK_CONFIG_FLAGS=`echo $DISTCHECK_CONFIG_FLAGS | sed -e 's/ */ /g'` |
| 3959 | LDFLAGS=`echo $LDFLAGS | sed -e 's/ */ /g'` |
| 3960 | TESTED_LIBS=`echo $LIBS | sed -e 's/ */ /g'` |
| 3961 | MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'` |
| 3962 | #LIBS=`echo $LIBS | sed -e 's/ */ /g'` |
| 3963 | |
| 3964 | # Pass only user-provided LIBS as "global" libraries |
| 3965 | LIBS=$USER_LIBS |
| 3966 | |
| 3967 | #AC_SUBST(CPPFLAGS) |
| 3968 | AC_SUBST(X_CFLAGS) |
| 3969 | #AC_SUBST(LDFLAGS) |
| 3970 | #AC_SUBST(X_PRE_LIBS) |
| 3971 | #AC_SUBST(X_LIBS) |
| 3972 | #AC_SUBST(X_EXTRA_LIBS) |
| 3973 | |
| 3974 | MAGICK_CFLAGS=$CFLAGS |
| 3975 | MAGICK_CXXFLAGS="$CXXFLAGS" |
| 3976 | MAGICK_CPPFLAGS=`echo $MAGICK_CPPFLAGS | sed -e 's/ */ /g'` |
| 3977 | MAGICK_PCFLAGS=`echo $MAGICK_PCFLAGS | sed -e 's/ */ /g'` |
| 3978 | MAGICK_LDFLAGS="-L$LIB_DIR $LDFLAGS" |
cristy | d4ef612 | 2013-10-17 15:00:03 +0000 | [diff] [blame] | 3979 | MAGICK_LIBS="$MAGICK_DEP_LIBS" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3980 | |
| 3981 | AC_SUBST(MAGICK_CFLAGS) |
| 3982 | AC_SUBST(MAGICK_CXXFLAGS) |
| 3983 | AC_SUBST(MAGICK_CPPFLAGS) |
| 3984 | AC_SUBST(MAGICK_PCFLAGS) |
| 3985 | AC_SUBST(MAGICK_LDFLAGS) |
| 3986 | AC_SUBST(MAGICK_LIBS) |
cristy | 154f9fa | 2012-12-05 19:30:42 +0000 | [diff] [blame] | 3987 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3988 | # Set configured scripts to executable. |
| 3989 | AC_CONFIG_COMMANDS([default],[],[]) |
cristy | 2bd4b6e | 2012-07-22 15:29:11 +0000 | [diff] [blame] | 3990 | AC_CONFIG_COMMANDS([magick.sh.in],[chmod +x magick.sh]) |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 3991 | AC_CONFIG_COMMANDS([MagickCore-config.in],[chmod +x MagickCore/MagickCore-config]) |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 3992 | AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x MagickWand/MagickWand-config]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3993 | AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x Magick++/bin/Magick++-config]) |
| 3994 | AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh]) |
| 3995 | |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 3996 | AC_MSG_RESULT([-------------------------------------------------------------]) |
| 3997 | AC_MSG_RESULT([Update ImageMagick configuration]) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3998 | AC_OUTPUT |
| 3999 | |
| 4000 | rm -f magick-version |
| 4001 | |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 4002 | result_dejavu_font_dir='none' |
| 4003 | if test "${dejavu_font_dir}x" != 'x'; then |
| 4004 | result_dejavu_font_dir=$dejavu_font_dir |
| 4005 | fi |
| 4006 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4007 | result_ghostscript_font_dir='none' |
| 4008 | if test "${ghostscript_font_dir}x" != 'x'; then |
| 4009 | result_ghostscript_font_dir=$ghostscript_font_dir |
| 4010 | fi |
| 4011 | |
| 4012 | result_windows_font_dir='none' |
| 4013 | if test "${windows_font_dir}x" != 'x'; then |
| 4014 | result_windows_font_dir=${windows_font_dir} |
| 4015 | fi |
| 4016 | |
cristy | ad38abe | 2012-12-23 23:03:21 +0000 | [diff] [blame] | 4017 | AC_MSG_RESULT([ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4018 | ImageMagick is configured as follows. Please verify that this configuration |
| 4019 | matches your expectations. |
| 4020 | |
| 4021 | Host system type: $host |
| 4022 | Build system type: $build |
| 4023 | |
| 4024 | Option Value |
| 4025 | ------------------------------------------------------------------------------- |
| 4026 | Shared libraries --enable-shared=$enable_shared $libtool_build_shared_libs |
| 4027 | Static libraries --enable-static=$enable_static $libtool_build_static_libs |
cristy | c672209 | 2012-10-14 00:19:31 +0000 | [diff] [blame] | 4028 | Module support --with-modules=$build_modules $build_modules |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4029 | GNU ld --with-gnu-ld=$with_gnu_ld $lt_cv_prog_gnu_ld |
| 4030 | Quantum depth --with-quantum-depth=$with_quantum_depth $with_quantum_depth |
| 4031 | High Dynamic Range Imagery |
| 4032 | --enable-hdri=$enable_hdri $enable_hdri |
| 4033 | |
| 4034 | Delegate Configuration: |
| 4035 | BZLIB --with-bzlib=$with_bzlib $have_bzlib |
| 4036 | Autotrace --with-autotrace=$with_autotrace $have_autotrace |
cristy | 430a731 | 2010-01-21 20:44:04 +0000 | [diff] [blame] | 4037 | Dejavu fonts --with-dejavu-font-dir=$with_dejavu_font_dir $result_dejavu_font_dir |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4038 | DJVU --with-djvu=$with_djvu $have_djvu |
| 4039 | DPS --with-dps=$with_dps $have_dps |
| 4040 | FFTW --with-fftw=$with_fftw $have_fftw |
| 4041 | FlashPIX --with-fpx=$with_fpx $have_fpx |
| 4042 | FontConfig --with-fontconfig=$with_fontconfig $have_fontconfig |
| 4043 | FreeType --with-freetype=$with_freetype $have_freetype |
| 4044 | GhostPCL None $PCLDelegate ($PCLVersion) |
| 4045 | GhostXPS None $XPSDelegate ($XPSVersion) |
| 4046 | Ghostscript None $PSDelegate ($GSVersion) |
| 4047 | Ghostscript fonts --with-gs-font-dir=$with_gs_font_dir $result_ghostscript_font_dir |
| 4048 | Ghostscript lib --with-gslib=$with_gslib $have_gslib |
| 4049 | Graphviz --with-gvc=$with_gvc $have_gvc |
| 4050 | JBIG --with-jbig=$with_jbig $have_jbig |
| 4051 | JPEG v1 --with-jpeg=$with_jpeg $have_jpeg |
| 4052 | JPEG-2000 --with-jp2=$with_jp2 $have_jp2 |
cristy | 7120340 | 2010-06-18 13:12:03 +0000 | [diff] [blame] | 4053 | LCMS v1 --with-lcms=$with_lcms $have_lcms |
| 4054 | LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2 |
cristy | 99db387 | 2014-01-01 15:11:34 +0000 | [diff] [blame] | 4055 | LIBJPEG2 --with-openjp2=$with_openjp2 $have_openjp2 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4056 | LQR --with-lqr=$with_lqr $have_lqr |
cristy | 5eef09f | 2012-10-16 12:08:28 +0000 | [diff] [blame] | 4057 | LTDL --with-ltdl=$with_ltdl $have_ltdl |
cristy | fbb0ef0 | 2010-12-19 02:32:11 +0000 | [diff] [blame] | 4058 | LZMA --with-lzma=$with_lzma $have_lzma |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4059 | Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus |
| 4060 | OpenEXR --with-openexr=$with_openexr $have_openexr |
cristy | 41cbe8a | 2011-10-27 01:35:18 +0000 | [diff] [blame] | 4061 | PANGO --with-pango=$with_pango $have_pango |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4062 | PERL --with-perl=$with_perl $have_perl |
| 4063 | PNG --with-png=$with_png $have_png |
| 4064 | RSVG --with-rsvg=$with_rsvg $have_rsvg |
| 4065 | TIFF --with-tiff=$with_tiff $have_tiff |
cristy | b186075 | 2011-03-14 00:27:46 +0000 | [diff] [blame] | 4066 | WEBP --with-webp=$with_webp $have_webp |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4067 | Windows fonts --with-windows-font-dir=$with_windows_font_dir $result_windows_font_dir |
cristy | ea74c02 | 2012-12-01 00:53:32 +0000 | [diff] [blame] | 4068 | WMF --with-wmf=$with_wmf $have_wmf |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4069 | X11 --with-x=$with_x $have_x |
| 4070 | XML --with-xml=$with_xml $have_xml |
| 4071 | ZLIB --with-zlib=$with_zlib $have_zlib |
| 4072 | |
| 4073 | X11 Configuration: |
| 4074 | X_CFLAGS = $X_CFLAGS |
| 4075 | X_PRE_LIBS = $X_PRE_LIBS |
| 4076 | X_LIBS = $X_LIBS |
| 4077 | X_EXTRA_LIBS = $X_EXTRA_LIBS |
| 4078 | |
| 4079 | Options used to compile and link: |
| 4080 | PREFIX = $PREFIX_DIR |
| 4081 | EXEC-PREFIX = $EXEC_PREFIX_DIR |
| 4082 | VERSION = $PACKAGE_VERSION |
| 4083 | CC = $CC |
| 4084 | CFLAGS = $CFLAGS |
cristy | 03ae99f | 2014-04-28 16:34:55 +0000 | [diff] [blame] | 4085 | CPPFLAGS = $CPPFLAGS |
| 4086 | PCFLAGS = $PCFLAGS |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4087 | DEFS = $DEFS |
| 4088 | LDFLAGS = $LDFLAGS |
cristy | 03ae99f | 2014-04-28 16:34:55 +0000 | [diff] [blame] | 4089 | LIBS = $LIBS |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4090 | CXX = $CXX |
| 4091 | CXXFLAGS = $CXXFLAGS |
cristy | fd9dcd4 | 2010-08-08 18:07:02 +0000 | [diff] [blame] | 4092 | FEATURES = $MAGICK_FEATURES |
cristy | 422d550 | 2012-12-22 22:20:57 +0000 | [diff] [blame] | 4093 | DELEGATES = $MAGICK_DELEGATES |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 4094 | ]) |