From 346a9e70c0b096f84127449488e7dce6968d91c7 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 7 Feb 2015 10:37:13 +0000 Subject: [PATCH] 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 --- ChangeLog | 1 + Makefile.am | 19 ++++----------- TODO | 1 + configure.ac | 45 +----------------------------------- libvips/Makefile.am | 14 +---------- libvips/resample/Makefile.am | 29 ----------------------- tools/Makefile.am | 3 --- 7 files changed, 8 insertions(+), 104 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f6041b3..c344cefb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ - bump version for back-compat ABI change - added vips_image_memory(), an alias for vips_image_new_memory() - improvements to configure for python +- remove --disable-cxx configure flag 30/12/14 started 7.42.2 - C++ required output params were broken, thanks Lovell diff --git a/Makefile.am b/Makefile.am index 469b168f..fd3fea60 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,20 +1,9 @@ -# turn off C++ APIs if C++ is disabled -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++) +# turn on Python if we can if HAVE_PYTHON P_COMPILE_DIR = swig P_DIST_DIR = -endif - else -C_COMPILE_DIR = -C_DIST_DIR = libvipsCC cplusplus -C_PKGCONFIG = P_COMPILE_DIR = P_DIST_DIR = swig endif @@ -39,12 +28,13 @@ endif SUBDIRS = \ libvips \ + libvipsCC \ + cplusplus \ tools \ po \ man \ doc \ test \ - $(C_COMPILE_DIR) \ $(P_COMPILE_DIR) \ $(P8_COMPILE_DIR) \ $(D_BUILD_DIR) @@ -60,13 +50,12 @@ EXTRA_DIST = \ acinclude.m4 \ depcomp \ README.md \ - $(C_DIST_DIR) \ $(P_DIST_DIR) \ $(P8_DIST_DIR) \ $(D_DIST_DIR) pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = vips.pc $(C_PKGCONFIG) +pkgconfig_DATA = vips.pc vipsCC.pc vips-cpp.pc if ENABLE_DOCS install-exec-hook: diff --git a/TODO b/TODO index 7965a421..5a373313 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ + - use vips_resize() in vipsthumbnail? should the sharpening filter be selectable? diff --git a/configure.ac b/configure.ac index 43cbbdab..01ca4928 100644 --- a/configure.ac +++ b/configure.ac @@ -272,47 +272,6 @@ AC_PROG_INSTALL AC_PROG_LN_S 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 # without this we get something like # define VIPS_LIBDIR ${exec_prefix}/lib @@ -812,7 +771,7 @@ else AM_CONDITIONAL(HAVE_PYTHON, false) 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 # 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 @@ -829,7 +788,6 @@ AC_SUBST(VIPS_LIBDIR) AC_SUBST(VIPS_CFLAGS) AC_SUBST(VIPS_INCLUDES) AC_SUBST(VIPS_LIBS) -AC_SUBST(VIPS_CXX_LIBS) AC_SUBST(PACKAGES_USED) AC_SUBST(EXTRA_LIBS_USED) @@ -893,7 +851,6 @@ native OS X: $vips_os_darwin open files in binary mode: $vips_binary_open enable debug: $enable_debug build deprecated components: $enable_deprecated -build C++ components: $enable_cxx build docs with gtkdoc: $enable_gtk_doc install docs: $enable_docs gobject introspection: $found_introspection diff --git a/libvips/Makefile.am b/libvips/Makefile.am index a300aa8a..78a366d3 100644 --- a/libvips/Makefile.am +++ b/libvips/Makefile.am @@ -33,13 +33,8 @@ lib_LTLIBRARIES = libvips.la # empty means default to C linking libvips_la_SOURCES = -# if we have C++ components enabled, 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 +# make sure we link the top-level with c++ nodist_EXTRA_libvips_la_SOURCES = resample/dummy2.cc -endif # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end libvips_la_LIBADD = \ @@ -60,10 +55,6 @@ libvips_la_LIBADD = \ video/libvideo.la \ @VIPS_LIBS@ -if ENABLE_CXX -libvips_la_LIBADD += @VIPS_CXX_LIBS@ -endif - libvips_la_LDFLAGS = \ -no-undefined \ -version-info @LIBRARY_CURRENT@:@LIBRARY_REVISION@:@LIBRARY_AGE@ @@ -89,9 +80,6 @@ AM_LDFLAGS = \ @INTROSPECTION_LIBS@ \ @LDFLAGS@ LDADD = @INTROSPECTION_LIBS@ @VIPS_CFLAGS@ libvips.la @VIPS_LIBS@ -if ENABLE_CXX -LDADD += @VIPS_CXX_LIBS@ -endif noinst_PROGRAMS = \ introspect diff --git a/libvips/resample/Makefile.am b/libvips/resample/Makefile.am index 6f9c8bda..afc0896c 100644 --- a/libvips/resample/Makefile.am +++ b/libvips/resample/Makefile.am @@ -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 = \ affine.c \ quadratic.c \ @@ -23,29 +17,6 @@ libresample_la_SOURCES = \ EXTRA_DIST = \ 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 AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ diff --git a/tools/Makefile.am b/tools/Makefile.am index d1d49de0..e9d0f625 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -12,9 +12,6 @@ vipsthumbnail_SOURCES = vipsthumbnail.c AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@ AM_LDFLAGS = @LDFLAGS@ LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@ -if ENABLE_CXX -LDADD += @VIPS_CXX_LIBS@ -endif bin_SCRIPTS = \ light_correct \