2007-08-29 18:23:50 +02:00
|
|
|
# Process this file with autoconf to produce a configure script.
|
2011-06-20 19:00:01 +02:00
|
|
|
|
|
|
|
# also update the version number in the m4 macros below
|
|
|
|
|
2017-12-23 13:39:50 +01:00
|
|
|
AC_INIT([vips], [8.7.0], [vipsip@jiscmail.ac.uk])
|
2011-06-20 19:00:01 +02:00
|
|
|
# required for gobject-introspection
|
|
|
|
AC_PREREQ(2.62)
|
|
|
|
|
2012-06-29 13:30:05 +02:00
|
|
|
# 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)
|
2014-04-20 11:16:34 +02:00
|
|
|
# subdir-objects lets us have dumy.cc in a subdir
|
|
|
|
AM_INIT_AUTOMAKE([-Wno-portability foreign subdir-objects])
|
2011-06-20 19:00:01 +02:00
|
|
|
|
2013-01-23 11:17:51 +01:00
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2012-01-11 16:00:37 +01:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2007-08-29 18:23:50 +02:00
|
|
|
|
|
|
|
# user-visible library versioning
|
2015-02-11 18:01:02 +01:00
|
|
|
m4_define([vips_major_version], [8])
|
2017-12-23 13:39:50 +01:00
|
|
|
m4_define([vips_minor_version], [7])
|
|
|
|
m4_define([vips_micro_version], [0])
|
2010-04-18 17:58:36 +02:00
|
|
|
m4_define([vips_version],
|
|
|
|
[vips_major_version.vips_minor_version.vips_micro_version])
|
|
|
|
|
2011-06-20 19:00:01 +02:00
|
|
|
VIPS_MAJOR_VERSION=vips_major_version()
|
|
|
|
VIPS_MINOR_VERSION=vips_minor_version()
|
|
|
|
VIPS_MICRO_VERSION=vips_micro_version()
|
2011-03-28 18:18:06 +02:00
|
|
|
VIPS_VERSION=vips_version()
|
2017-12-16 07:10:09 +01:00
|
|
|
VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog`
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2012-01-30 12:27:28 +01:00
|
|
|
# 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
|
2012-03-09 10:47:28 +01:00
|
|
|
# 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
|
2012-01-30 12:27:28 +01:00
|
|
|
|
2017-12-23 13:39:50 +01:00
|
|
|
LIBRARY_CURRENT=51
|
|
|
|
LIBRARY_REVISION=0
|
|
|
|
LIBRARY_AGE=9
|
2012-01-30 12:27:28 +01:00
|
|
|
|
|
|
|
# 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)
|
|
|
|
|
2011-12-24 18:36:55 +01:00
|
|
|
# init introspection support
|
2012-01-11 16:00:37 +01:00
|
|
|
GOBJECT_INTROSPECTION_CHECK([1.30.0])
|
2011-06-20 19:00:01 +02:00
|
|
|
|
|
|
|
# gir needs a list of source files to scan for introspection
|
2012-01-11 16:00:37 +01:00
|
|
|
#
|
2011-06-20 19:00:01 +02:00
|
|
|
# build with a glob and a list of files to exclude from scanning
|
2015-02-11 18:01:02 +01:00
|
|
|
# see also IGNORE_HFILES in doc/Makefile.am
|
2017-10-01 20:27:17 +02:00
|
|
|
introspection_sources=$(cd libvips ; find . -name "*.c"; find . -name "*.cpp")
|
|
|
|
filter_list="deprecated introspect.c dummy.c fuzz "
|
2011-06-20 19:00:01 +02:00
|
|
|
|
2014-06-27 14:11:57 +02:00
|
|
|
# contains(string, substring)
|
|
|
|
#
|
|
|
|
# Returns 0 if the specified string contains the specified substring,
|
|
|
|
# otherwise returns 1.
|
|
|
|
contains() {
|
|
|
|
string="$1"
|
|
|
|
substring="$2"
|
|
|
|
if test "${string#*$substring}" != "$string"; then
|
|
|
|
return 0 # $substring is in $string
|
|
|
|
else
|
|
|
|
return 1 # $substring is not in $string
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2011-06-20 19:00:01 +02:00
|
|
|
introspection_sources2=
|
|
|
|
for name in $introspection_sources; do
|
|
|
|
found=0
|
|
|
|
for filter in $filter_list; do
|
2014-06-27 14:11:57 +02:00
|
|
|
if contains $name ${filter}; then
|
2011-06-20 19:00:01 +02:00
|
|
|
found=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [[ $found -eq 0 ]]; then
|
|
|
|
introspection_sources2="$introspection_sources2 $name"
|
|
|
|
fi
|
|
|
|
done
|
2011-06-21 23:37:53 +02:00
|
|
|
vips_introspection_sources="$introspection_sources2"
|
|
|
|
|
|
|
|
# add headers that form the public vips8 API .. don't do a find and exclude,
|
|
|
|
# we end up excluding almost everything argh
|
2014-09-06 00:18:16 +02:00
|
|
|
headers="\
|
|
|
|
basic.h \
|
|
|
|
vips.h \
|
|
|
|
object.h \
|
|
|
|
image.h \
|
|
|
|
error.h \
|
|
|
|
foreign.h \
|
2017-09-30 23:24:53 +02:00
|
|
|
freqfilt.h \
|
2014-09-06 00:18:16 +02:00
|
|
|
interpolate.h \
|
|
|
|
header.h \
|
2017-09-30 23:45:43 +02:00
|
|
|
histogram.h \
|
2014-09-06 00:18:16 +02:00
|
|
|
operation.h \
|
2014-09-11 20:28:17 +02:00
|
|
|
enumtypes.h \
|
2014-09-06 00:18:16 +02:00
|
|
|
conversion.h \
|
2014-09-11 20:28:17 +02:00
|
|
|
arithmetic.h \
|
|
|
|
colour.h \
|
2014-09-06 00:18:16 +02:00
|
|
|
convolution.h \
|
2017-09-30 21:47:39 +02:00
|
|
|
create.h \
|
2014-09-06 00:18:16 +02:00
|
|
|
draw.h \
|
|
|
|
morphology.h \
|
2017-10-01 00:19:03 +02:00
|
|
|
mosaicing.h \
|
2014-09-11 20:28:17 +02:00
|
|
|
type.h \
|
2016-07-13 10:24:41 +02:00
|
|
|
rect.h \
|
2017-09-30 18:26:55 +02:00
|
|
|
resample.h \
|
2015-11-04 11:09:06 +01:00
|
|
|
memory.h \
|
2014-09-11 20:28:17 +02:00
|
|
|
region.h"
|
2014-09-06 00:18:16 +02:00
|
|
|
|
2011-06-21 23:37:53 +02:00
|
|
|
for name in $headers; do
|
|
|
|
vips_introspection_sources="$vips_introspection_sources include/vips/$name"
|
|
|
|
done
|
|
|
|
|
2011-06-20 19:00:01 +02:00
|
|
|
AC_SUBST(vips_introspection_sources)
|
2007-08-29 18:23:50 +02:00
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
2010-04-06 11:02:26 +02:00
|
|
|
AC_DEFINE_UNQUOTED(G_LOG_DOMAIN, "VIPS", [Domain for glib logging messages.])
|
|
|
|
|
2015-07-10 14:41:12 +02:00
|
|
|
m4_define([debug_default], [no])
|
2010-04-18 17:58:36 +02:00
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
|
|
|
|
[turn on debugging @<:@default=debug_default()@:>@]),,
|
|
|
|
enable_debug=debug_default())
|
|
|
|
|
|
|
|
if test "x$enable_debug" = "xyes"; then
|
|
|
|
VIPS_DEBUG_FLAGS="-DDEBUG_FATAL -DDEBUG_LEAK"
|
|
|
|
else
|
|
|
|
VIPS_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
|
|
|
|
|
|
|
|
if test "x$enable_debug" = "xno"; then
|
|
|
|
VIPS_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-07-25 19:06:52 +02:00
|
|
|
# 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
|
|
|
|
AM_CONDITIONAL(ENABLE_DEPRECATED, true)
|
|
|
|
else
|
|
|
|
AM_CONDITIONAL(ENABLE_DEPRECATED, false)
|
|
|
|
fi
|
|
|
|
|
|
|
|
# this gets pasted into version.h as a #define
|
|
|
|
AC_SUBST(VIPS_ENABLE_DEPRECATED)
|
|
|
|
|
2014-06-27 14:11:57 +02:00
|
|
|
# we are a C library with some optional C++ components inside it
|
2014-07-25 19:06:52 +02:00
|
|
|
|
|
|
|
# on most platforms, but not all, we just include -lstdc++ in the link line
|
|
|
|
# for programs
|
2014-06-27 14:11:57 +02:00
|
|
|
|
|
|
|
# we ought to write a proper configure test for this :(
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for needs -lstdc++])
|
|
|
|
case "$host_os" in
|
|
|
|
freebsd*)
|
|
|
|
vips_needs_stdcpp=no
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
vips_needs_stdcpp=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_MSG_RESULT([$vips_needs_stdcpp])
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
AC_MSG_CHECKING([for native Win32])
|
|
|
|
case "$host" in
|
|
|
|
*-*-mingw*)
|
|
|
|
vips_os_win32=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
vips_os_win32=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_MSG_RESULT([$vips_os_win32])
|
|
|
|
|
|
|
|
if test x"$vips_os_win32" = "xyes"; then
|
|
|
|
AC_DEFINE(OS_WIN32,1,[native win32])
|
|
|
|
|
|
|
|
# makes gcc use win native alignment
|
|
|
|
VIPS_CFLAGS="-mms-bitfields $VIPS_CFLAGS"
|
|
|
|
fi
|
|
|
|
|
2007-10-31 17:41:33 +01:00
|
|
|
# CImg needs flags changed on win32
|
|
|
|
if test x"$vips_os_win32" = "xyes"; then
|
|
|
|
AM_CONDITIONAL(OS_WIN32, true)
|
|
|
|
else
|
|
|
|
AM_CONDITIONAL(OS_WIN32, false)
|
|
|
|
fi
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# Cygwin/mingw need binary open to avoid CR/LF madness
|
|
|
|
# ... should be a better way to test for this
|
|
|
|
AC_MSG_CHECKING([for binary open needed])
|
|
|
|
case "$host_os" in
|
|
|
|
cygwin* | mingw*)
|
|
|
|
vips_binary_open=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
vips_binary_open=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_MSG_RESULT([$vips_binary_open])
|
|
|
|
if test x"$vips_binary_open" = "xyes"; then
|
|
|
|
AC_DEFINE(BINARY_OPEN,1,[define to open non-text files in binary mode])
|
|
|
|
fi
|
|
|
|
|
2010-03-08 19:24:44 +01:00
|
|
|
AC_MSG_CHECKING([for Mac OS X])
|
|
|
|
case "$host" in
|
|
|
|
*-*-darwin*)
|
|
|
|
vips_os_darwin=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
vips_os_darwin=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_MSG_RESULT([$vips_os_darwin])
|
|
|
|
|
|
|
|
if test x"$vips_os_darwin" = x"yes"; then
|
|
|
|
AC_DEFINE(VIPS_OS_DARWIN,1,[native Mac OS X])
|
|
|
|
fi
|
|
|
|
|
|
|
|
# set the default directory for ICC profiles
|
|
|
|
if test x"$vips_os_darwin" = x"yes"; then
|
|
|
|
profile_dir="/Library/ColorSync/Profiles"
|
|
|
|
elif test x"$vips_os_win32" = x"yes"; then
|
2016-08-16 19:33:48 +02:00
|
|
|
# need double escapes since this will get pasted into a #define in a C
|
2017-05-11 18:08:10 +02:00
|
|
|
# header ... the C:\Windows is usually overrwritten with the result of
|
|
|
|
# GetWindowsDirectoryW()
|
2016-08-16 19:33:48 +02:00
|
|
|
profile_dir="C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\color"
|
2010-03-08 19:24:44 +01:00
|
|
|
else
|
|
|
|
profile_dir="/usr/share/color/icc"
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED(VIPS_ICC_DIR,"$profile_dir",[default directory for ICC profiles])
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# we want largefile support, if possible
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_AWK
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CC_STDC
|
2010-09-01 13:16:57 +02:00
|
|
|
AC_PROG_CXX
|
2007-08-29 18:23:50 +02:00
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AM_WITH_DMALLOC
|
|
|
|
|
2008-08-05 17:46:16 +02:00
|
|
|
# we need a fully expanded version of $libdir
|
|
|
|
# without this we get something like
|
2011-03-28 18:18:06 +02:00
|
|
|
# define VIPS_LIBDIR ${exec_prefix}/lib
|
2008-08-05 17:46:16 +02:00
|
|
|
# argh
|
2016-05-18 03:56:20 +02:00
|
|
|
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
2008-08-05 17:46:16 +02:00
|
|
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
|
|
|
|
2011-08-09 13:45:42 +02:00
|
|
|
# set $expanded_value to the fully-expanded value of the argument
|
2008-08-05 17:46:16 +02:00
|
|
|
expand () {
|
|
|
|
eval expanded_value=$1
|
|
|
|
|
|
|
|
if test x"$expanded_value" != x"$1"; then
|
|
|
|
expand "$expanded_value"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
expand $libdir
|
2011-03-28 18:18:06 +02:00
|
|
|
VIPS_LIBDIR=$expanded_value
|
2008-08-05 17:46:16 +02:00
|
|
|
|
2011-06-15 15:42:49 +02:00
|
|
|
# this gets pasted into version.h as a #define
|
|
|
|
VIPS_EXEEXT=$EXEEXT
|
|
|
|
AC_SUBST(VIPS_EXEEXT)
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# vips.c/im_guess_prefix.c need to know the exe suffix and (as a fallback)
|
2008-05-16 15:18:04 +02:00
|
|
|
# the configure-time install prefix
|
2011-03-28 18:18:06 +02:00
|
|
|
AC_DEFINE_UNQUOTED(VIPS_PREFIX,"$prefix",[configure-time install prefix])
|
|
|
|
AC_DEFINE_UNQUOTED(VIPS_LIBDIR,"$VIPS_LIBDIR",[configure-time library directory])
|
2007-08-29 18:23:50 +02:00
|
|
|
|
|
|
|
# i18n
|
2013-04-16 15:30:28 +02:00
|
|
|
# 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
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
|
|
|
[The prefix for our gettext translation domains.])
|
2010-05-26 13:19:25 +02:00
|
|
|
# the 'malkovich' one is there for testing only, remove for release
|
|
|
|
#ALL_LINGUAS="en_GB de malkovich"
|
2010-05-24 12:05:59 +02:00
|
|
|
ALL_LINGUAS="en_GB de"
|
2007-08-29 18:23:50 +02:00
|
|
|
AM_GLIB_GNU_GETTEXT
|
|
|
|
|
2017-10-07 12:20:21 +02:00
|
|
|
# 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 gcc 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)
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# Checks for libraries.
|
|
|
|
|
|
|
|
# build list of pkg-config packages we used here
|
|
|
|
PACKAGES_USED=""
|
|
|
|
|
2014-11-29 15:32:08 +01:00
|
|
|
# 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=""
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS([errno.h math.h fcntl.h limits.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h sys/mman.h sys/types.h sys/stat.h unistd.h io.h direct.h windows.h])
|
|
|
|
|
|
|
|
# uncomment to change which libs we build
|
|
|
|
# AC_DISABLE_SHARED
|
|
|
|
# AC_DISABLE_STATIC
|
|
|
|
AC_LIBTOOL_WIN32_DLL
|
|
|
|
AC_CHECK_TOOL(DLLWRAP, dllwrap)
|
|
|
|
AC_CHECK_TOOL(DLLTOOL, dlltool)
|
|
|
|
AC_CHECK_TOOL(OBJDUMP, objdump)
|
|
|
|
AC_CHECK_TOOL(RANLIB, ranlib)
|
|
|
|
AC_CHECK_TOOL(STRIP, strip)
|
|
|
|
AC_CHECK_TOOL(AR, ar)
|
|
|
|
AC_CHECK_TOOL(AS, as)
|
|
|
|
AC_CHECK_TOOL(LD, ld)
|
2008-11-02 23:11:01 +01:00
|
|
|
AC_PROVIDE([AC_LIBTOOL_WIN32_DLL])
|
2007-08-29 18:23:50 +02:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
2017-10-02 10:22:06 +02:00
|
|
|
AC_C_RESTRICT
|
|
|
|
AX_GCC_VAR_ATTRIBUTE(vector_size)
|
2007-08-29 18:23:50 +02:00
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_MODE_T
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
2017-10-16 18:08:07 +02:00
|
|
|
# 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
|
2017-10-07 12:20:21 +02:00
|
|
|
AC_MSG_CHECKING([for gcc with working vector support])
|
2017-10-16 18:08:07 +02:00
|
|
|
if test x$GCC_VERSION_MAJOR != x"4" -a x$GCC_VERSION_MAJOR != x"5"; then
|
2017-10-07 12:20:21 +02:00
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
ax_cv_have_var_attribute_vector_size=no
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
|
2017-10-02 10:22:06 +02:00
|
|
|
# we need to be able to shuffle vectors in C++
|
|
|
|
if test x$ax_cv_have_var_attribute_vector_size = x"yes"; then
|
2017-10-02 10:36:07 +02:00
|
|
|
AC_MSG_CHECKING([for C++ vector shuffle])
|
|
|
|
AC_LANG_PUSH([C++])
|
2017-10-02 10:22:06 +02:00
|
|
|
AC_TRY_COMPILE([
|
|
|
|
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
|
|
|
|
],[
|
|
|
|
v4f f; f[3] = 99;
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
have_vector_shuffle=yes
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
have_vector_shuffle=no
|
|
|
|
])
|
2017-10-02 10:36:07 +02:00
|
|
|
AC_LANG_POP([C++])
|
2017-10-02 10:22:06 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2017-10-02 11:23:06 +02:00
|
|
|
# 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_TRY_COMPILE([
|
|
|
|
typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
|
|
|
|
],[
|
2017-10-06 18:34:14 +02:00
|
|
|
v4f f = {1, 2, 3, 4}; f *= 12.0;
|
|
|
|
v4f g = {5, 6, 7, 8}; f = g > 0 ? g : -1 * g;
|
2017-10-02 11:23:06 +02:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
have_vector_arith=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
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
AC_FUNC_VPRINTF
|
2011-11-10 15:10:24 +01:00
|
|
|
AC_CHECK_FUNCS([getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand sysconf atexit])
|
2007-08-29 18:23:50 +02:00
|
|
|
AC_CHECK_LIB(m,cbrt,[AC_DEFINE(HAVE_CBRT,1,[have cbrt() in libm.])])
|
2008-01-09 11:55:28 +01:00
|
|
|
AC_CHECK_LIB(m,hypot,[AC_DEFINE(HAVE_HYPOT,1,[have hypot() in libm.])])
|
2015-11-19 15:34:03 +01:00
|
|
|
AC_CHECK_LIB(m,atan2,[AC_DEFINE(HAVE_ATAN2,1,[have atan2() in libm.])])
|
2007-08-29 18:23:50 +02:00
|
|
|
|
|
|
|
# have to have these
|
2008-02-18 19:39:42 +01:00
|
|
|
# need glib 2.6 for GOption
|
2017-03-01 12:07:51 +01:00
|
|
|
PKG_CHECK_MODULES(REQUIRED, glib-2.0 >= 2.6 gmodule-2.0 gobject-2.0)
|
|
|
|
PACKAGES_USED="$PACKAGES_USED glib-2.0 gmodule-2.0 gobject-2.0"
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2017-03-15 10:15:21 +01:00
|
|
|
# from 2.14 we have g_option_context_get_help()
|
|
|
|
PKG_CHECK_MODULES(CONTEXT_GET_HELP, glib-2.0 >= 2.14,
|
|
|
|
[AC_DEFINE(HAVE_CONTEXT_GET_HELP,1,
|
|
|
|
[define if your glib has g_option_context_get_help().]
|
|
|
|
)
|
|
|
|
],
|
|
|
|
[:
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
# from 2.28 we have a monotonic timer
|
2016-05-18 11:41:05 +02:00
|
|
|
PKG_CHECK_MODULES(MONOTONIC, glib-2.0 >= 2.28,
|
|
|
|
[AC_DEFINE(HAVE_MONOTONIC_TIME,1,
|
|
|
|
[define if your glib has g_get_monotonic_time().]
|
|
|
|
)
|
|
|
|
],
|
|
|
|
[:
|
2013-11-18 19:31:49 +01:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2017-03-15 10:15:21 +01:00
|
|
|
# from 2.32 there are a new set of thread functions, annoyingly
|
2016-05-18 11:41:05 +02:00
|
|
|
PKG_CHECK_MODULES(THREADS, glib-2.0 >= 2.32,
|
|
|
|
[AC_DEFINE(HAVE_MUTEX_INIT,1,[define if your glib has g_mutex_init().])
|
|
|
|
AC_DEFINE(HAVE_COND_INIT,1,[define if your glib has g_cond_init().])
|
|
|
|
AC_DEFINE(HAVE_THREAD_NEW,1,[define if your glib has g_thread_new().])
|
|
|
|
AC_DEFINE(HAVE_PRIVATE_INIT,1,[define if your glib has G_PRIVATE_INIT().])
|
|
|
|
AC_DEFINE(HAVE_VALUE_GET_SCHAR,1,
|
|
|
|
[define if your glib has g_value_get_schar().]
|
|
|
|
)
|
|
|
|
],
|
|
|
|
[# the old threading system ... we need to link against gthread
|
|
|
|
PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
|
|
|
|
PACKAGES_USED="$PACKAGES_USED gthread-2.0"
|
2012-11-05 16:28:51 +01:00
|
|
|
]
|
|
|
|
)
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2017-03-15 10:15:21 +01:00
|
|
|
# from 2.36 the type system inits itself
|
2016-05-18 11:41:05 +02:00
|
|
|
PKG_CHECK_MODULES(TYPE_INIT, glib-2.0 < 2.36,
|
2016-06-09 10:36:37 +02:00
|
|
|
[AC_DEFINE(HAVE_TYPE_INIT,1,[define if your glib needs g_type_init().])
|
2016-05-18 11:41:05 +02:00
|
|
|
],
|
|
|
|
[:
|
2013-06-11 16:22:02 +02:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2017-03-15 10:15:21 +01:00
|
|
|
# from 2.40 we have g_win32_get_command_line() on win
|
2016-08-16 17:22:38 +02:00
|
|
|
PKG_CHECK_MODULES(TYPE_INIT, glib-2.0 >= 2.40,
|
|
|
|
[if test x"$vips_os_win32" = x"yes"; then
|
|
|
|
AC_DEFINE(HAVE_G_WIN32_GET_COMMAND_LINE,1,[define if your glib has g_win32_get_command_line().])
|
|
|
|
have_g_win32_get_command_line=yes
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[:
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2009-08-16 17:00:08 +02:00
|
|
|
# check for gtk-doc
|
2014-03-23 13:26:06 +01:00
|
|
|
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
|
2009-08-16 17:00:08 +02:00
|
|
|
|
2017-03-01 12:07:51 +01:00
|
|
|
# we need expat ... we'd love to use expat.pc, but sadly this is only available
|
|
|
|
# for recent linuxes, so we have to use the old and horrible expat.m4
|
|
|
|
AM_WITH_EXPAT
|
|
|
|
if test x$expat_found = xno; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# optional supporting libraries
|
|
|
|
|
2014-05-09 14:13:18 +02:00
|
|
|
AC_ARG_WITH([gsf],
|
|
|
|
AS_HELP_STRING([--without-gsf], [build without libgsf-1 (default: test)]))
|
|
|
|
|
2016-12-08 14:54:05 +01:00
|
|
|
# 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
|
2014-05-09 14:13:18 +02:00
|
|
|
if test x"$with_gsf" != "xno"; then
|
2016-12-08 14:54:05 +01:00
|
|
|
PKG_CHECK_MODULES(GSF, libgsf-1 >= 1.14.26,
|
2014-05-09 14:13:18 +02:00
|
|
|
[AC_DEFINE(HAVE_GSF,1,[define if you have libgsf-1 installed.])
|
|
|
|
with_gsf=yes
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED libgsf-1"
|
|
|
|
],
|
2014-05-09 14:13:18 +02:00
|
|
|
[AC_MSG_WARN([libgsf-1 not found; disabling dzsave support])
|
2016-05-18 11:41:05 +02:00
|
|
|
with_gsf=no
|
|
|
|
]
|
|
|
|
)
|
2016-06-09 10:36:37 +02:00
|
|
|
|
|
|
|
# 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.])
|
|
|
|
],
|
|
|
|
[:
|
|
|
|
]
|
|
|
|
)
|
2014-05-09 14:13:18 +02:00
|
|
|
fi
|
|
|
|
|
2012-01-28 12:27:16 +01:00
|
|
|
AC_ARG_WITH([fftw],
|
|
|
|
AS_HELP_STRING([--without-fftw], [build without fftw (default: test)]))
|
|
|
|
|
|
|
|
if test x"$with_fftw" != "xno"; then
|
|
|
|
PKG_CHECK_MODULES(FFTW, fftw3,
|
|
|
|
[AC_DEFINE(HAVE_FFTW,1,[define if you have fftw3 installed.])
|
|
|
|
with_fftw=yes
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED fftw3"
|
|
|
|
],
|
2012-01-28 12:27:16 +01:00
|
|
|
[AC_MSG_WARN([fftw not found; disabling fftw support])
|
2016-05-18 11:41:05 +02:00
|
|
|
with_fftw=no
|
|
|
|
]
|
|
|
|
)
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
# ImageMagick
|
2008-07-10 12:14:31 +02:00
|
|
|
AC_ARG_WITH([magick],
|
|
|
|
AS_HELP_STRING([--without-magick], [build without libMagic (default: test)]))
|
2017-12-23 17:57:36 +01:00
|
|
|
|
2008-07-10 12:14:31 +02:00
|
|
|
AC_ARG_WITH([magickpackage],
|
|
|
|
AS_HELP_STRING([--with-magickpackage],
|
2016-07-08 11:45:29 +02:00
|
|
|
[magickpackage to use (default: MagickCore; try GraphicsMagick to build against gm instead)]))
|
2008-07-10 12:14:31 +02:00
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
# set the default magick package ... very old imagemagicks called it
|
|
|
|
# ImageMagick
|
2008-04-12 16:37:05 +02:00
|
|
|
if test x"$with_magickpackage" = "x"; then
|
2016-07-08 11:45:29 +02:00
|
|
|
PKG_CHECK_MODULES(MAGICK_WAND, MagickCore,
|
|
|
|
[with_magickpackage=MagickCore
|
2016-05-18 11:41:05 +02:00
|
|
|
],
|
2008-07-10 12:14:31 +02:00
|
|
|
[PKG_CHECK_MODULES(IMAGE_MAGICK, ImageMagick,
|
2016-05-18 11:41:05 +02:00
|
|
|
[with_magickpackage=ImageMagick
|
|
|
|
],
|
2016-07-08 11:45:29 +02:00
|
|
|
[AC_MSG_WARN([neither MagickCore nor ImageMagick found; disabling Magick support])
|
2016-05-18 11:41:05 +02:00
|
|
|
with_magick=no
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
2008-02-21 17:10:24 +01:00
|
|
|
fi
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
# we have a separate loader for magick7 with fewer ifdef
|
|
|
|
# options; only test for features on the magick6 case
|
|
|
|
|
2017-12-23 17:57:36 +01:00
|
|
|
magick_version=
|
2016-05-18 11:41:05 +02:00
|
|
|
if test x"$with_magick" != x"no"; then
|
2016-07-08 11:45:29 +02:00
|
|
|
PKG_CHECK_MODULES(MAGICK, $with_magickpackage >= 7.0,
|
|
|
|
[AC_DEFINE(HAVE_MAGICK7,1,[define if you have libMagick7 installed.])
|
2017-12-23 17:57:36 +01:00
|
|
|
with_magick=yes
|
2016-07-08 11:45:29 +02:00
|
|
|
magick7=yes
|
2017-12-23 17:57:36 +01:00
|
|
|
magick_version=magick7
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED $with_magickpackage"
|
|
|
|
],
|
2016-07-08 11:45:29 +02:00
|
|
|
[PKG_CHECK_MODULES(MAGICK, $with_magickpackage,
|
2017-12-23 18:13:44 +01:00
|
|
|
[AC_DEFINE(HAVE_MAGICK6,1,[define if you have libMagick6 installed.])
|
2017-12-23 17:57:36 +01:00
|
|
|
with_magick=yes
|
2016-07-08 11:45:29 +02:00
|
|
|
magick6=yes
|
2017-12-23 17:57:36 +01:00
|
|
|
magick_version=magick6
|
2016-07-08 11:45:29 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED $with_magickpackage"
|
|
|
|
],
|
|
|
|
[AC_MSG_WARN([$with_magickpackage not found; disabling Magick support])
|
|
|
|
with_magick=no
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
2016-05-18 11:41:05 +02:00
|
|
|
)
|
2018-01-24 10:28:02 +01:00
|
|
|
else
|
|
|
|
with_magick=no
|
|
|
|
magick6=no
|
|
|
|
magick_version=none
|
|
|
|
with_magickpackage=none
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
if test x"$magick6" = x"yes"; then
|
2010-04-30 21:16:39 +02:00
|
|
|
# we SetImageOption to disable some DICOM read processing, but that's only
|
|
|
|
# in more recent imagemagicks and not in graphicsmagick
|
2016-04-26 11:41:04 +02:00
|
|
|
save_LIBS="$LIBS"
|
2007-08-29 18:23:50 +02:00
|
|
|
LIBS="$LIBS $MAGICK_LIBS"
|
2010-04-30 21:16:39 +02:00
|
|
|
AC_CHECK_FUNCS(SetImageOption,
|
2016-05-18 11:41:05 +02:00
|
|
|
AC_DEFINE(HAVE_SETIMAGEOPTION,1,[define if your magick has SetImageOption.])
|
|
|
|
)
|
2016-04-26 11:41:04 +02:00
|
|
|
LIBS="$save_LIBS"
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
if test x"$magick6" = x"yes"; then
|
2010-04-30 21:16:39 +02:00
|
|
|
# newer ImageMagicks use MagickCoreGenesis instead of InitializeMagick argh
|
2016-04-26 11:41:04 +02:00
|
|
|
save_LIBS="$LIBS"
|
2009-08-03 15:17:03 +02:00
|
|
|
LIBS="$LIBS $MAGICK_LIBS"
|
2010-04-30 21:16:39 +02:00
|
|
|
AC_CHECK_FUNCS(MagickCoreGenesis,
|
|
|
|
AC_DEFINE(HAVE_MAGICKCOREGENESIS,1,
|
|
|
|
[define if your magick has MagickCoreGenesis.]))
|
2016-04-26 11:41:04 +02:00
|
|
|
LIBS="$save_LIBS"
|
2010-04-30 21:16:39 +02:00
|
|
|
fi
|
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
if test x"$magick6" = x"yes"; then
|
2010-04-30 21:16:39 +02:00
|
|
|
# newer ImageMagicks use ResetImagePropertyIterator instead of
|
|
|
|
# ResetImageAttributeIterator argh
|
2016-04-26 11:41:04 +02:00
|
|
|
save_LIBS="$LIBS"
|
2010-04-30 21:16:39 +02:00
|
|
|
LIBS="$LIBS $MAGICK_LIBS"
|
|
|
|
AC_CHECK_FUNCS(ResetImagePropertyIterator,
|
|
|
|
AC_DEFINE(HAVE_RESETIMAGEPROPERTYITERATOR,1,
|
|
|
|
[define if your magick has ResetImagePropertyIterator.]))
|
2016-04-26 11:41:04 +02:00
|
|
|
LIBS="$save_LIBS"
|
2010-04-30 21:16:39 +02:00
|
|
|
fi
|
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
if test x"$magick6" = x"yes"; then
|
2010-04-30 21:16:39 +02:00
|
|
|
# so ... do we have ResetImageAttributeIterator()? GM does not
|
2016-04-26 11:41:04 +02:00
|
|
|
save_LIBS="$LIBS"
|
2010-04-30 21:16:39 +02:00
|
|
|
LIBS="$LIBS $MAGICK_LIBS"
|
|
|
|
AC_CHECK_FUNCS(ResetImageAttributeIterator,
|
|
|
|
AC_DEFINE(HAVE_RESETIMAGEATTRIBUTEITERATOR,1,
|
|
|
|
[define if your magick has ResetImageAttributeIterator.]))
|
2016-04-26 11:41:04 +02:00
|
|
|
LIBS="$save_LIBS"
|
2010-04-30 21:16:39 +02:00
|
|
|
fi
|
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
if test x"$magick6" = x"yes"; then
|
2010-04-30 21:16:39 +02:00
|
|
|
# more recent magicks have GetVirtualPixels rather than GetImagePixels
|
2016-04-26 11:41:04 +02:00
|
|
|
save_LIBS="$LIBS"
|
2010-04-30 21:16:39 +02:00
|
|
|
LIBS="$LIBS $MAGICK_LIBS"
|
|
|
|
AC_CHECK_FUNCS(GetVirtualPixels,
|
|
|
|
AC_DEFINE(HAVE_GETVIRTUALPIXELS,1,
|
|
|
|
[define if your magick has GetVirtualPixels.]))
|
2016-04-26 11:41:04 +02:00
|
|
|
LIBS="$save_LIBS"
|
2009-08-03 15:17:03 +02:00
|
|
|
fi
|
|
|
|
|
2016-07-08 11:45:29 +02:00
|
|
|
if test x"$magick6" = x"yes"; then
|
2016-04-18 16:21:11 +02:00
|
|
|
# do we have number_scenes in image_info ... imagemagick uses this, gm
|
|
|
|
# still uses subrange
|
2016-04-26 11:41:04 +02:00
|
|
|
save_CFLAGS="$CFLAGS"
|
2016-04-18 16:21:11 +02:00
|
|
|
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 <magick/api.h>])
|
2016-04-26 11:41:04 +02:00
|
|
|
CFLAGS="$save_CFLAGS"
|
2016-04-18 16:21:11 +02:00
|
|
|
fi
|
|
|
|
|
2017-12-23 17:57:36 +01:00
|
|
|
# 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)]))
|
2018-01-24 10:28:02 +01:00
|
|
|
|
|
|
|
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
|
2017-12-23 17:57:36 +01:00
|
|
|
AC_DEFINE(ENABLE_MAGICKSAVE,1,[define to enable save with libMagick])
|
|
|
|
enable_magicksave=yes
|
2018-01-24 10:28:02 +01:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
enable_magickload=no
|
|
|
|
enable_magicksave=no
|
2017-12-23 17:57:36 +01:00
|
|
|
fi
|
|
|
|
|
2010-11-01 18:46:47 +01:00
|
|
|
# orc
|
|
|
|
AC_ARG_WITH([orc],
|
|
|
|
AS_HELP_STRING([--without-orc], [build without orc (default: test)]))
|
|
|
|
|
|
|
|
if test x"$with_orc" != "xno"; 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
|
2015-12-08 16:33:57 +01:00
|
|
|
PACKAGES_USED="$PACKAGES_USED orc-0.4"
|
2016-04-26 11:41:04 +02:00
|
|
|
save_LIBS="$LIBS"
|
2015-12-08 16:33:57 +01:00
|
|
|
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.]))
|
2016-04-26 11:41:04 +02:00
|
|
|
LIBS="$save_LIBS"
|
2015-12-08 16:33:57 +01:00
|
|
|
],
|
2010-11-01 18:46:47 +01:00
|
|
|
[AC_MSG_WARN([orc-0.4.11 or later not found; disabling orc support])
|
|
|
|
with_orc=no
|
2016-05-18 11:41:05 +02:00
|
|
|
]
|
|
|
|
)
|
2010-11-01 18:46:47 +01:00
|
|
|
fi
|
|
|
|
|
2017-08-02 14:39:28 +02:00
|
|
|
# lcms ... refuse to use lcms1
|
2008-07-10 12:14:31 +02:00
|
|
|
AC_ARG_WITH([lcms],
|
|
|
|
AS_HELP_STRING([--without-lcms], [build without lcms (default: test)]))
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2007-10-31 17:41:33 +01:00
|
|
|
if test x"$with_lcms" != "xno"; then
|
2010-08-02 17:58:30 +02:00
|
|
|
PKG_CHECK_MODULES(LCMS, lcms2,
|
|
|
|
[AC_DEFINE(HAVE_LCMS2,1,[define if you have lcms2 installed.])
|
2012-07-13 13:56:08 +02:00
|
|
|
with_lcms="yes (lcms2)"
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED lcms2"
|
|
|
|
],
|
2017-08-02 14:39:28 +02:00
|
|
|
[AC_MSG_WARN([lcms2 not found; disabling ICC profile support])
|
|
|
|
with_lcms=no
|
2016-05-18 11:41:05 +02:00
|
|
|
]
|
|
|
|
)
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# OpenEXR
|
2008-07-10 12:14:31 +02:00
|
|
|
AC_ARG_WITH([OpenEXR],
|
|
|
|
AS_HELP_STRING([--without-OpenEXR], [build without OpenEXR (default: test)]))
|
2007-08-29 18:23:50 +02:00
|
|
|
|
|
|
|
# require 1.2.2 since 1.2.1 has a broken ImfCloseTiledInputFile()
|
2007-10-31 17:41:33 +01:00
|
|
|
if test x"$with_OpenEXR" != "xno"; then
|
2007-08-29 18:23:50 +02:00
|
|
|
PKG_CHECK_MODULES(OPENEXR, OpenEXR >= 1.2.2,
|
|
|
|
[AC_DEFINE(HAVE_OPENEXR,1,[define if you have OpenEXR >=1.2.2 installed.])
|
2008-06-19 18:38:31 +02:00
|
|
|
with_OpenEXR=yes
|
2016-02-08 00:33:43 +01:00
|
|
|
PACKAGES_USED="$PACKAGES_USED OpenEXR"
|
|
|
|
],
|
2008-06-19 18:38:31 +02:00
|
|
|
[AC_MSG_WARN([OpenEXR not found; disabling OpenEXR support])
|
|
|
|
with_OpenEXR=no
|
2016-02-08 00:33:43 +01:00
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
# poppler
|
|
|
|
AC_ARG_WITH([poppler],
|
|
|
|
AS_HELP_STRING([--without-poppler], [build without poppler (default: test)]))
|
|
|
|
|
|
|
|
if test x"$with_poppler" != x"no"; then
|
2016-05-08 22:39:08 +02:00
|
|
|
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.])
|
2016-02-08 00:33:43 +01:00
|
|
|
with_poppler=yes
|
|
|
|
PACKAGES_USED="$PACKAGES_USED poppler-glib cairo"
|
|
|
|
],
|
2016-05-08 22:39:08 +02:00
|
|
|
[AC_MSG_WARN([poppler-glib >= 0.16.0 or cairo >= 1.2 not found; disabling PDF load via poppler])
|
2016-02-08 00:33:43 +01:00
|
|
|
with_poppler=no
|
|
|
|
]
|
|
|
|
)
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
2016-02-09 12:01:12 +01:00
|
|
|
# librsvg
|
|
|
|
AC_ARG_WITH([rsvg],
|
|
|
|
AS_HELP_STRING([--without-rsvg], [build without rsvg (default: test)]))
|
|
|
|
|
|
|
|
if test x"$with_rsvg" != x"no"; then
|
2016-05-27 00:55:32 +02:00
|
|
|
PKG_CHECK_MODULES(RSVG, [librsvg-2.0 >= 2.34 cairo >= 1.2],
|
|
|
|
[AC_DEFINE(HAVE_RSVG,1,[define if you have librsvg-2.0 >= 2.34.0 and cairo >= 1.2 installed.])
|
2016-02-09 12:01:12 +01:00
|
|
|
with_rsvg=yes
|
|
|
|
PACKAGES_USED="$PACKAGES_USED librsvg-2.0 cairo"
|
|
|
|
],
|
2016-05-27 00:55:32 +02:00
|
|
|
[AC_MSG_WARN([librsvg-2.0 >= 2.34.0 or cairo >= 1.2 not found; disabling SVG load via rsvg])
|
2016-02-09 12:01:12 +01:00
|
|
|
with_rsvg=no
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2016-06-27 03:03:45 +02:00
|
|
|
# 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" != "xno"; 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
|
|
|
|
|
2011-11-27 04:18:46 +01:00
|
|
|
# OpenSlide
|
|
|
|
AC_ARG_WITH([openslide],
|
2016-02-08 00:33:43 +01:00
|
|
|
AS_HELP_STRING([--without-openslide],
|
|
|
|
[build without OpenSlide (default: test)])
|
|
|
|
)
|
2011-11-27 04:18:46 +01:00
|
|
|
|
2011-12-24 18:36:55 +01:00
|
|
|
if test x"$with_openslide" != x"no"; then
|
2014-01-25 08:56:27 +01:00
|
|
|
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.])
|
2011-11-27 04:18:46 +01:00
|
|
|
with_openslide=yes
|
2016-02-08 00:33:43 +01:00
|
|
|
PACKAGES_USED="$PACKAGES_USED openslide"
|
|
|
|
],
|
2014-01-25 08:56:27 +01:00
|
|
|
[AC_MSG_NOTICE([OpenSlide >= 3.4.0 not found; checking for >= 3.3.0])
|
|
|
|
PKG_CHECK_MODULES(OPENSLIDE, [openslide >= 3.3.0],
|
2016-02-08 00:33:43 +01:00
|
|
|
[AC_DEFINE(HAVE_OPENSLIDE,1,[define if you have OpenSlide >= 3.3.0 installed.])
|
|
|
|
with_openslide=yes
|
|
|
|
PACKAGES_USED="$PACKAGES_USED openslide"
|
|
|
|
],
|
|
|
|
[AC_MSG_WARN([OpenSlide >= 3.3.0 not found; disabling virtual slide support])
|
|
|
|
with_openslide=no
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
2011-11-27 04:18:46 +01:00
|
|
|
fi
|
|
|
|
|
2009-02-27 17:52:25 +01:00
|
|
|
# matio
|
|
|
|
AC_ARG_WITH([matio],
|
|
|
|
AS_HELP_STRING([--without-matio], [build without matio (default: test)]))
|
|
|
|
|
|
|
|
if test x"$with_matio" != "xno"; then
|
|
|
|
PKG_CHECK_MODULES(MATIO, matio,
|
|
|
|
[AC_DEFINE(HAVE_MATIO,1,[define if you have matio installed.])
|
|
|
|
with_matio=yes
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED matio"
|
|
|
|
],
|
2009-02-27 17:52:25 +01:00
|
|
|
[AC_MSG_WARN([matio not found; disabling matio support])
|
|
|
|
with_matio=no
|
2016-05-18 11:41:05 +02:00
|
|
|
]
|
|
|
|
)
|
2009-02-27 17:52:25 +01:00
|
|
|
fi
|
|
|
|
|
2016-03-12 17:48:27 +01:00
|
|
|
# not external libraries, but have options to disable them, helps to
|
|
|
|
# reduce attack surface
|
|
|
|
|
|
|
|
AC_ARG_WITH([ppm],
|
|
|
|
AS_HELP_STRING([--without-ppm], [build without ppm (default: with)]))
|
|
|
|
|
|
|
|
if test x"$with_ppm" != "xno"; 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" != "xno"; 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" != "xno"; then
|
|
|
|
AC_DEFINE(HAVE_RADIANCE,1,[define to build radiance support.])
|
|
|
|
with_radiance=yes
|
|
|
|
fi
|
|
|
|
|
2010-10-26 17:12:49 +02:00
|
|
|
# cfitsio
|
|
|
|
AC_ARG_WITH([cfitsio],
|
|
|
|
AS_HELP_STRING([--without-cfitsio], [build without cfitsio (default: test)]))
|
|
|
|
|
|
|
|
if test x"$with_cfitsio" != "xno"; then
|
|
|
|
PKG_CHECK_MODULES(CFITSIO, cfitsio,
|
|
|
|
[AC_DEFINE(HAVE_CFITSIO,1,[define if you have cfitsio installed.])
|
|
|
|
with_cfitsio=yes
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED cfitsio"
|
|
|
|
],
|
2010-10-26 17:12:49 +02:00
|
|
|
[AC_MSG_WARN([cfitsio not found; disabling cfitsio support])
|
|
|
|
with_cfitsio=no
|
2016-05-18 11:41:05 +02:00
|
|
|
]
|
|
|
|
)
|
2010-10-26 17:12:49 +02:00
|
|
|
fi
|
|
|
|
|
2013-08-06 11:01:50 +02:00
|
|
|
# libwebp
|
2016-05-09 10:51:05 +02:00
|
|
|
# some platforms, like ubuntu 12.04, are missing the .pc files for libwebp, so
|
|
|
|
# we fall back to FIND_LIBWEBP
|
2013-08-06 11:01:50 +02:00
|
|
|
AC_ARG_WITH([libwebp],
|
|
|
|
AS_HELP_STRING([--without-libwebp], [build without libwebp (default: test)]))
|
|
|
|
|
|
|
|
if test x"$with_libwebp" != "xno"; then
|
2016-11-08 18:08:41 +01:00
|
|
|
PKG_CHECK_MODULES(LIBWEBP, libwebp >= 0.1.3,
|
2013-08-06 11:01:50 +02:00
|
|
|
[AC_DEFINE(HAVE_LIBWEBP,1,[define if you have libwebp installed.])
|
|
|
|
with_libwebp=yes
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED libwebp"
|
|
|
|
],
|
|
|
|
[FIND_LIBWEBP(
|
|
|
|
[with_libwebp="yes (found by search)"
|
|
|
|
],
|
|
|
|
[AC_MSG_WARN([libwebp not found; disabling WEBP support])
|
|
|
|
with_libwebp=no
|
|
|
|
]
|
|
|
|
)
|
2016-05-09 10:51:05 +02:00
|
|
|
]
|
|
|
|
)
|
2013-08-06 11:01:50 +02:00
|
|
|
fi
|
|
|
|
|
2016-11-07 11:01:59 +01:00
|
|
|
# webp has the stuff for pulling out ICC profile etc in a separate library
|
2016-11-10 10:20:54 +01:00
|
|
|
#
|
|
|
|
# we can build with libwebpmux back to 0.3, but it's not until libwebp 0.5 that
|
|
|
|
# we can read that metadata back successfully ... insist on 0.5 so that tests
|
|
|
|
# can work smoothly
|
2016-11-07 11:01:59 +01:00
|
|
|
if test x"$with_libwebp" != "xno"; then
|
2016-11-10 10:20:54 +01:00
|
|
|
PKG_CHECK_MODULES(LIBWEBPMUX, libwebpmux >= 0.5.0,
|
2016-11-07 11:01:59 +01:00
|
|
|
[AC_DEFINE(HAVE_LIBWEBPMUX,1,[define if you have libwebpmux installed.])
|
|
|
|
with_libwebpmux=yes
|
|
|
|
PACKAGES_USED="$PACKAGES_USED libwebpmux"
|
|
|
|
],
|
|
|
|
[AC_MSG_WARN([libwebpmux not found; disabling webp metadata support])
|
|
|
|
with_libwebpmux=no
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# pangoft2
|
2008-07-10 12:14:31 +02:00
|
|
|
AC_ARG_WITH([pangoft2],
|
|
|
|
AS_HELP_STRING([--without-pangoft2],
|
|
|
|
[build without pangoft2 (default: test)]))
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2007-10-31 17:41:33 +01:00
|
|
|
if test x"$with_pangoft2" != "xno"; then
|
2007-08-29 18:23:50 +02:00
|
|
|
PKG_CHECK_MODULES(PANGOFT2, pangoft2,
|
|
|
|
[AC_DEFINE(HAVE_PANGOFT2,1,[define if you have pangoft2 installed.])
|
2008-06-19 18:38:31 +02:00
|
|
|
with_pangoft2=yes
|
2014-12-18 10:15:58 +01:00
|
|
|
PACKAGES_USED="$PACKAGES_USED pangoft2"
|
|
|
|
],
|
2008-06-19 18:38:31 +02:00
|
|
|
[AC_MSG_WARN([pangoft2 not found; disabling pangoft2 support])
|
|
|
|
with_pangoft2=no
|
2016-05-18 11:41:05 +02:00
|
|
|
]
|
|
|
|
)
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
2014-12-18 10:15:58 +01:00
|
|
|
# install vips8 python
|
2015-01-12 14:03:51 +01:00
|
|
|
AC_ARG_ENABLE([pyvips8],
|
|
|
|
AS_HELP_STRING([--enable-pyvips8],
|
2017-09-13 19:24:32 +02:00
|
|
|
[install vips8 Python overrides (default: no)]),
|
2016-05-18 11:41:05 +02:00
|
|
|
[enable_pyvips8=$enableval
|
|
|
|
],
|
2017-09-13 19:24:32 +02:00
|
|
|
[enable_pyvips8="no (default)"
|
2016-05-18 11:41:05 +02:00
|
|
|
]
|
|
|
|
)
|
2015-01-12 14:03:51 +01:00
|
|
|
|
|
|
|
if test "x$enable_pyvips8" = "xauto"; then
|
2016-10-24 18:57:21 +02:00
|
|
|
PKG_CHECK_EXISTS([pygobject-3.0 >= 3.13.0],
|
2016-05-18 11:41:05 +02:00
|
|
|
[enable_pyvips8=yes
|
|
|
|
],
|
2014-12-22 11:35:26 +01:00
|
|
|
[AC_MSG_WARN([pygobject-3.0 not found; disabling vips8 python support])
|
2015-01-12 14:03:51 +01:00
|
|
|
enable_pyvips8=no
|
2015-02-06 15:54:52 +01:00
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x"$enable_pyvips8" = x"yes"; then
|
2016-05-18 00:37:51 +02:00
|
|
|
JD_PATH_PYTHON(2.7,,
|
2015-02-06 15:54:52 +01:00
|
|
|
[enable_pyvips8=no
|
2016-05-18 11:41:05 +02:00
|
|
|
AC_MSG_WARN([Python not found; disabling vips8 Python binding])
|
|
|
|
]
|
2015-02-06 15:54:52 +01:00
|
|
|
)
|
2014-12-18 10:15:58 +01:00
|
|
|
fi
|
|
|
|
|
2015-02-06 15:54:52 +01:00
|
|
|
if test x"$enable_pyvips8" = x"yes"; then
|
2016-10-24 18:57:21 +02:00
|
|
|
PKG_CHECK_MODULES(PYGOBJECT, [pygobject-3.0 >= 3.13.0])
|
2014-12-18 10:15:58 +01:00
|
|
|
fi
|
|
|
|
|
2015-02-06 15:54:52 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_PYVIPS8, test x"$enable_pyvips8" = x"yes")
|
2015-01-12 14:03:51 +01:00
|
|
|
|
2012-05-06 12:55:59 +02:00
|
|
|
# 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" != "xno"; then
|
|
|
|
PKG_CHECK_MODULES(TIFF, libtiff-4,
|
|
|
|
[AC_DEFINE(HAVE_TIFF,1,[define if you have libtiff installed.])
|
2012-07-13 13:56:08 +02:00
|
|
|
with_tiff="yes (pkg-config libtiff-4)"
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED libtiff-4"
|
|
|
|
],
|
2012-06-20 12:57:03 +02:00
|
|
|
[FIND_TIFF(
|
2016-05-18 11:41:05 +02:00
|
|
|
with_tiff="yes (found by search)",
|
|
|
|
[AC_MSG_WARN([libtiff not found; disabling TIFF support])
|
|
|
|
with_tiff=no
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
2012-05-06 12:55:59 +02:00
|
|
|
fi
|
|
|
|
|
2016-02-11 09:35:29 +01:00
|
|
|
# giflib
|
2016-05-18 11:41:05 +02:00
|
|
|
FIND_GIFLIB(
|
|
|
|
[with_giflib="yes (found by search)"
|
|
|
|
],
|
|
|
|
[AC_MSG_WARN([giflib not found; disabling direct GIF support])
|
|
|
|
with_giflib=no
|
|
|
|
]
|
|
|
|
)
|
2016-02-11 09:35:29 +01:00
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# look for PNG with pkg-config ... fall back to our tester
|
2008-07-10 12:14:31 +02:00
|
|
|
AC_ARG_WITH([png],
|
|
|
|
AS_HELP_STRING([--without-png], [build without libpng (default: test)]))
|
2008-06-19 18:38:31 +02:00
|
|
|
|
|
|
|
if test x"$with_png" != "xno"; then
|
2011-03-20 12:28:17 +01:00
|
|
|
PKG_CHECK_MODULES(PNG, libpng >= 1.2.9,
|
2008-06-19 18:38:31 +02:00
|
|
|
[AC_DEFINE(HAVE_PNG,1,[define if you have libpng installed.])
|
2012-07-13 13:56:08 +02:00
|
|
|
with_png="yes (pkg-config libpng >= 1.2.9)"
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED libpng"
|
|
|
|
],
|
2012-06-20 12:57:03 +02:00
|
|
|
[FIND_PNG(
|
2016-05-18 11:41:05 +02:00
|
|
|
[with_png="yes (found by search)"
|
|
|
|
],
|
|
|
|
[AC_MSG_WARN([libpng not found; disabling PNG support])
|
|
|
|
with_png=no
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
2008-06-19 18:38:31 +02:00
|
|
|
fi
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2018-02-12 14:31:49 +01:00
|
|
|
# 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,
|
2018-02-22 17:34:01 +01:00
|
|
|
[AC_DEFINE(HAVE_JPEG,1,[define if you have libjpeg installed.])
|
|
|
|
with_jpeg="yes (pkg-config)"
|
2018-02-12 14:31:49 +01:00
|
|
|
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
|
2011-12-19 22:40:08 +01:00
|
|
|
|
2018-02-12 14:31:49 +01:00
|
|
|
# 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
|
2016-04-26 11:41:04 +02:00
|
|
|
if test x"$with_jpeg" != "xno"; then
|
|
|
|
save_LIBS="$LIBS"
|
2018-02-12 14:31:49 +01:00
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
|
LIBS="$JPEG_LIBS $LIBS"
|
|
|
|
CFLAGS="$JPEG_INCLUDES $CFLAGS"
|
2016-04-26 11:41:04 +02:00
|
|
|
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"
|
2018-02-12 14:31:49 +01:00
|
|
|
CFLAGS="$save_CFLAGS"
|
2015-04-12 13:00:05 +02:00
|
|
|
fi
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
# libexif
|
2008-07-10 12:14:31 +02:00
|
|
|
AC_ARG_WITH([libexif],
|
|
|
|
AS_HELP_STRING([--without-libexif], [build without libexif (default: test)]))
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2007-10-31 17:41:33 +01:00
|
|
|
if test x"$with_libexif" != "xno"; then
|
2007-08-29 18:23:50 +02:00
|
|
|
PKG_CHECK_MODULES(EXIF, libexif >= 0.6,
|
|
|
|
[AC_DEFINE(HAVE_EXIF,1,[define if you have libexif >= 0.6 installed.])
|
2008-06-19 18:38:31 +02:00
|
|
|
with_libexif=yes
|
2016-05-18 11:41:05 +02:00
|
|
|
PACKAGES_USED="$PACKAGES_USED libexif"
|
|
|
|
],
|
2007-08-29 18:23:50 +02:00
|
|
|
[AC_MSG_WARN([libexif >= 0.6 not found; disabling exif support])
|
2008-06-19 18:38:31 +02:00
|
|
|
with_libexif=no
|
2016-05-18 11:41:05 +02:00
|
|
|
]
|
|
|
|
)
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# some libexif packages need include <libexif/poop.h>, some just <poop.h>
|
|
|
|
# how annoying
|
2007-10-31 17:41:33 +01:00
|
|
|
if test x"$with_libexif" != "xno"; then
|
2007-08-29 18:23:50 +02:00
|
|
|
# cppflags not cflags because we want the preproc to see the -I as well
|
2016-04-26 11:41:04 +02:00
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
2007-08-29 18:23:50 +02:00
|
|
|
CPPFLAGS="$EXIF_CFLAGS $CPPFLAGS"
|
|
|
|
AC_CHECK_HEADER(exif-data.h,
|
|
|
|
AC_DEFINE(UNTAGGED_EXIF,1,[libexif includes don't need libexif prefix]))
|
2016-04-26 11:41:04 +02:00
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
2017-10-02 14:13:46 +02:00
|
|
|
# make vips7 (swig-based) py binding
|
|
|
|
AC_ARG_ENABLE([pyvips7],
|
|
|
|
AS_HELP_STRING([--enable-pyvips7], [build vips7 Python binding (default: no)]),
|
|
|
|
[enable_pyvips7=$enableval
|
|
|
|
],
|
|
|
|
[enable_pyvips7="no (default)"
|
|
|
|
]
|
|
|
|
)
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2017-10-02 14:13:46 +02:00
|
|
|
if test x"$enable_pyvips7" = x"yes"; then
|
2015-02-06 15:54:52 +01:00
|
|
|
if test x"$enable_cxx" = x"no"; then
|
2014-10-14 15:56:49 +02:00
|
|
|
# if C++ is off, we can't do Python
|
2017-10-02 14:13:46 +02:00
|
|
|
enable_pyvips7=no
|
2015-02-06 15:54:52 +01:00
|
|
|
AC_MSG_WARN([C++ is off, disabling vips7 Python binding])
|
2010-01-08 15:28:40 +01:00
|
|
|
fi
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
2017-10-02 14:13:46 +02:00
|
|
|
if test x"$enable_pyvips7" = x"yes"; then
|
2016-05-18 00:37:51 +02:00
|
|
|
JD_PATH_PYTHON(2.7,,
|
2017-10-02 14:13:46 +02:00
|
|
|
[enable_pyvips7=no
|
2016-05-18 11:41:05 +02:00
|
|
|
AC_MSG_WARN([Python >= 2.7 not found; disabling vips7 Python binding])
|
|
|
|
]
|
2016-05-18 02:06:43 +02:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2017-10-02 14:13:46 +02:00
|
|
|
if test x"$enable_pyvips7" = x"yes"; then
|
2016-05-18 02:06:43 +02:00
|
|
|
# The SWIG bindings don't compile on python3 (see issue #334).
|
|
|
|
AM_PYTHON_CHECK_VERSION([$PYTHON], [3.0],
|
2017-10-02 14:13:46 +02:00
|
|
|
[enable_pyvips7=no
|
2016-05-18 11:41:05 +02:00
|
|
|
AC_MSG_WARN([Python >= 3.0 found; disabling vips7 Python binding])
|
|
|
|
]
|
2015-02-06 15:54:52 +01:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2017-10-02 14:13:46 +02:00
|
|
|
if test x"$enable_pyvips7" = x"yes"; then
|
2007-08-29 18:23:50 +02:00
|
|
|
AM_CHECK_PYTHON_HEADERS(,
|
2017-10-02 14:13:46 +02:00
|
|
|
[enable_pyvips7=no
|
2016-05-18 11:41:05 +02:00
|
|
|
AC_MSG_WARN([Python headers not found; disabling vips7 Python binding])
|
|
|
|
]
|
|
|
|
)
|
2007-08-29 18:23:50 +02:00
|
|
|
fi
|
|
|
|
|
2008-10-11 23:29:16 +02:00
|
|
|
# we don't check for swig: we include the generated bindings in the
|
|
|
|
# distribution
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2017-10-02 14:13:46 +02:00
|
|
|
if test x"$enable_pyvips7" = x"yes"; then
|
2007-08-29 18:23:50 +02:00
|
|
|
AM_CONDITIONAL(HAVE_PYTHON, true)
|
|
|
|
else
|
|
|
|
AM_CONDITIONAL(HAVE_PYTHON, false)
|
|
|
|
fi
|
|
|
|
|
2015-02-07 11:37:13 +01:00
|
|
|
# Gather all up for VIPS_CFLAGS, VIPS_INCLUDES, VIPS_LIBS
|
2008-04-12 16:37:05 +02:00
|
|
|
# sort includes to get longer, more specific dirs first
|
|
|
|
# helps, for example, selecting graphicsmagick over imagemagick
|
2017-03-01 12:07:51 +01:00
|
|
|
VIPS_CFLAGS=`for i in $VIPS_CFLAGS $GTHREAD_CFLAGS $REQUIRED_CFLAGS $EXPAT_CFLAGS $ZLIB_CFLAGS $PANGOFT2_CFLAGS $GSF_CFLAGS $FFTW_CFLAGS $MAGICK_CFLAGS $PNG_CFLAGS $EXIF_CFLAGS $MATIO_CFLAGS $CFITSIO_CFLAGS $LIBWEBP_CFLAGS $LIBWEBPMUX_CFLAGS $GIFLIB_INCLUDES $RSVG_CFLAGS $POPPLER_CFLAGS $OPENEXR_CFLAGS $OPENSLIDE_CFLAGS $ORC_CFLAGS $TIFF_CFLAGS $LCMS_CFLAGS
|
2009-02-27 17:52:25 +01:00
|
|
|
do
|
2014-05-09 14:22:57 +02:00
|
|
|
echo $i
|
2008-04-09 17:37:02 +02:00
|
|
|
done | sort -ru`
|
|
|
|
VIPS_CFLAGS=`echo $VIPS_CFLAGS`
|
2010-04-18 17:58:36 +02:00
|
|
|
VIPS_CFLAGS="$VIPS_DEBUG_FLAGS $VIPS_CFLAGS"
|
2016-06-27 03:03:45 +02:00
|
|
|
VIPS_INCLUDES="$ZLIB_INCLUDES $PNG_INCLUDES $TIFF_INCLUDES $JPEG_INCLUDES"
|
2017-03-01 12:07:51 +01:00
|
|
|
VIPS_LIBS="$ZLIB_LIBS $MAGICK_LIBS $PNG_LIBS $TIFF_LIBS $JPEG_LIBS $GTHREAD_LIBS $REQUIRED_LIBS $EXPAT_LIBS $PANGOFT2_LIBS $GSF_LIBS $FFTW_LIBS $ORC_LIBS $LCMS_LIBS $GIFLIB_LIBS $RSVG_LIBS $POPPLER_LIBS $OPENEXR_LIBS $OPENSLIDE_LIBS $CFITSIO_LIBS $LIBWEBP_LIBS $LIBWEBPMUX_LIBS $MATIO_LIBS $EXIF_LIBS -lm"
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2011-03-28 18:18:06 +02:00
|
|
|
AC_SUBST(VIPS_LIBDIR)
|
2010-05-05 17:22:04 +02:00
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
AC_SUBST(VIPS_CFLAGS)
|
|
|
|
AC_SUBST(VIPS_INCLUDES)
|
|
|
|
AC_SUBST(VIPS_LIBS)
|
|
|
|
AC_SUBST(PACKAGES_USED)
|
2014-11-29 15:32:08 +01:00
|
|
|
AC_SUBST(EXTRA_LIBS_USED)
|
2007-08-29 18:23:50 +02:00
|
|
|
|
2014-11-19 16:01:28 +01:00
|
|
|
# needed by test/variables.sh.in
|
|
|
|
# :( what's a better way to do this, argh
|
|
|
|
TOP_SRCDIR=$ac_pwd
|
|
|
|
AC_SUBST(TOP_SRCDIR)
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
AC_OUTPUT([
|
2012-07-20 11:22:43 +02:00
|
|
|
vips.pc
|
|
|
|
vipsCC.pc
|
2014-11-05 15:04:46 +01:00
|
|
|
vips-cpp.pc
|
2007-08-29 18:23:50 +02:00
|
|
|
Makefile
|
2009-08-16 17:00:08 +02:00
|
|
|
libvips/include/vips/version.h
|
|
|
|
libvips/include/Makefile
|
|
|
|
libvips/include/vips/Makefile
|
|
|
|
libvips/Makefile
|
|
|
|
libvips/arithmetic/Makefile
|
|
|
|
libvips/colour/Makefile
|
|
|
|
libvips/conversion/Makefile
|
|
|
|
libvips/convolution/Makefile
|
2009-09-02 22:15:15 +02:00
|
|
|
libvips/deprecated/Makefile
|
2011-11-29 12:43:08 +01:00
|
|
|
libvips/foreign/Makefile
|
2014-01-03 18:19:45 +01:00
|
|
|
libvips/freqfilt/Makefile
|
2013-07-01 14:45:36 +02:00
|
|
|
libvips/histogram/Makefile
|
2014-02-04 09:49:17 +01:00
|
|
|
libvips/draw/Makefile
|
2009-08-16 17:00:08 +02:00
|
|
|
libvips/iofuncs/Makefile
|
|
|
|
libvips/morphology/Makefile
|
|
|
|
libvips/mosaicing/Makefile
|
2013-06-13 11:12:22 +02:00
|
|
|
libvips/create/Makefile
|
2009-08-16 17:00:08 +02:00
|
|
|
libvips/resample/Makefile
|
|
|
|
libvips/video/Makefile
|
|
|
|
libvipsCC/include/Makefile
|
2009-11-10 14:54:15 +01:00
|
|
|
libvipsCC/include/vips/Makefile
|
2009-08-16 17:00:08 +02:00
|
|
|
libvipsCC/Makefile
|
2014-10-27 14:41:44 +01:00
|
|
|
cplusplus/include/Makefile
|
|
|
|
cplusplus/include/vips/Makefile
|
|
|
|
cplusplus/Makefile
|
2009-08-16 17:00:08 +02:00
|
|
|
tools/Makefile
|
2011-04-06 13:06:32 +02:00
|
|
|
tools/batch_crop
|
|
|
|
tools/batch_image_convert
|
|
|
|
tools/batch_rubber_sheet
|
|
|
|
tools/light_correct
|
|
|
|
tools/shrink_width
|
2014-10-14 15:56:49 +02:00
|
|
|
python/Makefile
|
2016-05-08 04:35:08 +02:00
|
|
|
python/packages/Makefile
|
|
|
|
python/packages/gi/Makefile
|
|
|
|
python/packages/gi/overrides/Makefile
|
2014-11-19 16:01:28 +01:00
|
|
|
test/Makefile
|
|
|
|
test/variables.sh
|
2009-08-16 17:00:08 +02:00
|
|
|
swig/Makefile
|
|
|
|
swig/vipsCC/Makefile
|
2011-07-26 10:27:06 +02:00
|
|
|
man/Makefile
|
2009-08-16 17:00:08 +02:00
|
|
|
doc/Makefile
|
2015-02-11 18:01:02 +01:00
|
|
|
doc/libvips-docs.xml
|
2007-08-29 18:23:50 +02:00
|
|
|
po/Makefile.in
|
|
|
|
])
|
2008-06-19 18:38:31 +02:00
|
|
|
|
2016-05-17 11:52:11 +02:00
|
|
|
AC_MSG_RESULT([dnl
|
2014-12-18 10:15:58 +01:00
|
|
|
* build options
|
2008-06-19 18:38:31 +02:00
|
|
|
native win32: $vips_os_win32
|
2010-03-08 19:24:44 +01:00
|
|
|
native OS X: $vips_os_darwin
|
2008-06-19 18:38:31 +02:00
|
|
|
open files in binary mode: $vips_binary_open
|
2010-05-05 17:22:04 +02:00
|
|
|
enable debug: $enable_debug
|
2014-07-25 19:06:52 +02:00
|
|
|
build deprecated components: $enable_deprecated
|
2011-12-31 19:22:42 +01:00
|
|
|
build docs with gtkdoc: $enable_gtk_doc
|
|
|
|
gobject introspection: $found_introspection
|
2017-10-02 14:13:46 +02:00
|
|
|
build vips7 Python binding: $enable_pyvips7
|
2014-12-18 10:15:58 +01:00
|
|
|
install vips8 Python overrides: $enable_pyvips8
|
2016-10-24 18:57:21 +02:00
|
|
|
(requires pygobject-3.13.0 or later)
|
2016-03-12 17:48:27 +01:00
|
|
|
build radiance support: $with_radiance
|
|
|
|
build analyze support: $with_analyze
|
|
|
|
build PPM support: $with_ppm
|
2008-08-15 10:40:05 +02:00
|
|
|
|
2014-12-18 10:15:58 +01:00
|
|
|
* optional dependencies
|
2012-01-28 12:27:16 +01:00
|
|
|
use fftw3 for FFT: $with_fftw
|
2008-06-19 18:38:31 +02:00
|
|
|
Magick package: $with_magickpackage
|
2017-12-23 17:57:36 +01:00
|
|
|
Magick API version: $magick_version
|
|
|
|
load with libMagick: $enable_magickload
|
|
|
|
save with libMagick: $enable_magicksave
|
2010-11-01 18:46:47 +01:00
|
|
|
accelerate loops with orc: $with_orc
|
2010-11-02 11:59:34 +01:00
|
|
|
(requires orc-0.4.11 or later)
|
2012-07-13 13:56:08 +02:00
|
|
|
ICC profile support with lcms: $with_lcms
|
2008-06-19 18:38:31 +02:00
|
|
|
file import with OpenEXR: $with_OpenEXR
|
2011-11-27 04:18:46 +01:00
|
|
|
file import with OpenSlide: $with_openslide
|
2012-09-20 09:11:49 +02:00
|
|
|
(requires openslide-3.3.0 or later)
|
2009-02-27 17:52:25 +01:00
|
|
|
file import with matio: $with_matio
|
2016-02-08 00:33:43 +01:00
|
|
|
PDF import with poppler-glib: $with_poppler
|
2016-05-08 22:39:08 +02:00
|
|
|
(requires poppler-glib 0.16.0 or later)
|
2016-02-09 12:01:12 +01:00
|
|
|
SVG import with librsvg-2.0: $with_rsvg
|
2016-05-27 00:55:32 +02:00
|
|
|
(requires librsvg-2.0 2.34.0 or later)
|
2016-08-01 15:28:35 +02:00
|
|
|
zlib: $with_zlib
|
2010-10-26 17:12:49 +02:00
|
|
|
file import with cfitsio: $with_cfitsio
|
2013-08-06 11:01:50 +02:00
|
|
|
file import/export with libwebp: $with_libwebp
|
2016-04-23 07:00:42 +02:00
|
|
|
(requires libwebp-0.1.3 or later)
|
2016-11-07 11:01:59 +01:00
|
|
|
support webp metadata: $with_libwebpmux
|
|
|
|
(requires libwebpmux-0.5 or later)
|
2008-06-19 18:38:31 +02:00
|
|
|
text rendering with pangoft2: $with_pangoft2
|
|
|
|
file import/export with libpng: $with_png
|
2011-03-20 12:28:17 +01:00
|
|
|
(requires libpng-1.2.9 or later)
|
2008-06-19 18:38:31 +02:00
|
|
|
file import/export with libtiff: $with_tiff
|
2016-02-11 09:35:29 +01:00
|
|
|
file import/export with giflib: $with_giflib
|
2008-06-19 18:38:31 +02:00
|
|
|
file import/export with libjpeg: $with_jpeg
|
2014-05-09 14:13:18 +02:00
|
|
|
image pyramid export: $with_gsf
|
2016-12-08 14:54:05 +01:00
|
|
|
(requires libgsf-1 1.14.26 or later)
|
2008-06-19 18:38:31 +02:00
|
|
|
use libexif to load/save JPEG metadata: $with_libexif
|
2014-12-18 10:15:58 +01:00
|
|
|
])
|
2016-05-17 11:52:11 +02:00
|
|
|
|
|
|
|
if test x"$found_introspection" = xyes -a "$VIPS_LIBDIR/girepository-1.0" != "$INTROSPECTION_TYPELIBDIR"; then
|
2016-05-18 00:48:31 +02:00
|
|
|
case "$VIPS_LIBDIR" in
|
|
|
|
/usr/local/Cellar/vips/*)
|
2016-05-18 11:41:05 +02:00
|
|
|
;; # ignore for homebrew
|
2016-05-18 00:48:31 +02:00
|
|
|
*)
|
|
|
|
AC_MSG_RESULT([dnl
|
2018-02-26 19:33:20 +01:00
|
|
|
Vips-8.0.typelib will be installed to $VIPS_LIBDIR/girepository-1.0, but
|
|
|
|
your system repository seems to be $INTROSPECTION_TYPELIBDIR.
|
2016-05-17 14:56:16 +02:00
|
|
|
You may need to add this directory to your typelib path, for example:
|
2016-05-17 11:52:11 +02:00
|
|
|
|
|
|
|
export GI_TYPELIB_PATH="$VIPS_LIBDIR/girepository-1.0"
|
2016-05-18 00:48:31 +02:00
|
|
|
])
|
|
|
|
;;
|
|
|
|
esac
|
2016-05-17 11:52:11 +02:00
|
|
|
fi
|
|
|
|
|
2016-05-18 00:48:31 +02:00
|
|
|
if test x"$enable_pyvips8" = xyes; then
|
|
|
|
expand $pyexecdir
|
|
|
|
VIPS_PYEXECDIR=$expanded_value
|
|
|
|
case "$VIPS_PYEXECDIR" in
|
|
|
|
/usr/local/Cellar/vips/*)
|
|
|
|
;; # ingnore for homebrew
|
|
|
|
*)
|
2016-05-18 03:35:08 +02:00
|
|
|
syspygipath=`$PYTHON -c "
|
|
|
|
import sys
|
|
|
|
sys.path.append('$VIPS_PYEXECDIR')
|
|
|
|
try: import gi; print(gi._overridesdir)
|
|
|
|
except: pass"`
|
|
|
|
if test x"$syspygipath" = x; then
|
|
|
|
AC_MSG_RESULT([dnl
|
|
|
|
Your python gi module could not be loaded.
|
|
|
|
|
|
|
|
You should change your PYTHONPATH environment
|
|
|
|
variable to include the pygobject3 gi module
|
|
|
|
and re-run configure to check if the Vips.py
|
|
|
|
overrides are installed in the correct location.
|
|
|
|
])
|
|
|
|
elif test x"$VIPS_PYEXECDIR/gi/overrides" != x"$syspygipath"; then
|
2016-05-18 00:48:31 +02:00
|
|
|
AC_MSG_RESULT([dnl
|
2018-02-26 19:33:20 +01:00
|
|
|
The vips Python overrides file will be installed to
|
2016-05-18 00:48:31 +02:00
|
|
|
$VIPS_PYEXECDIR/gi/overrides/Vips.py, but your
|
|
|
|
system gi overrides seem to be $syspygipath.
|
2016-05-17 14:56:16 +02:00
|
|
|
You may need to copy this file, for example:
|
2016-05-17 11:52:11 +02:00
|
|
|
|
2016-05-18 00:48:31 +02:00
|
|
|
cp $VIPS_PYEXECDIR/gi/overrides/Vips.* $syspygipath
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2016-05-17 11:52:11 +02:00
|
|
|
fi
|
2016-08-16 17:22:38 +02:00
|
|
|
|
|
|
|
if test x"$vips_os_win32" = x"yes"; then
|
|
|
|
if test x"$have_g_win32_get_command_line" != x"yes"; then
|
|
|
|
AC_MSG_RESULT([dnl
|
|
|
|
Your glib is too old, vips will not support unicode command-line arguments.
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
fi
|