improve OpenGLES1 & 2 support configure. Add configure support for OpenVG. Change...
[gnash.git] / configure.ac
blob9f61402cb1a3d9f6e485924e8025c911cc54c14b
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 dnl  CROSS_CXXFLAGS=-mandroid -fexceptions -I${android_ndk}/include
250   CROSS_CXXFLAGS=-mandroid -fexceptions
251   if test x"${with_top_level}" = x; then
252     with_top_level=/usr/local/android-arm/sysroot/usr
253     cross_compiling=yes
254   fi
255   ANDROID_NDK=${android_ndk}
256   AC_DEFINE(ANDROID, [1], [This is an Android build])
257 else
258   ANDROID_NDK=
260 AC_SUBST(ANDROID_NDK)
261 AM_CONDITIONAL(ANDROID, [ test x"${android_ndk}" != xno ])
263 soldir=/tmp
264 AC_ARG_WITH(soldir,
265  AC_HELP_STRING([--with-soldir],
266  [directory for .sol files]),
267  with_soldir=${withval})
268 if test x${with_soldir} != x; then
269   soldir=${with_soldir}
271 SOLDIR=${soldir}
272 AC_SUBST(SOLDIR)
274 AC_ARG_ENABLE(avm2,
275   AC_HELP_STRING([--enable-avm2], [Enable support for AS3]),
276   [case "${enableval}" in
277     yes) avm2=yes ;;
278     no)  avm2=no ;;
279     *)   AC_MSG_ERROR([bad value ${enableval} for enable-avm2 option]) ;;
280   esac], avm2=yes
282 AM_CONDITIONAL(ENABLE_AVM2, [test x"$avm2" = xyes])
283 if test x$avm2 = xyes; then
284     AC_DEFINE(ENABLE_AVM2, [1], [Enable AVM2 code])
287 dnl This option is only used if you want Gnash to interwork with 
288 dnl the Adobe player using the LocalConnection class.
289 dnl lckey=0xdd3adabd
290 AC_ARG_WITH(lckey,
291  AC_HELP_STRING([--with-lckey],
292  [shared memory key for your system]),
293  with_lckey=${withval})
295 if test x${with_lckey} != x; then
296   lckey=${with_lckey}
297 else
298   lckey=0xcbc384f8
300 LC_KEY=${lckey}
301 AC_SUBST(LC_KEY)
303 dnl FIXME: this should go away when gtk.cpp is cleaned up..
304 AC_DEFINE([BUILD_CANVAS], [], [Build GTK Canvas support for the GTK Widget ])
306 AC_ARG_ENABLE(python,
307   AC_HELP_STRING([--enable-python],[Enable python for the python wrapper]),
308 [case "${enableval}" in
309   yes) python=yes ;;
310   no)  python=no ;;
311   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-python option]) ;;
312 esac],python=no)
314 # Maybe use jemalloc, which handles memory fragmentation for
315 # ECAMscript languages better than the regular system malloc.
316 # This seems like a good idea, as both the other player and
317 # Mozilla/Firefox both recently switched to using jemalloc.
318 AC_ARG_ENABLE(jemalloc,
319   AC_HELP_STRING([--enable-jemalloc],[Enable jemalloc instead of system malloc]),
320 [case "${enableval}" in
321   yes) jemalloc=yes ;;
322   no)  jemalloc=no ;;
323   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-jemalloc option]) ;;
324 esac],jemalloc=yes)
326 dnl There is some weird stuff going on with NetBSD and jemalloc, so don't 
327 dnl build it for now.
328 if test x"${netbsd}" = x"yes" -o x"${windows}" = x"yes" -o x"${freebsd}" = x"yes" -o x"${haiku}" = x"yes"; then
329   jemalloc=no
331 dnl If the compiler doesn't have local thread storage enabled, don't try to
332 dnl use jemalloc.
333 if test x"${jemalloc}" = x"yes"; then
334   AC_TRY_COMPILE([], [
335     extern __thread int global_i; ],
336     has_local_thread_storage=yes
337   )
338   if test x"${has_local_thread_storage}" = x"yes"; then
339     AC_DEFINE([HAVE_LOCAL_THREAD_STORAGE], [1], [Has __thread (local thread storage) support])
340     AC_DEFINE([USE_JEMALLOC], [], [Use jemalloc instead of system malloc])
341   else
342     jemalloc=no
343   fi
346 dnl We can search libs for mallinfo to decide whether we have it or not.
347 dnl This is added to the linker flags when it's found. Usually it's -lc, but
348 dnl on OpenSolaris it's -lmalloc, so this fixes the build.
349 AC_SEARCH_LIBS([mallinfo], [c malloc],
350                AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
351                mallinfo=yes
352                )
354 AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes)
355 AM_CONDITIONAL(JEMALLOC, test x$jemalloc = xyes)
357 AC_ARG_ENABLE(debugger,
358   AC_HELP_STRING([--enable-debugger],[Enable the Flash debugger]),
359 [case "${enableval}" in
360   yes) debugger=yes ;;
361   no)  debugger=no ;;
362   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-debugger option]) ;;
363 esac],debugger=no)
365 if test x"$debugger" = x"yes"; then
366   AC_DEFINE([USE_DEBUGGER], [], [Flash Debugger support])
368 AM_CONDITIONAL(DEBUGGER, test x$debugger = xyes)
370 AC_ARG_ENABLE(fps-debug,
371   AC_HELP_STRING([--enable-fps-debug],[Enable FPS debugging code]),
372 [case "${enableval}" in
373   yes) AC_DEFINE([GNASH_FPS_DEBUG], [1], [Enable FPS debugging code])
374 esac])
376 dnl When we're making binary releases, it's often nice to just statically link
377 dnl the final executables so we don't worry about what's installed, or which
378 dnl version it is.
379 AC_ARG_ENABLE(allstatic,
380   AC_HELP_STRING([--enable-allstatic],[Enable using static libraries when possible for dependencies]),
381 [case "${enableval}" in
382   yes) allstatic=yes ;;
383   no)  allstatic=no ;;
384   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-allstatic option]) ;;
385 esac],allstatic=no)
386 AM_CONDITIONAL(ALLSTATIC, test x$allstatic = xyes)
388 AC_ARG_WITH(cpu,
389   AC_HELP_STRING([--with-cpu],[specify a cpu when cross compiling.]),
390   [case "${withval}" in
391     geode) with_cpu=geode ;;
392     *)   AC_MSG_ERROR([bad value ${enableval} for --with-cpu option]) ;;
393    esac],with_cpu=none)
395 if test x"$with_cpu" != x"none"; then
396 dnl   $CXXFLAGS="$CXXFLAGS -march=${with_cpu}"
397    cross_compiling=yes
400 AC_ARG_WITH(shm,
401   AC_HELP_STRING([--with-shm],[specify a shared memory type.]),
402   [case "${withval}" in
403     sysv) with_shm=sysv
404           ;;
405     posix) with_shm=posix
406           ;;    
407     *)   AC_MSG_ERROR([bad value ${enableval} for --with-shm option (try sysv or posix])
408           ;;
409    esac],with_shm=sysv)
411 if test x"${with_shm}" = x"sysv"; then
412   AC_DEFINE([USE_SYSV_SHM], [1], [Use SYSV shared memory for compatability])
413   dnl IPC_INFO isn't portable, and doesn't exist on BSD
414   AC_TRY_COMPILE([#include <sys/ipc.h> #include <sys/shm.h>], [
415     int flag = IPC_INFO; ],
416     AC_DEFINE([HAVE_IPC_INFO], [1], [Use shm_info])
417   )
418 else
419   AC_DEFINE([USE_POSIX_SHM], [1], [Use POSIX shared memory])
422 dnl Don't add the GUI menu. Some educational systems think this adds
423 dnl clutter and confusion, like on the OLPC.
424 AC_ARG_ENABLE(menus,
425   AC_HELP_STRING([--disable-menus],[Disable the GUI menus]),
426 [case "${enableval}" in
427   yes) menus=yes ;;
428   no)  menus=no ;;
429   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-menus option]) ;;
430 esac],menus=yes)
432 if test x"$menus" = x"yes"; then
433   AC_DEFINE([USE_MENUS], [], [GUI Menu support])
435 AM_CONDITIONAL(MENUS, test x$menus = xyes)
437 dnl Don't gather SWF information in tree form. This takes
438 dnl resources and memory that can be saved if there's no
439 dnl need to examine SWF internals.
440 AC_ARG_ENABLE(swftree,
441   AC_HELP_STRING([--disable-swftree],[Disable showing SWF properties]),
442 [case "${enableval}" in
443   yes) swftree=yes ;;
444   no)  swftree=no ;;
445   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-swf-properties option]) ;;
446 esac],swftree=yes)
448 if test x"$swftree" = x"yes"; then
449   AC_DEFINE([USE_SWFTREE], [], [View SWF information])
451 AM_CONDITIONAL(SWFTREE, test x$swftree = xyes)
453 dnl Disable running any tests for "make check". This may sound stupid, but
454 dnl this option is designed to solely be used by maintainers in the 
455 dnl DISTCHECK_CONFIGURE_FLAGS when building packages. Gnash's testing infrastructure
456 dnl is complex, and often the the testsuites will work, but due to some obscure reason,
457 dnl make distcheck fails.
458 AC_ARG_ENABLE(testsuite,
459   AC_HELP_STRING([--disable-testsuite],[Disable the testsuite, maintainers option only]),
460 [case "${enableval}" in
461   yes) testsuite=yes ;;
462   no)  testsuite=no ;;
463   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-testsuite option]) ;;
464 esac],testsuite=yes)
466 if test x"$testsuite" = x"yes"; then
467   AC_DEFINE([USE_TESTSUITE], [], [Testsuite support, maintainers option only])
469 AM_CONDITIONAL(TESTSUITE, test x$testsuite = xyes)
471 dnl -- dnl Enable building the gui support even when statically
472 dnl -- dnl linking. Normally this is only disabled when building a statically
473 dnl -- dnl linked gnash executable.
474 dnl -- AC_ARG_ENABLE(dynamic-gui,
475 dnl --   AC_HELP_STRING([--enable-dynamic-gui],[Enable building dynamically loadable GUIs and renderers ]),
476 dnl -- [case "${enableval}" in
477 dnl --   yes) dynamic_gui=yes ;;
478 dnl --   no)  dynamic_gui=no ;;
479 dnl --   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-dynamic-gui option]) ;;
480 dnl -- esac],dynamic_gui=no)
481 dnl -- if test x"${dynamic_gui}" = x"yes"; then
482 dnl --   AC_DEFINE([USE_DYNAMIC_GUI], [], [Dynamically loadable GUI and renderer support])
483 dnl -- fi
484 dnl -- AM_CONDITIONAL(DYNAMIC_GUI, test x${dynamic_gui} = xyes)
486 dnl Write the file to disk in the plugin, if specified.
487 AC_ARG_ENABLE(write,
488   AC_HELP_STRING([--enable-write], [Makes the Mozilla plugin write the currently playing SWF movie to /tmp.]),
489 [case "${enableval}" in
490   yes) write=yes ;;
491   no)  write=no ;;
492   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-write option]) ;;
493 esac],write=no)
495 if test x"$write" = x"yes"; then
496   AC_DEFINE([WRITE_FILE], [], [Write files while streaming])
499 dnl Write a standalone gnash launcher to disk from the plugin, if specified.
500 AC_ARG_ENABLE(sa-launcher,
501   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.]),
502 [case "${enableval}" in
503   yes) sa_launcher=yes ;;
504   no)  sa_launcher=no ;;
505   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-sa-launcher option]) ;;
506 esac],sa_launcher=yes)
508 if test x"$sa_launcher" = x"yes"; then
509   AC_DEFINE([CREATE_STANDALONE_GNASH_LAUNCHER], [], [Add support for writing a standalone executable launcher for movies embedded in web pages])
512 dnl Build the cygnal server if specified.
513 AC_ARG_ENABLE(cygnal,
514   AC_HELP_STRING([--enable-cygnal], [Enable building of the Cygnal server]),
515 [case "${enableval}" in
516   yes) cygnal=yes ;;
517   no)  cygnal=no ;;
518   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cygnal option]) ;;
519 esac],cygnal=no)
520 AM_CONDITIONAL(CYGNAL, test x$cygnal = xyes)
522 dnl Build the cgibins server if specified.
523 AC_ARG_ENABLE(cgibins,
524   AC_HELP_STRING([--enable-cgibins], [Enable building of the CGIs for Cygnal]),
525 [case "${enableval}" in
526   yes) cgibin=yes ;;
527   no)  cgibin=no ;;
528   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cgibins option]) ;;
529 esac],cgibin=yes)
530 AM_CONDITIONAL(USE_CGI, test x$cgibin = xyes)
531 if test x"${cgibin}" = x"yes"; then
532   AC_DEFINE([USE_CGIBIN], [1], [Enable cgi-bin processes for Cygnal])
535 dnl Fix the Intel 810 LOD bias problem
536 AC_ARG_ENABLE(i810-lod-bias,
537   AC_HELP_STRING([--enable-i810-lod-bias], [Enable fix for Intel 810 LOD bias problem]),
538 [case "${enableval}" in
539   yes) i810lodbias=yes ;;
540   no)  i810lodbias=no ;;
541   *)   AC_MSG_ERROR([bad value ${enableval} for enable-i810-lod-bias option]) ;;
542 esac])
544 if test x"${i810lodbias}" = xyes; then
545     AC_DEFINE([FIX_I810_LOD_BIAS], [], [Fix i810 LOD bias problem])
548 dnl Install the headers to make Gnash an SDK
549 AC_ARG_ENABLE(sdkinstall,
550   AC_HELP_STRING([--enable-sdkinstall], [Enable installing the libraries and headers as an SDK]),
551 [case "${enableval}" in
552   yes) sdkinstall=yes ;;
553   no)  sdkinstall=no ;;
554   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-sdkinstall option]) ;;
555 esac], sdkinstall=no)
557 AM_CONDITIONAL(SDKINSTALL, test x$sdkinstall = xyes)
559 dnl The class file is an optional file that if it is specified at configure time
560 dnl with --with-classfile=, then only those classes are compiled and built into the
561 dnl class library used for Gnash. THis is designed for small systems that execute the
562 dnl same swf file over and over, and don't need the same level of functionality that
563 dnl a browser plugin does.
564 GNASH_PKG_CLASSFILE
566 has_gtk2=no                     dnl FIXME: has_* shouldn't be in configure but in a macro
568 build_haiku=no
569 build_aos4=no                   dnl AmigaOS4 GUI
570 build_kde3=no
571 build_kde4=no
572 build_qtopia3=no
573 build_qtopia4=no
574 build_gtk=no
575 build_qt3=no
576 build_qt4=no
577 build_fb=no                     dnl Raw framebuffer
578 build_fltk=no
579 build_sdl=no
580 build_riscos=no                 dnl Native OS2 GUI
581 build_aqua=no                   dnl Native MacOSX
582 build_hildon=no                 dnl Native LIMO
583 build_alp=no                    dnl Acess Linux Platform using Hiker
584 build_dump=no
585 AC_ARG_ENABLE(gui,
586   AC_HELP_STRING([--enable-gui=], [Enable support for the specified GUI toolkits (default=gtk,kde4)]),
587   [if test -n ${enableval}; then
588     enableval=`echo ${enableval} | tr '\054' ' ' `
589   fi
590   while test -n "${enableval}" ; do
591     val=`echo ${enableval} | cut -d ' ' -f 1`
592     case "${val}" in
593       hildon|HILDON|hildon2|HILDON2)
594         build_hildon=yes
595         AC_DEFINE(USE_HILDON, [1], [Use the Hildon mobile framework])
596         build_gtk=yes
597 dnl        AC_DEFINE(USE_GTK, [1], [Use the GTK GUI])
598         ;;
599       alp|ALP|alp|ALP)
600         build_alp=yes
601 dnl        AC_DEFINE(USE_ALP, [1], [Use the ALP framework])
602         build_gtk=yes
603         ;;
604       gtk|GTK|gtk2|GTK2)
605 dnl        AC_DEFINE(USE_GTK, [1], [Use the GTK GUI])
606         build_gtk=yes
607         ;;
608       kde3|KDE3)
609         build_qt3=yes
610         build_kde3=yes
611         ;;
612       kde4|KDE4)
613         build_qt4=yes
614         build_kde4=yes
615         ;;
616       qtopia3|QTOPIA3)
617         build_qtopia3=yes
618         build_qt3=yes
619         ;;
620       qtopia4|QTOPIA4)
621         build_qtopia4=yes
622         build_qt4=yes
623         ;;
624       qt3|QT3)
625         build_qt3=yes
626         ;;
627       qt4|QT4)
628         build_qt4=yes
629         ;;
630       sdl|SDL)
631         build_sdl=yes
632         ;;
633       aqua|AQUA|Aqua)
634         build_aqua=yes
635         ;;
636       riscos|RISCOS|RiscOS)
637         build_riscos=yes
638         ;;
639       fltk|FLTK|fltk2|FLTK2)
640         build_fltk=yes
641         ;;
642       fb|FB)
643         build_fb=yes
644         ;;
645       aos4|AOS4)
646         build_aos4=yes
647         ;;
648       haiku|HAIKU)
649         build_haiku=yes
650         ;;
651       dump|DUMP)
652         build_dump=yes
653         ;;
654       all|ALL)
655         build_dump=yes
656         build_fb=yes
657         build_fltk=yes
658         build_qt3=yes
659         build_kde3=yes
660         build_kde4=yes
661         build_qt4=yes
662         build_sdl=yes
663 dnl        build_qtopia=yes
664 dnl        build_hildon=yes
665 dnl        build_alp=yes
666 dnl        build_riscos=yes
667 dnl        build_aos4=yes
668 dnl        build_haiku=yes        
669         ;;
670       *) AC_MSG_ERROR([invalid gui ${enableval} given (accept: gtk|kde3|kde4|fltk|sdl|riscos|aqua|fb|hildon|alp|qtopia3|qtopia4|dump|aos4|haiku)])
671          ;;
672       esac
673     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
674     if test "x$val" = "x$enableval"; then
675       break;
676     fi
677   done],
678   [if test x"${openbsd_os}" = x"openbsd"; then
679     build_kde3=yes;
680     build_qt3=yes;
681     build_gtk=yes;
682   else if test x"${haiku}" = xyes; then
683     build_haiku=yes;
684   else
685     build_kde4=yes;
686     build_qt4=yes;
687     build_gtk=yes;
688   fi
689   fi]
692 if test x"${build_haiku}" = xyes; then
693   if test x"$haiku" != xyes; then
694     echo "        ERROR: Can not build Haiku gui outside of Haiku
695 operating system." >&3
696   fi
699 dnl By default, we want to to build all renderers
700 build_ovg=no
701 build_gles=no
702 build_ogl=yes
703 build_agg=yes
704 build_cairo=yes
705 renderer_list="OpenGL AGG Cairo"
706 nrender=3
707 AC_ARG_ENABLE(renderer,
708   AC_HELP_STRING([--enable-renderer=], [Enable support for the specified renderers (ogl|gles|cairo|agg|all, default=all)]),
709   if test -n ${enableval}; then
710     if test "x${enableval}" != "xno" -o "x${enableval}" != "xnone" ; then
711       renderer_list="none"
712       enableval=`echo ${enableval} | tr '\054' ' ' `
713     else
714       renderer_list=""
715       enableval=""
716     fi
717   fi
718   renderer_list=""
719   nrender=0
720   build_ovg=no
721   build_ogl=no
722   build_gles=no
723   build_agg=no
724   build_cairo=no
725   while test -n "${enableval}" ; do
726     val=`echo ${enableval} | cut -d ' ' -f 1`
727     [case "${val}" in
728       no*|NO*)
729         renderer_list="none"
730         build_ovg=no
731         build_ogl=no
732         build_gles=no
733         build_agg=no
734         build_cairo=no
735         nrender=1
736         ;;
737       all|ALL)
738         renderer_list="OpenGL, Cairo, AGG"
739         build_ogl=yes
740         build_agg=yes
741         build_cairo=yes
742         build_ovg=yes
743         nrender=4
744         ;;
745       ogl|OGL|OpenGL|opengl)
746         renderer_list="${renderer_list} OpenGL"
747         build_gles=no
748         build_ogl=yes
749         nrender=$((nrender+1))
750         ;;
751       gles|GLES|GL-ES|gl-es)
752         renderer_list="${renderer_list} OpenGL-ES"
753         build_gles=yes
754         build_ogl=no
755         nrender=$((nrender+1))
756         ;;
757       ovg|OVG|OpenVG|openvg)
758         renderer_list="${renderer_list} OpenVG"
759         build_ogv=yes
760         nrender=$((nrender+1))
761         ;;
762       agg|AGG)
763         renderer_list="${renderer_list} AGG"
764         build_agg=yes
765         nrender=$((nrender+1))
766         ;;
767       cairo|CAIRO|Cairo*)
768         renderer_list="${renderer_list} Cairo"
769         build_cairo=yes
770         nrender=$((nrender+1))
771         ;;
772       *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept:  (ogl|cairo|agg|all)])
773         ;;
774       esac]
775     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
776     if test "x$val" = "x$enableval"; then
777       break;
778     fi
779   done
782 add_sound=
783 build_sound_sdl=no
784 build_sound_ahi=no
785 build_sound_mkit=no
786 AC_ARG_ENABLE(sound,
787   AC_HELP_STRING([--enable-sound=[[sdl|ahi|mkit]]], [Use the specified sound handler (default=sdl)]),
788      [case "${enableval}" in
789       sdl|SDL|Sdl)
790         build_sound_sdl=yes
791         add_sound="sdl"
792         ;;
793       ahi|AHI|Ahi)
794         build_sound_ahi=yes
795         add_sound="ahi"
796         ;;
797       mkit|MKIT|Mkit)
798         build_sound_mkit=yes
799         add_sound="mkit"
800         ;;
801      esac],
802   [if test x"${haiku}" = xyes; then
803      build_sound_mkit=yes
804      add_sound="mkit"
805    else
806      build_sound_sdl=yes
807      add_sound=sdl
808    fi]
811 if test x"${build_ogl}" = xyes; then
812 dnl  if test x$build_fb = xyes; then
813 dnl    AC_MSG_ERROR([OpenGL renderer is not supported by FB gui. Use --enable-renderer=AGG or --enable-gui=kde,gtk,sdl]);
814 dnl  fi
815 dnl  if test x$build_fltk = xyes; then
816 dnl    AC_MSG_ERROR([OpenGL renderer is not supported by FLTK gui. Use --enable-renderer=AGG or --enable-gui=kde,gtk,sdl]);
817 dnl  fi
818 dnl  if test x"${build_dump}" = xyes -o x"${build_haiku}" = xyes; then
819 dnl    AC_MSG_ERROR([OpenGL renderer is not supported by this gui. Use --enable-renderer=AGG or --enable-gui=kde,gtk,sdl]);
820 dnl  fi
821    AC_DEFINE([RENDERER_OPENGL], [], [Use OpenGL renderer])
824 dnl 16 bit: RGB555, RGB565
825 dnl 24 bit: RGB24, BGR24
826 dnl 32 bit: RGBA32, BGRA32
827 pixelformat=all
828 AC_ARG_WITH(pixelformat,
829   AC_HELP_STRING([--with-pixelformat=], [Use the specified pixel format for AGG (default=all)]),
830   if test -n ${withval}; then
831     pixelformat="${withval}"
832     withval=`echo ${withval} | tr '\054' ' ' `
833   fi
834   while test -n "${withval}" ; do
835     val=`echo ${withval} | cut -d ' ' -f 1`
836     [case "${val}" in
837       all)
838         # allow special value "all" set by user (handled below)
839         ;; 
840       argb32|ARGB32)
841         AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32])
842         ;;
843       abgr32|ABGR32)
844         AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32])
845         ;;
846       bgra32|BGRA32)
847         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
848         ;;
849       bgr24|BGR24)
850         AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24])
851         ;;
852       rgba32|RGBA32)
853         AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32])
854         ;;
855       rgb24|RGB24)
856         AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24])
857         ;;
858       rgb555|RGB555)
859         AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555])
860         ;;
861       rgb565|RGB565)
862         AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565])
863         ;;
864       *) AC_MSG_ERROR([invalid pixel format ${withval} given (accept: all|RGB555|RGB565|RGB24|BGR24|BGRA32|RGBA32|ARGB32|ABGR32)])
865          ;;
866       esac]
867     withval=`echo ${withval} | cut -d ' ' -f 2-6`
868     if test "x$val" = "x$withval"; then
869       break;
870     fi
871   done
874 if test x$pixelformat = xall; then
875   if test x$build_agg = xyes; then
876     ### The fact that we're building GTK doesn't mean we're not also
877     ### building KDE or SDL, each needing its own pixel format !
878     #if test x$build_gtk = xyes; then
879     #  AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24 pixel format])
880     #  pixelformat="RGB24"
881     #else
882       AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555 pixel format])
883       AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565 pixel format])
884       AC_DEFINE(PIXELFORMAT_RGB24,  [1], [RGB24 pixel format])
885       AC_DEFINE(PIXELFORMAT_BGR24,  [1], [BGR24 pixel format])
886       AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32 pixel format])
887       AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32 pixel format])
888       AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32 pixel format])
889       AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32 pixel format])
890     #fi
891   fi
894 dnl --------------------------------------------------------
895 dnl  Select media handler
896 dnl --------------------------------------------------------
898 media_handler_specified=false
899 AC_ARG_ENABLE(media,
900  AC_HELP_STRING([--enable-media=handler], [Enable media handling support using the specified handler: gst, ffmpeg or none (no sound) [[gst]] ]),
901  [case "${enableval}" in
902    GST|gst)
903      media_handler=gst
904      media_handler_specified=true
905      ;;
906    ffmpeg|FFMPEG)
907      media_handler=ffmpeg
908      media_handler_specified=true
909      ;;
910    no|NO|none)
911      media_handler=none
912      media_handler_specified=true
913      ;;
914    *) AC_MSG_ERROR([bad value ${enableval} for --enable-media option]) ;;
915   esac],
916  [media_handler=gst; media_handler_specified=true]
919 dnl If we're on Haiku, there is only one supported media handler.
920 if test x"${build_haiku}" = xyes; then
921      media_handler=ffmpeg
922      media_handler_specified=true
925 AC_ARG_ENABLE(lirc, AC_HELP_STRING([--enable-lirc], [Disable support for Lirc]),
926 [case "${enableval}" in
927   yes) lirc=yes ;;
928   no)  lirc=no ;;
929   *)   AC_MSG_ERROR([bad value ${enableval} for enable-lirc option]) ;;
930 esac], lirc=no)
932 if test x"$lirc" = x"yes"; then
933   AC_DEFINE([USE_LIRC], [], [LIRC daemon support])
935 AM_CONDITIONAL(USE_LIRC, test x$lirc = xyes)
937 dnl --------------------------------------------------------
938 dnl Figure out which extensions to build.
939 dnl --------------------------------------------------------
941 extensions_list=
942 ext_dejagnu=no
943 ext_mysql=no
944 ext_fileio=no
945 ext_gtk=no
946 ext_lirc=no
947 ext_dbus=no
948 ext_all=no
949 ext_launcher=no
950 AC_ARG_ENABLE(extensions,
951   AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build]),
952   if test -n ${enableval}; then
953     if test "x${enableval}" != "xno"; then
954       extlist="${enableval}"
955       enableval=`echo ${enableval} | tr '\054' ' ' `
956     else
957       extlist=""
958       enableval=""
959     fi
960   fi
961   nextensions=0
962   while test -n "${enableval}" ; do
963     val=`echo ${enableval} | cut -d ' ' -f 1`
964     extensions_list="${extensions_list} ${val}"
965     [case "${val}" in
966       dejagnu|DEJAGNU|dj|DJ)
967         AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension])
968         AC_MSG_NOTICE([Adding DejaGnu extension])
969         ext_dejagnu=yes
970         nextensions=$((nextensions+1))
971         ;;
972       mysql|MYSQL|sql|SQL)
973         AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension])
974         AC_MSG_NOTICE([Adding MySql extension])
975         ext_mysql=yes
976         nextensions=$((nextensions+1))
977         ;;
978       fileio|FILEIO|io|IO)
979         AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension])
980         AC_MSG_NOTICE([Adding FileIO extension])
981         ext_fileio=yes
982         nextensions=$((nextensions+1))
983         ;;
984       gtk|GTK|gtk2|GTK2)
985         AC_DEFINE(USE_GTK_EXT, [1], [Build the GTK extension])
986         ext_gtk=yes
987         nextensions=$((nextensions+1))
988         ;;
989       launcher|LAUNCHER)
990         AC_DEFINE(USE_LAUNCHER_EXT, [1], [Build the Launcher extension])
991         ext_launcher=yes
992         nextensions=$((nextensions+1))
993         ;;
994       lirc|LIRC)
995         AC_DEFINE(USE_LIRC_EXT, [1], [Build the LIRC extension])
996         ext_lirc=yes
997         nextensions=$((nextensions+1))
998         ;;
999       dbus|DBUS)
1000         AC_DEFINE(USE_DBUS_EXT, [1], [Build the DBUS extension])
1001         ext_dbus=yes
1002         nextensions=$((nextensions+1))
1003         ;;
1004       all|ALL)
1005         AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions])
1006         ext_dejagnu=yes
1007         ext_mysql=yes
1008         ext_fileio=yes
1009         ext_gtk=yes
1010         ext_lirc=yes
1011         ext_dbus=yes
1012         ext_launcher=yes
1013         ext_all=yes
1014         nextensions=9
1015         ;;
1016       *) AC_MSG_ERROR([invalid extension specified: ${enableval} given (accept: MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)])
1017          ;;
1018       esac]
1019     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1020     if test "x$val" = "x$enableval"; then
1021       break;
1022     fi
1023   done
1024   EXTENSIONS_LIST="$extensions_list"
1025   AC_SUBST(EXTENSIONS_LIST)
1028 AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ])
1029 AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ])
1030 AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ])
1031 AM_CONDITIONAL(BUILD_LAUNCHER_EXT, [ test x$ext_launcher = xyes ])
1032 AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
1033 AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
1034 AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
1035 AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
1037 AC_MSG_CHECKING([For the version of libtool])
1038 if test -d ${srcdir}/libltdl/libltdl; then
1039   ltver=2.x
1040 else
1041   ltver=1.x
1043 ltmajor=`echo $ltver | cut -d '.' -f 1`
1044 AC_MSG_RESULT([$ltver])
1045 AM_CONDITIONAL(LIBLTDL2, [test $ltmajor -eq 2])
1046 AM_CONDITIONAL(LIBLTDL1, [test $ltmajor -eq 1])
1047 if test $ltmajor -eq 1; then
1048   AC_LIBLTDL_CONVENIENCE
1049   AC_LIBTOOL_DLOPEN
1050   if test x"${windows}" = x"yes"; then
1051     dnl The following macro may be empty; the colon is necessary
1052     dnl in this case to avoid an empty if statement (which is a syntax error).
1053     AC_LIBTOOL_WIN32_DLL
1054     :
1055   fi
1056   AC_DISABLE_STATIC
1057 else
1058   LT_INIT([dlopen win32-dll disable-static])
1059   LTDL_INIT([convenience recursive])
1061 AC_PROG_LIBTOOL
1063 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
1064 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
1066 AC_C_BIGENDIAN
1067 AC_C_CONST
1068 AC_C_INLINE
1069 AC_SUBST([LIBTOOL_DEPS])
1070 AC_LIB_LTDL
1072 AM_CONDITIONAL(ENABLE_SHARED, [test x"${enable_shared}" = xyes])
1073 AM_CONDITIONAL(ENABLE_STATIC, [test x"${enable_shared}" = xno])
1074 dnl -- AM_CONDITIONAL(STATIC_GUI, test x"${dynamic_gui}" = xno -o x"${enable_shared}" = xno)
1076 AC_PATH_PROG(DEJAGNU, runtest)
1078 AM_CONDITIONAL(BUILD_OVG_RENDERER, [ test x$build_ovg = xyes ])
1079 AM_CONDITIONAL(BUILD_GLES_RENDERER, [ test x$build_gles = xyes ])
1080 AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x$build_ogl = xyes])
1081 AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x$build_agg = xyes ])
1082 AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x$build_cairo = xyes ])
1084 dnl AC_CHECK_LIB(ltdl, lt_dlmutex_register, AC_DEFINE(LT_DLMUTEX, 1, [Has lt_dlmutex_register]),
1085 dnl                                         AC_DEFINE(LT_DLMUTEX, 0, [doesn't have lt_dlmutex_register]) )
1087 dnl These options are for Cygnal, which collects optional statistics
1088 dnl on all the network traffic By default, we turn on statistics
1089 dnl collecting for the incoming and outgoing queues, since those are
1090 dnl required to be compatiable with FMS 3, and the ActionScript server
1091 dnl management API. buffers are the lowest level data storage, this
1092 dnl data is the time spent in the queue, and is primarily only used
1093 dnl for tuning the queueing API in Gnash. Memoryis the same, it's only
1094 dnl used by developers for tuning performance of memory allocations in
1095 dnl Gnash.
1096 buffers=no
1097 que=no
1098 memory=no
1099 cache=yes
1100 AC_ARG_WITH(statistics,
1101   AC_HELP_STRING([--with-statistics=], [Specify which statistics features to enable]),
1102   if test -n ${withval}; then
1103     if test "x${withval}" != "xno"; then
1104       extlist="${withval}"
1105       withval=`echo ${withval} | tr '\054' ' ' `
1106     else
1107       extlist=""
1108       withval=""
1109     fi
1110   fi
1111   statistics_list=""
1112   nstatistics=0
1113   while test -n "${withval}" ; do
1114     val=`echo ${withval} | cut -d ' ' -f 1`
1115     [case "${val}" in
1116       buffers)
1117         buffers=yes
1118         nstatistics=$((nstatistics+1))
1119         ;;
1120       que)
1121         que=yes
1122         nstatistics=$((nstatistics+1))
1123         ;;
1124       memory)
1125         memory=yes
1126         nstatistics=$((nstatistics+1))
1127         ;;
1128       cache)
1129         cache=yes
1130         nstatistics=$((nstatistics+1))
1131         ;;
1132       all|ALL)
1133         buffers=yes
1134         memory=yes
1135         queu=yes
1136         cache=yes
1137         nstatistics=4           dnl this must be incremented if you add anything
1138         ;;
1139       *) AC_MSG_ERROR([invalid statistics feature specified: ${withval} given (accept: buffers|que|memory|all)])
1140         ;;
1141       esac]
1142     withval=`echo ${withval} | cut -d ' ' -f 2-6`
1143     if test "x$val" = "x$withval"; then
1144       break;
1145     fi
1146   done
1148 if test x${buffers} = xyes; then
1149   statistics_list="${statistics_list} buffers"
1150   AC_DEFINE(USE_STATS_BUFFERS, [1], [Support statistics collecting for the queue buffers])
1151   AC_MSG_WARN([This option will effect your performance])
1154 if test x${memory} = xyes; then
1155   statistics_list="${statistics_list} memory"
1156   AC_DEFINE(USE_STATS_MEMORY, [1], [Support statistics collecting for all memory profiling])
1157   AC_MSG_WARN([This option will effect your performance])
1160 if test x${que} = xyes; then
1161   statistics_list="${statistics_list} queues"
1162   AC_DEFINE(USE_STATS_QUEUE, [1], [Support statistics collecting for the queues])
1165 if test x${cache} = xyes; then
1166   statistics_list="${statistics_list} cache"
1167   AC_DEFINE(USE_STATS_CACHE, [1], [Support statistics collecting for the cache])
1170 dnl this is just so Makefile can print the same list
1171 STATISTICS_LIST="$statistics_list"
1172 AC_SUBST(STATISTICS_LIST)
1175 # These settings are compile time options for the security
1176 # setting for anything that lets gnash exchange data with
1177 # other applications. Currently this only supports Shared
1178 # Objects and Local Connections. Shared Objects are like
1179 # your web browsers cookies, and Local Connections use
1180 # shared memory to execute methods remotely, and to
1181 # exchange data.
1183 # The default is to enable everything, and these can
1184 # also be controlled dynamically by the $HOME/.gnashrc
1185 # file.
1187 solreadonly=no
1188 localconnection=yes
1189 lctrace=yes
1191 AC_ARG_WITH(security,
1192   AC_HELP_STRING([--with-security=], [Specify which security features to enable]),
1193   if test -n ${withval}; then
1194     if test "x${withval}" != "xno"; then
1195       extlist="${withval}"
1196       withval=`echo ${withval} | tr '\054' ' ' `
1197     else
1198       extlist=""
1199       withval=""
1200     fi
1201   fi
1202   security_list=""
1203   nsecurity=0
1204   while test -n "${withval}" ; do
1205     val=`echo ${withval} | cut -d ' ' -f 1`
1206 dnl    security_list="${security_list} ${val}"
1207     [case "${val}" in
1208       solreadonly)
1209         solreadonly=yes
1210         nsecurity=$((nsecurity+1))
1211         ;;
1212       lc)
1213         localconnection=yes
1214         nsecurity=$((nsecurity+1))
1215         ;;
1216       lctrace)
1217         lctrace=yes
1218         nsecurity=$((nsecurity+1))
1219         ;;
1220       all|ALL)
1221         solreadonly=yes
1222         lc=yes
1223         lctrace=yes
1224         nsecurity=3
1225         ;;
1226       *) AC_MSG_ERROR([invalid security feature specified: ${withval} given (accept: solreadonly|lc|lctrace)])
1227         ;;
1228       esac]
1229     withval=`echo ${withval} | cut -d ' ' -f 2-6`
1230     if test "x$val" = "x$withval"; then
1231       break;
1232     fi
1233   done
1235 if test xlctrace = xyes; then
1236   security_list="${security_list} lctrace"
1237   AC_DEFINE(USE_LC_TRACE, [1],
1238            [Support LocalConnection])
1239   AC_MSG_NOTICE([This build supports LocalConnection tracing])
1240   AC_MSG_WARN([This option will effect your performance])
1243 if test x$localconnection = xyes; then
1244   security_list="${security_list} localconnection"
1245   AC_DEFINE(USE_LC, [1],
1246                  [Support LocalConnection])
1247   AC_MSG_NOTICE([This build supports LocalConnection])
1249 if test x$solreadonly = xyes; then
1250   security_list="${security_list} solreadonly"
1251   AC_DEFINE(USE_SOL_READONLY, [1],
1252                  [Shared Objects are read-only])
1253   AC_MSG_NOTICE([Shared Objects are read-only])
1255 SECURITY_LIST="$security_list"
1256 AC_SUBST(SECURITY_LIST)
1259 if test x$build_agg = xyes; then
1260   AC_DEFINE([RENDERER_AGG], [], [Use AntiGrain renderer])
1263 dnl For Haiku, we know the sysroot is in a non-standard place
1264 dnl it is important that -lagg comes before -lbe
1265 if test x"${haiku}" = xyes; then
1266   HAIKU_LIBS=-lbe
1267   AC_SUBST(HAIKU_LIBS)
1270 DLOPEN="-dlopen"
1271 DLPREOPEN="-dlpreopen"
1272 AC_SUBST(DLOPEN)
1273 AC_SUBST(DLPREOPEN)
1275 dnl dnl Substitute INCLTDL and LIBLTDL in the Makefiles
1276 AC_SUBST(INCLTDL)
1277 AC_SUBST(LIBLTDL)
1278 AC_SUBST(LIBTOOL_DEPS)
1280 dnl Darwin uses libtool instead of ar to produce libraries. We determine which one
1281 dnl we have here now. For some reason on Darwin, we don't get the
1282 dnl count from grep via stdin correctly. Writing a temp file does the
1283 dnl trick, so although it's ugly, that's what we gotta do...
1284 AC_MSG_CHECKING([which type of library archiver we have])
1285 rm -f .tmp
1286 libtool > .tmp 2>&1
1287 archiver=`grep -c dynamic .tmp 2>&1`
1288 rm -f .tmp
1289 dnl is there any good way to report what we found here?
1290 AC_MSG_RESULT()
1291 if test x"${archiver}" != x && test "${archiver}" -eq 1; then
1292 dnl   if test "$enable_shared" = no; then
1293 dnl     AR="libtool -static"
1294 dnl   else
1295 dnl     AR="libtool -dynamic"
1296 dnl     CXXFLAGS="${CXXFLAGS} -dynamic"
1297    export MACOSX_DEPLOYMENT_TARGET="10.3"
1298 dnl   fi
1299 dnl   AR_FLAGS="-o"
1300    darwin=yes
1301 else
1302    darwin=no
1305 dnl When cross compiling, limit the search directories cause otherwise
1306 dnl we may get the host headers or libraries by accident. These values
1307 dnl are exported, so all the other configure tests in macros/*.m4 use
1308 dnl these same settings rather than duplicating them like we used to.
1309 dnl To override thise, use the --with-*-incl= and --with-*-libs=
1310 dnl options to configure.
1311 if test x$cross_compiling = xyes; then
1312   AC_MSG_NOTICE([Configuring Gnash for cross compilation])
1313   export pkgroot="`$CXX -print-search-dirs | grep "install:" | sed -e 's/install: //' -e 's:/lib/gcc/.*::'`"
1314   dnl pkgroot only works correctly with builds of cross tools not in
1315   dnl /usr, ie... installed from the distribution packages, or just
1316   dnl plain installed in the system tools. This contaminates configure
1317   dnl when building for variations of the same basic architecture,
1318   dnl like i686-linux -> i586-mingw32.
1319   if test x${pkgroot} = "/usr"; then
1320     export pkgroot=""
1321   fi
1322   export incllist="`eval echo ${with_top_level}/include ${pkgroot}/${host_alias}/include ${pkgroot}/include`"
1323   export libslist="`eval echo ${with_top_level}/lib ${pkgroot}/${host_alias}/lib ${pkgroot}/lib64 ${pkgroot}/lib32 ${pkgroot}/lib`"
1324   export pathlist="`eval echo ${pkgroot}/${host_alias}/bin:${pkgroot}/bin`"
1325   npapi=no
1326 else
1327   AC_MSG_NOTICE([Configuring Gnash for native compilation])
1328   export incllist="`eval cat ${srcdir}/macros/incllist`"
1329   export libslist="`eval cat ${srcdir}/macros/libslist`"
1330   export pathlist=$PATH
1333 if test x"${android_ndk}" != xno; then
1334    incllist="${android_ndk}/include ${incllist}"
1337 AM_CONDITIONAL(CROSS_COMPILING, [ test x$cross_compiling = xyes ])
1339 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1340 dnl !! 
1341 dnl !! IMPORTANT NOTICE 
1342 dnl !!
1343 dnl !!  Any call to GNASH_PATH_XXX must be be given *after* this snippet.
1344 dnl !!  This is to ensure that PKG_CONFIG, cross_compiling and incllist are
1345 dnl !!  properly set at the time of call.
1346 dnl !!
1347 dnl !!  Also GNASH_PKG_FIND has to be called later. Not sure
1348 dnl !!  why but calling before breaks detection of CPP (see
1349 dnl !!  gnash-dev mailing archives for June 12 2009
1350 dnl !!  http://lists.gnu.org/archive/html/gnash-dev/2009-06/index.html
1351 dnl !! 
1352 dnl !! 
1353 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1355 dnl Check for PKG_CONFIG before any GNASH_PATH call
1356 PKG_PROG_PKG_CONFIG
1359 dnl Look for python, which is optional. If enabled, a python loadable
1360 dnl module of Gnash is created.
1361 GNASH_PATH_PYTHON
1362 AM_CONDITIONAL([USE_PYTHON], test x"$python" = xyes)
1363 AM_CONDITIONAL([HAS_PYTHON], test x"$has_python" = xyes)
1365 AC_PATH_PROG(PERL, perl)
1366 AM_CONDITIONAL(HAVE_PERL, test x"$PERL" != x)
1368 AC_PATH_PROG(CSOUND, csound)
1369 AM_CONDITIONAL(HAVE_CSOUND, test x"$CSOUND" != x)
1371 if test x$ext_dbus = xyes; then
1372   GNASH_PATH_DBUS
1375 if test x$ext_mysql = xyes; then
1376   GNASH_PATH_MYSQL
1379 dnl --------------------------------------------------------
1380 dnl  Select SSL support
1381 dnl --------------------------------------------------------
1383 dnl Enable using libssh with libnet
1384 AC_ARG_ENABLE(ssh,
1385   AC_HELP_STRING([--enable-ssh], [Enable using SSH for network authentication]),
1386 [case "${enableval}" in
1387   yes) build_ssh=yes ;;
1388   no)  build_ssh=no ;;
1389   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssh option]) ;;
1390 esac], build_ssh=no)
1392 AM_CONDITIONAL(BUILD_SSH, test x"${build_ssh}" = xyes)
1393 if test x"${build_ssh}" = xyes; then
1394   GNASH_PKG_FIND(ssh, [libssh/libssh.h], [libssh library], ssh_socket_init)
1395 dnl  GNASH_PKG_FIND(poppler, [popt.h], [Poppler library], poppler_init)
1397 if test x"${has_ssh}" = x"yes"; then
1398   AC_DEFINE([USE_SSH], [1], [Use SSH for authentication])
1401 dnl --------------------------------------------------------
1402 dnl  Select SSL support
1403 dnl --------------------------------------------------------
1405 dnl Enable using OpenSSL with libnet.
1406 AC_ARG_ENABLE(ssl,
1407   AC_HELP_STRING([--enable-ssl], [Enable using OpenSSL directly]),
1408 [case "${enableval}" in
1409   yes) build_ssl=yes ;;
1410   no)  build_ssl=no ;;
1411   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssl option]) ;;
1412 esac], build_ssl=no)
1414 with_cert=
1415 with_pem=
1416 AM_CONDITIONAL(BUILD_SSL, test x"${build_ssl}" = xyes)
1417 AC_ARG_WITH(cert,
1418   AC_HELP_STRING([--with-cert],
1419   [cert file for SSL]),
1420   with_cert=${withval})
1421 AC_ARG_WITH(pem,
1422   AC_HELP_STRING([--with-pe],
1423   [pem file for SSL]),
1424   with_pem=${withval})
1426 if test x"${build_ssl}" = xyes; then
1427   GNASH_PKG_FIND(ssl, [openssl/ssl.h], [OpenSSL library], SSL_library_init)
1429 if test x"${has_ssl}" = x"yes"; then
1430   AC_DEFINE([USE_SSL], [1], [Use SSL for authentication])
1433 dnl -----------------------------------------------------------
1434 dnl   Verify dependencies for requested GUIs are met, and
1435 dnl   disable build of the GUIS for which deps are NOT met
1436 dnl ------------------------------------------------------------
1438 dnl Look for scratchbox (used in GNASH_PATH_ALP)
1439 dnl FIXME: move it in macros/alp.m4 or at least after
1440 dnl        the build_alp conditional ?
1441 sbox=no
1442 if test x"${SBOX_REDIRECT_FROM_DIRS}" != x; then
1443   sbox=yes
1445 if test x"${build_alp}" = xyes; then
1446   GNASH_PATH_ALP
1447   if test x"${have_alp}" = x"yes"; then
1448     AC_DEFINE([HAVE_ALP], 1, [Access Linux Platform framework])
1449   fi
1450   dnl @@ It makes NO sense to set cross_compiling here,
1451   dnl @@ *after* it is used in conditionals above
1452   dnl @@ (AM_CONDITIONAL and directories search)
1453   dnl cross_compiling=yes
1454 dnl  build_gtk=yes
1455   build_kde3=no
1456   build_ogl=no
1457   build_gles=no
1458   build_agg=yes
1461 if test x$build_gtk = xyes -o $build_alp = xyes -o x$build_hildon = xyes; then
1462    GNASH_PATH_GTK2
1463    GNASH_PATH_PANGO
1464    GNASH_PKG_FIND(atk, [atk/atk.h], [atk library], atk_focus_tracker_init, [1.0])
1465    if test x"${build_ogl}" = xyes; then
1466       GNASH_PATH_GLEXT
1467    fi
1468    if test x"${build_cairo}" = xyes; then
1469       GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1470    fi
1472 if test x"${build_hildon}" = xyes; then
1473   GNASH_PATH_HILDON
1474   build_gtk=yes
1475   build_kde3=no
1476 dnl   build_ogl=no
1477 dnl   build_agg=yes
1479 dnl TODO: add checks for all other GUIs
1482 dnl -----------------------------------------------------------
1483 dnl Try to ignore stupid dependencies
1484 dnl -----------------------------------------------------------
1486 AC_MSG_CHECKING(linker --as-needed support)
1487 gcc_cv_ld_as_needed=no
1488 # Check if linker supports --as-needed and --no-as-needed options
1489 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1490   gcc_cv_ld_as_needed=yes
1492 if test x"$gcc_cv_ld_as_needed" = xyes; then
1493   LDFLAGS+=" -Wl,--as-needed"
1495 AC_MSG_RESULT($gcc_cv_ld_as_needed)
1497 dnl AC_MSG_CHECKING(linker --no-undefined support)
1498 dnl gcc_cv_ld_undef_needed=no
1499 dnl # Check if linker supports --no-undefined
1500 dnl if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1501 dnl     gcc_cv_ld_undef_needed=yes
1502 dnl fi
1503 dnl if test x"$gcc_cv_ld_undef_needed" = xyes; then
1504 dnl     LDFLAGS=" ${LDFLAGS} -Wl,--no-undefined"
1505 dnl fi
1506 dnl AC_MSG_RESULT($gcc_cv_ld_undef_needed)
1508 AC_DEFINE(USE_GIF, [1], [Use the GIF library])
1509 AC_DEFINE(USE_PNG, [1], [Use the PNG library])
1510 AM_CONDITIONAL(USE_GIF, true)
1511 AM_CONDITIONAL(USE_PNG, true)
1513 dnl GNASH_PKG_FIND(dmalloc, [dmalloc.h], [dmalloc], mallinfo)
1514 AM_CONDITIONAL(HAVE_DMALLOC, [ test x$has_dmalloc = xyes ])
1516 AC_PATH_TOOL([AUTOTRACE], [autotrace])
1517 AC_HEADER_DIRENT
1519 dnl -----------------------------------------------------------------
1520 dnl PLUGIN RELATED STUFF
1521 dnl -----------------------------------------------------------------
1523 dnl Zip is used insted of tar when building an xpi package
1524 dnl for Mozilla/Firefox.
1525 AC_PATH_PROG(ZIP, zip, ,[${pathlist}])
1527 dnl !! This has been moved here to make --enable-npapi work
1528 dnl !! All of plugin-related macro calls could be moved into
1529 dnl !! a specialized macros/plugin.m4
1531 dnl ----------------------------------------------------
1532 dnl Add KPARTS support, if specified or KDE gui is built
1533 dnl ----------------------------------------------------
1535 AC_ARG_ENABLE(kparts3,
1536   AC_HELP_STRING([--disable-kparts3], [Disable support for Konqueror 3.x plugin (default: enabled if kde3 gui is)]),
1537 [case "${enableval}" in
1538   yes) build_kparts3=yes ;;
1539   no)  build_kparts3=no ;;
1540   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts3 option]) ;;
1541 esac],build_kparts3=$build_kde3)
1543 dnl --------------------------------------------------------
1544 dnl Add KPARTS 4.x support, if specified or KDE gui is built
1545 dnl --------------------------------------------------------
1547 AC_ARG_ENABLE(kparts4,
1548   AC_HELP_STRING([--disable-kparts4], [Disble support for Konqueror 4.x plugin (default: enabled if kde4 gui is)]),
1549 [case "${enableval}" in
1550   yes) build_kparts4=yes ;;
1551   no)  build_kparts4=no ;;
1552   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts4 option]) ;;
1553 esac],build_kparts4=$build_kde4)
1555 dnl -----------------------------------------------------------
1556 dnl Add NPAPI support, if specified or GTK or KDE4 gui is built
1557 dnl -----------------------------------------------------------
1559 AC_ARG_ENABLE(npapi,
1560   AC_HELP_STRING([--disable-npapi], [Disable NPAPI plugin build (default: enabled if gtk or kde4 gui is)]),
1561   [case "${enableval}" in
1562     yes) npapi=yes ;;
1563     no)  npapi=no ;;
1564     *)   AC_MSG_ERROR([bad value ${enableval} for disable-npapi option]) ;;
1565   esac],
1566   if test x$build_gtk = xyes -o x$build_kde4 = xyes; then
1567     npapi=yes
1568   fi
1571 dnl -----------------------------------------------------------------
1572 dnl Enable us to disable building all browser plugins in one command.
1573 dnl -----------------------------------------------------------------
1575 AC_ARG_ENABLE(plugins,
1576   AC_HELP_STRING([--disable-plugins], [Disable all browser plugins from building (default=no)]),
1577   [case "${enableval}" in
1578     yes) plugins=yes ;;
1579     no)  plugins=no ;;
1580     *)   AC_MSG_ERROR([bad value ${enableval} for disable-plugins option]) ;;
1581   esac],
1582   plugins=yes
1584 if test x$plugins = xno; then
1585   npapi=no
1586   build_kparts3=no
1587   build_kparts4=no
1591 dnl Set the general plugins install policy here
1593 AC_ARG_WITH(plugins-install,
1594   AC_HELP_STRING([--with-plugins-install=system|user|prefix], [Policy for plugins install. Default: user.]),
1595         [case "${withval}" in
1596           user) PLUGINS_INSTALL_POLICY=user ;;
1597           system) PLUGINS_INSTALL_POLICY=system ;;
1598           prefix) PLUGINS_INSTALL_POLICY=prefix ;;
1599           *)  AC_MSG_ERROR([bad value ${withval} for --with-plugins-install]) ;;
1600          esac 
1601         ], PLUGINS_INSTALL_POLICY=user) 
1604 GNASH_PATH_FIREFOX
1606 dnl -----------------------------------------------------------------
1607 dnl END OF PLUGIN RELATED STUFF
1608 dnl -----------------------------------------------------------------
1610 dnl VA API is used by default for all H.264 videos. HW requirements:
1611 dnl     * AMD GPUs with UVD2 and xvba-video VA driver
1612 dnl     * NVIDIA GPUs with vdpau-video VA driver
1613 dnl     * All HW with a VA driver supporting the VA/GLX extensions or
1614 dnl     vaPutSurface(Pixmap,...). This may include the Intel
1615 dnl     Moorestown platform and future G45 VA driver.
1616 dnl NOTE: it is possible to use Gnash/VAAPI on platforms with an Intel
1617 dnl GMA500 but you currently will have to build the AGG renderer
1618 dnl instead of the OGL (OpenGL) one. 
1620 dnl IRIX-hack.
1621 case $host in
1622   *-*-irix*)
1623   dnl ABI-check
1624   save_LIBS=$LIBS
1625   dir="/usr/lib /usr/lib32 /usr/lib/lib64"
1626   for i in $dir; do
1627     LIBS=-L$i
1628     AC_SEARCH_LIBS(XDisableAccessControl, X11, [
1629       xpathed=$i
1630       break
1631     ])
1632     unset ac_cv_search_XDisableAccessControl
1633   done
1634   ac_x_libraries=$xpathed
1635   x_libraries=$xpathed
1636   LIBS=$save_LIBS
1637   ;;
1638 esac
1640 AM_CONDITIONAL(LIRC, [test x$lirc_ext = xyes])
1642 AC_CHECK_HEADERS(endian.h machine/endian.h)
1643 AC_CHECK_HEADERS(malloc.h malloc/malloc.h)
1644 AC_CHECK_HEADERS(getopt.h)
1645 AC_CHECK_HEADERS(libgen.h)
1646 AC_CHECK_HEADERS(pwd.h)
1647 AC_CHECK_HEADERS(sys/utsname.h)
1648 AC_CHECK_HEADERS(signal.h)
1649 AC_CHECK_HEADERS(unistd.h)
1650 AC_CHECK_HEADERS(sys/time.h)
1651 AC_CHECK_HEADERS(ieeefp.h)
1652 dnl libcurl3-dev on Ubuntu has a dependency on lber, and Gnash won't link
1653 dnl on most machines without it. While it isn't diretly used by Gnash at all,
1654 dnl it's to work around an Ubuntu packaging bug.
1655 AC_CHECK_LIB(lber, ber_free)
1656 AC_CHECK_LIB(bz2, BZ2_bzopen)
1657 AC_CHECK_LIB(c, getpwnam, AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
1659 dnl X11 is needed for fltk (at least),
1660 dnl and probably for many other guis too ...
1661 dnl if ! test x$build_fb = xyes; then # <--- this is wrong as build_x is non-exclusive
1662 dnl AC_PATH_XTRA
1663 dnl AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation)
1664 dnl AC_CHECK_LIB(gmp, _gmp_get_memory_functions)
1665   GNASH_PATH_X11
1666   AC_CHECK_LIB(Xi, XInput_find_display)
1667   AC_CHECK_LIB(X11, XDisableAccessControl)
1668 dnl fi
1669 AM_CONDITIONAL(HAVE_X11, [test x$x11 = xyes])
1670 AC_CHECK_LIB(rt, shm_unlink)
1671 AC_CHECK_FUNCS(shm_open shm_unlink)
1672 AC_TRY_COMPILE([#include <strings.h>], [
1673   char *p1 = (char *)"Hello";
1674   char *p2 = (char *)"World";
1675   strcasecmp(p1, p2); ],
1676   AC_DEFINE(HAVE_STRINGCASECMP, [1], [Has strcasecmp])
1679 dnl if test x$cross_compiling = xno; then
1680 AC_LANG_PUSH(C++)
1681 AC_MSG_CHECKING([to see if float formatting is broken])
1682 AC_RUN_IFELSE([
1683   AC_LANG_PROGRAM([#include <cmath>
1684     void testFloat(double d, double& s)
1685     {
1686         d /= 1000.0;
1687         s = std::fmod(d, 86400.0);
1688     }], [
1689      double d = 3.0935415006117e+23;
1690      double s;
1691      testFloat(d, s);
1692      if (static_cast<int>(s) != 61440) {
1693          return 1;
1694      }])],                         dnl end of LANG_PROGRAM
1695      broken_float=no,              dnl returns 0, works
1696      broken_float=yes,             dnl returns 1, broken
1697      broken_float=no               dnl cross compiling
1698 )                                  dnl end of RUN_IFELSE
1699 AC_LANG_POP(C++)
1700 dnl fi
1702 if test x${broken_float} = xyes; then
1703   AC_MSG_RESULT([yes])
1704   AC_DEFINE(HAVE_BROKEN_FLOAT, [1], [Has broken float support])
1705 else
1706   AC_MSG_RESULT([no])
1708 AM_CONDITIONAL(BROKEN_FLOAT, [ test x$broken_float = xyes ])
1710 dnl See if ipc_perm structure has the ipc_perm.key field, and if so,
1711 dnl which variant of the name is used.
1712 ipc_key=no
1713 AC_TRY_COMPILE([
1714   #include <sys/ipc.h>
1715   #include <sys/shm.h>], [
1716  struct shmid_ds shmseg;      
1717  key_t x = shmseg.shm_perm.key;],
1718  ipc_key=yes
1719  AC_DEFINE(IPC_PERM_KEY, [key], [Has the key field in ipc_perm])
1722 if test x$ipc_key = xno; then
1723   AC_TRY_COMPILE([
1724     #include <sys/ipc.h>
1725     #include <sys/shm.h>], [
1726     struct shmid_ds shmseg;      
1727     key_t x = shmseg.shm_perm.__key;],
1728     AC_DEFINE(IPC_PERM_KEY, [__key], [Has the key field in ipc_perm])
1729     ipc_key=yes
1730   )
1733 dnl AC_CHECK_FUNCS(strcasecmp stricmp)
1734 dnl AC_CHECK_FUNCS(vsnprintf)
1736 AC_CACHE_CHECK([for finite], ac_cv_finite,
1737  [AC_TRY_COMPILE([
1738    #include <math.h>
1739    #ifdef HAVE_IEEEFP_H
1740    #include <ieeefp.h>
1741    #endif],
1742  [double x; int y; y = finite(x);],
1743  ac_cv_finite=yes,
1744  ac_cv_finite=no
1746 if test x"$ac_cv_finite" = x"yes"; then
1747   AC_SEARCH_LIBS(finite, m,
1748     [AC_DEFINE(HAVE_FINITE, [1], [Has finite])]
1749   )
1752 AC_LANG_PUSH(C++)
1753 AC_CACHE_CHECK([for isfinite], ac_cv_isfinite,
1754  [AC_TRY_COMPILE([#include <cmath>],
1755  [using namespace std; double x; int y; y = isfinite(x);],
1756  ac_cv_isfinite=yes,
1757  ac_cv_isfinite=no
1759 AC_LANG_POP(C++)
1760 if test x"$ac_cv_isfinite" = x"yes"; then
1761   dnl Don't give up if isfinite is not found in -lm
1762   dnl isfinite is defined as a macro in C99.
1763   AC_SEARCH_LIBS(isfinite, m)
1764   AC_DEFINE(HAVE_ISFINITE, [1], [Has isfinite])
1767 AC_LANG_PUSH(C++)
1768 AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [
1769   AC_TRY_LINK([#include <cstdio>
1770 ], 
1771     [ std::printf("%s", __PRETTY_FUNCTION__); ], 
1772     [ ac_cv_implements___PRETTY_FUNCTION__="yes" ],
1773     [ ac_cv_implements___PRETTY_FUNCTION__="no" ]
1774   )
1776 if test "x$ac_cv_implements___PRETTY_FUNCTION__" = "xyes" ; then
1777   AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined])
1780 AC_CACHE_CHECK([whether $CXX implements __FUNCTION__], ac_cv_implements___FUNCTION__, [
1781   AC_TRY_LINK([#include <cstdio>
1782 ], 
1783     [ std::printf("%s", __FUNCTION__); ], 
1784     [ ac_cv_implements___FUNCTION__="yes" ],
1785     [ ac_cv_implements___FUNCTION__="no" ]
1786   )
1788 if test "x$ac_cv_implements___FUNCTION__" = "xyes" ; then
1789   AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined])
1792 AC_CACHE_CHECK([whether $CXX implements __func__], ac_cv_implements___func__, [
1793   AC_TRY_LINK([#include <cstdio>
1794 ], 
1795     [ std::printf("%s", __func__); ], 
1796     [ ac_cv_implements___func__="yes" ],
1797     [ ac_cv_implements___func__="no" ]
1798   )
1800 if test "x$ac_cv_implements___func__" = "xyes" ; then
1801   AC_DEFINE(HAVE_func, [1], [__func__ is defined])
1803 AC_LANG_POP(C++)
1804 AC_REPLACE_FUNCS(getopt)
1806 dnl Date portability stuff, used in server/asobj/Date.cpp
1807 AC_CHECK_FUNCS(gettimeofday)
1808 AC_CHECK_FUNCS(ftime)
1809 AC_CHECK_FUNCS(tzset)
1810 AC_CHECK_FUNCS(localtime_r)
1812 AC_CACHE_CHECK([whether struct tm has tm_gmtoff], ac_cv_tm_gmtoff, [
1813         AC_TRY_LINK([
1814 /* ctime(1) says "The glibc version of struct tm has additional fields
1815  * defined  when _BSD_SOURCE was set before including <time.h>"
1816  * In practice, you don't need to define it yourself (tested on glibc-2.2.1 
1817  * and 2.3.6) but if you *do* define it yourself, it makes *all* functions
1818  * favour BSD-like behaviour over of GNU/POSIX, which seems dangerous.
1819  */
1820 // #define _BSD_SOURCE 1
1821 #include <time.h>
1822 ], 
1823                 [ struct tm tm; long l = tm.tm_gmtoff; ], 
1824                 [ ac_cv_tm_gmtoff="yes" ],
1825                 [ ac_cv_tm_gmtoff="no" ]
1826         )
1828 if test "x$ac_cv_tm_gmtoff" = "xyes" ; then
1829         AC_DEFINE(HAVE_TM_GMTOFF, [1], [struct tm has member tm_gmtoff])
1832 AC_CACHE_CHECK([whether timezone is a long], ac_cv_long_timezone, [
1833         AC_TRY_LINK([
1834 /* On Linux/glibc, tzset(3) says "extern long timezone;" (seconds West of GMT)
1835  * but on BSD char *timezone(int,int) is a function returning a string name.
1836  * The BSD function timegm() may be the equivalent, but this should
1837  * not be necessary because on BSD the code should use tm.tm_gmtoff instead
1838  * (use of long timezone is a fallback strategy for when tm_gmtoff exists not).
1839  */
1840 #include <stdio.h>
1841 #include <time.h>
1842 extern long timezone;
1843   ], 
1844     [ printf("%ld", timezone); ], 
1845     [ ac_cv_long_timezone="yes" ],
1846     [ ac_cv_long_timezone="no" ]
1847    )
1849 if test "x$ac_cv_long_timezone" = "xyes" ; then
1850   AC_DEFINE(HAVE_LONG_TIMEZONE, [1], [extern timezone is a long integer, not a function])
1853 AC_CHECK_FUNCS(sysconf)
1854 AC_CHECK_FUNCS(shmget shmat shmdt mmap)
1855 AC_CHECK_FUNCS(memmove)
1856 AC_CHECK_FUNCS(scandir)         dnl supported by BSD and Linux, but you never know...
1857 dnl AC_CHECK_FUNC(strndup, AC_DEFINE(HAVE_STRNDUP, 1, [Has strndup()] ))
1858 AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has clock_gettime()] ))
1859 dnl AC_CHECK_FUNCS(strlcpy, AC_DEFINE(HAVE_STRLCPY_PROTO, [1],[Define if you have the strlcpy prototype]))
1860 dnl AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT_PROTO, [1],[Define if you have the strlcat prototype]))
1861 dnl Look for Win32 networking stuff
1862 AC_CHECK_HEADERS(winsock.h)
1863 AC_CHECK_HEADERS(winsock2.h)
1864 AC_CHECK_FUNCS(socket)
1865 AC_CHECK_FUNCS(CreateFileMappingA)
1867 dnl Shm::resize() uses this if it exists
1868 AC_CHECK_LIB(c, mremap)
1870 GNASH_PKG_FIND(nspr, [nspr.h], [Netscape Portable Runtime (NSPR)], PR_Init)
1872 AC_PATH_TOOL(WINDRES, [windres])
1873 AC_SUBST(WINDRES)
1875 GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress)
1876 GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init)
1877 if test x"${openbsd_os}" = x"yes"; then
1878   GNASH_PKG_FIND(libpng, [png.h], [png images], png_info_init)
1879 else
1880   GNASH_PKG_FIND(png, [png.h], [png images], png_info_init)
1882 GNASH_PKG_FIND(gif, [gif_lib.h], [gif images], DGifOpen)
1883 if test x"${GIF_LIBS}" = x ; then
1884  GNASH_PKG_FIND(ungif, [gif_lib.h], [gif images], DGifOpen)
1885  GIF_LIBS=${UNGIF_LIBS}
1886  GIF_CFLAGS=${UNGIF_CFLAGS}
1888 if test x"$testsuite" = x"yes"; then
1889   GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
1892 GNASH_PKG_FIND(speex, [speex.h], [speex audio codec], speex_decode_int)
1893 AM_CONDITIONAL(HAVE_SPEEX, [ test x$has_speex = xyes ])
1894 if test x$has_speex = xyes ; then
1895   AC_DEFINE([DECODING_SPEEX], [1], [Speex codec available])
1898 GNASH_PKG_FIND(speexdsp, [speex_resampler.h], [speex DSP utilities], speex_resampler_process_int)
1899 if test x$has_speexdsp = xyes ; then
1900   AC_DEFINE([RESAMPLING_SPEEX], [1], [Speex resampler available])
1903 dnl Find freetype and fontconfig
1904 dnl GNASH_PKG_FIND(freetype2, [freetype/freetype.h], [freetype2 font library], FT_Load_Char)
1905 dnl rob might be working on this or not ;)
1906 GNASH_PATH_FREETYPE2
1907 GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch)
1909 if test x$cross_compiling = xno; then
1910   AC_PATH_MING
1912 AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ])
1914 AM_CONDITIONAL(MING_VERSION_0_4,
1915         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040000  ])
1916 AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS,
1917         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040002  ])
1918 AM_CONDITIONAL(MING_SUPPORTS_INIT_ACTIONS,
1919         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040004  ])
1920 AM_CONDITIONAL(MING_SUPPORTS_REPLACE_TAG,
1921         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
1922 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_ADD_CHARACTER,
1923         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
1924 AM_CONDITIONAL(MING_SUPPORTS_STREAMING_SOUND,
1925         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
1926 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_SET_DEPTH,
1927         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
1928 AM_CONDITIONAL(MING_VERSION_0_4_3,
1929         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040300 ])
1931 if test x$cross_compiling = xno; then
1932   AC_ARG_WITH([swfdec_testsuite],
1933           AC_HELP_STRING([--with-swfdec-testsuite],
1934                   [directory where swfdec testsuite (the 'test' dir) is]),
1935         SWFDEC_TESTSUITE=${withval})
1936   AC_SUBST(SWFDEC_TESTSUITE)
1938 AM_CONDITIONAL(ENABLE_SWFDEC_TESTSUITE, [ test x"$SWFDEC_TESTSUITE" != x ])
1940 if test x$cross_compiling = xno; then
1941   AC_ARG_ENABLE([http_testsuite],
1942       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
1943           AC_HELP_STRING([--enable-http-testsuite=<baseurl>],
1944                   [Enable http based testsuite (default url is http://www.gnashdev.org/testcases)]),
1945               [case "${enableval}" in
1946              no) HTTP_TESTSUITE="" ;;
1947             yes) HTTP_TESTSUITE="http://www.gnashdev.org/testcases" ;;
1948               *) HTTP_TESTSUITE="${enableval}";;
1949            esac])
1950   AC_SUBST(HTTP_TESTSUITE)
1952 AM_CONDITIONAL(ENABLE_HTTP_TESTSUITE, [ test x"$HTTP_TESTSUITE" != x ])
1954 if test x$cross_compiling = xno; then
1955   AC_ARG_ENABLE([red5_testing],
1956       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
1957           AC_HELP_STRING([--enable-red5-testing=<host>],
1958                   [Enable red5 based testing (default host is localhost)]),
1959               [case "${enableval}" in
1960              no) RED5_HOST="" ;;
1961             yes) RED5_HOST="localhost" ;;
1962               *) RED5_HOST="${enableval}";;
1963            esac])
1964   AC_SUBST(RED5_HOST)
1966 AM_CONDITIONAL(ENABLE_RED5_TESTING, [ test x"$RED5_HOST" != x ])
1968 dnl The name might differ between systems.
1969 if test x"$testsuite" = x"yes"; then
1970 AC_PATH_PROGS(NETCAT, [nc netcat])
1971 AC_PATH_PROG(WGET, wget)
1973 AM_CONDITIONAL(HAS_NETCAT, [ test x"$NETCAT" != x ])
1974 AM_CONDITIONAL(HAS_WGET, [ test x"$WGET" != x ])
1977 dnl See if we can use the swfmill, mtasc, swfc and haxe based testsuites 
1979 if test x"$testsuite" = x"yes" -a x$cross_compiling = xno; then
1980   AC_PATH_PROG(AS3COMPILE, as3compile)
1981   AC_PATH_PROG(SWFC, swfc)
1982   AC_PATH_SWFMILL
1983   AC_PATH_MTASC
1984   AC_PATH_HAXE
1987 AM_CONDITIONAL(ENABLE_SWFMILL, [ test x"$SWFMILL" != x ])
1988 AM_CONDITIONAL(SWFMILL_AS3_SUPPORT,
1989         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
1991 dnl SWFMILL versions older than 0.3 didn't get function2 flags order correctly
1992 AM_CONDITIONAL(SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT,
1993         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
1995 AM_CONDITIONAL(ENABLE_AS3COMPILE, [ test x"$AS3COMPILE" != x ])
1996 AM_CONDITIONAL(ENABLE_MTASC, [ test x"$MTASC" != x ])
1997 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
1998 AM_CONDITIONAL(ENABLE_SWFC, [ test x"$SWFC" != x ])
1999 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2001 AC_PATH_PROG(DOXYGEN, doxygen)
2002 AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ])
2004 dnl currently unused
2005 dnl GNASH_PKG_FIND(ogg, [ogg.h], [decode ogg streams], ogg_stream_init)
2007 if test x$build_sdl = xyes -o x$build_sound_sdl = xyes; then
2008   GNASH_PATH_SDL
2011 AM_CONDITIONAL(HAVE_SDL, [ test x$has_SDL = xyes ])
2013 GNASH_PATH_QT3
2014 GNASH_PATH_KDE3
2016 GNASH_PATH_QT4
2017 GNASH_PATH_KDE4
2019 dnl Qtopia is a desktop environment for embedded devices.
2020 dnl GNASH_PATH_QTOPIA3
2021 dnl GNASH_PATH_QTOPIA4
2022 has_qtopia3=no
2023 has_qtopia4=no
2026 AM_CONDITIONAL(HAVE_QTOPIA3, [test x$has_qtopia3 = xyes])
2027 AM_CONDITIONAL(HAVE_QTOPIA4, [test x$has_qtopia4 = xyes])
2028 AM_CONDITIONAL(HAVE_KDE3,    [test x$has_kde3 = xyes])
2029 AM_CONDITIONAL(HAVE_KDE4,    [test x$has_kde4 = xyes])
2030 AM_CONDITIONAL(HAVE_QT3,     [test x$has_qt3 = xyes])
2031 AM_CONDITIONAL(HAVE_QT4,     [test x$has_qt4 = xyes])
2033 AM_CONDITIONAL(WITH_KDE4,    [test "$with_kde4" != "no"])
2034 AM_CONDITIONAL([QT_X11],     [test "$platform" = "X11"])
2035 AM_CONDITIONAL([QTOPIA],     [test "$platform" = "Qtopia"])
2036 AM_CONDITIONAL([QT_OSX],     [test "$platform" = "OSX"])
2037 AM_CONDITIONAL([QT_OS9],     [test "$platform" = "OS9"])
2038 AM_CONDITIONAL([QT_WIN32],   [test "$platform" = "Win32"])
2040 dnl Need GLIB for both GTK and GST
2041 if test x"${build_gtk}" = xyes -o x"${media_handler}" = xgst; then
2042   GNASH_PATH_GLIB
2045 AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ])
2047 if test x$npapi = xyes; then
2048   if ! test x$build_gtk = xyes -o x$build_kde4 = xyes; then
2049     AC_MSG_WARN(["Enabled NPAPI plugin, but it's not supported by the selected GUI"])
2050   fi
2053 if test x$windows = xyes -a x$npapi = xyes; then
2054   if test "x$NSPR_CFLAGS" = x -a "x$NSPR_LIBS" = x; then
2055     AC_MSG_ERROR(["On Win32, NPAPI plugin requires NSPR."])
2056   fi
2057   if test "x$WINDRES" = x; then
2058     AC_MSG_ERROR(["On Win32, NPAPI plugin requires windres."])
2059   fi
2062 dnl Need GLIB for NPAPI plugin
2063 if test x$npapi = xyes; then
2064   GNASH_PATH_GLIB
2067 dnl if kde isn't installed, even if it's specified, don't try to build
2068 dnl the KPARTS plugin, which is KDE based.
2069 if test x$has_kde3 = xno -a x$build_kparts3 = xyes; then
2070   build_kparts3=no
2071 dnl  build_kde3=no
2072   AC_MSG_WARN(["Disabling KPARTS 3.x plugin, no KDE development found"])
2075 if test x$build_kde3 = xno -a x$build_kparts3 = xyes; then
2076   AC_MSG_WARN(["Enabled KPARTS 3.x plugin, but you aren't building a KDE based GUI!"])
2078 if test x$has_kde4 = xno -a x$build_kparts4 = xyes; then
2079   build_kparts4=no
2080 dnl  build_kde4=no
2081   AC_MSG_WARN(["Disabling KPARTS 4.x plugin, no KDE 4.x development found"])
2084 if test x$build_kde4 = xno -a x$kparts4 = xyes; then
2085   AC_MSG_WARN(["Enabled KPARTS 4.x plugin, but you aren't building a KDE 4.x based GUI!"])
2088 AM_CONDITIONAL(BUILD_QTOPIA3_GUI,  [ test x$build_qtopia3 = xyes ])
2089 AM_CONDITIONAL(BUILD_QTOPIA4_GUI,  [ test x$build_qtopia4 = xyes ])
2090 AM_CONDITIONAL(BUILD_QT3_GUI,      [ test x$build_qt3 = xyes ])
2091 AM_CONDITIONAL(BUILD_QT4_GUI,      [ test x$build_qt4 = xyes ])
2092 AM_CONDITIONAL(BUILD_KDE3_GUI,     [ test x$build_kde3 = xyes ])
2093 AM_CONDITIONAL(BUILD_KDE4_GUI,     [ test x$build_kde4 = xyes ])
2095 AM_CONDITIONAL(BUILD_ALP_GUI,      [ test x$build_alp = xyes ])
2096 AM_CONDITIONAL(BUILD_HILDON_GUI,   [ test x$build_hildon = xyes ])
2097 AM_CONDITIONAL(BUILD_GTK_GUI,      [ test x$build_gtk = xyes ])
2098 AM_CONDITIONAL(BUILD_FLTK_GUI,     [ test x$build_fltk = xyes ])
2099 AM_CONDITIONAL(BUILD_SDL_GUI,      [ test x$build_sdl = xyes ])
2100 AM_CONDITIONAL(BUILD_FB_GUI,       [ test x$build_fb = xyes ])
2101 AM_CONDITIONAL(BUILD_AQUA_GUI,     [ test x$build_aqua = xyes ])
2102 AM_CONDITIONAL(ALLSTATIC,          [ test x$build_aqua = xyes ]) dnl the Aqua-binary is always static.
2103 AM_CONDITIONAL(BUILD_RISCOS_GUI,   [ test x$build_riscos = xyes ])
2104 AM_CONDITIONAL(BUILD_DUMP_GUI,     [ test x$build_dump = xyes ])
2105 AM_CONDITIONAL(BUILD_AMIGAOS4_GUI, [ test x$build_aos4 = xyes ])
2106 AM_CONDITIONAL(BUILD_HAIKU_GUI,    [ test x$build_haiku = xyes ])
2108 # plugin building flags
2109 AM_CONDITIONAL(NPAPI,   [test x"${npapi}" = xyes])
2110 AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes])
2111 AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes])
2113 GNASH_PKG_FIND(ts, [tslib.h], [Touchscreen library], ts_config)
2115 if test x"${build_gles}" = xyes; then
2116   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2117   GNASH_PATH_GLES
2120 if test x"${build_ogv}" = xyes; then
2121   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2122   GNASH_PKG_FIND(OpenVG, [vg/openvg.h], [OpenVG library], vgDrawImage)
2125 if test x"${build_ogl}" = xyes; then
2126   GNASH_PATH_OPENGL
2129 if test x"${build_gtk}" = xyes; then
2130   AC_ARG_ENABLE(ghelp,
2131     AC_HELP_STRING([--enable-ghelp], [Enable support for the GNOME help system]),
2132     [case "${enableval}" in
2133       yes) ghelp=yes ;;
2134       no)  ghelp=no ;;
2135       *)   AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;;
2136     esac], ghelp=no
2137   )
2139   if test x"${ghelp}" = x"yes" ; then
2140     AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2141     AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2142     AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2144     if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = x ; then
2145       ghelp=no
2146       AC_MSG_WARN([You need to install scrollkeeper for gnome help])
2147     fi
2148   fi
2150 AM_CONDITIONAL(GHELP, [test x${ghelp} = xyes])
2152 if test x${build_fltk} = xyes; then
2153   GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender)
2156 dnl Some systems have a pervered set of dependencies.
2157 dnl Fedora Core 6 appears to have a dependency on expat for fontconfig.
2158 dnl We only need the library, but this is the easy wind to find it.
2159 GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString)
2161 dnl these conditionals were moved out of kde.m4
2162 AM_CONDITIONAL(HAS_KDE3, [test x$has_kde3 = xyes])
2163 # used to disable x11-specific stuff on special platforms
2164 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
2165 AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
2166 AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
2168 AM_CONDITIONAL(HAVE_GTK2, [ test x$has_gtk2 = xyes ])
2169 AM_CONDITIONAL(HAVE_GLEXT, [test x$glext = xyes])
2171 dnl We don't have GTKGLExt, so default to SDL, and don't build the Firefox plugin
2172 if test x$glext = xno -a x$build_ogl = xyes; then
2173   if test x$gtk2 = xyes -a x$build_gtk = xyes; then
2174     AC_ERROR([You have GTK installed, but not GtkGLExt. You need GtkGLExt to use the OpenGL renderer. Attempting to build SDL version])
2175   fi
2176   gui=sdl
2177   npapi=no
2178   AC_MSG_WARN([GTK2 specified for the GUI, but GtkGlExt is not present. Trying SDL instead.])
2181 missing_codecs=""
2182 if test "$media_handler" = "gst"; then
2183   AC_PATH_PROG(GST_INSPECT, gst-inspect, ,[${pathlist}])
2184   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2185     AC_PATH_PROG(GST_INSPECT, gst-inspect-0.10, ,[${pathlist}])
2186   fi
2187   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2188     dnl FIXME: there may be multiple acceptable plugins that are acceptable for
2189     dnl our use. For example, mad or ffmpeg will play mp3.
2190     codecs="ffdec_flv ffdec_flashsv ffdec_vp6f ffdec_flashsv mad vorbisdec ffdec_vp6"
2191     for i in $codecs; do
2192        hits="`$GST_INSPECT $i | grep -c 'Long name'`"
2193        if test $hits -eq 0; then
2194          missing_codecs="$missing_codecs $i"
2195          AC_MSG_WARN([Missing codec: $i])
2196        fi
2197     done
2198   fi
2199   GNASH_PKG_FIND(gstreamer_plugins_base, [gst/interfaces/probeprobe.h], [gstreamer interfaces library], gst_property_probe_probe_and_get_values_name, [0.10])
2200   GNASH_PKG_FIND(gstreamer_app, [gst/app/gstappsink.h], [gstreamer app library], call_gmon_start, [0.10])
2201   GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, [0.10])
2202   dnl if cross compiling, we're usually not going to be able to pop up
2203   dnl the codec installer to download the package to install, so disable
2204   dnl it if cross compiling with gstreamer support.
2205   if test x$cross_compiling = xno; then
2206     GNASH_PKG_FIND(gstpbutils, [gst/pbutils/install-plugins.h], [gstreamer PB Utils library], gst_install_plugins_supported, [0.10])
2207   fi
2208   dnl when cross compiling Gstreamer, not all supplied SDKs include all the
2209   dnl development libraries since most devices don't need to support plugin
2210   dnl development, only the runtime. In these caes we often have the header
2211   dnl files but not the libraries.
2212   if test x"${has_gstreamer_plugins_base}" = xyes; then
2213     GSTREAMER_LIBS="-lgstinterfaces-0.10 $GSTREAMER_LIBS"
2214     AC_DEFINE(HAS_GSTREAMER_PLUGINS_BASE, [1], "Has the Gstreamer Plugin Dev package installed.")
2215   fi
2216   if test x"${media_handler_specified}" = xfalse; then
2217     if test x"$GSTREAMER_LIBS" = x; then
2218        AC_MSG_WARN([No appropriate gstreamer library found, will try using ffmpeg.])
2219        media_handler=ffmpeg
2220     fi
2221   fi
2224 if test x"$media_handler" = x"ffmpeg"; then
2225   GNASH_PATH_FFMPEG
2226   if test x"${media_handler_specified}" = xfalse; then
2227      # If the library is not found, or its version is not ok, we'll try gst
2228      if test x"${ac_cv_path_ffmpeg_lib}" = x -o x"${ffmpeg_version_check}" != xok; then
2229        AC_MSG_WARN([No appropriate ffmpeg library found, disabling media handling.])
2230        media_handler=none
2231      fi
2232   fi
2235 if test x$build_cairo = xyes; then
2236     GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
2237 dnl   if test x"${CAIRO_CFLAGS}" != x; then
2238 dnl      CAIRO_CFLAGS=`echo ${CAIRO_CFLAGS} | sed -e 's/ *//'`
2239 dnl      CAIRO_CFLAGS="${CAIRO_CFLAGS} ${CAIRO_CFLAGS}/cairo"
2240 dnl   fi
2241 dnl  if test x$build_fb = xyes; then
2242 dnl    AC_MSG_ERROR([Cairo renderer is not supported by FB gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2243 dnl  fi
2244 dnl   if test x$build_sdl = xyes; then
2245 dnl     AC_MSG_ERROR([Cairo renderer is not supported by SDL gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2246 dnl   fi
2247 dnl  if test x$build_fltk = xyes; then
2248 dnl    AC_MSG_ERROR([Cairo renderer is not supported by FLTK gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2249 dnl  fi
2250 dnl  if test x$build_kde3 = xyes; then
2251 dnl    AC_MSG_ERROR([Cairo renderer is not supported by KDE gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2252 dnl  fi
2253 dnl  if test x"${build_dump}" = xyes -o x"${build_haiku}" = xyes; then
2254 dnl    AC_MSG_ERROR([Cairo renderer is not supported by this gui. Use --enable-renderer=AGG or --enable-gui=gtk]);
2255 dnl  fi
2256   AC_DEFINE([RENDERER_CAIRO], [], [Use cairo renderer])
2259 AM_CONDITIONAL(HAVE_CAIRO, [true])
2260 dnl AM_CONDITIONAL(HAVE_CAIRO, [test x"${has_cairo}" = xyes])
2261 AM_CONDITIONAL(HAVE_OPENGL, [true])
2262 dnl AM_CONDITIONAL(HAVE_OPENGL, test x"${has_opengl}" = xyes)
2264 AM_CONDITIONAL(USE_SOUND_SDL, test x$build_sound_sdl = xyes)
2265 AM_CONDITIONAL(USE_SOUND_AHI, test x$build_sound_ahi = xyes)
2266 AM_CONDITIONAL(USE_SOUND_MKIT, test x$build_sound_mkit = xyes)
2267 AM_CONDITIONAL(USE_FFMPEG_ENGINE, test x"$media_handler" = xffmpeg)
2268 AM_CONDITIONAL(USE_GST_ENGINE, test x"$media_handler" = xgst)
2269 AM_CONDITIONAL(HAVE_OPENGL, test x"${OPENGL_LIBS}" != x)
2270 dnl for now the Haiku media handler is experimental
2271 AM_CONDITIONAL(USE_HAIKU_ENGINE, test x"$media_handler" = xno)
2273 if test x$build_sound_mkit = xyes; then
2274   if test x"${haiku}" != xyes; then
2275     AC_MSG_ERROR([Media Kit sound handling is supported only under Haiku]);
2276   else
2277     AC_DEFINE([SOUND_MKIT],  [1], [Use Haiku's Media Kit for sound handling])
2278   fi
2281 if test x"${build_sound_sdl}" = xyes; then
2282   AC_DEFINE([SOUND_SDL],  [1], [Use SDL for sound handling])
2285 if test x"${build_sound_ahi}" = xyes; then
2286   if test x"$amigaos4" != xyes; then
2287     AC_MSG_ERROR([AHI sound handling is supported only under AmigaOS]);
2288   else
2289     AC_DEFINE([SOUND_AHI],  [1], [Use AmigaOS AHI for sound handling])
2290   fi
2293 case "${media_handler}" in
2294   ffmpeg)  AC_DEFINE([USE_FFMPEG],  [1], [Use FFMPEG for media decoding]) ;;
2295   gst)  AC_DEFINE([USE_GST],  [1], [Use gstreamer for media decoding]) ;;
2296   *)
2297 esac
2298 dnl I'm kinda lazy, get rid of this later... //Markus
2299 AM_CONDITIONAL(HAVE_GST, test x$media_handler = xgst)
2301 if test x$build_fltk = xyes; then
2302   GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush)
2305 AM_CONDITIONAL(HAVE_FLTK2, [ test x$has_fltk2 = xyes ])
2306 AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ])
2308 if test x"${build_agg}" = xyes; then
2309    GNASH_PATH_AGG
2312 build_xv=yes
2313 build_vaapi=yes
2314 hwaccel_list="VAAPI XVideo"
2315 nhwaccel=2
2316 AC_ARG_ENABLE(hwaccel,
2317   AC_HELP_STRING([--enable-hwaccel], [Specify which accleration to support to enable (none,vaapi,omap)]),
2318   if test -z ${enableval}; then
2319       hwaccel_list="none"
2320       nhwaccel=1
2321       enableval=""
2322   fi
2323   while test -n "${enableval}" ; do
2324     val=`echo ${enableval} | cut -d ' ' -f 1`
2325     [case "${val}" in
2326       no*|NO*)
2327         hwaccel_list="none"
2328         build_vaapi=no
2329         build_omap=no
2330         dnl build_xv=no
2331         nhwaccel=0
2332         ;;
2333       va*|VA*)
2334         hwaccel_list="${hwaccel_list} vaapi"
2335         build_vaapi=yes
2336         nhwaccel=$((nhwaccel+1))
2337         ;;
2338       xv*|XV*|Xv*)
2339         hwaccel_list="${hwaccel_list} XVideo"
2340         dnl build_xv=yes
2341         nhwaccel=$((nhwaccel+1))
2342         ;;
2343       all|ALL)
2344         hwaccel_list="XVideo VAAPI OMAP"
2345         nhwaccel=3
2346         build_omap=yes
2347         build_vaapi=yes
2348         dnl build_xv=yes
2349         ;;
2350       omap*|OMAP*)
2351         hwaccel_list="${hwaccel_list} omap"
2352         build_omap=yes
2353         nhwaccel=$((nhwaccel+1))
2354         ;;
2355       *) AC_MSG_ERROR([invalid hwaccel feature specified: ${enableval} given (accept: none,vaapi,omap)])
2356         ;;
2357       esac]
2358     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
2359     if test "x$val" = "x$enableval"; then
2360       break;
2361     fi
2362   done
2365 dnl Until the hwaccel patches in ffmpeg wind up in the ffmpeg-plugin,
2366 dnl restrict using HW Accel to using ffmpeg directly.
2367 if test x"${media_handler}" = x"gst" -a x"${build_vaapi}" = x"yes" -a x"${have_ffmpeg_vaapi}" = x"yes"; then
2368   AC_MSG_ERROR(["Hardware acceleration currently not supported unless using ffmpeg."])
2371 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi}" = x"yes"; then
2372   use_libva=no
2373   use_libva_x11=no
2374   use_libva_glx=no
2375   dnl if the version of ffmpeg is recent enough, (r20957, 52.45.0), then
2376   dnl look for VAAPI support so we can use use the VAAPI enabled ffmpeg.
2377   if test x"${have_ffmpeg_vaapi}" = xyes; then
2378     use_libva=yes
2379     GNASH_PKG_FIND([libva],
2380       [va/va.h],
2381       [Video Acceleration API],
2382       vaInitialize
2383     )
2385     use_libva_x11=yes
2386     GNASH_PKG_FIND([libva_x11],
2387       [va/va_x11.h],
2388       [VA API (X11 display)],
2389       vaGetDisplay,
2390       [], [-lva-x11]
2391     )
2393     if test x$build_ogl = xyes; then
2394       use_libva_glx=yes
2395       GNASH_PKG_FIND([libva_glx],
2396         [va/va_glx.h],
2397         [VA API (GLX display)],
2398         vaGetDisplayGLX,
2399         [], [-lva-glx]
2400       )
2401     fi
2402   fi
2405 dnl libVA drivers. We declare conditional for both the option being
2406 dnl selected, as well as whether or not it's found. This we can
2407 dnl generate better error handling if it's not found.
2408 AM_CONDITIONAL(BUILD_OMAP, test x"${build_omap}" = xyes)
2409 AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
2411 dnl Only build the vaapi support if we have a version of ffmpeg that
2412 dnl supports it.
2413 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${found_libva_incl}" = xyes; then
2414   build_vaapi=yes
2415   hwaccel_list="VAAPI XVideo"
2416   nhwaccel=2
2417 else
2418   build_vaapi=no
2419   hwaccel_list="XVideo"
2420   nhwaccel=1
2423 AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes)
2424 AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes)
2425 AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes)
2427 GNASH_DOCBOOK
2428 AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x)
2429 AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes)
2430 AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_TEXI" != x -o x"$DB2X_TEXIXML" != x ])
2431 AM_CONDITIONAL(ENABLE_PDF, [ test x"$DB2X_PDF" ])
2432 AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2433 AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x -a x"$docbook_styles" != x ])
2434 AM_CONDITIONAL(ENABLE_XMLTEX, [ test x"$PDFXMLTEX" != x -a x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2435 dnl  AM_CONDITIONAL(ENABLE_DBLATEX, [ test x"$DBLATEX" != x ])
2436 AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_MAN" != x -o x"$DB2X_MANXML" != x ])
2437 AM_CONDITIONAL(HAVE_AGG, [test x"${AGG_LIBS}" != x])
2439 GNASH_PATH_CURL
2441 dnl Define winsock if we're on windows. We could do something complicated,
2442 dnl but since AC_EXEEXT does it for us, we'll do this the easy way.
2443 if test x"$EXEEXT" = "exe"; then
2444   AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32])
2447 dnl ****************************************
2448 dnl *** Check for ELF visibility support ***
2449 dnl ****************************************
2451 AC_ARG_ENABLE([visibility],
2452   AC_HELP_STRING([--enable-visibility], [Use ELF visibility attributes]), [], [enable_visibility=no])
2454 if test x"$enable_visibility" != x"no"; then
2455   dnl Check whether the compiler supports the visibility attribute
2456   save_CFLAGS="$CFLAGS"
2457   CFLAGS="$CFLAGS -Wall -Werror"
2458   AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
2459   AC_COMPILE_IFELSE(AC_LANG_SOURCE(
2460     [
2461       void __attribute__ ((visibility("default"))) test_default (void) {}
2462       void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
2463       int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
2464     ]),
2465     [
2466       AC_DEFINE([HAVE_GNUC_VISIBILITY], [1], [Define this for GCC-visibility.])
2467       AC_MSG_RESULT([yes])
2468     ],
2469     [
2470       AC_MSG_RESULT([no])
2471     ]
2472   )
2473   CFLAGS="$save_CFLAGS"
2476 AC_ARG_ENABLE([pch],
2477   AC_HELP_STRING([--enable-pch], [Enable precompiled header support]), [], [enable_pch=no])
2479 AM_CONDITIONAL([ENABLE_PCH], [test x"$enable_pch" != x"no"])
2481 PCH_FLAGS="-include all-includes.h -Winvalid-pch"
2482 AC_SUBST(PCH_FLAGS)
2484 GNASH_PATH_PTHREADS
2486 GNASH_PATH_BOOST
2487 dnl AX_GCC_ARCHFLAG(no)
2489 AC_ARG_ENABLE([strict],
2490   AC_HELP_STRING([--enable-strict],[Accept only standards compliant code (GCC only)]),
2491   [case "${enableval}" in
2492     yes) strict=yes ;;
2493     no) strict=no ;;
2494     *) AC_MSG_ERROR([bad value ${enableval} for --enable-strict option]) ;;
2495   esac],
2496   [strict=no]
2499 if test x"$strict" = x"yes" -a x$build_agg = xyes; then
2500    AC_MSG_ERROR([agg renderer will fail with --enable-strict.]);        
2503 # We want warnings, lots of warnings  :-)
2504 # It should be possible to build with -ansi, not with
2505 # -pedantic because of agg.
2507 # -ansi was actually dropped because it hides 'fileno', which
2508 # is used in a few places
2510 if test x"$GCC" = x"yes"; then
2511   CXXFLAGS="$CXXFLAGS \
2512     $CROSS_CXXFLAGS \
2513     -W \
2514     -Wall \
2515     -Wcast-align \
2516     -Wcast-qual \
2517     -Wpointer-arith \
2518     -Wreturn-type \
2519     -Wnon-virtual-dtor \
2520     -Wunused \
2521     "
2522   CFLAGS="$CFLAGS \
2523     $CROSS_CXXFLAGS \
2524     -W \
2525     -Wall \
2526     -Wcast-align \
2527     -Wcast-qual \
2528     -Wpointer-arith \
2529     -Wreturn-type \
2530     -Wmissing-declarations \
2531     -Wmissing-prototypes \
2532     -Wstrict-prototypes \
2533     "
2534   if test x"$strict" = x"yes"; then
2535     CXXFLAGS="$CXXFLAGS \
2536       -Wextra \   
2537       -pedantic \
2538       -Wno-long-long \
2539       "
2541     CFLAGS="$CFLAGS \
2542       -pedantic \
2543       -Wno-long-long \
2544       -ansi \
2545       "
2546   fi
2549 AC_ARG_ENABLE([cassert],
2550   AC_HELP_STRING([--disable-cassert],[Disable assertion checking]),
2551   [case "${enableval}" in
2552     yes) cassert=yes ;;
2553     no) cassert=no ;;
2554     *) AC_MSG_ERROR([bad value ${enableval} for --enable-cassert option]) ;;
2555   esac],
2556   [cassert=yes]
2559 if test x"$cassert" = x"no"; then
2560     CXXFLAGS="$CXXFLAGS \
2561       -DNDEBUG \
2562       "
2563     CFLAGS="$CFLAGS \
2564       -DNDEBUG \
2565       "
2568 dnl /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
2569 AC_DEFUN([CHECK_VISIBILITY_GCC_BUG],
2570   [
2571     AC_CACHE_CHECK([if -fvisibility-inlines-hidden is broken], ac_cv_gcc_visibility_bug, [
2572         AC_LANG_PUSH(C++)
2573         save_CXXFLAGS=$CXXFLAGS
2574         save_LDFLAGS=$LDFLAGS
2575         CXXFLAGS="-fPIC -fvisibility-inlines-hidden -O0"
2576         LDFLAGS="$LDFLAGS -shared -fPIC"
2578         AC_TRY_LINK(
2579         [          
2580           template<typename CharT>
2581           struct VisTest
2582           {
2583             inline VisTest ();
2584           };
2585           template<typename CharT>
2586           inline VisTest<CharT>::VisTest()
2587         {}
2588         extern template class VisTest<char>;  // It works if we drop that line
2589         int some_function( int do_something ) __attribute__((visibility("default")));
2590         int some_function( int )
2591           {
2592             VisTest<char> a;
2593             return 0;
2594           }
2595         ], [],
2596         ac_cv_gcc_visibility_bug=no, ac_cv_gcc_visibility_bug=yes)
2598         CXXFLAGS=$save_CXXFLAGS
2599         LDFLAGS=$save_LDFLAGS
2600         AC_LANG_POP(C++)
2601       ]
2602     )
2603     if test x$ac_cv_gcc_visibility_bug = xno; then
2604       CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
2605     fi
2606   ]
2609 CHECK_VISIBILITY_GCC_BUG
2612 if test x$ac_cv_gcc_visibility_bug = xno; then
2613   AC_LANG_PUSH(C++)
2614   AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
2615   save_CXXFLAGS=$CXXFLAGS
2616   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2617   AC_LINK_IFELSE([AC_LANG_PROGRAM()], 
2618                  [ac_cv_gcc_visibility=yes;
2619                   AC_MSG_RESULT([yes])],
2620                  [ac_cv_gcc_visibility=no;
2621                   AC_MSG_RESULT([no])]);
2622   CXXFLAGS="$save_CXXFLAGS"
2623   AC_LANG_POP(C++)
2627 AM_CONDITIONAL(VISIBILITY_WORKS, test x"$ac_cv_gcc_visibility" = xyes)
2629 if test x"$ac_cv_gcc_visibility" = xyes -a x"$enable_visibility" != xno; then
2630   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2633 dnl Define convienience constants so Gnash can print out the
2634 dnl default configuration of the build.
2635 RENDERER_CONFIG="${renderer_list}"
2636 RENDERER_LIBS=
2637 for rend in `echo "${add_renderer}" | tr ',' ' '`; do
2638         RENDERER_LIBS="${RENDERER_LIBS} \$(top_builddir)/librender/libgnash${rend}.la"
2639 done
2640 dnl echo "RENDERER_LIBS=$RENDERER_LIBS"
2641 AC_SUBST(RENDERER_LIBS)
2642 AC_SUBST(RENDERER_CONFIG)
2644 HWACCEL_CONFIG="${hwaccel_list}"
2645 AC_SUBST(HWACCEL_CONFIG)
2647 dnl check for missing libraries and disable them.
2648 if test x"$BOOST_LIBS" != x; then
2649   if test x"${extra_missing_libs}" != x; then
2650     for i in ${extra_missing_libs}; do
2651       if test $i = serialization; then
2652         AC_DEFINE([BOOST_MULTI_INDEX_DISABLE_SERIALIZATION], ["1"], [if the library is missing, don't use it.])
2653       fi
2654     done
2655   fi
2658 CYGNAL_PATHS
2660 SUPPORTED_GUIS=
2661 if test x$build_qtopia3 = xyes; then
2662   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia3"
2664 if test x$build_qtopia4 = xyes; then
2665   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia4"
2667 if test x$build_hildon = xyes; then
2668   SUPPORTED_GUIS="${SUPPORTED_GUIS},hildon"
2670 if test x$build_alp = xyes; then
2671   SUPPORTED_GUIS="${SUPPORTED_GUIS},alp"
2673 if test x$build_fb = xyes; then
2674   SUPPORTED_GUIS="${SUPPORTED_GUIS},fb"
2676 if test x$build_fltk = xyes; then
2677   SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk"
2679 if test x$build_qt3 = xyes; then
2680   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt3"
2682 if test x$build_qt4 = xyes; then
2683   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt4"
2685 if test x$build_kde3 = xyes; then
2686   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde3"
2688 if test x$build_kde4 = xyes; then
2689   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde4"
2691 if test x$build_gtk = xyes; then
2692   SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk"
2694 if test x$build_sdl = xyes; then
2695   SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl"
2697 if test x$build_riscos = xyes; then
2698   SUPPORTED_GUIS="${SUPPORTED_GUIS},riscos"
2700 if test x$build_aqua = xyes; then
2701   SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua"
2703 if test x$build_dump = xyes; then
2704   SUPPORTED_GUIS="${SUPPORTED_GUIS},dump"
2706 if test x$build_aos4 = xyes; then
2707   SUPPORTED_GUIS="${SUPPORTED_GUIS},aos4"
2709 if test x$build_haiku = xyes; then
2710   SUPPORTED_GUIS="${SUPPORTED_GUIS},haiku"
2712 SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
2713 AC_SUBST(SUPPORTED_GUIS)
2715 MEDIA_CONFIG=${media_handler}
2716 AC_SUBST(MEDIA_CONFIG)
2718 dnl AC_CONFIG_LINKS(doc/C/images)
2719 dnl AC_CONFIG_LINKS(gnashconfig.h,libltdl/config.h)
2720 AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
2721 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in)
2722 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in)
2724 AC_CONFIG_FILES(gnash.pc:gnash.pc.in)
2726 AC_OUTPUT(Makefile
2727 po/Makefile
2728 libltdl/Makefile
2729 libmedia/Makefile
2730 libsound/Makefile
2731 libbase/Makefile
2732 libcore/Makefile
2733 libcore/vm/Makefile
2734 libcore/parser/Makefile
2735 libvaapi/Makefile
2736 librender/Makefile
2737 utilities/Makefile
2738 doc/Makefile
2739 doc/C/Makefile
2740 doc/Doxyfile
2741 testsuite/Makefile
2742 testsuite/media/Makefile
2743 testsuite/libbase.all/Makefile
2744 testsuite/as3compile.all/Makefile
2745 testsuite/actionscript.all/Makefile
2746 testsuite/samples/Makefile
2747 testsuite/swfdec/Makefile
2748 testsuite/misc-ming.all/Makefile
2749 testsuite/misc-mtasc.all/Makefile
2750 testsuite/misc-haxe.all/Makefile
2751 testsuite/misc-haxe.all/classes.all/Makefile
2752 testsuite/misc-swfmill.all/Makefile
2753 testsuite/misc-swfmill.all/trace-as2/Makefile
2754 testsuite/misc-swfmill.all/trace-as3/Makefile
2755 testsuite/misc-swfc.all/Makefile
2756 testsuite/network.all/Makefile
2757 testsuite/movies.all/Makefile
2758 testsuite/libcore.all/Makefile
2759 testsuite/libmedia.all/Makefile
2760 gui/Makefile
2761 gui/Info.plist
2762 gui/pythonmod/Makefile
2763 extensions/Makefile
2764 extensions/dejagnu/Makefile
2765 extensions/mysql/Makefile
2766 extensions/fileio/Makefile
2767 extensions/gtk2/Makefile
2768 extensions/lirc/Makefile
2769 extensions/dbus/Makefile
2770 plugin/Makefile
2771 plugin/npapi/Makefile
2772 plugin/klash/Makefile
2773 plugin/klash4/Makefile
2774 plugin/win32/Makefile
2775 cygnal/Makefile
2776 cygnal/libnet/Makefile
2777 cygnal/libamf/Makefile
2778 cygnal/cgi-bin/Makefile
2779 cygnal/cgi-bin/echo/Makefile
2780 cygnal/cgi-bin/oflaDemo/Makefile
2781 cygnal/cgi-bin/fitcDemo/Makefile
2782 cygnal/testsuite/Makefile
2783 cygnal/testsuite/libamf.all/Makefile
2784 cygnal/testsuite/libnet.all/Makefile
2785 cygnal/testsuite/cygnal.all/Makefile
2789 ########################## Final report begins... ############################
2792 cerr=/tmp/gnash-configure-errors.$$
2793 cwarn=/tmp/gnash-configure-warnings.$$
2794 echo ""
2796 #trap 'rm cerr' 0 # trap isn't a good idea, might override other traps
2797 exec 3> $cerr 
2798 exec 4> $cwarn
2800 echo "Configurable options are:"
2802 if test x"${i810lodbias}" = x"yes"; then
2803   echo "        Intel 810 LOD bias hack enabled"
2804 else
2805   echo "        Intel 810 LOD bias hack disabled (default). Use --enable-i810-lod-bias to enable."
2808 if test x"${pthreads}" = x"yes"; then
2809   echo "        POSIX Threads support enabled (default)"
2810 else
2811   if test x"${build_haiku}" = x"yes"; then
2812      echo "        POSIX Thread support built into C library."
2813   els
2814      echo "        POSIX Thread support disabled."
2815   fi
2818 if test x"${dmalloc}" = x"yes"; then
2819   echo "        DMalloc support enabled"
2820   echo "        For a list of the command-line options enter: dmalloc --usage"
2821 else
2822   echo "        DMalloc support disabled (default). Use --enable-dmalloc to enable."
2825 if test x"${npapi}" = x"yes"; then
2826   echo "        NPAPI plugin enabled (default). Use --disable-npapi to disable."
2827   echo "            NPAPI plugin will be installed in ${FIREFOX_PLUGINS}"
2828 else
2829   echo "        NPAPI plugin disabled."
2832 if test x"${build_kparts3}" = x"yes"; then
2833   echo "        KPARTS 3.x plugin enabled (default). Use --disable-kparts3 to disable"
2834   echo "            KPARTS 3.x plugin will be installed in ${KDE3_PLUGINDIR}"
2835   echo "            KPARTS 3.x service will be installed in ${KDE3_SERVICESDIR}"
2836   echo "            KPARTS 3.x config dir will be in ${KDE3_CONFIGDIR}"
2837   echo "            KPARTS 3.x appsdata will be installed in ${KDE3_APPSDATADIR}"
2838 else
2839   echo "        KPARTS 3.x plugin disabled."
2842 if test x"${build_kparts4}" = x"yes"; then
2843   echo "        KPARTS 4.x plugin enabled (default). Use --disable-kparts4 to disable"
2844   echo "            KPARTS 4.x plugin will be installed in ${KDE4_PLUGINDIR}"
2845   echo "            KPARTS 4.x service will be installed in ${KDE4_SERVICESDIR}"
2846   echo "            KPARTS 4.x config dir will be in ${KDE4_CONFIGDIR}"
2847   echo "            KPARTS 4.x appsdata will be installed in ${KDE4_APPSDATADIR}"
2848 else
2849   echo "        KPARTS 4.x plugin disabled."
2852 dnl -- if test x"${dynamic_gui}" = x"yes"; then
2853 dnl --   echo "        Loadable GUI & renderer enabled."
2854 dnl -- else
2855 dnl --   echo "        Loadable GUI & renderer disabled (default). Use --enable-dynamic-gui to enable."
2856 dnl -- fi
2858 # set a variable if we shouldn't continue. This way we can print
2859 # out everything that is missing in one pass, hopefully making it
2860 # easy for new developers to get everything they need installed.
2862 echo "Configured paths for ${build} are:"
2864 dnl Dump QT3 options is the user specified a QT3 or KDE3 GUI
2865 if test x"${build_qt3}" = xyes; then
2866   if test x"${has_qt3}" = xyes; then
2867     echo "        QT3 flags are: ${QT3_CFLAGS}"
2868     echo "        QT3 libs are: ${QT3_LIBS}"
2869   else
2870     echo "        ERROR: No QT 3.x development package installed!" >&3
2871     echo "               Install a QT 3.x development environment from http://trolltech.com" >&3
2872     echo "               or .deb users: apt-get install libqt3-mt-dev" >&3
2873     if test x$build_kde3 = xyes; then
2874       echo "               or change to a different gui with --enable-gui=..." >&3
2875     fi
2876   fi
2879 if test x"${build_qt4}" = xyes; then
2880   if test x"${has_qt4}" = xyes; then
2881     echo "        QT4 flags are: ${QT4_CFLAGS}"
2882     echo "        QT4 libs are: ${QT4_LIBS}"
2883   else
2884     echo "        ERROR: No QT 4.x development package installed!" >&3
2885     echo "               Install a QT 4.x development environment from http://trolltech.com" >&3
2886     echo "               or .deb users: apt-get install qt4-dev-tools" >&3
2887     if test x$build_kde4 = xyes; then
2888       echo "               or change to a different gui with --enable-gui=..." >&3
2889     fi
2890   fi
2893 if test x"$build_qtopia3" = xyes; then
2894   if test x"${QTOPIA3_LIBS}" != x ; then
2895     if test x"${QTOPIA3_CFLAGS}" != x ; then
2896       echo "        QTOPIA 3.x flags are: $QTOPIA3_CFLAGS"
2897     else
2898       echo "        QTOPIA 3.x flags are: default include path"
2899     fi
2900     echo "        QTOPIA 3.x libs are: $QTOPIA3_LIBS"
2901   else
2902     echo "        ERROR: No QTOPIA 3.x library development package installed!" >&3
2903     echo "               Install it from http://trolltech.com/downloads/" >&3
2904     echo "               binary packages are not available." >&3
2905   fi
2908 if test x"$build_qtopia4" = xyes; then
2909   if test x"${QTOPIA4_LIBS}" != x ; then
2910     if test x"${QTOPIA4_CFLAGS}" != x ; then
2911       echo "        QTOPIA 4.x flags are: $QTOPIA4_CFLAGS"
2912     else
2913       echo "        QTOPIA 4.x flags are: default include path"
2914     fi
2915     echo "        QTOPIA 4.x libs are: $QTOPIA4_LIBS"
2916   else
2917     echo "        ERROR: No QTOPIA 4.x library development package installed!" >&3
2918     echo "               Install it from http://trolltech.com/downloads/" >&3
2919     echo "               binary packages are not available." >&3
2920   fi
2924 # -o x$build_kparts3 = xyes
2925 if test x$build_kde3 = xyes; then
2926   if test x"$has_kde3" = xyes; then
2927     echo "        KDE 3.x flags are: $KDE3_CFLAGS"
2928     echo "        KDE 3.x libs are: $KDE3_LIBS"
2929   else
2930       echo "        ERROR: No KDE 3.x development package installed!" >&3
2931       echo "               To disable the KDE 3.x gui," >&3
2932       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
2933       echo "               and omit "kde" from the list." >&3
2934       echo "               When the option --enable-gui=... is omitted," >&3
2935       echo "               the default is the same of --enable-gui=kde,gtk" >&3
2936       echo "               To be able to build the kde 3.x gui," >&3
2937       echo "               install version 3.x of the KDE development environment from http://kde.org" >&3
2938       echo "               or .deb users: apt-get install kdelibs4-dev" >&3
2939       echo "               or .rpm users: yum install kdelibs3-devel." >&3
2940   fi
2943 # -o x$build_kparts4 = xyes
2944 if test x$build_kde4 = xyes; then
2945   if test x"$has_kde4" = xyes; then
2946     echo "        KDE 4.x flags are: $KDE4_CFLAGS"
2947     echo "        KDE 4.x libs are: $KDE4_LIBS"
2948   else
2949       echo "        ERROR: No KDE 4.x development package installed!" >&3
2950       echo "               To disable the KDE 4.x gui," >&3
2951       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
2952       echo "               and omit "kde" from the list." >&3
2953       echo "               When the option --enable-gui=... is omitted," >&3
2954       echo "               the default is the same of --enable-gui=kde,gtk" >&3
2955       echo "               To be able to build the kde 4.x gui," >&3
2956       echo "               install version 4.x of the KDE development environment from http://kde.org" >&3
2957       echo "               or .deb users: apt-get install kdelibs5-dev" >&3
2958       echo "               or .rpm users: yum install kdelibs-devel." >&3
2959   fi
2962 if test x"${JPEG_LIBS}" != x ; then
2963   if test x"${JPEG_CFLAGS}" != x ; then
2964     echo "        JPEG flags are: $JPEG_CFLAGS"
2965   else
2966     echo "        JPEG flags are: default include path"
2967   fi
2968   echo "        JPEG libs are: $JPEG_LIBS"
2969 else
2970   echo "        ERROR: No JPEG library development package installed!" >&3
2971   echo "               Install it from http://ijg.org" >&3
2972   echo "               or .deb users: apt-get install libjpeg-dev" >&3
2973   echo "               or .rpm users: yum install libjpeg-devel" >&3
2976 if test x"${GIF_LIBS}" != x ; then
2977   if test x"${GIF_CFLAGS}" != x ; then
2978     echo "        GIF flags are: $GIF_CFLAGS"
2979   else
2980     echo "        GIF flags are: default include path"
2981   fi
2982   echo "        GIF libs are: $GIF_LIBS"
2983 else
2984   echo "        ERROR: No GIF library development package installed!" >&3
2985   echo "               Install it from http://sourceforge.net/projects/giflib/" >&3
2986   echo "               or .deb users: apt-get install libungif-dev" >&3
2987   echo "               or maybe     : apt-get install libgif-dev" >&3
2988   echo "               or .rpm users: yum install libungif-devel" >&3
2991 if test x"${PNG_LIBS}" != x ; then
2992   if test x"${PNG_CFLAGS}" != x ; then
2993     echo "        PNG flags are: $PNG_CFLAGS"
2994   else
2995     echo "        PNG flags are: default include path"
2996   fi
2997   echo "        PNG libs are: $PNG_LIBS"
2998 else
2999   echo "        RECOMMENDED: No PNG library development package installed!" >&4
3000   echo "                     Gnash will be built without support for dynamic loading of PNG files." >&4
3001   echo "                     Install it from http://www.libpng.org" >&4
3002   echo "                     or .deb users: apt-get install libpng12-dev" >&4
3003   echo "                     or .rpm users: yum install libpng-devel" >&4
3006 dnl if test x"$OGG_LIBS" != x; then
3007 dnl   if test x"$OGG_CFLAGS" != x; then
3008 dnl     echo "        Ogg flags are: $OGG_CFLAGS"
3009 dnl   else
3010 dnl     echo "        Ogg flags are: default include path"
3011 dnl   fi
3012 dnl   echo "        Ogg libs are: $OGG_LIBS"
3013 dnl else
3014 dnl   echo "        ERROR: No Ogg Vorbis development package installed!" >&3
3015 dnl fi
3017 dnl if test x"$VORBIS_LIBS" != x; then
3018 dnl   if test x"$VORBIS_CFLAGS" != x; then
3019 dnl     echo "        VORBIS flags are: $VORBIS_CFLAGS"
3020 dnl   else
3021 dnl     echo "        VORBIS flags are: default include path"
3022 dnl   fi
3023 dnl   echo "        VORBIS libs are: $VORBIS_LIBS"
3024 dnl else
3025 dnl   echo "        ERROR: No VORBIS Vorbis development package installed!" >&3
3026 dnl fi
3028 if test x"${build_ogl}" = x"yes"; then
3029   if test x"$OPENGL_LIBS" != x; then
3030     if test x"$OPENGL_CFLAGS" != x; then
3031       echo "        OpenGL flags are: $OPENGL_CFLAGS"
3032     else
3033       echo "        OpenGL flags are: default include path"
3034     fi
3035     echo "        OpenGL libs are: $OPENGL_LIBS"
3036     else
3037       echo "        ERROR: No OpenGL development package installed!" >&3
3038       echo "               You need to install the libmesa development package" >&3
3039       echo "               or .deb users: apt-get install libgl1-mesa-dev" >&3
3040       echo "               or .rpm users: yum install xorg-x11-Mesa-libGL" >&3
3041       echo "               or use a different renderer with --enable-renderer=" >&3
3042   fi
3045 if test x"${build_gles}" = x"yes"; then
3046   if test x"${has_gles}" != x; then
3047     if test x"$GLES_CFLAGS" != x; then
3048       echo "        OpenGL-ES flags are: $GLES_CFLAGS"
3049     else
3050       echo "        OpenGL-ES flags are: default include path"
3051     fi
3052     echo "        OpenGL-ES libs are: $GLES_LIBS"
3053   else
3054       echo "        ERROR: No OpenGL-ES development package installed!" >&3
3055       echo "               You need to install the this from source proobably" >&3
3056       echo "               or use a different renderer with --enable-renderer=" >&3
3057   fi
3060 dnl GLEXT is only needed for GTK/OpenGL
3061 if test x$build_gtk = xyes -a x$build_ogl = xyes ; then
3062   if test x"$GLEXT_LIBS" != x; then
3063     if test x"$GLEXT_CFLAGS" != x; then
3064       echo "        GtkGLExt flags are: $GLEXT_CFLAGS"
3065     else
3066       echo "        GtkGLExt flags are: default include path"
3067     fi
3068       echo "        GtkGLExt libs are: $GLEXT_LIBS"
3069   else
3070     if test x$build_gtk = xyes; then
3071       if test x$build_ogl = xyes; then
3072         echo "        ERROR: No GtkGLExt development package installed!" >&3
3073         echo "               It is needed to build the GTK/OpenGL GUI/renderer combination." >&3
3074         echo "               Either install it from http://gtkglext.sourceforge.net" >&3
3075         echo "               or .deb users: apt-get install libgtkglext1-dev" >&3
3076         echo "               or .rpm users: yum install gtkglext-devel" >&3
3077         echo "               or --enable-gui=sdl or --enable-renderer=agg" >&3
3078       fi
3079     fi
3080   fi
3084 if test x$build_hildon = xyes; then #{
3085   if test x"$HILDON_LIBS" != x; then
3086     if test x"$HILDON_CFLAGS" != x; then
3087       echo "        HILDON flags are: $HILDON_CFLAGS"
3088     else
3089       echo "        HILDON flags are: default include path"
3090     fi
3091       echo "        HILDON libs are: $HILDON_LIBS"
3092   else
3093     echo "        ERROR: No HILDON development package installed!" >&3
3094     echo "               Install it from http://gtk.org" >&3
3095     #echo "               or .deb users: apt-get install libhildon.0-dev" >&3
3096     echo "               or .deb users: apt-get install libhildon-1-dev" >&3
3097     echo "               or .rpm users: yum install hildon-devel" >&3
3098   fi
3101 if test x$build_gtk = xyes; then #{
3102   if test x"$GTK2_LIBS" != x; then
3103     if test x"$GTK2_CFLAGS" != x; then
3104       echo "        GTK2 flags are: $GTK2_CFLAGS"
3105     else
3106       echo "        GTK2 flags are: default include path"
3107     fi
3108       echo "        GTK2 libs are: $GTK2_LIBS"
3109   else
3110     echo "        ERROR: No GTK2 development package installed!" >&3
3111     echo "               Install it from http://gtk.org" >&3
3112     echo "               or .deb users: apt-get install libgtk2.0-dev" >&3
3113     echo "               or .rpm users: yum install gtk2-devel" >&3
3114   fi
3116   if test x"$PANGO_LIBS" != x; then
3117     if test x"$PANGO_CFLAGS" != x; then
3118       echo "        Pango flags are: $PANGO_CFLAGS"
3119     else
3120       echo "        Pango flags are: default include path"
3121     fi
3122     echo "        Pango libs are: $PANGO_LIBS"
3123   else
3124     echo "        ERROR: No Pango development package installed!" >&3
3125     echo "               Install it from http://pango.org" >&3
3126     echo "               or .deb users: apt-get install libpango1.0-dev" >&3
3127     echo "               or .rpm users: yum install pango-devel" >&3
3128   fi
3130   if test x"$GLIB_LIBS" != x; then
3131     if test x"$GLIB_CFLAGS" != x; then
3132       echo "        GLib flags are: $GLIB_CFLAGS"
3133     else
3134       echo "        GLib flags are: default include path"
3135     fi
3136     echo "        GLib libs are: $GLIB_LIBS"
3137   else
3138     echo "        ERROR: No GLib development package installed!" >&3
3139     echo "               Install it from http://gtk.org" >&3
3140     echo "               or .deb users: apt-get install libglib2.0-dev" >&3
3141     echo "               or .rpm users: yum install glib2-devel" >&3
3142   fi
3144   if test x"$ATK_LIBS" != x; then
3145     if test x"$ATK_CFLAGS" != x; then
3146       echo "        ATK flags are: $ATK_CFLAGS"
3147     else
3148       echo "        ATK flags are: default include path"
3149     fi
3150       echo "        ATK libs are: $ATK_LIBS"
3151   else
3152     echo "        ERROR: No ATK development package installed!" >&3
3153     echo "               Install it from http://gtk.org" >&3
3154     echo "               or .deb users: apt-get install libatk1.0-dev" >&3
3155     echo "               or .rpm users: yum install atk-devel" >&3
3156   fi
3160 if test "$media_handler" = "gst"; then
3161   if test x"$missing_codecs" != x; then   
3162       echo "        Your Gstreamer installation is missing these codecs: $missing_codecs"
3163       echo "        Please install the gstreamer-ffmpeg for Gstreamer"
3164   fi  
3165   if test x"$GSTREAMER_LIBS" != x; then
3166     if test x"$GSTREAMER_CFLAGS" != x; then
3167       echo "        Gstreamer flags are: $GSTREAMER_CFLAGS"
3168     else
3169       echo "        Gstreamer flags are: default include path"
3170     fi
3171     echo "        Gstreamer libs are: $GSTREAMER_LIBS"
3172     if test x"$has_modern_gstpbutils" = "xno"; then
3173       echo "        RECOMMENDED: If the user has not installed the necessary Gstreamer plugins," >&4
3174       echo "                     Gstreamer can pop up a message prompting them to." >&4
3175       echo "                     Install gstpbutils (>= 0.10.15) from http://www.gstreamer.net for that to be enabled" >&4
3176       echo "                     or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&4
3177     fi
3178     if test x"$has_gstreamer_plugins_base" = "xno"; then
3179       echo "                        Install gstreamer-plugins-base from http://www.gstreamer.net" >&3
3180       echo "                        or .rpm users: yum install gstreamer-plugins-base-devel" >&3
3181       echo "                        or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&4
3182     fi
3183   else
3184     echo "        ERROR: GST media handling requested but gstreamer-0.10+ not found" >&3
3185     echo "               Install it from http://www.gstreamer.net" >&3
3186     echo "               or .deb users: apt-get install libgstreamer0.10-dev" >&3
3187     echo "               or .rpm users: yum install gstreamer-devel" >&3
3188     echo "               or             yast install gstreamer010-devel" >&3
3189   fi
3192   if test x"$media_handler" = x"ffmpeg"; then
3193     if test x"$FFMPEG_LIBS" != x; then
3194       echo "        MP3 and video support enabled through ffmpeg"
3195       if test x"${ffmpeg_version_check}" != xok; then
3196         echo "        ERROR: You have version ${ffmpeg_version} of ffmpeg installed," >&3
3197         if test x"${have_ffmpeg_swscale}" = "xno"; then
3198           echo "               with no swscale enabled." >&3
3199         else
3200           echo "               with swscale enabled." >&3
3201         fi
3202         echo "               This setup isn't supported!" >&3
3203         echo "               Version 51.11.0 or newer is required, enabling swscale if >= 52.0.0." >&3
3204       else
3205         if test x"${avformat_h}" = x; then
3206           echo "        ERROR: FFMPEG's libavcodec header is installed but not libavformat." >&3
3207           echo "               You can install FFMPEG from http://ffmpeg.mplayerhq.hu" >&3
3208           echo "               or .deb users: apt-get install libavformat-dev" >&3
3209           echo "               or YaST users: yast -i libavformat-api (but currently installs into /usr/lib64)" >&3
3210           echo "               or explicitly set the path using --with-ffmpeg-incl=" >&5
3211           echo "               or reconfigure with --enable-media=gst" >&3
3212         else
3213           if test x"$FFMPEG_CFLAGS" != x; then
3214             echo "        FFMPEG flags are: $FFMPEG_CFLAGS"
3215           else
3216             echo "        FFMPEG flags are: default include path"
3217           fi
3218           echo "        FFMPEG libs are: $FFMPEG_LIBS"
3219         fi
3220       fi
3221     else
3222       echo "        ERROR: No FFMPEG development package installed!" >&3
3223       echo "               You can install FFMPEG from http://ffmpeg.mplayerhq.hu" >&3
3224       echo "               or .deb users: apt-get install libavformat-dev" >&3
3225       echo "               or .rpm users: yum install ffmpeg-devel" >&3
3226       echo "               or reconfigure with --enable-media=gst" >&3
3227     fi
3228   fi
3230 if test x$build_cairo = xyes; then
3231   if test x"$CAIRO_LIBS" != x; then
3232     if test x"$CAIRO_CFLAGS" != x; then
3233       echo "        Cairo flags are: $CAIRO_CFLAGS"
3234     else
3235       echo "        Cairo flags are: default include path"
3236     fi
3237     echo "        Cairo libs are: $CAIRO_LIBS"
3238   else
3239     echo "        ERROR: No Cairo development package installed!" >&3
3240     echo "               You need to have the Cairo development package installed" >&3
3241     echo "               if you have used --enable-render=cairo to configure." >&3
3242     echo "               Install it from http://cairographics.org" >&3
3243     echo "               or .deb users: apt-get install libcairo-dev" >&3
3244     echo "               or .rpm users: yum install cairo-devel" >&3
3245   fi
3248 if test x$build_fltk = xyes; then
3249   if test x"$FLTK2_LIBS" != x; then
3250     if test x"$FLTK2_CFLAGS" != x; then
3251       echo "        FLTK flags are: $FLTK2_CFLAGS"
3252     else
3253       echo "        FLTK flags are: default include path"
3254     fi
3255       echo "        FLTK libs are: $FLTK2_LIBS"
3256   else
3257     echo "        ERROR: No FLTK2 development package installed!" >&3
3258     echo "               There are currently no Debian or RPM packages for FLTK2;" >&3
3259     echo "               see http://www.fltk.org to install it from source." >&3
3260     echo "               or change to a different gui with --enable-gui=..." >&3
3261 dnl What it was for FLTK 1:
3262 dnl    echo "               or .deb users: apt-get install fltk-1.1-dev"
3263 dnl    echo "               or .rpm users: yum install fltk-devel"
3264   fi
3267 if test x$build_fltk = xyes; then
3268   if test x"$XFT_LIBS" != x; then
3269     if test x"$XFT_CFLAGS" != x; then
3270       echo "        Xft flags are: $XFT_CFLAGS"
3271     else
3272       echo "        Xft flags are: default include path"
3273     fi
3274       echo "        Xft libs are: $XFT_LIBS"
3275 dnl     else
3276 dnl       echo "        ERROR: No Xft development package installed!" >&3
3277 dnl       echo "               Install the xft development package" >&3
3278 dnl       echo "               or .deb users: apt-get install libxft-dev" >&3
3279 dnl       echo "               or .rpm users: yum install xft-devel" >&3
3280   fi
3283 # See whether SDL is required
3284 need_sdl=false
3285 test x$build_sdl = xyes                 && need_sdl=true
3286 test x$build_sound_sdl = xyes   && need_sdl=true
3288 if $need_sdl; then
3289   if test x"$SDL_LIBS" != x; then
3290     echo "        SDL flags are: $SDL_CFLAGS"
3291     echo "        SDL libs are: $SDL_LIBS"
3292   else
3293     echo "        ERROR: No SDL development package installed!" >&3
3294     echo "               Install it from http://www.libsdl.org/download-1.2.php" >&3
3295     echo "               or .deb users: apt-get install libsdl1.2-dev" >&3
3296     echo "               or .rpm users: yum install SDL-devel" >&3
3297     test x$build_sdl = xyes &&
3298         echo "               or select a different GUI with --enable-gui= " >&3
3299     test x"$media_handler" = x"ffmpeg" &&
3300         echo "               or use --enable-media=gst" >&3
3301   fi
3303 unset need_sdl
3305 if test x"$nsapi" = x"yes"; then
3306 dnl  if test x"$FIREFOX_CFLAGS" != x; then
3307 dnl    echo "        Firefox flags are: $FIREFOX_CFLAGS"
3308 dnl    echo "        Firefox libs are: $FIREFOX_LIBS"
3309     echo "        Plugin will be installed in ${FIREFOX_PLUGINS}"
3310 dnl  else
3311 dnl    echo "        ERROR: No Firefox or Mozilla development package installed!" >&3
3312 dnl  fi
3315 if test x"${pthreads}" = x"yes"; then
3316   if test x"$PTHREAD_CFLAGS" != x; then
3317     echo "        POSIX Threads flags are: $PTHREAD_CFLAGS"
3318   fi
3319   if test x"${PTHREAD_LIBS}" != x; then
3320     echo "        POSIX Threads lib is: $PTHREAD_LIBS"
3321   else
3322     if test x"${cross_compiling}" = xno; then
3323       echo "ERROR: No pthread development package installed!" >&3
3324     fi
3325   fi
3328 if test x"${docbook}" = x"yes"; then
3329   if test x"$MAKEINFO" = x; then
3330     echo "        ERROR: no makeinfo tools installed!" >&3
3331     echo "               Either install it from http://www.gnu.org/software/texinfo/" >&3
3332     echo "               or .deb users: apt-get install texinfo" >&3
3333     echo "               or configure without --enable-docbook" >&3
3334   fi
3335   dnl low-level tools
3336   if test x"$DB2X_TEXIXML" = x -o x"$DB2X_MANXML" = x -o x"$DB2X_XSLTPROC" = x; then
3337     dnl high-level tools
3338     if test x"${DB2X_TEXI}" = x -o x"${DB2X_MAN}" = x; then
3339       echo "        ERROR: No DocBook2X tools installed!" >&3
3340       echo "               Either install it from http://docbook2x.sourceforge.net" >&3
3341       echo "               or .deb users: apt-get install docbook docbook2x docbook-utils" >&3
3342       echo "                              docbook-xml docbook-xsl texinfo xsltproc" >&3
3343       echo "               or configure without --enable-docbook" >&3
3344     fi
3345   else
3346     echo "        You have version $db2x_version of the DocBook2X tools."
3347   fi
3348 else
3349   echo "        WARNING: without --enable-docbook we will use the cached" >&4
3350   echo "                 documentation files included in the gnash distribution." >&4
3351   echo "                 If you change files in doc/C, you should --enable-docbook." >&4
3354 if test x"$CURL_LIBS" != x; then
3355   if test x"$CURL_CFLAGS" != x; then
3356     echo "        CURL flags are: $CURL_CFLAGS"
3357   else
3358     echo "        CURL flags are: default include path"
3359   fi
3360     echo "        CURL libs are: $CURL_LIBS"
3361 else
3362   echo "        RECOMMENDED: If you install the CURL library, Gnash will be able to" >&4
3363   echo "                     display remote content (streaming from URLs) using CURL." >&4
3364   echo "                     Install libcurl from http://curl.haxx.se/libcurl" >&4
3365   echo "                     or .deb users: apt-get install libcurl-dev" >&4
3366   echo "                     or .rpm users: yum install curl-devel" >&4
3369 if test x"$SPEEX_LIBS" != x; then
3370   if test x"$SPEEX_CFLAGS" != x; then
3371     echo "        Speex flags are: $SPEEX_CFLAGS"
3372   else
3373     echo "        Speex flags are: default include path"
3374   fi
3375     echo "        Speex libs are: $SPEEX_LIBS"
3376 else
3377   echo "        RECOMMENDED: If you install the Speex library, Gnash will be able to" >&4
3378   echo "                     decoded Speex encoded audio in FLV files." >&4
3379   echo "                     Install libspeex from http://speex.org" >&4
3380   echo "                     or .deb users: apt-get install libspeex-dev" >&4
3381   echo "                     or .rpm users: yum install speex-devel" >&4
3384 if test x"$ext_dbus" = xyes; then
3385   if test x"$DBUS_LIBS" != x; then
3386     if test x"$DBUS_CFLAGS" != x; then
3387       echo "        DBUS flags are: $DBUS_CFLAGS"
3388     else
3389       echo "        DBUS flags are: default include path"
3390     fi
3391       echo "        DBUS libs are: $DBUS_LIBS"
3392   else
3393     echo "        WARNING: DBUS library not found." >&4
3394     echo "                 Gnash will be built without support for remote controls." >&4
3395     echo "                 Why not install libdbus from http://www.dbus.org" >&4
3396     echo "                 or .deb users: apt-get install dbus-dev" >&4
3397     echo "                 or .rpm users: yum install dbus-devel" >&4
3398   fi
3401 if test x$build_agg = xyes; then # {
3402   echo "        AGG Pixel format is: $pixelformat"
3403     if test x"$AGG_LIBS" != x; then # {
3404       if test x"${agg25}" != xyes; then # {
3405         echo "        ERROR: Your installation of AGG appears to be version 2.4 or older." >&3
3406         echo "               Please upgrade to AGG 2.5 or greater." >&3
3407         echo "               Install it from http://www.antigrain.com" >&3
3408         echo "               or .deb users: apt-get install libagg-dev" >&3
3409         echo "               or .rpm users: yum install agg-devel" >&3
3410       else # }{
3411         if test x"$AGG_CFLAGS" != x; then # {
3412           echo "        AGG flags are: $AGG_CFLAGS"
3413         else # }{
3414           echo "        AGG flags are: default include path"
3415         fi # }
3416         echo "        AGG libs are: $AGG_LIBS"
3417       fi # }
3418     else # }{
3419       echo "        ERROR: No AGG development package installed!" >&3
3420       echo "               Install it from http://www.antigrain.com" >&3
3421       echo "               or .deb users: apt-get install libagg-dev" >&3
3422       echo "               or .rpm users: yum install agg-devel" >&3
3423     fi # }
3424 fi # }
3426 if test x"$BOOST_LIBS" != x; then
3427     dnl Only cygnal requires date_time at present, so it's OK if either
3428     dnl you don't want cygnal or do have date_time installed.
3429     dnl if test x"$cygnal" = xno; then
3430         echo "        BOOST flags are: $BOOST_CFLAGS"
3431         echo "        BOOST libs are: $BOOST_LIBS"
3432         echo "        BOOST Extra libs are: $BOOST_EXTRA_LIBS"
3433     dnl fi
3434     if test x"${missing_headers}" != x; then
3435       for i in ${missing_headers}; do
3436         # They have some boost libs but no date_time and want to compile cygnal.
3437         echo "        ERROR: The BOOST $i header file is needed!" >&3
3438         echo "               Install it from http://boost.org" >&3
3439         echo "               or from a Boost development package" >&3
3440       done
3441     fi
3442     if test x"${extra_missing_libs}" != x; then
3443       for i in ${extra_missing_libs}; do
3444         echo "        WARNING: The BOOST $i library is recommended!" >&4
3445         echo "                 Install it from http://www.boost.org" >&4
3446         echo "                 or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&4
3447         echo "                 Gnash will compile anyway, but not all tests will work." >&4
3448       done
3449     fi
3450     if test x"${missing_libs}" != x; then
3451       for i in ${missing_libs}; do
3452         # They have some boost libs but no date_time and want to compile cygnal.
3453         echo "        ERROR: The BOOST $i library is needed!" >&3
3454         echo "               Install it from http://boost.org" >&3
3455         echo "               or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&3
3456       done
3457     fi
3458 else
3459     echo "        ERROR: No BOOST development package installed!" >&3
3460     echo "               Install it from http://www.boost.org" >&3
3461     echo "               or .deb users: apt-get install libboost-dev libboost-thread-dev" >&3
3462     if test x"$cygnal" = xyes; then
3463     echo "                              and libboost-date-time-dev (for cygnal)" >&3
3464     fi
3465     echo "               or .rpm users: yum install boost-devel" >&3
3468 dnl don't look for the flash compilers when cross compiling.
3469 if test x"$testsuite" = x"yes"; then
3470   if test x$cross_compiling = xno; then
3471     if test x"$MING_LIBS" != x; then
3472       echo "        MING flags are $MING_CFLAGS"
3473       echo "        MING libs are $MING_LIBS"
3474     else
3475       echo "        WARNING: You need to have the Ming development package" >&4
3476       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3477       echo "                 Install it from http://www.libming.org/" >&4
3478       echo "                 or .deb users: apt-get install libming-dev" >&4
3479     fi
3481     if test x"$MAKESWF" != x; then
3482       echo "        MING version code is $MING_VERSION_CODE"
3483       echo "        MAKESWF is $MAKESWF"
3484     else
3485       echo "        WARNING: You need to have the Ming utilities package" >&4
3486       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3487       echo "                 Install it from http://www.libming.org" >&4
3488       echo "                 or .deb users: apt-get install libming-util" >&4
3489     fi
3491     if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; then
3492       echo "        WARNING: You have an older version of Ming installed and will not" >&4
3493       echo "                 be able to run all of the tests in Gnash testsuite." >&4
3494       echo "                 Install the latest version from http://www.libming.org" >&4
3495     fi
3497     if test x"$SWFDEC_TESTSUITE" != x; then
3498       echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
3499     fi
3501     if test x"$MTASC" != x; then
3502       echo "        MTASC is $MTASC"
3503       echo "        MTASC CLASSPATH is $MTASC_CLASSPATH"
3504     else
3505       echo "        WARNING: You need to have the MTASC compiler packages installed" >&4
3506       echo "                 to run some of the tests in Gnash testsuite." >&4
3507       echo "                 You can install it from http://mtasc.org" >&4
3508       echo "                 or .deb users: apt-get install mtasc" >&4
3509     fi
3511     if test x"$HAXE" != x; then
3512       echo "        HAXE is $HAXE"
3513       echo "        HAXE CLASSPATH is $HAXE_CLASSPATH"
3514     else
3515       echo "        WARNING: You need to have the HAXE compiler package " >&4
3516       echo "                 version 2.00 or higher installed" >&4
3517       echo "                 to run some of the tests in Gnash testsuite." >&4
3518       echo "                 You can install it from http://haxe.org" >&4
3519       echo "                 or .deb users: apt-get install haxe" >&4
3520     fi
3522     if test x"$SWFMILL" != x; then
3523       echo "        SWFMILL is $SWFMILL"
3524       if test x"$ENABLE_AVM2" != x -a "$SWFMILL_VERSION" -lt 00021206; then
3525         echo "        WARNING: You are building Gnash with AVM2 support but" >&4
3526         echo "                 your swfmill version is too old to run AS3" >&4
3527         echo "                 tests." >&4
3528       fi
3529     else
3530       echo "        WARNING: You need to have the 'swfmill' tool installed" >&4
3531       echo "                 to run some of the tests in Gnash testsuite." >&4
3532       echo "                 You can install it from http://swfmill.org/" >&4
3533       echo "                 or .deb users: apt-get install swfmill" >&4
3534     fi
3536     if test x"$SWFC" != x; then
3537       echo "        SWFC is $SWFC"
3538     else
3539       echo "        WARNING: You need to have 'swfc' from SWFTools installed" >&4
3540       echo "                 to run some of the tests in Gnash testsuite." >&4
3541       echo "                 You can install it from http://www.swftools.org/" >&4
3542       echo "                 or .deb users: apt-get install swftools" >&4
3543     fi
3545     if test x"$AS3COMPILE" != x; then
3546       echo "        AS3COMPILE is $AS3COMPILE"
3547     else
3548       echo "        WARNING: you need as3compile from SWFTools" >&4
3549       echo "                 to run some of the tests in Gnash testsuite." >&4
3550       echo "                 You can install it from http://www.swftools.org/" >&4
3551     fi
3553     if test x"$HTTP_TESTSUITE" != x; then
3554       echo "        HTTP testsuite dir is $HTTP_TESTSUITE"
3555     fi
3557     if test x"$RED5_HOST" != x; then
3558       echo "        RED5 testing host is $RED5_HOST"
3559     fi
3560   fi
3563   if test x"$PERL" != x; then
3564     echo "        PERL is $PERL"
3565   else
3566     echo "        WARNING: You need to have perl installed" >&4
3567     echo "                 to run some of the tests in Gnash testsuite." >&4
3568   fi
3570 if test x"$testsuite" = x"yes"; then
3571   if test x"$CSOUND" != x; then
3572     echo "        CSOUND is $CSOUND"
3573   else
3574     echo "        WARNING: You need to have csound installed" >&4
3575     echo "                 to have real fun." >&4
3576     echo "                 Install it from http://www.csounds.com/" >&4
3577     echo "                 or .deb users: apt-get install csound" >&4
3578     echo "                 or .rpm users: yum install csound" >&4
3579   fi
3582 if test x"$Z_LIBS" != x; then
3583   if test x"$Z_CFLAGS" != x; then
3584     echo "        Z flags are: $Z_CFLAGS"
3585   else
3586     echo "        Z flags are: default include path"
3587   fi
3588   echo "        Z libs are: $Z_LIBS"
3589 else
3590   echo "        RECOMMENDED: You need to have the zlib development packages installed" >&4
3591   echo "                     to play compressed SWF (most of them from version 6 up)" >&4
3592   echo "                     and to display some kinds of JPEG files." >&4
3593   echo "                     Install it from http://www.zlib.net" >&4
3594   echo "                     or .deb users: apt-get install zlib1g-dev" >&4
3595   echo "                     or .rpm users: yum install zlib-devel." >&4
3596   echo "                     It may still be possible to configure without zlib." >&4
3599 if test x"$FREETYPE2_LIBS" != x; then
3600   if test x"$FREETYPE2_CFLAGS" != x; then
3601     echo "        FreeType flags are: $FREETYPE2_CFLAGS"
3602   else
3603     echo "        FreeType flags are: default include path"
3604   fi
3605   echo "        FreeType libs are: $FREETYPE2_LIBS"
3606 else
3607   echo "        RECOMMENDED: You need to have the freetype development packages installed" >&4
3608   echo "                     to use device fonts." >&4
3609   echo "                     Install it from http://www.freetype.org" >&4
3610   echo "                     or .deb users: apt-get install libfreetype6-dev" >&4
3611   echo "                     or .rpm users: yum install freetype-devel" >&4
3612   echo "                     It may still be possible to configure without freetype." >&4
3615 if test x"$FONTCONFIG_LIBS" != x; then
3616   if test x"$FONTCONFIG_CFLAGS" != x; then
3617     echo "        Fontconfig flags are: $FONTCONFIG_CFLAGS"
3618   else
3619     echo "        Fontconfig flags are: default include path"
3620   fi
3621   echo "        Fontconfig libs are: $FONTCONFIG_LIBS"
3622 else
3623   echo "        RECOMMENDED: You need to have the fontconfig development packages installed" >&4
3624   echo "                     to use device fonts." >&4
3625   echo "                     Install it from http://www.fontconfig.org" >&4
3626   echo "                     or .deb users: apt-get install libfontconfig1-dev" >&4
3627   echo "                     or .rpm users: yum install fontconfig-devel" >&4
3628   echo "                     It may still be possible to configure without fontconfig." >&4
3631 if test x$ext_mysql = xyes; then
3632   if test x$mysql != xno; then
3633     if test x"$MYSQL_LIBS" != x; then
3634       echo "        MYSQL flags are: $MYSQL_CFLAGS"
3635       echo "        MYSQL libs are: $MYSQL_LIBS"
3636     else
3637       echo "        ERROR: No MySQL development package is installed." >&3
3638       echo "               Either reconfigure without --enable-extensions=mysql" >&3
3639       echo "               or install MySQL header files from http://www.mysql.org" >&3
3640       echo "               or .deb users: apt-get install libmysqlclient-dev" >&3
3641       echo "                 or .rpm users: yum install mysql-devel" >&4
3642     fi
3643   fi
3646 if test "$GMSGFMT" = ":"; then
3647   echo "        WARNING: You need the gettext package installed to use translations." >&4
3648   echo "                 Required for building a package or 'make distcheck'" >&4
3649   echo "                 Install it from http://www.gnu.org/software/gettext/" >&4
3650   echo "                 or .deb users: apt-get install gettext" >&4
3651   echo "                 or .rpm users: yum install gettext" >&4
3654 if test x"${build_vaapi}" = x"yes"; then
3655   if test x"${LIBVA_CFLAGS}" = xyes; then
3656       echo "        LIBVA flags are: default"
3657     else
3658       echo "        LIBVA flags are: $LIBVA_CFLAGS"
3659       echo "        LIBVA libraries are: $LIBVA_LIBS"
3660   fi
3661   if test x$use_libva_x11 = xyes; then
3662     if test x"${LIBVA_X11_CFLAGS}" = xyes; then
3663       echo "        LIBVA X11 flags are: default"
3664     else
3665       echo "        LIBVA X11 flags are: $LIBVA_X11_CFLAGS"
3666       echo "        LIBVA X11 libraries are: $LIBVA_X11_LIBS"
3667     fi
3668   fi
3669   if test x$use_libva_glx = xyes; then
3670     if test x"${LIBVA_GLX_CFLAGS}" = xyes; then
3671       echo "        LIBVA GLXflags are: default"
3672     else
3673       echo "        LIBVA GLX flags are: $LIBVA_GLX_CFLAGS"
3674     fi
3675     echo "        LIBVA GLX libraries are: $LIBVA_GLX_LIBS"
3676   fi
3679 if test x"$ac_cv_gcc_visibility" != xyes; then
3680   if test x"$npapi" = xyes; then
3681     echo "        WARNING: NPAPI (mozilla) plugin is enabled, but your compiler"
3682     echo "                 does not support symbol visibility. This may cause "
3683     echo "                 the plugin to malfunction and may result in small "
3684     echo "                 children being eaten. You have been warned!"
3685   fi
3688 if test x"${DEJAGNU}" != x""; then
3689   echo "        DEJAGNU's runtest is $DEJAGNU"
3690 else
3691   echo "        WARNING: You need the dejagnu package installed to get a summary" >&4
3692   echo "                 report after running ''make check''" >&4
3693   echo "                 Install it from http://www.gnu.org/software/dejagnu/" >&4
3694   echo "                 or .deb users: apt-get install dejagnu" >&4
3695   echo "                 or .rpm users: yum install dejagnu" >&4
3698 dnl Access Linux Platform
3699 if test x"${build_alp}" = xyes; then
3700   if test x"${ALP_CFLAGS}" != x; then
3701     echo "        ALP flags are: $ALP_CFLAGS"
3702     echo "        ALP libs are: $ALP_LIBS"
3703   else
3704     echo "        ERROR: No ALP development package is installed." >&3
3705   fi
3708 dnl Haiku
3709 if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o x"${media_handler}" = x"mkit"; then
3710     echo "        Haiku libs are: $HAIKU_LIBS"
3713 if test x"$python" = x"yes"; then
3714   if test x"$has_python" = x"yes"; then
3715     echo "        PYTHON flags are: $PYTHON_CFLAGS"
3716     echo "        PYTHON libs are: $PYTHON_LIBS"
3717     echo "        PYTHON executable is are: $PYTHON"
3718   else
3719     echo "        ERROR: No Python development package is installed, but it's enabled." >&3
3720   fi
3722 if test x${build_ssl} = xyes; then
3723   if test x"${has_ssl}" = xyes; then
3724     if test x"${SSL_CFLAGS}" = xyes; then
3725       echo "        SSL flags are: default"
3726     else
3727       echo "        SSL flags are: $SSL_CFLAGS"
3728     fi
3729     echo "        SSL libs are: $SSL_LIBS"
3730   else
3731     echo "        ERROR: No SSL development package is installed, but it's enabled." >&3
3732   fi
3735 if test x${build_ssh} = xyes; then
3736   if test x"${has_ssh}" = xyes; then
3737     if test x"${SSH_CFLAGS}" = xyes; then
3738       echo "        SSH flags are: default"
3739     else
3740       echo "        SSH flags are: $SSH_CFLAGS"
3741     fi
3742     echo "        SSH libs are: $SSH_LIBS"
3743   else
3744     echo "        ERROR: No SSH development package is installed, but it's enabled." >&3
3745   fi
3748 if test x"${build_all_as3}" = x"yes"; then
3749   echo "        Building the entire ActionScript class libary"
3750 else
3751   echo "        Only building these ActionScript classes into the library:"
3752   echo "     ${classlist}"
3755 if test x"$testsuite" = x"yes"; then
3756   if test x"$NETCAT" != x; then
3757     echo "        You have netcat installed, which is only used for testing"
3758   else
3759     echo "        Install netcat for networking test support"
3760   fi
3761   if test x"$WGET" != x; then
3762     echo "        You have wget installed, which is only used for testing"
3763   else
3764     echo "        Install wget for networking test support"
3765   fi
3768 if test x$cross_compiling = xyes; then
3769    if test x"${android_ndk}" != xno; then
3770       AC_MSG_NOTICE([This build is setup for cross compiling for Android])
3771    else
3772       AC_MSG_NOTICE([This build is setup for cross compiling])
3773    fi
3776 echo "--------"
3777 dnl if test x"${ghelp}" = x"yes"; then
3778 dnl   echo "        GNOME help enabled"
3779 dnl else
3780 dnl   echo "        GNOME help disabled (default). Use --enable-ghelp to enable."
3781 dnl fi
3783 dnl if test x"${extensions}" = x"yes"; then
3784 dnl   echo "        Building extensions enabled (default). Use --disable-extensions to disable."
3785 dnl else
3786 dnl   echo "        Building Gnash extensions disabled."
3787 dnl fi
3789 if test x"${cygnal}" = x"yes"; then
3790   echo "        Building Cygnal media server enabled (default). Use --disable-cygnal to disable."
3791 else
3792   echo "        Building Cygnal media server disabled."
3795 if test x"${debugger}" = x"yes"; then
3796   echo "        Building Flash debugger support (default). Use --disable-debugger to disable."
3797 else
3798   echo "        Building the Flash debugger is disabled."
3801 if test x"${with-top_level}" != x; then
3802   echo "        Top level for cross compiling support files is: $with_top_level"
3805 if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
3806   echo "        WARNING: Pixel format RGB565 selected in combination with the" >&4
3807   echo "                 GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)." >&4
3810 if test x"${extensions_list}" != x; then
3811   echo "        Building extensions: ${extensions_list}"
3814 if test x"${security_list}" != x; then
3815   echo "        Enabling security features: ${security_list}"
3818 if test x"${hwaccel_list}" != xnone; then
3819   echo "        Enabling hardware acceleration features: ${hwaccel_list}"
3822 if test x"${statistics_list}" != x; then
3823   echo "        Enabling statistics collecting for: ${statistics_list}"
3826 if test x"${SUPPORTED_GUIS}" = x; then
3827   AC_MSG_ERROR(no supported GUIs found);
3830 echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
3831 echo "        Renderers supported: ${renderer_list}"
3832 echo "        Hardware Acceleration: ${hwaccel_list}"
3833 echo "        Media handler: "$media_handler
3834 echo "        Using ${add_sound} for sound handling"
3835 echo "        Using $with_shm mode for shared memory"
3837 if test x"$docbook" = x"yes"; then
3838   echo '        DocBook document processing enabled (for "make html" and "make pdf")'
3839   if test x"$docbook_styles" != x; then
3840     echo "        Docbook styles sheets in $docbook_styles"
3841   fi
3842 else
3843   echo "        DocBook document processing disabled (default)"
3846 if test -s $cwarn; then
3847   echo ""
3848   cat $cwarn
3849   rm $cwarn
3850   echo ""
3851   echo "Gnash should still compile even with these warnings."
3852   echo "If it doesn't, report the warnings as a bug."
3855 dnl If anything critical is missing, don't bother to continue
3856 if test -s $cerr; then
3857   echo ""
3858   cat $cerr >&2
3859   rm $cerr
3860   AC_MSG_ERROR([Please install required packages])
3863 if test x"$fork" = x"no"; then
3864   AC_MSG_ERROR([Currently only forking the standalone player works!])
3866 echo ""
3868 # Local Variables:
3869 # c-basic-offset: 2
3870 # tab-width: 2
3871 # indent-tabs-mode: nil
3872 # End: