aboutsummaryrefslogtreecommitdiff
path: root/libs/vips/patches/001-no_cpp.patch
blob: 72e841c5bbfce05cd31a2b5a9492c8ab42f005f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
diff -u --recursive --new-file vips-7.42.1-vanilla/configure.ac vips-7.42.1/configure.ac
--- vips-7.42.1-vanilla/configure.ac	2014-12-29 17:45:59.576995574 -0500
+++ vips-7.42.1/configure.ac	2014-12-29 17:59:03.698808601 -0500
@@ -264,7 +264,6 @@
 AC_PROG_AWK
 AC_PROG_CC
 AC_PROG_CC_STDC
-AC_PROG_CXX
 AC_C_CONST
 AC_C_RESTRICT
 AC_PROG_RANLIB
@@ -272,19 +271,6 @@
 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
@@ -292,24 +278,8 @@
 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
 
@@ -817,7 +787,6 @@
 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)
 
@@ -850,12 +819,6 @@
 	libvips/create/Makefile 
 	libvips/resample/Makefile 
 	libvips/video/Makefile 
-	libvipsCC/include/Makefile 
-	libvipsCC/include/vips/Makefile 
-	libvipsCC/Makefile 
-	cplusplus/include/Makefile 
-	cplusplus/include/vips/Makefile 
-	cplusplus/Makefile 
 	tools/Makefile 
 	tools/batch_crop 
 	tools/batch_image_convert 
@@ -866,7 +829,6 @@
 	test/Makefile 
 	test/variables.sh
 	swig/Makefile 
-	swig/vipsCC/Makefile 
 	man/Makefile
 	doc/Makefile
 	doc/reference/Makefile
diff -u --recursive --new-file vips-7.42.1-vanilla/libvips/Makefile.am vips-7.42.1/libvips/Makefile.am
--- vips-7.42.1-vanilla/libvips/Makefile.am	2014-12-29 17:45:59.590996100 -0500
+++ vips-7.42.1/libvips/Makefile.am	2014-12-29 17:59:32.053375826 -0500
@@ -33,14 +33,6 @@
 # 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
-nodist_EXTRA_libvips_la_SOURCES = resample/dummy2.cc
-endif
-
 # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end
 libvips_la_LIBADD = \
 	resample/libresample.la \
diff -u --recursive --new-file vips-7.42.1-vanilla/libvips/resample/Makefile.am vips-7.42.1/libvips/resample/Makefile.am
--- vips-7.42.1-vanilla/libvips/resample/Makefile.am	2014-12-29 17:45:59.591996138 -0500
+++ vips-7.42.1/libvips/resample/Makefile.am	2014-12-29 18:01:57.107188019 -0500
@@ -1,30 +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 \
-	resample.c \
-	similarity.c \
-	resize.c \
-	presample.h \
-	shrink.c \
-	interpolate.c \
-	transform.c \
-	bicubic.cpp \
-	lbb.cpp \
-	nohalo.cpp \
-	vsqbs.cpp \
-	templates.h 
-
-EXTRA_DIST = \
-	dummy2.cc 
-
-else
-
 libresample_la_SOURCES = \
 	resample.c \
 	similarity.c \
@@ -36,16 +9,6 @@
 	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@