2 AC_INIT(seed, 2.29.6.1)
4 AM_INIT_AUTOMAKE([1.7 -Wno-portability])
6 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_MACRO_DIR([m4])
17 # Use AM_SILENT_RULES if present
18 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
26 *[\ \ ]${flag}[\ \ ]*) ;;
27 *) 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(FFI, 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
59 FFI_LDFLAGS=$other_LIBS
61 FFI_LDFLAGS="$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])
77 dnl ==============================WebKit=======================================
79 LIBS=`pkg-config --libs webkit-1.0`
80 AC_CHECK_LIB(webkit-1.0, JSContextGroupCreate,,
81 AC_MSG_ERROR([The installed version of WebKit is too old. Seed requires WebKit SVN revision 35442 or greater.]))
84 PKG_CHECK_MODULES(WEBKIT, webkit-1.0)
85 AC_SUBST(WEBKIT_CFLAGS)
86 AC_SUBST(WEBKIT_LDFLAGS)
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 GNOME_JS_DIR=`pkg-config --variable=moduledir gnome-js-common`
96 AC_SUBST(GNOME_JS_DIR)
98 dnl =============================Modules=======================================
100 AC_ARG_ENABLE(canvas-module,
101 AC_HELP_STRING([--enable-canvas-module],
102 [enable the canvas Seed module. [default=yes]]),
103 [want_canvas_module=$enableval],[want_canvas_module="yes"])
105 if test x"$want_canvas_module" == x"yes" ; then
106 PKG_CHECK_MODULES(CAIRO, cairo)
107 AC_SUBST(CAIRO_CFLAGS)
108 AC_SUBST(CAIRO_LDFLAGS)
109 PKG_CHECK_MODULES(GDK, gdk-2.0)
111 AC_SUBST(GDK_LDFLAGS)
114 AM_CONDITIONAL(BUILD_CANVAS_MODULE, test "x$want_canvas_module" = "xyes")
115 AC_SUBST(BUILD_CANVAS_MODULE)
117 dnl ==== readline ====
118 AC_ARG_ENABLE(readline-module,
119 AC_HELP_STRING([--enable-readline-module],
120 [enable the readline Seed module. [default=yes]]),
121 [want_readline_module=$enableval],[want_readline_module="yes"])
122 if test x"$want_readline_module" == x"yes" ; then
123 AC_CHECK_HEADER([readline/readline.h],,AC_MSG_ERROR([the readline library is not installed.]))
126 AM_CONDITIONAL(BUILD_READLINE_MODULE, test "x$want_readline_module" = "xyes")
127 AC_SUBST(BUILD_READLINE_MODULE)
129 dnl ==== multiprocessing ====
130 AC_ARG_ENABLE(multiprocessing-module,
131 AC_HELP_STRING([--enable-multiprocessing-module],
132 [enable the multiprocessing Seed module. [default=yes]]),
133 [want_multiprocessing_module=$enableval],
134 [want_multiprocessing_module="yes"])
136 AM_CONDITIONAL(BUILD_MULTIPROCESSING_MODULE, test "x$want_multiprocessing_module" = "xyes")
137 AC_SUBST(BUILD_MULTIPROCESSING_MODULE)
140 AC_ARG_ENABLE(sqlite-module,
141 AC_HELP_STRING([--enable-sqlite-module],
142 [enable the sqlite Seed module. [default=yes]]),
143 [want_sqlite_module=$enableval],[want_sqlite_module="yes"])
145 if test x"$want_sqlite_module" == x"yes" ; then
146 PKG_CHECK_MODULES(SQLITE, sqlite3)
147 AC_SUBST(SQLITE_CFLAGS)
148 AC_SUBST(SQLITE_LDFLAGS)
151 AM_CONDITIONAL(BUILD_SQLITE_MODULE, test "x$want_sqlite_module" = "xyes")
152 AC_SUBST(BUILD_SQLITE_MODULE)
154 dnl ==== Example ====
155 AC_ARG_ENABLE(example-module,
156 AC_HELP_STRING([--enable-example-module],
157 [enable the example Seed module. [default=yes]]),
158 [want_example_module=$enableval],[want_example_module="yes"])
160 AM_CONDITIONAL(BUILD_EXAMPLE_MODULE, test "x$want_example_module" = "xyes")
161 AC_SUBST(BUILD_EXAMPLE_MODULE)
164 AC_ARG_ENABLE(dbus-module,
165 AC_HELP_STRING([--enable-dbus-module],
166 [enable the dbus Seed module. [default=yes]]),
167 [want_dbus_module=$enableval],[want_dbus_module="yes"])
170 AM_CONDITIONAL(BUILD_DBUS_MODULE, test "x$want_dbus_module" = "xyes")
171 AC_SUBST(BUILD_DBUS_MODULE)
173 if test x"$want_dbus_module" == x"yes" ; then
174 PKG_CHECK_MODULES(DBUS, dbus-1)
175 AC_SUBST(DBUS_CFLAGS)
176 AC_SUBST(DBUS_LDFLAGS)
177 PKG_CHECK_MODULES(DBUSGLIB, dbus-glib-1)
178 AC_SUBST(DBUSGLIB_CFLAGS)
179 AC_SUBST(DBUSGLIB_LDFLAGS)
185 AC_ARG_ENABLE(os-module,
186 AC_HELP_STRING([--enable-os-module],
187 [enable the os Seed module. [default=yes]]),
188 [want_os_module=$enableval],[want_os_module="yes"])
191 AM_CONDITIONAL(BUILD_OS_MODULE, test "x$want_os_module" = "xyes")
192 AC_SUBST(BUILD_OS_MODULE)
195 AC_ARG_ENABLE(ffi-module,
196 AC_HELP_STRING([--enable-ffi-module],
197 [enable the ffi Seed module. [default=yes]]),
198 [want_ffi_module=$enableval],[want_ffi_module="yes"])
201 AM_CONDITIONAL(BUILD_FFI_MODULE, test "x$want_ffi_module" = "xyes")
202 AC_SUBST(BUILD_FFI_MODULE)
205 AC_ARG_ENABLE(libxml-module,
206 AC_HELP_STRING([--enable-libxml-module],
207 [enable the libxml Seed module. [default=yes]]),
208 [want_libxml_module=$enableval],[want_libxml_module="yes"])
210 if test x"$want_libxml_module" == x"yes" ; then
211 PKG_CHECK_MODULES(LIBXML, libxml-2.0)
212 AC_SUBST(LIBXML_CFLAGS)
213 AC_SUBST(LIBXML_LDFLAGS)
216 AM_CONDITIONAL(BUILD_LIBXML_MODULE, test "x$want_libxml_module" = "xyes")
217 AC_SUBST(BUILD_LIBXML_MODULE)
220 AC_ARG_ENABLE(os-module,
221 AC_HELP_STRING([--enable-os-module],
222 [enable the os Seed module. [default=yes]]),
223 [want_os_module=$enableval],[want_os_module="yes"])
226 AM_CONDITIONAL(BUILD_OS_MODULE, test "x$want_os_module" = "xyes")
227 AC_SUBST(BUILD_OS_MODULE)
229 dnl ==== gtkbuilder ====
230 AC_ARG_ENABLE(gtkbuilder-module,
231 AC_HELP_STRING([--enable-gtkbuilder-module],
232 [enable the gtkbuilder Seed module. [default=yes]]),
233 [want_gtkbuilder_module=$enableval],[want_gtkbuilder_module="yes"])
235 if test x"$want_gtkbuilder_module" == x"yes" ; then
236 PKG_CHECK_MODULES(GTK, gtk+-2.0)
238 AC_SUBST(GTK_LDFLAGS)
241 AM_CONDITIONAL(BUILD_GTKBUILDER_MODULE, test "x$want_gtkbuilder_module" = "xyes")
242 AC_SUBST(BUILD_GTKBUILDER_MODULE)
246 AC_ARG_ENABLE(cairo-module,
247 AC_HELP_STRING([--enable-cairo-module],
248 [enable the cairo Seed module. [default=yes]]),
249 [want_cairo_module=$enableval],[want_cairo_module="yes"])
251 if test x"$want_cairo_module" == x"yes" ; then
252 PKG_CHECK_MODULES(CAIRO, cairo)
253 AC_SUBST(CAIRO_CFLAGS)
254 AC_SUBST(CAIRO_LDFLAGS)
257 AM_CONDITIONAL(BUILD_CAIRO_MODULE, test "x$want_cairo_module" = "xyes")
258 AC_SUBST(BUILD_CAIRO_MODULE)
261 dnl ==== gettext ====
262 AC_ARG_ENABLE(gettext-module,
263 AC_HELP_STRING([--enable-gettext-module],
264 [enable the gettext Seed module. [default=yes]]),
265 [want_gettext_module=$enableval],[want_gettext_module="yes"])
267 AM_CONDITIONAL(BUILD_GETTEXT_MODULE, test "x$want_gettext_module" = "xyes")
268 AC_SUBST(BUILD_GETTEXT_MODULE)
271 AC_ARG_ENABLE(mpfr-module,
272 AC_HELP_STRING([--enable-mpfr-module],
273 [enable the mpfr Seed module. [default=yes]]),
274 [want_mpfr_module=$enableval],[want_mpfr_module="yes"])
276 if test x"$want_mpfr_module" == x"yes" ; then
277 AC_TRY_CPP([#include <mpfr.h>], have_mpfr_h=yes, have_mpfr_h=no)
278 if test x"$have_mpfr_h" = x"yes"; then
280 if test x"$with_mpfr" = x"yes" || test x"$with_mpfr" = x"auto"; then
283 other_LIBS=$with_mpfr
286 AC_SEARCH_LIBS(mpfr_init2,mpfr,,AC_MSG_ERROR([mpfr not found]),$other_LIBS)
287 if test x"$ac_cv_search_mpfr_call" = x"none required" ; then
288 MPFR_LDFLAGS=$other_LIBS
290 MPFR_LDFLAGS="$other_LIBS"
294 if test x"$have_mpfr_h" != x"yes" ; then
295 AC_MSG_ERROR([mpfr.h not found])
301 AM_CONDITIONAL(BUILD_MPFR_MODULE, test "x$want_mpfr_module" = "xyes")
302 AC_SUBST(BUILD_MPFR_MODULE)
304 dnl ===========================Profiling=======================================
305 AC_ARG_ENABLE(profile,
306 AC_HELP_STRING([--enable-profile],
307 [turn on profiling [default=no]]),
308 [enable_profile="yes"],[enable_profile="no"])
310 AC_ARG_ENABLE(profile-modules,
311 AC_HELP_STRING([--enable-profile-modules],
312 [turn on profiling for modules [default=no]]),
313 [enable_profile_modules="yes"],[enable_profile_modules="no"])
315 if test "x$enable_profile" = "xyes"; then
316 SEED_PROFILE_CFLAGS="-fprofile-arcs -ftest-coverage"
317 SEED_PROFILE_LIBS="-lgcov"
321 if test "x$enable_profile" = "xno"; then
322 [enable_profile_modules="no"]
325 AC_SUBST(SEED_PROFILE_CFLAGS)
326 AC_SUBST(SEED_PROFILE_LIBS)
328 AM_CONDITIONAL(PROFILE_MODULES, test "x$enable_profile_modules" = "xyes")
330 dnl =============================Debug=========================================
332 AC_HELP_STRING([--enable-debug],
333 [enable verbose debugging. [default=no]]),
334 [enable_debug="yes"],[enable_debug="no"])
336 if test "x$enable_debug" = "xyes"; then
337 SEED_DEBUG_CFLAGS="-DSEED_ENABLE_DEBUG -g"
340 SEED_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
343 if test "x$need_debug" = "xyes"; then
344 AC_MSG_ERROR([debug must be enabled in order to enable profiling.])
348 AC_SUBST(SEED_DEBUG_CFLAGS)
350 AC_CHECK_HEADERS(pty.h)
352 dnl =============================gtk-doc=======================================
355 dnl =============================Output========================================
363 doc/tutorial-standalone/tutorial.html
365 doc/modules/canvas/canvas.html
366 doc/modules/multiprocessing/multiprocessing.html
368 doc/modules/canvas/Makefile
369 doc/modules/multiprocessing/Makefile
370 doc/modules/readline/Makefile
371 doc/modules/gtkbuilder/Makefile
372 doc/modules/sqlite/Makefile
373 doc/modules/sandbox/Makefile
375 doc/mapping/mapping.html
382 tests/javascript/Makefile
383 tests/javascript/gtypes/Makefile
384 tests/javascript/signals/Makefile
385 tests/javascript/structs/Makefile
389 doc/modules/version.xml
390 doc/tutorial-standalone/Makefile
391 doc/reference/Makefile
392 doc/reference/version.xml
395 modules/example/Makefile
396 modules/sqlite/Makefile
397 modules/canvas/Makefile
398 modules/readline/Makefile
399 modules/multiprocessing/Makefile
400 modules/sandbox/Makefile
402 modules/dbus/Makefile
403 modules/dbus/util/Makefile
404 modules/libxml/Makefile
405 modules/cairo/Makefile
406 modules/gtkbuilder/Makefile
407 modules/gettext/Makefile
408 modules/mpfr/Makefile
417 Debug......................$enable_debug
418 Profiling/Coverage.........$enable_profile
419 Profiling for Modules......$enable_profile_modules
420 gtk-doc....................$enable_gtk_doc
423 Prefix.....................$prefix
426 Canvas.....................$want_canvas_module
427 example....................$want_example_module
428 multiprocessing............$want_multiprocessing_module
429 readline...................$want_readline_module
430 SQLite.....................$want_sqlite_module
431 DBus.......................$want_dbus_module
432 libxml.....................$want_libxml_module
433 cairo......................$want_cairo_module
434 gtkbuilder.................$want_gtkbuilder_module
435 gettext....................$want_gettext_module
436 mpfr.......................$want_mpfr_module
437 ffi........................$want_ffi_module
440 if test "x$want_readline_module" != "xyes"; then
441 echo "WARNING: The readline module is not enabled.
442 Without this, the Seed REPL will not work;
443 however, most Seed applications will still run.