diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 247 |
1 files changed, 239 insertions, 8 deletions
@@ -633,6 +633,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +MAGICK_API_DEP_LIBS MAGICK_API_LIBS MAGICK_API_LDFLAGS MAGICK_API_PC_CPPFLAGS @@ -689,6 +690,7 @@ GPG GRAPHICSMAGICK_SNAPSHOT_COPY TXT2HTML RST2HTML +PYTHON HasPSDelegate_FALSE HasPSDelegate_TRUE PrintDelegate @@ -737,6 +739,8 @@ xml2_config LIB_HEIF HasHEIF_FALSE HasHEIF_TRUE +HEIF_LIBS +HEIF_CFLAGS LIB_WEBP HasWEBP_FALSE HasWEBP_TRUE @@ -820,6 +824,8 @@ MAGICK_SSIZE_T_F MAGICK_SSIZE_T MAGICK_SIZE_T_F MAGICK_SIZE_T +PTRDIFF_F +PTRDIFF_T UINTPTR_F UINTPTR_T UINTMAX_F @@ -895,6 +901,7 @@ LN_S LD FGREP SED +top_srcdir_native DIRSEP MAGICK_FILTER_MODULE_PATH MAGICK_CONFIGURE_BUILD_PATH @@ -1116,6 +1123,8 @@ PKG_CONFIG_PATH PKG_CONFIG_LIBDIR FT_CFLAGS FT_LIBS +HEIF_CFLAGS +HEIF_LIBS XML_CFLAGS XML_LIBS' @@ -1850,6 +1859,8 @@ Some influential environment variables: path overriding pkg-config's built-in search path FT_CFLAGS C compiler flags for FT, overriding pkg-config FT_LIBS linker flags for FT, overriding pkg-config + HEIF_CFLAGS C compiler flags for HEIF, overriding pkg-config + HEIF_LIBS linker flags for HEIF, overriding pkg-config XML_CFLAGS C compiler flags for XML, overriding pkg-config XML_LIBS linker flags for XML, overriding pkg-config @@ -5516,6 +5527,7 @@ MAGICK_CODER_MODULE_PATH="${builddir}/coders" MAGICK_CONFIGURE_SRC_PATH="${srcdirfull}/config" MAGICK_CONFIGURE_BUILD_PATH="${builddir}/config" MAGICK_FILTER_MODULE_PATH="${builddir}/filters" +top_srcdir_native=${srcdirfull} DIRSEP=':' case "${build_os}" in mingw* ) @@ -5523,6 +5535,7 @@ case "${build_os}" in MAGICK_CONFIGURE_SRC_PATH=`$WinPathScript "${MAGICK_CONFIGURE_SRC_PATH}" 0` MAGICK_CONFIGURE_BUILD_PATH=`$WinPathScript "${MAGICK_CONFIGURE_BUILD_PATH}" 0` MAGICK_FILTER_MODULE_PATH=`$WinPathScript "${MAGICK_FILTER_MODULE_PATH}" 0` + top_srcdir_native=`$WinPathScript "${srcdirfull}"` ;; esac case "${host_os}" in @@ -5536,6 +5549,7 @@ esac + # Check for programs ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -21036,6 +21050,7 @@ fi # with Windows builds which don't use configure. # +# int8_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed 8-bit type" >&5 $as_echo_n "checking for signed 8-bit type... " >&6; } INT8_T='signed char' @@ -21043,6 +21058,7 @@ INT8_T='signed char' $as_echo "$INT8_T" >&6; } +# uint8_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned 8-bit type" >&5 $as_echo_n "checking for unsigned 8-bit type... " >&6; } UINT8_T='unsigned char' @@ -21050,6 +21066,7 @@ UINT8_T='unsigned char' $as_echo "$UINT8_T" >&6; } +# int16_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed 16-bit type" >&5 $as_echo_n "checking for signed 16-bit type... " >&6; } INT16_T='signed short' @@ -21057,6 +21074,7 @@ INT16_T='signed short' $as_echo "$INT16_T" >&6; } +# uint16_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned 16-bit type" >&5 $as_echo_n "checking for unsigned 16-bit type... " >&6; } UINT16_T='unsigned short' @@ -21064,6 +21082,7 @@ UINT16_T='unsigned short' $as_echo "$UINT16_T" >&6; } +# int32_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed 32-bit type" >&5 $as_echo_n "checking for signed 32-bit type... " >&6; } INT32_T='none' @@ -21082,6 +21101,7 @@ $as_echo "$INT32_T" >&6; } +# uint32_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned 32-bit type" >&5 $as_echo_n "checking for unsigned 32-bit type... " >&6; } UINT32_T='none' @@ -21100,6 +21120,7 @@ $as_echo "$UINT32_T" >&6; } +# int64_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed 64-bit type" >&5 $as_echo_n "checking for signed 64-bit type... " >&6; } INT64_T='none' @@ -21123,6 +21144,7 @@ $as_echo "$INT64_T" >&6; } +# uint64_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned 64-bit type" >&5 $as_echo_n "checking for unsigned 64-bit type... " >&6; } UINT64_T='none' @@ -21146,6 +21168,7 @@ $as_echo "$UINT64_T" >&6; } +# uintmax_t { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned maximum type" >&5 $as_echo_n "checking for unsigned maximum type... " >&6; } UINTMAX_T='none' @@ -21164,8 +21187,9 @@ $as_echo "$UINTMAX_T" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer difference type" >&5 -$as_echo_n "checking for pointer difference type... " >&6; } +# uintptr_t +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned pointer storage type" >&5 +$as_echo_n "checking for unsigned pointer storage type... " >&6; } UINTPTR_T='none' UINTPTR_F='none' if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp @@ -21182,6 +21206,25 @@ $as_echo "$UINTPTR_T" >&6; } +# ptrdiff_t +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed pointer difference type" >&5 +$as_echo_n "checking for signed pointer difference type... " >&6; } +PTRDIFF_T='none' +PTRDDIFF_F='none' +if test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_unsigned_intp +then + PTRDIFF_T='signed long' + PTRDIFF_F='"l"' +elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_unsigned_intp +then + PTRDIFF_T='long long' + PTRDIFF_F='"ll"' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTRDIFF_T" >&5 +$as_echo "$PTRDIFF_T" >&6; } + + + MAGICK_SIZE_T='none' MAGICK_SIZE_T_F='none' MAGICK_SSIZE_T='none' @@ -26080,6 +26123,20 @@ $as_echo "#define HasJPEG 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_jpeg='yes' + # Test for interesting libjpeg-turbo 3.0 functions (which may also appear in other JPEG libraries) + for ac_func in jpeg_enable_lossless jpeg12_write_scanlines jpeg16_write_scanlines \ + jpeg12_read_scanlines jpeg16_read_scanlines +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -26325,6 +26382,10 @@ fi # # Check for TTF # +# Use pkg-config if available. If pkg-config is not available, then +# try legacy freetype-config script. If neither is available, then go +# with defaults. +# have_ttf='no' LIB_TTF='' if test "$with_ttf" != 'no' @@ -27476,6 +27537,46 @@ if test "x$ac_cv_lib_webpmux_WebPMuxSetImage" = xyes; then : LIB_WEBP="$LIB_WEBP -lwebpmux" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SharpYuvConvert in -lsharpyuv" >&5 +$as_echo_n "checking for SharpYuvConvert in -lsharpyuv... " >&6; } +if ${ac_cv_lib_sharpyuv_SharpYuvConvert+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsharpyuv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SharpYuvConvert (); +int +main () +{ +return SharpYuvConvert (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sharpyuv_SharpYuvConvert=yes +else + ac_cv_lib_sharpyuv_SharpYuvConvert=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sharpyuv_SharpYuvConvert" >&5 +$as_echo "$ac_cv_lib_sharpyuv_SharpYuvConvert" >&6; } +if test "x$ac_cv_lib_sharpyuv_SharpYuvConvert" = xyes; then : + LIB_WEBP="$LIB_WEBP -lsharpyuv" +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if WEBP package is complete" >&5 $as_echo_n "checking if WEBP package is complete... " >&6; } if test $passed -gt 0 @@ -27521,7 +27622,69 @@ $as_echo_n "checking for HEIF support ... " >&6; } $as_echo "" >&6; } failed=0 passed=0 - ac_fn_c_check_header_mongrel "$LINENO" "libheif/heif.h" "ac_cv_header_libheif_heif_h" "$ac_includes_default" + heif_libs='' + # Use pkg-config to handle different optional codec libs + # and if pkg-config is not available fallback to manual search. + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libheif" >&5 +$as_echo_n "checking for libheif... " >&6; } + +if test -n "$HEIF_CFLAGS"; then + pkg_cv_HEIF_CFLAGS="$HEIF_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libheif") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_HEIF_CFLAGS=`$PKG_CONFIG --cflags "libheif" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$HEIF_LIBS"; then + pkg_cv_HEIF_LIBS="$HEIF_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libheif") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_HEIF_LIBS=`$PKG_CONFIG --libs "libheif" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + HEIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libheif" 2>&1` + else + HEIF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libheif" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HEIF_PKG_ERRORS" >&5 + + ac_fn_c_check_header_mongrel "$LINENO" "libheif/heif.h" "ac_cv_header_libheif_heif_h" "$ac_includes_default" if test "x$ac_cv_header_libheif_heif_h" = xyes; then : passed=`expr $passed + 1` else @@ -27529,14 +27692,37 @@ else fi - # heif always requires hwy no extra test needed + # Assume sensible default for codec; This will fail with a static + # libheif that contains a avif codec. + heif_libs="-lheif -lde265" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "libheif/heif.h" "ac_cv_header_libheif_heif_h" "$ac_includes_default" +if test "x$ac_cv_header_libheif_heif_h" = xyes; then : + passed=`expr $passed + 1` +else + failed=`expr $failed + 1` +fi + + + # Assume sensible default for codec; This will fail with a static + # libheif that contains a avif codec. + heif_libs="-lheif -lde265" +else + HEIF_CFLAGS=$pkg_cv_HEIF_CFLAGS + HEIF_LIBS=$pkg_cv_HEIF_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + heif_libs=$HEIF_LIBS; passed=1; +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for heif_context_alloc in -lheif" >&5 $as_echo_n "checking for heif_context_alloc in -lheif... " >&6; } if ${ac_cv_lib_heif_heif_context_alloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lheif -lde265 $LIBS" +LIBS="-lheif $heif_libs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27582,7 +27768,7 @@ $as_echo_n "checking if HEIF package is complete... " >&6; } $as_echo "no -- some components failed test" >&6; } have_heif='no (failed tests)' else - LIB_HEIF='-lheif -lde265' + LIB_HEIF="$heif_libs" LIBS="$LIB_HEIF $LIBS" $as_echo "#define HasHEIF 1" >>confdefs.h @@ -29489,7 +29675,51 @@ fi # Tests for programs only used while in maintainer mode -if test "$MAINT" == '' ; then +if test "$MAINT" = '' ; then + # Search for a usable Python + for ac_prog in python3 python python2 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PYTHON"; then + ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PYTHON="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PYTHON=$ac_cv_prog_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PYTHON" && break +done + + # Test for optional rst2html.py utility and define automake conditional HasRST2HTML if found. for ac_prog in rst2html.py rst2html do @@ -30620,7 +30850,7 @@ if test "$build_modules" != 'no' then MAGICK_DEP_LIBS="$LIBS_USER $LIB_LCMS $LIB_TTF $LIB_GS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_BZLIB $LIB_ZLIB $LIB_LTDL $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC" else - MAGICK_DEP_LIBS="$LIBS_USER $LIB_JBIG $LIB_WEBP $LIB_HEIF $LIB_LCMS $LIB_TIFF $LIB_TTF $LIB_JP2 $LIB_JPEG $LIB_JXL $LIB_GS $LIB_PNG $LIB_FPX $LIB_WMF $LIB_DPS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_LZMA $LIB_BZLIB $LIB_XML $LIB_ZLIB $LIB_ZSTD $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC" + MAGICK_DEP_LIBS="$LIBS_USER $LIB_JBIG $LIB_WEBP $LIB_JP2 $LIB_HEIF $LIB_LCMS $LIB_TIFF $LIB_TTF $LIB_JPEG $LIB_JXL $LIB_GS $LIB_PNG $LIB_FPX $LIB_WMF $LIB_DPS $LIB_XEXT $LIB_IPC $LIB_X11 $LIB_LZMA $LIB_BZLIB $LIB_XML $LIB_ZLIB $LIB_ZSTD $LIB_TRIO $LIB_GDI32 $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC" fi MAGICK_EXTRA_DEP_LIBS="$LIB_OMP" # Extra libraries typically added due to CFLAGS @@ -30716,6 +30946,7 @@ LIBS=$LIBS_USER + ac_config_files="$ac_config_files GraphicsMagick.spec Magick++/bin/GraphicsMagick++-config Magick++/lib/GraphicsMagick++.pc Makefile PerlMagick/Magick.pm PerlMagick/Makefile.PL PerlMagick/PerlMagickCheck.sh PerlMagick/t/features.pl config/delegates.mgk config/type-ghostscript.mgk config/type-solaris.mgk config/type-windows.mgk config/type.mgk magick/GraphicsMagick-config magick/GraphicsMagick.pc magick/magick_types.h magick/version.h common.shi rungm.sh wand/GraphicsMagickWand-config wand/GraphicsMagickWand.pc" |