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