#
# Copyright (C) 2003 - 2008 GraphicsMagick Group
-AC_PREREQ(2.63)
-AC_INIT([ImageMagick],[6.6.1],[http://www.imagemagick.org],[ImageMagick])
+AC_PREREQ(2.64)
+AC_INIT([ImageMagick],[6.6.5],[http://www.imagemagick.org],[ImageMagick])
AC_CONFIG_SRCDIR([magick/MagickCore.h])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
MAGICK_PCFLAGS=$CPPFLAGS_USER
MAGICK_LDFLAGS=''
MAGICK_LIBS=''
+MAGICK_FEATURES=''
#
# Evaluate shell variable equivalents to Makefile directory variables
AC_PROG_CC_C99
AM_PROG_CC_C_O
AX_CFLAGS_WARN_ALL
-AC_INCLUDES_DEFAULT
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S
AM_WITH_DMALLOC
-PKG_PROG_PKG_CONFIG
AX_C___ATTRIBUTE__
+PKG_PROG_PKG_CONFIG
#
# Enable run-time checking.
#
AC_EXEEXT
AC_OBJEXT
+AX_LANG_COMPILER_MS
GDI32_LIBS=''
native_win32_build='no'
dnl Platform-specific stuff
case "$host" in
*darwin* | *-macos10*)
- if test -d /opt/local ; then
- CPPFLAGS="$CPPFLAGS -I/opt/local/include"
- LDFLAGS="$LDFLAGS -L/opt/local/lib"
- elif test -d /sw ; then
- CPPFLAGS="$CPPFLAGS -I/sw/include"
- LDFLAGS="$LDFLAGS -L/sw/lib"
- fi
dnl OS X universal binary support, requires --disable-dependency-tracking
AC_ARG_ENABLE([osx-universal-binary],
AC_HELP_STRING([--enable-osx-universal-binary],
# Enable support for threads
AC_ARG_WITH([threads],
- [AC_HELP_STRING([--without-threads],
- [disable threads support])],
+ [AC_HELP_STRING([--without-threads], [disable threads support])],
[with_threads=$withval],
[with_threads='yes'])
AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
CC="$PTHREAD_CC"
fi
+ AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.])
fi
fi
CFLAGS="$OPENMP_CFLAGS $CFLAGS"
MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
AC_SUBST(OPENMP_CFLAGS)
+if test "$enable_openmp" != no; then
+ if test "$ac_cv_prog_c_openmp" != 'unsupported'; then
+ MAGICK_FEATURES="OpenMP $MAGICK_FEATURES"
+ fi
+fi
# Enable support for OpenCL
AX_OPENCL([C])
CFLAGS="$CL_CFLAGS $CFLAGS"
LIBS="$CL_LIBS $LIBS"
AC_SUBST(CL_CFLAGS)
+if test "$enable_opencl" != no; then
+ if test "_OPENCL" = '1'; then
+ MAGICK_FEATURES="OpenCL $MAGICK_FEATURES"
+ fi
+fi
########
#
if test "$enable_hdri" = 'yes'; then
MAGICK_HDRI="HDRI"
AC_DEFINE(HDRI_SUPPORT,1,[accurately represent the wide range of intensity levels in real scenes])
+ MAGICK_FEATURES="HDRI $MAGICK_FEATURES"
fi
AC_SUBST(MAGICK_HDRI)dnl
16 ) ;;
32 ) ;;
64 ) ;;
- * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, or 32") ;;
+ * ) AC_MSG_ERROR("Pixel quantum depth must have value of 8, 16, 32, or 64") ;;
esac
+if test "$enable_hdri" = 'yes'; then
+ with_quantum_depth=16
+fi
QUANTUM_DEPTH="$with_quantum_depth"
AC_DEFINE_UNQUOTED(QUANTUM_DEPTH,$QUANTUM_DEPTH,[Number of bits in a pixel Quantum (8/16/32/64)])
AC_SUBST(QUANTUM_DEPTH)dnl
# Obtain size of size_t and define as SIZEOF_SIZE_T
AC_CHECK_SIZEOF(size_t)
+# Obtain size of ssize_t and define as SIZEOF_SSIZE_T
+AC_CHECK_SIZEOF(ssize_t)
+
# Obtain size of an unsigned int pointer and define as SIZEOF_UNSIGNED_INTP
AC_CHECK_SIZEOF(unsigned int*)
LIBS="$MATH_LIBS $LIBS"
AC_SUBST(MATH_LIBS)
-AC_CHECK_FUNCS([_exit atexit cimag clock directio execvp fchmod floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite 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 usleep utime vsprintf vsnprintf waitpid _wfopen _wstat])
+AC_CHECK_FUNCS([atoll atexit cimag 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])
#
# Check for clock_gettime().
#
# Check for LCMS delegate library.
#
+# Disable LCMS.
AC_ARG_WITH(lcms,
- [AC_HELP_STRING([--without-lcms],
- [disable LCMS support])],
- [with_lcms=$withval],
- [with_lcms='yes'])
-
-if test "$with_lcms" != 'yes'; then
+ [ --without-lcms disable lcms (v1.1X) support],
+ [with_lcms=$withval],
+ [with_lcms='yes'])
+if test "$with_lcms" != 'yes' ; then
DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms=$with_lcms "
fi
-have_lcms='no'
+# Disable LCMS2.
+AC_ARG_WITH(lcms2,
+ [ --without-lcms2 disable lcms (v2.X) support],
+ [with_lcms2=$withval],
+ [with_lcms2='yes'])
+if test "$with_lcms2" != 'yes' ; then
+ DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-lcms2=$with_lcms2 "
+fi
+
+have_lcms2='no'
LCMS_LIBS=''
-if test "$with_lcms" != 'no'; then
+if test "$with_lcms2" != 'no'; then
AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for LCMS])
- AC_MSG_RESULT([])
+ AC_MSG_CHECKING([for LCMS v2])
+ AC_MSG_RESULT()
failed=0
passed=0
have_lcms_header='no'
+
+ # Check for <lcms2.h>
AC_CHECK_HEADER(lcms2.h,have_lcms_header='yes',,)
if test "$have_lcms_header" = 'yes'; then
+ AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
+ passed=`expr $passed + 1`
+ fi
+
+ # Check for <lcms2/lcms2.h)
+ if test "$have_lcms_header" != 'yes'; then
+ AC_CHECK_HEADER(lcms2/lcms2.h,have_lcms_header='yes',,)
+ if test "$have_lcms_header" = 'yes'; then
passed=`expr $passed + 1`
- AC_DEFINE(HAVE_LCMS2_H,1,Define if you have the <lcms2.h> header file.)
- else
- AC_CHECK_HEADER(lcms/lcms2.h,have_lcms_header='yes',,)
- if test "$have_lcms_header" = 'yes'; then
- passed=`expr $passed + 1`
- AC_DEFINE(HAVE_LCMS_LCMS2_H,1,Define if you have the <lcms/lcms2.h> header file.)
- else
- failed=`expr $failed + 1`
- fi
+ AC_DEFINE(HAVE_LCMS2_LCMS2_H,1,Define if you have the <lcms2/lcms2.h> header file.)
+ fi
+ fi
+
+ # Failed to find lcms header?
+ if test "$have_lcms_header" != 'yes'; then
+ failed=`expr $failed + 1`
fi
- AC_CHECK_LIB(lcms2,cmsOpenProfileFromMem,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_MSG_CHECKING([if LCMS2 package is complete])
+
+ AC_CHECK_LIB(lcms2,cmsSetLogErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
+ AC_MSG_CHECKING(if LCMS v2 package is complete)
if test $passed -gt 0; then
- if test $failed -gt 0; then
- AC_MSG_RESULT([no -- some components failed test])
- have_lcms='no (failed tests)'
- else
- LCMS_LIBS='-llcms2'
- LIBS="$LCMS_LIBS $LIBS"
- AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library)
- AC_MSG_RESULT([yes])
- have_lcms='yes'
- fi
+ if test $failed -gt 0; then
+ AC_MSG_RESULT(no -- some components failed test)
+ have_lcms2='no (failed tests)'
+ else
+ LCMS_LIBS='-llcms2'
+ LIBS="$LCMS_LIBS $LIBS"
+ AC_MSG_RESULT(yes)
+ have_lcms2='yes'
+ fi
else
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT(no)
fi
fi
+#
+# Check for LCMS v1 (1.11 or later)
+#
+if test $have_lcms2 = 'yes'; then
+ with_lcms='no'
+fi
+
+have_lcms='no'
if test "$with_lcms" != 'no'; then
-if test "$have_lcms" == 'no'; then
AC_MSG_RESULT([-------------------------------------------------------------])
- AC_MSG_CHECKING([for LCMS])
- AC_MSG_RESULT([])
+ AC_MSG_CHECKING([for LCMS v1.1X])
+ AC_MSG_RESULT()
failed=0
passed=0
have_lcms_header='no'
- AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
- if test "$have_lcms_header" = 'yes'; then
+
+ # Check for <lcms.h>
+ if test "$have_lcms_header" != 'yes'; then
+ AC_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
+ if test "$have_lcms_header" = 'yes'; then
passed=`expr $passed + 1`
AC_DEFINE(HAVE_LCMS_H,1,Define if you have the <lcms.h> header file.)
- else
- AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
- if test "$have_lcms_header" = 'yes'; then
- passed=`expr $passed + 1`
- AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
- else
- failed=`expr $failed + 1`
- fi
+ fi
+ fi
+
+ # Check for <lcms/lcms.h>
+ if test "$have_lcms_header" != 'yes'; then
+ AC_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
+ if test "$have_lcms_header" = 'yes'; then
+ passed=`expr $passed + 1`
+ AC_DEFINE(HAVE_LCMS_LCMS_H,1,Define if you have the <lcms/lcms.h> header file.)
+ fi
+ fi
+
+ # Failed to find lcms header?
+ if test "$have_lcms_header" != 'yes'; then
+ failed=`expr $failed + 1`
fi
- AC_CHECK_LIB(lcms,cmsOpenProfileFromMem,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
- AC_MSG_CHECKING([if LCMS package is complete])
+
+ AC_CHECK_LIB(lcms,cmsSetErrorHandler,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
+ AC_MSG_CHECKING(if LCMS package is complete)
if test $passed -gt 0; then
- if test $failed -gt 0; then
- AC_MSG_RESULT([no -- some components failed test])
- have_lcms='no (failed tests)'
- else
- LCMS_LIBS='-llcms'
- LIBS="$LCMS_LIBS $LIBS"
- AC_DEFINE(LCMS_DELEGATE,1,Define if you have LCMS library)
- AC_MSG_RESULT([yes])
- have_lcms='yes'
- fi
+ if test $failed -gt 0; then
+ AC_MSG_RESULT(no -- some components failed test)
+ have_lcms='no (failed tests)'
+ else
+ LCMS_LIBS='-llcms'
+ LIBS="$LCMS_LIBS $LIBS"
+ AC_MSG_RESULT(yes)
+ have_lcms='yes'
+ fi
else
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT(no)
fi
fi
+
+AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes')
+if test "$have_lcms2" = 'yes' -o "$have_lcms" = 'yes'; then
+ AC_DEFINE(LCMS_DELEGATE,1,[Define if you have LCMS (v1.11 or later) library])
fi
-AM_CONDITIONAL(LCMS_DELEGATE, test "$have_lcms" = 'yes')
AC_SUBST(LCMS_LIBS)
+
dnl ===========================================================================
#
AC_CHECK_HEADER(tiffio.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
AC_CHECK_LIB(tiff,TIFFOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
AC_CHECK_LIB(tiff,TIFFClientOpen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
+ AC_CHECK_LIB(tiff,TIFFIsBigEndian,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
AC_CHECK_LIB(tiff,TIFFIsByteSwapped,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
AC_CHECK_LIB(tiff,TIFFReadRGBATile,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
AC_CHECK_LIB(tiff,TIFFReadRGBAStrip,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
MANDelegateDefault='groff'
MPEGDecodeDelegateDefault='ffmpeg'
MPEGEncodeDelegateDefault='ffmpeg'
+MrSIDDecodeDelegateDefault='mrsidgeodecode'
MVDelegateDefault='mv'
PCLDelegateDefault='pcl6'
PGPDecodeDelegateDefault='pgpv'
RSVGDecodeDelegateDefault='rsvg'
SCANDecodeDelegateDefault='scanimage'
TXTDelegateDefault='enscript'
+UniconvertorDelegateDefault='uniconvertor'
+WEBPDelegateDefault='webpconv'
WMFDecodeDelegateDefault='wmf2eps'
WWWDecodeDelegateDefault='curl'
XPSDelegateDefault='gxps'
AC_PATH_PROG(MANDelegate, "$MANDelegateDefault", "$MANDelegateDefault")
AC_PATH_PROG(MPEGDecodeDelegate, "$MPEGDecodeDelegateDefault", "$MPEGDecodeDelegateDefault")
AC_PATH_PROG(MPEGEncodeDelegate, "$MPEGEncodeDelegateDefault", "$MPEGEncodeDelegateDefault")
+AC_PATH_PROG(MrSIDDecodeDelegate, "$MrSIDDecodeDelegateDefault", "$MrSIDDecodeDelegateDefault")
AC_PATH_PROG(MVDelegate, "$MVDelegateDefault", "$MVDelegateDefault")
AC_PATH_PROG(PCLDelegate, "$PCLDelegateDefault", "$PCLDelegateDefault")
AC_PATH_PROG(PGPDecodeDelegate, "$PGPDecodeDelegateDefault", "$PGPDecodeDelegateDefault")
AC_PATH_PROG(RSVGDecodeDelegate, "$RSVGDecodeDelegateDefault", "$RSVGDecodeDelegateDefault")
AC_PATH_PROG(SCANDecodeDelegate, "$SCANDecodeDelegateDefault", "$SCANDecodeDelegateDefault")
AC_PATH_PROG(TXTDelegate, "$TXTDelegateDefault", "$TXTDelegateDefault")
+AC_PATH_PROG(UniconvertorDelegate, "$UniconvertorDelegateDefault", "$UniconvertorDelegateDefault")
+AC_PATH_PROG(WEBPDelegate, "$WEBPDelegateDefault", "$WEBPDelegateDefault")
AC_PATH_PROG(WMFDecodeDelegate, "$WMFDecodeDelegateDefault", "$WMFDecodeDelegateDefault")
AC_PATH_PROG(WWWDecodeDelegate, "$WWWDecodeDelegateDefault", "$WWWDecodeDelegateDefault")
AC_PATH_PROG(XPSDelegate, "$XPSDelegateDefault", "$XPSDelegateDefault")
have_hp2xx='no' ; if test "$HPGLDecodeDelegate" != "$HPGLDecodeDelegateDefault" ; then have_hp2xx='yes'; fi
have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != "$ILBMDecodeDelegateDefault" ; then have_ilbmtoppm='yes'; fi
have_mplayer='no'; if test "$AVIDecodeDelegate" != "$AVIDecodeDelegateDefault" ; then have_mplayer='yes'; fi
+have_mrsid='no'; if test "$MrSIDDecodeDelegate" != "$MrSIDDecodeDelegateDefault" ; then have_mrsid='yes'; fi
have_pcl='no' ; if test "$PCLDelegate" != "$PCLDelegateDefault"; then have_pcl='yes'; fi
have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != "$ILBMEncodeDelegateDefault" ; then have_ppmtoilbm='yes'; fi
have_ra_pfm='no' ; if test "$HDRDecodeDelegate" != "$HDRDecodeDelegateDefault" ; then have_ra_pfm='yes'; fi
MANDelegate="$MANDelegateDefault"
MPEGDecodeDelegate="$MPEGDecodeDelegateDefault"
MPEGEncodeDelegate="$MPEGEncodeDelegateDefault"
- MVDelegate="$MVDelegateDefault"
MogrifyDelegate="$MogrifyDelegateDefault"
+ MrSIDDecodeDelegate="$MrSIDDecodeDelegateDefault"
+ MVDelegate="$MVDelegateDefault"
PCLDelegate="$PCLDelegateDefault"
PGPDecodeDelegate="$PGPDecodeDelegateDefault"
POVDelegate="$POVDelegateDefault"
SCANDecodeDelegate="$SCANDecodeDelegateDefault"
ShowImageDelegate="$ShowImageDelegateDefault"
TXTDelegate="$TXTDelegateDefault"
+ UniconvertorDelegate="$UniconvertorDelegateDefault"
+ WEBPDelegate="$WEBPDelegateDefault"
WMFDecodeDelegate="$WMFDecodeDelegateDefault"
WWWDecodeDelegate="$WWWDecodeDelegateDefault"
XPSDelegate="$XPSDelegateDefault"
AC_SUBST(MANDelegate)
AC_SUBST(MPEGDecodeDelegate)
AC_SUBST(MPEGEncodeDelegate)
-AC_SUBST(MVDelegate)
AC_SUBST(MogrifyDelegate)
+AC_SUBST(MrSIDDecodeDelegate)
+AC_SUBST(MVDelegate)
AC_SUBST(PCLDelegate)
AC_SUBST(PGPDecodeDelegate)
AC_SUBST(POVDelegate)
AC_SUBST(SCANDecodeDelegate)
AC_SUBST(ShowImageDelegate)
AC_SUBST(TXTDelegate)
+AC_SUBST(UniconvertorDelegate)
+AC_SUBST(WEBPDelegate)
AC_SUBST(WMFDecodeDelegate)
AC_SUBST(WWWDecodeDelegate)
AC_SUBST(XPSDelegate)
if test "$have_png" = 'yes'; then DELEGATES="$DELEGATES jng"; fi
fi
if test "$have_jp2" = 'yes'; then DELEGATES="$DELEGATES jp2"; fi
+if test "$have_lcms2" = 'yes'; then DELEGATES="$DELEGATES lcms2"; fi
if test "$have_lcms" = 'yes'; then DELEGATES="$DELEGATES lcms"; fi
if test "$have_lqr" = 'yes'; then DELEGATES="$DELEGATES lqr"; fi
if test "$have_ffmpeg" = 'yes'; then DELEGATES="$DELEGATES mpeg"; fi
AC_SUBST(MAGICK_PCFLAGS)
AC_SUBST(MAGICK_LDFLAGS)
AC_SUBST(MAGICK_LIBS)
+AC_SUBST(MAGICK_FEATURES)
# Set configured scripts to executable.
AC_CONFIG_COMMANDS([default],[],[])
JBIG --with-jbig=$with_jbig $have_jbig
JPEG v1 --with-jpeg=$with_jpeg $have_jpeg
JPEG-2000 --with-jp2=$with_jp2 $have_jp2
-LCMS --with-lcms=$with_lcms $have_lcms
+LCMS v1 --with-lcms=$with_lcms $have_lcms
+LCMS v2 --with-lcms2=$with_lcms2 $have_lcms2
LQR --with-lqr=$with_lqr $have_lqr
Magick++ --with-magick-plus-plus=$with_magick_plus_plus $have_magick_plus_plus
OpenEXR --with-openexr=$with_openexr $have_openexr
LIBS = $MAGICK_LIBS
CXX = $CXX
CXXFLAGS = $CXXFLAGS
+ FEATURES = $MAGICK_FEATURES
])