remove --disable-cxx flag

it was getting too hard to support :( automake now generates libtool
lines before configure runs, so it can't know we don't want a C++ link

see https://github.com/jcupitt/libvips/issues/231
This commit is contained in:
John Cupitt 2015-02-07 10:37:13 +00:00
parent 3d902d2feb
commit 346a9e70c0
7 changed files with 8 additions and 104 deletions

View File

@ -2,6 +2,7 @@
- bump version for back-compat ABI change - bump version for back-compat ABI change
- added vips_image_memory(), an alias for vips_image_new_memory() - added vips_image_memory(), an alias for vips_image_new_memory()
- improvements to configure for python - improvements to configure for python
- remove --disable-cxx configure flag
30/12/14 started 7.42.2 30/12/14 started 7.42.2
- C++ required output params were broken, thanks Lovell - C++ required output params were broken, thanks Lovell

View File

@ -1,20 +1,9 @@
# turn off C++ APIs if C++ is disabled # turn on Python if we can
if ENABLE_CXX
C_COMPILE_DIR = libvipsCC cplusplus
C_DIST_DIR =
C_PKGCONFIG = vipsCC.pc vips-cpp.pc
# turn on Python if we can (requires C++)
if HAVE_PYTHON if HAVE_PYTHON
P_COMPILE_DIR = swig P_COMPILE_DIR = swig
P_DIST_DIR = P_DIST_DIR =
endif
else else
C_COMPILE_DIR =
C_DIST_DIR = libvipsCC cplusplus
C_PKGCONFIG =
P_COMPILE_DIR = P_COMPILE_DIR =
P_DIST_DIR = swig P_DIST_DIR = swig
endif endif
@ -39,12 +28,13 @@ endif
SUBDIRS = \ SUBDIRS = \
libvips \ libvips \
libvipsCC \
cplusplus \
tools \ tools \
po \ po \
man \ man \
doc \ doc \
test \ test \
$(C_COMPILE_DIR) \
$(P_COMPILE_DIR) \ $(P_COMPILE_DIR) \
$(P8_COMPILE_DIR) \ $(P8_COMPILE_DIR) \
$(D_BUILD_DIR) $(D_BUILD_DIR)
@ -60,13 +50,12 @@ EXTRA_DIST = \
acinclude.m4 \ acinclude.m4 \
depcomp \ depcomp \
README.md \ README.md \
$(C_DIST_DIR) \
$(P_DIST_DIR) \ $(P_DIST_DIR) \
$(P8_DIST_DIR) \ $(P8_DIST_DIR) \
$(D_DIST_DIR) $(D_DIST_DIR)
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = vips.pc $(C_PKGCONFIG) pkgconfig_DATA = vips.pc vipsCC.pc vips-cpp.pc
if ENABLE_DOCS if ENABLE_DOCS
install-exec-hook: install-exec-hook:

1
TODO
View File

@ -1,3 +1,4 @@
- use vips_resize() in vipsthumbnail? - use vips_resize() in vipsthumbnail?
should the sharpening filter be selectable? should the sharpening filter be selectable?

View File

@ -272,47 +272,6 @@ AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AM_WITH_DMALLOC AM_WITH_DMALLOC
# vips_PROG_CXX_WORKS
# Check whether the C++ compiler works.
AC_DEFUN([vips_PROG_CXX_WORKS],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_CACHE_CHECK([whether the C++ compiler works],
[vips_cv_prog_cxx_works],
[AC_LANG_PUSH([C++])
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[vips_cv_prog_cxx_works=yes],
[vips_cv_prog_cxx_works=no])
AC_LANG_POP([C++])])
])
# option to build without C++
# handy for some embedded applications
# also, including C++ source causes link problems on some
# platforms, so have an option to disable it
AC_ARG_ENABLE(cxx,
AS_HELP_STRING([--enable-cxx], [build C++ components (default: test)]))
if test x"$enable_cxx" != x"no"; then
vips_PROG_CXX_WORKS
if test x"$vips_cv_prog_cxx_works" = x"yes"; then
AC_DEFINE(ENABLE_CXX,1,[build C++ components])
AM_CONDITIONAL(ENABLE_CXX, true)
# need -lstdc++ for (eg.) the C++ format loaders
# this gets added to vips.pc to help mingw and friends link programs
# using libvips
if test x"$vips_needs_stdcpp" != x"no"; then
VIPS_CXX_LIBS="-lstdc++"
fi
enable_cxx=yes
fi
fi
if test x"$enable_cxx" != x"yes"; then
AM_CONDITIONAL(ENABLE_CXX, false)
VIPS_CXX_LIBS=""
enable_cxx=no
fi
# we need a fully expanded version of $libdir # we need a fully expanded version of $libdir
# without this we get something like # without this we get something like
# define VIPS_LIBDIR ${exec_prefix}/lib # define VIPS_LIBDIR ${exec_prefix}/lib
@ -812,7 +771,7 @@ else
AM_CONDITIONAL(HAVE_PYTHON, false) AM_CONDITIONAL(HAVE_PYTHON, false)
fi fi
# Gather all up for VIPS_CFLAGS, VIPS_INCLUDES, VIPS_LIBS and VIPS_CXX_LIBS # Gather all up for VIPS_CFLAGS, VIPS_INCLUDES, VIPS_LIBS
# sort includes to get longer, more specific dirs first # sort includes to get longer, more specific dirs first
# helps, for example, selecting graphicsmagick over imagemagick # helps, for example, selecting graphicsmagick over imagemagick
VIPS_CFLAGS=`for i in $VIPS_CFLAGS $GTHREAD_CFLAGS $REQUIRED_CFLAGS $PANGOFT2_CFLAGS $GSF_CFLAGS $FFTW_CFLAGS $MAGICK_CFLAGS $PNG_CFLAGS $EXIF_CFLAGS $MATIO_CFLAGS $CFITSIO_CFLAGS $LIBWEBP_CFLAGS $OPENEXR_CFLAGS $OPENSLIDE_CFLAGS $ORC_CFLAGS $TIFF_CFLAGS $LCMS_CFLAGS VIPS_CFLAGS=`for i in $VIPS_CFLAGS $GTHREAD_CFLAGS $REQUIRED_CFLAGS $PANGOFT2_CFLAGS $GSF_CFLAGS $FFTW_CFLAGS $MAGICK_CFLAGS $PNG_CFLAGS $EXIF_CFLAGS $MATIO_CFLAGS $CFITSIO_CFLAGS $LIBWEBP_CFLAGS $OPENEXR_CFLAGS $OPENSLIDE_CFLAGS $ORC_CFLAGS $TIFF_CFLAGS $LCMS_CFLAGS
@ -829,7 +788,6 @@ AC_SUBST(VIPS_LIBDIR)
AC_SUBST(VIPS_CFLAGS) AC_SUBST(VIPS_CFLAGS)
AC_SUBST(VIPS_INCLUDES) AC_SUBST(VIPS_INCLUDES)
AC_SUBST(VIPS_LIBS) AC_SUBST(VIPS_LIBS)
AC_SUBST(VIPS_CXX_LIBS)
AC_SUBST(PACKAGES_USED) AC_SUBST(PACKAGES_USED)
AC_SUBST(EXTRA_LIBS_USED) AC_SUBST(EXTRA_LIBS_USED)
@ -893,7 +851,6 @@ native OS X: $vips_os_darwin
open files in binary mode: $vips_binary_open open files in binary mode: $vips_binary_open
enable debug: $enable_debug enable debug: $enable_debug
build deprecated components: $enable_deprecated build deprecated components: $enable_deprecated
build C++ components: $enable_cxx
build docs with gtkdoc: $enable_gtk_doc build docs with gtkdoc: $enable_gtk_doc
install docs: $enable_docs install docs: $enable_docs
gobject introspection: $found_introspection gobject introspection: $found_introspection

View File

@ -33,13 +33,8 @@ lib_LTLIBRARIES = libvips.la
# empty means default to C linking # empty means default to C linking
libvips_la_SOURCES = libvips_la_SOURCES =
# if we have C++ components enabled, make sure we link the top-level with c++ # make sure we link the top-level with c++
#
# sadly the if/endif isn't enough to stop automake detecting a c++ link even
# when c++ is disabled ... comment out this line if you have linking problems
if ENABLE_CXX
nodist_EXTRA_libvips_la_SOURCES = resample/dummy2.cc nodist_EXTRA_libvips_la_SOURCES = resample/dummy2.cc
endif
# DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end
libvips_la_LIBADD = \ libvips_la_LIBADD = \
@ -60,10 +55,6 @@ libvips_la_LIBADD = \
video/libvideo.la \ video/libvideo.la \
@VIPS_LIBS@ @VIPS_LIBS@
if ENABLE_CXX
libvips_la_LIBADD += @VIPS_CXX_LIBS@
endif
libvips_la_LDFLAGS = \ libvips_la_LDFLAGS = \
-no-undefined \ -no-undefined \
-version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@ -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@
@ -89,9 +80,6 @@ AM_LDFLAGS = \
@INTROSPECTION_LIBS@ \ @INTROSPECTION_LIBS@ \
@LDFLAGS@ @LDFLAGS@
LDADD = @INTROSPECTION_LIBS@ @VIPS_CFLAGS@ libvips.la @VIPS_LIBS@ LDADD = @INTROSPECTION_LIBS@ @VIPS_CFLAGS@ libvips.la @VIPS_LIBS@
if ENABLE_CXX
LDADD += @VIPS_CXX_LIBS@
endif
noinst_PROGRAMS = \ noinst_PROGRAMS = \
introspect introspect

View File

@ -1,9 +1,3 @@
# only build the C++ stuff if ENABLE_CXX
# you'd think we could just define a couple of variables, but that seems to
# confuse libtool and make it link the library with g++
# instead, have two completely different paths
if ENABLE_CXX
libresample_la_SOURCES = \ libresample_la_SOURCES = \
affine.c \ affine.c \
quadratic.c \ quadratic.c \
@ -23,29 +17,6 @@ libresample_la_SOURCES = \
EXTRA_DIST = \ EXTRA_DIST = \
dummy2.cc dummy2.cc
else
libresample_la_SOURCES = \
resample.c \
similarity.c \
presample.h \
resize.c \
shrink.c \
affine.c \
interpolate.c \
quadratic.c \
transform.c
EXTRA_DIST = \
dummy2.cc \
bicubic.cpp \
lbb.cpp \
nohalo.cpp \
vsqbs.cpp \
templates.h
endif
noinst_LTLIBRARIES = libresample.la noinst_LTLIBRARIES = libresample.la
AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@

View File

@ -12,9 +12,6 @@ vipsthumbnail_SOURCES = vipsthumbnail.c
AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
AM_LDFLAGS = @LDFLAGS@ AM_LDFLAGS = @LDFLAGS@
LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@
if ENABLE_CXX
LDADD += @VIPS_CXX_LIBS@
endif
bin_SCRIPTS = \ bin_SCRIPTS = \
light_correct \ light_correct \