4 AM_INIT_AUTOMAKE([1.7 -Wno-portability])
6 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_MACRO_DIR([m4])
25 *[\ \ ]${flag}[\ \ ]*) ;;
26 *) result="${flag} ${result}" ;;
35 dnl =====================Internationalization==================================
37 AC_SUBST(GETTEXT_PACKAGE)
38 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
40 IT_PROG_INTLTOOL([0.35.0])
42 dnl ============================libffi=========================================
43 PKG_CHECK_MODULES(libffi, libffi, have_ffi_pkgconfig=yes, have_ffi_pkgconfig=no)
45 if test x"$have_ffi_pkgconfig" = xno ; then
46 AC_MSG_CHECKING(for ffi.h)
48 AC_TRY_CPP([#include <ffi.h>], have_ffi_h=yes, have_ffi_h=no)
49 if test x"$have_ffi_h" = x"yes"; then
51 if test x"$with_ffi" = x"yes" || test x"$with_ffi" = x"auto"; then
57 AC_SEARCH_LIBS(ffi_call,ffi,,AC_MSG_ERROR([libffi not found]),$other_LIBS)
58 if test x"$ac_cv_search_ffi_call" = x"none required" ; then
61 FFI_LIBS="$ac_cv_search_ffi_call $other_LIBS"
65 if test x"$have_ffi_h" != x"yes" ; then
66 AC_MSG_ERROR([ffi.h not found])
71 AC_MSG_RESULT([$have_ffi_h])
76 dnl =======================WebKit ContextGroup=================================
82 LIBS=`pkg-config --libs webkit-1.0`
83 AC_CHECK_LIB(webkit-1.0, JSContextGroupCreate,,
84 AC_MSG_ERROR([The installed version of WebKit is too old. Seed requires WebKit SVN revision 35442 or greater.]))
89 dnl ==============================readline=====================================
90 AC_MSG_CHECKING(for readline)
91 AC_TRY_CPP([#include <readline/readline.h>],
94 AC_MSG_RESULT([$have_readline_h])
96 dnl ==============================cairo========================================
97 AC_MSG_CHECKING(for cairo)
98 AC_TRY_CPP([#include <cairo/cairo.h>], have_cairo_h=yes, have_cairo_h=no)
99 AC_MSG_RESULT([$have_cairo_h])
101 dnl ============================sqlite3========================================
102 AC_MSG_CHECKING(for sqlite3)
103 AC_TRY_CPP([#include <sqlite3.h>], have_sqlite3_h=yes, have_sqlite3_h=no)
104 AC_MSG_RESULT([$have_sqlite3_h])
106 dnl =============================gtk+-2.0======================================
107 AC_MSG_CHECKING(for gtk+-2.0)
108 PKG_CHECK_EXISTS(gtk+-2.0, have_gtk=yes, have_gtk=no)
109 AC_MSG_RESULT([$have_gtk])
111 dnl =============================Modules=======================================
112 AC_ARG_ENABLE(canvas-module,
113 AC_HELP_STRING([--enable-canvas-module],
114 [enable the canvas Seed module. [default=yes]]),
115 [want_canvas_module=$enableval],[want_canvas_module="yes"])
117 AC_ARG_ENABLE(example-module,
118 AC_HELP_STRING([--enable-example-module],
119 [enable the example Seed module. [default=yes]]),
120 [want_example_module=$enableval],[want_example_module="yes"])
122 AC_ARG_ENABLE(multiprocessing-module,
123 AC_HELP_STRING([--enable-multiprocessing-module],
124 [enable the multiprocessing Seed module. [default=yes]]),
125 [want_multiprocessing_module=$enableval],
126 [want_multiprocessing_module="yes"])
128 AC_ARG_ENABLE(readline-module,
129 AC_HELP_STRING([--enable-readline-module],
130 [enable the readline Seed module. [default=yes]]),
131 [want_readline_module=$enableval],[want_readline_module="yes"])
133 AC_ARG_ENABLE(sqlite-module,
134 AC_HELP_STRING([--enable-sqlite-module],
135 [enable the sqlite Seed module. [default=yes]]),
136 [want_sqlite_module=$enableval],[want_sqlite_module="yes"])
138 dnl --- Special Cases ---
140 if test x"$have_cairo_h" != x"yes" ; then
141 want_canvas_module="no"
144 if test x"$have_readline_h" != x"yes" ; then
145 want_readline_module="no"
148 if test x"$have_sqlite3_h" != x"yes" ; then
149 want_sqlite_module="no"
152 want_dbus_modules="yes"
154 AM_CONDITIONAL(BUILD_CANVAS_MODULE, test "x$want_canvas_module" = "xyes")
155 AM_CONDITIONAL(BUILD_EXAMPLE_MODULE, test "x$want_example_module" = "xyes")
156 AM_CONDITIONAL(BUILD_MULTIPROCESSING_MODULE, test "x$want_multiprocessing_module" = "xyes")
157 AM_CONDITIONAL(BUILD_READLINE_MODULE, test "x$want_readline_module" = "xyes")
158 AM_CONDITIONAL(BUILD_SQLITE_MODULE, test "x$want_sqlite_module" = "xyes")
160 AC_SUBST(BUILD_CANVAS_MODULE)
161 AC_SUBST(BUILD_EXAMPLE_MODULE)
162 AC_SUBST(BUILD_MULTIPROCESSING_MODULE)
163 AC_SUBST(BUILD_READLINE_MODULE)
164 AC_SUBST(BUILD_SQLITE_MODULE)
166 dnl =========================turtle example====================================
167 AC_ARG_ENABLE(turtle-example,
168 AC_HELP_STRING([--enable-turtle-example],
169 [enable the turtle graphics example. [default=yes]]),
170 [want_turtle_example=$enableval],[want_turtle_example="yes"])
172 if test x"$have_gtk" != x"yes" ; then
173 want_turtle_example="no"
176 AM_CONDITIONAL(BUILD_TURTLE_EXAMPLE, test "x$want_turtle_example" = "xyes")
177 AC_SUBST(BUILD_TURTLE_EXAMPLE)
179 dnl =========================Install Examples==================================
180 AC_ARG_ENABLE(examples,
181 AC_HELP_STRING([--enable-examples],
182 [install JavaScript examples. [default=yes]]),
183 [enable_examples=$enableval],[enable_examples="yes"])
184 AM_CONDITIONAL(BUILD_SEED_EXAMPLES, test "x$enable_examples" = "xyes")
185 AC_SUBST(BUILD_SEED_EXAMPLES)
187 dnl =============================Debug=========================================
189 AC_HELP_STRING([--enable-debug],
190 [enable verbose debugging. [default=no]]),
191 [enable_debug="yes"],[enable_debug="no"])
193 if test "x$enable_debug" = "xyes"; then
194 SEED_DEBUG_CFLAGS="-DSEED_ENABLE_DEBUG -g"
197 SEED_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
200 AC_SUBST(SEED_DEBUG_CFLAGS)
202 dnl ===========================Profiling=======================================
203 AC_ARG_ENABLE(profile,
204 AC_HELP_STRING([--enable-profile],
205 [turn on profiling [default=no]]),
206 [enable_profile="yes"],[enable_profile="no"])
208 AC_ARG_ENABLE(profile-modules,
209 AC_HELP_STRING([--enable-profile-modules],
210 [turn on profiling for modules [default=no]]),
211 [enable_profile_modules="yes"],[enable_profile_modules="no"])
213 if test "x$enable_profile" = "xyes"; then
214 SEED_PROFILE_CFLAGS="-fprofile-arcs -ftest-coverage"
215 SEED_PROFILE_LDFLAGS="-lgcov"
219 if test "x$enable_profile" = "xno"; then
220 [enable_profile_modules="no"]
223 AC_SUBST(SEED_PROFILE_CFLAGS)
224 AC_SUBST(SEED_PROFILE_LDFLAGS)
226 AM_CONDITIONAL(PROFILE_MODULES, test "x$enable_profile_modules" = "xyes")
228 dnl ===========================Darwin Build====================================
234 SEED_OSX_CFLAGS="-F/Applications/WebKit.app/Contents/Frameworks/10.5 -framework JavaScriptCore"
235 SEED_OSX_LDFLAGS="-F/Applications/WebKit.app/Contents/Frameworks/10.5 -framework JavaScriptCore"
236 PKG_CHECK_MODULES(SEED, gobject-introspection-1.0 >= 0.6.3)
237 PKG_CHECK_MODULES(LIBSEED, gobject-introspection-1.0 >= 0.6.3)
240 PKG_CHECK_MODULES(SEED, webkit-1.0 gobject-introspection-1.0 >= 0.6.3)
241 PKG_CHECK_MODULES(LIBSEED, webkit-1.0 gobject-introspection-1.0 >= 0.6.3)
244 AC_SUBST(SEED_OSX_CFLAGS)
245 AC_SUBST(SEED_OSX_LDFLAGS)
247 dnl =============================gtk-doc=======================================
250 dnl =============================Output========================================
251 SHAVE_INIT([scripts])
258 doc/tutorial-standalone/tutorial.html
259 doc/modules/canvas.html
260 doc/modules/multiprocessing.html
261 doc/modules/readline.html
262 doc/modules/sqlite.html
264 doc/mapping/mapping.html
267 scripts/shave-libtool
274 tests/javascript/Makefile
278 doc/tutorial-standalone/Makefile
279 doc/reference/Makefile
282 examples/clutter-shader/Makefile
283 examples/clutter-transitions/Makefile
284 examples/glib/Makefile
285 examples/browser/Makefile
286 examples/turtle/Makefile
287 examples/opengl/Makefile
288 examples/twitter/Makefile
289 examples/pong/Makefile
290 examples/same-seed/Makefile
292 modules/example/Makefile
293 modules/sqlite/Makefile
294 modules/canvas/Makefile
295 modules/readline/Makefile
296 modules/Multiprocessing/Makefile
303 Debug......................$enable_debug
304 Profiling/Coverage.........$enable_profile
305 Profiling for Modules......$enable_profile_modules
306 gtk-doc....................$enable_gtk_doc
309 Prefix.....................$prefix
310 Install examples...........$enable_examples
313 Canvas.....................$want_canvas_module
314 example....................$want_example_module
315 multiprocessing............$want_multiprocessing_module
316 readline...................$want_readline_module
317 SQLite.....................$want_sqlite_module
320 Turtle.....................$want_turtle_example
323 if test "x$want_readline_module" != "xyes"; then
324 echo "WARNING: The readline module is not enabled.
325 Without this, the Seed REPL will not work;
326 however, most Seed applications will still run.