Merge pull request #1708 from kleisauke/out-of-source
Fix out-of-source build issues
This commit is contained in:
commit
84d0d5a7a3
2
.gitignore
vendored
2
.gitignore
vendored
@ -52,6 +52,8 @@ libtool
|
|||||||
libvips/include/vips/version.h
|
libvips/include/vips/version.h
|
||||||
fred
|
fred
|
||||||
ltmain.sh
|
ltmain.sh
|
||||||
|
m4/glib-gettext.m4
|
||||||
|
m4/pkg.m4
|
||||||
m4/gtk-doc.m4
|
m4/gtk-doc.m4
|
||||||
m4/intltool.m4
|
m4/intltool.m4
|
||||||
m4/libtool.m4
|
m4/libtool.m4
|
||||||
|
86
autogen.sh
86
autogen.sh
@ -1,66 +1,42 @@
|
|||||||
#!/bin/sh
|
#!/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=.
|
||||||
|
|
||||||
# set -x
|
olddir=$(pwd)
|
||||||
|
|
||||||
# a bunch of cleaning up ... make certain everything will be regenerated
|
cd $srcdir
|
||||||
rm -f Makefile Makefile.in aclocal.m4
|
|
||||||
rm -rf autom4te.cache
|
|
||||||
|
|
||||||
# remove m4/ macros put there by libtool etc.
|
(test -f configure.ac) || {
|
||||||
rm -f m4/libtool.m4
|
echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
|
||||||
rm -f m4/lt~obsolete.m4
|
exit 1
|
||||||
rm -f m4/ltoptions.m4
|
}
|
||||||
rm -f m4/ltsugar.m4
|
|
||||||
rm -f m4/ltversion.m4
|
|
||||||
rm -f m4/gtk-doc.m4
|
|
||||||
|
|
||||||
rm -f config.* configure depcomp
|
# shellcheck disable=SC2016
|
||||||
rm -f install-sh intltool-* libtool ltmain.sh missing mkinstalldirs
|
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
|
||||||
rm -f stamp-*
|
|
||||||
rm -f benchmark/temp*
|
|
||||||
find doc -depth \( \
|
|
||||||
-path doc/libvips-docs.xml.in \
|
|
||||||
-o -path doc/Makefile.am \
|
|
||||||
-o -path 'doc/images/*' \
|
|
||||||
-o -name '*.xml' ! -name libvips-docs.xml ! -path 'doc/xml/*' \
|
|
||||||
-o -name '*.py' \
|
|
||||||
-o -name '*.md' \
|
|
||||||
-o -name '*.docbook' \
|
|
||||||
\) -prune -or \( \
|
|
||||||
-type f \
|
|
||||||
-o -type d -empty \
|
|
||||||
\) -delete
|
|
||||||
|
|
||||||
ACDIR=`aclocal --print-ac-dir`
|
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
|
||||||
# OS X with brew has a dirlist in ACDIR that points to several directories
|
echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
|
||||||
# dirlist supports wildcards, but that would require eval ... which is evil
|
echo "*** If you wish to pass any to it, please specify them on the" >&2
|
||||||
if [ -e $ACDIR/dirlist ]; then
|
echo "*** '$0' command line." >&2
|
||||||
ACDIR=`cat $ACDIR/dirlist`
|
echo "" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
aclocal -I m4 --install || exit 1
|
||||||
|
glib-gettextize --force --copy > /dev/null || exit 1
|
||||||
gtkdocize --copy --docdir doc --flavour no-tmpl || exit 1
|
gtkdocize --copy --docdir doc --flavour no-tmpl || exit 1
|
||||||
|
autoreconf --verbose --force --install -Wno-portability || exit 1
|
||||||
|
|
||||||
# some systems need libtoolize, some glibtoolize ... how annoying
|
cd "$olddir"
|
||||||
printf "testing for glibtoolize ... "
|
if [ "$NOCONFIGURE" = "" ]; then
|
||||||
if glibtoolize --version >/dev/null 2>&1; then
|
$srcdir/configure "$@" || exit 1
|
||||||
LIBTOOLIZE=glibtoolize
|
|
||||||
echo using glibtoolize
|
if [ "$1" = "--help" ]; then
|
||||||
else
|
exit 0
|
||||||
LIBTOOLIZE=libtoolize
|
else
|
||||||
echo using libtoolize
|
echo "Now type 'make' to compile $PKG_NAME" || exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
test -r aclocal.m4 || touch aclocal.m4
|
echo "Skipping configure process."
|
||||||
# gettextize produces quite a bit of benign and misleading text output, hide
|
|
||||||
# it ... hopefully any errors will go to stderr and not be hidden
|
|
||||||
glib-gettextize --force --copy > /dev/null
|
|
||||||
test -r aclocal.m4 && chmod u+w aclocal.m4
|
|
||||||
aclocal -I m4
|
|
||||||
autoconf
|
|
||||||
autoheader
|
|
||||||
$LIBTOOLIZE --copy --force --automake
|
|
||||||
automake --add-missing --copy
|
|
||||||
|
|
||||||
if test -z "$NOCONFIGURE"; then
|
|
||||||
./configure $*
|
|
||||||
fi
|
fi
|
||||||
|
111
configure.ac
111
configure.ac
@ -9,10 +9,10 @@ AC_PREREQ(2.62)
|
|||||||
# gobject-introspection recommends -Wno-portability
|
# gobject-introspection recommends -Wno-portability
|
||||||
# foreign stops complaints about a missing README (we use README.md instead)
|
# foreign stops complaints about a missing README (we use README.md instead)
|
||||||
# and missing INSTALL (the standard Gnu INSTALL is not very useful)
|
# and missing INSTALL (the standard Gnu INSTALL is not very useful)
|
||||||
# subdir-objects lets us have dumy.cc in a subdir
|
# subdir-objects lets us have dummy.cc in a subdir
|
||||||
AM_INIT_AUTOMAKE([-Wno-portability foreign subdir-objects])
|
AM_INIT_AUTOMAKE([-Wno-portability foreign subdir-objects])
|
||||||
|
|
||||||
AC_CONFIG_HEADERS(config.h)
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
# user-visible library versioning
|
# user-visible library versioning
|
||||||
@ -26,7 +26,7 @@ VIPS_MAJOR_VERSION=vips_major_version()
|
|||||||
VIPS_MINOR_VERSION=vips_minor_version()
|
VIPS_MINOR_VERSION=vips_minor_version()
|
||||||
VIPS_MICRO_VERSION=vips_micro_version()
|
VIPS_MICRO_VERSION=vips_micro_version()
|
||||||
VIPS_VERSION=vips_version()
|
VIPS_VERSION=vips_version()
|
||||||
VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog`
|
VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r $srcdir/ChangeLog`
|
||||||
|
|
||||||
# libtool library versioning ... not user-visible (except as part of the
|
# libtool library versioning ... not user-visible (except as part of the
|
||||||
# library file name) and does not correspond to major/minor/micro above
|
# library file name) and does not correspond to major/minor/micro above
|
||||||
@ -56,41 +56,20 @@ AC_SUBST(LIBRARY_AGE)
|
|||||||
# init introspection support
|
# init introspection support
|
||||||
GOBJECT_INTROSPECTION_CHECK([1.30.0])
|
GOBJECT_INTROSPECTION_CHECK([1.30.0])
|
||||||
|
|
||||||
|
# remove the '(disabled, use --enable-introspection to enable)'
|
||||||
|
# suffix from the found_introspection variable
|
||||||
|
if test "x$found_introspection" != x"yes"; then
|
||||||
|
found_introspection=no
|
||||||
|
fi
|
||||||
|
|
||||||
# gir needs a list of source files to scan for introspection
|
# gir needs a list of source files to scan for introspection
|
||||||
#
|
#
|
||||||
# build with a glob and a list of files to exclude from scanning
|
# build with a glob and a list of files to exclude from scanning
|
||||||
# see also IGNORE_HFILES in doc/Makefile.am
|
# see also IGNORE_HFILES in doc/Makefile.am
|
||||||
introspection_sources=$(cd libvips ; find . -name "*.c"; find . -name "*.cpp")
|
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)
|
||||||
filter_list="deprecated introspect.c dummy.c fuzz "
|
|
||||||
|
|
||||||
# contains(string, substring)
|
|
||||||
#
|
|
||||||
# Returns 0 if the specified string contains the specified substring,
|
|
||||||
# otherwise returns 1.
|
|
||||||
contains() {
|
|
||||||
string="$1"
|
|
||||||
substring="$2"
|
|
||||||
if test x"${string#*$substring}" != x"$string"; then
|
|
||||||
return 0 # $substring is in $string
|
|
||||||
else
|
|
||||||
return 1 # $substring is not in $string
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
introspection_sources2=
|
|
||||||
for name in $introspection_sources; do
|
for name in $introspection_sources; do
|
||||||
found=0
|
vips_introspection_sources="$vips_introspection_sources $name"
|
||||||
for filter in $filter_list; do
|
done
|
||||||
if contains $name ${filter}; then
|
|
||||||
found=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $found -eq 0 ]]; then
|
|
||||||
introspection_sources2="$introspection_sources2 $name"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
vips_introspection_sources="$introspection_sources2"
|
|
||||||
|
|
||||||
# add headers that form the public vips8 API .. don't do a find and exclude,
|
# add headers that form the public vips8 API .. don't do a find and exclude,
|
||||||
# we end up excluding almost everything argh
|
# we end up excluding almost everything argh
|
||||||
@ -156,6 +135,7 @@ if test x"$enable_deprecated" != x"no"; then
|
|||||||
VIPS_ENABLE_DEPRECATED=1
|
VIPS_ENABLE_DEPRECATED=1
|
||||||
enable_deprecated=yes
|
enable_deprecated=yes
|
||||||
fi
|
fi
|
||||||
|
AC_DEFINE_UNQUOTED(ENABLE_DEPRECATED,$VIPS_ENABLE_DEPRECATED,[define to build deprecated components])
|
||||||
AM_CONDITIONAL(ENABLE_DEPRECATED, [test x"$enable_deprecated" = x"yes"])
|
AM_CONDITIONAL(ENABLE_DEPRECATED, [test x"$enable_deprecated" = x"yes"])
|
||||||
|
|
||||||
# this gets pasted into version.h as a #define
|
# this gets pasted into version.h as a #define
|
||||||
@ -1324,7 +1304,7 @@ VIPS_LIBS="$ZLIB_LIBS $HEIF_LIBS $MAGICK_LIBS $SPNG_LIBS $PNG_LIBS $IMAGEQUANT_L
|
|||||||
|
|
||||||
# autoconf hates multi-line AC_SUBST so we have to have another copy of this
|
# autoconf hates multi-line AC_SUBST so we have to have another copy of this
|
||||||
# thing
|
# thing
|
||||||
VIPS_CONFIG="native win32: $vips_os_win32, native OS X: $vips_os_darwin, open files in binary mode: $vips_binary_open, enable debug: $enable_debug, enable deprecated library components: $enable_deprecated, enable docs with gtkdoc: $enable_gtk_doc, gobject introspection: $found_introspection, enable radiance support: $with_radiance, enable analyze support: $with_analyze, enable PPM support: $with_ppm, use fftw3 for FFT: $with_fftw, Magick package: $with_magickpackage, Magick API version: $magick_version, load with libMagick: $enable_magickload, save with libMagick: $enable_magicksave, accelerate loops with orc: $with_orc, ICC profile support with lcms: $with_lcms, file import with niftiio: $with_nifti, file import with libheif: $with_heif, file import with OpenEXR: $with_OpenEXR, file import with OpenSlide: $with_openslide, file import with matio: $with_matio, PDF import with PDFium: $with_pdfium, PDF import with poppler-glib: $with_poppler, SVG import with librsvg-2.0: $with_rsvg, zlib: $with_zlib, file import with cfitsio: $with_cfitsio, file import/export with libwebp: $with_libwebp, text rendering with pangoft2: $with_pangoft2, file import/export with libpng: $with_png, support 8bpp PNG quantisation: $with_imagequant, file import/export with libtiff: $with_tiff, file import/export with giflib: $with_giflib, file import/export with libjpeg: $with_jpeg, image pyramid export: $with_gsf, use libexif to load/save JPEG metadata: $with_libexif, file import/export with libspng: $with_libspng"
|
VIPS_CONFIG="native win32: $vips_os_win32, native OS X: $vips_os_darwin, open files in binary mode: $vips_binary_open, enable debug: $enable_debug, enable deprecated library components: $enable_deprecated, enable docs with gtkdoc: $enable_gtk_doc, gobject introspection: $found_introspection, enable radiance support: $with_radiance, enable analyze support: $with_analyze, enable PPM support: $with_ppm, use fftw3 for FFT: $with_fftw, Magick package: $with_magickpackage, Magick API version: $magick_version, load with libMagick: $enable_magickload, save with libMagick: $enable_magicksave, accelerate loops with orc: $with_orc, ICC profile support with lcms: $with_lcms, file import with niftiio: $with_nifti, file import with libheif: $with_heif, file import with OpenEXR: $with_OpenEXR, file import with OpenSlide: $with_openslide, file import with matio: $with_matio, PDF import with PDFium: $with_pdfium, PDF import with poppler-glib: $with_poppler, SVG import with librsvg-2.0: $with_rsvg, zlib: $with_zlib, file import with cfitsio: $with_cfitsio, file import/export with libwebp: $with_libwebp, text rendering with pangoft2: $with_pangoft2, file import/export with libspng: $with_libspng, file import/export with libpng: $with_png, support 8bpp PNG quantisation: $with_imagequant, file import/export with libtiff: $with_tiff, file import/export with giflib: $with_giflib, file import/export with libjpeg: $with_jpeg, image pyramid export: $with_gsf, use libexif to load/save JPEG metadata: $with_libexif"
|
||||||
|
|
||||||
AC_SUBST(VIPS_LIBDIR)
|
AC_SUBST(VIPS_LIBDIR)
|
||||||
|
|
||||||
@ -1340,39 +1320,39 @@ AC_SUBST(EXTRA_LIBS_USED)
|
|||||||
TOP_SRCDIR=$ac_pwd
|
TOP_SRCDIR=$ac_pwd
|
||||||
AC_SUBST(TOP_SRCDIR)
|
AC_SUBST(TOP_SRCDIR)
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_CONFIG_FILES([
|
||||||
vips.pc
|
vips.pc
|
||||||
vips-cpp.pc
|
vips-cpp.pc
|
||||||
Makefile
|
Makefile
|
||||||
libvips/include/vips/version.h
|
$srcdir/libvips/include/vips/version.h
|
||||||
libvips/include/Makefile
|
libvips/include/Makefile
|
||||||
libvips/include/vips/Makefile
|
libvips/include/vips/Makefile
|
||||||
libvips/Makefile
|
libvips/Makefile
|
||||||
libvips/arithmetic/Makefile
|
libvips/arithmetic/Makefile
|
||||||
libvips/colour/Makefile
|
libvips/colour/Makefile
|
||||||
libvips/colour/profiles/Makefile
|
libvips/colour/profiles/Makefile
|
||||||
libvips/conversion/Makefile
|
libvips/conversion/Makefile
|
||||||
libvips/convolution/Makefile
|
libvips/convolution/Makefile
|
||||||
libvips/deprecated/Makefile
|
libvips/deprecated/Makefile
|
||||||
libvips/foreign/Makefile
|
libvips/foreign/Makefile
|
||||||
libvips/freqfilt/Makefile
|
libvips/freqfilt/Makefile
|
||||||
libvips/histogram/Makefile
|
libvips/histogram/Makefile
|
||||||
libvips/draw/Makefile
|
libvips/draw/Makefile
|
||||||
libvips/iofuncs/Makefile
|
libvips/iofuncs/Makefile
|
||||||
libvips/morphology/Makefile
|
libvips/morphology/Makefile
|
||||||
libvips/mosaicing/Makefile
|
libvips/mosaicing/Makefile
|
||||||
libvips/create/Makefile
|
libvips/create/Makefile
|
||||||
libvips/resample/Makefile
|
libvips/resample/Makefile
|
||||||
cplusplus/include/Makefile
|
cplusplus/include/Makefile
|
||||||
cplusplus/include/vips/Makefile
|
cplusplus/include/vips/Makefile
|
||||||
cplusplus/Makefile
|
cplusplus/Makefile
|
||||||
tools/Makefile
|
tools/Makefile
|
||||||
tools/batch_crop
|
tools/batch_crop
|
||||||
tools/batch_image_convert
|
tools/batch_image_convert
|
||||||
tools/batch_rubber_sheet
|
tools/batch_rubber_sheet
|
||||||
tools/light_correct
|
tools/light_correct
|
||||||
tools/shrink_width
|
tools/shrink_width
|
||||||
test/Makefile
|
test/Makefile
|
||||||
test/variables.sh
|
test/variables.sh
|
||||||
test/test-suite/Makefile
|
test/test-suite/Makefile
|
||||||
test/test-suite/helpers/Makefile
|
test/test-suite/helpers/Makefile
|
||||||
@ -1382,6 +1362,7 @@ AC_OUTPUT([
|
|||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
fuzz/Makefile
|
fuzz/Makefile
|
||||||
])
|
])
|
||||||
|
AC_OUTPUT
|
||||||
|
|
||||||
# also add any new items to VIPS_CONFIG above
|
# also add any new items to VIPS_CONFIG above
|
||||||
AC_MSG_RESULT([dnl
|
AC_MSG_RESULT([dnl
|
||||||
|
@ -81,10 +81,10 @@ IGNORE_VIPS_C = \
|
|||||||
nary.h \
|
nary.h \
|
||||||
parithmetic.h \
|
parithmetic.h \
|
||||||
statistic.h \
|
statistic.h \
|
||||||
unaryconst.h \
|
|
||||||
unary.h \
|
unary.h \
|
||||||
CImg.h \
|
unaryconst.h \
|
||||||
pcolour.h \
|
pcolour.h \
|
||||||
|
profiles.h \
|
||||||
bandary.h \
|
bandary.h \
|
||||||
pconversion.h \
|
pconversion.h \
|
||||||
correlation.h \
|
correlation.h \
|
||||||
@ -94,25 +94,14 @@ IGNORE_VIPS_C = \
|
|||||||
point.h \
|
point.h \
|
||||||
drawink.h \
|
drawink.h \
|
||||||
pdraw.h \
|
pdraw.h \
|
||||||
analyze2vips.h \
|
|
||||||
csv.h \
|
|
||||||
dbh.h \
|
dbh.h \
|
||||||
fits.h \
|
|
||||||
jpeg.h \
|
jpeg.h \
|
||||||
magick.h \
|
magick.h \
|
||||||
matlab.h \
|
pforeign.h \
|
||||||
openexr2vips.h \
|
|
||||||
openslide2vips.h \
|
|
||||||
ppm.h \
|
|
||||||
radiance.h \
|
|
||||||
tiff.h \
|
tiff.h \
|
||||||
vipsjpeg.h \
|
|
||||||
vipspng.h \
|
|
||||||
webp.h \
|
|
||||||
pfreqfilt.h \
|
pfreqfilt.h \
|
||||||
hist_unary.h \
|
hist_unary.h \
|
||||||
phistogram.h \
|
phistogram.h \
|
||||||
base64.h \
|
|
||||||
sink.h \
|
sink.h \
|
||||||
vipsmarshal.h \
|
vipsmarshal.h \
|
||||||
pmorphology.h \
|
pmorphology.h \
|
||||||
|
@ -45,10 +45,11 @@ pkginclude_HEADERS = \
|
|||||||
thread.h \
|
thread.h \
|
||||||
transform.h \
|
transform.h \
|
||||||
util.h \
|
util.h \
|
||||||
version.h \
|
|
||||||
vector.h \
|
vector.h \
|
||||||
vips7compat.h \
|
vips7compat.h \
|
||||||
vips.h
|
vips.h
|
||||||
|
|
||||||
|
nodist_pkginclude_HEADERS = version.h
|
||||||
|
|
||||||
EXTRA_DIST = version.h.in internal.h enumtemplate
|
EXTRA_DIST = version.h.in internal.h enumtemplate
|
||||||
|
|
||||||
@ -75,4 +76,4 @@ vips_scan_headers = \
|
|||||||
${top_srcdir}/libvips/include/vips/region.h
|
${top_srcdir}/libvips/include/vips/region.h
|
||||||
|
|
||||||
enumtypes.h: $(vips_scan_headers) Makefile.am
|
enumtypes.h: $(vips_scan_headers) Makefile.am
|
||||||
glib-mkenums --template enumtemplate $(vips_scan_headers) > enumtypes.h
|
glib-mkenums --template ${top_srcdir}/libvips/include/vips/enumtemplate $(vips_scan_headers) > enumtypes.h
|
||||||
|
@ -79,4 +79,4 @@ vips_scan_headers = \
|
|||||||
${top_srcdir}/libvips/include/vips/region.h
|
${top_srcdir}/libvips/include/vips/region.h
|
||||||
|
|
||||||
enumtypes.c: $(vips_scan_headers) Makefile.am
|
enumtypes.c: $(vips_scan_headers) Makefile.am
|
||||||
glib-mkenums --template enumtemplate $(vips_scan_headers) > enumtypes.c
|
glib-mkenums --template ${top_srcdir}/libvips/iofuncs/enumtemplate $(vips_scan_headers) > enumtypes.c
|
||||||
|
@ -801,7 +801,7 @@ static void
|
|||||||
vips_image_add_progress( VipsImage *image )
|
vips_image_add_progress( VipsImage *image )
|
||||||
{
|
{
|
||||||
if( vips__progress ||
|
if( vips__progress ||
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
g_getenv( "VIPS_PROGRESS" ) ||
|
g_getenv( "VIPS_PROGRESS" ) ||
|
||||||
g_getenv( "IM_PROGRESS" ) ) {
|
g_getenv( "IM_PROGRESS" ) ) {
|
||||||
#else
|
#else
|
||||||
@ -2517,7 +2517,7 @@ vips_get_disc_threshold( void )
|
|||||||
*/
|
*/
|
||||||
threshold = 100 * 1024 * 1024;
|
threshold = 100 * 1024 * 1024;
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
if( (env = g_getenv( "VIPS_DISC_THRESHOLD" )) ||
|
if( (env = g_getenv( "VIPS_DISC_THRESHOLD" )) ||
|
||||||
(env = g_getenv( "IM_DISC_THRESHOLD" )) )
|
(env = g_getenv( "IM_DISC_THRESHOLD" )) )
|
||||||
#else
|
#else
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
#include <vips/vector.h>
|
#include <vips/vector.h>
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
#include <vips/vips7compat.h>
|
#include <vips/vips7compat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ vips_init( const char *argv0 )
|
|||||||
g_free( locale );
|
g_free( locale );
|
||||||
bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" );
|
bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" );
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
if( g_getenv( "VIPS_INFO" ) ||
|
if( g_getenv( "VIPS_INFO" ) ||
|
||||||
g_getenv( "IM_INFO" ) )
|
g_getenv( "IM_INFO" ) )
|
||||||
#else
|
#else
|
||||||
@ -496,7 +496,7 @@ vips_init( const char *argv0 )
|
|||||||
vips__meta_init_types();
|
vips__meta_init_types();
|
||||||
vips__interpolate_init();
|
vips__interpolate_init();
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
im__format_init();
|
im__format_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -531,7 +531,7 @@ vips_init( const char *argv0 )
|
|||||||
(void) vips_load_plugins( "%s/vips-plugins-%d.%d",
|
(void) vips_load_plugins( "%s/vips-plugins-%d.%d",
|
||||||
libdir, VIPS_MAJOR_VERSION, VIPS_MINOR_VERSION );
|
libdir, VIPS_MAJOR_VERSION, VIPS_MINOR_VERSION );
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
/* Load up any vips7 plugins in the vips libdir. We don't error on
|
/* Load up any vips7 plugins in the vips libdir. We don't error on
|
||||||
* failure, it's too annoying to have VIPS refuse to start because of
|
* failure, it's too annoying to have VIPS refuse to start because of
|
||||||
* a broken plugin.
|
* a broken plugin.
|
||||||
@ -582,7 +582,7 @@ vips_init( const char *argv0 )
|
|||||||
* set up if you are using libvips from something like Ruby. Allow this
|
* set up if you are using libvips from something like Ruby. Allow this
|
||||||
* env var hack as a workaround.
|
* env var hack as a workaround.
|
||||||
*/
|
*/
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
if( g_getenv( "VIPS_WARNING" ) ||
|
if( g_getenv( "VIPS_WARNING" ) ||
|
||||||
g_getenv( "IM_WARNING" ) )
|
g_getenv( "IM_WARNING" ) )
|
||||||
#else
|
#else
|
||||||
@ -693,7 +693,7 @@ vips_shutdown( void )
|
|||||||
|
|
||||||
vips_cache_drop_all();
|
vips_cache_drop_all();
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
im_close_plugins();
|
im_close_plugins();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -789,7 +789,16 @@ static gboolean
|
|||||||
vips_lib_config_cb( const gchar *option_name, const gchar *value,
|
vips_lib_config_cb( const gchar *option_name, const gchar *value,
|
||||||
gpointer data, GError **error )
|
gpointer data, GError **error )
|
||||||
{
|
{
|
||||||
printf( "%s\n", VIPS_CONFIG );
|
char **split;
|
||||||
|
char *config;
|
||||||
|
|
||||||
|
split = g_strsplit( VIPS_CONFIG, ", ", -1 );
|
||||||
|
config = g_strjoinv( "\n", split );
|
||||||
|
|
||||||
|
printf( "%s\n", config );
|
||||||
|
g_strfreev( split );
|
||||||
|
g_free( config );
|
||||||
|
|
||||||
vips_shutdown();
|
vips_shutdown();
|
||||||
exit( 0 );
|
exit( 0 );
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ vips_concurrency_get( void )
|
|||||||
*/
|
*/
|
||||||
if( vips__concurrency > 0 )
|
if( vips__concurrency > 0 )
|
||||||
nthr = vips__concurrency;
|
nthr = vips__concurrency;
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
else if( ((str = g_getenv( "VIPS_CONCURRENCY" )) ||
|
else if( ((str = g_getenv( "VIPS_CONCURRENCY" )) ||
|
||||||
(str = g_getenv( "IM_CONCURRENCY" ))) &&
|
(str = g_getenv( "IM_CONCURRENCY" ))) &&
|
||||||
#else
|
#else
|
||||||
|
@ -102,7 +102,7 @@ vips_vector_init( void )
|
|||||||
/* Look for the environment variable VIPS_NOVECTOR and use that to turn
|
/* Look for the environment variable VIPS_NOVECTOR and use that to turn
|
||||||
* off as well.
|
* off as well.
|
||||||
*/
|
*/
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
if( g_getenv( "VIPS_NOVECTOR" ) ||
|
if( g_getenv( "VIPS_NOVECTOR" ) ||
|
||||||
g_getenv( "IM_NOVECTOR" ) )
|
g_getenv( "IM_NOVECTOR" ) )
|
||||||
#else
|
#else
|
||||||
|
24
tools/vips.c
24
tools/vips.c
@ -97,7 +97,7 @@
|
|||||||
#include <vips/vips.h>
|
#include <vips/vips.h>
|
||||||
#include <vips/internal.h>
|
#include <vips/internal.h>
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
#include <vips/vips7compat.h>
|
#include <vips/vips7compat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ static GOptionEntry main_option[] = {
|
|||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
typedef void *(*map_name_fn)( im_function * );
|
typedef void *(*map_name_fn)( im_function * );
|
||||||
|
|
||||||
/* Loop over a package.
|
/* Loop over a package.
|
||||||
@ -253,7 +253,7 @@ list_function( im_function *func )
|
|||||||
static int
|
static int
|
||||||
print_list( int argc, char **argv )
|
print_list( int argc, char **argv )
|
||||||
{
|
{
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
if( !argv[0] || strcmp( argv[0], "packages" ) == 0 )
|
if( !argv[0] || strcmp( argv[0], "packages" ) == 0 )
|
||||||
im_map_packages( (VSListMap2Fn) list_package, NULL );
|
im_map_packages( (VSListMap2Fn) list_package, NULL );
|
||||||
else if( strcmp( argv[0], "classes" ) == 0 )
|
else if( strcmp( argv[0], "classes" ) == 0 )
|
||||||
@ -268,7 +268,7 @@ print_list( int argc, char **argv )
|
|||||||
(VipsTypeMapFn) list_class, NULL );
|
(VipsTypeMapFn) list_class, NULL );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
if( map_name( argv[0], list_function ) )
|
if( map_name( argv[0], list_function ) )
|
||||||
vips_error_exit( "unknown package \"%s\"", argv[0] );
|
vips_error_exit( "unknown package \"%s\"", argv[0] );
|
||||||
#else
|
#else
|
||||||
@ -279,7 +279,7 @@ print_list( int argc, char **argv )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
/* Print "ln -s" lines for this package.
|
/* Print "ln -s" lines for this package.
|
||||||
*/
|
*/
|
||||||
static void *
|
static void *
|
||||||
@ -331,7 +331,7 @@ isvips( const char *name )
|
|||||||
return( vips_isprefix( "vips", name ) );
|
return( vips_isprefix( "vips", name ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
/* Print a usage string from an im_function descriptor.
|
/* Print a usage string from an im_function descriptor.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -426,13 +426,13 @@ static GOptionEntry empty_options[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static ActionEntry actions[] = {
|
static ActionEntry actions[] = {
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
{ "list", N_( "list classes|packages|all|package-name|operation-name" ),
|
{ "list", N_( "list classes|packages|all|package-name|operation-name" ),
|
||||||
#else
|
#else
|
||||||
{ "list", N_( "list classes|all|operation-name" ),
|
{ "list", N_( "list classes|all|operation-name" ),
|
||||||
#endif
|
#endif
|
||||||
&empty_options[0], print_list },
|
&empty_options[0], print_list },
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
{ "links", N_( "generate links for vips/bin" ),
|
{ "links", N_( "generate links for vips/bin" ),
|
||||||
&empty_options[0], print_links },
|
&empty_options[0], print_links },
|
||||||
#endif
|
#endif
|
||||||
@ -515,7 +515,7 @@ main( int argc, char **argv )
|
|||||||
GOptionGroup *main_group;
|
GOptionGroup *main_group;
|
||||||
GOptionGroup *group;
|
GOptionGroup *group;
|
||||||
VipsOperation *operation;
|
VipsOperation *operation;
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
im_function *fn;
|
im_function *fn;
|
||||||
#endif
|
#endif
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -603,10 +603,10 @@ main( int argc, char **argv )
|
|||||||
;
|
;
|
||||||
|
|
||||||
if( main_option_plugin ) {
|
if( main_option_plugin ) {
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
if( !im_load_plugin( main_option_plugin ) )
|
if( !im_load_plugin( main_option_plugin ) )
|
||||||
vips_error_exit( NULL );
|
vips_error_exit( NULL );
|
||||||
#else /*!VIPS_ENABLE_DEPRECATED*/
|
#else /*!ENABLE_DEPRECATED*/
|
||||||
GModule *module;
|
GModule *module;
|
||||||
|
|
||||||
module = g_module_open( main_option_plugin, G_MODULE_BIND_LAZY );
|
module = g_module_open( main_option_plugin, G_MODULE_BIND_LAZY );
|
||||||
@ -672,7 +672,7 @@ main( int argc, char **argv )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VIPS_ENABLE_DEPRECATED
|
#if ENABLE_DEPRECATED
|
||||||
/* Could be a vips7 im_function. We need to test for vips7 first,
|
/* Could be a vips7 im_function. We need to test for vips7 first,
|
||||||
* since we don't want to use the vips7 compat wrappers in vips8
|
* since we don't want to use the vips7 compat wrappers in vips8
|
||||||
* unless we have to. They don't support all args types.
|
* unless we have to. They don't support all args types.
|
||||||
|
Loading…
Reference in New Issue
Block a user