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