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