"Fossies" - the Fresh Open Source Software Archive

Member "vips-8.12.1/configure.ac" (24 Nov 2021, 51891 Bytes) of package /linux/privat/vips-8.12.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 8.12.0_vs_8.12.1.

    1 # Process this file with autoconf to produce a configure script.
    2 
    3 # also update the version number in the m4 macros below
    4 
    5 AC_INIT([vips], [8.12.1], [vipsip@jiscmail.ac.uk])
    6 # required for gobject-introspection
    7 AC_PREREQ([2.69])
    8 
    9 # gobject-introspection recommends -Wno-portability
   10 # foreign stops complaints about a missing README (we use README.md instead)
   11 # and missing INSTALL (the standard Gnu INSTALL is not very useful)
   12 # subdir-objects lets us have dummy.cc in a subdir
   13 AM_INIT_AUTOMAKE([-Wno-portability foreign subdir-objects])
   14 
   15 AC_CONFIG_HEADERS([config.h])
   16 AC_CONFIG_MACRO_DIR([m4])
   17 
   18 # user-visible library versioning
   19 m4_define([vips_major_version], [8])
   20 m4_define([vips_minor_version], [12])
   21 m4_define([vips_micro_version], [1])
   22 m4_define([vips_version],
   23           [vips_major_version.vips_minor_version.vips_micro_version])
   24 
   25 VIPS_MAJOR_VERSION=vips_major_version()
   26 VIPS_MINOR_VERSION=vips_minor_version()
   27 VIPS_MICRO_VERSION=vips_micro_version()
   28 VIPS_VERSION=vips_version()
   29 VIPS_VERSION_STRING="$VIPS_VERSION-$(date -u -r $srcdir/ChangeLog)"
   30 
   31 # packages add to these as we find them
   32 VIPS_CFLAGS=""
   33 VIPS_INCLUDES=""
   34 VIPS_LIBS=""
   35 
   36 # libtool library versioning ... not user-visible (except as part of the
   37 # library file name) and does not correspond to major/minor/micro above
   38 
   39 # rules:
   40 # sources changed: increment revision
   41 # binary interface changed: increment current, reset revision to 0
   42 #   binary interface changes backwards compatible?: increment age
   43 #   binary interface changes not backwards compatible?: reset age to 0
   44 LIBRARY_REVISION=1
   45 LIBRARY_CURRENT=56
   46 LIBRARY_AGE=14
   47 
   48 # patched into include/vips/version.h
   49 AC_SUBST(VIPS_VERSION)
   50 AC_SUBST(VIPS_VERSION_STRING)
   51 AC_SUBST(VIPS_MAJOR_VERSION)
   52 AC_SUBST(VIPS_MINOR_VERSION)
   53 AC_SUBST(VIPS_MICRO_VERSION)
   54 
   55 # put into library name by libsrc/Makefile.am and libsrcCC/Makefile.am
   56 AC_SUBST(LIBRARY_CURRENT)
   57 AC_SUBST(LIBRARY_REVISION)
   58 AC_SUBST(LIBRARY_AGE)
   59 
   60 # init introspection support
   61 GOBJECT_INTROSPECTION_CHECK([1.30.0])
   62 
   63 # remove the '(disabled, use --enable-introspection to enable)'
   64 # suffix from the found_introspection variable
   65 if test "x$found_introspection" != x"yes"; then
   66   found_introspection=no
   67 fi
   68 
   69 # gir needs a list of source files to scan for introspection
   70 #
   71 # build with a glob and a list of files to exclude from scanning
   72 # see also IGNORE_HFILES in doc/Makefile.am
   73 introspection_sources=$(cd $srcdir/libvips ; find . -path ./deprecated -prune -o -name dummy.c -prune -o -name introspect.c -prune -o \( -name "*.c" -o -name "*.cpp" \) -print)
   74 for name in $introspection_sources; do
   75   vips_introspection_sources="$vips_introspection_sources $name"
   76 done
   77 
   78 # add headers that form the public vips8 API .. don't do a find and exclude,
   79 # we end up excluding almost everything argh
   80 headers="\
   81         basic.h \
   82         vips.h \
   83         object.h \
   84         image.h \
   85         error.h \
   86         foreign.h \
   87         freqfilt.h \
   88         interpolate.h \
   89         header.h \
   90         histogram.h \
   91         operation.h \
   92         enumtypes.h \
   93         conversion.h \
   94         arithmetic.h \
   95         colour.h \
   96         convolution.h \
   97         create.h \
   98         draw.h \
   99         morphology.h \
  100         mosaicing.h \
  101         type.h \
  102         rect.h \
  103         resample.h \
  104         memory.h \
  105         region.h"
  106 
  107 for name in $headers; do
  108   vips_introspection_sources="$vips_introspection_sources include/vips/$name"
  109 done
  110 
  111 AC_SUBST(vips_introspection_sources)
  112 
  113 AC_CANONICAL_HOST
  114 
  115 AC_DEFINE_UNQUOTED(G_LOG_DOMAIN, "VIPS", [Domain for glib logging messages.])
  116 
  117 m4_define([debug_default], [no])
  118 AC_ARG_ENABLE(debug,
  119   AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],[turn on debugging @<:@default=debug_default()@:>@]),,
  120   enable_debug=debug_default())
  121 
  122 if test x"$enable_debug" = x"yes"; then
  123   VIPS_DEBUG_FLAGS="-DDEBUG_FATAL -DDEBUG_LEAK"
  124 else
  125   VIPS_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
  126 
  127   if test x"$enable_debug" = x"no"; then
  128     VIPS_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
  129   fi
  130 fi
  131 
  132 # option to disable deprecated code, shaves a bit off the library size
  133 AC_ARG_ENABLE(deprecated,
  134   AS_HELP_STRING([--enable-deprecated], [build deprecated components (default: yes)]))
  135 
  136 VIPS_ENABLE_DEPRECATED=0
  137 if test x"$enable_deprecated" != x"no"; then
  138   VIPS_ENABLE_DEPRECATED=1
  139   enable_deprecated=yes
  140 fi
  141 AC_DEFINE_UNQUOTED(ENABLE_DEPRECATED,$VIPS_ENABLE_DEPRECATED,[define to build deprecated components])
  142 AM_CONDITIONAL(ENABLE_DEPRECATED, [test x"$enable_deprecated" = x"yes"])
  143 
  144 # this gets pasted into version.h as a #define
  145 AC_SUBST(VIPS_ENABLE_DEPRECATED)
  146 
  147 AC_MSG_CHECKING([for -mms-bitfields support])
  148 case "$host_os" in
  149   mingw*)
  150     # makes gcc use win native alignment
  151     # GCC >= 4.7 and Clang >= 11 does this automatically, see:
  152     # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1510#note_841637
  153     VIPS_CFLAGS="-mms-bitfields $VIPS_CFLAGS"
  154     AC_MSG_RESULT([yes])
  155     ;;
  156   *)
  157     AC_MSG_RESULT([no])
  158     ;;
  159 esac
  160 
  161 # set the default directory for ICC profiles
  162 case "$host_os" in
  163   darwin*)
  164     profile_dir="/Library/ColorSync/Profiles"
  165     ;;
  166   mingw*)
  167     # need double escapes since this will get pasted into a #define in a C
  168     # header ... the C:\Windows is usually overwritten with the result of
  169     # GetWindowsDirectoryW()
  170     profile_dir="C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\color"
  171     ;;
  172   *)
  173     profile_dir="/usr/share/color/icc"
  174     ;;
  175 esac
  176 AC_DEFINE_UNQUOTED(VIPS_ICC_DIR,"$profile_dir",[default directory for ICC profiles])
  177 
  178 # we want largefile support, if possible
  179 AC_SYS_LARGEFILE
  180 
  181 # we use libtool and can generate DLLs cleanly on win32 if necessary
  182 LT_INIT([win32-dll])
  183 
  184 # Checks for programs.
  185 AC_PROG_AWK
  186 AC_PROG_CC
  187 AC_PROG_CC_STDC
  188 AC_PROG_CXX
  189 AC_PROG_INSTALL
  190 AC_PROG_LN_S
  191 
  192 AC_ARG_ENABLE([doxygen], 
  193   AS_HELP_STRING([--enable-doxygen], [enable C++ doc build (default: no)]),
  194   [enable_doxygen="$enableval"],
  195   [enable_doxygen=no])
  196 
  197 if test x"$enable_doxygen" = x"yes"; then
  198   AC_CHECK_PROGS([DOXYGEN], [doxygen])
  199   if ! test "$DOXYGEN"; then
  200     AC_MSG_WARN([doxygen not found; C++ docs will not be generated])
  201     enable_doxygen=no
  202   fi
  203 fi
  204 AM_CONDITIONAL(HAVE_DOXYGEN, [test x"$enable_doxygen" = x"yes"])
  205 
  206 # we need a fully expanded version of $libdir
  207 # without this we get something like
  208 #    define VIPS_LIBDIR ${exec_prefix}/lib
  209 # argh
  210 test x"$prefix" = x"NONE" && prefix=$ac_default_prefix
  211 test x"$exec_prefix" = x"NONE" && exec_prefix='${prefix}'
  212 
  213 # set $expanded_value to the fully-expanded value of the argument
  214 expand () {
  215     eval expanded_value=$1
  216 
  217     if test x"$expanded_value" != x"$1"; then
  218         expand "$expanded_value"
  219     fi
  220 }
  221 
  222 expand $libdir
  223 VIPS_LIBDIR=$expanded_value
  224 
  225 # this gets pasted into version.h as a #define
  226 VIPS_EXEEXT=$EXEEXT
  227 AC_SUBST(VIPS_EXEEXT)
  228 
  229 # vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback)
  230 # the configure-time install prefix
  231 AC_DEFINE_UNQUOTED(VIPS_PREFIX,"$prefix",[configure-time install prefix])
  232 AC_DEFINE_UNQUOTED(VIPS_LIBDIR,"$VIPS_LIBDIR",[configure-time library directory])
  233 
  234 # i18n
  235 # we need to name our .mo with major.minor so we can have multiple versions
  236 # installed in parallel on Debian
  237 expand vips$VIPS_MAJOR_VERSION.$VIPS_MINOR_VERSION
  238 GETTEXT_PACKAGE=$expanded_value
  239 
  240 AC_SUBST(GETTEXT_PACKAGE)
  241 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
  242         [The prefix for our gettext translation domains.])
  243 # the 'malkovich' one is there for testing only, remove for release
  244 #ALL_LINGUAS="en_GB de malkovich"
  245 ALL_LINGUAS="en_GB de"
  246 AM_GLIB_GNU_GETTEXT
  247 
  248 # Compatibility with pkg.m4 < 0.27
  249 m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR],
  250          [AC_ARG_WITH([pkgconfigdir],
  251                       [AS_HELP_STRING([--with-pkgconfigdir],
  252                       [install directory for *.pc pkg-config file])],
  253                       [],[with_pkgconfigdir='$(libdir)/pkgconfig'])
  254           AC_SUBST([pkgconfigdir], [${with_pkgconfigdir}])])
  255 
  256 # Compatibility with pkg.m4 < 0.28
  257 m4_define_default([PKG_CHECK_VAR],
  258                   [AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])
  259                    AS_IF([test -z "$$1"], [$1=`$PKG_CONFIG --variable="$3" "$2"`])
  260                    AS_IF([test -n "$$1"], [$4], [$5])])
  261 
  262 # we need to disable some features on some known-bad gcc versions
  263 # these will be "" for clang etc. 
  264 #
  265 # I couldn't get this to work, mysterious! do it ourselves
  266 # 
  267 # AX_CHECK_COMPILE_FLAG([-dumpversion],
  268 #   [ax_gcc_version_option=yes],
  269 #   [ax_gcc_version_option=no]
  270 # )
  271 AC_MSG_CHECKING([for $CC version])
  272 GCC_VERSION=""
  273 version=$($CC -dumpversion)
  274 if test $? = 0; then 
  275   GCC_VERSION=$version
  276   AC_MSG_RESULT([$GCC_VERSION])
  277 else
  278   AC_MSG_RESULT([-dumpversion not supported])
  279 fi
  280 
  281 GCC_VERSION_MAJOR=$(echo $GCC_VERSION | cut -d'.' -f1)
  282 GCC_VERSION_MINOR=$(echo $GCC_VERSION | cut -d'.' -f2)
  283 GCC_VERSION_PATCH=$(echo $GCC_VERSION | cut -d'.' -f3)
  284 
  285 # Checks for libraries.
  286 
  287 # build list of pkg-config packages we used here
  288 PACKAGES_USED=""
  289 
  290 # build list of extra libs we need here
  291 # the main one is jpeg: it does not have a .pc file, so when we make vips.pc
  292 # we need to put -ljpeg into libs ourselves
  293 EXTRA_LIBS_USED=""
  294 
  295 # Checks for header files.
  296 AC_HEADER_DIRENT
  297 AC_HEADER_STDC
  298 AC_CHECK_HEADERS([errno.h math.h fcntl.h limits.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h sys/mman.h sys/types.h sys/stat.h unistd.h io.h direct.h windows.h])
  299 
  300 # Checks for typedefs, structures, and compiler characteristics.
  301 AC_C_RESTRICT
  302 AX_GCC_VAR_ATTRIBUTE(vector_size)
  303 AC_C_CONST
  304 AC_TYPE_MODE_T
  305 AC_TYPE_OFF_T
  306 AC_TYPE_SIZE_T
  307 
  308 # g++/gcc 4.x and 5.x have rather broken vector support ... 5.4.1 seems to
  309 # work, but 5.4.0 fails to even compile
  310 AC_MSG_CHECKING([for $CC with working vector support])
  311 if test x"$GCC_VERSION_MAJOR" != x"4" -a x"$GCC_VERSION_MAJOR" != x"5"; then
  312   AC_MSG_RESULT([yes])
  313 else
  314   ax_cv_have_var_attribute_vector_size=no
  315   AC_MSG_RESULT([no])
  316 fi
  317 
  318 # we need to be able to shuffle vectors in C++
  319 if test x"$ax_cv_have_var_attribute_vector_size" = x"yes"; then
  320   AC_MSG_CHECKING([for C++ vector shuffle])
  321   AC_LANG_PUSH([C++])
  322   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  323     typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
  324   ]], [[
  325     v4f f; f[3] = 99;
  326   ]])],[
  327     AC_MSG_RESULT([yes])
  328     have_vector_shuffle=yes
  329   ],[
  330     AC_MSG_RESULT([no])
  331     have_vector_shuffle=no
  332   ])
  333   AC_LANG_POP([C++])
  334 
  335   if test x"$have_vector_shuffle" = x"yes"; then
  336     AC_DEFINE_UNQUOTED(HAVE_VECTOR_SHUFFLE, 1,
  337       [define if your C++ can shuffle vectors])
  338   fi
  339 fi
  340 
  341 # we also need to be able to mix vector and scalar arithmetic
  342 if test x"$have_vector_shuffle" = x"yes"; then
  343   AC_MSG_CHECKING([for C++ vector arithmetic])
  344   AC_LANG_PUSH([C++])
  345   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  346     typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
  347   ]], [[
  348     v4f f = {1, 2, 3, 4}; f *= 12.0; 
  349     v4f g = {5, 6, 7, 8}; f = g > 0 ? g : -1 * g;
  350   ]])],[
  351     AC_MSG_RESULT([yes])
  352     have_vector_arith=yes
  353   ],[
  354     AC_MSG_RESULT([no])
  355     have_vector_arith=no
  356   ])
  357   AC_LANG_POP([C++])
  358 fi
  359 
  360 # gcc 7.2 seems to work, but then gets confused by signed constants in 
  361 # templates
  362 if test x"$have_vector_arith" = x"yes"; then
  363   AC_MSG_CHECKING([for C++ signed constants in vector templates])
  364   AC_LANG_PUSH([C++])
  365   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  366     typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16)));
  367     template <typename T>
  368     static void
  369     h( v4f B )
  370     {
  371         v4f f;
  372         f = -1 * B;
  373     }
  374   ]], [[
  375   ]])],[
  376     AC_MSG_RESULT([yes])
  377   ],[
  378     AC_MSG_RESULT([no])
  379     have_vector_arith=no
  380   ])
  381   AC_LANG_POP([C++])
  382 
  383   if test x"$have_vector_arith" = x"yes"; then
  384     AC_DEFINE_UNQUOTED(HAVE_VECTOR_ARITH, 1,
  385       [define if your C++ can mix vector and scalar arithmetic])
  386   fi
  387 fi
  388 
  389 # Checks for library functions.
  390 AC_FUNC_MEMCMP
  391 AC_FUNC_MMAP
  392 AC_FUNC_VPRINTF
  393 AC_CHECK_FUNCS([getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand sysconf atexit _aligned_malloc posix_memalign memalign])
  394 AC_CHECK_LIB(m,cbrt,[AC_DEFINE(HAVE_CBRT,1,[have cbrt() in libm.])])
  395 AC_CHECK_LIB(m,hypot,[AC_DEFINE(HAVE_HYPOT,1,[have hypot() in libm.])])
  396 AC_CHECK_LIB(m,atan2,[AC_DEFINE(HAVE_ATAN2,1,[have atan2() in libm.])])
  397 AC_CHECK_LIB(m,asinh,[AC_DEFINE(HAVE_ASINH,1,[have asinh() in libm.])])
  398 
  399 # have to have these parts of glib ... we need glib 2.15 for gio
  400 PKG_CHECK_MODULES(REQUIRED, glib-2.0 >= 2.40 gmodule-no-export-2.0 gobject-2.0 gio-2.0)
  401 PACKAGES_USED="$PACKAGES_USED glib-2.0 gmodule-no-export-2.0 gobject-2.0 gio-2.0"
  402 
  403 # from 2.62 we have datetime
  404 PKG_CHECK_MODULES(DATE_TIME_FORMAT_ISO8601, glib-2.0 >= 2.62,
  405   [AC_DEFINE(HAVE_DATE_TIME_FORMAT_ISO8601,1,
  406             [define if your glib has g_date_time_format_iso8601().]
  407    )
  408   ],
  409   [:
  410   ]
  411 )
  412 
  413 VIPS_CFLAGS="$VIPS_CFLAGS $GIO_CFLAGS"
  414 VIPS_LIBS="$VIPS_LIBS $GIO_LIBS"
  415 
  416 # if available, we use pthread_setattr_default_np() to raise the per-thread 
  417 # stack size ... musl (libc on Alpine), for example, has a very small stack per 
  418 # thread by default
  419 save_pthread_LIBS="$LIBS"
  420 save_pthread_CFLAGS="$CFLAGS"
  421 LIBS="$LIBS $REQUIRED_LIBS"
  422 CFLAGS="$CFLAGS $REQUIRED_CFLAGS"
  423 AC_CHECK_FUNC(pthread_setattr_default_np,
  424   [AC_DEFINE(HAVE_PTHREAD_DEFAULT_NP,1,[have pthread_setattr_default_np().])
  425   ]
  426 )
  427 LIBS="$save_pthread_LIBS"
  428 CFLAGS="$save_pthread_CFLAGS"
  429 
  430 # from 2.48 we have g_uint_checked_mul() etc.
  431 PKG_CHECK_MODULES(HAVE_CHECKED_MUL, glib-2.0 >= 2.48,
  432   [AC_DEFINE(HAVE_CHECKED_MUL,1,[define if your glib has checked multiply.])
  433   ],
  434   [:
  435   ]
  436 )
  437 
  438 AC_MSG_CHECKING([whether to build dynamic modules])
  439 
  440 # Disable modules by default when building static libraries
  441 AS_IF([test x"$enable_static" = x"yes"],
  442   [enable_modules_default=no],
  443   [enable_modules_default=yes])
  444 
  445 AC_ARG_ENABLE([modules], 
  446   AS_HELP_STRING([--disable-modules], [disable dynamic modules (default: test)]),
  447   [enable_modules="$enableval"],
  448   [enable_modules="$enable_modules_default"])
  449 
  450 gmodule_supported_flag=no
  451 gmodule_with_flag=yes
  452 
  453 if test x"$enable_modules" = x"no"; then
  454   AC_MSG_RESULT([no])
  455 else
  456   AC_MSG_RESULT([yes])
  457   AC_MSG_CHECKING([whether dynamic modules work])
  458   PKG_CHECK_VAR([gmodule_supported], [gmodule-no-export-2.0], [gmodule_supported])
  459   if test x"$gmodule_supported" = x"true"; then
  460     gmodule_supported_flag=yes
  461     gmodule_with_flag='module'
  462     AC_DEFINE(ENABLE_MODULES,1,[define to enable loadable module support.])
  463     AC_MSG_RESULT([yes])
  464   else
  465     AC_MSG_RESULT([no])
  466   fi
  467 fi
  468 
  469 # check for gtk-doc
  470 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
  471 
  472 # we need expat ... the .pc file for expat is only available
  473 # for recent linuxes, so we fall back to AM_WITH_EXPAT
  474 PKG_CHECK_MODULES(EXPAT, expat,
  475   [expat_found=yes
  476    PACKAGES_USED="$PACKAGES_USED expat"
  477   ],
  478   [AM_WITH_EXPAT
  479   ]
  480 )
  481 
  482 if test x"$expat_found" = x"no"; then
  483   exit 1
  484 fi
  485 
  486 VIPS_CFLAGS="$VIPS_CFLAGS $EXPAT_CFLAGS"
  487 VIPS_LIBS="$VIPS_LIBS $EXPAT_LIBS"
  488 
  489 # optional supporting libraries
  490 
  491 AC_ARG_WITH([gsf], 
  492   AS_HELP_STRING([--without-gsf], [build without libgsf-1 (default: test)]))
  493 
  494 # libgsf-1 1.14.21 crashes 
  495 # .27 is known to work well
  496 # .26 seems OK but has not been tested much
  497 # not sure about 22-25
  498 if test x"$with_gsf" != x"no"; then
  499   PKG_CHECK_MODULES(GSF, libgsf-1 >= 1.14.26,
  500     [AC_DEFINE(HAVE_GSF,1,[define if you have libgsf-1 installed.])
  501      with_gsf=yes
  502      PACKAGES_USED="$PACKAGES_USED libgsf-1"
  503     ],
  504     [AC_MSG_WARN([libgsf-1 not found; disabling dzsave support]) 
  505      with_gsf=no
  506     ]
  507   )
  508 
  509   # zip64 and deflate-level came in .31
  510   PKG_CHECK_MODULES(GSF_ZIP64, libgsf-1 >= 1.14.31,
  511     [AC_DEFINE(HAVE_GSF_ZIP64,1,[define if your libgsf supports zip64.])
  512      AC_DEFINE(HAVE_GSF_DEFLATE_LEVEL,1,
  513                [define if your libgsf supports deflate-level.])
  514     ],
  515     [:
  516     ]
  517   )
  518 fi
  519 
  520 VIPS_CFLAGS="$VIPS_CFLAGS $GSF_CFLAGS"
  521 VIPS_LIBS="$VIPS_LIBS $GSF_LIBS"
  522 
  523 AC_ARG_WITH([fftw], 
  524   AS_HELP_STRING([--without-fftw], [build without fftw (default: test)]))
  525 
  526 if test x"$with_fftw" != x"no"; then
  527   PKG_CHECK_MODULES(FFTW, fftw3,
  528     [AC_DEFINE(HAVE_FFTW,1,[define if you have fftw3 installed.])
  529      with_fftw=yes
  530      PACKAGES_USED="$PACKAGES_USED fftw3"
  531     ],
  532     [AC_MSG_WARN([fftw not found; disabling fftw support]) 
  533      with_fftw=no
  534     ]
  535   )
  536 fi
  537 
  538 VIPS_CFLAGS="$VIPS_CFLAGS $FFTW_CFLAGS"
  539 VIPS_LIBS="$VIPS_LIBS $FFTW_LIBS"
  540 
  541 # ImageMagick 
  542 AC_ARG_WITH([magick], 
  543   AS_HELP_STRING([--without-magick], [build without libMagic (default: test)]),
  544     [with_magick=$withval],
  545     [with_magick=$gmodule_with_flag])
  546 
  547 # libMagic as a dynamically loadable module
  548 AS_IF([test x"$with_magick" = x"module"],
  549   [with_magick_module=$gmodule_supported_flag],
  550   [with_magick_module=no])
  551 
  552 AC_ARG_WITH([magickpackage], 
  553   AS_HELP_STRING([--with-magickpackage=PACKAGE], 
  554     [use magick PACKAGE (default: MagickCore; try GraphicsMagick to build against gm instead)]))
  555 
  556 if test x"$with_magickpackage" = x"yes"; then
  557   AC_MSG_WARN([--with-magickpackage needs an argument, ignoring])
  558   with_magick=no
  559   with_magick_module=no
  560 else
  561   if test x"$with_magickpackage" = x""; then
  562     # set the default magick package ... very old imagemagicks called it
  563     # ImageMagick
  564     PKG_CHECK_MODULES(MAGICK_WAND, MagickCore,
  565       [with_magickpackage=MagickCore
  566       ],
  567       [PKG_CHECK_MODULES(IMAGE_MAGICK, ImageMagick,
  568          [with_magickpackage=ImageMagick
  569          ],
  570          [AC_MSG_WARN([neither MagickCore nor ImageMagick found; disabling Magick support])
  571           with_magick=no
  572           with_magick_module=no
  573          ]
  574        )
  575       ]
  576   )
  577   fi
  578 fi
  579 
  580 # we have a separate loader for magick7 with fewer ifdef
  581 # options; only test for features on the magick6 case
  582 
  583 magick_version=
  584 if test x"$with_magick" != x"no"; then
  585   PKG_CHECK_MODULES(MAGICK, $with_magickpackage >= 7.0,  
  586     [AC_DEFINE(HAVE_MAGICK7,1,[define if you have libMagick7 installed.])
  587      with_magick=yes
  588      magick7=yes
  589      magick_version=magick7
  590      AS_IF([test x"$with_magick_module" = x"no"],
  591        [PACKAGES_USED="$PACKAGES_USED $with_magickpackage"])
  592     ],
  593     [PKG_CHECK_MODULES(MAGICK, $with_magickpackage,  
  594        [AC_DEFINE(HAVE_MAGICK6,1,[define if you have libMagick6 installed.])
  595         with_magick=yes
  596         magick6=yes
  597         magick_version=magick6
  598         AS_IF([test x"$with_magick_module" = x"no"],
  599           [PACKAGES_USED="$PACKAGES_USED $with_magickpackage"])
  600        ],
  601        [AC_MSG_WARN([$with_magickpackage not found; disabling Magick support])
  602         with_magick=no
  603         with_magick_module=no
  604        ]
  605      )
  606     ]  
  607   )
  608 else
  609   with_magick=no
  610   with_magick_module=no
  611   magick6=no
  612   magick_version=none
  613   with_magickpackage=none
  614 fi
  615 
  616 if test x"$magick6" = x"yes"; then
  617   # do we have number_scenes in image_info ... imagemagick uses this
  618   save_CFLAGS="$CFLAGS"
  619   CFLAGS="$CFLAGS $MAGICK_CFLAGS"
  620   AC_CHECK_MEMBER([struct _ImageInfo.number_scenes],
  621     AC_DEFINE(HAVE_NUMBER_SCENES,1,
  622               [define if your magick has ImageInfo.number_scenes.]),
  623     [],
  624     [#include <magick/api.h>])
  625   CFLAGS="$save_CFLAGS"
  626 fi
  627 
  628 if test x"$magick6" = x"yes"; then
  629   # the magick6 API varies a lot between magick versions, and between GM and IM
  630   # set CFLAGS too, since CHECK_FUNCS will try to compile / link / run code.
  631   save_LIBS="$LIBS"
  632   save_CFLAGS="$CFLAGS"
  633   LIBS="$LIBS $MAGICK_LIBS"
  634   CFLAGS="$CFLAGS $MAGICK_CFLAGS"
  635 
  636   AC_CHECK_FUNCS([InheritException AcquireExceptionInfo SetImageProperty SetImageExtent AcquireImage GetVirtualPixels ResetImageProfileIterator ResetImageAttributeIterator ResetImagePropertyIterator MagickCoreGenesis SetImageOption BlobToStringInfo OptimizePlusImageLayers OptimizeImageTransparency])
  637 
  638   LIBS="$save_LIBS"
  639   CFLAGS="$save_CFLAGS"
  640 fi
  641 
  642 if test x"$magick6" = x"yes"; then
  643   save_CFLAGS="$CFLAGS"
  644   CFLAGS="$CFLAGS $MAGICK_CFLAGS"
  645 
  646   # the range of ColorspaceType has expanded several times
  647   AC_COMPILE_IFELSE(
  648     [AC_LANG_PROGRAM(
  649       [#include <magick/api.h>],
  650       [ColorspaceType colorspace = CMYColorspace]
  651     )],
  652     [AC_DEFINE(HAVE_CMYCOLORSPACE,1,
  653          [define if your Magick has CMYColorspace.])
  654     ]
  655   )
  656 
  657   AC_COMPILE_IFELSE(
  658     [AC_LANG_PROGRAM(
  659       [#include <magick/api.h>],
  660       [ColorspaceType colorspace = HCLpColorspace]
  661     )],
  662     [AC_DEFINE(HAVE_HCLPCOLORSPACE,1,
  663          [define if your Magick has HCLpColorspace.])
  664     ]
  665   )
  666 
  667   # GetImageMagick() takes two args under GM, three under IM
  668   AC_COMPILE_IFELSE(
  669     [AC_LANG_PROGRAM(
  670       [#include <magick/api.h>],
  671       [(void)GetImageMagick(NULL, 0, NULL)]
  672     )],
  673     [AC_DEFINE(HAVE_GETIMAGEMAGICK3,1,
  674          [define if your GetImageMagick() takes three arguments.])
  675     ]
  676   )
  677 
  678   CFLAGS="$save_CFLAGS"
  679 fi
  680 
  681 # have flags to turn load and save off independently ... some people will want
  682 # save but not load, for example
  683 AC_ARG_ENABLE([magickload], 
  684   AS_HELP_STRING([--disable-magickload], 
  685                  [disable libMagic load (default: enabled)]))
  686 
  687 AC_ARG_ENABLE([magicksave], 
  688   AS_HELP_STRING([--disable-magicksave], 
  689                  [disable libMagic save (default: enabled)]))
  690 
  691 if test x"$enable_magicksave" != x"yes"; then
  692   # we need ImportImagePixels ... GM is missing this sadly
  693   save_LIBS="$LIBS"
  694   LIBS="$LIBS $MAGICK_LIBS"
  695   AC_CHECK_FUNCS(ImportImagePixels,[
  696      AC_DEFINE(HAVE_IMPORTIMAGEPIXELS,1,
  697                [define if you have ImportImagePixels.])
  698    ],[]
  699   )
  700   AC_CHECK_FUNCS(ImagesToBlob,[
  701      AC_DEFINE(HAVE_IMAGESTOBLOB,1,
  702                [define if you have ImagesToBlob.])
  703    ],[]
  704   ) 
  705   LIBS="$save_LIBS"
  706 fi
  707 
  708 if test x"$with_magick" != x"no"; then
  709   if test x"$enable_magickload" != x"no"; then
  710     AC_DEFINE(ENABLE_MAGICKLOAD,1,[define to enable load with libMagick])
  711     enable_magickload=yes
  712   fi
  713 
  714   if test x"$enable_magicksave" != x"no"; then
  715     AC_DEFINE(ENABLE_MAGICKSAVE,1,[define to enable save with libMagick])
  716     enable_magicksave=yes
  717   fi
  718 else
  719   enable_magickload=no
  720   enable_magicksave=no
  721 fi
  722 
  723 AS_IF([test x"$with_magick_module" = x"yes"],
  724   [AC_DEFINE([MAGICK_MODULE], [1], [define to build libMagic as a dynamically loadable module.])],
  725   [VIPS_CFLAGS="$VIPS_CFLAGS $MAGICK_CFLAGS"
  726    VIPS_LIBS="$VIPS_LIBS $MAGICK_LIBS"])
  727 AM_CONDITIONAL(MAGICK_MODULE, [test x"$with_magick_module" = x"yes"])
  728 
  729 # orc
  730 AC_ARG_WITH([orc], 
  731   AS_HELP_STRING([--without-orc], [build without orc (default: test)]))
  732 
  733 if test x"$with_orc" != x"no"; then
  734   # we use loadpw etc.
  735   PKG_CHECK_MODULES(ORC, orc-0.4 >= 0.4.11,
  736     [AC_DEFINE(HAVE_ORC,1,[define if you have orc-0.4.11 or later installed.])
  737      with_orc=yes
  738      PACKAGES_USED="$PACKAGES_USED orc-0.4"
  739      save_LIBS="$LIBS"
  740      LIBS="$LIBS $ORC_LIBS"
  741      AC_CHECK_FUNCS(orc_program_get_error,
  742        AC_DEFINE(HAVE_ORC_PROGRAM_GET_ERROR,1,
  743               [define if your orc has orc_program_get_error.]))
  744      LIBS="$save_LIBS"
  745     ],
  746     [AC_MSG_WARN([orc-0.4.11 or later not found; disabling orc support])
  747      with_orc=no
  748     ]
  749   )
  750 fi
  751 
  752 # orc 0.4.30+ works with cf-protection, but 0.4.30 has a bug with multiple
  753 # definitions of OrcTargetPowerPCFlags, so insist on 0.4.31
  754 if test x"$with_orc" = x"yes"; then
  755   PKG_CHECK_MODULES(ORC_CF_PROTECTION, orc-0.4 >= 0.4.31,
  756     [AC_DEFINE(HAVE_ORC_CF_PROTECTION,1,
  757                [define if your orc works with cf-protection.]
  758      )
  759     ],
  760     [:
  761     ]
  762   )
  763 fi
  764 
  765 VIPS_CFLAGS="$VIPS_CFLAGS $ORC_CFLAGS"
  766 VIPS_LIBS="$VIPS_LIBS $ORC_LIBS"
  767 
  768 # lcms ... refuse to use lcms1
  769 AC_ARG_WITH([lcms], 
  770   AS_HELP_STRING([--without-lcms], [build without lcms (default: test)]))
  771 
  772 if test x"$with_lcms" != x"no"; then
  773   PKG_CHECK_MODULES(LCMS, lcms2,
  774     [AC_DEFINE(HAVE_LCMS2,1,[define if you have lcms2 installed.])
  775      with_lcms="yes (lcms2)"
  776      PACKAGES_USED="$PACKAGES_USED lcms2"
  777     ],
  778     [AC_MSG_WARN([lcms2 not found; disabling ICC profile support])
  779      with_lcms=no
  780     ]
  781   )
  782 fi
  783 
  784 # we need a conditional for this to only compile in fallback profiles if lcms
  785 # is detected
  786 AM_CONDITIONAL(ENABLE_LCMS, [test x"$with_lcms" != x"no"])
  787 
  788 VIPS_CFLAGS="$VIPS_CFLAGS $LCMS_CFLAGS"
  789 VIPS_LIBS="$VIPS_LIBS $LCMS_LIBS"
  790 
  791 # OpenEXR
  792 AC_ARG_WITH([OpenEXR], 
  793   AS_HELP_STRING([--without-OpenEXR], [build without OpenEXR (default: test)]))
  794 
  795 # require 1.2.2 since 1.2.1 has a broken ImfCloseTiledInputFile()
  796 if test x"$with_OpenEXR" != x"no"; then
  797   PKG_CHECK_MODULES(OPENEXR, OpenEXR >= 1.2.2,
  798     [AC_DEFINE(HAVE_OPENEXR,1,[define if you have OpenEXR >= 1.2.2 installed.])
  799      with_OpenEXR=yes
  800      PACKAGES_USED="$PACKAGES_USED OpenEXR"
  801     ],
  802     [AC_MSG_WARN([OpenEXR not found; disabling OpenEXR support])
  803      with_OpenEXR=no
  804     ]
  805   )
  806 fi
  807 
  808 VIPS_CFLAGS="$VIPS_CFLAGS $OPENEXR_CFLAGS"
  809 VIPS_LIBS="$VIPS_LIBS $OPENEXR_LIBS"
  810 
  811 # nifti
  812 AC_ARG_WITH([nifti],
  813   AS_HELP_STRING([--without-nifti], [build without nifti (default: test)]))
  814 
  815 if test x"$with_nifti" != x"no"; then
  816   FIND_NIFTI([
  817      with_nifti=yes
  818     ],[
  819      with_nifti=no
  820     ]
  821   )
  822 fi
  823 
  824 VIPS_CFLAGS="$VIPS_CFLAGS $NIFTI_CFLAGS"
  825 VIPS_INCLUDES="$VIPS_INCLUDES $NIFTI_INCLUDES"
  826 VIPS_LIBS="$VIPS_LIBS $NIFTI_LIBS"
  827 
  828 # jpeg-xl
  829 AC_ARG_WITH([libjxl],
  830   AS_HELP_STRING([--without-libjxl], [build without libjxl (default: test)]),
  831   [with_libjxl=$withval],
  832   [with_libjxl=$gmodule_with_flag])
  833 
  834 # libjxl as a dynamically loadable module
  835 AS_IF([test x"$with_libjxl" = x"module"],
  836   [with_libjxl_module=$gmodule_supported_flag],
  837   [with_libjxl_module=no])
  838 
  839 if test x"$with_libjxl" != x"no"; then
  840   PKG_CHECK_MODULES(LIBJXL, libjxl_threads >= 0.5 libjxl >= 0.5,
  841     [AC_DEFINE(HAVE_LIBJXL,1,[define if you have libjxl >= 0.5 installed.])
  842      with_libjxl=yes
  843      AS_IF([test x"$with_libjxl_module" = x"no"],
  844        [PACKAGES_USED="$PACKAGES_USED libjxl"])
  845     ],
  846     [AC_MSG_WARN([libjxl not found; disabling libjxl support])
  847      with_libjxl=no
  848      with_libjxl_module=no
  849     ]
  850   )
  851 fi
  852 
  853 if test x"$with_libjxl" = x"yes"; then
  854   save_LIBS="$LIBS"
  855   LIBS="$LIBS $LIBJXL_LIBS"
  856   # Introduced in 0.6
  857   AC_CHECK_FUNCS(JxlEncoderInitBasicInfo,[
  858      AC_DEFINE(HAVE_LIBJXL_JXLENCODERINITBASICINFO,1,
  859                [define if you have JxlEncoderInitBasicInfo.])
  860    ],[]
  861   )
  862   LIBS="$save_LIBS"
  863 fi
  864 
  865 
  866 AS_IF([test x"$with_libjxl_module" = x"yes"],
  867   [AC_DEFINE([LIBJXL_MODULE], [1], [define to build libjxl as a dynamically loadable module.])],
  868   [VIPS_CFLAGS="$VIPS_CFLAGS $LIBJXL_CFLAGS"
  869    VIPS_LIBS="$VIPS_LIBS $LIBJXL_LIBS"])
  870 AM_CONDITIONAL(LIBJXL_MODULE, [test x"$with_libjxl_module" = x"yes"])
  871 
  872 # openjpeg
  873 AC_ARG_WITH([libopenjp2],
  874   AS_HELP_STRING([--without-libopenjp2], 
  875                  [build without libopenjp2 (default: test)]))
  876 
  877 # 2.4 is the first one to have working threading and tiling
  878 if test x"$with_libopenjp2" != x"no"; then
  879   PKG_CHECK_MODULES(LIBOPENJP2, libopenjp2 >= 2.4,
  880     [AC_DEFINE(HAVE_LIBOPENJP2,1,
  881        [define if you have libopenjp2 >= 2.4 installed.])
  882      with_libopenjp2=yes
  883      PACKAGES_USED="$PACKAGES_USED libopenjp2"
  884     ],
  885     [AC_MSG_WARN([libopenjp2 not found; disabling libopenjp2 support])
  886      with_libopenjp2=no
  887     ]
  888   )
  889 fi
  890 
  891 VIPS_CFLAGS="$VIPS_CFLAGS $LIBOPENJP2_CFLAGS"
  892 VIPS_INCLUDES="$VIPS_INCLUDES $LIBOPENJP2_INCLUDES"
  893 VIPS_LIBS="$VIPS_LIBS $LIBOPENJP2_LIBS"
  894 
  895 # libheif
  896 AC_ARG_WITH([heif], 
  897   AS_HELP_STRING([--without-heif], [build without libheif (default: test)]),
  898   [with_heif=$withval],
  899   [with_heif=$gmodule_with_flag])
  900 
  901 # libheif as a dynamically loadable module
  902 AS_IF([test x"$with_heif" = x"module"],
  903   [with_heif_module=$gmodule_supported_flag],
  904   [with_heif_module=no])
  905 
  906 if test x"$with_heif" != x"no"; then
  907   PKG_CHECK_MODULES(HEIF, libheif >= 1.3.0,
  908     [with_heif=yes
  909      PKG_CHECK_VAR([have_h265_decoder], [libheif], [builtin_h265_decoder])
  910      PKG_CHECK_VAR([have_avif_decoder], [libheif], [builtin_avif_decoder])
  911      # test for !=no so that we work for older libheif which does not have
  912      # this variable
  913      if test x"$have_h265_decoder" != x"no" -o x"$have_avif_decoder" = x"yes"; then
  914         AC_DEFINE(HAVE_HEIF_DECODER,1,
  915              [define if your libheif has decode support.])
  916      fi
  917      PKG_CHECK_VAR([have_h265_encoder], [libheif], [builtin_h265_encoder])
  918      PKG_CHECK_VAR([have_avif_encoder], [libheif], [builtin_avif_encoder])
  919      if test x"$have_h265_encoder" != x"no" -o x"$have_avif_encoder" = x"yes"; then
  920         AC_DEFINE(HAVE_HEIF_ENCODER,1,
  921              [define if your libheif has encode support.])
  922      fi
  923      AS_IF([test x"$with_heif_module" = x"no"],
  924        [PACKAGES_USED="$PACKAGES_USED libheif"])
  925     ],
  926     [AC_MSG_WARN([libheif >= 1.3.0 not found; disabling HEIF support])
  927      with_heif=no
  928      with_heif_module=no
  929      have_h265_decoder=
  930      have_h265_encoder=
  931      have_avif_decoder=
  932      have_avif_encoder=
  933     ]
  934   )
  935 fi
  936 
  937 AS_IF([test x"$with_heif_module" = x"yes"],
  938   [AC_DEFINE([HEIF_MODULE], [1], [define to build libheif as a dynamically loadable module.])],
  939   [VIPS_CFLAGS="$VIPS_CFLAGS $HEIF_CFLAGS"
  940    VIPS_LIBS="$VIPS_LIBS $HEIF_LIBS"])
  941 AM_CONDITIONAL(HEIF_MODULE, [test x"$with_heif_module" = x"yes"])
  942 
  943 # color profile support added in 1.3.3
  944 if test x"$with_heif" = x"yes"; then
  945   save_LIBS="$LIBS"
  946   LIBS="$LIBS $HEIF_LIBS"
  947   AC_CHECK_FUNCS(heif_image_handle_get_raw_color_profile,[
  948      AC_DEFINE(HAVE_HEIF_COLOR_PROFILE,1,
  949                [define if you have heif_image_handle_get_raw_color_profile.])
  950    ],[]
  951   )
  952   LIBS="$save_LIBS"
  953 fi
  954 
  955 # heif_main_brand added in 1.4.0, but heif_avif appeared in 1.7 ... just check
  956 # the libheif version number since testing for enums is annoying
  957 if test x"$with_heif" = x"yes"; then
  958   PKG_CHECK_MODULES(HEIF_AVIF, libheif >= 1.7.0, [
  959     AC_DEFINE(HAVE_HEIF_AVIF,1,[define if you have heif_avif.])
  960   ], [
  961   ])
  962 fi
  963 
  964 # heif_decoding_options.convert_hdr_to_8bit added in 1.7.0
  965 if test x"$with_heif" = x"yes"; then
  966   save_CFLAGS="$CFLAGS"
  967   CFLAGS="$CFLAGS $HEIF_CFLAGS"
  968   AC_CHECK_MEMBER([struct heif_decoding_options.convert_hdr_to_8bit],[
  969      AC_DEFINE(HAVE_HEIF_DECODING_OPTIONS_CONVERT_HDR_TO_8BIT,1,
  970                [define if you have heif_decoding_options.convert_hdr_to_8bit])
  971    ],[],
  972    [#include <libheif/heif.h>])
  973   CFLAGS="$save_CFLAGS"
  974 fi
  975 
  976 # pdfium
  977 AC_ARG_WITH([pdfium],
  978   AS_HELP_STRING([--without-pdfium], [build without pdfium (default: test)]))
  979 
  980 # pick 4200 as the starting version number ... no reason, really, it'd
  981 # probably work with much older versions
  982 if test x"$with_pdfium" != x"no"; then
  983   PKG_CHECK_MODULES(PDFIUM, pdfium >= 4200, [
  984     AC_DEFINE(HAVE_PDFIUM,1,[define if you have pdfium > 4200.])
  985     if test x"$with_poppler" != x"no"; then
  986       AC_MSG_WARN([PDFium found, disabling poppler])
  987       with_poppler=no
  988     fi
  989     with_pdfium=yes
  990     PACKAGES_USED="$PACKAGES_USED pdfium"
  991   ], [
  992     with_pdfium=no
  993   ])
  994 fi
  995 
  996 VIPS_CFLAGS="$VIPS_CFLAGS $PDFIUM_CFLAGS"
  997 VIPS_LIBS="$VIPS_LIBS $PDFIUM_LIBS"
  998 
  999 # poppler
 1000 AC_ARG_WITH([poppler],
 1001   AS_HELP_STRING([--without-poppler], [build without poppler (default: test)]),
 1002   [with_poppler=$withval],
 1003   [with_poppler=$gmodule_with_flag])
 1004 
 1005 # poppler as a dynamically loadable module
 1006 AS_IF([test x"$with_poppler" = x"module"],
 1007   [with_poppler_module=$gmodule_supported_flag],
 1008   [with_poppler_module=no])
 1009 
 1010 if test x"$with_poppler" != x"no"; then
 1011   PKG_CHECK_MODULES(POPPLER, [poppler-glib >= 0.16.0 cairo >= 1.2], [
 1012     AC_DEFINE(HAVE_POPPLER,1,[define if you have poppler-glib >= 0.16.0 and cairo >= 1.2 installed.])
 1013     with_poppler=yes
 1014     AS_IF([test x"$with_poppler_module" = x"no"],
 1015       [PACKAGES_USED="$PACKAGES_USED poppler-glib cairo"])
 1016   ], [
 1017     AC_MSG_WARN([poppler-glib >= 0.16.0 or cairo >= 1.2 not found; disabling PDF load via poppler])
 1018     with_poppler=no
 1019     with_poppler_module=no
 1020   ])
 1021 fi
 1022 
 1023 AS_IF([test x"$with_poppler_module" = x"yes"],
 1024   [AC_DEFINE([POPPLER_MODULE], [1], [define to build poppler as a dynamically loadable module.])],
 1025   [VIPS_CFLAGS="$VIPS_CFLAGS $POPPLER_CFLAGS"
 1026    VIPS_LIBS="$VIPS_LIBS $POPPLER_LIBS"])
 1027 AM_CONDITIONAL(POPPLER_MODULE, [test x"$with_poppler_module" = x"yes"])
 1028 
 1029 # librsvg
 1030 AC_ARG_WITH([rsvg],
 1031   AS_HELP_STRING([--without-rsvg], [build without rsvg (default: test)]))
 1032 
 1033 # 2.40.3 so we get the UNLIMITED open flag
 1034 if test x"$with_rsvg" != x"no"; then
 1035   PKG_CHECK_MODULES(RSVG, [librsvg-2.0 >= 2.40.3 cairo >= 1.2], [
 1036     AC_DEFINE(HAVE_RSVG,1,[define if you have librsvg-2.0 >= 2.40.3 and cairo >= 1.2 installed.])
 1037     with_rsvg=yes
 1038     PACKAGES_USED="$PACKAGES_USED librsvg-2.0 cairo"
 1039 
 1040     # 2.46 for rsvg_handle_render_document
 1041     PKG_CHECK_MODULES(RSVG_HANDLE_RENDER_DOCUMENT, librsvg-2.0 >= 2.46,
 1042       [AC_DEFINE(HAVE_RSVG_HANDLE_RENDER_DOCUMENT,1,[define if your librsvg has rsvg_handle_render_document().])
 1043       ],
 1044       [:
 1045       ]
 1046     )
 1047   ], [
 1048     AC_MSG_WARN([librsvg-2.0 >= 2.40.3 or cairo >= 1.2 not found; disabling SVG load via rsvg])
 1049     with_rsvg=no
 1050   ])
 1051 fi
 1052 
 1053 VIPS_CFLAGS="$VIPS_CFLAGS $RSVG_CFLAGS"
 1054 VIPS_LIBS="$VIPS_LIBS $RSVG_LIBS"
 1055 
 1056 # zlib
 1057 # some platforms, like macosx, are missing the .pc files for zlib, so
 1058 # we fall back to FIND_ZLIB
 1059 AC_ARG_WITH([zlib], 
 1060   AS_HELP_STRING([--without-zlib], [build without zlib (default: test)]))
 1061 
 1062 if test x"$with_zlib" != x"no"; then
 1063   PKG_CHECK_MODULES(ZLIB, zlib >= 0.4,
 1064     [AC_DEFINE(HAVE_ZLIB,1,[define if you have zlib installed.])
 1065      with_zlib=yes
 1066      PACKAGES_USED="$PACKAGES_USED zlib"
 1067     ],
 1068     [FIND_ZLIB(
 1069        [with_zlib="yes (found by search)"
 1070        ], 
 1071        [AC_MSG_WARN([zlib not found; disabling SVGZ buffer support])
 1072         with_zlib=no
 1073        ]
 1074      )
 1075     ]
 1076   )
 1077 fi
 1078 
 1079 VIPS_CFLAGS="$VIPS_CFLAGS $ZLIB_CFLAGS"
 1080 VIPS_INCLUDES="$VIPS_INCLUDES $ZLIB_INCLUDES"
 1081 VIPS_LIBS="$VIPS_LIBS $ZLIB_LIBS"
 1082 
 1083 # OpenSlide
 1084 AC_ARG_WITH([openslide],
 1085   AS_HELP_STRING([--without-openslide], 
 1086     [build without OpenSlide (default: test)]),
 1087   [with_openslide=$withval],
 1088   [with_openslide=$gmodule_with_flag])
 1089 
 1090 # OpenSlide as a dynamically loadable module
 1091 AS_IF([test x"$with_openslide" = x"module"],
 1092   [with_openslide_module=$gmodule_supported_flag],
 1093   [with_openslide_module=no])
 1094 
 1095 if test x"$with_openslide" != x"no"; then
 1096   PKG_CHECK_MODULES(OPENSLIDE, [openslide >= 3.4.0],
 1097     [AC_DEFINE(HAVE_OPENSLIDE_3_4,1,[define if you have OpenSlide >= 3.4.0 installed.])
 1098      AC_DEFINE(HAVE_OPENSLIDE,1,[define if you have OpenSlide >= 3.3.0 installed.])
 1099      with_openslide=yes
 1100      AS_IF([test x"$with_openslide_module" = x"no"],
 1101        [PACKAGES_USED="$PACKAGES_USED openslide"])
 1102     ],
 1103     [AC_MSG_NOTICE([OpenSlide >= 3.4.0 not found; checking for >= 3.3.0])
 1104      PKG_CHECK_MODULES(OPENSLIDE, [openslide >= 3.3.0],
 1105        [AC_DEFINE(HAVE_OPENSLIDE,1,[define if you have OpenSlide >= 3.3.0 installed.])
 1106         with_openslide=yes
 1107         AS_IF([test x"$with_openslide_module" = x"no"],
 1108           [PACKAGES_USED="$PACKAGES_USED openslide"])
 1109        ],
 1110        [AC_MSG_WARN([OpenSlide >= 3.3.0 not found; disabling virtual slide support])
 1111         with_openslide=no
 1112         with_openslide_module=no
 1113        ]
 1114      )
 1115     ]
 1116   )
 1117 fi
 1118 
 1119 AS_IF([test x"$with_openslide_module" = x"yes"],
 1120   [AC_DEFINE([OPENSLIDE_MODULE], [1], [define to build OpenSlide as a dynamically loadable module.])],
 1121   [VIPS_CFLAGS="$VIPS_CFLAGS $OPENSLIDE_CFLAGS"
 1122    VIPS_LIBS="$VIPS_LIBS $OPENSLIDE_LIBS"])
 1123 AM_CONDITIONAL(OPENSLIDE_MODULE, [test x"$with_openslide_module" = x"yes"])
 1124 
 1125 # matio
 1126 AC_ARG_WITH([matio], 
 1127   AS_HELP_STRING([--without-matio], [build without matio (default: test)]))
 1128 
 1129 if test x"$with_matio" != x"no"; then
 1130   PKG_CHECK_MODULES(MATIO, matio,
 1131     [AC_DEFINE(HAVE_MATIO,1,[define if you have matio installed.])
 1132      with_matio=yes
 1133      PACKAGES_USED="$PACKAGES_USED matio"
 1134     ],
 1135     [AC_MSG_WARN([matio not found; disabling matio support])
 1136      with_matio=no
 1137     ]
 1138   )
 1139 fi
 1140 
 1141 VIPS_CFLAGS="$VIPS_CFLAGS $MATIO_CFLAGS"
 1142 VIPS_LIBS="$VIPS_LIBS $MATIO_LIBS"
 1143 
 1144 # not external libraries, but have options to disable them, helps to
 1145 # reduce attack surface
 1146 
 1147 AC_ARG_WITH([nsgif], 
 1148   AS_HELP_STRING([--without-nsgif], [build without nsgif load (default: with)]))
 1149 
 1150 if test x"$with_nsgif" != x"no"; then
 1151   AC_DEFINE(HAVE_NSGIF,1,[define to build nsgif load support.])
 1152   with_nsgif=yes
 1153 fi
 1154 
 1155 AM_CONDITIONAL(ENABLE_NSGIF, [test x"$with_nsgif" = x"yes"])
 1156 
 1157 AC_ARG_WITH([ppm], 
 1158   AS_HELP_STRING([--without-ppm], [build without ppm (default: with)]))
 1159 
 1160 if test x"$with_ppm" != x"no"; then
 1161   AC_DEFINE(HAVE_PPM,1,[define to build ppm support.])
 1162   with_ppm=yes
 1163 fi
 1164 
 1165 AC_ARG_WITH([analyze], 
 1166   AS_HELP_STRING([--without-analyze], [build without analyze (default: with)]))
 1167 
 1168 if test x"$with_analyze" != x"no"; then
 1169   AC_DEFINE(HAVE_ANALYZE,1,[define to build analyze support.])
 1170   with_analyze=yes
 1171 fi
 1172 
 1173 AC_ARG_WITH([radiance], 
 1174   AS_HELP_STRING([--without-radiance], [build without radiance (default: with)]))
 1175 
 1176 if test x"$with_radiance" != x"no"; then
 1177   AC_DEFINE(HAVE_RADIANCE,1,[define to build radiance support.])
 1178   with_radiance=yes
 1179 fi
 1180 
 1181 # cfitsio
 1182 AC_ARG_WITH([cfitsio], 
 1183   AS_HELP_STRING([--without-cfitsio], [build without cfitsio (default: test)]))
 1184 
 1185 if test x"$with_cfitsio" != x"no"; then
 1186   PKG_CHECK_MODULES(CFITSIO, cfitsio,
 1187     [AC_DEFINE(HAVE_CFITSIO,1,[define if you have cfitsio installed.])
 1188      with_cfitsio=yes
 1189      PACKAGES_USED="$PACKAGES_USED cfitsio"
 1190     ],
 1191     [AC_MSG_WARN([cfitsio not found; disabling cfitsio support])
 1192      with_cfitsio=no
 1193     ]
 1194   )
 1195 fi
 1196 
 1197 VIPS_CFLAGS="$VIPS_CFLAGS $CFITSIO_CFLAGS"
 1198 VIPS_LIBS="$VIPS_LIBS $CFITSIO_LIBS"
 1199 
 1200 # libwebp ... target 0.6+ to reduce complication
 1201 # webp has the stuff for handling metadata in two separate libraries  -- we
 1202 # insit on having all of them
 1203 AC_ARG_WITH([libwebp], 
 1204   AS_HELP_STRING([--without-libwebp], [build without libwebp (default: test)]))
 1205 
 1206 if test x"$with_libwebp" != x"no"; then
 1207   PKG_CHECK_MODULES(LIBWEBP, libwebp >= 0.6 libwebpmux >= 0.6 libwebpdemux >= 0.6,
 1208     [AC_DEFINE(HAVE_LIBWEBP,1,[define if you have libwebp/libwebpmux/libwebpdemux installed.])
 1209      with_libwebp=yes
 1210      PACKAGES_USED="$PACKAGES_USED libwebp libwebpmux libwebpdemux"
 1211     ],
 1212     [AC_MSG_WARN([libwebp, mux, demux not found; disabling WEBP support])
 1213      with_libwebp=no
 1214     ]
 1215   )
 1216 fi
 1217 
 1218 VIPS_CFLAGS="$VIPS_CFLAGS $LIBWEBP_CFLAGS"
 1219 VIPS_LIBS="$VIPS_LIBS $LIBWEBP_LIBS"
 1220 
 1221 # pangocairo for text rendering
 1222 AC_ARG_WITH([pangocairo], 
 1223   AS_HELP_STRING([--without-pangocairo], 
 1224     [build without pangocairo (default: test)]))
 1225 
 1226 if test x"$with_pangocairo" != x"no"; then
 1227   PKG_CHECK_MODULES(PANGOCAIRO, pangocairo,
 1228     [AC_DEFINE(HAVE_PANGOCAIRO,1,[define if you have pangocairo installed.])
 1229      with_pangocairo=yes
 1230      PACKAGES_USED="$PACKAGES_USED pangocairo"
 1231     ],
 1232     [AC_MSG_WARN([pangocairo not found; disabling pangocairo support])
 1233      with_pangocairo=no
 1234     ]
 1235   )
 1236 fi
 1237 
 1238 VIPS_CFLAGS="$VIPS_CFLAGS $PANGOCAIRO_CFLAGS"
 1239 VIPS_LIBS="$VIPS_LIBS $PANGOCAIRO_LIBS"
 1240 
 1241 # font file support with fontconfig
 1242 AC_ARG_WITH([fontconfig], 
 1243   AS_HELP_STRING([--without-fontconfig], 
 1244     [build without fontconfig (default: test)]))
 1245 
 1246 if test x"$with_pangocairo" != x"no" -a x"$with_fontconfig" != x"no"; then
 1247   PKG_CHECK_MODULES(FONTCONFIG, fontconfig,
 1248     [AC_DEFINE(HAVE_FONTCONFIG,1,[define if you have fontconfig installed.])
 1249      with_fontconfig=yes
 1250      PACKAGES_USED="$PACKAGES_USED fontconfig"
 1251     ],
 1252     [AC_MSG_WARN([fontconfig not found; disabling fontconfig support])
 1253      with_fontconfig=no
 1254     ]
 1255   )
 1256 fi
 1257 
 1258 VIPS_CFLAGS="$VIPS_CFLAGS $FONTCONFIG_CFLAGS"
 1259 VIPS_LIBS="$VIPS_LIBS $FONTCONFIG_LIBS"
 1260 
 1261 # look for TIFF with pkg-config ... fall back to our tester
 1262 # pkgconfig support for libtiff starts with libtiff-4
 1263 AC_ARG_WITH([tiff], 
 1264   AS_HELP_STRING([--without-tiff], [build without libtiff (default: test)]))
 1265 
 1266 if test x"$with_tiff" != x"no"; then
 1267   PKG_CHECK_MODULES(TIFF, libtiff-4,
 1268     [AC_DEFINE(HAVE_TIFF,1,[define if you have libtiff installed.])
 1269      with_tiff="yes (pkg-config libtiff-4)"
 1270      PACKAGES_USED="$PACKAGES_USED libtiff-4"
 1271     ],
 1272     [FIND_TIFF(
 1273        with_tiff="yes (found by search)",
 1274        [AC_MSG_WARN([libtiff not found; disabling TIFF support])
 1275         with_tiff=no
 1276        ]
 1277      )
 1278     ]
 1279   )
 1280 fi
 1281 
 1282 # ZSTD and WEBP in TIFF added in libtiff 4.0.10
 1283 if test x"$with_tiff" != x"no"; then
 1284   save_INCLUDES="$INCLUDES"
 1285   INCLUDES="$INCLUDES $TIFF_INCLUDES"
 1286   AC_CHECK_DECL(COMPRESSION_WEBP,[
 1287       AC_DEFINE(HAVE_TIFF_COMPRESSION_WEBP,1,[define if your libtiff has webp.])
 1288     ],[
 1289     ],[
 1290       [#include <tiffio.h>]
 1291     ]
 1292   )
 1293   INCLUDES="$save_INCLUDES"
 1294 fi
 1295 
 1296 VIPS_CFLAGS="$VIPS_CFLAGS $TIFF_CFLAGS"
 1297 VIPS_INCLUDES="$VIPS_INCLUDES $TIFF_INCLUDES"
 1298 VIPS_LIBS="$VIPS_LIBS $TIFF_LIBS"
 1299 
 1300 # Look for libspng first
 1301 # 0.6.1 uses "libspng.pc", git master libspng uses "spng.pc"
 1302 AC_ARG_WITH([libspng], 
 1303   AS_HELP_STRING([--without-libspng], [build without libspng (default: test)]))
 1304 
 1305 if test x"$with_libspng" != x"no"; then
 1306   PKG_CHECK_MODULES(SPNG, libspng >= 0.6,
 1307     [AC_DEFINE(HAVE_SPNG,1,[define if you have libspng installed.])
 1308      with_libspng=yes
 1309      PACKAGES_USED="$PACKAGES_USED libspng"
 1310     ],
 1311     [PKG_CHECK_MODULES(SPNG, spng >= 0.6,
 1312       [AC_DEFINE(HAVE_SPNG,1,[define if you have libspng installed.])
 1313        with_libspng=yes
 1314        PACKAGES_USED="$PACKAGES_USED spng"
 1315       ],
 1316       [with_libspng=no
 1317       ]
 1318      )
 1319     ]
 1320   )
 1321 fi
 1322 
 1323 VIPS_CFLAGS="$VIPS_CFLAGS $SPNG_CFLAGS"
 1324 VIPS_LIBS="$VIPS_LIBS $SPNG_LIBS"
 1325 
 1326 # look for PNG with pkg-config ... fall back to our tester
 1327 # we can have both PNG and SPNG enabled, with SPNG for read and PNG for
 1328 # write
 1329 AC_ARG_WITH([png], 
 1330   AS_HELP_STRING([--without-png], [build without libpng (default: test)]))
 1331 
 1332 if test x"$with_png" != x"no"; then
 1333   PKG_CHECK_MODULES(PNG, libpng >= 1.2.9, 
 1334     [AC_DEFINE(HAVE_PNG,1,[define if you have libpng installed.])
 1335      with_png="yes (pkg-config libpng >= 1.2.9)"
 1336      PACKAGES_USED="$PACKAGES_USED libpng"
 1337     ],
 1338     [FIND_PNG(
 1339        [with_png="yes (found by search)"
 1340        ],
 1341        [AC_MSG_WARN([libpng not found; disabling PNG support])
 1342         with_png=no
 1343        ]
 1344      )
 1345     ]
 1346   )
 1347 fi
 1348 
 1349 if test x"$with_png" != x"no"; then
 1350   save_LIBS="$LIBS"
 1351   save_CFLAGS="$CFLAGS"
 1352   LIBS="$PNG_LIBS $LIBS"
 1353   CFLAGS="$PNG_INCLUDES $CFLAGS"
 1354   AC_CHECK_FUNCS(png_set_chunk_malloc_max,
 1355     AC_DEFINE(HAVE_PNG_SET_CHUNK_MALLOC_MAX,1,
 1356               [define if your libpng has png_set_chunk_malloc_max.]))
 1357   LIBS="$save_LIBS"
 1358   CFLAGS="$save_CFLAGS"
 1359 fi
 1360 
 1361 VIPS_CFLAGS="$VIPS_CFLAGS $PNG_CFLAGS"
 1362 VIPS_INCLUDES="$VIPS_INCLUDES $PNG_INCLUDES"
 1363 VIPS_LIBS="$VIPS_LIBS $PNG_LIBS"
 1364 
 1365 # look for libimagequant with pkg-config (only if libpng is enabled)
 1366 AC_ARG_WITH([imagequant],
 1367   AS_HELP_STRING([--without-imagequant], [build without imagequant (default: test)]))
 1368 
 1369 if test x"$with_imagequant" != x"no"; then
 1370   PKG_CHECK_MODULES(IMAGEQUANT, imagequant,
 1371     [AC_DEFINE(HAVE_IMAGEQUANT,1,[define if you have imagequant installed.])
 1372      with_imagequant=yes
 1373      PACKAGES_USED="$PACKAGES_USED imagequant"
 1374     ],
 1375     [AC_MSG_WARN([libimagequant not found; disabling 8bpp PNG support])
 1376      with_imagequant=no
 1377     ]
 1378   )
 1379 else
 1380   with_imagequant=no
 1381 fi
 1382 
 1383 VIPS_CFLAGS="$VIPS_CFLAGS $IMAGEQUANT_CFLAGS"
 1384 VIPS_LIBS="$VIPS_LIBS $IMAGEQUANT_LIBS"
 1385 
 1386 # look for libjpeg with pkg-config ... fall back to our tester
 1387 AC_ARG_WITH([jpeg], 
 1388   AS_HELP_STRING([--without-jpeg], [build without libjpeg (default: test)]))
 1389 
 1390 if test x"$with_jpeg" != x"no"; then
 1391   PKG_CHECK_MODULES(JPEG, libjpeg,
 1392     [AC_DEFINE(HAVE_JPEG,1,[define if you have libjpeg installed.])
 1393      with_jpeg="yes (pkg-config)"
 1394      PACKAGES_USED="$PACKAGES_USED libjpeg"
 1395     ],
 1396     [FIND_JPEG(
 1397        [with_jpeg="yes (found by search)"
 1398         EXTRA_LIBS_USED="$EXTRA_LIBS_USED -ljpeg"
 1399        ],
 1400        [AC_MSG_WARN([libjpeg not found; disabling JPEG support])
 1401         with_jpeg=no
 1402        ]
 1403      )
 1404     ]
 1405   )
 1406 fi
 1407 
 1408 # features like trellis quant are exposed as extension parameters ...
 1409 # mozjpeg 3.2 and later have #define JPEG_C_PARAM_SUPPORTED, but we must 
 1410 # work with earlier versions
 1411 if test x"$with_jpeg" != x"no"; then
 1412   save_LIBS="$LIBS"
 1413   save_CFLAGS="$CFLAGS"
 1414   LIBS="$JPEG_LIBS $LIBS"
 1415   CFLAGS="$JPEG_INCLUDES $CFLAGS"
 1416   AC_CHECK_FUNCS(jpeg_c_bool_param_supported,
 1417     AC_DEFINE(HAVE_JPEG_EXT_PARAMS,1,
 1418               [define if your libjpeg has extension parameters.]))
 1419   LIBS="$save_LIBS"
 1420   CFLAGS="$save_CFLAGS"
 1421 fi
 1422 
 1423 VIPS_CFLAGS="$VIPS_CFLAGS $JPEG_CFLAGS"
 1424 VIPS_INCLUDES="$VIPS_INCLUDES $JPEG_INCLUDES"
 1425 VIPS_LIBS="$VIPS_LIBS $JPEG_LIBS"
 1426 
 1427 # libexif
 1428 AC_ARG_WITH([libexif], 
 1429   AS_HELP_STRING([--without-libexif], [build without libexif (default: test)]))
 1430 
 1431 if test x"$with_libexif" != x"no"; then
 1432   PKG_CHECK_MODULES(EXIF, libexif >= 0.6,
 1433     [AC_DEFINE(HAVE_EXIF,1,[define if you have libexif >= 0.6 installed.])
 1434      with_libexif=yes
 1435      PACKAGES_USED="$PACKAGES_USED libexif"
 1436     ],
 1437     [AC_MSG_WARN([libexif >= 0.6 not found; disabling exif support])
 1438      with_libexif=no
 1439     ]
 1440   )
 1441 fi
 1442 
 1443 # some libexif packages need include <libexif/poop.h>, some just <poop.h>
 1444 # how annoying
 1445 if test x"$with_libexif" != x"no"; then
 1446   # cppflags not cflags because we want the preproc to see the -I as well
 1447   save_CPPFLAGS="$CPPFLAGS"
 1448   CPPFLAGS="$EXIF_CFLAGS $CPPFLAGS"
 1449   AC_CHECK_HEADER(exif-data.h,
 1450     AC_DEFINE(UNTAGGED_EXIF,1,[libexif includes don't need libexif prefix]))
 1451   CPPFLAGS="$save_CPPFLAGS"
 1452 fi
 1453 
 1454 VIPS_CFLAGS="$VIPS_CFLAGS $EXIF_CFLAGS"
 1455 VIPS_LIBS="$VIPS_LIBS $EXIF_LIBS"
 1456 
 1457 # GIF save with libcgif (requires libimagequant also)
 1458 AC_ARG_WITH([cgif],
 1459   AS_HELP_STRING([--without-cgif], [build without cgif (default: test)]))
 1460 
 1461 if test x"$with_imagequant" == x"yes" && test x"$with_cgif" != x"no"; then
 1462   PKG_CHECK_MODULES(CGIF, cgif,
 1463     [AC_DEFINE(HAVE_CGIF,1,[define if you have cgif installed.])
 1464       with_cgif=yes
 1465       PACKAGES_USED="$PACKAGES_USED cgif"
 1466     ],
 1467     [AC_MSG_WARN([libcgif not found])
 1468       with_cgif=no
 1469     ]
 1470   )
 1471 else
 1472   with_cgif=no
 1473 fi
 1474 
 1475 VIPS_CFLAGS="$VIPS_CFLAGS $CGIF_CFLAGS"
 1476 VIPS_LIBS="$VIPS_LIBS $CGIF_LIBS"
 1477 
 1478 # fuzzing
 1479 AC_ARG_VAR([LIB_FUZZING_ENGINE],
 1480            [fuzzing library, e.g. /path/to/libFuzzer.a])
 1481 if test x"$LIB_FUZZING_ENGINE" = x; then
 1482   LIB_FUZZING_ENGINE="libstandaloneengine.a"
 1483 fi
 1484 
 1485 VIPS_CFLAGS="$VIPS_CFLAGS $VIPS_DEBUG_FLAGS $REQUIRED_CFLAGS"
 1486 VIPS_LIBS="$VIPS_LIBS $REQUIRED_LIBS -lm"
 1487 
 1488 # build options relevant at runtime ... this becomes `vips --vips-config`
 1489 # output
 1490 VIPS_CONFIG="\
 1491 enable debug: $enable_debug, \
 1492 enable deprecated library components: $enable_deprecated, \
 1493 enable modules: $gmodule_supported_flag, \
 1494 use fftw3 for FFT: $with_fftw, \
 1495 accelerate loops with orc: $with_orc, \
 1496 ICC profile support with lcms: $with_lcms, \
 1497 zlib: $with_zlib, \
 1498 text rendering with pangocairo: $with_pangocairo, \
 1499 font file support with fontconfig: $with_fontconfig, \
 1500 RAD load/save: $with_radiance, \
 1501 Analyze7 load/save: $with_analyze, \
 1502 PPM load/save: $with_ppm, \
 1503 GIF load:  $with_nsgif, \
 1504 EXIF metadata support with libexif: $with_libexif, \
 1505 JPEG load/save with libjpeg: $with_jpeg, \
 1506 JXL load/save with libjxl: $with_libjxl (dynamic module: $with_libjxl_module), \
 1507 JPEG2000 load/save with libopenjp2: $with_libopenjp2, \
 1508 PNG load with libspng: $with_libspng, \
 1509 PNG load/save with libpng: $with_png, \
 1510 quantisation to 8 bit: $with_imagequant, \
 1511 TIFF load/save with libtiff: $with_tiff, \
 1512 image pyramid save: $with_gsf, \
 1513 HEIC/AVIF load/save with libheif: $with_heif (dynamic module: $with_heif_module), \
 1514 WebP load/save with libwebp: $with_libwebp, \
 1515 PDF load with PDFium:  $with_pdfium, \
 1516 PDF load with poppler-glib: $with_poppler (dynamic module: $with_poppler_module), \
 1517 SVG load with librsvg-2.0: $with_rsvg, \
 1518 EXR load with OpenEXR: $with_OpenEXR, \
 1519 OpenSlide load: $with_openslide (dynamic module: $with_openslide_module), \
 1520 Matlab load with matio: $with_matio, \
 1521 NIfTI load/save with niftiio: $with_nifti, \
 1522 FITS load/save with cfitsio: $with_cfitsio, \
 1523 GIF save with cgif: $with_cgif, \
 1524 Magick package: $with_magickpackage (dynamic module: $with_magick_module), \
 1525 Magick API version: $magick_version, \
 1526 load with libMagickCore: $enable_magickload, \
 1527 save with libMagickCore: $enable_magicksave"
 1528 
 1529 AC_SUBST(VIPS_LIBDIR)
 1530 
 1531 AC_SUBST(VIPS_CFLAGS)
 1532 AC_SUBST(VIPS_INCLUDES)
 1533 AC_SUBST(VIPS_LIBS)
 1534 AC_SUBST(VIPS_CONFIG)
 1535 AC_SUBST(PACKAGES_USED)
 1536 AC_SUBST(EXTRA_LIBS_USED)
 1537 
 1538 AC_CONFIG_FILES([
 1539         vips.pc
 1540         vips-cpp.pc
 1541         Makefile
 1542         $srcdir/libvips/include/vips/version.h
 1543         libvips/include/Makefile
 1544         libvips/include/vips/Makefile
 1545         libvips/Makefile
 1546         libvips/arithmetic/Makefile
 1547         libvips/colour/Makefile
 1548         libvips/colour/profiles/Makefile
 1549         libvips/conversion/Makefile
 1550         libvips/convolution/Makefile
 1551         libvips/deprecated/Makefile
 1552         libvips/foreign/Makefile
 1553         libvips/foreign/libnsgif/Makefile
 1554         libvips/freqfilt/Makefile
 1555         libvips/histogram/Makefile
 1556         libvips/draw/Makefile
 1557         libvips/iofuncs/Makefile
 1558         libvips/module/Makefile
 1559         libvips/morphology/Makefile
 1560         libvips/mosaicing/Makefile
 1561         libvips/create/Makefile
 1562         libvips/resample/Makefile
 1563         cplusplus/Doxyfile
 1564         cplusplus/include/Makefile
 1565         cplusplus/include/vips/Makefile
 1566         cplusplus/Makefile
 1567         tools/Makefile
 1568         tools/batch_crop
 1569         tools/batch_image_convert
 1570         tools/batch_rubber_sheet
 1571         tools/light_correct
 1572         tools/shrink_width
 1573         test/Makefile
 1574         test/variables.sh
 1575         test/test-suite/Makefile
 1576         test/test-suite/helpers/Makefile
 1577         man/Makefile
 1578         doc/Makefile
 1579         doc/libvips-docs.xml
 1580         po/Makefile.in
 1581         fuzz/Makefile
 1582 ])
 1583 AC_OUTPUT
 1584 
 1585 # also add any new items to VIPS_CONFIG above
 1586 AC_MSG_RESULT([dnl
 1587 ## Build options
 1588 enable debug:                           $enable_debug
 1589 enable deprecated library components:   $enable_deprecated
 1590 enable modules:                         $gmodule_supported_flag
 1591 enable C docs with gtkdoc:              $enable_gtk_doc
 1592  (requires gtk-doc 1.14 or later)
 1593 enable C++ docs with doxygen:           $enable_doxygen
 1594 gobject introspection:                  $found_introspection
 1595  (requires gobject-introspection 1.30 or later)
 1596 RAD load/save:                          $with_radiance
 1597 Analyze7 load/save:                     $with_analyze
 1598 PPM load/save:                          $with_ppm
 1599 GIF load:                               $with_nsgif
 1600 
 1601 ## Optional dependencies
 1602 use fftw3 for FFT:                      $with_fftw
 1603 accelerate loops with orc:              $with_orc
 1604  (requires orc-0.4.11 or later)
 1605 ICC profile support with lcms:          $with_lcms
 1606 zlib:                                   $with_zlib
 1607 text rendering with pangocairo:         $with_pangocairo
 1608 font file support with fontconfig:      $with_fontconfig
 1609 EXIF metadata support with libexif:     $with_libexif
 1610 
 1611 ## File format support
 1612 JPEG load/save with libjpeg:            $with_jpeg
 1613 JXL load/save with libjxl:              $with_libjxl (dynamic module: $with_libjxl_module)
 1614 JPEG2000 load/save with libopenjp2:     $with_libopenjp2
 1615  (requires libopenjp2 2.4 or later)
 1616 PNG load with libspng:                  $with_libspng
 1617  (requires libspng-0.6 or later)
 1618 PNG load/save with libpng:              $with_png
 1619  (requires libpng-1.2.9 or later)
 1620 quantisation to 8 bit:                  $with_imagequant
 1621  (requires libimagequant)
 1622 TIFF load/save with libtiff:            $with_tiff
 1623 image pyramid save:                     $with_gsf
 1624  (requires libgsf-1 1.14.26 or later)
 1625 HEIC/AVIF load/save with libheif:       $with_heif (dynamic module: $with_heif_module)
 1626 WebP load/save with libwebp:            $with_libwebp
 1627  (requires libwebp, libwebpmux, libwebpdemux 0.6.0 or later)
 1628 PDF load with PDFium:                   $with_pdfium
 1629 PDF load with poppler-glib:             $with_poppler (dynamic module: $with_poppler_module)
 1630  (requires poppler-glib 0.16.0 or later)
 1631 SVG load with librsvg-2.0:              $with_rsvg
 1632  (requires librsvg-2.0 2.34.0 or later)
 1633 EXR load with OpenEXR:                  $with_OpenEXR
 1634 OpenSlide support:                      $with_openslide (dynamic module: $with_openslide_module)
 1635  (requires openslide-3.3.0 or later)
 1636 Matlab load with matio:                 $with_matio
 1637 NIfTI load/save with niftiio:           $with_nifti
 1638 FITS load/save with cfitsio:            $with_cfitsio
 1639 GIF save with cgif:                     $with_cgif
 1640  (requires cgif, libimagequant)
 1641 Magick package:                         $with_magickpackage (dynamic module: $with_magick_module)
 1642 Magick major API version:               $magick_version
 1643 load with libMagickCore:                $enable_magickload
 1644 save with libMagickCore:                $enable_magicksave
 1645 ])