4 [is_dev=$(echo $PACKAGE_VERSION | sed 's/[0-9]\.[0-9][0-9]*\.[0-9]*[13579]/1/')]
5 if test x"$is_dev" = x1 ; then
12 dnl AC_CANONICAL_TARGET([])
15 AC_SUBST(SWFDEC_MAJORMINOR)
17 AM_CONFIG_HEADER(config.h)
18 AC_CONFIG_MACRO_DIR([m4])
20 dnl decide on error flags
21 dnl if we support them, we set them unconditionally
22 dnl FIXME: I want this but stupid headers don't let me: -Wshadow
23 dnl FIXME: readd -Wlogical-op when http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36513 is solved
24 AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wold-style-definition -Wdeclaration-after-statement -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wformat-nonliteral -Wformat-security -Wswitch-enum -Wswitch-default -Winit-self -Wmissing-include-dirs -Wundef -Waddress -Waggregate-return -Wmissing-format-attribute -Wno-multichar -Wnested-externs")
25 dnl if we're in nano >= 1, add -Werror if supported
26 if test x$SWFDEC_CVS = xyes ; then
27 AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Werror")
28 DEFAULT_DEBUG_LEVEL="SWFDEC_LEVEL_WARNING"
30 DEFAULT_DEBUG_LEVEL="SWFDEC_LEVEL_ERROR"
32 AC_DEFINE_UNQUOTED(SWFDEC_LEVEL_DEFAULT, $DEFAULT_DEBUG_LEVEL, [Default debug level used])
34 SWFDEC_LIBVERSION="1:0:0"
35 AC_SUBST(SWFDEC_LIBVERSION)
38 dnl C99 is only required to get definitions for NAN and INFINITY.
39 AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-std=gnu99")
41 dnl ensures the library is linked against the internal Mozilla
42 dnl if this doesn't work on your platform, I'll take patches :)
43 SYMBOLIC_LDFLAGS="-Wl,-Bsymbolic"
44 AC_SUBST(SYMBOLIC_LDFLAGS)
46 dnl Add parameters for aclocal
47 dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
48 #ACLOCAL_AMFLAGS="-I m4 $ACLOCAL_AMFLAGS"
58 AC_MSG_CHECKING([for timezone support])
64 localtime (&t)->tm_gmtoff;
68 if test "x$HAVE_TIMEZONE" = "xyes"; then
70 AC_DEFINE(HAVE_TIMEZONE, 1, [Define if we can query the timezone])
76 dnl ##############################
77 dnl # Do automated configuration #
78 dnl ##############################
83 dnl modify pkg-config path
84 AC_ARG_WITH(pkg-config-path,
85 AC_HELP_STRING([--with-pkg-config-path],[colon-separated list of pkg-config(1) dirs]),
86 [export PKG_CONFIG_PATH=${withval}])
88 dnl Check for essential libraries first:
89 dnl ====================================
92 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_VER gobject-2.0 >= $GLIB_VER gthread-2.0 >= $GLIB_VER,
93 HAVE_GLIB=yes, HAVE_GLIB=no)
94 if test "$HAVE_GLIB" = "no"; then
95 AC_MSG_ERROR([glib-2.0, gobject-2.0 and gthread-2.0 >= $GLIB_VER are required to build swfdec])
100 dnl FIXME: detect these executables correctly
101 GLIB_GENMARSHAL=glib-genmarshal
102 AC_SUBST(GLIB_GENMARSHAL)
103 GLIB_MKENUMS=glib-mkenums
104 AC_SUBST(GLIB_MKENUMS)
107 PKG_CHECK_MODULES(PANGO, pangocairo >= $PANGO_VER, HAVE_PANGO=yes, HAVE_PANGO=no)
108 if test "$HAVE_PANGO" = "no"; then
109 AC_MSG_ERROR([pangocairo >= $PANGO_VER is required to build swfdec])
112 AC_SUBST(PANGO_CFLAGS)
115 AS_HELP_STRING([--enable-gtk],
116 [enable build of swfdec-gtk (default=yes)])],
117 enable_gtk=$enableval,
121 dnl GTK: We want this for swfdec-gtk
125 if test "$enable_gtk" = "yes"; then
126 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_VER libsoup-2.4, HAVE_GTK=yes)
127 AC_DEFINE(HAVE_GTK, 1, [Define if Gtk is enabled])
129 AC_MSG_NOTICE([Gtk support was not enabled.])
131 AM_CONDITIONAL(WITH_GTK, [test "x$HAVE_GTK" = xyes])
137 [AC_HELP_STRING([--with-audio=@<:@auto/pulse/none@:>@],
138 [audio backend to use])],,
142 if test "$with_audio" = "alsa"; then
143 PKG_CHECK_MODULES(ALSA, alsa >= 1.0, AUDIO_TYPE=alsa)
144 if test "$AUDIO_TYPE" = "alsa"; then
145 AUDIO_CFLAGS=$ALSA_CFLAGS
146 AUDIO_LIBS=$ALSA_LIBS
148 if test "$with_audio" = "alsa"; then
149 AC_MSG_ERROR([no alsa audio support])
151 AC_MSG_WARN([no alsa audio support])
156 dnl Use PA if ALSA wasn't found and we're auto and it's available.
157 dnl Disabled for now until the PA backend works.
158 if test "$with_audio" = "pulse"; then
159 PKG_CHECK_MODULES(PA, libpulse-mainloop-glib, AUDIO_TYPE="pulse")
160 if test "$AUDIO_TYPE" = "pulse"; then
161 AUDIO_CFLAGS=$PA_CFLAGS
164 if test "$with_audio" = "pulse"; then
165 AC_MSG_ERROR([no pulseaudio support])
167 AC_MSG_WARN([no pulseaudio support])
172 dnl If all else fails, fall back to none.
173 if test "$with_audio" = "none"; then
179 if test "x$AUDIO_TYPE" = "x"; then
180 AC_MSG_ERROR([audio backend "$with_audio" could not be used])
182 AC_MSG_NOTICE([audio backend: $AUDIO_TYPE])
185 AC_SUBST(AUDIO_CFLAGS)
189 PKG_CHECK_MODULES(LIBOIL, liboil-0.3 >= $LIBOIL_VER, HAVE_LIBOIL=yes, HAVE_LIBOIL=no)
190 AC_SUBST(LIBOIL_LIBS)
191 AC_SUBST(LIBOIL_CFLAGS)
192 if test "$HAVE_LIBOIL" = "no"; then
193 AC_MSG_ERROR([liboil-0.3 >= $LIBOIL_VER is required to build swfdec])
197 PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VER cairo-png >= $CAIRO_VER, HAVE_CAIRO=yes, HAVE_CAIRO=no)
199 AC_SUBST(CAIRO_CFLAGS)
200 if test "$HAVE_CAIRO" = "no"; then
201 AC_MSG_ERROR([cairo and cairo-png = $CAIRO_VER is required to build swfdec])
204 AC_ARG_ENABLE(gstreamer,
205 AS_HELP_STRING([--enable-gstreamer],
206 [enable GStreamer support (default=yes)])],
207 enable_gstreamer=$enableval,
208 enable_gstreamer="yes")
210 if test "$enable_gstreamer" = "yes"; then
212 GST_PB_REQUIRED=0.10.15
213 PKG_CHECK_MODULES(GST, gstreamer-0.10 >= $GST_REQUIRED gstreamer-pbutils-0.10 >= $GST_PB_REQUIRED, HAVE_GST=yes, HAVE_GST=no)
214 if test "x$HAVE_GST" = xyes; then
215 AC_DEFINE(HAVE_GST, 1, [Define if GStreamer is enabled])
217 AC_MSG_ERROR([Couldn't find GStreamer $GST_REQUIRED and gstreamer-pbutils $GST_PB_REQUIRED.])
220 AC_MSG_NOTICE([GStreamer support was not enabled.])
222 AM_CONDITIONAL(HAVE_GST, [test "x$HAVE_GST" = xyes])
225 AC_ARG_ENABLE(vivified,
226 AS_HELP_STRING([--enable-vivified],
227 [enable Vivified Flash debugger (default=no)])],
228 enable_vivi=$enableval,
230 if test "$enable_vivi" = "yes"; then
232 MING_REQUIRED=0.4.0.beta5
233 VIVI_GTK_REQUIRED=2.11.6
234 VIVI_GLIB_REQUIRED=2.14
235 PKG_CHECK_MODULES(VIVI, libming >= $MING_REQUIRED gmodule-export-2.0 gtk+-2.0 >= $VIVI_GTK_REQUIRED glib-2.0 >= $VIVI_GLIB_REQUIRED, HAVE_VIVI=yes, HAVE_VIVI=no)
236 if test "x$HAVE_VIVI" = xyes; then
237 AC_DEFINE(HAVE_VIVI, 1, [Define if Vivified is enabled])
239 AC_MSG_ERROR([Vivified requirements not met. You need libming >= $MING_REQUIRED, glib >= $VIVI_GLIB_REQUIRED and Gtk+ >= $VIVI_GTK_REQUIRED.])
242 AC_MSG_NOTICE([Vivified was not enabled.])
244 AM_CONDITIONAL(HAVE_VIVI, [test "x$HAVE_VIVI" = xyes])
247 AC_SUBST(GLOBAL_CFLAGS)
248 AC_SUBST(GLOBAL_CFLAGS)
250 SWFDEC_CFLAGS="-I\$(top_srcdir) $GLIB_CFLAGS $CAIRO_CFLAGS"
251 SWFDEC_LIBS="\$(top_builddir)/swfdec/libswfdec-$SWFDEC_MAJORMINOR.la $GLIB_LIBS $CAIRO_LIBS -lz -lm"
252 AC_SUBST(SWFDEC_LIBS)
253 AC_SUBST(SWFDEC_CFLAGS)
255 SWFDEC_GTK_CFLAGS="$SWFDEC_CFLAGS $GTK_CFLAGS"
256 SWFDEC_GTK_LIBS="\$(top_builddir)/swfdec-gtk/libswfdec-gtk-$SWFDEC_MAJORMINOR.la $SWFDEC_LIBS $GTK_LIBS"
257 AC_SUBST(SWFDEC_GTK_LIBS)
258 AC_SUBST(SWFDEC_GTK_CFLAGS)
262 if test "x${prefix}" = "xNONE"; then
263 PACKAGE_PREFIX=${ac_default_prefix}
265 PACKAGE_PREFIX=${prefix}
267 AC_DEFINE_UNQUOTED(PACKAGE_PREFIX, "$PACKAGE_PREFIX", [Define the package prefix])
268 AC_SUBST(PACKAGE_PREFIX)
270 dnl #########################
271 dnl # Make the output files #
272 dnl #########################
274 dnl testsuite/autoplug/Makefile
275 dnl testsuite/Makefile
289 test/gnash/media/Makefile
290 test/gnash/actionscript.all/Makefile
291 test/gnash/misc-mtasc.all/Makefile
292 test/gnash/misc-swfc.all/Makefile
293 test/gnash/misc-swfmill.all/Makefile
297 test/various/Makefile
300 vivified/code/Makefile
301 vivified/code/test/Makefile
302 vivified/code/test/compiler/Makefile
303 vivified/code/test/decompiler/Makefile
304 vivified/core/Makefile
305 vivified/dock/Makefile