remove extra blank line
[gnash.git] / configure.ac
blob0f648e87615127157ca2103d2da7c3a5cd70c7a4
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 stat_proplookup=no
342 AC_ARG_WITH(statistics,
343   AC_HELP_STRING([--with-statistics=], [Specify which statistics features to enable]),
344   if test -n ${withval}; then
345     if test "x${withval}" != "xno"; then
346       extlist="${withval}"
347       withval=`echo ${withval} | tr '\054' ' ' `
348     else
349       extlist=""
350       withval=""
351     fi
352   fi
353   statistics_list=""
354   nstatistics=0
355   while test -n "${withval}" ; do
356     val=`echo ${withval} | cut -d ' ' -f 1`
357     [case "${val}" in
358       buffers)
359         buffers=yes
360         nstatistics=$((nstatistics+1))
361         ;;
362       que)
363         que=yes
364         nstatistics=$((nstatistics+1))
365         ;;
366       memory)
367         memory=yes
368         nstatistics=$((nstatistics+1))
369         ;;
370       cache)
371         cache=yes
372         nstatistics=$((nstatistics+1))
373         ;;
374       proplookup)
375         stat_proplookup=yes
376         nstatistics=$((nstatistics+1))
377         ;;
378       all|ALL)
379         buffers=yes
380         memory=yes
381         queu=yes
382         cache=yes
383         stat_proplookup=yes
384         nstatistics=5           dnl this must be incremented if you add anything
385         ;;
386       *) AC_MSG_ERROR([invalid statistics feature specified: ${withval} given (accept: buffers|que|memory|cache|proplookup|all)])
387         ;;
388       esac]
389     withval=`echo ${withval} | cut -d ' ' -f 2-6`
390     if test "x$val" = "x$withval"; then
391       break;
392     fi
393   done
395 if test x${buffers} = xyes; then
396   statistics_list="${statistics_list} buffers"
397   AC_DEFINE(USE_STATS_BUFFERS, [1], [Support statistics collecting for the queue buffers])
398   AC_MSG_WARN([This option will effect your performance])
401 if test x${memory} = xyes; then
402   statistics_list="${statistics_list} memory"
403   AC_DEFINE(USE_STATS_MEMORY, [1], [Support statistics collecting for all memory profiling])
404   AC_MSG_WARN([This option will effect your performance])
407 if test x${que} = xyes; then
408   statistics_list="${statistics_list} queues"
409   AC_DEFINE(USE_STATS_QUEUE, [1], [Support statistics collecting for the queues])
412 if test x${cache} = xyes; then
413   statistics_list="${statistics_list} cache"
414   AC_DEFINE(USE_STATS_CACHE, [1], [Support statistics collecting for the cache])
417 if test x${stat_proplookup} = xyes; then
418   statistics_list="${statistics_list} proplookup"
419   AC_DEFINE(GNASH_STATS_OBJECT_URI_NOCASE, [1], [Collecting and report stats about ObjectURI case lookups])
420   AC_DEFINE(GNASH_STATS_PROPERTY_LOOKUPS, [1], [Collecting and report stats about property lookups])
421   AC_DEFINE(GNASH_STATS_STRING_TABLE_NOCASE, [1], [Collecting and report stats about string_table::key case lookups])
424 dnl this is just so Makefile can print the same list
425 STATISTICS_LIST="$statistics_list"
426 AC_SUBST(STATISTICS_LIST)
429 # These settings are compile time options for the security
430 # setting for anything that lets gnash exchange data with
431 # other applications. Currently this only supports Shared
432 # Objects and Local Connections. Shared Objects are like
433 # your web browsers cookies, and Local Connections use
434 # shared memory to execute methods remotely, and to
435 # exchange data.
437 # The default is to enable everything, and these can
438 # also be controlled dynamically by the $HOME/.gnashrc
439 # file.
441 solreadonly=no
442 localconnection=yes
443 lctrace=yes
445 AC_ARG_WITH(security,
446   AC_HELP_STRING([--with-security=], [Specify which security features to enable]),
447   if test -n ${withval}; then
448     if test "x${withval}" != "xno"; then
449       extlist="${withval}"
450       withval=`echo ${withval} | tr '\054' ' ' `
451     else
452       extlist=""
453       withval=""
454     fi
455   fi
456   security_list=""
457   nsecurity=0
458   while test -n "${withval}" ; do
459     val=`echo ${withval} | cut -d ' ' -f 1`
460 dnl    security_list="${security_list} ${val}"
461     [case "${val}" in
462       solreadonly)
463         solreadonly=yes
464         nsecurity=$((nsecurity+1))
465         ;;
466       lc)
467         localconnection=yes
468         nsecurity=$((nsecurity+1))
469         ;;
470       lctrace)
471         lctrace=yes
472         nsecurity=$((nsecurity+1))
473         ;;
474       all|ALL)
475         solreadonly=yes
476         lc=yes
477         lctrace=yes
478         nsecurity=3
479         ;;
480       *) AC_MSG_ERROR([invalid security feature specified: ${withval} given (accept: solreadonly|lc|lctrace)])
481         ;;
482       esac]
483     withval=`echo ${withval} | cut -d ' ' -f 2-6`
484     if test "x$val" = "x$withval"; then
485       break;
486     fi
487   done
489 if test xlctrace = xyes; then
490   security_list="${security_list} lctrace"
491   AC_DEFINE(USE_LC_TRACE, [1],
492            [Support LocalConnection])
493   AC_MSG_NOTICE([This build supports LocalConnection tracing])
494   AC_MSG_WARN([This option will effect your performance])
497 if test x$localconnection = xyes; then
498   security_list="${security_list} localconnection"
499   AC_DEFINE(USE_LC, [1],
500                  [Support LocalConnection])
501   AC_MSG_NOTICE([This build supports LocalConnection])
503 if test x$solreadonly = xyes; then
504   security_list="${security_list} solreadonly"
505   AC_DEFINE(USE_SOL_READONLY, [1],
506                  [Shared Objects are read-only])
507   AC_MSG_NOTICE([Shared Objects are read-only])
509 SECURITY_LIST="$security_list"
510 AC_SUBST(SECURITY_LIST)
512 dnl For Haiku, we know the sysroot is in a non-standard place
513 dnl it is important that -lagg comes before -lbe
514 if test x"${haiku}" = xyes; then
515   HAIKU_LIBS=-lbe
516   AC_SUBST(HAIKU_LIBS)
519 DLOPEN="-dlopen"
520 DLPREOPEN="-dlpreopen"
521 AC_SUBST(DLOPEN)
522 AC_SUBST(DLPREOPEN)
524 dnl dnl Substitute INCLTDL and LIBLTDL in the Makefiles
525 AC_SUBST(INCLTDL)
526 AC_SUBST(LIBLTDL)
527 AC_SUBST(LIBTOOL_DEPS)
529 dnl Darwin uses libtool instead of ar to produce libraries. We determine which one
530 dnl we have here now. For some reason on Darwin, we don't get the
531 dnl count from grep via stdin correctly. Writing a temp file does the
532 dnl trick, so although it's ugly, that's what we gotta do...
533 AC_MSG_CHECKING([which type of library archiver we have])
534 rm -f .tmp
535 libtool > .tmp 2>&1
536 archiver=`grep -c dynamic .tmp 2>&1`
537 rm -f .tmp
538 dnl is there any good way to report what we found here?
539 AC_MSG_RESULT()
540 if test x"${archiver}" != x && test "${archiver}" -eq 1; then
541 dnl   if test "$enable_shared" = no; then
542 dnl     AR="libtool -static"
543 dnl   else
544 dnl     AR="libtool -dynamic"
545 dnl     CXXFLAGS="${CXXFLAGS} -dynamic"
546    export MACOSX_DEPLOYMENT_TARGET="10.3"
547 dnl   fi
548 dnl   AR_FLAGS="-o"
549    darwin=yes
550 else
551    darwin=no
554 dnl When cross compiling, limit the search directories cause otherwise
555 dnl we may get the host headers or libraries by accident. These values
556 dnl are exported, so all the other configure tests in macros/*.m4 use
557 dnl these same settings rather than duplicating them like we used to.
558 dnl To override thise, use the --with-*-incl= and --with-*-libs=
559 dnl options to configure.
560 if test x$cross_compiling = xyes; then
561   AC_MSG_NOTICE([Configuring Gnash for cross compilation])
562   export pkgroot="`$CXX -print-search-dirs | grep "install:" | sed -e 's/install: //' -e 's:/lib/gcc/.*::'`"
563   dnl pkgroot only works correctly with builds of cross tools not in
564   dnl /usr, ie... installed from the distribution packages, or just
565   dnl plain installed in the system tools. This contaminates configure
566   dnl when building for variations of the same basic architecture,
567   dnl like i686-linux -> i586-mingw32.
568   if test x${pkgroot} = "/usr"; then
569     export pkgroot=""
570   fi
571   export incllist="`eval echo ${with_top_level}/include ${pkgroot}/${host_alias}/include ${pkgroot}/include`"
572   export libslist="`eval echo ${with_top_level}/lib ${pkgroot}/${host_alias}/lib ${pkgroot}/lib64 ${pkgroot}/lib32 ${pkgroot}/lib`"
573   export pathlist="`eval echo ${pkgroot}/${host_alias}/bin:${pkgroot}/bin`"
574   npapi=no
575 else
576   AC_MSG_NOTICE([Configuring Gnash for native compilation])
577   export incllist="`eval cat ${srcdir}/macros/incllist`"
578   export libslist="`eval cat ${srcdir}/macros/libslist`"
579   export pathlist=$PATH
582 if test x"${android_ndk}" != xno; then
583    incllist="${android_ndk}/include ${incllist}"
586 AM_CONDITIONAL(CROSS_COMPILING, [ test x$cross_compiling = xyes ])
588 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
589 dnl !! 
590 dnl !! IMPORTANT NOTICE 
591 dnl !!
592 dnl !!  Any call to GNASH_PATH_XXX must be be given *after* this snippet.
593 dnl !!  This is to ensure that PKG_CONFIG, cross_compiling and incllist are
594 dnl !!  properly set at the time of call.
595 dnl !!
596 dnl !!  Also GNASH_PKG_FIND has to be called later. Not sure
597 dnl !!  why but calling before breaks detection of CPP (see
598 dnl !!  gnash-dev mailing archives for June 12 2009
599 dnl !!  http://lists.gnu.org/archive/html/gnash-dev/2009-06/index.html
600 dnl !! 
601 dnl !! 
602 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
604 dnl Check for PKG_CONFIG before any GNASH_PATH call
605 PKG_PROG_PKG_CONFIG
607 dnl --------------------------------------------------------
608 dnl  GUI selection
609 dnl --------------------------------------------------------
611 has_gtk2=no        dnl FIXME: has_* shouldn't be in configure but in a macro
612 build_haiku=no
613 build_aos4=no      dnl AmigaOS4 GUI
614 build_kde3=no
615 build_kde4=no
616 build_qtopia3=no
617 build_qtopia4=no
618 build_gtk=no
619 build_qt3=no
620 build_qt4=no
621 build_fb=no                     dnl Raw framebuffer
622 build_fltk=no
623 build_sdl=no
624 build_riscos=no                 dnl Native OS2 GUI
625 build_aqua=no                   dnl Native MacOSX
626 build_hildon=no                 dnl Native LIMO
627 build_alp=no                    dnl Acess Linux Platform using Hiker
628 build_dump=no
629 AC_ARG_ENABLE(gui,
630   AC_HELP_STRING([--enable-gui=], [Enable support for the specified GUI toolkits (default=gtk,kde4)]),
631   [if test -n ${enableval}; then
632     enableval=`echo ${enableval} | tr '\054' ' ' `
633   fi
634   while test -n "${enableval}" ; do
635     val=`echo ${enableval} | cut -d ' ' -f 1`
636     case "${val}" in
637       hildon|HILDON|hildon2|HILDON2)
638         build_hildon=yes
639         AC_DEFINE(USE_HILDON, [1], [Use the Hildon mobile framework])
640         build_gtk=yes
641         ;;
642       alp|ALP|alp|ALP)
643         build_alp=yes
644         build_gtk=yes
645         ;;
646       gtk|GTK|gtk2|GTK2)
647         build_gtk=yes
648         ;;
649       kde3|KDE3)
650         build_qt3=yes
651         build_kde3=yes
652         ;;
653       kde4|KDE4)
654         build_qt4=yes
655         build_kde4=yes
656         ;;
657       qtopia3|QTOPIA3)
658         build_qtopia3=yes
659         build_qt3=yes
660         ;;
661       qtopia4|QTOPIA4)
662         build_qtopia4=yes
663         build_qt4=yes
664         ;;
665       qt3|QT3)
666         build_qt3=yes
667         ;;
668       qt4|QT4)
669         build_qt4=yes
670         ;;
671       sdl|SDL)
672         build_sdl=yes
673         ;;
674       aqua|AQUA|Aqua)
675         build_aqua=yes
676         ;;
677       riscos|RISCOS|RiscOS)
678         build_riscos=yes
679         ;;
680       fltk|FLTK|fltk2|FLTK2)
681         build_fltk=yes
682         ;;
683       fb|FB)
684         build_fb=yes
685         ;;
686       aos4|AOS4)
687         build_aos4=yes
688         ;;
689       haiku|HAIKU)
690         build_haiku=yes
691         ;;
692       dump|DUMP)
693         build_dump=yes
694         ;;
695       all|ALL)
696         build_dump=yes
697         build_fb=yes
698         build_fltk=yes
699         build_qt3=yes
700         build_kde3=yes
701         build_kde4=yes
702         build_qt4=yes
703         build_sdl=yes
704         ;;
705       *) AC_MSG_ERROR([invalid gui ${enableval} given (accept: gtk|kde3|kde4|fltk|sdl|riscos|aqua|fb|hildon|alp|qtopia3|qtopia4|dump|aos4|haiku)])
706          ;;
707       esac
708     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
709     if test "x$val" = "x$enableval"; then
710       break;
711     fi
712   done],
713   [if test x"${openbsd_os}" = x"openbsd"; then
714     build_kde3=yes;
715     build_qt3=yes;
716     build_gtk=yes;
717   else if test x"${haiku}" = xyes; then
718     build_haiku=yes;
719   else
720     build_kde4=yes;
721     build_qt4=yes;
722     build_gtk=yes;
723   fi
724   fi]
727 if test x"${build_haiku}" = xyes; then
728   if test x"$haiku" != xyes; then
729     echo "        ERROR: Can not build Haiku gui outside of Haiku
730 operating system." >&3
731   fi
734 dnl We can use Xephyr or fbe to create a fake framebuffer instead of real
735 dnl video memory. This lets us test on a desktop machine.
736 AC_ARG_WITH(fakefb,
737 AC_HELP_STRING([--with-fakefb],
738  [specify a file to be mapped instead of a real framebuffer]),
739  with_fakefb=${withval})
741 fakefb=
742 if test x"${with_fakefb}" = xyes; then
743   dnl This is the default file name fbe uses.
744   fakefb=/tmp/fbe_buffer
745 else
746   if test x"${with_fakefb}" != x; then
747     fakefb=${with_fakefb}
748   fi
750 FAKEFB=${fakefb}
751 AC_SUBST(FAKEFB)
753 if test x"${fakefb}" != x; then
754     AC_DEFINE(ENABLE_FAKE_FRAMEBUFFER, [1], [Enable using a file instead of a real framebuffer])
758 dnl --------------------------------------------------------
759 dnl  Sound handler selection
760 dnl --------------------------------------------------------
761 add_sound=
762 build_sound_sdl=no
763 build_sound_ahi=no
764 build_sound_mkit=no
765 AC_ARG_ENABLE(sound,
766   AC_HELP_STRING([--enable-sound=[[sdl|ahi|mkit]]], [Use the specified sound handler (default=sdl)]),
767      [case "${enableval}" in
768       sdl|SDL|Sdl)
769         build_sound_sdl=yes
770         add_sound="sdl"
771         ;;
772       ahi|AHI|Ahi)
773         build_sound_ahi=yes
774         add_sound="ahi"
775         ;;
776       mkit|MKIT|Mkit)
777         build_sound_mkit=yes
778         add_sound="mkit"
779         ;;
780      esac],
781   [if test x"${haiku}" = xyes; then
782      build_sound_mkit=yes
783      add_sound="mkit"
784    else
785      build_sound_sdl=yes
786      add_sound=sdl
787    fi]
791 dnl --------------------------------------------------------
792 dnl  Media handler selection
793 dnl --------------------------------------------------------
794 build_media_gst=no
795 build_media_ffmpeg=no
796 AC_ARG_ENABLE(media,
797   AC_HELP_STRING([--enable-media=handler],
798     [Enable media handling support using the specified handler: gst, ffmpeg or none (no sound) [[gst]] ]),
799   
800     if test -n ${enableval}; then
801       enableval=`echo ${enableval} | tr '\054' ' ' `
802     fi
803     while test -n "${enableval}"; do
804       val=`echo ${enableval} | cut -d ' ' -f 1`
805       [case "${val}" in
806         GST|gst)
807           build_media_gst=yes
808           media_list="${media_list}gst "
809           ;;
810         FFMPEG|ffmpeg)
811           build_media_ffmpeg=yes
812           media_list="${media_list}ffmpeg "
813           ;;
814         no|NO|none)
815           media_list="none"
816           ;;
817         *)
818           AC_MSG_ERROR([bad value ${enableval} for --enable-media option])
819           ;;
820      
821       esac]
822       enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
823       if test "x$val" = "x$enableval"; then
824         break;
825       fi
826     done,
827     [if test x"${build_haiku}" = xyes; then
828         build_media_ffmpeg=yes
829         build_media_haiku=yes
830         media_list="ffmpeg haiku"
831      else
832         build_media_gst=yes
833         media_list="gst"
834     fi]
837 MEDIA_CONFIG="${media_list}"
838 AC_SUBST(MEDIA_CONFIG)
840 dnl if no media handler is selected, default to Gstreamer.
841 if test x"$build_media_ffmpeg" = x"no" -a x"$build_media_gst" = x"no"; then
842    build_media_gst=yes
845 if test x"$build_media_ffmpeg" = x"yes"; then
846   GNASH_PATH_FFMPEG
849 dnl -------------------------------
850 dnl Input Device selection
851 dnl -------------------------------
853 dnl Multiple input devices are supported. These can all work in
854 dnl varying combinations, so several may be listed. These are only
855 dnl required when using the Framebuffer, as without the X11 desktop,
856 dnl Gnash has to handle all these internally. This can get
857 dnl messy, as one might want to use a touchscreen with a normal mouse
858 dnl or keyboard attached. 
859 dnl By default, don't build any of these, as they are only for the Framebuffer
860 dnl running without X11.
861 if test x"${build_fb}" = xyes; then
862 build_ps2mouse=yes
863 build_ps2keyboard=no
864 build_input_events=yes
865 build_tslib=yes
866 input_events="PS/2 Mouse, Input Devices, Touchscreen via Tslib"
867 else
868 build_ps2mouse=no
869 build_ps2keyboard=no
870 build_input_events=no
871 build_tslib=no
872 input_events=
874 AC_ARG_ENABLE(input,
875   AC_HELP_STRING([--enable-input=], [Enable support for the specified input devices for the framebuffer GUI (default=ps2mouse|ps2keyboard|events|touchscreen)]),
876   [if test -n ${enableval}; then
877     enableval=`echo ${enableval} | tr '\054' ' ' `
878   fi
879   while test -n "${enableval}" ; do
880     val=`echo ${enableval} | cut -d ' ' -f 1`
881     case "${val}" in
882       ps2m*|PS2m*|m*|M*)        dnl a PS/2 style mouse
883         build_ps2mouse=yes
884         input_events="${input_events}, PS/2 Mouse"
885         ;;
886       ps2k*|PS2K*|k*|K*)        dnl a PS/2 style keyboard
887         build_ps2keyboard=yes
888         input_events="${input_events}, PS/2 Keyboard"
889         ;;
890       i*|I*|ev*|Ev*)    dnl use the new Input Event, which supports both
891         input_events="${input_events}, Input Event Device"
892         build_input_events=yes
893         ;;
894       t*|T*) dnl use a touchscreen with tslib, which works like a mouse
895         build_tslib=yes
896         input_events="${input_events}, Touchscreen"
897         ;;
898       *) AC_MSG_ERROR([invalid input device list! ${enableval} given (accept: ps2mouse|keyboard|events,touchscreen)])
899          ;;
900       esac
901     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
902     if test "x$val" = "x$enableval"; then
903       break;
904     fi
905   done],
908 if test x"${build_tslib}" = xyes; then
909   AC_DEFINE(USE_TSLIB, [1], [Use a tslib supported touchscreen])
910   GNASH_PKG_FIND(ts, [tslib.h], [Touchscreen library], ts_config)
912 AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} != xno])
914 if test x"${build_ps2mouse}" = xyes; then
915   AC_DEFINE(USE_MOUSE_PS2, [1], [Add support for a directly using a PS/2 Mouse])
917 AM_CONDITIONAL(ENABLE_MOUSE, [test x"${build_ps2mouse}" = xyes])
919 if test x"${build_ps2keyboard}" = xyes; then
920   AC_DEFINE(USE_KEYBOARD_PS2, [1], [Add support for directly using a PS/2 Keyboard])
922 if test x"${build_input_events}" = xyes; then
923   AC_DEFINE(USE_INPUT_EVENTS, [1], [Add support for a directly using Linux Input Event Devices])
925 AM_CONDITIONAL(ENABLE_INPUT_EVENTS, [test x"${build_input_events}" = xyes])
926 dnl this is enabled if we have any input devices at all
927 AM_CONDITIONAL(ENABLE_INPUT_DEVICES, [test x"${input_events}" != x])
929 dnl -------------------------------
930 dnl Renderer Selection
931 dnl -------------------------------
932 input_events=
933 dnl By default, we want to to build all renderers
934 build_ovg=no
935 build_gles=no
936 build_ogl=yes
937 build_agg=yes
938 build_cairo=yes
939 renderer_list="OpenGL AGG Cairo"
940 nrender=3
941 AC_ARG_ENABLE(renderer,
942   AC_HELP_STRING([--enable-renderer=], [Enable support for the specified renderers (ogl|gles|cairo|agg|all, default=all)]),
943   if test -n ${enableval}; then
944     if test "x${enableval}" != "xno" -o "x${enableval}" != "xnone" ; then
945       renderer_list="none"
946       enableval=`echo ${enableval} | tr '\054' ' ' `
947     else
948       renderer_list=""
949       enableval=""
950     fi
951   fi
952   renderer_list=""
953   nrender=0
954   build_ovg=no
955   build_ogl=no
956   build_gles=no
957   build_agg=no
958   build_cairo=no
959   while test -n "${enableval}" ; do
960     val=`echo ${enableval} | cut -d ' ' -f 1`
961     [case "${val}" in
962       no*|NO*)
963         renderer_list="none"
964         build_ovg=no
965         build_ogl=no
966         build_gles=no
967         build_agg=no
968         build_cairo=no
969         nrender=1
970         ;;
971       all|ALL)
972         renderer_list="OpenGL, Cairo, AGG"
973         build_ogl=yes
974         build_agg=yes
975         build_cairo=yes
976         build_ovg=yes
977         nrender=4
978         ;;
979       ogl|OGL|OpenGL|opengl)
980         renderer_list="${renderer_list} OpenGL"
981         build_gles=no
982         build_ogl=yes
983         nrender=$((nrender+1))
984         ;;
985       gles|GLES|GL-ES|gl-es)
986         renderer_list="${renderer_list} OpenGL-ES"
987         build_gles=yes
988         build_ogl=no
989         nrender=$((nrender+1))
990         ;;
991       ovg|OVG|OpenVG|openvg)
992         renderer_list="${renderer_list} OpenVG"
993         build_ogv=yes
994         nrender=$((nrender+1))
995         ;;
996       agg|AGG)
997         renderer_list="${renderer_list} AGG"
998         build_agg=yes
999         nrender=$((nrender+1))
1000         ;;
1001       cairo|CAIRO|Cairo*)
1002         renderer_list="${renderer_list} Cairo"
1003         build_cairo=yes
1004         nrender=$((nrender+1))
1005         ;;
1006       *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept:  (ogl|cairo|agg|all)])
1007         ;;
1008       esac]
1009     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1010     if test "x$val" = "x$enableval"; then
1011       break;
1012     fi
1013   done
1015 dnl 16 bit: RGB555, RGB565
1016 dnl 24 bit: RGB24, BGR24
1017 dnl 32 bit: RGBA32, BGRA32
1018 pixelformat=all
1019 AC_ARG_WITH(pixelformat,
1020   AC_HELP_STRING([--with-pixelformat=], [Use the specified pixel format for AGG (default=all)]),
1021   [if test -n ${withval}; then
1022     pixelformat="${withval}"
1023     withval=`echo ${withval} | tr '\054' ' ' `
1024   fi
1025   while test -n "${withval}" ; do
1026     val=`echo ${withval} | cut -d ' ' -f 1`
1027     case "${val}" in
1028       all)
1029         # allow special value "all" set by user (handled below)
1030         ;; 
1031       argb32|ARGB32)
1032         AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32])
1033         ;;
1034       abgr32|ABGR32)
1035         AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32])
1036         ;;
1037       bgra32|BGRA32)
1038         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
1039         ;;
1040       bgr24|BGR24)
1041         AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24])
1042         ;;
1043       rgba32|RGBA32)
1044         AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32])
1045         ;;
1046       rgb24|RGB24)
1047         AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24])
1048         ;;
1049       rgb555|RGB555)
1050         AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555])
1051         ;;
1052       rgb565|RGB565)
1053         AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565])
1054         ;;
1055       *) AC_MSG_ERROR([invalid pixel format ${withval} given (accept: all|RGB555|RGB565|RGB24|BGR24|BGRA32|RGBA32|ARGB32|ABGR32)])
1056          ;;
1057       esac
1058     withval=`echo ${withval} | cut -d ' ' -f 2-6`
1059     if test "x$val" = "x$withval"; then
1060       break;
1061     fi
1062   done],
1063   [if test x$build_haiku = xyes -a x$build_sdl != xyes; then
1064         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
1065         pixelformat=BGRA32
1066    fi]
1069 if test x$pixelformat = xall; then
1070   if test x$build_agg = xyes; then
1071     ### The fact that we're building GTK doesn't mean we're not also
1072     ### building KDE or SDL, each needing its own pixel format !
1073     #if test x$build_gtk = xyes; then
1074     #  AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24 pixel format])
1075     #  pixelformat="RGB24"
1076     #else
1077       AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555 pixel format])
1078       AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565 pixel format])
1079       AC_DEFINE(PIXELFORMAT_RGB24,  [1], [RGB24 pixel format])
1080       AC_DEFINE(PIXELFORMAT_BGR24,  [1], [BGR24 pixel format])
1081       AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32 pixel format])
1082       AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32 pixel format])
1083       AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32 pixel format])
1084       AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32 pixel format])
1085     #fi
1086   fi
1089 AM_CONDITIONAL(BUILD_OVG_RENDERER, [ test x$build_ovg = xyes ])
1090 AM_CONDITIONAL(BUILD_GLES_RENDERER, [ test x$build_gles = xyes ])
1091 AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x$build_ogl = xyes])
1092 AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x$build_agg = xyes ])
1093 AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x$build_cairo = xyes ])
1095 if test x"${build_ogl}" = xyes; then
1096    AC_DEFINE([RENDERER_OPENGL], [], [Use OpenGL renderer])
1099 if test x"$build_agg" = xyes; then
1100   AC_DEFINE([RENDERER_AGG], [], [Use AntiGrain renderer])
1103 if test x"$build_cairo" = xyes; then
1104   GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1105   AC_DEFINE([RENDERER_CAIRO], [], [Use cairo renderer])
1108 if test x"${build_agg}" = xyes; then
1109    GNASH_PATH_AGG
1112 dnl VA API is used by default for all H.264 videos. HW requirements:
1113 dnl     * AMD GPUs with UVD2 and xvba-video VA driver
1114 dnl     * NVIDIA GPUs with vdpau-video VA driver
1115 dnl     * All HW with a VA driver supporting the VA/GLX extensions or
1116 dnl     vaPutSurface(Pixmap,...). This may include the Intel
1117 dnl     Moorestown platform and future G45 VA driver.
1118 dnl NOTE: it is possible to use Gnash/VAAPI on platforms with an Intel
1119 dnl GMA500 but you currently will have to build the AGG renderer
1120 dnl instead of the OGL (OpenGL) one. 
1122 build_xv=yes
1123 build_vaapi=yes
1124 hwaccel_list="VAAPI XVideo"
1125 nhwaccel=2
1126 AC_ARG_ENABLE(hwaccel,
1127   AC_HELP_STRING([--enable-hwaccel], [Specify which accleration to support to enable (none,vaapi,omap)]),
1128   if test -z ${enableval}; then
1129       hwaccel_list="none"
1130       nhwaccel=1
1131       enableval=""
1132   fi
1133   while test -n "${enableval}" ; do
1134     val=`echo ${enableval} | cut -d ' ' -f 1`
1135     [case "${val}" in
1136       no*|NO*)
1137         hwaccel_list="none"
1138         build_vaapi=no
1139         build_omap=no
1140         dnl build_xv=no
1141         nhwaccel=0
1142         ;;
1143       va*|VA*)
1144         hwaccel_list="${hwaccel_list} vaapi"
1145         build_vaapi=yes
1146         nhwaccel=$((nhwaccel+1))
1147         ;;
1148       xv*|XV*|Xv*)
1149         hwaccel_list="${hwaccel_list} XVideo"
1150         dnl build_xv=yes
1151         nhwaccel=$((nhwaccel+1))
1152         ;;
1153       all|ALL)
1154         hwaccel_list="XVideo VAAPI OMAP"
1155         nhwaccel=3
1156         build_omap=yes
1157         build_vaapi=yes
1158         dnl build_xv=yes
1159         ;;
1160       omap*|OMAP*)
1161         hwaccel_list="${hwaccel_list} omap"
1162         build_omap=yes
1163         nhwaccel=$((nhwaccel+1))
1164         ;;
1165       *) AC_MSG_ERROR([invalid hwaccel feature specified: ${enableval} given (accept: none,vaapi,omap)])
1166         ;;
1167       esac]
1168     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1169     if test "x$val" = "x$enableval"; then
1170       break;
1171     fi
1172   done
1175 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi}" = x"yes"; then
1176   use_libva=no
1177   use_libva_x11=no
1178   use_libva_glx=no
1179   dnl if the version of FFmpeg is recent enough, (r20957, 52.45.0), then
1180   dnl look for VAAPI support so we can use use the VAAPI enabled FFmpeg.
1181   if test x"${have_ffmpeg_vaapi}" = xyes; then
1182     use_libva=yes
1183     GNASH_PKG_FIND([libva],
1184       [va/va.h],
1185       [Video Acceleration API],
1186       vaInitialize
1187     )
1189     use_libva_x11=yes
1190     GNASH_PKG_FIND([libva_x11],
1191       [va/va_x11.h],
1192       [VA API (X11 display)],
1193       vaGetDisplay,
1194       [], [-lva-x11]
1195     )
1197     if test x$build_ogl = xyes; then
1198       use_libva_glx=yes
1199       GNASH_PKG_FIND([libva_glx],
1200         [va/va_glx.h],
1201         [VA API (GLX display)],
1202         vaGetDisplayGLX,
1203         [], [-lva-glx]
1204       )
1205     fi
1206   fi
1209 dnl libVA drivers. We declare conditional for both the option being
1210 dnl selected, as well as whether or not it's found. This we can
1211 dnl generate better error handling if it's not found.
1212 AM_CONDITIONAL(BUILD_OMAP, test x"${build_omap}" = xyes)
1213 AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
1215 dnl Only build the vaapi support if we have a version of FFmpeg that
1216 dnl supports it.
1217 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${found_libva_incl}" = xyes; then
1218   build_vaapi=yes
1219   hwaccel_list="VAAPI XVideo"
1220   nhwaccel=2
1221 else
1222   build_vaapi=no
1223   hwaccel_list="XVideo"
1224   nhwaccel=1
1227 dnl Until the hwaccel patches in FFmpeg wind up in the ffmpeg-plugin,
1228 dnl restrict using HW Accel to using FFmpeg directly.
1229 dnl test xyes = xyes -a ( x != xyes -o x != xyes )
1230 if test x"${build_vaapi}" = x"yes" -a x"${have_ffmpeg}" != x"yes"; then
1231   AC_MSG_ERROR(["Hardware acceleration currently not supported unless using FFmpeg."])
1234 AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes)
1235 AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes)
1236 AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes)
1239 AC_PATH_PROG(PERL, perl)
1240 AM_CONDITIONAL(HAVE_PERL, test x"$PERL" != x)
1242 AC_PATH_PROG(CSOUND, csound)
1243 AM_CONDITIONAL(HAVE_CSOUND, test x"$CSOUND" != x)
1245 dnl -------------------------------------
1246 dnl LIRC
1247 dnl -------------------------------------
1248 AC_ARG_ENABLE(lirc, AC_HELP_STRING([--enable-lirc], [Disable support for Lirc]),
1249 [case "${enableval}" in
1250   yes) lirc=yes ;;
1251   no)  lirc=no ;;
1252   *)   AC_MSG_ERROR([bad value ${enableval} for enable-lirc option]) ;;
1253 esac], lirc=no)
1255 if test x"$lirc" = x"yes"; then
1256   AC_DEFINE([USE_LIRC], [], [LIRC daemon support])
1258 AM_CONDITIONAL(USE_LIRC, test x$lirc = xyes)
1260 dnl --------------------------------------------------------
1261 dnl Extension selection
1262 dnl --------------------------------------------------------
1263 extensions_list=
1264 ext_dejagnu=no
1265 ext_mysql=no
1266 ext_fileio=no
1267 ext_gtk=no
1268 ext_lirc=no
1269 ext_dbus=no
1270 ext_all=no
1271 ext_launcher=no
1272 AC_ARG_ENABLE(extensions,
1273   AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build]),
1274   if test -n ${enableval}; then
1275     if test "x${enableval}" != "xno"; then
1276       extlist="${enableval}"
1277       enableval=`echo ${enableval} | tr '\054' ' ' `
1278     else
1279       extlist=""
1280       enableval=""
1281     fi
1282   fi
1283   nextensions=0
1284   while test -n "${enableval}" ; do
1285     val=`echo ${enableval} | cut -d ' ' -f 1`
1286     extensions_list="${extensions_list} ${val}"
1287     [case "${val}" in
1288       dejagnu|DEJAGNU|dj|DJ)
1289         AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension])
1290         AC_MSG_NOTICE([Adding DejaGnu extension])
1291         ext_dejagnu=yes
1292         nextensions=$((nextensions+1))
1293         ;;
1294       mysql|MYSQL|sql|SQL)
1295         AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension])
1296         AC_MSG_NOTICE([Adding MySql extension])
1297         ext_mysql=yes
1298         nextensions=$((nextensions+1))
1299         ;;
1300       fileio|FILEIO|io|IO)
1301         AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension])
1302         AC_MSG_NOTICE([Adding FileIO extension])
1303         ext_fileio=yes
1304         nextensions=$((nextensions+1))
1305         ;;
1306       gtk|GTK|gtk2|GTK2)
1307         AC_DEFINE(USE_GTK_EXT, [1], [Build the GTK extension])
1308         ext_gtk=yes
1309         nextensions=$((nextensions+1))
1310         ;;
1311       launcher|LAUNCHER)
1312         AC_DEFINE(USE_LAUNCHER_EXT, [1], [Build the Launcher extension])
1313         ext_launcher=yes
1314         nextensions=$((nextensions+1))
1315         ;;
1316       lirc|LIRC)
1317         AC_DEFINE(USE_LIRC_EXT, [1], [Build the LIRC extension])
1318         ext_lirc=yes
1319         nextensions=$((nextensions+1))
1320         ;;
1321       dbus|DBUS)
1322         AC_DEFINE(USE_DBUS_EXT, [1], [Build the DBUS extension])
1323         ext_dbus=yes
1324         nextensions=$((nextensions+1))
1325         ;;
1326       all|ALL)
1327         AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions])
1328         ext_dejagnu=yes
1329         ext_mysql=yes
1330         ext_fileio=yes
1331         ext_gtk=yes
1332         ext_lirc=yes
1333         ext_dbus=yes
1334         ext_launcher=yes
1335         ext_all=yes
1336         nextensions=9
1337         ;;
1338       *) AC_MSG_ERROR([invalid extension specified: ${enableval} given (accept: MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)])
1339          ;;
1340       esac]
1341     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1342     if test "x$val" = "x$enableval"; then
1343       break;
1344     fi
1345   done
1346   EXTENSIONS_LIST="$extensions_list"
1347   AC_SUBST(EXTENSIONS_LIST)
1350 if test x$ext_dbus = xyes; then
1351   GNASH_PATH_DBUS
1354 if test x$ext_mysql = xyes; then
1355   GNASH_PATH_MYSQL
1358 AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ])
1359 AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ])
1360 AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ])
1361 AM_CONDITIONAL(BUILD_LAUNCHER_EXT, [ test x$ext_launcher = xyes ])
1362 AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
1363 AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
1364 AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
1365 AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
1367 GNASH_PKG_CLASSFILE
1369 dnl --------------------------------------------------------
1370 dnl SOL dir
1371 dnl --------------------------------------------------------
1372 soldir=/tmp
1373 AC_ARG_WITH(soldir,
1374  AC_HELP_STRING([--with-soldir],
1375  [directory for .sol files]),
1376  with_soldir=${withval})
1377 if test x${with_soldir} != x; then
1378   soldir=${with_soldir}
1380 SOLDIR=${soldir}
1381 AC_SUBST(SOLDIR)
1383 dnl --------------------------------------------------------
1384 dnl AVM2
1385 dnl --------------------------------------------------------
1386 dnl AC_ARG_ENABLE(avm2,
1387 dnl   AC_HELP_STRING([--enable-avm2], [Enable support for AS3]),
1388 dnl   [case "${enableval}" in
1389 dnl     yes) avm2=yes ;;
1390 dnl     no)  avm2=no ;;
1391 dnl     *)   AC_MSG_ERROR([bad value ${enableval} for enable-avm2 option]) ;;
1392 dnl   esac], avm2=no
1393 dnl )
1394 dnl AM_CONDITIONAL(ENABLE_AVM2, [test x"$avm2" = xyes])
1395 dnl if test x$avm2 = xyes; then
1396 dnl     AC_DEFINE(ENABLE_AVM2, [1], [Enable AVM2 code])
1397 dnl fi
1398 AM_CONDITIONAL(ENABLE_AVM2, false)
1400 dnl This option is only used if you want Gnash to interwork with 
1401 dnl the Adobe player using the LocalConnection class.
1402 dnl lckey=0xdd3adabd
1403 AC_ARG_WITH(lckey,
1404  AC_HELP_STRING([--with-lckey],
1405  [shared memory key for your system]),
1406  with_lckey=${withval})
1408 if test x${with_lckey} != x; then
1409   lckey=${with_lckey}
1410 else
1411   lckey=0xcbc384f8
1413 LC_KEY=${lckey}
1414 AC_SUBST(LC_KEY)
1416 dnl FIXME: this should go away when gtk.cpp is cleaned up..
1417 AC_DEFINE([BUILD_CANVAS], [], [Build GTK Canvas support for the GTK Widget ])
1419 AC_ARG_ENABLE(python,
1420   AC_HELP_STRING([--enable-python],[Enable python for the python wrapper]),
1421 [case "${enableval}" in
1422   yes) python=yes ;;
1423   no)  python=no ;;
1424   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-python option]) ;;
1425 esac],python=no)
1427 dnl Look for python, which is optional. If enabled, a python loadable
1428 dnl module of Gnash is created.
1429 GNASH_PATH_PYTHON
1430 AM_CONDITIONAL([USE_PYTHON], test x"$python" = xyes)
1431 AM_CONDITIONAL([HAS_PYTHON], test x"$has_python" = xyes)
1433 # Maybe use jemalloc, which handles memory fragmentation for
1434 # ECAMscript languages better than the regular system malloc.
1435 # This seems like a good idea, as both the other player and
1436 # Mozilla/Firefox both recently switched to using jemalloc.
1437 AC_ARG_ENABLE(jemalloc,
1438   AC_HELP_STRING([--enable-jemalloc],[Enable jemalloc instead of system malloc]),
1439 [case "${enableval}" in
1440   yes) jemalloc=yes ;;
1441   no)  jemalloc=no ;;
1442   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-jemalloc option]) ;;
1443 esac],jemalloc=yes)
1445 dnl There is some weird stuff going on with NetBSD and jemalloc, so don't 
1446 dnl build it for now.
1447 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
1448   jemalloc=no
1450 dnl If the compiler doesn't have local thread storage enabled, don't try to
1451 dnl use jemalloc.
1452 if test x"${jemalloc}" = x"yes"; then
1453   AC_TRY_COMPILE([], [
1454     extern __thread int global_i; ],
1455     has_local_thread_storage=yes
1456   )
1457   if test x"${has_local_thread_storage}" = x"yes"; then
1458     AC_DEFINE([HAVE_LOCAL_THREAD_STORAGE], [1], [Has __thread (local thread storage) support])
1459     AC_DEFINE([USE_JEMALLOC], [], [Use jemalloc instead of system malloc])
1460   else
1461     jemalloc=no
1462   fi
1465 dnl We can search libs for mallinfo to decide whether we have it or not.
1466 dnl This is added to the linker flags when it's found. Usually it's -lc, but
1467 dnl on OpenSolaris it's -lmalloc, so this fixes the build.
1468 AC_SEARCH_LIBS([mallinfo], [c malloc],
1469                AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
1470                mallinfo=yes
1471                )
1473 AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes)
1474 AM_CONDITIONAL(JEMALLOC, test x$jemalloc = xyes)
1476 AC_ARG_ENABLE(debugger,
1477   AC_HELP_STRING([--enable-debugger],[Enable the Flash debugger]),
1478 [case "${enableval}" in
1479   yes) debugger=yes ;;
1480   no)  debugger=no ;;
1481   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-debugger option]) ;;
1482 esac],debugger=no)
1484 if test x"$debugger" = x"yes"; then
1485   AC_DEFINE([USE_DEBUGGER], [], [Flash Debugger support])
1487 AM_CONDITIONAL(DEBUGGER, test x$debugger = xyes)
1489 AC_ARG_ENABLE(fps-debug,
1490   AC_HELP_STRING([--enable-fps-debug],[Enable FPS debugging code]),
1491 [case "${enableval}" in
1492   yes) AC_DEFINE([GNASH_FPS_DEBUG], [1], [Enable FPS debugging code])
1493 esac])
1495 dnl When we're making binary releases, it's often nice to just statically link
1496 dnl the final executables so we don't worry about what's installed, or which
1497 dnl version it is.
1498 AC_ARG_ENABLE(allstatic,
1499   AC_HELP_STRING([--enable-allstatic],[Enable using static libraries when possible for dependencies]),
1500 [case "${enableval}" in
1501   yes) allstatic=yes ;;
1502   no)  allstatic=no ;;
1503   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-allstatic option]) ;;
1504 esac],allstatic=no)
1505 AM_CONDITIONAL(ALLSTATIC, test x$allstatic = xyes)
1508 dnl --------------------------------------------------------
1509 dnl SHM
1510 dnl --------------------------------------------------------
1511 AC_ARG_WITH(shm,
1512   AC_HELP_STRING([--with-shm],[specify a shared memory type.]),
1513   [case "${withval}" in
1514     sysv) with_shm=sysv
1515           ;;
1516     posix) with_shm=posix
1517           ;;    
1518     *)   AC_MSG_ERROR([bad value ${enableval} for --with-shm option (try sysv or posix])
1519           ;;
1520    esac],with_shm=sysv)
1522 if test x"${with_shm}" = x"sysv"; then
1523   AC_DEFINE([USE_SYSV_SHM], [1], [Use SYSV shared memory for compatability])
1524   dnl IPC_INFO isn't portable, and doesn't exist on BSD
1525   AC_TRY_COMPILE([#include <sys/ipc.h> #include <sys/shm.h>], [
1526     int flag = IPC_INFO; ],
1527     AC_DEFINE([HAVE_IPC_INFO], [1], [Use shm_info])
1528   )
1529 else
1530   AC_DEFINE([USE_POSIX_SHM], [1], [Use POSIX shared memory])
1533 dnl --------------------------------------------------------
1534 dnl Disable menus
1535 dnl --------------------------------------------------------
1536 dnl Don't add the GUI menu. Some educational systems think this adds
1537 dnl clutter and confusion, like on the OLPC.
1538 AC_ARG_ENABLE(menus,
1539   AC_HELP_STRING([--disable-menus],[Disable the GUI menus]),
1540 [case "${enableval}" in
1541   yes) menus=yes ;;
1542   no)  menus=no ;;
1543   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-menus option]) ;;
1544 esac],menus=yes)
1546 if test x"$menus" = x"yes"; then
1547   AC_DEFINE([USE_MENUS], [], [GUI Menu support])
1549 AM_CONDITIONAL(MENUS, test x$menus = xyes)
1551 dnl --------------------------------------------------------
1552 dnl Disable SWF information
1553 dnl --------------------------------------------------------
1554 dnl Don't gather SWF information in tree form. This takes
1555 dnl resources and memory that can be saved if there's no
1556 dnl need to examine SWF internals.
1557 AC_ARG_ENABLE(swftree,
1558   AC_HELP_STRING([--disable-swftree],[Disable showing SWF properties]),
1559 [case "${enableval}" in
1560   yes) swftree=yes ;;
1561   no)  swftree=no ;;
1562   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-swf-properties option]) ;;
1563 esac],swftree=yes)
1565 if test x"$swftree" = x"yes"; then
1566   AC_DEFINE([USE_SWFTREE], [], [View SWF information])
1568 AM_CONDITIONAL(SWFTREE, test x$swftree = xyes)
1570 dnl --------------------------------------------------------
1571 dnl Disable testsuite
1572 dnl --------------------------------------------------------
1573 dnl Disable running any tests for "make check". This may sound stupid, but
1574 dnl this option is designed to solely be used by maintainers in the 
1575 dnl DISTCHECK_CONFIGURE_FLAGS when building packages. Gnash's testing infrastructure
1576 dnl is complex, and often the the testsuites will work, but due to some obscure reason,
1577 dnl make distcheck fails.
1578 AC_ARG_ENABLE(testsuite,
1579   AC_HELP_STRING([--disable-testsuite],[Disable the testsuite, maintainers option only]),
1580 [case "${enableval}" in
1581   yes) testsuite=yes ;;
1582   no)  testsuite=no ;;
1583   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-testsuite option]) ;;
1584 esac],testsuite=yes)
1586 if test x"$testsuite" = x"yes"; then
1587   AC_DEFINE([USE_TESTSUITE], [], [Testsuite support, maintainers option only])
1589 AM_CONDITIONAL(TESTSUITE, test x$testsuite = xyes)
1591 dnl --------------------------------------------------------
1592 dnl Write the file to disk in the plugin
1593 dnl --------------------------------------------------------
1594 AC_ARG_ENABLE(write,
1595   AC_HELP_STRING([--enable-write], [Makes the Mozilla plugin write the currently playing SWF movie to /tmp.]),
1596 [case "${enableval}" in
1597   yes) write=yes ;;
1598   no)  write=no ;;
1599   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-write option]) ;;
1600 esac],write=no)
1602 if test x"$write" = x"yes"; then
1603   AC_DEFINE([WRITE_FILE], [], [Write files while streaming])
1606 dnl --------------------------------------------------------
1607 dnl Write a standalone gnash launcher to disk from the plugin
1608 dnl --------------------------------------------------------
1609 AC_ARG_ENABLE(sa-launcher,
1610   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.]),
1611 [case "${enableval}" in
1612   yes) sa_launcher=yes ;;
1613   no)  sa_launcher=no ;;
1614   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-sa-launcher option]) ;;
1615 esac],sa_launcher=yes)
1617 if test x"$sa_launcher" = x"yes"; then
1618   AC_DEFINE([CREATE_STANDALONE_GNASH_LAUNCHER], [], [Add support for writing a standalone executable launcher for movies embedded in web pages])
1621 dnl --------------------------------------------------------
1622 dnl Build the cygnal server if specified.
1623 dnl --------------------------------------------------------
1624 AC_ARG_ENABLE(cygnal,
1625   AC_HELP_STRING([--enable-cygnal], [Enable building of the Cygnal server]),
1626 [case "${enableval}" in
1627   yes) cygnal=yes ;;
1628   no)  cygnal=no ;;
1629   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cygnal option]) ;;
1630 esac],cygnal=no)
1631 AM_CONDITIONAL(CYGNAL, test x$cygnal = xyes)
1633 dnl --------------------------------------------------------
1634 dnl Build the cgibins server if specified.
1635 dnl --------------------------------------------------------
1636 AC_ARG_ENABLE(cgibins,
1637   AC_HELP_STRING([--enable-cgibins], [Enable building of the CGIs for Cygnal]),
1638 [case "${enableval}" in
1639   yes) cgibin=yes ;;
1640   no)  cgibin=no ;;
1641   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cgibins option]) ;;
1642 esac],cgibin=yes)
1643 AM_CONDITIONAL(USE_CGI, test x$cgibin = xyes)
1644 if test x"${cgibin}" = x"yes"; then
1645   AC_DEFINE([USE_CGIBIN], [1], [Enable cgi-bin processes for Cygnal])
1648 dnl --------------------------------------------------------
1649 dnl Fix the Intel 810 LOD bias problem
1650 dnl --------------------------------------------------------
1651 AC_ARG_ENABLE(i810-lod-bias,
1652   AC_HELP_STRING([--enable-i810-lod-bias], [Enable fix for Intel 810 LOD bias problem]),
1653 [case "${enableval}" in
1654   yes) i810lodbias=yes ;;
1655   no)  i810lodbias=no ;;
1656   *)   AC_MSG_ERROR([bad value ${enableval} for enable-i810-lod-bias option]) ;;
1657 esac])
1659 if test x"${i810lodbias}" = xyes; then
1660     AC_DEFINE([FIX_I810_LOD_BIAS], [], [Fix i810 LOD bias problem])
1663 dnl --------------------------------------------------------
1664 dnl  Double buffer
1665 dnl --------------------------------------------------------
1666 dnl Add an option for double buffering when rendering, currently only used by
1667 dnl the frmaebuffer GUI.
1668 dnl If defined, an internal software-buffer is used for rendering and is then
1669 dnl copied to the video RAM. This avoids flicker and is faster for complex 
1670 dnl graphics, as video RAM access is usually slower. (strongly suggested)
1671 AC_ARG_ENABLE(doublebuf,
1672   AC_HELP_STRING([--enable-doublebuf], [Enable support for double buffering when rendering]),
1673   [case "${enableval}" in
1674     yes) doublebuf=yes ;;
1675     no)  doublebuf=no ;;
1676     *)   AC_MSG_ERROR([bad value ${enableval} for enable-doublebuf option]) ;;
1677   esac], doublebuf=no
1679 AM_CONDITIONAL(ENABLE_DBUF, [test x"$doublebuf" = xyes])
1680 if test x$doublebuf = xyes; then
1681     AC_DEFINE(ENABLE_DOUBLE_BUFFERING, [1], [Enable double buffering])
1684 dnl --------------------------------------------------------
1685 dnl  Offscreen buffer
1686 dnl --------------------------------------------------------
1687 dnl This enables rendering to an offscreen buffer, instead of directly to window
1688 AC_ARG_ENABLE(offscreen,
1689   AC_HELP_STRING([--enable-offscreen], [Enable support for rendering offscreen]),
1690   [case "${enableval}" in
1691     yes) offscreen=yes ;;
1692     no)  offscreen=no ;;
1693     *)   AC_MSG_ERROR([bad value ${enableval} for enable-offscreen option]) ;;
1694   esac], offscreen=no
1698 dnl --------------------------------------------------------
1699 dnl  SSH support selection
1700 dnl --------------------------------------------------------
1701 dnl Enable using libssh with libnet
1702 AC_ARG_ENABLE(ssh,
1703   AC_HELP_STRING([--enable-ssh], [Enable using SSH for network authentication]),
1704 [case "${enableval}" in
1705   yes) build_ssh=yes ;;
1706   no)  build_ssh=no ;;
1707   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssh option]) ;;
1708 esac], build_ssh=no)
1710 AM_CONDITIONAL(BUILD_SSH, test x"${build_ssh}" = xyes)
1711 if test x"${build_ssh}" = xyes; then
1712   GNASH_PKG_FIND(ssh, [libssh/libssh.h], [libssh library], ssh_socket_init)
1713 dnl  GNASH_PKG_FIND(poppler, [popt.h], [Poppler library], poppler_init)
1715 if test x"${has_ssh}" = x"yes"; then
1716   AC_DEFINE([USE_SSH], [1], [Use SSH for authentication])
1719 dnl --------------------------------------------------------
1720 dnl  SSL support selection
1721 dnl --------------------------------------------------------
1723 dnl Enable using OpenSSL with libnet.
1724 AC_ARG_ENABLE(ssl,
1725   AC_HELP_STRING([--enable-ssl], [Enable using OpenSSL directly]),
1726 [case "${enableval}" in
1727   yes) build_ssl=yes ;;
1728   no)  build_ssl=no ;;
1729   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssl option]) ;;
1730 esac], build_ssl=no)
1732 with_cert=
1733 with_pem=
1734 AM_CONDITIONAL(BUILD_SSL, test x"${build_ssl}" = xyes)
1735 AC_ARG_WITH(cert,
1736   AC_HELP_STRING([--with-cert],
1737   [cert file for SSL]),
1738   with_cert=${withval})
1739 AC_ARG_WITH(pem,
1740   AC_HELP_STRING([--with-pe],
1741   [pem file for SSL]),
1742   with_pem=${withval})
1744 if test x"${build_ssl}" = xyes; then
1745   GNASH_PKG_FIND(ssl, [openssl/ssl.h], [OpenSSL library], SSL_library_init)
1747 if test x"${has_ssl}" = x"yes"; then
1748   AC_DEFINE([USE_SSL], [1], [Use SSL for authentication])
1751 dnl -----------------------------------------------------------
1752 dnl   Verify dependencies for requested GUIs are met, and
1753 dnl   disable build of the GUIS for which deps are NOT met
1754 dnl ------------------------------------------------------------
1756 dnl Look for scratchbox (used in GNASH_PATH_ALP)
1757 dnl FIXME: move it in macros/alp.m4 or at least after
1758 dnl        the build_alp conditional ?
1759 sbox=no
1760 if test x"${SBOX_REDIRECT_FROM_DIRS}" != x; then
1761   sbox=yes
1763 if test x"${build_alp}" = xyes; then
1764   GNASH_PATH_ALP
1765   if test x"${have_alp}" = x"yes"; then
1766     AC_DEFINE([HAVE_ALP], 1, [Access Linux Platform framework])
1767   fi
1768   dnl @@ It makes NO sense to set cross_compiling here,
1769   dnl @@ *after* it is used in conditionals above
1770   dnl @@ (AM_CONDITIONAL and directories search)
1771   dnl cross_compiling=yes
1772 dnl  build_gtk=yes
1773   build_kde3=no
1774   build_ogl=no
1775   build_gles=no
1776   build_agg=yes
1779 if test x$build_gtk = xyes -o $build_alp = xyes -o x$build_hildon = xyes; then
1780    GNASH_PATH_GTK2
1781    GNASH_PATH_PANGO
1782    GNASH_PKG_FIND(atk, [atk/atk.h], [atk library], atk_focus_tracker_init, [1.0])
1783    if test x"${build_ogl}" = xyes; then
1784       GNASH_PATH_GLEXT
1785    fi
1786    if test x"${build_cairo}" = xyes; then
1787       GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1788    fi
1790 if test x"${build_hildon}" = xyes; then
1791   GNASH_PATH_HILDON
1792   build_gtk=yes
1793   build_kde3=no
1794 dnl   build_ogl=no
1795 dnl   build_agg=yes
1797 dnl TODO: add checks for all other GUIs
1800 dnl -----------------------------------------------------------
1801 dnl Try to ignore stupid dependencies
1802 dnl -----------------------------------------------------------
1804 AC_MSG_CHECKING(linker --as-needed support)
1805 gcc_cv_ld_as_needed=no
1806 # Check if linker supports --as-needed and --no-as-needed options
1807 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1808   gcc_cv_ld_as_needed=yes
1810 if test x"$gcc_cv_ld_as_needed" = xyes; then
1811   LDFLAGS+=" -Wl,--as-needed"
1813 AC_MSG_RESULT($gcc_cv_ld_as_needed)
1815 dnl AC_MSG_CHECKING(linker --no-undefined support)
1816 dnl gcc_cv_ld_undef_needed=no
1817 dnl # Check if linker supports --no-undefined
1818 dnl if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1819 dnl     gcc_cv_ld_undef_needed=yes
1820 dnl fi
1821 dnl if test x"$gcc_cv_ld_undef_needed" = xyes; then
1822 dnl     LDFLAGS=" ${LDFLAGS} -Wl,--no-undefined"
1823 dnl fi
1824 dnl AC_MSG_RESULT($gcc_cv_ld_undef_needed)
1826 AC_DEFINE(USE_GIF, [1], [Use the GIF library])
1827 AC_DEFINE(USE_PNG, [1], [Use the PNG library])
1828 AM_CONDITIONAL(USE_GIF, true)
1829 AM_CONDITIONAL(USE_PNG, true)
1831 dnl GNASH_PKG_FIND(dmalloc, [dmalloc.h], [dmalloc], mallinfo)
1832 AM_CONDITIONAL(HAVE_DMALLOC, [ test x$has_dmalloc = xyes ])
1834 AC_PATH_TOOL([AUTOTRACE], [autotrace])
1835 AC_HEADER_DIRENT
1837 dnl -----------------------------------------------------------------
1838 dnl PLUGIN RELATED STUFF
1839 dnl -----------------------------------------------------------------
1841 dnl Zip is used insted of tar when building an xpi package
1842 dnl for Mozilla/Firefox.
1843 AC_PATH_PROG(ZIP, zip, ,[${pathlist}])
1845 dnl !! This has been moved here to make --enable-npapi work
1846 dnl !! All of plugin-related macro calls could be moved into
1847 dnl !! a specialized macros/plugin.m4
1849 dnl ----------------------------------------------------
1850 dnl Add KPARTS support, if specified or KDE gui is built
1851 dnl ----------------------------------------------------
1853 AC_ARG_ENABLE(kparts3,
1854   AC_HELP_STRING([--disable-kparts3], [Disable support for Konqueror 3.x plugin (default: enabled if kde3 gui is)]),
1855 [case "${enableval}" in
1856   yes) build_kparts3=yes ;;
1857   no)  build_kparts3=no ;;
1858   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts3 option]) ;;
1859 esac],build_kparts3=$build_kde3)
1861 dnl --------------------------------------------------------
1862 dnl Add KPARTS 4.x support, if specified or KDE gui is built
1863 dnl --------------------------------------------------------
1865 AC_ARG_ENABLE(kparts4,
1866   AC_HELP_STRING([--disable-kparts4], [Disble support for Konqueror 4.x plugin (default: enabled if kde4 gui is)]),
1867 [case "${enableval}" in
1868   yes) build_kparts4=yes ;;
1869   no)  build_kparts4=no ;;
1870   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts4 option]) ;;
1871 esac],build_kparts4=$build_kde4)
1873 dnl -----------------------------------------------------------
1874 dnl Add NPAPI support, if specified or GTK or KDE4 gui is built
1875 dnl -----------------------------------------------------------
1877 AC_ARG_ENABLE(npapi,
1878   AC_HELP_STRING([--disable-npapi], [Disable NPAPI plugin build (default: enabled if gtk or kde4 gui is)]),
1879   [case "${enableval}" in
1880     yes) npapi=yes ;;
1881     no)  npapi=no ;;
1882     *)   AC_MSG_ERROR([bad value ${enableval} for disable-npapi option]) ;;
1883   esac],
1884   if test x$build_gtk = xyes -o x$build_kde4 = xyes; then
1885     npapi=yes
1886   fi
1889 dnl -----------------------------------------------------------------
1890 dnl Enable us to disable building all browser plugins in one command.
1891 dnl -----------------------------------------------------------------
1893 AC_ARG_ENABLE(plugins,
1894   AC_HELP_STRING([--disable-plugins], [Disable all browser plugins from building (default=no)]),
1895   [case "${enableval}" in
1896     yes) plugins=yes ;;
1897     no)  plugins=no ;;
1898     *)   AC_MSG_ERROR([bad value ${enableval} for disable-plugins option]) ;;
1899   esac],
1900   plugins=yes
1902 if test x$plugins = xno; then
1903   npapi=no
1904   build_kparts3=no
1905   build_kparts4=no
1909 dnl Set the general plugins install policy here
1911 AC_ARG_WITH(plugins-install,
1912   AC_HELP_STRING([--with-plugins-install=system|user|prefix], [Policy for plugins install. Default: user.]),
1913         [case "${withval}" in
1914           user) PLUGINS_INSTALL_POLICY=user ;;
1915           system) PLUGINS_INSTALL_POLICY=system ;;
1916           prefix) PLUGINS_INSTALL_POLICY=prefix ;;
1917           *)  AC_MSG_ERROR([bad value ${withval} for --with-plugins-install]) ;;
1918          esac 
1919         ], PLUGINS_INSTALL_POLICY=user) 
1922 GNASH_PATH_FIREFOX
1924 dnl -----------------------------------------------------------------
1925 dnl END OF PLUGIN RELATED STUFF
1926 dnl -----------------------------------------------------------------
1928 dnl IRIX-hack.
1929 case $host in
1930   *-*-irix*)
1931   dnl ABI-check
1932   save_LIBS=$LIBS
1933   dir="/usr/lib /usr/lib32 /usr/lib/lib64"
1934   for i in $dir; do
1935     LIBS=-L$i
1936     AC_SEARCH_LIBS(XDisableAccessControl, X11, [
1937       xpathed=$i
1938       break
1939     ])
1940     unset ac_cv_search_XDisableAccessControl
1941   done
1942   ac_x_libraries=$xpathed
1943   x_libraries=$xpathed
1944   LIBS=$save_LIBS
1945   ;;
1946 esac
1948 AM_CONDITIONAL(LIRC, [test x$lirc_ext = xyes])
1950 AC_CHECK_HEADERS(endian.h machine/endian.h)
1951 AC_CHECK_HEADERS(malloc.h malloc/malloc.h)
1952 AC_CHECK_HEADERS(getopt.h)
1953 AC_CHECK_HEADERS(libgen.h)
1954 AC_CHECK_HEADERS(pwd.h)
1955 AC_CHECK_HEADERS(sys/utsname.h)
1956 AC_CHECK_HEADERS(signal.h)
1957 AC_CHECK_HEADERS(unistd.h)
1958 AC_CHECK_HEADERS(sys/time.h)
1959 AC_CHECK_HEADERS(ieeefp.h)
1960 dnl libcurl3-dev on Ubuntu has a dependency on lber, and Gnash won't link
1961 dnl on most machines without it. While it isn't diretly used by Gnash at all,
1962 dnl it's to work around an Ubuntu packaging bug.
1963 AC_CHECK_LIB(lber, ber_free)
1964 AC_CHECK_LIB(bz2, BZ2_bzopen)
1965 AC_CHECK_LIB(c, getpwnam, AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
1967 dnl X11 is needed for fltk (at least),
1968 dnl and probably for many other guis too ...
1969 dnl if ! test x$build_fb = xyes; then # <--- this is wrong as build_x is non-exclusive
1970 dnl AC_PATH_XTRA
1971 dnl AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation)
1972 dnl AC_CHECK_LIB(gmp, _gmp_get_memory_functions)
1973   GNASH_PATH_X11
1974   AC_CHECK_LIB(Xi, XInput_find_display)
1975   AC_CHECK_LIB(X11, XDisableAccessControl)
1976 dnl fi
1977 AM_CONDITIONAL(HAVE_X11, [test x$x11 = xyes])
1978 AC_CHECK_LIB(rt, shm_unlink)
1979 AC_CHECK_FUNCS(shm_open shm_unlink)
1980 AC_TRY_COMPILE([#include <strings.h>], [
1981   char *p1 = (char *)"Hello";
1982   char *p2 = (char *)"World";
1983   strcasecmp(p1, p2); ],
1984   AC_DEFINE(HAVE_STRINGCASECMP, [1], [Has strcasecmp])
1987 dnl if test x$cross_compiling = xno; then
1988 AC_LANG_PUSH(C++)
1989 AC_MSG_CHECKING([to see if float formatting is broken])
1990 AC_RUN_IFELSE([
1991   AC_LANG_PROGRAM([#include <cmath>
1992     void testFloat(double d, double& s)
1993     {
1994         d /= 1000.0;
1995         s = std::fmod(d, 86400.0);
1996     }], [
1997      double d = 3.0935415006117e+23;
1998      double s;
1999      testFloat(d, s);
2000      if (static_cast<int>(s) != 61440) {
2001          return 1;
2002      }])],                         dnl end of LANG_PROGRAM
2003      broken_float=no,              dnl returns 0, works
2004      broken_float=yes,             dnl returns 1, broken
2005      broken_float=no               dnl cross compiling
2006 )                                  dnl end of RUN_IFELSE
2007 AC_LANG_POP(C++)
2008 dnl fi
2010 if test x${broken_float} = xyes; then
2011   AC_MSG_RESULT([yes])
2012   AC_DEFINE(HAVE_BROKEN_FLOAT, [1], [Has broken float support])
2013 else
2014   AC_MSG_RESULT([no])
2016 AM_CONDITIONAL(BROKEN_FLOAT, [ test x$broken_float = xyes ])
2018 dnl See if ipc_perm structure has the ipc_perm.key field, and if so,
2019 dnl which variant of the name is used.
2020 ipc_key=no
2021 AC_TRY_COMPILE([
2022   #include <sys/ipc.h>
2023   #include <sys/shm.h>], [
2024  struct shmid_ds shmseg;      
2025  key_t x = shmseg.shm_perm.key;],
2026  ipc_key=yes
2027  AC_DEFINE(IPC_PERM_KEY, [key], [Has the key field in ipc_perm])
2030 if test x$ipc_key = xno; then
2031   AC_TRY_COMPILE([
2032     #include <sys/ipc.h>
2033     #include <sys/shm.h>], [
2034     struct shmid_ds shmseg;      
2035     key_t x = shmseg.shm_perm.__key;],
2036     AC_DEFINE(IPC_PERM_KEY, [__key], [Has the key field in ipc_perm])
2037     ipc_key=yes
2038   )
2041 dnl AC_CHECK_FUNCS(strcasecmp stricmp)
2042 dnl AC_CHECK_FUNCS(vsnprintf)
2044 AC_CACHE_CHECK([for finite], ac_cv_finite,
2045  [AC_TRY_COMPILE([
2046    #include <math.h>
2047    #ifdef HAVE_IEEEFP_H
2048    #include <ieeefp.h>
2049    #endif],
2050  [double x; int y; y = finite(x);],
2051  ac_cv_finite=yes,
2052  ac_cv_finite=no
2054 if test x"$ac_cv_finite" = x"yes"; then
2055   AC_SEARCH_LIBS(finite, m,
2056     [AC_DEFINE(HAVE_FINITE, [1], [Has finite])]
2057   )
2060 AC_LANG_PUSH(C++)
2061 AC_CACHE_CHECK([for isfinite], ac_cv_isfinite,
2062  [AC_TRY_COMPILE([#include <cmath>],
2063  [using namespace std; double x; int y; y = isfinite(x);],
2064  ac_cv_isfinite=yes,
2065  ac_cv_isfinite=no
2067 AC_LANG_POP(C++)
2068 if test x"$ac_cv_isfinite" = x"yes"; then
2069   dnl Don't give up if isfinite is not found in -lm
2070   dnl isfinite is defined as a macro in C99.
2071   AC_SEARCH_LIBS(isfinite, m)
2072   AC_DEFINE(HAVE_ISFINITE, [1], [Has isfinite])
2075 AC_LANG_PUSH(C++)
2076 AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [
2077   AC_TRY_LINK([#include <cstdio>
2078 ], 
2079     [ std::printf("%s", __PRETTY_FUNCTION__); ], 
2080     [ ac_cv_implements___PRETTY_FUNCTION__="yes" ],
2081     [ ac_cv_implements___PRETTY_FUNCTION__="no" ]
2082   )
2084 if test "x$ac_cv_implements___PRETTY_FUNCTION__" = "xyes" ; then
2085   AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined])
2088 AC_CACHE_CHECK([whether $CXX implements __FUNCTION__], ac_cv_implements___FUNCTION__, [
2089   AC_TRY_LINK([#include <cstdio>
2090 ], 
2091     [ std::printf("%s", __FUNCTION__); ], 
2092     [ ac_cv_implements___FUNCTION__="yes" ],
2093     [ ac_cv_implements___FUNCTION__="no" ]
2094   )
2096 if test "x$ac_cv_implements___FUNCTION__" = "xyes" ; then
2097   AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined])
2100 AC_CACHE_CHECK([whether $CXX implements __func__], ac_cv_implements___func__, [
2101   AC_TRY_LINK([#include <cstdio>
2102 ], 
2103     [ std::printf("%s", __func__); ], 
2104     [ ac_cv_implements___func__="yes" ],
2105     [ ac_cv_implements___func__="no" ]
2106   )
2108 if test "x$ac_cv_implements___func__" = "xyes" ; then
2109   AC_DEFINE(HAVE_func, [1], [__func__ is defined])
2111 AC_LANG_POP(C++)
2112 AC_REPLACE_FUNCS(getopt)
2114 dnl Date portability stuff, used in server/asobj/Date.cpp
2115 AC_CHECK_FUNCS(gettimeofday)
2116 AC_CHECK_FUNCS(ftime)
2117 AC_CHECK_FUNCS(tzset)
2118 AC_CHECK_FUNCS(localtime_r)
2120 AC_CACHE_CHECK([whether struct tm has tm_gmtoff], ac_cv_tm_gmtoff, [
2121         AC_TRY_LINK([
2122 /* ctime(1) says "The glibc version of struct tm has additional fields
2123  * defined  when _BSD_SOURCE was set before including <time.h>"
2124  * In practice, you don't need to define it yourself (tested on glibc-2.2.1 
2125  * and 2.3.6) but if you *do* define it yourself, it makes *all* functions
2126  * favour BSD-like behaviour over of GNU/POSIX, which seems dangerous.
2127  */
2128 // #define _BSD_SOURCE 1
2129 #include <time.h>
2130 ], 
2131                 [ struct tm tm; long l = tm.tm_gmtoff; ], 
2132                 [ ac_cv_tm_gmtoff="yes" ],
2133                 [ ac_cv_tm_gmtoff="no" ]
2134         )
2136 if test "x$ac_cv_tm_gmtoff" = "xyes" ; then
2137         AC_DEFINE(HAVE_TM_GMTOFF, [1], [struct tm has member tm_gmtoff])
2140 AC_CACHE_CHECK([whether timezone is a long], ac_cv_long_timezone, [
2141         AC_TRY_LINK([
2142 /* On Linux/glibc, tzset(3) says "extern long timezone;" (seconds West of GMT)
2143  * but on BSD char *timezone(int,int) is a function returning a string name.
2144  * The BSD function timegm() may be the equivalent, but this should
2145  * not be necessary because on BSD the code should use tm.tm_gmtoff instead
2146  * (use of long timezone is a fallback strategy for when tm_gmtoff exists not).
2147  */
2148 #include <stdio.h>
2149 #include <time.h>
2150 extern long timezone;
2151   ], 
2152     [ printf("%ld", timezone); ], 
2153     [ ac_cv_long_timezone="yes" ],
2154     [ ac_cv_long_timezone="no" ]
2155    )
2157 if test "x$ac_cv_long_timezone" = "xyes" ; then
2158   AC_DEFINE(HAVE_LONG_TIMEZONE, [1], [extern timezone is a long integer, not a function])
2161 AC_CHECK_FUNCS(sysconf)
2162 AC_CHECK_FUNCS(shmget shmat shmdt mmap)
2163 AC_CHECK_FUNCS(memmove)
2164 AC_CHECK_FUNCS(scandir)         dnl supported by BSD and Linux, but you never know...
2165 dnl AC_CHECK_FUNC(strndup, AC_DEFINE(HAVE_STRNDUP, 1, [Has strndup()] ))
2166 AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has clock_gettime()] ))
2167 dnl AC_CHECK_FUNCS(strlcpy, AC_DEFINE(HAVE_STRLCPY_PROTO, [1],[Define if you have the strlcpy prototype]))
2168 dnl AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT_PROTO, [1],[Define if you have the strlcat prototype]))
2169 dnl Look for Win32 networking stuff
2170 AC_CHECK_HEADERS(winsock.h)
2171 AC_CHECK_HEADERS(winsock2.h)
2172 AC_CHECK_FUNCS(socket)
2173 AC_CHECK_FUNCS(CreateFileMappingA)
2175 dnl Shm::resize() uses this if it exists
2176 AC_CHECK_LIB(c, mremap)
2178 GNASH_PKG_FIND(nspr, [nspr.h], [Netscape Portable Runtime (NSPR)], PR_Init)
2180 AC_PATH_TOOL(WINDRES, [windres])
2181 AC_SUBST(WINDRES)
2183 GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress)
2184 GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init)
2185 if test x"${openbsd_os}" = x"yes"; then
2186   GNASH_PKG_FIND(libpng, [png.h], [png images], png_info_init)
2187 else
2188   GNASH_PKG_FIND(png, [png.h], [png images], png_info_init)
2190 GNASH_PKG_FIND(gif, [gif_lib.h], [gif images], DGifOpen)
2191 if test x"${GIF_LIBS}" = x ; then
2192  GNASH_PKG_FIND(ungif, [gif_lib.h], [gif images], DGifOpen)
2193  GIF_LIBS=${UNGIF_LIBS}
2194  GIF_CFLAGS=${UNGIF_CFLAGS}
2196 if test x"$testsuite" = x"yes"; then
2197   GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
2200 GNASH_PKG_FIND(speex, [speex.h], [speex audio codec], speex_decode_int)
2201 AM_CONDITIONAL(HAVE_SPEEX, [ test x$has_speex = xyes ])
2202 if test x$has_speex = xyes ; then
2203   AC_DEFINE([DECODING_SPEEX], [1], [Speex codec available])
2206 GNASH_PKG_FIND(speexdsp, [speex_resampler.h], [speex DSP utilities], speex_resampler_process_int)
2207 if test x$has_speexdsp = xyes ; then
2208   AC_DEFINE([RESAMPLING_SPEEX], [1], [Speex resampler available])
2211 dnl Find freetype and fontconfig
2212 dnl GNASH_PKG_FIND(freetype2, [freetype/freetype.h], [freetype2 font library], FT_Load_Char)
2213 dnl rob might be working on this or not ;)
2214 GNASH_PATH_FREETYPE2
2215 GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch)
2217 if test x$cross_compiling = xno; then
2218   AC_PATH_MING
2220 AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ])
2222 AM_CONDITIONAL(MING_VERSION_0_4,
2223         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040000  ])
2224 AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS,
2225         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040002  ])
2226 AM_CONDITIONAL(MING_SUPPORTS_INIT_ACTIONS,
2227         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040004  ])
2228 AM_CONDITIONAL(MING_SUPPORTS_REPLACE_TAG,
2229         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
2230 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_ADD_CHARACTER,
2231         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
2232 AM_CONDITIONAL(MING_SUPPORTS_STREAMING_SOUND,
2233         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
2234 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_SET_DEPTH,
2235         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
2236 AM_CONDITIONAL(MING_VERSION_0_4_3,
2237         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040300 ])
2238 AM_CONDITIONAL(MING_VERSION_0_4_4,
2239         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040400 ])
2241 if test x$cross_compiling = xno; then
2242   AC_ARG_WITH([swfdec_testsuite],
2243           AC_HELP_STRING([--with-swfdec-testsuite],
2244                   [directory where swfdec testsuite (the 'test' dir) is]),
2245         SWFDEC_TESTSUITE=${withval})
2246   AC_SUBST(SWFDEC_TESTSUITE)
2248 AM_CONDITIONAL(ENABLE_SWFDEC_TESTSUITE, [ test x"$SWFDEC_TESTSUITE" != x ])
2250 if test x$cross_compiling = xno; then
2251   AC_ARG_ENABLE([http_testsuite],
2252       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2253           AC_HELP_STRING([--enable-http-testsuite=<baseurl>],
2254                   [Enable http based testsuite (default url is http://www.gnashdev.org/testcases)]),
2255               [case "${enableval}" in
2256              no) HTTP_TESTSUITE="" ;;
2257             yes) HTTP_TESTSUITE="http://www.gnashdev.org/testcases" ;;
2258               *) HTTP_TESTSUITE="${enableval}";;
2259            esac])
2260   AC_SUBST(HTTP_TESTSUITE)
2262 AM_CONDITIONAL(ENABLE_HTTP_TESTSUITE, [ test x"$HTTP_TESTSUITE" != x ])
2264 if test x$cross_compiling = xno; then
2265   AC_ARG_ENABLE([red5_testing],
2266       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2267           AC_HELP_STRING([--enable-red5-testing=<host>],
2268                   [Enable red5 based testing (default host is localhost)]),
2269               [case "${enableval}" in
2270              no) RED5_HOST="" ;;
2271             yes) RED5_HOST="localhost" ;;
2272               *) RED5_HOST="${enableval}";;
2273            esac])
2274   AC_SUBST(RED5_HOST)
2276 AM_CONDITIONAL(ENABLE_RED5_TESTING, [ test x"$RED5_HOST" != x ])
2278 dnl The name might differ between systems.
2279 if test x"$testsuite" = x"yes"; then
2280 AC_PATH_PROGS(NETCAT, [nc netcat])
2281 AC_PATH_PROG(WGET, wget)
2283 AM_CONDITIONAL(HAS_NETCAT, [ test x"$NETCAT" != x ])
2284 AM_CONDITIONAL(HAS_WGET, [ test x"$WGET" != x ])
2287 dnl See if we can use the swfmill, mtasc, swfc and haxe based testsuites 
2289 if test x"$testsuite" = x"yes" -a x$cross_compiling = xno; then
2290   AC_PATH_PROG(AS3COMPILE, as3compile)
2291   AC_PATH_PROG(SWFC, swfc)
2292   AC_PATH_SWFMILL
2293   AC_PATH_MTASC
2294   AC_PATH_HAXE
2297 AM_CONDITIONAL(ENABLE_SWFMILL, [ test x"$SWFMILL" != x ])
2298 AM_CONDITIONAL(SWFMILL_AS3_SUPPORT,
2299         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2301 dnl SWFMILL versions older than 0.3 didn't get function2 flags order correctly
2302 AM_CONDITIONAL(SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT,
2303         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2305 AM_CONDITIONAL(ENABLE_AS3COMPILE, [ test x"$AS3COMPILE" != x ])
2306 AM_CONDITIONAL(ENABLE_MTASC, [ test x"$MTASC" != x ])
2307 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2308 AM_CONDITIONAL(ENABLE_SWFC, [ test x"$SWFC" != x ])
2309 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2311 AC_PATH_PROG(DOXYGEN, doxygen)
2312 AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ])
2314 dnl currently unused
2315 dnl GNASH_PKG_FIND(ogg, [ogg.h], [decode ogg streams], ogg_stream_init)
2317 if test x$build_sdl = xyes -o x$build_sound_sdl = xyes; then
2318   GNASH_PATH_SDL
2321 AM_CONDITIONAL(HAVE_SDL, [ test x$has_SDL = xyes ])
2323 GNASH_PATH_QT3
2324 GNASH_PATH_KDE3
2326 GNASH_PATH_QT4
2327 GNASH_PATH_KDE4
2329 dnl Qtopia is a desktop environment for embedded devices.
2330 dnl GNASH_PATH_QTOPIA3
2331 dnl GNASH_PATH_QTOPIA4
2332 has_qtopia3=no
2333 has_qtopia4=no
2336 AM_CONDITIONAL(HAVE_QTOPIA3, [test x$has_qtopia3 = xyes])
2337 AM_CONDITIONAL(HAVE_QTOPIA4, [test x$has_qtopia4 = xyes])
2338 AM_CONDITIONAL(HAVE_KDE3,    [test x$has_kde3 = xyes])
2339 AM_CONDITIONAL(HAVE_KDE4,    [test x$has_kde4 = xyes])
2340 AM_CONDITIONAL(HAVE_QT3,     [test x$has_qt3 = xyes])
2341 AM_CONDITIONAL(HAVE_QT4,     [test x$has_qt4 = xyes])
2343 AM_CONDITIONAL(WITH_KDE4,    [test "$with_kde4" != "no"])
2344 AM_CONDITIONAL([QT_X11],     [test "$platform" = "X11"])
2345 AM_CONDITIONAL([QTOPIA],     [test "$platform" = "Qtopia"])
2346 AM_CONDITIONAL([QT_OSX],     [test "$platform" = "OSX"])
2347 AM_CONDITIONAL([QT_OS9],     [test "$platform" = "OS9"])
2348 AM_CONDITIONAL([QT_WIN32],   [test "$platform" = "Win32"])
2350 dnl Need GLIB for both GTK and GST
2351 if test x"${build_gtk}" = xyes -o x"${build_media_gst}" = xyes; then
2352   GNASH_PATH_GLIB
2355 AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ])
2357 if test x$npapi = xyes; then
2358   if ! test x$build_gtk = xyes -o x$build_kde4 = xyes; then
2359     AC_MSG_WARN(["Enabled NPAPI plugin, but it's not supported by the selected GUI"])
2360   fi
2363 if test x$windows = xyes -a x$npapi = xyes; then
2364   if test "x$NSPR_CFLAGS" = x -a "x$NSPR_LIBS" = x; then
2365     AC_MSG_ERROR(["On Win32, NPAPI plugin requires NSPR."])
2366   fi
2367   if test "x$WINDRES" = x; then
2368     AC_MSG_ERROR(["On Win32, NPAPI plugin requires windres."])
2369   fi
2372 dnl Need GLIB for NPAPI plugin
2373 if test x$npapi = xyes; then
2374   GNASH_PATH_GLIB
2377 dnl if kde isn't installed, even if it's specified, don't try to build
2378 dnl the KPARTS plugin, which is KDE based.
2379 if test x$has_kde3 = xno -a x$build_kparts3 = xyes; then
2380   build_kparts3=no
2381 dnl  build_kde3=no
2382   AC_MSG_WARN(["Disabling KPARTS 3.x plugin, no KDE development found"])
2385 if test x$build_kde3 = xno -a x$build_kparts3 = xyes; then
2386   AC_MSG_WARN(["Enabled KPARTS 3.x plugin, but you aren't building a KDE based GUI!"])
2388 if test x$has_kde4 = xno -a x$build_kparts4 = xyes; then
2389   build_kparts4=no
2390 dnl  build_kde4=no
2391   AC_MSG_WARN(["Disabling KPARTS 4.x plugin, no KDE 4.x development found"])
2394 if test x$build_kde4 = xno -a x$kparts4 = xyes; then
2395   AC_MSG_WARN(["Enabled KPARTS 4.x plugin, but you aren't building a KDE 4.x based GUI!"])
2398 AM_CONDITIONAL(BUILD_QTOPIA3_GUI,  [ test x$build_qtopia3 = xyes ])
2399 AM_CONDITIONAL(BUILD_QTOPIA4_GUI,  [ test x$build_qtopia4 = xyes ])
2400 AM_CONDITIONAL(BUILD_QT3_GUI,      [ test x$build_qt3 = xyes ])
2401 AM_CONDITIONAL(BUILD_QT4_GUI,      [ test x$build_qt4 = xyes ])
2402 AM_CONDITIONAL(BUILD_KDE3_GUI,     [ test x$build_kde3 = xyes ])
2403 AM_CONDITIONAL(BUILD_KDE4_GUI,     [ test x$build_kde4 = xyes ])
2405 AM_CONDITIONAL(BUILD_ALP_GUI,      [ test x$build_alp = xyes ])
2406 AM_CONDITIONAL(BUILD_HILDON_GUI,   [ test x$build_hildon = xyes ])
2407 AM_CONDITIONAL(BUILD_GTK_GUI,      [ test x$build_gtk = xyes ])
2408 AM_CONDITIONAL(BUILD_FLTK_GUI,     [ test x$build_fltk = xyes ])
2409 AM_CONDITIONAL(BUILD_SDL_GUI,      [ test x$build_sdl = xyes ])
2410 AM_CONDITIONAL(BUILD_FB_GUI,       [ test x$build_fb = xyes ])
2411 AM_CONDITIONAL(BUILD_AQUA_GUI,     [ test x$build_aqua = xyes ])
2412 AM_CONDITIONAL(ALLSTATIC,          [ test x$build_aqua = xyes ]) dnl the Aqua-binary is always static.
2413 AM_CONDITIONAL(BUILD_RISCOS_GUI,   [ test x$build_riscos = xyes ])
2414 AM_CONDITIONAL(BUILD_DUMP_GUI,     [ test x$build_dump = xyes ])
2415 AM_CONDITIONAL(BUILD_AMIGAOS4_GUI, [ test x$build_aos4 = xyes ])
2416 AM_CONDITIONAL(BUILD_HAIKU_GUI,    [ test x$build_haiku = xyes ])
2418 # plugin building flags
2419 AM_CONDITIONAL(NPAPI,   [test x"${npapi}" = xyes])
2420 AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes])
2421 AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes])
2423 if test x"${build_gles}" = xyes; then
2424   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2425   GNASH_PATH_GLES
2428 if test x"${build_ogv}" = xyes; then
2429   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2430   GNASH_PKG_FIND(OpenVG, [vg/openvg.h], [OpenVG library], vgDrawImage)
2433 if test x"${build_ogl}" = xyes; then
2434   GNASH_PATH_OPENGL
2437 if test x"${build_gtk}" = xyes; then
2438   AC_ARG_ENABLE(ghelp,
2439     AC_HELP_STRING([--enable-ghelp], [Enable support for the GNOME help system]),
2440     [case "${enableval}" in
2441       yes) ghelp=yes ;;
2442       no)  ghelp=no ;;
2443       *)   AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;;
2444     esac], ghelp=no
2445   )
2447   if test x"${ghelp}" = x"yes" ; then
2448     AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2449     AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2450     AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2452     if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = x ; then
2453       ghelp=no
2454       AC_MSG_WARN([You need to install scrollkeeper for gnome help])
2455     fi
2456   fi
2458 AM_CONDITIONAL(GHELP, [test x${ghelp} = xyes])
2460 if test x${build_fltk} = xyes; then
2461   GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender)
2464 dnl Some systems have a pervered set of dependencies.
2465 dnl Fedora Core 6 appears to have a dependency on expat for fontconfig.
2466 dnl We only need the library, but this is the easy wind to find it.
2467 GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString)
2469 dnl these conditionals were moved out of kde.m4
2470 AM_CONDITIONAL(HAS_KDE3, [test x$has_kde3 = xyes])
2471 # used to disable x11-specific stuff on special platforms
2472 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
2473 AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
2474 AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
2476 AM_CONDITIONAL(HAVE_GTK2, [ test x$has_gtk2 = xyes ])
2477 AM_CONDITIONAL(HAVE_GLEXT, [test x$glext = xyes])
2479 dnl We don't have GTKGLExt, so default to SDL, and don't build the Firefox plugin
2480 if test x$glext = xno -a x$build_ogl = xyes; then
2481   if test x$gtk2 = xyes -a x$build_gtk = xyes; then
2482     AC_ERROR([You have GTK installed, but not GtkGLExt. You need GtkGLExt to use the OpenGL renderer. Attempting to build SDL version])
2483   fi
2484   gui=sdl
2485   npapi=no
2486   AC_MSG_WARN([GTK2 specified for the GUI, but GtkGlExt is not present. Trying SDL instead.])
2489 missing_codecs=""
2490 if test x"$build_media_gst" = "xyes"; then
2491   AC_PATH_PROG(GST_INSPECT, gst-inspect, ,[${pathlist}])
2492   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2493     AC_PATH_PROG(GST_INSPECT, gst-inspect-0.10, ,[${pathlist}])
2494   fi
2495   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2496     dnl FIXME: there may be multiple acceptable plugins that are acceptable for
2497     dnl our use. For example, mad or FFmpeg will play mp3.
2498     codecs="ffdec_flv ffdec_flashsv ffdec_vp6f ffdec_flashsv mad vorbisdec ffdec_vp6"
2499     for i in $codecs; do
2500        hits="`$GST_INSPECT $i | grep -c 'Long name'`"
2501        if test $hits -eq 0; then
2502          missing_codecs="$missing_codecs $i"
2503          AC_MSG_WARN([Missing codec: $i])
2504        fi
2505     done
2506   fi
2507   GNASH_PKG_FIND(gstreamer_plugins_base, [gst/interfaces/probeprobe.h], [gstreamer interfaces library], gst_property_probe_probe_and_get_values_name, [0.10])
2508   GNASH_PKG_FIND(gstreamer_app, [gst/app/gstappsink.h], [gstreamer app library], call_gmon_start, [0.10])
2509   GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, [0.10])
2510   dnl if cross compiling, we're usually not going to be able to pop up
2511   dnl the codec installer to download the package to install, so disable
2512   dnl it if cross compiling with gstreamer support.
2513   if test x$cross_compiling = xno; then
2514     GNASH_PKG_FIND(gstpbutils, [gst/pbutils/install-plugins.h], [gstreamer PB Utils library], gst_install_plugins_supported, [0.10])
2515   fi
2516   dnl when cross compiling Gstreamer, not all supplied SDKs include all the
2517   dnl development libraries since most devices don't need to support plugin
2518   dnl development, only the runtime. In these caes we often have the header
2519   dnl files but not the libraries.
2520   if test x"${has_gstreamer_plugins_base}" = xyes; then
2521     GSTREAMER_LIBS="-lgstinterfaces-0.10 $GSTREAMER_LIBS"
2522     AC_DEFINE(HAS_GSTREAMER_PLUGINS_BASE, [1], "Has the Gstreamer Plugin Dev package installed.")
2523   fi
2526 AM_CONDITIONAL(HAVE_CAIRO, [true])
2527 dnl AM_CONDITIONAL(HAVE_CAIRO, [test x"${has_cairo}" = xyes])
2528 AM_CONDITIONAL(HAVE_OPENGL, [true])
2529 dnl AM_CONDITIONAL(HAVE_OPENGL, test x"${has_opengl}" = xyes)
2531 AM_CONDITIONAL(USE_SOUND_SDL, test x$build_sound_sdl = xyes)
2532 AM_CONDITIONAL(USE_SOUND_AHI, test x$build_sound_ahi = xyes)
2533 AM_CONDITIONAL(USE_SOUND_MKIT, test x$build_sound_mkit = xyes)
2534 AM_CONDITIONAL(USE_FFMPEG_ENGINE, test x"${build_media_ffmpeg}" = x"yes")
2535 AM_CONDITIONAL(USE_GST_ENGINE, test x"${build_media_gst}" = x"yes")
2536 AM_CONDITIONAL(HAVE_OPENGL, test x"${OPENGL_LIBS}" != x)
2537 dnl for now the Haiku media handler is experimental
2538 AM_CONDITIONAL(USE_HAIKU_ENGINE, test x"$build_media_haiku" = xyes)
2540 if test x"${build_media_ffmpeg}" = x"yes"; then
2541   AC_DEFINE([ENABLE_FFMPEG_MEDIA],  [1], [Use FFmpeg for media decoding])
2544 if test x"${build_media_gst}" = x"yes"; then
2545   AC_DEFINE([ENABLE_GST_MEDIA],  [1], [Use gstreamer for media decoding])
2548 if test x"${build_media_haiku}" = x"yes"; then
2549   AC_DEFINE([ENABLE_HAIKU_MEDIA],  [1], [Use haiku for media decoding])
2552 if test x$build_sound_mkit = xyes; then
2553   if test x"${haiku}" != xyes; then
2554     AC_MSG_ERROR([Media Kit sound handling is supported only under Haiku]);
2555   else
2556     AC_DEFINE([SOUND_MKIT],  [1], [Use Haiku's Media Kit for sound handling])
2557   fi
2560 if test x"${build_sound_sdl}" = xyes; then
2561   AC_DEFINE([SOUND_SDL],  [1], [Use SDL for sound handling])
2564 if test x"${build_sound_ahi}" = xyes; then
2565   if test x"$amigaos4" != xyes; then
2566     AC_MSG_ERROR([AHI sound handling is supported only under AmigaOS]);
2567   else
2568     AC_DEFINE([SOUND_AHI],  [1], [Use AmigaOS AHI for sound handling])
2569   fi
2572 if test x$build_fltk = xyes; then
2573   GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush)
2576 AM_CONDITIONAL(HAVE_FLTK2, [ test x$has_fltk2 = xyes ])
2577 AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ])
2579 GNASH_DOCBOOK
2580 AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x)
2581 AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes)
2582 AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_TEXI" != x -o x"$DB2X_TEXIXML" != x ])
2583 AM_CONDITIONAL(ENABLE_PDF, [ test x"$DB2X_PDF" ])
2584 AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2585 AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x -a x"$docbook_styles" != x ])
2586 AM_CONDITIONAL(ENABLE_XMLTEX, [ test x"$PDFXMLTEX" != x -a x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2587 dnl  AM_CONDITIONAL(ENABLE_DBLATEX, [ test x"$DBLATEX" != x ])
2588 AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_MAN" != x -o x"$DB2X_MANXML" != x ])
2589 AM_CONDITIONAL(HAVE_AGG, [test x"${AGG_LIBS}" != x])
2591 GNASH_PATH_CURL
2593 dnl Define winsock if we're on windows. We could do something complicated,
2594 dnl but since AC_EXEEXT does it for us, we'll do this the easy way.
2595 if test x"$EXEEXT" = "exe"; then
2596   AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32])
2599 dnl ****************************************
2600 dnl *** Check for ELF visibility support ***
2601 dnl ****************************************
2603 AC_ARG_ENABLE([visibility],
2604   AC_HELP_STRING([--enable-visibility], [Use ELF visibility attributes]), [], [enable_visibility=no])
2606 if test x"$enable_visibility" != x"no"; then
2607   dnl Check whether the compiler supports the visibility attribute
2608   save_CFLAGS="$CFLAGS"
2609   CFLAGS="$CFLAGS -Wall -Werror"
2610   AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
2611   AC_COMPILE_IFELSE(AC_LANG_SOURCE(
2612     [
2613       void __attribute__ ((visibility("default"))) test_default (void) {}
2614       void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
2615       int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
2616     ]),
2617     [
2618       AC_DEFINE([HAVE_GNUC_VISIBILITY], [1], [Define this for GCC-visibility.])
2619       AC_MSG_RESULT([yes])
2620     ],
2621     [
2622       AC_MSG_RESULT([no])
2623     ]
2624   )
2625   CFLAGS="$save_CFLAGS"
2628 AC_ARG_ENABLE([pch],
2629   AC_HELP_STRING([--enable-pch], [Enable precompiled header support]), [], [enable_pch=no])
2631 AM_CONDITIONAL([ENABLE_PCH], [test x"$enable_pch" != x"no"])
2633 PCH_FLAGS="-include all-includes.h -Winvalid-pch"
2634 AC_SUBST(PCH_FLAGS)
2636 GNASH_PATH_PTHREADS
2638 GNASH_PATH_BOOST
2639 dnl AX_GCC_ARCHFLAG(no)
2641 AC_ARG_ENABLE([strict],
2642   AC_HELP_STRING([--enable-strict],[Accept only standards compliant code (GCC only)]),
2643   [case "${enableval}" in
2644     yes) strict=yes ;;
2645     no) strict=no ;;
2646     *) AC_MSG_ERROR([bad value ${enableval} for --enable-strict option]) ;;
2647   esac],
2648   [strict=no]
2651 if test x"$strict" = x"yes" -a x$build_agg = xyes; then
2652    AC_MSG_ERROR([agg renderer will fail with --enable-strict.]);        
2655 # We want warnings, lots of warnings  :-)
2656 # It should be possible to build with -ansi, not with
2657 # -pedantic because of agg.
2659 # -ansi was actually dropped because it hides 'fileno', which
2660 # is used in a few places
2662 if test x"$GCC" = x"yes"; then
2663   CXXFLAGS="$CXXFLAGS \
2664     $CROSS_CXXFLAGS \
2665     -W \
2666     -Wall \
2667     -Wcast-align \
2668     -Wcast-qual \
2669     -Wpointer-arith \
2670     -Wreturn-type \
2671     -Wnon-virtual-dtor \
2672     -Wunused \
2673     "
2674   CFLAGS="$CFLAGS \
2675     $CROSS_CXXFLAGS \
2676     -W \
2677     -Wall \
2678     -Wcast-align \
2679     -Wcast-qual \
2680     -Wpointer-arith \
2681     -Wreturn-type \
2682     -Wmissing-declarations \
2683     -Wmissing-prototypes \
2684     -Wstrict-prototypes \
2685     "
2686   if test x"$strict" = x"yes"; then
2687     CXXFLAGS="$CXXFLAGS \
2688       -Wextra \   
2689       -pedantic \
2690       -Wno-long-long \
2691       "
2693     CFLAGS="$CFLAGS \
2694       -pedantic \
2695       -Wno-long-long \
2696       -ansi \
2697       "
2698   fi
2701 AC_ARG_ENABLE([cassert],
2702   AC_HELP_STRING([--disable-cassert],[Disable assertion checking]),
2703   [case "${enableval}" in
2704     yes) cassert=yes ;;
2705     no) cassert=no ;;
2706     *) AC_MSG_ERROR([bad value ${enableval} for --enable-cassert option]) ;;
2707   esac],
2708   [cassert=yes]
2711 if test x"$cassert" = x"no"; then
2712     CXXFLAGS="$CXXFLAGS \
2713       -DNDEBUG \
2714       "
2715     CFLAGS="$CFLAGS \
2716       -DNDEBUG \
2717       "
2720 dnl /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
2721 AC_DEFUN([CHECK_VISIBILITY_GCC_BUG],
2722   [
2723     AC_CACHE_CHECK([if -fvisibility-inlines-hidden is broken], ac_cv_gcc_visibility_bug, [
2724         AC_LANG_PUSH(C++)
2725         save_CXXFLAGS=$CXXFLAGS
2726         save_LDFLAGS=$LDFLAGS
2727         CXXFLAGS="-fPIC -fvisibility-inlines-hidden -O0"
2728         LDFLAGS="$LDFLAGS -shared -fPIC"
2730         AC_TRY_LINK(
2731         [          
2732           template<typename CharT>
2733           struct VisTest
2734           {
2735             inline VisTest ();
2736           };
2737           template<typename CharT>
2738           inline VisTest<CharT>::VisTest()
2739         {}
2740         extern template class VisTest<char>;  // It works if we drop that line
2741         int some_function( int do_something ) __attribute__((visibility("default")));
2742         int some_function( int )
2743           {
2744             VisTest<char> a;
2745             return 0;
2746           }
2747         ], [],
2748         ac_cv_gcc_visibility_bug=no, ac_cv_gcc_visibility_bug=yes)
2750         CXXFLAGS=$save_CXXFLAGS
2751         LDFLAGS=$save_LDFLAGS
2752         AC_LANG_POP(C++)
2753       ]
2754     )
2755     if test x$ac_cv_gcc_visibility_bug = xno; then
2756       CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
2757     fi
2758   ]
2761 CHECK_VISIBILITY_GCC_BUG
2763 if test x$ac_cv_gcc_visibility_bug = xno; then
2764   AC_LANG_PUSH(C++)
2765   AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
2766   save_CXXFLAGS=$CXXFLAGS
2767   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2768   AC_LINK_IFELSE([AC_LANG_PROGRAM()], 
2769                  [ac_cv_gcc_visibility=yes;
2770                   AC_MSG_RESULT([yes])],
2771                  [ac_cv_gcc_visibility=no;
2772                   AC_MSG_RESULT([no])]);
2773   CXXFLAGS="$save_CXXFLAGS"
2774   AC_LANG_POP(C++)
2778 AM_CONDITIONAL(VISIBILITY_WORKS, test x"$ac_cv_gcc_visibility" = xyes)
2780 if test x"$ac_cv_gcc_visibility" = xyes -a x"$enable_visibility" != xno; then
2781   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2784 dnl Define convienience constants so Gnash can print out the
2785 dnl default configuration of the build.
2786 RENDERER_CONFIG="${renderer_list}"
2787 RENDERER_LIBS=
2788 for rend in `echo "${add_renderer}" | tr ',' ' '`; do
2789         RENDERER_LIBS="${RENDERER_LIBS} \$(top_builddir)/librender/libgnash${rend}.la"
2790 done
2791 dnl echo "RENDERER_LIBS=$RENDERER_LIBS"
2792 AC_SUBST(RENDERER_LIBS)
2793 AC_SUBST(RENDERER_CONFIG)
2795 HWACCEL_CONFIG="${hwaccel_list}"
2796 AC_SUBST(HWACCEL_CONFIG)
2798 dnl check for missing libraries and disable them.
2799 if test x"$BOOST_LIBS" != x; then
2800   if test x"${cygnal_missing_libs}" != x; then
2801     for i in ${cygnal_missing_libs}; do
2802       if test $i = serialization; then
2803         AC_DEFINE([BOOST_MULTI_INDEX_DISABLE_SERIALIZATION], ["1"], [if the library is missing, don't use it.])
2804       fi
2805     done
2806   fi
2809 CYGNAL_PATHS
2811 SUPPORTED_GUIS=
2812 if test x$build_qtopia3 = xyes; then
2813   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia3"
2815 if test x$build_qtopia4 = xyes; then
2816   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia4"
2818 if test x$build_hildon = xyes; then
2819   SUPPORTED_GUIS="${SUPPORTED_GUIS},hildon"
2821 if test x$build_alp = xyes; then
2822   SUPPORTED_GUIS="${SUPPORTED_GUIS},alp"
2824 if test x$build_fb = xyes; then
2825   SUPPORTED_GUIS="${SUPPORTED_GUIS},fb"
2827 if test x$build_fltk = xyes; then
2828   SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk"
2830 if test x$build_qt3 = xyes; then
2831   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt3"
2833 if test x$build_qt4 = xyes; then
2834   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt4"
2836 if test x$build_kde3 = xyes; then
2837   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde3"
2839 if test x$build_kde4 = xyes; then
2840   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde4"
2842 if test x$build_gtk = xyes; then
2843   SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk"
2845 if test x$build_sdl = xyes; then
2846   SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl"
2848 if test x$build_riscos = xyes; then
2849   SUPPORTED_GUIS="${SUPPORTED_GUIS},riscos"
2851 if test x$build_aqua = xyes; then
2852   SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua"
2854 if test x$build_dump = xyes; then
2855   SUPPORTED_GUIS="${SUPPORTED_GUIS},dump"
2857 if test x$build_aos4 = xyes; then
2858   SUPPORTED_GUIS="${SUPPORTED_GUIS},aos4"
2860 if test x$build_haiku = xyes; then
2861   SUPPORTED_GUIS="${SUPPORTED_GUIS},haiku"
2863 SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
2864 AC_SUBST(SUPPORTED_GUIS)
2866 dnl AC_CONFIG_LINKS(doc/C/images)
2867 dnl AC_CONFIG_LINKS(gnashconfig.h,libltdl/config.h)
2868 AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
2869 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in)
2870 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in)
2872 AC_CONFIG_FILES(gnash.pc:gnash.pc.in)
2874 AC_OUTPUT(Makefile
2875 po/Makefile
2876 libltdl/Makefile
2877 libmedia/Makefile
2878 libsound/Makefile
2879 libbase/Makefile
2880 libcore/Makefile
2881 libcore/vm/Makefile
2882 libcore/parser/Makefile
2883 libvaapi/Makefile
2884 librender/Makefile
2885 utilities/Makefile
2886 doc/Makefile
2887 doc/C/Makefile
2888 doc/Doxyfile
2889 testsuite/Makefile
2890 testsuite/media/Makefile
2891 testsuite/libbase.all/Makefile
2892 testsuite/as3compile.all/Makefile
2893 testsuite/actionscript.all/Makefile
2894 testsuite/samples/Makefile
2895 testsuite/swfdec/Makefile
2896 testsuite/misc-ming.all/Makefile
2897 testsuite/misc-mtasc.all/Makefile
2898 testsuite/misc-haxe.all/Makefile
2899 testsuite/misc-haxe.all/classes.all/Makefile
2900 testsuite/misc-swfmill.all/Makefile
2901 testsuite/misc-swfmill.all/trace-as2/Makefile
2902 testsuite/misc-swfmill.all/trace-as3/Makefile
2903 testsuite/misc-swfc.all/Makefile
2904 testsuite/network.all/Makefile
2905 testsuite/movies.all/Makefile
2906 testsuite/libcore.all/Makefile
2907 testsuite/libmedia.all/Makefile
2908 gui/Makefile
2909 gui/Info.plist
2910 gui/pythonmod/Makefile
2911 extensions/Makefile
2912 extensions/dejagnu/Makefile
2913 extensions/mysql/Makefile
2914 extensions/fileio/Makefile
2915 extensions/gtk2/Makefile
2916 extensions/lirc/Makefile
2917 extensions/dbus/Makefile
2918 plugin/Makefile
2919 plugin/npapi/Makefile
2920 plugin/klash/Makefile
2921 plugin/klash4/Makefile
2922 plugin/win32/Makefile
2923 cygnal/Makefile
2924 cygnal/libnet/Makefile
2925 cygnal/libamf/Makefile
2926 cygnal/cgi-bin/Makefile
2927 cygnal/cgi-bin/echo/Makefile
2928 cygnal/cgi-bin/oflaDemo/Makefile
2929 cygnal/cgi-bin/fitcDemo/Makefile
2930 cygnal/testsuite/Makefile
2931 cygnal/testsuite/libamf.all/Makefile
2932 cygnal/testsuite/libnet.all/Makefile
2933 cygnal/testsuite/cygnal.all/Makefile
2937 ########################## Final report begins... ############################
2940 cerr=/tmp/gnash-configure-errors.$$
2941 cwarn=/tmp/gnash-configure-warnings.$$
2942 crec=/tmp/gnash-configure-recommended.$$
2943 echo ""
2945 #trap 'rm cerr' 0 # trap isn't a good idea, might override other traps
2946 exec 3> $cerr 
2947 exec 4> $cwarn
2948 exec 5> $crec
2950 echo "Configurable options are:"
2952 if test x"${i810lodbias}" = x"yes"; then
2953   echo "        Intel 810 LOD bias hack enabled"
2954 else
2955   echo "        Intel 810 LOD bias hack disabled (default). Use --enable-i810-lod-bias to enable."
2958 if test x"${pthreads}" = x"yes"; then
2959   echo "        POSIX Threads support enabled (default)"
2960 else
2961   if test x"${build_haiku}" = x"yes"; then
2962      echo "        POSIX Thread support built into C library."
2963   els
2964      echo "        POSIX Thread support disabled."
2965   fi
2968 if test x"${dmalloc}" = x"yes"; then
2969   echo "        DMalloc support enabled"
2970   echo "        For a list of the command-line options enter: dmalloc --usage"
2971 else
2972   echo "        DMalloc support disabled (default). Use --enable-dmalloc to enable."
2975 if test x"${npapi}" = x"yes"; then
2976   echo "        NPAPI plugin enabled (default). Use --disable-npapi to disable."
2977   echo "            NPAPI plugin will be installed in ${FIREFOX_PLUGINS}"
2978 else
2979   echo "        NPAPI plugin disabled."
2982 if test x"${build_kparts3}" = x"yes"; then
2983   echo "        KPARTS 3.x plugin enabled (default). Use --disable-kparts3 to disable"
2984   echo "            KPARTS 3.x plugin will be installed in ${KDE3_PLUGINDIR}"
2985   echo "            KPARTS 3.x service will be installed in ${KDE3_SERVICESDIR}"
2986   echo "            KPARTS 3.x config dir will be in ${KDE3_CONFIGDIR}"
2987   echo "            KPARTS 3.x appsdata will be installed in ${KDE3_APPSDATADIR}"
2988 else
2989   echo "        KPARTS 3.x plugin disabled."
2992 if test x"${build_kparts4}" = x"yes"; then
2993   echo "        KPARTS 4.x plugin enabled (default). Use --disable-kparts4 to disable"
2994   echo "            KPARTS 4.x plugin will be installed in ${KDE4_PLUGINDIR}"
2995   echo "            KPARTS 4.x service will be installed in ${KDE4_SERVICESDIR}"
2996   echo "            KPARTS 4.x config dir will be in ${KDE4_CONFIGDIR}"
2997   echo "            KPARTS 4.x appsdata will be installed in ${KDE4_APPSDATADIR}"
2998 else
2999   echo "        KPARTS 4.x plugin disabled."
3002 dnl -- if test x"${dynamic_gui}" = x"yes"; then
3003 dnl --   echo "        Loadable GUI & renderer enabled."
3004 dnl -- else
3005 dnl --   echo "        Loadable GUI & renderer disabled (default). Use --enable-dynamic-gui to enable."
3006 dnl -- fi
3008 # set a variable if we shouldn't continue. This way we can print
3009 # out everything that is missing in one pass, hopefully making it
3010 # easy for new developers to get everything they need installed.
3012 echo "Configured paths for ${build} are:"
3014 dnl Dump QT3 options is the user specified a QT3 or KDE3 GUI
3015 if test x"${build_qt3}" = xyes; then
3016   if test x"${has_qt3}" = xyes; then
3017     echo "        QT3 flags are: ${QT3_CFLAGS}"
3018     echo "        QT3 libs are: ${QT3_LIBS}"
3019   else
3020     echo "        ERROR: No QT 3.x development package installed!" >&3
3021     echo "               Install a QT 3.x development environment from http://trolltech.com" >&3
3022     echo "               or .deb users: apt-get install libqt3-mt-dev" >&3
3023     if test x$build_kde3 = xyes; then
3024       echo "               or change to a different gui with --enable-gui=..." >&3
3025     fi
3026   fi
3029 if test x"${build_qt4}" = xyes; then
3030   if test x"${has_qt4}" = xyes; then
3031     echo "        QT4 flags are: ${QT4_CFLAGS}"
3032     echo "        QT4 libs are: ${QT4_LIBS}"
3033   else
3034     echo "        ERROR: No QT 4.x development package installed!" >&3
3035     echo "               Install a QT 4.x development environment from http://trolltech.com" >&3
3036     echo "               or .deb users: apt-get install qt4-dev-tools" >&3
3037     if test x$build_kde4 = xyes; then
3038       echo "               or change to a different gui with --enable-gui=..." >&3
3039     fi
3040   fi
3043 if test x"$build_qtopia3" = xyes; then
3044   if test x"${QTOPIA3_LIBS}" != x ; then
3045     if test x"${QTOPIA3_CFLAGS}" != x ; then
3046       echo "        QTOPIA 3.x flags are: $QTOPIA3_CFLAGS"
3047     else
3048       echo "        QTOPIA 3.x flags are: default include path"
3049     fi
3050     echo "        QTOPIA 3.x libs are: $QTOPIA3_LIBS"
3051   else
3052     echo "        ERROR: No QTOPIA 3.x library development package installed!" >&3
3053     echo "               Install it from http://trolltech.com/downloads/" >&3
3054     echo "               binary packages are not available." >&3
3055   fi
3058 if test x"$build_qtopia4" = xyes; then
3059   if test x"${QTOPIA4_LIBS}" != x ; then
3060     if test x"${QTOPIA4_CFLAGS}" != x ; then
3061       echo "        QTOPIA 4.x flags are: $QTOPIA4_CFLAGS"
3062     else
3063       echo "        QTOPIA 4.x flags are: default include path"
3064     fi
3065     echo "        QTOPIA 4.x libs are: $QTOPIA4_LIBS"
3066   else
3067     echo "        ERROR: No QTOPIA 4.x library development package installed!" >&3
3068     echo "               Install it from http://trolltech.com/downloads/" >&3
3069     echo "               binary packages are not available." >&3
3070   fi
3074 # -o x$build_kparts3 = xyes
3075 if test x$build_kde3 = xyes; then
3076   if test x"$has_kde3" = xyes; then
3077     echo "        KDE 3.x flags are: $KDE3_CFLAGS"
3078     echo "        KDE 3.x libs are: $KDE3_LIBS"
3079   else
3080       echo "        ERROR: No KDE 3.x development package installed!" >&3
3081       echo "               To disable the KDE 3.x gui," >&3
3082       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
3083       echo "               and omit "kde" from the list." >&3
3084       echo "               When the option --enable-gui=... is omitted," >&3
3085       echo "               the default is the same of --enable-gui=kde,gtk" >&3
3086       echo "               To be able to build the kde 3.x gui," >&3
3087       echo "               install version 3.x of the KDE development environment from http://kde.org" >&3
3088       echo "               or .deb users: apt-get install kdelibs4-dev" >&3
3089       echo "               or .rpm users: yum install kdelibs3-devel." >&3
3090   fi
3093 # -o x$build_kparts4 = xyes
3094 if test x$build_kde4 = xyes; then
3095   if test x"$has_kde4" = xyes; then
3096     echo "        KDE 4.x flags are: $KDE4_CFLAGS"
3097     echo "        KDE 4.x libs are: $KDE4_LIBS"
3098   else
3099       echo "        ERROR: No KDE 4.x development package installed!" >&3
3100       echo "               To disable the KDE 4.x gui," >&3
3101       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
3102       echo "               and omit "kde" from the list." >&3
3103       echo "               When the option --enable-gui=... is omitted," >&3
3104       echo "               the default is the same of --enable-gui=kde,gtk" >&3
3105       echo "               To be able to build the kde 4.x gui," >&3
3106       echo "               install version 4.x of the KDE development environment from http://kde.org" >&3
3107       echo "               or .deb users: apt-get install kdelibs5-dev" >&3
3108       echo "               or .rpm users: yum install kdelibs-devel." >&3
3109   fi
3112 if test x"${JPEG_LIBS}" != x ; then
3113   if test x"${JPEG_CFLAGS}" != x ; then
3114     echo "        JPEG flags are: $JPEG_CFLAGS"
3115   else
3116     echo "        JPEG flags are: default include path"
3117   fi
3118   echo "        JPEG libs are: $JPEG_LIBS"
3119 else
3120   echo "        ERROR: No JPEG library development package installed!" >&3
3121   echo "               Install it from http://ijg.org" >&3
3122   echo "               or .deb users: apt-get install libjpeg-dev" >&3
3123   echo "               or .rpm users: yum install libjpeg-devel" >&3
3126 if test x"${GIF_LIBS}" != x ; then
3127   if test x"${GIF_CFLAGS}" != x ; then
3128     echo "        GIF flags are: $GIF_CFLAGS"
3129   else
3130     echo "        GIF flags are: default include path"
3131   fi
3132   echo "        GIF libs are: $GIF_LIBS"
3133 else
3134   echo "        ERROR: No GIF library development package installed!" >&3
3135   echo "               Install it from http://sourceforge.net/projects/giflib/" >&3
3136   echo "               or .deb users: apt-get install libungif-dev" >&3
3137   echo "               or maybe     : apt-get install libgif-dev" >&3
3138   echo "               or .rpm users: yum install libungif-devel" >&3
3141 if test x"${PNG_LIBS}" != x ; then
3142   if test x"${PNG_CFLAGS}" != x ; then
3143     echo "        PNG flags are: $PNG_CFLAGS"
3144   else
3145     echo "        PNG flags are: default include path"
3146   fi
3147   echo "        PNG libs are: $PNG_LIBS"
3148 else
3149   echo "        RECOMMENDED: No PNG library development package installed!" >&5
3150   echo "                     Gnash will be built without support for dynamic loading of PNG files." >&5
3151   echo "                     Install it from http://www.libpng.org" >&5
3152   echo "                     or .deb users: apt-get install libpng12-dev" >&5
3153   echo "                     or .rpm users: yum install libpng-devel" >&5
3156 if test x"${build_ogl}" = x"yes"; then
3157   if test x"$OPENGL_LIBS" != x; then
3158     if test x"$OPENGL_CFLAGS" != x; then
3159       echo "        OpenGL flags are: $OPENGL_CFLAGS"
3160     else
3161       echo "        OpenGL flags are: default include path"
3162     fi
3163     echo "        OpenGL libs are: $OPENGL_LIBS"
3164     else
3165       echo "        ERROR: No OpenGL development package installed!" >&3
3166       echo "               You need to install the libmesa development package" >&3
3167       echo "               or .deb users: apt-get install libgl1-mesa-dev" >&3
3168       echo "               or .rpm users: yum install xorg-x11-Mesa-libGL" >&3
3169       echo "               or use a different renderer with --enable-renderer=" >&3
3170   fi
3173 if test x"${build_gles}" = x"yes"; then
3174   if test x"${has_gles}" != x; then
3175     if test x"$GLES_CFLAGS" != x; then
3176       echo "        OpenGL-ES flags are: $GLES_CFLAGS"
3177     else
3178       echo "        OpenGL-ES flags are: default include path"
3179     fi
3180     echo "        OpenGL-ES libs are: $GLES_LIBS"
3181   else
3182       echo "        ERROR: No OpenGL-ES development package installed!" >&3
3183       echo "               You need to install the this from source proobably" >&3
3184       echo "               or use a different renderer with --enable-renderer=" >&3
3185   fi
3188 dnl GLEXT is only needed for GTK/OpenGL
3189 if test x$build_gtk = xyes -a x$build_ogl = xyes ; then
3190   if test x"$GLEXT_LIBS" != x; then
3191     if test x"$GLEXT_CFLAGS" != x; then
3192       echo "        GtkGLExt flags are: $GLEXT_CFLAGS"
3193     else
3194       echo "        GtkGLExt flags are: default include path"
3195     fi
3196       echo "        GtkGLExt libs are: $GLEXT_LIBS"
3197   else
3198     if test x$build_gtk = xyes; then
3199       if test x$build_ogl = xyes; then
3200         echo "        ERROR: No GtkGLExt development package installed!" >&3
3201         echo "               It is needed to build the GTK/OpenGL GUI/renderer combination." >&3
3202         echo "               Either install it from http://gtkglext.sourceforge.net" >&3
3203         echo "               or .deb users: apt-get install libgtkglext1-dev" >&3
3204         echo "               or .rpm users: yum install gtkglext-devel" >&3
3205         echo "               or --enable-gui=sdl or --enable-renderer=agg" >&3
3206       fi
3207     fi
3208   fi
3212 if test x$build_hildon = xyes; then #{
3213   if test x"$HILDON_LIBS" != x; then
3214     if test x"$HILDON_CFLAGS" != x; then
3215       echo "        HILDON flags are: $HILDON_CFLAGS"
3216     else
3217       echo "        HILDON flags are: default include path"
3218     fi
3219       echo "        HILDON libs are: $HILDON_LIBS"
3220   else
3221     echo "        ERROR: No HILDON development package installed!" >&3
3222     echo "               Install it from http://gtk.org" >&3
3223     #echo "               or .deb users: apt-get install libhildon.0-dev" >&3
3224     echo "               or .deb users: apt-get install libhildon-1-dev" >&3
3225     echo "               or .rpm users: yum install hildon-devel" >&3
3226   fi
3229 if test x$build_gtk = xyes; then #{
3230   if test x"$GTK2_LIBS" != x; then
3231     if test x"$GTK2_CFLAGS" != x; then
3232       echo "        GTK2 flags are: $GTK2_CFLAGS"
3233     else
3234       echo "        GTK2 flags are: default include path"
3235     fi
3236       echo "        GTK2 libs are: $GTK2_LIBS"
3237   else
3238     echo "        ERROR: No GTK2 development package installed!" >&3
3239     echo "               Install it from http://gtk.org" >&3
3240     echo "               or .deb users: apt-get install libgtk2.0-dev" >&3
3241     echo "               or .rpm users: yum install gtk2-devel" >&3
3242   fi
3244   if test x"$PANGO_LIBS" != x; then
3245     if test x"$PANGO_CFLAGS" != x; then
3246       echo "        Pango flags are: $PANGO_CFLAGS"
3247     else
3248       echo "        Pango flags are: default include path"
3249     fi
3250     echo "        Pango libs are: $PANGO_LIBS"
3251   else
3252     echo "        ERROR: No Pango development package installed!" >&3
3253     echo "               Install it from http://pango.org" >&3
3254     echo "               or .deb users: apt-get install libpango1.0-dev" >&3
3255     echo "               or .rpm users: yum install pango-devel" >&3
3256   fi
3258   if test x"$GLIB_LIBS" != x; then
3259     if test x"$GLIB_CFLAGS" != x; then
3260       echo "        GLib flags are: $GLIB_CFLAGS"
3261     else
3262       echo "        GLib flags are: default include path"
3263     fi
3264     echo "        GLib libs are: $GLIB_LIBS"
3265   else
3266     echo "        ERROR: No GLib development package installed!" >&3
3267     echo "               Install it from http://gtk.org" >&3
3268     echo "               or .deb users: apt-get install libglib2.0-dev" >&3
3269     echo "               or .rpm users: yum install glib2-devel" >&3
3270   fi
3272   if test x"$ATK_LIBS" != x; then
3273     if test x"$ATK_CFLAGS" != x; then
3274       echo "        ATK flags are: $ATK_CFLAGS"
3275     else
3276       echo "        ATK flags are: default include path"
3277     fi
3278       echo "        ATK libs are: $ATK_LIBS"
3279   else
3280     echo "        ERROR: No ATK development package installed!" >&3
3281     echo "               Install it from http://gtk.org" >&3
3282     echo "               or .deb users: apt-get install libatk1.0-dev" >&3
3283     echo "               or .rpm users: yum install atk-devel" >&3
3284   fi
3288 if test x"$build_media_gst" = x"yes"; then
3289   if test x"$missing_codecs" != x; then   
3290       echo "        Your Gstreamer installation is missing these codecs: $missing_codecs"
3291       echo "        Please install the gstreamer-ffmpeg for Gstreamer"
3292   fi  
3293   if test x"$GSTREAMER_LIBS" != x; then
3294     if test x"$GSTREAMER_CFLAGS" != x; then
3295       echo "        Gstreamer flags are: $GSTREAMER_CFLAGS"
3296     else
3297       echo "        Gstreamer flags are: default include path"
3298     fi
3299     echo "        Gstreamer libs are: $GSTREAMER_LIBS"
3300     if test x"$has_modern_gstpbutils" = "xno"; then
3301       echo "        RECOMMENDED: If the user has not installed the necessary Gstreamer plugins," >&5
3302       echo "                     Gstreamer can pop up a message prompting them to." >&5
3303       echo "                     Install gstpbutils (>= 0.10.15) from http://www.gstreamer.net for that to be enabled" >&5
3304       echo "                     or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&5
3305     fi
3306     if test x"$has_gstreamer_plugins_base" = "xno"; then
3307       echo "                        Install gstreamer-plugins-base from http://www.gstreamer.net" >&5
3308       echo "                        or .rpm users: yum install gstreamer-plugins-base-devel" >&5
3309       echo "                        or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&5
3310     fi
3311   else
3312     echo "        ERROR: GST media handling requested but gstreamer-0.10+ not found" >&3
3313     echo "               Install it from http://www.gstreamer.net" >&3
3314     echo "               or .deb users: apt-get install libgstreamer0.10-dev" >&3
3315     echo "               or .rpm users: yum install gstreamer-devel" >&3
3316     echo "               or             yast install gstreamer010-devel" >&3
3317   fi
3320   if test x"${build_media_ffmpeg}" = x"yes"; then
3321     if test x"$FFMPEG_LIBS" != x; then
3322       echo "        MP3 and video support enabled through FFmpeg"
3323       if test x"${ffmpeg_version_check}" != xok; then
3324         echo "        ERROR: You have version ${ffmpeg_version} of FFmpeg installed," >&3
3325         if test x"${have_ffmpeg_swscale}" = "xno"; then
3326           echo "               with no swscale enabled." >&3
3327         else
3328           echo "               with swscale enabled." >&3
3329         fi
3330         echo "               This setup isn't supported!" >&3
3331         echo "               Version 51.11.0 or newer is required, enabling swscale if >= 52.0.0." >&3
3332         echo "               You can install libswscale from http://ffmpeg.org" >&3
3333         echo "               or .deb users: apt-get install libswscale-dev" >&3
3334       else
3335         if test x"${avformat_h}" = x; then
3336           echo "        ERROR: FFmpeg's libavcodec header is installed but not libavformat." >&3
3337           echo "               You can install FFmpeg from http://ffmpeg.org" >&3
3338           echo "               or .deb users: apt-get install libavformat-dev" >&3
3339           echo "               or YaST users: yast -i libavformat-api (but currently installs into /usr/lib64)" >&3
3340           echo "               or explicitly set the path using --with-ffmpeg-incl=" >&5
3341           echo "               or reconfigure with --enable-media=gst" >&3
3342         else
3343           if test x"$FFMPEG_CFLAGS" != x; then
3344             echo "        FFmpeg flags are: $FFMPEG_CFLAGS"
3345           else
3346             echo "        FFmpeg flags are: default include path"
3347           fi
3348           echo "        FFmpeg libs are: $FFMPEG_LIBS"
3349         fi
3350       fi
3351     else
3352       echo "        ERROR: No FFmpeg development package installed!" >&3
3353       echo "               You can install FFmpeg from http://ffmpeg.org" >&3
3354       echo "               or .deb users: apt-get install libavformat-dev" >&3
3355       echo "               or .rpm users: yum install ffmpeg-devel" >&3
3356       echo "               or reconfigure with --enable-media=gst" >&3
3357     fi
3358   fi
3360 if test x$build_cairo = xyes; then
3361   if test x"$CAIRO_LIBS" != x; then
3362     if test x"$CAIRO_CFLAGS" != x; then
3363       echo "        Cairo flags are: $CAIRO_CFLAGS"
3364     else
3365       echo "        Cairo flags are: default include path"
3366     fi
3367     echo "        Cairo libs are: $CAIRO_LIBS"
3368   else
3369     echo "        ERROR: No Cairo development package installed!" >&3
3370     echo "               You need to have the Cairo development package installed" >&3
3371     echo "               if you have used --enable-render=cairo to configure." >&3
3372     echo "               Install it from http://cairographics.org" >&3
3373     echo "               or .deb users: apt-get install libcairo-dev" >&3
3374     echo "               or .rpm users: yum install cairo-devel" >&3
3375   fi
3378 if test x$build_fltk = xyes; then
3379   if test x"$FLTK2_LIBS" != x; then
3380     if test x"$FLTK2_CFLAGS" != x; then
3381       echo "        FLTK flags are: $FLTK2_CFLAGS"
3382     else
3383       echo "        FLTK flags are: default include path"
3384     fi
3385       echo "        FLTK libs are: $FLTK2_LIBS"
3386   else
3387     echo "        ERROR: No FLTK2 development package installed!" >&3
3388     echo "               There are currently no Debian or RPM packages for FLTK2;" >&3
3389     echo "               see http://www.fltk.org to install it from source." >&3
3390     echo "               or change to a different gui with --enable-gui=..." >&3
3391 dnl What it was for FLTK 1:
3392 dnl    echo "               or .deb users: apt-get install fltk-1.1-dev"
3393 dnl    echo "               or .rpm users: yum install fltk-devel"
3394   fi
3397 if test x$build_fltk = xyes; then
3398   if test x"$XFT_LIBS" != x; then
3399     if test x"$XFT_CFLAGS" != x; then
3400       echo "        Xft flags are: $XFT_CFLAGS"
3401     else
3402       echo "        Xft flags are: default include path"
3403     fi
3404       echo "        Xft libs are: $XFT_LIBS"
3405 dnl     else
3406 dnl       echo "        ERROR: No Xft development package installed!" >&3
3407 dnl       echo "               Install the xft development package" >&3
3408 dnl       echo "               or .deb users: apt-get install libxft-dev" >&3
3409 dnl       echo "               or .rpm users: yum install xft-devel" >&3
3410   fi
3413 # See whether SDL is required
3414 need_sdl=false
3415 test x$build_sdl = xyes                 && need_sdl=true
3416 test x$build_sound_sdl = xyes   && need_sdl=true
3418 if $need_sdl; then
3419   if test x"$SDL_LIBS" != x; then
3420     echo "        SDL flags are: $SDL_CFLAGS"
3421     echo "        SDL libs are: $SDL_LIBS"
3422   else
3423     echo "        ERROR: No SDL development package installed!" >&3
3424     echo "               Install it from http://www.libsdl.org/download-1.2.php" >&3
3425     echo "               or .deb users: apt-get install libsdl1.2-dev" >&3
3426     echo "               or .rpm users: yum install SDL-devel" >&3
3427     test x$build_sdl = xyes &&
3428         echo "               or select a different GUI with --enable-gui= " >&3
3429   fi
3431 unset need_sdl
3433 if test x"$nsapi" = x"yes"; then
3434 dnl  if test x"$FIREFOX_CFLAGS" != x; then
3435 dnl    echo "        Firefox flags are: $FIREFOX_CFLAGS"
3436 dnl    echo "        Firefox libs are: $FIREFOX_LIBS"
3437     echo "        Plugin will be installed in ${FIREFOX_PLUGINS}"
3438 dnl  else
3439 dnl    echo "        ERROR: No Firefox or Mozilla development package installed!" >&3
3440 dnl  fi
3443 if test x"${pthreads}" = x"yes"; then
3444   if test x"$PTHREAD_CFLAGS" != x; then
3445     echo "        POSIX Threads flags are: $PTHREAD_CFLAGS"
3446   fi
3447   if test x"${PTHREAD_LIBS}" != x; then
3448     echo "        POSIX Threads lib is: $PTHREAD_LIBS"
3449   else
3450     if test x"${cross_compiling}" = xno; then
3451       echo "ERROR: No pthread development package installed!" >&3
3452     fi
3453   fi
3456 if test x"${docbook}" = x"yes"; then
3457   if test x"$MAKEINFO" = x; then
3458     echo "        ERROR: no makeinfo tools installed!" >&3
3459     echo "               Either install it from http://www.gnu.org/software/texinfo/" >&3
3460     echo "               or .deb users: apt-get install texinfo" >&3
3461     echo "               or configure without --enable-docbook" >&3
3462   fi
3463   dnl low-level tools
3464   if test x"$DB2X_TEXIXML" = x -o x"$DB2X_MANXML" = x -o x"$DB2X_XSLTPROC" = x; then
3465     dnl high-level tools
3466     if test x"${DB2X_TEXI}" = x -o x"${DB2X_MAN}" = x; then
3467       echo "        ERROR: No DocBook2X tools installed!" >&3
3468       echo "               Either install it from http://docbook2x.sourceforge.net" >&3
3469       echo "               or .deb users: apt-get install docbook docbook2x docbook-utils" >&3
3470       echo "                              docbook-xml docbook-xsl texinfo xsltproc" >&3
3471       echo "               or configure without --enable-docbook" >&3
3472     fi
3473   else
3474     echo "        You have version $db2x_version of the DocBook2X tools."
3475   fi
3476 else
3477   echo "        WARNING: without --enable-docbook we will use the cached" >&4
3478   echo "                 documentation files included in the gnash distribution." >&4
3479   echo "                 If you change files in doc/C, you should --enable-docbook." >&4
3482 if test x"$CURL_LIBS" != x; then
3483   if test x"$CURL_CFLAGS" != x; then
3484     echo "        CURL flags are: $CURL_CFLAGS"
3485   else
3486     echo "        CURL flags are: default include path"
3487   fi
3488     echo "        CURL libs are: $CURL_LIBS"
3489 else
3490   echo "        RECOMMENDED: If you install the CURL library, Gnash will be able to" >&5
3491   echo "                     display remote content (streaming from URLs) using CURL." >&5
3492   echo "                     Install libcurl from http://curl.haxx.se/libcurl" >&5
3493   echo "                     or .deb users: apt-get install libcurl-dev" >&5
3494   echo "                     or .rpm users: yum install curl-devel" >&5
3497 if test x"$SPEEX_LIBS" != x; then
3498   if test x"$SPEEX_CFLAGS" != x; then
3499     echo "        Speex flags are: $SPEEX_CFLAGS"
3500   else
3501     echo "        Speex flags are: default include path"
3502   fi
3503     echo "        Speex libs are: $SPEEX_LIBS"
3504 else
3505   echo "        RECOMMENDED: If you install the Speex library, Gnash will be able to" >&5
3506   echo "                     decoded Speex encoded audio in FLV files." >&5
3507   echo "                     Install libspeex from http://speex.org" >&5
3508   echo "                     or .deb users: apt-get install libspeex-dev" >&5
3509   echo "                     or .rpm users: yum install speex-devel" >&5
3512 if test x"$ext_dbus" = xyes; then
3513   if test x"$DBUS_LIBS" != x; then
3514     if test x"$DBUS_CFLAGS" != x; then
3515       echo "        DBUS flags are: $DBUS_CFLAGS"
3516     else
3517       echo "        DBUS flags are: default include path"
3518     fi
3519       echo "        DBUS libs are: $DBUS_LIBS"
3520   else
3521     echo "        WARNING: DBUS library not found." >&4
3522     echo "                 Gnash will be built without support for remote controls." >&4
3523     echo "                 Why not install libdbus from http://www.dbus.org" >&4
3524     echo "                 or .deb users: apt-get install dbus-dev" >&4
3525     echo "                 or .rpm users: yum install dbus-devel" >&4
3526   fi
3529 if test x$build_agg = xyes; then # {
3530   echo "        AGG Pixel format is: $pixelformat"
3531     if test x"$AGG_LIBS" != x; then # {
3532       if test x"${agg25}" != xyes; then # {
3533         echo "        ERROR: Your installation of AGG appears to be version 2.4 or older." >&3
3534         echo "               Please upgrade to AGG 2.5 or greater." >&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       else # }{
3539         if test x"$AGG_CFLAGS" != x; then # {
3540           echo "        AGG flags are: $AGG_CFLAGS"
3541         else # }{
3542           echo "        AGG flags are: default include path"
3543         fi # }
3544         echo "        AGG libs are: $AGG_LIBS"
3545       fi # }
3546     else # }{
3547       echo "        ERROR: No AGG development package installed!" >&3
3548       echo "               Install it from http://www.antigrain.com" >&3
3549       echo "               or .deb users: apt-get install libagg-dev" >&3
3550       echo "               or .rpm users: yum install agg-devel" >&3
3551     fi # }
3552 fi # }
3554 if test x"$BOOST_LIBS" != x; then
3555         echo "        BOOST flags are: $BOOST_CFLAGS"
3556         echo "        BOOST libs are: $BOOST_LIBS"
3557         echo "        BOOST libs for cygnal are: $BOOST_CYGNAL_LIBS"
3558     dnl fi
3559     if test x"${missing_headers}" != x; then
3560       for i in ${missing_headers}; do
3561         echo "        ERROR: The BOOST $i header file is needed!" >&3
3562         echo "               Install it from http://boost.org" >&3
3563         echo "               or from a Boost development package" >&3
3564       done
3565     fi
3567     if test x"${cygnal}" = x"yes"; then
3568         if test x"${cygnal_missing_libs}" != x; then
3569           for i in ${cygnal_missing_libs}; do
3570             echo "          ERROR: The BOOST $i library is required for cygnal!" >&4
3571             echo "                 Either configure with --disable-cygnal or" >&4
3572             echo "                 install it from http://www.boost.org" >&4
3573             echo "                 or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&4
3574           done
3575         fi
3576     fi
3578     if test x"${missing_libs}" != x; then
3579       for i in ${missing_libs}; do
3580         echo "        ERROR: The BOOST $i library is needed!" >&3
3581         echo "               Install it from http://boost.org" >&3
3582         echo "               or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&3
3583       done
3584     fi
3585 else
3586     echo "        ERROR: No BOOST development package installed!" >&3
3587     echo "               Install it from http://www.boost.org" >&3
3588     echo "               or .deb users: apt-get install libboost-dev libboost-thread-dev" >&3
3589     if test x"$cygnal" = xyes; then
3590     echo "                              and libboost-date-time-dev (for cygnal)" >&3
3591     fi
3592     echo "               or .rpm users: yum install boost-devel" >&3
3595 dnl don't look for the flash compilers when cross compiling.
3596 if test x"$testsuite" = x"yes"; then
3597   if test x$cross_compiling = xno; then
3598     if test x"$MING_LIBS" != x; then
3599       echo "        MING flags are $MING_CFLAGS"
3600       echo "        MING libs are $MING_LIBS"
3601     else
3602       echo "        WARNING: You need to have the Ming development package" >&4
3603       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3604       echo "                 Install it from http://www.libming.org/" >&4
3605       echo "                 or .deb users: apt-get install libming-dev" >&4
3606     fi
3608     if test x"$MAKESWF" != x; then
3609       echo "        MING version code is $MING_VERSION_CODE"
3610       echo "        MAKESWF is $MAKESWF"
3611     else
3612       echo "        WARNING: You need to have the Ming utilities package" >&4
3613       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3614       echo "                 Install it from http://www.libming.org" >&4
3615       echo "                 or .deb users: apt-get install libming-util" >&4
3616     fi
3618     if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; then
3619       echo "        WARNING: You have an older version of Ming installed and will not" >&4
3620       echo "                 be able to run all of the tests in Gnash testsuite." >&4
3621       echo "                 Install the latest version from http://www.libming.org" >&4
3622     fi
3624     if test x"$SWFDEC_TESTSUITE" != x; then
3625       echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
3626     fi
3628     if test x"$MTASC" != x; then
3629       echo "        MTASC is $MTASC"
3630       echo "        MTASC CLASSPATH is $MTASC_CLASSPATH"
3631     else
3632       echo "        WARNING: You need to have the MTASC compiler packages installed" >&4
3633       echo "                 to run some of the tests in Gnash testsuite." >&4
3634       echo "                 You can install it from http://mtasc.org" >&4
3635       echo "                 or .deb users: apt-get install mtasc" >&4
3636     fi
3638     if test x"$HAXE" != x; then
3639       echo "        HAXE is $HAXE"
3640       echo "        HAXE CLASSPATH is $HAXE_CLASSPATH"
3641     else
3642       echo "        WARNING: You need to have the HAXE compiler package " >&4
3643       echo "                 version 2.00 or higher installed" >&4
3644       echo "                 to run some of the tests in Gnash testsuite." >&4
3645       echo "                 You can install it from http://haxe.org" >&4
3646       echo "                 or .deb users: apt-get install haxe" >&4
3647     fi
3649     if test x"$SWFMILL" != x; then
3650       echo "        SWFMILL is $SWFMILL"
3651       if test x"$ENABLE_AVM2" != x -a "$SWFMILL_VERSION" -lt 00021206; then
3652         echo "        WARNING: You are building Gnash with AVM2 support but" >&4
3653         echo "                 your swfmill version is too old to run AS3" >&4
3654         echo "                 tests." >&4
3655       fi
3656     else
3657       echo "        WARNING: You need to have the 'swfmill' tool installed" >&4
3658       echo "                 to run some of the tests in Gnash testsuite." >&4
3659       echo "                 You can install it from http://swfmill.org/" >&4
3660       echo "                 or .deb users: apt-get install swfmill" >&4
3661     fi
3663     if test x"$SWFC" != x; then
3664       echo "        SWFC is $SWFC"
3665     else
3666       echo "        WARNING: You need to have 'swfc' from SWFTools installed" >&4
3667       echo "                 to run some of the tests in Gnash testsuite." >&4
3668       echo "                 You can install it from http://www.swftools.org/" >&4
3669       echo "                 or .deb users: apt-get install swftools" >&4
3670     fi
3672     if test x"$AS3COMPILE" != x; then
3673       echo "        AS3COMPILE is $AS3COMPILE"
3674     else
3675       echo "        WARNING: you need as3compile from SWFTools" >&4
3676       echo "                 to run some of the tests in Gnash testsuite." >&4
3677       echo "                 You can install it from http://www.swftools.org/" >&4
3678     fi
3680     if test x"$HTTP_TESTSUITE" != x; then
3681       echo "        HTTP testsuite dir is $HTTP_TESTSUITE"
3682     fi
3684     if test x"$RED5_HOST" != x; then
3685       echo "        RED5 testing host is $RED5_HOST"
3686     fi
3687   fi
3690   if test x"$PERL" != x; then
3691     echo "        PERL is $PERL"
3692   else
3693     echo "        WARNING: You need to have perl installed" >&4
3694     echo "                 to run some of the tests in Gnash testsuite." >&4
3695   fi
3697 if test x"$testsuite" = x"yes"; then
3698   if test x"$CSOUND" != x; then
3699     echo "        CSOUND is $CSOUND"
3700   fi
3703 if test x"$Z_LIBS" != x; then
3704   if test x"$Z_CFLAGS" != x; then
3705     echo "        Z flags are: $Z_CFLAGS"
3706   else
3707     echo "        Z flags are: default include path"
3708   fi
3709   echo "        Z libs are: $Z_LIBS"
3710 else
3711   echo "        RECOMMENDED: You need to have the zlib development packages installed" >&5
3712   echo "                     to play compressed SWF (most of them from version 6 up)" >&5
3713   echo "                     and to display some kinds of JPEG files." >&5
3714   echo "                     Install it from http://www.zlib.net" >&5
3715   echo "                     or .deb users: apt-get install zlib1g-dev" >&5
3716   echo "                     or .rpm users: yum install zlib-devel." >&5
3717   echo "                     It may still be possible to configure without zlib." >&5
3720 if test x"$FREETYPE2_LIBS" != x; then
3721   if test x"$FREETYPE2_CFLAGS" != x; then
3722     echo "        FreeType flags are: $FREETYPE2_CFLAGS"
3723   else
3724     echo "        FreeType flags are: default include path"
3725   fi
3726   echo "        FreeType libs are: $FREETYPE2_LIBS"
3727 else
3728   echo "        RECOMMENDED: You need to have the freetype development packages installed" >&5
3729   echo "                     to use device fonts." >&5
3730   echo "                     Install it from http://www.freetype.org" >&5
3731   echo "                     or .deb users: apt-get install libfreetype6-dev" >&5
3732   echo "                     or .rpm users: yum install freetype-devel" >&5
3733   echo "                     It may still be possible to configure without freetype." >&5
3736 if test x"$FONTCONFIG_LIBS" != x; then
3737   if test x"$FONTCONFIG_CFLAGS" != x; then
3738     echo "        Fontconfig flags are: $FONTCONFIG_CFLAGS"
3739   else
3740     echo "        Fontconfig flags are: default include path"
3741   fi
3742   echo "        Fontconfig libs are: $FONTCONFIG_LIBS"
3743 else
3744   echo "        RECOMMENDED: You need to have the fontconfig development packages installed" >&5
3745   echo "                     to use device fonts." >&5
3746   echo "                     Install it from http://www.fontconfig.org" >&5
3747   echo "                     or .deb users: apt-get install libfontconfig1-dev" >&5
3748   echo "                     or .rpm users: yum install fontconfig-devel" >&5
3749   echo "                     It may still be possible to configure without fontconfig." >&5
3752 if test x$ext_mysql = xyes; then
3753   if test x$mysql != xno; then
3754     if test x"$MYSQL_LIBS" != x; then
3755       echo "        MYSQL flags are: $MYSQL_CFLAGS"
3756       echo "        MYSQL libs are: $MYSQL_LIBS"
3757     else
3758       echo "        ERROR: No MySQL development package is installed." >&3
3759       echo "               Either reconfigure without --enable-extensions=mysql" >&3
3760       echo "               or install MySQL header files from http://www.mysql.org" >&3
3761       echo "               or .deb users: apt-get install libmysqlclient-dev" >&3
3762       echo "                 or .rpm users: yum install mysql-devel" >&4
3763     fi
3764   fi
3767 if test "$GMSGFMT" = ":"; then
3768   echo "        WARNING: You need the gettext package installed to use translations." >&4
3769   echo "                 Required for building a package or 'make distcheck'" >&4
3770   echo "                 Install it from http://www.gnu.org/software/gettext/" >&4
3771   echo "                 or .deb users: apt-get install gettext" >&4
3772   echo "                 or .rpm users: yum install gettext" >&4
3775 if test x"${build_vaapi}" = x"yes"; then
3776   if test x"${LIBVA_CFLAGS}" = xyes; then
3777       echo "        LIBVA flags are: default"
3778     else
3779       echo "        LIBVA flags are: $LIBVA_CFLAGS"
3780       echo "        LIBVA libraries are: $LIBVA_LIBS"
3781   fi
3782   if test x$use_libva_x11 = xyes; then
3783     if test x"${LIBVA_X11_CFLAGS}" = xyes; then
3784       echo "        LIBVA X11 flags are: default"
3785     else
3786       echo "        LIBVA X11 flags are: $LIBVA_X11_CFLAGS"
3787       echo "        LIBVA X11 libraries are: $LIBVA_X11_LIBS"
3788     fi
3789   fi
3790   if test x$use_libva_glx = xyes; then
3791     if test x"${LIBVA_GLX_CFLAGS}" = xyes; then
3792       echo "        LIBVA GLXflags are: default"
3793     else
3794       echo "        LIBVA GLX flags are: $LIBVA_GLX_CFLAGS"
3795     fi
3796     echo "        LIBVA GLX libraries are: $LIBVA_GLX_LIBS"
3797   fi
3800 if test x"$ac_cv_gcc_visibility" != xyes; then
3801   if test x"$npapi" = xyes; then
3802     echo "        WARNING: NPAPI (mozilla) plugin is enabled, but your compiler"
3803     echo "                 does not support symbol visibility. This may cause "
3804     echo "                 the plugin to malfunction and may result in small "
3805     echo "                 children being eaten. You have been warned!"
3806   fi
3809 if test x"${DEJAGNU}" != x""; then
3810   echo "        DEJAGNU's runtest is $DEJAGNU"
3811 else
3812   echo "        WARNING: You need the dejagnu package installed to get a summary" >&4
3813   echo "                 report after running ''make check''" >&4
3814   echo "                 Install it from http://www.gnu.org/software/dejagnu/" >&4
3815   echo "                 or .deb users: apt-get install dejagnu" >&4
3816   echo "                 or .rpm users: yum install dejagnu" >&4
3819 dnl Access Linux Platform
3820 if test x"${build_alp}" = xyes; then
3821   if test x"${ALP_CFLAGS}" != x; then
3822     echo "        ALP flags are: $ALP_CFLAGS"
3823     echo "        ALP libs are: $ALP_LIBS"
3824   else
3825     echo "        ERROR: No ALP development package is installed." >&3
3826   fi
3829 dnl Haiku
3830 if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o x"${build_media_haiku}" = x"yes"; then
3831     echo "        Haiku libs are: $HAIKU_LIBS"
3834 if test x"$python" = x"yes"; then
3835   if test x"$has_python" = x"yes"; then
3836     echo "        PYTHON flags are: $PYTHON_CFLAGS"
3837     echo "        PYTHON libs are: $PYTHON_LIBS"
3838     echo "        PYTHON executable is are: $PYTHON"
3839   else
3840     echo "        ERROR: No Python development package is installed, but it's enabled." >&3
3841   fi
3843 if test x${build_ssl} = xyes; then
3844   if test x"${has_ssl}" = xyes; then
3845     if test x"${SSL_CFLAGS}" = xyes; then
3846       echo "        SSL flags are: default"
3847     else
3848       echo "        SSL flags are: $SSL_CFLAGS"
3849     fi
3850     echo "        SSL libs are: $SSL_LIBS"
3851   else
3852     echo "        ERROR: No SSL development package is installed, but it's enabled." >&3
3853   fi
3856 if test x${build_ssh} = xyes; then
3857   if test x"${has_ssh}" = xyes; then
3858     if test x"${SSH_CFLAGS}" = xyes; then
3859       echo "        SSH flags are: default"
3860     else
3861       echo "        SSH flags are: $SSH_CFLAGS"
3862     fi
3863     echo "        SSH libs are: $SSH_LIBS"
3864   else
3865     echo "        ERROR: No SSH development package is installed, but it's enabled." >&3
3866   fi
3869 if test x"${build_all_as3}" = x"yes"; then
3870   echo "        Building the entire ActionScript class libary"
3871 else
3872   echo "        Only building these ActionScript classes into the library:"
3873   echo "     ${classlist}"
3876 if test x"$testsuite" = x"yes"; then
3877   if test x"$NETCAT" != x; then
3878     echo "        You have netcat installed, which is only used for testing"
3879   else
3880     echo "        Install netcat for networking test support"
3881   fi
3882   if test x"$WGET" != x; then
3883     echo "        You have wget installed, which is only used for testing"
3884   else
3885     echo "        Install wget for networking test support"
3886   fi
3889 if test x$cross_compiling = xyes; then
3890    if test x"${android_ndk}" != xno; then
3891       AC_MSG_NOTICE([This build is setup for cross compiling for Android])
3892    else
3893       AC_MSG_NOTICE([This build is setup for cross compiling])
3894    fi
3897 echo "--------"
3898 dnl if test x"${ghelp}" = x"yes"; then
3899 dnl   echo "        GNOME help enabled"
3900 dnl else
3901 dnl   echo "        GNOME help disabled (default). Use --enable-ghelp to enable."
3902 dnl fi
3904 dnl if test x"${extensions}" = x"yes"; then
3905 dnl   echo "        Building extensions enabled (default). Use --disable-extensions to disable."
3906 dnl else
3907 dnl   echo "        Building Gnash extensions disabled."
3908 dnl fi
3910 if test x"${cygnal}" = x"yes"; then
3911   echo "        Building Cygnal media server enabled (default). Use --disable-cygnal to disable."
3912 else
3913   echo "        Building Cygnal media server disabled."
3916 if test x"${debugger}" = x"yes"; then
3917   echo "        Building Flash debugger support (default). Use --disable-debugger to disable."
3918 else
3919   echo "        Building the Flash debugger is disabled."
3922 if test x"${with-top_level}" != x; then
3923   echo "        Top level for cross compiling support files is: $with_top_level"
3926 if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
3927   echo "        WARNING: Pixel format RGB565 selected in combination with the" >&4
3928   echo "                 GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)." >&4
3931 if test x"${extensions_list}" != x; then
3932   echo "        Building extensions: ${extensions_list}"
3935 if test x"${security_list}" != x; then
3936   echo "        Enabling security features: ${security_list}"
3939 if test x"${hwaccel_list}" != xnone; then
3940   echo "        Enabling hardware acceleration features: ${hwaccel_list}"
3943 if test x"${statistics_list}" != x; then
3944   echo "        Enabling statistics collecting for: ${statistics_list}"
3947 if test x"${SUPPORTED_GUIS}" = x; then
3948   AC_MSG_ERROR(no supported GUIs found);
3951 echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
3952 echo "        Renderers supported: ${renderer_list}"
3953 echo "        Hardware Acceleration: ${hwaccel_list}"
3954 echo "        Media handlers: ${media_list}"
3955 echo "        Using ${add_sound} for sound handling"
3956 echo "        Using $with_shm mode for shared memory"
3958 if test x"$docbook" = x"yes"; then
3959   echo '        DocBook document processing enabled (for "make html" and "make pdf")'
3960   if test x"$docbook_styles" != x; then
3961     echo "        Docbook styles sheets in $docbook_styles"
3962   fi
3963 else
3964   echo "        DocBook document processing disabled (default)"
3967 dnl The Framebuffer GUI has several other settings. As it doesn't have X11,
3968 dnl we have to handle input devices ourselves.
3969 if test x"${build_fb}" = xyes; then
3970 echo "        Using ${input_events} for Input"
3971   if test x"${fakefb}" != x; then
3972     echo "        Using shared memory as a fake framebuffer"
3973   fi
3974   if test x"${offscreen}" = xyes; then
3975     echo "        Using offscreen rendering"
3976   fi
3977   if test x"${doublebuf}" = xyes; then
3978     echo "        Using double buffering when rendering"
3979   fi
3982 if test -s $cwarn; then
3983   echo ""
3984   cat $cwarn
3985   rm $cwarn
3986   echo ""
3987   echo "Gnash should still compile even with these warnings."
3988   echo "If it doesn't, report the warnings as a bug."
3991 if test -s $crec; then
3992   echo ""
3993   cat $crec
3994   rm $crec
3995   echo ""
3996   echo "Gnash should still compile, but you'll miss important support"
3999 dnl If anything critical is missing, don't bother to continue
4000 if test -s $cerr; then
4001   echo ""
4002   cat $cerr >&2
4003   rm $cerr
4004   AC_MSG_ERROR([Please install required packages])
4007 if test x"$fork" = x"no"; then
4008   AC_MSG_ERROR([Currently only forking the standalone player works!])
4010 echo ""
4012 # Local Variables:
4013 # c-basic-offset: 2
4014 # tab-width: 2
4015 # indent-tabs-mode: nil
4016 # End: