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