Drop the bool operator for ObjectURI, to avoid getting the kind of side-effect that...
[gnash.git] / configure.ac
blob63961a1d724001329cfb3f33a0a377b11d25cb4d
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   *-gnu*)
110     DEFAULT_FLASH_PLATFORM_ID="GNU"
111     DEFAULT_FLASH_SYSTEM_OS="GNU/HURD"
112     ;;    
113   *)
114     DEFAULT_FLASH_PLATFORM_ID="UNK"
115     DEFAULT_FLASH_SYSTEM_OS="Unknown"
116     ;;
117 esac
119 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_PLATFORM_ID], ["${DEFAULT_FLASH_PLATFORM_ID}"], [Default 3-letter platform identifier for version string])
120 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_SYSTEM_OS], ["${DEFAULT_FLASH_SYSTEM_OS}"], [Default value for System.capabilities.os])
122 AC_SUBST(DEFAULT_FLASH_PLATFORM_ID)
123 AC_SUBST(DEFAULT_FLASH_SYSTEM_OS)
125 DEFAULT_STREAMS_TIMEOUT=60
126 AC_SUBST(DEFAULT_STREAMS_TIMEOUT)
127 AC_DEFINE_UNQUOTED([DEFAULT_STREAMS_TIMEOUT], [${DEFAULT_STREAMS_TIMEOUT}], [Default streams timeout in seconds])
129 DEFAULT_SOL_SAFEDIR="~/.gnash/SharedObjects"
130 AC_SUBST(DEFAULT_SOL_SAFEDIR)
131 AC_DEFINE_UNQUOTED([DEFAULT_SOL_SAFEDIR], ["${DEFAULT_SOL_SAFEDIR}"], [Default SharedObject base directory])
134 dnl Some things you can only do by looking at the platform name.
135 case "${host}" in
136   powerpc-apple-darwin*)
137     AC_DEFINE([__powerpc64__], [1], [this is a 64 bit powerpc])
138     darwin=yes
139     AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform])
140     ;;
141   *-apple-darwin*)
142     darwin=yes
143     AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform])
144     ;;
145     dnl Unfortunately, all BSD distributions are not identical, so 
146     dnl as tacky as it is to look for the distribution name, we don't
147     dnl have much choice. The use of these should be avoid as much as possible.
148   *-openbsd*)
149     bsd=yes
150     openbsd=yes
151     AC_DEFINE([OPENBSD_HOST], [1], [this is an OpenBSD platform])
152     ;;
153   *-freebsd*)
154     bsd=yes
155     freebsd=yes
156     AC_DEFINE([FREEBSD_HOST], [1], [this is a FreeBSD platform])
157     ;;
158   *-netbsd*)
159     bsd=yes
160     netbsd=yes
161     AC_DEFINE([NETBSD_HOST], [1], [this is a NetBSD platform])
162     ;;
163   *-*solaris*)
164     solaris=yes
165     AC_DEFINE([SOLARIS_HOST], [1], [this is a Solaris platform])
166     ;;
167   *-*linux*)
168     linux=yes
169     AC_DEFINE([LINUX_HOST], [1], [this is a Linux platform])
170     ;;
171   *-cygwin* | *-mingw* | *-pw32*)
172     windows=yes
173     AC_DEFINE([WIN32_HOST], [1], [this is a Win32 platform])
174     ;;
175   *64-*-*bsd*)
176     bsd_os=bsd 
177     AC_DEFINE([WORDSIZE], [64], [this is a 64 platform])
178     ;;
179   *-*amigaos*)
180     amigaos4=yes
181     AC_DEFINE([AMIGAOS4_HOST], [1], [this is an AmigaOS4 platform])
182     ;;
183   *-*haiku*)
184     haiku=yes
185     AC_DEFINE([HAIKU_HOST], [1], [this is a Haiku platform])
186     ;;
187   *-gnu*)
188     gnu=yes
189     AC_DEFINE([GNU_HOST], [1], [this is a GNU platform])
190     ;;
191 esac
194 AM_CONDITIONAL(PLUGIN_LINK_UNDEFINED, test x$openbsd_os = xopenbsd)
195 AM_CONDITIONAL(WIN32, test x$windows = xyes)
196 AM_CONDITIONAL(HAIKU, test x$haiku = xyes)
198 dnl Get build date for helping us debugging
199 BUILDDATE="`date +%Y%m%d`"
200 AC_SUBST(BUILDDATE)
202 dnl These are required by automake
203 dnl AM_INIT_AUTOMAKE(gnash, "trunk$BUILDDATE")
204 AM_INIT_AUTOMAKE
205 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
206 AM_MAINTAINER_MODE
207 AC_PROG_MAKE_SET
209 dnl AC_DISABLE_STATIC dnl Disable building static libs.
211 AM_GNU_GETTEXT([external])
212 AM_CONDITIONAL(HAS_GETTEXT, test x$ac_cv_path_XGETTEXT != x)
213 dnl AM_GNU_GETTEXT_VERSION(0.15)
215 dnl This is primarily used when compiling for a similar architecture,
216 dnl like pentium->geode, which can use the same compiler, but have
217 dnl different development libraries.
219 dnl I want to deprecate this option for the new sysroot name to be
220 dnl consistant with other tools. This will be left for a while as 
221 dnl a transistion.
222 AC_ARG_WITH(top_level,
223   AC_HELP_STRING([--with-top-level],
224   [top level directory for cross compiling files]),
225   with_top_level=${withval} ;
226   cross_compiling=yes)
228 AC_ARG_WITH(sysroot,
229   AC_HELP_STRING([--with-sysroot],
230   [system root directory for cross compiling]),
231   with_top_level=${withval} ;
232   cross_compiling=yes)
234 dnl Android is a little different when using a standard cross toolchain,
235 dnl so we have to configure especially for it for now. Usually it's
236 dnl something like this:
238 dnl arm-linux-eabi-gcc -Wl,--dynamic-linker -Wl,/system/bin/linker
239 dnl -nostdlib -Wl,-rpath -Wl,/system/lib -Wl,-rpath
240 dnl -Wl,/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
241 dnl -L/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
242 dnl -lc -o hello
243 dnl  /opt/android-ndk-r3/build/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o
244 dnl Recent versions of G++ (I'm using 4.5 from source
245 android_ndk=no
246 AC_ARG_WITH([android],
247   AC_HELP_STRING([--with-android], [directory where android NDK is installed]),
248         android_ndk=${withval}
249         if test x"${withval}" != x; then
250           android_ndk=${withval}
251         else
252           android_ndk=/opt/android-ndk-r3/build/platforms/android-5/arch-arm
253         fi
255 CROSS_CXXFLAGS=
256 if test x"${android_ndk}" != xno; then
257 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
258 dnl  CROSS_CXXFLAGS=-mandroid -fexceptions -I${android_ndk}/include
259   CROSS_CXXFLAGS=-mandroid -fexceptions
260   if test x"${with_top_level}" = x; then
261     with_top_level=/usr/local/android-arm/sysroot/usr
262     cross_compiling=yes
263   fi
264   ANDROID_NDK=${android_ndk}
265   AC_DEFINE(ANDROID, [1], [This is an Android build])
266 else
267   ANDROID_NDK=
269 AC_SUBST(ANDROID_NDK)
270 AM_CONDITIONAL(ANDROID, [ test x"${android_ndk}" != xno ])
272 AC_ARG_WITH(cpu,
273   AC_HELP_STRING([--with-cpu],[specify a cpu when cross compiling.]),
274   [case "${withval}" in
275     geode) with_cpu=geode ;;
276     *)   AC_MSG_ERROR([bad value ${enableval} for --with-cpu option]) ;;
277    esac],with_cpu=none)
279 if test x"$with_cpu" != x"none"; then
280 dnl   $CXXFLAGS="$CXXFLAGS -march=${with_cpu}"
281    cross_compiling=yes
284 AC_MSG_CHECKING([For the version of libtool])
285 if test -d ${srcdir}/libltdl/libltdl; then
286   ltver=2.x
287 else
288   ltver=1.x
290 ltmajor=`echo $ltver | cut -d '.' -f 1`
291 AC_MSG_RESULT([$ltver])
292 AM_CONDITIONAL(LIBLTDL2, [test $ltmajor -eq 2])
293 AM_CONDITIONAL(LIBLTDL1, [test $ltmajor -eq 1])
294 if test $ltmajor -eq 1; then
295   AC_LIBLTDL_CONVENIENCE
296   AC_LIBTOOL_DLOPEN
297   if test x"${windows}" = x"yes"; then
298     dnl The following macro may be empty; the colon is necessary
299     dnl in this case to avoid an empty if statement (which is a syntax error).
300     AC_LIBTOOL_WIN32_DLL
301     :
302   fi
303   AC_DISABLE_STATIC
304 else
305   LT_INIT([dlopen win32-dll disable-static])
306   LTDL_INIT([convenience recursive])
308 AC_PROG_LIBTOOL
310 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
311 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
313 AC_C_BIGENDIAN
314 AC_C_CONST
315 AC_C_INLINE
316 AC_SUBST([LIBTOOL_DEPS])
317 AC_LIB_LTDL
319 AM_CONDITIONAL(ENABLE_SHARED, [test x"${enable_shared}" = xyes])
320 AM_CONDITIONAL(ENABLE_STATIC, [test x"${enable_shared}" = xno])
321 dnl -- AM_CONDITIONAL(STATIC_GUI, test x"${dynamic_gui}" = xno -o x"${enable_shared}" = xno)
323 AC_PATH_PROG(DEJAGNU, runtest)
325 dnl AC_CHECK_LIB(ltdl, lt_dlmutex_register, AC_DEFINE(LT_DLMUTEX, 1, [Has lt_dlmutex_register]),
326 dnl                                         AC_DEFINE(LT_DLMUTEX, 0, [doesn't have lt_dlmutex_register]) )
328 dnl These options are for Cygnal, which collects optional statistics
329 dnl on all the network traffic By default, we turn on statistics
330 dnl collecting for the incoming and outgoing queues, since those are
331 dnl required to be compatiable with FMS 3, and the ActionScript server
332 dnl management API. buffers are the lowest level data storage, this
333 dnl data is the time spent in the queue, and is primarily only used
334 dnl for tuning the queueing API in Gnash. Memoryis the same, it's only
335 dnl used by developers for tuning performance of memory allocations in
336 dnl Gnash.
337 buffers=no
338 que=no
339 memory=no
340 cache=yes
341 AC_ARG_WITH(statistics,
342   AC_HELP_STRING([--with-statistics=], [Specify which statistics features to enable]),
343   if test -n ${withval}; then
344     if test "x${withval}" != "xno"; then
345       extlist="${withval}"
346       withval=`echo ${withval} | tr '\054' ' ' `
347     else
348       extlist=""
349       withval=""
350     fi
351   fi
352   statistics_list=""
353   nstatistics=0
354   while test -n "${withval}" ; do
355     val=`echo ${withval} | cut -d ' ' -f 1`
356     [case "${val}" in
357       buffers)
358         buffers=yes
359         nstatistics=$((nstatistics+1))
360         ;;
361       que)
362         que=yes
363         nstatistics=$((nstatistics+1))
364         ;;
365       memory)
366         memory=yes
367         nstatistics=$((nstatistics+1))
368         ;;
369       cache)
370         cache=yes
371         nstatistics=$((nstatistics+1))
372         ;;
373       all|ALL)
374         buffers=yes
375         memory=yes
376         queu=yes
377         cache=yes
378         nstatistics=4           dnl this must be incremented if you add anything
379         ;;
380       *) AC_MSG_ERROR([invalid statistics feature specified: ${withval} given (accept: buffers|que|memory|all)])
381         ;;
382       esac]
383     withval=`echo ${withval} | cut -d ' ' -f 2-6`
384     if test "x$val" = "x$withval"; then
385       break;
386     fi
387   done
389 if test x${buffers} = xyes; then
390   statistics_list="${statistics_list} buffers"
391   AC_DEFINE(USE_STATS_BUFFERS, [1], [Support statistics collecting for the queue buffers])
392   AC_MSG_WARN([This option will effect your performance])
395 if test x${memory} = xyes; then
396   statistics_list="${statistics_list} memory"
397   AC_DEFINE(USE_STATS_MEMORY, [1], [Support statistics collecting for all memory profiling])
398   AC_MSG_WARN([This option will effect your performance])
401 if test x${que} = xyes; then
402   statistics_list="${statistics_list} queues"
403   AC_DEFINE(USE_STATS_QUEUE, [1], [Support statistics collecting for the queues])
406 if test x${cache} = xyes; then
407   statistics_list="${statistics_list} cache"
408   AC_DEFINE(USE_STATS_CACHE, [1], [Support statistics collecting for the cache])
411 dnl this is just so Makefile can print the same list
412 STATISTICS_LIST="$statistics_list"
413 AC_SUBST(STATISTICS_LIST)
416 # These settings are compile time options for the security
417 # setting for anything that lets gnash exchange data with
418 # other applications. Currently this only supports Shared
419 # Objects and Local Connections. Shared Objects are like
420 # your web browsers cookies, and Local Connections use
421 # shared memory to execute methods remotely, and to
422 # exchange data.
424 # The default is to enable everything, and these can
425 # also be controlled dynamically by the $HOME/.gnashrc
426 # file.
428 solreadonly=no
429 localconnection=yes
430 lctrace=yes
432 AC_ARG_WITH(security,
433   AC_HELP_STRING([--with-security=], [Specify which security features to enable]),
434   if test -n ${withval}; then
435     if test "x${withval}" != "xno"; then
436       extlist="${withval}"
437       withval=`echo ${withval} | tr '\054' ' ' `
438     else
439       extlist=""
440       withval=""
441     fi
442   fi
443   security_list=""
444   nsecurity=0
445   while test -n "${withval}" ; do
446     val=`echo ${withval} | cut -d ' ' -f 1`
447 dnl    security_list="${security_list} ${val}"
448     [case "${val}" in
449       solreadonly)
450         solreadonly=yes
451         nsecurity=$((nsecurity+1))
452         ;;
453       lc)
454         localconnection=yes
455         nsecurity=$((nsecurity+1))
456         ;;
457       lctrace)
458         lctrace=yes
459         nsecurity=$((nsecurity+1))
460         ;;
461       all|ALL)
462         solreadonly=yes
463         lc=yes
464         lctrace=yes
465         nsecurity=3
466         ;;
467       *) AC_MSG_ERROR([invalid security feature specified: ${withval} given (accept: solreadonly|lc|lctrace)])
468         ;;
469       esac]
470     withval=`echo ${withval} | cut -d ' ' -f 2-6`
471     if test "x$val" = "x$withval"; then
472       break;
473     fi
474   done
476 if test xlctrace = xyes; then
477   security_list="${security_list} lctrace"
478   AC_DEFINE(USE_LC_TRACE, [1],
479            [Support LocalConnection])
480   AC_MSG_NOTICE([This build supports LocalConnection tracing])
481   AC_MSG_WARN([This option will effect your performance])
484 if test x$localconnection = xyes; then
485   security_list="${security_list} localconnection"
486   AC_DEFINE(USE_LC, [1],
487                  [Support LocalConnection])
488   AC_MSG_NOTICE([This build supports LocalConnection])
490 if test x$solreadonly = xyes; then
491   security_list="${security_list} solreadonly"
492   AC_DEFINE(USE_SOL_READONLY, [1],
493                  [Shared Objects are read-only])
494   AC_MSG_NOTICE([Shared Objects are read-only])
496 SECURITY_LIST="$security_list"
497 AC_SUBST(SECURITY_LIST)
499 dnl For Haiku, we know the sysroot is in a non-standard place
500 dnl it is important that -lagg comes before -lbe
501 if test x"${haiku}" = xyes; then
502   HAIKU_LIBS=-lbe
503   AC_SUBST(HAIKU_LIBS)
506 DLOPEN="-dlopen"
507 DLPREOPEN="-dlpreopen"
508 AC_SUBST(DLOPEN)
509 AC_SUBST(DLPREOPEN)
511 dnl dnl Substitute INCLTDL and LIBLTDL in the Makefiles
512 AC_SUBST(INCLTDL)
513 AC_SUBST(LIBLTDL)
514 AC_SUBST(LIBTOOL_DEPS)
516 dnl Darwin uses libtool instead of ar to produce libraries. We determine which one
517 dnl we have here now. For some reason on Darwin, we don't get the
518 dnl count from grep via stdin correctly. Writing a temp file does the
519 dnl trick, so although it's ugly, that's what we gotta do...
520 AC_MSG_CHECKING([which type of library archiver we have])
521 rm -f .tmp
522 libtool > .tmp 2>&1
523 archiver=`grep -c dynamic .tmp 2>&1`
524 rm -f .tmp
525 dnl is there any good way to report what we found here?
526 AC_MSG_RESULT()
527 if test x"${archiver}" != x && test "${archiver}" -eq 1; then
528 dnl   if test "$enable_shared" = no; then
529 dnl     AR="libtool -static"
530 dnl   else
531 dnl     AR="libtool -dynamic"
532 dnl     CXXFLAGS="${CXXFLAGS} -dynamic"
533    export MACOSX_DEPLOYMENT_TARGET="10.3"
534 dnl   fi
535 dnl   AR_FLAGS="-o"
536    darwin=yes
537 else
538    darwin=no
541 dnl When cross compiling, limit the search directories cause otherwise
542 dnl we may get the host headers or libraries by accident. These values
543 dnl are exported, so all the other configure tests in macros/*.m4 use
544 dnl these same settings rather than duplicating them like we used to.
545 dnl To override thise, use the --with-*-incl= and --with-*-libs=
546 dnl options to configure.
547 if test x$cross_compiling = xyes; then
548   AC_MSG_NOTICE([Configuring Gnash for cross compilation])
549   export pkgroot="`$CXX -print-search-dirs | grep "install:" | sed -e 's/install: //' -e 's:/lib/gcc/.*::'`"
550   dnl pkgroot only works correctly with builds of cross tools not in
551   dnl /usr, ie... installed from the distribution packages, or just
552   dnl plain installed in the system tools. This contaminates configure
553   dnl when building for variations of the same basic architecture,
554   dnl like i686-linux -> i586-mingw32.
555   if test x${pkgroot} = "/usr"; then
556     export pkgroot=""
557   fi
558   export incllist="`eval echo ${with_top_level}/include ${pkgroot}/${host_alias}/include ${pkgroot}/include`"
559   export libslist="`eval echo ${with_top_level}/lib ${pkgroot}/${host_alias}/lib ${pkgroot}/lib64 ${pkgroot}/lib32 ${pkgroot}/lib`"
560   export pathlist="`eval echo ${pkgroot}/${host_alias}/bin:${pkgroot}/bin`"
561   npapi=no
562 else
563   AC_MSG_NOTICE([Configuring Gnash for native compilation])
564   export incllist="`eval cat ${srcdir}/macros/incllist`"
565   export libslist="`eval cat ${srcdir}/macros/libslist`"
566   export pathlist=$PATH
569 if test x"${android_ndk}" != xno; then
570    incllist="${android_ndk}/include ${incllist}"
573 AM_CONDITIONAL(CROSS_COMPILING, [ test x$cross_compiling = xyes ])
575 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
576 dnl !! 
577 dnl !! IMPORTANT NOTICE 
578 dnl !!
579 dnl !!  Any call to GNASH_PATH_XXX must be be given *after* this snippet.
580 dnl !!  This is to ensure that PKG_CONFIG, cross_compiling and incllist are
581 dnl !!  properly set at the time of call.
582 dnl !!
583 dnl !!  Also GNASH_PKG_FIND has to be called later. Not sure
584 dnl !!  why but calling before breaks detection of CPP (see
585 dnl !!  gnash-dev mailing archives for June 12 2009
586 dnl !!  http://lists.gnu.org/archive/html/gnash-dev/2009-06/index.html
587 dnl !! 
588 dnl !! 
589 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
591 dnl Check for PKG_CONFIG before any GNASH_PATH call
592 PKG_PROG_PKG_CONFIG
594 dnl --------------------------------------------------------
595 dnl  GUI selection
596 dnl --------------------------------------------------------
598 has_gtk2=no        dnl FIXME: has_* shouldn't be in configure but in a macro
599 build_haiku=no
600 build_aos4=no      dnl AmigaOS4 GUI
601 build_kde3=no
602 build_kde4=no
603 build_qtopia3=no
604 build_qtopia4=no
605 build_gtk=no
606 build_qt3=no
607 build_qt4=no
608 build_fb=no                     dnl Raw framebuffer
609 build_fltk=no
610 build_sdl=no
611 build_riscos=no                 dnl Native OS2 GUI
612 build_aqua=no                   dnl Native MacOSX
613 build_hildon=no                 dnl Native LIMO
614 build_alp=no                    dnl Acess Linux Platform using Hiker
615 build_dump=no
616 AC_ARG_ENABLE(gui,
617   AC_HELP_STRING([--enable-gui=], [Enable support for the specified GUI toolkits (default=gtk,kde4)]),
618   [if test -n ${enableval}; then
619     enableval=`echo ${enableval} | tr '\054' ' ' `
620   fi
621   while test -n "${enableval}" ; do
622     val=`echo ${enableval} | cut -d ' ' -f 1`
623     case "${val}" in
624       hildon|HILDON|hildon2|HILDON2)
625         build_hildon=yes
626         AC_DEFINE(USE_HILDON, [1], [Use the Hildon mobile framework])
627         build_gtk=yes
628         ;;
629       alp|ALP|alp|ALP)
630         build_alp=yes
631         build_gtk=yes
632         ;;
633       gtk|GTK|gtk2|GTK2)
634         build_gtk=yes
635         ;;
636       kde3|KDE3)
637         build_qt3=yes
638         build_kde3=yes
639         ;;
640       kde4|KDE4)
641         build_qt4=yes
642         build_kde4=yes
643         ;;
644       qtopia3|QTOPIA3)
645         build_qtopia3=yes
646         build_qt3=yes
647         ;;
648       qtopia4|QTOPIA4)
649         build_qtopia4=yes
650         build_qt4=yes
651         ;;
652       qt3|QT3)
653         build_qt3=yes
654         ;;
655       qt4|QT4)
656         build_qt4=yes
657         ;;
658       sdl|SDL)
659         build_sdl=yes
660         ;;
661       aqua|AQUA|Aqua)
662         build_aqua=yes
663         ;;
664       riscos|RISCOS|RiscOS)
665         build_riscos=yes
666         ;;
667       fltk|FLTK|fltk2|FLTK2)
668         build_fltk=yes
669         ;;
670       fb|FB)
671         build_fb=yes
672         ;;
673       aos4|AOS4)
674         build_aos4=yes
675         ;;
676       haiku|HAIKU)
677         build_haiku=yes
678         ;;
679       dump|DUMP)
680         build_dump=yes
681         ;;
682       all|ALL)
683         build_dump=yes
684         build_fb=yes
685         build_fltk=yes
686         build_qt3=yes
687         build_kde3=yes
688         build_kde4=yes
689         build_qt4=yes
690         build_sdl=yes
691         ;;
692       *) AC_MSG_ERROR([invalid gui ${enableval} given (accept: gtk|kde3|kde4|fltk|sdl|riscos|aqua|fb|hildon|alp|qtopia3|qtopia4|dump|aos4|haiku)])
693          ;;
694       esac
695     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
696     if test "x$val" = "x$enableval"; then
697       break;
698     fi
699   done],
700   [if test x"${openbsd_os}" = x"openbsd"; then
701     build_kde3=yes;
702     build_qt3=yes;
703     build_gtk=yes;
704   else if test x"${haiku}" = xyes; then
705     build_haiku=yes;
706   else
707     build_kde4=yes;
708     build_qt4=yes;
709     build_gtk=yes;
710   fi
711   fi]
714 if test x"${build_haiku}" = xyes; then
715   if test x"$haiku" != xyes; then
716     echo "        ERROR: Can not build Haiku gui outside of Haiku
717 operating system." >&3
718   fi
721 dnl We can use Xephyr or fbe to create a fake framebuffer instead of real
722 dnl video memory. This lets us test on a desktop machine.
723 AC_ARG_WITH(fakefb,
724 AC_HELP_STRING([--with-fakefb],
725  [specify a file to be mapped instead of a real framebuffer]),
726  with_fakefb=${withval})
728 fakefb=
729 if test x"${with_fakefb}" = xyes; then
730   dnl This is the default file name fbe uses.
731   fakefb=/tmp/fbe_buffer
732 else
733   if test x"${with_fakefb}" != x; then
734     fakefb=${with_fakefb}
735   fi
737 FAKEFB=${fakefb}
738 AC_SUBST(FAKEFB)
740 if test x"${fakefb}" != x; then
741     AC_DEFINE(ENABLE_FAKE_FRAMEBUFFER, [1], [Enable using a file instead of a real framebuffer])
745 dnl --------------------------------------------------------
746 dnl  Sound handler selection
747 dnl --------------------------------------------------------
748 add_sound=
749 build_sound_sdl=no
750 build_sound_ahi=no
751 build_sound_mkit=no
752 AC_ARG_ENABLE(sound,
753   AC_HELP_STRING([--enable-sound=[[sdl|ahi|mkit]]], [Use the specified sound handler (default=sdl)]),
754      [case "${enableval}" in
755       sdl|SDL|Sdl)
756         build_sound_sdl=yes
757         add_sound="sdl"
758         ;;
759       ahi|AHI|Ahi)
760         build_sound_ahi=yes
761         add_sound="ahi"
762         ;;
763       mkit|MKIT|Mkit)
764         build_sound_mkit=yes
765         add_sound="mkit"
766         ;;
767      esac],
768   [if test x"${haiku}" = xyes; then
769      build_sound_mkit=yes
770      add_sound="mkit"
771    else
772      build_sound_sdl=yes
773      add_sound=sdl
774    fi]
778 dnl --------------------------------------------------------
779 dnl  Media handler selection
780 dnl --------------------------------------------------------
781 build_media_gst=no
782 build_media_ffmpeg=no
783 AC_ARG_ENABLE(media,
784   AC_HELP_STRING([--enable-media=handler],
785     [Enable media handling support using the specified handler: gst, ffmpeg or none (no sound) [[gst]] ]),
786   
787     if test -n ${enableval}; then
788       enableval=`echo ${enableval} | tr '\054' ' ' `
789     fi
790     while test -n "${enableval}"; do
791       val=`echo ${enableval} | cut -d ' ' -f 1`
792       [case "${val}" in
793         GST|gst)
794           build_media_gst=yes
795           media_list="${media_list}gst "
796           ;;
797         FFMPEG|ffmpeg)
798           build_media_ffmpeg=yes
799           media_list="${media_list}ffmpeg "
800           ;;
801         no|NO|none)
802           media_list="none"
803           ;;
804         *)
805           AC_MSG_ERROR([bad value ${enableval} for --enable-media option])
806           ;;
807      
808       esac]
809       enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
810       if test "x$val" = "x$enableval"; then
811         break;
812       fi
813     done,
814     [if test x"${build_haiku}" = xyes; then
815         build_media_ffmpeg=yes
816         build_media_haiku=yes
817         media_list="ffmpeg haiku"
818      else
819         build_media_gst=yes
820         media_list="gst"
821     fi]
824 MEDIA_CONFIG="${media_list}"
825 AC_SUBST(MEDIA_CONFIG)
827 dnl if no media handler is selected, default to Gstreamer.
828 if test x"$build_media_ffmpeg" = x"no" -a x"$build_media_gst" = x"no"; then
829    build_media_gst=yes
832 if test x"$build_media_ffmpeg" = x"yes"; then
833   GNASH_PATH_FFMPEG
836 dnl -------------------------------
837 dnl Input Device selection
838 dnl -------------------------------
840 dnl Multiple input devices are supported. These can all work in
841 dnl varying combinations, so several may be listed. These are only
842 dnl required when using the Framebuffer, as without the X11 desktop,
843 dnl Gnash has to handle all these internally. This can get
844 dnl messy, as one might want to use a touchscreen with a normal mouse
845 dnl or keyboard attached. 
846 dnl By default, don't build any of these, as they are only for the Framebuffer
847 dnl running without X11.
848 if test x"${build_fb}" = xyes; then
849 build_ps2mouse=yes
850 build_ps2keyboard=no
851 build_input_events=yes
852 build_tslib=yes
853 input_events="PS/2 Mouse, Input Devices, Touchscreen via Tslib"
854 else
855 build_ps2mouse=no
856 build_ps2keyboard=no
857 build_input_events=no
858 build_tslib=no
859 input_events=
861 AC_ARG_ENABLE(input,
862   AC_HELP_STRING([--enable-input=], [Enable support for the specified input devices for the framebuffer GUI (default=ps2mouse|ps2keyboard|events|touchscreen)]),
863   [if test -n ${enableval}; then
864     enableval=`echo ${enableval} | tr '\054' ' ' `
865   fi
866   while test -n "${enableval}" ; do
867     val=`echo ${enableval} | cut -d ' ' -f 1`
868     case "${val}" in
869       ps2m*|PS2m*|m*|M*)        dnl a PS/2 style mouse
870         build_ps2mouse=yes
871         input_events="${input_events}, PS/2 Mouse"
872         ;;
873       ps2k*|PS2K*|k*|K*)        dnl a PS/2 style keyboard
874         build_ps2keyboard=yes
875         input_events="${input_events}, PS/2 Keyboard"
876         ;;
877       i*|I*|ev*|Ev*)    dnl use the new Input Event, which supports both
878         input_events="${input_events}, Input Event Device"
879         build_input_events=yes
880         ;;
881       t*|T*) dnl use a touchscreen with tslib, which works like a mouse
882         build_tslib=yes
883         input_events="${input_events}, Touchscreen"
884         ;;
885       *) AC_MSG_ERROR([invalid input device list! ${enableval} given (accept: ps2mouse|keyboard|events,touchscreen)])
886          ;;
887       esac
888     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
889     if test "x$val" = "x$enableval"; then
890       break;
891     fi
892   done],
895 if test x"${build_tslib}" = xyes; then
896   AC_DEFINE(USE_TSLIB, [1], [Use a tslib supported touchscreen])
897   GNASH_PKG_FIND(ts, [tslib.h], [Touchscreen library], ts_config)
899 AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} != xno])
901 if test x"${build_ps2mouse}" = xyes; then
902   AC_DEFINE(USE_MOUSE_PS2, [1], [Add support for a directly using a PS/2 Mouse])
904 AM_CONDITIONAL(ENABLE_MOUSE, [test x"${build_ps2mouse}" = xyes])
906 if test x"${build_ps2keyboard}" = xyes; then
907   AC_DEFINE(USE_KEYBOARD_PS2, [1], [Add support for directly using a PS/2 Keyboard])
909 if test x"${build_input_events}" = xyes; then
910   AC_DEFINE(USE_INPUT_EVENTS, [1], [Add support for a directly using Linux Input Event Devices])
912 AM_CONDITIONAL(ENABLE_INPUT_EVENTS, [test x"${build_input_events}" = xyes])
913 dnl this is enabled if we have any input devices at all
914 AM_CONDITIONAL(ENABLE_INPUT_DEVICES, [test x"${input_events}" != x])
916 dnl -------------------------------
917 dnl Renderer Selection
918 dnl -------------------------------
919 input_events=
920 dnl By default, we want to to build all renderers
921 build_ovg=no
922 build_gles=no
923 build_ogl=yes
924 build_agg=yes
925 build_cairo=yes
926 renderer_list="OpenGL AGG Cairo"
927 nrender=3
928 AC_ARG_ENABLE(renderer,
929   AC_HELP_STRING([--enable-renderer=], [Enable support for the specified renderers (ogl|gles|cairo|agg|all, default=all)]),
930   if test -n ${enableval}; then
931     if test "x${enableval}" != "xno" -o "x${enableval}" != "xnone" ; then
932       renderer_list="none"
933       enableval=`echo ${enableval} | tr '\054' ' ' `
934     else
935       renderer_list=""
936       enableval=""
937     fi
938   fi
939   renderer_list=""
940   nrender=0
941   build_ovg=no
942   build_ogl=no
943   build_gles=no
944   build_agg=no
945   build_cairo=no
946   while test -n "${enableval}" ; do
947     val=`echo ${enableval} | cut -d ' ' -f 1`
948     [case "${val}" in
949       no*|NO*)
950         renderer_list="none"
951         build_ovg=no
952         build_ogl=no
953         build_gles=no
954         build_agg=no
955         build_cairo=no
956         nrender=1
957         ;;
958       all|ALL)
959         renderer_list="OpenGL, Cairo, AGG"
960         build_ogl=yes
961         build_agg=yes
962         build_cairo=yes
963         build_ovg=yes
964         nrender=4
965         ;;
966       ogl|OGL|OpenGL|opengl)
967         renderer_list="${renderer_list} OpenGL"
968         build_gles=no
969         build_ogl=yes
970         nrender=$((nrender+1))
971         ;;
972       gles|GLES|GL-ES|gl-es)
973         renderer_list="${renderer_list} OpenGL-ES"
974         build_gles=yes
975         build_ogl=no
976         nrender=$((nrender+1))
977         ;;
978       ovg|OVG|OpenVG|openvg)
979         renderer_list="${renderer_list} OpenVG"
980         build_ogv=yes
981         nrender=$((nrender+1))
982         ;;
983       agg|AGG)
984         renderer_list="${renderer_list} AGG"
985         build_agg=yes
986         nrender=$((nrender+1))
987         ;;
988       cairo|CAIRO|Cairo*)
989         renderer_list="${renderer_list} Cairo"
990         build_cairo=yes
991         nrender=$((nrender+1))
992         ;;
993       *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept:  (ogl|cairo|agg|all)])
994         ;;
995       esac]
996     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
997     if test "x$val" = "x$enableval"; then
998       break;
999     fi
1000   done
1002 dnl 16 bit: RGB555, RGB565
1003 dnl 24 bit: RGB24, BGR24
1004 dnl 32 bit: RGBA32, BGRA32
1005 pixelformat=all
1006 AC_ARG_WITH(pixelformat,
1007   AC_HELP_STRING([--with-pixelformat=], [Use the specified pixel format for AGG (default=all)]),
1008   [if test -n ${withval}; then
1009     pixelformat="${withval}"
1010     withval=`echo ${withval} | tr '\054' ' ' `
1011   fi
1012   while test -n "${withval}" ; do
1013     val=`echo ${withval} | cut -d ' ' -f 1`
1014     case "${val}" in
1015       all)
1016         # allow special value "all" set by user (handled below)
1017         ;; 
1018       argb32|ARGB32)
1019         AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32])
1020         ;;
1021       abgr32|ABGR32)
1022         AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32])
1023         ;;
1024       bgra32|BGRA32)
1025         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
1026         ;;
1027       bgr24|BGR24)
1028         AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24])
1029         ;;
1030       rgba32|RGBA32)
1031         AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32])
1032         ;;
1033       rgb24|RGB24)
1034         AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24])
1035         ;;
1036       rgb555|RGB555)
1037         AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555])
1038         ;;
1039       rgb565|RGB565)
1040         AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565])
1041         ;;
1042       *) AC_MSG_ERROR([invalid pixel format ${withval} given (accept: all|RGB555|RGB565|RGB24|BGR24|BGRA32|RGBA32|ARGB32|ABGR32)])
1043          ;;
1044       esac
1045     withval=`echo ${withval} | cut -d ' ' -f 2-6`
1046     if test "x$val" = "x$withval"; then
1047       break;
1048     fi
1049   done],
1050   [if test x$build_haiku = xyes -a x$build_sdl != xyes; then
1051         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
1052         pixelformat=BGRA32
1053    fi]
1056 if test x$pixelformat = xall; then
1057   if test x$build_agg = xyes; then
1058     ### The fact that we're building GTK doesn't mean we're not also
1059     ### building KDE or SDL, each needing its own pixel format !
1060     #if test x$build_gtk = xyes; then
1061     #  AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24 pixel format])
1062     #  pixelformat="RGB24"
1063     #else
1064       AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555 pixel format])
1065       AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565 pixel format])
1066       AC_DEFINE(PIXELFORMAT_RGB24,  [1], [RGB24 pixel format])
1067       AC_DEFINE(PIXELFORMAT_BGR24,  [1], [BGR24 pixel format])
1068       AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32 pixel format])
1069       AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32 pixel format])
1070       AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32 pixel format])
1071       AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32 pixel format])
1072     #fi
1073   fi
1076 AM_CONDITIONAL(BUILD_OVG_RENDERER, [ test x$build_ovg = xyes ])
1077 AM_CONDITIONAL(BUILD_GLES_RENDERER, [ test x$build_gles = xyes ])
1078 AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x$build_ogl = xyes])
1079 AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x$build_agg = xyes ])
1080 AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x$build_cairo = xyes ])
1082 if test x"${build_ogl}" = xyes; then
1083    AC_DEFINE([RENDERER_OPENGL], [], [Use OpenGL renderer])
1086 if test x"$build_agg" = xyes; then
1087   AC_DEFINE([RENDERER_AGG], [], [Use AntiGrain renderer])
1090 if test x"$build_cairo" = xyes; then
1091   GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1092   AC_DEFINE([RENDERER_CAIRO], [], [Use cairo renderer])
1095 if test x"${build_agg}" = xyes; then
1096    GNASH_PATH_AGG
1099 dnl VA API is used by default for all H.264 videos. HW requirements:
1100 dnl     * AMD GPUs with UVD2 and xvba-video VA driver
1101 dnl     * NVIDIA GPUs with vdpau-video VA driver
1102 dnl     * All HW with a VA driver supporting the VA/GLX extensions or
1103 dnl     vaPutSurface(Pixmap,...). This may include the Intel
1104 dnl     Moorestown platform and future G45 VA driver.
1105 dnl NOTE: it is possible to use Gnash/VAAPI on platforms with an Intel
1106 dnl GMA500 but you currently will have to build the AGG renderer
1107 dnl instead of the OGL (OpenGL) one. 
1109 build_xv=yes
1110 build_vaapi=yes
1111 hwaccel_list="VAAPI XVideo"
1112 nhwaccel=2
1113 AC_ARG_ENABLE(hwaccel,
1114   AC_HELP_STRING([--enable-hwaccel], [Specify which accleration to support to enable (none,vaapi,omap)]),
1115   if test -z ${enableval}; then
1116       hwaccel_list="none"
1117       nhwaccel=1
1118       enableval=""
1119   fi
1120   while test -n "${enableval}" ; do
1121     val=`echo ${enableval} | cut -d ' ' -f 1`
1122     [case "${val}" in
1123       no*|NO*)
1124         hwaccel_list="none"
1125         build_vaapi=no
1126         build_omap=no
1127         dnl build_xv=no
1128         nhwaccel=0
1129         ;;
1130       va*|VA*)
1131         hwaccel_list="${hwaccel_list} vaapi"
1132         build_vaapi=yes
1133         nhwaccel=$((nhwaccel+1))
1134         ;;
1135       xv*|XV*|Xv*)
1136         hwaccel_list="${hwaccel_list} XVideo"
1137         dnl build_xv=yes
1138         nhwaccel=$((nhwaccel+1))
1139         ;;
1140       all|ALL)
1141         hwaccel_list="XVideo VAAPI OMAP"
1142         nhwaccel=3
1143         build_omap=yes
1144         build_vaapi=yes
1145         dnl build_xv=yes
1146         ;;
1147       omap*|OMAP*)
1148         hwaccel_list="${hwaccel_list} omap"
1149         build_omap=yes
1150         nhwaccel=$((nhwaccel+1))
1151         ;;
1152       *) AC_MSG_ERROR([invalid hwaccel feature specified: ${enableval} given (accept: none,vaapi,omap)])
1153         ;;
1154       esac]
1155     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1156     if test "x$val" = "x$enableval"; then
1157       break;
1158     fi
1159   done
1162 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi}" = x"yes"; then
1163   use_libva=no
1164   use_libva_x11=no
1165   use_libva_glx=no
1166   dnl if the version of FFmpeg is recent enough, (r20957, 52.45.0), then
1167   dnl look for VAAPI support so we can use use the VAAPI enabled FFmpeg.
1168   if test x"${have_ffmpeg_vaapi}" = xyes; then
1169     use_libva=yes
1170     GNASH_PKG_FIND([libva],
1171       [va/va.h],
1172       [Video Acceleration API],
1173       vaInitialize
1174     )
1176     use_libva_x11=yes
1177     GNASH_PKG_FIND([libva_x11],
1178       [va/va_x11.h],
1179       [VA API (X11 display)],
1180       vaGetDisplay,
1181       [], [-lva-x11]
1182     )
1184     if test x$build_ogl = xyes; then
1185       use_libva_glx=yes
1186       GNASH_PKG_FIND([libva_glx],
1187         [va/va_glx.h],
1188         [VA API (GLX display)],
1189         vaGetDisplayGLX,
1190         [], [-lva-glx]
1191       )
1192     fi
1193   fi
1196 dnl libVA drivers. We declare conditional for both the option being
1197 dnl selected, as well as whether or not it's found. This we can
1198 dnl generate better error handling if it's not found.
1199 AM_CONDITIONAL(BUILD_OMAP, test x"${build_omap}" = xyes)
1200 AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
1202 dnl Only build the vaapi support if we have a version of FFmpeg that
1203 dnl supports it.
1204 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${found_libva_incl}" = xyes; then
1205   build_vaapi=yes
1206   hwaccel_list="VAAPI XVideo"
1207   nhwaccel=2
1208 else
1209   build_vaapi=no
1210   hwaccel_list="XVideo"
1211   nhwaccel=1
1214 dnl Until the hwaccel patches in FFmpeg wind up in the ffmpeg-plugin,
1215 dnl restrict using HW Accel to using FFmpeg directly.
1216 dnl test xyes = xyes -a ( x != xyes -o x != xyes )
1217 if test x"${build_vaapi}" = x"yes" -a x"${have_ffmpeg}" != x"yes"; then
1218   AC_MSG_ERROR(["Hardware acceleration currently not supported unless using FFmpeg."])
1221 AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes)
1222 AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes)
1223 AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes)
1226 AC_PATH_PROG(PERL, perl)
1227 AM_CONDITIONAL(HAVE_PERL, test x"$PERL" != x)
1229 AC_PATH_PROG(CSOUND, csound)
1230 AM_CONDITIONAL(HAVE_CSOUND, test x"$CSOUND" != x)
1232 dnl -------------------------------------
1233 dnl LIRC
1234 dnl -------------------------------------
1235 AC_ARG_ENABLE(lirc, AC_HELP_STRING([--enable-lirc], [Disable support for Lirc]),
1236 [case "${enableval}" in
1237   yes) lirc=yes ;;
1238   no)  lirc=no ;;
1239   *)   AC_MSG_ERROR([bad value ${enableval} for enable-lirc option]) ;;
1240 esac], lirc=no)
1242 if test x"$lirc" = x"yes"; then
1243   AC_DEFINE([USE_LIRC], [], [LIRC daemon support])
1245 AM_CONDITIONAL(USE_LIRC, test x$lirc = xyes)
1247 dnl --------------------------------------------------------
1248 dnl Extension selection
1249 dnl --------------------------------------------------------
1250 extensions_list=
1251 ext_dejagnu=no
1252 ext_mysql=no
1253 ext_fileio=no
1254 ext_gtk=no
1255 ext_lirc=no
1256 ext_dbus=no
1257 ext_all=no
1258 ext_launcher=no
1259 AC_ARG_ENABLE(extensions,
1260   AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build]),
1261   if test -n ${enableval}; then
1262     if test "x${enableval}" != "xno"; then
1263       extlist="${enableval}"
1264       enableval=`echo ${enableval} | tr '\054' ' ' `
1265     else
1266       extlist=""
1267       enableval=""
1268     fi
1269   fi
1270   nextensions=0
1271   while test -n "${enableval}" ; do
1272     val=`echo ${enableval} | cut -d ' ' -f 1`
1273     extensions_list="${extensions_list} ${val}"
1274     [case "${val}" in
1275       dejagnu|DEJAGNU|dj|DJ)
1276         AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension])
1277         AC_MSG_NOTICE([Adding DejaGnu extension])
1278         ext_dejagnu=yes
1279         nextensions=$((nextensions+1))
1280         ;;
1281       mysql|MYSQL|sql|SQL)
1282         AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension])
1283         AC_MSG_NOTICE([Adding MySql extension])
1284         ext_mysql=yes
1285         nextensions=$((nextensions+1))
1286         ;;
1287       fileio|FILEIO|io|IO)
1288         AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension])
1289         AC_MSG_NOTICE([Adding FileIO extension])
1290         ext_fileio=yes
1291         nextensions=$((nextensions+1))
1292         ;;
1293       gtk|GTK|gtk2|GTK2)
1294         AC_DEFINE(USE_GTK_EXT, [1], [Build the GTK extension])
1295         ext_gtk=yes
1296         nextensions=$((nextensions+1))
1297         ;;
1298       launcher|LAUNCHER)
1299         AC_DEFINE(USE_LAUNCHER_EXT, [1], [Build the Launcher extension])
1300         ext_launcher=yes
1301         nextensions=$((nextensions+1))
1302         ;;
1303       lirc|LIRC)
1304         AC_DEFINE(USE_LIRC_EXT, [1], [Build the LIRC extension])
1305         ext_lirc=yes
1306         nextensions=$((nextensions+1))
1307         ;;
1308       dbus|DBUS)
1309         AC_DEFINE(USE_DBUS_EXT, [1], [Build the DBUS extension])
1310         ext_dbus=yes
1311         nextensions=$((nextensions+1))
1312         ;;
1313       all|ALL)
1314         AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions])
1315         ext_dejagnu=yes
1316         ext_mysql=yes
1317         ext_fileio=yes
1318         ext_gtk=yes
1319         ext_lirc=yes
1320         ext_dbus=yes
1321         ext_launcher=yes
1322         ext_all=yes
1323         nextensions=9
1324         ;;
1325       *) AC_MSG_ERROR([invalid extension specified: ${enableval} given (accept: MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)])
1326          ;;
1327       esac]
1328     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1329     if test "x$val" = "x$enableval"; then
1330       break;
1331     fi
1332   done
1333   EXTENSIONS_LIST="$extensions_list"
1334   AC_SUBST(EXTENSIONS_LIST)
1337 if test x$ext_dbus = xyes; then
1338   GNASH_PATH_DBUS
1341 if test x$ext_mysql = xyes; then
1342   GNASH_PATH_MYSQL
1345 AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ])
1346 AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ])
1347 AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ])
1348 AM_CONDITIONAL(BUILD_LAUNCHER_EXT, [ test x$ext_launcher = xyes ])
1349 AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
1350 AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
1351 AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
1352 AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
1354 GNASH_PKG_CLASSFILE
1356 dnl --------------------------------------------------------
1357 dnl SOL dir
1358 dnl --------------------------------------------------------
1359 soldir=/tmp
1360 AC_ARG_WITH(soldir,
1361  AC_HELP_STRING([--with-soldir],
1362  [directory for .sol files]),
1363  with_soldir=${withval})
1364 if test x${with_soldir} != x; then
1365   soldir=${with_soldir}
1367 SOLDIR=${soldir}
1368 AC_SUBST(SOLDIR)
1370 dnl --------------------------------------------------------
1371 dnl AVM2
1372 dnl --------------------------------------------------------
1373 AC_ARG_ENABLE(avm2,
1374   AC_HELP_STRING([--enable-avm2], [Enable support for AS3]),
1375   [case "${enableval}" in
1376     yes) avm2=yes ;;
1377     no)  avm2=no ;;
1378     *)   AC_MSG_ERROR([bad value ${enableval} for enable-avm2 option]) ;;
1379   esac], avm2=no
1381 AM_CONDITIONAL(ENABLE_AVM2, [test x"$avm2" = xyes])
1382 if test x$avm2 = xyes; then
1383     AC_DEFINE(ENABLE_AVM2, [1], [Enable AVM2 code])
1386 dnl This option is only used if you want Gnash to interwork with 
1387 dnl the Adobe player using the LocalConnection class.
1388 dnl lckey=0xdd3adabd
1389 AC_ARG_WITH(lckey,
1390  AC_HELP_STRING([--with-lckey],
1391  [shared memory key for your system]),
1392  with_lckey=${withval})
1394 if test x${with_lckey} != x; then
1395   lckey=${with_lckey}
1396 else
1397   lckey=0xcbc384f8
1399 LC_KEY=${lckey}
1400 AC_SUBST(LC_KEY)
1402 dnl FIXME: this should go away when gtk.cpp is cleaned up..
1403 AC_DEFINE([BUILD_CANVAS], [], [Build GTK Canvas support for the GTK Widget ])
1405 AC_ARG_ENABLE(python,
1406   AC_HELP_STRING([--enable-python],[Enable python for the python wrapper]),
1407 [case "${enableval}" in
1408   yes) python=yes ;;
1409   no)  python=no ;;
1410   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-python option]) ;;
1411 esac],python=no)
1413 dnl Look for python, which is optional. If enabled, a python loadable
1414 dnl module of Gnash is created.
1415 GNASH_PATH_PYTHON
1416 AM_CONDITIONAL([USE_PYTHON], test x"$python" = xyes)
1417 AM_CONDITIONAL([HAS_PYTHON], test x"$has_python" = xyes)
1419 # Maybe use jemalloc, which handles memory fragmentation for
1420 # ECAMscript languages better than the regular system malloc.
1421 # This seems like a good idea, as both the other player and
1422 # Mozilla/Firefox both recently switched to using jemalloc.
1423 AC_ARG_ENABLE(jemalloc,
1424   AC_HELP_STRING([--enable-jemalloc],[Enable jemalloc instead of system malloc]),
1425 [case "${enableval}" in
1426   yes) jemalloc=yes ;;
1427   no)  jemalloc=no ;;
1428   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-jemalloc option]) ;;
1429 esac],jemalloc=yes)
1431 dnl There is some weird stuff going on with NetBSD and jemalloc, so don't 
1432 dnl build it for now.
1433 if test x"${netbsd}" = x"yes" -o x"${windows}" = x"yes" -o x"${freebsd}" = x"yes" -o x"${haiku}" = x"yes" -o x"${gnu}" = x"yes"; then
1434   jemalloc=no
1436 dnl If the compiler doesn't have local thread storage enabled, don't try to
1437 dnl use jemalloc.
1438 if test x"${jemalloc}" = x"yes"; then
1439   AC_TRY_COMPILE([], [
1440     extern __thread int global_i; ],
1441     has_local_thread_storage=yes
1442   )
1443   if test x"${has_local_thread_storage}" = x"yes"; then
1444     AC_DEFINE([HAVE_LOCAL_THREAD_STORAGE], [1], [Has __thread (local thread storage) support])
1445     AC_DEFINE([USE_JEMALLOC], [], [Use jemalloc instead of system malloc])
1446   else
1447     jemalloc=no
1448   fi
1451 dnl We can search libs for mallinfo to decide whether we have it or not.
1452 dnl This is added to the linker flags when it's found. Usually it's -lc, but
1453 dnl on OpenSolaris it's -lmalloc, so this fixes the build.
1454 AC_SEARCH_LIBS([mallinfo], [c malloc],
1455                AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
1456                mallinfo=yes
1457                )
1459 AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes)
1460 AM_CONDITIONAL(JEMALLOC, test x$jemalloc = xyes)
1462 AC_ARG_ENABLE(debugger,
1463   AC_HELP_STRING([--enable-debugger],[Enable the Flash debugger]),
1464 [case "${enableval}" in
1465   yes) debugger=yes ;;
1466   no)  debugger=no ;;
1467   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-debugger option]) ;;
1468 esac],debugger=no)
1470 if test x"$debugger" = x"yes"; then
1471   AC_DEFINE([USE_DEBUGGER], [], [Flash Debugger support])
1473 AM_CONDITIONAL(DEBUGGER, test x$debugger = xyes)
1475 AC_ARG_ENABLE(fps-debug,
1476   AC_HELP_STRING([--enable-fps-debug],[Enable FPS debugging code]),
1477 [case "${enableval}" in
1478   yes) AC_DEFINE([GNASH_FPS_DEBUG], [1], [Enable FPS debugging code])
1479 esac])
1481 dnl When we're making binary releases, it's often nice to just statically link
1482 dnl the final executables so we don't worry about what's installed, or which
1483 dnl version it is.
1484 AC_ARG_ENABLE(allstatic,
1485   AC_HELP_STRING([--enable-allstatic],[Enable using static libraries when possible for dependencies]),
1486 [case "${enableval}" in
1487   yes) allstatic=yes ;;
1488   no)  allstatic=no ;;
1489   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-allstatic option]) ;;
1490 esac],allstatic=no)
1491 AM_CONDITIONAL(ALLSTATIC, test x$allstatic = xyes)
1494 dnl --------------------------------------------------------
1495 dnl SHM
1496 dnl --------------------------------------------------------
1497 AC_ARG_WITH(shm,
1498   AC_HELP_STRING([--with-shm],[specify a shared memory type.]),
1499   [case "${withval}" in
1500     sysv) with_shm=sysv
1501           ;;
1502     posix) with_shm=posix
1503           ;;    
1504     *)   AC_MSG_ERROR([bad value ${enableval} for --with-shm option (try sysv or posix])
1505           ;;
1506    esac],with_shm=sysv)
1508 if test x"${with_shm}" = x"sysv"; then
1509   AC_DEFINE([USE_SYSV_SHM], [1], [Use SYSV shared memory for compatability])
1510   dnl IPC_INFO isn't portable, and doesn't exist on BSD
1511   AC_TRY_COMPILE([#include <sys/ipc.h> #include <sys/shm.h>], [
1512     int flag = IPC_INFO; ],
1513     AC_DEFINE([HAVE_IPC_INFO], [1], [Use shm_info])
1514   )
1515 else
1516   AC_DEFINE([USE_POSIX_SHM], [1], [Use POSIX shared memory])
1519 dnl --------------------------------------------------------
1520 dnl Disable menus
1521 dnl --------------------------------------------------------
1522 dnl Don't add the GUI menu. Some educational systems think this adds
1523 dnl clutter and confusion, like on the OLPC.
1524 AC_ARG_ENABLE(menus,
1525   AC_HELP_STRING([--disable-menus],[Disable the GUI menus]),
1526 [case "${enableval}" in
1527   yes) menus=yes ;;
1528   no)  menus=no ;;
1529   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-menus option]) ;;
1530 esac],menus=yes)
1532 if test x"$menus" = x"yes"; then
1533   AC_DEFINE([USE_MENUS], [], [GUI Menu support])
1535 AM_CONDITIONAL(MENUS, test x$menus = xyes)
1537 dnl --------------------------------------------------------
1538 dnl Disable SWF information
1539 dnl --------------------------------------------------------
1540 dnl Don't gather SWF information in tree form. This takes
1541 dnl resources and memory that can be saved if there's no
1542 dnl need to examine SWF internals.
1543 AC_ARG_ENABLE(swftree,
1544   AC_HELP_STRING([--disable-swftree],[Disable showing SWF properties]),
1545 [case "${enableval}" in
1546   yes) swftree=yes ;;
1547   no)  swftree=no ;;
1548   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-swf-properties option]) ;;
1549 esac],swftree=yes)
1551 if test x"$swftree" = x"yes"; then
1552   AC_DEFINE([USE_SWFTREE], [], [View SWF information])
1554 AM_CONDITIONAL(SWFTREE, test x$swftree = xyes)
1556 dnl --------------------------------------------------------
1557 dnl Disable testsuite
1558 dnl --------------------------------------------------------
1559 dnl Disable running any tests for "make check". This may sound stupid, but
1560 dnl this option is designed to solely be used by maintainers in the 
1561 dnl DISTCHECK_CONFIGURE_FLAGS when building packages. Gnash's testing infrastructure
1562 dnl is complex, and often the the testsuites will work, but due to some obscure reason,
1563 dnl make distcheck fails.
1564 AC_ARG_ENABLE(testsuite,
1565   AC_HELP_STRING([--disable-testsuite],[Disable the testsuite, maintainers option only]),
1566 [case "${enableval}" in
1567   yes) testsuite=yes ;;
1568   no)  testsuite=no ;;
1569   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-testsuite option]) ;;
1570 esac],testsuite=yes)
1572 if test x"$testsuite" = x"yes"; then
1573   AC_DEFINE([USE_TESTSUITE], [], [Testsuite support, maintainers option only])
1575 AM_CONDITIONAL(TESTSUITE, test x$testsuite = xyes)
1577 dnl --------------------------------------------------------
1578 dnl Write the file to disk in the plugin
1579 dnl --------------------------------------------------------
1580 AC_ARG_ENABLE(write,
1581   AC_HELP_STRING([--enable-write], [Makes the Mozilla plugin write the currently playing SWF movie to /tmp.]),
1582 [case "${enableval}" in
1583   yes) write=yes ;;
1584   no)  write=no ;;
1585   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-write option]) ;;
1586 esac],write=no)
1588 if test x"$write" = x"yes"; then
1589   AC_DEFINE([WRITE_FILE], [], [Write files while streaming])
1592 dnl --------------------------------------------------------
1593 dnl Write a standalone gnash launcher to disk from the plugin
1594 dnl --------------------------------------------------------
1595 AC_ARG_ENABLE(sa-launcher,
1596   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.]),
1597 [case "${enableval}" in
1598   yes) sa_launcher=yes ;;
1599   no)  sa_launcher=no ;;
1600   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-sa-launcher option]) ;;
1601 esac],sa_launcher=yes)
1603 if test x"$sa_launcher" = x"yes"; then
1604   AC_DEFINE([CREATE_STANDALONE_GNASH_LAUNCHER], [], [Add support for writing a standalone executable launcher for movies embedded in web pages])
1607 dnl --------------------------------------------------------
1608 dnl Build the cygnal server if specified.
1609 dnl --------------------------------------------------------
1610 AC_ARG_ENABLE(cygnal,
1611   AC_HELP_STRING([--enable-cygnal], [Enable building of the Cygnal server]),
1612 [case "${enableval}" in
1613   yes) cygnal=yes ;;
1614   no)  cygnal=no ;;
1615   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cygnal option]) ;;
1616 esac],cygnal=no)
1617 AM_CONDITIONAL(CYGNAL, test x$cygnal = xyes)
1619 dnl --------------------------------------------------------
1620 dnl Build the cgibins server if specified.
1621 dnl --------------------------------------------------------
1622 AC_ARG_ENABLE(cgibins,
1623   AC_HELP_STRING([--enable-cgibins], [Enable building of the CGIs for Cygnal]),
1624 [case "${enableval}" in
1625   yes) cgibin=yes ;;
1626   no)  cgibin=no ;;
1627   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cgibins option]) ;;
1628 esac],cgibin=yes)
1629 AM_CONDITIONAL(USE_CGI, test x$cgibin = xyes)
1630 if test x"${cgibin}" = x"yes"; then
1631   AC_DEFINE([USE_CGIBIN], [1], [Enable cgi-bin processes for Cygnal])
1634 dnl --------------------------------------------------------
1635 dnl Fix the Intel 810 LOD bias problem
1636 dnl --------------------------------------------------------
1637 AC_ARG_ENABLE(i810-lod-bias,
1638   AC_HELP_STRING([--enable-i810-lod-bias], [Enable fix for Intel 810 LOD bias problem]),
1639 [case "${enableval}" in
1640   yes) i810lodbias=yes ;;
1641   no)  i810lodbias=no ;;
1642   *)   AC_MSG_ERROR([bad value ${enableval} for enable-i810-lod-bias option]) ;;
1643 esac])
1645 if test x"${i810lodbias}" = xyes; then
1646     AC_DEFINE([FIX_I810_LOD_BIAS], [], [Fix i810 LOD bias problem])
1649 dnl --------------------------------------------------------
1650 dnl  Double buffer
1651 dnl --------------------------------------------------------
1652 dnl Add an option for double buffering when rendering, currently only used by
1653 dnl the frmaebuffer GUI.
1654 dnl If defined, an internal software-buffer is used for rendering and is then
1655 dnl copied to the video RAM. This avoids flicker and is faster for complex 
1656 dnl graphics, as video RAM access is usually slower. (strongly suggested)
1657 AC_ARG_ENABLE(doublebuf,
1658   AC_HELP_STRING([--enable-doublebuf], [Enable support for double buffering when rendering]),
1659   [case "${enableval}" in
1660     yes) doublebuf=yes ;;
1661     no)  doublebuf=no ;;
1662     *)   AC_MSG_ERROR([bad value ${enableval} for enable-doublebuf option]) ;;
1663   esac], doublebuf=no
1665 AM_CONDITIONAL(ENABLE_DBUF, [test x"$doublebuf" = xyes])
1666 if test x$doublebuf = xyes; then
1667     AC_DEFINE(ENABLE_DOUBLE_BUFFERING, [1], [Enable double buffering])
1670 dnl --------------------------------------------------------
1671 dnl  Offscreen buffer
1672 dnl --------------------------------------------------------
1673 dnl This enables rendering to an offscreen buffer, instead of directly to window
1674 AC_ARG_ENABLE(offscreen,
1675   AC_HELP_STRING([--enable-offscreen], [Enable support for rendering offscreen]),
1676   [case "${enableval}" in
1677     yes) offscreen=yes ;;
1678     no)  offscreen=no ;;
1679     *)   AC_MSG_ERROR([bad value ${enableval} for enable-offscreen option]) ;;
1680   esac], offscreen=no
1684 dnl --------------------------------------------------------
1685 dnl  SSH support selection
1686 dnl --------------------------------------------------------
1687 dnl Enable using libssh with libnet
1688 AC_ARG_ENABLE(ssh,
1689   AC_HELP_STRING([--enable-ssh], [Enable using SSH for network authentication]),
1690 [case "${enableval}" in
1691   yes) build_ssh=yes ;;
1692   no)  build_ssh=no ;;
1693   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssh option]) ;;
1694 esac], build_ssh=no)
1696 AM_CONDITIONAL(BUILD_SSH, test x"${build_ssh}" = xyes)
1697 if test x"${build_ssh}" = xyes; then
1698   GNASH_PKG_FIND(ssh, [libssh/libssh.h], [libssh library], ssh_socket_init)
1699 dnl  GNASH_PKG_FIND(poppler, [popt.h], [Poppler library], poppler_init)
1701 if test x"${has_ssh}" = x"yes"; then
1702   AC_DEFINE([USE_SSH], [1], [Use SSH for authentication])
1705 dnl --------------------------------------------------------
1706 dnl  SSL support selection
1707 dnl --------------------------------------------------------
1709 dnl Enable using OpenSSL with libnet.
1710 AC_ARG_ENABLE(ssl,
1711   AC_HELP_STRING([--enable-ssl], [Enable using OpenSSL directly]),
1712 [case "${enableval}" in
1713   yes) build_ssl=yes ;;
1714   no)  build_ssl=no ;;
1715   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssl option]) ;;
1716 esac], build_ssl=no)
1718 with_cert=
1719 with_pem=
1720 AM_CONDITIONAL(BUILD_SSL, test x"${build_ssl}" = xyes)
1721 AC_ARG_WITH(cert,
1722   AC_HELP_STRING([--with-cert],
1723   [cert file for SSL]),
1724   with_cert=${withval})
1725 AC_ARG_WITH(pem,
1726   AC_HELP_STRING([--with-pe],
1727   [pem file for SSL]),
1728   with_pem=${withval})
1730 if test x"${build_ssl}" = xyes; then
1731   GNASH_PKG_FIND(ssl, [openssl/ssl.h], [OpenSSL library], SSL_library_init)
1733 if test x"${has_ssl}" = x"yes"; then
1734   AC_DEFINE([USE_SSL], [1], [Use SSL for authentication])
1737 dnl -----------------------------------------------------------
1738 dnl   Verify dependencies for requested GUIs are met, and
1739 dnl   disable build of the GUIS for which deps are NOT met
1740 dnl ------------------------------------------------------------
1742 dnl Look for scratchbox (used in GNASH_PATH_ALP)
1743 dnl FIXME: move it in macros/alp.m4 or at least after
1744 dnl        the build_alp conditional ?
1745 sbox=no
1746 if test x"${SBOX_REDIRECT_FROM_DIRS}" != x; then
1747   sbox=yes
1749 if test x"${build_alp}" = xyes; then
1750   GNASH_PATH_ALP
1751   if test x"${have_alp}" = x"yes"; then
1752     AC_DEFINE([HAVE_ALP], 1, [Access Linux Platform framework])
1753   fi
1754   dnl @@ It makes NO sense to set cross_compiling here,
1755   dnl @@ *after* it is used in conditionals above
1756   dnl @@ (AM_CONDITIONAL and directories search)
1757   dnl cross_compiling=yes
1758 dnl  build_gtk=yes
1759   build_kde3=no
1760   build_ogl=no
1761   build_gles=no
1762   build_agg=yes
1765 if test x$build_gtk = xyes -o $build_alp = xyes -o x$build_hildon = xyes; then
1766    GNASH_PATH_GTK2
1767    GNASH_PATH_PANGO
1768    GNASH_PKG_FIND(atk, [atk/atk.h], [atk library], atk_focus_tracker_init, [1.0])
1769    if test x"${build_ogl}" = xyes; then
1770       GNASH_PATH_GLEXT
1771    fi
1772    if test x"${build_cairo}" = xyes; then
1773       GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1774    fi
1776 if test x"${build_hildon}" = xyes; then
1777   GNASH_PATH_HILDON
1778   build_gtk=yes
1779   build_kde3=no
1780 dnl   build_ogl=no
1781 dnl   build_agg=yes
1783 dnl TODO: add checks for all other GUIs
1786 dnl -----------------------------------------------------------
1787 dnl Try to ignore stupid dependencies
1788 dnl -----------------------------------------------------------
1790 AC_MSG_CHECKING(linker --as-needed support)
1791 gcc_cv_ld_as_needed=no
1792 # Check if linker supports --as-needed and --no-as-needed options
1793 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1794   gcc_cv_ld_as_needed=yes
1796 if test x"$gcc_cv_ld_as_needed" = xyes; then
1797   LDFLAGS+=" -Wl,--as-needed"
1799 AC_MSG_RESULT($gcc_cv_ld_as_needed)
1801 dnl AC_MSG_CHECKING(linker --no-undefined support)
1802 dnl gcc_cv_ld_undef_needed=no
1803 dnl # Check if linker supports --no-undefined
1804 dnl if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1805 dnl     gcc_cv_ld_undef_needed=yes
1806 dnl fi
1807 dnl if test x"$gcc_cv_ld_undef_needed" = xyes; then
1808 dnl     LDFLAGS=" ${LDFLAGS} -Wl,--no-undefined"
1809 dnl fi
1810 dnl AC_MSG_RESULT($gcc_cv_ld_undef_needed)
1812 AC_DEFINE(USE_GIF, [1], [Use the GIF library])
1813 AC_DEFINE(USE_PNG, [1], [Use the PNG library])
1814 AM_CONDITIONAL(USE_GIF, true)
1815 AM_CONDITIONAL(USE_PNG, true)
1817 dnl GNASH_PKG_FIND(dmalloc, [dmalloc.h], [dmalloc], mallinfo)
1818 AM_CONDITIONAL(HAVE_DMALLOC, [ test x$has_dmalloc = xyes ])
1820 AC_PATH_TOOL([AUTOTRACE], [autotrace])
1821 AC_HEADER_DIRENT
1823 dnl -----------------------------------------------------------------
1824 dnl PLUGIN RELATED STUFF
1825 dnl -----------------------------------------------------------------
1827 dnl Zip is used insted of tar when building an xpi package
1828 dnl for Mozilla/Firefox.
1829 AC_PATH_PROG(ZIP, zip, ,[${pathlist}])
1831 dnl !! This has been moved here to make --enable-npapi work
1832 dnl !! All of plugin-related macro calls could be moved into
1833 dnl !! a specialized macros/plugin.m4
1835 dnl ----------------------------------------------------
1836 dnl Add KPARTS support, if specified or KDE gui is built
1837 dnl ----------------------------------------------------
1839 AC_ARG_ENABLE(kparts3,
1840   AC_HELP_STRING([--disable-kparts3], [Disable support for Konqueror 3.x plugin (default: enabled if kde3 gui is)]),
1841 [case "${enableval}" in
1842   yes) build_kparts3=yes ;;
1843   no)  build_kparts3=no ;;
1844   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts3 option]) ;;
1845 esac],build_kparts3=$build_kde3)
1847 dnl --------------------------------------------------------
1848 dnl Add KPARTS 4.x support, if specified or KDE gui is built
1849 dnl --------------------------------------------------------
1851 AC_ARG_ENABLE(kparts4,
1852   AC_HELP_STRING([--disable-kparts4], [Disble support for Konqueror 4.x plugin (default: enabled if kde4 gui is)]),
1853 [case "${enableval}" in
1854   yes) build_kparts4=yes ;;
1855   no)  build_kparts4=no ;;
1856   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts4 option]) ;;
1857 esac],build_kparts4=$build_kde4)
1859 dnl -----------------------------------------------------------
1860 dnl Add NPAPI support, if specified or GTK or KDE4 gui is built
1861 dnl -----------------------------------------------------------
1863 AC_ARG_ENABLE(npapi,
1864   AC_HELP_STRING([--disable-npapi], [Disable NPAPI plugin build (default: enabled if gtk or kde4 gui is)]),
1865   [case "${enableval}" in
1866     yes) npapi=yes ;;
1867     no)  npapi=no ;;
1868     *)   AC_MSG_ERROR([bad value ${enableval} for disable-npapi option]) ;;
1869   esac],
1870   if test x$build_gtk = xyes -o x$build_kde4 = xyes; then
1871     npapi=yes
1872   fi
1875 dnl -----------------------------------------------------------------
1876 dnl Enable us to disable building all browser plugins in one command.
1877 dnl -----------------------------------------------------------------
1879 AC_ARG_ENABLE(plugins,
1880   AC_HELP_STRING([--disable-plugins], [Disable all browser plugins from building (default=no)]),
1881   [case "${enableval}" in
1882     yes) plugins=yes ;;
1883     no)  plugins=no ;;
1884     *)   AC_MSG_ERROR([bad value ${enableval} for disable-plugins option]) ;;
1885   esac],
1886   plugins=yes
1888 if test x$plugins = xno; then
1889   npapi=no
1890   build_kparts3=no
1891   build_kparts4=no
1895 dnl Set the general plugins install policy here
1897 AC_ARG_WITH(plugins-install,
1898   AC_HELP_STRING([--with-plugins-install=system|user|prefix], [Policy for plugins install. Default: user.]),
1899         [case "${withval}" in
1900           user) PLUGINS_INSTALL_POLICY=user ;;
1901           system) PLUGINS_INSTALL_POLICY=system ;;
1902           prefix) PLUGINS_INSTALL_POLICY=prefix ;;
1903           *)  AC_MSG_ERROR([bad value ${withval} for --with-plugins-install]) ;;
1904          esac 
1905         ], PLUGINS_INSTALL_POLICY=user) 
1908 GNASH_PATH_FIREFOX
1910 dnl -----------------------------------------------------------------
1911 dnl END OF PLUGIN RELATED STUFF
1912 dnl -----------------------------------------------------------------
1914 dnl IRIX-hack.
1915 case $host in
1916   *-*-irix*)
1917   dnl ABI-check
1918   save_LIBS=$LIBS
1919   dir="/usr/lib /usr/lib32 /usr/lib/lib64"
1920   for i in $dir; do
1921     LIBS=-L$i
1922     AC_SEARCH_LIBS(XDisableAccessControl, X11, [
1923       xpathed=$i
1924       break
1925     ])
1926     unset ac_cv_search_XDisableAccessControl
1927   done
1928   ac_x_libraries=$xpathed
1929   x_libraries=$xpathed
1930   LIBS=$save_LIBS
1931   ;;
1932 esac
1934 AM_CONDITIONAL(LIRC, [test x$lirc_ext = xyes])
1936 AC_CHECK_HEADERS(endian.h machine/endian.h)
1937 AC_CHECK_HEADERS(malloc.h malloc/malloc.h)
1938 AC_CHECK_HEADERS(getopt.h)
1939 AC_CHECK_HEADERS(libgen.h)
1940 AC_CHECK_HEADERS(pwd.h)
1941 AC_CHECK_HEADERS(sys/utsname.h)
1942 AC_CHECK_HEADERS(signal.h)
1943 AC_CHECK_HEADERS(unistd.h)
1944 AC_CHECK_HEADERS(sys/time.h)
1945 AC_CHECK_HEADERS(ieeefp.h)
1946 dnl libcurl3-dev on Ubuntu has a dependency on lber, and Gnash won't link
1947 dnl on most machines without it. While it isn't diretly used by Gnash at all,
1948 dnl it's to work around an Ubuntu packaging bug.
1949 AC_CHECK_LIB(lber, ber_free)
1950 AC_CHECK_LIB(bz2, BZ2_bzopen)
1951 AC_CHECK_LIB(c, getpwnam, AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
1953 dnl X11 is needed for fltk (at least),
1954 dnl and probably for many other guis too ...
1955 dnl if ! test x$build_fb = xyes; then # <--- this is wrong as build_x is non-exclusive
1956 dnl AC_PATH_XTRA
1957 dnl AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation)
1958 dnl AC_CHECK_LIB(gmp, _gmp_get_memory_functions)
1959   GNASH_PATH_X11
1960   AC_CHECK_LIB(Xi, XInput_find_display)
1961   AC_CHECK_LIB(X11, XDisableAccessControl)
1962 dnl fi
1963 AM_CONDITIONAL(HAVE_X11, [test x$x11 = xyes])
1964 AC_CHECK_LIB(rt, shm_unlink)
1965 AC_CHECK_FUNCS(shm_open shm_unlink)
1966 AC_TRY_COMPILE([#include <strings.h>], [
1967   char *p1 = (char *)"Hello";
1968   char *p2 = (char *)"World";
1969   strcasecmp(p1, p2); ],
1970   AC_DEFINE(HAVE_STRINGCASECMP, [1], [Has strcasecmp])
1973 dnl if test x$cross_compiling = xno; then
1974 AC_LANG_PUSH(C++)
1975 AC_MSG_CHECKING([to see if float formatting is broken])
1976 AC_RUN_IFELSE([
1977   AC_LANG_PROGRAM([#include <cmath>
1978     void testFloat(double d, double& s)
1979     {
1980         d /= 1000.0;
1981         s = std::fmod(d, 86400.0);
1982     }], [
1983      double d = 3.0935415006117e+23;
1984      double s;
1985      testFloat(d, s);
1986      if (static_cast<int>(s) != 61440) {
1987          return 1;
1988      }])],                         dnl end of LANG_PROGRAM
1989      broken_float=no,              dnl returns 0, works
1990      broken_float=yes,             dnl returns 1, broken
1991      broken_float=no               dnl cross compiling
1992 )                                  dnl end of RUN_IFELSE
1993 AC_LANG_POP(C++)
1994 dnl fi
1996 if test x${broken_float} = xyes; then
1997   AC_MSG_RESULT([yes])
1998   AC_DEFINE(HAVE_BROKEN_FLOAT, [1], [Has broken float support])
1999 else
2000   AC_MSG_RESULT([no])
2002 AM_CONDITIONAL(BROKEN_FLOAT, [ test x$broken_float = xyes ])
2004 dnl See if ipc_perm structure has the ipc_perm.key field, and if so,
2005 dnl which variant of the name is used.
2006 ipc_key=no
2007 AC_TRY_COMPILE([
2008   #include <sys/ipc.h>
2009   #include <sys/shm.h>], [
2010  struct shmid_ds shmseg;      
2011  key_t x = shmseg.shm_perm.key;],
2012  ipc_key=yes
2013  AC_DEFINE(IPC_PERM_KEY, [key], [Has the key field in ipc_perm])
2016 if test x$ipc_key = xno; then
2017   AC_TRY_COMPILE([
2018     #include <sys/ipc.h>
2019     #include <sys/shm.h>], [
2020     struct shmid_ds shmseg;      
2021     key_t x = shmseg.shm_perm.__key;],
2022     AC_DEFINE(IPC_PERM_KEY, [__key], [Has the key field in ipc_perm])
2023     ipc_key=yes
2024   )
2027 dnl AC_CHECK_FUNCS(strcasecmp stricmp)
2028 dnl AC_CHECK_FUNCS(vsnprintf)
2030 AC_CACHE_CHECK([for finite], ac_cv_finite,
2031  [AC_TRY_COMPILE([
2032    #include <math.h>
2033    #ifdef HAVE_IEEEFP_H
2034    #include <ieeefp.h>
2035    #endif],
2036  [double x; int y; y = finite(x);],
2037  ac_cv_finite=yes,
2038  ac_cv_finite=no
2040 if test x"$ac_cv_finite" = x"yes"; then
2041   AC_SEARCH_LIBS(finite, m,
2042     [AC_DEFINE(HAVE_FINITE, [1], [Has finite])]
2043   )
2046 AC_LANG_PUSH(C++)
2047 AC_CACHE_CHECK([for isfinite], ac_cv_isfinite,
2048  [AC_TRY_COMPILE([#include <cmath>],
2049  [using namespace std; double x; int y; y = isfinite(x);],
2050  ac_cv_isfinite=yes,
2051  ac_cv_isfinite=no
2053 AC_LANG_POP(C++)
2054 if test x"$ac_cv_isfinite" = x"yes"; then
2055   dnl Don't give up if isfinite is not found in -lm
2056   dnl isfinite is defined as a macro in C99.
2057   AC_SEARCH_LIBS(isfinite, m)
2058   AC_DEFINE(HAVE_ISFINITE, [1], [Has isfinite])
2061 AC_LANG_PUSH(C++)
2062 AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [
2063   AC_TRY_LINK([#include <cstdio>
2064 ], 
2065     [ std::printf("%s", __PRETTY_FUNCTION__); ], 
2066     [ ac_cv_implements___PRETTY_FUNCTION__="yes" ],
2067     [ ac_cv_implements___PRETTY_FUNCTION__="no" ]
2068   )
2070 if test "x$ac_cv_implements___PRETTY_FUNCTION__" = "xyes" ; then
2071   AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined])
2074 AC_CACHE_CHECK([whether $CXX implements __FUNCTION__], ac_cv_implements___FUNCTION__, [
2075   AC_TRY_LINK([#include <cstdio>
2076 ], 
2077     [ std::printf("%s", __FUNCTION__); ], 
2078     [ ac_cv_implements___FUNCTION__="yes" ],
2079     [ ac_cv_implements___FUNCTION__="no" ]
2080   )
2082 if test "x$ac_cv_implements___FUNCTION__" = "xyes" ; then
2083   AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined])
2086 AC_CACHE_CHECK([whether $CXX implements __func__], ac_cv_implements___func__, [
2087   AC_TRY_LINK([#include <cstdio>
2088 ], 
2089     [ std::printf("%s", __func__); ], 
2090     [ ac_cv_implements___func__="yes" ],
2091     [ ac_cv_implements___func__="no" ]
2092   )
2094 if test "x$ac_cv_implements___func__" = "xyes" ; then
2095   AC_DEFINE(HAVE_func, [1], [__func__ is defined])
2097 AC_LANG_POP(C++)
2098 AC_REPLACE_FUNCS(getopt)
2100 dnl Date portability stuff, used in server/asobj/Date.cpp
2101 AC_CHECK_FUNCS(gettimeofday)
2102 AC_CHECK_FUNCS(ftime)
2103 AC_CHECK_FUNCS(tzset)
2104 AC_CHECK_FUNCS(localtime_r)
2106 AC_CACHE_CHECK([whether struct tm has tm_gmtoff], ac_cv_tm_gmtoff, [
2107         AC_TRY_LINK([
2108 /* ctime(1) says "The glibc version of struct tm has additional fields
2109  * defined  when _BSD_SOURCE was set before including <time.h>"
2110  * In practice, you don't need to define it yourself (tested on glibc-2.2.1 
2111  * and 2.3.6) but if you *do* define it yourself, it makes *all* functions
2112  * favour BSD-like behaviour over of GNU/POSIX, which seems dangerous.
2113  */
2114 // #define _BSD_SOURCE 1
2115 #include <time.h>
2116 ], 
2117                 [ struct tm tm; long l = tm.tm_gmtoff; ], 
2118                 [ ac_cv_tm_gmtoff="yes" ],
2119                 [ ac_cv_tm_gmtoff="no" ]
2120         )
2122 if test "x$ac_cv_tm_gmtoff" = "xyes" ; then
2123         AC_DEFINE(HAVE_TM_GMTOFF, [1], [struct tm has member tm_gmtoff])
2126 AC_CACHE_CHECK([whether timezone is a long], ac_cv_long_timezone, [
2127         AC_TRY_LINK([
2128 /* On Linux/glibc, tzset(3) says "extern long timezone;" (seconds West of GMT)
2129  * but on BSD char *timezone(int,int) is a function returning a string name.
2130  * The BSD function timegm() may be the equivalent, but this should
2131  * not be necessary because on BSD the code should use tm.tm_gmtoff instead
2132  * (use of long timezone is a fallback strategy for when tm_gmtoff exists not).
2133  */
2134 #include <stdio.h>
2135 #include <time.h>
2136 extern long timezone;
2137   ], 
2138     [ printf("%ld", timezone); ], 
2139     [ ac_cv_long_timezone="yes" ],
2140     [ ac_cv_long_timezone="no" ]
2141    )
2143 if test "x$ac_cv_long_timezone" = "xyes" ; then
2144   AC_DEFINE(HAVE_LONG_TIMEZONE, [1], [extern timezone is a long integer, not a function])
2147 AC_CHECK_FUNCS(sysconf)
2148 AC_CHECK_FUNCS(shmget shmat shmdt mmap)
2149 AC_CHECK_FUNCS(memmove)
2150 AC_CHECK_FUNCS(scandir)         dnl supported by BSD and Linux, but you never know...
2151 dnl AC_CHECK_FUNC(strndup, AC_DEFINE(HAVE_STRNDUP, 1, [Has strndup()] ))
2152 AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has clock_gettime()] ))
2153 dnl AC_CHECK_FUNCS(strlcpy, AC_DEFINE(HAVE_STRLCPY_PROTO, [1],[Define if you have the strlcpy prototype]))
2154 dnl AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT_PROTO, [1],[Define if you have the strlcat prototype]))
2155 dnl Look for Win32 networking stuff
2156 AC_CHECK_HEADERS(winsock.h)
2157 AC_CHECK_HEADERS(winsock2.h)
2158 AC_CHECK_FUNCS(socket)
2159 AC_CHECK_FUNCS(CreateFileMappingA)
2161 dnl Shm::resize() uses this if it exists
2162 AC_CHECK_LIB(c, mremap)
2164 GNASH_PKG_FIND(nspr, [nspr.h], [Netscape Portable Runtime (NSPR)], PR_Init)
2166 AC_PATH_TOOL(WINDRES, [windres])
2167 AC_SUBST(WINDRES)
2169 GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress)
2170 GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init)
2171 if test x"${openbsd_os}" = x"yes"; then
2172   GNASH_PKG_FIND(libpng, [png.h], [png images], png_info_init)
2173 else
2174   GNASH_PKG_FIND(png, [png.h], [png images], png_info_init)
2176 GNASH_PKG_FIND(gif, [gif_lib.h], [gif images], DGifOpen)
2177 if test x"${GIF_LIBS}" = x ; then
2178  GNASH_PKG_FIND(ungif, [gif_lib.h], [gif images], DGifOpen)
2179  GIF_LIBS=${UNGIF_LIBS}
2180  GIF_CFLAGS=${UNGIF_CFLAGS}
2182 if test x"$testsuite" = x"yes"; then
2183   GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
2186 GNASH_PKG_FIND(speex, [speex.h], [speex audio codec], speex_decode_int)
2187 AM_CONDITIONAL(HAVE_SPEEX, [ test x$has_speex = xyes ])
2188 if test x$has_speex = xyes ; then
2189   AC_DEFINE([DECODING_SPEEX], [1], [Speex codec available])
2192 GNASH_PKG_FIND(speexdsp, [speex_resampler.h], [speex DSP utilities], speex_resampler_process_int)
2193 if test x$has_speexdsp = xyes ; then
2194   AC_DEFINE([RESAMPLING_SPEEX], [1], [Speex resampler available])
2197 dnl Find freetype and fontconfig
2198 dnl GNASH_PKG_FIND(freetype2, [freetype/freetype.h], [freetype2 font library], FT_Load_Char)
2199 dnl rob might be working on this or not ;)
2200 GNASH_PATH_FREETYPE2
2201 GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch)
2203 if test x$cross_compiling = xno; then
2204   AC_PATH_MING
2206 AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ])
2208 AM_CONDITIONAL(MING_VERSION_0_4,
2209         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040000  ])
2210 AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS,
2211         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040002  ])
2212 AM_CONDITIONAL(MING_SUPPORTS_INIT_ACTIONS,
2213         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040004  ])
2214 AM_CONDITIONAL(MING_SUPPORTS_REPLACE_TAG,
2215         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
2216 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_ADD_CHARACTER,
2217         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
2218 AM_CONDITIONAL(MING_SUPPORTS_STREAMING_SOUND,
2219         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
2220 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_SET_DEPTH,
2221         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
2222 AM_CONDITIONAL(MING_VERSION_0_4_3,
2223         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040300 ])
2224 AM_CONDITIONAL(MING_VERSION_0_4_4,
2225         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040400 ])
2227 if test x$cross_compiling = xno; then
2228   AC_ARG_WITH([swfdec_testsuite],
2229           AC_HELP_STRING([--with-swfdec-testsuite],
2230                   [directory where swfdec testsuite (the 'test' dir) is]),
2231         SWFDEC_TESTSUITE=${withval})
2232   AC_SUBST(SWFDEC_TESTSUITE)
2234 AM_CONDITIONAL(ENABLE_SWFDEC_TESTSUITE, [ test x"$SWFDEC_TESTSUITE" != x ])
2236 if test x$cross_compiling = xno; then
2237   AC_ARG_ENABLE([http_testsuite],
2238       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2239           AC_HELP_STRING([--enable-http-testsuite=<baseurl>],
2240                   [Enable http based testsuite (default url is http://www.gnashdev.org/testcases)]),
2241               [case "${enableval}" in
2242              no) HTTP_TESTSUITE="" ;;
2243             yes) HTTP_TESTSUITE="http://www.gnashdev.org/testcases" ;;
2244               *) HTTP_TESTSUITE="${enableval}";;
2245            esac])
2246   AC_SUBST(HTTP_TESTSUITE)
2248 AM_CONDITIONAL(ENABLE_HTTP_TESTSUITE, [ test x"$HTTP_TESTSUITE" != x ])
2250 if test x$cross_compiling = xno; then
2251   AC_ARG_ENABLE([red5_testing],
2252       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2253           AC_HELP_STRING([--enable-red5-testing=<host>],
2254                   [Enable red5 based testing (default host is localhost)]),
2255               [case "${enableval}" in
2256              no) RED5_HOST="" ;;
2257             yes) RED5_HOST="localhost" ;;
2258               *) RED5_HOST="${enableval}";;
2259            esac])
2260   AC_SUBST(RED5_HOST)
2262 AM_CONDITIONAL(ENABLE_RED5_TESTING, [ test x"$RED5_HOST" != x ])
2264 dnl The name might differ between systems.
2265 if test x"$testsuite" = x"yes"; then
2266 AC_PATH_PROGS(NETCAT, [nc netcat])
2267 AC_PATH_PROG(WGET, wget)
2269 AM_CONDITIONAL(HAS_NETCAT, [ test x"$NETCAT" != x ])
2270 AM_CONDITIONAL(HAS_WGET, [ test x"$WGET" != x ])
2273 dnl See if we can use the swfmill, mtasc, swfc and haxe based testsuites 
2275 if test x"$testsuite" = x"yes" -a x$cross_compiling = xno; then
2276   AC_PATH_PROG(AS3COMPILE, as3compile)
2277   AC_PATH_PROG(SWFC, swfc)
2278   AC_PATH_SWFMILL
2279   AC_PATH_MTASC
2280   AC_PATH_HAXE
2283 AM_CONDITIONAL(ENABLE_SWFMILL, [ test x"$SWFMILL" != x ])
2284 AM_CONDITIONAL(SWFMILL_AS3_SUPPORT,
2285         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2287 dnl SWFMILL versions older than 0.3 didn't get function2 flags order correctly
2288 AM_CONDITIONAL(SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT,
2289         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2291 AM_CONDITIONAL(ENABLE_AS3COMPILE, [ test x"$AS3COMPILE" != x ])
2292 AM_CONDITIONAL(ENABLE_MTASC, [ test x"$MTASC" != x ])
2293 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2294 AM_CONDITIONAL(ENABLE_SWFC, [ test x"$SWFC" != x ])
2295 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2297 AC_PATH_PROG(DOXYGEN, doxygen)
2298 AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ])
2300 dnl currently unused
2301 dnl GNASH_PKG_FIND(ogg, [ogg.h], [decode ogg streams], ogg_stream_init)
2303 if test x$build_sdl = xyes -o x$build_sound_sdl = xyes; then
2304   GNASH_PATH_SDL
2307 AM_CONDITIONAL(HAVE_SDL, [ test x$has_SDL = xyes ])
2309 GNASH_PATH_QT3
2310 GNASH_PATH_KDE3
2312 GNASH_PATH_QT4
2313 GNASH_PATH_KDE4
2315 dnl Qtopia is a desktop environment for embedded devices.
2316 dnl GNASH_PATH_QTOPIA3
2317 dnl GNASH_PATH_QTOPIA4
2318 has_qtopia3=no
2319 has_qtopia4=no
2322 AM_CONDITIONAL(HAVE_QTOPIA3, [test x$has_qtopia3 = xyes])
2323 AM_CONDITIONAL(HAVE_QTOPIA4, [test x$has_qtopia4 = xyes])
2324 AM_CONDITIONAL(HAVE_KDE3,    [test x$has_kde3 = xyes])
2325 AM_CONDITIONAL(HAVE_KDE4,    [test x$has_kde4 = xyes])
2326 AM_CONDITIONAL(HAVE_QT3,     [test x$has_qt3 = xyes])
2327 AM_CONDITIONAL(HAVE_QT4,     [test x$has_qt4 = xyes])
2329 AM_CONDITIONAL(WITH_KDE4,    [test "$with_kde4" != "no"])
2330 AM_CONDITIONAL([QT_X11],     [test "$platform" = "X11"])
2331 AM_CONDITIONAL([QTOPIA],     [test "$platform" = "Qtopia"])
2332 AM_CONDITIONAL([QT_OSX],     [test "$platform" = "OSX"])
2333 AM_CONDITIONAL([QT_OS9],     [test "$platform" = "OS9"])
2334 AM_CONDITIONAL([QT_WIN32],   [test "$platform" = "Win32"])
2336 dnl Need GLIB for both GTK and GST
2337 if test x"${build_gtk}" = xyes -o x"${build_media_gst}" = xyes; then
2338   GNASH_PATH_GLIB
2341 AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ])
2343 if test x$npapi = xyes; then
2344   if ! test x$build_gtk = xyes -o x$build_kde4 = xyes; then
2345     AC_MSG_WARN(["Enabled NPAPI plugin, but it's not supported by the selected GUI"])
2346   fi
2349 if test x$windows = xyes -a x$npapi = xyes; then
2350   if test "x$NSPR_CFLAGS" = x -a "x$NSPR_LIBS" = x; then
2351     AC_MSG_ERROR(["On Win32, NPAPI plugin requires NSPR."])
2352   fi
2353   if test "x$WINDRES" = x; then
2354     AC_MSG_ERROR(["On Win32, NPAPI plugin requires windres."])
2355   fi
2358 dnl Need GLIB for NPAPI plugin
2359 if test x$npapi = xyes; then
2360   GNASH_PATH_GLIB
2363 dnl if kde isn't installed, even if it's specified, don't try to build
2364 dnl the KPARTS plugin, which is KDE based.
2365 if test x$has_kde3 = xno -a x$build_kparts3 = xyes; then
2366   build_kparts3=no
2367 dnl  build_kde3=no
2368   AC_MSG_WARN(["Disabling KPARTS 3.x plugin, no KDE development found"])
2371 if test x$build_kde3 = xno -a x$build_kparts3 = xyes; then
2372   AC_MSG_WARN(["Enabled KPARTS 3.x plugin, but you aren't building a KDE based GUI!"])
2374 if test x$has_kde4 = xno -a x$build_kparts4 = xyes; then
2375   build_kparts4=no
2376 dnl  build_kde4=no
2377   AC_MSG_WARN(["Disabling KPARTS 4.x plugin, no KDE 4.x development found"])
2380 if test x$build_kde4 = xno -a x$kparts4 = xyes; then
2381   AC_MSG_WARN(["Enabled KPARTS 4.x plugin, but you aren't building a KDE 4.x based GUI!"])
2384 AM_CONDITIONAL(BUILD_QTOPIA3_GUI,  [ test x$build_qtopia3 = xyes ])
2385 AM_CONDITIONAL(BUILD_QTOPIA4_GUI,  [ test x$build_qtopia4 = xyes ])
2386 AM_CONDITIONAL(BUILD_QT3_GUI,      [ test x$build_qt3 = xyes ])
2387 AM_CONDITIONAL(BUILD_QT4_GUI,      [ test x$build_qt4 = xyes ])
2388 AM_CONDITIONAL(BUILD_KDE3_GUI,     [ test x$build_kde3 = xyes ])
2389 AM_CONDITIONAL(BUILD_KDE4_GUI,     [ test x$build_kde4 = xyes ])
2391 AM_CONDITIONAL(BUILD_ALP_GUI,      [ test x$build_alp = xyes ])
2392 AM_CONDITIONAL(BUILD_HILDON_GUI,   [ test x$build_hildon = xyes ])
2393 AM_CONDITIONAL(BUILD_GTK_GUI,      [ test x$build_gtk = xyes ])
2394 AM_CONDITIONAL(BUILD_FLTK_GUI,     [ test x$build_fltk = xyes ])
2395 AM_CONDITIONAL(BUILD_SDL_GUI,      [ test x$build_sdl = xyes ])
2396 AM_CONDITIONAL(BUILD_FB_GUI,       [ test x$build_fb = xyes ])
2397 AM_CONDITIONAL(BUILD_AQUA_GUI,     [ test x$build_aqua = xyes ])
2398 AM_CONDITIONAL(ALLSTATIC,          [ test x$build_aqua = xyes ]) dnl the Aqua-binary is always static.
2399 AM_CONDITIONAL(BUILD_RISCOS_GUI,   [ test x$build_riscos = xyes ])
2400 AM_CONDITIONAL(BUILD_DUMP_GUI,     [ test x$build_dump = xyes ])
2401 AM_CONDITIONAL(BUILD_AMIGAOS4_GUI, [ test x$build_aos4 = xyes ])
2402 AM_CONDITIONAL(BUILD_HAIKU_GUI,    [ test x$build_haiku = xyes ])
2404 # plugin building flags
2405 AM_CONDITIONAL(NPAPI,   [test x"${npapi}" = xyes])
2406 AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes])
2407 AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes])
2409 if test x"${build_gles}" = xyes; then
2410   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2411   GNASH_PATH_GLES
2414 if test x"${build_ogv}" = xyes; then
2415   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2416   GNASH_PKG_FIND(OpenVG, [vg/openvg.h], [OpenVG library], vgDrawImage)
2419 if test x"${build_ogl}" = xyes; then
2420   GNASH_PATH_OPENGL
2423 if test x"${build_gtk}" = xyes; then
2424   AC_ARG_ENABLE(ghelp,
2425     AC_HELP_STRING([--enable-ghelp], [Enable support for the GNOME help system]),
2426     [case "${enableval}" in
2427       yes) ghelp=yes ;;
2428       no)  ghelp=no ;;
2429       *)   AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;;
2430     esac], ghelp=no
2431   )
2433   if test x"${ghelp}" = x"yes" ; then
2434     AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2435     AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2436     AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2438     if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = x ; then
2439       ghelp=no
2440       AC_MSG_WARN([You need to install scrollkeeper for gnome help])
2441     fi
2442   fi
2444 AM_CONDITIONAL(GHELP, [test x${ghelp} = xyes])
2446 if test x${build_fltk} = xyes; then
2447   GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender)
2450 dnl Some systems have a pervered set of dependencies.
2451 dnl Fedora Core 6 appears to have a dependency on expat for fontconfig.
2452 dnl We only need the library, but this is the easy wind to find it.
2453 GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString)
2455 dnl these conditionals were moved out of kde.m4
2456 AM_CONDITIONAL(HAS_KDE3, [test x$has_kde3 = xyes])
2457 # used to disable x11-specific stuff on special platforms
2458 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
2459 AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
2460 AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
2462 AM_CONDITIONAL(HAVE_GTK2, [ test x$has_gtk2 = xyes ])
2463 AM_CONDITIONAL(HAVE_GLEXT, [test x$glext = xyes])
2465 dnl We don't have GTKGLExt, so default to SDL, and don't build the Firefox plugin
2466 if test x$glext = xno -a x$build_ogl = xyes; then
2467   if test x$gtk2 = xyes -a x$build_gtk = xyes; then
2468     AC_ERROR([You have GTK installed, but not GtkGLExt. You need GtkGLExt to use the OpenGL renderer. Attempting to build SDL version])
2469   fi
2470   gui=sdl
2471   npapi=no
2472   AC_MSG_WARN([GTK2 specified for the GUI, but GtkGlExt is not present. Trying SDL instead.])
2475 missing_codecs=""
2476 if test x"$build_media_gst" = "xyes"; then
2477   AC_PATH_PROG(GST_INSPECT, gst-inspect, ,[${pathlist}])
2478   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2479     AC_PATH_PROG(GST_INSPECT, gst-inspect-0.10, ,[${pathlist}])
2480   fi
2481   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2482     dnl FIXME: there may be multiple acceptable plugins that are acceptable for
2483     dnl our use. For example, mad or FFmpeg will play mp3.
2484     codecs="ffdec_flv ffdec_flashsv ffdec_vp6f ffdec_flashsv mad vorbisdec ffdec_vp6"
2485     for i in $codecs; do
2486        hits="`$GST_INSPECT $i | grep -c 'Long name'`"
2487        if test $hits -eq 0; then
2488          missing_codecs="$missing_codecs $i"
2489          AC_MSG_WARN([Missing codec: $i])
2490        fi
2491     done
2492   fi
2493   GNASH_PKG_FIND(gstreamer_plugins_base, [gst/interfaces/probeprobe.h], [gstreamer interfaces library], gst_property_probe_probe_and_get_values_name, [0.10])
2494   GNASH_PKG_FIND(gstreamer_app, [gst/app/gstappsink.h], [gstreamer app library], call_gmon_start, [0.10])
2495   GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, [0.10])
2496   dnl if cross compiling, we're usually not going to be able to pop up
2497   dnl the codec installer to download the package to install, so disable
2498   dnl it if cross compiling with gstreamer support.
2499   if test x$cross_compiling = xno; then
2500     GNASH_PKG_FIND(gstpbutils, [gst/pbutils/install-plugins.h], [gstreamer PB Utils library], gst_install_plugins_supported, [0.10])
2501   fi
2502   dnl when cross compiling Gstreamer, not all supplied SDKs include all the
2503   dnl development libraries since most devices don't need to support plugin
2504   dnl development, only the runtime. In these caes we often have the header
2505   dnl files but not the libraries.
2506   if test x"${has_gstreamer_plugins_base}" = xyes; then
2507     GSTREAMER_LIBS="-lgstinterfaces-0.10 $GSTREAMER_LIBS"
2508     AC_DEFINE(HAS_GSTREAMER_PLUGINS_BASE, [1], "Has the Gstreamer Plugin Dev package installed.")
2509   fi
2512 AM_CONDITIONAL(HAVE_CAIRO, [true])
2513 dnl AM_CONDITIONAL(HAVE_CAIRO, [test x"${has_cairo}" = xyes])
2514 AM_CONDITIONAL(HAVE_OPENGL, [true])
2515 dnl AM_CONDITIONAL(HAVE_OPENGL, test x"${has_opengl}" = xyes)
2517 AM_CONDITIONAL(USE_SOUND_SDL, test x$build_sound_sdl = xyes)
2518 AM_CONDITIONAL(USE_SOUND_AHI, test x$build_sound_ahi = xyes)
2519 AM_CONDITIONAL(USE_SOUND_MKIT, test x$build_sound_mkit = xyes)
2520 AM_CONDITIONAL(USE_FFMPEG_ENGINE, test x"${build_media_ffmpeg}" = x"yes")
2521 AM_CONDITIONAL(USE_GST_ENGINE, test x"${build_media_gst}" = x"yes")
2522 AM_CONDITIONAL(HAVE_OPENGL, test x"${OPENGL_LIBS}" != x)
2523 dnl for now the Haiku media handler is experimental
2524 AM_CONDITIONAL(USE_HAIKU_ENGINE, test x"$build_media_haiku" = xyes)
2526 if test x"${build_media_ffmpeg}" = x"yes"; then
2527   AC_DEFINE([ENABLE_FFMPEG_MEDIA],  [1], [Use FFmpeg for media decoding])
2530 if test x"${build_media_gst}" = x"yes"; then
2531   AC_DEFINE([ENABLE_GST_MEDIA],  [1], [Use gstreamer for media decoding])
2534 if test x"${build_media_haiku}" = x"yes"; then
2535   AC_DEFINE([ENABLE_HAIKU_MEDIA],  [1], [Use haiku for media decoding])
2538 if test x$build_sound_mkit = xyes; then
2539   if test x"${haiku}" != xyes; then
2540     AC_MSG_ERROR([Media Kit sound handling is supported only under Haiku]);
2541   else
2542     AC_DEFINE([SOUND_MKIT],  [1], [Use Haiku's Media Kit for sound handling])
2543   fi
2546 if test x"${build_sound_sdl}" = xyes; then
2547   AC_DEFINE([SOUND_SDL],  [1], [Use SDL for sound handling])
2550 if test x"${build_sound_ahi}" = xyes; then
2551   if test x"$amigaos4" != xyes; then
2552     AC_MSG_ERROR([AHI sound handling is supported only under AmigaOS]);
2553   else
2554     AC_DEFINE([SOUND_AHI],  [1], [Use AmigaOS AHI for sound handling])
2555   fi
2558 if test x$build_fltk = xyes; then
2559   GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush)
2562 AM_CONDITIONAL(HAVE_FLTK2, [ test x$has_fltk2 = xyes ])
2563 AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ])
2565 GNASH_DOCBOOK
2566 AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x)
2567 AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes)
2568 AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_TEXI" != x -o x"$DB2X_TEXIXML" != x ])
2569 AM_CONDITIONAL(ENABLE_PDF, [ test x"$DB2X_PDF" ])
2570 AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2571 AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x -a x"$docbook_styles" != x ])
2572 AM_CONDITIONAL(ENABLE_XMLTEX, [ test x"$PDFXMLTEX" != x -a x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2573 dnl  AM_CONDITIONAL(ENABLE_DBLATEX, [ test x"$DBLATEX" != x ])
2574 AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_MAN" != x -o x"$DB2X_MANXML" != x ])
2575 AM_CONDITIONAL(HAVE_AGG, [test x"${AGG_LIBS}" != x])
2577 GNASH_PATH_CURL
2579 dnl Define winsock if we're on windows. We could do something complicated,
2580 dnl but since AC_EXEEXT does it for us, we'll do this the easy way.
2581 if test x"$EXEEXT" = "exe"; then
2582   AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32])
2585 dnl ****************************************
2586 dnl *** Check for ELF visibility support ***
2587 dnl ****************************************
2589 AC_ARG_ENABLE([visibility],
2590   AC_HELP_STRING([--enable-visibility], [Use ELF visibility attributes]), [], [enable_visibility=no])
2592 if test x"$enable_visibility" != x"no"; then
2593   dnl Check whether the compiler supports the visibility attribute
2594   save_CFLAGS="$CFLAGS"
2595   CFLAGS="$CFLAGS -Wall -Werror"
2596   AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
2597   AC_COMPILE_IFELSE(AC_LANG_SOURCE(
2598     [
2599       void __attribute__ ((visibility("default"))) test_default (void) {}
2600       void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
2601       int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
2602     ]),
2603     [
2604       AC_DEFINE([HAVE_GNUC_VISIBILITY], [1], [Define this for GCC-visibility.])
2605       AC_MSG_RESULT([yes])
2606     ],
2607     [
2608       AC_MSG_RESULT([no])
2609     ]
2610   )
2611   CFLAGS="$save_CFLAGS"
2614 AC_ARG_ENABLE([pch],
2615   AC_HELP_STRING([--enable-pch], [Enable precompiled header support]), [], [enable_pch=no])
2617 AM_CONDITIONAL([ENABLE_PCH], [test x"$enable_pch" != x"no"])
2619 PCH_FLAGS="-include all-includes.h -Winvalid-pch"
2620 AC_SUBST(PCH_FLAGS)
2622 GNASH_PATH_PTHREADS
2624 GNASH_PATH_BOOST
2625 dnl AX_GCC_ARCHFLAG(no)
2627 AC_ARG_ENABLE([strict],
2628   AC_HELP_STRING([--enable-strict],[Accept only standards compliant code (GCC only)]),
2629   [case "${enableval}" in
2630     yes) strict=yes ;;
2631     no) strict=no ;;
2632     *) AC_MSG_ERROR([bad value ${enableval} for --enable-strict option]) ;;
2633   esac],
2634   [strict=no]
2637 if test x"$strict" = x"yes" -a x$build_agg = xyes; then
2638    AC_MSG_ERROR([agg renderer will fail with --enable-strict.]);        
2641 # We want warnings, lots of warnings  :-)
2642 # It should be possible to build with -ansi, not with
2643 # -pedantic because of agg.
2645 # -ansi was actually dropped because it hides 'fileno', which
2646 # is used in a few places
2648 if test x"$GCC" = x"yes"; then
2649   CXXFLAGS="$CXXFLAGS \
2650     $CROSS_CXXFLAGS \
2651     -W \
2652     -Wall \
2653     -Wcast-align \
2654     -Wcast-qual \
2655     -Wpointer-arith \
2656     -Wreturn-type \
2657     -Wnon-virtual-dtor \
2658     -Wunused \
2659     "
2660   CFLAGS="$CFLAGS \
2661     $CROSS_CXXFLAGS \
2662     -W \
2663     -Wall \
2664     -Wcast-align \
2665     -Wcast-qual \
2666     -Wpointer-arith \
2667     -Wreturn-type \
2668     -Wmissing-declarations \
2669     -Wmissing-prototypes \
2670     -Wstrict-prototypes \
2671     "
2672   if test x"$strict" = x"yes"; then
2673     CXXFLAGS="$CXXFLAGS \
2674       -Wextra \   
2675       -pedantic \
2676       -Wno-long-long \
2677       "
2679     CFLAGS="$CFLAGS \
2680       -pedantic \
2681       -Wno-long-long \
2682       -ansi \
2683       "
2684   fi
2687 AC_ARG_ENABLE([cassert],
2688   AC_HELP_STRING([--disable-cassert],[Disable assertion checking]),
2689   [case "${enableval}" in
2690     yes) cassert=yes ;;
2691     no) cassert=no ;;
2692     *) AC_MSG_ERROR([bad value ${enableval} for --enable-cassert option]) ;;
2693   esac],
2694   [cassert=yes]
2697 if test x"$cassert" = x"no"; then
2698     CXXFLAGS="$CXXFLAGS \
2699       -DNDEBUG \
2700       "
2701     CFLAGS="$CFLAGS \
2702       -DNDEBUG \
2703       "
2706 dnl /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
2707 AC_DEFUN([CHECK_VISIBILITY_GCC_BUG],
2708   [
2709     AC_CACHE_CHECK([if -fvisibility-inlines-hidden is broken], ac_cv_gcc_visibility_bug, [
2710         AC_LANG_PUSH(C++)
2711         save_CXXFLAGS=$CXXFLAGS
2712         save_LDFLAGS=$LDFLAGS
2713         CXXFLAGS="-fPIC -fvisibility-inlines-hidden -O0"
2714         LDFLAGS="$LDFLAGS -shared -fPIC"
2716         AC_TRY_LINK(
2717         [          
2718           template<typename CharT>
2719           struct VisTest
2720           {
2721             inline VisTest ();
2722           };
2723           template<typename CharT>
2724           inline VisTest<CharT>::VisTest()
2725         {}
2726         extern template class VisTest<char>;  // It works if we drop that line
2727         int some_function( int do_something ) __attribute__((visibility("default")));
2728         int some_function( int )
2729           {
2730             VisTest<char> a;
2731             return 0;
2732           }
2733         ], [],
2734         ac_cv_gcc_visibility_bug=no, ac_cv_gcc_visibility_bug=yes)
2736         CXXFLAGS=$save_CXXFLAGS
2737         LDFLAGS=$save_LDFLAGS
2738         AC_LANG_POP(C++)
2739       ]
2740     )
2741     if test x$ac_cv_gcc_visibility_bug = xno; then
2742       CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
2743     fi
2744   ]
2747 CHECK_VISIBILITY_GCC_BUG
2750 if test x$ac_cv_gcc_visibility_bug = xno; then
2751   AC_LANG_PUSH(C++)
2752   AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
2753   save_CXXFLAGS=$CXXFLAGS
2754   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2755   AC_LINK_IFELSE([AC_LANG_PROGRAM()], 
2756                  [ac_cv_gcc_visibility=yes;
2757                   AC_MSG_RESULT([yes])],
2758                  [ac_cv_gcc_visibility=no;
2759                   AC_MSG_RESULT([no])]);
2760   CXXFLAGS="$save_CXXFLAGS"
2761   AC_LANG_POP(C++)
2765 AM_CONDITIONAL(VISIBILITY_WORKS, test x"$ac_cv_gcc_visibility" = xyes)
2767 if test x"$ac_cv_gcc_visibility" = xyes -a x"$enable_visibility" != xno; then
2768   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2771 dnl Define convienience constants so Gnash can print out the
2772 dnl default configuration of the build.
2773 RENDERER_CONFIG="${renderer_list}"
2774 RENDERER_LIBS=
2775 for rend in `echo "${add_renderer}" | tr ',' ' '`; do
2776         RENDERER_LIBS="${RENDERER_LIBS} \$(top_builddir)/librender/libgnash${rend}.la"
2777 done
2778 dnl echo "RENDERER_LIBS=$RENDERER_LIBS"
2779 AC_SUBST(RENDERER_LIBS)
2780 AC_SUBST(RENDERER_CONFIG)
2782 HWACCEL_CONFIG="${hwaccel_list}"
2783 AC_SUBST(HWACCEL_CONFIG)
2785 dnl check for missing libraries and disable them.
2786 if test x"$BOOST_LIBS" != x; then
2787   if test x"${cygnal_missing_libs}" != x; then
2788     for i in ${cygnal_missing_libs}; do
2789       if test $i = serialization; then
2790         AC_DEFINE([BOOST_MULTI_INDEX_DISABLE_SERIALIZATION], ["1"], [if the library is missing, don't use it.])
2791       fi
2792     done
2793   fi
2796 CYGNAL_PATHS
2798 SUPPORTED_GUIS=
2799 if test x$build_qtopia3 = xyes; then
2800   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia3"
2802 if test x$build_qtopia4 = xyes; then
2803   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia4"
2805 if test x$build_hildon = xyes; then
2806   SUPPORTED_GUIS="${SUPPORTED_GUIS},hildon"
2808 if test x$build_alp = xyes; then
2809   SUPPORTED_GUIS="${SUPPORTED_GUIS},alp"
2811 if test x$build_fb = xyes; then
2812   SUPPORTED_GUIS="${SUPPORTED_GUIS},fb"
2814 if test x$build_fltk = xyes; then
2815   SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk"
2817 if test x$build_qt3 = xyes; then
2818   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt3"
2820 if test x$build_qt4 = xyes; then
2821   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt4"
2823 if test x$build_kde3 = xyes; then
2824   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde3"
2826 if test x$build_kde4 = xyes; then
2827   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde4"
2829 if test x$build_gtk = xyes; then
2830   SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk"
2832 if test x$build_sdl = xyes; then
2833   SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl"
2835 if test x$build_riscos = xyes; then
2836   SUPPORTED_GUIS="${SUPPORTED_GUIS},riscos"
2838 if test x$build_aqua = xyes; then
2839   SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua"
2841 if test x$build_dump = xyes; then
2842   SUPPORTED_GUIS="${SUPPORTED_GUIS},dump"
2844 if test x$build_aos4 = xyes; then
2845   SUPPORTED_GUIS="${SUPPORTED_GUIS},aos4"
2847 if test x$build_haiku = xyes; then
2848   SUPPORTED_GUIS="${SUPPORTED_GUIS},haiku"
2850 SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
2851 AC_SUBST(SUPPORTED_GUIS)
2853 dnl AC_CONFIG_LINKS(doc/C/images)
2854 dnl AC_CONFIG_LINKS(gnashconfig.h,libltdl/config.h)
2855 AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
2856 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in)
2857 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in)
2859 AC_CONFIG_FILES(gnash.pc:gnash.pc.in)
2861 AC_OUTPUT(Makefile
2862 po/Makefile
2863 libltdl/Makefile
2864 libmedia/Makefile
2865 libsound/Makefile
2866 libbase/Makefile
2867 libcore/Makefile
2868 libcore/vm/Makefile
2869 libcore/parser/Makefile
2870 libvaapi/Makefile
2871 librender/Makefile
2872 utilities/Makefile
2873 doc/Makefile
2874 doc/C/Makefile
2875 doc/Doxyfile
2876 testsuite/Makefile
2877 testsuite/media/Makefile
2878 testsuite/libbase.all/Makefile
2879 testsuite/as3compile.all/Makefile
2880 testsuite/actionscript.all/Makefile
2881 testsuite/samples/Makefile
2882 testsuite/swfdec/Makefile
2883 testsuite/misc-ming.all/Makefile
2884 testsuite/misc-mtasc.all/Makefile
2885 testsuite/misc-haxe.all/Makefile
2886 testsuite/misc-haxe.all/classes.all/Makefile
2887 testsuite/misc-swfmill.all/Makefile
2888 testsuite/misc-swfmill.all/trace-as2/Makefile
2889 testsuite/misc-swfmill.all/trace-as3/Makefile
2890 testsuite/misc-swfc.all/Makefile
2891 testsuite/network.all/Makefile
2892 testsuite/movies.all/Makefile
2893 testsuite/libcore.all/Makefile
2894 testsuite/libmedia.all/Makefile
2895 gui/Makefile
2896 gui/Info.plist
2897 gui/pythonmod/Makefile
2898 extensions/Makefile
2899 extensions/dejagnu/Makefile
2900 extensions/mysql/Makefile
2901 extensions/fileio/Makefile
2902 extensions/gtk2/Makefile
2903 extensions/lirc/Makefile
2904 extensions/dbus/Makefile
2905 plugin/Makefile
2906 plugin/npapi/Makefile
2907 plugin/klash/Makefile
2908 plugin/klash4/Makefile
2909 plugin/win32/Makefile
2910 cygnal/Makefile
2911 cygnal/libnet/Makefile
2912 cygnal/libamf/Makefile
2913 cygnal/cgi-bin/Makefile
2914 cygnal/cgi-bin/echo/Makefile
2915 cygnal/cgi-bin/oflaDemo/Makefile
2916 cygnal/cgi-bin/fitcDemo/Makefile
2917 cygnal/testsuite/Makefile
2918 cygnal/testsuite/libamf.all/Makefile
2919 cygnal/testsuite/libnet.all/Makefile
2920 cygnal/testsuite/cygnal.all/Makefile
2924 ########################## Final report begins... ############################
2927 cerr=/tmp/gnash-configure-errors.$$
2928 cwarn=/tmp/gnash-configure-warnings.$$
2929 crec=/tmp/gnash-configure-recommended.$$
2930 echo ""
2932 #trap 'rm cerr' 0 # trap isn't a good idea, might override other traps
2933 exec 3> $cerr 
2934 exec 4> $cwarn
2935 exec 5> $crec
2937 echo "Configurable options are:"
2939 if test x"${i810lodbias}" = x"yes"; then
2940   echo "        Intel 810 LOD bias hack enabled"
2941 else
2942   echo "        Intel 810 LOD bias hack disabled (default). Use --enable-i810-lod-bias to enable."
2945 if test x"${pthreads}" = x"yes"; then
2946   echo "        POSIX Threads support enabled (default)"
2947 else
2948   if test x"${build_haiku}" = x"yes"; then
2949      echo "        POSIX Thread support built into C library."
2950   els
2951      echo "        POSIX Thread support disabled."
2952   fi
2955 if test x"${dmalloc}" = x"yes"; then
2956   echo "        DMalloc support enabled"
2957   echo "        For a list of the command-line options enter: dmalloc --usage"
2958 else
2959   echo "        DMalloc support disabled (default). Use --enable-dmalloc to enable."
2962 if test x"${npapi}" = x"yes"; then
2963   echo "        NPAPI plugin enabled (default). Use --disable-npapi to disable."
2964   echo "            NPAPI plugin will be installed in ${FIREFOX_PLUGINS}"
2965 else
2966   echo "        NPAPI plugin disabled."
2969 if test x"${build_kparts3}" = x"yes"; then
2970   echo "        KPARTS 3.x plugin enabled (default). Use --disable-kparts3 to disable"
2971   echo "            KPARTS 3.x plugin will be installed in ${KDE3_PLUGINDIR}"
2972   echo "            KPARTS 3.x service will be installed in ${KDE3_SERVICESDIR}"
2973   echo "            KPARTS 3.x config dir will be in ${KDE3_CONFIGDIR}"
2974   echo "            KPARTS 3.x appsdata will be installed in ${KDE3_APPSDATADIR}"
2975 else
2976   echo "        KPARTS 3.x plugin disabled."
2979 if test x"${build_kparts4}" = x"yes"; then
2980   echo "        KPARTS 4.x plugin enabled (default). Use --disable-kparts4 to disable"
2981   echo "            KPARTS 4.x plugin will be installed in ${KDE4_PLUGINDIR}"
2982   echo "            KPARTS 4.x service will be installed in ${KDE4_SERVICESDIR}"
2983   echo "            KPARTS 4.x config dir will be in ${KDE4_CONFIGDIR}"
2984   echo "            KPARTS 4.x appsdata will be installed in ${KDE4_APPSDATADIR}"
2985 else
2986   echo "        KPARTS 4.x plugin disabled."
2989 dnl -- if test x"${dynamic_gui}" = x"yes"; then
2990 dnl --   echo "        Loadable GUI & renderer enabled."
2991 dnl -- else
2992 dnl --   echo "        Loadable GUI & renderer disabled (default). Use --enable-dynamic-gui to enable."
2993 dnl -- fi
2995 # set a variable if we shouldn't continue. This way we can print
2996 # out everything that is missing in one pass, hopefully making it
2997 # easy for new developers to get everything they need installed.
2999 echo "Configured paths for ${build} are:"
3001 dnl Dump QT3 options is the user specified a QT3 or KDE3 GUI
3002 if test x"${build_qt3}" = xyes; then
3003   if test x"${has_qt3}" = xyes; then
3004     echo "        QT3 flags are: ${QT3_CFLAGS}"
3005     echo "        QT3 libs are: ${QT3_LIBS}"
3006   else
3007     echo "        ERROR: No QT 3.x development package installed!" >&3
3008     echo "               Install a QT 3.x development environment from http://trolltech.com" >&3
3009     echo "               or .deb users: apt-get install libqt3-mt-dev" >&3
3010     if test x$build_kde3 = xyes; then
3011       echo "               or change to a different gui with --enable-gui=..." >&3
3012     fi
3013   fi
3016 if test x"${build_qt4}" = xyes; then
3017   if test x"${has_qt4}" = xyes; then
3018     echo "        QT4 flags are: ${QT4_CFLAGS}"
3019     echo "        QT4 libs are: ${QT4_LIBS}"
3020   else
3021     echo "        ERROR: No QT 4.x development package installed!" >&3
3022     echo "               Install a QT 4.x development environment from http://trolltech.com" >&3
3023     echo "               or .deb users: apt-get install qt4-dev-tools" >&3
3024     if test x$build_kde4 = xyes; then
3025       echo "               or change to a different gui with --enable-gui=..." >&3
3026     fi
3027   fi
3030 if test x"$build_qtopia3" = xyes; then
3031   if test x"${QTOPIA3_LIBS}" != x ; then
3032     if test x"${QTOPIA3_CFLAGS}" != x ; then
3033       echo "        QTOPIA 3.x flags are: $QTOPIA3_CFLAGS"
3034     else
3035       echo "        QTOPIA 3.x flags are: default include path"
3036     fi
3037     echo "        QTOPIA 3.x libs are: $QTOPIA3_LIBS"
3038   else
3039     echo "        ERROR: No QTOPIA 3.x library development package installed!" >&3
3040     echo "               Install it from http://trolltech.com/downloads/" >&3
3041     echo "               binary packages are not available." >&3
3042   fi
3045 if test x"$build_qtopia4" = xyes; then
3046   if test x"${QTOPIA4_LIBS}" != x ; then
3047     if test x"${QTOPIA4_CFLAGS}" != x ; then
3048       echo "        QTOPIA 4.x flags are: $QTOPIA4_CFLAGS"
3049     else
3050       echo "        QTOPIA 4.x flags are: default include path"
3051     fi
3052     echo "        QTOPIA 4.x libs are: $QTOPIA4_LIBS"
3053   else
3054     echo "        ERROR: No QTOPIA 4.x library development package installed!" >&3
3055     echo "               Install it from http://trolltech.com/downloads/" >&3
3056     echo "               binary packages are not available." >&3
3057   fi
3061 # -o x$build_kparts3 = xyes
3062 if test x$build_kde3 = xyes; then
3063   if test x"$has_kde3" = xyes; then
3064     echo "        KDE 3.x flags are: $KDE3_CFLAGS"
3065     echo "        KDE 3.x libs are: $KDE3_LIBS"
3066   else
3067       echo "        ERROR: No KDE 3.x development package installed!" >&3
3068       echo "               To disable the KDE 3.x gui," >&3
3069       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
3070       echo "               and omit "kde" from the list." >&3
3071       echo "               When the option --enable-gui=... is omitted," >&3
3072       echo "               the default is the same of --enable-gui=kde,gtk" >&3
3073       echo "               To be able to build the kde 3.x gui," >&3
3074       echo "               install version 3.x of the KDE development environment from http://kde.org" >&3
3075       echo "               or .deb users: apt-get install kdelibs4-dev" >&3
3076       echo "               or .rpm users: yum install kdelibs3-devel." >&3
3077   fi
3080 # -o x$build_kparts4 = xyes
3081 if test x$build_kde4 = xyes; then
3082   if test x"$has_kde4" = xyes; then
3083     echo "        KDE 4.x flags are: $KDE4_CFLAGS"
3084     echo "        KDE 4.x libs are: $KDE4_LIBS"
3085   else
3086       echo "        ERROR: No KDE 4.x development package installed!" >&3
3087       echo "               To disable the KDE 4.x gui," >&3
3088       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
3089       echo "               and omit "kde" from the list." >&3
3090       echo "               When the option --enable-gui=... is omitted," >&3
3091       echo "               the default is the same of --enable-gui=kde,gtk" >&3
3092       echo "               To be able to build the kde 4.x gui," >&3
3093       echo "               install version 4.x of the KDE development environment from http://kde.org" >&3
3094       echo "               or .deb users: apt-get install kdelibs5-dev" >&3
3095       echo "               or .rpm users: yum install kdelibs-devel." >&3
3096   fi
3099 if test x"${JPEG_LIBS}" != x ; then
3100   if test x"${JPEG_CFLAGS}" != x ; then
3101     echo "        JPEG flags are: $JPEG_CFLAGS"
3102   else
3103     echo "        JPEG flags are: default include path"
3104   fi
3105   echo "        JPEG libs are: $JPEG_LIBS"
3106 else
3107   echo "        ERROR: No JPEG library development package installed!" >&3
3108   echo "               Install it from http://ijg.org" >&3
3109   echo "               or .deb users: apt-get install libjpeg-dev" >&3
3110   echo "               or .rpm users: yum install libjpeg-devel" >&3
3113 if test x"${GIF_LIBS}" != x ; then
3114   if test x"${GIF_CFLAGS}" != x ; then
3115     echo "        GIF flags are: $GIF_CFLAGS"
3116   else
3117     echo "        GIF flags are: default include path"
3118   fi
3119   echo "        GIF libs are: $GIF_LIBS"
3120 else
3121   echo "        ERROR: No GIF library development package installed!" >&3
3122   echo "               Install it from http://sourceforge.net/projects/giflib/" >&3
3123   echo "               or .deb users: apt-get install libungif-dev" >&3
3124   echo "               or maybe     : apt-get install libgif-dev" >&3
3125   echo "               or .rpm users: yum install libungif-devel" >&3
3128 if test x"${PNG_LIBS}" != x ; then
3129   if test x"${PNG_CFLAGS}" != x ; then
3130     echo "        PNG flags are: $PNG_CFLAGS"
3131   else
3132     echo "        PNG flags are: default include path"
3133   fi
3134   echo "        PNG libs are: $PNG_LIBS"
3135 else
3136   echo "        RECOMMENDED: No PNG library development package installed!" >&5
3137   echo "                     Gnash will be built without support for dynamic loading of PNG files." >&5
3138   echo "                     Install it from http://www.libpng.org" >&5
3139   echo "                     or .deb users: apt-get install libpng12-dev" >&5
3140   echo "                     or .rpm users: yum install libpng-devel" >&5
3143 if test x"${build_ogl}" = x"yes"; then
3144   if test x"$OPENGL_LIBS" != x; then
3145     if test x"$OPENGL_CFLAGS" != x; then
3146       echo "        OpenGL flags are: $OPENGL_CFLAGS"
3147     else
3148       echo "        OpenGL flags are: default include path"
3149     fi
3150     echo "        OpenGL libs are: $OPENGL_LIBS"
3151     else
3152       echo "        ERROR: No OpenGL development package installed!" >&3
3153       echo "               You need to install the libmesa development package" >&3
3154       echo "               or .deb users: apt-get install libgl1-mesa-dev" >&3
3155       echo "               or .rpm users: yum install xorg-x11-Mesa-libGL" >&3
3156       echo "               or use a different renderer with --enable-renderer=" >&3
3157   fi
3160 if test x"${build_gles}" = x"yes"; then
3161   if test x"${has_gles}" != x; then
3162     if test x"$GLES_CFLAGS" != x; then
3163       echo "        OpenGL-ES flags are: $GLES_CFLAGS"
3164     else
3165       echo "        OpenGL-ES flags are: default include path"
3166     fi
3167     echo "        OpenGL-ES libs are: $GLES_LIBS"
3168   else
3169       echo "        ERROR: No OpenGL-ES development package installed!" >&3
3170       echo "               You need to install the this from source proobably" >&3
3171       echo "               or use a different renderer with --enable-renderer=" >&3
3172   fi
3175 dnl GLEXT is only needed for GTK/OpenGL
3176 if test x$build_gtk = xyes -a x$build_ogl = xyes ; then
3177   if test x"$GLEXT_LIBS" != x; then
3178     if test x"$GLEXT_CFLAGS" != x; then
3179       echo "        GtkGLExt flags are: $GLEXT_CFLAGS"
3180     else
3181       echo "        GtkGLExt flags are: default include path"
3182     fi
3183       echo "        GtkGLExt libs are: $GLEXT_LIBS"
3184   else
3185     if test x$build_gtk = xyes; then
3186       if test x$build_ogl = xyes; then
3187         echo "        ERROR: No GtkGLExt development package installed!" >&3
3188         echo "               It is needed to build the GTK/OpenGL GUI/renderer combination." >&3
3189         echo "               Either install it from http://gtkglext.sourceforge.net" >&3
3190         echo "               or .deb users: apt-get install libgtkglext1-dev" >&3
3191         echo "               or .rpm users: yum install gtkglext-devel" >&3
3192         echo "               or --enable-gui=sdl or --enable-renderer=agg" >&3
3193       fi
3194     fi
3195   fi
3199 if test x$build_hildon = xyes; then #{
3200   if test x"$HILDON_LIBS" != x; then
3201     if test x"$HILDON_CFLAGS" != x; then
3202       echo "        HILDON flags are: $HILDON_CFLAGS"
3203     else
3204       echo "        HILDON flags are: default include path"
3205     fi
3206       echo "        HILDON libs are: $HILDON_LIBS"
3207   else
3208     echo "        ERROR: No HILDON development package installed!" >&3
3209     echo "               Install it from http://gtk.org" >&3
3210     #echo "               or .deb users: apt-get install libhildon.0-dev" >&3
3211     echo "               or .deb users: apt-get install libhildon-1-dev" >&3
3212     echo "               or .rpm users: yum install hildon-devel" >&3
3213   fi
3216 if test x$build_gtk = xyes; then #{
3217   if test x"$GTK2_LIBS" != x; then
3218     if test x"$GTK2_CFLAGS" != x; then
3219       echo "        GTK2 flags are: $GTK2_CFLAGS"
3220     else
3221       echo "        GTK2 flags are: default include path"
3222     fi
3223       echo "        GTK2 libs are: $GTK2_LIBS"
3224   else
3225     echo "        ERROR: No GTK2 development package installed!" >&3
3226     echo "               Install it from http://gtk.org" >&3
3227     echo "               or .deb users: apt-get install libgtk2.0-dev" >&3
3228     echo "               or .rpm users: yum install gtk2-devel" >&3
3229   fi
3231   if test x"$PANGO_LIBS" != x; then
3232     if test x"$PANGO_CFLAGS" != x; then
3233       echo "        Pango flags are: $PANGO_CFLAGS"
3234     else
3235       echo "        Pango flags are: default include path"
3236     fi
3237     echo "        Pango libs are: $PANGO_LIBS"
3238   else
3239     echo "        ERROR: No Pango development package installed!" >&3
3240     echo "               Install it from http://pango.org" >&3
3241     echo "               or .deb users: apt-get install libpango1.0-dev" >&3
3242     echo "               or .rpm users: yum install pango-devel" >&3
3243   fi
3245   if test x"$GLIB_LIBS" != x; then
3246     if test x"$GLIB_CFLAGS" != x; then
3247       echo "        GLib flags are: $GLIB_CFLAGS"
3248     else
3249       echo "        GLib flags are: default include path"
3250     fi
3251     echo "        GLib libs are: $GLIB_LIBS"
3252   else
3253     echo "        ERROR: No GLib development package installed!" >&3
3254     echo "               Install it from http://gtk.org" >&3
3255     echo "               or .deb users: apt-get install libglib2.0-dev" >&3
3256     echo "               or .rpm users: yum install glib2-devel" >&3
3257   fi
3259   if test x"$ATK_LIBS" != x; then
3260     if test x"$ATK_CFLAGS" != x; then
3261       echo "        ATK flags are: $ATK_CFLAGS"
3262     else
3263       echo "        ATK flags are: default include path"
3264     fi
3265       echo "        ATK libs are: $ATK_LIBS"
3266   else
3267     echo "        ERROR: No ATK development package installed!" >&3
3268     echo "               Install it from http://gtk.org" >&3
3269     echo "               or .deb users: apt-get install libatk1.0-dev" >&3
3270     echo "               or .rpm users: yum install atk-devel" >&3
3271   fi
3275 if test x"$build_media_gst" = x"yes"; then
3276   if test x"$missing_codecs" != x; then   
3277       echo "        Your Gstreamer installation is missing these codecs: $missing_codecs"
3278       echo "        Please install the gstreamer-ffmpeg for Gstreamer"
3279   fi  
3280   if test x"$GSTREAMER_LIBS" != x; then
3281     if test x"$GSTREAMER_CFLAGS" != x; then
3282       echo "        Gstreamer flags are: $GSTREAMER_CFLAGS"
3283     else
3284       echo "        Gstreamer flags are: default include path"
3285     fi
3286     echo "        Gstreamer libs are: $GSTREAMER_LIBS"
3287     if test x"$has_modern_gstpbutils" = "xno"; then
3288       echo "        RECOMMENDED: If the user has not installed the necessary Gstreamer plugins," >&5
3289       echo "                     Gstreamer can pop up a message prompting them to." >&5
3290       echo "                     Install gstpbutils (>= 0.10.15) from http://www.gstreamer.net for that to be enabled" >&5
3291       echo "                     or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&5
3292     fi
3293     if test x"$has_gstreamer_plugins_base" = "xno"; then
3294       echo "                        Install gstreamer-plugins-base from http://www.gstreamer.net" >&5
3295       echo "                        or .rpm users: yum install gstreamer-plugins-base-devel" >&5
3296       echo "                        or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&5
3297     fi
3298   else
3299     echo "        ERROR: GST media handling requested but gstreamer-0.10+ not found" >&3
3300     echo "               Install it from http://www.gstreamer.net" >&3
3301     echo "               or .deb users: apt-get install libgstreamer0.10-dev" >&3
3302     echo "               or .rpm users: yum install gstreamer-devel" >&3
3303     echo "               or             yast install gstreamer010-devel" >&3
3304   fi
3307   if test x"${build_media_ffmpeg}" = x"yes"; then
3308     if test x"$FFMPEG_LIBS" != x; then
3309       echo "        MP3 and video support enabled through FFmpeg"
3310       if test x"${ffmpeg_version_check}" != xok; then
3311         echo "        ERROR: You have version ${ffmpeg_version} of FFmpeg installed," >&3
3312         if test x"${have_ffmpeg_swscale}" = "xno"; then
3313           echo "               with no swscale enabled." >&3
3314         else
3315           echo "               with swscale enabled." >&3
3316         fi
3317         echo "               This setup isn't supported!" >&3
3318         echo "               Version 51.11.0 or newer is required, enabling swscale if >= 52.0.0." >&3
3319         echo "               You can install libswscale from http://ffmpeg.org" >&3
3320         echo "               or .deb users: apt-get install libswscale-dev" >&3
3321       else
3322         if test x"${avformat_h}" = x; then
3323           echo "        ERROR: FFmpeg's libavcodec header is installed but not libavformat." >&3
3324           echo "               You can install FFmpeg from http://ffmpeg.org" >&3
3325           echo "               or .deb users: apt-get install libavformat-dev" >&3
3326           echo "               or YaST users: yast -i libavformat-api (but currently installs into /usr/lib64)" >&3
3327           echo "               or explicitly set the path using --with-ffmpeg-incl=" >&5
3328           echo "               or reconfigure with --enable-media=gst" >&3
3329         else
3330           if test x"$FFMPEG_CFLAGS" != x; then
3331             echo "        FFmpeg flags are: $FFMPEG_CFLAGS"
3332           else
3333             echo "        FFmpeg flags are: default include path"
3334           fi
3335           echo "        FFmpeg libs are: $FFMPEG_LIBS"
3336         fi
3337       fi
3338     else
3339       echo "        ERROR: No FFmpeg development package installed!" >&3
3340       echo "               You can install FFmpeg from http://ffmpeg.org" >&3
3341       echo "               or .deb users: apt-get install libavformat-dev" >&3
3342       echo "               or .rpm users: yum install ffmpeg-devel" >&3
3343       echo "               or reconfigure with --enable-media=gst" >&3
3344     fi
3345   fi
3347 if test x$build_cairo = xyes; then
3348   if test x"$CAIRO_LIBS" != x; then
3349     if test x"$CAIRO_CFLAGS" != x; then
3350       echo "        Cairo flags are: $CAIRO_CFLAGS"
3351     else
3352       echo "        Cairo flags are: default include path"
3353     fi
3354     echo "        Cairo libs are: $CAIRO_LIBS"
3355   else
3356     echo "        ERROR: No Cairo development package installed!" >&3
3357     echo "               You need to have the Cairo development package installed" >&3
3358     echo "               if you have used --enable-render=cairo to configure." >&3
3359     echo "               Install it from http://cairographics.org" >&3
3360     echo "               or .deb users: apt-get install libcairo-dev" >&3
3361     echo "               or .rpm users: yum install cairo-devel" >&3
3362   fi
3365 if test x$build_fltk = xyes; then
3366   if test x"$FLTK2_LIBS" != x; then
3367     if test x"$FLTK2_CFLAGS" != x; then
3368       echo "        FLTK flags are: $FLTK2_CFLAGS"
3369     else
3370       echo "        FLTK flags are: default include path"
3371     fi
3372       echo "        FLTK libs are: $FLTK2_LIBS"
3373   else
3374     echo "        ERROR: No FLTK2 development package installed!" >&3
3375     echo "               There are currently no Debian or RPM packages for FLTK2;" >&3
3376     echo "               see http://www.fltk.org to install it from source." >&3
3377     echo "               or change to a different gui with --enable-gui=..." >&3
3378 dnl What it was for FLTK 1:
3379 dnl    echo "               or .deb users: apt-get install fltk-1.1-dev"
3380 dnl    echo "               or .rpm users: yum install fltk-devel"
3381   fi
3384 if test x$build_fltk = xyes; then
3385   if test x"$XFT_LIBS" != x; then
3386     if test x"$XFT_CFLAGS" != x; then
3387       echo "        Xft flags are: $XFT_CFLAGS"
3388     else
3389       echo "        Xft flags are: default include path"
3390     fi
3391       echo "        Xft libs are: $XFT_LIBS"
3392 dnl     else
3393 dnl       echo "        ERROR: No Xft development package installed!" >&3
3394 dnl       echo "               Install the xft development package" >&3
3395 dnl       echo "               or .deb users: apt-get install libxft-dev" >&3
3396 dnl       echo "               or .rpm users: yum install xft-devel" >&3
3397   fi
3400 # See whether SDL is required
3401 need_sdl=false
3402 test x$build_sdl = xyes                 && need_sdl=true
3403 test x$build_sound_sdl = xyes   && need_sdl=true
3405 if $need_sdl; then
3406   if test x"$SDL_LIBS" != x; then
3407     echo "        SDL flags are: $SDL_CFLAGS"
3408     echo "        SDL libs are: $SDL_LIBS"
3409   else
3410     echo "        ERROR: No SDL development package installed!" >&3
3411     echo "               Install it from http://www.libsdl.org/download-1.2.php" >&3
3412     echo "               or .deb users: apt-get install libsdl1.2-dev" >&3
3413     echo "               or .rpm users: yum install SDL-devel" >&3
3414     test x$build_sdl = xyes &&
3415         echo "               or select a different GUI with --enable-gui= " >&3
3416   fi
3418 unset need_sdl
3420 if test x"$nsapi" = x"yes"; then
3421 dnl  if test x"$FIREFOX_CFLAGS" != x; then
3422 dnl    echo "        Firefox flags are: $FIREFOX_CFLAGS"
3423 dnl    echo "        Firefox libs are: $FIREFOX_LIBS"
3424     echo "        Plugin will be installed in ${FIREFOX_PLUGINS}"
3425 dnl  else
3426 dnl    echo "        ERROR: No Firefox or Mozilla development package installed!" >&3
3427 dnl  fi
3430 if test x"${pthreads}" = x"yes"; then
3431   if test x"$PTHREAD_CFLAGS" != x; then
3432     echo "        POSIX Threads flags are: $PTHREAD_CFLAGS"
3433   fi
3434   if test x"${PTHREAD_LIBS}" != x; then
3435     echo "        POSIX Threads lib is: $PTHREAD_LIBS"
3436   else
3437     if test x"${cross_compiling}" = xno; then
3438       echo "ERROR: No pthread development package installed!" >&3
3439     fi
3440   fi
3443 if test x"${docbook}" = x"yes"; then
3444   if test x"$MAKEINFO" = x; then
3445     echo "        ERROR: no makeinfo tools installed!" >&3
3446     echo "               Either install it from http://www.gnu.org/software/texinfo/" >&3
3447     echo "               or .deb users: apt-get install texinfo" >&3
3448     echo "               or configure without --enable-docbook" >&3
3449   fi
3450   dnl low-level tools
3451   if test x"$DB2X_TEXIXML" = x -o x"$DB2X_MANXML" = x -o x"$DB2X_XSLTPROC" = x; then
3452     dnl high-level tools
3453     if test x"${DB2X_TEXI}" = x -o x"${DB2X_MAN}" = x; then
3454       echo "        ERROR: No DocBook2X tools installed!" >&3
3455       echo "               Either install it from http://docbook2x.sourceforge.net" >&3
3456       echo "               or .deb users: apt-get install docbook docbook2x docbook-utils" >&3
3457       echo "                              docbook-xml docbook-xsl texinfo xsltproc" >&3
3458       echo "               or configure without --enable-docbook" >&3
3459     fi
3460   else
3461     echo "        You have version $db2x_version of the DocBook2X tools."
3462   fi
3463 else
3464   echo "        WARNING: without --enable-docbook we will use the cached" >&4
3465   echo "                 documentation files included in the gnash distribution." >&4
3466   echo "                 If you change files in doc/C, you should --enable-docbook." >&4
3469 if test x"$CURL_LIBS" != x; then
3470   if test x"$CURL_CFLAGS" != x; then
3471     echo "        CURL flags are: $CURL_CFLAGS"
3472   else
3473     echo "        CURL flags are: default include path"
3474   fi
3475     echo "        CURL libs are: $CURL_LIBS"
3476 else
3477   echo "        RECOMMENDED: If you install the CURL library, Gnash will be able to" >&5
3478   echo "                     display remote content (streaming from URLs) using CURL." >&5
3479   echo "                     Install libcurl from http://curl.haxx.se/libcurl" >&5
3480   echo "                     or .deb users: apt-get install libcurl-dev" >&5
3481   echo "                     or .rpm users: yum install curl-devel" >&5
3484 if test x"$SPEEX_LIBS" != x; then
3485   if test x"$SPEEX_CFLAGS" != x; then
3486     echo "        Speex flags are: $SPEEX_CFLAGS"
3487   else
3488     echo "        Speex flags are: default include path"
3489   fi
3490     echo "        Speex libs are: $SPEEX_LIBS"
3491 else
3492   echo "        RECOMMENDED: If you install the Speex library, Gnash will be able to" >&5
3493   echo "                     decoded Speex encoded audio in FLV files." >&5
3494   echo "                     Install libspeex from http://speex.org" >&5
3495   echo "                     or .deb users: apt-get install libspeex-dev" >&5
3496   echo "                     or .rpm users: yum install speex-devel" >&5
3499 if test x"$ext_dbus" = xyes; then
3500   if test x"$DBUS_LIBS" != x; then
3501     if test x"$DBUS_CFLAGS" != x; then
3502       echo "        DBUS flags are: $DBUS_CFLAGS"
3503     else
3504       echo "        DBUS flags are: default include path"
3505     fi
3506       echo "        DBUS libs are: $DBUS_LIBS"
3507   else
3508     echo "        WARNING: DBUS library not found." >&4
3509     echo "                 Gnash will be built without support for remote controls." >&4
3510     echo "                 Why not install libdbus from http://www.dbus.org" >&4
3511     echo "                 or .deb users: apt-get install dbus-dev" >&4
3512     echo "                 or .rpm users: yum install dbus-devel" >&4
3513   fi
3516 if test x$build_agg = xyes; then # {
3517   echo "        AGG Pixel format is: $pixelformat"
3518     if test x"$AGG_LIBS" != x; then # {
3519       if test x"${agg25}" != xyes; then # {
3520         echo "        ERROR: Your installation of AGG appears to be version 2.4 or older." >&3
3521         echo "               Please upgrade to AGG 2.5 or greater." >&3
3522         echo "               Install it from http://www.antigrain.com" >&3
3523         echo "               or .deb users: apt-get install libagg-dev" >&3
3524         echo "               or .rpm users: yum install agg-devel" >&3
3525       else # }{
3526         if test x"$AGG_CFLAGS" != x; then # {
3527           echo "        AGG flags are: $AGG_CFLAGS"
3528         else # }{
3529           echo "        AGG flags are: default include path"
3530         fi # }
3531         echo "        AGG libs are: $AGG_LIBS"
3532       fi # }
3533     else # }{
3534       echo "        ERROR: No AGG development package installed!" >&3
3535       echo "               Install it from http://www.antigrain.com" >&3
3536       echo "               or .deb users: apt-get install libagg-dev" >&3
3537       echo "               or .rpm users: yum install agg-devel" >&3
3538     fi # }
3539 fi # }
3541 if test x"$BOOST_LIBS" != x; then
3542         echo "        BOOST flags are: $BOOST_CFLAGS"
3543         echo "        BOOST libs are: $BOOST_LIBS"
3544         echo "        BOOST libs for cygnal are: $BOOST_CYGNAL_LIBS"
3545     dnl fi
3546     if test x"${missing_headers}" != x; then
3547       for i in ${missing_headers}; do
3548         echo "        ERROR: The BOOST $i header file is needed!" >&3
3549         echo "               Install it from http://boost.org" >&3
3550         echo "               or from a Boost development package" >&3
3551       done
3552     fi
3554     if test x"${cygnal}" = x"yes"; then
3555         if test x"${cygnal_missing_libs}" != x; then
3556           for i in ${cygnal_missing_libs}; do
3557             echo "          ERROR: The BOOST $i library is required for cygnal!" >&4
3558             echo "                 Either configure with --disable-cygnal or" >&4
3559             echo "                 install it from http://www.boost.org" >&4
3560             echo "                 or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&4
3561           done
3562         fi
3563     fi
3565     if test x"${missing_libs}" != x; then
3566       for i in ${missing_libs}; do
3567         echo "        ERROR: The BOOST $i library is needed!" >&3
3568         echo "               Install it from http://boost.org" >&3
3569         echo "               or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&3
3570       done
3571     fi
3572 else
3573     echo "        ERROR: No BOOST development package installed!" >&3
3574     echo "               Install it from http://www.boost.org" >&3
3575     echo "               or .deb users: apt-get install libboost-dev libboost-thread-dev" >&3
3576     if test x"$cygnal" = xyes; then
3577     echo "                              and libboost-date-time-dev (for cygnal)" >&3
3578     fi
3579     echo "               or .rpm users: yum install boost-devel" >&3
3582 dnl don't look for the flash compilers when cross compiling.
3583 if test x"$testsuite" = x"yes"; then
3584   if test x$cross_compiling = xno; then
3585     if test x"$MING_LIBS" != x; then
3586       echo "        MING flags are $MING_CFLAGS"
3587       echo "        MING libs are $MING_LIBS"
3588     else
3589       echo "        WARNING: You need to have the Ming development package" >&4
3590       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3591       echo "                 Install it from http://www.libming.org/" >&4
3592       echo "                 or .deb users: apt-get install libming-dev" >&4
3593     fi
3595     if test x"$MAKESWF" != x; then
3596       echo "        MING version code is $MING_VERSION_CODE"
3597       echo "        MAKESWF is $MAKESWF"
3598     else
3599       echo "        WARNING: You need to have the Ming utilities package" >&4
3600       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3601       echo "                 Install it from http://www.libming.org" >&4
3602       echo "                 or .deb users: apt-get install libming-util" >&4
3603     fi
3605     if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; then
3606       echo "        WARNING: You have an older version of Ming installed and will not" >&4
3607       echo "                 be able to run all of the tests in Gnash testsuite." >&4
3608       echo "                 Install the latest version from http://www.libming.org" >&4
3609     fi
3611     if test x"$SWFDEC_TESTSUITE" != x; then
3612       echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
3613     fi
3615     if test x"$MTASC" != x; then
3616       echo "        MTASC is $MTASC"
3617       echo "        MTASC CLASSPATH is $MTASC_CLASSPATH"
3618     else
3619       echo "        WARNING: You need to have the MTASC compiler packages installed" >&4
3620       echo "                 to run some of the tests in Gnash testsuite." >&4
3621       echo "                 You can install it from http://mtasc.org" >&4
3622       echo "                 or .deb users: apt-get install mtasc" >&4
3623     fi
3625     if test x"$HAXE" != x; then
3626       echo "        HAXE is $HAXE"
3627       echo "        HAXE CLASSPATH is $HAXE_CLASSPATH"
3628     else
3629       echo "        WARNING: You need to have the HAXE compiler package " >&4
3630       echo "                 version 2.00 or higher installed" >&4
3631       echo "                 to run some of the tests in Gnash testsuite." >&4
3632       echo "                 You can install it from http://haxe.org" >&4
3633       echo "                 or .deb users: apt-get install haxe" >&4
3634     fi
3636     if test x"$SWFMILL" != x; then
3637       echo "        SWFMILL is $SWFMILL"
3638       if test x"$ENABLE_AVM2" != x -a "$SWFMILL_VERSION" -lt 00021206; then
3639         echo "        WARNING: You are building Gnash with AVM2 support but" >&4
3640         echo "                 your swfmill version is too old to run AS3" >&4
3641         echo "                 tests." >&4
3642       fi
3643     else
3644       echo "        WARNING: You need to have the 'swfmill' tool installed" >&4
3645       echo "                 to run some of the tests in Gnash testsuite." >&4
3646       echo "                 You can install it from http://swfmill.org/" >&4
3647       echo "                 or .deb users: apt-get install swfmill" >&4
3648     fi
3650     if test x"$SWFC" != x; then
3651       echo "        SWFC is $SWFC"
3652     else
3653       echo "        WARNING: You need to have 'swfc' from SWFTools installed" >&4
3654       echo "                 to run some of the tests in Gnash testsuite." >&4
3655       echo "                 You can install it from http://www.swftools.org/" >&4
3656       echo "                 or .deb users: apt-get install swftools" >&4
3657     fi
3659     if test x"$AS3COMPILE" != x; then
3660       echo "        AS3COMPILE is $AS3COMPILE"
3661     else
3662       echo "        WARNING: you need as3compile from SWFTools" >&4
3663       echo "                 to run some of the tests in Gnash testsuite." >&4
3664       echo "                 You can install it from http://www.swftools.org/" >&4
3665     fi
3667     if test x"$HTTP_TESTSUITE" != x; then
3668       echo "        HTTP testsuite dir is $HTTP_TESTSUITE"
3669     fi
3671     if test x"$RED5_HOST" != x; then
3672       echo "        RED5 testing host is $RED5_HOST"
3673     fi
3674   fi
3677   if test x"$PERL" != x; then
3678     echo "        PERL is $PERL"
3679   else
3680     echo "        WARNING: You need to have perl installed" >&4
3681     echo "                 to run some of the tests in Gnash testsuite." >&4
3682   fi
3684 if test x"$testsuite" = x"yes"; then
3685   if test x"$CSOUND" != x; then
3686     echo "        CSOUND is $CSOUND"
3687   fi
3690 if test x"$Z_LIBS" != x; then
3691   if test x"$Z_CFLAGS" != x; then
3692     echo "        Z flags are: $Z_CFLAGS"
3693   else
3694     echo "        Z flags are: default include path"
3695   fi
3696   echo "        Z libs are: $Z_LIBS"
3697 else
3698   echo "        RECOMMENDED: You need to have the zlib development packages installed" >&5
3699   echo "                     to play compressed SWF (most of them from version 6 up)" >&5
3700   echo "                     and to display some kinds of JPEG files." >&5
3701   echo "                     Install it from http://www.zlib.net" >&5
3702   echo "                     or .deb users: apt-get install zlib1g-dev" >&5
3703   echo "                     or .rpm users: yum install zlib-devel." >&5
3704   echo "                     It may still be possible to configure without zlib." >&5
3707 if test x"$FREETYPE2_LIBS" != x; then
3708   if test x"$FREETYPE2_CFLAGS" != x; then
3709     echo "        FreeType flags are: $FREETYPE2_CFLAGS"
3710   else
3711     echo "        FreeType flags are: default include path"
3712   fi
3713   echo "        FreeType libs are: $FREETYPE2_LIBS"
3714 else
3715   echo "        RECOMMENDED: You need to have the freetype development packages installed" >&5
3716   echo "                     to use device fonts." >&5
3717   echo "                     Install it from http://www.freetype.org" >&5
3718   echo "                     or .deb users: apt-get install libfreetype6-dev" >&5
3719   echo "                     or .rpm users: yum install freetype-devel" >&5
3720   echo "                     It may still be possible to configure without freetype." >&5
3723 if test x"$FONTCONFIG_LIBS" != x; then
3724   if test x"$FONTCONFIG_CFLAGS" != x; then
3725     echo "        Fontconfig flags are: $FONTCONFIG_CFLAGS"
3726   else
3727     echo "        Fontconfig flags are: default include path"
3728   fi
3729   echo "        Fontconfig libs are: $FONTCONFIG_LIBS"
3730 else
3731   echo "        RECOMMENDED: You need to have the fontconfig development packages installed" >&5
3732   echo "                     to use device fonts." >&5
3733   echo "                     Install it from http://www.fontconfig.org" >&5
3734   echo "                     or .deb users: apt-get install libfontconfig1-dev" >&5
3735   echo "                     or .rpm users: yum install fontconfig-devel" >&5
3736   echo "                     It may still be possible to configure without fontconfig." >&5
3739 if test x$ext_mysql = xyes; then
3740   if test x$mysql != xno; then
3741     if test x"$MYSQL_LIBS" != x; then
3742       echo "        MYSQL flags are: $MYSQL_CFLAGS"
3743       echo "        MYSQL libs are: $MYSQL_LIBS"
3744     else
3745       echo "        ERROR: No MySQL development package is installed." >&3
3746       echo "               Either reconfigure without --enable-extensions=mysql" >&3
3747       echo "               or install MySQL header files from http://www.mysql.org" >&3
3748       echo "               or .deb users: apt-get install libmysqlclient-dev" >&3
3749       echo "                 or .rpm users: yum install mysql-devel" >&4
3750     fi
3751   fi
3754 if test "$GMSGFMT" = ":"; then
3755   echo "        WARNING: You need the gettext package installed to use translations." >&4
3756   echo "                 Required for building a package or 'make distcheck'" >&4
3757   echo "                 Install it from http://www.gnu.org/software/gettext/" >&4
3758   echo "                 or .deb users: apt-get install gettext" >&4
3759   echo "                 or .rpm users: yum install gettext" >&4
3762 if test x"${build_vaapi}" = x"yes"; then
3763   if test x"${LIBVA_CFLAGS}" = xyes; then
3764       echo "        LIBVA flags are: default"
3765     else
3766       echo "        LIBVA flags are: $LIBVA_CFLAGS"
3767       echo "        LIBVA libraries are: $LIBVA_LIBS"
3768   fi
3769   if test x$use_libva_x11 = xyes; then
3770     if test x"${LIBVA_X11_CFLAGS}" = xyes; then
3771       echo "        LIBVA X11 flags are: default"
3772     else
3773       echo "        LIBVA X11 flags are: $LIBVA_X11_CFLAGS"
3774       echo "        LIBVA X11 libraries are: $LIBVA_X11_LIBS"
3775     fi
3776   fi
3777   if test x$use_libva_glx = xyes; then
3778     if test x"${LIBVA_GLX_CFLAGS}" = xyes; then
3779       echo "        LIBVA GLXflags are: default"
3780     else
3781       echo "        LIBVA GLX flags are: $LIBVA_GLX_CFLAGS"
3782     fi
3783     echo "        LIBVA GLX libraries are: $LIBVA_GLX_LIBS"
3784   fi
3787 if test x"$ac_cv_gcc_visibility" != xyes; then
3788   if test x"$npapi" = xyes; then
3789     echo "        WARNING: NPAPI (mozilla) plugin is enabled, but your compiler"
3790     echo "                 does not support symbol visibility. This may cause "
3791     echo "                 the plugin to malfunction and may result in small "
3792     echo "                 children being eaten. You have been warned!"
3793   fi
3796 if test x"${DEJAGNU}" != x""; then
3797   echo "        DEJAGNU's runtest is $DEJAGNU"
3798 else
3799   echo "        WARNING: You need the dejagnu package installed to get a summary" >&4
3800   echo "                 report after running ''make check''" >&4
3801   echo "                 Install it from http://www.gnu.org/software/dejagnu/" >&4
3802   echo "                 or .deb users: apt-get install dejagnu" >&4
3803   echo "                 or .rpm users: yum install dejagnu" >&4
3806 dnl Access Linux Platform
3807 if test x"${build_alp}" = xyes; then
3808   if test x"${ALP_CFLAGS}" != x; then
3809     echo "        ALP flags are: $ALP_CFLAGS"
3810     echo "        ALP libs are: $ALP_LIBS"
3811   else
3812     echo "        ERROR: No ALP development package is installed." >&3
3813   fi
3816 dnl Haiku
3817 if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o x"${build_media_haiku}" = x"yes"; then
3818     echo "        Haiku libs are: $HAIKU_LIBS"
3821 if test x"$python" = x"yes"; then
3822   if test x"$has_python" = x"yes"; then
3823     echo "        PYTHON flags are: $PYTHON_CFLAGS"
3824     echo "        PYTHON libs are: $PYTHON_LIBS"
3825     echo "        PYTHON executable is are: $PYTHON"
3826   else
3827     echo "        ERROR: No Python development package is installed, but it's enabled." >&3
3828   fi
3830 if test x${build_ssl} = xyes; then
3831   if test x"${has_ssl}" = xyes; then
3832     if test x"${SSL_CFLAGS}" = xyes; then
3833       echo "        SSL flags are: default"
3834     else
3835       echo "        SSL flags are: $SSL_CFLAGS"
3836     fi
3837     echo "        SSL libs are: $SSL_LIBS"
3838   else
3839     echo "        ERROR: No SSL development package is installed, but it's enabled." >&3
3840   fi
3843 if test x${build_ssh} = xyes; then
3844   if test x"${has_ssh}" = xyes; then
3845     if test x"${SSH_CFLAGS}" = xyes; then
3846       echo "        SSH flags are: default"
3847     else
3848       echo "        SSH flags are: $SSH_CFLAGS"
3849     fi
3850     echo "        SSH libs are: $SSH_LIBS"
3851   else
3852     echo "        ERROR: No SSH development package is installed, but it's enabled." >&3
3853   fi
3856 if test x"${build_all_as3}" = x"yes"; then
3857   echo "        Building the entire ActionScript class libary"
3858 else
3859   echo "        Only building these ActionScript classes into the library:"
3860   echo "     ${classlist}"
3863 if test x"$testsuite" = x"yes"; then
3864   if test x"$NETCAT" != x; then
3865     echo "        You have netcat installed, which is only used for testing"
3866   else
3867     echo "        Install netcat for networking test support"
3868   fi
3869   if test x"$WGET" != x; then
3870     echo "        You have wget installed, which is only used for testing"
3871   else
3872     echo "        Install wget for networking test support"
3873   fi
3876 if test x$cross_compiling = xyes; then
3877    if test x"${android_ndk}" != xno; then
3878       AC_MSG_NOTICE([This build is setup for cross compiling for Android])
3879    else
3880       AC_MSG_NOTICE([This build is setup for cross compiling])
3881    fi
3884 echo "--------"
3885 dnl if test x"${ghelp}" = x"yes"; then
3886 dnl   echo "        GNOME help enabled"
3887 dnl else
3888 dnl   echo "        GNOME help disabled (default). Use --enable-ghelp to enable."
3889 dnl fi
3891 dnl if test x"${extensions}" = x"yes"; then
3892 dnl   echo "        Building extensions enabled (default). Use --disable-extensions to disable."
3893 dnl else
3894 dnl   echo "        Building Gnash extensions disabled."
3895 dnl fi
3897 if test x"${cygnal}" = x"yes"; then
3898   echo "        Building Cygnal media server enabled (default). Use --disable-cygnal to disable."
3899 else
3900   echo "        Building Cygnal media server disabled."
3903 if test x"${debugger}" = x"yes"; then
3904   echo "        Building Flash debugger support (default). Use --disable-debugger to disable."
3905 else
3906   echo "        Building the Flash debugger is disabled."
3909 if test x"${with-top_level}" != x; then
3910   echo "        Top level for cross compiling support files is: $with_top_level"
3913 if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
3914   echo "        WARNING: Pixel format RGB565 selected in combination with the" >&4
3915   echo "                 GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)." >&4
3918 if test x"${extensions_list}" != x; then
3919   echo "        Building extensions: ${extensions_list}"
3922 if test x"${security_list}" != x; then
3923   echo "        Enabling security features: ${security_list}"
3926 if test x"${hwaccel_list}" != xnone; then
3927   echo "        Enabling hardware acceleration features: ${hwaccel_list}"
3930 if test x"${statistics_list}" != x; then
3931   echo "        Enabling statistics collecting for: ${statistics_list}"
3934 if test x"${SUPPORTED_GUIS}" = x; then
3935   AC_MSG_ERROR(no supported GUIs found);
3938 echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
3939 echo "        Renderers supported: ${renderer_list}"
3940 echo "        Hardware Acceleration: ${hwaccel_list}"
3941 echo "        Media handlers: ${media_list}"
3942 echo "        Using ${add_sound} for sound handling"
3943 echo "        Using $with_shm mode for shared memory"
3945 if test x"$docbook" = x"yes"; then
3946   echo '        DocBook document processing enabled (for "make html" and "make pdf")'
3947   if test x"$docbook_styles" != x; then
3948     echo "        Docbook styles sheets in $docbook_styles"
3949   fi
3950 else
3951   echo "        DocBook document processing disabled (default)"
3954 dnl The Framebuffer GUI has several other settings. As it doesn't have X11,
3955 dnl we have to handle input devices ourselves.
3956 if test x"${build_fb}" = xyes; then
3957 echo "        Using ${input_events} for Input"
3958   if test x"${fakefb}" != x; then
3959     echo "        Using shared memory as a fake framebuffer"
3960   fi
3961   if test x"${offscreen}" = xyes; then
3962     echo "        Using offscreen rendering"
3963   fi
3964   if test x"${doublebuf}" = xyes; then
3965     echo "        Using double buffering when rendering"
3966   fi
3969 if test -s $cwarn; then
3970   echo ""
3971   cat $cwarn
3972   rm $cwarn
3973   echo ""
3974   echo "Gnash should still compile even with these warnings."
3975   echo "If it doesn't, report the warnings as a bug."
3978 if test -s $crec; then
3979   echo ""
3980   cat $crec
3981   rm $crec
3982   echo ""
3983   echo "Gnash should still compile, but you'll miss important support"
3986 dnl If anything critical is missing, don't bother to continue
3987 if test -s $cerr; then
3988   echo ""
3989   cat $cerr >&2
3990   rm $cerr
3991   AC_MSG_ERROR([Please install required packages])
3994 if test x"$fork" = x"no"; then
3995   AC_MSG_ERROR([Currently only forking the standalone player works!])
3997 echo ""
3999 # Local Variables:
4000 # c-basic-offset: 2
4001 # tab-width: 2
4002 # indent-tabs-mode: nil
4003 # End: