2 AC_INIT(seed, 2.31.1.1)
4 AM_INIT_AUTOMAKE([1.7 -Wno-portability])
6 AC_CONFIG_HEADERS([config.h])
15 # Use AM_SILENT_RULES if present
16 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
24 *[\ \ ]${flag}[\ \ ]*) ;;
25 *) 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=======================================
77 LIBS=`pkg-config --libs webkit-1.0`
78 AC_CHECK_LIB(webkit-1.0, JSContextGroupCreate,,
79 AC_MSG_ERROR([The installed version of WebKit is too old. Seed requires WebKit SVN revision 35442 or greater.]))
82 PKG_CHECK_MODULES(WEBKIT, webkit-1.0)
83 AC_SUBST(WEBKIT_CFLAGS)
84 AC_SUBST(WEBKIT_LDFLAGS)
86 dnl =========================Introspection=====================================
87 PKG_CHECK_MODULES(GOBJECT_INTROSPECTION, gobject-introspection-1.0 >= 0.6.3)
88 AC_SUBST(GOBJECT_INTROSPECTION_CFLAGS)
89 AC_SUBST(GOBJECT_INTROSPECTION_LDFLAGS)
91 dnl ========================GNOME-js common====================================
92 PKG_CHECK_MODULES(GNOME_JS, gnome-js-common)
93 GNOME_JS_DIR=`pkg-config --variable=moduledir gnome-js-common`
94 AC_SUBST(GNOME_JS_DIR)
96 dnl =============================Modules=======================================
98 AC_ARG_ENABLE(canvas-module,
99 AC_HELP_STRING([--enable-canvas-module],
100 [enable the canvas Seed module. [default=yes]]),
101 [want_canvas_module=$enableval],[want_canvas_module="yes"])
103 if test x"$want_canvas_module" == x"yes" ; then
104 PKG_CHECK_MODULES(CAIRO, cairo)
105 AC_SUBST(CAIRO_CFLAGS)
106 AC_SUBST(CAIRO_LDFLAGS)
107 PKG_CHECK_MODULES(GDK, gdk-2.0)
109 AC_SUBST(GDK_LDFLAGS)
112 AM_CONDITIONAL(BUILD_CANVAS_MODULE, test "x$want_canvas_module" = "xyes")
113 AC_SUBST(BUILD_CANVAS_MODULE)
115 dnl ==== readline ====
116 AC_ARG_ENABLE(readline-module,
117 AC_HELP_STRING([--enable-readline-module],
118 [enable the readline Seed module. [default=yes]]),
119 [want_readline_module=$enableval],[want_readline_module="yes"])
120 if test x"$want_readline_module" == x"yes" ; then
121 AC_CHECK_HEADER([readline/readline.h],,AC_MSG_ERROR([the readline library is not installed.]))
124 AM_CONDITIONAL(BUILD_READLINE_MODULE, test "x$want_readline_module" = "xyes")
125 AC_SUBST(BUILD_READLINE_MODULE)
127 dnl ==== multiprocessing ====
128 AC_ARG_ENABLE(multiprocessing-module,
129 AC_HELP_STRING([--enable-multiprocessing-module],
130 [enable the multiprocessing Seed module. [default=yes]]),
131 [want_multiprocessing_module=$enableval],
132 [want_multiprocessing_module="yes"])
134 AM_CONDITIONAL(BUILD_MULTIPROCESSING_MODULE, test "x$want_multiprocessing_module" = "xyes")
135 AC_SUBST(BUILD_MULTIPROCESSING_MODULE)
138 AC_ARG_ENABLE(sqlite-module,
139 AC_HELP_STRING([--enable-sqlite-module],
140 [enable the sqlite Seed module. [default=yes]]),
141 [want_sqlite_module=$enableval],[want_sqlite_module="yes"])
143 if test x"$want_sqlite_module" == x"yes" ; then
144 PKG_CHECK_MODULES(SQLITE, sqlite3)
145 AC_SUBST(SQLITE_CFLAGS)
146 AC_SUBST(SQLITE_LDFLAGS)
149 AM_CONDITIONAL(BUILD_SQLITE_MODULE, test "x$want_sqlite_module" = "xyes")
150 AC_SUBST(BUILD_SQLITE_MODULE)
152 dnl ==== Example ====
153 AC_ARG_ENABLE(example-module,
154 AC_HELP_STRING([--enable-example-module],
155 [enable the example Seed module. [default=yes]]),
156 [want_example_module=$enableval],[want_example_module="yes"])
158 AM_CONDITIONAL(BUILD_EXAMPLE_MODULE, test "x$want_example_module" = "xyes")
159 AC_SUBST(BUILD_EXAMPLE_MODULE)
162 AC_ARG_ENABLE(dbus-module,
163 AC_HELP_STRING([--enable-dbus-module],
164 [enable the dbus Seed module. [default=yes]]),
165 [want_dbus_module=$enableval],[want_dbus_module="yes"])
168 AM_CONDITIONAL(BUILD_DBUS_MODULE, test "x$want_dbus_module" = "xyes")
169 AC_SUBST(BUILD_DBUS_MODULE)
171 if test x"$want_dbus_module" == x"yes" ; then
172 PKG_CHECK_MODULES(DBUS, dbus-1)
173 AC_SUBST(DBUS_CFLAGS)
174 AC_SUBST(DBUS_LDFLAGS)
175 PKG_CHECK_MODULES(DBUSGLIB, dbus-glib-1)
176 AC_SUBST(DBUSGLIB_CFLAGS)
177 AC_SUBST(DBUSGLIB_LDFLAGS)
183 AC_ARG_ENABLE(os-module,
184 AC_HELP_STRING([--enable-os-module],
185 [enable the os Seed module. [default=yes]]),
186 [want_os_module=$enableval],[want_os_module="yes"])
189 AM_CONDITIONAL(BUILD_OS_MODULE, test "x$want_os_module" = "xyes")
190 AC_SUBST(BUILD_OS_MODULE)
193 AC_ARG_ENABLE(ffi-module,
194 AC_HELP_STRING([--enable-ffi-module],
195 [enable the ffi Seed module. [default=yes]]),
196 [want_ffi_module=$enableval],[want_ffi_module="yes"])
199 AM_CONDITIONAL(BUILD_FFI_MODULE, test "x$want_ffi_module" = "xyes")
200 AC_SUBST(BUILD_FFI_MODULE)
203 AC_ARG_ENABLE(libxml-module,
204 AC_HELP_STRING([--enable-libxml-module],
205 [enable the libxml Seed module. [default=yes]]),
206 [want_libxml_module=$enableval],[want_libxml_module="yes"])
208 if test x"$want_libxml_module" == x"yes" ; then
209 PKG_CHECK_MODULES(LIBXML, libxml-2.0)
210 AC_SUBST(LIBXML_CFLAGS)
211 AC_SUBST(LIBXML_LDFLAGS)
214 AM_CONDITIONAL(BUILD_LIBXML_MODULE, test "x$want_libxml_module" = "xyes")
215 AC_SUBST(BUILD_LIBXML_MODULE)
218 AC_ARG_ENABLE(os-module,
219 AC_HELP_STRING([--enable-os-module],
220 [enable the os Seed module. [default=yes]]),
221 [want_os_module=$enableval],[want_os_module="yes"])
224 AM_CONDITIONAL(BUILD_OS_MODULE, test "x$want_os_module" = "xyes")
225 AC_SUBST(BUILD_OS_MODULE)
227 dnl ==== gtkbuilder ====
228 AC_ARG_ENABLE(gtkbuilder-module,
229 AC_HELP_STRING([--enable-gtkbuilder-module],
230 [enable the gtkbuilder Seed module. [default=yes]]),
231 [want_gtkbuilder_module=$enableval],[want_gtkbuilder_module="yes"])
233 if test x"$want_gtkbuilder_module" == x"yes" ; then
234 PKG_CHECK_MODULES(GTK, gtk+-2.0)
236 AC_SUBST(GTK_LDFLAGS)
239 AM_CONDITIONAL(BUILD_GTKBUILDER_MODULE, test "x$want_gtkbuilder_module" = "xyes")
240 AC_SUBST(BUILD_GTKBUILDER_MODULE)
244 AC_ARG_ENABLE(cairo-module,
245 AC_HELP_STRING([--enable-cairo-module],
246 [enable the cairo Seed module. [default=yes]]),
247 [want_cairo_module=$enableval],[want_cairo_module="yes"])
249 if test x"$want_cairo_module" == x"yes" ; then
250 PKG_CHECK_MODULES(CAIRO, cairo)
251 AC_SUBST(CAIRO_CFLAGS)
252 AC_SUBST(CAIRO_LDFLAGS)
255 AM_CONDITIONAL(BUILD_CAIRO_MODULE, test "x$want_cairo_module" = "xyes")
256 AC_SUBST(BUILD_CAIRO_MODULE)
259 dnl ==== gettext ====
260 AC_ARG_ENABLE(gettext-module,
261 AC_HELP_STRING([--enable-gettext-module],
262 [enable the gettext Seed module. [default=yes]]),
263 [want_gettext_module=$enableval],[want_gettext_module="yes"])
265 AM_CONDITIONAL(BUILD_GETTEXT_MODULE, test "x$want_gettext_module" = "xyes")
266 AC_SUBST(BUILD_GETTEXT_MODULE)
269 AC_ARG_ENABLE(mpfr-module,
270 AC_HELP_STRING([--enable-mpfr-module],
271 [enable the mpfr Seed module. [default=yes]]),
272 [want_mpfr_module=$enableval],[want_mpfr_module="yes"])
274 if test x"$want_mpfr_module" == x"yes" ; then
275 AC_TRY_CPP([#include <mpfr.h>], have_mpfr_h=yes, have_mpfr_h=no)
276 if test x"$have_mpfr_h" = x"yes"; then
278 if test x"$with_mpfr" = x"yes" || test x"$with_mpfr" = x"auto"; then
281 other_LIBS=$with_mpfr
284 AC_SEARCH_LIBS(mpfr_init2,mpfr,,AC_MSG_ERROR([mpfr not found]),$other_LIBS)
285 if test x"$ac_cv_search_mpfr_call" = x"none required" ; then
286 MPFR_LDFLAGS=$other_LIBS
288 MPFR_LDFLAGS="$other_LIBS"
292 if test x"$have_mpfr_h" != x"yes" ; then
293 AC_MSG_ERROR([mpfr.h not found])
299 AM_CONDITIONAL(BUILD_MPFR_MODULE, test "x$want_mpfr_module" = "xyes")
300 AC_SUBST(BUILD_MPFR_MODULE)
302 dnl ===========================Profiling=======================================
303 AC_ARG_ENABLE(profile,
304 AC_HELP_STRING([--enable-profile],
305 [turn on profiling [default=no]]),
306 [enable_profile="yes"],[enable_profile="no"])
308 AC_ARG_ENABLE(profile-modules,
309 AC_HELP_STRING([--enable-profile-modules],
310 [turn on profiling for modules [default=no]]),
311 [enable_profile_modules="yes"],[enable_profile_modules="no"])
313 if test "x$enable_profile" = "xyes"; then
314 SEED_PROFILE_CFLAGS="-fprofile-arcs -ftest-coverage"
315 SEED_PROFILE_LIBS="-lgcov"
319 if test "x$enable_profile" = "xno"; then
320 [enable_profile_modules="no"]
323 AC_SUBST(SEED_PROFILE_CFLAGS)
324 AC_SUBST(SEED_PROFILE_LIBS)
326 AM_CONDITIONAL(PROFILE_MODULES, test "x$enable_profile_modules" = "xyes")
328 dnl =============================Debug=========================================
330 AC_HELP_STRING([--enable-debug],
331 [enable verbose debugging. [default=no]]),
332 [enable_debug="yes"],[enable_debug="no"])
334 if test "x$enable_debug" = "xyes"; then
335 SEED_DEBUG_CFLAGS="-DSEED_ENABLE_DEBUG -g"
338 SEED_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
341 if test "x$need_debug" = "xyes"; then
342 AC_MSG_ERROR([debug must be enabled in order to enable profiling.])
346 AC_SUBST(SEED_DEBUG_CFLAGS)
348 AC_CHECK_HEADERS(pty.h)
350 dnl =============================gtk-doc=======================================
353 dnl =============================Output========================================
361 doc/tutorial-standalone/tutorial.html
363 doc/modules/canvas/canvas.html
364 doc/modules/multiprocessing/multiprocessing.html
366 doc/modules/canvas/Makefile
367 doc/modules/multiprocessing/Makefile
368 doc/modules/readline/Makefile
369 doc/modules/gtkbuilder/Makefile
370 doc/modules/sqlite/Makefile
371 doc/modules/sandbox/Makefile
373 doc/mapping/mapping.html
380 tests/javascript/Makefile
381 tests/javascript/gtypes/Makefile
382 tests/javascript/signals/Makefile
383 tests/javascript/structs/Makefile
387 doc/modules/version.xml
388 doc/tutorial-standalone/Makefile
389 doc/reference/Makefile
390 doc/reference/version.xml
393 modules/example/Makefile
394 modules/sqlite/Makefile
395 modules/canvas/Makefile
396 modules/readline/Makefile
397 modules/multiprocessing/Makefile
398 modules/sandbox/Makefile
400 modules/dbus/Makefile
401 modules/dbus/util/Makefile
402 modules/libxml/Makefile
403 modules/cairo/Makefile
404 modules/gtkbuilder/Makefile
405 modules/gettext/Makefile
406 modules/mpfr/Makefile
415 Debug......................$enable_debug
416 Profiling/Coverage.........$enable_profile
417 Profiling for Modules......$enable_profile_modules
418 gtk-doc....................$enable_gtk_doc
421 Prefix.....................$prefix
424 Canvas.....................$want_canvas_module
425 example....................$want_example_module
426 multiprocessing............$want_multiprocessing_module
427 readline...................$want_readline_module
428 SQLite.....................$want_sqlite_module
429 DBus.......................$want_dbus_module
430 libxml.....................$want_libxml_module
431 cairo......................$want_cairo_module
432 gtkbuilder.................$want_gtkbuilder_module
433 gettext....................$want_gettext_module
434 mpfr.......................$want_mpfr_module
435 ffi........................$want_ffi_module
438 if test "x$want_readline_module" != "xyes"; then
439 echo "WARNING: The readline module is not enabled.
440 Without this, the Seed REPL will not work;
441 however, most Seed applications will still run.