| 1 | # Copyright 1999-2008 ImageMagick Studio LLC, a non-profit organization |
|---|
| 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 | AC_PREREQ(2.61) |
|---|
| 16 | AC_INIT([ImageMagick],[6.3.8],[http://www.imagemagick.org],[ImageMagick]) |
|---|
| 17 | AC_CONFIG_SRCDIR([magick/MagickCore.h]) |
|---|
| 18 | AC_CONFIG_AUX_DIR([config]) |
|---|
| 19 | AC_CONFIG_MACRO_DIR([m4]) |
|---|
| 20 | AC_CONFIG_LIBOBJ_DIR([ltdl]) |
|---|
| 21 | AC_CONFIG_HEADERS([config/config.h]) |
|---|
| 22 | AX_PREFIX_CONFIG_H([magick/magick-config.h],[MagickCore]) |
|---|
| 23 | AC_CONFIG_FILES( \ |
|---|
| 24 | config/delegates.xml \ |
|---|
| 25 | config/configure.xml \ |
|---|
| 26 | config/ImageMagick.rdf \ |
|---|
| 27 | config/type-ghostscript.xml \ |
|---|
| 28 | config/type.xml \ |
|---|
| 29 | config/type-solaris.xml \ |
|---|
| 30 | config/type-windows.xml \ |
|---|
| 31 | ImageMagick.spec \ |
|---|
| 32 | magick/ImageMagick.pc \ |
|---|
| 33 | magick/Magick-config \ |
|---|
| 34 | magick/version.h \ |
|---|
| 35 | magick.sh \ |
|---|
| 36 | Magick++/bin/Magick++-config \ |
|---|
| 37 | Magick++/lib/ImageMagick++.pc \ |
|---|
| 38 | Makefile \ |
|---|
| 39 | PerlMagick/Magick.pm \ |
|---|
| 40 | PerlMagick/Makefile.PL \ |
|---|
| 41 | utilities/animate.1 \ |
|---|
| 42 | utilities/compare.1 \ |
|---|
| 43 | utilities/composite.1 \ |
|---|
| 44 | utilities/conjure.1 \ |
|---|
| 45 | utilities/convert.1 \ |
|---|
| 46 | utilities/display.1 \ |
|---|
| 47 | utilities/identify.1 \ |
|---|
| 48 | utilities/ImageMagick.1 \ |
|---|
| 49 | utilities/import.1 \ |
|---|
| 50 | utilities/mogrify.1 \ |
|---|
| 51 | utilities/montage.1 \ |
|---|
| 52 | utilities/stream.1 \ |
|---|
| 53 | wand/Wand-config \ |
|---|
| 54 | wand/Wand.pc ) |
|---|
| 55 | |
|---|
| 56 | # |
|---|
| 57 | # Save initial user-tunable values |
|---|
| 58 | # |
|---|
| 59 | USER_LIBS=$LIBS |
|---|
| 60 | for var in CC CFLAGS CPPFLAGS CXX CXXCPP LDFLAGS LIBS ; do |
|---|
| 61 | eval isset=\${$var+set} |
|---|
| 62 | if test "$isset" = 'set'; then |
|---|
| 63 | eval val=$`echo $var` |
|---|
| 64 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS}'${var}=${val}' " |
|---|
| 65 | fi |
|---|
| 66 | done |
|---|
| 67 | AC_SUBST(DISTCHECK_CONFIG_FLAGS) |
|---|
| 68 | |
|---|
| 69 | CONFIGURE_ARGS=`echo "$0 $@" | sed -e 's/ */ /g'` |
|---|
| 70 | AC_SUBST(CONFIGURE_ARGS) |
|---|
| 71 | |
|---|
| 72 | # Source file containing package/library versioning information. |
|---|
| 73 | . ${srcdir}/version.sh |
|---|
| 74 | |
|---|
| 75 | echo "configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}" |
|---|
| 76 | AC_CANONICAL_TARGET([]) |
|---|
| 77 | |
|---|
| 78 | # Substitute library versioning |
|---|
| 79 | AC_SUBST(LIBRARY_CURRENT)dnl |
|---|
| 80 | AC_SUBST(LIBRARY_REVISION)dnl |
|---|
| 81 | AC_SUBST(LIBRARY_AGE)dnl |
|---|
| 82 | AC_SUBST(PACKAGE_NAME)dnl |
|---|
| 83 | AC_SUBST(PACKAGE_VERSION)dnl |
|---|
| 84 | AC_SUBST(PACKAGE_LIB_VERSION)dnl |
|---|
| 85 | AC_SUBST(PACKAGE_LIB_VERSION_NUMBER)dnl |
|---|
| 86 | AC_SUBST(PACKAGE_RELEASE_DATE)dnl |
|---|
| 87 | AC_SUBST(PACKAGE_VERSION_ADDENDUM)dnl |
|---|
| 88 | |
|---|
| 89 | # Ensure that make can run correctly |
|---|
| 90 | AM_SANITY_CHECK |
|---|
| 91 | |
|---|
| 92 | AM_INIT_AUTOMAKE([foreign subdir-objects dist-zip dist-bzip2 tar-ustar -Wall]) |
|---|
| 93 | AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/ChangeLog $(top_srcdir)/version.sh']) |
|---|
| 94 | |
|---|
| 95 | PERLMAINCC=$CC |
|---|
| 96 | |
|---|
| 97 | MAGICK_CFLAGS='' |
|---|
| 98 | MAGICK_CPPFLAGS=$CPPFLAGS_USER |
|---|
| 99 | MAGICK_PCFLAGS=$CPPFLAGS_USER |
|---|
| 100 | MAGICK_LDFLAGS='' |
|---|
| 101 | MAGICK_LIBS='' |
|---|
| 102 | |
|---|
| 103 | # |
|---|
| 104 | # Evaluate shell variable equivalents to Makefile directory variables |
|---|
| 105 | # |
|---|
| 106 | if test "x$prefix" = xNONE; then |
|---|
| 107 | prefix=$ac_default_prefix |
|---|
| 108 | fi |
|---|
| 109 | # Let make expand exec_prefix. |
|---|
| 110 | if test "x$exec_prefix" = xNONE; then |
|---|
| 111 | exec_prefix='${prefix}' |
|---|
| 112 | fi |
|---|
| 113 | |
|---|
| 114 | # |
|---|
| 115 | eval "eval PREFIX_DIR=${prefix}" |
|---|
| 116 | AC_SUBST(PREFIX_DIR) |
|---|
| 117 | eval "eval EXEC_PREFIX_DIR=${exec_prefix}" |
|---|
| 118 | AC_SUBST(EXEC_PREFIX_DIR) |
|---|
| 119 | eval "eval BIN_DIR=$bindir" |
|---|
| 120 | AC_SUBST(BIN_DIR) |
|---|
| 121 | eval "eval SBIN_DIR=$sbindir" |
|---|
| 122 | AC_SUBST(SBIN_DIR) |
|---|
| 123 | eval "eval LIBEXEC_DIR=$libexecdir" |
|---|
| 124 | AC_SUBST(LIBEXEC_DIR) |
|---|
| 125 | eval "eval DATA_DIR=$datadir" |
|---|
| 126 | AC_SUBST(DATA_DIR) |
|---|
| 127 | eval "eval SYSCONF_DIR=$sysconfdir" |
|---|
| 128 | AC_SUBST(SYSCONF_DIR) |
|---|
| 129 | eval "eval SHAREDSTATE_DIR=$sharedstatedir" |
|---|
| 130 | AC_SUBST(SHAREDSTATE_DIR) |
|---|
| 131 | eval "eval LOCALSTATE_DIR=$localstatedir" |
|---|
| 132 | AC_SUBST(LOCALSTATE_DIR) |
|---|
| 133 | eval "eval LIB_DIR=$libdir" |
|---|
| 134 | AC_SUBST(LIB_DIR) |
|---|
| 135 | eval "eval INCLUDE_DIR=$includedir" |
|---|
| 136 | AC_SUBST(INCLUDE_DIR) |
|---|
| 137 | eval "eval PERSISTINCLUDE_DIR=$oldincludedir" |
|---|
| 138 | AC_SUBST(PERSISTINCLUDE_DIR) |
|---|
| 139 | eval "eval INFO_DIR=$infodir" |
|---|
| 140 | AC_SUBST(INFO_DIR) |
|---|
| 141 | eval "eval MAN_DIR=$mandir" |
|---|
| 142 | AC_SUBST(MAN_DIR) |
|---|
| 143 | |
|---|
| 144 | # Get full paths to source and build directories |
|---|
| 145 | srcdirfull="`cd $srcdir && pwd`" |
|---|
| 146 | builddir="`pwd`" |
|---|
| 147 | |
|---|
| 148 | WinPathScript="${srcdirfull}/winpath.sh" |
|---|
| 149 | AC_SUBST(WinPathScript) |
|---|
| 150 | |
|---|
| 151 | # |
|---|
| 152 | # Compute variables useful for running uninstalled software. |
|---|
| 153 | # |
|---|
| 154 | MAGICK_CODER_MODULE_PATH="${builddir}/coders" |
|---|
| 155 | MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config" |
|---|
| 156 | MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config" |
|---|
| 157 | MAGICK_FILTER_MODULE_PATH="${builddir}/filters" |
|---|
| 158 | DIRSEP=':' |
|---|
| 159 | case "${host_os}" in |
|---|
| 160 | mingw* ) |
|---|
| 161 | MAGICK_CODER_MODULE_PATH=`$WinPathScript "${MAGICK_CODER_MODULE_PATH}" 0` |
|---|
| 162 | MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0` |
|---|
| 163 | MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0` |
|---|
| 164 | MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0` |
|---|
| 165 | DIRSEP=';' |
|---|
| 166 | ;; |
|---|
| 167 | esac |
|---|
| 168 | AC_SUBST(MAGICK_CODER_MODULE_PATH) |
|---|
| 169 | AC_SUBST(MAGICK_CONFIGURE_SRC_PATH) |
|---|
| 170 | AC_SUBST(MAGICK_CONFIGURE_BUILD_PATH) |
|---|
| 171 | AC_SUBST(MAGICK_FILTER_MODULE_PATH) |
|---|
| 172 | AC_SUBST(DIRSEP) |
|---|
| 173 | |
|---|
| 174 | # Check for programs |
|---|
| 175 | AC_PROG_CC |
|---|
| 176 | AC_PROG_CPP |
|---|
| 177 | AC_PROG_LD |
|---|
| 178 | AC_SUBST(LD) |
|---|
| 179 | AM_PROG_CC_C_O |
|---|
| 180 | AC_PROG_INSTALL |
|---|
| 181 | AC_PROG_MAKE_SET |
|---|
| 182 | AC_PROG_RANLIB |
|---|
| 183 | AC_COMPILE_WARNINGS |
|---|
| 184 | AC_PROG_LN_S |
|---|
| 185 | AM_WITH_DMALLOC |
|---|
| 186 | |
|---|
| 187 | # |
|---|
| 188 | # Enable OS features. |
|---|
| 189 | # |
|---|
| 190 | AC_GNU_SOURCE |
|---|
| 191 | |
|---|
| 192 | # |
|---|
| 193 | # Tests for Windows |
|---|
| 194 | # |
|---|
| 195 | AC_EXEEXT |
|---|
| 196 | AC_OBJEXT |
|---|
| 197 | |
|---|
| 198 | GDI32_LIBS='' |
|---|
| 199 | StaticCplusPlusLibraries='no' |
|---|
| 200 | native_win32_build='no' |
|---|
| 201 | cygwin_build='no' |
|---|
| 202 | case "${host_os}" in |
|---|
| 203 | cygwin* ) |
|---|
| 204 | StaticCplusPlusLibraries='yes' |
|---|
| 205 | cygwin_build='yes' |
|---|
| 206 | GDI32_LIBS='-lgdi32' |
|---|
| 207 | ;; |
|---|
| 208 | mingw* ) |
|---|
| 209 | StaticCplusPlusLibraries='yes' |
|---|
| 210 | native_win32_build='yes' |
|---|
| 211 | GDI32_LIBS='-lgdi32' |
|---|
| 212 | ;; |
|---|
| 213 | esac |
|---|
| 214 | if test "${GDI32_LIBS}x" != 'x'; then |
|---|
| 215 | AC_DEFINE(WINGDI32_DELEGATE,1,Define to use the Windows GDI32 library) |
|---|
| 216 | fi |
|---|
| 217 | AC_SUBST(GDI32_LIBS) |
|---|
| 218 | AM_CONDITIONAL(WINGDI32_DELEGATE, test "${GDI32_LIBS}x" != 'x' ) |
|---|
| 219 | AM_CONDITIONAL(WIN32_NATIVE_BUILD, test "${native_win32_build}" = 'yes' ) |
|---|
| 220 | AM_CONDITIONAL(CYGWIN_BUILD, test "${cygwin_build}" = 'yes' ) |
|---|
| 221 | |
|---|
| 222 | # |
|---|
| 223 | # Compiler flags tweaks |
|---|
| 224 | # |
|---|
| 225 | if test "${GCC}" != "yes"; then |
|---|
| 226 | case "${host}" in |
|---|
| 227 | *-*-hpux* ) |
|---|
| 228 | # aCC: HP ANSI C++ B3910B A.03.34 |
|---|
| 229 | CFLAGS="${CFLAGS} -Wp,-H30000" |
|---|
| 230 | if test -n "${CXXFLAGS}"; then |
|---|
| 231 | CXXFLAGS='-AA' |
|---|
| 232 | else |
|---|
| 233 | CXXFLAGS="${CXXFLAGS} -AA" |
|---|
| 234 | fi |
|---|
| 235 | ;; |
|---|
| 236 | *-dec-osf5.* ) |
|---|
| 237 | # Compaq alphaev68-dec-osf5.1 compiler |
|---|
| 238 | if test -n "${CXXFLAGS}"; then |
|---|
| 239 | CXXFLAGS='-std strict_ansi -noimplicit_include' |
|---|
| 240 | else |
|---|
| 241 | CXXFLAGS="${CXXFLAGS} -std strict_ansi -noimplicit_include" |
|---|
| 242 | fi |
|---|
| 243 | esac |
|---|
| 244 | fi |
|---|
| 245 | |
|---|
| 246 | dnl Platform-specific stuff |
|---|
| 247 | case "$host" in |
|---|
| 248 | *darwin*) |
|---|
| 249 | dnl OS X universal binary support, requires --disable-dependency-tracking |
|---|
| 250 | AC_ARG_ENABLE(osx-universal-binary, |
|---|
| 251 | AC_HELP_STRING([--enable-osx-universal-binary], |
|---|
| 252 | [build universal binary on OS X [[default=no]]]), |
|---|
| 253 | [build_osxuniversal="${enableval}"], [build_osxuniversal=no]) |
|---|
| 254 | |
|---|
| 255 | if test "${build_osxuniversal}" != no ; then |
|---|
| 256 | if test "$enable_dependency_tracking" != no ; then |
|---|
| 257 | AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking. |
|---|
| 258 | Please re-run configure with these options: |
|---|
| 259 | --disable-dependency-tracking --enable-osx-universal-binary |
|---|
| 260 | ]) |
|---|
| 261 | fi |
|---|
| 262 | CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386" |
|---|
| 263 | CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386" |
|---|
| 264 | LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386" |
|---|
| 265 | fi |
|---|
| 266 | |
|---|
| 267 | esac |
|---|
| 268 | |
|---|
| 269 | # Enable support for threads |
|---|
| 270 | AC_ARG_WITH([threads], |
|---|
| 271 | [AC_HELP_STRING([--without-threads], |
|---|
| 272 | [disable threads support])], |
|---|
| 273 | [with_threads=$withval], |
|---|
| 274 | [with_threads='yes']) |
|---|
| 275 | |
|---|
| 276 | have_threads=no |
|---|
| 277 | if test "$with_threads" != 'no'; then |
|---|
| 278 | ACX_PTHREAD() |
|---|
| 279 | if test "$acx_pthread_ok" = yes; then |
|---|
| 280 | have_threads=yes |
|---|
| 281 | DEF_THREAD="$PTHREAD_CFLAGS" |
|---|
| 282 | CFLAGS="$CFLAGS $DEF_THREAD" |
|---|
| 283 | CXXFLAGS="$CXXFLAGS $DEF_THREAD" |
|---|
| 284 | if test "$CC" != "$PTHREAD_CC"; then |
|---|
| 285 | AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.]) |
|---|
| 286 | CC="$PTHREAD_CC" |
|---|
| 287 | fi |
|---|
| 288 | fi |
|---|
| 289 | fi |
|---|
| 290 | |
|---|
| 291 | # Enable support for OpenMP |
|---|
| 292 | AC_OPENMP([C]) |
|---|
| 293 | CFLAGS="$CFLAGS $OPENMP_CFLAGS" |
|---|
| 294 | LDFLAGS="$LDFLAGS $OPENMP_CFLAGS" |
|---|
| 295 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS" |
|---|
| 296 | |
|---|
| 297 | ######## |
|---|
| 298 | # |
|---|
| 299 | # Check for large file support |
|---|
| 300 | # |
|---|
| 301 | ######## |
|---|
| 302 | AC_SYS_LARGEFILE |
|---|
| 303 | AC_FUNC_FSEEKO |
|---|
| 304 | LFS_CPPFLAGS='' |
|---|
| 305 | if test "$enable_largefile" != no; then |
|---|
| 306 | if test "$ac_cv_sys_file_offset_bits" != 'no'; then |
|---|
| 307 | LFS_CPPFLAGS="$LFS_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" |
|---|
| 308 | else |
|---|
| 309 | AC_MSG_CHECKING([for native large file support]) |
|---|
| 310 | AC_RUN_IFELSE([#include <unistd.h> |
|---|
| 311 | main () { |
|---|
| 312 | exit(!(sizeof(off_t) == 8)); |
|---|
| 313 | }], |
|---|
| 314 | [ac_cv_sys_file_offset_bits=64; AC_DEFINE(_FILE_OFFSET_BITS,64) |
|---|
| 315 | AC_MSG_RESULT([yes])], |
|---|
| 316 | [AC_MSG_RESULT([no])]) |
|---|
| 317 | fi |
|---|
| 318 | if test "$ac_cv_sys_large_files" != 'no'; then |
|---|
| 319 | LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGE_FILES=1" |
|---|
| 320 | fi |
|---|
| 321 | if test "$ac_cv_sys_largefile_source" != 'no'; then |
|---|
| 322 | LFS_CPPFLAGS="$LFS_CPPFLAGS -D_LARGEFILE_SOURCE=1" |
|---|
| 323 | fi |
|---|
| 324 | fi |
|---|
| 325 | AC_SUBST(LFS_CPPFLAGS) |
|---|
| 326 | |
|---|
| 327 | # |
|---|
| 328 | # Configure libtool & libltdl |
|---|
| 329 | # |
|---|
| 330 | # Configure libtool |
|---|
| 331 | AC_LIBTOOL_DLOPEN |
|---|
| 332 | LT_INIT([win32-dll]) |
|---|
| 333 | LT_LANG([C++]) |
|---|
| 334 | AC_SUBST(LIBTOOL_DEPS) |
|---|
| 335 | |
|---|
| 336 | |
|---|
| 337 | # Configure libltdl |
|---|
| 338 | LT_CONFIG_LTDL_DIR([ltdl],[nonrecursive]) |
|---|
| 339 | AC_LIBLTDL_CONVENIENCE([ltdl]) |
|---|
| 340 | AC_LIB_LTDL |
|---|
| 341 | # Substitute INCLTDL and LIBLTDL in the Makefiles |
|---|
| 342 | #AC_SUBST(INCLTDL) |
|---|
| 343 | #AC_SUBST(LIBLTDL) |
|---|
| 344 | |
|---|
| 345 | # Check to see if building shared libraries |
|---|
| 346 | libtool_build_shared_libs='no' |
|---|
| 347 | if test "$enable_shared" = 'yes'; then |
|---|
| 348 | libtool_build_shared_libs='yes' |
|---|
| 349 | fi |
|---|
| 350 | |
|---|
| 351 | # Check to see if building static libraries |
|---|
| 352 | libtool_build_static_libs='no' |
|---|
| 353 | if test "$enable_static" = 'yes'; then |
|---|
| 354 | libtool_build_static_libs='yes' |
|---|
| 355 | fi |
|---|
| 356 | |
|---|
| 357 | # MinGW and Cygwin can't build C++ DLLs which support exceptions. |
|---|
| 358 | if test "${StaticCplusPlusLibraries}" = 'yes'; then |
|---|
| 359 | LTCXXLIBOPTS='--static' |
|---|
| 360 | AC_SUBST(LTCXXLIBOPTS) |
|---|
| 361 | fi |
|---|
| 362 | |
|---|
| 363 | # |
|---|
| 364 | # Enable support for building loadable modules |
|---|
| 365 | # |
|---|
| 366 | AC_ARG_WITH([modules], |
|---|
| 367 | [AC_HELP_STRING([--with-modules], |
|---|
| 368 | [support dynamically loadable modules])], |
|---|
| 369 | [with_modules=$withval], |
|---|
| 370 | [with_modules=$libtool_build_shared_libs]) |
|---|
| 371 | |
|---|
| 372 | # Only allow building loadable modules if we are building shared libraries |
|---|
| 373 | if test "$with_modules" != 'no' ; then |
|---|
| 374 | if test "$libtool_build_shared_libs" = 'no'; then |
|---|
| 375 | AC_MSG_WARN([Modules may only be built if building shared libraries is enabled.]) |
|---|
| 376 | with_modules='no' |
|---|
| 377 | fi |
|---|
| 378 | fi |
|---|
| 379 | if test "$with_modules" != 'no'; then |
|---|
| 380 | AC_DEFINE(BUILD_MODULES,1,Define if coders and filters are to be built as modules.) |
|---|
| 381 | fi |
|---|
| 382 | AM_CONDITIONAL(WITH_MODULES, test "$with_modules" != 'no') |
|---|
| 383 | |
|---|
| 384 | # Enable building/use of libltdl if we are building shared libraries regardless |
|---|
| 385 | # of whether modules are built or not. |
|---|
| 386 | with_ltdl='no' |
|---|
| 387 | if test "$libtool_build_shared_libs" != 'no'; then |
|---|
| 388 | with_ltdl='yes' |
|---|
| 389 | fi |
|---|
| 390 | |
|---|
| 391 | AM_CONDITIONAL(WITH_LTDL, test "$with_ltdl" != 'no') |
|---|
| 392 | if test "$with_ltdl" != 'no'; then |
|---|
| 393 | AC_DEFINE(LTDL_DELEGATE,1,Define if using libltdl to support dynamically loadable modules) |
|---|
| 394 | |
|---|
| 395 | # Set DLLDFLAGS |
|---|
| 396 | if test X"$enable_shared" = Xyes; then |
|---|
| 397 | DLLDFLAGS=-export-dynamic |
|---|
| 398 | AC_SUBST(DLLDFLAGS) |
|---|
| 399 | fi |
|---|
| 400 | fi |
|---|
| 401 | |
|---|
| 402 | # Enable build using delegate libraries built in subdirectories rather than installed |
|---|
| 403 | # delegate libraries (bzlib fpx jp2 jbig jpeg lcms png tiff ttf wmf xml zlib) |
|---|
| 404 | AC_ARG_ENABLE([delegate-build], |
|---|
| 405 | [AC_HELP_STRING([--enable-delegate-build], |
|---|
| 406 | [look for delegate libraries in build directory])], |
|---|
| 407 | [enable_delegate_build=$enableval], |
|---|
| 408 | [enable_delegate_build='no']) |
|---|
| 409 | |
|---|
| 410 | AC_ARG_ENABLE([deprecated], |
|---|
| 411 | [AC_HELP_STRING([--disable-deprecated], |
|---|
| 412 | [exclude deprecated methods in MagickCore and MagickWand API's])], |
|---|
| 413 | [enable_deprecated=$enableval], |
|---|
| 414 | [enable_deprecated='no']) |
|---|
| 415 | |
|---|
| 416 | if test "$enable_deprecated" = 'yes'; then |
|---|
| 417 | AC_DEFINE(EXCLUDE_DEPRECATED,1,[exclude deprecated methods in MagickCore API]) |
|---|
| 418 | else |
|---|
| 419 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-deprecate " |
|---|
| 420 | fi |
|---|
| 421 | |
|---|
| 422 | # Build a version of ImageMagick which operates uninstalled. |
|---|
| 423 | # Used to build distributions located via MAGICK_HOME / executable path |
|---|
| 424 | AC_ARG_ENABLE([installed], |
|---|
| 425 | [AC_HELP_STRING([--disable-installed], |
|---|
| 426 | [Formally install ImageMagick under PREFIX])], |
|---|
| 427 | [enable_installed=$enableval], |
|---|
| 428 | [enable_installed='yes']) |
|---|
| 429 | |
|---|
| 430 | if test "$enable_installed" = 'yes'; then |
|---|
| 431 | AC_DEFINE(INSTALLED_SUPPORT,1,[ImageMagick is formally installed under prefix]) |
|---|
| 432 | else |
|---|
| 433 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --disable-installed " |
|---|
| 434 | fi |
|---|
| 435 | |
|---|
| 436 | # Build an embeddable version of ImageMagick. |
|---|
| 437 | AC_ARG_ENABLE([embeddable], |
|---|
| 438 | [AC_HELP_STRING([--enable-embeddable], |
|---|
| 439 | [enable self-contained, embeddable, zero-configuration ImageMagick])], |
|---|
| 440 | [enable_embeddable=$enableval], |
|---|
| 441 | [enable_embeddable='no']) |
|---|
| 442 | |
|---|
| 443 | if test "$enable_embeddable" = 'yes'; then |
|---|
| 444 | AC_DEFINE(EMBEDDABLE_SUPPORT,1,[Build self-contained, embeddable, zero-configuration ImageMagick (experimental)]) |
|---|
| 445 | fi |
|---|
| 446 | |
|---|
| 447 | # Build a high dynamic range version of ImageMagick. |
|---|
| 448 | AC_ARG_ENABLE([hdri], |
|---|
| 449 | [AC_HELP_STRING([--enable-hdri], |
|---|
| 450 | [accurately represent the wide range of intensity levels found in real scenes])], |
|---|
| 451 | [enable_hdri=$enableval], |
|---|
| 452 | [enable_hdri='no']) |
|---|
| 453 | |
|---|
| 454 | MAGICK_HDRI="" |
|---|
| 455 | if test "$enable_hdri" = 'yes'; then |
|---|
| 456 | MAGICK_HDRI="HDRI" |
|---|
| 457 | AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes]) |
|---|
| 458 | fi |
|---|
| 459 | AC_SUBST(MAGICK_HDRI)dnl |
|---|
| 460 | |
|---|
| 461 | # Enable verbose output from libtool (enable libtool's default) |
|---|
| 462 | AC_ARG_ENABLE([libtool-verbose], |
|---|
| 463 | [AC_HELP_STRING([--enable-libtool-verbose], |
|---|
| 464 | [enable verbose libtool output])], |
|---|
| 465 | [enable_libtool_verbose=$enableval], |
|---|
| 466 | [enable_libtool_verbose='no']) |
|---|
| 467 | |
|---|
| 468 | if test "$enable_libtool_verbose" = 'no'; then |
|---|
| 469 | LIBTOOL="$LIBTOOL --silent" |
|---|
| 470 | fi |
|---|
| 471 | |
|---|
| 472 | # Build a version of ImageMagick with assert statements. |
|---|
| 473 | AC_ARG_ENABLE([assert], |
|---|
| 474 | [AC_HELP_STRING([--disable-assert], |
|---|
| 475 | [disable assert() statements in build])], |
|---|
| 476 | [enable_assert=$enableval], |
|---|
| 477 | [enable_assert='yes']) |
|---|
| 478 | |
|---|
| 479 | if test "$enable_assert" = 'no'; then |
|---|
| 480 | AC_DEFINE(NDEBUG,1,[Turn off assert statements]) |
|---|
| 481 | fi |
|---|
| 482 | |
|---|
| 483 | # Add configure option --enable-maintainer-mode which enables dependency |
|---|
| 484 | # checking and generation useful to package maintainers. This is made an |
|---|
| 485 | # option to avoid confusing end users. |
|---|
| 486 | AM_MAINTAINER_MODE |
|---|
| 487 | |
|---|
| 488 | |
|---|
| 489 | # Enable ccmalloc memory debugging support |
|---|
| 490 | AC_ARG_ENABLE([ccmalloc], |
|---|
| 491 | [AC_HELP_STRING([--enable-ccmalloc], |
|---|
| 492 | [enable 'ccmalloc' memory debug support])], |
|---|
| 493 | [enable_ccmalloc=$enableval], |
|---|
| 494 | [enable_ccmalloc='no']) |
|---|
| 495 | |
|---|
| 496 | # Enable Electric Fence memory debugging support |
|---|
| 497 | AC_ARG_ENABLE([efence], |
|---|
| 498 | [AC_HELP_STRING([--enable-efence], |
|---|
| 499 | [enable 'efence' memory debug support])], |
|---|
| 500 | [enable_efence=$enableval], |
|---|
| 501 | [enable_efence='no']) |
|---|
| 502 | |
|---|
| 503 | # Enable prof-based profiling support |
|---|
| 504 | AC_ARG_ENABLE([prof], |
|---|
| 505 | [AC_HELP_STRING([--enable-prof], |
|---|
| 506 | [enable 'prof' profiling support])], |
|---|
| 507 | [enable_prof=$enableval], |
|---|
| 508 | [enable_prof='no']) |
|---|
| 509 | |
|---|
| 510 | # Enable gprof-based profiling support |
|---|
| 511 | AC_ARG_ENABLE([gprof], |
|---|
| 512 | [AC_HELP_STRING([--enable-gprof], |
|---|
| 513 | [enable 'gprof' profiling support])], |
|---|
| 514 | [enable_gprof=$enableval], |
|---|
| 515 | [enable_gprof='no']) |
|---|
| 516 | |
|---|
| 517 | # Enable gcov-based profiling support |
|---|
| 518 | AC_ARG_ENABLE([gcov], |
|---|
| 519 | [AC_HELP_STRING([--enable-gcov], |
|---|
| 520 | [enable 'gcov' profiling support])], |
|---|
| 521 | [enable_gcov=$enableval], |
|---|
| 522 | [enable_gcov='no']) |
|---|
| 523 | |
|---|
| 524 | enable_profiling='no' |
|---|
| 525 | if test "$enable_prof" = 'yes' || test "$enable_gprof" = 'yes' || test "$enable_gcov" = 'yes'; then |
|---|
| 526 | enable_profiling='yes' |
|---|
| 527 | if test "$libtool_build_shared_libs" = 'yes'; then |
|---|
| 528 | echo "Warning: Can not profile code using shared libraries" |
|---|
| 529 | fi |
|---|
| 530 | fi |
|---|
| 531 | |
|---|
| 532 | # Magick API method prefix |
|---|
| 533 | AC_ARG_WITH([method-prefix], |
|---|
| 534 | [AC_HELP_STRING([--with-method-prefix=PREFIX], |
|---|
| 535 | [prefix MagickCore API methods])], |
|---|
| 536 | [with_method_prefix=$enableval], |
|---|
| 537 | [with_method_prefix='']) |
|---|
| 538 | |
|---|
| 539 | if test "$with_method_prefix" != ''; then |
|---|
| 540 | AC_DEFINE_UNQUOTED(NAMESPACE_PREFIX,$with_method_prefix,[Magick API method prefix]) |
|---|
| 541 | fi |
|---|
| 542 | |
|---|
| 543 | # Number of bits in a Quantum |
|---|
| 544 | AC_ARG_WITH([quantum-depth], |
|---|
| 545 | [AC_HELP_STRING([--with-quantum-depth=DEPTH], |
|---|
| 546 | [number of bits in a pixel quantum (default 16)])], |
|---|
| 547 | [with_quantum_depth=$withval], |
|---|
| 548 | [with_quantum_depth=16]) |
|---|
| 549 | |
|---|
| 550 | if test "$with_quantum_depth" != '8'; then |
|---|
| 551 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-quantum-depth=$with_quantum_depth " |
|---|
| 552 | fi |
|---|
| 553 | |
|---|
| 554 | case "${with_quantum_depth}" in |
|---|
| 555 | 8 ) |
|---|
| 556 | ;; |
|---|
| 557 | 16 ) |
|---|
| 558 | ;; |
|---|
| 559 | 32 ) |
|---|
| 560 | ;; |
|---|
| 561 | 64 ) |
|---|
| 562 | ;; |
|---|
| 563 | * ) |
|---|
| 564 | AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, or 32") |
|---|
| 565 | ;; |
|---|
| 566 | esac |
|---|
| 567 | QUANTUM_DEPTH="$with_quantum_depth" |
|---|
| 568 | AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)]) |
|---|
| 569 | AC_SUBST(QUANTUM_DEPTH)dnl |
|---|
| 570 | |
|---|
| 571 | # Set pixel cache threshold |
|---|
| 572 | AC_ARG_WITH([cache], |
|---|
| 573 | [AC_HELP_STRING([--with-cache=THRESHOLD], |
|---|
| 574 | [set pixel cache threshhold in MB (default available memory)])], |
|---|
| 575 | [with_cache=$withval], |
|---|
| 576 | [with_cache='']) |
|---|
| 577 | |
|---|
| 578 | if test "$with_cache" != ''; then |
|---|
| 579 | AC_DEFINE_UNQUOTED(PixelCacheThreshold,$with_cache,[Pixel cache threshold in MB (defaults to available memory)]) |
|---|
| 580 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-cache=$with_cache " |
|---|
| 581 | fi |
|---|
| 582 | |
|---|
| 583 | # Disable/Enable support for full delegate paths |
|---|
| 584 | AC_ARG_WITH([frozenpaths], |
|---|
| 585 | [AC_HELP_STRING([--with-frozenpaths], |
|---|
| 586 | [freeze delegate paths])], |
|---|
| 587 | [with_frozenpaths=$withval], |
|---|
| 588 | [with_frozenpaths='no']) |
|---|
| 589 | |
|---|
| 590 | # Enable build/install of Magick++ |
|---|
| 591 | AC_ARG_WITH([magick-plus-plus], |
|---|
| 592 | [AC_HELP_STRING([--without-magick-plus-plus], |
|---|
| 593 | [disable build/install of Magick++])], |
|---|
| 594 | [with_magick_plus_plus=$withval], |
|---|
| 595 | [with_magick_plus_plus='yes']) |
|---|
| 596 | |
|---|
| 597 | # Disable build/install of PerlMagick. |
|---|
| 598 | AC_ARG_WITH([perl], |
|---|
| 599 | [AC_HELP_STRING([--with-perl], |
|---|
| 600 | [enable build/install of PerlMagick])], |
|---|
| 601 | [with_perl=$withval], |
|---|
| 602 | [with_perl=$libtool_build_shared_libs]) |
|---|
| 603 | |
|---|
| 604 | # Options to pass when configuring PerlMagick |
|---|
| 605 | AC_ARG_WITH([perl-options], |
|---|
| 606 | [AC_HELP_STRING([--with-perl-options=OPTIONS], |
|---|
| 607 | [options to pass on command-line when generating PerlMagick's build file])]) |
|---|
| 608 | |
|---|
| 609 | PERL_MAKE_OPTIONS=$with_perl_options |
|---|
| 610 | AC_SUBST(PERL_MAKE_OPTIONS) |
|---|
| 611 | |
|---|
| 612 | |
|---|
| 613 | # Disable BZLIB (bzip2 library) |
|---|
| 614 | AC_ARG_WITH([bzlib], |
|---|
| 615 | [AC_HELP_STRING([--without-bzlib], |
|---|
| 616 | [disable BZLIB support])], |
|---|
| 617 | [with_bzlib=$withval], |
|---|
| 618 | [with_bzlib='yes']) |
|---|
| 619 | |
|---|
| 620 | if test "$with_bzlib" != 'yes'; then |
|---|
| 621 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-bzlib=$with_bzlib " |
|---|
| 622 | fi |
|---|
| 623 | |
|---|
| 624 | # Disable Display Postscript. |
|---|
| 625 | AC_ARG_WITH([dps], |
|---|
| 626 | [AC_HELP_STRING([--without-dps], |
|---|
| 627 | [disable Display Postscript support])], |
|---|
| 628 | [with_dps=$withval], |
|---|
| 629 | [with_dps='yes']) |
|---|
| 630 | |
|---|
| 631 | if test "$with_dps" != 'yes'; then |
|---|
| 632 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-dps=$with_dps " |
|---|
| 633 | fi |
|---|
| 634 | |
|---|
| 635 | # Disable DJVU. |
|---|
| 636 | AC_ARG_WITH([djvu], |
|---|
| 637 | [AC_HELP_STRING([--with-djvu], |
|---|
| 638 | [enable DjVu support])], |
|---|
| 639 | [with_djvu=$withval], |
|---|
| 640 | [with_djvu='no']) |
|---|
| 641 | |
|---|
| 642 | if test "$with_djvu" != 'yes'; then |
|---|
| 643 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-djvu=$with_djvu " |
|---|
| 644 | fi |
|---|
| 645 | |
|---|
| 646 | # Enable FlashPIX. |
|---|
| 647 | AC_ARG_WITH([fpx], |
|---|
| 648 | [AC_HELP_STRING([--without-fpx], |
|---|
| 649 | [disable FlashPIX support])], |
|---|
| 650 | [with_fpx=$withval], |
|---|
| 651 | [with_fpx='yes']) |
|---|
| 652 | |
|---|
| 653 | if test "$with_fpx" != 'yes'; then |
|---|
| 654 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fpx=$with_fpx " |
|---|
| 655 | fi |
|---|
| 656 | |
|---|
| 657 | # Enable Ghostscript library support. |
|---|
| 658 | AC_ARG_WITH([gslib], |
|---|
| 659 | [AC_HELP_STRING([--without-gslib], |
|---|
| 660 | [disable Ghostscript library support])], |
|---|
| 661 | [with_gslib=$withval], |
|---|
| 662 | [with_gslib='yes']) |
|---|
| 663 | |
|---|
| 664 | if test "$with_gslib" != 'yes'; then |
|---|
| 665 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gslib=$with_gslib " |
|---|
| 666 | fi |
|---|
| 667 | |
|---|
| 668 | # Disable JBIG. |
|---|
| 669 | AC_ARG_WITH([jbig], |
|---|
| 670 | [AC_HELP_STRING([--without-jbig], |
|---|
| 671 | [disable JBIG support])], |
|---|
| 672 | [with_jbig=$withval], |
|---|
| 673 | [with_jbig='yes']) |
|---|
| 674 | |
|---|
| 675 | if test "$with_jbig" != 'yes'; then |
|---|
| 676 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jbig=$with_jbig " |
|---|
| 677 | fi |
|---|
| 678 | |
|---|
| 679 | # Disable JPEG. |
|---|
| 680 | AC_ARG_WITH([jpeg], |
|---|
| 681 | [AC_HELP_STRING([--without-jpeg], |
|---|
| 682 | [disable JPEG support])], |
|---|
| 683 | [with_jpeg=$withval], |
|---|
| 684 | [with_jpeg='yes']) |
|---|
| 685 | |
|---|
| 686 | if test "$with_jpeg" != 'yes'; then |
|---|
| 687 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jpeg=$with_jpeg " |
|---|
| 688 | fi |
|---|
| 689 | |
|---|
| 690 | # Disable JPEG Version 2. |
|---|
| 691 | AC_ARG_WITH([jp2], |
|---|
| 692 | [AC_HELP_STRING([--without-jp2], |
|---|
| 693 | [disable JPEG-2000 support])], |
|---|
| 694 | [with_jp2=$withval], |
|---|
| 695 | [with_jp2='yes']) |
|---|
| 696 | |
|---|
| 697 | if test "$with_jp2" != 'yes'; then |
|---|
| 698 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-jp2=$with_jp2 " |
|---|
| 699 | fi |
|---|
| 700 | |
|---|
| 701 | # Disable TIFF. |
|---|
| 702 | AC_ARG_WITH([tiff], |
|---|
| 703 | [AC_HELP_STRING([--without-tiff], |
|---|
| 704 | [disable TIFF support])], |
|---|
| 705 | [with_tiff=$withval], |
|---|
| 706 | [with_tiff='yes']) |
|---|
| 707 | |
|---|
| 708 | if test "$with_tiff" != 'yes'; then |
|---|
| 709 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tiff=$with_tiff " |
|---|
| 710 | fi |
|---|
| 711 | |
|---|
| 712 | # Disable WMF. |
|---|
| 713 | AC_ARG_WITH([wmf], |
|---|
| 714 | [AC_HELP_STRING([--without-wmf], |
|---|
| 715 | [disable WMF support])], |
|---|
| 716 | [with_wmf=$withval], |
|---|
| 717 | [with_wmf=$with_modules]) |
|---|
| 718 | |
|---|
| 719 | if test "$with_wmf" != 'yes'; then |
|---|
| 720 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-wmf=$with_wmf " |
|---|
| 721 | fi |
|---|
| 722 | |
|---|
| 723 | # Set default font search path |
|---|
| 724 | AC_ARG_WITH([fontpath], |
|---|
| 725 | [AC_HELP_STRING([--with-fontpath=DIR], |
|---|
| 726 | [prepend to default font search path])], |
|---|
| 727 | [with_fontpath=$withval], |
|---|
| 728 | [with_fontpath='']) |
|---|
| 729 | |
|---|
| 730 | if test "$with_fontpath" != "yes" && test -z "$with_fontpath"; then |
|---|
| 731 | with_fontpath='' |
|---|
| 732 | else |
|---|
| 733 | AC_DEFINE_UNQUOTED(MAGICK_FONT_PATH,"$with_fontpath",Define to prepend to default font search path.) |
|---|
| 734 | fi |
|---|
| 735 | if test "$with_fontpath=" != ''; then |
|---|
| 736 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-fontpath=$with_fontpath " |
|---|
| 737 | fi |
|---|
| 738 | |
|---|
| 739 | # Set Ghostscript font directory |
|---|
| 740 | AC_ARG_WITH([gs-font-dir], |
|---|
| 741 | [AC_HELP_STRING([--with-gs-font-dir=DIR], |
|---|
| 742 | [Ghostscript font directory])], |
|---|
| 743 | [with_gs_font_dir=$withval], |
|---|
| 744 | [with_gs_font_dir='default']) |
|---|
| 745 | |
|---|
| 746 | if test "$with_gs_font_dir" != 'default'; then |
|---|
| 747 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gs-font-dir=$with_gs_font_dir " |
|---|
| 748 | fi |
|---|
| 749 | |
|---|
| 750 | # Set Windows font directory |
|---|
| 751 | AC_ARG_WITH([windows-font-dir], |
|---|
| 752 | [AC_HELP_STRING([--with-windows-font-dir=DIR], |
|---|
| 753 | [MS Windows font directory])], |
|---|
| 754 | [with_windows_font_dir=$withval], |
|---|
| 755 | [with_windows_font_dir='']) |
|---|
| 756 | |
|---|
| 757 | if test "x$with_windows_font_dir" = "xno"; then |
|---|
| 758 | with_windows_font_dir= |
|---|
| 759 | fi |
|---|
| 760 | if test "$with_windows_font_dir" != ''; then |
|---|
| 761 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-windows-font-dir=$with_windows_font_dir " |
|---|
| 762 | fi |
|---|
| 763 | |
|---|
| 764 | AC_ARG_WITH([zlib], |
|---|
| 765 | [AC_HELP_STRING([--without-zlib], |
|---|
| 766 | [disable ZLIB support])], |
|---|
| 767 | [with_zlib=$withval], |
|---|
| 768 | [with_zlib='yes']) |
|---|
| 769 | |
|---|
| 770 | if test "$with_zlib" != 'yes'; then |
|---|
| 771 | DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-zlib=$with_zlib " |
|---|
| 772 | fi |
|---|
| 773 | |
|---|
| 774 | # |
|---|
| 775 | # Specify path to shared libstdc++ if not in normal location |
|---|
| 776 | # |
|---|
| 777 | AC_ARG_WITH([libstdc], |
|---|
| 778 | [AC_HELP_STRING([--with-libstdc=DIR], |
|---|
| 779 | [ use libstdc++ in DIR (for GNU C++)])], |
|---|
| 780 | [with_libstdc=$withval], |
|---|
| 781 | [with_libstdc='']) |
|---|
| 782 | |
|---|
| 783 | if test "$with_libstdc" != ''; then |
|---|
| 784 | if test -d "$with_libstdc"; then |
|---|
| 785 | LIBSTDCLDFLAGS="-L$with_libstdc" |
|---|
| 786 | fi |
|---|
| 787 | fi |
|---|
| 788 | AC_SUBST(LIBSTDCLDFLAGS) |
|---|
| 789 | |
|---|
| 790 | # Does gcc required -traditional? |
|---|
| 791 | AC_PROG_GCC_TRADITIONAL |
|---|
| 792 | |
|---|
| 793 | ######## |
|---|
| 794 | # |
|---|
| 795 | # Set defines required to build DLLs and modules using MinGW |
|---|
| 796 | # |
|---|
| 797 | ######## |
|---|
| 798 | # These options are set for multi-thread DLL module build |
|---|
| 799 | # libMagick: _DLL _MAGICKMOD_ _MAGICKLIB_ |
|---|
| 800 | # module: _DLL |
|---|
| 801 | # executable/Magick++: _DLL _MAGICKMOD_ |
|---|
| 802 | MODULE_EXTRA_CPPFLAGS='' |
|---|
| 803 | LIBRARY_EXTRA_CPPFLAGS='' |
|---|
| 804 | if test "${native_win32_build}" = 'yes'; then |
|---|
| 805 | if test "${libtool_build_shared_libs}" = 'yes'; then |
|---|
| 806 | CPPFLAGS="$CPPFLAGS -D_DLL" |
|---|
| 807 | MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_DLL" |
|---|
| 808 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_DLL" |
|---|
| 809 | LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKLIB_" |
|---|
| 810 | if test "$with_modules" = 'yes'; then |
|---|
| 811 | LIBRARY_EXTRA_CPPFLAGS="$LIBRARY_EXTRA_CPPFLAGS -D_MAGICKMOD_" |
|---|
| 812 | else |
|---|
| 813 | MODULE_EXTRA_CPPFLAGS="$MODULE_EXTRA_CPPFLAGS -D_MAGICKLIB_" |
|---|
| 814 | fi |
|---|
| 815 | else |
|---|
| 816 | CPPFLAGS="$CPPFLAGS -D_LIB" |
|---|
| 817 | MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_LIB" |
|---|
| 818 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_LIB" |
|---|
| 819 | fi |
|---|
| 820 | if test "$with_threads" = 'yes'; then |
|---|
| 821 | CPPFLAGS="$CPPFLAGS -D_MT" |
|---|
| 822 | MAGICK_CPPFLAGS="$MAGICK_CPPFLAGS -D_MT" |
|---|
| 823 | MAGICK_PCFLAGS="$MAGICK_PCFLAGS -D_MT" |
|---|
| 824 | fi |
|---|
| 825 | fi |
|---|
| 826 | AC_SUBST(MODULE_EXTRA_CPPFLAGS) |
|---|
| 827 | AC_SUBST(LIBRARY_EXTRA_CPPFLAGS) |
|---|
| 828 | |
|---|
| 829 | # Check standard headers |
|---|
| 830 | AC_HEADER_STDC |
|---|
| 831 | if ! test x"$ac_cv_header_stdc" = x"yes"; then |
|---|
| 832 | AC_MSG_WARN([configure has detected that you do not have the ANSI standard C |
|---|
| 833 | header files. Compilation cannot proceed. Please install the ANSI C |
|---|
| 834 | headers and rerun this script.]); |
|---|
| 835 | fi |
|---|
| 836 | AC_HEADER_DIRENT |
|---|
| 837 | |
|---|
| 838 | # Check additional headers |
|---|
| 839 | AC_CHECK_HEADERS(errno.h fcntl.h inttypes.h limits.h locale.h machine/param.h mach-o/dyld.h stdarg.h string.h strings.h sys/ipc.h sys/resource.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/wait.h unistd.h) |
|---|
| 840 | |
|---|
| 841 | ######## |
|---|
| 842 | # |
|---|
| 843 | # Checks for typedefs, structures, and compiler characteristics. |
|---|
| 844 | # |
|---|
| 845 | ######## |
|---|
| 846 | |
|---|
| 847 | # If the C compiler does not fully support the ANSI C qualifier const, |
|---|
| 848 | # define const to be empty. |
|---|
| 849 | AC_HEADER_STDBOOL |
|---|
| 850 | AC_C_CONST |
|---|
| 851 | AC_C_VOLATILE |
|---|
| 852 | AC_C_STRINGIZE |
|---|
| 853 | AC_HEADER_STAT |
|---|
| 854 | AC_HEADER_TIME |
|---|
| 855 | AC_STRUCT_TM |
|---|
| 856 | |
|---|
| 857 | ######## |
|---|
| 858 | # |
|---|
| 859 | # Checks for typedefs, structures, and compiler characteristics. |
|---|
| 860 | # |
|---|
| 861 | ######## |
|---|
| 862 | |
|---|
| 863 | # If the C compiler does not fully support the ANSI C qualifier const, |
|---|
| 864 | # define const to be empty. |
|---|
| 865 | AC_C_CONST |
|---|
| 866 | |
|---|
| 867 | # If the C compiler supports the keyword inline, do nothing. Otherwise |
|---|
| 868 | # define inline to __inline__ or __inline if it accepts one of those, |
|---|
| 869 | # otherwise define inline to be empty. |
|---|
| 870 | AC_C_INLINE |
|---|
| 871 | |
|---|
| 872 | # If the C compiler supports the keyword restrict, do nothing. Otherwise |
|---|
| 873 | # define restrict to __restrict__ or __restrict if it accepts one of those, |
|---|
| 874 | # otherwise define restrict to be empty. |
|---|
| 875 | AC_C_RESTRICT |
|---|
| 876 | |
|---|
| 877 | # If words are stored with the most significant byte first (like |
|---|
| 878 | # Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'. |
|---|
| 879 | AC_C_BIGENDIAN |
|---|
| 880 | |
|---|
| 881 | # Define mode_t to a suitable type, if standard headers do not define it. |
|---|
| 882 | AC_TYPE_MODE_T |
|---|
| 883 | |
|---|
| 884 | # Define off_t to a suitable type, if standard headers do not define it. |
|---|
| 885 | AC_TYPE_OFF_T |
|---|
| 886 | |
|---|
| 887 | # Define pid_t to a suitable type, if standard headers do not define it. |
|---|
| 888 | AC_TYPE_PID_T |
|---|
| 889 | |
|---|
| 890 | # Define size_t to a suitable type, if standard headers do not define it. |
|---|
| 891 | AC_TYPE_SIZE_T |
|---|
| 892 | |
|---|
| 893 | # Define ssize_t to a suitable type, if standard headers do not define it. |
|---|
| 894 | AC_TYPE_SSIZE_T |
|---|
| 895 | |
|---|
| 896 | # If the C compiler supports a working long double type with more range |
|---|
| 897 | # or precision than the double type, define HAVE_LONG_DOUBLE. |
|---|
| 898 | AC_C_LONG_DOUBLE |
|---|
| 899 | |
|---|
| 900 | # If the C type char is unsigned, define __CHAR_UNSIGNED__, unless the |
|---|
| 901 | # C compiler predefines it. |
|---|
| 902 | AC_C_CHAR_UNSIGNED |
|---|
| 903 | |
|---|
| 904 | # Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT |
|---|
| 905 | AC_CHECK_SIZEOF(signed short) |
|---|
| 906 | |
|---|
| 907 | # Obtain size of an 'unsigned short' and define as SIZEOF_UNSIGNED_SHORT |
|---|
| 908 | AC_CHECK_SIZEOF(unsigned short) |
|---|
| 909 | |
|---|
| 910 | # Obtain size of an 'signed int' and define as SIZEOF_SIGNED_INT |
|---|
| 911 | AC_CHECK_SIZEOF(signed int) |
|---|
| 912 | |
|---|
| 913 | # Obtain size of an 'unsigned int' and define as SIZEOF_UNSIGNED_INT |
|---|
| 914 | AC_CHECK_SIZEOF(unsigned int) |
|---|
| 915 | |
|---|
| 916 | # Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG |
|---|
| 917 | AC_CHECK_SIZEOF(signed long) |
|---|
| 918 | |
|---|
| 919 | # Obtain size of a 'unsigned long' and define as SIZEOF_UNSIGNED_LONG |
|---|
| 920 | AC_CHECK_SIZEOF(unsigned long) |
|---|
| 921 | |
|---|
| 922 | # Obtain size of a 'long long' and define as SIZEOF_SIGNED_LONG_LONG. If |
|---|
| 923 | # 'signed long long' is not supported then the value defined is zero. |
|---|
| 924 | AC_CHECK_SIZEOF(signed long long) |
|---|
| 925 | |
|---|
| 926 | # Obtain size of a 'unsigned long long' and define as |
|---|
| 927 | # SIZEOF_UNSIGNED_LONG_LONG. If 'unsigned long long' is not |
|---|
| 928 | # supported then the value defined is zero. |
|---|
| 929 | AC_CHECK_SIZEOF(unsigned long long) |
|---|
| 930 | |
|---|
| 931 | # Obtain size of off_t and define as SIZEOF_OFF_T |
|---|
| 932 | AC_CHECK_SIZEOF(off_t) |
|---|
| 933 | |
|---|
| 934 | # Obtain size of size_t and define as SIZEOF_SIZE_T |
|---|
| 935 | AC_CHECK_SIZEOF(size_t) |
|---|
| 936 | |
|---|
| 937 | # Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP |
|---|
| 938 | AC_CHECK_SIZEOF(unsigned int*) |
|---|
| 939 | |
|---|
| 940 | # If `signal.h' declares signal as returning a pointer to a function |
|---|
| 941 | # returning void, define RETSIGTYPE to be void; otherwise, define it |
|---|
| 942 | # to be int. |
|---|
| 943 | AC_TYPE_SIGNAL |
|---|
| 944 | |
|---|
| 945 | # |
|---|
| 946 | # Compute sized types for current CPU and compiler options. |
|---|
| 947 | # |
|---|
| 948 | |
|---|
| 949 | AC_MSG_CHECKING(for signed 8-bit type) |
|---|
| 950 | INT8_T='signed char' |
|---|
| 951 | AC_MSG_RESULT($INT8_T) |
|---|
| 952 | AC_SUBST(INT8_T) |
|---|
| 953 | |
|---|
| 954 | AC_MSG_CHECKING(for unsigned 8-bit type) |
|---|
| 955 | UINT8_T='unsigned char' |
|---|
| 956 | AC_MSG_RESULT($UINT8_T) |
|---|
| 957 | AC_SUBST(UINT8_T) |
|---|
| 958 | |
|---|
| 959 | AC_MSG_CHECKING(for signed 16-bit type) |
|---|
| 960 | INT16_T='signed short' |
|---|
| 961 | AC_MSG_RESULT($INT16_T) |
|---|
| 962 | AC_SUBST(INT16_T) |
|---|
| 963 | |
|---|
| 964 | AC_MSG_CHECKING(for unsigned 16-bit type) |
|---|
| 965 | UINT16_T='unsigned short' |
|---|
| 966 | AC_MSG_RESULT($UINT16_T) |
|---|
| 967 | AC_SUBST(UINT16_T) |
|---|
| 968 | |
|---|
| 969 | AC_MSG_CHECKING(for signed 32-bit type) |
|---|
| 970 | INT32_T='none' |
|---|
| 971 | if test $ac_cv_sizeof_signed_int -eq 4; then |
|---|
| 972 | INT32_T='signed int' |
|---|
| 973 | elif test $ac_cv_sizeof_signed_long -eq 4; then |
|---|
| 974 | INT32_T='signed long' |
|---|
| 975 | fi |
|---|
| 976 | AC_MSG_RESULT($INT32_T) |
|---|
| 977 | AC_SUBST(INT32_T) |
|---|
| 978 | |
|---|
| 979 | AC_MSG_CHECKING(for unsigned 32-bit type) |
|---|
| 980 | UINT32_T='none' |
|---|
| 981 | if test $ac_cv_sizeof_unsigned_int -eq 4; then |
|---|
| 982 | UINT32_T='unsigned int' |
|---|
| 983 | elif test $ac_cv_sizeof_unsigned_long -eq 4; then |
|---|
| 984 | UINT32_T='unsigned long' |
|---|
| 985 | fi |
|---|
| 986 | AC_MSG_RESULT($UINT32_T) |
|---|
| 987 | AC_SUBST(UINT32_T) |
|---|
| 988 | |
|---|
| 989 | AC_MSG_CHECKING(for signed 64-bit type) |
|---|
| 990 | INT64_T='none' |
|---|
| 991 | if test $ac_cv_sizeof_signed_long -eq 8; then |
|---|
| 992 | INT64_T='signed long' |
|---|
| 993 | elif test $ac_cv_sizeof_signed_long_long -eq 8; then |
|---|
| 994 | INT64_T='signed long long' |
|---|
| 995 | fi |
|---|
| 996 | AC_MSG_RESULT($INT64_T) |
|---|
| 997 | AC_SUBST(INT64_T) |
|---|
| 998 | |
|---|
| 999 | AC_MSG_CHECKING(for unsigned 64-bit type) |
|---|
| 1000 | UINT64_T='none' |
|---|
| 1001 | if test $ac_cv_sizeof_unsigned_long -eq 8; then |
|---|
| 1002 | UINT64_T='unsigned long' |
|---|
| 1003 | elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then |
|---|
| 1004 | UINT64_T='unsigned long long' |
|---|
| 1005 | fi |
|---|
| 1006 | AC_MSG_RESULT($UINT64_T) |
|---|
| 1007 | AC_SUBST(UINT64_T) |
|---|
| 1008 | |
|---|
| 1009 | AC_MSG_CHECKING(for unsigned maximum type) |
|---|
| 1010 | UINTMAX_T='none' |
|---|
| 1011 | if test "$UINT64_T" != 'none'; then |
|---|
| 1012 | UINTMAX_T=$UINT64_T |
|---|
| 1013 | elif test "$UINT32_T" != 'none'; then |
|---|
| 1014 | UINTMAX_T=$UINT32_T |
|---|
| 1015 | fi |
|---|
| 1016 | AC_MSG_RESULT($UINTMAX_T) |
|---|
| 1017 | AC_SUBST(UINTMAX_T) |
|---|
| 1018 | |
|---|
| 1019 | AC_MSG_CHECKING(for pointer difference type) |
|---|
| 1020 | UINTPTR_T='none' |
|---|
| 1021 | if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp; then |
|---|
| 1022 | UINTPTR_T='unsigned long' |
|---|
| 1023 | elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp; then |
|---|
| 1024 | UINTPTR_T='unsigned long long' |
|---|
| 1025 | fi |
|---|
| 1026 | AC_MSG_RESULT($UINTPTR_T) |
|---|
| 1027 | AC_SUBST(UINTPTR_T) |
|---|
| 1028 | |
|---|
| 1029 | AC_MSG_CHECKING([whether our compiler supports __func__]) |
|---|
| 1030 | AC_TRY_COMPILE([], |
|---|
| 1031 | [{ const char *func = __func__; return(func != 0 ? 0 : 1); }], |
|---|
| 1032 | AC_MSG_RESULT([yes]), |
|---|
| 1033 | AC_MSG_RESULT([no]) |
|---|
| 1034 | AC_MSG_CHECKING([whether our compiler supports __FUNCTION__]) |
|---|
| 1035 | AC_TRY_COMPILE([], |
|---|
| 1036 | [{ const char *func = __FUNCTION__; return(func != 0 ? 0 : 1); }], |
|---|
| 1037 | AC_MSG_RESULT([yes]) |
|---|
| 1038 | AC_DEFINE(__func__, __FUNCTION__, |
|---|
| 1039 | [Define to appropriate substitue if compiler does not have __func__]), |
|---|
| 1040 | AC_MSG_RESULT([no]) |
|---|
| 1041 | AC_DEFINE(__func__, __FILE__, |
|---|
| 1042 | [Define to appropriate substitue if compiler does not have __func__]))) |
|---|
| 1043 | |
|---|
| 1044 | ######## |
|---|
| 1045 | # |
|---|
| 1046 | # Check for functions |
|---|
| 1047 | # |
|---|
| 1048 | ######## |
|---|
| 1049 | MAGICK_FUNC_MMAP_FILEIO |
|---|
| 1050 | AC_FUNC_CLOSEDIR_VOID |
|---|
| 1051 | AC_FUNC_MMAP |
|---|
| 1052 | AC_FUNC_MEMCMP |
|---|
| 1053 | AC_FUNC_SELECT_ARGTYPES |
|---|
| 1054 | AC_FUNC_SETVBUF_REVERSED |
|---|
| 1055 | AC_TYPE_SIGNAL |
|---|
| 1056 | AC_FUNC_STRTOD |
|---|
| 1057 | AC_FUNC_VPRINTF |
|---|
| 1058 | |
|---|
| 1059 | AC_CHECK_FUNCS([_exit atexit clock_gettime execvp floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize gettimeofday lstat memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen pow pread pwrite raise rand_r readlink realpath select seekdir setlocale sqrt setvbuf stat strcspn strdup strpbrk strspn strstr strtol symlink sysconf sigemptyset sigaction strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep vsprintf vsnprintf waitpid _wfopen]) |
|---|
| 1060 | |
|---|
| 1061 | ######## |
|---|
| 1062 | # |
|---|
| 1063 | # Check for function prototypes |
|---|
| 1064 | # |
|---|
| 1065 | ######## |
|---|
| 1066 | |
|---|
| 1067 | AC_CHECK_DECLS([pread, pwrite],[],[],[ |
|---|
| 1068 | #include <unistd.h>]) |
|---|
| 1069 | |
|---|
| 1070 | AC_CHECK_DECLS([strlcpy],[],[],[ |
|---|
| 1071 | #include <strings.h>]) |
|---|
| 1072 | |
|---|
| 1073 | AC_CHECK_DECLS([vsnprintf],[],[],[ |
|---|
| 1074 | #include <stdio.h> |
|---|
| 1075 | #include <stdarg.h>]) |
|---|
| 1076 | |
|---|
| 1077 | ######## |
|---|
| 1078 | # |
|---|
| 1079 | # C++ Support Tests (For Magick++) |
|---|
| 1080 | # |
|---|
| 1081 | ######## |
|---|
| 1082 | have_magick_plus_plus='no' |
|---|
| 1083 | if test "$with_magick_plus_plus" = 'yes'; then |
|---|
| 1084 | OLIBS="$LIBS" |
|---|
| 1085 | LIBS='' |
|---|
| 1086 | AC_LANG_PUSH(C++) |
|---|
| 1087 | |
|---|
| 1088 | # Full set of headers used ... |
|---|
| 1089 | # algorithm cctype cerrno cmath cstdio cstdlib cstring ctime exception |
|---|
| 1090 | # functional iomanip iosfwd iostream iterator list string strstream utility |
|---|
| 1091 | AC_LANG([C++]) |
|---|
| 1092 | AC_PROG_CXX |
|---|
| 1093 | AC_CXX_HAVE_BOOL |
|---|
| 1094 | AC_CXX_HAVE_NAMESPACES |
|---|
| 1095 | AC_CXX_HAVE_STD_NAMESPACE |
|---|
| 1096 | AC_CXX_HAVE_STD_LIBS |
|---|
| 1097 | AC_CXX_HAVE_LSTRING |
|---|
| 1098 | AC_OPENMP([C++]) |
|---|
| 1099 | CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS" |
|---|
| 1100 | AC_LANG_POP |
|---|
| 1101 | |
|---|
| 1102 | AC_MSG_CHECKING([whether C++ compiler is sufficient for Magick++]) |
|---|
| 1103 | if \ |
|---|
| 1104 | test $ac_cv_cxx_have_bool = 'yes' && \ |
|---|
| 1105 | test $ac_cv_cxx_have_lstring = 'yes' && \ |
|---|
| 1106 | test $ac_cv_cxx_have_namespaces = 'yes' && \ |
|---|
| 1107 | test $ac_cv_cxx_have_std_libs = 'yes' && \ |
|---|
| 1108 | test $ac_cv_cxx_have_std_namespace = 'yes'; then |
|---|
| 1109 | have_magick_plus_plus='yes' |
|---|
| 1110 | else |
|---|
| 1111 | have_magick_plus_plus='no (failed tests)' |
|---|
| 1112 | fi |
|---|
| 1113 | AC_MSG_RESULT([$have_magick_plus_plus]) |
|---|
| 1114 | LIBS="$OLIBS" |
|---|
| 1115 | fi |
|---|
| 1116 | AM_CONDITIONAL(WITH_MAGICK_PLUS_PLUS, test "$have_magick_plus_plus" = 'yes') |
|---|
| 1117 | |
|---|
| 1118 | # Only check for delegate libraries in subdirectories if requested. |
|---|
| 1119 | if test "$enable_delegate_build" != 'no'; then |
|---|
| 1120 | # Check for delegate sub-directories and add -I & -L options as required. |
|---|
| 1121 | # This presumes that delegates are installed as detailed in the ImageMagick |
|---|
| 1122 | # README. If delegates are installed in a standard location where the |
|---|
| 1123 | # compiler will automatically find them then these options should not be |
|---|
| 1124 | # required. |
|---|
| 1125 | |
|---|
| 1126 | # |
|---|
| 1127 | # Most delegates have includes in the same directory as the library, but not all ... |
|---|
| 1128 | # |
|---|
| 1129 | # Includes |
|---|
| 1130 | for dir in bzlib fpx jp2 jp2/src/libjasper/include jbig/libjbig jpeg lcms/include magick png tiff/libtiff ttf/include wand wmf/include xml/include zlib; do |
|---|
| 1131 | if test -d "$builddir/$dir"; then |
|---|
| 1132 | CPPFLAGS="$CPPFLAGS -I$builddir/$dir" |
|---|
| 1133 | else |
|---|
| 1134 | if test -d "$srcdirfull/$dir"; then |
|---|
| 1135 | CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir" |
|---|
| 1136 | fi |
|---|
| 1137 | fi |
|---|
| 1138 | done |
|---|
| 1139 | |
|---|
| 1140 | # Libraries |
|---|
| 1141 | for dir in bzlib fpx jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src magick png tiff/libtiff ttf/objs wand wmf/src xml zlib; do |
|---|
| 1142 | if test -d "$builddir/$dir/.libs"; then |
|---|
| 1143 | LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs" |
|---|
| 1144 | else |
|---|
| 1145 | if test -d "$srcdirfull/$dir/.libs"; then |
|---|
| 1146 | LDFLAGS="$LDFLAGS -L$srcdirfull/$dir/.libs" |
|---|
| 1147 | fi |
|---|
| 1148 | fi |
|---|
| 1149 | if test -d "$builddir/$dir"; then |
|---|
| 1150 | LDFLAGS="$LDFLAGS -L$builddir/$dir" |
|---|
| 1151 | else |
|---|
| 1152 | if test -d "$srcdirfull/$dir"; then |
|---|
| 1153 | LDFLAGS="$LDFLAGS -L$srcdirfull/$dir" |
|---|
| 1154 | fi |
|---|
| 1155 | fi |
|---|
| 1156 | done |
|---|
| 1157 | fi |
|---|
| 1158 | |
|---|
| 1159 | # Assume that delegate headers reside under same directory as ImageMagick |
|---|
| 1160 | # installation prefix. |
|---|
| 1161 | MAGICK_CPPFLAGS="-I$INCLUDE_DIR $MAGICK_CPPFLAGS" |
|---|
| 1162 | |
|---|
| 1163 | # |
|---|
| 1164 | # Find the X11 RGB database |
|---|
| 1165 | # |
|---|
| 1166 | AC_CACHE_CHECK(for X11 configure files,im_cv_x_configure, |
|---|
| 1167 | [# Look for the header file in a standard set of common directories. |
|---|
| 1168 | # Check X11 before X11Rn because it is often a symlink to the current release. |
|---|
| 1169 | for ac_dir in \ |
|---|
| 1170 | /lib/usr/lib/X11 \ |
|---|
| 1171 | /usr/X11/lib \ |
|---|
| 1172 | /usr/X11R4/lib \ |
|---|
| 1173 | /usr/X11R5/lib \ |
|---|
| 1174 | /usr/X11R6/lib \ |
|---|
| 1175 | /usr/X386/lib \ |
|---|
| 1176 | /usr/XFree86/lib/X11 \ |
|---|
| 1177 | /usr/athena/lib \ |
|---|
| 1178 | /usr/lib \ |
|---|
| 1179 | /usr/lib/X11 \ |
|---|
| 1180 | /usr/lib/X11R4 \ |
|---|
| 1181 | /usr/lib/X11R5 \ |
|---|
| 1182 | /usr/lib/X11R6 \ |
|---|
| 1183 | /usr/local/X11/lib \ |
|---|
| 1184 | /usr/local/X11R4/lib \ |
|---|
| 1185 | /usr/local/X11R5/lib \ |
|---|
| 1186 | /usr/local/X11R6/lib \ |
|---|
| 1187 | /usr/local/lib \ |
|---|
| 1188 | /usr/local/lib/X11 \ |
|---|
| 1189 | /usr/local/lib/X11R4 \ |
|---|
| 1190 | /usr/local/lib/X11R5 \ |
|---|
| 1191 | /usr/local/lib/X11R6 \ |
|---|
| 1192 | /usr/local/x11r5/lib \ |
|---|
| 1193 | /usr/lpp/Xamples/lib \ |
|---|
| 1194 | /usr/openwin/lib \ |
|---|
| 1195 | /usr/openwin/share/lib \ |
|---|
| 1196 | /usr/unsupported/lib \ |
|---|
| 1197 | /usr/x386/lib \ |
|---|
| 1198 | ; do |
|---|
| 1199 | if test -f "$ac_dir/X11/rgb.txt"; then |
|---|
| 1200 | im_cv_x_configure="$ac_dir/X11/" |
|---|
| 1201 | break |
|---|
| 1202 | elif test -f "$ac_dir/rgb.txt"; then |
|---|
| 1203 | im_cv_x_configure="$ac_dir/" |
|---|
| 1204 | break |
|---|
| 1205 | fi |
|---|
| 1206 | |
|---|
| 1207 | done]) |
|---|
| 1208 | X11_CONFIGURE_PATH="$im_cv_x_configure" |
|---|
| 1209 | if test "$native_win32_build" = 'yes'; then |
|---|
| 1210 | X11_CONFIGURE_PATH=`$WinPathScript "$X11ConfigurePath=" 1` |
|---|
| 1211 | fi |
|---|
| 1212 | AC_DEFINE_UNQUOTED(X11_CONFIGURE_PATH,"$X11ConfigurePath",Location of X11 configure files) |
|---|
| 1213 | |
|---|
| 1214 | # |
|---|
| 1215 | # Find OpenMP library |
|---|
| 1216 | # |
|---|
| 1217 | GOMP_LIBS='' |
|---|
| 1218 | if test "$enable_openmp" != 'no'; then |
|---|
| 1219 | AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,) |
|---|
| 1220 | LIBS="$GOMP_LIBS $LIBS" |
|---|
| 1221 | fi |
|---|
| 1222 | AC_SUBST(GOMP_LIBS) |
|---|
| 1223 | |
|---|
| 1224 | # |
|---|
| 1225 | # Find Posix threads library |
|---|
| 1226 | # |
|---|
| 1227 | THREAD_LIBS='' |
|---|
| 1228 | if test "$with_threads" != 'no' && test "$have_threads" = 'yes'; then |
|---|
| 1229 | |
|---|
| 1230 | if test "x$PTHREAD_LIBS" = "x"; then |
|---|
| 1231 | case "${host_cpu}-${host_os}" in |
|---|
| 1232 | *-freebsd*) |
|---|
| 1233 | MAGICK_CHECK_PTHREAD_LIB(c_r,PTHREAD_LIBS=-lc_r) ;; |
|---|
| 1234 | esac |
|---|
| 1235 | fi |
|---|
| 1236 | |
|---|
| 1237 | for lib in pthread pthreads; do |
|---|
| 1238 | if test "x$PTHREAD_LIBS" = "x"; then |
|---|
| 1239 | MAGICK_CHECK_PTHREAD_LIB([$lib],[PTHREAD_LIBS=-l$lib]) |
|---|
| 1240 | fi |
|---|
| 1241 | done |
|---|
| 1242 | |
|---|
| 1243 | THREAD_LIBS="$PTHREAD_LIBS" |
|---|
| 1244 | LIBS="$LIBS $THREAD_LIBS" |
|---|
| 1245 | fi |
|---|
| 1246 | AC_SUBST(THREAD_LIBS) |
|---|
| 1247 | |
|---|
| 1248 | # |
|---|
| 1249 | # Add support for ccmalloc memory debugging library if requested |
|---|
| 1250 | # |
|---|
| 1251 | have_ccmalloc='no' |
|---|
| 1252 | CCMALLOC_LIBS='' |
|---|
| 1253 | if test "$enable_ccmalloc" = 'yes'; then |
|---|
| 1254 | AC_PATH_PROG(CCMALLOCDelegate,ccmalloc,) |
|---|
| 1255 | if test -n "$CCMALLOCDelegate"; then |
|---|
| 1256 | eval `grep PREFIX= $CCMALLOCDelegate | sed -e 's/PREFIX/CCMALLOC_PREFIX/'` |
|---|
| 1257 | OLIBS="$LIBS" |
|---|
| 1258 | # Assume that gcc is used with ccmalloc. |
|---|
| 1259 | LIBS="$LIBS $CCMALLOC_PREFIX/lib/ccmalloc-gcc.o" |
|---|
| 1260 | AC_CHECK_LIB(ccmalloc,ccmalloc_malloc,CCMALLOC_LIBS="$CCMALLOC_PREFIX/lib/ccmalloc-gcc.o -lccmalloc -ldl",,-ldl) |
|---|
| 1261 | if test -n "$CCMALLOC_LIBS"; then |
|---|
| 1262 | LIBS="$OLIBS" |
|---|
| 1263 | LIBS="$LIBS $CCMALLOC_LIBS" |
|---|
| 1264 | have_ccmalloc='yes' |
|---|
| 1265 | else |
|---|
| 1266 | LIBS="$OLIBS" |
|---|
| 1267 | fi |
|---|
| 1268 | fi |
|---|
| 1269 | fi |
|---|
| 1270 | |
|---|
| 1271 | # |
|---|
| 1272 | # Add support for efence memory debugging library if requested |
|---|
| 1273 | # |
|---|
| 1274 | if test "$enable_efence" = 'yes'; then |
|---|
| 1275 | EFENCE_LIBS='-lefence' |
|---|
| 1276 | LIBS="$EFENCE_LIBS $LIBS" |
|---|
| 1277 | fi |
|---|
| 1278 | |
|---|
| 1279 | # |
|---|
| 1280 | # Find math library |
|---|
| 1281 | # |
|---|
| 1282 | MATH_LIBS='' |
|---|
| 1283 | AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,) |
|---|
| 1284 | LIBS="$MATH_LIBS $LIBS" |
|---|
| 1285 | AC_SUBST(MATH_LIBS) |
|---|
| 1286 | |
|---|
| 1287 | # |
|---|
| 1288 | # Check for ZLIB |
|---|
| 1289 | # |
|---|
| 1290 | have_zlib='no' |
|---|
| 1291 | ZLIB_LIBS='' |
|---|
| 1292 | dnl PNG requires zlib so enable zlib check if PNG is requested |
|---|
| 1293 | if test "$with_zlib" != 'no' || test "$with_png" != 'no'; then |
|---|
| 1294 | AC_MSG_RESULT([-------------------------------------------------------------]) |
|---|
| 1295 | AC_MSG_RESULT([Checking for ZLIB support]) |
|---|
| 1296 | AC_MSG_RESULT([-------------------------------------------------------------]) |
|---|
| 1297 | ZLIB_LIBS='' |
|---|
| 1298 | failed=0; |
|---|
| 1299 | passed=0; |
|---|
| 1300 | AC_CHECK_HEADER(zconf.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
|---|
| 1301 | AC_CHECK_HEADER(zlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
|---|
| 1302 | AC_CHECK_LIB(z,compress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
|---|
| 1303 | AC_CHECK_LIB(z,uncompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
|---|
| 1304 | AC_CHECK_LIB(z,deflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
|---|
| 1305 | AC_CHECK_LIB(z,inflate,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
|---|
| 1306 | AC_CHECK_LIB(z,gzseek,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
|---|
| 1307 | AC_CHECK_LIB(z,gztell,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
|---|
| 1308 | AC_MSG_CHECKING([if ZLIB package is complete]) |
|---|
| 1309 | if test $passed -gt 0; then |
|---|
| 1310 | if test $failed -gt 0; then |
|---|
| 1311 | AC_MSG_RESULT([no -- some components failed test]) |
|---|
| 1312 | have_zlib='no (failed tests)' |
|---|
| 1313 | else |
|---|
| 1314 | ZLIB_LIBS='-lz' |
|---|
| 1315 | LIBS="$ZLIB_LIBS $LIBS" |
|---|
| 1316 | AC_DEFINE(ZLIB_DELEGATE,1,Define if you have zlib compression library) |
|---|
| 1317 | AC_MSG_RESULT([yes]) |
|---|
| 1318 | have_zlib='yes' |
|---|
| 1319 | fi |
|---|
| 1320 | else |
|---|
| 1321 | AC_MSG_RESULT([no]) |
|---|
| 1322 | fi |
|---|
| 1323 | fi |
|---|
| 1324 | AM_CONDITIONAL(ZLIB_DELEGATE, test "$have_zlib" = 'yes') |
|---|
| 1325 | AC_SUBST(ZLIB_LIBS) |
|---|
| 1326 | |
|---|
| 1327 | # |
|---|
| 1328 | # Check for BZLIB |
|---|
| 1329 | # |
|---|
| 1330 | have_bzlib='no' |
|---|
| 1331 | if test "$with_bzlib" != 'no'; then |
|---|
| 1332 | BZLIB_LIBS='' |
|---|
| 1333 | AC_MSG_RESULT([-------------------------------------------------------------]) |
|---|
| 1334 | AC_MSG_RESULT([Checking for BZLIB support]) |
|---|
| 1335 | AC_MSG_RESULT([-------------------------------------------------------------]) |
|---|
| 1336 | failed=0; |
|---|
| 1337 | passed=0; |
|---|
| 1338 | AC_CHECK_HEADER(bzlib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`) |
|---|
| 1339 | AC_CHECK_LIB(bz2,BZ2_bzCompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
|---|
| 1340 | AC_CHECK_LIB(bz2,BZ2_bzDecompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,) |
|---|
| 1341 | AC_MSG_CHECKING([if BZLIB package is complete]) |
|---|
| 1342 | if test $passed -gt 0; then |
|---|
| 1343 | if test $failed -gt 0; then |
|---|
| 1344 | AC_MSG_RESULT([no -- some components failed test]) |
|---|
| 1345 | have_bzlib='no (failed tests)' |
|---|
| 1346 | else |
|---|
| 1347 | BZLIB_LIBS='-lbz2' |
|---|
| 1348 | LIBS="$BZLIB_LIBS $LIBS" |
|---|
| 1349 | AC_DEFINE(BZLIB_DELEGATE,1,Define if you have the bzip2 library) |
|---|
| 1350 | AC_MSG_RESULT([yes]) |
|---|
| 1351 | have_bzlib='yes' |
|---|
| 1352 | fi |
|---|
| 1353 | else |
|---|
| 1354 | AC_MSG_RESULT([no]) |
|---|
| 1355 | fi |
|---|
| 1356 | fi |
|---|
| 1357 | AM_CONDITIONAL(BZLIB_DELEGATE, test "$have_bzlib" = 'yes') |
|---|
| 1358 | AC_SUBST(BZLIB_LIBS) |
|---|
| 1359 | |
|---|
| 1360 | # |
|---|
| 1361 | # Find the X11 include and library directories. |
|---|
| 1362 | # |
|---|
| 1363 | IPC_LIBS='' |
|---|
| 1364 | X11_LIBS='' |
|---|
| 1365 | XEXT_LIBS='' |
|---|
| 1366 | XT_LIBS='' |
|---|
| 1367 | AC_PATH_XTRA |
|---|
| 1368 | if test "$no_x" != 'yes'; then |
|---|
| 1369 | AC_MSG_RESULT([-------------------------------------------------------------]) |
|---|
| 1370 | AC_MSG_RESULT([Checking for X11 support]) |
|---|
| 1371 | AC_MSG_RESULT([-------------------------------------------------------------]) |
|---|