ExternalInterface methods are static now.
[gnash.git] / configure.ac
blobd25e09a942b46a3380499d3177cf0732dea12b0f
1 dnl  
2 dnl  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 dnl  
4 dnl  This program is free software; you can redistribute it and/or modify
5 dnl  it under the terms of the GNU General Public License as published by
6 dnl  the Free Software Foundation; either version 3 of the License, or
7 dnl  (at your option) any later version.
8 dnl  
9 dnl  This program is distributed in the hope that it will be useful,
10 dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl  GNU General Public License for more details.
13 dnl  You should have received a copy of the GNU General Public License
14 dnl  along with this program; if not, write to the Free Software
15 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16 dnl  
18 AC_PREREQ(2.50)
19 AC_INIT(gnash, trunk)
20 AC_CONFIG_SRCDIR([libcore/gnash.h])
21 AC_CONFIG_HEADERS([gnashconfig.h])
23 dnl AC_CONFIG_SUBDIRS(libltdl)
24 AC_CANONICAL_BUILD
25 AC_CANONICAL_HOST
27 dnl --------------------------------------------------------
28 dnl Figure out development tool stuff
29 dnl --------------------------------------------------------
31 AC_PROG_CC
32 AC_PROG_CXX
33 AC_EXEEXT
34 AC_PROG_INSTALL
35 AM_COMPILER_LIB
37 dnl Set the default values for Flash Version. These are converted into
38 dnl various strings to make JavaScript or ActionScript detectors
39 dnl recognize Gnash as a SWF Player.
40 DEFAULT_FLASH_MAJOR_VERSION="10"
41 DEFAULT_FLASH_MINOR_VERSION="1"
42 DEFAULT_FLASH_REV_NUMBER="999"
43 AC_SUBST(DEFAULT_FLASH_MAJOR_VERSION)
44 AC_SUBST(DEFAULT_FLASH_MINOR_VERSION)
45 AC_SUBST(DEFAULT_FLASH_REV_NUMBER)
47 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_MAJOR_VERSION], ["${DEFAULT_FLASH_MAJOR_VERSION}"], [Default Flash major version])
48 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_MINOR_VERSION], ["${DEFAULT_FLASH_MINOR_VERSION}"], [Default Flash minor version])
49 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_REV_NUMBER], ["${DEFAULT_FLASH_REV_NUMBER}"], [Default Flash revision number])
51 dnl TODO: use host/build/target -- whatever is more appropriate
52 case "${host}" in
53   *-apple-*)
54     DEFAULT_FLASH_PLATFORM_ID="MAC"
55     DEFAULT_FLASH_SYSTEM_OS="MacOS"
56     ;;
57   *-openbsd*)
58     DEFAULT_FLASH_PLATFORM_ID="BSD"
59     DEFAULT_FLASH_SYSTEM_OS="OpenBSD"
60     ;;
61   *-freebsd*)
62     DEFAULT_FLASH_PLATFORM_ID="BSD"
63     DEFAULT_FLASH_SYSTEM_OS="FreeBSD"
64     ;;
65   *-netbsd*)
66     DEFAULT_FLASH_PLATFORM_ID="BSD"
67     DEFAULT_FLASH_SYSTEM_OS="NetBSD"
68     ;;
69   *-linux-gnu)
70     DEFAULT_FLASH_PLATFORM_ID="LNX"
71     DEFAULT_FLASH_SYSTEM_OS="GNU/Linux"
72     ;;
73   *-linux*)
74     DEFAULT_FLASH_PLATFORM_ID="LNX"
75     DEFAULT_FLASH_SYSTEM_OS="Linux"
76     ;;
77   *-cygwin* | *-mingw* | *-pw32*)
78     DEFAULT_FLASH_PLATFORM_ID="WIN"
79     DEFAULT_FLASH_SYSTEM_OS="Windows"
80     ;;
81   *-*solaris*)
82     DEFAULT_FLASH_PLATFORM_ID="SUN"
83     DEFAULT_FLASH_SYSTEM_OS="Solaris"
84     ;;
85   *-os2*)
86     DEFAULT_FLASH_PLATFORM_ID="OS2"
87     DEFAULT_FLASH_SYSTEM_OS="OS/2"
88     ;;
89   *-sco*)
90     DEFAULT_FLASH_PLATFORM_ID="SCO"
91     DEFAULT_FLASH_SYSTEM_OS="SCO/Unix"
92     ;;
93   *-irix*)
94     DEFAULT_FLASH_PLATFORM_ID="IRX"
95     DEFAULT_FLASH_SYSTEM_OS="IRIX"
96     ;;
97   *-hpux*)
98     DEFAULT_FLASH_PLATFORM_ID="HPX"
99     DEFAULT_FLASH_SYSTEM_OS="HPUX"
100     ;;    
101   *-amigaos*)
102     DEFAULT_FLASH_PLATFORM_ID="OS4"
103     DEFAULT_FLASH_SYSTEM_OS="AmigaOS4"
104     ;;    
105   *-haiku*)
106     DEFAULT_FLASH_PLATFORM_ID="HAIKU"
107     DEFAULT_FLASH_SYSTEM_OS="Haiku"
108     ;;    
109   *)
110     DEFAULT_FLASH_PLATFORM_ID="UNK"
111     DEFAULT_FLASH_SYSTEM_OS="Unknown"
112     ;;
113 esac
115 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_PLATFORM_ID], ["${DEFAULT_FLASH_PLATFORM_ID}"], [Default 3-letter platform identifier for version string])
116 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_SYSTEM_OS], ["${DEFAULT_FLASH_SYSTEM_OS}"], [Default value for System.capabilities.os])
118 AC_SUBST(DEFAULT_FLASH_PLATFORM_ID)
119 AC_SUBST(DEFAULT_FLASH_SYSTEM_OS)
121 DEFAULT_STREAMS_TIMEOUT=60
122 AC_SUBST(DEFAULT_STREAMS_TIMEOUT)
123 AC_DEFINE_UNQUOTED([DEFAULT_STREAMS_TIMEOUT], [${DEFAULT_STREAMS_TIMEOUT}], [Default streams timeout in seconds])
125 DEFAULT_SOL_SAFEDIR="~/.gnash/SharedObjects"
126 AC_SUBST(DEFAULT_SOL_SAFEDIR)
127 AC_DEFINE_UNQUOTED([DEFAULT_SOL_SAFEDIR], ["${DEFAULT_SOL_SAFEDIR}"], [Default SharedObject base directory])
130 dnl Some things you can only do by looking at the platform name.
131 case "${host}" in
132   powerpc-apple-darwin*)
133     AC_DEFINE([__powerpc64__], [1], [this is a 64 bit powerpc])
134     darwin=yes
135     AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform])
136     ;;
137   *-apple-darwin*)
138     darwin=yes
139     AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform])
140     ;;
141     dnl Unfortunately, all BSD distributions are not identical, so 
142     dnl as tacky as it is to look for the distribution name, we don't
143     dnl have much choice. The use of these should be avoid as much as possible.
144   *-openbsd*)
145     bsd=yes
146     openbsd=yes
147     AC_DEFINE([OPENBSD_HOST], [1], [this is an OpenBSD platform])
148     ;;
149   *-freebsd*)
150     bsd=yes
151     freebsd=yes
152     AC_DEFINE([FREEBSD_HOST], [1], [this is a FreeBSD platform])
153     ;;
154   *-netbsd*)
155     bsd=yes
156     netbsd=yes
157     AC_DEFINE([NETBSD_HOST], [1], [this is a NetBSD platform])
158     ;;
159   *-*solaris*)
160     solaris=yes
161     AC_DEFINE([SOLARIS_HOST], [1], [this is a Solaris platform])
162     ;;
163   *-*linux*)
164     linux=yes
165     AC_DEFINE([LINUX_HOST], [1], [this is a Linux platform])
166     ;;
167   *-cygwin* | *-mingw* | *-pw32*)
168     windows=yes
169     AC_DEFINE([WIN32_HOST], [1], [this is a Win32 platform])
170     ;;
171   *64-*-*bsd*)
172     bsd_os=bsd 
173     AC_DEFINE([WORDSIZE], [64], [this is a 64 platform])
174     ;;
175   *-*amigaos*)
176     amigaos4=yes
177     AC_DEFINE([AMIGAOS4_HOST], [1], [this is an AmigaOS4 platform])
178     ;;
179   *-*haiku*)
180     haiku=yes
181     AC_DEFINE([HAIKU_HOST], [1], [this is a Haiku platform])
182     ;;
183 esac
186 AM_CONDITIONAL(PLUGIN_LINK_UNDEFINED, test x$openbsd_os = xopenbsd)
187 AM_CONDITIONAL(WIN32, test x$windows = xyes)
189 dnl Get build date for helping us debugging
190 BUILDDATE="`date +%Y%m%d`"
191 AC_SUBST(BUILDDATE)
193 dnl These are required by automake
194 dnl AM_INIT_AUTOMAKE(gnash, "trunk$BUILDDATE")
195 AM_INIT_AUTOMAKE
196 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
197 AM_MAINTAINER_MODE
198 AC_PROG_MAKE_SET
200 dnl AC_DISABLE_STATIC dnl Disable building static libs.
202 AM_GNU_GETTEXT([external])
203 AM_CONDITIONAL(HAS_GETTEXT, test x$ac_cv_path_XGETTEXT != x)
204 dnl AM_GNU_GETTEXT_VERSION(0.15)
206 dnl This is primarily used when compiling for a similar architecture,
207 dnl like pentium->geode, which can use the same compiler, but have
208 dnl different development libraries.
210 dnl I want to depreciate this option for the new sysroot name to be
211 dnl consistant with other tools. This will be left for a while as 
212 dnl a transistion.
213 AC_ARG_WITH(top_level,
214   AC_HELP_STRING([--with-top-level],
215   [top level directory for cross compiling files]),
216   with_top_level=${withval} ;
217   cross_compiling=yes)
219 AC_ARG_WITH(sysroot,
220   AC_HELP_STRING([--with-sysroot],
221   [system root directory for cross compiling]),
222   with_top_level=${withval} ;
223   cross_compiling=yes)
225 dnl Android is a little different when using a standard cross toolchain,
226 dnl so we have to configure especially for it for now. Usually it's
227 dnl something like this:
229 dnl arm-linux-eabi-gcc -Wl,--dynamic-linker -Wl,/system/bin/linker
230 dnl -nostdlib -Wl,-rpath -Wl,/system/lib -Wl,-rpath
231 dnl -Wl,/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
232 dnl -L/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
233 dnl -lc -o hello
234 dnl  /opt/android-ndk-r3/build/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o
235 dnl Recent versions of G++ (I'm using 4.5 from source
236 android_ndk=no
237 AC_ARG_WITH([android],
238   AC_HELP_STRING([--with-android], [directory where android NDK is installed]),
239         android_ndk=${withval}
240         if test x"${withval}" != x; then
241           android_ndk=${withval}
242         else
243           android_ndk=/opt/android-ndk-r3/build/platforms/android-5/arch-arm
244         fi
246 CROSS_CXXFLAGS=
247 if test x"${android_ndk}" != xno; then
248 dnl  LDFLAGS=-Wl,--dynamic-linker -Wl,/system/bin/linker -nostdlib -Wl,-rpath -Wl,/system/lib -Wl,-rpath -Wl,${android_ndk}/usr/lib -L${android_ndk}/usr/lib -lc -o hello ${android_ndk}/usr/lib/crtbegin_dynamic.o
249   CROSS_CXXFLAGS=-mandroid -fexceptions
250   if test x"${with_top_level}" = x; then
251     with_top_level=/usr/local/android-arm/sysroot/usr
252     cross_compiling=yes
253   fi
254   ANDROID_NDK=${android_ndk}
255   AC_DEFINE(_ANDROID, [1], [This is an Android build])
256 else
257   ANDROID_NDK=
259 AC_SUBST(ANDROID_NDK)
260 AM_CONDITIONAL(ANDROID, [ test x"${android_ndk}" != xno ])
262 soldir=/tmp
263 AC_ARG_WITH(soldir,
264  AC_HELP_STRING([--with-soldir],
265  [directory for .sol files]),
266  with_soldir=${withval})
267 if test x${with_soldir} != x; then
268   soldir=${with_soldir}
270 SOLDIR=${soldir}
271 AC_SUBST(SOLDIR)
273 AC_ARG_ENABLE(avm2,
274   AC_HELP_STRING([--enable-avm2], [Enable support for AS3]),
275   [case "${enableval}" in
276     yes) avm2=yes ;;
277     no)  avm2=no ;;
278     *)   AC_MSG_ERROR([bad value ${enableval} for enable-avm2 option]) ;;
279   esac], avm2=yes
281 AM_CONDITIONAL(ENABLE_AVM2, [test x"$avm2" = xyes])
282 if test x$avm2 = xyes; then
283     AC_DEFINE(ENABLE_AVM2, [1], [Enable AVM2 code])
286 AC_ARG_ENABLE(scriptable,
287   AC_HELP_STRING([--enable-scriptable], [Enable support for AS3]),
288   [case "${enableval}" in
289     yes) scriptable=yes ;;
290     no)  scriptable=no ;;
291     *)   AC_MSG_ERROR([bad value ${enableval} for enable-scriptable option]) ;;
292   esac], scriptable=yes
294 AM_CONDITIONAL(SCRIPTABLE, [test x"$scriptable" = xyes])
295 if test x$scriptable = xyes; then
296     AC_DEFINE(ENABLE_SCRIPTABLE, [1], [Enable scriptable code in plugin])
299 dnl This option is only used if you want Gnash to interwork with 
300 dnl the Adobe player using the LocalConnection class.
301 dnl lckey=0xdd3adabd
302 AC_ARG_WITH(lckey,
303  AC_HELP_STRING([--with-lckey],
304  [shared memory key for your system]),
305  with_lckey=${withval})
307 if test x${with_lckey} != x; then
308   lckey=${with_lckey}
309 else
310   lckey=0xcbc384f8
312 LC_KEY=${lckey}
313 AC_SUBST(LC_KEY)
315 dnl FIXME: this should go away when gtk.cpp is cleaned up..
316 AC_DEFINE([BUILD_CANVAS], [], [Build GTK Canvas support for the GTK Widget ])
318 AC_ARG_ENABLE(python,
319   AC_HELP_STRING([--enable-python],[Enable python for the python wrapper]),
320 [case "${enableval}" in
321   yes) python=yes ;;
322   no)  python=no ;;
323   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-python option]) ;;
324 esac],python=no)
326 # Maybe use jemalloc, which handles memory fragmentation for
327 # ECAMscript languages better than the regular system malloc.
328 # This seems like a good idea, as both the other player and
329 # Mozilla/Firefox both recently switched to using jemalloc.
330 AC_ARG_ENABLE(jemalloc,
331   AC_HELP_STRING([--enable-jemalloc],[Enable jemalloc instead of system malloc]),
332 [case "${enableval}" in
333   yes) jemalloc=yes ;;
334   no)  jemalloc=no ;;
335   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-jemalloc option]) ;;
336 esac],jemalloc=yes)
338 dnl There is some weird stuff going on with NetBSD and jemalloc, so don't 
339 dnl build it for now.
340 if test x"${netbsd}" = x"yes" -o x"${windows}" = x"yes" -o x"${freebsd}" = x"yes" -o x"${haiku}" = x"yes"; then
341   jemalloc=no
343 dnl If the compiler doesn't have local thread storage enabled, don't try to
344 dnl use jemalloc.
345 if test x"${jemalloc}" = x"yes"; then
346   AC_TRY_COMPILE([], [
347     extern __thread int global_i; ],
348     has_local_thread_storage=yes
349   )
350   if test x"${has_local_thread_storage}" = x"yes"; then
351     AC_DEFINE([HAVE_LOCAL_THREAD_STORAGE], [1], [Has __thread (local thread storage) support])
352     AC_DEFINE([USE_JEMALLOC], [], [Use jemalloc instead of system malloc])
353   else
354     jemalloc=no
355   fi
358 dnl We can search libs for mallinfo to decide whether we have it or not.
359 dnl This is added to the linker flags when it's found. Usually it's -lc, but
360 dnl on OpenSolaris it's -lmalloc, so this fixes the build.
361 AC_SEARCH_LIBS([mallinfo], [c malloc],
362                AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
363                mallinfo=yes
364                )
366 AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes)
367 AM_CONDITIONAL(JEMALLOC, test x$jemalloc = xyes)
369 AC_ARG_ENABLE(debugger,
370   AC_HELP_STRING([--enable-debugger],[Enable the Flash debugger]),
371 [case "${enableval}" in
372   yes) debugger=yes ;;
373   no)  debugger=no ;;
374   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-debugger option]) ;;
375 esac],debugger=no)
377 if test x"$debugger" = x"yes"; then
378   AC_DEFINE([USE_DEBUGGER], [], [Flash Debugger support])
380 AM_CONDITIONAL(DEBUGGER, test x$debugger = xyes)
382 AC_ARG_ENABLE(fps-debug,
383   AC_HELP_STRING([--enable-fps-debug],[Enable FPS debugging code]),
384 [case "${enableval}" in
385   yes) AC_DEFINE([GNASH_FPS_DEBUG], [1], [Enable FPS debugging code])
386 esac])
388 dnl When we're making binary releases, it's often nice to just statically link
389 dnl the final executables so we don't worry about what's installed, or which
390 dnl version it is.
391 AC_ARG_ENABLE(allstatic,
392   AC_HELP_STRING([--enable-allstatic],[Enable using static libraries when possible for dependencies]),
393 [case "${enableval}" in
394   yes) allstatic=yes ;;
395   no)  allstatic=no ;;
396   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-allstatic option]) ;;
397 esac],allstatic=no)
398 AM_CONDITIONAL(ALLSTATIC, test x$allstatic = xyes)
400 AC_ARG_WITH(cpu,
401   AC_HELP_STRING([--with-cpu],[specify a cpu when cross compiling.]),
402   [case "${withval}" in
403     geode) with_cpu=geode ;;
404     *)   AC_MSG_ERROR([bad value ${enableval} for --with-cpu option]) ;;
405    esac],with_cpu=none)
407 if test x"$with_cpu" != x"none"; then
408 dnl   $CXXFLAGS="$CXXFLAGS -march=${with_cpu}"
409    cross_compiling=yes
412 AC_ARG_WITH(shm,
413   AC_HELP_STRING([--with-shm],[specify a shared memory type.]),
414   [case "${withval}" in
415     sysv) with_shm=sysv
416           ;;
417     posix) with_shm=posix
418           ;;    
419     *)   AC_MSG_ERROR([bad value ${enableval} for --with-shm option (try sysv or posix])
420           ;;
421    esac],with_shm=sysv)
423 if test x"${with_shm}" = x"sysv"; then
424   AC_DEFINE([USE_SYSV_SHM], [1], [Use SYSV shared memory for compatability])
425   dnl IPC_INFO isn't portable, and doesn't exist on BSD
426   AC_TRY_COMPILE([#include <sys/ipc.h> #include <sys/shm.h>], [
427     int flag = IPC_INFO; ],
428     AC_DEFINE([HAVE_IPC_INFO], [1], [Use shm_info])
429   )
430 else
431   AC_DEFINE([USE_POSIX_SHM], [1], [Use POSIX shared memory])
434 dnl Don't add the GUI menu. Some educational systems think this adds
435 dnl clutter and confusion, like on the OLPC.
436 AC_ARG_ENABLE(menus,
437   AC_HELP_STRING([--disable-menus],[Disable the GUI menus]),
438 [case "${enableval}" in
439   yes) menus=yes ;;
440   no)  menus=no ;;
441   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-menus option]) ;;
442 esac],menus=yes)
444 if test x"$menus" = x"yes"; then
445   AC_DEFINE([USE_MENUS], [], [GUI Menu support])
447 AM_CONDITIONAL(MENUS, test x$menus = xyes)
449 dnl Don't gather SWF information in tree form. This takes
450 dnl resources and memory that can be saved if there's no
451 dnl need to examine SWF internals.
452 AC_ARG_ENABLE(swftree,
453   AC_HELP_STRING([--disable-swftree],[Disable showing SWF properties]),
454 [case "${enableval}" in
455   yes) swftree=yes ;;
456   no)  swftree=no ;;
457   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-swf-properties option]) ;;
458 esac],swftree=yes)
460 if test x"$swftree" = x"yes"; then
461   AC_DEFINE([USE_SWFTREE], [], [View SWF information])
463 AM_CONDITIONAL(SWFTREE, test x$swftree = xyes)
465 dnl Disable running any tests for "make check". This may sound stupid, but
466 dnl this option is designed to solely be used by maintainers in the 
467 dnl DISTCHECK_CONFIGURE_FLAGS when building packages. Gnash's testing infrastructure
468 dnl is complex, and often the the testsuites will work, but due to some obscure reason,
469 dnl make distcheck fails.
470 AC_ARG_ENABLE(testsuite,
471   AC_HELP_STRING([--disable-testsuite],[Disable the testsuite, maintainers option only]),
472 [case "${enableval}" in
473   yes) testsuite=yes ;;
474   no)  testsuite=no ;;
475   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-testsuite option]) ;;
476 esac],testsuite=yes)
478 if test x"$testsuite" = x"yes"; then
479   AC_DEFINE([USE_TESTSUITE], [], [Testsuite support, maintainers option only])
481 AM_CONDITIONAL(TESTSUITE, test x$testsuite = xyes)
483 dnl -- dnl Enable building the gui support even when statically
484 dnl -- dnl linking. Normally this is only disabled when building a statically
485 dnl -- dnl linked gnash executable.
486 dnl -- AC_ARG_ENABLE(dynamic-gui,
487 dnl --   AC_HELP_STRING([--enable-dynamic-gui],[Enable building dynamically loadable GUIs and renderers ]),
488 dnl -- [case "${enableval}" in
489 dnl --   yes) dynamic_gui=yes ;;
490 dnl --   no)  dynamic_gui=no ;;
491 dnl --   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-dynamic-gui option]) ;;
492 dnl -- esac],dynamic_gui=no)
493 dnl -- if test x"${dynamic_gui}" = x"yes"; then
494 dnl --   AC_DEFINE([USE_DYNAMIC_GUI], [], [Dynamically loadable GUI and renderer support])
495 dnl -- fi
496 dnl -- AM_CONDITIONAL(DYNAMIC_GUI, test x${dynamic_gui} = xyes)
498 dnl Write the file to disk in the plugin, if specified.
499 AC_ARG_ENABLE(write,
500   AC_HELP_STRING([--enable-write], [Makes the Mozilla plugin write the currently playing SWF movie to /tmp.]),
501 [case "${enableval}" in
502   yes) write=yes ;;
503   no)  write=no ;;
504   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-write option]) ;;
505 esac],write=no)
507 if test x"$write" = x"yes"; then
508   AC_DEFINE([WRITE_FILE], [], [Write files while streaming])
511 dnl Write a standalone gnash launcher to disk from the plugin, if specified.
512 AC_ARG_ENABLE(sa-launcher,
513   AC_HELP_STRING([--disable-sa-launcher], [Drops support for the NPAPI plugin writing of standalone executable launcher scripts for the currently playing SWF movie to /tmp.]),
514 [case "${enableval}" in
515   yes) sa_launcher=yes ;;
516   no)  sa_launcher=no ;;
517   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-sa-launcher option]) ;;
518 esac],sa_launcher=yes)
520 if test x"$sa_launcher" = x"yes"; then
521   AC_DEFINE([CREATE_STANDALONE_GNASH_LAUNCHER], [], [Add support for writing a standalone executable launcher for movies embedded in web pages])
524 dnl Build the cygnal server if specified.
525 AC_ARG_ENABLE(cygnal,
526   AC_HELP_STRING([--enable-cygnal], [Enable building of the Cygnal server]),
527 [case "${enableval}" in
528   yes) cygnal=yes ;;
529   no)  cygnal=no ;;
530   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cygnal option]) ;;
531 esac],cygnal=no)
532 AM_CONDITIONAL(CYGNAL, test x$cygnal = xyes)
534 dnl Build the cgibins server if specified.
535 AC_ARG_ENABLE(cgibins,
536   AC_HELP_STRING([--enable-cgibins], [Enable building of the CGIs for Cygnal]),
537 [case "${enableval}" in
538   yes) cgibin=yes ;;
539   no)  cgibin=no ;;
540   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cgibins option]) ;;
541 esac],cgibin=yes)
542 AM_CONDITIONAL(USE_CGI, test x$cgibin = xyes)
543 if test x"${cgibin}" = x"yes"; then
544   AC_DEFINE([USE_CGIBIN], [1], [Enable cgi-bin processes for Cygnal])
547 dnl Fix the Intel 810 LOD bias problem
548 AC_ARG_ENABLE(i810-lod-bias,
549   AC_HELP_STRING([--enable-i810-lod-bias], [Enable fix for Intel 810 LOD bias problem]),
550 [case "${enableval}" in
551   yes) i810lodbias=yes ;;
552   no)  i810lodbias=no ;;
553   *)   AC_MSG_ERROR([bad value ${enableval} for enable-i810-lod-bias option]) ;;
554 esac])
556 if test x"${i810lodbias}" = xyes; then
557     AC_DEFINE([FIX_I810_LOD_BIAS], [], [Fix i810 LOD bias problem])
560 dnl Install the headers to make Gnash an SDK
561 AC_ARG_ENABLE(sdkinstall,
562   AC_HELP_STRING([--enable-sdkinstall], [Enable installing the libraries and headers as an SDK]),
563 [case "${enableval}" in
564   yes) sdkinstall=yes ;;
565   no)  sdkinstall=no ;;
566   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-sdkinstall option]) ;;
567 esac], sdkinstall=no)
569 AM_CONDITIONAL(SDKINSTALL, test x$sdkinstall = xyes)
571 dnl The class file is an optional file that if it is specified at configure time
572 dnl with --with-classfile=, then only those classes are compiled and built into the
573 dnl class library used for Gnash. THis is designed for small systems that execute the
574 dnl same swf file over and over, and don't need the same level of functionality that
575 dnl a browser plugin does.
576 GNASH_PKG_CLASSFILE
578 has_gtk2=no                     dnl FIXME: has_* shouldn't be in configure but in a macro
580 build_haiku=no
581 build_aos4=no                   dnl AmigaOS4 GUI
582 build_kde3=no
583 build_kde4=no
584 build_qtopia3=no
585 build_qtopia4=no
586 build_gtk=no
587 build_qt3=no
588 build_qt4=no
589 build_fb=no                     dnl Raw framebuffer
590 build_fltk=no
591 build_sdl=no
592 build_riscos=no                 dnl Native OS2 GUI
593 build_aqua=no                   dnl Native MacOSX
594 build_hildon=no                 dnl Native LIMO
595 build_alp=no                    dnl Acess Linux Platform using Hiker
596 build_dump=no
597 AC_ARG_ENABLE(gui,
598   AC_HELP_STRING([--enable-gui=], [Enable support for the specified GUI toolkits (default=gtk,kde4)]),
599   [if test -n ${enableval}; then
600     enableval=`echo ${enableval} | tr '\054' ' ' `
601   fi
602   while test -n "${enableval}" ; do
603     val=`echo ${enableval} | cut -d ' ' -f 1`
604     case "${val}" in
605       hildon|HILDON|hildon2|HILDON2)
606         build_hildon=yes
607         AC_DEFINE(USE_HILDON, [1], [Use the Hildon mobile framework])
608         build_gtk=yes
609 dnl        AC_DEFINE(USE_GTK, [1], [Use the GTK GUI])
610         ;;
611       alp|ALP|alp|ALP)
612         build_alp=yes
613 dnl        AC_DEFINE(USE_ALP, [1], [Use the ALP framework])
614         build_gtk=yes
615         ;;
616       gtk|GTK|gtk2|GTK2)
617 dnl        AC_DEFINE(USE_GTK, [1], [Use the GTK GUI])
618         build_gtk=yes
619         ;;
620       kde3|KDE3)
621         build_qt3=yes
622         build_kde3=yes
623         ;;
624       kde4|KDE4)
625         build_qt4=yes
626         build_kde4=yes
627         ;;
628       qtopia3|QTOPIA3)
629         build_qtopia3=yes
630         build_qt3=yes
631         ;;
632       qtopia4|QTOPIA4)
633         build_qtopia4=yes
634         build_qt4=yes
635         ;;
636       qt3|QT3)
637         build_qt3=yes
638         ;;
639       qt4|QT4)
640         build_qt4=yes
641         ;;
642       sdl|SDL)
643         build_sdl=yes
644         ;;
645       aqua|AQUA|Aqua)
646         build_aqua=yes
647         ;;
648       riscos|RISCOS|RiscOS)
649         build_riscos=yes
650         ;;
651       fltk|FLTK|fltk2|FLTK2)
652         build_fltk=yes
653         ;;
654       fb|FB)
655         build_fb=yes
656         ;;
657       aos4|AOS4)
658         build_aos4=yes
659         ;;
660       haiku|HAIKU)
661         build_haiku=yes
662         ;;
663       dump|DUMP)
664         build_dump=yes
665         ;;
666       all|ALL)
667         build_dump=yes
668         build_fb=yes
669         build_fltk=yes
670         build_qt3=yes
671         build_kde3=yes
672         build_kde4=yes
673         build_qt4=yes
674         build_sdl=yes
675 dnl        build_qtopia=yes
676 dnl        build_hildon=yes
677 dnl        build_alp=yes
678 dnl        build_riscos=yes
679 dnl        build_aos4=yes
680 dnl        build_haiku=yes        
681         ;;
682       *) AC_MSG_ERROR([invalid gui ${enableval} given (accept: gtk|kde3|kde4|fltk|sdl|riscos|aqua|fb|hildon|alp|qtopia3|qtopia4|dump|aos4|haiku)])
683          ;;
684       esac
685     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
686     if test "x$val" = "x$enableval"; then
687       break;
688     fi
689   done],
690   [if test x"${openbsd_os}" = x"openbsd"; then
691     build_kde3=yes;
692     build_qt3=yes;
693     build_gtk=yes;
694   else if test x"${haiku}" = xyes; then
695     build_haiku=yes;
696   else
697     build_kde4=yes;
698     build_qt4=yes;
699     build_gtk=yes;
700   fi
701   fi]
704 if test x"${build_haiku}" = xyes; then
705   if test x"$haiku" != xyes; then
706     echo "        ERROR: Can not build Haiku gui outside of Haiku
707 operating system." >&3
708   fi
711 dnl By default, we want to to build all renderers
712 build_ogl=yes
713 build_agg=yes
714 build_cairo=yes
715 renderer_list="OpenGL AGG Cairo"
716 nrender=3
717 AC_ARG_ENABLE(renderer,
718   AC_HELP_STRING([--enable-renderer=], [Enable support for the specified renderers (ogl|cairo|agg|all, default=all)]),
719   if test -n ${enableval}; then
720     if test "x${enableval}" != "xno" -o "x${enableval}" != "xnone" ; then
721       renderer_list="none"
722       enableval=`echo ${enableval} | tr '\054' ' ' `
723     else
724       renderer_list=""
725       enableval=""
726     fi
727   fi
728   renderer_list=""
729   nrender=0
730   build_ogl=no
731   build_agg=no
732   build_cairo=no
733   while test -n "${enableval}" ; do
734     val=`echo ${enableval} | cut -d ' ' -f 1`
735     [case "${val}" in
736       no*|NO*)
737         renderer_list="none"
738         build_ogl=no
739         build_agg=no
740         build_cairo=no
741         nrender=1
742         ;;
743       all|ALL)
744         renderer_list="OpenGL, Cairo, AGG"
745         build_ogl=yes
746         build_agg=yes
747         build_cairo=yes
748         nrender=3
749         ;;
750       ogl|OGL|OpenGL|opengl)
751         renderer_list="${renderer_list} OpenGL"
752         build_ogl=yes
753         nrender=$((nrender+1))
754         ;;
755       agg|AGG)
756         renderer_list="${renderer_list} AGG"
757         build_agg=yes
758         nrender=$((nrender+1))
759         ;;
760       cairo|CAIRO|Cairo*)
761         renderer_list="${renderer_list} Cairo"
762         build_cairo=yes
763         nrender=$((nrender+1))
764         ;;
765       *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept:  (ogl|cairo|agg|all)])
766         ;;
767       esac]
768     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
769     if test "x$val" = "x$enableval"; then
770       break;
771     fi
772   done
775 add_sound=
776 build_sound_sdl=no
777 build_sound_ahi=no
778 build_sound_mkit=no
779 AC_ARG_ENABLE(sound,
780   AC_HELP_STRING([--enable-sound=[[sdl|ahi|mkit]]], [Use the specified sound handler (default=sdl)]),
781      [case "${enableval}" in
782       sdl|SDL|Sdl)
783         build_sound_sdl=yes
784         add_sound="sdl"
785         ;;
786       ahi|AHI|Ahi)
787         build_sound_ahi=yes
788         add_sound="ahi"
789         ;;
790       mkit|MKIT|Mkit)
791         build_sound_mkit=yes
792         add_sound="mkit"
793         ;;
794      esac],
795   [if test x"${haiku}" = xyes; then
796      build_sound_mkit=yes
797      add_sound="mkit"
798    else
799      build_sound_sdl=yes
800      add_sound=sdl
801    fi]
804 if test x$build_ogl = xyes; then
805 dnl  if test x$build_fb = xyes; then
806 dnl    AC_MSG_ERROR([OpenGL renderer is not supported by FB gui. Use --enable-renderer=AGG or --enable-gui=kde,gtk,sdl]);
807 dnl  fi
808 dnl  if test x$build_fltk = xyes; then
809 dnl    AC_MSG_ERROR([OpenGL renderer is not supported by FLTK gui. Use --enable-renderer=AGG or --enable-gui=kde,gtk,sdl]);
810 dnl  fi
811 dnl  if test x"${build_dump}" = xyes -o x"${build_haiku}" = xyes; then
812 dnl    AC_MSG_ERROR([OpenGL renderer is not supported by this gui. Use --enable-renderer=AGG or --enable-gui=kde,gtk,sdl]);
813 dnl  fi
814    AC_DEFINE([RENDERER_OPENGL], [], [Use OpenGL renderer])
817 dnl 16 bit: RGB555, RGB565
818 dnl 24 bit: RGB24, BGR24
819 dnl 32 bit: RGBA32, BGRA32
820 pixelformat=all
821 AC_ARG_WITH(pixelformat,
822   AC_HELP_STRING([--with-pixelformat=], [Use the specified pixel format for AGG (default=all)]),
823   if test -n ${withval}; then
824     pixelformat="${withval}"
825     withval=`echo ${withval} | tr '\054' ' ' `
826   fi
827   while test -n "${withval}" ; do
828     val=`echo ${withval} | cut -d ' ' -f 1`
829     [case "${val}" in
830       all)
831         # allow special value "all" set by user (handled below)
832         ;; 
833       argb32|ARGB32)
834         AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32])
835         ;;
836       abgr32|ABGR32)
837         AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32])
838         ;;
839       bgra32|BGRA32)
840         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
841         ;;
842       bgr24|BGR24)
843         AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24])
844         ;;
845       rgba32|RGBA32)
846         AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32])
847         ;;
848       rgb24|RGB24)
849         AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24])
850         ;;
851       rgb555|RGB555)
852         AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555])
853         ;;
854       rgb565|RGB565)
855         AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565])
856         ;;
857       *) AC_MSG_ERROR([invalid pixel format ${withval} given (accept: all|RGB555|RGB565|RGB24|BGR24|BGRA32|RGBA32|ARGB32|ABGR32)])
858          ;;
859       esac]
860     withval=`echo ${withval} | cut -d ' ' -f 2-6`
861     if test "x$val" = "x$withval"; then
862       break;
863     fi
864   done
867 if test x$pixelformat = xall; then
868   if test x$build_agg = xyes; then
869     ### The fact that we're building GTK doesn't mean we're not also
870     ### building KDE or SDL, each needing its own pixel format !
871     #if test x$build_gtk = xyes; then
872     #  AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24 pixel format])
873     #  pixelformat="RGB24"
874     #else
875       AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555 pixel format])
876       AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565 pixel format])
877       AC_DEFINE(PIXELFORMAT_RGB24,  [1], [RGB24 pixel format])
878       AC_DEFINE(PIXELFORMAT_BGR24,  [1], [BGR24 pixel format])
879       AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32 pixel format])
880       AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32 pixel format])
881       AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32 pixel format])
882       AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32 pixel format])
883     #fi
884   fi
887 dnl --------------------------------------------------------
888 dnl  Select media handler
889 dnl --------------------------------------------------------
891 media_handler_specified=false
892 AC_ARG_ENABLE(media,
893  AC_HELP_STRING([--enable-media=handler], [Enable media handling support using the specified handler: gst, ffmpeg or none (no sound) [[gst]] ]),
894  [case "${enableval}" in
895    GST|gst)
896      media_handler=gst
897      media_handler_specified=true
898      ;;
899    ffmpeg|FFMPEG)
900      media_handler=ffmpeg
901      media_handler_specified=true
902      ;;
903    no|NO|none)
904      media_handler=none
905      media_handler_specified=true
906      ;;
907    *) AC_MSG_ERROR([bad value ${enableval} for --enable-media option]) ;;
908   esac],
909  [media_handler=gst; media_handler_specified=true]
912 dnl If we're on Haiku, there is only one supported media handler.
913 if test x"${build_haiku}" = xyes; then
914      media_handler=ffmpeg
915      media_handler_specified=true
918 AC_ARG_ENABLE(lirc, AC_HELP_STRING([--enable-lirc], [Disable support for Lirc]),
919 [case "${enableval}" in
920   yes) lirc=yes ;;
921   no)  lirc=no ;;
922   *)   AC_MSG_ERROR([bad value ${enableval} for enable-lirc option]) ;;
923 esac], lirc=no)
925 if test x"$lirc" = x"yes"; then
926   AC_DEFINE([USE_LIRC], [], [LIRC daemon support])
928 AM_CONDITIONAL(USE_LIRC, test x$lirc = xyes)
930 dnl --------------------------------------------------------
931 dnl Figure out which extensions to build.
932 dnl --------------------------------------------------------
934 extensions_list=
935 ext_dejagnu=no
936 ext_mysql=no
937 ext_fileio=no
938 ext_gtk=no
939 ext_lirc=no
940 ext_dbus=no
941 ext_all=no
942 ext_launcher=no
943 AC_ARG_ENABLE(extensions,
944   AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build]),
945   if test -n ${enableval}; then
946     if test "x${enableval}" != "xno"; then
947       extlist="${enableval}"
948       enableval=`echo ${enableval} | tr '\054' ' ' `
949     else
950       extlist=""
951       enableval=""
952     fi
953   fi
954   nextensions=0
955   while test -n "${enableval}" ; do
956     val=`echo ${enableval} | cut -d ' ' -f 1`
957     extensions_list="${extensions_list} ${val}"
958     [case "${val}" in
959       dejagnu|DEJAGNU|dj|DJ)
960         AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension])
961         AC_MSG_NOTICE([Adding DejaGnu extension])
962         ext_dejagnu=yes
963         nextensions=$((nextensions+1))
964         ;;
965       mysql|MYSQL|sql|SQL)
966         AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension])
967         AC_MSG_NOTICE([Adding MySql extension])
968         ext_mysql=yes
969         nextensions=$((nextensions+1))
970         ;;
971       fileio|FILEIO|io|IO)
972         AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension])
973         AC_MSG_NOTICE([Adding FileIO extension])
974         ext_fileio=yes
975         nextensions=$((nextensions+1))
976         ;;
977       gtk|GTK|gtk2|GTK2)
978         AC_DEFINE(USE_GTK_EXT, [1], [Build the GTK extension])
979         ext_gtk=yes
980         nextensions=$((nextensions+1))
981         ;;
982       launcher|LAUNCHER)
983         AC_DEFINE(USE_LAUNCHER_EXT, [1], [Build the Launcher extension])
984         ext_launcher=yes
985         nextensions=$((nextensions+1))
986         ;;
987       lirc|LIRC)
988         AC_DEFINE(USE_LIRC_EXT, [1], [Build the LIRC extension])
989         ext_lirc=yes
990         nextensions=$((nextensions+1))
991         ;;
992       dbus|DBUS)
993         AC_DEFINE(USE_DBUS_EXT, [1], [Build the DBUS extension])
994         ext_dbus=yes
995         nextensions=$((nextensions+1))
996         ;;
997       all|ALL)
998         AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions])
999         ext_dejagnu=yes
1000         ext_mysql=yes
1001         ext_fileio=yes
1002         ext_gtk=yes
1003         ext_lirc=yes
1004         ext_dbus=yes
1005         ext_launcher=yes
1006         ext_all=yes
1007         nextensions=9
1008         ;;
1009       *) AC_MSG_ERROR([invalid extension specified: ${enableval} given (accept: MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)])
1010          ;;
1011       esac]
1012     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1013     if test "x$val" = "x$enableval"; then
1014       break;
1015     fi
1016   done
1017   EXTENSIONS_LIST="$extensions_list"
1018   AC_SUBST(EXTENSIONS_LIST)
1021 AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ])
1022 AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ])
1023 AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ])
1024 AM_CONDITIONAL(BUILD_LAUNCHER_EXT, [ test x$ext_launcher = xyes ])
1025 AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
1026 AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
1027 AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
1028 AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
1030 AC_MSG_CHECKING([For the version of libtool])
1031 if test -d ${srcdir}/libltdl/libltdl; then
1032   ltver=2.x
1033 else
1034   ltver=1.x
1036 ltmajor=`echo $ltver | cut -d '.' -f 1`
1037 AC_MSG_RESULT([$ltver])
1038 AM_CONDITIONAL(LIBLTDL2, [test $ltmajor -eq 2])
1039 AM_CONDITIONAL(LIBLTDL1, [test $ltmajor -eq 1])
1040 if test $ltmajor -eq 1; then
1041   AC_LIBLTDL_CONVENIENCE
1042   AC_LIBTOOL_DLOPEN
1043   if test x"${windows}" = x"yes"; then
1044     dnl The following macro may be empty; the colon is necessary
1045     dnl in this case to avoid an empty if statement (which is a syntax error).
1046     AC_LIBTOOL_WIN32_DLL
1047     :
1048   fi
1049   AC_DISABLE_STATIC
1050 else
1051   LT_INIT([dlopen win32-dll disable-static])
1052   LTDL_INIT([convenience recursive])
1054 AC_PROG_LIBTOOL
1056 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
1057 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
1059 AC_C_BIGENDIAN
1060 AC_C_CONST
1061 AC_C_INLINE
1062 AC_SUBST([LIBTOOL_DEPS])
1063 AC_LIB_LTDL
1065 AM_CONDITIONAL(ENABLE_SHARED, [test x"${enable_shared}" = xyes])
1066 AM_CONDITIONAL(ENABLE_STATIC, [test x"${enable_shared}" = xno])
1067 dnl -- AM_CONDITIONAL(STATIC_GUI, test x"${dynamic_gui}" = xno -o x"${enable_shared}" = xno)
1069 AC_PATH_PROG(DEJAGNU, runtest)
1071 AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x$build_ogl = xyes ])
1072 AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x$build_agg = xyes ])
1073 AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x$build_cairo = xyes ])
1075 dnl AC_CHECK_LIB(ltdl, lt_dlmutex_register, AC_DEFINE(LT_DLMUTEX, 1, [Has lt_dlmutex_register]),
1076 dnl                                         AC_DEFINE(LT_DLMUTEX, 0, [doesn't have lt_dlmutex_register]) )
1078 dnl These options are for Cygnal, which collects optional statistics
1079 dnl on all the network traffic By default, we turn on statistics
1080 dnl collecting for the incoming and outgoing queues, since those are
1081 dnl required to be compatiable with FMS 3, and the ActionScript server
1082 dnl management API. buffers are the lowest level data storage, this
1083 dnl data is the time spent in the queue, and is primarily only used
1084 dnl for tuning the queueing API in Gnash. Memoryis the same, it's only
1085 dnl used by developers for tuning performance of memory allocations in
1086 dnl Gnash.
1087 buffers=no
1088 que=no
1089 memory=no
1090 cache=yes
1091 AC_ARG_WITH(statistics,
1092   AC_HELP_STRING([--with-statistics=], [Specify which statistics features to enable]),
1093   if test -n ${withval}; then
1094     if test "x${withval}" != "xno"; then
1095       extlist="${withval}"
1096       withval=`echo ${withval} | tr '\054' ' ' `
1097     else
1098       extlist=""
1099       withval=""
1100     fi
1101   fi
1102   statistics_list=""
1103   nstatistics=0
1104   while test -n "${withval}" ; do
1105     val=`echo ${withval} | cut -d ' ' -f 1`
1106     [case "${val}" in
1107       buffers)
1108         buffers=yes
1109         nstatistics=$((nstatistics+1))
1110         ;;
1111       que)
1112         que=yes
1113         nstatistics=$((nstatistics+1))
1114         ;;
1115       memory)
1116         memory=yes
1117         nstatistics=$((nstatistics+1))
1118         ;;
1119       cache)
1120         cache=yes
1121         nstatistics=$((nstatistics+1))
1122         ;;
1123       all|ALL)
1124         buffers=yes
1125         memory=yes
1126         queu=yes
1127         cache=yes
1128         nstatistics=4           dnl this must be incremented if you add anything
1129         ;;
1130       *) AC_MSG_ERROR([invalid statistics feature specified: ${withval} given (accept: buffers|que|memory|all)])
1131         ;;
1132       esac]
1133     withval=`echo ${withval} | cut -d ' ' -f 2-6`
1134     if test "x$val" = "x$withval"; then
1135       break;
1136     fi
1137   done
1139 if test x${buffers} = xyes; then
1140   statistics_list="${statistics_list} buffers"
1141   AC_DEFINE(USE_STATS_BUFFERS, [1], [Support statistics collecting for the queue buffers])
1142   AC_MSG_WARN([This option will effect your performance])
1145 if test x${memory} = xyes; then
1146   statistics_list="${statistics_list} memory"
1147   AC_DEFINE(USE_STATS_MEMORY, [1], [Support statistics collecting for all memory profiling])
1148   AC_MSG_WARN([This option will effect your performance])
1151 if test x${que} = xyes; then
1152   statistics_list="${statistics_list} queues"
1153   AC_DEFINE(USE_STATS_QUEUE, [1], [Support statistics collecting for the queues])
1156 if test x${cache} = xyes; then
1157   statistics_list="${statistics_list} cache"
1158   AC_DEFINE(USE_STATS_CACHE, [1], [Support statistics collecting for the cache])
1161 dnl this is just so Makefile can print the same list
1162 STATISTICS_LIST="$statistics_list"
1163 AC_SUBST(STATISTICS_LIST)
1166 # These settings are compile time options for the security
1167 # setting for anything that lets gnash exchange data with
1168 # other applications. Currently this only supports Shared
1169 # Objects and Local Connections. Shared Objects are like
1170 # your web browsers cookies, and Local Connections use
1171 # shared memory to execute methods remotely, and to
1172 # exchange data.
1174 # The default is to enable everything, and these can
1175 # also be controlled dynamically by the $HOME/.gnashrc
1176 # file.
1178 solreadonly=no
1179 localconnection=yes
1180 lctrace=yes
1182 AC_ARG_WITH(security,
1183   AC_HELP_STRING([--with-security=], [Specify which security features to enable]),
1184   if test -n ${withval}; then
1185     if test "x${withval}" != "xno"; then
1186       extlist="${withval}"
1187       withval=`echo ${withval} | tr '\054' ' ' `
1188     else
1189       extlist=""
1190       withval=""
1191     fi
1192   fi
1193   security_list=""
1194   nsecurity=0
1195   while test -n "${withval}" ; do
1196     val=`echo ${withval} | cut -d ' ' -f 1`
1197 dnl    security_list="${security_list} ${val}"
1198     [case "${val}" in
1199       solreadonly)
1200         solreadonly=yes
1201         nsecurity=$((nsecurity+1))
1202         ;;
1203       lc)
1204         localconnection=yes
1205         nsecurity=$((nsecurity+1))
1206         ;;
1207       lctrace)
1208         lctrace=yes
1209         nsecurity=$((nsecurity+1))
1210         ;;
1211       all|ALL)
1212         solreadonly=yes
1213         lc=yes
1214         lctrace=yes
1215         nsecurity=3
1216         ;;
1217       *) AC_MSG_ERROR([invalid security feature specified: ${withval} given (accept: solreadonly|lc|lctrace)])
1218         ;;
1219       esac]
1220     withval=`echo ${withval} | cut -d ' ' -f 2-6`
1221     if test "x$val" = "x$withval"; then
1222       break;
1223     fi
1224   done
1226 if test xlctrace = xyes; then
1227   security_list="${security_list} lctrace"
1228   AC_DEFINE(USE_LC_TRACE, [1],
1229            [Support LocalConnection])
1230   AC_MSG_NOTICE([This build supports LocalConnection tracing])
1231   AC_MSG_WARN([This option will effect your performance])
1234 if test x$localconnection = xyes; then
1235   security_list="${security_list} localconnection"
1236   AC_DEFINE(USE_LC, [1],
1237                  [Support LocalConnection])
1238   AC_MSG_NOTICE([This build supports LocalConnection])
1240 if test x$solreadonly = xyes; then
1241   security_list="${security_list} solreadonly"
1242   AC_DEFINE(USE_SOL_READONLY, [1],
1243                  [Shared Objects are read-only])
1244   AC_MSG_NOTICE([Shared Objects are read-only])
1246 SECURITY_LIST="$security_list"
1247 AC_SUBST(SECURITY_LIST)
1250 if test x$build_agg = xyes; then
1251   AC_DEFINE([RENDERER_AGG], [], [Use AntiGrain renderer])
1254 dnl For Haiku, we know the sysroot is in a non-standard place
1255 dnl it is important that -lagg comes before -lbe
1256 if test x"${haiku}" = xyes; then
1257   HAIKU_LIBS=-lbe
1258   AC_SUBST(HAIKU_LIBS)
1261 DLOPEN="-dlopen"
1262 DLPREOPEN="-dlpreopen"
1263 AC_SUBST(DLOPEN)
1264 AC_SUBST(DLPREOPEN)
1266 dnl dnl Substitute INCLTDL and LIBLTDL in the Makefiles
1267 AC_SUBST(INCLTDL)
1268 AC_SUBST(LIBLTDL)
1269 AC_SUBST(LIBTOOL_DEPS)
1271 dnl Darwin uses libtool instead of ar to produce libraries. We determine which one
1272 dnl we have here now. For some reason on Darwin, we don't get the
1273 dnl count from grep via stdin correctly. Writing a temp file does the
1274 dnl trick, so although it's ugly, that's what we gotta do...
1275 AC_MSG_CHECKING([which type of library archiver we have])
1276 rm -f .tmp
1277 libtool > .tmp 2>&1
1278 archiver=`grep -c dynamic .tmp 2>&1`
1279 rm -f .tmp
1280 dnl is there any good way to report what we found here?
1281 AC_MSG_RESULT()
1282 if test x"${archiver}" != x && test "${archiver}" -eq 1; then
1283 dnl   if test "$enable_shared" = no; then
1284 dnl     AR="libtool -static"
1285 dnl   else
1286 dnl     AR="libtool -dynamic"
1287 dnl     CXXFLAGS="${CXXFLAGS} -dynamic"
1288    export MACOSX_DEPLOYMENT_TARGET="10.3"
1289 dnl   fi
1290 dnl   AR_FLAGS="-o"
1291    darwin=yes
1292 else
1293    darwin=no
1296 dnl When cross compiling, limit the search directories cause otherwise
1297 dnl we may get the host headers or libraries by accident. These values
1298 dnl are exported, so all the other configure tests in macros/*.m4 use
1299 dnl these same settings rather than duplicating them like we used to.
1300 dnl To override thise, use the --with-*-incl= and --with-*-libs=
1301 dnl options to configure.
1302 if test x$cross_compiling = xyes; then
1303   AC_MSG_NOTICE([Configuring Gnash for cross compilation])
1304   export pkgroot="`$CXX -print-search-dirs | grep "install:" | sed -e 's/install: //' -e 's:/lib/gcc/.*::'`"
1305   dnl pkgroot only works correctly with builds of cross tools not in
1306   dnl /usr, ie... installed from the distribution packages, or just
1307   dnl plain installed in the system tools. This contaminates configure
1308   dnl when building for variations of the same basic architecture,
1309   dnl like i686-linux -> i586-mingw32.
1310   if test x${pkgroot} = "/usr"; then
1311     export pkgroot=""
1312   fi
1313   export incllist="`eval echo ${with_top_level}/include ${pkgroot}/${host_alias}/include ${pkgroot}/include`"
1314   export libslist="`eval echo ${with_top_level}/lib ${pkgroot}/${host_alias}/lib ${pkgroot}/lib64 ${pkgroot}/lib32 ${pkgroot}/lib`"
1315   export pathlist="`eval echo ${pkgroot}/${host_alias}/bin:${pkgroot}/bin`"
1316   npapi=no
1317 else
1318   AC_MSG_NOTICE([Configuring Gnash for native compilation])
1319   export incllist="`eval cat ${srcdir}/macros/incllist`"
1320   export libslist="`eval cat ${srcdir}/macros/libslist`"
1321   export pathlist=$PATH
1324 AM_CONDITIONAL(CROSS_COMPILING, [ test x$cross_compiling = xyes ])
1326 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1327 dnl !! 
1328 dnl !! IMPORTANT NOTICE 
1329 dnl !!
1330 dnl !!  Any call to GNASH_PATH_XXX must be be given *after* this snippet.
1331 dnl !!  This is to ensure that PKG_CONFIG, cross_compiling and incllist are
1332 dnl !!  properly set at the time of call.
1333 dnl !!
1334 dnl !!  Also GNASH_PKG_FIND has to be called later. Not sure
1335 dnl !!  why but calling before breaks detection of CPP (see
1336 dnl !!  gnash-dev mailing archives for June 12 2009
1337 dnl !!  http://lists.gnu.org/archive/html/gnash-dev/2009-06/index.html
1338 dnl !! 
1339 dnl !! 
1340 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1342 dnl Check for PKG_CONFIG before any GNASH_PATH call
1343 PKG_PROG_PKG_CONFIG
1346 dnl Look for python, which is optional. If enabled, a python loadable
1347 dnl module of Gnash is created.
1348 GNASH_PATH_PYTHON
1349 AM_CONDITIONAL([USE_PYTHON], test x"$python" = xyes)
1350 AM_CONDITIONAL([HAS_PYTHON], test x"$has_python" = xyes)
1352 AC_PATH_PROG(PERL, perl)
1353 AM_CONDITIONAL(HAVE_PERL, test x"$PERL" != x)
1355 AC_PATH_PROG(CSOUND, csound)
1356 AM_CONDITIONAL(HAVE_CSOUND, test x"$CSOUND" != x)
1358 if test x$ext_dbus = xyes; then
1359   GNASH_PATH_DBUS
1362 if test x$ext_mysql = xyes; then
1363   GNASH_PATH_MYSQL
1366 dnl --------------------------------------------------------
1367 dnl  Select SSL support
1368 dnl --------------------------------------------------------
1370 dnl Enable using libssh with libnet
1371 AC_ARG_ENABLE(ssh,
1372   AC_HELP_STRING([--enable-ssh], [Enable using SSH for network authentication]),
1373 [case "${enableval}" in
1374   yes) build_ssh=yes ;;
1375   no)  build_ssh=no ;;
1376   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssh option]) ;;
1377 esac], build_ssh=no)
1379 AM_CONDITIONAL(BUILD_SSH, test x"${build_ssh}" = xyes)
1380 if test x"${build_ssh}" = xyes; then
1381   GNASH_PKG_FIND(ssh, [libssh/libssh.h], [libssh library], ssh_socket_init)
1382 dnl  GNASH_PKG_FIND(poppler, [popt.h], [Poppler library], poppler_init)
1384 if test x"${has_ssh}" = x"yes"; then
1385   AC_DEFINE([USE_SSH], [1], [Use SSH for authentication])
1388 dnl --------------------------------------------------------
1389 dnl  Select SSL support
1390 dnl --------------------------------------------------------
1392 dnl Enable using OpenSSL with libnet.
1393 AC_ARG_ENABLE(ssl,
1394   AC_HELP_STRING([--enable-ssl], [Enable using OpenSSL directly]),
1395 [case "${enableval}" in
1396   yes) build_ssl=yes ;;
1397   no)  build_ssl=no ;;
1398   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssl option]) ;;
1399 esac], build_ssl=no)
1401 with_cert=
1402 with_pem=
1403 AM_CONDITIONAL(BUILD_SSL, test x"${build_ssl}" = xyes)
1404 AC_ARG_WITH(cert,
1405   AC_HELP_STRING([--with-cert],
1406   [cert file for SSL]),
1407   with_cert=${withval})
1408 AC_ARG_WITH(pem,
1409   AC_HELP_STRING([--with-pe],
1410   [pem file for SSL]),
1411   with_pem=${withval})
1413 if test x"${build_ssl}" = xyes; then
1414   GNASH_PKG_FIND(ssl, [openssl/ssl.h], [OpenSSL library], SSL_library_init)
1416 if test x"${has_ssl}" = x"yes"; then
1417   AC_DEFINE([USE_SSL], [1], [Use SSL for authentication])
1420 dnl -----------------------------------------------------------
1421 dnl   Verify dependencies for requested GUIs are met, and
1422 dnl   disable build of the GUIS for which deps are NOT met
1423 dnl ------------------------------------------------------------
1425 dnl Look for scratchbox (used in GNASH_PATH_ALP)
1426 dnl FIXME: move it in macros/alp.m4 or at least after
1427 dnl        the build_alp conditional ?
1428 sbox=no
1429 if test x"${SBOX_REDIRECT_FROM_DIRS}" != x; then
1430   sbox=yes
1432 if test x"${build_alp}" = xyes; then
1433   GNASH_PATH_ALP
1434   if test x"${have_alp}" = x"yes"; then
1435     AC_DEFINE([HAVE_ALP], 1, [Access Linux Platform framework])
1436   fi
1437   dnl @@ It makes NO sense to set cross_compiling here,
1438   dnl @@ *after* it is used in conditionals above
1439   dnl @@ (AM_CONDITIONAL and directories search)
1440   dnl cross_compiling=yes
1441 dnl  build_gtk=yes
1442   build_kde3=no
1443   build_ogl=no
1444   build_agg=yes
1447 if test x$build_gtk = xyes -o $build_alp = xyes -o x$build_hildon = xyes; then
1448    GNASH_PATH_GTK2
1449    GNASH_PATH_PANGO
1450    GNASH_PKG_FIND(atk, [atk/atk.h], [atk library], atk_focus_tracker_init, [1.0])
1451    if test x"${build_ogl}" = xyes; then
1452       GNASH_PATH_GLEXT
1453    fi
1454    if test x"${build_cairo}" = xyes; then
1455       GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1456    fi
1458 if test x"${build_hildon}" = xyes; then
1459   GNASH_PATH_HILDON
1460   build_gtk=yes
1461   build_kde3=no
1462 dnl   build_ogl=no
1463 dnl   build_agg=yes
1465 dnl TODO: add checks for all other GUIs
1468 dnl -----------------------------------------------------------
1469 dnl Try to ignore stupid dependencies
1470 dnl -----------------------------------------------------------
1472 AC_MSG_CHECKING(linker --as-needed support)
1473 gcc_cv_ld_as_needed=no
1474 # Check if linker supports --as-needed and --no-as-needed options
1475 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1476   gcc_cv_ld_as_needed=yes
1478 if test x"$gcc_cv_ld_as_needed" = xyes; then
1479   LDFLAGS+=" -Wl,--as-needed"
1481 AC_MSG_RESULT($gcc_cv_ld_as_needed)
1483 dnl AC_MSG_CHECKING(linker --no-undefined support)
1484 dnl gcc_cv_ld_undef_needed=no
1485 dnl # Check if linker supports --no-undefined
1486 dnl if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1487 dnl     gcc_cv_ld_undef_needed=yes
1488 dnl fi
1489 dnl if test x"$gcc_cv_ld_undef_needed" = xyes; then
1490 dnl     LDFLAGS=" ${LDFLAGS} -Wl,--no-undefined"
1491 dnl fi
1492 dnl AC_MSG_RESULT($gcc_cv_ld_undef_needed)
1494 AC_DEFINE(USE_GIF, [1], [Use the GIF library])
1495 AC_DEFINE(USE_PNG, [1], [Use the PNG library])
1496 AM_CONDITIONAL(USE_GIF, true)
1497 AM_CONDITIONAL(USE_PNG, true)
1499 dnl GNASH_PKG_FIND(dmalloc, [dmalloc.h], [dmalloc], mallinfo)
1500 AM_CONDITIONAL(HAVE_DMALLOC, [ test x$has_dmalloc = xyes ])
1502 AC_PATH_TOOL([AUTOTRACE], [autotrace])
1503 AC_HEADER_DIRENT
1505 dnl -----------------------------------------------------------------
1506 dnl PLUGIN RELATED STUFF
1507 dnl -----------------------------------------------------------------
1509 dnl Zip is used insted of tar when building an xpi package
1510 dnl for Mozilla/Firefox.
1511 AC_PATH_PROG(ZIP, zip, ,[${pathlist}])
1513 dnl !! This has been moved here to make --enable-npapi work
1514 dnl !! All of plugin-related macro calls could be moved into
1515 dnl !! a specialized macros/plugin.m4
1517 dnl ----------------------------------------------------
1518 dnl Add KPARTS support, if specified or KDE gui is built
1519 dnl ----------------------------------------------------
1521 AC_ARG_ENABLE(kparts3,
1522   AC_HELP_STRING([--disable-kparts3], [Disable support for Konqueror 3.x plugin (default: enabled if kde3 gui is)]),
1523 [case "${enableval}" in
1524   yes) build_kparts3=yes ;;
1525   no)  build_kparts3=no ;;
1526   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts3 option]) ;;
1527 esac],build_kparts3=$build_kde3)
1529 dnl --------------------------------------------------------
1530 dnl Add KPARTS 4.x support, if specified or KDE gui is built
1531 dnl --------------------------------------------------------
1533 AC_ARG_ENABLE(kparts4,
1534   AC_HELP_STRING([--disable-kparts4], [Disble support for Konqueror 4.x plugin (default: enabled if kde4 gui is)]),
1535 [case "${enableval}" in
1536   yes) build_kparts4=yes ;;
1537   no)  build_kparts4=no ;;
1538   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts4 option]) ;;
1539 esac],build_kparts4=$build_kde4)
1541 dnl -----------------------------------------------------------
1542 dnl Add NPAPI support, if specified or GTK or KDE4 gui is built
1543 dnl -----------------------------------------------------------
1545 AC_ARG_ENABLE(npapi,
1546   AC_HELP_STRING([--disable-npapi], [Disable NPAPI plugin build (default: enabled if gtk or kde4 gui is)]),
1547   [case "${enableval}" in
1548     yes) npapi=yes ;;
1549     no)  npapi=no ;;
1550     *)   AC_MSG_ERROR([bad value ${enableval} for disable-npapi option]) ;;
1551   esac],
1552   if test x$build_gtk = xyes -o x$build_kde4 = xyes; then
1553     npapi=yes
1554   fi
1557 dnl -----------------------------------------------------------------
1558 dnl Enable us to disable building all browser plugins in one command.
1559 dnl -----------------------------------------------------------------
1561 AC_ARG_ENABLE(plugins,
1562   AC_HELP_STRING([--disable-plugins], [Disable all browser plugins from building (default=no)]),
1563   [case "${enableval}" in
1564     yes) plugins=yes ;;
1565     no)  plugins=no ;;
1566     *)   AC_MSG_ERROR([bad value ${enableval} for disable-plugins option]) ;;
1567   esac],
1568   plugins=yes
1570 if test x$plugins = xno; then
1571   npapi=no
1572   build_kparts3=no
1573   build_kparts4=no
1577 dnl Set the general plugins install policy here
1579 AC_ARG_WITH(plugins-install,
1580   AC_HELP_STRING([--with-plugins-install=system|user|prefix], [Policy for plugins install. Default: user.]),
1581         [case "${withval}" in
1582           user) PLUGINS_INSTALL_POLICY=user ;;
1583           system) PLUGINS_INSTALL_POLICY=system ;;
1584           prefix) PLUGINS_INSTALL_POLICY=prefix ;;
1585           *)  AC_MSG_ERROR([bad value ${withval} for --with-plugins-install]) ;;
1586          esac 
1587         ], PLUGINS_INSTALL_POLICY=user) 
1590 GNASH_PATH_FIREFOX
1592 dnl -----------------------------------------------------------------
1593 dnl END OF PLUGIN RELATED STUFF
1594 dnl -----------------------------------------------------------------
1596 dnl VA API is used by default for all H.264 videos. HW requirements:
1597 dnl     * AMD GPUs with UVD2 and xvba-video VA driver
1598 dnl     * NVIDIA GPUs with vdpau-video VA driver
1599 dnl     * All HW with a VA driver supporting the VA/GLX extensions or
1600 dnl     vaPutSurface(Pixmap,...). This may include the Intel
1601 dnl     Moorestown platform and future G45 VA driver.
1602 dnl NOTE: it is possible to use Gnash/VAAPI on platforms with an Intel
1603 dnl GMA500 but you currently will have to build the AGG renderer
1604 dnl instead of the OGL (OpenGL) one. 
1606 dnl IRIX-hack.
1607 case $host in
1608   *-*-irix*)
1609   dnl ABI-check
1610   save_LIBS=$LIBS
1611   dir="/usr/lib /usr/lib32 /usr/lib/lib64"
1612   for i in $dir; do
1613     LIBS=-L$i
1614     AC_SEARCH_LIBS(XDisableAccessControl, X11, [
1615       xpathed=$i
1616       break
1617     ])
1618     unset ac_cv_search_XDisableAccessControl
1619   done
1620   ac_x_libraries=$xpathed
1621   x_libraries=$xpathed
1622   LIBS=$save_LIBS
1623   ;;
1624 esac
1626 AM_CONDITIONAL(LIRC, [test x$lirc_ext = xyes])
1628 AC_CHECK_HEADERS(endian.h machine/endian.h)
1629 AC_CHECK_HEADERS(malloc.h malloc/malloc.h)
1630 AC_CHECK_HEADERS(getopt.h)
1631 AC_CHECK_HEADERS(libgen.h)
1632 AC_CHECK_HEADERS(pwd.h)
1633 AC_CHECK_HEADERS(sys/utsname.h)
1634 AC_CHECK_HEADERS(signal.h)
1635 AC_CHECK_HEADERS(unistd.h)
1636 AC_CHECK_HEADERS(sys/time.h)
1637 AC_CHECK_HEADERS(ieeefp.h)
1638 dnl libcurl3-dev on Ubuntu has a dependency on lber, and Gnash won't link
1639 dnl on most machines without it. While it isn't diretly used by Gnash at all,
1640 dnl it's to work around an Ubuntu packaging bug.
1641 AC_CHECK_LIB(lber, ber_free)
1642 AC_CHECK_LIB(bz2, BZ2_bzopen)
1643 AC_CHECK_LIB(c, getpwnam, AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
1645 dnl X11 is needed for fltk (at least),
1646 dnl and probably for many other guis too ...
1647 dnl if ! test x$build_fb = xyes; then # <--- this is wrong as build_x is non-exclusive
1648 dnl AC_PATH_XTRA
1649 dnl AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation)
1650 dnl AC_CHECK_LIB(gmp, _gmp_get_memory_functions)
1651   GNASH_PATH_X11
1652   AC_CHECK_LIB(Xi, XInput_find_display)
1653   AC_CHECK_LIB(X11, XDisableAccessControl)
1654 dnl fi
1655 AM_CONDITIONAL(HAVE_X11, [test x$x11 = xyes])
1656 AC_CHECK_LIB(rt, shm_unlink)
1657 AC_CHECK_FUNCS(shm_open shm_unlink)
1658 AC_TRY_COMPILE([#include <strings.h>], [
1659   char *p1 = (char *)"Hello";
1660   char *p2 = (char *)"World";
1661   strcasecmp(p1, p2); ],
1662   AC_DEFINE(HAVE_STRINGCASECMP, [1], [Has strcasecmp])
1665 dnl if test x$cross_compiling = xno; then
1666 AC_LANG_PUSH(C++)
1667 AC_MSG_CHECKING([to see if float formatting is broken])
1668 AC_RUN_IFELSE([
1669   AC_LANG_PROGRAM([#include <cmath>
1670     void testFloat(double d, double& s)
1671     {
1672         d /= 1000.0;
1673         s = std::fmod(d, 86400.0);
1674     }], [
1675      double d = 3.0935415006117e+23;
1676      double s;
1677      testFloat(d, s);
1678      if (static_cast<int>(s) != 61440) {
1679          return 1;
1680      }])],                         dnl end of LANG_PROGRAM
1681      broken_float=no,              dnl returns 0, works
1682      broken_float=yes,             dnl returns 1, broken
1683      broken_float=no               dnl cross compiling
1684 )                                  dnl end of RUN_IFELSE
1685 AC_LANG_POP(C++)
1686 dnl fi
1688 if test x${broken_float} = xyes; then
1689   AC_MSG_RESULT([yes])
1690   AC_DEFINE(HAVE_BROKEN_FLOAT, [1], [Has broken float support])
1691 else
1692   AC_MSG_RESULT([no])
1694 AM_CONDITIONAL(BROKEN_FLOAT, [ test x$broken_float = xyes ])
1696 dnl See if ipc_perm structure has the ipc_perm.key field, and if so,
1697 dnl which variant of the name is used.
1698 ipc_key=no
1699 AC_TRY_COMPILE([
1700   #include <sys/ipc.h>
1701   #include <sys/shm.h>], [
1702  struct shmid_ds shmseg;      
1703  key_t x = shmseg.shm_perm.key;],
1704  ipc_key=yes
1705  AC_DEFINE(IPC_PERM_KEY, [key], [Has the key field in ipc_perm])
1708 if test x$ipc_key = xno; then
1709   AC_TRY_COMPILE([
1710     #include <sys/ipc.h>
1711     #include <sys/shm.h>], [
1712     struct shmid_ds shmseg;      
1713     key_t x = shmseg.shm_perm.__key;],
1714     AC_DEFINE(IPC_PERM_KEY, [__key], [Has the key field in ipc_perm])
1715     ipc_key=yes
1716   )
1719 dnl AC_CHECK_FUNCS(strcasecmp stricmp)
1720 dnl AC_CHECK_FUNCS(vsnprintf)
1722 AC_CACHE_CHECK([for finite], ac_cv_finite,
1723  [AC_TRY_COMPILE([
1724    #include <math.h>
1725    #ifdef HAVE_IEEEFP_H
1726    #include <ieeefp.h>
1727    #endif],
1728  [double x; int y; y = finite(x);],
1729  ac_cv_finite=yes,
1730  ac_cv_finite=no
1732 if test x"$ac_cv_finite" = x"yes"; then
1733   AC_SEARCH_LIBS(finite, m,
1734     [AC_DEFINE(HAVE_FINITE, [1], [Has finite])]
1735   )
1738 AC_LANG_PUSH(C++)
1739 AC_CACHE_CHECK([for isfinite], ac_cv_isfinite,
1740  [AC_TRY_COMPILE([#include <cmath>],
1741  [using namespace std; double x; int y; y = isfinite(x);],
1742  ac_cv_isfinite=yes,
1743  ac_cv_isfinite=no
1745 AC_LANG_POP(C++)
1746 if test x"$ac_cv_isfinite" = x"yes"; then
1747   dnl Don't give up if isfinite is not found in -lm
1748   dnl isfinite is defined as a macro in C99.
1749   AC_SEARCH_LIBS(isfinite, m)
1750   AC_DEFINE(HAVE_ISFINITE, [1], [Has isfinite])
1753 AC_LANG_PUSH(C++)
1754 AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [
1755   AC_TRY_LINK([#include <cstdio>
1756 ], 
1757     [ std::printf("%s", __PRETTY_FUNCTION__); ], 
1758     [ ac_cv_implements___PRETTY_FUNCTION__="yes" ],
1759     [ ac_cv_implements___PRETTY_FUNCTION__="no" ]
1760   )
1762 if test "x$ac_cv_implements___PRETTY_FUNCTION__" = "xyes" ; then
1763   AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined])
1766 AC_CACHE_CHECK([whether $CXX implements __FUNCTION__], ac_cv_implements___FUNCTION__, [
1767   AC_TRY_LINK([#include <cstdio>
1768 ], 
1769     [ std::printf("%s", __FUNCTION__); ], 
1770     [ ac_cv_implements___FUNCTION__="yes" ],
1771     [ ac_cv_implements___FUNCTION__="no" ]
1772   )
1774 if test "x$ac_cv_implements___FUNCTION__" = "xyes" ; then
1775   AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined])
1778 AC_CACHE_CHECK([whether $CXX implements __func__], ac_cv_implements___func__, [
1779   AC_TRY_LINK([#include <cstdio>
1780 ], 
1781     [ std::printf("%s", __func__); ], 
1782     [ ac_cv_implements___func__="yes" ],
1783     [ ac_cv_implements___func__="no" ]
1784   )
1786 if test "x$ac_cv_implements___func__" = "xyes" ; then
1787   AC_DEFINE(HAVE_func, [1], [__func__ is defined])
1789 AC_LANG_POP(C++)
1790 AC_REPLACE_FUNCS(getopt)
1792 dnl Date portability stuff, used in server/asobj/Date.cpp
1793 AC_CHECK_FUNCS(gettimeofday)
1794 AC_CHECK_FUNCS(ftime)
1795 AC_CHECK_FUNCS(tzset)
1796 AC_CHECK_FUNCS(localtime_r)
1798 AC_CACHE_CHECK([whether struct tm has tm_gmtoff], ac_cv_tm_gmtoff, [
1799         AC_TRY_LINK([
1800 /* ctime(1) says "The glibc version of struct tm has additional fields
1801  * defined  when _BSD_SOURCE was set before including <time.h>"
1802  * In practice, you don't need to define it yourself (tested on glibc-2.2.1 
1803  * and 2.3.6) but if you *do* define it yourself, it makes *all* functions
1804  * favour BSD-like behaviour over of GNU/POSIX, which seems dangerous.
1805  */
1806 // #define _BSD_SOURCE 1
1807 #include <time.h>
1808 ], 
1809                 [ struct tm tm; long l = tm.tm_gmtoff; ], 
1810                 [ ac_cv_tm_gmtoff="yes" ],
1811                 [ ac_cv_tm_gmtoff="no" ]
1812         )
1814 if test "x$ac_cv_tm_gmtoff" = "xyes" ; then
1815         AC_DEFINE(HAVE_TM_GMTOFF, [1], [struct tm has member tm_gmtoff])
1818 AC_CACHE_CHECK([whether timezone is a long], ac_cv_long_timezone, [
1819         AC_TRY_LINK([
1820 /* On Linux/glibc, tzset(3) says "extern long timezone;" (seconds West of GMT)
1821  * but on BSD char *timezone(int,int) is a function returning a string name.
1822  * The BSD function timegm() may be the equivalent, but this should
1823  * not be necessary because on BSD the code should use tm.tm_gmtoff instead
1824  * (use of long timezone is a fallback strategy for when tm_gmtoff exists not).
1825  */
1826 #include <stdio.h>
1827 #include <time.h>
1828 extern long timezone;
1829   ], 
1830     [ printf("%ld", timezone); ], 
1831     [ ac_cv_long_timezone="yes" ],
1832     [ ac_cv_long_timezone="no" ]
1833    )
1835 if test "x$ac_cv_long_timezone" = "xyes" ; then
1836   AC_DEFINE(HAVE_LONG_TIMEZONE, [1], [extern timezone is a long integer, not a function])
1839 AC_CHECK_FUNCS(sysconf)
1840 AC_CHECK_FUNCS(shmget shmat shmdt mmap)
1841 AC_CHECK_FUNCS(memmove)
1842 AC_CHECK_FUNCS(scandir)         dnl supported by BSD and Linux, but you never know...
1843 dnl AC_CHECK_FUNC(strndup, AC_DEFINE(HAVE_STRNDUP, 1, [Has strndup()] ))
1844 AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has clock_gettime()] ))
1845 dnl AC_CHECK_FUNCS(strlcpy, AC_DEFINE(HAVE_STRLCPY_PROTO, [1],[Define if you have the strlcpy prototype]))
1846 dnl AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT_PROTO, [1],[Define if you have the strlcat prototype]))
1847 dnl Look for Win32 networking stuff
1848 AC_CHECK_HEADERS(winsock.h)
1849 AC_CHECK_HEADERS(winsock2.h)
1850 AC_CHECK_FUNCS(socket)
1851 AC_CHECK_FUNCS(CreateFileMappingA)
1853 dnl Shm::resize() uses this if it exists
1854 AC_CHECK_LIB(c, mremap)
1856 GNASH_PKG_FIND(nspr, [nspr.h], [Netscape Portable Runtime (NSPR)], PR_Init)
1858 AC_PATH_TOOL(WINDRES, [windres])
1859 AC_SUBST(WINDRES)
1861 GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress)
1862 GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init)
1863 if test x"${openbsd_os}" = x"yes"; then
1864   GNASH_PKG_FIND(libpng, [png.h], [png images], png_info_init)
1865 else
1866   GNASH_PKG_FIND(png, [png.h], [png images], png_info_init)
1868 GNASH_PKG_FIND(gif, [gif_lib.h], [gif images], DGifOpen)
1869 if test x"${GIF_LIBS}" = x ; then
1870  GNASH_PKG_FIND(ungif, [gif_lib.h], [gif images], DGifOpen)
1871  GIF_LIBS=${UNGIF_LIBS}
1872  GIF_CFLAGS=${UNGIF_CFLAGS}
1874 if test x"$testsuite" = x"yes"; then
1875   GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
1878 GNASH_PKG_FIND(speex, [speex.h], [speex audio codec], speex_decode_int)
1879 AM_CONDITIONAL(HAVE_SPEEX, [ test x$has_speex = xyes ])
1880 if test x$has_speex = xyes ; then
1881   AC_DEFINE([DECODING_SPEEX], [1], [Speex codec available])
1884 GNASH_PKG_FIND(speexdsp, [speex_resampler.h], [speex DSP utilities], speex_resampler_process_int)
1885 if test x$has_speexdsp = xyes ; then
1886   AC_DEFINE([RESAMPLING_SPEEX], [1], [Speex resampler available])
1889 dnl Find freetype and fontconfig
1890 dnl GNASH_PKG_FIND(freetype2, [freetype/freetype.h], [freetype2 font library], FT_Load_Char)
1891 dnl rob might be working on this or not ;)
1892 GNASH_PATH_FREETYPE2
1893 GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch)
1895 if test x$cross_compiling = xno; then
1896   AC_PATH_MING
1898 AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ])
1900 AM_CONDITIONAL(MING_VERSION_0_4,
1901         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040000  ])
1902 AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS,
1903         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040002  ])
1904 AM_CONDITIONAL(MING_SUPPORTS_INIT_ACTIONS,
1905         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040004  ])
1906 AM_CONDITIONAL(MING_SUPPORTS_REPLACE_TAG,
1907         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
1908 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_ADD_CHARACTER,
1909         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
1910 AM_CONDITIONAL(MING_SUPPORTS_STREAMING_SOUND,
1911         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
1912 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_SET_DEPTH,
1913         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
1914 AM_CONDITIONAL(MING_VERSION_0_4_3,
1915         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040300 ])
1917 if test x$cross_compiling = xno; then
1918   AC_ARG_WITH([swfdec_testsuite],
1919           AC_HELP_STRING([--with-swfdec-testsuite],
1920                   [directory where swfdec testsuite (the 'test' dir) is]),
1921         SWFDEC_TESTSUITE=${withval})
1922   AC_SUBST(SWFDEC_TESTSUITE)
1924 AM_CONDITIONAL(ENABLE_SWFDEC_TESTSUITE, [ test x"$SWFDEC_TESTSUITE" != x ])
1926 if test x$cross_compiling = xno; then
1927   AC_ARG_ENABLE([http_testsuite],
1928       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
1929           AC_HELP_STRING([--enable-http-testsuite=<baseurl>],
1930                   [Enable http based testsuite (default url is http://www.gnashdev.org/testcases)]),
1931               [case "${enableval}" in
1932              no) HTTP_TESTSUITE="" ;;
1933             yes) HTTP_TESTSUITE="http://www.gnashdev.org/testcases" ;;
1934               *) HTTP_TESTSUITE="${enableval}";;
1935            esac])
1936   AC_SUBST(HTTP_TESTSUITE)
1938 AM_CONDITIONAL(ENABLE_HTTP_TESTSUITE, [ test x"$HTTP_TESTSUITE" != x ])
1940 if test x$cross_compiling = xno; then
1941   AC_ARG_ENABLE([red5_testing],
1942       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
1943           AC_HELP_STRING([--enable-red5-testing=<host>],
1944                   [Enable red5 based testing (default host is localhost)]),
1945               [case "${enableval}" in
1946              no) RED5_HOST="" ;;
1947             yes) RED5_HOST="localhost" ;;
1948               *) RED5_HOST="${enableval}";;
1949            esac])
1950   AC_SUBST(RED5_HOST)
1952 AM_CONDITIONAL(ENABLE_RED5_TESTING, [ test x"$RED5_HOST" != x ])
1954 dnl The name might differ between systems.
1955 if test x"$testsuite" = x"yes"; then
1956 AC_PATH_PROGS(NETCAT, [nc netcat])
1957 AC_PATH_PROG(WGET, wget)
1959 AM_CONDITIONAL(HAS_NETCAT, [ test x"$NETCAT" != x ])
1960 AM_CONDITIONAL(HAS_WGET, [ test x"$WGET" != x ])
1963 dnl See if we can use the swfmill, mtasc, swfc and haxe based testsuites 
1965 if test x"$testsuite" = x"yes" -a x$cross_compiling = xno; then
1966   AC_PATH_PROG(AS3COMPILE, as3compile)
1967   AC_PATH_PROG(SWFC, swfc)
1968   AC_PATH_SWFMILL
1969   AC_PATH_MTASC
1970   AC_PATH_HAXE
1973 AM_CONDITIONAL(ENABLE_SWFMILL, [ test x"$SWFMILL" != x ])
1974 AM_CONDITIONAL(SWFMILL_AS3_SUPPORT,
1975         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
1977 dnl SWFMILL versions older than 0.3 didn't get function2 flags order correctly
1978 AM_CONDITIONAL(SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT,
1979         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
1981 AM_CONDITIONAL(ENABLE_AS3COMPILE, [ test x"$AS3COMPILE" != x ])
1982 AM_CONDITIONAL(ENABLE_MTASC, [ test x"$MTASC" != x ])
1983 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
1984 AM_CONDITIONAL(ENABLE_SWFC, [ test x"$SWFC" != x ])
1985 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
1987 AC_PATH_PROG(DOXYGEN, doxygen)
1988 AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ])
1990 dnl currently unused
1991 dnl GNASH_PKG_FIND(ogg, [ogg.h], [decode ogg streams], ogg_stream_init)
1993 if test x$build_sdl = xyes -o x$build_sound_sdl = xyes; then
1994   GNASH_PATH_SDL
1997 AM_CONDITIONAL(HAVE_SDL, [ test x$has_SDL = xyes ])
1999 GNASH_PATH_QT3
2000 GNASH_PATH_KDE3
2002 GNASH_PATH_QT4
2003 GNASH_PATH_KDE4
2005 dnl Qtopia is a desktop environment for embedded devices.
2006 dnl GNASH_PATH_QTOPIA3
2007 dnl GNASH_PATH_QTOPIA4
2008 has_qtopia3=no
2009 has_qtopia4=no
2012 AM_CONDITIONAL(HAVE_QTOPIA3, [test x$has_qtopia3 = xyes])
2013 AM_CONDITIONAL(HAVE_QTOPIA4, [test x$has_qtopia4 = xyes])
2014 AM_CONDITIONAL(HAVE_KDE3,    [test x$has_kde3 = xyes])
2015 AM_CONDITIONAL(HAVE_KDE4,    [test x$has_kde4 = xyes])
2016 AM_CONDITIONAL(HAVE_QT3,     [test x$has_qt3 = xyes])
2017 AM_CONDITIONAL(HAVE_QT4,     [test x$has_qt4 = xyes])
2019 AM_CONDITIONAL(WITH_KDE4,    [test "$with_kde4" != "no"])
2020 AM_CONDITIONAL([QT_X11],     [test "$platform" = "X11"])
2021 AM_CONDITIONAL([QTOPIA],     [test "$platform" = "Qtopia"])
2022 AM_CONDITIONAL([QT_OSX],     [test "$platform" = "OSX"])
2023 AM_CONDITIONAL([QT_OS9],     [test "$platform" = "OS9"])
2024 AM_CONDITIONAL([QT_WIN32],   [test "$platform" = "Win32"])
2026 dnl Need GLIB for both GTK and GST
2027 if test x"${build_gtk}" = xyes -o x"${media_handler}" = xgst; then
2028   GNASH_PATH_GLIB
2031 AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ])
2033 if test x$npapi = xyes; then
2034   if ! test x$build_gtk = xyes -o x$build_kde4 = xyes; then
2035     AC_MSG_WARN(["Enabled NPAPI plugin, but it's not supported by the selected GUI"])
2036   fi
2039 if test x$windows = xyes -a x$npapi = xyes; then
2040   if test "x$NSPR_CFLAGS" = x -a "x$NSPR_LIBS" = x; then
2041     AC_MSG_ERROR(["On Win32, NPAPI plugin requires NSPR."])
2042   fi
2043   if test "x$WINDRES" = x; then
2044     AC_MSG_ERROR(["On Win32, NPAPI plugin requires windres."])
2045   fi
2048 dnl Need GLIB for NPAPI plugin
2049 if test x$npapi = xyes; then
2050   GNASH_PATH_GLIB
2053 dnl if kde isn't installed, even if it's specified, don't try to build
2054 dnl the KPARTS plugin, which is KDE based.
2055 if test x$has_kde3 = xno -a x$build_kparts3 = xyes; then
2056   build_kparts3=no
2057 dnl  build_kde3=no
2058   AC_MSG_WARN(["Disabling KPARTS 3.x plugin, no KDE development found"])
2061 if test x$build_kde3 = xno -a x$build_kparts3 = xyes; then
2062   AC_MSG_WARN(["Enabled KPARTS 3.x plugin, but you aren't building a KDE based GUI!"])
2064 if test x$has_kde4 = xno -a x$build_kparts4 = xyes; then
2065   build_kparts4=no
2066 dnl  build_kde4=no
2067   AC_MSG_WARN(["Disabling KPARTS 4.x plugin, no KDE 4.x development found"])
2070 if test x$build_kde4 = xno -a x$kparts4 = xyes; then
2071   AC_MSG_WARN(["Enabled KPARTS 4.x plugin, but you aren't building a KDE 4.x based GUI!"])
2074 AM_CONDITIONAL(BUILD_QTOPIA3_GUI,  [ test x$build_qtopia3 = xyes ])
2075 AM_CONDITIONAL(BUILD_QTOPIA4_GUI,  [ test x$build_qtopia4 = xyes ])
2076 AM_CONDITIONAL(BUILD_QT3_GUI,      [ test x$build_qt3 = xyes ])
2077 AM_CONDITIONAL(BUILD_QT4_GUI,      [ test x$build_qt4 = xyes ])
2078 AM_CONDITIONAL(BUILD_KDE3_GUI,     [ test x$build_kde3 = xyes ])
2079 AM_CONDITIONAL(BUILD_KDE4_GUI,     [ test x$build_kde4 = xyes ])
2081 AM_CONDITIONAL(BUILD_ALP_GUI,      [ test x$build_alp = xyes ])
2082 AM_CONDITIONAL(BUILD_HILDON_GUI,   [ test x$build_hildon = xyes ])
2083 AM_CONDITIONAL(BUILD_GTK_GUI,      [ test x$build_gtk = xyes ])
2084 AM_CONDITIONAL(BUILD_FLTK_GUI,     [ test x$build_fltk = xyes ])
2085 AM_CONDITIONAL(BUILD_SDL_GUI,      [ test x$build_sdl = xyes ])
2086 AM_CONDITIONAL(BUILD_FB_GUI,       [ test x$build_fb = xyes ])
2087 AM_CONDITIONAL(BUILD_AQUA_GUI,     [ test x$build_aqua = xyes ])
2088 AM_CONDITIONAL(ALLSTATIC,          [ test x$build_aqua = xyes ]) dnl the Aqua-binary is always static.
2089 AM_CONDITIONAL(BUILD_RISCOS_GUI,   [ test x$build_riscos = xyes ])
2090 AM_CONDITIONAL(BUILD_DUMP_GUI,     [ test x$build_dump = xyes ])
2091 AM_CONDITIONAL(BUILD_AMIGAOS4_GUI, [ test x$build_aos4 = xyes ])
2092 AM_CONDITIONAL(BUILD_HAIKU_GUI,    [ test x$build_haiku = xyes ])
2094 # plugin building flags
2095 AM_CONDITIONAL(NPAPI,   [test x"${npapi}" = xyes])
2096 AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes])
2097 AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes])
2099 if test x"${build_ogl}" = xyes; then
2100   GNASH_PATH_OPENGL
2103 if test x"${build_gtk}" = xyes; then
2104   AC_ARG_ENABLE(ghelp,
2105     AC_HELP_STRING([--enable-ghelp], [Enable support for the GNOME help system]),
2106     [case "${enableval}" in
2107       yes) ghelp=yes ;;
2108       no)  ghelp=no ;;
2109       *)   AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;;
2110     esac], ghelp=no
2111   )
2113   if test x"${ghelp}" = x"yes" ; then
2114     AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2115     AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2116     AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2118     if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = x ; then
2119       ghelp=no
2120       AC_MSG_WARN([You need to install scrollkeeper for gnome help])
2121     fi
2122   fi
2124 AM_CONDITIONAL(GHELP, [test x${ghelp} = xyes])
2126 if test x${build_fltk} = xyes; then
2127   GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender)
2130 dnl Some systems have a pervered set of dependencies.
2131 dnl Fedora Core 6 appears to have a dependency on expat for fontconfig.
2132 dnl We only need the library, but this is the easy wind to find it.
2133 GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString)
2135 dnl these conditionals were moved out of kde.m4
2136 AM_CONDITIONAL(HAS_KDE3, [test x$has_kde3 = xyes])
2137 # used to disable x11-specific stuff on special platforms
2138 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
2139 AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
2140 AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
2142 AM_CONDITIONAL(HAVE_GTK2, [ test x$has_gtk2 = xyes ])
2143 AM_CONDITIONAL(HAVE_GLEXT, [test x$glext = xyes])
2145 dnl We don't have GTKGLExt, so default to SDL, and don't build the Firefox plugin
2146 if test x$glext = xno -a x$build_ogl = xyes; then
2147   if test x$gtk2 = xyes -a x$build_gtk = xyes; then
2148     AC_ERROR([You have GTK installed, but not GtkGLExt. You need GtkGLExt to use the OpenGL renderer. Attempting to build SDL version])
2149   fi
2150   gui=sdl
2151   npapi=no
2152   AC_MSG_WARN([GTK2 specified for the GUI, but GtkGlExt is not present. Trying SDL instead.])
2155 missing_codecs=""
2156 if test "$media_handler" = "gst"; then
2157   AC_PATH_PROG(GST_INSPECT, gst-inspect, ,[${pathlist}])
2158   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2159     AC_PATH_PROG(GST_INSPECT, gst-inspect-0.10, ,[${pathlist}])
2160   fi
2161   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2162     dnl FIXME: there may be multiple acceptable plugins that are acceptable for
2163     dnl our use. For example, mad or ffmpeg will play mp3.
2164     codecs="ffdec_flv ffdec_flashsv ffdec_vp6f ffdec_flashsv mad vorbisdec ffdec_vp6"
2165     for i in $codecs; do
2166        hits="`$GST_INSPECT $i | grep -c 'Long name'`"
2167        if test $hits -eq 0; then
2168          missing_codecs="$missing_codecs $i"
2169          AC_MSG_WARN([Missing codec: $i])
2170        fi
2171     done
2172   fi
2173   GNASH_PKG_FIND(gstreamer_plugins_base, [gst/interfaces/probeprobe.h], [gstreamer interfaces library], gst_property_probe_probe_and_get_values_name, [0.10])
2174   GNASH_PKG_FIND(gstreamer_app, [gst/app/gstappsink.h], [gstreamer app library], call_gmon_start, [0.10])
2175   GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, [0.10])
2176   dnl if cross compiling, we're usually not going to be able to pop up
2177   dnl the codec installer to download the package to install, so disable
2178   dnl it if cross compiling with gstreamer support.
2179   if test x$cross_compiling = xno; then
2180     GNASH_PKG_FIND(gstpbutils, [gst/pbutils/install-plugins.h], [gstreamer PB Utils library], gst_install_plugins_supported, [0.10])
2181   fi
2182   dnl when cross compiling Gstreamer, not all supplied SDKs include all the
2183   dnl development libraries since most devices don't need to support plugin
2184   dnl development, only the runtime. In these caes we often have the header
2185   dnl files but not the libraries.
2186   if test x"${has_gstreamer_plugins_base}" = xyes; then
2187     GSTREAMER_LIBS="-lgstinterfaces-0.10 $GSTREAMER_LIBS"
2188     AC_DEFINE(HAS_GSTREAMER_PLUGINS_BASE, [1], "Has the Gstreamer Plugin Dev package installed.")
2189   fi
2190   if test x"${media_handler_specified}" = xfalse; then
2191     if test x"$GSTREAMER_LIBS" = x; then
2192        AC_MSG_WARN([No appropriate gstreamer library found, will try using ffmpeg.])
2193        media_handler=ffmpeg
2194     fi
2195   fi
2198 if test x"$media_handler" = x"ffmpeg"; then
2199   GNASH_PATH_FFMPEG
2200   if test x"${media_handler_specified}" = xfalse; then
2201      # If the library is not found, or its version is not ok, we'll try gst
2202      if test x"${ac_cv_path_ffmpeg_lib}" = x -o x"${ffmpeg_version_check}" != xok; then
2203        AC_MSG_WARN([No appropriate ffmpeg library found, disabling media handling.])
2204        media_handler=none
2205      fi
2206   fi
2209 if test x$build_cairo = xyes; then
2210     GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
2211 dnl   if test x"${CAIRO_CFLAGS}" != x; then
2212 dnl      CAIRO_CFLAGS=`echo ${CAIRO_CFLAGS} | sed -e 's/ *//'`
2213 dnl      CAIRO_CFLAGS="${CAIRO_CFLAGS} ${CAIRO_CFLAGS}/cairo"
2214 dnl   fi
2215 dnl  if test x$build_fb = xyes; then
2216 dnl    AC_MSG_ERROR([Cairo renderer is not supported by FB gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2217 dnl  fi
2218 dnl   if test x$build_sdl = xyes; then
2219 dnl     AC_MSG_ERROR([Cairo renderer is not supported by SDL gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2220 dnl   fi
2221 dnl  if test x$build_fltk = xyes; then
2222 dnl    AC_MSG_ERROR([Cairo renderer is not supported by FLTK gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2223 dnl  fi
2224 dnl  if test x$build_kde3 = xyes; then
2225 dnl    AC_MSG_ERROR([Cairo renderer is not supported by KDE gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2226 dnl  fi
2227 dnl  if test x"${build_dump}" = xyes -o x"${build_haiku}" = xyes; then
2228 dnl    AC_MSG_ERROR([Cairo renderer is not supported by this gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2229 dnl  fi
2230   AC_DEFINE([RENDERER_CAIRO], [], [Use cairo renderer])
2233 AM_CONDITIONAL(HAVE_CAIRO, [true])
2234 dnl AM_CONDITIONAL(HAVE_CAIRO, [test x"${has_cairo}" = xyes])
2235 AM_CONDITIONAL(HAVE_OPENGL, [true])
2236 dnl AM_CONDITIONAL(HAVE_OPENGL, test x"${has_opengl}" = xyes)
2238 AM_CONDITIONAL(USE_SOUND_SDL, test x$build_sound_sdl = xyes)
2239 AM_CONDITIONAL(USE_SOUND_AHI, test x$build_sound_ahi = xyes)
2240 AM_CONDITIONAL(USE_SOUND_MKIT, test x$build_sound_mkit = xyes)
2241 AM_CONDITIONAL(USE_FFMPEG_ENGINE, test x"$media_handler" = xffmpeg)
2242 AM_CONDITIONAL(USE_GST_ENGINE, test x"$media_handler" = xgst)
2243 AM_CONDITIONAL(HAVE_OPENGL, test x"${OPENGL_LIBS}" != x)
2244 dnl for now the Haiku media handler is experimental
2245 AM_CONDITIONAL(USE_HAIKU_ENGINE, test x"$media_handler" = xno)
2247 if test x$build_sound_mkit = xyes; then
2248   if test x"${haiku}" != xyes; then
2249     AC_MSG_ERROR([Media Kit sound handling is supported only under Haiku]);
2250   else
2251     AC_DEFINE([SOUND_MKIT],  [1], [Use Haiku's Media Kit for sound handling])
2252   fi
2255 if test x"${build_sound_sdl}" = xyes; then
2256   AC_DEFINE([SOUND_SDL],  [1], [Use SDL for sound handling])
2259 if test x"${build_sound_ahi}" = xyes; then
2260   if test x"$amigaos4" != xyes; then
2261     AC_MSG_ERROR([AHI sound handling is supported only under AmigaOS]);
2262   else
2263     AC_DEFINE([SOUND_AHI],  [1], [Use AmigaOS AHI for sound handling])
2264   fi
2267 case "${media_handler}" in
2268   ffmpeg)  AC_DEFINE([USE_FFMPEG],  [1], [Use FFMPEG for media decoding]) ;;
2269   gst)  AC_DEFINE([USE_GST],  [1], [Use gstreamer for media decoding]) ;;
2270   *)
2271 esac
2272 dnl I'm kinda lazy, get rid of this later... //Markus
2273 AM_CONDITIONAL(HAVE_GST, test x$media_handler = xgst)
2275 if test x$build_fltk = xyes; then
2276   GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush)
2279 AM_CONDITIONAL(HAVE_FLTK2, [ test x$has_fltk2 = xyes ])
2280 AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ])
2282 if test x"${build_agg}" = xyes; then
2283    GNASH_PATH_AGG
2286 build_xv=yes
2287 build_vaapi=yes
2288 hwaccel_list="VAAPI XVideo"
2289 nhwaccel=2
2290 AC_ARG_ENABLE(hwaccel,
2291   AC_HELP_STRING([--enable-hwaccel], [Specify which accleration to support to enable (none,vaapi,omap)]),
2292   if test -z ${enableval}; then
2293       hwaccel_list="none"
2294       nhwaccel=1
2295       enableval=""
2296   fi
2297   while test -n "${enableval}" ; do
2298     val=`echo ${enableval} | cut -d ' ' -f 1`
2299     [case "${val}" in
2300       no*|NO*)
2301         hwaccel_list="none"
2302         build_vaapi=no
2303         build_omap=no
2304         dnl build_xv=no
2305         nhwaccel=0
2306         ;;
2307       va*|VA*)
2308         hwaccel_list="${hwaccel_list} vaapi"
2309         build_vaapi=yes
2310         nhwaccel=$((nhwaccel+1))
2311         ;;
2312       xv*|XV*|Xv*)
2313         hwaccel_list="${hwaccel_list} XVideo"
2314         dnl build_xv=yes
2315         nhwaccel=$((nhwaccel+1))
2316         ;;
2317       all|ALL)
2318         hwaccel_list="XVideo VAAPI OMAP"
2319         nhwaccel=3
2320         build_omap=yes
2321         build_vaapi=yes
2322         dnl build_xv=yes
2323         ;;
2324       omap*|OMAP*)
2325         hwaccel_list="${hwaccel_list} omap"
2326         build_omap=yes
2327         nhwaccel=$((nhwaccel+1))
2328         ;;
2329       *) AC_MSG_ERROR([invalid hwaccel feature specified: ${enableval} given (accept: none,vaapi,omap)])
2330         ;;
2331       esac]
2332     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
2333     if test "x$val" = "x$enableval"; then
2334       break;
2335     fi
2336   done
2339 dnl Until the hwaccel patches in ffmpeg wind up in the ffmpeg-plugin,
2340 dnl restrict using HW Accel to using ffmpeg directly.
2341 if test x"${media_handler}" = x"gst" -a x"${build_vaapi}" = x"yes" -a x"${have_ffmpeg_vaapi}" = x"yes"; then
2342   AC_MSG_ERROR(["Hardware acceleration currently not supported unless using ffmpeg."])
2345 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi}" = x"yes"; then
2346   use_libva=no
2347   use_libva_x11=no
2348   use_libva_glx=no
2349   dnl if the version of ffmpeg is recent enough, (r20957, 52.45.0), then
2350   dnl look for VAAPI support so we can use use the VAAPI enabled ffmpeg.
2351   if test x"${have_ffmpeg_vaapi}" = xyes; then
2352     use_libva=yes
2353     GNASH_PKG_FIND([libva],
2354       [va/va.h],
2355       [Video Acceleration API],
2356       vaInitialize
2357     )
2359     use_libva_x11=yes
2360     GNASH_PKG_FIND([libva_x11],
2361       [va/va_x11.h],
2362       [VA API (X11 display)],
2363       vaGetDisplay,
2364       [], [-lva-x11]
2365     )
2367     if test x$build_ogl = xyes; then
2368       use_libva_glx=yes
2369       GNASH_PKG_FIND([libva_glx],
2370         [va/va_glx.h],
2371         [VA API (GLX display)],
2372         vaGetDisplayGLX,
2373         [], [-lva-glx]
2374       )
2375     fi
2376   fi
2379 dnl libVA drivers. We declare conditional for both the option being
2380 dnl selected, as well as whether or not it's found. This we can
2381 dnl generate better error handling if it's not found.
2382 AM_CONDITIONAL(BUILD_OMAP, test x"${build_omap}" = xyes)
2383 AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
2385 dnl Only build the vaapi support if we have a version of ffmpeg that
2386 dnl supports it.
2387 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${found_libva_incl}" = xyes; then
2388   build_vaapi=yes
2389   hwaccel_list="VAAPI XVideo"
2390   nhwaccel=2
2391 else
2392   build_vaapi=no
2393   hwaccel_list="XVideo"
2394   nhwaccel=1
2397 AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes)
2398 AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes)
2399 AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes)
2401 GNASH_DOCBOOK
2402 AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x)
2403 AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes)
2404 AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_TEXI" != x -o x"$DB2X_TEXIXML" != x ])
2405 AM_CONDITIONAL(ENABLE_PDF, [ test x"$DB2X_PDF" ])
2406 AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2407 AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x -a x"$docbook_styles" != x ])
2408 AM_CONDITIONAL(ENABLE_XMLTEX, [ test x"$PDFXMLTEX" != x -a x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2409 dnl  AM_CONDITIONAL(ENABLE_DBLATEX, [ test x"$DBLATEX" != x ])
2410 AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_MAN" != x -o x"$DB2X_MANXML" != x ])
2411 AM_CONDITIONAL(HAVE_AGG, [test x"${AGG_LIBS}" != x])
2413 GNASH_PATH_CURL
2415 dnl Define winsock if we're on windows. We could do something complicated,
2416 dnl but since AC_EXEEXT does it for us, we'll do this the easy way.
2417 if test x"$EXEEXT" = "exe"; then
2418   AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32])
2421 dnl ****************************************
2422 dnl *** Check for ELF visibility support ***
2423 dnl ****************************************
2425 AC_ARG_ENABLE([visibility],
2426   AC_HELP_STRING([--enable-visibility], [Use ELF visibility attributes]), [], [enable_visibility=no])
2428 if test x"$enable_visibility" != x"no"; then
2429   dnl Check whether the compiler supports the visibility attribute
2430   save_CFLAGS="$CFLAGS"
2431   CFLAGS="$CFLAGS -Wall -Werror"
2432   AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
2433   AC_COMPILE_IFELSE(AC_LANG_SOURCE(
2434     [
2435       void __attribute__ ((visibility("default"))) test_default (void) {}
2436       void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
2437       int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
2438     ]),
2439     [
2440       AC_DEFINE([HAVE_GNUC_VISIBILITY], [1], [Define this for GCC-visibility.])
2441       AC_MSG_RESULT([yes])
2442     ],
2443     [
2444       AC_MSG_RESULT([no])
2445     ]
2446   )
2447   CFLAGS="$save_CFLAGS"
2450 AC_ARG_ENABLE([pch],
2451   AC_HELP_STRING([--enable-pch], [Enable precompiled header support]), [], [enable_pch=no])
2453 AM_CONDITIONAL([ENABLE_PCH], [test x"$enable_pch" != x"no"])
2455 PCH_FLAGS="-include all-includes.h -Winvalid-pch"
2456 AC_SUBST(PCH_FLAGS)
2458 GNASH_PATH_PTHREADS
2460 GNASH_PATH_BOOST
2461 dnl AX_GCC_ARCHFLAG(no)
2463 AC_ARG_ENABLE([strict],
2464   AC_HELP_STRING([--enable-strict],[Accept only standards compliant code (GCC only)]),
2465   [case "${enableval}" in
2466     yes) strict=yes ;;
2467     no) strict=no ;;
2468     *) AC_MSG_ERROR([bad value ${enableval} for --enable-strict option]) ;;
2469   esac],
2470   [strict=no]
2473 if test x"$strict" = x"yes" -a x$build_agg = xyes; then
2474    AC_MSG_ERROR([agg renderer will fail with --enable-strict.]);        
2477 # We want warnings, lots of warnings  :-)
2478 # It should be possible to build with -ansi, not with
2479 # -pedantic because of agg.
2481 # -ansi was actually dropped because it hides 'fileno', which
2482 # is used in a few places
2484 if test x"$GCC" = x"yes"; then
2485   CXXFLAGS="$CXXFLAGS \
2486     $CROSS_CXXFLAGS \
2487     -W \
2488     -Wall \
2489     -Wcast-align \
2490     -Wcast-qual \
2491     -Wpointer-arith \
2492     -Wreturn-type \
2493     -Wnon-virtual-dtor \
2494     -Wunused \
2495     "
2496   CFLAGS="$CFLAGS \
2497     $CROSS_CXXFLAGS \
2498     -W \
2499     -Wall \
2500     -Wcast-align \
2501     -Wcast-qual \
2502     -Wpointer-arith \
2503     -Wreturn-type \
2504     -Wmissing-declarations \
2505     -Wmissing-prototypes \
2506     -Wstrict-prototypes \
2507     "
2508   if test x"$strict" = x"yes"; then
2509     CXXFLAGS="$CXXFLAGS \
2510       -Wextra \   
2511       -pedantic \
2512       -Wno-long-long \
2513       "
2515     CFLAGS="$CFLAGS \
2516       -pedantic \
2517       -Wno-long-long \
2518       -ansi \
2519       "
2520   fi
2523 AC_ARG_ENABLE([cassert],
2524   AC_HELP_STRING([--disable-cassert],[Disable assertion checking]),
2525   [case "${enableval}" in
2526     yes) cassert=yes ;;
2527     no) cassert=no ;;
2528     *) AC_MSG_ERROR([bad value ${enableval} for --enable-cassert option]) ;;
2529   esac],
2530   [cassert=yes]
2533 if test x"$cassert" = x"no"; then
2534     CXXFLAGS="$CXXFLAGS \
2535       -DNDEBUG \
2536       "
2537     CFLAGS="$CFLAGS \
2538       -DNDEBUG \
2539       "
2542 dnl /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
2543 AC_DEFUN([CHECK_VISIBILITY_GCC_BUG],
2544   [
2545     AC_CACHE_CHECK([if -fvisibility-inlines-hidden is broken], ac_cv_gcc_visibility_bug, [
2546         AC_LANG_PUSH(C++)
2547         save_CXXFLAGS=$CXXFLAGS
2548         save_LDFLAGS=$LDFLAGS
2549         CXXFLAGS="-fPIC -fvisibility-inlines-hidden -O0"
2550         LDFLAGS="$LDFLAGS -shared -fPIC"
2552         AC_TRY_LINK(
2553         [          
2554           template<typename CharT>
2555           struct VisTest
2556           {
2557             inline VisTest ();
2558           };
2559           template<typename CharT>
2560           inline VisTest<CharT>::VisTest()
2561         {}
2562         extern template class VisTest<char>;  // It works if we drop that line
2563         int some_function( int do_something ) __attribute__((visibility("default")));
2564         int some_function( int )
2565           {
2566             VisTest<char> a;
2567             return 0;
2568           }
2569         ], [],
2570         ac_cv_gcc_visibility_bug=no, ac_cv_gcc_visibility_bug=yes)
2572         CXXFLAGS=$save_CXXFLAGS
2573         LDFLAGS=$save_LDFLAGS
2574         AC_LANG_POP(C++)
2575       ]
2576     )
2577     if test x$ac_cv_gcc_visibility_bug = xno; then
2578       CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
2579     fi
2580   ]
2583 CHECK_VISIBILITY_GCC_BUG
2586 if test x$ac_cv_gcc_visibility_bug = xno; then
2587   AC_LANG_PUSH(C++)
2588   AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
2589   save_CXXFLAGS=$CXXFLAGS
2590   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2591   AC_LINK_IFELSE([AC_LANG_PROGRAM()], 
2592                  [ac_cv_gcc_visibility=yes;
2593                   AC_MSG_RESULT([yes])],
2594                  [ac_cv_gcc_visibility=no;
2595                   AC_MSG_RESULT([no])]);
2596   CXXFLAGS="$save_CXXFLAGS"
2597   AC_LANG_POP(C++)
2601 AM_CONDITIONAL(VISIBILITY_WORKS, test x"$ac_cv_gcc_visibility" = xyes)
2603 if test x"$ac_cv_gcc_visibility" = xyes -a x"$enable_visibility" != xno; then
2604   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2607 dnl Define convienience constants so Gnash can print out the
2608 dnl default configuration of the build.
2609 RENDERER_CONFIG="${renderer_list}"
2610 RENDERER_LIBS=
2611 for rend in `echo "${add_renderer}" | tr ',' ' '`; do
2612         RENDERER_LIBS="${RENDERER_LIBS} \$(top_builddir)/librender/libgnash${rend}.la"
2613 done
2614 dnl echo "RENDERER_LIBS=$RENDERER_LIBS"
2615 AC_SUBST(RENDERER_LIBS)
2616 AC_SUBST(RENDERER_CONFIG)
2618 HWACCEL_CONFIG="${hwaccel_list}"
2619 AC_SUBST(HWACCEL_CONFIG)
2621 dnl check for missing libraries and disable them.
2622 if test x"$BOOST_LIBS" != x; then
2623   if test x"${extra_missing_libs}" != x; then
2624     for i in ${extra_missing_libs}; do
2625       if test $i = serialization; then
2626         AC_DEFINE([BOOST_MULTI_INDEX_DISABLE_SERIALIZATION], ["1"], [if the library is missing, don't use it.])
2627       fi
2628     done
2629   fi
2632 CYGNAL_PATHS
2634 SUPPORTED_GUIS=
2635 if test x$build_qtopia3 = xyes; then
2636   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia3"
2638 if test x$build_qtopia4 = xyes; then
2639   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia4"
2641 if test x$build_hildon = xyes; then
2642   SUPPORTED_GUIS="${SUPPORTED_GUIS},hildon"
2644 if test x$build_alp = xyes; then
2645   SUPPORTED_GUIS="${SUPPORTED_GUIS},alp"
2647 if test x$build_fb = xyes; then
2648   SUPPORTED_GUIS="${SUPPORTED_GUIS},fb"
2650 if test x$build_fltk = xyes; then
2651   SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk"
2653 if test x$build_qt3 = xyes; then
2654   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt3"
2656 if test x$build_qt4 = xyes; then
2657   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt4"
2659 if test x$build_kde3 = xyes; then
2660   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde3"
2662 if test x$build_kde4 = xyes; then
2663   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde4"
2665 if test x$build_gtk = xyes; then
2666   SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk"
2668 if test x$build_sdl = xyes; then
2669   SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl"
2671 if test x$build_riscos = xyes; then
2672   SUPPORTED_GUIS="${SUPPORTED_GUIS},riscos"
2674 if test x$build_aqua = xyes; then
2675   SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua"
2677 if test x$build_dump = xyes; then
2678   SUPPORTED_GUIS="${SUPPORTED_GUIS},dump"
2680 if test x$build_aos4 = xyes; then
2681   SUPPORTED_GUIS="${SUPPORTED_GUIS},aos4"
2683 if test x$build_haiku = xyes; then
2684   SUPPORTED_GUIS="${SUPPORTED_GUIS},haiku"
2686 SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
2687 AC_SUBST(SUPPORTED_GUIS)
2689 MEDIA_CONFIG=${media_handler}
2690 AC_SUBST(MEDIA_CONFIG)
2692 dnl AC_CONFIG_LINKS(doc/C/images)
2693 dnl AC_CONFIG_LINKS(gnashconfig.h,libltdl/config.h)
2694 AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
2695 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in)
2696 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in)
2698 AC_CONFIG_FILES(gnash.pc:gnash.pc.in)
2700 AC_OUTPUT(Makefile
2701 po/Makefile
2702 libltdl/Makefile
2703 libmedia/Makefile
2704 libsound/Makefile
2705 libbase/Makefile
2706 libcore/Makefile
2707 libcore/vm/Makefile
2708 libcore/parser/Makefile
2709 libvaapi/Makefile
2710 librender/Makefile
2711 utilities/Makefile
2712 doc/Makefile
2713 doc/C/Makefile
2714 doc/Doxyfile
2715 testsuite/Makefile
2716 testsuite/media/Makefile
2717 testsuite/libbase.all/Makefile
2718 testsuite/as3compile.all/Makefile
2719 testsuite/actionscript.all/Makefile
2720 testsuite/samples/Makefile
2721 testsuite/swfdec/Makefile
2722 testsuite/misc-ming.all/Makefile
2723 testsuite/misc-mtasc.all/Makefile
2724 testsuite/misc-haxe.all/Makefile
2725 testsuite/misc-haxe.all/classes.all/Makefile
2726 testsuite/misc-swfmill.all/Makefile
2727 testsuite/misc-swfmill.all/trace-as2/Makefile
2728 testsuite/misc-swfmill.all/trace-as3/Makefile
2729 testsuite/misc-swfc.all/Makefile
2730 testsuite/network.all/Makefile
2731 testsuite/movies.all/Makefile
2732 testsuite/libcore.all/Makefile
2733 testsuite/libmedia.all/Makefile
2734 gui/Makefile
2735 gui/Info.plist
2736 gui/pythonmod/Makefile
2737 extensions/Makefile
2738 extensions/dejagnu/Makefile
2739 extensions/mysql/Makefile
2740 extensions/fileio/Makefile
2741 extensions/gtk2/Makefile
2742 extensions/lirc/Makefile
2743 extensions/dbus/Makefile
2744 plugin/Makefile
2745 plugin/npapi/Makefile
2746 plugin/klash/Makefile
2747 plugin/klash4/Makefile
2748 plugin/win32/Makefile
2749 cygnal/Makefile
2750 cygnal/libnet/Makefile
2751 cygnal/libamf/Makefile
2752 cygnal/cgi-bin/Makefile
2753 cygnal/cgi-bin/echo/Makefile
2754 cygnal/cgi-bin/oflaDemo/Makefile
2755 cygnal/cgi-bin/fitcDemo/Makefile
2756 cygnal/testsuite/Makefile
2757 cygnal/testsuite/libamf.all/Makefile
2758 cygnal/testsuite/libnet.all/Makefile
2759 cygnal/testsuite/cygnal.all/Makefile
2763 ########################## Final report begins... ############################
2766 cerr=/tmp/gnash-configure-errors.$$
2767 cwarn=/tmp/gnash-configure-warnings.$$
2768 echo ""
2770 #trap 'rm cerr' 0 # trap isn't a good idea, might override other traps
2771 exec 3> $cerr 
2772 exec 4> $cwarn
2774 echo "Configurable options are:"
2776 if test x"${i810lodbias}" = x"yes"; then
2777   echo "        Intel 810 LOD bias hack enabled"
2778 else
2779   echo "        Intel 810 LOD bias hack disabled (default). Use --enable-i810-lod-bias to enable."
2782 if test x"${pthreads}" = x"yes"; then
2783   echo "        POSIX Threads support enabled (default)"
2784 else
2785   if test x"${build_haiku}" = x"yes"; then
2786      echo "        POSIX Thread support built into C library."
2787   els
2788      echo "        POSIX Thread support disabled."
2789   fi
2792 if test x"${dmalloc}" = x"yes"; then
2793   echo "        DMalloc support enabled"
2794   echo "        For a list of the command-line options enter: dmalloc --usage"
2795 else
2796   echo "        DMalloc support disabled (default). Use --enable-dmalloc to enable."
2799 if test x"${npapi}" = x"yes"; then
2800   echo "        NPAPI plugin enabled (default). Use --disable-npapi to disable."
2801   echo "            NPAPI plugin will be installed in ${FIREFOX_PLUGINS}"
2802 else
2803   echo "        NPAPI plugin disabled."
2806 if test x"${build_kparts3}" = x"yes"; then
2807   echo "        KPARTS 3.x plugin enabled (default). Use --disable-kparts3 to disable"
2808   echo "            KPARTS 3.x plugin will be installed in ${KDE3_PLUGINDIR}"
2809   echo "            KPARTS 3.x service will be installed in ${KDE3_SERVICESDIR}"
2810   echo "            KPARTS 3.x config dir will be in ${KDE3_CONFIGDIR}"
2811   echo "            KPARTS 3.x appsdata will be installed in ${KDE3_APPSDATADIR}"
2812 else
2813   echo "        KPARTS 3.x plugin disabled."
2816 if test x"${build_kparts4}" = x"yes"; then
2817   echo "        KPARTS 4.x plugin enabled (default). Use --disable-kparts4 to disable"
2818   echo "            KPARTS 4.x plugin will be installed in ${KDE4_PLUGINDIR}"
2819   echo "            KPARTS 4.x service will be installed in ${KDE4_SERVICESDIR}"
2820   echo "            KPARTS 4.x config dir will be in ${KDE4_CONFIGDIR}"
2821   echo "            KPARTS 4.x appsdata will be installed in ${KDE4_APPSDATADIR}"
2822 else
2823   echo "        KPARTS 4.x plugin disabled."
2826 dnl -- if test x"${dynamic_gui}" = x"yes"; then
2827 dnl --   echo "        Loadable GUI & renderer enabled."
2828 dnl -- else
2829 dnl --   echo "        Loadable GUI & renderer disabled (default). Use --enable-dynamic-gui to enable."
2830 dnl -- fi
2832 # set a variable if we shouldn't continue. This way we can print
2833 # out everything that is missing in one pass, hopefully making it
2834 # easy for new developers to get everything they need installed.
2836 echo "Configured paths for ${build} are:"
2838 dnl Dump QT3 options is the user specified a QT3 or KDE3 GUI
2839 if test x"${build_qt3}" = xyes; then
2840   if test x"${has_qt3}" = xyes; then
2841     echo "        QT3 flags are: ${QT3_CFLAGS}"
2842     echo "        QT3 libs are: ${QT3_LIBS}"
2843   else
2844     echo "        ERROR: No QT 3.x development package installed!" >&3
2845     echo "               Install a QT 3.x development environment from http://trolltech.com" >&3
2846     echo "               or .deb users: apt-get install libqt3-mt-dev" >&3
2847     if test x$build_kde3 = xyes; then
2848       echo "               or change to a different gui with --enable-gui=..." >&3
2849     fi
2850   fi
2853 if test x"${build_qt4}" = xyes; then
2854   if test x"${has_qt4}" = xyes; then
2855     echo "        QT4 flags are: ${QT4_CFLAGS}"
2856     echo "        QT4 libs are: ${QT4_LIBS}"
2857   else
2858     echo "        ERROR: No QT 4.x development package installed!" >&3
2859     echo "               Install a QT 4.x development environment from http://trolltech.com" >&3
2860     echo "               or .deb users: apt-get install qt4-dev-tools" >&3
2861     if test x$build_kde4 = xyes; then
2862       echo "               or change to a different gui with --enable-gui=..." >&3
2863     fi
2864   fi
2867 if test x"$build_qtopia3" = xyes; then
2868   if test x"${QTOPIA3_LIBS}" != x ; then
2869     if test x"${QTOPIA3_CFLAGS}" != x ; then
2870       echo "        QTOPIA 3.x flags are: $QTOPIA3_CFLAGS"
2871     else
2872       echo "        QTOPIA 3.x flags are: default include path"
2873     fi
2874     echo "        QTOPIA 3.x libs are: $QTOPIA3_LIBS"
2875   else
2876     echo "        ERROR: No QTOPIA 3.x library development package installed!" >&3
2877     echo "               Install it from http://trolltech.com/downloads/" >&3
2878     echo "               binary packages are not available." >&3
2879   fi
2882 if test x"$build_qtopia4" = xyes; then
2883   if test x"${QTOPIA4_LIBS}" != x ; then
2884     if test x"${QTOPIA4_CFLAGS}" != x ; then
2885       echo "        QTOPIA 4.x flags are: $QTOPIA4_CFLAGS"
2886     else
2887       echo "        QTOPIA 4.x flags are: default include path"
2888     fi
2889     echo "        QTOPIA 4.x libs are: $QTOPIA4_LIBS"
2890   else
2891     echo "        ERROR: No QTOPIA 4.x library development package installed!" >&3
2892     echo "               Install it from http://trolltech.com/downloads/" >&3
2893     echo "               binary packages are not available." >&3
2894   fi
2898 # -o x$build_kparts3 = xyes
2899 if test x$build_kde3 = xyes; then
2900   if test x"$has_kde3" = xyes; then
2901     echo "        KDE 3.x flags are: $KDE3_CFLAGS"
2902     echo "        KDE 3.x libs are: $KDE3_LIBS"
2903   else
2904       echo "        ERROR: No KDE 3.x development package installed!" >&3
2905       echo "               To disable the KDE 3.x gui," >&3
2906       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
2907       echo "               and omit "kde" from the list." >&3
2908       echo "               When the option --enable-gui=... is omitted," >&3
2909       echo "               the default is the same of --enable-gui=kde,gtk" >&3
2910       echo "               To be able to build the kde 3.x gui," >&3
2911       echo "               install version 3.x of the KDE development environment from http://kde.org" >&3
2912       echo "               or .deb users: apt-get install kdelibs4-dev" >&3
2913       echo "               or .rpm users: yum install kdelibs3-devel." >&3
2914   fi
2917 # -o x$build_kparts4 = xyes
2918 if test x$build_kde4 = xyes; then
2919   if test x"$has_kde4" = xyes; then
2920     echo "        KDE 4.x flags are: $KDE4_CFLAGS"
2921     echo "        KDE 4.x libs are: $KDE4_LIBS"
2922   else
2923       echo "        ERROR: No KDE 4.x development package installed!" >&3
2924       echo "               To disable the KDE 4.x gui," >&3
2925       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
2926       echo "               and omit "kde" from the list." >&3
2927       echo "               When the option --enable-gui=... is omitted," >&3
2928       echo "               the default is the same of --enable-gui=kde,gtk" >&3
2929       echo "               To be able to build the kde 4.x gui," >&3
2930       echo "               install version 4.x of the KDE development environment from http://kde.org" >&3
2931       echo "               or .deb users: apt-get install kdelibs5-dev" >&3
2932       echo "               or .rpm users: yum install kdelibs-devel." >&3
2933   fi
2936 if test x"${JPEG_LIBS}" != x ; then
2937   if test x"${JPEG_CFLAGS}" != x ; then
2938     echo "        JPEG flags are: $JPEG_CFLAGS"
2939   else
2940     echo "        JPEG flags are: default include path"
2941   fi
2942   echo "        JPEG libs are: $JPEG_LIBS"
2943 else
2944   echo "        ERROR: No JPEG library development package installed!" >&3
2945   echo "               Install it from http://ijg.org" >&3
2946   echo "               or .deb users: apt-get install libjpeg-dev" >&3
2947   echo "               or .rpm users: yum install libjpeg-devel" >&3
2950 if test x"${GIF_LIBS}" != x ; then
2951   if test x"${GIF_CFLAGS}" != x ; then
2952     echo "        GIF flags are: $GIF_CFLAGS"
2953   else
2954     echo "        GIF flags are: default include path"
2955   fi
2956   echo "        GIF libs are: $GIF_LIBS"
2957 else
2958   echo "        ERROR: No GIF library development package installed!" >&3
2959   echo "               Install it from http://sourceforge.net/projects/giflib/" >&3
2960   echo "               or .deb users: apt-get install libungif-dev" >&3
2961   echo "               or maybe     : apt-get install libgif-dev" >&3
2962   echo "               or .rpm users: yum install libungif-devel" >&3
2965 if test x"${PNG_LIBS}" != x ; then
2966   if test x"${PNG_CFLAGS}" != x ; then
2967     echo "        PNG flags are: $PNG_CFLAGS"
2968   else
2969     echo "        PNG flags are: default include path"
2970   fi
2971   echo "        PNG libs are: $PNG_LIBS"
2972 else
2973   echo "        RECOMMENDED: No PNG library development package installed!" >&4
2974   echo "                     Gnash will be built without support for dynamic loading of PNG files." >&4
2975   echo "                     Install it from http://www.libpng.org" >&4
2976   echo "                     or .deb users: apt-get install libpng12-dev" >&4
2977   echo "                     or .rpm users: yum install libpng-devel" >&4
2980 dnl if test x"$OGG_LIBS" != x; then
2981 dnl   if test x"$OGG_CFLAGS" != x; then
2982 dnl     echo "        Ogg flags are: $OGG_CFLAGS"
2983 dnl   else
2984 dnl     echo "        Ogg flags are: default include path"
2985 dnl   fi
2986 dnl   echo "        Ogg libs are: $OGG_LIBS"
2987 dnl else
2988 dnl   echo "        ERROR: No Ogg Vorbis development package installed!" >&3
2989 dnl fi
2991 dnl if test x"$VORBIS_LIBS" != x; then
2992 dnl   if test x"$VORBIS_CFLAGS" != x; then
2993 dnl     echo "        VORBIS flags are: $VORBIS_CFLAGS"
2994 dnl   else
2995 dnl     echo "        VORBIS flags are: default include path"
2996 dnl   fi
2997 dnl   echo "        VORBIS libs are: $VORBIS_LIBS"
2998 dnl else
2999 dnl   echo "        ERROR: No VORBIS Vorbis development package installed!" >&3
3000 dnl fi
3002 if test x"$opengl" = x"yes"; then
3003   if test x"$OPENGL_LIBS" != x; then
3004     if test x"$OPENGL_CFLAGS" != x; then
3005       echo "        OpenGL flags are: $OPENGL_CFLAGS"
3006     else
3007       echo "        OpenGL flags are: default include path"
3008     fi
3009     echo "        OpenGL libs are: $OPENGL_LIBS"
3010     else
3011       echo "        ERROR: No OpenGL development package installed!" >&3
3012       echo "               You need to install the libmesa development package" >&3
3013       echo "               or .deb users: apt-get install libgl1-mesa-dev" >&3
3014       echo "               or .rpm users: yum install xorg-x11-Mesa-libGL" >&3
3015       echo "               or use a different renderer with --enable-renderer=" >&3
3016   fi
3019 dnl GLEXT is only needed for GTK/OpenGL
3020 if test x$build_gtk = xyes -a x$build_ogl = xyes ; then
3021   if test x"$GLEXT_LIBS" != x; then
3022     if test x"$GLEXT_CFLAGS" != x; then
3023       echo "        GtkGLExt flags are: $GLEXT_CFLAGS"
3024     else
3025       echo "        GtkGLExt flags are: default include path"
3026     fi
3027       echo "        GtkGLExt libs are: $GLEXT_LIBS"
3028   else
3029     if test x$build_gtk = xyes; then
3030       if test x$build_ogl = xyes; then
3031         echo "        ERROR: No GtkGLExt development package installed!" >&3
3032         echo "               It is needed to build the GTK/OpenGL GUI/renderer combination." >&3
3033         echo "               Either install it from http://gtkglext.sourceforge.net" >&3
3034         echo "               or .deb users: apt-get install libgtkglext1-dev" >&3
3035         echo "               or .rpm users: yum install gtkglext-devel" >&3
3036         echo "               or --enable-gui=sdl or --enable-renderer=agg" >&3
3037       fi
3038     fi
3039   fi
3043 if test x$build_hildon = xyes; then #{
3044   if test x"$HILDON_LIBS" != x; then
3045     if test x"$HILDON_CFLAGS" != x; then
3046       echo "        HILDON flags are: $HILDON_CFLAGS"
3047     else
3048       echo "        HILDON flags are: default include path"
3049     fi
3050       echo "        HILDON libs are: $HILDON_LIBS"
3051   else
3052     echo "        ERROR: No HILDON development package installed!" >&3
3053     echo "               Install it from http://gtk.org" >&3
3054     #echo "               or .deb users: apt-get install libhildon.0-dev" >&3
3055     echo "               or .deb users: apt-get install libhildon-1-dev" >&3
3056     echo "               or .rpm users: yum install hildon-devel" >&3
3057   fi
3060 if test x$build_gtk = xyes; then #{
3061   if test x"$GTK2_LIBS" != x; then
3062     if test x"$GTK2_CFLAGS" != x; then
3063       echo "        GTK2 flags are: $GTK2_CFLAGS"
3064     else
3065       echo "        GTK2 flags are: default include path"
3066     fi
3067       echo "        GTK2 libs are: $GTK2_LIBS"
3068   else
3069     echo "        ERROR: No GTK2 development package installed!" >&3
3070     echo "               Install it from http://gtk.org" >&3
3071     echo "               or .deb users: apt-get install libgtk2.0-dev" >&3
3072     echo "               or .rpm users: yum install gtk2-devel" >&3
3073   fi
3075   if test x"$PANGO_LIBS" != x; then
3076     if test x"$PANGO_CFLAGS" != x; then
3077       echo "        Pango flags are: $PANGO_CFLAGS"
3078     else
3079       echo "        Pango flags are: default include path"
3080     fi
3081     echo "        Pango libs are: $PANGO_LIBS"
3082   else
3083     echo "        ERROR: No Pango development package installed!" >&3
3084     echo "               Install it from http://pango.org" >&3
3085     echo "               or .deb users: apt-get install libpango1.0-dev" >&3
3086     echo "               or .rpm users: yum install pango-devel" >&3
3087   fi
3089   if test x"$GLIB_LIBS" != x; then
3090     if test x"$GLIB_CFLAGS" != x; then
3091       echo "        GLib flags are: $GLIB_CFLAGS"
3092     else
3093       echo "        GLib flags are: default include path"
3094     fi
3095     echo "        GLib libs are: $GLIB_LIBS"
3096   else
3097     echo "        ERROR: No GLib development package installed!" >&3
3098     echo "               Install it from http://gtk.org" >&3
3099     echo "               or .deb users: apt-get install libglib2.0-dev" >&3
3100     echo "               or .rpm users: yum install glib2-devel" >&3
3101   fi
3103   if test x"$ATK_LIBS" != x; then
3104     if test x"$ATK_CFLAGS" != x; then
3105       echo "        ATK flags are: $ATK_CFLAGS"
3106     else
3107       echo "        ATK flags are: default include path"
3108     fi
3109       echo "        ATK libs are: $ATK_LIBS"
3110   else
3111     echo "        ERROR: No ATK development package installed!" >&3
3112     echo "               Install it from http://gtk.org" >&3
3113     echo "               or .deb users: apt-get install libatk1.0-dev" >&3
3114     echo "               or .rpm users: yum install atk-devel" >&3
3115   fi
3119 if test "$media_handler" = "gst"; then
3120   if test x"$missing_codecs" != x; then   
3121       echo "        Your Gstreamer installation is missing these codecs: $missing_codecs"
3122       echo "        Please install the gstreamer-ffmpeg for Gstreamer"
3123   fi  
3124   if test x"$GSTREAMER_LIBS" != x; then
3125     if test x"$GSTREAMER_CFLAGS" != x; then
3126       echo "        Gstreamer flags are: $GSTREAMER_CFLAGS"
3127     else
3128       echo "        Gstreamer flags are: default include path"
3129     fi
3130     echo "        Gstreamer libs are: $GSTREAMER_LIBS"
3131     if test x"$has_modern_gstpbutils" = "xno"; then
3132       echo "        RECOMMENDED: If the user has not installed the necessary Gstreamer plugins," >&4
3133       echo "                     Gstreamer can pop up a message prompting them to." >&4
3134       echo "                     Install gstpbutils (>= 0.10.15) from http://www.gstreamer.net for that to be enabled" >&4
3135       echo "                     or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&4
3136     fi
3137     if test x"$has_gstreamer_plugins_base" = "xno"; then
3138       echo "                        Install gstreamer-plugins-base from http://www.gstreamer.net" >&3
3139       echo "                        or .rpm users: yum install gstreamer-plugins-base-devel" >&3
3140       echo "                        or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&4
3141     fi
3142   else
3143     echo "        ERROR: GST media handling requested but gstreamer-0.10+ not found" >&3
3144     echo "               Install it from http://www.gstreamer.net" >&3
3145     echo "               or .deb users: apt-get install libgstreamer0.10-dev" >&3
3146     echo "               or .rpm users: yum install gstreamer-devel" >&3
3147     echo "               or             yast install gstreamer010-devel" >&3
3148   fi
3151   if test x"$media_handler" = x"ffmpeg"; then
3152     if test x"$FFMPEG_LIBS" != x; then
3153       echo "        MP3 and video support enabled through ffmpeg"
3154       if test x"${ffmpeg_version_check}" != xok; then
3155         echo "        ERROR: You have version ${ffmpeg_version} of ffmpeg installed," >&3
3156         if test x"${have_ffmpeg_swscale}" = "xno"; then
3157           echo "               with no swscale enabled." >&3
3158         else
3159           echo "               with swscale enabled." >&3
3160         fi
3161         echo "               This setup isn't supported!" >&3
3162         echo "               Version 51.11.0 or newer is required, enabling swscale if >= 52.0.0." >&3
3163       else
3164         if test x"${avformat_h}" = x; then
3165           echo "        ERROR: FFMPEG's libavcodec header is installed but not libavformat." >&3
3166           echo "               You can install FFMPEG from http://ffmpeg.mplayerhq.hu" >&3
3167           echo "               or .deb users: apt-get install libavformat-dev" >&3
3168           echo "               or YaST users: yast -i libavformat-api (but currently installs into /usr/lib64)" >&3
3169           echo "               or explicitly set the path using --with-ffmpeg-incl=" >&5
3170           echo "               or reconfigure with --enable-media=gst" >&3
3171         else
3172           if test x"$FFMPEG_CFLAGS" != x; then
3173             echo "        FFMPEG flags are: $FFMPEG_CFLAGS"
3174           else
3175             echo "        FFMPEG flags are: default include path"
3176           fi
3177           echo "        FFMPEG libs are: $FFMPEG_LIBS"
3178         fi
3179       fi
3180     else
3181       echo "        ERROR: No FFMPEG development package installed!" >&3
3182       echo "               You can install FFMPEG from http://ffmpeg.mplayerhq.hu" >&3
3183       echo "               or .deb users: apt-get install libavformat-dev" >&3
3184       echo "               or .rpm users: yum install ffmpeg-devel" >&3
3185       echo "               or reconfigure with --enable-media=gst" >&3
3186     fi
3187   fi
3189 if test x$build_cairo = xyes; then
3190   if test x"$CAIRO_LIBS" != x; then
3191     if test x"$CAIRO_CFLAGS" != x; then
3192       echo "        Cairo flags are: $CAIRO_CFLAGS"
3193     else
3194       echo "        Cairo flags are: default include path"
3195     fi
3196     echo "        Cairo libs are: $CAIRO_LIBS"
3197   else
3198     echo "        ERROR: No Cairo development package installed!" >&3
3199     echo "               You need to have the Cairo development package installed" >&3
3200     echo "               if you have used --enable-render=cairo to configure." >&3
3201     echo "               Install it from http://cairographics.org" >&3
3202     echo "               or .deb users: apt-get install libcairo-dev" >&3
3203     echo "               or .rpm users: yum install cairo-devel" >&3
3204   fi
3207 if test x$build_fltk = xyes; then
3208   if test x"$FLTK2_LIBS" != x; then
3209     if test x"$FLTK2_CFLAGS" != x; then
3210       echo "        FLTK flags are: $FLTK2_CFLAGS"
3211     else
3212       echo "        FLTK flags are: default include path"
3213     fi
3214       echo "        FLTK libs are: $FLTK2_LIBS"
3215   else
3216     echo "        ERROR: No FLTK2 development package installed!" >&3
3217     echo "               There are currently no Debian or RPM packages for FLTK2;" >&3
3218     echo "               see http://www.fltk.org to install it from source." >&3
3219     echo "               or change to a different gui with --enable-gui=..." >&3
3220 dnl What it was for FLTK 1:
3221 dnl    echo "               or .deb users: apt-get install fltk-1.1-dev"
3222 dnl    echo "               or .rpm users: yum install fltk-devel"
3223   fi
3226 if test x$build_fltk = xyes; then
3227   if test x"$XFT_LIBS" != x; then
3228     if test x"$XFT_CFLAGS" != x; then
3229       echo "        Xft flags are: $XFT_CFLAGS"
3230     else
3231       echo "        Xft flags are: default include path"
3232     fi
3233       echo "        Xft libs are: $XFT_LIBS"
3234 dnl     else
3235 dnl       echo "        ERROR: No Xft development package installed!" >&3
3236 dnl       echo "               Install the xft development package" >&3
3237 dnl       echo "               or .deb users: apt-get install libxft-dev" >&3
3238 dnl       echo "               or .rpm users: yum install xft-devel" >&3
3239   fi
3242 # See whether SDL is required
3243 need_sdl=false
3244 test x$build_sdl = xyes                 && need_sdl=true
3245 test x$build_sound_sdl = xyes   && need_sdl=true
3247 if $need_sdl; then
3248   if test x"$SDL_LIBS" != x; then
3249     echo "        SDL flags are: $SDL_CFLAGS"
3250     echo "        SDL libs are: $SDL_LIBS"
3251   else
3252     echo "        ERROR: No SDL development package installed!" >&3
3253     echo "               Install it from http://www.libsdl.org/download-1.2.php" >&3
3254     echo "               or .deb users: apt-get install libsdl1.2-dev" >&3
3255     echo "               or .rpm users: yum install SDL-devel" >&3
3256     test x$build_sdl = xyes &&
3257         echo "               or select a different GUI with --enable-gui= " >&3
3258     test x"$media_handler" = x"ffmpeg" &&
3259         echo "               or use --enable-media=gst" >&3
3260   fi
3262 unset need_sdl
3264 if test x"$nsapi" = x"yes"; then
3265 dnl  if test x"$FIREFOX_CFLAGS" != x; then
3266 dnl    echo "        Firefox flags are: $FIREFOX_CFLAGS"
3267 dnl    echo "        Firefox libs are: $FIREFOX_LIBS"
3268     echo "        Plugin will be installed in ${FIREFOX_PLUGINS}"
3269 dnl  else
3270 dnl    echo "        ERROR: No Firefox or Mozilla development package installed!" >&3
3271 dnl  fi
3274 if test x"${pthreads}" = x"yes"; then
3275   if test x"$PTHREAD_CFLAGS" != x; then
3276     echo "        POSIX Threads flags are: $PTHREAD_CFLAGS"
3277   fi
3278   if test x"${PTHREAD_LIBS}" != x; then
3279     echo "        POSIX Threads lib is: $PTHREAD_LIBS"
3280   else
3281     if test x"${cross_compiling}" = xno; then
3282       echo "ERROR: No pthread development package installed!" >&3
3283     fi
3284   fi
3287 if test x"${docbook}" = x"yes"; then
3288   if test x"$MAKEINFO" = x; then
3289     echo "        ERROR: no makeinfo tools installed!" >&3
3290     echo "               Either install it from http://www.gnu.org/software/texinfo/" >&3
3291     echo "               or .deb users: apt-get install texinfo" >&3
3292     echo "               or configure without --enable-docbook" >&3
3293   fi
3294   dnl low-level tools
3295   if test x"$DB2X_TEXIXML" = x -o x"$DB2X_MANXML" = x -o x"$DB2X_XSLTPROC" = x; then
3296     dnl high-level tools
3297     if test x"${DB2X_TEXI}" = x -o x"${DB2X_MAN}" = x; then
3298       echo "        ERROR: No DocBook2X tools installed!" >&3
3299       echo "               Either install it from http://docbook2x.sourceforge.net" >&3
3300       echo "               or .deb users: apt-get install docbook docbook2x docbook-utils" >&3
3301       echo "                              docbook-xml docbook-xsl texinfo xsltproc" >&3
3302       echo "               or configure without --enable-docbook" >&3
3303     fi
3304   else
3305     echo "        You have version $db2x_version of the DocBook2X tools."
3306   fi
3307 else
3308   echo "        WARNING: without --enable-docbook we will use the cached" >&4
3309   echo "                 documentation files included in the gnash distribution." >&4
3310   echo "                 If you change files in doc/C, you should --enable-docbook." >&4
3313 if test x"$CURL_LIBS" != x; then
3314   if test x"$CURL_CFLAGS" != x; then
3315     echo "        CURL flags are: $CURL_CFLAGS"
3316   else
3317     echo "        CURL flags are: default include path"
3318   fi
3319     echo "        CURL libs are: $CURL_LIBS"
3320 else
3321   echo "        RECOMMENDED: If you install the CURL library, Gnash will be able to" >&4
3322   echo "                     display remote content (streaming from URLs) using CURL." >&4
3323   echo "                     Install libcurl from http://curl.haxx.se/libcurl" >&4
3324   echo "                     or .deb users: apt-get install libcurl-dev" >&4
3325   echo "                     or .rpm users: yum install curl-devel" >&4
3328 if test x"$SPEEX_LIBS" != x; then
3329   if test x"$SPEEX_CFLAGS" != x; then
3330     echo "        Speex flags are: $SPEEX_CFLAGS"
3331   else
3332     echo "        Speex flags are: default include path"
3333   fi
3334     echo "        Speex libs are: $SPEEX_LIBS"
3335 else
3336   echo "        RECOMMENDED: If you install the Speex library, Gnash will be able to" >&4
3337   echo "                     decoded Speex encoded audio in FLV files." >&4
3338   echo "                     Install libspeex from http://speex.org" >&4
3339   echo "                     or .deb users: apt-get install libspeex-dev" >&4
3340   echo "                     or .rpm users: yum install speex-devel" >&4
3343 if test x"$ext_dbus" = xyes; then
3344   if test x"$DBUS_LIBS" != x; then
3345     if test x"$DBUS_CFLAGS" != x; then
3346       echo "        DBUS flags are: $DBUS_CFLAGS"
3347     else
3348       echo "        DBUS flags are: default include path"
3349     fi
3350       echo "        DBUS libs are: $DBUS_LIBS"
3351   else
3352     echo "        WARNING: DBUS library not found." >&4
3353     echo "                 Gnash will be built without support for remote controls." >&4
3354     echo "                 Why not install libdbus from http://www.dbus.org" >&4
3355     echo "                 or .deb users: apt-get install dbus-dev" >&4
3356     echo "                 or .rpm users: yum install dbus-devel" >&4
3357   fi
3360 if test x$build_agg = xyes; then # {
3361   echo "        AGG Pixel format is: $pixelformat"
3362     if test x"$AGG_LIBS" != x; then # {
3363       if test x"${agg25}" != xyes; then # {
3364         echo "        ERROR: Your installation of AGG appears to be version 2.4 or older." >&3
3365         echo "               Please upgrade to AGG 2.5 or greater." >&3
3366         echo "               Install it from http://www.antigrain.com" >&3
3367         echo "               or .deb users: apt-get install libagg-dev" >&3
3368         echo "               or .rpm users: yum install agg-devel" >&3
3369       else # }{
3370         if test x"$AGG_CFLAGS" != x; then # {
3371           echo "        AGG flags are: $AGG_CFLAGS"
3372         else # }{
3373           echo "        AGG flags are: default include path"
3374         fi # }
3375         echo "        AGG libs are: $AGG_LIBS"
3376       fi # }
3377     else # }{
3378       echo "        ERROR: No AGG development package installed!" >&3
3379       echo "               Install it from http://www.antigrain.com" >&3
3380       echo "               or .deb users: apt-get install libagg-dev" >&3
3381       echo "               or .rpm users: yum install agg-devel" >&3
3382     fi # }
3383 fi # }
3385 if test x"$BOOST_LIBS" != x; then
3386     dnl Only cygnal requires date_time at present, so it's OK if either
3387     dnl you don't want cygnal or do have date_time installed.
3388     dnl if test x"$cygnal" = xno; then
3389         echo "        BOOST flags are: $BOOST_CFLAGS"
3390         echo "        BOOST libs are: $BOOST_LIBS"
3391         echo "        BOOST Extra libs are: $BOOST_EXTRA_LIBS"
3392     dnl fi
3393     if test x"${missing_headers}" != x; then
3394       for i in ${missing_headers}; do
3395         # They have some boost libs but no date_time and want to compile cygnal.
3396         echo "        ERROR: The BOOST $i header file is needed!" >&3
3397         echo "               Install it from http://boost.org" >&3
3398         echo "               or from a Boost development package" >&3
3399       done
3400     fi
3401     if test x"${extra_missing_libs}" != x; then
3402       for i in ${extra_missing_libs}; do
3403         echo "        WARNING: The BOOST $i library is recommended!" >&4
3404         echo "                 Install it from http://www.boost.org" >&4
3405         echo "                 or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&4
3406         echo "                 Gnash will compile anyway, but not all tests will work." >&4
3407       done
3408     fi
3409     if test x"${missing_libs}" != x; then
3410       for i in ${missing_libs}; do
3411         # They have some boost libs but no date_time and want to compile cygnal.
3412         echo "        ERROR: The BOOST $i library is needed!" >&3
3413         echo "               Install it from http://boost.org" >&3
3414         echo "               or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&3
3415       done
3416     fi
3417 else
3418     echo "        ERROR: No BOOST development package installed!" >&3
3419     echo "               Install it from http://www.boost.org" >&3
3420     echo "               or .deb users: apt-get install libboost-dev libboost-thread-dev" >&3
3421     if test x"$cygnal" = xyes; then
3422     echo "                              and libboost-date-time-dev (for cygnal)" >&3
3423     fi
3424     echo "               or .rpm users: yum install boost-devel" >&3
3427 dnl don't look for the flash compilers when cross compiling.
3428 if test x"$testsuite" = x"yes"; then
3429   if test x$cross_compiling = xno; then
3430     if test x"$MING_LIBS" != x; then
3431       echo "        MING flags are $MING_CFLAGS"
3432       echo "        MING libs are $MING_LIBS"
3433     else
3434       echo "        WARNING: You need to have the Ming development package" >&4
3435       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3436       echo "                 Install it from http://www.libming.org/" >&4
3437       echo "                 or .deb users: apt-get install libming-dev" >&4
3438     fi
3440     if test x"$MAKESWF" != x; then
3441       echo "        MING version code is $MING_VERSION_CODE"
3442       echo "        MAKESWF is $MAKESWF"
3443     else
3444       echo "        WARNING: You need to have the Ming utilities package" >&4
3445       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3446       echo "                 Install it from http://www.libming.org" >&4
3447       echo "                 or .deb users: apt-get install libming-util" >&4
3448     fi
3450     if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; then
3451       echo "        WARNING: You have an older version of Ming installed and will not" >&4
3452       echo "                 be able to run all of the tests in Gnash testsuite." >&4
3453       echo "                 Install the latest version from http://www.libming.org" >&4
3454     fi
3456     if test x"$SWFDEC_TESTSUITE" != x; then
3457       echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
3458     fi
3460     if test x"$MTASC" != x; then
3461       echo "        MTASC is $MTASC"
3462       echo "        MTASC CLASSPATH is $MTASC_CLASSPATH"
3463     else
3464       echo "        WARNING: You need to have the MTASC compiler packages installed" >&4
3465       echo "                 to run some of the tests in Gnash testsuite." >&4
3466       echo "                 You can install it from http://mtasc.org" >&4
3467       echo "                 or .deb users: apt-get install mtasc" >&4
3468     fi
3470     if test x"$HAXE" != x; then
3471       echo "        HAXE is $HAXE"
3472       echo "        HAXE CLASSPATH is $HAXE_CLASSPATH"
3473     else
3474       echo "        WARNING: You need to have the HAXE compiler package " >&4
3475       echo "                 version 2.00 or higher installed" >&4
3476       echo "                 to run some of the tests in Gnash testsuite." >&4
3477       echo "                 You can install it from http://haxe.org" >&4
3478       echo "                 or .deb users: apt-get install haxe" >&4
3479     fi
3481     if test x"$SWFMILL" != x; then
3482       echo "        SWFMILL is $SWFMILL"
3483       if test x"$ENABLE_AVM2" != x -a "$SWFMILL_VERSION" -lt 00021206; then
3484         echo "        WARNING: You are building Gnash with AVM2 support but" >&4
3485         echo "                 your swfmill version is too old to run AS3" >&4
3486         echo "                 tests." >&4
3487       fi
3488     else
3489       echo "        WARNING: You need to have the 'swfmill' tool installed" >&4
3490       echo "                 to run some of the tests in Gnash testsuite." >&4
3491       echo "                 You can install it from http://swfmill.org/" >&4
3492       echo "                 or .deb users: apt-get install swfmill" >&4
3493     fi
3495     if test x"$SWFC" != x; then
3496       echo "        SWFC is $SWFC"
3497     else
3498       echo "        WARNING: You need to have 'swfc' from SWFTools installed" >&4
3499       echo "                 to run some of the tests in Gnash testsuite." >&4
3500       echo "                 You can install it from http://www.swftools.org/" >&4
3501       echo "                 or .deb users: apt-get install swftools" >&4
3502     fi
3504     if test x"$AS3COMPILE" != x; then
3505       echo "        AS3COMPILE is $AS3COMPILE"
3506     else
3507       echo "        WARNING: you need as3compile from SWFTools" >&4
3508       echo "                 to run some of the tests in Gnash testsuite." >&4
3509       echo "                 You can install it from http://www.swftools.org/" >&4
3510     fi
3512     if test x"$HTTP_TESTSUITE" != x; then
3513       echo "        HTTP testsuite dir is $HTTP_TESTSUITE"
3514     fi
3516     if test x"$RED5_HOST" != x; then
3517       echo "        RED5 testing host is $RED5_HOST"
3518     fi
3519   fi
3522   if test x"$PERL" != x; then
3523     echo "        PERL is $PERL"
3524   else
3525     echo "        WARNING: You need to have perl installed" >&4
3526     echo "                 to run some of the tests in Gnash testsuite." >&4
3527   fi
3529 if test x"$testsuite" = x"yes"; then
3530   if test x"$CSOUND" != x; then
3531     echo "        CSOUND is $CSOUND"
3532   else
3533     echo "        WARNING: You need to have csound installed" >&4
3534     echo "                 to have real fun." >&4
3535     echo "                 Install it from http://www.csounds.com/" >&4
3536     echo "                 or .deb users: apt-get install csound" >&4
3537     echo "                 or .rpm users: yum install csound" >&4
3538   fi
3541 if test x"$Z_LIBS" != x; then
3542   if test x"$Z_CFLAGS" != x; then
3543     echo "        Z flags are: $Z_CFLAGS"
3544   else
3545     echo "        Z flags are: default include path"
3546   fi
3547   echo "        Z libs are: $Z_LIBS"
3548 else
3549   echo "        RECOMMENDED: You need to have the zlib development packages installed" >&4
3550   echo "                     to play compressed SWF (most of them from version 6 up)" >&4
3551   echo "                     and to display some kinds of JPEG files." >&4
3552   echo "                     Install it from http://www.zlib.net" >&4
3553   echo "                     or .deb users: apt-get install zlib1g-dev" >&4
3554   echo "                     or .rpm users: yum install zlib-devel." >&4
3555   echo "                     It may still be possible to configure without zlib." >&4
3558 if test x"$FREETYPE2_LIBS" != x; then
3559   if test x"$FREETYPE2_CFLAGS" != x; then
3560     echo "        FreeType flags are: $FREETYPE2_CFLAGS"
3561   else
3562     echo "        FreeType flags are: default include path"
3563   fi
3564   echo "        FreeType libs are: $FREETYPE2_LIBS"
3565 else
3566   echo "        RECOMMENDED: You need to have the freetype development packages installed" >&4
3567   echo "                     to use device fonts." >&4
3568   echo "                     Install it from http://www.freetype.org" >&4
3569   echo "                     or .deb users: apt-get install libfreetype6-dev" >&4
3570   echo "                     or .rpm users: yum install freetype-devel" >&4
3571   echo "                     It may still be possible to configure without freetype." >&4
3574 if test x"$FONTCONFIG_LIBS" != x; then
3575   if test x"$FONTCONFIG_CFLAGS" != x; then
3576     echo "        Fontconfig flags are: $FONTCONFIG_CFLAGS"
3577   else
3578     echo "        Fontconfig flags are: default include path"
3579   fi
3580   echo "        Fontconfig libs are: $FONTCONFIG_LIBS"
3581 else
3582   echo "        RECOMMENDED: You need to have the fontconfig development packages installed" >&4
3583   echo "                     to use device fonts." >&4
3584   echo "                     Install it from http://www.fontconfig.org" >&4
3585   echo "                     or .deb users: apt-get install libfontconfig1-dev" >&4
3586   echo "                     or .rpm users: yum install fontconfig-devel" >&4
3587   echo "                     It may still be possible to configure without fontconfig." >&4
3590 if test x$ext_mysql = xyes; then
3591   if test x$mysql != xno; then
3592     if test x"$MYSQL_LIBS" != x; then
3593       echo "        MYSQL flags are: $MYSQL_CFLAGS"
3594       echo "        MYSQL libs are: $MYSQL_LIBS"
3595     else
3596       echo "        ERROR: No MySQL development package is installed." >&3
3597       echo "               Either reconfigure without --enable-extensions=mysql" >&3
3598       echo "               or install MySQL header files from http://www.mysql.org" >&3
3599       echo "               or .deb users: apt-get install libmysqlclient-dev" >&3
3600       echo "                 or .rpm users: yum install mysql-devel" >&4
3601     fi
3602   fi
3605 if test "$GMSGFMT" = ":"; then
3606   echo "        WARNING: You need the gettext package installed to use translations." >&4
3607   echo "                 Required for building a package or 'make distcheck'" >&4
3608   echo "                 Install it from http://www.gnu.org/software/gettext/" >&4
3609   echo "                 or .deb users: apt-get install gettext" >&4
3610   echo "                 or .rpm users: yum install gettext" >&4
3613 if test x"${build_vaapi}" = x"yes"; then
3614   if test x"${LIBVA_CFLAGS}" = xyes; then
3615       echo "        LIBVA flags are: default"
3616     else
3617       echo "        LIBVA flags are: $LIBVA_CFLAGS"
3618       echo "        LIBVA libraries are: $LIBVA_LIBS"
3619   fi
3620   if test x$use_libva_x11 = xyes; then
3621     if test x"${LIBVA_X11_CFLAGS}" = xyes; then
3622       echo "        LIBVA X11 flags are: default"
3623     else
3624       echo "        LIBVA X11 flags are: $LIBVA_X11_CFLAGS"
3625       echo "        LIBVA X11 libraries are: $LIBVA_X11_LIBS"
3626     fi
3627   fi
3628   if test x$use_libva_glx = xyes; then
3629     if test x"${LIBVA_GLX_CFLAGS}" = xyes; then
3630       echo "        LIBVA GLXflags are: default"
3631     else
3632       echo "        LIBVA GLX flags are: $LIBVA_GLX_CFLAGS"
3633     fi
3634     echo "        LIBVA GLX libraries are: $LIBVA_GLX_LIBS"
3635   fi
3638 if test x"$ac_cv_gcc_visibility" != xyes; then
3639   if test x"$npapi" = xyes; then
3640     echo "        WARNING: NPAPI (mozilla) plugin is enabled, but your compiler"
3641     echo "                 does not support symbol visibility. This may cause "
3642     echo "                 the plugin to malfunction and may result in small "
3643     echo "                 children being eaten. You have been warned!"
3644   fi
3647 if test x"${DEJAGNU}" != x""; then
3648   echo "        DEJAGNU's runtest is $DEJAGNU"
3649 else
3650   echo "        WARNING: You need the dejagnu package installed to get a summary" >&4
3651   echo "                 report after running ''make check''" >&4
3652   echo "                 Install it from http://www.gnu.org/software/dejagnu/" >&4
3653   echo "                 or .deb users: apt-get install dejagnu" >&4
3654   echo "                 or .rpm users: yum install dejagnu" >&4
3657 dnl Access Linux Platform
3658 if test x"${build_alp}" = xyes; then
3659   if test x"${ALP_CFLAGS}" != x; then
3660     echo "        ALP flags are: $ALP_CFLAGS"
3661     echo "        ALP libs are: $ALP_LIBS"
3662   else
3663     echo "        ERROR: No ALP development package is installed." >&3
3664   fi
3667 dnl Haiku
3668 if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o x"${media_handler}" = x"mkit"; then
3669     echo "        Haiku libs are: $HAIKU_LIBS"
3672 if test x"$python" = x"yes"; then
3673   if test x"$has_python" = x"yes"; then
3674     echo "        PYTHON flags are: $PYTHON_CFLAGS"
3675     echo "        PYTHON libs are: $PYTHON_LIBS"
3676     echo "        PYTHON executable is are: $PYTHON"
3677   else
3678     echo "        ERROR: No Python development package is installed, but it's enabled." >&3
3679   fi
3681 if test x${build_ssl} = xyes; then
3682   if test x"${has_ssl}" = xyes; then
3683     if test x"${SSL_CFLAGS}" = xyes; then
3684       echo "        SSL flags are: default"
3685     else
3686       echo "        SSL flags are: $SSL_CFLAGS"
3687     fi
3688     echo "        SSL libs are: $SSL_LIBS"
3689   else
3690     echo "        ERROR: No SSL development package is installed, but it's enabled." >&3
3691   fi
3694 if test x${build_ssh} = xyes; then
3695   if test x"${has_ssh}" = xyes; then
3696     if test x"${SSH_CFLAGS}" = xyes; then
3697       echo "        SSH flags are: default"
3698     else
3699       echo "        SSH flags are: $SSH_CFLAGS"
3700     fi
3701     echo "        SSH libs are: $SSH_LIBS"
3702   else
3703     echo "        ERROR: No SSH development package is installed, but it's enabled." >&3
3704   fi
3707 if test x"${build_all_as3}" = x"yes"; then
3708   echo "        Building the entire ActionScript class libary"
3709 else
3710   echo "        Only building these ActionScript classes into the library:"
3711   echo "     ${classlist}"
3714 if test x"$testsuite" = x"yes"; then
3715   if test x"$NETCAT" != x; then
3716     echo "        You have netcat installed, which is only used for testing"
3717   else
3718     echo "        Install netcat for networking test support"
3719   fi
3720   if test x"$WGET" != x; then
3721     echo "        You have wget installed, which is only used for testing"
3722   else
3723     echo "        Install wget for networking test support"
3724   fi
3727 if test x$cross_compiling = xyes; then
3728    if test x"${android_ndk}" != xno; then
3729       AC_MSG_NOTICE([This build is setup for cross compiling for Android])
3730    else
3731       AC_MSG_NOTICE([This build is setup for cross compiling])
3732    fi
3735 echo "--------"
3736 dnl if test x"${ghelp}" = x"yes"; then
3737 dnl   echo "        GNOME help enabled"
3738 dnl else
3739 dnl   echo "        GNOME help disabled (default). Use --enable-ghelp to enable."
3740 dnl fi
3742 dnl if test x"${extensions}" = x"yes"; then
3743 dnl   echo "        Building extensions enabled (default). Use --disable-extensions to disable."
3744 dnl else
3745 dnl   echo "        Building Gnash extensions disabled."
3746 dnl fi
3748 if test x"${cygnal}" = x"yes"; then
3749   echo "        Building Cygnal media server enabled (default). Use --disable-cygnal to disable."
3750 else
3751   echo "        Building Cygnal media server disabled."
3754 if test x"${debugger}" = x"yes"; then
3755   echo "        Building Flash debugger support (default). Use --disable-debugger to disable."
3756 else
3757   echo "        Building the Flash debugger is disabled."
3760 if test x"${with-top_level}" != x; then
3761   echo "        Top level for cross compiling support files is: $with_top_level"
3764 if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
3765   echo "        WARNING: Pixel format RGB565 selected in combination with the" >&4
3766   echo "                 GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)." >&4
3769 if test x"${extensions_list}" != x; then
3770   echo "        Building extensions: ${extensions_list}"
3773 if test x"${security_list}" != x; then
3774   echo "        Enabling security features: ${security_list}"
3777 if test x"${hwaccel_list}" != xnone; then
3778   echo "        Enabling hardware acceleration features: ${hwaccel_list}"
3781 if test x"${statistics_list}" != x; then
3782   echo "        Enabling statistics collecting for: ${statistics_list}"
3785 if test x"${SUPPORTED_GUIS}" = x; then
3786   AC_MSG_ERROR(no supported GUIs found);
3789 echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
3790 echo "        Renderers supported: ${renderer_list}"
3791 echo "        Hardware Acceleration: ${hwaccel_list}"
3792 echo "        Media handler: "$media_handler
3793 echo "        Using ${add_sound} for sound handling"
3794 echo "        Using $with_shm mode for shared memory"
3796 if test x"$docbook" = x"yes"; then
3797   echo '        DocBook document processing enabled (for "make html" and "make pdf")'
3798   if test x"$docbook_styles" != x; then
3799     echo "        Docbook styles sheets in $docbook_styles"
3800   fi
3801 else
3802   echo "        DocBook document processing disabled (default)"
3805 if test -s $cwarn; then
3806   echo ""
3807   cat $cwarn
3808   rm $cwarn
3809   echo ""
3810   echo "Gnash should still compile even with these warnings."
3811   echo "If it doesn't, report the warnings as a bug."
3814 dnl If anything critical is missing, don't bother to continue
3815 if test -s $cerr; then
3816   echo ""
3817   cat $cerr >&2
3818   rm $cerr
3819   AC_MSG_ERROR([Please install required packages])
3822 if test x"$fork" = x"no"; then
3823   AC_MSG_ERROR([Currently only forking the standalone player works!])
3825 echo ""
3827 # Local Variables:
3828 # c-basic-offset: 2
3829 # tab-width: 2
3830 # indent-tabs-mode: nil
3831 # End: