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