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 =============================Modules=======================================
95 AC_ARG_ENABLE(canvas-module,
96 AC_HELP_STRING([--enable-canvas-module],
97 [enable the canvas Seed module. [default=yes]]),
98 [want_canvas_module=$enableval],[want_canvas_module="yes"])
100 if test x"$want_canvas_module" == x"yes" ; then
101 PKG_CHECK_MODULES(CAIRO, cairo)
102 AC_SUBST(CAIRO_CFLAGS)
103 AC_SUBST(CAIRO_LDFLAGS)
104 PKG_CHECK_MODULES(GDK, gdk-2.0)
106 AC_SUBST(GDK_LDFLAGS)
109 AM_CONDITIONAL(BUILD_CANVAS_MODULE, test "x$want_canvas_module" = "xyes")
110 AC_SUBST(BUILD_CANVAS_MODULE)
114 dnl ==== readline ====
115 AC_ARG_ENABLE(readline-module,
116 AC_HELP_STRING([--enable-readline-module],
117 [enable the readline Seed module. [default=yes]]),
118 [want_readline_module=$enableval],[want_readline_module="yes"])
119 if test x"$want_readline_module" == x"yes" ; then
120 AC_CHECK_HEADER([readline/readline.h],,AC_MSG_ERROR([the readline library is not installed.]))
123 AM_CONDITIONAL(BUILD_READLINE_MODULE, test "x$want_readline_module" = "xyes")
124 AC_SUBST(BUILD_READLINE_MODULE)
126 dnl ==== multiprocessing ====
127 AC_ARG_ENABLE(multiprocessing-module,
128 AC_HELP_STRING([--enable-multiprocessing-module],
129 [enable the multiprocessing Seed module. [default=yes]]),
130 [want_multiprocessing_module=$enableval],
131 [want_multiprocessing_module="yes"])
133 AM_CONDITIONAL(BUILD_MULTIPROCESSING_MODULE, test "x$want_multiprocessing_module" = "xyes")
134 AC_SUBST(BUILD_MULTIPROCESSING_MODULE)
137 AC_ARG_ENABLE(sqlite-module,
138 AC_HELP_STRING([--enable-sqlite-module],
139 [enable the sqlite Seed module. [default=yes]]),
140 [want_sqlite_module=$enableval],[want_sqlite_module="yes"])
142 if test x"$want_sqlite_module" == x"yes" ; then
143 PKG_CHECK_MODULES(SQLITE, sqlite3)
144 AC_SUBST(SQLITE_CFLAGS)
145 AC_SUBST(SQLITE_LDFLAGS)
148 AM_CONDITIONAL(BUILD_SQLITE_MODULE, test "x$want_sqlite_module" = "xyes")
149 AC_SUBST(BUILD_SQLITE_MODULE)
151 dnl ==== Example ====
152 AC_ARG_ENABLE(example-module,
153 AC_HELP_STRING([--enable-example-module],
154 [enable the example Seed module. [default=yes]]),
155 [want_example_module=$enableval],[want_example_module="yes"])
157 AM_CONDITIONAL(BUILD_EXAMPLE_MODULE, test "x$want_example_module" = "xyes")
158 AC_SUBST(BUILD_EXAMPLE_MODULE)
161 AC_ARG_ENABLE(dbus-module,
162 AC_HELP_STRING([--enable-dbus-module],
163 [enable the dbus Seed module. [default=yes]]),
164 [want_dbus_module=$enableval],[want_dbus_module="yes"])
167 AM_CONDITIONAL(BUILD_DBUS_MODULE, test "x$want_dbus_module" = "xyes")
168 AC_SUBST(BUILD_DBUS_MODULE)
170 if test x"$want_dbus_module" == x"yes" ; then
171 PKG_CHECK_MODULES(DBUS, dbus-1)
172 AC_SUBST(DBUS_CFLAGS)
173 AC_SUBST(DBUS_LDFLAGS)
174 PKG_CHECK_MODULES(DBUSGLIB, dbus-glib-1)
175 AC_SUBST(DBUSGLIB_CFLAGS)
176 AC_SUBST(DBUSGLIB_LDFLAGS)
180 AC_ARG_ENABLE(os-module,
181 AC_HELP_STRING([--enable-os-module],
182 [enable the os Seed module. [default=yes]]),
183 [want_os_module=$enableval],[want_os_module="yes"])
186 AM_CONDITIONAL(BUILD_OS_MODULE, test "x$want_os_module" = "xyes")
187 AC_SUBST(BUILD_OS_MODULE)
190 AC_ARG_ENABLE(libxml-module,
191 AC_HELP_STRING([--enable-libxml-module],
192 [enable the libxml Seed module. [default=yes]]),
193 [want_libxml_module=$enableval],[want_libxml_module="yes"])
195 if test x"$want_libxml_module" == x"yes" ; then
196 PKG_CHECK_MODULES(LIBXML, libxml-2.0)
197 AC_SUBST(LIBXML_CFLAGS)
198 AC_SUBST(LIBXML_LDFLAGS)
201 AM_CONDITIONAL(BUILD_LIBXML_MODULE, test "x$want_libxml_module" = "xyes")
202 AC_SUBST(BUILD_LIBXML_MODULE)
205 AC_ARG_ENABLE(cairo-module,
206 AC_HELP_STRING([--enable-cairo-module],
207 [enable the cairo Seed module. [default=yes]]),
208 [want_cairo_module=$enableval],[want_cairo_module="yes"])
210 if test x"$want_cairo_module" == x"yes" ; then
211 PKG_CHECK_MODULES(CAIRO, cairo)
212 AC_SUBST(CAIRO_CFLAGS)
213 AC_SUBST(CAIRO_LDFLAGS)
216 AM_CONDITIONAL(BUILD_CAIRO_MODULE, test "x$want_cairo_module" = "xyes")
217 AC_SUBST(BUILD_CAIRO_MODULE)
221 dnl =========================turtle example====================================
222 AC_ARG_ENABLE(turtle-example,
223 AC_HELP_STRING([--enable-turtle-example],
224 [enable the turtle graphics example. [default=yes]]),
225 [want_turtle_example=$enableval],[want_turtle_example="yes"])
227 if test x"$want_turtle_example" == x"yes" ; then
228 PKG_CHECK_MODULES(GTK, gtk+-2.0)
233 AM_CONDITIONAL(BUILD_TURTLE_EXAMPLE, test "x$want_turtle_example" = "xyes")
234 AC_SUBST(BUILD_TURTLE_EXAMPLE)
236 dnl =========================Install Examples==================================
237 AC_ARG_ENABLE(examples,
238 AC_HELP_STRING([--enable-examples],
239 [install JavaScript examples. [default=yes]]),
240 [enable_examples=$enableval],[enable_examples="yes"])
241 AM_CONDITIONAL(BUILD_SEED_EXAMPLES, test "x$enable_examples" = "xyes")
242 AC_SUBST(BUILD_SEED_EXAMPLES)
244 dnl =============================Debug=========================================
246 AC_HELP_STRING([--enable-debug],
247 [enable verbose debugging. [default=no]]),
248 [enable_debug="yes"],[enable_debug="no"])
250 if test "x$enable_debug" = "xyes"; then
251 SEED_DEBUG_CFLAGS="-DSEED_ENABLE_DEBUG -g"
254 SEED_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
257 AC_SUBST(SEED_DEBUG_CFLAGS)
259 dnl ===========================Profiling=======================================
260 AC_ARG_ENABLE(profile,
261 AC_HELP_STRING([--enable-profile],
262 [turn on profiling [default=no]]),
263 [enable_profile="yes"],[enable_profile="no"])
265 AC_ARG_ENABLE(profile-modules,
266 AC_HELP_STRING([--enable-profile-modules],
267 [turn on profiling for modules [default=no]]),
268 [enable_profile_modules="yes"],[enable_profile_modules="no"])
270 if test "x$enable_profile" = "xyes"; then
271 SEED_PROFILE_CFLAGS="-fprofile-arcs -ftest-coverage"
272 SEED_PROFILE_LIBS="-lgcov"
276 if test "x$enable_profile" = "xno"; then
277 [enable_profile_modules="no"]
280 AC_SUBST(SEED_PROFILE_CFLAGS)
281 AC_SUBST(SEED_PROFILE_LIBS)
283 AM_CONDITIONAL(PROFILE_MODULES, test "x$enable_profile_modules" = "xyes")
285 dnl ===========================Darwin Build====================================
291 SEED_OSX_CFLAGS="-F/Applications/WebKit.app/Contents/Frameworks/10.5 -framework JavaScriptCore"
292 SEED_OSX_LDFLAGS="-F/Applications/WebKit.app/Contents/Frameworks/10.5 -framework JavaScriptCore"
295 PKG_CHECK_MODULES(WEBKIT, webkit-1.0)
296 AC_SUBST(WEBKIT_CFLAGS)
297 AC_SUBST(WEBKIT_LDFLAGS)
302 AC_SUBST(SEED_OSX_CFLAGS)
303 AC_SUBST(SEED_OSX_LDFLAGS)
305 AC_CHECK_HEADERS(pty.h)
307 dnl =============================gtk-doc=======================================
310 dnl =============================Output========================================
311 SHAVE_INIT([scripts])
318 doc/tutorial-standalone/tutorial.html
319 doc/modules/canvas.html
320 doc/modules/multiprocessing.html
321 doc/modules/readline.html
322 doc/modules/sqlite.html
323 doc/modules/sandbox.html
325 doc/mapping/mapping.html
328 scripts/shave-libtool
335 tests/javascript/Makefile
336 tests/javascript/gtypes/Makefile
337 tests/javascript/signals/Makefile
338 tests/javascript/structs/Makefile
342 doc/tutorial-standalone/Makefile
343 doc/reference/Makefile
346 examples/clutter-pad/Makefile
347 examples/clutter-pad/examples/Makefile
348 examples/clutter-shader/Makefile
349 examples/clutter-transitions/Makefile
350 examples/glib/Makefile
351 examples/browser/Makefile
352 examples/turtle/Makefile
353 examples/opengl/Makefile
354 examples/twitter/Makefile
355 examples/pong/Makefile
356 examples/same-seed/Makefile
357 examples/dbus/Makefile
358 examples/xml/Makefile
360 modules/example/Makefile
361 modules/sqlite/Makefile
362 modules/canvas/Makefile
363 modules/readline/Makefile
364 modules/Multiprocessing/Makefile
365 modules/sandbox/Makefile
367 modules/dbus/Makefile
368 modules/dbus/util/Makefile
369 modules/libxml/Makefile
370 modules/cairo/Makefile
376 Debug......................$enable_debug
377 Profiling/Coverage.........$enable_profile
378 Profiling for Modules......$enable_profile_modules
379 gtk-doc....................$enable_gtk_doc
382 Prefix.....................$prefix
383 Install examples...........$enable_examples
386 Canvas.....................$want_canvas_module
387 example....................$want_example_module
388 multiprocessing............$want_multiprocessing_module
389 readline...................$want_readline_module
390 SQLite.....................$want_sqlite_module
391 DBus.......................$want_dbus_module
392 libxml.....................$want_libxml_module
393 cairo......................$want_cairo_module
396 Turtle.....................$want_turtle_example
399 if test "x$want_readline_module" != "xyes"; then
400 echo "WARNING: The readline module is not enabled.
401 Without this, the Seed REPL will not work;
402 however, most Seed applications will still run.