summaryrefslogtreecommitdiff
path: root/media-gfx/inkscape/files/inkscape-0.92.1-automagic.patch
blob: db069d1e87cc8d1355553ad97404d9adef4b760e (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 -ruN inkscape-0.92.1.orig/configure.ac inkscape-0.92.1/configure.ac
--- inkscape-0.92.1.orig/configure.ac	2017-02-14 00:46:57.000000000 +0100
+++ inkscape-0.92.1/configure.ac	2017-05-12 21:20:45.880842301 +0200
@@ -201,11 +201,14 @@
 dnl Check for OpenMP 
 dnl ******************************
 AC_OPENMP
-if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
-	openmp_ok=yes
-	dnl We have it, now set up the flags
-	CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
-	AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
+openmp_ok="no"
+if test "x$enable_openmp" = "xyes"; then
+	if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
+		openmp_ok=yes
+		dnl We have it, now set up the flags
+		CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+		AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
+	fi
 fi
 
 dnl ********************
@@ -222,9 +225,15 @@
 dnl ******************************
 dnl Check for libexif
 dnl ******************************
-PKG_CHECK_MODULES(EXIF, libexif, exif_ok=yes, exif_ok=no)
-if test "x$exif_ok" = "xyes"; then
-   AC_DEFINE(HAVE_EXIF, 1, [Use libexif])
+AC_ARG_ENABLE(exif,
+	AS_HELP_STRING([--enable-exif], [compile with EXIF support]),
+	enable_exif=$enableval,enable_exif=no)
+
+if test "x$enable_exif" = "xyes"; then
+	PKG_CHECK_MODULES(EXIF, libexif, exif_ok=yes, exif_ok=no)
+	if test "x$exif_ok" = "xyes"; then
+		AC_DEFINE(HAVE_EXIF, 1, [Use libexif])
+	fi
 fi
 AC_SUBST(EXIF_LIBS)
 AC_SUBST(EXIF_CFLAGS)
@@ -232,10 +241,16 @@
 dnl ******************************
 dnl Check for libjpeg
 dnl ******************************
-AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no)], jpeg_ok=no)
-if test "x$jpeg_ok" = "xyes"; then
-   LIBS="-ljpeg $LIBS"
-   AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
+AC_ARG_ENABLE(jpeg,
+	AS_HELP_STRING([--enable-jpeg], [compile with JPEG support]),
+	enable_jpeg=$enableval,enable_jpeg=no)
+
+if test "x$enable_jpeg" = "xyes"; then
+	AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no)], jpeg_ok=no)
+	if test "x$jpeg_ok" = "xyes"; then
+		LIBS="-ljpeg $LIBS"
+		AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
+	fi
 fi
 
 dnl This check is to get a FIONREAD definition on Solaris 8
@@ -614,9 +629,16 @@
 dnl Check for ImageMagick Magick++ 
 dnl ******************************
 
-PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
-if test "x$magick_ok" = "xyes"; then
-      AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
+AC_ARG_ENABLE(magick,
+       AS_HELP_STRING([--enable-magick], [compile with Image Magick++ support for bitmap effects]),
+       enable_magick=$enableval,enable_magick=no)
+
+magick_ok="no"
+if test "x$enable_magick" = "xyes"; then
+	PKG_CHECK_MODULES(IMAGEMAGICK, Magick++, magick_ok=yes, magick_ok=no)
+	if test "x$magick_ok" = "xyes"; then
+		AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
+	fi
 fi
 AM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
 
@@ -712,6 +734,10 @@
 
 AC_CHECK_HEADER([boost/unordered_set.hpp], [AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1, [Boost unordered_set (Boost >= 1.36)])], [])
 
+
+AC_ARG_WITH([gtkspell],
+	AS_HELP_STRING([--without-gtkspell], [disable gtk spelling widget]),[with_gtkspell=$withval], [with_gtkspell=yes])
+
 dnl *********************************
 dnl   Allow experimental GTK+3 build
 dnl *********************************
@@ -723,11 +749,13 @@
 if test "x$enable_gtk3" = "xyes"; then
 
 	ink_spell_pkg=
-	if pkg-config --exists gtkspell-3.0; then
-		ink_spell_pkg=gtkspell-3.0
-		AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
+	if test "x$with_gtkspell" = "xyes"; then
+		if pkg-config --exists gtkspell-3.0; then
+			ink_spell_pkg=gtkspell-3.0
+			AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
+		fi
 	fi
-
+	
 	PKG_CHECK_MODULES(GTK,
 			  gtk+-3.0  >= 3.8
 			  gdk-3.0   >= 3.8
@@ -804,11 +832,13 @@
 else
 
 	ink_spell_pkg=
-	if pkg-config --exists gtkspell-2.0; then
-		ink_spell_pkg=gtkspell-2.0
-		AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
+	if test "x$with_gtkspell" = "xyes"; then
+		if pkg-config --exists gtkspell-2.0; then
+			ink_spell_pkg=gtkspell-2.0
+			AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
+		fi
 	fi
-
+	
 	PKG_CHECK_MODULES(GTK,
 			  gtk+-2.0  >= 2.24
 			  $ink_spell_pkg)
@@ -931,12 +961,17 @@
 dnl **************************
 dnl Check for aspell 
 dnl ******************************
-AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
-if test "x$aspell_ok" = "xyes"; then
-	AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
-  INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
-else
-	AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
+AC_ARG_WITH([aspell],
+	AS_HELP_STRING([--without-aspell], [disable aspell spell checker]),[with_aspell=$withval], [with_aspell=yes])
+
+if test "x$with_aspell" = "xyes"; then
+	AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
+	if test "x$aspell_ok" = "xyes"; then
+		AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
+		INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
+	else
+		AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
+	fi
 fi
 
 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.