update for final
[gnash.git] / configure.ac
blobc550b308cc148ba812740f0a040ae1f9ca518131
1 dnl  
2 dnl  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.59c)
19 AC_INIT(gnash, 0.8.9)
20 AC_CONFIG_SRCDIR([libcore/as_object.h])
21 AC_CONFIG_HEADERS([gnashconfig.h])
22 AC_CONFIG_MACRO_DIR([macros])
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* | *-kfreebsd*)
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* | *-kfreebsd*)
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)
197 AM_CONDITIONAL(AMIGAOS4, test x$amigaos4 = xyes)
199 dnl Get build date for helping us debugging
200 BUILDDATE="`date +%Y%m%d`"
201 AC_SUBST(BUILDDATE)
203 dnl These are required by automake
204 AM_INIT_AUTOMAKE([tar-ustar])
205 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
206 AM_MAINTAINER_MODE
207 AC_PROG_MAKE_SET
209 AM_GNU_GETTEXT([external])
210 AM_CONDITIONAL(HAS_GETTEXT, test x$ac_cv_path_XGETTEXT != x)
212 dnl Many of the Gnash macros depend on gettext macros defining shlibext; recent
213 dnl gettext however does not.
214 if test x"${shlibext}" = x; then
215   if test x"${acl_cv_shlibext}" = x; then
216     echo "Gettext macros were supposed to define shared library extensions"
217     exit 1;
218   else
219     shlibext="${acl_cv_shlibext}"
220   fi
223 dnl This is primarily used when compiling for a similar architecture,
224 dnl like pentium->geode, which can use the same compiler, but have
225 dnl different development libraries.
227 AC_ARG_WITH(sysroot,
228   AC_HELP_STRING([--with-sysroot],
229   [system root directory for cross compiling]),
230   with_top_level=${withval} ;
231   cross_compiling=yes)
233 dnl Android is a little different when using a standard cross toolchain,
234 dnl so we have to configure especially for it for now. Usually it's
235 dnl something like this:
237 dnl arm-linux-eabi-gcc -Wl,--dynamic-linker -Wl,/system/bin/linker
238 dnl -nostdlib -Wl,-rpath -Wl,/system/lib -Wl,-rpath
239 dnl -Wl,/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
240 dnl -L/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
241 dnl -lc -o hello
242 dnl  /opt/android-ndk-r3/build/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o
243 dnl Recent versions of G++ (I'm using 4.5 from source
244 android_ndk=no
245 AC_ARG_WITH([android],
246   AC_HELP_STRING([--with-android], [directory where android NDK is installed]),
247         android_ndk=${withval}
248         if test x"${withval}" != x; then
249           android_ndk=${withval}
250         else
251           android_ndk=/opt/android-ndk-r3/build/platforms/android-5/arch-arm
252         fi
254 CROSS_CXXFLAGS=
255 if test x"${android_ndk}" != xno; then
256   CROSS_CXXFLAGS=-mandroid -fexceptions
257   if test x"${with_top_level}" = x; then
258     with_top_level=/usr/local/android-arm/sysroot/usr
259     cross_compiling=yes
260   fi
261   ANDROID_NDK=${android_ndk}
262   AC_DEFINE(ANDROID, [1], [This is an Android build])
263 else
264   ANDROID_NDK=
266 AC_SUBST(ANDROID_NDK)
267 AM_CONDITIONAL(ANDROID, [ test x"${android_ndk}" != xno ])
269 AC_ARG_WITH(cpu,
270   AC_HELP_STRING([--with-cpu],[specify a cpu when cross compiling.]),
271   [case "${withval}" in
272     geode) with_cpu=geode ;;
273     *)   AC_MSG_ERROR([bad value ${enableval} for --with-cpu option]) ;;
274    esac],with_cpu=none)
276 if test x"$with_cpu" != x"none"; then
277    cross_compiling=yes
280 AC_C_BIGENDIAN
281 AC_C_CONST
282 AC_C_INLINE
284 AM_CONDITIONAL(ENABLE_SHARED, [test x"${enable_shared}" = xyes])
285 AM_CONDITIONAL(ENABLE_STATIC, [test x"${enable_shared}" = xno])
287 AC_PATH_PROG(DEJAGNU, runtest)
289 dnl These options are for Cygnal, which collects optional statistics
290 dnl on all the network traffic By default, we turn on statistics
291 dnl collecting for the incoming and outgoing queues, since those are
292 dnl required to be compatiable with FMS 3, and the ActionScript server
293 dnl management API. buffers are the lowest level data storage, this
294 dnl data is the time spent in the queue, and is primarily only used
295 dnl for tuning the queueing API in Gnash. Memoryis the same, it's only
296 dnl used by developers for tuning performance of memory allocations in
297 dnl Gnash.
298 buffers=no
299 que=no
300 memory=no
301 cache=yes
302 stat_proplookup=no
303 AC_ARG_WITH(statistics,
304   AC_HELP_STRING([--with-statistics=], [Specify which statistics features to enable]),
305   if test -n ${withval}; then
306     if test "x${withval}" != "xno"; then
307       extlist="${withval}"
308       withval=`echo ${withval} | tr '\054' ' ' `
309     else
310       extlist=""
311       withval=""
312     fi
313   fi
314   statistics_list=""
315   nstatistics=0
316   while test -n "${withval}" ; do
317     val=`echo ${withval} | cut -d ' ' -f 1`
318     [case "${val}" in
319       buffers)
320         buffers=yes
321         nstatistics=$((nstatistics+1))
322         ;;
323       que)
324         que=yes
325         nstatistics=$((nstatistics+1))
326         ;;
327       memory)
328         memory=yes
329         nstatistics=$((nstatistics+1))
330         ;;
331       cache)
332         cache=yes
333         nstatistics=$((nstatistics+1))
334         ;;
335       proplookup)
336         stat_proplookup=yes
337         nstatistics=$((nstatistics+1))
338         ;;
339       all|ALL)
340         buffers=yes
341         memory=yes
342         queu=yes
343         cache=yes
344         stat_proplookup=yes
345         nstatistics=5           dnl this must be incremented if you add anything
346         ;;
347       *) AC_MSG_ERROR([invalid statistics feature specified: ${withval} given (accept: buffers|que|memory|cache|proplookup|all)])
348         ;;
349       esac]
350     withval=`echo ${withval} | cut -d ' ' -f 2-6`
351     if test "x$val" = "x$withval"; then
352       break;
353     fi
354   done
356 if test x${buffers} = xyes; then
357   statistics_list="${statistics_list} buffers"
358   AC_DEFINE(USE_STATS_BUFFERS, [1], [Support statistics collecting for the queue buffers])
359   AC_MSG_WARN([This option will effect your performance])
362 if test x${memory} = xyes; then
363   statistics_list="${statistics_list} memory"
364   AC_DEFINE(USE_STATS_MEMORY, [1], [Support statistics collecting for all memory profiling])
365   AC_MSG_WARN([This option will effect your performance])
368 if test x${que} = xyes; then
369   statistics_list="${statistics_list} queues"
370   AC_DEFINE(USE_STATS_QUEUE, [1], [Support statistics collecting for the queues])
373 if test x${cache} = xyes; then
374   statistics_list="${statistics_list} cache"
375   AC_DEFINE(USE_STATS_CACHE, [1], [Support statistics collecting for the cache])
378 if test x${stat_proplookup} = xyes; then
379   statistics_list="${statistics_list} proplookup"
380   AC_DEFINE(GNASH_STATS_OBJECT_URI_NOCASE, [1], [Collecting and report stats about ObjectURI case lookups])
381   AC_DEFINE(GNASH_STATS_PROPERTY_LOOKUPS, [1], [Collecting and report stats about property lookups])
382   AC_DEFINE(GNASH_STATS_STRING_TABLE_NOCASE, [1], [Collecting and report stats about string_table::key case lookups])
385 dnl this is just so Makefile can print the same list
386 STATISTICS_LIST="$statistics_list"
387 AC_SUBST(STATISTICS_LIST)
390 # These settings are compile time options for the security
391 # setting for anything that lets gnash exchange data with
392 # other applications. Currently this only supports Shared
393 # Objects and Local Connections. Shared Objects are like
394 # your web browsers cookies, and Local Connections use
395 # shared memory to execute methods remotely, and to
396 # exchange data.
398 # The default is to enable everything, and these can
399 # also be controlled dynamically by the $HOME/.gnashrc
400 # file.
402 solreadonly=no
403 localconnection=yes
404 lctrace=yes
406 AC_ARG_WITH(security,
407   AC_HELP_STRING([--with-security=], [Specify which security features to enable]),
408   if test -n ${withval}; then
409     if test "x${withval}" != "xno"; then
410       extlist="${withval}"
411       withval=`echo ${withval} | tr '\054' ' ' `
412     else
413       extlist=""
414       withval=""
415     fi
416   fi
417   security_list=""
418   nsecurity=0
419   while test -n "${withval}" ; do
420     val=`echo ${withval} | cut -d ' ' -f 1`
421     [case "${val}" in
422       solreadonly)
423         solreadonly=yes
424         nsecurity=$((nsecurity+1))
425         ;;
426       lc)
427         localconnection=yes
428         nsecurity=$((nsecurity+1))
429         ;;
430       lctrace)
431         lctrace=yes
432         nsecurity=$((nsecurity+1))
433         ;;
434       all|ALL)
435         solreadonly=yes
436         lc=yes
437         lctrace=yes
438         nsecurity=3
439         ;;
440       *) AC_MSG_ERROR([invalid security feature specified: ${withval} given (accept: solreadonly|lc|lctrace)])
441         ;;
442       esac]
443     withval=`echo ${withval} | cut -d ' ' -f 2-6`
444     if test "x$val" = "x$withval"; then
445       break;
446     fi
447   done
449 if test xlctrace = xyes; then
450   security_list="${security_list} lctrace"
451   AC_DEFINE(USE_LC_TRACE, [1],
452            [Support LocalConnection])
453   AC_MSG_NOTICE([This build supports LocalConnection tracing])
454   AC_MSG_WARN([This option will effect your performance])
457 if test x$localconnection = xyes; then
458   security_list="${security_list} localconnection"
459   AC_DEFINE(USE_LC, [1],
460                  [Support LocalConnection])
461   AC_MSG_NOTICE([This build supports LocalConnection])
463 if test x$solreadonly = xyes; then
464   security_list="${security_list} solreadonly"
465   AC_DEFINE(USE_SOL_READONLY, [1],
466                  [Shared Objects are read-only])
467   AC_MSG_NOTICE([Shared Objects are read-only])
469 SECURITY_LIST="$security_list"
470 AC_SUBST(SECURITY_LIST)
472 dnl For Haiku, we know the sysroot is in a non-standard place
473 dnl it is important that -lagg comes before -lbe
474 if test x"${haiku}" = xyes; then
475   HAIKU_LIBS=-lbe
476   AC_SUBST(HAIKU_LIBS)
479 dnl Darwin uses libtool instead of ar to produce libraries. We determine which one
480 dnl we have here now. For some reason on Darwin, we don't get the
481 dnl count from grep via stdin correctly. Writing a temp file does the
482 dnl trick, so although it's ugly, that's what we gotta do...
483 AC_MSG_CHECKING([which type of library archiver we have])
484 rm -f .tmp
485 libtool > .tmp 2>&1
486 archiver=`grep -c dynamic .tmp 2>&1`
487 rm -f .tmp
488 dnl is there any good way to report what we found here?
489 AC_MSG_RESULT()
490 if test x"${archiver}" != x && test "${archiver}" -eq 1; then
491    export MACOSX_DEPLOYMENT_TARGET="10.3"
492    darwin=yes
493 else
494    darwin=no
497 dnl When cross compiling, limit the search directories cause otherwise
498 dnl we may get the host headers or libraries by accident. These values
499 dnl are exported, so all the other configure tests in macros/*.m4 use
500 dnl these same settings rather than duplicating them like we used to.
501 dnl To override thise, use the --with-*-incl= and --with-*-libs=
502 dnl options to configure.
503 if test x$cross_compiling = xyes; then
504   AC_MSG_NOTICE([Configuring Gnash for cross compilation])
505   export pkgroot="`$CXX -print-search-dirs | grep "install:" | sed -e 's/install: //' -e 's:/lib/gcc/.*::'`"
506   dnl pkgroot only works correctly with builds of cross tools not in
507   dnl /usr, ie... installed from the distribution packages, or just
508   dnl plain installed in the system tools. This contaminates configure
509   dnl when building for variations of the same basic architecture,
510   dnl like i686-linux -> i586-mingw32.
511   if test x${pkgroot} = "/usr"; then
512     export pkgroot=""
513   fi
514   export incllist="`eval echo ${with_top_level}/include ${pkgroot}/${host_alias}/include ${pkgroot}/include`"
515   export libslist="`eval echo ${with_top_level}/lib ${pkgroot}/${host_alias}/lib ${pkgroot}/lib64 ${pkgroot}/lib32 ${pkgroot}/lib`"
516   export pathlist="`eval echo ${pkgroot}/${host_alias}/bin:${pkgroot}/bin`"
517   npapi=no
518 else
519   AC_MSG_NOTICE([Configuring Gnash for native compilation])
520   export incllist="`eval cat ${srcdir}/macros/incllist`"
521   export libslist="`eval cat ${srcdir}/macros/libslist`"
522   export pathlist=$PATH
525 if test x"${android_ndk}" != xno; then
526    incllist="${android_ndk}/include ${incllist}"
529 AM_CONDITIONAL(CROSS_COMPILING, [ test x$cross_compiling = xyes ])
531 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
532 dnl !! 
533 dnl !! IMPORTANT NOTICE 
534 dnl !!
535 dnl !!  Any call to GNASH_PATH_XXX must be be given *after* this snippet.
536 dnl !!  This is to ensure that PKG_CONFIG, cross_compiling and incllist are
537 dnl !!  properly set at the time of call.
538 dnl !!
539 dnl !!  Also GNASH_PKG_FIND has to be called later. Not sure
540 dnl !!  why but calling before breaks detection of CPP (see
541 dnl !!  gnash-dev mailing archives for June 12 2009
542 dnl !!  http://lists.gnu.org/archive/html/gnash-dev/2009-06/index.html
543 dnl !! 
544 dnl !! 
545 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
547 dnl Check for PKG_CONFIG before any GNASH_PATH call
548 PKG_PROG_PKG_CONFIG
550 dnl --------------------------------------------------------
551 dnl  GUI selection
552 dnl --------------------------------------------------------
554 build_haiku=no
555 build_aos4=no      dnl AmigaOS4 GUI
556 build_kde3=no      dnl WARNING: doesn't work (see https://savannah.gnu.org/bugs/index.php?31782)
557 build_kde4=no
558 build_qtopia3=no
559 build_qtopia4=no
560 build_gtk=no
561 build_fb=no                     dnl Raw framebuffer
562 build_fltk=no
563 build_sdl=no
564 build_riscos=no                 dnl Native OS2 GUI
565 build_aqua=no                   dnl Native MacOSX
566 build_hildon=no                 dnl Native LIMO
567 build_alp=no                    dnl Acess Linux Platform using Hiker
568 build_dump=no
569 AC_ARG_ENABLE(gui,
570   AC_HELP_STRING([--enable-gui=], [Enable support for the specified GUI toolkits (default=gtk,kde4)]),
571   [if test -n ${enableval}; then
572     enableval=`echo ${enableval} | tr '\054' ' ' `
573   fi
574   while test -n "${enableval}" ; do
575     val=`echo ${enableval} | cut -d ' ' -f 1`
576     case "${val}" in
577       gtk|GTK|gtk2|GTK2)
578         build_gtk=yes
579         ;;
580       kde3|KDE3)
581         build_kde3=yes
582         ;;
583       kde4|KDE4)
584         build_kde4=yes
585         ;;
586       qtopia3|QTOPIA3)
587         build_qtopia3=yes
588         ;;
589       qtopia4|QTOPIA4)
590         build_qtopia4=yes
591         ;;
592       sdl|SDL)
593         build_sdl=yes
594         ;;
595       aqua|AQUA|Aqua)
596         build_aqua=yes
597         ;;
598       riscos|RISCOS|RiscOS)
599         build_riscos=yes
600         ;;
601       fltk|FLTK|fltk2|FLTK2)
602         build_fltk=yes
603         ;;
604       fb|FB)
605         build_fb=yes
606         ;;
607       aos4|AOS4)
608         build_aos4=yes
609         ;;
610       haiku|HAIKU)
611         build_haiku=yes
612         ;;
613       dump|DUMP)
614         build_dump=yes
615         ;;
616       all|ALL)
617         build_dump=yes
618         dnl BSD doesn't have a framebuffer interface
619         if test x${linux} = xyes; then
620           build_fb=yes
621         fi
622         if test x${openbsd} != xyes; then
623           build_kde4=yes
624         fi
625         build_sdl=yes
626         build_gtk=yes
627         ;;
628       *) AC_MSG_ERROR([invalid gui ${enableval} given (accept: gtk|kde3|kde4|fltk|sdl|riscos|aqua|fb|qtopia3|qtopia4|dump|aos4|haiku)])
629          ;;
630       esac
631     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
632     if test "x$val" = "x$enableval"; then
633       break;
634     fi
635   done],
636   [ dnl Run the following code if no --enable-gui is given
637   build_fb=auto
638   build_sdl=auto
639   if test x"${openbsd_os}" = x"openbsd"; then
640     build_gtk=yes
641     build_dump=auto
642   else if test x"${haiku}" = xyes; then
643     build_haiku=yes;
644   else
645     build_kde4=auto
646     build_gtk=yes
647     build_dump=auto
648   fi
649   fi
650   ]
653 if test x"${build_haiku}" = xyes; then
654   if test x"$haiku" != xyes; then
655     echo "        ERROR: Can not build Haiku gui outside of Haiku
656 operating system." >&3
657   fi
660 dnl We can use Xephyr or fbe to create a fake framebuffer instead of real
661 dnl video memory. This lets us test on a desktop machine.
662 AC_ARG_WITH(fakefb,
663 AC_HELP_STRING([--with-fakefb],
664  [specify a file to be mapped instead of a real framebuffer]),
665  with_fakefb=${withval})
667 fakefb=
668 if test x"${with_fakefb}" = xyes; then
669   dnl This is the default file name fbe uses.
670   fakefb=/tmp/fbe_buffer
671 else
672   if test x"${with_fakefb}" != x; then
673     fakefb=${with_fakefb}
674   fi
676 FAKEFB=${fakefb}
677 AC_SUBST(FAKEFB)
679 if test x"${fakefb}" != x; then
680     AC_DEFINE(ENABLE_FAKE_FRAMEBUFFER, [1], [Enable using a file instead of a real framebuffer])
684 dnl --------------------------------------------------------
685 dnl  Sound handler selection
686 dnl --------------------------------------------------------
687 add_sound=
688 build_sound_none=no
689 build_sound_sdl=no
690 build_sound_ahi=no
691 build_sound_mkit=no
692 AC_ARG_ENABLE(sound,
693   AC_HELP_STRING([--enable-sound=[[sdl|ahi|mkit]]], [Use the specified sound handler (default=sdl)]),
694      [case "${enableval}" in
695       sdl|SDL|Sdl)
696         build_sound_sdl=yes
697         add_sound="sdl"
698         ;;
699       none|NONE|None)
700         build_sound_none=yes
701         add_sound="none"
702         ;;
703       ahi|AHI|Ahi)
704         build_sound_ahi=yes
705         add_sound="ahi"
706         ;;
707       mkit|MKIT|Mkit)
708         build_sound_mkit=yes
709         add_sound="mkit"
710         ;;
711      esac],
712   [if test x"${haiku}" = xyes; then
713      build_sound_mkit=yes
714      add_sound="mkit"
715    else
716      if test x${build_sound_none} = xno; then
717        build_sound_sdl=yes
718        add_sound=sdl
719      fi
720    fi]
723 dnl --------------------------------------------------------
724 dnl  Media handler selection
725 dnl --------------------------------------------------------
726 build_media_gst=no
727 build_media_ffmpeg=auto
728 build_media_none=no
729 AC_ARG_ENABLE(media,
730   AC_HELP_STRING([--enable-media=handler],
731     [Enable media handling support using the specified handler: gst, ffmpeg or none (no sound) [[gst]] ]),
732   
733     if test -n ${enableval}; then
734       enableval=`echo ${enableval} | tr '\054' ' ' `
735     fi
736     dnl When --enable-media is given, all media defaults to off
737     dnl except the explicitly enabled ones
738     build_media_ffmpeg=no
739     build_media_gst=no
740     while test -n "${enableval}"; do
741       val=`echo ${enableval} | cut -d ' ' -f 1`
742       [case "${val}" in
743         GST|gst)
744           build_media_gst=yes
745           media_list="${media_list}gst "
746           ;;
747         FFMPEG|ffmpeg)
748           build_media_ffmpeg=yes
749           media_list="${media_list}ffmpeg "
750           ;;
751         no|NO|none)
752           build_media_none=yes
753           media_list="none"
754           ;;
755         *)
756           AC_MSG_ERROR([bad value ${enableval} for --enable-media option])
757           ;;
758      
759       esac]
760       enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
761       if test "x$val" = "x$enableval"; then
762         break;
763       fi
764     done,
765     [if test x"${build_haiku}" = xyes; then
766         build_media_ffmpeg=yes
767         build_media_haiku=yes
768         media_list="ffmpeg haiku"
769      else
770         build_media_gst=yes
771         media_list="gst"
772     fi]
775 dnl If no render is selected, and media handling isn't disabled, them enable gst
776 if test x${build_media_none} = xno -a x${build_media_gst} = xno -a x${build_media_ffmpeg} = xno; then
777   build_media_gst=yes
780 if test x"$build_media_ffmpeg" != x"no"; then # yes or auto
781   GNASH_PATH_FFMPEG
782   if test x"${build_media_ffmpeg}" = xauto; then
783     dnl TODO: have GNASH_PATH_FFMPEG set ${has_ffmpeg}
784     if test x"$FFMPEG_LIBS" != x; then
785       build_media_ffmpeg=yes
786       media_list="${media_list} ffmpeg"
787     else
788       build_ogl=no
789     fi
790   fi
793 MEDIA_CONFIG="${media_list}"
794 AC_SUBST(MEDIA_CONFIG)
796 dnl -----------------------------------------------------
797 dnl Check for SDL and decide about auto gui accordingly.
798 dnl Need be done after build_sound_sdl and build_sdl are
799 dnl initialized and before they are checked for yes/no
800 dnl -----------------------------------------------------
802 if test x$build_sdl != xno -o x$build_sound_sdl = xyes; then
803   GNASH_PATH_SDL
806 if test x"${build_sdl}" = xauto; then
807   if test xyes = x"${has_sdl}"; then
808     build_sdl=yes
809   else
810     AC_MSG_NOTICE([sdl GUI will not be built (no sdl development files found)])
811     build_sdl=no
812   fi
816 dnl -------------------------------
817 dnl Renderer Selection
818 dnl -------------------------------
819 input_events=
820 dnl By default, we want to to build all renderers
821 build_ovg=no
822 build_gles=no
823 build_ogl=auto
824 build_agg=yes
825 build_cairo=yes
826 renderer_list="AGG Cairo"
827 nrender=3
828 AC_ARG_ENABLE(renderer,
829   AC_HELP_STRING([--enable-renderer=], [Enable support for the specified renderers (ogl|gles|cairo|agg|all, default=all)]),
830   if test -n ${enableval}; then
831     if test "x${enableval}" != "xno" -o "x${enableval}" != "xnone" ; then
832       renderer_list="none"
833       enableval=`echo ${enableval} | tr '\054' ' ' `
834     else
835       renderer_list=""
836       enableval=""
837     fi
838   fi
839   renderer_list=""
840   nrender=0
841   build_ovg=no
842   build_ogl=no
843   build_gles=no
844   build_agg=no
845   build_cairo=no
846   while test -n "${enableval}" ; do
847     val=`echo ${enableval} | cut -d ' ' -f 1`
848     [case "${val}" in
849       no*|NO*)
850         renderer_list="none"
851         build_ovg=no
852         build_ogl=no
853         build_gles=no
854         build_agg=no
855         build_cairo=no
856         nrender=1
857         ;;
858       all|ALL)
859         renderer_list="OpenGL, Cairo, AGG"
860         build_ogl=yes
861         build_agg=yes
862         build_cairo=yes
863         build_ovg=yes
864         nrender=4
865         ;;
866       ogl|OGL|OpenGL|opengl)
867         renderer_list="${renderer_list} OpenGL"
868         build_gles=no
869         build_ogl=yes
870         nrender=$((nrender+1))
871         ;;
872       gles|GLES|GL-ES|gl-es)
873         renderer_list="${renderer_list} OpenGL-ES"
874         build_gles=yes
875         build_ogl=no
876         nrender=$((nrender+1))
877         ;;
878       ovg|OVG|OpenVG|openvg)
879         renderer_list="${renderer_list} OpenVG"
880         build_ogv=yes
881         nrender=$((nrender+1))
882         ;;
883       agg|AGG)
884         renderer_list="${renderer_list} AGG"
885         build_agg=yes
886         nrender=$((nrender+1))
887         ;;
888       cairo|CAIRO|Cairo*)
889         renderer_list="${renderer_list} Cairo"
890         build_cairo=yes
891         nrender=$((nrender+1))
892         ;;
893       *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept:  (ogl|cairo|agg|all)])
894         ;;
895       esac]
896     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
897     if test "x$val" = "x$enableval"; then
898       break;
899     fi
900   done
902 dnl 16 bit: RGB555, RGB565
903 dnl 24 bit: RGB24, BGR24
904 dnl 32 bit: RGBA32, BGRA32
905 pixelformat=all
906 AC_ARG_WITH(pixelformat,
907   AC_HELP_STRING([--with-pixelformat=], [Use the specified pixel format for AGG (default=all)]),
908   [if test -n ${withval}; then
909     pixelformat="${withval}"
910     withval=`echo ${withval} | tr '\054' ' ' `
911   fi
912   while test -n "${withval}" ; do
913     val=`echo ${withval} | cut -d ' ' -f 1`
914     case "${val}" in
915       all)
916         # allow special value "all" set by user (handled below)
917         ;; 
918       argb32|ARGB32)
919         AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32])
920         ;;
921       abgr32|ABGR32)
922         AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32])
923         ;;
924       bgra32|BGRA32)
925         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
926         ;;
927       bgr24|BGR24)
928         AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24])
929         ;;
930       rgba32|RGBA32)
931         AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32])
932         ;;
933       rgb24|RGB24)
934         AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24])
935         ;;
936       rgb555|RGB555)
937         AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555])
938         ;;
939       rgb565|RGB565)
940         AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565])
941         ;;
942       *) AC_MSG_ERROR([invalid pixel format ${withval} given (accept: all|RGB555|RGB565|RGB24|BGR24|BGRA32|RGBA32|ARGB32|ABGR32)])
943          ;;
944       esac
945     withval=`echo ${withval} | cut -d ' ' -f 2-6`
946     if test "x$val" = "x$withval"; then
947       break;
948     fi
949   done],
950   [if test x$build_haiku = xyes -a x$build_sdl != xyes; then
951         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
952         pixelformat=BGRA32
953    fi]
956 if test x$pixelformat = xall; then
957   if test x$build_agg = xyes; then
958     ### The fact that we're building GTK doesn't mean we're not also
959     ### building KDE or SDL, each needing its own pixel format !
960     #if test x$build_gtk = xyes; then
961     #  AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24 pixel format])
962     #  pixelformat="RGB24"
963     #else
964       AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555 pixel format])
965       AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565 pixel format])
966       AC_DEFINE(PIXELFORMAT_RGB24,  [1], [RGB24 pixel format])
967       AC_DEFINE(PIXELFORMAT_BGR24,  [1], [BGR24 pixel format])
968       AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32 pixel format])
969       AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32 pixel format])
970       AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32 pixel format])
971       AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32 pixel format])
972     #fi
973   fi
976 if test x"${build_ogl}" != xno; then # yes or auto
977   GNASH_PATH_OPENGL
978   if test x"${build_ogl}" = xauto; then
979     if test xyes = x"${has_opengl}"; then
980       build_ogl=yes
981       renderer_list="${renderer_list} OpenGL"
982     else
983       build_ogl=no
984     fi
985   fi
988 AM_CONDITIONAL(BUILD_OVG_RENDERER, [ test x$build_ovg = xyes ])
989 AM_CONDITIONAL(BUILD_GLES_RENDERER, [ test x$build_gles = xyes ])
990 AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x$build_ogl = xyes])
991 AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x$build_agg = xyes ])
992 AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x$build_cairo = xyes ])
994 if test x"${build_ogl}" = xyes; then
995    AC_DEFINE([RENDERER_OPENGL], [], [Use OpenGL renderer])
998 if test x"$build_agg" = xyes; then
999   AC_DEFINE([RENDERER_AGG], [], [Use AntiGrain renderer])
1002 if test x"$build_cairo" = xyes; then
1003   GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1004   AC_DEFINE([RENDERER_CAIRO], [], [Use cairo renderer])
1007 if test x"${build_agg}" = xyes; then
1008    GNASH_PATH_AGG
1011 dnl VA API is used by default for all H.264 videos. HW requirements:
1012 dnl     * AMD GPUs with UVD2 and xvba-video VA driver
1013 dnl     * NVIDIA GPUs with vdpau-video VA driver
1014 dnl     * All HW with a VA driver supporting the VA/GLX extensions or
1015 dnl     vaPutSurface(Pixmap,...). This may include the Intel
1016 dnl     Moorestown platform and future G45 VA driver.
1017 dnl NOTE: it is possible to use Gnash/VAAPI on platforms with an Intel
1018 dnl GMA500 but you currently will have to build the AGG renderer
1019 dnl instead of the OGL (OpenGL) one. 
1021 build_vaapi=yes
1022 hwaccel_list="VAAPI"
1023 nhwaccel=1
1024 AC_ARG_ENABLE(hwaccel,
1025   AC_HELP_STRING([--enable-hwaccel], [Specify which accleration to support to enable (none,vaapi,omap)]),
1026   if test -z ${enableval}; then
1027       hwaccel_list="none"
1028       nhwaccel=0
1029       enableval=""
1030   fi
1031   while test -n "${enableval}" ; do
1032     val=`echo ${enableval} | cut -d ' ' -f 1`
1033     [case "${val}" in
1034       no*|NO*)
1035         hwaccel_list="none"
1036         build_vaapi=no
1037         build_omap=no
1038         nhwaccel=0
1039         ;;
1040       va*|VA*)
1041         hwaccel_list="${hwaccel_list} vaapi"
1042         build_vaapi=yes
1043         nhwaccel=$((nhwaccel+1))
1044         ;;
1045       all|ALL)
1046         hwaccel_list="VAAPI OMAP"
1047         nhwaccel=2
1048         build_omap=yes
1049         build_vaapi=yes
1050         ;;
1051       omap*|OMAP*)
1052         hwaccel_list="${hwaccel_list} omap"
1053         build_omap=yes
1054         nhwaccel=$((nhwaccel+1))
1055         ;;
1056       *) AC_MSG_ERROR([invalid hwaccel feature specified: ${enableval} given (accept: none,vaapi,omap)])
1057         ;;
1058       esac]
1059     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1060     if test "x$val" = "x$enableval"; then
1061       break;
1062     fi
1063   done
1066 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi}" = x"yes"; then
1067   use_libva=no
1068   use_libva_x11=no
1069   use_libva_glx=no
1070   dnl if the version of FFmpeg is recent enough, (r20957, 52.45.0), then
1071   dnl look for VAAPI support so we can use use the VAAPI enabled FFmpeg.
1072   if test x"${have_ffmpeg_vaapi}" = xyes; then
1073     use_libva=yes
1074     GNASH_PKG_FIND([libva],
1075       [va/va.h],
1076       [Video Acceleration API],
1077       vaInitialize
1078     )
1080     use_libva_x11=yes
1081     GNASH_PKG_FIND([libva_x11],
1082       [va/va_x11.h],
1083       [VA API (X11 display)],
1084       vaGetDisplay,
1085       [], [-lva-x11]
1086     )
1088     if test x$build_ogl = xyes; then
1089       use_libva_glx=yes
1090       GNASH_PKG_FIND([libva_glx],
1091         [va/va_glx.h],
1092         [VA API (GLX display)],
1093         vaGetDisplayGLX,
1094         [], [-lva-glx]
1095       )
1096     fi
1097   fi
1100 dnl libVA drivers. We declare conditional for both the option being
1101 dnl selected, as well as whether or not it's found. This we can
1102 dnl generate better error handling if it's not found.
1103 AM_CONDITIONAL(BUILD_OMAP, test x"${build_omap}" = xyes)
1104 AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
1106 dnl Only build the vaapi support if we have a version of FFmpeg that
1107 dnl supports it.
1108 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${found_libva_incl}" = xyes; then
1109   build_vaapi=yes
1110   hwaccel_list="VAAPI"
1111   nhwaccel=1
1112 else
1113   build_vaapi=no
1114   hwaccel_list=""
1115   nhwaccel=0
1118 dnl Until the hwaccel patches in FFmpeg wind up in the ffmpeg-plugin,
1119 dnl restrict using HW Accel to using FFmpeg directly.
1120 dnl test xyes = xyes -a ( x != xyes -o x != xyes )
1121 if test x"${build_vaapi}" = x"yes" -a x"${have_ffmpeg}" != x"yes"; then
1122   AC_MSG_ERROR(["Hardware acceleration currently not supported unless using FFmpeg."])
1125 AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes)
1126 AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes)
1127 AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes)
1130 AC_PATH_PROG(PERL, perl)
1131 AM_CONDITIONAL(HAVE_PERL, test x"$PERL" != x)
1133 AC_PATH_PROG(CSOUND, csound)
1134 AM_CONDITIONAL(HAVE_CSOUND, test x"$CSOUND" != x)
1136 AC_PATH_PROG(GIT, git)
1137 AC_SUBST(GIT)
1139 dnl -------------------------------------
1140 dnl LIRC
1141 dnl -------------------------------------
1142 AC_ARG_ENABLE(lirc, AC_HELP_STRING([--enable-lirc], [Disable support for Lirc]),
1143 [case "${enableval}" in
1144   yes) lirc=yes ;;
1145   no)  lirc=no ;;
1146   *)   AC_MSG_ERROR([bad value ${enableval} for enable-lirc option]) ;;
1147 esac], lirc=no)
1149 if test x"$lirc" = x"yes"; then
1150   AC_DEFINE([USE_LIRC], [], [LIRC daemon support])
1152 AM_CONDITIONAL(USE_LIRC, test x$lirc = xyes)
1154 dnl --------------------------------------------------------
1155 dnl Extension selection
1156 dnl --------------------------------------------------------
1157 ext_dejagnu=no
1158 ext_mysql=no
1159 ext_fileio=no
1160 ext_gtk=no
1161 ext_lirc=no
1162 ext_dbus=no
1163 ext_all=no
1164 extensions_list=
1165 nextensions=0
1166 AC_ARG_ENABLE(extensions,
1167   AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build]),
1168   if test -n ${enableval}; then
1169     if test "x${enableval}" != "xno"; then
1170       extlist="${enableval}"
1171       enableval=`echo ${enableval} | tr '\054' ' ' `
1172     else
1173       extlist=""
1174       enableval=""
1175     fi
1176   fi
1177   nextensions=0
1178   while test -n "${enableval}" ; do
1179     val=`echo ${enableval} | cut -d ' ' -f 1`
1180     extensions_list="${extensions_list} ${val}"
1181     [case "${val}" in
1182       dejagnu|DEJAGNU|dj|DJ)
1183         AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension])
1184         AC_MSG_NOTICE([Adding DejaGnu extension])
1185         ext_dejagnu=yes
1186         nextensions=$((nextensions+1))
1187         ;;
1188       mysql|MYSQL|sql|SQL)
1189         AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension])
1190         AC_MSG_NOTICE([Adding MySql extension])
1191         ext_mysql=yes
1192         nextensions=$((nextensions+1))
1193         ;;
1194       fileio|FILEIO|io|IO)
1195         AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension])
1196         AC_MSG_NOTICE([Adding FileIO extension])
1197         ext_fileio=yes
1198         nextensions=$((nextensions+1))
1199         ;;
1200       gtk|GTK|gtk2|GTK2)
1201         AC_DEFINE(USE_GTK_EXT, [1], [Build the GTK extension])
1202         ext_gtk=yes
1203         nextensions=$((nextensions+1))
1204         ;;
1205       lirc|LIRC)
1206         AC_DEFINE(USE_LIRC_EXT, [1], [Build the LIRC extension])
1207         ext_lirc=yes
1208         nextensions=$((nextensions+1))
1209         ;;
1210       dbus|DBUS)
1211         AC_DEFINE(USE_DBUS_EXT, [1], [Build the DBUS extension])
1212         ext_dbus=yes
1213         nextensions=$((nextensions+1))
1214         ;;
1215       all|ALL)
1216         AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions])
1217         ext_dejagnu=yes
1218         ext_mysql=yes
1219         ext_fileio=yes
1220         ext_gtk=yes
1221         ext_lirc=yes
1222         ext_dbus=yes
1223         ext_all=yes
1224         nextensions=9
1225         ;;
1226       *) AC_MSG_ERROR([invalid extension specified: ${enableval} given (accept: MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)])
1227          ;;
1228       esac]
1229     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1230     if test "x$val" = "x$enableval"; then
1231       break;
1232     fi
1233   done
1234   EXTENSIONS_LIST="$extensions_list"
1235   AC_SUBST(EXTENSIONS_LIST)
1238 if test x$ext_dbus = xyes; then
1239   GNASH_PATH_DBUS
1242 if test x$ext_mysql = xyes; then
1243   GNASH_PATH_MYSQL
1246 AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ])
1247 AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ])
1248 AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ])
1249 AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
1250 AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
1251 AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
1252 AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
1254 dnl --------------------------------------------------------
1255 dnl Libtool
1256 dnl --------------------------------------------------------
1258 AC_LIBTOOL_DLOPEN
1259 AC_LIBTOOL_WIN32_DLL
1260 AC_DISABLE_STATIC
1261 AC_PROG_LIBTOOL
1262 AC_SUBST(LIBTOOL_DEPS)
1263 DLOPEN="-dlopen"
1264 DLPREOPEN="-dlpreopen"
1265 AC_SUBST(DLOPEN)
1266 AC_SUBST(DLPREOPEN)
1268 GNASH_PKG_FIND([ltdl], [ltdl.h], [libltdl library], [lt_dlinit])
1270 if test x"$has_ltdl" = x"yes";then
1271   AC_DEFINE(HAVE_LTDL, [1], [Libtool 2.x defines this, but libtool 1.5 does not])
1274 dnl --------------------------------------------------------
1275 dnl SOL dir
1276 dnl --------------------------------------------------------
1277 soldir=/tmp
1278 AC_ARG_WITH(soldir,
1279  AC_HELP_STRING([--with-soldir],
1280  [directory for .sol files]),
1281  with_soldir=${withval})
1282 if test x${with_soldir} != x; then
1283   soldir=${with_soldir}
1285 SOLDIR=${soldir}
1286 AC_SUBST(SOLDIR)
1288 dnl --------------------------------------------------------
1289 dnl AVM2
1290 dnl --------------------------------------------------------
1291 dnl AC_ARG_ENABLE(avm2,
1292 dnl   AC_HELP_STRING([--enable-avm2], [Enable support for AS3]),
1293 dnl   [case "${enableval}" in
1294 dnl     yes) avm2=yes ;;
1295 dnl     no)  avm2=no ;;
1296 dnl     *)   AC_MSG_ERROR([bad value ${enableval} for enable-avm2 option]) ;;
1297 dnl   esac], avm2=no
1298 dnl )
1299 dnl AM_CONDITIONAL(ENABLE_AVM2, [test x"$avm2" = xyes])
1300 dnl if test x$avm2 = xyes; then
1301 dnl     AC_DEFINE(ENABLE_AVM2, [1], [Enable AVM2 code])
1302 dnl fi
1303 AM_CONDITIONAL(ENABLE_AVM2, false)
1305 dnl This option is only used if you want Gnash to interwork with 
1306 dnl the Adobe player using the LocalConnection class.
1307 dnl lckey=0xdd3adabd
1308 AC_ARG_WITH(lckey,
1309  AC_HELP_STRING([--with-lckey],
1310  [shared memory key for your system]),
1311  with_lckey=${withval})
1313 if test x${with_lckey} != x; then
1314   lckey=${with_lckey}
1315 else
1316   lckey=0xcbc384f8
1318 LC_KEY=${lckey}
1319 AC_SUBST(LC_KEY)
1321 AC_ARG_ENABLE(python,
1322   AC_HELP_STRING([--enable-python],[Enable python for the python wrapper]),
1323 [case "${enableval}" in
1324   yes) python=yes ;;
1325   no)  python=no ;;
1326   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-python option]) ;;
1327 esac],python=no)
1329 dnl Look for python, which is optional. If enabled, a python loadable
1330 dnl module of Gnash is created.
1331 GNASH_PATH_PYTHON
1332 AM_CONDITIONAL([USE_PYTHON], test x"$python" = xyes)
1333 AM_CONDITIONAL([HAS_PYTHON], test x"$has_python" = xyes)
1335 # Maybe use jemalloc, which handles memory fragmentation for
1336 # ECAMscript languages better than the regular system malloc.
1337 # This seems like a good idea, as both the other player and
1338 # Mozilla/Firefox both recently switched to using jemalloc.
1339 AC_ARG_ENABLE(jemalloc,
1340   AC_HELP_STRING([--enable-jemalloc],[Enable jemalloc instead of system malloc]),
1341 [case "${enableval}" in
1342   yes) jemalloc=yes ;;
1343   no)  jemalloc=no ;;
1344   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-jemalloc option]) ;;
1345 esac],jemalloc=yes)
1347 dnl There is some weird stuff going on with NetBSD and jemalloc, so don't 
1348 dnl build it for now.
1349 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
1350   jemalloc=no
1352 dnl If the compiler doesn't have local thread storage enabled, don't try to
1353 dnl use jemalloc.
1354 if test x"${jemalloc}" = x"yes"; then
1355   AC_TRY_COMPILE([], [
1356     extern __thread int global_i; ],
1357     has_local_thread_storage=yes
1358   )
1359   if test x"${has_local_thread_storage}" = x"yes"; then
1360     AC_DEFINE([HAVE_LOCAL_THREAD_STORAGE], [1], [Has __thread (local thread storage) support])
1361     AC_DEFINE([USE_JEMALLOC], [], [Use jemalloc instead of system malloc])
1362   else
1363     jemalloc=no
1364   fi
1367 dnl We can search libs for mallinfo to decide whether we have it or not.
1368 dnl This is added to the linker flags when it's found. Usually it's -lc, but
1369 dnl on OpenSolaris it's -lmalloc, so this fixes the build.
1370 AC_SEARCH_LIBS([mallinfo], [c malloc],
1371                AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
1372                mallinfo=yes
1373                )
1375 AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes)
1376 AM_CONDITIONAL(JEMALLOC, test x$jemalloc = xyes)
1378 AC_ARG_ENABLE(fps-debug,
1379   AC_HELP_STRING([--enable-fps-debug],[Enable FPS debugging code]),
1380 [case "${enableval}" in
1381   yes) AC_DEFINE([GNASH_FPS_DEBUG], [1], [Enable FPS debugging code])
1382 esac])
1384 dnl When we're making binary releases, it's often nice to just statically link
1385 dnl the final executables so we don't worry about what's installed, or which
1386 dnl version it is.
1387 AC_ARG_ENABLE(allstatic,
1388   AC_HELP_STRING([--enable-allstatic],[Enable using static libraries when possible for dependencies]),
1389 [case "${enableval}" in
1390   yes) allstatic=yes ;;
1391   no)  allstatic=no ;;
1392   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-allstatic option]) ;;
1393 esac],allstatic=no)
1394 AM_CONDITIONAL(ALLSTATIC, test x$allstatic = xyes)
1396 dnl IPC_INFO isn't portable, and doesn't exist on BSD
1397 AC_TRY_COMPILE([#include <sys/ipc.h> #include <sys/shm.h>], [
1398   int flag = IPC_INFO; ],
1399   AC_DEFINE([HAVE_IPC_INFO], [1], [Use ipc_info])
1402 dnl --------------------------------------------------------
1403 dnl Disable menus
1404 dnl --------------------------------------------------------
1405 dnl Don't add the GUI menu. Some educational systems think this adds
1406 dnl clutter and confusion, like on the OLPC.
1407 AC_ARG_ENABLE(menus,
1408   AC_HELP_STRING([--disable-menus],[Disable the GUI menus]),
1409 [case "${enableval}" in
1410   yes) menus=yes ;;
1411   no)  menus=no ;;
1412   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-menus option]) ;;
1413 esac],menus=yes)
1415 if test x"$menus" = x"yes"; then
1416   AC_DEFINE([USE_MENUS], [], [GUI Menu support])
1418 AM_CONDITIONAL(MENUS, test x$menus = xyes)
1420 dnl --------------------------------------------------------
1421 dnl Disable SWF information
1422 dnl --------------------------------------------------------
1423 dnl Don't gather SWF information in tree form. This takes
1424 dnl resources and memory that can be saved if there's no
1425 dnl need to examine SWF internals.
1426 AC_ARG_ENABLE(swftree,
1427   AC_HELP_STRING([--disable-swftree],[Disable showing SWF properties]),
1428 [case "${enableval}" in
1429   yes) swftree=yes ;;
1430   no)  swftree=no ;;
1431   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-swf-properties option]) ;;
1432 esac],swftree=yes)
1434 if test x"$swftree" = x"yes"; then
1435   AC_DEFINE([USE_SWFTREE], [], [View SWF information])
1437 AM_CONDITIONAL(SWFTREE, test x$swftree = xyes)
1439 dnl --------------------------------------------------------
1440 dnl Disable testsuite
1441 dnl --------------------------------------------------------
1442 dnl Disable running any tests for "make check". This may sound stupid, but
1443 dnl this option is designed to solely be used by maintainers in the 
1444 dnl DISTCHECK_CONFIGURE_FLAGS when building packages. Gnash's testing infrastructure
1445 dnl is complex, and often the the testsuites will work, but due to some obscure reason,
1446 dnl make distcheck fails.
1447 AC_ARG_ENABLE(testsuite,
1448   AC_HELP_STRING([--disable-testsuite],[Disable the testsuite, maintainers option only]),
1449 [case "${enableval}" in
1450   yes) testsuite=yes ;;
1451   no)  testsuite=no ;;
1452   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-testsuite option]) ;;
1453 esac],testsuite=yes)
1455 if test x"$testsuite" = x"yes"; then
1456   AC_DEFINE([USE_TESTSUITE], [], [Testsuite support, maintainers option only])
1458 AM_CONDITIONAL(TESTSUITE, test x$testsuite = xyes)
1460 dnl --------------------------------------------------------
1461 dnl Write the file to disk in the plugin
1462 dnl --------------------------------------------------------
1463 AC_ARG_ENABLE(write,
1464   AC_HELP_STRING([--enable-write], [Makes the Mozilla plugin write the currently playing SWF movie to /tmp.]),
1465 [case "${enableval}" in
1466   yes) write=yes ;;
1467   no)  write=no ;;
1468   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-write option]) ;;
1469 esac],write=no)
1471 if test x"$write" = x"yes"; then
1472   AC_DEFINE([WRITE_FILE], [], [Write files while streaming])
1475 dnl --------------------------------------------------------
1476 dnl Write a standalone gnash launcher to disk from the plugin
1477 dnl --------------------------------------------------------
1478 AC_ARG_ENABLE(sa-launcher,
1479   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.]),
1480 [case "${enableval}" in
1481   yes) sa_launcher=yes ;;
1482   no)  sa_launcher=no ;;
1483   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-sa-launcher option]) ;;
1484 esac],sa_launcher=yes)
1486 if test x"$sa_launcher" = x"yes"; then
1487   AC_DEFINE([CREATE_STANDALONE_GNASH_LAUNCHER], [], [Add support for writing a standalone executable launcher for movies embedded in web pages])
1490 dnl --------------------------------------------------------
1491 dnl Build the cygnal server if specified.
1492 dnl --------------------------------------------------------
1493 AC_ARG_ENABLE(cygnal,
1494   AC_HELP_STRING([--enable-cygnal], [Enable building of the Cygnal server]),
1495 [case "${enableval}" in
1496   yes) cygnal=yes ;;
1497   no)  cygnal=no ;;
1498   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cygnal option]) ;;
1499 esac],cygnal=no)
1500 AM_CONDITIONAL(CYGNAL, test x$cygnal = xyes)
1502 dnl --------------------------------------------------------
1503 dnl Build the cgibins server if specified.
1504 dnl --------------------------------------------------------
1505 AC_ARG_ENABLE(cgibins,
1506   AC_HELP_STRING([--enable-cgibins], [Enable building of the CGIs for Cygnal]),
1507 [case "${enableval}" in
1508   yes) cgibin=yes ;;
1509   no)  cgibin=no ;;
1510   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cgibins option]) ;;
1511 esac],cgibin=yes)
1512 AM_CONDITIONAL(USE_CGI, test x$cgibin = xyes)
1513 if test x"${cgibin}" = x"yes"; then
1514   AC_DEFINE([USE_CGIBIN], [1], [Enable cgi-bin processes for Cygnal])
1517 dnl --------------------------------------------------------
1518 dnl  Double buffer
1519 dnl --------------------------------------------------------
1520 dnl Add an option for double buffering when rendering, currently only used by
1521 dnl the frmaebuffer GUI.
1522 dnl If defined, an internal software-buffer is used for rendering and is then
1523 dnl copied to the video RAM. This avoids flicker and is faster for complex 
1524 dnl graphics, as video RAM access is usually slower. (strongly suggested)
1525 AC_ARG_ENABLE(doublebuf,
1526   AC_HELP_STRING([--enable-doublebuf], [Enable support for double buffering when rendering]),
1527   [case "${enableval}" in
1528     yes) doublebuf=yes ;;
1529     no)  doublebuf=no ;;
1530     *)   AC_MSG_ERROR([bad value ${enableval} for enable-doublebuf option]) ;;
1531   esac], doublebuf=no
1533 AM_CONDITIONAL(ENABLE_DBUF, [test x"$doublebuf" = xyes])
1534 if test x$doublebuf = xyes; then
1535     AC_DEFINE(ENABLE_DOUBLE_BUFFERING, [1], [Enable double buffering])
1538 dnl --------------------------------------------------------
1539 dnl  Offscreen buffer
1540 dnl --------------------------------------------------------
1541 dnl This enables rendering to an offscreen buffer, instead of directly to window
1542 AC_ARG_ENABLE(offscreen,
1543   AC_HELP_STRING([--enable-offscreen], [Enable support for rendering offscreen]),
1544   [case "${enableval}" in
1545     yes) offscreen=yes ;;
1546     no)  offscreen=no ;;
1547     *)   AC_MSG_ERROR([bad value ${enableval} for enable-offscreen option]) ;;
1548   esac], offscreen=no
1552 dnl --------------------------------------------------------
1553 dnl  SSH support selection
1554 dnl --------------------------------------------------------
1555 dnl Enable using libssh with libnet
1556 AC_ARG_ENABLE(ssh,
1557   AC_HELP_STRING([--enable-ssh], [Enable using SSH for network authentication]),
1558 [case "${enableval}" in
1559   yes) build_ssh=yes ;;
1560   no)  build_ssh=no ;;
1561   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssh option]) ;;
1562 esac], build_ssh=no)
1564 AM_CONDITIONAL(BUILD_SSH, test x"${build_ssh}" = xyes)
1565 if test x"${build_ssh}" = xyes; then
1566   GNASH_PKG_FIND(ssh, [libssh/libssh.h], [libssh library], ssh_socket_init)
1567 dnl  GNASH_PKG_FIND(poppler, [popt.h], [Poppler library], poppler_init)
1569 if test x"${has_ssh}" = x"yes"; then
1570   AC_DEFINE([USE_SSH], [1], [Use SSH for authentication])
1573 dnl --------------------------------------------------------
1574 dnl  SSL support selection
1575 dnl --------------------------------------------------------
1577 dnl Enable using OpenSSL with libnet.
1578 AC_ARG_ENABLE(ssl,
1579   AC_HELP_STRING([--enable-ssl], [Enable using OpenSSL directly]),
1580 [case "${enableval}" in
1581   yes) build_ssl=yes ;;
1582   no)  build_ssl=no ;;
1583   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssl option]) ;;
1584 esac], build_ssl=no)
1586 with_cert=
1587 with_pem=
1588 AM_CONDITIONAL(BUILD_SSL, test x"${build_ssl}" = xyes)
1589 AC_ARG_WITH(cert,
1590   AC_HELP_STRING([--with-cert],
1591   [cert file for SSL]),
1592   with_cert=${withval})
1593 AC_ARG_WITH(pem,
1594   AC_HELP_STRING([--with-pe],
1595   [pem file for SSL]),
1596   with_pem=${withval})
1598 if test x"${build_ssl}" = xyes; then
1599   GNASH_PKG_FIND(ssl, [openssl/ssl.h], [OpenSSL library], SSL_library_init)
1601 if test x"${has_ssl}" = x"yes"; then
1602   AC_DEFINE([USE_SSL], [1], [Use SSL for authentication])
1605 dnl -----------------------------------------------------------
1606 dnl Set the general plugins install policy here
1607 dnl (NOTE: before GNASH_PATH_FIREFOX and GNASH_PATH_KDE*)
1608 dnl -----------------------------------------------------------
1610 AC_ARG_WITH(plugins-install,
1611   AC_HELP_STRING([--with-plugins-install=system|user|prefix], [Policy for plugins install. Default: user.]),
1612         [case "${withval}" in
1613           user) PLUGINS_INSTALL_POLICY=user ;;
1614           system) PLUGINS_INSTALL_POLICY=system ;;
1615           prefix) PLUGINS_INSTALL_POLICY=prefix ;;
1616           *)  AC_MSG_ERROR([bad value ${withval} for --with-plugins-install]) ;;
1617          esac 
1618         ], PLUGINS_INSTALL_POLICY=user) 
1620 dnl -----------------------------------------------------------
1621 dnl   Verify dependencies for requested GUIs are met, and
1622 dnl   disable build of the GUIS for which deps are NOT met
1623 dnl ------------------------------------------------------------
1625 dnl Look for scratchbox (used in GNASH_PATH_ALP)
1626 dnl FIXME: move it in macros/alp.m4 or at least after
1627 dnl        the build_alp conditional ?
1628 sbox=no
1629 if test x"${SBOX_REDIRECT_FROM_DIRS}" != x; then
1630   sbox=yes
1633 if test x$build_gtk = xyes -o $build_alp = xyes; then
1634    GNASH_PATH_GTK2
1635    GNASH_PATH_PANGO
1636    GNASH_PKG_FIND(atk, [atk/atk.h], [atk library], atk_focus_tracker_init, [1.0])
1637    if test x"${build_ogl}" = xyes; then
1638       GNASH_PATH_GLEXT
1639    fi
1640    if test x"${build_cairo}" = xyes; then
1641       GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1642    fi
1646 if test x"${build_kde4}" != xno -o x"${build_qtopia4}" != xno; then
1647  GNASH_PATH_QT4
1650 if test x"${build_kde4}" != xno; then
1651   GNASH_PATH_KDE4
1654 if test x"${build_kde4}" = xauto; then
1655   if test x"${has_qt4}" = xyes -a x"${has_kde4}" = xyes; then
1656      build_kde4=yes
1657   else
1658      build_kde4=no
1659   fi
1662 if test x"${build_kde3}" != xno -o x"${build_qtopia3}" != xno; then
1663  GNASH_PATH_QT3
1666 if test x"${build_kde3}" != xno; then
1667   GNASH_PATH_KDE3
1671 if test x"${build_kde3}" = xauto; then
1672   if test x"${has_qt3}" = xyes -a x"${has_kde3}" = xyes; then
1673      build_kde3=yes
1674   else
1675      build_kde3=no
1676   fi
1679 dnl Check possibility to build DUMP gui, if requested
1680 if test x"${build_dump}" != xno; then
1681   if test x"${build_agg}" = xyes; then
1682     build_dump=yes
1683   else
1684     if test x"${build_dump}" = xyes; then
1685       dnl SHOULD we just check at the end of file instead ?
1686       AC_MSG_ERROR(dump GUI cannot be built without AGG renderer);
1687     fi
1688     build_dump=no
1689   fi
1692 dnl Check possibility to build FB gui, if requested
1693 dnl FB dependencies are a linux system (linux/fb.h) 
1694 dnl and AGG renderer
1695 if test x"${build_fb}" != xno; then
1696   if test x"${linux}" = xyes; then
1697     if test x"${build_agg}" = xyes; then
1698       build_fb=yes
1699     else
1700       if test x"${build_fb}" = xyes; then
1701         dnl SHOULD we just check at the end of file instead ?
1702         AC_MSG_ERROR([fb GUI cannot be built without AGG renderer])
1703       fi
1704       AC_MSG_NOTICE([fb GUI won't be built (needs AGG renderer)])
1705       build_fb=no
1706     fi
1707   else
1708     if test x"${build_fb}" = xyes; then
1709       dnl SHOULD we just check at the end of file instead ?
1710       AC_MSG_ERROR(fb GUI cannot be built on non-linux platforms);
1711     fi
1712     AC_MSG_NOTICE([fb GUI won't be built (non-linux platform)])
1713     build_fb=no
1714   fi
1717 dnl TODO: add checks for all other GUIs
1719 dnl -------------------------------
1720 dnl Input Device selection
1721 dnl -------------------------------
1723 dnl Multiple input devices are supported. These can all work in
1724 dnl varying combinations, so several may be listed. These are only
1725 dnl required when using the Framebuffer, as without the X11 desktop,
1726 dnl Gnash has to handle all these internally. This can get
1727 dnl messy, as one might want to use a touchscreen with a normal mouse
1728 dnl or keyboard attached. 
1729 dnl By default, don't build any of these, as they are only for the Framebuffer
1730 dnl running without X11.
1731 if test x"${build_fb}" = xyes; then
1732 build_ps2mouse=yes
1733 build_ps2keyboard=no
1734 build_input_events=yes
1735 build_tslib=yes
1736 input_events="PS/2 Mouse, Input Devices, Touchscreen via Tslib"
1737 else
1738 build_ps2mouse=no
1739 build_ps2keyboard=no
1740 build_input_events=no
1741 build_tslib=no
1742 input_events=
1744 AC_ARG_ENABLE(input,
1745   AC_HELP_STRING([--enable-input=], [Enable support for the specified input devices for the framebuffer GUI (default=ps2mouse|ps2keyboard|events|touchscreen)]),
1746   [if test -n ${enableval}; then
1747     enableval=`echo ${enableval} | tr '\054' ' ' `
1748   fi
1749   while test -n "${enableval}" ; do
1750     val=`echo ${enableval} | cut -d ' ' -f 1`
1751     case "${val}" in
1752       ps2m*|PS2m*|m*|M*)        dnl a PS/2 style mouse
1753         build_ps2mouse=yes
1754         input_events="${input_events}, PS/2 Mouse"
1755         ;;
1756       ps2k*|PS2K*|k*|K*)        dnl a PS/2 style keyboard
1757         build_ps2keyboard=yes
1758         input_events="${input_events}, PS/2 Keyboard"
1759         ;;
1760       i*|I*|ev*|Ev*)    dnl use the new Input Event, which supports both
1761         input_events="${input_events}, Input Event Device"
1762         build_input_events=yes
1763         ;;
1764       t*|T*) dnl use a touchscreen with tslib, which works like a mouse
1765         build_tslib=yes
1766         input_events="${input_events}, Touchscreen"
1767         ;;
1768       *) AC_MSG_ERROR([invalid input device list! ${enableval} given (accept: ps2mouse|keyboard|events,touchscreen)])
1769          ;;
1770       esac
1771     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1772     if test "x$val" = "x$enableval"; then
1773       break;
1774     fi
1775   done],
1778 if test x"${build_tslib}" = xyes; then
1779   AC_DEFINE(USE_TSLIB, [1], [Use a tslib supported touchscreen])
1780   GNASH_PKG_FIND(ts, [tslib.h], [Touchscreen library], ts_config)
1782 AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} != xno])
1784 if test x"${build_ps2mouse}" = xyes; then
1785   AC_DEFINE(USE_MOUSE_PS2, [1], [Add support for a directly using a PS/2 Mouse])
1787 AM_CONDITIONAL(ENABLE_MOUSE, [test x"${build_ps2mouse}" = xyes])
1789 if test x"${build_ps2keyboard}" = xyes; then
1790   AC_DEFINE(USE_KEYBOARD_PS2, [1], [Add support for directly using a PS/2 Keyboard])
1792 if test x"${build_input_events}" = xyes; then
1793   AC_DEFINE(USE_INPUT_EVENTS, [1], [Add support for a directly using Linux Input Event Devices])
1795 AM_CONDITIONAL(ENABLE_INPUT_EVENTS, [test x"${build_input_events}" = xyes])
1796 dnl this is enabled if we have any input devices at all
1797 AM_CONDITIONAL(ENABLE_INPUT_DEVICES, [test x"${input_events}" != x])
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="$LDFLAGS -Wl,--as-needed"
1813 AC_MSG_RESULT($gcc_cv_ld_as_needed)
1815 AC_DEFINE(USE_GIF, [1], [Use the GIF library])
1816 AC_DEFINE(USE_PNG, [1], [Use the PNG library])
1817 AM_CONDITIONAL(USE_GIF, true)
1818 AM_CONDITIONAL(USE_PNG, true)
1820 AM_CONDITIONAL(HAVE_DMALLOC, [ test x$has_dmalloc = xyes ])
1822 AC_PATH_TOOL([AUTOTRACE], [autotrace])
1823 AC_HEADER_DIRENT
1825 dnl -----------------------------------------------------------------
1826 dnl PLUGIN RELATED STUFF
1827 dnl -----------------------------------------------------------------
1829 dnl Zip is used insted of tar when building an xpi package
1830 dnl for Mozilla/Firefox.
1831 AC_PATH_PROG(ZIP, zip, ,[${pathlist}])
1833 dnl !! This has been moved here to make --enable-npapi work
1834 dnl !! All of plugin-related macro calls could be moved into
1835 dnl !! a specialized macros/plugin.m4
1837 dnl ----------------------------------------------------
1838 dnl Add KPARTS support, if specified or KDE gui is built
1839 dnl ----------------------------------------------------
1841 AC_ARG_ENABLE(kparts3,
1842   AC_HELP_STRING([--disable-kparts3], [Disable support for Konqueror 3.x plugin (default: enabled if kde3 gui is)]),
1843 [case "${enableval}" in
1844   yes) build_kparts3=yes ;;
1845   no)  build_kparts3=no ;;
1846   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts3 option]) ;;
1847 esac],build_kparts3=$build_kde3)
1849 dnl --------------------------------------------------------
1850 dnl Add KPARTS 4.x support, if specified or KDE gui is built
1851 dnl --------------------------------------------------------
1853 AC_ARG_ENABLE(kparts4,
1854   AC_HELP_STRING([--disable-kparts4], [Disble support for Konqueror 4.x plugin (default: enabled if kde4 gui is)]),
1855 [case "${enableval}" in
1856   yes) build_kparts4=yes ;;
1857   no)  build_kparts4=no ;;
1858   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts4 option]) ;;
1859 esac],build_kparts4=$build_kde4)
1861 dnl -----------------------------------------------------------
1862 dnl Add NPAPI support, if specified or GTK or KDE4 gui is built
1863 dnl -----------------------------------------------------------
1865 AC_ARG_ENABLE(npapi,
1866   AC_HELP_STRING([--disable-npapi], [Disable NPAPI plugin build (default: enabled if gtk or kde4 gui is)]),
1867   [case "${enableval}" in
1868     yes) npapi=yes ;;
1869     no)  npapi=no ;;
1870     *)   AC_MSG_ERROR([bad value ${enableval} for disable-npapi option]) ;;
1871   esac],
1872   if test x$build_gtk = xyes -o x$build_kde4 = xyes; then
1873     npapi=yes
1874   fi
1877 if test x"$npapi" = x"yes"; then
1878   GNASH_PATH_NPAPI
1881 dnl -----------------------------------------------------------------
1882 dnl Enable us to disable building all browser plugins in one command.
1883 dnl -----------------------------------------------------------------
1885 AC_ARG_ENABLE(plugins,
1886   AC_HELP_STRING([--disable-plugins], [Disable all browser plugins from building (default=no)]),
1887   [case "${enableval}" in
1888     yes) plugins=yes ;;
1889     no)  plugins=no ;;
1890     *)   AC_MSG_ERROR([bad value ${enableval} for disable-plugins option]) ;;
1891   esac],
1892   plugins=yes
1894 if test x$plugins = xno; then
1895   npapi=no
1896   build_kparts3=no
1897   build_kparts4=no
1901 GNASH_PATH_FIREFOX
1903 dnl -----------------------------------------------------------------
1904 dnl END OF PLUGIN RELATED STUFF
1905 dnl -----------------------------------------------------------------
1907 dnl IRIX-hack.
1908 case $host in
1909   *-*-irix*)
1910   dnl ABI-check
1911   save_LIBS=$LIBS
1912   dir="/usr/lib /usr/lib32 /usr/lib/lib64"
1913   for i in $dir; do
1914     LIBS=-L$i
1915     AC_SEARCH_LIBS(XDisableAccessControl, X11, [
1916       xpathed=$i
1917       break
1918     ])
1919     unset ac_cv_search_XDisableAccessControl
1920   done
1921   ac_x_libraries=$xpathed
1922   x_libraries=$xpathed
1923   LIBS=$save_LIBS
1924   ;;
1925 esac
1927 AM_CONDITIONAL(LIRC, [test x$lirc_ext = xyes])
1929 AC_CHECK_HEADERS(endian.h machine/endian.h)
1930 AC_CHECK_HEADERS(malloc.h malloc/malloc.h)
1931 AC_CHECK_HEADERS(getopt.h)
1932 AC_CHECK_HEADERS(libgen.h)
1933 AC_CHECK_HEADERS(pwd.h)
1934 AC_CHECK_HEADERS(sys/utsname.h)
1935 AC_CHECK_HEADERS(signal.h)
1936 AC_CHECK_HEADERS(unistd.h)
1937 AC_CHECK_HEADERS(sys/time.h)
1938 AC_CHECK_HEADERS(ieeefp.h)
1939 dnl libcurl3-dev on Ubuntu has a dependency on lber, and Gnash won't link
1940 dnl on most machines without it. While it isn't diretly used by Gnash at all,
1941 dnl it's to work around an Ubuntu packaging bug.
1942 AC_CHECK_LIB(lber, ber_free)
1943 AC_CHECK_LIB(bz2, BZ2_bzopen)
1944 AC_CHECK_LIB(c, getpwnam, AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
1946 dnl X11 is needed for fltk (at least),
1947 dnl and probably for many other guis too ...
1948 GNASH_PATH_X11
1949 AC_CHECK_LIB(Xi, XInput_find_display)
1950 AC_CHECK_LIB(X11, XDisableAccessControl)
1951 AM_CONDITIONAL(HAVE_X11, [test x$x11 = xyes])
1952 AC_CHECK_LIB(rt, shm_unlink)
1953 AC_CHECK_FUNCS(shm_open shm_unlink)
1954 AC_TRY_COMPILE([#include <strings.h>], [
1955   char *p1 = (char *)"Hello";
1956   char *p2 = (char *)"World";
1957   strcasecmp(p1, p2); ],
1958   AC_DEFINE(HAVE_STRINGCASECMP, [1], [Has strcasecmp])
1961 dnl if test x$cross_compiling = xno; then
1962 AC_LANG_PUSH(C++)
1963 AC_MSG_CHECKING([to see if float formatting is broken])
1964 AC_RUN_IFELSE([
1965   AC_LANG_PROGRAM([#include <cmath>
1966     void testFloat(double d, double& s)
1967     {
1968         d /= 1000.0;
1969         s = std::fmod(d, 86400.0);
1970     }], [
1971      double d = 3.0935415006117e+23;
1972      double s;
1973      testFloat(d, s);
1974      if (static_cast<int>(s) != 61440) {
1975          return 1;
1976      }])],                         dnl end of LANG_PROGRAM
1977      broken_float=no,              dnl returns 0, works
1978      broken_float=yes,             dnl returns 1, broken
1979      broken_float=no               dnl cross compiling
1980 )                                  dnl end of RUN_IFELSE
1981 AC_LANG_POP(C++)
1982 dnl fi
1984 if test x${broken_float} = xyes; then
1985   AC_MSG_RESULT([yes])
1986   AC_DEFINE(HAVE_BROKEN_FLOAT, [1], [Has broken float support])
1987 else
1988   AC_MSG_RESULT([no])
1990 AM_CONDITIONAL(BROKEN_FLOAT, [ test x$broken_float = xyes ])
1992 dnl See if ipc_perm structure has the ipc_perm.key field, and if so,
1993 dnl which variant of the name is used.
1994 ipc_key=no
1995 AC_TRY_COMPILE([
1996   #include <sys/ipc.h>
1997   #include <sys/shm.h>], [
1998  struct shmid_ds shmseg;      
1999  key_t x = shmseg.shm_perm.key;],
2000  ipc_key=yes
2001  AC_DEFINE(IPC_PERM_KEY, [key], [Has the key field in ipc_perm])
2004 if test x$ipc_key = xno; then
2005   AC_TRY_COMPILE([
2006     #include <sys/ipc.h>
2007     #include <sys/shm.h>], [
2008     struct shmid_ds shmseg;      
2009     key_t x = shmseg.shm_perm.__key;],
2010     AC_DEFINE(IPC_PERM_KEY, [__key], [Has the key field in ipc_perm])
2011     ipc_key=yes
2012   )
2015 AC_CACHE_CHECK([for finite], ac_cv_finite,
2016  [AC_TRY_COMPILE([
2017    #include <math.h>
2018    #ifdef HAVE_IEEEFP_H
2019    #include <ieeefp.h>
2020    #endif],
2021  [double x; int y; y = finite(x);],
2022  ac_cv_finite=yes,
2023  ac_cv_finite=no
2025 if test x"$ac_cv_finite" = x"yes"; then
2026   AC_SEARCH_LIBS(finite, m,
2027     [AC_DEFINE(HAVE_FINITE, [1], [Has finite])]
2028   )
2031 AC_LANG_PUSH(C++)
2032 AC_CACHE_CHECK([for isfinite], ac_cv_isfinite,
2033  [AC_TRY_COMPILE([#include <cmath>],
2034  [using namespace std; double x; int y; y = isfinite(x);],
2035  ac_cv_isfinite=yes,
2036  ac_cv_isfinite=no
2038 AC_LANG_POP(C++)
2039 if test x"$ac_cv_isfinite" = x"yes"; then
2040   dnl Don't give up if isfinite is not found in -lm
2041   dnl isfinite is defined as a macro in C99.
2042   AC_SEARCH_LIBS(isfinite, m)
2043   AC_DEFINE(HAVE_ISFINITE, [1], [Has isfinite])
2046 AC_LANG_PUSH(C++)
2047 AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [
2048   AC_TRY_LINK([#include <cstdio>
2049 ], 
2050     [ std::printf("%s", __PRETTY_FUNCTION__); ], 
2051     [ ac_cv_implements___PRETTY_FUNCTION__="yes" ],
2052     [ ac_cv_implements___PRETTY_FUNCTION__="no" ]
2053   )
2055 if test "x$ac_cv_implements___PRETTY_FUNCTION__" = "xyes" ; then
2056   AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined])
2059 AC_CACHE_CHECK([whether $CXX implements __FUNCTION__], ac_cv_implements___FUNCTION__, [
2060   AC_TRY_LINK([#include <cstdio>
2061 ], 
2062     [ std::printf("%s", __FUNCTION__); ], 
2063     [ ac_cv_implements___FUNCTION__="yes" ],
2064     [ ac_cv_implements___FUNCTION__="no" ]
2065   )
2067 if test "x$ac_cv_implements___FUNCTION__" = "xyes" ; then
2068   AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined])
2071 AC_CACHE_CHECK([whether $CXX implements __func__], ac_cv_implements___func__, [
2072   AC_TRY_LINK([#include <cstdio>
2073 ], 
2074     [ std::printf("%s", __func__); ], 
2075     [ ac_cv_implements___func__="yes" ],
2076     [ ac_cv_implements___func__="no" ]
2077   )
2079 if test "x$ac_cv_implements___func__" = "xyes" ; then
2080   AC_DEFINE(HAVE_func, [1], [__func__ is defined])
2082 AC_LANG_POP(C++)
2083 AC_REPLACE_FUNCS(getopt)
2085 dnl Date portability stuff, used in server/asobj/Date.cpp
2086 AC_CHECK_FUNCS(gettimeofday)
2087 AC_CHECK_FUNCS(ftime)
2088 AC_CHECK_FUNCS(tzset)
2089 AC_CHECK_FUNCS(localtime_r)
2091 AC_CACHE_CHECK([whether struct tm has tm_gmtoff], ac_cv_tm_gmtoff, [
2092         AC_TRY_LINK([
2093 /* ctime(1) says "The glibc version of struct tm has additional fields
2094  * defined  when _BSD_SOURCE was set before including <time.h>"
2095  * In practice, you do not need to define it yourself (tested on glibc-2.2.1 
2096  * and 2.3.6) but if you *do* define it yourself, it makes *all* functions
2097  * favour BSD-like behaviour over of GNU/POSIX, which seems dangerous.
2098  */
2099 // #define _BSD_SOURCE 1
2100 #include <time.h>
2101 ], 
2102                 [ struct tm tm; long l = tm.tm_gmtoff; ], 
2103                 [ ac_cv_tm_gmtoff="yes" ],
2104                 [ ac_cv_tm_gmtoff="no" ]
2105         )
2107 if test "x$ac_cv_tm_gmtoff" = "xyes" ; then
2108         AC_DEFINE(HAVE_TM_GMTOFF, [1], [struct tm has member tm_gmtoff])
2111 AC_CACHE_CHECK([whether timezone is a long], ac_cv_long_timezone, [
2112         AC_TRY_LINK([
2113 /* On Linux/glibc, tzset(3) says "extern long timezone;" (seconds West of GMT)
2114  * but on BSD char *timezone(int,int) is a function returning a string name.
2115  * The BSD function timegm() may be the equivalent, but this should
2116  * not be necessary because on BSD the code should use tm.tm_gmtoff instead
2117  * (use of long timezone is a fallback strategy for when tm_gmtoff exists not).
2118  */
2119 #include <stdio.h>
2120 #include <time.h>
2121 extern long timezone;
2122   ], 
2123     [ printf("%ld", timezone); ], 
2124     [ ac_cv_long_timezone="yes" ],
2125     [ ac_cv_long_timezone="no" ]
2126    )
2128 if test "x$ac_cv_long_timezone" = "xyes" ; then
2129   AC_DEFINE(HAVE_LONG_TIMEZONE, [1], [extern timezone is a long integer, not a function])
2132 AC_CHECK_FUNCS(sysconf)
2133 AC_CHECK_FUNCS(shmget shmat shmdt mmap)
2134 AC_CHECK_FUNCS(memmove)
2135 AC_CHECK_FUNCS(scandir)         dnl supported by BSD and Linux, but you never know...
2136 AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has clock_gettime()] ))
2137 dnl Look for Win32 networking stuff
2138 AC_CHECK_HEADERS(winsock.h)
2139 AC_CHECK_HEADERS(winsock2.h)
2140 AC_CHECK_FUNCS(socket)
2141 AC_CHECK_FUNCS(CreateFileMappingA)
2143 GNASH_PKG_FIND(nspr, [nspr.h], [Netscape Portable Runtime (NSPR)], PR_Init)
2145 AC_PATH_TOOL(WINDRES, [windres])
2146 AC_SUBST(WINDRES)
2148 GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress)
2149 GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init)
2150 if test x"${openbsd_os}" = x"yes"; then
2151   GNASH_PKG_FIND(libpng, [png.h], [png images], png_info_init)
2152 else
2153   GNASH_PKG_FIND(png, [png.h], [png images], png_info_init)
2155 GNASH_PKG_FIND(gif, [gif_lib.h], [gif images], DGifOpen)
2156 if test x"${GIF_LIBS}" = x ; then
2157  GNASH_PKG_FIND(ungif, [gif_lib.h], [gif images], DGifOpen)
2158  GIF_LIBS=${UNGIF_LIBS}
2159  GIF_CFLAGS=${UNGIF_CFLAGS}
2161 if test x"$testsuite" = x"yes"; then
2162   GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
2165 GNASH_PKG_FIND(speex, [speex.h], [speex audio codec], speex_decode_int)
2166 AM_CONDITIONAL(HAVE_SPEEX, [ test x$has_speex = xyes ])
2167 if test x$has_speex = xyes ; then
2168   AC_DEFINE([DECODING_SPEEX], [1], [Speex codec available])
2171 GNASH_PKG_FIND(speexdsp, [speex_resampler.h], [speex DSP utilities], speex_resampler_process_int)
2172 if test x$has_speexdsp = xyes ; then
2173   AC_DEFINE([RESAMPLING_SPEEX], [1], [Speex resampler available])
2176 dnl Find freetype and fontconfig
2177 GNASH_PATH_FREETYPE2
2178 GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch)
2180 if test x$cross_compiling = xno; then
2181   AC_PATH_MING
2184 if test x"$MING_VERSION_CODE" = x; then
2185  MING_VERSION_CODE=00000000
2188 AM_CONDITIONAL(ENABLE_MING,
2189         [ test x"$MAKESWF" != x -a $MING_VERSION_CODE -gt 00040000 ])
2191 AM_CONDITIONAL(MING_VERSION_0_4,
2192         [ test $MING_VERSION_CODE -ge 00040000  ])
2193 AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS,
2194         [ test $MING_VERSION_CODE -ge 00040002  ])
2195 AM_CONDITIONAL(MING_SUPPORTS_INIT_ACTIONS,
2196         [ test $MING_VERSION_CODE -ge 00040004  ])
2197 AM_CONDITIONAL(MING_SUPPORTS_REPLACE_TAG,
2198         [ test $MING_VERSION_CODE -ge 00040005 ])
2199 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_ADD_CHARACTER,
2200         [ test $MING_VERSION_CODE -ge 00040005 ])
2201 AM_CONDITIONAL(MING_SUPPORTS_STREAMING_SOUND,
2202         [ test $MING_VERSION_CODE -ge 00040006 ])
2203 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_SET_DEPTH,
2204         [ test $MING_VERSION_CODE -ge 00040006 ])
2205 AM_CONDITIONAL(MING_VERSION_0_4_3,
2206         [ test $MING_VERSION_CODE -ge 00040300 ])
2207 AM_CONDITIONAL(MING_VERSION_0_4_4,
2208         [ test $MING_VERSION_CODE -ge 00040400 ])
2210 if test x$cross_compiling = xno; then
2211     AC_ARG_WITH([swfdec_testsuite],
2212         AC_HELP_STRING([--with-swfdec-testsuite],
2213             [directory where swfdec testsuite (the 'test' dir) is]),
2214         if test x"${withval}" = xyes; then
2215             dir=`dirname $0`
2216             dir=`cd ${dir} && pwd`
2217             withval="${dir}/testsuite/swfdec/src/test"
2218         fi
2219         SWFDEC_TESTSUITE=${withval}
2220     )
2221     AC_SUBST(SWFDEC_TESTSUITE)
2223 AM_CONDITIONAL(ENABLE_SWFDEC_TESTSUITE, [ test x"$SWFDEC_TESTSUITE" != x ])
2225 if test x$cross_compiling = xno; then
2226   AC_ARG_ENABLE([http_testsuite],
2227       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2228           AC_HELP_STRING([--enable-http-testsuite=<baseurl>],
2229                   [Enable http based testsuite (default url is http://www.gnashdev.org/testcases)]),
2230               [case "${enableval}" in
2231              no) HTTP_TESTSUITE="" ;;
2232             yes) HTTP_TESTSUITE="http://www.gnashdev.org/testcases" ;;
2233               *) HTTP_TESTSUITE="${enableval}";;
2234            esac])
2235   AC_SUBST(HTTP_TESTSUITE)
2237 AM_CONDITIONAL(ENABLE_HTTP_TESTSUITE, [ test x"$HTTP_TESTSUITE" != x ])
2239 if test x$cross_compiling = xno; then
2240   AC_ARG_ENABLE([red5_testing],
2241       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2242           AC_HELP_STRING([--enable-red5-testing=<host>],
2243                   [Enable red5 based testing (default host is www.gnashdev.org)]),
2244               [case "${enableval}" in
2245              no) RED5_HOST="" ;;
2246             yes) RED5_HOST="www.gnashdev.org" ;;
2247               *) RED5_HOST="${enableval}";;
2248            esac])
2249   AC_SUBST(RED5_HOST)
2251 AM_CONDITIONAL(ENABLE_RED5_TESTING, [ test x"$RED5_HOST" != x ])
2253 if test x$cross_compiling = xno; then
2254   AC_ARG_ENABLE([rtmpy_testing],
2255       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2256           AC_HELP_STRING([--enable-rtmpy-testing=<host>],
2257                   [Enable rtmpy based testing (default host is www.gnashdev.org)]),
2258               [case "${enableval}" in
2259              no) RTMPY_HOST="" ;;
2260             yes) RTMPY_HOST="www.gnashdev.org" ;;
2261               *) RTMPY_HOST="${enableval}";;
2262            esac])
2263   AC_SUBST(RTMPY_HOST)
2265 AM_CONDITIONAL(ENABLE_RTMPY_TESTING, [ test x"$RTMPY_HOST" != x ])
2267 dnl The name might differ between systems.
2268 if test x"$testsuite" = x"yes"; then
2269 AC_PATH_PROGS(NETCAT, [nc netcat])
2270 AC_PATH_PROG(WGET, wget)
2272 AM_CONDITIONAL(HAS_NETCAT, [ test x"$NETCAT" != x ])
2273 AM_CONDITIONAL(HAS_WGET, [ test x"$WGET" != x ])
2276 dnl See if we can use the swfmill, mtasc, swfc and haxe based testsuites 
2278 if test x"$testsuite" = x"yes" -a x$cross_compiling = xno; then
2279   AC_PATH_PROG(AS3COMPILE, as3compile)
2280   AC_PATH_PROG(SWFC, swfc)
2281   AC_PATH_SWFMILL
2282   AC_PATH_MTASC
2283   AC_PATH_HAXE
2286 AM_CONDITIONAL(ENABLE_SWFMILL, [ test x"$SWFMILL" != x ])
2287 AM_CONDITIONAL(SWFMILL_AS3_SUPPORT,
2288         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2290 dnl SWFMILL versions older than 0.3 didn't get function2 flags order correctly
2291 AM_CONDITIONAL(SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT,
2292         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2294 AM_CONDITIONAL(ENABLE_AS3COMPILE, [ test x"$AS3COMPILE" != x ])
2295 AM_CONDITIONAL(ENABLE_MTASC, [ test x"$MTASC" != x ])
2296 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2297 AM_CONDITIONAL(ENABLE_SWFC, [ test x"$SWFC" != x ])
2298 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2300 AC_PATH_PROG(DOXYGEN, doxygen)
2301 AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ])
2303 AM_CONDITIONAL(HAVE_KDE3,    [test x$has_kde3 = xyes])
2304 AM_CONDITIONAL(HAVE_KDE4,    [test x$has_kde4 = xyes])
2305 AM_CONDITIONAL(HAVE_QT3,     [test x$has_qt3 = xyes])
2306 AM_CONDITIONAL(HAVE_QT4,     [test x$has_qt4 = xyes])
2308 AM_CONDITIONAL(WITH_KDE4,    [test "$with_kde4" != "no"])
2309 AM_CONDITIONAL([QT_X11],     [test "$platform" = "X11"])
2310 AM_CONDITIONAL([QTOPIA],     [test "$platform" = "Qtopia"])
2311 AM_CONDITIONAL([QT_OSX],     [test "$platform" = "OSX"])
2312 AM_CONDITIONAL([QT_OS9],     [test "$platform" = "OS9"])
2313 AM_CONDITIONAL([QT_WIN32],   [test "$platform" = "Win32"])
2315 dnl Need GLIB for both GTK and GST
2316 if test x"${build_gtk}" = xyes -o x"${build_media_gst}" = xyes; then
2317   GNASH_PATH_GLIB
2320 AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ])
2322 if test x$npapi = xyes; then
2323   if ! test x$build_gtk = xyes -o x$build_kde4 = xyes; then
2324     AC_MSG_WARN(["Enabled NPAPI plugin, but it's not supported by the selected GUI"])
2325   fi
2328 if test x$windows = xyes -a x$npapi = xyes; then
2329   if test "x$NSPR_CFLAGS" = x -a "x$NSPR_LIBS" = x; then
2330     AC_MSG_ERROR(["On Win32, NPAPI plugin requires NSPR."])
2331   fi
2332   if test "x$WINDRES" = x; then
2333     AC_MSG_ERROR(["On Win32, NPAPI plugin requires windres."])
2334   fi
2337 dnl Need GLIB for NPAPI plugin
2338 if test x$npapi = xyes; then
2339   GNASH_PATH_GLIB
2342 dnl if kde isn't installed, even if it's specified, don't try to build
2343 dnl the KPARTS plugin, which is KDE based.
2344 if test x$has_kde3 = xno -a x$build_kparts3 = xyes; then
2345   build_kparts3=no
2346   AC_MSG_WARN(["Disabling KPARTS 3.x plugin, no KDE development found"])
2349 if test x$build_kde3 = xno -a x$build_kparts3 = xyes; then
2350   AC_MSG_WARN(["Enabled KPARTS 3.x plugin, but you aren't building a KDE based GUI!"])
2352 if test x$has_kde4 = xno -a x$build_kparts4 = xyes; then
2353   build_kparts4=no
2354   AC_MSG_WARN(["Disabling KPARTS 4.x plugin, no KDE 4.x development found"])
2357 if test x$build_kde4 = xno -a x$kparts4 = xyes; then
2358   AC_MSG_WARN(["Enabled KPARTS 4.x plugin, but you aren't building a KDE 4.x based GUI!"])
2361 AM_CONDITIONAL(BUILD_QTOPIA3_GUI,  [ test x$build_qtopia3 = xyes ])
2362 AM_CONDITIONAL(BUILD_QTOPIA4_GUI,  [ test x$build_qtopia4 = xyes ])
2364 dnl Drop these conditionals ?
2365 AM_CONDITIONAL(BUILD_QT3_GUI,
2366     [ test x"${build_kde3}" = xyes -o x"${build_qtopia3}" = xyes ])
2367 AM_CONDITIONAL(BUILD_QT4_GUI,
2368     [ test x"${build_kde4}" = xyes -o x"${build_qtopia4}" = xyes ])
2370 AM_CONDITIONAL(BUILD_KDE3_GUI,     [ test x$build_kde3 = xyes ])
2371 AM_CONDITIONAL(BUILD_KDE4_GUI,     [ test x$build_kde4 = xyes ])
2373 AM_CONDITIONAL(BUILD_GTK_GUI,      [ test x$build_gtk = xyes ])
2374 AM_CONDITIONAL(BUILD_FLTK_GUI,     [ test x$build_fltk = xyes ])
2375 AM_CONDITIONAL(BUILD_SDL_GUI,      [ test x$build_sdl = xyes ])
2376 AM_CONDITIONAL(BUILD_FB_GUI,       [ test x$build_fb = xyes ])
2377 AM_CONDITIONAL(BUILD_AQUA_GUI,     [ test x$build_aqua = xyes ])
2378 AM_CONDITIONAL(ALLSTATIC,          [ test x$build_aqua = xyes ]) dnl the Aqua-binary is always static.
2379 AM_CONDITIONAL(BUILD_RISCOS_GUI,   [ test x$build_riscos = xyes ])
2380 AM_CONDITIONAL(BUILD_DUMP_GUI,     [ test x$build_dump = xyes ])
2381 AM_CONDITIONAL(BUILD_AMIGAOS4_GUI, [ test x$build_aos4 = xyes ])
2382 AM_CONDITIONAL(BUILD_HAIKU_GUI,    [ test x$build_haiku = xyes ])
2384 # plugin building flags
2385 AM_CONDITIONAL(NPAPI,   [test x"${npapi}" = xyes])
2386 AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes])
2387 AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes])
2389 if test x"${build_gles}" = xyes; then
2390   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2391   GNASH_PATH_GLES
2394 if test x"${build_ogv}" = xyes; then
2395   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2396   GNASH_PKG_FIND(OpenVG, [vg/openvg.h], [OpenVG library], vgDrawImage)
2399 if test x"${build_gtk}" = xyes; then
2400   AC_ARG_ENABLE(ghelp,
2401     AC_HELP_STRING([--enable-ghelp], [Enable support for the GNOME help system]),
2402     [case "${enableval}" in
2403       yes) ghelp=yes ;;
2404       no)  ghelp=no ;;
2405       *)   AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;;
2406     esac], ghelp=no
2407   )
2409   if test x"${ghelp}" = x"yes" ; then
2410     AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2411     AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2412     AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2414     if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = x ; then
2415       ghelp=no
2416       AC_MSG_WARN([You need to install scrollkeeper for gnome help])
2417     fi
2418   fi
2420 AM_CONDITIONAL(GHELP, [test x${ghelp} = xyes])
2422 if test x${build_fltk} = xyes; then
2423   GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender)
2426 dnl Some systems have a pervered set of dependencies.
2427 dnl Fedora Core 6 appears to have a dependency on expat for fontconfig.
2428 dnl We only need the library, but this is the easy wind to find it.
2429 GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString)
2431 dnl these conditionals were moved out of kde.m4
2432 AM_CONDITIONAL(HAS_KDE3, [test x$has_kde3 = xyes])
2433 # used to disable x11-specific stuff on special platforms
2434 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
2435 AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
2436 AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
2438 AM_CONDITIONAL(HAVE_GLEXT, [test x$glext = xyes])
2440 dnl We don't have GTKGLExt, so default to SDL, and don't build the Firefox plugin
2441 if test x$glext = xno -a x$build_ogl = xyes; then
2442   if test x$gtk2 = xyes -a x$build_gtk = xyes; then
2443     AC_ERROR([You have GTK installed, but not GtkGLExt. You need GtkGLExt to use the OpenGL renderer. Attempting to build SDL version])
2444   fi
2445   gui=sdl
2446   npapi=no
2447   AC_MSG_WARN([GTK2 specified for the GUI, but GtkGlExt is not present. Trying SDL instead.])
2450 missing_codecs=""
2451 if test x"$build_media_gst" = "xyes"; then
2452   AC_PATH_PROG(GST_INSPECT, gst-inspect, ,[${pathlist}])
2453   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2454     AC_PATH_PROG(GST_INSPECT, gst-inspect-0.10, ,[${pathlist}])
2455   fi
2456   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2457     dnl FIXME: there may be multiple acceptable plugins that are acceptable for
2458     dnl our use. For example, mad or FFmpeg will play mp3.
2459     codecs="ffdec_flv ffdec_flashsv ffdec_vp6f ffdec_flashsv mad vorbisdec ffdec_vp6"
2460     for i in $codecs; do
2461        hits="`$GST_INSPECT $i | grep -c 'Long name'`"
2462        if test $hits -eq 0; then
2463          missing_codecs="$missing_codecs $i"
2464          AC_MSG_WARN([Missing codec: $i])
2465        fi
2466     done
2467   fi
2468   GNASH_PKG_FIND(gstreamer_plugins_base, [gst/interfaces/probeprobe.h], [gstreamer interfaces library], gst_property_probe_probe_and_get_values_name, [0.10])
2469   GNASH_PKG_FIND(gstreamer_app, [gst/app/gstappsink.h], [gstreamer app library], call_gmon_start, [0.10])
2470   GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, [0.10])
2471   dnl if cross compiling, we're usually not going to be able to pop up
2472   dnl the codec installer to download the package to install, so disable
2473   dnl it if cross compiling with gstreamer support.
2474   if test x$cross_compiling = xno; then
2475     GNASH_PKG_FIND(gstreamer_pbutils, [gst/pbutils/install-plugins.h], [gstreamer PB Utils library], gst_install_plugins_supported, [0.10])
2476   fi
2477   dnl when cross compiling Gstreamer, not all supplied SDKs include all the
2478   dnl development libraries since most devices don't need to support plugin
2479   dnl development, only the runtime. In these caes we often have the header
2480   dnl files but not the libraries.
2481   if test x"${has_gstreamer_plugins_base}" = xyes; then
2482     GSTREAMER_LIBS="-lgstinterfaces-0.10 $GSTREAMER_LIBS"
2483     AC_DEFINE(HAS_GSTREAMER_PLUGINS_BASE, [1], [Has the Gstreamer Plugin Dev package installed])
2484   fi
2487 AM_CONDITIONAL(HAVE_CAIRO, [true])
2488 AM_CONDITIONAL(HAVE_OPENGL, [true])
2490 AM_CONDITIONAL(USE_SOUND_SDL, test x$build_sound_sdl = xyes)
2491 AM_CONDITIONAL(USE_SOUND_AHI, test x$build_sound_ahi = xyes)
2492 AM_CONDITIONAL(USE_SOUND_MKIT, test x$build_sound_mkit = xyes)
2493 AM_CONDITIONAL(USE_FFMPEG_ENGINE, test x"${build_media_ffmpeg}" = x"yes")
2494 AM_CONDITIONAL(USE_GST_ENGINE, test x"${build_media_gst}" = x"yes")
2495 AM_CONDITIONAL(HAVE_OPENGL, test x"${OPENGL_LIBS}" != x)
2496 dnl for now the Haiku media handler is experimental
2497 AM_CONDITIONAL(USE_HAIKU_ENGINE, test x"$build_media_haiku" = xyes)
2499 if test x"${build_media_ffmpeg}" = x"yes"; then
2500   AC_DEFINE([ENABLE_FFMPEG_MEDIA],  [1], [Use FFmpeg for media decoding])
2503 if test x"${build_media_gst}" = x"yes"; then
2504   AC_DEFINE([ENABLE_GST_MEDIA],  [1], [Use gstreamer for media decoding])
2507 if test x"${build_media_haiku}" = x"yes"; then
2508   AC_DEFINE([ENABLE_HAIKU_MEDIA],  [1], [Use haiku for media decoding])
2511 if test x$build_sound_mkit = xyes; then
2512   if test x"${haiku}" != xyes; then
2513     AC_MSG_ERROR([Media Kit sound handling is supported only under Haiku]);
2514   else
2515     AC_DEFINE([SOUND_MKIT],  [1], [Use Haiku Media Kit for sound handling])
2516   fi
2519 if test x"${build_sound_sdl}" = xyes; then
2520   AC_DEFINE([SOUND_SDL],  [1], [Use SDL for sound handling])
2523 if test x"${build_sound_ahi}" = xyes; then
2524   if test x"$amigaos4" != xyes; then
2525     AC_MSG_ERROR([AHI sound handling is supported only under AmigaOS]);
2526   else
2527     AC_DEFINE([SOUND_AHI],  [1], [Use AmigaOS AHI for sound handling])
2528   fi
2531 if test x$build_fltk = xyes; then
2532   GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush)
2535 AM_CONDITIONAL(HAVE_FLTK2, [ test x$has_fltk2 = xyes ])
2536 AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ])
2538 GNASH_DOCBOOK
2539 AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x)
2540 AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes)
2541 AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_TEXI" != x -o x"$DB2X_TEXIXML" != x ])
2542 AM_CONDITIONAL(ENABLE_PDF, [ test x"$DB2X_PDF" ])
2543 AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2544 AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x -a x"$docbook_styles" != x ])
2545 AM_CONDITIONAL(ENABLE_XMLTEX, [ test x"$PDFXMLTEX" != x -a x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2546 AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_MAN" != x -o x"$DB2X_MANXML" != x ])
2547 AM_CONDITIONAL(HAVE_AGG, [test x"${AGG_LIBS}" != x])
2549 GNASH_PATH_CURL
2551 dnl Define winsock if we're on windows. We could do something complicated,
2552 dnl but since AC_EXEEXT does it for us, we'll do this the easy way.
2553 if test x"$EXEEXT" = "exe"; then
2554   AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32])
2557 dnl ****************************************
2558 dnl *** Check for ELF visibility support ***
2559 dnl ****************************************
2561 AC_ARG_ENABLE([visibility],
2562   AC_HELP_STRING([--enable-visibility], [Use ELF visibility attributes]), [], [enable_visibility=no])
2564 if test x"$enable_visibility" != x"no"; then
2565   dnl Check whether the compiler supports the visibility attribute
2566   save_CFLAGS="$CFLAGS"
2567   CFLAGS="$CFLAGS -Wall -Werror"
2568   AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
2569   AC_COMPILE_IFELSE(AC_LANG_SOURCE(
2570     [
2571       void __attribute__ ((visibility("default"))) test_default (void) {}
2572       void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
2573       int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
2574     ]),
2575     [
2576       AC_DEFINE([HAVE_GNUC_VISIBILITY], [1], [Define this for GCC-visibility.])
2577       AC_MSG_RESULT([yes])
2578     ],
2579     [
2580       AC_MSG_RESULT([no])
2581     ]
2582   )
2583   CFLAGS="$save_CFLAGS"
2586 AC_ARG_ENABLE([pch],
2587   AC_HELP_STRING([--enable-pch], [Enable precompiled header support]), [], [enable_pch=no])
2589 AM_CONDITIONAL([ENABLE_PCH], [test x"$enable_pch" != x"no"])
2591 PCH_FLAGS="-include all-includes.h -Winvalid-pch"
2592 AC_SUBST(PCH_FLAGS)
2594 GNASH_PATH_PTHREADS
2596 GNASH_PATH_BOOST
2598 AC_ARG_ENABLE([strict],
2599   AC_HELP_STRING([--enable-strict],[Accept only standards compliant code (GCC only)]),
2600   [case "${enableval}" in
2601     yes) strict=yes ;;
2602     no) strict=no ;;
2603     *) AC_MSG_ERROR([bad value ${enableval} for --enable-strict option]) ;;
2604   esac],
2605   [strict=no]
2608 if test x"$strict" = x"yes" -a x$build_agg = xyes; then
2609    AC_MSG_ERROR([agg renderer will fail with --enable-strict.]);        
2612 # We want warnings, lots of warnings  :-)
2613 # It should be possible to build with -ansi, not with
2614 # -pedantic because of agg.
2616 # -ansi was actually dropped because it hides 'fileno', which
2617 # is used in a few places
2619 if test x"$GCC" = x"yes"; then
2620   CXXFLAGS="$CXXFLAGS \
2621     $CROSS_CXXFLAGS \
2622     -W \
2623     -Wall \
2624     -Wcast-align \
2625     -Wcast-qual \
2626     -Wpointer-arith \
2627     -Wreturn-type \
2628     -Wnon-virtual-dtor \
2629     -Wunused \
2630     "
2631   CFLAGS="$CFLAGS \
2632     $CROSS_CXXFLAGS \
2633     -W \
2634     -Wall \
2635     -Wcast-align \
2636     -Wcast-qual \
2637     -Wpointer-arith \
2638     -Wreturn-type \
2639     -Wmissing-declarations \
2640     -Wmissing-prototypes \
2641     -Wstrict-prototypes \
2642     "
2643   if test x"$strict" = x"yes"; then
2644     CXXFLAGS="$CXXFLAGS \
2645       -Wextra \   
2646       -pedantic \
2647       -Wno-long-long \
2648       "
2650     CFLAGS="$CFLAGS \
2651       -pedantic \
2652       -Wno-long-long \
2653       -ansi \
2654       "
2655   fi
2658 AC_ARG_ENABLE([cassert],
2659   AC_HELP_STRING([--disable-cassert],[Disable assertion checking]),
2660   [case "${enableval}" in
2661     yes) cassert=yes ;;
2662     no) cassert=no ;;
2663     *) AC_MSG_ERROR([bad value ${enableval} for --enable-cassert option]) ;;
2664   esac],
2665   [cassert=yes]
2668 if test x"$cassert" = x"no"; then
2669     CXXFLAGS="$CXXFLAGS \
2670       -DNDEBUG \
2671       "
2672     CFLAGS="$CFLAGS \
2673       -DNDEBUG \
2674       "
2677 dnl /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
2678 AC_DEFUN([CHECK_VISIBILITY_GCC_BUG],
2679   [
2680     AC_CACHE_CHECK([if -fvisibility-inlines-hidden is broken], ac_cv_gcc_visibility_bug, [
2681         AC_LANG_PUSH(C++)
2682         save_CXXFLAGS=$CXXFLAGS
2683         save_LDFLAGS=$LDFLAGS
2684         CXXFLAGS="-fPIC -fvisibility-inlines-hidden -O0"
2685         LDFLAGS="$LDFLAGS -shared -fPIC"
2687         AC_TRY_LINK(
2688         [          
2689           template<typename CharT>
2690           struct VisTest
2691           {
2692             inline VisTest ();
2693           };
2694           template<typename CharT>
2695           inline VisTest<CharT>::VisTest()
2696         {}
2697         extern template class VisTest<char>;  // It works if we drop that line
2698         int some_function( int do_something ) __attribute__((visibility("default")));
2699         int some_function( int )
2700           {
2701             VisTest<char> a;
2702             return 0;
2703           }
2704         ], [],
2705         ac_cv_gcc_visibility_bug=no, ac_cv_gcc_visibility_bug=yes)
2707         CXXFLAGS=$save_CXXFLAGS
2708         LDFLAGS=$save_LDFLAGS
2709         AC_LANG_POP(C++)
2710       ]
2711     )
2712     if test x$ac_cv_gcc_visibility_bug = xno; then
2713       CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
2714     fi
2715   ]
2718 CHECK_VISIBILITY_GCC_BUG
2720 if test x$ac_cv_gcc_visibility_bug = xno; then
2721   AC_LANG_PUSH(C++)
2722   AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
2723   save_CXXFLAGS=$CXXFLAGS
2724   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2725   AC_LINK_IFELSE([AC_LANG_PROGRAM()], 
2726                  [ac_cv_gcc_visibility=yes;
2727                   AC_MSG_RESULT([yes])],
2728                  [ac_cv_gcc_visibility=no;
2729                   AC_MSG_RESULT([no])]);
2730   CXXFLAGS="$save_CXXFLAGS"
2731   AC_LANG_POP(C++)
2735 AM_CONDITIONAL(VISIBILITY_WORKS, test x"$ac_cv_gcc_visibility" = xyes)
2737 if test x"$ac_cv_gcc_visibility" = xyes -a x"$enable_visibility" != xno; then
2738   CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2741 dnl Define convenience constants so Gnash can print out the
2742 dnl default configuration of the build.
2743 RENDERER_CONFIG="${renderer_list}"
2744 RENDERER_LIBS=
2745 for rend in `echo "${add_renderer}" | tr ',' ' '`; do
2746         RENDERER_LIBS="${RENDERER_LIBS} \$(top_builddir)/librender/libgnash${rend}.la"
2747 done
2748 AC_SUBST(RENDERER_LIBS)
2749 AC_SUBST(RENDERER_CONFIG)
2751 HWACCEL_CONFIG="${hwaccel_list}"
2752 AC_SUBST(HWACCEL_CONFIG)
2754 dnl check for missing libraries and disable them.
2755 if test x"$BOOST_LIBS" != x; then
2756   if test x"${cygnal_missing_libs}" != x; then
2757     for i in ${cygnal_missing_libs}; do
2758       if test $i = serialization; then
2759         AC_DEFINE([BOOST_MULTI_INDEX_DISABLE_SERIALIZATION], ["1"], [if the library is missing, don't use it.])
2760       fi
2761     done
2762   fi
2765 CYGNAL_PATHS
2767 SUPPORTED_GUIS=
2768 if test x$build_qtopia3 = xyes; then
2769   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia3"
2771 if test x$build_qtopia4 = xyes; then
2772   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia4"
2774 if test x$build_fb = xyes; then
2775   SUPPORTED_GUIS="${SUPPORTED_GUIS},fb"
2777 if test x$build_fltk = xyes; then
2778   SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk"
2780 if test x$build_kde3 = xyes; then
2781   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde3"
2783 if test x$build_kde4 = xyes; then
2784   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde4"
2786 if test x$build_gtk = xyes; then
2787   SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk"
2789 if test x$build_sdl = xyes; then
2790   SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl"
2792 if test x$build_riscos = xyes; then
2793   SUPPORTED_GUIS="${SUPPORTED_GUIS},riscos"
2795 if test x$build_aqua = xyes; then
2796   SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua"
2798 if test x$build_dump = xyes; then
2799   SUPPORTED_GUIS="${SUPPORTED_GUIS},dump"
2801 if test x$build_aos4 = xyes; then
2802   SUPPORTED_GUIS="${SUPPORTED_GUIS},aos4"
2804 if test x$build_haiku = xyes; then
2805   SUPPORTED_GUIS="${SUPPORTED_GUIS},haiku"
2807 SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
2808 AC_SUBST(SUPPORTED_GUIS)
2810 AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
2811 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in)
2812 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in)
2814 AC_CONFIG_FILES(
2815 gnash.pc:gnash.pc.in
2816 desktop/gnash-gtk-launcher:desktop/gnash-gtk-launcher.in
2817 desktop/gnash-qt-launcher:desktop/gnash-qt-launcher.in
2820 AC_OUTPUT(Makefile
2821 desktop/Makefile
2822 po/Makefile
2823 libmedia/Makefile
2824 libsound/Makefile
2825 libbase/Makefile
2826 libcore/Makefile
2827 libcore/vm/Makefile
2828 libcore/parser/Makefile
2829 libvaapi/Makefile
2830 librender/Makefile
2831 utilities/Makefile
2832 doc/Makefile
2833 doc/C/Makefile
2834 doc/Doxyfile
2835 testsuite/Makefile
2836 testsuite/media/Makefile
2837 testsuite/libbase.all/Makefile
2838 testsuite/as3compile.all/Makefile
2839 testsuite/actionscript.all/Makefile
2840 testsuite/samples/Makefile
2841 testsuite/swfdec/Makefile
2842 testsuite/misc-ming.all/Makefile
2843 testsuite/misc-ming.all/action_order/Makefile
2844 testsuite/misc-ming.all/displaylist_depths/Makefile
2845 testsuite/misc-ming.all/loop/Makefile
2846 testsuite/misc-ming.all/loading/Makefile
2847 testsuite/misc-mtasc.all/Makefile
2848 testsuite/misc-haxe.all/Makefile
2849 testsuite/misc-haxe.all/classes.all/Makefile
2850 testsuite/misc-swfmill.all/Makefile
2851 testsuite/misc-swfmill.all/trace-as2/Makefile
2852 testsuite/misc-swfmill.all/trace-as3/Makefile
2853 testsuite/misc-swfc.all/Makefile
2854 testsuite/network.all/Makefile
2855 testsuite/movies.all/Makefile
2856 testsuite/libcore.all/Makefile
2857 testsuite/libmedia.all/Makefile
2858 gui/Makefile
2859 gui/fb/Makefile
2860 gui/dump/Makefile
2861 gui/Info.plist
2862 gui/pythonmod/Makefile
2863 extensions/Makefile
2864 extensions/dejagnu/Makefile
2865 extensions/mysql/Makefile
2866 extensions/fileio/Makefile
2867 extensions/gtk2/Makefile
2868 extensions/lirc/Makefile
2869 extensions/dbus/Makefile
2870 plugin/Makefile
2871 plugin/npapi/Makefile
2872 plugin/klash/Makefile
2873 plugin/klash4/Makefile
2874 plugin/win32/Makefile
2875 plugin/aos4/Makefile
2876 cygnal/Makefile
2877 cygnal/libnet/Makefile
2878 cygnal/libamf/Makefile
2879 cygnal/cgi-bin/Makefile
2880 cygnal/cgi-bin/echo/Makefile
2881 cygnal/cgi-bin/oflaDemo/Makefile
2882 cygnal/cgi-bin/fitcDemo/Makefile
2883 cygnal/testsuite/Makefile
2884 cygnal/testsuite/libamf.all/Makefile
2885 cygnal/testsuite/libnet.all/Makefile
2886 cygnal/testsuite/cygnal.all/Makefile
2890 ########################## Final report begins... ############################
2893 dnl Create temporary directory in a secure way
2894 tmp=`mktemp -d ${TMPDIR=/tmp}/gnash-configure-XXXXXX`
2895 if test \! -n "$tmp" || test \! -d "$tmp"; then
2896   tmp=`(umask 077 && mkdir -d ${TMPDIR=/tmp}/gnash-configure-${RANDOM}-$$) 2>/dev/null`
2898 cerr=${tmp}/errors
2899 cwarn=${tmp}/warnings
2900 crec=${tmp}/recommended
2901 echo ""
2903 #trap 'rm cerr' 0 # trap isn't a good idea, might override other traps
2904 exec 3> $cerr 
2905 exec 4> $cwarn
2906 exec 5> $crec
2908 echo "Configurable options are:"
2910 if test x"${pthreads}" = x"yes"; then
2911   echo "        POSIX Threads support enabled (default)"
2912 else
2913   if test x"${build_haiku}" = x"yes"; then
2914      echo "        POSIX Thread support built into C library."
2915   els
2916      echo "        POSIX Thread support disabled."
2917   fi
2920 if test x"${dmalloc}" = x"yes"; then
2921   echo "        DMalloc support enabled"
2922   echo "        For a list of the command-line options enter: dmalloc --usage"
2923 else
2924   echo "        DMalloc support disabled (default). Use --enable-dmalloc to enable."
2927 if test x"${npapi}" = x"yes"; then
2928   echo "        NPAPI plugin enabled (default). Use --disable-npapi to disable."
2929   echo "            NPAPI plugin will be installed in ${FIREFOX_PLUGINS}"
2930 else
2931   echo "        NPAPI plugin disabled."
2934 if test x"${build_kparts3}" = x"yes"; then
2935   echo "        KPARTS 3.x plugin enabled (default). Use --disable-kparts3 to disable"
2936   echo "            KPARTS 3.x plugin will be installed in ${KDE3_PLUGINDIR}"
2937   echo "            KPARTS 3.x service will be installed in ${KDE3_SERVICESDIR}"
2938   echo "            KPARTS 3.x config dir will be in ${KDE3_CONFIGDIR}"
2939   echo "            KPARTS 3.x appsdata will be installed in ${KDE3_APPSDATADIR}"
2940 else
2941   echo "        KPARTS 3.x plugin disabled."
2944 if test x"${build_kparts4}" = x"yes"; then
2945   echo "        KPARTS 4.x plugin enabled (default). Use --disable-kparts4 to disable"
2946   echo "            KPARTS 4.x plugin will be installed in ${KDE4_PLUGINDIR}"
2947   echo "            KPARTS 4.x service will be installed in ${KDE4_SERVICESDIR}"
2948   echo "            KPARTS 4.x config dir will be in ${KDE4_CONFIGDIR}"
2949   echo "            KPARTS 4.x appsdata will be installed in ${KDE4_APPSDATADIR}"
2950 else
2951   echo "        KPARTS 4.x plugin disabled."
2954 # set a variable if we shouldn't continue. This way we can print
2955 # out everything that is missing in one pass, hopefully making it
2956 # easy for new developers to get everything they need installed.
2958 echo "Configured paths for ${build} are:"
2960 dnl Dump QT3 options is the user specified a QTOPIA3 or KDE3 GUI
2961 if test x"${build_kde3}" = xyes -o x"${build_qtopia3}" = xyes; then
2962   if test x"${has_qt3}" = xyes; then
2963     echo "        QT3 flags are: ${QT3_CFLAGS}"
2964     echo "        QT3 libs are: ${QT3_LIBS}"
2965   else
2966     echo "        ERROR: No QT 3.x development package installed!" >&3
2967     echo "               Install a QT 3.x development environment from http://trolltech.com" >&3
2968     echo "               or .deb users: apt-get install libqt3-mt-dev" >&3
2969     echo "               or change to a different gui with --enable-gui=..." >&3
2970   fi
2973 dnl Dump QT4 options is the user specified a QTOPIA4 or KDE4 GUI
2974 if test x"${build_kde4}" = xyes -o x"${build_qtopia4}" = xyes; then
2975   if test x"${has_qt4}" = xyes; then
2976     echo "        QT4 flags are: ${QT4_CFLAGS}"
2977     echo "        QT4 libs are: ${QT4_LIBS}"
2978   else
2979     echo "        ERROR: No QT 4.x development package installed!" >&3
2980     echo "               Install a QT 4.x development environment from http://trolltech.com" >&3
2981     echo "               or .deb users: apt-get install qt4-dev-tools" >&3
2982     echo "               or change to a different gui with --enable-gui=..." >&3
2983   fi
2986 if test x"$build_qtopia3" = xyes; then
2987   if test x"${QTOPIA3_LIBS}" != x ; then
2988     if test x"${QTOPIA3_CFLAGS}" != x ; then
2989       echo "        QTOPIA 3.x flags are: $QTOPIA3_CFLAGS"
2990     else
2991       echo "        QTOPIA 3.x flags are: default include path"
2992     fi
2993     echo "        QTOPIA 3.x libs are: $QTOPIA3_LIBS"
2994   else
2995     echo "        ERROR: No QTOPIA 3.x library development package installed!" >&3
2996     echo "               Install it from http://trolltech.com/downloads/" >&3
2997     echo "               binary packages are not available." >&3
2998   fi
3001 if test x"$build_qtopia4" = xyes; then
3002   if test x"${QTOPIA4_LIBS}" != x ; then
3003     if test x"${QTOPIA4_CFLAGS}" != x ; then
3004       echo "        QTOPIA 4.x flags are: $QTOPIA4_CFLAGS"
3005     else
3006       echo "        QTOPIA 4.x flags are: default include path"
3007     fi
3008     echo "        QTOPIA 4.x libs are: $QTOPIA4_LIBS"
3009   else
3010     echo "        ERROR: No QTOPIA 4.x library development package installed!" >&3
3011     echo "               Install it from http://trolltech.com/downloads/" >&3
3012     echo "               binary packages are not available." >&3
3013   fi
3017 # -o x$build_kparts3 = xyes
3018 if test x$build_kde3 = xyes; then
3019   if test x"$has_kde3" = xyes; then
3020     echo "        KDE 3.x flags are: $KDE3_CFLAGS"
3021     echo "        KDE 3.x libs are: $KDE3_LIBS"
3022   else
3023       echo "        ERROR: No KDE 3.x development package installed!" >&3
3024       echo "               To disable the KDE 3.x gui," >&3
3025       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
3026       echo "               and omit "kde" from the list." >&3
3027       echo "               or avoid --enable-gui=... as a whole." >&3
3028       echo "               To be able to build the kde 3.x gui," >&3
3029       echo "               install version 3.x of the KDE development environment" >&3
3030       echo "               from http://kde.org" >&3
3031       echo "               or .deb users: apt-get install kdelibs4-dev" >&3
3032       echo "               or .rpm users: yum install kdelibs3-devel." >&3
3033   fi
3036 # -o x$build_kparts4 = xyes
3037 if test x$build_kde4 = xyes; then
3038   if test x"$has_kde4" = xyes; then
3039     echo "        KDE 4.x flags are: $KDE4_CFLAGS"
3040     echo "        KDE 4.x libs are: $KDE4_LIBS"
3041   else
3042       echo "        ERROR: No KDE 4.x development package installed!" >&3
3043       echo "               To disable the KDE 4.x gui," >&3
3044       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
3045       echo "               and omit "kde4" from the list" >&3
3046       echo "               or avoid --enable-gui=... as a whole." >&3
3047       echo "               To be able to build the kde 4.x gui," >&3
3048       echo "               install version 4.x of the KDE development environment" >&3
3049       echo "               from http://kde.org" >&3
3050       echo "               or .deb users: apt-get install kdelibs5-dev" >&3
3051       echo "               or .rpm users: yum install kdelibs-devel." >&3
3052   fi
3055 if test x"${JPEG_LIBS}" != x ; then
3056   if test x"${JPEG_CFLAGS}" != x ; then
3057     echo "        JPEG flags are: $JPEG_CFLAGS"
3058   else
3059     echo "        JPEG flags are: default include path"
3060   fi
3061   echo "        JPEG libs are: $JPEG_LIBS"
3062 else
3063   echo "        ERROR: No JPEG library development package installed!" >&3
3064   echo "               Install it from http://ijg.org" >&3
3065   echo "               or .deb users: apt-get install libjpeg-dev" >&3
3066   echo "               or .rpm users: yum install libjpeg-devel" >&3
3069 if test x"${GIF_LIBS}" != x ; then
3070   if test x"${GIF_CFLAGS}" != x ; then
3071     echo "        GIF flags are: $GIF_CFLAGS"
3072   else
3073     echo "        GIF flags are: default include path"
3074   fi
3075   echo "        GIF libs are: $GIF_LIBS"
3076 else
3077   echo "        ERROR: No GIF library development package installed!" >&3
3078   echo "               Install it from http://sourceforge.net/projects/giflib/" >&3
3079   echo "               or .deb users: apt-get install libungif-dev" >&3
3080   echo "               or maybe     : apt-get install libgif-dev" >&3
3081   echo "               or .rpm users: yum install libungif-devel" >&3
3084 if test x"${PNG_LIBS}" != x ; then
3085   if test x"${PNG_CFLAGS}" != x ; then
3086     echo "        PNG flags are: $PNG_CFLAGS"
3087   else
3088     echo "        PNG flags are: default include path"
3089   fi
3090   echo "        PNG libs are: $PNG_LIBS"
3091 else
3092   echo "        RECOMMENDED: No PNG library development package installed!" >&5
3093   echo "                     Gnash will be built without support for dynamic loading of PNG files." >&5
3094   echo "                     Install it from http://www.libpng.org" >&5
3095   echo "                     or .deb users: apt-get install libpng12-dev" >&5
3096   echo "                     or .rpm users: yum install libpng-devel" >&5
3099 if test x"${build_ogl}" = x"yes"; then
3100   if test x"$OPENGL_LIBS" != x; then
3101     if test x"$OPENGL_CFLAGS" != x; then
3102       echo "        OpenGL flags are: $OPENGL_CFLAGS"
3103     else
3104       echo "        OpenGL flags are: default include path"
3105     fi
3106     echo "        OpenGL libs are: $OPENGL_LIBS"
3107     else
3108       echo "        ERROR: No OpenGL development package installed!" >&3
3109       echo "               You need to install the libmesa development package" >&3
3110       echo "               or .deb users: apt-get install libgl1-mesa-dev" >&3
3111       echo "               or .rpm users: yum install xorg-x11-Mesa-libGL" >&3
3112       echo "               or use a different renderer with --enable-renderer=" >&3
3113   fi
3116 if test x"${build_gles}" = x"yes"; then
3117   if test x"${has_gles}" != x; then
3118     if test x"$GLES_CFLAGS" != x; then
3119       echo "        OpenGL-ES flags are: $GLES_CFLAGS"
3120     else
3121       echo "        OpenGL-ES flags are: default include path"
3122     fi
3123     echo "        OpenGL-ES libs are: $GLES_LIBS"
3124   else
3125       echo "        ERROR: No OpenGL-ES development package installed!" >&3
3126       echo "               You need to install the this from source proobably" >&3
3127       echo "               or use a different renderer with --enable-renderer=" >&3
3128   fi
3131 dnl GLEXT is only needed for GTK/OpenGL
3132 if test x$build_gtk = xyes -a x$build_ogl = xyes ; then
3133   if test x"$GLEXT_LIBS" != x; then
3134     if test x"$GLEXT_CFLAGS" != x; then
3135       echo "        GtkGLExt flags are: $GLEXT_CFLAGS"
3136     else
3137       echo "        GtkGLExt flags are: default include path"
3138     fi
3139       echo "        GtkGLExt libs are: $GLEXT_LIBS"
3140   else
3141     if test x$build_gtk = xyes; then
3142       if test x$build_ogl = xyes; then
3143         echo "        ERROR: No GtkGLExt development package installed!" >&3
3144         echo "               It is needed to build the GTK/OpenGL GUI/renderer combination." >&3
3145         echo "               Either install it from http://gtkglext.sourceforge.net" >&3
3146         echo "               or .deb users: apt-get install libgtkglext1-dev" >&3
3147         echo "               or .rpm users: yum install gtkglext-devel" >&3
3148         echo "               or --enable-gui=sdl or --enable-renderer=agg" >&3
3149       fi
3150     fi
3151   fi
3155 if test x$build_gtk = xyes; then #{
3156   if test x"$GTK2_LIBS" != x; then
3157     if test x"$GTK2_CFLAGS" != x; then
3158       echo "        GTK2 flags are: $GTK2_CFLAGS"
3159     else
3160       echo "        GTK2 flags are: default include path"
3161     fi
3162       echo "        GTK2 libs are: $GTK2_LIBS"
3163   else
3164     echo "        ERROR: No GTK2 development package installed!" >&3
3165     echo "               Install it from http://gtk.org" >&3
3166     echo "               or .deb users: apt-get install libgtk2.0-dev" >&3
3167     echo "               or .rpm users: yum install gtk2-devel" >&3
3168   fi
3170   if test x"$PANGO_LIBS" != x; then
3171     if test x"$PANGO_CFLAGS" != x; then
3172       echo "        Pango flags are: $PANGO_CFLAGS"
3173     else
3174       echo "        Pango flags are: default include path"
3175     fi
3176     echo "        Pango libs are: $PANGO_LIBS"
3177   else
3178     echo "        ERROR: No Pango development package installed!" >&3
3179     echo "               Install it from http://pango.org" >&3
3180     echo "               or .deb users: apt-get install libpango1.0-dev" >&3
3181     echo "               or .rpm users: yum install pango-devel" >&3
3182   fi
3184   if test x"$GLIB_LIBS" != x; then
3185     if test x"$GLIB_CFLAGS" != x; then
3186       echo "        GLib flags are: $GLIB_CFLAGS"
3187     else
3188       echo "        GLib flags are: default include path"
3189     fi
3190     echo "        GLib libs are: $GLIB_LIBS"
3191   else
3192     echo "        ERROR: No GLib development package installed!" >&3
3193     echo "               Install it from http://gtk.org" >&3
3194     echo "               or .deb users: apt-get install libglib2.0-dev" >&3
3195     echo "               or .rpm users: yum install glib2-devel" >&3
3196   fi
3198   if test x"$ATK_LIBS" != x; then
3199     if test x"$ATK_CFLAGS" != x; then
3200       echo "        ATK flags are: $ATK_CFLAGS"
3201     else
3202       echo "        ATK flags are: default include path"
3203     fi
3204       echo "        ATK libs are: $ATK_LIBS"
3205   else
3206     echo "        ERROR: No ATK development package installed!" >&3
3207     echo "               Install it from http://gtk.org" >&3
3208     echo "               or .deb users: apt-get install libatk1.0-dev" >&3
3209     echo "               or .rpm users: yum install atk-devel" >&3
3210   fi
3214 if test x"$build_media_gst" = x"yes"; then
3215   if test x"$missing_codecs" != x; then   
3216       echo "        Your Gstreamer installation is missing these codecs: $missing_codecs"
3217       echo "        Please install the gstreamer-ffmpeg for Gstreamer"
3218   fi  
3219   if test x"$GSTREAMER_LIBS" != x; then
3220     if test x"$GSTREAMER_CFLAGS" != x; then
3221       echo "        Gstreamer flags are: $GSTREAMER_CFLAGS"
3222     else
3223       echo "        Gstreamer flags are: default include path"
3224     fi
3225     echo "        Gstreamer libs are: $GSTREAMER_LIBS"
3226     if test x"$has_gstreamer_pbutils" != "xyes"; then
3227       echo "        RECOMMENDED: If the user has not installed the necessary Gstreamer plugins," >&5
3228       echo "                     Gstreamer can pop up a message prompting them to." >&5
3229       echo "                     Install gstpbutils (>= 0.10.15) from http://www.gstreamer.net for that to be enabled" >&5
3230       echo "                     or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&5
3231       echo "                     Also see --with-gstpbutils-incl and --with-gstpbutils-lib" >&5
3232     fi
3233     if test x"$has_gstreamer_plugins_base" = "xno"; then
3234       dnl check if this is really a mandatory asset !
3235       echo "        ERROR: base plugins are required for gstreamer media" >&3
3236       echo "                        Install gstreamer-plugins-base from http://www.gstreamer.net" >&3
3237       echo "                        or .rpm users: yum install gstreamer-plugins-base-devel" >&3
3238       echo "                        or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&3
3239     fi
3240   else
3241     echo "        ERROR: GST media handling requested but gstreamer-0.10+ not found" >&3
3242     echo "               Install it from http://www.gstreamer.net" >&3
3243     echo "               or .deb users: apt-get install libgstreamer0.10-dev" >&3
3244     echo "               or .rpm users: yum install gstreamer-devel" >&3
3245     echo "               or             yast install gstreamer010-devel" >&3
3246   fi
3249   if test x"${build_media_ffmpeg}" = x"yes"; then
3250     if test x"$FFMPEG_LIBS" != x; then
3251       echo "        MP3 and video support enabled through FFmpeg"
3252       if test x"${ffmpeg_version_check}" != xok; then
3253         echo "        ERROR: You have version ${ffmpeg_version} of FFmpeg installed," >&3
3254         if test x"${have_ffmpeg_swscale}" = "xno"; then
3255           echo "               with no swscale enabled." >&3
3256         else
3257           echo "               with swscale enabled." >&3
3258         fi
3259         echo "               This setup isn't supported!" >&3
3260         echo "               Version 51.11.0 or newer is required, enabling swscale if >= 52.0.0." >&3
3261         echo "               You can install libswscale from http://ffmpeg.org" >&3
3262         echo "               or .deb users: apt-get install libswscale-dev" >&3
3263       else
3264         if test x"${avformat_h}" = x; then
3265           echo "        ERROR: FFmpeg's libavcodec header is installed but not libavformat." >&3
3266           echo "               You can install FFmpeg from http://ffmpeg.org" >&3
3267           echo "               or .deb users: apt-get install libavformat-dev" >&3
3268           echo "               or YaST users: yast -i libavformat-api (but currently installs into /usr/lib64)" >&3
3269           echo "               or explicitly set the path using --with-ffmpeg-incl=" >&5
3270           echo "               or reconfigure with --enable-media=gst" >&3
3271         else
3272           if test x"$FFMPEG_CFLAGS" != x; then
3273             echo "        FFmpeg flags are: $FFMPEG_CFLAGS"
3274           else
3275             echo "        FFmpeg flags are: default include path"
3276           fi
3277           echo "        FFmpeg libs are: $FFMPEG_LIBS"
3278         fi
3279       fi
3280     else
3281       echo "        ERROR: No FFmpeg development package installed!" >&3
3282       echo "               You can install FFmpeg from http://ffmpeg.org" >&3
3283       echo "               or .deb users: apt-get install libavformat-dev" >&3
3284       echo "               or .rpm users: yum install ffmpeg-devel" >&3
3285       echo "               or reconfigure with --enable-media=gst" >&3
3286     fi
3287   fi
3289 if test x$build_cairo = xyes; then
3290   if test x"$CAIRO_LIBS" != x; then
3291     if test x"$CAIRO_CFLAGS" != x; then
3292       echo "        Cairo flags are: $CAIRO_CFLAGS"
3293     else
3294       echo "        Cairo flags are: default include path"
3295     fi
3296     echo "        Cairo libs are: $CAIRO_LIBS"
3297   else
3298     echo "        ERROR: No Cairo development package installed!" >&3
3299     echo "               You need to have the Cairo development package installed" >&3
3300     echo "               if you have used --enable-render=cairo to configure." >&3
3301     echo "               Install it from http://cairographics.org" >&3
3302     echo "               or .deb users: apt-get install libcairo-dev" >&3
3303     echo "               or .rpm users: yum install cairo-devel" >&3
3304   fi
3307 if test x$build_fltk = xyes; then
3308   if test x"$FLTK2_LIBS" != x; then
3309     if test x"$FLTK2_CFLAGS" != x; then
3310       echo "        FLTK flags are: $FLTK2_CFLAGS"
3311     else
3312       echo "        FLTK flags are: default include path"
3313     fi
3314       echo "        FLTK libs are: $FLTK2_LIBS"
3315   else
3316     echo "        ERROR: No FLTK2 development package installed!" >&3
3317     echo "               There are currently no Debian or RPM packages for FLTK2;" >&3
3318     echo "               see http://www.fltk.org to install it from source." >&3
3319     echo "               or change to a different gui with --enable-gui=..." >&3
3320   fi
3323 if test x$build_fltk = xyes; then
3324   if test x"$XFT_LIBS" != x; then
3325     if test x"$XFT_CFLAGS" != x; then
3326       echo "        Xft flags are: $XFT_CFLAGS"
3327     else
3328       echo "        Xft flags are: default include path"
3329     fi
3330       echo "        Xft libs are: $XFT_LIBS"
3331   fi
3334 # See whether SDL is required
3335 need_sdl=false
3336 test x$build_sdl = xyes                 && need_sdl=true
3337 test x$build_sound_sdl = xyes   && need_sdl=true
3339 if $need_sdl; then
3340   if test x"$SDL_LIBS" != x; then
3341     echo "        SDL flags are: $SDL_CFLAGS"
3342     echo "        SDL libs are: $SDL_LIBS"
3343   else
3344     echo "        ERROR: No SDL development package installed!" >&3
3345     echo "               Install it from http://www.libsdl.org/download-1.2.php" >&3
3346     echo "               or .deb users: apt-get install libsdl1.2-dev" >&3
3347     echo "               or .rpm users: yum install SDL-devel" >&3
3348     test x$build_sdl = xyes &&
3349         echo "               or select a different GUI with --enable-gui= " >&3
3350   fi
3352 unset need_sdl
3354 if test x"$nsapi" = x"yes"; then
3355     echo "        Plugin will be installed in ${FIREFOX_PLUGINS}"
3358 if test x"${pthreads}" = x"yes"; then
3359   if test x"$PTHREAD_CFLAGS" != x; then
3360     echo "        POSIX Threads flags are: $PTHREAD_CFLAGS"
3361   fi
3362   if test x"${PTHREAD_LIBS}" != x; then
3363     echo "        POSIX Threads lib is: $PTHREAD_LIBS"
3364   else
3365     if test x"${cross_compiling}" = xno; then
3366       echo "ERROR: No pthread development package installed!" >&3
3367     fi
3368   fi
3371 if test x"${docbook}" = x"yes"; then
3372   if test x"$MAKEINFO" = x; then
3373     echo "        ERROR: no makeinfo tools installed!" >&3
3374     echo "               Either install it from http://www.gnu.org/software/texinfo/" >&3
3375     echo "               or .deb users: apt-get install texinfo" >&3
3376     echo "               or configure without --enable-docbook" >&3
3377   fi
3378   dnl low-level tools
3379   if test x"$DB2X_TEXIXML" = x -o x"$DB2X_MANXML" = x -o x"$DB2X_XSLTPROC" = x; then
3380     dnl high-level tools
3381     if test x"${DB2X_TEXI}" = x -o x"${DB2X_MAN}" = x; then
3382       echo "        ERROR: No DocBook2X tools installed!" >&3
3383       echo "               Either install it from http://docbook2x.sourceforge.net" >&3
3384       echo "               or .deb users: apt-get install docbook docbook2x docbook-utils" >&3
3385       echo "                              docbook-xml docbook-xsl texinfo xsltproc" >&3
3386       echo "               or configure without --enable-docbook" >&3
3387     fi
3388   else
3389     echo "        You have version $db2x_version of the DocBook2X tools."
3390   fi
3391 else
3392   echo "        WARNING: without --enable-docbook we will use the cached" >&4
3393   echo "                 documentation files included in the gnash distribution." >&4
3394   echo "                 If you change files in doc/C, you should --enable-docbook." >&4
3397 if test x"$CURL_LIBS" != x; then
3398   if test x"$CURL_CFLAGS" != x; then
3399     echo "        CURL flags are: $CURL_CFLAGS"
3400   else
3401     echo "        CURL flags are: default include path"
3402   fi
3403     echo "        CURL libs are: $CURL_LIBS"
3404 else
3405   echo "        RECOMMENDED: If you install the CURL library, Gnash will be able to" >&5
3406   echo "                     display remote content (streaming from URLs) using CURL." >&5
3407   echo "                     Install libcurl from http://curl.haxx.se/libcurl" >&5
3408   echo "                     or .deb users: apt-get install libcurl-dev" >&5
3409   echo "                     or .rpm users: yum install curl-devel" >&5
3412 if test x"$SPEEX_LIBS" != x; then
3413   if test x"$SPEEX_CFLAGS" != x; then
3414     echo "        Speex flags are: $SPEEX_CFLAGS"
3415   else
3416     echo "        Speex flags are: default include path"
3417   fi
3418     echo "        Speex libs are: $SPEEX_LIBS"
3419 else
3420   echo "        RECOMMENDED: If you install the Speex library, Gnash will be able to" >&5
3421   echo "                     decoded Speex encoded audio in FLV files." >&5
3422   echo "                     Install libspeex from http://speex.org" >&5
3423   echo "                     or .deb users: apt-get install libspeex-dev" >&5
3424   echo "                     or .rpm users: yum install speex-devel" >&5
3427 if test x"$ext_dbus" = xyes; then
3428   if test x"$DBUS_LIBS" != x; then
3429     if test x"$DBUS_CFLAGS" != x; then
3430       echo "        DBUS flags are: $DBUS_CFLAGS"
3431     else
3432       echo "        DBUS flags are: default include path"
3433     fi
3434       echo "        DBUS libs are: $DBUS_LIBS"
3435   else
3436     echo "        WARNING: DBUS library not found." >&4
3437     echo "                 Gnash will be built without support for remote controls." >&4
3438     echo "                 Why not install libdbus from http://www.dbus.org" >&4
3439     echo "                 or .deb users: apt-get install dbus-dev" >&4
3440     echo "                 or .rpm users: yum install dbus-devel" >&4
3441   fi
3444 if test x$build_agg = xyes; then # {
3445   echo "        AGG Pixel format is: $pixelformat"
3446     if test x"$AGG_LIBS" != x; then # {
3447       if test x"${agg25}" != xyes; then # {
3448         echo "        ERROR: Your installation of AGG appears to be version 2.4 or older." >&3
3449         echo "               Please upgrade to AGG 2.5 or greater." >&3
3450         echo "               Install it from http://www.antigrain.com" >&3
3451         echo "               or .deb users: apt-get install libagg-dev" >&3
3452         echo "               or .rpm users: yum install agg-devel" >&3
3453       else # }{
3454         if test x"$AGG_CFLAGS" != x; then # {
3455           echo "        AGG flags are: $AGG_CFLAGS"
3456         else # }{
3457           echo "        AGG flags are: default include path"
3458         fi # }
3459         echo "        AGG libs are: $AGG_LIBS"
3460       fi # }
3461     else # }{
3462       echo "        ERROR: No AGG development package installed!" >&3
3463       echo "               Install it from http://www.antigrain.com" >&3
3464       echo "               or .deb users: apt-get install libagg-dev" >&3
3465       echo "               or .rpm users: yum install agg-devel" >&3
3466     fi # }
3467 fi # }
3469 if test x"$BOOST_LIBS" != x; then
3470         echo "        BOOST flags are: $BOOST_CFLAGS"
3471         echo "        BOOST libs are: $BOOST_LIBS"
3472         echo "        BOOST libs for cygnal are: $BOOST_CYGNAL_LIBS"
3473     dnl fi
3474     if test x"${missing_headers}" != x; then
3475       for i in ${missing_headers}; do
3476         echo "        ERROR: The BOOST $i header file is needed!" >&3
3477         echo "               Install it from http://boost.org" >&3
3478         echo "               or from a Boost development package" >&3
3479       done
3480     fi
3482     if test x"${cygnal}" = x"yes"; then
3483         if test x"${cygnal_missing_libs}" != x; then
3484           for i in ${cygnal_missing_libs}; do
3485             echo "          ERROR: The BOOST $i library is required for cygnal!" >&4
3486             echo "                 Either configure with --disable-cygnal or" >&4
3487             echo "                 install it from http://www.boost.org" >&4
3488             echo "                 or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&4
3489           done
3490         fi
3491     fi
3493     if test x"${missing_libs}" != x; then
3494       for i in ${missing_libs}; do
3495         echo "        ERROR: The BOOST $i library is needed!" >&3
3496         echo "               Install it from http://boost.org" >&3
3497         echo "               or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&3
3498       done
3499     fi
3500 else
3501     echo "        ERROR: No BOOST development package installed!" >&3
3502     echo "               Install it from http://www.boost.org" >&3
3503     echo "               or .deb users: apt-get install libboost-dev libboost-thread-dev" >&3
3504     if test x"$cygnal" = xyes; then
3505     echo "                              and libboost-date-time-dev (for cygnal)" >&3
3506     fi
3507     echo "               or .rpm users: yum install boost-devel" >&3
3510 dnl don't look for the flash compilers when cross compiling.
3511 if test x"$testsuite" = x"yes"; then
3512   if test x$cross_compiling = xno; then
3513     if test x"$MING_LIBS" != x; then
3514       echo "        MING flags are $MING_CFLAGS"
3515       echo "        MING libs are $MING_LIBS"
3516     else
3517       echo "        WARNING: You need to have the Ming development package" >&4
3518       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3519       echo "                 Install it from http://www.libming.org/" >&4
3520       echo "                 or .deb users: apt-get install libming-dev" >&4
3521     fi
3523     if test x"$MAKESWF" != x; then
3524       echo "        MING version code is $MING_VERSION_CODE"
3525       echo "        MAKESWF is $MAKESWF"
3526     else
3527       echo "        WARNING: You need to have the Ming utilities package" >&4
3528       echo "                 version 0.4 or higher installed to run" >&4
3529       echo "                 many of the tests in Gnash testsuite." >&4
3530       echo "                 Install it from http://www.libming.org" >&4
3531       echo "                 or .deb users: apt-get install libming-util" >&4
3532     fi
3534     if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; then
3535       echo "        WARNING: You have an older version of Ming installed and will not" >&4
3536       echo "                 be able to run all of the tests in Gnash testsuite." >&4
3537       echo "                 Install the latest version from http://www.libming.org" >&4
3538     fi
3540     if test x"$SWFDEC_TESTSUITE" != x; then
3541       echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
3542     fi
3544     if test x"$MTASC" != x; then
3545       echo "        MTASC is $MTASC"
3546       echo "        MTASC CLASSPATH is $MTASC_CLASSPATH"
3547     else
3548       echo "        WARNING: You need to have the MTASC compiler packages installed" >&4
3549       echo "                 to run some of the tests in Gnash testsuite." >&4
3550       echo "                 You can install it from http://mtasc.org" >&4
3551       echo "                 or .deb users: apt-get install mtasc" >&4
3552     fi
3554     if test x"$HAXE" != x; then
3555       echo "        HAXE is $HAXE"
3556       echo "        HAXE CLASSPATH is $HAXE_CLASSPATH"
3557     else
3558       echo "        WARNING: You need to have the HAXE compiler package " >&4
3559       echo "                 version 2.00 or higher installed" >&4
3560       echo "                 to run some of the tests in Gnash testsuite." >&4
3561       echo "                 You can install it from http://haxe.org" >&4
3562       echo "                 or .deb users: apt-get install haxe" >&4
3563     fi
3565     if test x"$SWFMILL" != x; then
3566       echo "        SWFMILL is $SWFMILL"
3567       if test x"$ENABLE_AVM2" != x -a "$SWFMILL_VERSION" -lt 00021206; then
3568         echo "        WARNING: You are building Gnash with AVM2 support but" >&4
3569         echo "                 your swfmill version is too old to run AS3" >&4
3570         echo "                 tests." >&4
3571       fi
3572     else
3573       echo "        WARNING: You need to have the 'swfmill' tool installed" >&4
3574       echo "                 to run some of the tests in Gnash testsuite." >&4
3575       echo "                 You can install it from http://swfmill.org/" >&4
3576       echo "                 or .deb users: apt-get install swfmill" >&4
3577     fi
3579     if test x"$SWFC" != x; then
3580       echo "        SWFC is $SWFC"
3581     else
3582       echo "        WARNING: You need to have 'swfc' from SWFTools installed" >&4
3583       echo "                 to run some of the tests in Gnash testsuite." >&4
3584       echo "                 You can install it from http://www.swftools.org/" >&4
3585       echo "                 or .deb users: apt-get install swftools" >&4
3586     fi
3588     if test x"$AS3COMPILE" != x; then
3589       echo "        AS3COMPILE is $AS3COMPILE"
3590     else
3591       echo "        WARNING: you need as3compile from SWFTools" >&4
3592       echo "                 to run some of the tests in Gnash testsuite." >&4
3593       echo "                 You can install it from http://www.swftools.org/" >&4
3594     fi
3596     if test x"$HTTP_TESTSUITE" != x; then
3597       echo "        HTTP testsuite dir is $HTTP_TESTSUITE"
3598     fi
3600     if test x"$RED5_HOST" != x; then
3601       echo "        RED5 testing host is $RED5_HOST"
3602     fi
3603   fi
3606   if test x"$PERL" != x; then
3607     echo "        PERL is $PERL"
3608   else
3609     echo "        WARNING: You need to have perl installed" >&4
3610     echo "                 to run some of the tests in Gnash testsuite." >&4
3611   fi
3613 if test x"$testsuite" = x"yes"; then
3614   if test x"$CSOUND" != x; then
3615     echo "        CSOUND is $CSOUND"
3616   fi
3619 if test x"$Z_LIBS" != x; then
3620   if test x"$Z_CFLAGS" != x; then
3621     echo "        Z flags are: $Z_CFLAGS"
3622   else
3623     echo "        Z flags are: default include path"
3624   fi
3625   echo "        Z libs are: $Z_LIBS"
3626 else
3627   echo "        RECOMMENDED: You need to have the zlib development packages installed" >&5
3628   echo "                     to play compressed SWF (most of them from version 6 up)" >&5
3629   echo "                     and to display some kinds of JPEG files." >&5
3630   echo "                     Install it from http://www.zlib.net" >&5
3631   echo "                     or .deb users: apt-get install zlib1g-dev" >&5
3632   echo "                     or .rpm users: yum install zlib-devel." >&5
3633   echo "                     It may still be possible to configure without zlib." >&5
3636 if test x"$FREETYPE2_LIBS" != x; then
3637   if test x"$FREETYPE2_CFLAGS" != x; then
3638     echo "        FreeType flags are: $FREETYPE2_CFLAGS"
3639   else
3640     echo "        FreeType flags are: default include path"
3641   fi
3642   echo "        FreeType libs are: $FREETYPE2_LIBS"
3643 else
3644   echo "        RECOMMENDED: You need to have the freetype development packages installed" >&5
3645   echo "                     to use device fonts." >&5
3646   echo "                     Install it from http://www.freetype.org" >&5
3647   echo "                     or .deb users: apt-get install libfreetype6-dev" >&5
3648   echo "                     or .rpm users: yum install freetype-devel" >&5
3649   echo "                     It may still be possible to configure without freetype." >&5
3652 if test x"$FONTCONFIG_LIBS" != x; then
3653   if test x"$FONTCONFIG_CFLAGS" != x; then
3654     echo "        Fontconfig flags are: $FONTCONFIG_CFLAGS"
3655   else
3656     echo "        Fontconfig flags are: default include path"
3657   fi
3658   echo "        Fontconfig libs are: $FONTCONFIG_LIBS"
3659 else
3660   echo "        RECOMMENDED: You need to have the fontconfig development packages installed" >&5
3661   echo "                     to use device fonts." >&5
3662   echo "                     Install it from http://www.fontconfig.org" >&5
3663   echo "                     or .deb users: apt-get install libfontconfig1-dev" >&5
3664   echo "                     or .rpm users: yum install fontconfig-devel" >&5
3665   echo "                     It may still be possible to configure without fontconfig." >&5
3668 if test x$ext_mysql = xyes; then
3669   if test x$mysql != xno; then
3670     if test x"$MYSQL_LIBS" != x; then
3671       echo "        MYSQL flags are: $MYSQL_CFLAGS"
3672       echo "        MYSQL libs are: $MYSQL_LIBS"
3673     else
3674       echo "        ERROR: No MySQL development package is installed." >&3
3675       echo "               Either reconfigure without --enable-extensions=mysql" >&3
3676       echo "               or install MySQL header files from http://www.mysql.org" >&3
3677       echo "               or .deb users: apt-get install libmysqlclient-dev" >&3
3678       echo "                 or .rpm users: yum install mysql-devel" >&4
3679     fi
3680   fi
3683 if test "$GMSGFMT" = ":"; then
3684   echo "        WARNING: You need the gettext package installed to use translations." >&4
3685   echo "                 Required for building a package or 'make distcheck'" >&4
3686   echo "                 Install it from http://www.gnu.org/software/gettext/" >&4
3687   echo "                 or .deb users: apt-get install gettext" >&4
3688   echo "                 or .rpm users: yum install gettext" >&4
3691 if test x"${build_vaapi}" = x"yes"; then
3692   if test x"${LIBVA_CFLAGS}" = xyes; then
3693       echo "        LIBVA flags are: default"
3694     else
3695       echo "        LIBVA flags are: $LIBVA_CFLAGS"
3696       echo "        LIBVA libraries are: $LIBVA_LIBS"
3697   fi
3698   if test x$use_libva_x11 = xyes; then
3699     if test x"${LIBVA_X11_CFLAGS}" = xyes; then
3700       echo "        LIBVA X11 flags are: default"
3701     else
3702       echo "        LIBVA X11 flags are: $LIBVA_X11_CFLAGS"
3703       echo "        LIBVA X11 libraries are: $LIBVA_X11_LIBS"
3704     fi
3705   fi
3706   if test x$use_libva_glx = xyes; then
3707     if test x"${LIBVA_GLX_CFLAGS}" = xyes; then
3708       echo "        LIBVA GLXflags are: default"
3709     else
3710       echo "        LIBVA GLX flags are: $LIBVA_GLX_CFLAGS"
3711     fi
3712     echo "        LIBVA GLX libraries are: $LIBVA_GLX_LIBS"
3713   fi
3716 if test x"$ac_cv_gcc_visibility" != xyes; then
3717   if test x"$npapi" = xyes; then
3718     echo "        WARNING: NPAPI (mozilla) plugin is enabled, but your compiler"
3719     echo "                 does not support symbol visibility. This may cause "
3720     echo "                 the plugin to malfunction and may result in small "
3721     echo "                 children being eaten. You have been warned!"
3722   fi
3725 if test x"$npapi" = xyes; then
3726   if test x"$has_npapi" = xyes; then
3727     echo "        NPAPI flags are: $NPAPI_CFLAGS"
3728   else
3729     echo "        ERROR : No xulrunner development package is installed" >&3
3730     echo "                Install it from http://releases.mozilla.org/pub/mozilla.org/xulrunner" >&3
3731     echo "                or .deb users: apt-get install xulrunner-dev" >&3
3732     echo "                or .rpm users: yum install xulrunner-devel" >&3
3733   fi
3734 else
3735   echo "        NPAPI plugin is disabled"
3738 if test x"${DEJAGNU}" != x""; then
3739   echo "        DEJAGNU's runtest is $DEJAGNU"
3740 else
3741   echo "        WARNING: You need the dejagnu package installed to get a summary" >&4
3742   echo "                 report after running ''make check''" >&4
3743   echo "                 Install it from http://www.gnu.org/software/dejagnu/" >&4
3744   echo "                 or .deb users: apt-get install dejagnu" >&4
3745   echo "                 or .rpm users: yum install dejagnu" >&4
3748 dnl Haiku
3749 if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o x"${build_media_haiku}" = x"yes"; then
3750     echo "        Haiku libs are: $HAIKU_LIBS"
3753 if test x"$has_ltdl" = x"yes";then
3754   echo "        LIBLTDL flags are: $LTDL_CFLAGS"
3755   echo "        LIBLTDL libs are: $LTDL_LIBS"
3756 else
3757   echo "        ERROR: No libltdl development package is installed" >&3
3758   echo "               Install it from ftp://ftp.gnu.org/gnu/libtool/" >&3
3759   echo "               or .deb users: apt-get install libltdl-dev" >&3
3760   echo "               or .rpm users: yum install libtool-ltdl-devel" >&3
3763 if test x"$python" = x"yes"; then
3764   if test x"$has_python" = x"yes"; then
3765     echo "        PYTHON flags are: $PYTHON_CFLAGS"
3766     echo "        PYTHON libs are: $PYTHON_LIBS"
3767     echo "        PYTHON executable is: $PYTHON"
3768   else
3769     echo "        ERROR: No Python development package is installed, but it's enabled." >&3
3770   fi
3772 if test x${build_ssl} = xyes; then
3773   if test x"${has_ssl}" = xyes; then
3774     if test x"${SSL_CFLAGS}" = xyes; then
3775       echo "        SSL flags are: default"
3776     else
3777       echo "        SSL flags are: $SSL_CFLAGS"
3778     fi
3779     echo "        SSL libs are: $SSL_LIBS"
3780   else
3781     echo "        ERROR: No SSL development package is installed, but it's enabled." >&3
3782   fi
3785 if test x${build_ssh} = xyes; then
3786   if test x"${has_ssh}" = xyes; then
3787     if test x"${SSH_CFLAGS}" = xyes; then
3788       echo "        SSH flags are: default"
3789     else
3790       echo "        SSH flags are: $SSH_CFLAGS"
3791     fi
3792     echo "        SSH libs are: $SSH_LIBS"
3793   else
3794     echo "        ERROR: No SSH development package is installed, but it's enabled." >&3
3795   fi
3798 if test x"${build_all_as3}" = x"yes"; then
3799   echo "        Building the entire ActionScript class libary"
3800 else
3801   echo "        Only building these ActionScript classes into the library:"
3802   echo "     ${classlist}"
3805 if test x"$testsuite" = x"yes"; then
3806   if test x"$NETCAT" != x; then
3807     echo "        You have netcat installed, which is only used for testing"
3808   else
3809     echo "        Install netcat for networking test support"
3810   fi
3811   if test x"$WGET" != x; then
3812     echo "        You have wget installed, which is only used for testing"
3813   else
3814     echo "        Install wget for networking test support"
3815   fi
3818 if test x$cross_compiling = xyes; then
3819    if test x"${android_ndk}" != xno; then
3820       AC_MSG_NOTICE([This build is setup for cross compiling for Android])
3821    else
3822       AC_MSG_NOTICE([This build is setup for cross compiling])
3823    fi
3826 echo "--------"
3828 if test x"${cygnal}" = x"yes"; then
3829   echo "        Building Cygnal media server enabled (default). Use --disable-cygnal to disable."
3830 else
3831   echo "        Building Cygnal media server disabled."
3834 if test x"${with-top_level}" != x; then
3835   echo "        Top level for cross compiling support files is: $with_top_level"
3838 if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
3839   echo "        WARNING: Pixel format RGB565 selected in combination with the" >&4
3840   echo "                 GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)." >&4
3843 if test x"${extensions_list}" != x; then
3844   echo "        Building extensions: ${extensions_list}"
3847 if test x"${security_list}" != x; then
3848   echo "        Enabling security features: ${security_list}"
3851 if test x"${hwaccel_list}" != xnone; then
3852   echo "        Enabling hardware acceleration features: ${hwaccel_list}"
3855 if test x"${statistics_list}" != x; then
3856   echo "        Enabling statistics collecting for: ${statistics_list}"
3859 if test x"${SUPPORTED_GUIS}" = x; then
3860   AC_MSG_ERROR(no supported GUIs found);
3863 echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
3864 echo "        Renderers supported: ${renderer_list}"
3865 echo "        Hardware Acceleration: ${hwaccel_list}"
3866 echo "        Media handlers: ${media_list}"
3867 echo "        Using ${add_sound} for sound handling"
3868 echo "        Using $with_shm mode for shared memory"
3870 if test x"$docbook" = x"yes"; then
3871   echo '        DocBook document processing enabled (for "make html" and "make pdf")'
3872   if test x"$docbook_styles" != x; then
3873     echo "        Docbook styles sheets in $docbook_styles"
3874   fi
3875 else
3876   echo "        DocBook document processing disabled (default)"
3879 dnl The Framebuffer GUI has several other settings. As it doesn't have X11,
3880 dnl we have to handle input devices ourselves.
3881 if test x"${build_fb}" = xyes; then
3882 echo "        Using ${input_events} for Input"
3883   if test x"${fakefb}" != x; then
3884     echo "        Using shared memory as a fake framebuffer"
3885   fi
3886   if test x"${offscreen}" = xyes; then
3887     echo "        Using offscreen rendering"
3888   fi
3889   if test x"${doublebuf}" = xyes; then
3890     echo "        Using double buffering when rendering"
3891   fi
3894 if test -s $cwarn; then
3895   echo ""
3896   cat $cwarn
3897   rm $cwarn
3898   echo ""
3899   echo "Gnash should still compile even with these warnings."
3900   echo "If it doesn't, report the warnings as a bug."
3901 else
3902   rm $cwarn
3905 if test -s $crec; then
3906   echo ""
3907   cat $crec
3908   rm $crec
3909   echo ""
3910   echo "Gnash should still compile, but you'll miss important support"
3911 else
3912   rm $crec
3915 dnl If anything critical is missing, don't bother to continue
3916 if test -s $cerr; then
3917   echo ""
3918   cat $cerr >&2
3919   rm $cerr
3920   AC_MSG_ERROR([Please install required packages])
3921 else
3922   rm $cerr
3925 rmdir $tmp
3927 if test x"$fork" = x"no"; then
3928   AC_MSG_ERROR([Currently only forking the standalone player works!])
3930 echo ""
3932 # Local Variables:
3933 # c-basic-offset: 2
3934 # tab-width: 2
3935 # indent-tabs-mode: nil
3936 # End: