4 AM_INIT_AUTOMAKE([1.7 -Wno-portability])
6 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_MACRO_DIR([m4])
23 *[\ \ ]${flag}[\ \ ]*) ;;
24 *) result="${flag} ${result}" ;;
33 dnl =====================Internationalization==================================
35 AC_SUBST(GETTEXT_PACKAGE)
36 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
38 IT_PROG_INTLTOOL([0.35.0])
40 dnl ============================libffi=========================================
41 PKG_CHECK_MODULES(FFI, libffi, have_ffi_pkgconfig=yes, have_ffi_pkgconfig=no)
43 if test x"$have_ffi_pkgconfig" = xno ; then
44 AC_MSG_CHECKING(for ffi.h)
46 AC_TRY_CPP([#include <ffi.h>], have_ffi_h=yes, have_ffi_h=no)
47 if test x"$have_ffi_h" = x"yes"; then
49 if test x"$with_ffi" = x"yes" || test x"$with_ffi" = x"auto"; then
55 AC_SEARCH_LIBS(ffi_call,ffi,,AC_MSG_ERROR([libffi not found]),$other_LIBS)
56 if test x"$ac_cv_search_ffi_call" = x"none required" ; then
57 FFI_LDFLAGS=$other_LIBS
59 FFI_LDFLAGS="$ac_cv_search_ffi_call $other_LIBS"
63 if test x"$have_ffi_h" != x"yes" ; then
64 AC_MSG_ERROR([ffi.h not found])
69 AC_MSG_RESULT([$have_ffi_h])
75 dnl =======================WebKit ContextGroup=================================
81 LIBS=`pkg-config --libs webkit-1.0`
82 AC_CHECK_LIB(webkit-1.0, JSContextGroupCreate,,
83 AC_MSG_ERROR([The installed version of WebKit is too old. Seed requires WebKit SVN revision 35442 or greater.]))
88 dnl =========================Introspection=====================================
89 PKG_CHECK_MODULES(GOBJECT_INTROSPECTION, gobject-introspection-1.0 >= 0.6.3)
90 AC_SUBST(GOBJECT_INTROSPECTION_CFLAGS)
91 AC_SUBST(GOBJECT_INTROSPECTION_LDFLAGS)
93 dnl ========================GNOME-js common====================================
94 PKG_CHECK_MODULES(GNOME_JS, gnome-js-common)
95 m4_define([gnome-js-dir], [`pkg-config --variable=moduledir gnome-js-common`])
97 dnl =============================Modules=======================================
99 AC_ARG_ENABLE(canvas-module,
100 AC_HELP_STRING([--enable-canvas-module],
101 [enable the canvas Seed module. [default=yes]]),
102 [want_canvas_module=$enableval],[want_canvas_module="yes"])
104 if test x"$want_canvas_module" == x"yes" ; then
105 PKG_CHECK_MODULES(CAIRO, cairo)
106 AC_SUBST(CAIRO_CFLAGS)
107 AC_SUBST(CAIRO_LDFLAGS)
108 PKG_CHECK_MODULES(GDK, gdk-2.0)
110 AC_SUBST(GDK_LDFLAGS)
113 AM_CONDITIONAL(BUILD_CANVAS_MODULE, test "x$want_canvas_module" = "xyes")
114 AC_SUBST(BUILD_CANVAS_MODULE)
118 dnl ==== readline ====
119 AC_ARG_ENABLE(readline-module,
120 AC_HELP_STRING([--enable-readline-module],
121 [enable the readline Seed module. [default=yes]]),
122 [want_readline_module=$enableval],[want_readline_module="yes"])
123 if test x"$want_readline_module" == x"yes" ; then
124 AC_CHECK_HEADER([readline/readline.h],,AC_MSG_ERROR([the readline library is not installed.]))
127 AM_CONDITIONAL(BUILD_READLINE_MODULE, test "x$want_readline_module" = "xyes")
128 AC_SUBST(BUILD_READLINE_MODULE)
130 dnl ==== multiprocessing ====
131 AC_ARG_ENABLE(multiprocessing-module,
132 AC_HELP_STRING([--enable-multiprocessing-module],
133 [enable the multiprocessing Seed module. [default=yes]]),
134 [want_multiprocessing_module=$enableval],
135 [want_multiprocessing_module="yes"])
137 AM_CONDITIONAL(BUILD_MULTIPROCESSING_MODULE, test "x$want_multiprocessing_module" = "xyes")
138 AC_SUBST(BUILD_MULTIPROCESSING_MODULE)
141 AC_ARG_ENABLE(sqlite-module,
142 AC_HELP_STRING([--enable-sqlite-module],
143 [enable the sqlite Seed module. [default=yes]]),
144 [want_sqlite_module=$enableval],[want_sqlite_module="yes"])
146 if test x"$want_sqlite_module" == x"yes" ; then
147 PKG_CHECK_MODULES(SQLITE, sqlite3)
148 AC_SUBST(SQLITE_CFLAGS)
149 AC_SUBST(SQLITE_LDFLAGS)
152 AM_CONDITIONAL(BUILD_SQLITE_MODULE, test "x$want_sqlite_module" = "xyes")
153 AC_SUBST(BUILD_SQLITE_MODULE)
155 dnl ==== Example ====
156 AC_ARG_ENABLE(example-module,
157 AC_HELP_STRING([--enable-example-module],
158 [enable the example Seed module. [default=yes]]),
159 [want_example_module=$enableval],[want_example_module="yes"])
161 AM_CONDITIONAL(BUILD_EXAMPLE_MODULE, test "x$want_example_module" = "xyes")
162 AC_SUBST(BUILD_EXAMPLE_MODULE)
165 AC_ARG_ENABLE(dbus-module,
166 AC_HELP_STRING([--enable-dbus-module],
167 [enable the dbus Seed module. [default=yes]]),
168 [want_dbus_module=$enableval],[want_dbus_module="yes"])
171 AM_CONDITIONAL(BUILD_DBUS_MODULE, test "x$want_dbus_module" = "xyes")
172 AC_SUBST(BUILD_DBUS_MODULE)
174 if test x"$want_dbus_module" == x"yes" ; then
175 PKG_CHECK_MODULES(DBUS, dbus-1)
176 AC_SUBST(DBUS_CFLAGS)
177 AC_SUBST(DBUS_LDFLAGS)
178 PKG_CHECK_MODULES(DBUSGLIB, dbus-glib-1)
179 AC_SUBST(DBUSGLIB_CFLAGS)
180 AC_SUBST(DBUSGLIB_LDFLAGS)
184 AC_ARG_ENABLE(os-module,
185 AC_HELP_STRING([--enable-os-module],
186 [enable the os Seed module. [default=yes]]),
187 [want_os_module=$enableval],[want_os_module="yes"])
190 AM_CONDITIONAL(BUILD_OS_MODULE, test "x$want_os_module" = "xyes")
191 AC_SUBST(BUILD_OS_MODULE)
194 AC_ARG_ENABLE(os-module,
195 AC_HELP_STRING([--enable-os-module],
196 [enable the os Seed module. [default=yes]]),
197 [want_os_module=$enableval],[want_os_module="yes"])
200 AM_CONDITIONAL(BUILD_OS_MODULE, test "x$want_os_module" = "xyes")
201 AC_SUBST(BUILD_OS_MODULE)
204 AC_ARG_ENABLE(libxml-module,
205 AC_HELP_STRING([--enable-libxml-module],
206 [enable the libxml Seed module. [default=yes]]),
207 [want_libxml_module=$enableval],[want_libxml_module="yes"])
209 if test x"$want_libxml_module" == x"yes" ; then
210 PKG_CHECK_MODULES(LIBXML, libxml-2.0)
211 AC_SUBST(LIBXML_CFLAGS)
212 AC_SUBST(LIBXML_LDFLAGS)
215 AM_CONDITIONAL(BUILD_LIBXML_MODULE, test "x$want_libxml_module" = "xyes")
216 AC_SUBST(BUILD_LIBXML_MODULE)
219 AC_ARG_ENABLE(os-module,
220 AC_HELP_STRING([--enable-os-module],
221 [enable the os Seed module. [default=yes]]),
222 [want_os_module=$enableval],[want_os_module="yes"])
225 AM_CONDITIONAL(BUILD_OS_MODULE, test "x$want_os_module" = "xyes")
226 AC_SUBST(BUILD_OS_MODULE)
228 dnl ==== gtkbuilder ====
229 AC_ARG_ENABLE(gtkbuilder-module,
230 AC_HELP_STRING([--enable-gtkbuilder-module],
231 [enable the gtkbuilder Seed module. [default=yes]]),
232 [want_gtkbuilder_module=$enableval],[want_gtkbuilder_module="yes"])
234 if test x"$want_gtkbuilder_module" == x"yes" ; then
235 PKG_CHECK_MODULES(GTK, gtk+-2.0)
237 AC_SUBST(GTK_LDFLAGS)
240 AM_CONDITIONAL(BUILD_GTKBUILDER_MODULE, test "x$want_gtkbuilder_module" = "xyes")
241 AC_SUBST(BUILD_GTKBUILDER_MODULE)
245 AC_ARG_ENABLE(cairo-module,
246 AC_HELP_STRING([--enable-cairo-module],
247 [enable the cairo Seed module. [default=yes]]),
248 [want_cairo_module=$enableval],[want_cairo_module="yes"])
250 if test x"$want_cairo_module" == x"yes" ; then
251 PKG_CHECK_MODULES(CAIRO, cairo)
252 AC_SUBST(CAIRO_CFLAGS)
253 AC_SUBST(CAIRO_LDFLAGS)
256 AM_CONDITIONAL(BUILD_CAIRO_MODULE, test "x$want_cairo_module" = "xyes")
257 AC_SUBST(BUILD_CAIRO_MODULE)
261 dnl =========================turtle example====================================
262 AC_ARG_ENABLE(turtle-example,
263 AC_HELP_STRING([--enable-turtle-example],
264 [enable the turtle graphics example. [default=yes]]),
265 [want_turtle_example=$enableval],[want_turtle_example="yes"])
267 if test x"$want_turtle_example" == x"yes" ; then
268 PKG_CHECK_MODULES(GTK, gtk+-2.0)
273 AM_CONDITIONAL(BUILD_TURTLE_EXAMPLE, test "x$want_turtle_example" = "xyes")
274 AC_SUBST(BUILD_TURTLE_EXAMPLE)
276 dnl =========================Install Examples==================================
277 AC_ARG_ENABLE(examples,
278 AC_HELP_STRING([--enable-examples],
279 [install JavaScript examples. [default=yes]]),
280 [enable_examples=$enableval],[enable_examples="yes"])
281 AM_CONDITIONAL(BUILD_SEED_EXAMPLES, test "x$enable_examples" = "xyes")
282 AC_SUBST(BUILD_SEED_EXAMPLES)
284 dnl =============================Debug=========================================
286 AC_HELP_STRING([--enable-debug],
287 [enable verbose debugging. [default=no]]),
288 [enable_debug="yes"],[enable_debug="no"])
290 if test "x$enable_debug" = "xyes"; then
291 SEED_DEBUG_CFLAGS="-DSEED_ENABLE_DEBUG -g"
294 SEED_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
297 AC_SUBST(SEED_DEBUG_CFLAGS)
299 dnl ===========================Profiling=======================================
300 AC_ARG_ENABLE(profile,
301 AC_HELP_STRING([--enable-profile],
302 [turn on profiling [default=no]]),
303 [enable_profile="yes"],[enable_profile="no"])
305 AC_ARG_ENABLE(profile-modules,
306 AC_HELP_STRING([--enable-profile-modules],
307 [turn on profiling for modules [default=no]]),
308 [enable_profile_modules="yes"],[enable_profile_modules="no"])
310 if test "x$enable_profile" = "xyes"; then
311 SEED_PROFILE_CFLAGS="-fprofile-arcs -ftest-coverage"
312 SEED_PROFILE_LIBS="-lgcov"
316 if test "x$enable_profile" = "xno"; then
317 [enable_profile_modules="no"]
320 AC_SUBST(SEED_PROFILE_CFLAGS)
321 AC_SUBST(SEED_PROFILE_LIBS)
323 AM_CONDITIONAL(PROFILE_MODULES, test "x$enable_profile_modules" = "xyes")
325 dnl ===========================Darwin Build====================================
331 SEED_OSX_CFLAGS="-F/Applications/WebKit.app/Contents/Frameworks/10.5 -framework JavaScriptCore"
332 SEED_OSX_LDFLAGS="-F/Applications/WebKit.app/Contents/Frameworks/10.5 -framework JavaScriptCore"
335 PKG_CHECK_MODULES(WEBKIT, webkit-1.0)
336 AC_SUBST(WEBKIT_CFLAGS)
337 AC_SUBST(WEBKIT_LDFLAGS)
342 AC_SUBST(SEED_OSX_CFLAGS)
343 AC_SUBST(SEED_OSX_LDFLAGS)
345 AC_CHECK_HEADERS(pty.h)
347 dnl =============================gtk-doc=======================================
350 dnl =============================Output========================================
351 SHAVE_INIT([scripts])
358 doc/tutorial-standalone/tutorial.html
360 doc/modules/canvas/canvas.html
361 doc/modules/multiprocessing/multiprocessing.html
363 doc/modules/canvas/Makefile
364 doc/modules/multiprocessing/Makefile
365 doc/modules/readline/Makefile
366 doc/modules/gtkbuilder/Makefile
367 doc/modules/sqlite/Makefile
368 doc/modules/sandbox/Makefile
370 doc/mapping/mapping.html
373 scripts/shave-libtool
380 tests/javascript/Makefile
381 tests/javascript/gtypes/Makefile
382 tests/javascript/signals/Makefile
383 tests/javascript/structs/Makefile
387 doc/tutorial-standalone/Makefile
388 doc/reference/Makefile
391 examples/clutter-pad/Makefile
392 examples/clutter-pad/examples/Makefile
393 examples/clutter-shader/Makefile
394 examples/clutter-transitions/Makefile
395 examples/glib/Makefile
396 examples/browser/Makefile
397 examples/turtle/Makefile
398 examples/opengl/Makefile
399 examples/twitter/Makefile
400 examples/pong/Makefile
401 examples/same-seed/Makefile
402 examples/dbus/Makefile
403 examples/xml/Makefile
405 modules/example/Makefile
406 modules/sqlite/Makefile
407 modules/canvas/Makefile
408 modules/readline/Makefile
409 modules/Multiprocessing/Makefile
410 modules/sandbox/Makefile
412 modules/dbus/Makefile
413 modules/dbus/util/Makefile
414 modules/libxml/Makefile
415 modules/cairo/Makefile
416 modules/gtkbuilder/Makefile
424 Debug......................$enable_debug
425 Profiling/Coverage.........$enable_profile
426 Profiling for Modules......$enable_profile_modules
427 gtk-doc....................$enable_gtk_doc
430 Prefix.....................$prefix
431 Install examples...........$enable_examples
434 Canvas.....................$want_canvas_module
435 example....................$want_example_module
436 multiprocessing............$want_multiprocessing_module
437 readline...................$want_readline_module
438 SQLite.....................$want_sqlite_module
439 DBus.......................$want_dbus_module
440 libxml.....................$want_libxml_module
441 cairo......................$want_cairo_module
442 gtkbuilder.................$want_gtkbuilder_module
445 Turtle.....................$want_turtle_example
448 if test "x$want_readline_module" != "xyes"; then
449 echo "WARNING: The readline module is not enabled.
450 Without this, the Seed REPL will not work;
451 however, most Seed applications will still run.