summaryrefslogtreecommitdiffstats
path: root/meta/packages/webkit/files/configure.ac
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2008-01-30 21:12:28 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2008-01-30 21:12:28 +0000
commit6324a8e01afdc7b19cc8b091503d78d8c75b0167 (patch)
tree6d4f7b0bca1651f74d4640a82b7aa0f76f7a6cfc /meta/packages/webkit/files/configure.ac
parent5d57d6e1b2d3fa8ad11f798803d5d6d49f9af1c0 (diff)
downloadpoky-6324a8e01afdc7b19cc8b091503d78d8c75b0167.tar.gz
webkit-gtk: merge with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3639 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/webkit/files/configure.ac')
-rw-r--r--meta/packages/webkit/files/configure.ac384
1 files changed, 384 insertions, 0 deletions
diff --git a/meta/packages/webkit/files/configure.ac b/meta/packages/webkit/files/configure.ac
new file mode 100644
index 0000000000..05c25b94a8
--- /dev/null
+++ b/meta/packages/webkit/files/configure.ac
@@ -0,0 +1,384 @@
1AC_INIT([WebKit],[0.1],[http://bugs.webkit.org/])
2
3AC_PREREQ(2.59)
4
5AC_CONFIG_HEADERS([aconfig.h])
6AC_CONFIG_SRCDIR([WebCore/config.h])
7
8# see http://www.gnu.org/software/libtool/manual.html#Versioning
9LIBWEBKITGTK_VERSION=1:0:0
10AC_SUBST([LIBWEBKITGTK_VERSION])
11
12AM_INIT_AUTOMAKE([1.9 foreign tar-ustar subdir-objects])
13
14AM_MAINTAINER_MODE
15
16AC_CANONICAL_HOST
17
18# host checking - inspired by the GTK+ configure.in
19# TODO: os_mac, os_bsd
20AC_MSG_CHECKING([for native Win32])
21case "$host" in
22 *-*-mingw*)
23 os_win32=yes
24 ;;
25 *)
26 os_win32=no
27 ;;
28esac
29AC_MSG_RESULT([$os_win32])
30
31case "$host" in
32 *-*-linux*)
33 os_linux=yes
34 ;;
35 *-*-freebsd*)
36 os_freebsd=yes
37 ;;
38esac
39
40# If CXXFLAGS and CFLAGS are unset, default to -O2
41# This is to tell automake not to include '-g' if CXXFLAGS is not set
42# For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler
43if test -z "$CXXFLAGS"; then
44 CXXFLAGS="-O2"
45fi
46if test -z "$CFLAGS"; then
47 CFLAGS="-O2"
48fi
49
50# programs
51AC_DISABLE_STATIC
52AM_PROG_LIBTOOL
53AC_PROG_INSTALL
54AM_PROG_CC_STDC
55AC_PROG_CXX
56AC_PROG_CXX_C_O
57AM_PROG_CC_C_O
58
59AC_PATH_PROG(PERL, perl)
60if test -z "$PERL"; then
61 AC_MSG_ERROR([You need 'perl' to compile WebKit])
62fi
63
64AC_PATH_PROG(BISON, bison)
65if test -z "$BISON"; then
66 AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit])
67fi
68
69AC_PATH_PROG(FLEX, flex)
70if test -z "$FLEX"; then
71 AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit])
72fi
73
74AC_PATH_PROG(GPERF, gperf)
75if test -z "$GPERF"; then
76 AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
77fi
78
79AC_PATH_PROG(MV, mv)
80if test -z "$MV"; then
81 AC_MSG_ERROR([You need 'mv' to compile WebKit])
82fi
83
84# GTK+ port only
85# Check for glib-genmarshal and glib-mkenums
86AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
87AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
88
89# Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
90# doesn't exist)
91AC_LANG_PUSH([C++])
92AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
93AC_LANG_POP([C++])
94
95# C/C++ Language Features
96AC_C_CONST
97AC_C_INLINE
98AC_C_VOLATILE
99
100# C/C++ Headers
101AC_HEADER_STDC
102AC_HEADER_STDBOOL
103
104# pthread
105AC_CHECK_HEADERS([pthread.h],
106 AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exist]),
107 AC_MSG_ERROR([pthread support is required to build WebKit]))
108
109# libjpeg headers
110AC_CHECK_HEADERS([jpeglib.h])
111
112# check for pkg-config
113AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
114if test "$PKG_CONFIG" = "no"; then
115 AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed in your PATH])
116fi
117
118# check for icu-config
119AC_PATH_PROG(icu_config, icu-config, no)
120if test "$icu_config" = "no"; then
121 AC_MSG_ERROR([Cannot find icu-config. ICU library is needed.])
122fi
123ICU_CFLAGS=`$icu_config --cflags`
124ICU_LIBS=`$icu_config --ldflags`
125AC_SUBST([ICU_CFLAGS])
126AC_SUBST([ICU_LIBS])
127
128# determine the GDK/GTK+ target
129AC_MSG_CHECKING([the target for WebKit GTK+])
130AC_ARG_WITH(webkit_target,
131 AC_HELP_STRING([--with-webkit-target=@<:@x11/win32/quartz/directfb@:>@],
132 [Select webkit target [default=x11]]),
133 [],[with_webkit_target="x11"])
134
135case "$with_webkit_target" in
136 x11|win32|quartz|directfb) ;;
137 *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
138esac
139
140AC_MSG_RESULT([$with_webkit_target])
141
142# minimum base dependencies
143GLIB_REQUIRED_VERSION=2.0
144GOBJECT_REQUIRED_VERSION=2.0
145GTHREAD_REQUIRED_VERSION=2.0
146PANGO_REQUIRED_VERSION=1.0
147CAIRO_REQUIRED_VERSION=1.2
148FONTCONFIG_REQUIRED_VERSION=2.4
149FREETYPE2_REQUIRED_VERSION=9.0
150LIBCURL_REQUIRED_VERSION=7.15
151LIBXML_REQUIRED_VERSION=2.6
152
153# optional modules
154GTK_REQUIRED_VERSION=2.0
155LIBXSLT_REQUIRED_VERSION=1.1.7
156SQLITE_REQUIRED_VERSION=3.0
157GSTREAMER_REQUIRED_VERSION=0.10
158GNOME_VFS_REQUIRED_VERSION=2.0
159
160PKG_CHECK_MODULES([DEPENDENCIES],
161 [glib-2.0 >= $GLIB_REQUIRED_VERSION
162 gobject-2.0 >= $GOBJECT_REQUIRED_VERSION
163 gthread-2.0 >= $GTHREAD_REQUIRED_VERSION
164 gtk+-2.0 >= $GTK_REQUIRED_VERSION
165 pango >= $PANGO_REQUIRED_VERSION
166 libcurl >= $LIBCURL_REQUIRED_VERSION
167 cairo >= $CAIRO_REQUIRED_VERSION
168 cairo-ft,
169 fontconfig >= $FONTCONFIG_REQUIRED_VERSION
170 freetype2 >= $FREETYPE2_REQUIRED_VERSION
171 libxml-2.0 >= $LIBXML_REQUIRED_VERSION])
172AC_SUBST([DEPENDENCIES_CFLAGS])
173AC_SUBST([DEPENDENCIES_LIBS])
174
175# check whether to build with debugging enabled
176AC_MSG_CHECKING([whether to do a debug build])
177AC_ARG_ENABLE(debug,
178 AC_HELP_STRING([--enable-debug],
179 [turn on debugging [default=no]]),
180 [enable_debug="yes"],[enable_debug="no"])
181AC_MSG_RESULT([$enable_debug])
182
183# check whether to build with database support
184AC_MSG_CHECKING([whether to enable HTML5 client-side storage support])
185AC_ARG_ENABLE(database,
186 AC_HELP_STRING([--enable-database],
187 [enable HTML5 client-side storage support [default=no]]),
188 [],[enable_database="yes"])
189AC_MSG_RESULT([$enable_database])
190
191# check whether to build with icon database support
192AC_MSG_CHECKING([whether to enable icon database support])
193AC_ARG_ENABLE(icon_database,
194 AC_HELP_STRING([--enable-icon-database],
195 [enable icon database [default=no]]),
196 [],[enable_icon_database="no"])
197AC_MSG_RESULT([$enable_icon_database])
198
199# check whether to enable HTML5 audio/video support
200AC_MSG_CHECKING([whether to enable HTML5 video support])
201AC_ARG_ENABLE(video,
202 AC_HELP_STRING([--enable-video],
203 [enable HTML5 video support [default=no]]),
204 [enable_video="yes"],[enable_video="no"])
205AC_MSG_RESULT([$enable_video])
206
207# check whether to enable XPath support
208AC_MSG_CHECKING([whether to enable XPath support])
209AC_ARG_ENABLE(xpath,
210 AC_HELP_STRING([--enable-xpath],
211 [enable support for XPath [default=no]]),
212 [],[enable_xpath="yes"])
213AC_MSG_RESULT([$enable_xpath])
214
215# check whether to enable XSLT support
216AC_MSG_CHECKING([whether to enable XSLT support])
217AC_ARG_ENABLE(xslt,
218 AC_HELP_STRING([--enable-xslt],
219 [enable support for XSLT [default=no]]),
220 [],[enable_xslt="yes"])
221AC_MSG_RESULT([$enable_xslt])
222
223# check whether to enable SVG support
224AC_MSG_CHECKING([whether to enable SVG support])
225AC_ARG_ENABLE(svg,
226 AC_HELP_STRING([--enable-svg],
227 [enable support for SVG [default=no]]),
228 [],[enable_svg="no"])
229AC_MSG_RESULT([$enable_svg])
230
231# check whether to enable support for SVG animation
232AC_MSG_CHECKING([whether to enable support for SVG animataion])
233AC_ARG_ENABLE(svg_animation,
234 AC_HELP_STRING([--enable-svg-animation],
235 [enable support for SVG animation feature (experimental) [default=no]]),
236 [],[enable_svg_animation="no"])
237AC_MSG_RESULT([$enable_svg_animation])
238
239# check whether to enable support for SVG filters
240AC_MSG_CHECKING([whether to enable support for SVG filters])
241AC_ARG_ENABLE(svg_filters,
242 AC_HELP_STRING([--enable-svg-filters],
243 [enable support for SVG filters (experimental) [default=no]]),
244 [],[enable_svg_filters="no"])
245AC_MSG_RESULT([$enable_svg_filters])
246
247# check whether to enable support for SVG fonts
248AC_MSG_CHECKING([whether to enable support for SVG fonts])
249AC_ARG_ENABLE(svg_fonts,
250 AC_HELP_STRING([--enable-svg-fonts],
251 [enable support for SVG fonts (experimental) [default=no]]),
252 [],[enable_svg_fonts="no"])
253AC_MSG_RESULT([$enable_svg_fonts])
254
255# check whether to enable SVG As Image support
256AC_MSG_CHECKING([whether to enable SVG as Image support])
257AC_ARG_ENABLE(svg_as_image,
258 AC_HELP_STRING([--enable-svg-as-image],
259 [enable SVG as Image support (experimental) [default=no]]),
260 [],[enable_svg_as_image="no"])
261AC_MSG_RESULT([$enable_svg_as_image])
262
263# check whether to enable SVG USE element support
264AC_MSG_CHECKING([whether to enable support for SVG use element])
265AC_ARG_ENABLE(svg_use_element,
266 AC_HELP_STRING([--enable-svg-use-element],
267 [enable SVG use element support (experimental) [default=no]]),
268 [],[enable_svg_use_element="no"])
269AC_MSG_RESULT([$enable_svg_use_element])
270
271# check whether to enable code coverage
272AC_MSG_CHECKING([whether to enable code coverage support])
273AC_ARG_ENABLE(coverage,
274 AC_HELP_STRING([--enable-coverage],
275 [enable code coverage support [default=no]]),
276 [],[enable_coverage="no"])
277AC_MSG_RESULT([$enable_coverage])
278
279# Add '-g' flag to gcc if it's debug build
280if test "$enable_debug" = "yes"; then
281 CXXFLAGS="$CXXFLAGS -g"
282 CFLAGS="$CFLAGS -g"
283fi
284
285# check if sqlite 3 is available
286if test "$enable_icon_database" = "yes" || test "$enable_database" = "yes"; then
287 PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE_REQUIRED_VERSION])
288 AC_SUBST([SQLITE3_CFLAGS])
289 AC_SUBST([SQLITE3_LIBS])
290fi
291
292# check if libxslt is available
293if test "$enable_xslt" = "yes"; then
294 PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
295 AC_SUBST([LIBXSLT_CFLAGS])
296 AC_SUBST([LIBXSLT_LIBS])
297fi
298
299# check if gstreamer is available
300if test "$enable_video" = "yes"; then
301 PKG_CHECK_MODULES([GSTREAMER],
302 [gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
303 gstreamer-base-0.10,
304 gstreamer-plugins-base-0.10,
305 gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION])
306 AC_SUBST([GSTREAMER_CFLAGS])
307 AC_SUBST([GSTREAMER_LIBS])
308fi
309
310# check for code coverage support
311if test "$enable_coverage" = "yes"; then
312 COVERAGE_CFLAGS="-MD"
313 COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
314 AC_SUBST([COVERAGE_CFLAGS])
315 AC_SUBST([COVERAGE_LDFLAGS])
316fi
317
318# check for SVG features, enabling SVG if necessary
319if test "$enable_svg" = "no" && (\
320 test "$enable_svg_animation" = "yes" || \
321 test "$enable_svg_filters" = "yes" || \
322 test "$enable_svg_fonts" = "yes" || \
323 test "$enable_svg_as_image" = "yes" || \
324 test "$enable_svg_use_element" = "yes"); then
325
326 AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
327 enable_svg = yes
328 svg_flags = yes
329fi
330
331# OS conditionals
332AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
333AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
334AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
335AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
336
337# target conditionals
338AM_CONDITIONAL([TARGET_X11], [test "$with_webkit_target" = "x11"])
339AM_CONDITIONAL([TARGET_WIN32], [test "$with_webkit_target" = "win32"])
340AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_webkit_target" = "quartz"])
341AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_webkit_target" = "directfb"])
342
343# WebKit feature conditionals
344AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
345AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
346AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
347AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
348AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
349AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
350AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
351AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
352AM_CONDITIONAL([ENABLE_SVG_FILTERS],[test "$enable_svg_filters" = "yes"])
353AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
354AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
355AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use_element" = "yes"])
356AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
357AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
358
359AC_CONFIG_FILES([
360GNUmakefile
361WebKit/gtk/WebKitGtk.pc:WebKit/gtk/WebKitGtk.pc.in
362]
363)
364
365AC_OUTPUT
366
367echo "
368WebKit was configured with the following options:
369
370 Target : $with_webkit_target
371 Enable debug : $enable_debug
372 Code coverage support : $enable_coverage
373 HTML5 client-side storage support : $enable_database
374 HTML5 video element support : $enable_video
375 Icon database support : $enable_icon_database
376 SVG support : $enable_svg
377 SVG animation support : $enable_svg_animation
378 SVG filters support : $enable_svg_filters
379 SVG fonts support : $enable_svg_fonts
380 SVG as image support : $enable_svg_as_image
381 SVG use element support : $enable_svg_use_element
382 XPATH support : $enable_xpath
383 XSLT support : $enable_xslt
384"