diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 6e90e07d..00000000 --- a/INSTALL +++ /dev/null @@ -1,370 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, -Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - HP-UX `make' updates targets which have the same time stamps as -their prerequisites, which makes it generally unusable when shipped -generated files such as `configure' are involved. Use GNU `make' -instead. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf limitation. Until the limitation is lifted, you can use -this workaround: - - CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 0203c8d8..00000000 --- a/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -SUBDIRS = \ - libvips \ - cplusplus \ - tools \ - po \ - man \ - doc \ - test \ - fuzz - -EXTRA_DIST = \ - autogen.sh \ - benchmark \ - depcomp \ - m4 \ - meson.build \ - meson_options.txt \ - po/meson.build \ - README.md \ - suppressions \ - vips-cpp.pc.in \ - vips.pc.in - -pkgconfig_DATA = vips.pc vips-cpp.pc - -dist-hook: -# make sure we don't get any .svn dirs from EXTRA_DIST -# also "fred" gets left around occasionally - -find $(distdir) -name .svn -exec rm -rf {} \; - -find $(distdir) -name fred -exec rm {} \; - -ACLOCAL_AMFLAGS = -I m4 - -DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-introspection diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index b249cc8c..00000000 --- a/autogen.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# Based on: https://wiki.gnome.org/Projects/GnomeCommon/Migration#autogen.sh -# Run this to generate all the initial makefiles, etc. -test -n "$srcdir" || srcdir=$(dirname "$0") -test -n "$srcdir" || srcdir=. - -olddir=$(pwd) - -cd $srcdir - -(test -f configure.ac) || { - echo "*** ERROR: Directory '$srcdir' does not look like" >&2 - echo "*** like the top-level project directory" >&2 - exit 1 -} - -if ! gtkdocize --version > /dev/null; then - echo "*** ERROR: You must have gtkdocize installed" >&2 - echo "*** to be able to reconfigure libvips." >&2 - exit 1 -fi - -# shellcheck disable=SC2016 -PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac) - -if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then - echo "*** WARNING: I am going to run 'configure' with no arguments." >&2 - echo "*** If you wish to pass any to it, please specify them on the" >&2 - echo "*** '$0' command line." >&2 - echo "" >&2 -fi - -aclocal -I m4 --install || exit 1 -glib-gettextize --force --copy > /dev/null || exit 1 -gtkdocize --copy --docdir doc --flavour no-tmpl || exit 1 -autoreconf --verbose --force --install -Wno-portability || exit 1 - -cd "$olddir" -if [ "$NOCONFIGURE" = "" ]; then - $srcdir/configure "$@" || exit 1 - - if [ "$1" = "--help" ]; then - exit 0 - else - echo "Now type 'make' to compile $PKG_NAME" || exit 1 - fi -else - echo "Skipping configure process." -fi diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 2ed8b9a4..00000000 --- a/configure.ac +++ /dev/null @@ -1,1700 +0,0 @@ -# Process this file with autoconf to produce a configure script. - -# also update the version number in the m4 macros below - -AC_INIT([vips], [8.13.0], [vipsip@jiscmail.ac.uk]) -# required for gobject-introspection -AC_PREREQ([2.69]) - -# gobject-introspection recommends -Wno-portability -# foreign stops complaints about a missing README (we use README.md instead) -# and missing INSTALL (the standard Gnu INSTALL is not very useful) -# subdir-objects lets us have dummy.cc in a subdir -AM_INIT_AUTOMAKE([-Wno-portability foreign subdir-objects]) - -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) - -# user-visible library versioning -m4_define([vips_major_version], [8]) -m4_define([vips_minor_version], [13]) -m4_define([vips_micro_version], [0]) -m4_define([vips_version], - [vips_major_version.vips_minor_version.vips_micro_version]) - -VIPS_MAJOR_VERSION=vips_major_version() -VIPS_MINOR_VERSION=vips_minor_version() -VIPS_MICRO_VERSION=vips_micro_version() -VIPS_VERSION=vips_version() -VIPS_VERSION_STRING="$VIPS_VERSION-$(date -u -r $srcdir/ChangeLog)" - -# packages add to these as we find them -VIPS_CFLAGS="" -VIPS_INCLUDES="" -VIPS_LIBS="" - -# libtool library versioning ... not user-visible (except as part of the -# library file name) and does not correspond to major/minor/micro above - -# rules: -# sources changed: increment revision -# binary interface changed: increment current, reset revision to 0 -# binary interface changes backwards compatible?: increment age -# binary interface changes not backwards compatible?: reset age to 0 -LIBRARY_REVISION=0 -LIBRARY_CURRENT=57 -LIBRARY_AGE=15 - -# patched into include/vips/version.h -AC_SUBST(VIPS_VERSION) -AC_SUBST(VIPS_VERSION_STRING) -AC_SUBST(VIPS_MAJOR_VERSION) -AC_SUBST(VIPS_MINOR_VERSION) -AC_SUBST(VIPS_MICRO_VERSION) - -# put into library name by libsrc/Makefile.am and libsrcCC/Makefile.am -AC_SUBST(LIBRARY_CURRENT) -AC_SUBST(LIBRARY_REVISION) -AC_SUBST(LIBRARY_AGE) - -# init introspection support -have_introspection=no -m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [ - GOBJECT_INTROSPECTION_CHECK([1.30.0]) - if test "x$found_introspection" = x"yes"; then - have_introspection=yes - fi -], [ - AM_CONDITIONAL([HAVE_INTROSPECTION], false) -]) - -# gir needs a list of source files to scan for introspection -# -# build with a glob and a list of files to exclude from scanning -# see also IGNORE_HFILES in doc/Makefile.am -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) -for name in $introspection_sources; do - vips_introspection_sources="$vips_introspection_sources $name" -done - -# add headers that form the public vips8 API .. don't do a find and exclude, -# we end up excluding almost everything argh -headers="\ - basic.h \ - vips.h \ - object.h \ - image.h \ - error.h \ - foreign.h \ - freqfilt.h \ - interpolate.h \ - header.h \ - histogram.h \ - operation.h \ - enumtypes.h \ - conversion.h \ - arithmetic.h \ - colour.h \ - convolution.h \ - create.h \ - draw.h \ - morphology.h \ - mosaicing.h \ - type.h \ - rect.h \ - resample.h \ - memory.h \ - region.h" - -for name in $headers; do - vips_introspection_sources="$vips_introspection_sources include/vips/$name" -done - -AC_SUBST(vips_introspection_sources) - -AC_CANONICAL_HOST - -AC_DEFINE_UNQUOTED(G_LOG_DOMAIN, "VIPS", [Domain for glib logging messages.]) - -m4_define([debug_default], [no]) -AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],[turn on debugging @<:@default=debug_default()@:>@]),, - enable_debug=debug_default()) - -if test x"$enable_debug" = x"yes"; then - VIPS_DEBUG_FLAGS="-DDEBUG_FATAL -DDEBUG_LEAK" -else - VIPS_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS" - - if test x"$enable_debug" = x"no"; then - VIPS_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS" - fi -fi - -# option to disable deprecated code, shaves a bit off the library size -AC_ARG_ENABLE(deprecated, - AS_HELP_STRING([--enable-deprecated], [build deprecated components (default: yes)])) - -VIPS_ENABLE_DEPRECATED=0 -if test x"$enable_deprecated" != x"no"; then - VIPS_ENABLE_DEPRECATED=1 - enable_deprecated=yes -fi -AC_DEFINE_UNQUOTED(ENABLE_DEPRECATED,$VIPS_ENABLE_DEPRECATED,[define to build deprecated components]) -AM_CONDITIONAL(ENABLE_DEPRECATED, [test x"$enable_deprecated" = x"yes"]) - -# this gets pasted into version.h as a #define -AC_SUBST(VIPS_ENABLE_DEPRECATED) - -AC_MSG_CHECKING([for -mms-bitfields support]) -case "$host_os" in - mingw*) - # makes gcc use win native alignment - # GCC >= 4.7 and Clang >= 11 does this automatically, see: - # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1510#note_841637 - VIPS_CFLAGS="-mms-bitfields $VIPS_CFLAGS" - AC_MSG_RESULT([yes]) - ;; - *) - AC_MSG_RESULT([no]) - ;; -esac - -# set the default directory for ICC profiles -case "$host_os" in - darwin*) - profile_dir="/Library/ColorSync/Profiles" - ;; - mingw*) - # need double escapes since this will get pasted into a #define in a C - # header ... the C:\Windows is usually overwritten with the result of - # GetWindowsDirectoryW() - profile_dir="C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\color" - ;; - *) - profile_dir="/usr/share/color/icc" - ;; -esac -AC_DEFINE_UNQUOTED(VIPS_ICC_DIR,"$profile_dir",[default directory for ICC profiles]) - -# we want largefile support, if possible -AC_SYS_LARGEFILE - -# we use libtool and can generate DLLs cleanly on win32 if necessary -LT_INIT([win32-dll]) - -# Checks for programs. -AC_PROG_AWK -AC_PROG_CC -AC_PROG_CC_STDC -AC_PROG_CXX -AC_PROG_INSTALL -AC_PROG_LN_S - -AC_ARG_ENABLE([doxygen], - AS_HELP_STRING([--enable-doxygen], [enable C++ doc build (default: no)]), - [enable_doxygen="$enableval"], - [enable_doxygen=no]) - -if test x"$enable_doxygen" = x"yes"; then - AC_CHECK_PROGS([DOXYGEN], [doxygen]) - if ! test "$DOXYGEN"; then - AC_MSG_WARN([doxygen not found; C++ docs will not be generated]) - enable_doxygen=no - fi -fi -AM_CONDITIONAL(HAVE_DOXYGEN, [test x"$enable_doxygen" = x"yes"]) - -# we need a fully expanded version of $libdir -# without this we get something like -# define VIPS_LIBDIR ${exec_prefix}/lib -# argh -test x"$prefix" = x"NONE" && prefix=$ac_default_prefix -test x"$exec_prefix" = x"NONE" && exec_prefix='${prefix}' - -# set $expanded_value to the fully-expanded value of the argument -expand () { - eval expanded_value=$1 - - if test x"$expanded_value" != x"$1"; then - expand "$expanded_value" - fi -} - -expand $libdir -VIPS_LIBDIR=$expanded_value - -# this gets pasted into version.h as a #define -VIPS_EXEEXT=$EXEEXT -AC_SUBST(VIPS_EXEEXT) - -# cplusplus/Doxyfile.in needs an input and output directory ... they are the -# same for configure, but meson has separate source and build areas -DOXY_INPUT_DIRECTORY=$ac_pwd/$srcdir/cplusplus -DOXY_OUTPUT_DIRECTORY=$ac_pwd/$srcdir/cplusplus -AC_SUBST(DOXY_INPUT_DIRECTORY) -AC_SUBST(DOXY_OUTPUT_DIRECTORY) - -# vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback) -# the configure-time install prefix -AC_DEFINE_UNQUOTED(VIPS_PREFIX,"$prefix",[configure-time install prefix]) -AC_DEFINE_UNQUOTED(VIPS_LIBDIR,"$VIPS_LIBDIR",[configure-time library directory]) - -# i18n -# we need to name our .mo with major.minor so we can have multiple versions -# installed in parallel on Debian -expand vips$VIPS_MAJOR_VERSION.$VIPS_MINOR_VERSION -GETTEXT_PACKAGE=$expanded_value - -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", - [The prefix for our gettext translation domains.]) -# the 'malkovich' one is there for testing only, remove for release -#ALL_LINGUAS="en_GB de malkovich" -ALL_LINGUAS="en_GB de" -AM_GLIB_GNU_GETTEXT - -# Compatibility with pkg.m4 < 0.27 -m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], - [AC_ARG_WITH([pkgconfigdir], - [AS_HELP_STRING([--with-pkgconfigdir], - [install directory for *.pc pkg-config file])], - [],[with_pkgconfigdir='$(libdir)/pkgconfig']) - AC_SUBST([pkgconfigdir], [${with_pkgconfigdir}])]) - -# Compatibility with pkg.m4 < 0.28 -m4_define_default([PKG_CHECK_VAR], - [AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config]) - AS_IF([test -z "$$1"], [$1=`$PKG_CONFIG --variable="$3" "$2"`]) - AS_IF([test -n "$$1"], [$4], [$5])]) - -# we need to disable some features on some known-bad gcc versions -# these will be "" for clang etc. -# -# I couldn't get this to work, mysterious! do it ourselves -# -# AX_CHECK_COMPILE_FLAG([-dumpversion], -# [ax_gcc_version_option=yes], -# [ax_gcc_version_option=no] -# ) -AC_MSG_CHECKING([for $CC version]) -GCC_VERSION="" -version=$($CC -dumpversion) -if test $? = 0; then - GCC_VERSION=$version - AC_MSG_RESULT([$GCC_VERSION]) -else - AC_MSG_RESULT([-dumpversion not supported]) -fi - -GCC_VERSION_MAJOR=$(echo $GCC_VERSION | cut -d'.' -f1) -GCC_VERSION_MINOR=$(echo $GCC_VERSION | cut -d'.' -f2) -GCC_VERSION_PATCH=$(echo $GCC_VERSION | cut -d'.' -f3) - -# Checks for libraries. - -# build list of pkg-config packages we used here -PACKAGES_USED="" - -# build list of extra libs we need here -# the main one is jpeg: it does not have a .pc file, so when we make vips.pc -# we need to put -ljpeg into libs ourselves -EXTRA_LIBS_USED="" - -# Checks for header files. -AC_HEADER_DIRENT -AC_HEADER_STDC -AC_CHECK_HEADERS([sys/file.h sys/param.h sys/mman.h unistd.h io.h direct.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_RESTRICT -AX_GCC_VAR_ATTRIBUTE(vector_size) -AC_C_CONST -AC_TYPE_MODE_T -AC_TYPE_OFF_T -AC_TYPE_SIZE_T - -# g++/gcc 4.x and 5.x have rather broken vector support ... 5.4.1 seems to -# work, but 5.4.0 fails to even compile -AC_MSG_CHECKING([for $CC with working vector support]) -if test x"$GCC_VERSION_MAJOR" != x"4" -a x"$GCC_VERSION_MAJOR" != x"5"; then - AC_MSG_RESULT([yes]) -else - ax_cv_have_var_attribute_vector_size=no - AC_MSG_RESULT([no]) -fi - -# we need to be able to shuffle vectors in C++ -if test x"$ax_cv_have_var_attribute_vector_size" = x"yes"; then - AC_MSG_CHECKING([for C++ vector shuffle]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16))); - ]], [[ - v4f f; f[3] = 99; - ]])],[ - AC_MSG_RESULT([yes]) - have_vector_shuffle=yes - ],[ - AC_MSG_RESULT([no]) - have_vector_shuffle=no - ]) - AC_LANG_POP([C++]) - - if test x"$have_vector_shuffle" = x"yes"; then - AC_DEFINE_UNQUOTED(HAVE_VECTOR_SHUFFLE, 1, - [define if your C++ can shuffle vectors]) - fi -fi - -# we also need to be able to mix vector and scalar arithmetic -if test x"$have_vector_shuffle" = x"yes"; then - AC_MSG_CHECKING([for C++ vector arithmetic]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16))); - ]], [[ - v4f f = {1, 2, 3, 4}; f *= 12.0; - v4f g = {5, 6, 7, 8}; f = g > 0 ? g : -1 * g; - ]])],[ - AC_MSG_RESULT([yes]) - have_vector_arith=yes - ],[ - AC_MSG_RESULT([no]) - have_vector_arith=no - ]) - AC_LANG_POP([C++]) -fi - -# gcc 7.2 seems to work, but then gets confused by signed constants in -# templates -if test x"$have_vector_arith" = x"yes"; then - AC_MSG_CHECKING([for C++ signed constants in vector templates]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16))); - template - static void - h( v4f B ) - { - v4f f; - f = -1 * B; - } - ]], [[ - ]])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - have_vector_arith=no - ]) - AC_LANG_POP([C++]) - - if test x"$have_vector_arith" = x"yes"; then - AC_DEFINE_UNQUOTED(HAVE_VECTOR_ARITH, 1, - [define if your C++ can mix vector and scalar arithmetic]) - fi -fi - -# Checks for library functions. -AC_FUNC_MEMCMP -AC_FUNC_MMAP -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([vsnprintf _aligned_malloc posix_memalign memalign]) -AC_CHECK_LIB(m,cbrt,[AC_DEFINE(HAVE_CBRT,1,[have cbrt() in libm.])]) -AC_CHECK_LIB(m,hypot,[AC_DEFINE(HAVE_HYPOT,1,[have hypot() in libm.])]) -AC_CHECK_LIB(m,atan2,[AC_DEFINE(HAVE_ATAN2,1,[have atan2() in libm.])]) -AC_CHECK_LIB(m,asinh,[AC_DEFINE(HAVE_ASINH,1,[have asinh() in libm.])]) - -# have to have these parts of glib ... we need glib 2.15 for gio -PKG_CHECK_MODULES(REQUIRED, glib-2.0 >= 2.40 gmodule-no-export-2.0 gobject-2.0 gio-2.0) -PACKAGES_USED="$PACKAGES_USED glib-2.0 gmodule-no-export-2.0 gobject-2.0 gio-2.0" - -VIPS_CFLAGS="$VIPS_CFLAGS $GIO_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $GIO_LIBS" - -# if available, we use pthread_setattr_default_np() to raise the per-thread -# stack size ... musl (libc on Alpine), for example, has a very small stack per -# thread by default -save_pthread_LIBS="$LIBS" -save_pthread_CFLAGS="$CFLAGS" -LIBS="$LIBS $REQUIRED_LIBS" -CFLAGS="$CFLAGS $REQUIRED_CFLAGS" -AC_CHECK_FUNC(pthread_setattr_default_np, - [AC_DEFINE(HAVE_PTHREAD_DEFAULT_NP,1,[have pthread_setattr_default_np().]) - ] -) -LIBS="$save_pthread_LIBS" -CFLAGS="$save_pthread_CFLAGS" - -AC_MSG_CHECKING([whether to build dynamic modules]) - -# Disable modules by default when building static libraries -AS_IF([test x"$enable_static" = x"yes"], - [enable_modules_default=no], - [enable_modules_default=yes]) - -AC_ARG_ENABLE([modules], - AS_HELP_STRING([--disable-modules], [disable dynamic modules (default: test)]), - [enable_modules="$enableval"], - [enable_modules="$enable_modules_default"]) - -gmodule_supported_flag=no -gmodule_with_flag=yes - -if test x"$enable_modules" = x"no"; then - AC_MSG_RESULT([no]) -else - AC_MSG_RESULT([yes]) - AC_MSG_CHECKING([whether dynamic modules work]) - PKG_CHECK_VAR([gmodule_supported], [gmodule-no-export-2.0], [gmodule_supported]) - if test x"$gmodule_supported" = x"true"; then - gmodule_supported_flag=yes - gmodule_with_flag='module' - AC_DEFINE(ENABLE_MODULES,1,[define to enable loadable module support.]) - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi -fi - -SAVE_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS -Wl,-z,nodelete" -AC_MSG_CHECKING([whether linker understands -z nodelete]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [ - AC_MSG_RESULT([yes]) - LDFLAGS_Z_NODELETE="-Wl,-z,nodelete" - ],[ - AC_MSG_RESULT([no]) - LDFLAGS_Z_NODELETE="" - ]) -LDFLAGS="$SAVE_LDFLAGS" -AC_SUBST(LDFLAGS_Z_NODELETE) - -# check for gtk-doc -GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) - -# we need expat ... the .pc file for expat is only available -# for recent linuxes, so we fall back to AM_WITH_EXPAT -PKG_CHECK_MODULES(EXPAT, expat, - [expat_found=yes - PACKAGES_USED="$PACKAGES_USED expat" - ], - [AM_WITH_EXPAT - ] -) - -if test x"$expat_found" = x"no"; then - exit 1 -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $EXPAT_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $EXPAT_LIBS" - -# optional supporting libraries - -AC_ARG_WITH([gsf], - AS_HELP_STRING([--without-gsf], [build without libgsf-1 (default: test)])) - -# libgsf-1 1.14.21 crashes -# .27 is known to work well -# .26 seems OK but has not been tested much -# not sure about 22-25 -if test x"$with_gsf" != x"no"; then - PKG_CHECK_MODULES(GSF, libgsf-1 >= 1.14.26, - [AC_DEFINE(HAVE_GSF,1,[define if you have libgsf-1 installed.]) - with_gsf=yes - PACKAGES_USED="$PACKAGES_USED libgsf-1" - ], - [AC_MSG_WARN([libgsf-1 not found; disabling dzsave support]) - with_gsf=no - ] - ) - - # zip64 and deflate-level came in .31 - PKG_CHECK_MODULES(GSF_ZIP64, libgsf-1 >= 1.14.31, - [AC_DEFINE(HAVE_GSF_ZIP64,1,[define if your libgsf supports zip64.]) - AC_DEFINE(HAVE_GSF_DEFLATE_LEVEL,1, - [define if your libgsf supports deflate-level.]) - ], - [: - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $GSF_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $GSF_LIBS" - -AC_ARG_WITH([fftw], - AS_HELP_STRING([--without-fftw], [build without fftw (default: test)])) - -if test x"$with_fftw" != x"no"; then - PKG_CHECK_MODULES(FFTW, fftw3, - [AC_DEFINE(HAVE_FFTW,1,[define if you have fftw3 installed.]) - with_fftw=yes - PACKAGES_USED="$PACKAGES_USED fftw3" - ], - [AC_MSG_WARN([fftw not found; disabling fftw support]) - with_fftw=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $FFTW_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $FFTW_LIBS" - -# ImageMagick -AC_ARG_WITH([magick], - AS_HELP_STRING([--without-magick], [build without libMagic (default: test)]), - [with_magick=$withval], - [with_magick=$gmodule_with_flag]) - -# libMagic as a dynamically loadable module -AS_IF([test x"$with_magick" = x"module"], - [with_magick_module=$gmodule_supported_flag], - [with_magick_module=no]) - -AC_ARG_WITH([magickpackage], - AS_HELP_STRING([--with-magickpackage=PACKAGE], - [use magick PACKAGE (default: MagickCore; try GraphicsMagick to build against gm instead)])) - -if test x"$with_magickpackage" = x"yes"; then - AC_MSG_WARN([--with-magickpackage needs an argument, ignoring]) - with_magick=no - with_magick_module=no -else - if test x"$with_magickpackage" = x""; then - # set the default magick package ... very old imagemagicks called it - # ImageMagick - PKG_CHECK_MODULES(MAGICK_WAND, MagickCore, - [with_magickpackage=MagickCore - ], - [PKG_CHECK_MODULES(IMAGE_MAGICK, ImageMagick, - [with_magickpackage=ImageMagick - ], - [AC_MSG_WARN([neither MagickCore nor ImageMagick found; disabling Magick support]) - with_magick=no - with_magick_module=no - ] - ) - ] - ) - fi -fi - -# we have a separate loader for magick7 with fewer ifdef -# options; only test for features on the magick6 case - -magick_version= -if test x"$with_magick" != x"no"; then - PKG_CHECK_MODULES(MAGICK, $with_magickpackage >= 7.0, - [AC_DEFINE(HAVE_MAGICK7,1,[define if you have libMagick7 installed.]) - with_magick=yes - magick7=yes - magick_version=magick7 - AS_IF([test x"$with_magick_module" = x"no"], - [PACKAGES_USED="$PACKAGES_USED $with_magickpackage"]) - ], - [PKG_CHECK_MODULES(MAGICK, $with_magickpackage, - [AC_DEFINE(HAVE_MAGICK6,1,[define if you have libMagick6 installed.]) - with_magick=yes - magick6=yes - magick_version=magick6 - AS_IF([test x"$with_magick_module" = x"no"], - [PACKAGES_USED="$PACKAGES_USED $with_magickpackage"]) - ], - [AC_MSG_WARN([$with_magickpackage not found; disabling Magick support]) - with_magick=no - with_magick_module=no - ] - ) - ] - ) -else - with_magick=no - with_magick_module=no - magick6=no - magick_version=none - with_magickpackage=none -fi - -if test x"$magick6" = x"yes"; then - # do we have number_scenes in image_info ... imagemagick uses this - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $MAGICK_CFLAGS" - AC_CHECK_MEMBER([struct _ImageInfo.number_scenes], - AC_DEFINE(HAVE_NUMBER_SCENES,1, - [define if your magick has ImageInfo.number_scenes.]), - [], - [#include ]) - CFLAGS="$save_CFLAGS" -fi - -if test x"$magick6" = x"yes"; then - # the magick6 API varies a lot between magick versions, and between GM and IM - # set CFLAGS too, since CHECK_FUNCS will try to compile / link / run code. - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$LIBS $MAGICK_LIBS" - CFLAGS="$CFLAGS $MAGICK_CFLAGS" - - AC_CHECK_FUNCS([InheritException AcquireExceptionInfo SetImageProperty SetImageExtent AcquireImage GetVirtualPixels ResetImageProfileIterator ResetImageAttributeIterator ResetImagePropertyIterator MagickCoreGenesis SetImageOption BlobToStringInfo OptimizePlusImageLayers OptimizeImageTransparency]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -if test x"$magick6" = x"yes"; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $MAGICK_CFLAGS" - - # the range of ColorspaceType has expanded several times - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [ColorspaceType colorspace = CMYColorspace] - )], - [AC_DEFINE(HAVE_CMYCOLORSPACE,1, - [define if your Magick has CMYColorspace.]) - ] - ) - - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [ColorspaceType colorspace = HCLpColorspace] - )], - [AC_DEFINE(HAVE_HCLPCOLORSPACE,1, - [define if your Magick has HCLpColorspace.]) - ] - ) - - # GetImageMagick() takes two args under GM, three under IM - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [(void)GetImageMagick(NULL, 0, NULL)] - )], - [AC_DEFINE(HAVE_GETIMAGEMAGICK3,1, - [define if your GetImageMagick() takes three arguments.]) - ] - ) - - CFLAGS="$save_CFLAGS" -fi - -# have flags to turn load and save off independently ... some people will want -# save but not load, for example -AC_ARG_ENABLE([magickload], - AS_HELP_STRING([--disable-magickload], - [disable libMagic load (default: enabled)])) - -AC_ARG_ENABLE([magicksave], - AS_HELP_STRING([--disable-magicksave], - [disable libMagic save (default: enabled)])) - -if test x"$enable_magicksave" != x"yes"; then - # we need ImportImagePixels ... GM is missing this sadly - save_LIBS="$LIBS" - LIBS="$LIBS $MAGICK_LIBS" - AC_CHECK_FUNCS(ImportImagePixels,[ - AC_DEFINE(HAVE_IMPORTIMAGEPIXELS,1, - [define if you have ImportImagePixels.]) - ],[] - ) - AC_CHECK_FUNCS(ImagesToBlob,[ - AC_DEFINE(HAVE_IMAGESTOBLOB,1, - [define if you have ImagesToBlob.]) - ],[] - ) - LIBS="$save_LIBS" -fi - -if test x"$with_magick" != x"no"; then - if test x"$enable_magickload" != x"no"; then - AC_DEFINE(ENABLE_MAGICKLOAD,1,[define to enable load with libMagick]) - enable_magickload=yes - fi - - if test x"$enable_magicksave" != x"no"; then - AC_DEFINE(ENABLE_MAGICKSAVE,1,[define to enable save with libMagick]) - enable_magicksave=yes - fi -else - enable_magickload=no - enable_magicksave=no -fi - -AS_IF([test x"$with_magick_module" = x"yes"], - [AC_DEFINE([MAGICK_MODULE], [1], [define to build libMagic as a dynamically loadable module.])], - [VIPS_CFLAGS="$VIPS_CFLAGS $MAGICK_CFLAGS" - VIPS_LIBS="$VIPS_LIBS $MAGICK_LIBS"]) -AM_CONDITIONAL(MAGICK_MODULE, [test x"$with_magick_module" = x"yes"]) - -# orc -AC_ARG_WITH([orc], - AS_HELP_STRING([--without-orc], [build without orc (default: test)])) - -if test x"$with_orc" != x"no"; then - # we use loadpw etc. - PKG_CHECK_MODULES(ORC, orc-0.4 >= 0.4.11, - [AC_DEFINE(HAVE_ORC,1,[define if you have orc-0.4.11 or later installed.]) - with_orc=yes - PACKAGES_USED="$PACKAGES_USED orc-0.4" - save_LIBS="$LIBS" - LIBS="$LIBS $ORC_LIBS" - AC_CHECK_FUNCS(orc_program_get_error, - AC_DEFINE(HAVE_ORC_PROGRAM_GET_ERROR,1, - [define if your orc has orc_program_get_error.])) - LIBS="$save_LIBS" - ], - [AC_MSG_WARN([orc-0.4.11 or later not found; disabling orc support]) - with_orc=no - ] - ) -fi - -# orc 0.4.30+ works with cf-protection, but 0.4.30 has a bug with multiple -# definitions of OrcTargetPowerPCFlags, so insist on 0.4.31 -if test x"$with_orc" = x"yes"; then - PKG_CHECK_MODULES(ORC_CF_PROTECTION, orc-0.4 >= 0.4.31, - [AC_DEFINE(HAVE_ORC_CF_PROTECTION,1, - [define if your orc works with cf-protection.] - ) - ], - [: - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $ORC_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $ORC_LIBS" - -# lcms ... refuse to use lcms1 -AC_ARG_WITH([lcms], - AS_HELP_STRING([--without-lcms], [build without lcms (default: test)])) - -if test x"$with_lcms" != x"no"; then - PKG_CHECK_MODULES(LCMS, lcms2, - [AC_DEFINE(HAVE_LCMS2,1,[define if you have lcms2 installed.]) - with_lcms="yes (lcms2)" - PACKAGES_USED="$PACKAGES_USED lcms2" - ], - [AC_MSG_WARN([lcms2 not found; disabling ICC profile support]) - with_lcms=no - ] - ) -fi - -# we need a conditional for this to only compile in fallback profiles if lcms -# is detected -AM_CONDITIONAL(ENABLE_LCMS, [test x"$with_lcms" != x"no"]) - -VIPS_CFLAGS="$VIPS_CFLAGS $LCMS_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $LCMS_LIBS" - -# OpenEXR -AC_ARG_WITH([OpenEXR], - AS_HELP_STRING([--without-OpenEXR], [build without OpenEXR (default: test)])) - -# require 1.2.2 since 1.2.1 has a broken ImfCloseTiledInputFile() -if test x"$with_OpenEXR" != x"no"; then - PKG_CHECK_MODULES(OPENEXR, OpenEXR >= 1.2.2, - [AC_DEFINE(HAVE_OPENEXR,1,[define if you have OpenEXR >= 1.2.2 installed.]) - with_OpenEXR=yes - PACKAGES_USED="$PACKAGES_USED OpenEXR" - ], - [AC_MSG_WARN([OpenEXR not found; disabling OpenEXR support]) - with_OpenEXR=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $OPENEXR_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $OPENEXR_LIBS" - -# nifti -AC_ARG_WITH([nifti], - AS_HELP_STRING([--without-nifti], [build without nifti (default: test)])) - -if test x"$with_nifti" != x"no"; then - FIND_NIFTI([ - with_nifti=yes - ],[ - with_nifti=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $NIFTI_CFLAGS" -VIPS_INCLUDES="$VIPS_INCLUDES $NIFTI_INCLUDES" -VIPS_LIBS="$VIPS_LIBS $NIFTI_LIBS" - -# jpeg-xl -AC_ARG_WITH([libjxl], - AS_HELP_STRING([--without-libjxl], [build without libjxl (default: test)]), - [with_libjxl=$withval], - [with_libjxl=test]) - -# libjxl as a dynamically loadable module -AS_IF([test x"$with_libjxl" = x"module" -o x"$with_libjxl" = x"test"], - [with_libjxl_module=$gmodule_supported_flag], - [with_libjxl_module=no]) - -if test x"$with_libjxl" != x"no"; then - PKG_CHECK_MODULES(LIBJXL, libjxl_threads >= 0.5 libjxl >= 0.5, - [AC_DEFINE(HAVE_LIBJXL,1,[define if you have libjxl >= 0.5 installed.]) - with_libjxl=yes - AS_IF([test x"$with_libjxl_module" = x"no"], - [PACKAGES_USED="$PACKAGES_USED libjxl"]) - ], - [AS_IF([test x"$with_libjxl" = x"test"], - AC_MSG_WARN([libjxl not found; disabling libjxl support]), - AC_MSG_ERROR([libjxl not found])) - with_libjxl=no - with_libjxl_module=no - ] - ) -fi - -if test x"$with_libjxl" = x"yes"; then - save_LIBS="$LIBS" - LIBS="$LIBS $LIBJXL_LIBS" - # Introduced in 0.6 - AC_CHECK_FUNCS(JxlEncoderInitBasicInfo,[ - AC_DEFINE(HAVE_LIBJXL_JXLENCODERINITBASICINFO,1, - [define if you have JxlEncoderInitBasicInfo.]) - ],[] - ) - LIBS="$save_LIBS" -fi - - -AS_IF([test x"$with_libjxl_module" = x"yes"], - [AC_DEFINE([LIBJXL_MODULE], [1], [define to build libjxl as a dynamically loadable module.])], - [VIPS_CFLAGS="$VIPS_CFLAGS $LIBJXL_CFLAGS" - VIPS_LIBS="$VIPS_LIBS $LIBJXL_LIBS"]) -AM_CONDITIONAL(LIBJXL_MODULE, [test x"$with_libjxl_module" = x"yes"]) - -# openjpeg -AC_ARG_WITH([libopenjp2], - AS_HELP_STRING([--without-libopenjp2], - [build without libopenjp2 (default: test)])) - -# 2.4 is the first one to have working threading and tiling -if test x"$with_libopenjp2" != x"no"; then - PKG_CHECK_MODULES(LIBOPENJP2, libopenjp2 >= 2.4, - [AC_DEFINE(HAVE_LIBOPENJP2,1, - [define if you have libopenjp2 >= 2.4 installed.]) - with_libopenjp2=yes - PACKAGES_USED="$PACKAGES_USED libopenjp2" - ], - [AC_MSG_WARN([libopenjp2 not found; disabling libopenjp2 support]) - with_libopenjp2=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $LIBOPENJP2_CFLAGS" -VIPS_INCLUDES="$VIPS_INCLUDES $LIBOPENJP2_INCLUDES" -VIPS_LIBS="$VIPS_LIBS $LIBOPENJP2_LIBS" - -# libheif -AC_ARG_WITH([heif], - AS_HELP_STRING([--without-heif], [build without libheif (default: test)]), - [with_heif=$withval], - [with_heif=$gmodule_with_flag]) - -# libheif as a dynamically loadable module -AS_IF([test x"$with_heif" = x"module"], - [with_heif_module=$gmodule_supported_flag], - [with_heif_module=no]) - -if test x"$with_heif" != x"no"; then - PKG_CHECK_MODULES(HEIF, libheif >= 1.3.0, - [with_heif=yes - PKG_CHECK_VAR([have_h265_decoder], [libheif], [builtin_h265_decoder]) - PKG_CHECK_VAR([have_avif_decoder], [libheif], [builtin_avif_decoder]) - # test for !=no so that we work for older libheif which does not have - # this variable - if test x"$have_h265_decoder" != x"no" -o x"$have_avif_decoder" = x"yes"; then - AC_DEFINE(HAVE_HEIF_DECODER,1, - [define if your libheif has decode support.]) - fi - PKG_CHECK_VAR([have_h265_encoder], [libheif], [builtin_h265_encoder]) - PKG_CHECK_VAR([have_avif_encoder], [libheif], [builtin_avif_encoder]) - if test x"$have_h265_encoder" != x"no" -o x"$have_avif_encoder" = x"yes"; then - AC_DEFINE(HAVE_HEIF_ENCODER,1, - [define if your libheif has encode support.]) - fi - AS_IF([test x"$with_heif_module" = x"no"], - [PACKAGES_USED="$PACKAGES_USED libheif"]) - ], - [AC_MSG_WARN([libheif >= 1.3.0 not found; disabling HEIF support]) - with_heif=no - with_heif_module=no - have_h265_decoder= - have_h265_encoder= - have_avif_decoder= - have_avif_encoder= - ] - ) -fi - -AS_IF([test x"$with_heif_module" = x"yes"], - [AC_DEFINE([HEIF_MODULE], [1], [define to build libheif as a dynamically loadable module.])], - [VIPS_CFLAGS="$VIPS_CFLAGS $HEIF_CFLAGS" - VIPS_LIBS="$VIPS_LIBS $HEIF_LIBS"]) -AM_CONDITIONAL(HEIF_MODULE, [test x"$with_heif_module" = x"yes"]) - -# color profile support added in 1.3.3 -if test x"$with_heif" = x"yes"; then - save_LIBS="$LIBS" - LIBS="$LIBS $HEIF_LIBS" - AC_CHECK_FUNCS(heif_image_handle_get_raw_color_profile,[ - AC_DEFINE(HAVE_HEIF_COLOR_PROFILE,1, - [define if you have heif_image_handle_get_raw_color_profile.]) - ],[] - ) - LIBS="$save_LIBS" -fi - -# heif_context_set_maximum_image_size_limit added in 1.6.0 -if test x"$with_heif" = x"yes"; then - save_LIBS="$LIBS" - LIBS="$LIBS $HEIF_LIBS" - AC_CHECK_FUNCS(heif_context_set_maximum_image_size_limit,[ - AC_DEFINE(HAVE_HEIF_SET_MAX_IMAGE_SIZE_LIMIT,1, - [define if you have heif_context_set_maximum_image_size_limit.]) - ],[] - ) - LIBS="$save_LIBS" -fi - -# heif_main_brand added in 1.4.0, but heif_avif appeared in 1.7 ... just check -# the libheif version number since testing for enums is annoying -if test x"$with_heif" = x"yes"; then - PKG_CHECK_MODULES(HEIF_AVIF, libheif >= 1.7.0, [ - AC_DEFINE(HAVE_HEIF_AVIF,1,[define if you have heif_avif.]) - ], [ - ]) -fi - -# heif_decoding_options.convert_hdr_to_8bit added in 1.7.0 -if test x"$with_heif" = x"yes"; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $HEIF_CFLAGS" - AC_CHECK_MEMBER([struct heif_decoding_options.convert_hdr_to_8bit],[ - AC_DEFINE(HAVE_HEIF_DECODING_OPTIONS_CONVERT_HDR_TO_8BIT,1, - [define if you have heif_decoding_options.convert_hdr_to_8bit]) - ],[], - [#include ]) - CFLAGS="$save_CFLAGS" -fi - -# pdfium -AC_ARG_WITH([pdfium], - AS_HELP_STRING([--without-pdfium], [build without pdfium (default: test)])) - -# pick 4200 as the starting version number ... no reason, really, it'd -# probably work with much older versions -if test x"$with_pdfium" != x"no"; then - PKG_CHECK_MODULES(PDFIUM, pdfium >= 4200, [ - AC_DEFINE(HAVE_PDFIUM,1,[define if you have pdfium > 4200.]) - if test x"$with_poppler" != x"no"; then - AC_MSG_WARN([PDFium found, disabling poppler]) - with_poppler=no - fi - with_pdfium=yes - PACKAGES_USED="$PACKAGES_USED pdfium" - ], [ - with_pdfium=no - ]) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $PDFIUM_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $PDFIUM_LIBS" - -# poppler -AC_ARG_WITH([poppler], - AS_HELP_STRING([--without-poppler], [build without poppler (default: test)]), - [with_poppler=$withval], - [with_poppler=$gmodule_with_flag]) - -# poppler as a dynamically loadable module -AS_IF([test x"$with_poppler" = x"module"], - [with_poppler_module=$gmodule_supported_flag], - [with_poppler_module=no]) - -if test x"$with_poppler" != x"no"; then - PKG_CHECK_MODULES(POPPLER, [poppler-glib >= 0.16.0 cairo >= 1.2], [ - AC_DEFINE(HAVE_POPPLER,1,[define if you have poppler-glib >= 0.16.0 and cairo >= 1.2 installed.]) - with_poppler=yes - AS_IF([test x"$with_poppler_module" = x"no"], - [PACKAGES_USED="$PACKAGES_USED poppler-glib cairo"]) - ], [ - AC_MSG_WARN([poppler-glib >= 0.16.0 or cairo >= 1.2 not found; disabling PDF load via poppler]) - with_poppler=no - with_poppler_module=no - ]) -fi - -AS_IF([test x"$with_poppler_module" = x"yes"], - [AC_DEFINE([POPPLER_MODULE], [1], [define to build poppler as a dynamically loadable module.])], - [VIPS_CFLAGS="$VIPS_CFLAGS $POPPLER_CFLAGS" - VIPS_LIBS="$VIPS_LIBS $POPPLER_LIBS"]) -AM_CONDITIONAL(POPPLER_MODULE, [test x"$with_poppler_module" = x"yes"]) - -# librsvg -AC_ARG_WITH([rsvg], - AS_HELP_STRING([--without-rsvg], [build without rsvg (default: test)])) - -# 2.40.3 so we get the UNLIMITED open flag -if test x"$with_rsvg" != x"no"; then - PKG_CHECK_MODULES(RSVG, [librsvg-2.0 >= 2.40.3 cairo >= 1.2], [ - AC_DEFINE(HAVE_RSVG,1,[define if you have librsvg-2.0 >= 2.40.3 and cairo >= 1.2 installed.]) - with_rsvg=yes - PACKAGES_USED="$PACKAGES_USED librsvg-2.0 cairo" - ], [ - AC_MSG_WARN([librsvg-2.0 >= 2.40.3 or cairo >= 1.2 not found; disabling SVG load via rsvg]) - with_rsvg=no - ]) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $RSVG_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $RSVG_LIBS" - -# zlib -# some platforms, like macosx, are missing the .pc files for zlib, so -# we fall back to FIND_ZLIB -AC_ARG_WITH([zlib], - AS_HELP_STRING([--without-zlib], [build without zlib (default: test)])) - -if test x"$with_zlib" != x"no"; then - PKG_CHECK_MODULES(ZLIB, zlib >= 0.4, - [AC_DEFINE(HAVE_ZLIB,1,[define if you have zlib installed.]) - with_zlib=yes - PACKAGES_USED="$PACKAGES_USED zlib" - ], - [FIND_ZLIB( - [with_zlib="yes (found by search)" - ], - [AC_MSG_WARN([zlib not found; disabling SVGZ buffer support]) - with_zlib=no - ] - ) - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $ZLIB_CFLAGS" -VIPS_INCLUDES="$VIPS_INCLUDES $ZLIB_INCLUDES" -VIPS_LIBS="$VIPS_LIBS $ZLIB_LIBS" - -# OpenSlide -AC_ARG_WITH([openslide], - AS_HELP_STRING([--without-openslide], - [build without OpenSlide (default: test)]), - [with_openslide=$withval], - [with_openslide=$gmodule_with_flag]) - -# OpenSlide as a dynamically loadable module -AS_IF([test x"$with_openslide" = x"module"], - [with_openslide_module=$gmodule_supported_flag], - [with_openslide_module=no]) - -if test x"$with_openslide" != x"no"; then - PKG_CHECK_MODULES(OPENSLIDE, [openslide >= 3.4.0], - [AC_DEFINE(HAVE_OPENSLIDE_3_4,1,[define if you have OpenSlide >= 3.4.0 installed.]) - AC_DEFINE(HAVE_OPENSLIDE,1,[define if you have OpenSlide >= 3.3.0 installed.]) - with_openslide=yes - AS_IF([test x"$with_openslide_module" = x"no"], - [PACKAGES_USED="$PACKAGES_USED openslide"]) - ], - [AC_MSG_NOTICE([OpenSlide >= 3.4.0 not found; checking for >= 3.3.0]) - PKG_CHECK_MODULES(OPENSLIDE, [openslide >= 3.3.0], - [AC_DEFINE(HAVE_OPENSLIDE,1,[define if you have OpenSlide >= 3.3.0 installed.]) - with_openslide=yes - AS_IF([test x"$with_openslide_module" = x"no"], - [PACKAGES_USED="$PACKAGES_USED openslide"]) - ], - [AC_MSG_WARN([OpenSlide >= 3.3.0 not found; disabling virtual slide support]) - with_openslide=no - with_openslide_module=no - ] - ) - ] - ) -fi - -AS_IF([test x"$with_openslide_module" = x"yes"], - [AC_DEFINE([OPENSLIDE_MODULE], [1], [define to build OpenSlide as a dynamically loadable module.])], - [VIPS_CFLAGS="$VIPS_CFLAGS $OPENSLIDE_CFLAGS" - VIPS_LIBS="$VIPS_LIBS $OPENSLIDE_LIBS"]) -AM_CONDITIONAL(OPENSLIDE_MODULE, [test x"$with_openslide_module" = x"yes"]) - -# matio -AC_ARG_WITH([matio], - AS_HELP_STRING([--without-matio], [build without matio (default: test)])) - -if test x"$with_matio" != x"no"; then - PKG_CHECK_MODULES(MATIO, matio, - [AC_DEFINE(HAVE_MATIO,1,[define if you have matio installed.]) - with_matio=yes - PACKAGES_USED="$PACKAGES_USED matio" - ], - [AC_MSG_WARN([matio not found; disabling matio support]) - with_matio=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $MATIO_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $MATIO_LIBS" - -# not external libraries, but have options to disable them, helps to -# reduce attack surface - -AC_ARG_WITH([nsgif], - AS_HELP_STRING([--without-nsgif], [build without nsgif load (default: with)])) - -if test x"$with_nsgif" != x"no"; then - AC_DEFINE(HAVE_NSGIF,1,[define to build nsgif load support.]) - with_nsgif=yes -fi - -AM_CONDITIONAL(ENABLE_NSGIF, [test x"$with_nsgif" = x"yes"]) - -AC_ARG_WITH([ppm], - AS_HELP_STRING([--without-ppm], [build without ppm (default: with)])) - -if test x"$with_ppm" != x"no"; then - AC_DEFINE(HAVE_PPM,1,[define to build ppm support.]) - with_ppm=yes -fi - -AC_ARG_WITH([analyze], - AS_HELP_STRING([--without-analyze], [build without analyze (default: with)])) - -if test x"$with_analyze" != x"no"; then - AC_DEFINE(HAVE_ANALYZE,1,[define to build analyze support.]) - with_analyze=yes -fi - -AC_ARG_WITH([radiance], - AS_HELP_STRING([--without-radiance], [build without radiance (default: with)])) - -if test x"$with_radiance" != x"no"; then - AC_DEFINE(HAVE_RADIANCE,1,[define to build radiance support.]) - with_radiance=yes -fi - -# cfitsio -AC_ARG_WITH([cfitsio], - AS_HELP_STRING([--without-cfitsio], [build without cfitsio (default: test)])) - -if test x"$with_cfitsio" != x"no"; then - PKG_CHECK_MODULES(CFITSIO, cfitsio, - [AC_DEFINE(HAVE_CFITSIO,1,[define if you have cfitsio installed.]) - with_cfitsio=yes - PACKAGES_USED="$PACKAGES_USED cfitsio" - ], - [AC_MSG_WARN([cfitsio not found; disabling cfitsio support]) - with_cfitsio=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $CFITSIO_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $CFITSIO_LIBS" - -# libwebp ... target 0.6+ to reduce complication -# webp has the stuff for handling metadata in two separate libraries -- we -# insit on having all of them -AC_ARG_WITH([libwebp], - AS_HELP_STRING([--without-libwebp], [build without libwebp (default: test)])) - -if test x"$with_libwebp" != x"no"; then - PKG_CHECK_MODULES(LIBWEBP, libwebp >= 0.6 libwebpmux >= 0.6 libwebpdemux >= 0.6, - [AC_DEFINE(HAVE_LIBWEBP,1,[define if you have libwebp/libwebpmux/libwebpdemux installed.]) - with_libwebp=yes - PACKAGES_USED="$PACKAGES_USED libwebp libwebpmux libwebpdemux" - ], - [AC_MSG_WARN([libwebp, mux, demux not found; disabling WEBP support]) - with_libwebp=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $LIBWEBP_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $LIBWEBP_LIBS" - -# pangocairo for text rendering -AC_ARG_WITH([pangocairo], - AS_HELP_STRING([--without-pangocairo], - [build without pangocairo (default: test)])) - -if test x"$with_pangocairo" != x"no"; then - PKG_CHECK_MODULES(PANGOCAIRO, pangocairo >= 1.32.6, - [AC_DEFINE(HAVE_PANGOCAIRO,1,[define if you have pangocairo installed.]) - with_pangocairo=yes - PACKAGES_USED="$PACKAGES_USED pangocairo" - ], - [AC_MSG_WARN([pangocairo not found; disabling pangocairo support]) - with_pangocairo=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $PANGOCAIRO_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $PANGOCAIRO_LIBS" - -# font file support with fontconfig -AC_ARG_WITH([fontconfig], - AS_HELP_STRING([--without-fontconfig], - [build without fontconfig (default: test)])) - -if test x"$with_pangocairo" != x"no" -a x"$with_fontconfig" != x"no"; then - PKG_CHECK_MODULES(FONTCONFIG, fontconfig pangoft2 >= 1.32.6, - [AC_DEFINE(HAVE_FONTCONFIG,1,[define if you have fontconfig installed.]) - with_fontconfig=yes - PACKAGES_USED="$PACKAGES_USED fontconfig pangoft2" - ], - [AC_MSG_WARN([fontconfig not found; disabling fontconfig support]) - with_fontconfig=no - ] - ) -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $FONTCONFIG_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $FONTCONFIG_LIBS" - -# look for TIFF with pkg-config ... fall back to our tester -# pkgconfig support for libtiff starts with libtiff-4 -AC_ARG_WITH([tiff], - AS_HELP_STRING([--without-tiff], [build without libtiff (default: test)])) - -if test x"$with_tiff" != x"no"; then - PKG_CHECK_MODULES(TIFF, libtiff-4, - [AC_DEFINE(HAVE_TIFF,1,[define if you have libtiff installed.]) - with_tiff="yes (pkg-config libtiff-4)" - PACKAGES_USED="$PACKAGES_USED libtiff-4" - ], - [FIND_TIFF( - with_tiff="yes (found by search)", - [AC_MSG_WARN([libtiff not found; disabling TIFF support]) - with_tiff=no - ] - ) - ] - ) -fi - -# ZSTD and WEBP in TIFF added in libtiff 4.0.10 -if test x"$with_tiff" != x"no"; then - save_INCLUDES="$INCLUDES" - INCLUDES="$INCLUDES $TIFF_INCLUDES" - AC_CHECK_DECL(COMPRESSION_WEBP,[ - AC_DEFINE(HAVE_TIFF_COMPRESSION_WEBP,1,[define if your libtiff has webp.]) - ],[ - ],[ - [#include ] - ] - ) - INCLUDES="$save_INCLUDES" -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $TIFF_CFLAGS" -VIPS_INCLUDES="$VIPS_INCLUDES $TIFF_INCLUDES" -VIPS_LIBS="$VIPS_LIBS $TIFF_LIBS" - -# Look for libspng before libpng -AC_ARG_WITH([libspng], - AS_HELP_STRING([--without-libspng], [build without libspng (default: test)])) - -if test x"$with_libspng" != x"no"; then - # we need 0.7 for PNG write support - # it's sometimes called libspng.pc, sometimes spng.pc, we have to search for both - PKG_CHECK_MODULES(SPNG, spng >= 0.7, - [with_libspng=yes - PACKAGES_USED="$PACKAGES_USED spng" - ], - [PKG_CHECK_MODULES(SPNG, libspng >= 0.7, - [with_libspng=yes - PACKAGES_USED="$PACKAGES_USED libspng" - ], - [with_libspng=no - ] - )] - ) -fi - -if test x"$with_libspng" == x"yes"; then - AC_DEFINE(HAVE_SPNG,1,[define if you have libspng installed.]) - VIPS_CFLAGS="$VIPS_CFLAGS $SPNG_CFLAGS" - VIPS_LIBS="$VIPS_LIBS $SPNG_LIBS" -fi - -# look for PNG with pkg-config ... fall back to our tester -AC_ARG_WITH([png], - AS_HELP_STRING([--without-png], [build without libpng (default: test)])) - -# if spng is found, we don't need libpng -if test x"$with_libspng" = x"yes"; then - with_png=no -fi - -if test x"$with_png" != x"no"; then - PKG_CHECK_MODULES(PNG, libpng >= 1.2.9, - [AC_DEFINE(HAVE_PNG,1,[define if you have libpng installed.]) - with_png="yes (pkg-config libpng >= 1.2.9)" - PACKAGES_USED="$PACKAGES_USED libpng" - ], - [FIND_PNG( - [with_png="yes (found by search)" - ], - [AC_MSG_WARN([libpng not found; disabling PNG support]) - with_png=no - ] - ) - ] - ) -fi - -if test x"$with_png" != x"no"; then - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PNG_LIBS $LIBS" - CFLAGS="$PNG_INCLUDES $CFLAGS" - AC_CHECK_FUNCS(png_set_chunk_malloc_max, - AC_DEFINE(HAVE_PNG_SET_CHUNK_MALLOC_MAX,1, - [define if your libpng has png_set_chunk_malloc_max.])) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $PNG_CFLAGS" -VIPS_INCLUDES="$VIPS_INCLUDES $PNG_INCLUDES" -VIPS_LIBS="$VIPS_LIBS $PNG_LIBS" - -# quant package we use -quantisation_package= - -# look for libimagequant with pkg-config -AC_ARG_WITH([imagequant], - AS_HELP_STRING([--without-imagequant], [build without imagequant (default: test)])) - -if test x"$with_imagequant" != x"no"; then - PKG_CHECK_MODULES(IMAGEQUANT, imagequant, - [AC_DEFINE(HAVE_IMAGEQUANT,1,[define if you have imagequant installed.]) - with_imagequant=yes - quantisation_package=imagequant - ], - [with_imagequant=no] - ) -else - with_imagequant=no -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $IMAGEQUANT_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $IMAGEQUANT_LIBS" - -# look for quantizr with pkg-config -AC_ARG_WITH([quantizr], - AS_HELP_STRING([--without-quantizr], [build without quantizr (default: test)])) - -# only if libimagequant not found -if test x"$quantisation_package" == x""; then - if test x"$with_quantizr" != x"no"; then - PKG_CHECK_MODULES(QUANTIZR, quantizr, - [AC_DEFINE(HAVE_QUANTIZR,1,[define if you have quantizr installed.]) - with_quantizr=yes - quantisation_package=quantizr - ], - [with_quantizr=no] - ) - else - with_quantizr=no - fi -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $QUANTIZR_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $QUANTIZR_LIBS" - -PACKAGES_USED="$PACKAGES_USED $quantisation_package" - -# look for libjpeg with pkg-config ... fall back to our tester -AC_ARG_WITH([jpeg], - AS_HELP_STRING([--without-jpeg], [build without libjpeg (default: test)])) - -if test x"$with_jpeg" != x"no"; then - PKG_CHECK_MODULES(JPEG, libjpeg, - [AC_DEFINE(HAVE_JPEG,1,[define if you have libjpeg installed.]) - with_jpeg="yes (pkg-config)" - PACKAGES_USED="$PACKAGES_USED libjpeg" - ], - [FIND_JPEG( - [with_jpeg="yes (found by search)" - EXTRA_LIBS_USED="$EXTRA_LIBS_USED -ljpeg" - ], - [AC_MSG_WARN([libjpeg not found; disabling JPEG support]) - with_jpeg=no - ] - ) - ] - ) -fi - -# features like trellis quant are exposed as extension parameters ... -# mozjpeg 3.2 and later have #define JPEG_C_PARAM_SUPPORTED, but we must -# work with earlier versions -if test x"$with_jpeg" != x"no"; then - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$JPEG_LIBS $LIBS" - CFLAGS="$JPEG_INCLUDES $CFLAGS" - AC_CHECK_FUNCS(jpeg_c_bool_param_supported, - AC_DEFINE(HAVE_JPEG_EXT_PARAMS,1, - [define if your libjpeg has extension parameters.])) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $JPEG_CFLAGS" -VIPS_INCLUDES="$VIPS_INCLUDES $JPEG_INCLUDES" -VIPS_LIBS="$VIPS_LIBS $JPEG_LIBS" - -# libexif -AC_ARG_WITH([libexif], - AS_HELP_STRING([--without-libexif], [build without libexif (default: test)])) - -if test x"$with_libexif" != x"no"; then - PKG_CHECK_MODULES(EXIF, libexif >= 0.6, - [AC_DEFINE(HAVE_EXIF,1,[define if you have libexif >= 0.6 installed.]) - with_libexif=yes - PACKAGES_USED="$PACKAGES_USED libexif" - - # 0.6.22 adds a couple of EXIF 2.3 ASCII tags - PKG_CHECK_MODULES(EXIF_0_6_22, libexif >= 0.6.22, - [AC_DEFINE(HAVE_EXIF_0_6_22,1,[define if you have libexif >= 0.6.22]) - ], - [: - ] - ) - - # 0.6.23 adds some OffsetTime* ASCII tags - PKG_CHECK_MODULES(EXIF_0_6_23, libexif >= 0.6.23, - [AC_DEFINE(HAVE_EXIF_0_6_23,1,[define if you have libexif >= 0.6.23]) - ], - [: - ] - ) - ], - [AC_MSG_WARN([libexif >= 0.6 not found; disabling exif support]) - with_libexif=no - ] - ) -fi - -# some libexif packages need include , some just -# how annoying -if test x"$with_libexif" != x"no"; then - # cppflags not cflags because we want the preproc to see the -I as well - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$EXIF_CFLAGS $CPPFLAGS" - AC_CHECK_HEADER(exif-data.h, - AC_DEFINE(UNTAGGED_EXIF,1,[libexif includes don't need libexif prefix])) - CPPFLAGS="$save_CPPFLAGS" -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $EXIF_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $EXIF_LIBS" - -# GIF save with libcgif (requires quantisation_package) -AC_ARG_WITH([cgif], - AS_HELP_STRING([--without-cgif], [build without cgif (default: test)])) - -if test x"$quantisation_package" != x"" && test x"$with_cgif" != x"no"; then - PKG_CHECK_MODULES(CGIF, cgif >= 0.2.0, - [AC_DEFINE(HAVE_CGIF,1,[define if you have cgif >= 0.2.0 installed.]) - with_cgif=yes - PACKAGES_USED="$PACKAGES_USED cgif" - ], - [AC_MSG_WARN([libcgif not found]) - with_cgif=no - ] - ) -else - with_cgif=no -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $CGIF_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $CGIF_LIBS" - -# fuzzing -AC_ARG_VAR([LIB_FUZZING_ENGINE], - [fuzzing library, e.g. /path/to/libFuzzer.a]) -if test x"$LIB_FUZZING_ENGINE" = x; then - LIB_FUZZING_ENGINE="libstandaloneengine.a" -fi - -VIPS_CFLAGS="$VIPS_CFLAGS $VIPS_DEBUG_FLAGS $REQUIRED_CFLAGS" -VIPS_LIBS="$VIPS_LIBS $REQUIRED_LIBS -lm" - -# build options relevant at runtime ... this becomes `vips --vips-config` -# output -VIPS_CONFIG="\ -enable debug: $enable_debug, \ -enable deprecated library components: $enable_deprecated, \ -enable modules: $gmodule_supported_flag, \ -use fftw3 for FFT: $with_fftw, \ -accelerate loops with orc: $with_orc, \ -ICC profile support with lcms: $with_lcms, \ -zlib: $with_zlib, \ -text rendering with pangocairo: $with_pangocairo, \ -font file support with fontconfig: $with_fontconfig, \ -RAD load/save: $with_radiance, \ -Analyze7 load/save: $with_analyze, \ -PPM load/save: $with_ppm, \ -GIF load: $with_nsgif, \ -GIF save with cgif: $with_cgif, \ -EXIF metadata support with libexif: $with_libexif, \ -JPEG load/save with libjpeg: $with_jpeg, \ -JXL load/save with libjxl: $with_libjxl (dynamic module: $with_libjxl_module), \ -JPEG2000 load/save with libopenjp2: $with_libopenjp2, \ -PNG load with libspng: $with_libspng, \ -PNG load/save with libpng: $with_png, \ -selected quantisation package: $quantisation_package, \ -TIFF load/save with libtiff: $with_tiff, \ -image pyramid save: $with_gsf, \ -HEIC/AVIF load/save with libheif: $with_heif (dynamic module: $with_heif_module), \ -WebP load/save with libwebp: $with_libwebp, \ -PDF load with PDFium: $with_pdfium, \ -PDF load with poppler-glib: $with_poppler (dynamic module: $with_poppler_module), \ -SVG load with librsvg-2.0: $with_rsvg, \ -EXR load with OpenEXR: $with_OpenEXR, \ -OpenSlide load: $with_openslide (dynamic module: $with_openslide_module), \ -Matlab load with matio: $with_matio, \ -NIfTI load/save with niftiio: $with_nifti, \ -FITS load/save with cfitsio: $with_cfitsio, \ -Magick package: $with_magickpackage (dynamic module: $with_magick_module), \ -Magick API version: $magick_version, \ -load with libMagickCore: $enable_magickload, \ -save with libMagickCore: $enable_magicksave" - -AC_SUBST(VIPS_LIBDIR) - -AC_SUBST(VIPS_CFLAGS) -AC_SUBST(VIPS_INCLUDES) -AC_SUBST(VIPS_LIBS) -AC_SUBST(VIPS_CONFIG) -AC_SUBST(PACKAGES_USED) -AC_SUBST(EXTRA_LIBS_USED) - -AC_CONFIG_FILES([ - vips.pc - vips-cpp.pc - Makefile - $srcdir/libvips/include/vips/version.h - libvips/include/Makefile - libvips/include/vips/Makefile - libvips/Makefile - libvips/arithmetic/Makefile - libvips/colour/Makefile - libvips/colour/profiles/Makefile - libvips/conversion/Makefile - libvips/convolution/Makefile - libvips/deprecated/Makefile - libvips/foreign/Makefile - libvips/foreign/libnsgif/Makefile - libvips/freqfilt/Makefile - libvips/histogram/Makefile - libvips/draw/Makefile - libvips/iofuncs/Makefile - libvips/module/Makefile - libvips/morphology/Makefile - libvips/mosaicing/Makefile - libvips/create/Makefile - libvips/resample/Makefile - cplusplus/Doxyfile - cplusplus/include/Makefile - cplusplus/include/vips/Makefile - cplusplus/Makefile - tools/Makefile - tools/batch_crop - tools/batch_image_convert - tools/batch_rubber_sheet - tools/light_correct - tools/shrink_width - test/Makefile - test/variables.sh - test/test-suite/Makefile - test/test-suite/helpers/Makefile - man/Makefile - doc/Makefile - doc/libvips-docs.xml - po/Makefile.in - fuzz/Makefile -]) -AC_OUTPUT - -# also add any new items to VIPS_CONFIG above -AC_MSG_RESULT([dnl -## Build options -enable debug: $enable_debug -enable deprecated library components: $enable_deprecated -enable modules: $gmodule_supported_flag -enable C docs with gtkdoc: $enable_gtk_doc - (requires gtk-doc 1.14 or later) -enable C++ docs with doxygen: $enable_doxygen -gobject introspection: $have_introspection - (requires gobject-introspection 1.30 or later) -RAD load/save: $with_radiance -Analyze7 load/save: $with_analyze -PPM load/save: $with_ppm -GIF load: $with_nsgif - -## Optional dependencies -use fftw3 for FFT: $with_fftw -accelerate loops with orc: $with_orc - (requires orc-0.4.11 or later) -ICC profile support with lcms: $with_lcms -zlib: $with_zlib -text rendering with pangocairo: $with_pangocairo -font file support with fontconfig: $with_fontconfig -EXIF metadata support with libexif: $with_libexif - -## File format support -JPEG load/save with libjpeg: $with_jpeg -JXL load/save with libjxl: $with_libjxl (dynamic module: $with_libjxl_module) -JPEG2000 load/save with libopenjp2: $with_libopenjp2 - (requires libopenjp2 2.4 or later) -PNG load/save with libspng: $with_libspng - (requires spng 0.7 or later) -PNG load/save with libpng: $with_png - (requires libpng-1.2.9 or later) -selected quantisation package: $quantisation_package -TIFF load/save with libtiff: $with_tiff -image pyramid save: $with_gsf - (requires libgsf-1 1.14.26 or later) -HEIC/AVIF load/save with libheif: $with_heif (dynamic module: $with_heif_module) -WebP load/save with libwebp: $with_libwebp - (requires libwebp, libwebpmux, libwebpdemux 0.6.0 or later) -PDF load with PDFium: $with_pdfium -PDF load with poppler-glib: $with_poppler (dynamic module: $with_poppler_module) - (requires poppler-glib 0.16.0 or later) -SVG load with librsvg-2.0: $with_rsvg - (requires librsvg-2.0 2.34.0 or later) -EXR load with OpenEXR: $with_OpenEXR -OpenSlide support: $with_openslide (dynamic module: $with_openslide_module) - (requires openslide-3.3.0 or later) -Matlab load with matio: $with_matio -NIfTI load/save with niftiio: $with_nifti -FITS load/save with cfitsio: $with_cfitsio -GIF save with cgif: $with_cgif - (requires cgif and a quantisation package) -Magick package: $with_magickpackage (dynamic module: $with_magick_module) -Magick major API version: $magick_version -load with libMagickCore: $enable_magickload -save with libMagickCore: $enable_magicksave -]) diff --git a/cplusplus/Makefile.am b/cplusplus/Makefile.am deleted file mode 100644 index e7b5a0c0..00000000 --- a/cplusplus/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -SUBDIRS = \ - include - -AM_CPPFLAGS = \ - -I$(top_srcdir)/libvips/include \ - -I$(top_srcdir)/cplusplus/include \ - @VIPS_CFLAGS@ - -lib_LTLIBRARIES = libvips-cpp.la - -libvips_cpp_la_SOURCES = \ - VImage.cpp \ - VInterpolate.cpp \ - VRegion.cpp \ - VConnection.cpp \ - VError.cpp - -libvips_cpp_la_LDFLAGS = \ - -no-undefined \ - -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@ - -libvips_cpp_la_LIBADD = \ - $(top_builddir)/libvips/libvips.la @VIPS_LIBS@ - -vips-operators.cpp: - echo "// bodies for vips operations" > vips-operators.cpp; \ - echo -n "// " >> vips-operators.cpp; \ - date >> vips-operators.cpp; \ - echo "// this file is generated automatically, do not edit!" >> vips-operators.cpp; \ - ./gen-operators.py -g cpp >> vips-operators.cpp - -if HAVE_DOXYGEN -html_DATA = html - -html: doxygen.stamp - -doxygen.stamp: Doxyfile - $(DOXYGEN) $^ - touch doxygen.stamp - -install-htmlDATA: - -mkdir -p $(DESTDIR)$(htmldir) - -cp -r html $(DESTDIR)$(htmldir) - -uninstall-htmlDATA: - rm -rf $(DESTDIR)$(htmldir)/html -endif - -# "make tidy" to run the clang-tidy linter -.PHONY: tidy -tidy: $(libvips_cpp_la_SOURCES) - clang-tidy $^ \ - -checks=clang-analyzer-*,portability-* \ - -- $(AM_CPPFLAGS) - -EXTRA_DIST = \ - Doxyfile.in \ - gen-operators.py \ - meson.build \ - README.md \ - vips-operators.cpp - diff --git a/cplusplus/include/Makefile.am b/cplusplus/include/Makefile.am deleted file mode 100644 index 227a7696..00000000 --- a/cplusplus/include/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ - -SUBDIRS = vips diff --git a/cplusplus/include/vips/Makefile.am b/cplusplus/include/vips/Makefile.am deleted file mode 100644 index 300dc421..00000000 --- a/cplusplus/include/vips/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -pkginclude_HEADERS = \ - VError8.h \ - VImage8.h \ - VInterpolate8.h \ - VRegion8.h \ - VConnection8.h \ - vips8 - -EXTRA_DIST = \ - meson.build - -vips-operators: - echo "// headers for vips operations" > vips-operators; \ - echo "// paste this file into VImage8.h, do not leave in repo" > vips-operators; \ - echo -n "// " >> vips-operators; \ - date >> vips-operators; \ - echo "// this file is generated automatically, do not edit!" >> vips-operators; \ - ./../../gen-operators.py -g h >> vips-operators diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index ec5dbf9d..00000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,203 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# We require automake 1.6 at least. -AUTOMAKE_OPTIONS = 1.6 - -# This is a blank Makefile.am for using gtk-doc. -# Copy this to your project's API docs directory and modify the variables to -# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples -# of using the various options. - -# The name of the module, e.g. 'glib'. -DOC_MODULE=libvips - -# Uncomment for versioned docs and specify the version of the module, e.g. '2'. -#DOC_MODULE_VERSION=2 - - -# The top-level XML file (SGML in the past). You can change this if you want to. -DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml - -# Directories containing the source code. -# gtk-doc will search all .c and .h files beneath these paths -# for inline comments documenting functions and macros. -# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk -DOC_SOURCE_DIR=$(top_srcdir)/libvips - -# Extra options to pass to gtkdoc-scangobj. Not normally needed. -SCANGOBJ_OPTIONS= - -# Extra options to supply to gtkdoc-scan. -# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -SCAN_OPTIONS=--rebuild-types - -# Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml -MKDB_OPTIONS=--xml-mode --output-format=xml - -# Extra options to supply to gtkdoc-mktmpl -# e.g. MKTMPL_OPTIONS=--only-section-tmpl -MKTMPL_OPTIONS= - -# Extra options to supply to gtkdoc-mkhtml -MKHTML_OPTIONS= - -# Extra options to supply to gtkdoc-fixref. Not normally needed. -# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html -FIXXREF_OPTIONS= - -# Used for dependencies. The docs will be rebuilt if any of these change. -# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h -# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c -HFILE_GLOB=$(top_srcdir)/libvips/include/vips/*.h -CFILE_GLOB=$(top_srcdir)/libvips/*/*.c - -# Extra header to include when scanning, which are not under DOC_SOURCE_DIR -# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h -EXTRA_HFILES= - -# Header files or dirs to ignore when scanning. Use base file/dir names -# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code - -IGNORE_VIPS_INCLUDE = \ - almostdeprecated.h \ - deprecated.h \ - vips7compat.h \ - dispatch.h \ - enumtypes.h \ - internal.h \ - thread.h \ - intl.h \ - format.h \ - mask.h \ - private.h \ - video.h - -# ignore all .h files in libvips/*, these are internal -IGNORE_VIPS_C = \ - binary.h \ - hough.h \ - nary.h \ - parithmetic.h \ - statistic.h \ - unary.h \ - unaryconst.h \ - pcolour.h \ - profiles.h \ - bandary.h \ - pconversion.h \ - correlation.h \ - pconvolution.h \ - pcreate.h \ - pmask.h \ - point.h \ - drawink.h \ - pdraw.h \ - dbh.h \ - jpeg.h \ - magick.h \ - pforeign.h \ - tiff.h \ - pfreqfilt.h \ - hist_unary.h \ - phistogram.h \ - sink.h \ - vipsmarshal.h \ - pmorphology.h \ - global_balance.h \ - pmosaicing.h \ - presample.h \ - templates.h - -IGNORE_HFILES = $(IGNORE_VIPS_INCLUDE) $(IGNORE_VIPS_C) - -# Images to copy into HTML directory. -# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png -HTML_IMAGES = \ - $(top_srcdir)/doc/images/owl.jpg \ - $(top_srcdir)/doc/images/tn_owl.jpg \ - $(top_srcdir)/doc/images/interconvert.png \ - $(top_srcdir)/doc/images/Combine.png \ - $(top_srcdir)/doc/images/Memtrace.png \ - $(top_srcdir)/doc/images/Sequence.png \ - $(top_srcdir)/doc/images/Sink.png \ - $(top_srcdir)/doc/images/Vips-smp.png - -# we have some files in markdown ... convert to docbook for gtk-doc -# pandoc makes section headers, we want refsect3 for gtk-doc -.md.xml: - pandoc -s --template="$(realpath pandoc-docbook-template.docbook)" --wrap=none -V title="$<" -f markdown+smart -t docbook -o $@ $< - sed -i -e 's| enumtypes.h diff --git a/libvips/iofuncs/Makefile.am b/libvips/iofuncs/Makefile.am deleted file mode 100644 index 1690e73f..00000000 --- a/libvips/iofuncs/Makefile.am +++ /dev/null @@ -1,85 +0,0 @@ -noinst_LTLIBRARIES = libiofuncs.la - -libiofuncs_la_SOURCES = \ - ginputsource.c \ - sourceginput.c \ - connection.c \ - source.c \ - sourcecustom.c \ - target.c \ - targetcustom.c \ - sbuf.c \ - dbuf.c \ - reorder.c \ - vipsmarshal.h \ - vipsmarshal.c \ - type.c \ - gate.c \ - enumtypes.c \ - object.c \ - error.c \ - image.c \ - vips.c \ - generate.c \ - mapfile.c \ - cache.c \ - sink.h \ - sink.c \ - sinkmemory.c \ - sinkdisc.c \ - sinkscreen.c \ - memory.c \ - header.c \ - operation.c \ - region.c \ - rect.c \ - semaphore.c \ - threadpool.c \ - util.c \ - init.c \ - buf.c \ - window.c \ - vector.c \ - system.c \ - buffer.c - -vipsmarshal.h: vipsmarshal.list - glib-genmarshal --prefix=vips --header vipsmarshal.list > vipsmarshal.h -vipsmarshal.c: vipsmarshal.list - echo "#include \"vipsmarshal.h\"" > vipsmarshal.c - glib-genmarshal --prefix=vips --body vipsmarshal.list >> vipsmarshal.c - -EXTRA_DIST = \ - enumtemplate \ - meson.build \ - vipsmarshal.c \ - vipsmarshal.h \ - vipsmarshal.list - -AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ - -# the headers we scan for enums etc. -# keep in sync with ../include/vips/Makefile.am -# we need absolute filenames here since this list appears in the header dir as -# well -vips_scan_headers = \ - ${top_srcdir}/libvips/include/vips/resample.h \ - ${top_srcdir}/libvips/include/vips/memory.h \ - ${top_srcdir}/libvips/include/vips/create.h \ - ${top_srcdir}/libvips/include/vips/foreign.h \ - ${top_srcdir}/libvips/include/vips/conversion.h \ - ${top_srcdir}/libvips/include/vips/arithmetic.h \ - ${top_srcdir}/libvips/include/vips/util.h \ - ${top_srcdir}/libvips/include/vips/image.h \ - ${top_srcdir}/libvips/include/vips/colour.h \ - ${top_srcdir}/libvips/include/vips/operation.h \ - ${top_srcdir}/libvips/include/vips/convolution.h \ - ${top_srcdir}/libvips/include/vips/morphology.h \ - ${top_srcdir}/libvips/include/vips/draw.h \ - ${top_srcdir}/libvips/include/vips/basic.h \ - ${top_srcdir}/libvips/include/vips/object.h \ - ${top_srcdir}/libvips/include/vips/region.h - -enumtypes.c: $(vips_scan_headers) Makefile.am - glib-mkenums --template ${top_srcdir}/libvips/iofuncs/enumtemplate $(vips_scan_headers) > enumtypes.c - diff --git a/libvips/module/Makefile.am b/libvips/module/Makefile.am deleted file mode 100644 index 14ac50c5..00000000 --- a/libvips/module/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_DIST = \ - jxl.c \ - heif.c \ - magick.c \ - openslide.c \ - poppler.c diff --git a/libvips/morphology/Makefile.am b/libvips/morphology/Makefile.am deleted file mode 100644 index 3f6e80c3..00000000 --- a/libvips/morphology/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -noinst_LTLIBRARIES = libmorphology.la - -libmorphology_la_SOURCES = \ - nearest.c \ - morphology.c \ - pmorphology.h \ - countlines.c \ - rank.c \ - morph.c \ - labelregions.c - -AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ - -EXTRA_DIST = meson.build diff --git a/libvips/mosaicing/Makefile.am b/libvips/mosaicing/Makefile.am deleted file mode 100644 index 756f4dd1..00000000 --- a/libvips/mosaicing/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -noinst_LTLIBRARIES = libmosaicing.la - -libmosaicing_la_SOURCES = \ - mosaicing.c \ - merge.c \ - mosaic.c \ - match.c \ - mosaic1.c \ - chkpair.c \ - matrixinvert.c \ - global_balance.c \ - lrmerge.c \ - tbmerge.c \ - lrmosaic.c \ - tbmosaic.c \ - remosaic.c \ - im_avgdxdy.c \ - im_clinear.c \ - im_improve.c \ - im_initialize.c \ - im_lrcalcon.c \ - im_tbcalcon.c \ - global_balance.h \ - pmosaicing.h - -AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ - -EXTRA_DIST = meson.build diff --git a/libvips/resample/Makefile.am b/libvips/resample/Makefile.am deleted file mode 100644 index 3dcce8c7..00000000 --- a/libvips/resample/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -libresample_la_SOURCES = \ - thumbnail.c \ - mapim.c \ - affine.c \ - quadratic.c \ - resample.c \ - similarity.c \ - resize.c \ - presample.h \ - shrink.c \ - shrinkh.c \ - shrinkv.c \ - reduce.c \ - reduceh.cpp \ - reducev.cpp \ - interpolate.c \ - transform.c \ - bicubic.cpp \ - lbb.cpp \ - nohalo.cpp \ - vsqbs.cpp \ - templates.h - -EXTRA_DIST = \ - dummy2.cc \ - meson.build - -noinst_LTLIBRARIES = libresample.la - -AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ diff --git a/m4/ax_gcc_var_attribute.m4 b/m4/ax_gcc_var_attribute.m4 deleted file mode 100644 index 47635d46..00000000 --- a/m4/ax_gcc_var_attribute.m4 +++ /dev/null @@ -1,141 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_gcc_var_attribute.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_GCC_VAR_ATTRIBUTE(ATTRIBUTE) -# -# DESCRIPTION -# -# This macro checks if the compiler supports one of GCC's variable -# attributes; many other compilers also provide variable attributes with -# the same syntax. Compiler warnings are used to detect supported -# attributes as unsupported ones are ignored by default so quieting -# warnings when using this macro will yield false positives. -# -# The ATTRIBUTE parameter holds the name of the attribute to be checked. -# -# If ATTRIBUTE is supported define HAVE_VAR_ATTRIBUTE_. -# -# The macro caches its result in the ax_cv_have_var_attribute_ -# variable. -# -# The macro currently supports the following variable attributes: -# -# aligned -# cleanup -# common -# nocommon -# deprecated -# mode -# packed -# tls_model -# unused -# used -# vector_size -# weak -# dllimport -# dllexport -# init_priority -# -# Unsupported variable attributes will be tested against a global integer -# variable and without any arguments given to the attribute itself; the -# result of this check might be wrong or meaningless so use with care. -# -# LICENSE -# -# Copyright (c) 2013 Gabriele Svelto -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 5 - -AC_DEFUN([AX_GCC_VAR_ATTRIBUTE], [ - AS_VAR_PUSHDEF([ac_var], [ax_cv_have_var_attribute_$1]) - - AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([ - m4_case([$1], - [aligned], [ - int foo __attribute__(($1(32))); - ], - [cleanup], [ - int bar(int *t) { return *t; }; - ], - [common], [ - int foo __attribute__(($1)); - ], - [nocommon], [ - int foo __attribute__(($1)); - ], - [deprecated], [ - int foo __attribute__(($1)) = 0; - ], - [mode], [ - long foo __attribute__(($1(word))); - ], - [packed], [ - struct bar { - int baz __attribute__(($1)); - }; - ], - [tls_model], [ - __thread int bar1 __attribute__(($1("global-dynamic"))); - __thread int bar2 __attribute__(($1("local-dynamic"))); - __thread int bar3 __attribute__(($1("initial-exec"))); - __thread int bar4 __attribute__(($1("local-exec"))); - ], - [unused], [ - int foo __attribute__(($1)); - ], - [used], [ - int foo __attribute__(($1)); - ], - [vector_size], [ - int foo __attribute__(($1(16))); - ], - [weak], [ - int foo __attribute__(($1)); - ], - [dllimport], [ - int foo __attribute__(($1)); - ], - [dllexport], [ - int foo __attribute__(($1)); - ], - [init_priority], [ - struct bar { bar() {} ~bar() {} }; - bar b __attribute__(($1(65535/2))); - ], - [ - m4_warn([syntax], [Unsupported attribute $1, the test may fail]) - int foo __attribute__(($1)); - ] - )], [ - m4_case([$1], - [cleanup], [ - int foo __attribute__(($1(bar))) = 0; - foo = foo + 1; - ], - [] - )]) - ], - dnl GCC doesn't exit with an error if an unknown attribute is - dnl provided but only outputs a warning, so accept the attribute - dnl only if no warning were issued. - [AS_IF([test -s conftest.err], - [AS_VAR_SET([ac_var], [no])], - [AS_VAR_SET([ac_var], [yes])])], - [AS_VAR_SET([ac_var], [no])]) - ]) - - AS_IF([test yes = AS_VAR_GET([ac_var])], - [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_VAR_ATTRIBUTE_$1), 1, - [Define to 1 if the system has the `$1' variable attribute])], []) - - AS_VAR_POPDEF([ac_var]) -]) diff --git a/m4/expat.m4 b/m4/expat.m4 deleted file mode 100644 index 8e7828fe..00000000 --- a/m4/expat.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl Look for expat, set EXPAT_CFLAGS, EXPAT_LIBS -dnl Use --with-expat=PREFIX to set a specific prefix -dnl -dnl This is modified from the usual expat.m4: -dnl - default to with_expat=yes -dnl - don't set a conditional - -AC_DEFUN([AM_WITH_EXPAT], -[ AC_ARG_WITH(expat, - [ --with-expat=PREFIX Use system Expat library], - , with_expat=yes) - - EXPAT_CFLAGS= - EXPAT_LIBS= - if test $with_expat != no; then - if test $with_expat != yes; then - EXPAT_CFLAGS="-I$with_expat/include" - EXPAT_LIBS="-L$with_expat/lib" - fi - AC_CHECK_LIB(expat, XML_ParserCreate, - [ EXPAT_LIBS="$EXPAT_LIBS -lexpat" - expat_found=yes ], - [ expat_found=no ], - "$EXPAT_LIBS") - if test $expat_found = no; then - AC_MSG_ERROR([Could not find the Expat library]) - fi - expat_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $EXPAT_CFLAGS" - AC_CHECK_HEADERS(expat.h, , expat_found=no) - if test $expat_found = no; then - AC_MSG_ERROR([Could not find expat.h]) - fi - CFLAGS="$expat_save_CFLAGS" - fi - - AC_SUBST(EXPAT_CFLAGS) - AC_SUBST(EXPAT_LIBS) -]) diff --git a/m4/gif.m4 b/m4/gif.m4 deleted file mode 100644 index f3ea326b..00000000 --- a/m4/gif.m4 +++ /dev/null @@ -1,117 +0,0 @@ -dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding -dnl -dnl FIND_GIFLIB[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] -dnl --------------------------------------------------- -dnl -dnl Find GIFLIB libraries and headers -dnl -dnl Put compile stuff in GIFLIB_INCLUDES -dnl Put link stuff in GIFLIB_LIBS -dnl Define HAVE_GIFLIB if found. -dnl -AC_DEFUN([FIND_GIFLIB], [ -AC_REQUIRE([AC_PATH_XTRA]) - -GIFLIB_INCLUDES="" -GIFLIB_LIBS="" - -AC_ARG_WITH(giflib, - AS_HELP_STRING([--without-giflib], [build without giflib (default: test)])) -# Treat --without-giflib like --without-giflib-includes --without-giflib-libraries. -if test "$with_giflib" = "no"; then - GIFLIB_INCLUDES=no - GIFLIB_LIBS=no -fi - -AC_ARG_WITH(giflib-includes, - AS_HELP_STRING([--with-giflib-includes=DIR], [giflib includes are in DIR]), - GIFLIB_INCLUDES="-I$withval") -AC_ARG_WITH(giflib-libraries, - AS_HELP_STRING([--with-giflib-libraries=DIR], [giflib libraries are in DIR]), - GIFLIB_LIBS="-L$withval -lgif") - -AC_MSG_CHECKING(for giflib) - -# Look for gif_lib.h -if test "$GIFLIB_INCLUDES" = ""; then - # Check the standard search path - AC_TRY_COMPILE([#include ],[int a;],[ - GIFLIB_INCLUDES="" - ], [ - # gif_lib.h is not in the standard search path, try - # $prefix - giflib_save_CFLAGS="$CFLAGS" - - CFLAGS="-I${prefix}/include $CFLAGS" - - AC_TRY_COMPILE([#include ],[int a;],[ - GIFLIB_INCLUDES="-I${prefix}/include" - ], [ - GIFLIB_INCLUDES="no" - ]) - - CFLAGS=$giflib_save_CFLAGS - ]) -fi - -# Now for the libraries -if test "$GIFLIB_LIBS" = ""; then - giflib_save_LIBS="$LIBS" - giflib_save_CFLAGS="$CFLAGS" - - LIBS="-lgif $LIBS" - CFLAGS="$GIFLIB_INCLUDES $CFLAGS" - - # Try the standard search path first - AC_TRY_LINK([#include ],[DGifSlurp(0)], [ - GIFLIB_LIBS="-lgif" - ], [ - # giflib is not in the standard search path, try $prefix - - LIBS="-L${prefix}/lib $LIBS" - - AC_TRY_LINK([#include ],[DGifSlurp(0)], [ - GIFLIB_LIBS="-L${prefix}/lib -lgif" - ], [ - GIFLIB_LIBS=no - ]) - ]) - - LIBS="$giflib_save_LIBS" - CFLAGS="$giflib_save_CFLAGS" -fi - -AC_SUBST(GIFLIB_LIBS) -AC_SUBST(GIFLIB_INCLUDES) - -# Print a helpful message -giflib_libraries_result="$GIFLIB_LIBS" -giflib_includes_result="$GIFLIB_INCLUDES" - -if test x"$giflib_libraries_result" = x""; then - giflib_libraries_result="in default path" -fi -if test x"$giflib_includes_result" = x""; then - giflib_includes_result="in default path" -fi - -if test "$giflib_libraries_result" = "no"; then - giflib_libraries_result="(none)" -fi -if test "$giflib_includes_result" = "no"; then - giflib_includes_result="(none)" -fi - -AC_MSG_RESULT([libraries $giflib_libraries_result, headers $giflib_includes_result]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "$GIFLIB_INCLUDES" != "no" && test "$GIFLIB_LIBS" != "no"; then - AC_DEFINE(HAVE_GIFLIB,1,[Define if you have giflib libraries and header files.]) - $1 -else - GIFLIB_INCLUDES="" - GIFLIB_LIBS="" - $2 -fi - -])dnl diff --git a/m4/jpeg.m4 b/m4/jpeg.m4 deleted file mode 100644 index 243a5f06..00000000 --- a/m4/jpeg.m4 +++ /dev/null @@ -1,123 +0,0 @@ -dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding -dnl -dnl FIND_JPEG[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] -dnl ------------------------------------------------ -dnl -dnl Find JPEG libraries and headers -dnl -dnl Put compile stuff in JPEG_INCLUDES -dnl Put link stuff in JPEG_LIBS -dnl Define HAVE_JPEG if found -dnl -AC_DEFUN([FIND_JPEG], [ -AC_REQUIRE([AC_PATH_XTRA]) - -JPEG_INCLUDES="" -JPEG_LIBS="" - -AC_ARG_WITH(jpeg, - AS_HELP_STRING([--without-jpeg], [build without libjpeg (default: test)])) -# Treat --without-jpeg like --without-jpeg-includes --without-jpeg-libraries. -if test "$with_jpeg" = "no"; then - JPEG_INCLUDES=no - JPEG_LIBS=no -fi - -AC_ARG_WITH(jpeg-includes, - AS_HELP_STRING([--with-jpeg-includes=DIR], [libjpeg includes are in DIR]), - JPEG_INCLUDES="-I$withval") -AC_ARG_WITH(jpeg-libraries, - AS_HELP_STRING([--with-jpeg-libraries=DIR], [libjpeg libraries are in DIR]), - JPEG_LIBS="-L$withval -ljpeg") - -AC_MSG_CHECKING(for JPEG) - -# Look for jpeglib.h -if test "$JPEG_INCLUDES" = ""; then - # Check the standard search path - AC_TRY_COMPILE([#include - #include ],[int a;],[ - JPEG_INCLUDES="" - ], [ - # jpeglib.h is not in the standard search path, try - # $prefix - jpeg_save_CFLAGS="$CFLAGS" - - CFLAGS="-I${prefix}/include $CFLAGS" - - AC_TRY_COMPILE([#include - #include ],[int a;],[ - JPEG_INCLUDES="-I${prefix}/include" - ], [ - JPEG_INCLUDES="no" - ]) - - CFLAGS=$jpeg_save_CFLAGS - ]) -fi - -# Now for the libraries -if test "$JPEG_LIBS" = ""; then - jpeg_save_LIBS="$LIBS" - jpeg_save_CFLAGS="$CFLAGS" - - LIBS="-ljpeg $LIBS" - CFLAGS="$JPEG_INCLUDES $CFLAGS" - - # Try the standard search path first - AC_TRY_LINK([#include - #include - ],[jpeg_abort((void*)0)], [ - JPEG_LIBS="-ljpeg" - ], [ - # libjpeg is not in the standard search path, try $prefix - - LIBS="-L${prefix}/lib $LIBS" - - AC_TRY_LINK([#include - #include - ],[jpeg_abort((void*)0)], [ - JPEG_LIBS="-L${prefix}/lib -ljpeg" - ], [ - JPEG_LIBS=no - ]) - ]) - - LIBS="$jpeg_save_LIBS" - CFLAGS="$jpeg_save_CFLAGS" -fi - -AC_SUBST(JPEG_LIBS) -AC_SUBST(JPEG_INCLUDES) - -# Print a helpful message -jpeg_libraries_result="$JPEG_LIBS" -jpeg_includes_result="$JPEG_INCLUDES" - -if test x"$jpeg_libraries_result" = x""; then - jpeg_libraries_result="in default path" -fi -if test x"$jpeg_includes_result" = x""; then - jpeg_includes_result="in default path" -fi - -if test "$jpeg_libraries_result" = "no"; then - jpeg_libraries_result="(none)" -fi -if test "$jpeg_includes_result" = "no"; then - jpeg_includes_result="(none)" -fi - -AC_MSG_RESULT([libraries $jpeg_libraries_result, headers $jpeg_includes_result]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "$JPEG_INCLUDES" != "no" && test "$JPEG_LIBS" != "no"; then - AC_DEFINE(HAVE_JPEG,1,[Define if you have jpeg libraries and header files.]) - $1 -else - JPEG_INCLUDES="" - JPEG_LIBS="" - $2 -fi - -])dnl diff --git a/m4/mkdir.m4 b/m4/mkdir.m4 deleted file mode 100644 index 73942a31..00000000 --- a/m4/mkdir.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl @synopsis AC_FUNC_MKDIR -dnl -dnl Check whether mkdir() is mkdir or _mkdir, and whether it takes one -dnl or two arguments. -dnl -dnl This macro can define HAVE_MKDIR, HAVE__MKDIR, and -dnl MKDIR_TAKES_ONE_ARG, which are expected to be used as follows: -dnl -dnl #if HAVE_MKDIR -dnl # if MKDIR_TAKES_ONE_ARG -dnl /* MinGW32 */ -dnl # define mkdir(a, b) mkdir(a) -dnl # endif -dnl #else -dnl # if HAVE__MKDIR -dnl /* plain Windows 32 */ -dnl # define mkdir(a, b) _mkdir(a) -dnl # else -dnl # error "Don't know how to create a directory on this system." -dnl # endif -dnl #endif -dnl -dnl @category C -dnl @author Alexandre Duret-Lutz -dnl @version 2003-12-28 -dnl @license GPLWithACException - -AC_DEFUN([AC_FUNC_MKDIR], -[AC_CHECK_FUNCS([mkdir _mkdir]) -AC_CACHE_CHECK([whether mkdir takes one argument], - [ac_cv_mkdir_takes_one_arg], -[AC_TRY_COMPILE([ -#include -#if HAVE_UNISTD_H -# include -#endif -], [mkdir (".");], -[ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])]) -if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then - AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1, - [Define if mkdir takes only one argument.]) -fi -]) - -dnl Note: -dnl ===== -dnl I have not implemented the following suggestion because I don't have -dnl access to such a broken environment to test the macro. So I'm just -dnl appending the comments here in case you have, and want to fix -dnl AC_FUNC_MKDIR that way. -dnl -dnl |Thomas E. Dickey (dickey@herndon4.his.com) said: -dnl | it doesn't cover the problem areas (compilers that mistreat mkdir -dnl | may prototype it in dir.h and dirent.h, for instance). -dnl | -dnl |Alexandre: -dnl | Would it be sufficient to check for these headers and #include -dnl | them in the AC_TRY_COMPILE block? (and is AC_HEADER_DIRENT -dnl | suitable for this?) -dnl | -dnl |Thomas: -dnl | I think that might be a good starting point (with the set of recommended -dnl | ifdef's and includes for AC_HEADER_DIRENT, of course). diff --git a/m4/nifti.m4 b/m4/nifti.m4 deleted file mode 100644 index 6d60f654..00000000 --- a/m4/nifti.m4 +++ /dev/null @@ -1,122 +0,0 @@ -dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding -dnl -dnl FIND_NIFTI[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] -dnl ------------------------------------------------ -dnl -dnl Find NIFTI libraries and headers -dnl -dnl Put compile stuff in NIFTI_INCLUDES -dnl Put link stuff in NIFTI_LIBS -dnl Define HAVE_NIFTI if found -dnl -AC_DEFUN([FIND_NIFTI], [ -AC_REQUIRE([AC_PATH_XTRA]) - -NIFTI_INCLUDES="" -NIFTI_LIBS="" - -AC_ARG_WITH(nifti, - AS_HELP_STRING([--without-nifti], [build without nifti (default: test)])) -# Treat --without-nifti like --without-nifti-includes --without-nifti-libraries. -if test "$with_nifti" = "no"; then - NIFTI_INCLUDES=no - NIFTI_LIBS=no -fi - -AC_ARG_WITH(nifti-includes, - AS_HELP_STRING([--with-nifti-includes=DIR], [libniftiio includes are in DIR]), - NIFTI_INCLUDES="-I$withval" -) -AC_ARG_WITH(nifti-libraries, - AS_HELP_STRING([--with-nifti-libraries=DIR], - [libniftiio libraries are in DIR]), - NIFTI_LIBS="-L$withval -lniftiio -lznz" -) - -AC_MSG_CHECKING(for NIFTI) - -# Look for nifti1_io.h ... usually in /usr/include/nifti -if test "$NIFTI_INCLUDES" = ""; then - nifti_save_CFLAGS="$CFLAGS" - - # annoyingly, the header must be unqualified, so we have to add to the - # search path - CFLAGS="-I/usr/include/nifti $nifti_save_CFLAGS" - - AC_TRY_COMPILE([#include ],[int a;],[ - NIFTI_INCLUDES="-I/usr/include/nifti" - ], [ - # not in the standard search path, try $prefix - CFLAGS="-I${prefix}/include/nifti $nifti_save_CFLAGS" - - AC_TRY_COMPILE([#include ],[int a;],[ - NIFTI_INCLUDES="-I${prefix}/include/nifti" - ], [ - NIFTI_INCLUDES="no" - ]) - ]) - - CFLAGS="$nifti_save_CFLAGS" -fi - -# Now for the libraries -if test "$NIFTI_LIBS" = ""; then - nifti_save_LIBS="$LIBS" - nifti_save_CFLAGS="$CFLAGS" - - LIBS="-lniftiio -lznz -lm $nifti_save_LIBS" - CFLAGS="$NIFTI_INCLUDES $CFLAGS" - - # Try the standard search path first - AC_TRY_LINK([#include ],[is_nifti_file("")], [ - NIFTI_LIBS="-lniftiio -lznz" - ], [ - # libniftiio is not in the standard search path, try $prefix - - LIBS="-L${prefix}/lib $LIBS" - - AC_TRY_LINK([#include ],[is_nifti_file("")], [ - NIFTI_LIBS="-L${prefix}/lib -lniftiio -lznz" - ], [ - NIFTI_LIBS=no - ]) - ]) - - LIBS="$nifti_save_LIBS" - CFLAGS="$nifti_save_CFLAGS" -fi - -AC_SUBST(NIFTI_LIBS) -AC_SUBST(NIFTI_INCLUDES) - -# Print a helpful message -nifti_libraries_result="$NIFTI_LIBS" -nifti_includes_result="$NIFTI_INCLUDES" - -if test x"$nifti_libraries_result" = x""; then - nifti_libraries_result="in default path" -fi -if test x"$nifti_includes_result" = x""; then - nifti_includes_result="in default path" -fi - -if test "$nifti_libraries_result" = "no"; then - nifti_libraries_result="(none)" -fi -if test "$nifti_includes_result" = "no"; then - nifti_includes_result="(none)" -fi - -AC_MSG_RESULT([libraries $nifti_libraries_result, headers $nifti_includes_result]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "$NIFTI_INCLUDES" != "no" && test "$NIFTI_LIBS" != "no"; then - AC_DEFINE(HAVE_NIFTI,1,[Define if you have nifti libraries and header files.]) - $1 -else - NIFTI_INCLUDES="" - NIFTI_LIBS="" - $2 -fi - -])dnl diff --git a/m4/pdfium.m4 b/m4/pdfium.m4 deleted file mode 100644 index d6a13309..00000000 --- a/m4/pdfium.m4 +++ /dev/null @@ -1,111 +0,0 @@ -dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding -dnl -dnl FIND_PDFIUM[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] -dnl --------------------------------------------------- -dnl -dnl Find pdfium libraries and headers -dnl -dnl Put -I stuff in PDFIUM_INCLUDES -dnl Put PDFium objects in PDFIUM_LIBS (add this to the link line untouched!) -dnl Define HAVE_PDFIUM if found -dnl -AC_DEFUN([FIND_PDFIUM], [ -AC_REQUIRE([AC_PATH_XTRA]) - -ZLIB_INCLUDES="" -ZLIB_LIBS="" - -AC_ARG_WITH(pdfium, - AS_HELP_STRING([--without-pdfium], [build without pdfium (default: test)])) -# Treat --without-pdfium like --without-pdfium-includes -# --without-pdfium-libraries -if test "$with_pdfium" = "no"; then - PDFIUM_INCLUDES=no - PDFIUM_LIBS=no -fi - -AC_ARG_WITH(pdfium-includes, - AS_HELP_STRING([--with-pdfium-includes=DIR], [pdfium includes are in DIR]), - PDFIUM_INCLUDES="-I$withval") -AC_ARG_WITH(pdfium-libraries, - AS_HELP_STRING([--with-pdfium-libraries=DIR], [pdfium libraries are in DIR]), - PDFIUM_LIBS="$withval") - -AC_MSG_CHECKING(for PDFIUM) - -# Look for fpdfview.h ... this is a documented header, so it should be a good -# target -# -# it won't be in the standard search path, but try $PREFIX -if test "$PDFIUM_INCLUDES" = ""; then - pdfium_save_CPPFLAGS="$CPPFLAGS" - - CPPFLAGS="-I${prefix}/include $CPPFLAGS" - - AC_TRY_COMPILE([#include ],[int a;],[ - PDFIUM_INCLUDES="-I${prefix}/include" - ], [ - PDFIUM_INCLUDES="no" - ] - ) - - CPPFLAGS="$pdfium_save_CPPFLAGS" -fi - -# Now for the libraries ... if there's nothing set, try $PREFIX/lib -if test "$PDFIUM_LIBS" = ""; then - pdfium_save_LIBS="$LIBS" - pdfium_save_CPPFLAGS="$CPPFLAGS" - - LIBS="-L$prefix/lib -lpdfium -lc++ -licuuc $LIBS" - CPPFLAGS="$PDFIUM_INCLUDES $CPPFLAGS" - - AC_TRY_LINK([#include ], - [FPDF_DOCUMENT doc; doc = FPDF_LoadDocument("", "")], - [PDFIUM_LIBS="${prefix}/lib"], - [PDFIUM_LIBS=no]) - - LIBS="$pdfium_save_LIBS" - CPPFLAGS="$pdfium_save_CPPFLAGS" -fi - -# Print a helpful message -pdfium_libraries_result="$PDFIUM_LIBS" -pdfium_includes_result="$PDFIUM_INCLUDES" - -if test x"$pdfium_libraries_result" = x""; then - pdfium_libraries_result="in default path" -fi -if test x"$pdfium_includes_result" = x""; then - pdfium_includes_result="in default path" -fi - -if test "$pdfium_libraries_result" = "no"; then - pdfium_libraries_result="(none)" -fi -if test "$pdfium_includes_result" = "no"; then - pdfium_includes_result="(none)" -fi - -AC_MSG_RESULT([libraries $pdfium_libraries_result, headers $pdfium_includes_result]) - -if test x"$PDFIUM_LIBS" != x"no"; then - dir="$PDFIUM_LIBS" - PDFIUM_LIBS="-L$dir -lpdfium -lc++ -licuuc" -fi - -AC_SUBST(PDFIUM_LIBS) -AC_SUBST(PDFIUM_INCLUDES) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "$PDFIUM_INCLUDES" != "no" && test "$PDFIUM_LIBS" != "no"; then - AC_DEFINE(HAVE_PDFIUM,1, - [Define if you have pdfium libraries and header files.]) - $1 -else - PDFIUM_INCLUDES="" - PDFIUM_LIBS="" - $2 -fi - -])dnl diff --git a/m4/png.m4 b/m4/png.m4 deleted file mode 100644 index 98c7cf7d..00000000 --- a/m4/png.m4 +++ /dev/null @@ -1,117 +0,0 @@ -dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding -dnl -dnl FIND_PNG[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] -dnl ------------------------------------------------ -dnl -dnl Find PNG libraries and headers -dnl -dnl Put compile stuff in PNG_INCLUDES -dnl Put link stuff in PNG_LIBS -dnl Define HAVE_PNG if found. -dnl -AC_DEFUN([FIND_PNG], [ -AC_REQUIRE([AC_PATH_XTRA]) - -PNG_INCLUDES="" -PNG_LIBS="" - -AC_ARG_WITH(png, - AS_HELP_STRING([--without-png], [build without libpng (default: test)])) -# Treat --without-png like --without-png-includes --without-png-libraries. -if test "$with_png" = "no"; then - PNG_INCLUDES=no - PNG_LIBS=no -fi - -AC_ARG_WITH(png-includes, - AS_HELP_STRING([--with-png-includes=DIR], [libpng includes are in DIR]), - PNG_INCLUDES="-I$withval") -AC_ARG_WITH(png-libraries, - AS_HELP_STRING([--with-png-libraries=DIR], [libpng libraries are in DIR]), - PNG_LIBS="-L$withval -lpng") - -AC_MSG_CHECKING(for libpng) - -# Look for png.h -if test "$PNG_INCLUDES" = ""; then - # Check the standard search path - AC_TRY_COMPILE([#include ],[int a;],[ - PNG_INCLUDES="" - ], [ - # png.h is not in the standard search path, try - # $prefix - png_save_CFLAGS="$CFLAGS" - - CFLAGS="-I${prefix}/include $CFLAGS" - - AC_TRY_COMPILE([#include ],[int a;],[ - PNG_INCLUDES="-I${prefix}/include" - ], [ - PNG_INCLUDES="no" - ]) - - CFLAGS=$png_save_CFLAGS - ]) -fi - -# Now for the libraries -if test "$PNG_LIBS" = ""; then - png_save_LIBS="$LIBS" - png_save_CFLAGS="$CFLAGS" - - LIBS="-lpng $LIBS" - CFLAGS="$PNG_INCLUDES $CFLAGS" - - # Try the standard search path first - AC_TRY_LINK([#include ],[png_access_version_number()], [ - PNG_LIBS="-lpng" - ], [ - # libpng is not in the standard search path, try $prefix - - LIBS="-L${prefix}/lib $LIBS" - - AC_TRY_LINK([#include ],[png_access_version_number()], [ - PNG_LIBS="-L${prefix}/lib -lpng" - ], [ - PNG_LIBS=no - ]) - ]) - - LIBS="$png_save_LIBS" - CFLAGS="$png_save_CFLAGS" -fi - -AC_SUBST(PNG_LIBS) -AC_SUBST(PNG_INCLUDES) - -# Print a helpful message -png_libraries_result="$PNG_LIBS" -png_includes_result="$PNG_INCLUDES" - -if test x"$png_libraries_result" = x""; then - png_libraries_result="in default path" -fi -if test x"$png_includes_result" = x""; then - png_includes_result="in default path" -fi - -if test "$png_libraries_result" = "no"; then - png_libraries_result="(none)" -fi -if test "$png_includes_result" = "no"; then - png_includes_result="(none)" -fi - -AC_MSG_RESULT([libraries $png_libraries_result, headers $png_includes_result]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "$PNG_INCLUDES" != "no" && test "$PNG_LIBS" != "no"; then - AC_DEFINE(HAVE_PNG,1,[Define if you have png libraries and header files.]) - $1 -else - PNG_INCLUDES="" - PNG_LIBS="" - $2 -fi - -])dnl diff --git a/m4/tiff.m4 b/m4/tiff.m4 deleted file mode 100644 index 155eb43c..00000000 --- a/m4/tiff.m4 +++ /dev/null @@ -1,117 +0,0 @@ -dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding -dnl -dnl FIND_TIFF[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] -dnl ------------------------------------------------ -dnl -dnl Find TIFF libraries and headers -dnl -dnl Put compile stuff in TIFF_INCLUDES -dnl Put link stuff in TIFF_LIBS -dnl Define HAVE_TIFF if found -dnl -AC_DEFUN([FIND_TIFF], [ -AC_REQUIRE([AC_PATH_XTRA]) - -TIFF_INCLUDES="" -TIFF_LIBS="" - -AC_ARG_WITH(tiff, - AS_HELP_STRING([--without-tiff], [build without libtiff (default: test)])) -# Treat --without-tiff like --without-tiff-includes --without-tiff-libraries. -if test "$with_tiff" = "no"; then - TIFF_INCLUDES=no - TIFF_LIBS=no -fi - -AC_ARG_WITH(tiff-includes, - AS_HELP_STRING([--with-tiff-includes=DIR], [libtiff includes are in DIR]), - TIFF_INCLUDES="-I$withval") -AC_ARG_WITH(tiff-libraries, - AS_HELP_STRING([--with-tiff-libraries=DIR], [libtiff libraries are in DIR]), - TIFF_LIBS="-L$withval -ltiff") - -AC_MSG_CHECKING(for TIFF) - -# Look for tiff.h -if test "$TIFF_INCLUDES" = ""; then - # Check the standard search path - AC_TRY_COMPILE([#include ],[int a;],[ - TIFF_INCLUDES="" - ], [ - # tiff.h is not in the standard search path, try - # $prefix - tiff_save_CFLAGS="$CFLAGS" - - CFLAGS="-I${prefix}/include $CFLAGS" - - AC_TRY_COMPILE([#include ],[int a;],[ - TIFF_INCLUDES="-I${prefix}/include" - ], [ - TIFF_INCLUDES="no" - ]) - - CFLAGS=$tiff_save_CFLAGS - ]) -fi - -# Now for the libraries -if test "$TIFF_LIBS" = ""; then - tiff_save_LIBS="$LIBS" - tiff_save_CFLAGS="$CFLAGS" - - LIBS="-ltiff -lm $LIBS" - CFLAGS="$TIFF_INCLUDES $CFLAGS" - - # Try the standard search path first - AC_TRY_LINK([#include ],[TIFFGetVersion()], [ - TIFF_LIBS="-ltiff" - ], [ - # libtiff is not in the standard search path, try $prefix - - LIBS="-L${prefix}/lib $LIBS" - - AC_TRY_LINK([#include ],[TIFFGetVersion()], [ - TIFF_LIBS="-L${prefix}/lib -ltiff" - ], [ - TIFF_LIBS=no - ]) - ]) - - LIBS="$tiff_save_LIBS" - CFLAGS="$tiff_save_CFLAGS" -fi - -AC_SUBST(TIFF_LIBS) -AC_SUBST(TIFF_INCLUDES) - -# Print a helpful message -tiff_libraries_result="$TIFF_LIBS" -tiff_includes_result="$TIFF_INCLUDES" - -if test x"$tiff_libraries_result" = x""; then - tiff_libraries_result="in default path" -fi -if test x"$tiff_includes_result" = x""; then - tiff_includes_result="in default path" -fi - -if test "$tiff_libraries_result" = "no"; then - tiff_libraries_result="(none)" -fi -if test "$tiff_includes_result" = "no"; then - tiff_includes_result="(none)" -fi - -AC_MSG_RESULT([libraries $tiff_libraries_result, headers $tiff_includes_result]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "$TIFF_INCLUDES" != "no" && test "$TIFF_LIBS" != "no"; then - AC_DEFINE(HAVE_TIFF,1,[Define if you have tiff libraries and header files.]) - $1 -else - TIFF_INCLUDES="" - TIFF_LIBS="" - $2 -fi - -])dnl diff --git a/m4/webp.m4 b/m4/webp.m4 deleted file mode 100644 index c79e2b71..00000000 --- a/m4/webp.m4 +++ /dev/null @@ -1,119 +0,0 @@ -dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding -dnl -dnl FIND_LIBWEBP[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] -dnl --------------------------------------------------- -dnl -dnl Find webp libraries and headers ... useful for platforms which are missing -dnl the webp .pc file -dnl -dnl Put compile stuff in LIBWEBP_INCLUDES -dnl Put link stuff in LIBWEBP_LIBS -dnl Define HAVE_LIBWEBP if found. -dnl -AC_DEFUN([FIND_LIBWEBP], [ -AC_REQUIRE([AC_PATH_XTRA]) - -LIBWEBP_INCLUDES="" -LIBWEBP_LIBS="" - -AC_ARG_WITH(libwebp, - AS_HELP_STRING([--without-libwebp], [build without libwebp (default: test)])) -# Treat --without-libwebp like --without-libwebp-includes --without-libwebp-libraries. -if test "$with_libwebp" = "no"; then - LIBWEBP_INCLUDES=no - LIBWEBP_LIBS=no -fi - -AC_ARG_WITH(libwebp-includes, - AS_HELP_STRING([--with-libwebp-includes=DIR], [libwebp includes are in DIR]), - LIBWEBP_INCLUDES="-I$withval") -AC_ARG_WITH(libwebp-libraries, - AS_HELP_STRING([--with-libwebp-libraries=DIR], [libwebp libraries are in DIR]), - LIBWEBP_LIBS="-L$withval -lwebp") - -AC_MSG_CHECKING(for libwebp) - -# Look for webp/decode.h -if test "$LIBWEBP_INCLUDES" = ""; then - # Check the standard search path - AC_TRY_COMPILE([#include ],[int a;],[ - LIBWEBP_INCLUDES="" - ], [ - # webp/decode.h is not in the standard search path, try - # $prefix - libwebp_save_CFLAGS="$CFLAGS" - - CFLAGS="-I${prefix}/include $CFLAGS" - - AC_TRY_COMPILE([#include ],[int a;],[ - LIBWEBP_INCLUDES="-I${prefix}/include" - ], [ - LIBWEBP_INCLUDES="no" - ]) - - CFLAGS=$libwebp_save_CFLAGS - ]) -fi - -# Now for the libraries -if test "$LIBWEBP_LIBS" = ""; then - libwebp_save_LIBS="$LIBS" - libwebp_save_CFLAGS="$CFLAGS" - - LIBS="-lwebp $LIBS" - CFLAGS="$LIBWEBP_INCLUDES $CFLAGS" - - # Try the standard search path first - AC_TRY_LINK([#include ],[WebPInitDecoderConfig(0)], [ - LIBWEBP_LIBS="-lwebp" - ], [ - # libwebp is not in the standard search path, try $prefix - - LIBS="-L${prefix}/lib $LIBS" - - AC_TRY_LINK([#include ],[WebPInitDecoderConfig(0)], [ - LIBWEBP_LIBS="-L${prefix}/lib -lwebp" - ], [ - LIBWEBP_LIBS=no - ]) - ]) - - LIBS="$libwebp_save_LIBS" - CFLAGS="$libwebp_save_CFLAGS" -fi - -AC_SUBST(LIBWEBP_LIBS) -AC_SUBST(LIBWEBP_INCLUDES) - -# Print a helpful message -libwebp_libraries_result="$LIBWEBP_LIBS" -libwebp_includes_result="$LIBWEBP_INCLUDES" - -if test x"$libwebp_libraries_result" = x""; then - libwebp_libraries_result="in default path" -fi -if test x"$libwebp_includes_result" = x""; then - libwebp_includes_result="in default path" -fi - -if test "$libwebp_libraries_result" = "no"; then - libwebp_libraries_result="(none)" -fi -if test "$libwebp_includes_result" = "no"; then - libwebp_includes_result="(none)" -fi - -AC_MSG_RESULT([libraries $libwebp_libraries_result, headers $libwebp_includes_result]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "$LIBWEBP_INCLUDES" != "no" && test "$LIBWEBP_LIBS" != "no"; then - AC_DEFINE(HAVE_LIBWEBP,1,[Define if you have libwebp libraries and header files.]) - $1 -else - LIBWEBP_INCLUDES="" - LIBWEBP_LIBS="" - $2 -fi - -])dnl - diff --git a/m4/zlib.m4 b/m4/zlib.m4 deleted file mode 100644 index 0ec428ce..00000000 --- a/m4/zlib.m4 +++ /dev/null @@ -1,124 +0,0 @@ -dnl From FIND_MOTIF and ACX_PTHREAD, without much understanding -dnl -dnl FIND_ZLIB[ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]] -dnl ------------------------------------------------ -dnl -dnl Find zlib libraries and headers ... useful for platforms which are missing -dnl the zlib .pc file -dnl -dnl Put compile stuff in ZLIB_INCLUDES -dnl Put link stuff in ZLIB_LIBS -dnl Define HAVE_ZLIB if found -dnl -AC_DEFUN([FIND_ZLIB], [ -AC_REQUIRE([AC_PATH_XTRA]) - -ZLIB_INCLUDES="" -ZLIB_LIBS="" - -AC_ARG_WITH(zlib, - AS_HELP_STRING([--without-zlib], [build without zlib (default: test)])) -# Treat --without-zlib like --without-zlib-includes --without-zlib-libraries. -if test "$with_zlib" = "no"; then - ZLIB_INCLUDES=no - ZLIB_LIBS=no -fi - -AC_ARG_WITH(zlib-includes, - AS_HELP_STRING([--with-zlib-includes=DIR], [libz includes are in DIR]), - ZLIB_INCLUDES="-I$withval") -AC_ARG_WITH(zlib-libraries, - AS_HELP_STRING([--with-zlib-libraries=DIR], [libz libraries are in DIR]), - ZLIB_LIBS="-L$withval -lz") - -AC_MSG_CHECKING(for ZLIB) - -# Look for zlib.h -if test "$ZLIB_INCLUDES" = ""; then - # Check the standard search path - AC_TRY_COMPILE([#include - #include ],[int a;],[ - ZLIB_INCLUDES="" - ], [ - # zlib.h is not in the standard search path, try - # $prefix - zlib_save_CFLAGS="$CFLAGS" - - CFLAGS="-I${prefix}/include $CFLAGS" - - AC_TRY_COMPILE([#include - #include ],[int a;],[ - ZLIB_INCLUDES="-I${prefix}/include" - ], [ - ZLIB_INCLUDES="no" - ]) - - CFLAGS=$zlib_save_CFLAGS - ]) -fi - -# Now for the libraries -if test "$ZLIB_LIBS" = ""; then - zlib_save_LIBS="$LIBS" - zlib_save_CFLAGS="$CFLAGS" - - LIBS="-lz $LIBS" - CFLAGS="$ZLIB_INCLUDES $CFLAGS" - - # Try the standard search path first - AC_TRY_LINK([#include - #include - ],[z_stream zs;inflateInit2(&zs, 15 | 32)], [ - ZLIB_LIBS="-lz" - ], [ - # libz is not in the standard search path, try $prefix - - LIBS="-L${prefix}/lib $LIBS" - - AC_TRY_LINK([#include - #include - ],[z_stream zs;inflateInit2(&zs, 15 | 32)], [ - ZLIB_LIBS="-L${prefix}/lib -lz" - ], [ - ZLIB_LIBS=no - ]) - ]) - - LIBS="$zlib_save_LIBS" - CFLAGS="$zlib_save_CFLAGS" -fi - -AC_SUBST(ZLIB_LIBS) -AC_SUBST(ZLIB_INCLUDES) - -# Print a helpful message -zlib_libraries_result="$ZLIB_LIBS" -zlib_includes_result="$ZLIB_INCLUDES" - -if test x"$zlib_libraries_result" = x""; then - zlib_libraries_result="in default path" -fi -if test x"$zlib_includes_result" = x""; then - zlib_includes_result="in default path" -fi - -if test "$zlib_libraries_result" = "no"; then - zlib_libraries_result="(none)" -fi -if test "$zlib_includes_result" = "no"; then - zlib_includes_result="(none)" -fi - -AC_MSG_RESULT([libraries $zlib_libraries_result, headers $zlib_includes_result]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "$ZLIB_INCLUDES" != "no" && test "$ZLIB_LIBS" != "no"; then - AC_DEFINE(HAVE_ZLIB,1,[Define if you have zlib libraries and header files.]) - $1 -else - ZLIB_INCLUDES="" - ZLIB_LIBS="" - $2 -fi - -])dnl diff --git a/man/Makefile.am b/man/Makefile.am deleted file mode 100644 index 74915e18..00000000 --- a/man/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -man_MANS = \ - batch_crop.1 \ - batch_image_convert.1 \ - batch_rubber_sheet.1 \ - vipsedit.1 \ - vipsheader.1 \ - light_correct.1 \ - vips.1 \ - vipsprofile.1 \ - vipsthumbnail.1 - -EXTRA_DIST = ${man_MANS} meson.build diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index baa34047..00000000 --- a/test/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# don't run test_thumbnail.sh by default, it takes ages -TESTS = \ - test_connections.sh \ - test_descriptors.sh \ - test_cli.sh \ - test_formats.sh \ - test_seq.sh \ - test_stall.sh \ - test_threading.sh - -SUBDIRS = \ - test-suite - -noinst_PROGRAMS = \ - test_descriptors \ - test_connections - -test_descriptors_SOURCES = \ - test_descriptors.c - -test_connections_SOURCES = \ - test_connections.c - -AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ -AM_LDFLAGS = @LDFLAGS@ -LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ - -EXTRA_DIST = \ - meson.build \ - test_cli.sh \ - test_connections.sh \ - test_descriptors.sh \ - test_formats.sh \ - test_seq.sh \ - test_stall.sh \ - test_threading.sh \ - test_thumbnail.sh \ - variables.sh.in - -clean-local: - -rm -rf tmp-* - diff --git a/test/test-suite/Makefile.am b/test/test-suite/Makefile.am deleted file mode 100644 index aca7359c..00000000 --- a/test/test-suite/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -SUBDIRS = \ - helpers - -EXTRA_DIST = \ - images \ - conftest.py \ - __init__.py \ - test_arithmetic.py \ - test_colour.py \ - test_conversion.py \ - test_convolution.py \ - test_create.py \ - test_draw.py \ - test_foreign.py \ - test_histogram.py \ - test_iofuncs.py \ - test_morphology.py \ - test_resample.py \ - test_connection.py - - diff --git a/test/test-suite/helpers/Makefile.am b/test/test-suite/helpers/Makefile.am deleted file mode 100644 index 95362c26..00000000 --- a/test/test-suite/helpers/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_DIST = \ - helpers.py - - diff --git a/tools/Makefile.am b/tools/Makefile.am deleted file mode 100644 index 2f80bbf4..00000000 --- a/tools/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -bin_PROGRAMS = \ - vips \ - vipsedit \ - vipsthumbnail \ - vipsheader - -vips_SOURCES = vips.c -vipsedit_SOURCES = vipsedit.c -vipsheader_SOURCES = vipsheader.c -vipsthumbnail_SOURCES = vipsthumbnail.c - -AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ -AM_LDFLAGS = @LDFLAGS@ -LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ - -bin_SCRIPTS = \ - light_correct \ - shrink_width \ - batch_image_convert \ - batch_rubber_sheet \ - batch_crop \ - vipsprofile \ - vips-8.13 - -EXTRA_DIST = \ - batch_crop.in \ - batch_image_convert.in \ - batch_rubber_sheet.in \ - light_correct.in \ - meson.build \ - shrink_width.in \ - vips-8.13 \ - vipsprofile - -install-exec-hook: - chmod ugo+x ${DESTDIR}${bindir}/light_correct - chmod ugo+x ${DESTDIR}${bindir}/shrink_width - chmod ugo+x ${DESTDIR}${bindir}/batch_image_convert - chmod ugo+x ${DESTDIR}${bindir}/batch_rubber_sheet - chmod ugo+x ${DESTDIR}${bindir}/batch_crop - chmod ugo+x ${DESTDIR}${bindir}/vipsprofile - diff --git a/vips-cpp.pc.in b/vips-cpp.pc.in deleted file mode 100644 index 16453a4c..00000000 --- a/vips-cpp.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: vips-cpp -Description: C++ API for vips8 image processing library -Version: @VERSION@ -Requires: vips gobject-2.0 -Libs: -L${libdir} -lvips-cpp diff --git a/vips.pc.in b/vips.pc.in deleted file mode 100644 index ef8d62e8..00000000 --- a/vips.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: vips -Description: Image processing library -Version: @VERSION@ -Requires.private: @PACKAGES_USED@ -Requires: gobject-2.0 -Libs: -L${libdir} -lvips -Libs.private: @EXTRA_LIBS_USED@ -Cflags: -I${includedir} -