change the old snapshot version so dpkg stops complaining
[gnash.git] / configure.ac
blobd7926022a9d20d9f277429fdc05500269b9ecccf
1 dnl  
2 dnl  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 dnl  
4 dnl  This program is free software; you can redistribute it and/or modify
5 dnl  it under the terms of the GNU General Public License as published by
6 dnl  the Free Software Foundation; either version 3 of the License, or
7 dnl  (at your option) any later version.
8 dnl  
9 dnl  This program is distributed in the hope that it will be useful,
10 dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl  GNU General Public License for more details.
13 dnl  You should have received a copy of the GNU General Public License
14 dnl  along with this program; if not, write to the Free Software
15 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16 dnl  
18 AC_PREREQ(2.50)
19 AC_INIT(gnash, master)
20 AC_CONFIG_SRCDIR([libcore/as_object.h])
21 AC_CONFIG_HEADERS([gnashconfig.h])
23 dnl AC_CONFIG_SUBDIRS(libltdl)
24 AC_CANONICAL_BUILD
25 AC_CANONICAL_HOST
27 dnl --------------------------------------------------------
28 dnl Figure out development tool stuff
29 dnl --------------------------------------------------------
31 AC_PROG_CC
32 AC_PROG_CXX
33 AC_EXEEXT
34 AC_PROG_INSTALL
35 AM_COMPILER_LIB
37 dnl Set the default values for Flash Version. These are converted into
38 dnl various strings to make JavaScript or ActionScript detectors
39 dnl recognize Gnash as a SWF Player.
40 DEFAULT_FLASH_MAJOR_VERSION="10"
41 DEFAULT_FLASH_MINOR_VERSION="1"
42 DEFAULT_FLASH_REV_NUMBER="999"
43 AC_SUBST(DEFAULT_FLASH_MAJOR_VERSION)
44 AC_SUBST(DEFAULT_FLASH_MINOR_VERSION)
45 AC_SUBST(DEFAULT_FLASH_REV_NUMBER)
47 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_MAJOR_VERSION], ["${DEFAULT_FLASH_MAJOR_VERSION}"], [Default Flash major version])
48 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_MINOR_VERSION], ["${DEFAULT_FLASH_MINOR_VERSION}"], [Default Flash minor version])
49 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_REV_NUMBER], ["${DEFAULT_FLASH_REV_NUMBER}"], [Default Flash revision number])
51 dnl TODO: use host/build/target -- whatever is more appropriate
52 case "${host}" in
53   *-apple-*)
54     DEFAULT_FLASH_PLATFORM_ID="MAC"
55     DEFAULT_FLASH_SYSTEM_OS="MacOS"
56     ;;
57   *-openbsd*)
58     DEFAULT_FLASH_PLATFORM_ID="BSD"
59     DEFAULT_FLASH_SYSTEM_OS="OpenBSD"
60     ;;
61   *-freebsd*)
62     DEFAULT_FLASH_PLATFORM_ID="BSD"
63     DEFAULT_FLASH_SYSTEM_OS="FreeBSD"
64     ;;
65   *-netbsd*)
66     DEFAULT_FLASH_PLATFORM_ID="BSD"
67     DEFAULT_FLASH_SYSTEM_OS="NetBSD"
68     ;;
69   *-linux-gnu)
70     DEFAULT_FLASH_PLATFORM_ID="LNX"
71     DEFAULT_FLASH_SYSTEM_OS="GNU/Linux"
72     ;;
73   *-linux*)
74     DEFAULT_FLASH_PLATFORM_ID="LNX"
75     DEFAULT_FLASH_SYSTEM_OS="Linux"
76     ;;
77   *-cygwin* | *-mingw* | *-pw32*)
78     DEFAULT_FLASH_PLATFORM_ID="WIN"
79     DEFAULT_FLASH_SYSTEM_OS="Windows"
80     ;;
81   *-*solaris*)
82     DEFAULT_FLASH_PLATFORM_ID="SUN"
83     DEFAULT_FLASH_SYSTEM_OS="Solaris"
84     ;;
85   *-os2*)
86     DEFAULT_FLASH_PLATFORM_ID="OS2"
87     DEFAULT_FLASH_SYSTEM_OS="OS/2"
88     ;;
89   *-sco*)
90     DEFAULT_FLASH_PLATFORM_ID="SCO"
91     DEFAULT_FLASH_SYSTEM_OS="SCO/Unix"
92     ;;
93   *-irix*)
94     DEFAULT_FLASH_PLATFORM_ID="IRX"
95     DEFAULT_FLASH_SYSTEM_OS="IRIX"
96     ;;
97   *-hpux*)
98     DEFAULT_FLASH_PLATFORM_ID="HPX"
99     DEFAULT_FLASH_SYSTEM_OS="HPUX"
100     ;;    
101   *-amigaos*)
102     DEFAULT_FLASH_PLATFORM_ID="OS4"
103     DEFAULT_FLASH_SYSTEM_OS="AmigaOS4"
104     ;;    
105   *-haiku*)
106     DEFAULT_FLASH_PLATFORM_ID="HAIKU"
107     DEFAULT_FLASH_SYSTEM_OS="Haiku"
108     ;;    
109   *-gnu*)
110     DEFAULT_FLASH_PLATFORM_ID="GNU"
111     DEFAULT_FLASH_SYSTEM_OS="GNU/HURD"
112     ;;    
113   *)
114     DEFAULT_FLASH_PLATFORM_ID="UNK"
115     DEFAULT_FLASH_SYSTEM_OS="Unknown"
116     ;;
117 esac
119 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_PLATFORM_ID], ["${DEFAULT_FLASH_PLATFORM_ID}"], [Default 3-letter platform identifier for version string])
120 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_SYSTEM_OS], ["${DEFAULT_FLASH_SYSTEM_OS}"], [Default value for System.capabilities.os])
122 AC_SUBST(DEFAULT_FLASH_PLATFORM_ID)
123 AC_SUBST(DEFAULT_FLASH_SYSTEM_OS)
125 DEFAULT_STREAMS_TIMEOUT=60
126 AC_SUBST(DEFAULT_STREAMS_TIMEOUT)
127 AC_DEFINE_UNQUOTED([DEFAULT_STREAMS_TIMEOUT], [${DEFAULT_STREAMS_TIMEOUT}], [Default streams timeout in seconds])
129 DEFAULT_SOL_SAFEDIR="~/.gnash/SharedObjects"
130 AC_SUBST(DEFAULT_SOL_SAFEDIR)
131 AC_DEFINE_UNQUOTED([DEFAULT_SOL_SAFEDIR], ["${DEFAULT_SOL_SAFEDIR}"], [Default SharedObject base directory])
134 dnl Some things you can only do by looking at the platform name.
135 case "${host}" in
136   powerpc-apple-darwin*)
137     AC_DEFINE([__powerpc64__], [1], [this is a 64 bit powerpc])
138     darwin=yes
139     AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform])
140     ;;
141   *-apple-darwin*)
142     darwin=yes
143     AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform])
144     ;;
145     dnl Unfortunately, all BSD distributions are not identical, so 
146     dnl as tacky as it is to look for the distribution name, we don't
147     dnl have much choice. The use of these should be avoid as much as possible.
148   *-openbsd*)
149     bsd=yes
150     openbsd=yes
151     AC_DEFINE([OPENBSD_HOST], [1], [this is an OpenBSD platform])
152     ;;
153   *-freebsd*)
154     bsd=yes
155     freebsd=yes
156     AC_DEFINE([FREEBSD_HOST], [1], [this is a FreeBSD platform])
157     ;;
158   *-netbsd*)
159     bsd=yes
160     netbsd=yes
161     AC_DEFINE([NETBSD_HOST], [1], [this is a NetBSD platform])
162     ;;
163   *-*solaris*)
164     solaris=yes
165     AC_DEFINE([SOLARIS_HOST], [1], [this is a Solaris platform])
166     ;;
167   *-*linux*)
168     linux=yes
169     AC_DEFINE([LINUX_HOST], [1], [this is a Linux platform])
170     ;;
171   *-cygwin* | *-mingw* | *-pw32*)
172     windows=yes
173     AC_DEFINE([WIN32_HOST], [1], [this is a Win32 platform])
174     ;;
175   *64-*-*bsd*)
176     bsd_os=bsd 
177     AC_DEFINE([WORDSIZE], [64], [this is a 64 platform])
178     ;;
179   *-*amigaos*)
180     amigaos4=yes
181     AC_DEFINE([AMIGAOS4_HOST], [1], [this is an AmigaOS4 platform])
182     ;;
183   *-*haiku*)
184     haiku=yes
185     AC_DEFINE([HAIKU_HOST], [1], [this is a Haiku platform])
186     ;;
187   *-gnu*)
188     gnu=yes
189     AC_DEFINE([GNU_HOST], [1], [this is a GNU platform])
190     ;;
191 esac
194 AM_CONDITIONAL(PLUGIN_LINK_UNDEFINED, test x$openbsd_os = xopenbsd)
195 AM_CONDITIONAL(WIN32, test x$windows = xyes)
196 AM_CONDITIONAL(HAIKU, test x$haiku = xyes)
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 dnl AM_INIT_AUTOMAKE(gnash, "trunk$BUILDDATE")
205 AM_INIT_AUTOMAKE
206 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
207 AM_MAINTAINER_MODE
208 AC_PROG_MAKE_SET
210 dnl AC_DISABLE_STATIC dnl Disable building static libs.
212 AM_GNU_GETTEXT([external])
213 AM_CONDITIONAL(HAS_GETTEXT, test x$ac_cv_path_XGETTEXT != x)
214 dnl AM_GNU_GETTEXT_VERSION(0.15)
216 dnl This is primarily used when compiling for a similar architecture,
217 dnl like pentium->geode, which can use the same compiler, but have
218 dnl different development libraries.
220 dnl I want to deprecate this option for the new sysroot name to be
221 dnl consistant with other tools. This will be left for a while as 
222 dnl a transistion.
223 AC_ARG_WITH(top_level,
224   AC_HELP_STRING([--with-top-level],
225   [top level directory for cross compiling files]),
226   with_top_level=${withval} ;
227   cross_compiling=yes)
229 AC_ARG_WITH(sysroot,
230   AC_HELP_STRING([--with-sysroot],
231   [system root directory for cross compiling]),
232   with_top_level=${withval} ;
233   cross_compiling=yes)
235 dnl Android is a little different when using a standard cross toolchain,
236 dnl so we have to configure especially for it for now. Usually it's
237 dnl something like this:
239 dnl arm-linux-eabi-gcc -Wl,--dynamic-linker -Wl,/system/bin/linker
240 dnl -nostdlib -Wl,-rpath -Wl,/system/lib -Wl,-rpath
241 dnl -Wl,/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
242 dnl -L/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
243 dnl -lc -o hello
244 dnl  /opt/android-ndk-r3/build/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o
245 dnl Recent versions of G++ (I'm using 4.5 from source
246 android_ndk=no
247 AC_ARG_WITH([android],
248   AC_HELP_STRING([--with-android], [directory where android NDK is installed]),
249         android_ndk=${withval}
250         if test x"${withval}" != x; then
251           android_ndk=${withval}
252         else
253           android_ndk=/opt/android-ndk-r3/build/platforms/android-5/arch-arm
254         fi
256 CROSS_CXXFLAGS=
257 if test x"${android_ndk}" != xno; then
258 dnl  LDFLAGS=-Wl,--dynamic-linker -Wl,/system/bin/linker -nostdlib -Wl,-rpath -Wl,/system/lib -Wl,-rpath -Wl,${android_ndk}/usr/lib -L${android_ndk}/usr/lib -lc -o hello ${android_ndk}/usr/lib/crtbegin_dynamic.o
259 dnl  CROSS_CXXFLAGS=-mandroid -fexceptions -I${android_ndk}/include
260   CROSS_CXXFLAGS=-mandroid -fexceptions
261   if test x"${with_top_level}" = x; then
262     with_top_level=/usr/local/android-arm/sysroot/usr
263     cross_compiling=yes
264   fi
265   ANDROID_NDK=${android_ndk}
266   AC_DEFINE(ANDROID, [1], [This is an Android build])
267 else
268   ANDROID_NDK=
270 AC_SUBST(ANDROID_NDK)
271 AM_CONDITIONAL(ANDROID, [ test x"${android_ndk}" != xno ])
273 AC_ARG_WITH(cpu,
274   AC_HELP_STRING([--with-cpu],[specify a cpu when cross compiling.]),
275   [case "${withval}" in
276     geode) with_cpu=geode ;;
277     *)   AC_MSG_ERROR([bad value ${enableval} for --with-cpu option]) ;;
278    esac],with_cpu=none)
280 if test x"$with_cpu" != x"none"; then
281 dnl   $CXXFLAGS="$CXXFLAGS -march=${with_cpu}"
282    cross_compiling=yes
285 AC_MSG_CHECKING([For the version of libtool])
286 if test -d ${srcdir}/libltdl/libltdl; then
287   ltver=2.x
288 else
289   ltver=1.x
291 ltmajor=`echo $ltver | cut -d '.' -f 1`
292 AC_MSG_RESULT([$ltver])
293 AM_CONDITIONAL(LIBLTDL2, [test $ltmajor -eq 2])
294 AM_CONDITIONAL(LIBLTDL1, [test $ltmajor -eq 1])
295 if test $ltmajor -eq 1; then
296   AC_LIBLTDL_CONVENIENCE
297   AC_LIBTOOL_DLOPEN
298   if test x"${windows}" = x"yes"; then
299     dnl The following macro may be empty; the colon is necessary
300     dnl in this case to avoid an empty if statement (which is a syntax error).
301     AC_LIBTOOL_WIN32_DLL
302     :
303   fi
304   AC_DISABLE_STATIC
305 else
306   LT_INIT([dlopen win32-dll disable-static])
307   LTDL_INIT([convenience recursive])
309 AC_PROG_LIBTOOL
311 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
312 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
314 AC_C_BIGENDIAN
315 AC_C_CONST
316 AC_C_INLINE
317 AC_SUBST([LIBTOOL_DEPS])
318 AC_LIB_LTDL
320 AM_CONDITIONAL(ENABLE_SHARED, [test x"${enable_shared}" = xyes])
321 AM_CONDITIONAL(ENABLE_STATIC, [test x"${enable_shared}" = xno])
322 dnl -- AM_CONDITIONAL(STATIC_GUI, test x"${dynamic_gui}" = xno -o x"${enable_shared}" = xno)
324 AC_PATH_PROG(DEJAGNU, runtest)
326 dnl AC_CHECK_LIB(ltdl, lt_dlmutex_register, AC_DEFINE(LT_DLMUTEX, 1, [Has lt_dlmutex_register]),
327 dnl                                         AC_DEFINE(LT_DLMUTEX, 0, [doesn't have lt_dlmutex_register]) )
329 dnl These options are for Cygnal, which collects optional statistics
330 dnl on all the network traffic By default, we turn on statistics
331 dnl collecting for the incoming and outgoing queues, since those are
332 dnl required to be compatiable with FMS 3, and the ActionScript server
333 dnl management API. buffers are the lowest level data storage, this
334 dnl data is the time spent in the queue, and is primarily only used
335 dnl for tuning the queueing API in Gnash. Memoryis the same, it's only
336 dnl used by developers for tuning performance of memory allocations in
337 dnl Gnash.
338 buffers=no
339 que=no
340 memory=no
341 cache=yes
342 stat_proplookup=no
343 AC_ARG_WITH(statistics,
344   AC_HELP_STRING([--with-statistics=], [Specify which statistics features to enable]),
345   if test -n ${withval}; then
346     if test "x${withval}" != "xno"; then
347       extlist="${withval}"
348       withval=`echo ${withval} | tr '\054' ' ' `
349     else
350       extlist=""
351       withval=""
352     fi
353   fi
354   statistics_list=""
355   nstatistics=0
356   while test -n "${withval}" ; do
357     val=`echo ${withval} | cut -d ' ' -f 1`
358     [case "${val}" in
359       buffers)
360         buffers=yes
361         nstatistics=$((nstatistics+1))
362         ;;
363       que)
364         que=yes
365         nstatistics=$((nstatistics+1))
366         ;;
367       memory)
368         memory=yes
369         nstatistics=$((nstatistics+1))
370         ;;
371       cache)
372         cache=yes
373         nstatistics=$((nstatistics+1))
374         ;;
375       proplookup)
376         stat_proplookup=yes
377         nstatistics=$((nstatistics+1))
378         ;;
379       all|ALL)
380         buffers=yes
381         memory=yes
382         queu=yes
383         cache=yes
384         stat_proplookup=yes
385         nstatistics=5           dnl this must be incremented if you add anything
386         ;;
387       *) AC_MSG_ERROR([invalid statistics feature specified: ${withval} given (accept: buffers|que|memory|cache|proplookup|all)])
388         ;;
389       esac]
390     withval=`echo ${withval} | cut -d ' ' -f 2-6`
391     if test "x$val" = "x$withval"; then
392       break;
393     fi
394   done
396 if test x${buffers} = xyes; then
397   statistics_list="${statistics_list} buffers"
398   AC_DEFINE(USE_STATS_BUFFERS, [1], [Support statistics collecting for the queue buffers])
399   AC_MSG_WARN([This option will effect your performance])
402 if test x${memory} = xyes; then
403   statistics_list="${statistics_list} memory"
404   AC_DEFINE(USE_STATS_MEMORY, [1], [Support statistics collecting for all memory profiling])
405   AC_MSG_WARN([This option will effect your performance])
408 if test x${que} = xyes; then
409   statistics_list="${statistics_list} queues"
410   AC_DEFINE(USE_STATS_QUEUE, [1], [Support statistics collecting for the queues])
413 if test x${cache} = xyes; then
414   statistics_list="${statistics_list} cache"
415   AC_DEFINE(USE_STATS_CACHE, [1], [Support statistics collecting for the cache])
418 if test x${stat_proplookup} = xyes; then
419   statistics_list="${statistics_list} proplookup"
420   AC_DEFINE(GNASH_STATS_OBJECT_URI_NOCASE, [1], [Collecting and report stats about ObjectURI case lookups])
421   AC_DEFINE(GNASH_STATS_PROPERTY_LOOKUPS, [1], [Collecting and report stats about property lookups])
422   AC_DEFINE(GNASH_STATS_STRING_TABLE_NOCASE, [1], [Collecting and report stats about string_table::key case lookups])
425 dnl this is just so Makefile can print the same list
426 STATISTICS_LIST="$statistics_list"
427 AC_SUBST(STATISTICS_LIST)
430 # These settings are compile time options for the security
431 # setting for anything that lets gnash exchange data with
432 # other applications. Currently this only supports Shared
433 # Objects and Local Connections. Shared Objects are like
434 # your web browsers cookies, and Local Connections use
435 # shared memory to execute methods remotely, and to
436 # exchange data.
438 # The default is to enable everything, and these can
439 # also be controlled dynamically by the $HOME/.gnashrc
440 # file.
442 solreadonly=no
443 localconnection=yes
444 lctrace=yes
446 AC_ARG_WITH(security,
447   AC_HELP_STRING([--with-security=], [Specify which security features to enable]),
448   if test -n ${withval}; then
449     if test "x${withval}" != "xno"; then
450       extlist="${withval}"
451       withval=`echo ${withval} | tr '\054' ' ' `
452     else
453       extlist=""
454       withval=""
455     fi
456   fi
457   security_list=""
458   nsecurity=0
459   while test -n "${withval}" ; do
460     val=`echo ${withval} | cut -d ' ' -f 1`
461 dnl    security_list="${security_list} ${val}"
462     [case "${val}" in
463       solreadonly)
464         solreadonly=yes
465         nsecurity=$((nsecurity+1))
466         ;;
467       lc)
468         localconnection=yes
469         nsecurity=$((nsecurity+1))
470         ;;
471       lctrace)
472         lctrace=yes
473         nsecurity=$((nsecurity+1))
474         ;;
475       all|ALL)
476         solreadonly=yes
477         lc=yes
478         lctrace=yes
479         nsecurity=3
480         ;;
481       *) AC_MSG_ERROR([invalid security feature specified: ${withval} given (accept: solreadonly|lc|lctrace)])
482         ;;
483       esac]
484     withval=`echo ${withval} | cut -d ' ' -f 2-6`
485     if test "x$val" = "x$withval"; then
486       break;
487     fi
488   done
490 if test xlctrace = xyes; then
491   security_list="${security_list} lctrace"
492   AC_DEFINE(USE_LC_TRACE, [1],
493            [Support LocalConnection])
494   AC_MSG_NOTICE([This build supports LocalConnection tracing])
495   AC_MSG_WARN([This option will effect your performance])
498 if test x$localconnection = xyes; then
499   security_list="${security_list} localconnection"
500   AC_DEFINE(USE_LC, [1],
501                  [Support LocalConnection])
502   AC_MSG_NOTICE([This build supports LocalConnection])
504 if test x$solreadonly = xyes; then
505   security_list="${security_list} solreadonly"
506   AC_DEFINE(USE_SOL_READONLY, [1],
507                  [Shared Objects are read-only])
508   AC_MSG_NOTICE([Shared Objects are read-only])
510 SECURITY_LIST="$security_list"
511 AC_SUBST(SECURITY_LIST)
513 dnl For Haiku, we know the sysroot is in a non-standard place
514 dnl it is important that -lagg comes before -lbe
515 if test x"${haiku}" = xyes; then
516   HAIKU_LIBS=-lbe
517   AC_SUBST(HAIKU_LIBS)
520 DLOPEN="-dlopen"
521 DLPREOPEN="-dlpreopen"
522 AC_SUBST(DLOPEN)
523 AC_SUBST(DLPREOPEN)
525 dnl dnl Substitute INCLTDL and LIBLTDL in the Makefiles
526 AC_SUBST(INCLTDL)
527 AC_SUBST(LIBLTDL)
528 AC_SUBST(LIBTOOL_DEPS)
530 dnl Darwin uses libtool instead of ar to produce libraries. We determine which one
531 dnl we have here now. For some reason on Darwin, we don't get the
532 dnl count from grep via stdin correctly. Writing a temp file does the
533 dnl trick, so although it's ugly, that's what we gotta do...
534 AC_MSG_CHECKING([which type of library archiver we have])
535 rm -f .tmp
536 libtool > .tmp 2>&1
537 archiver=`grep -c dynamic .tmp 2>&1`
538 rm -f .tmp
539 dnl is there any good way to report what we found here?
540 AC_MSG_RESULT()
541 if test x"${archiver}" != x && test "${archiver}" -eq 1; then
542 dnl   if test "$enable_shared" = no; then
543 dnl     AR="libtool -static"
544 dnl   else
545 dnl     AR="libtool -dynamic"
546 dnl     CXXFLAGS="${CXXFLAGS} -dynamic"
547    export MACOSX_DEPLOYMENT_TARGET="10.3"
548 dnl   fi
549 dnl   AR_FLAGS="-o"
550    darwin=yes
551 else
552    darwin=no
555 dnl When cross compiling, limit the search directories cause otherwise
556 dnl we may get the host headers or libraries by accident. These values
557 dnl are exported, so all the other configure tests in macros/*.m4 use
558 dnl these same settings rather than duplicating them like we used to.
559 dnl To override thise, use the --with-*-incl= and --with-*-libs=
560 dnl options to configure.
561 if test x$cross_compiling = xyes; then
562   AC_MSG_NOTICE([Configuring Gnash for cross compilation])
563   export pkgroot="`$CXX -print-search-dirs | grep "install:" | sed -e 's/install: //' -e 's:/lib/gcc/.*::'`"
564   dnl pkgroot only works correctly with builds of cross tools not in
565   dnl /usr, ie... installed from the distribution packages, or just
566   dnl plain installed in the system tools. This contaminates configure
567   dnl when building for variations of the same basic architecture,
568   dnl like i686-linux -> i586-mingw32.
569   if test x${pkgroot} = "/usr"; then
570     export pkgroot=""
571   fi
572   export incllist="`eval echo ${with_top_level}/include ${pkgroot}/${host_alias}/include ${pkgroot}/include`"
573   export libslist="`eval echo ${with_top_level}/lib ${pkgroot}/${host_alias}/lib ${pkgroot}/lib64 ${pkgroot}/lib32 ${pkgroot}/lib`"
574   export pathlist="`eval echo ${pkgroot}/${host_alias}/bin:${pkgroot}/bin`"
575   npapi=no
576 else
577   AC_MSG_NOTICE([Configuring Gnash for native compilation])
578   export incllist="`eval cat ${srcdir}/macros/incllist`"
579   export libslist="`eval cat ${srcdir}/macros/libslist`"
580   export pathlist=$PATH
583 if test x"${android_ndk}" != xno; then
584    incllist="${android_ndk}/include ${incllist}"
587 AM_CONDITIONAL(CROSS_COMPILING, [ test x$cross_compiling = xyes ])
589 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
590 dnl !! 
591 dnl !! IMPORTANT NOTICE 
592 dnl !!
593 dnl !!  Any call to GNASH_PATH_XXX must be be given *after* this snippet.
594 dnl !!  This is to ensure that PKG_CONFIG, cross_compiling and incllist are
595 dnl !!  properly set at the time of call.
596 dnl !!
597 dnl !!  Also GNASH_PKG_FIND has to be called later. Not sure
598 dnl !!  why but calling before breaks detection of CPP (see
599 dnl !!  gnash-dev mailing archives for June 12 2009
600 dnl !!  http://lists.gnu.org/archive/html/gnash-dev/2009-06/index.html
601 dnl !! 
602 dnl !! 
603 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
605 dnl Check for PKG_CONFIG before any GNASH_PATH call
606 PKG_PROG_PKG_CONFIG
608 dnl --------------------------------------------------------
609 dnl  GUI selection
610 dnl --------------------------------------------------------
612 has_gtk2=no        dnl FIXME: has_* shouldn't be in configure but in a macro
613 build_haiku=no
614 build_aos4=no      dnl AmigaOS4 GUI
615 build_kde3=no
616 build_kde4=no
617 build_qtopia3=no
618 build_qtopia4=no
619 build_gtk=no
620 build_qt3=no
621 build_qt4=no
622 build_fb=no                     dnl Raw framebuffer
623 build_fltk=no
624 build_sdl=no
625 build_riscos=no                 dnl Native OS2 GUI
626 build_aqua=no                   dnl Native MacOSX
627 build_hildon=no                 dnl Native LIMO
628 build_alp=no                    dnl Acess Linux Platform using Hiker
629 build_dump=no
630 AC_ARG_ENABLE(gui,
631   AC_HELP_STRING([--enable-gui=], [Enable support for the specified GUI toolkits (default=gtk,kde4)]),
632   [if test -n ${enableval}; then
633     enableval=`echo ${enableval} | tr '\054' ' ' `
634   fi
635   while test -n "${enableval}" ; do
636     val=`echo ${enableval} | cut -d ' ' -f 1`
637     case "${val}" in
638       gtk|GTK|gtk2|GTK2)
639         build_gtk=yes
640         ;;
641       kde3|KDE3)
642         build_qt3=yes
643         build_kde3=yes
644         ;;
645       kde4|KDE4)
646         build_qt4=yes
647         build_kde4=yes
648         ;;
649       qtopia3|QTOPIA3)
650         build_qtopia3=yes
651         build_qt3=yes
652         ;;
653       qtopia4|QTOPIA4)
654         build_qtopia4=yes
655         build_qt4=yes
656         ;;
657       qt3|QT3)
658         build_qt3=yes
659         ;;
660       qt4|QT4)
661         build_qt4=yes
662         ;;
663       sdl|SDL)
664         build_sdl=yes
665         ;;
666       aqua|AQUA|Aqua)
667         build_aqua=yes
668         ;;
669       riscos|RISCOS|RiscOS)
670         build_riscos=yes
671         ;;
672       fltk|FLTK|fltk2|FLTK2)
673         build_fltk=yes
674         ;;
675       fb|FB)
676         build_fb=yes
677         ;;
678       aos4|AOS4)
679         build_aos4=yes
680         ;;
681       haiku|HAIKU)
682         build_haiku=yes
683         ;;
684       dump|DUMP)
685         build_dump=yes
686         ;;
687       all|ALL)
688         build_dump=yes
689         build_fb=yes
690         build_fltk=yes
691         build_qt3=yes
692         build_kde3=yes
693         build_kde4=yes
694         build_qt4=yes
695         build_sdl=yes
696         ;;
697       *) AC_MSG_ERROR([invalid gui ${enableval} given (accept: gtk|kde3|kde4|fltk|sdl|riscos|aqua|fb|qtopia3|qtopia4|dump|aos4|haiku)])
698          ;;
699       esac
700     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
701     if test "x$val" = "x$enableval"; then
702       break;
703     fi
704   done],
705   [if test x"${openbsd_os}" = x"openbsd"; then
706     build_kde3=yes;
707     build_qt3=yes;
708     build_gtk=yes;
709   else if test x"${haiku}" = xyes; then
710     build_haiku=yes;
711   else
712     build_kde4=yes;
713     build_qt4=yes;
714     build_gtk=yes;
715   fi
716   fi]
719 if test x"${build_haiku}" = xyes; then
720   if test x"$haiku" != xyes; then
721     echo "        ERROR: Can not build Haiku gui outside of Haiku
722 operating system." >&3
723   fi
726 dnl We can use Xephyr or fbe to create a fake framebuffer instead of real
727 dnl video memory. This lets us test on a desktop machine.
728 AC_ARG_WITH(fakefb,
729 AC_HELP_STRING([--with-fakefb],
730  [specify a file to be mapped instead of a real framebuffer]),
731  with_fakefb=${withval})
733 fakefb=
734 if test x"${with_fakefb}" = xyes; then
735   dnl This is the default file name fbe uses.
736   fakefb=/tmp/fbe_buffer
737 else
738   if test x"${with_fakefb}" != x; then
739     fakefb=${with_fakefb}
740   fi
742 FAKEFB=${fakefb}
743 AC_SUBST(FAKEFB)
745 if test x"${fakefb}" != x; then
746     AC_DEFINE(ENABLE_FAKE_FRAMEBUFFER, [1], [Enable using a file instead of a real framebuffer])
750 dnl --------------------------------------------------------
751 dnl  Sound handler selection
752 dnl --------------------------------------------------------
753 add_sound=
754 build_sound_sdl=no
755 build_sound_ahi=no
756 build_sound_mkit=no
757 AC_ARG_ENABLE(sound,
758   AC_HELP_STRING([--enable-sound=[[sdl|ahi|mkit]]], [Use the specified sound handler (default=sdl)]),
759      [case "${enableval}" in
760       sdl|SDL|Sdl)
761         build_sound_sdl=yes
762         add_sound="sdl"
763         ;;
764       ahi|AHI|Ahi)
765         build_sound_ahi=yes
766         add_sound="ahi"
767         ;;
768       mkit|MKIT|Mkit)
769         build_sound_mkit=yes
770         add_sound="mkit"
771         ;;
772      esac],
773   [if test x"${haiku}" = xyes; then
774      build_sound_mkit=yes
775      add_sound="mkit"
776    else
777      build_sound_sdl=yes
778      add_sound=sdl
779    fi]
783 dnl --------------------------------------------------------
784 dnl  Media handler selection
785 dnl --------------------------------------------------------
786 build_media_gst=no
787 build_media_ffmpeg=no
788 AC_ARG_ENABLE(media,
789   AC_HELP_STRING([--enable-media=handler],
790     [Enable media handling support using the specified handler: gst, ffmpeg or none (no sound) [[gst]] ]),
791   
792     if test -n ${enableval}; then
793       enableval=`echo ${enableval} | tr '\054' ' ' `
794     fi
795     while test -n "${enableval}"; do
796       val=`echo ${enableval} | cut -d ' ' -f 1`
797       [case "${val}" in
798         GST|gst)
799           build_media_gst=yes
800           media_list="${media_list}gst "
801           ;;
802         FFMPEG|ffmpeg)
803           build_media_ffmpeg=yes
804           media_list="${media_list}ffmpeg "
805           ;;
806         no|NO|none)
807           media_list="none"
808           ;;
809         *)
810           AC_MSG_ERROR([bad value ${enableval} for --enable-media option])
811           ;;
812      
813       esac]
814       enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
815       if test "x$val" = "x$enableval"; then
816         break;
817       fi
818     done,
819     [if test x"${build_haiku}" = xyes; then
820         build_media_ffmpeg=yes
821         build_media_haiku=yes
822         media_list="ffmpeg haiku"
823      else
824         build_media_gst=yes
825         media_list="gst"
826     fi]
829 MEDIA_CONFIG="${media_list}"
830 AC_SUBST(MEDIA_CONFIG)
832 dnl if no media handler is selected, default to Gstreamer.
833 if test x"$build_media_ffmpeg" = x"no" -a x"$build_media_gst" = x"no"; then
834    build_media_gst=yes
837 if test x"$build_media_ffmpeg" = x"yes"; then
838   GNASH_PATH_FFMPEG
841 dnl -------------------------------
842 dnl Input Device selection
843 dnl -------------------------------
845 dnl Multiple input devices are supported. These can all work in
846 dnl varying combinations, so several may be listed. These are only
847 dnl required when using the Framebuffer, as without the X11 desktop,
848 dnl Gnash has to handle all these internally. This can get
849 dnl messy, as one might want to use a touchscreen with a normal mouse
850 dnl or keyboard attached. 
851 dnl By default, don't build any of these, as they are only for the Framebuffer
852 dnl running without X11.
853 if test x"${build_fb}" = xyes; then
854 build_ps2mouse=yes
855 build_ps2keyboard=no
856 build_input_events=yes
857 build_tslib=yes
858 input_events="PS/2 Mouse, Input Devices, Touchscreen via Tslib"
859 else
860 build_ps2mouse=no
861 build_ps2keyboard=no
862 build_input_events=no
863 build_tslib=no
864 input_events=
866 AC_ARG_ENABLE(input,
867   AC_HELP_STRING([--enable-input=], [Enable support for the specified input devices for the framebuffer GUI (default=ps2mouse|ps2keyboard|events|touchscreen)]),
868   [if test -n ${enableval}; then
869     enableval=`echo ${enableval} | tr '\054' ' ' `
870   fi
871   while test -n "${enableval}" ; do
872     val=`echo ${enableval} | cut -d ' ' -f 1`
873     case "${val}" in
874       ps2m*|PS2m*|m*|M*)        dnl a PS/2 style mouse
875         build_ps2mouse=yes
876         input_events="${input_events}, PS/2 Mouse"
877         ;;
878       ps2k*|PS2K*|k*|K*)        dnl a PS/2 style keyboard
879         build_ps2keyboard=yes
880         input_events="${input_events}, PS/2 Keyboard"
881         ;;
882       i*|I*|ev*|Ev*)    dnl use the new Input Event, which supports both
883         input_events="${input_events}, Input Event Device"
884         build_input_events=yes
885         ;;
886       t*|T*) dnl use a touchscreen with tslib, which works like a mouse
887         build_tslib=yes
888         input_events="${input_events}, Touchscreen"
889         ;;
890       *) AC_MSG_ERROR([invalid input device list! ${enableval} given (accept: ps2mouse|keyboard|events,touchscreen)])
891          ;;
892       esac
893     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
894     if test "x$val" = "x$enableval"; then
895       break;
896     fi
897   done],
900 if test x"${build_tslib}" = xyes; then
901   AC_DEFINE(USE_TSLIB, [1], [Use a tslib supported touchscreen])
902   GNASH_PKG_FIND(ts, [tslib.h], [Touchscreen library], ts_config)
904 AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} != xno])
906 if test x"${build_ps2mouse}" = xyes; then
907   AC_DEFINE(USE_MOUSE_PS2, [1], [Add support for a directly using a PS/2 Mouse])
909 AM_CONDITIONAL(ENABLE_MOUSE, [test x"${build_ps2mouse}" = xyes])
911 if test x"${build_ps2keyboard}" = xyes; then
912   AC_DEFINE(USE_KEYBOARD_PS2, [1], [Add support for directly using a PS/2 Keyboard])
914 if test x"${build_input_events}" = xyes; then
915   AC_DEFINE(USE_INPUT_EVENTS, [1], [Add support for a directly using Linux Input Event Devices])
917 AM_CONDITIONAL(ENABLE_INPUT_EVENTS, [test x"${build_input_events}" = xyes])
918 dnl this is enabled if we have any input devices at all
919 AM_CONDITIONAL(ENABLE_INPUT_DEVICES, [test x"${input_events}" != x])
921 dnl -------------------------------
922 dnl Renderer Selection
923 dnl -------------------------------
924 input_events=
925 dnl By default, we want to to build all renderers
926 build_ovg=no
927 build_gles=no
928 build_ogl=yes
929 build_agg=yes
930 build_cairo=yes
931 renderer_list="OpenGL AGG Cairo"
932 nrender=3
933 AC_ARG_ENABLE(renderer,
934   AC_HELP_STRING([--enable-renderer=], [Enable support for the specified renderers (ogl|gles|cairo|agg|all, default=all)]),
935   if test -n ${enableval}; then
936     if test "x${enableval}" != "xno" -o "x${enableval}" != "xnone" ; then
937       renderer_list="none"
938       enableval=`echo ${enableval} | tr '\054' ' ' `
939     else
940       renderer_list=""
941       enableval=""
942     fi
943   fi
944   renderer_list=""
945   nrender=0
946   build_ovg=no
947   build_ogl=no
948   build_gles=no
949   build_agg=no
950   build_cairo=no
951   while test -n "${enableval}" ; do
952     val=`echo ${enableval} | cut -d ' ' -f 1`
953     [case "${val}" in
954       no*|NO*)
955         renderer_list="none"
956         build_ovg=no
957         build_ogl=no
958         build_gles=no
959         build_agg=no
960         build_cairo=no
961         nrender=1
962         ;;
963       all|ALL)
964         renderer_list="OpenGL, Cairo, AGG"
965         build_ogl=yes
966         build_agg=yes
967         build_cairo=yes
968         build_ovg=yes
969         nrender=4
970         ;;
971       ogl|OGL|OpenGL|opengl)
972         renderer_list="${renderer_list} OpenGL"
973         build_gles=no
974         build_ogl=yes
975         nrender=$((nrender+1))
976         ;;
977       gles|GLES|GL-ES|gl-es)
978         renderer_list="${renderer_list} OpenGL-ES"
979         build_gles=yes
980         build_ogl=no
981         nrender=$((nrender+1))
982         ;;
983       ovg|OVG|OpenVG|openvg)
984         renderer_list="${renderer_list} OpenVG"
985         build_ogv=yes
986         nrender=$((nrender+1))
987         ;;
988       agg|AGG)
989         renderer_list="${renderer_list} AGG"
990         build_agg=yes
991         nrender=$((nrender+1))
992         ;;
993       cairo|CAIRO|Cairo*)
994         renderer_list="${renderer_list} Cairo"
995         build_cairo=yes
996         nrender=$((nrender+1))
997         ;;
998       *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept:  (ogl|cairo|agg|all)])
999         ;;
1000       esac]
1001     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1002     if test "x$val" = "x$enableval"; then
1003       break;
1004     fi
1005   done
1007 dnl 16 bit: RGB555, RGB565
1008 dnl 24 bit: RGB24, BGR24
1009 dnl 32 bit: RGBA32, BGRA32
1010 pixelformat=all
1011 AC_ARG_WITH(pixelformat,
1012   AC_HELP_STRING([--with-pixelformat=], [Use the specified pixel format for AGG (default=all)]),
1013   [if test -n ${withval}; then
1014     pixelformat="${withval}"
1015     withval=`echo ${withval} | tr '\054' ' ' `
1016   fi
1017   while test -n "${withval}" ; do
1018     val=`echo ${withval} | cut -d ' ' -f 1`
1019     case "${val}" in
1020       all)
1021         # allow special value "all" set by user (handled below)
1022         ;; 
1023       argb32|ARGB32)
1024         AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32])
1025         ;;
1026       abgr32|ABGR32)
1027         AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32])
1028         ;;
1029       bgra32|BGRA32)
1030         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
1031         ;;
1032       bgr24|BGR24)
1033         AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24])
1034         ;;
1035       rgba32|RGBA32)
1036         AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32])
1037         ;;
1038       rgb24|RGB24)
1039         AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24])
1040         ;;
1041       rgb555|RGB555)
1042         AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555])
1043         ;;
1044       rgb565|RGB565)
1045         AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565])
1046         ;;
1047       *) AC_MSG_ERROR([invalid pixel format ${withval} given (accept: all|RGB555|RGB565|RGB24|BGR24|BGRA32|RGBA32|ARGB32|ABGR32)])
1048          ;;
1049       esac
1050     withval=`echo ${withval} | cut -d ' ' -f 2-6`
1051     if test "x$val" = "x$withval"; then
1052       break;
1053     fi
1054   done],
1055   [if test x$build_haiku = xyes -a x$build_sdl != xyes; then
1056         AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
1057         pixelformat=BGRA32
1058    fi]
1061 if test x$pixelformat = xall; then
1062   if test x$build_agg = xyes; then
1063     ### The fact that we're building GTK doesn't mean we're not also
1064     ### building KDE or SDL, each needing its own pixel format !
1065     #if test x$build_gtk = xyes; then
1066     #  AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24 pixel format])
1067     #  pixelformat="RGB24"
1068     #else
1069       AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555 pixel format])
1070       AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565 pixel format])
1071       AC_DEFINE(PIXELFORMAT_RGB24,  [1], [RGB24 pixel format])
1072       AC_DEFINE(PIXELFORMAT_BGR24,  [1], [BGR24 pixel format])
1073       AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32 pixel format])
1074       AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32 pixel format])
1075       AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32 pixel format])
1076       AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32 pixel format])
1077     #fi
1078   fi
1081 AM_CONDITIONAL(BUILD_OVG_RENDERER, [ test x$build_ovg = xyes ])
1082 AM_CONDITIONAL(BUILD_GLES_RENDERER, [ test x$build_gles = xyes ])
1083 AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x$build_ogl = xyes])
1084 AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x$build_agg = xyes ])
1085 AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x$build_cairo = xyes ])
1087 if test x"${build_ogl}" = xyes; then
1088    AC_DEFINE([RENDERER_OPENGL], [], [Use OpenGL renderer])
1091 if test x"$build_agg" = xyes; then
1092   AC_DEFINE([RENDERER_AGG], [], [Use AntiGrain renderer])
1095 if test x"$build_cairo" = xyes; then
1096   GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1097   AC_DEFINE([RENDERER_CAIRO], [], [Use cairo renderer])
1100 if test x"${build_agg}" = xyes; then
1101    GNASH_PATH_AGG
1104 dnl VA API is used by default for all H.264 videos. HW requirements:
1105 dnl     * AMD GPUs with UVD2 and xvba-video VA driver
1106 dnl     * NVIDIA GPUs with vdpau-video VA driver
1107 dnl     * All HW with a VA driver supporting the VA/GLX extensions or
1108 dnl     vaPutSurface(Pixmap,...). This may include the Intel
1109 dnl     Moorestown platform and future G45 VA driver.
1110 dnl NOTE: it is possible to use Gnash/VAAPI on platforms with an Intel
1111 dnl GMA500 but you currently will have to build the AGG renderer
1112 dnl instead of the OGL (OpenGL) one. 
1114 build_vaapi=yes
1115 hwaccel_list="VAAPI"
1116 nhwaccel=1
1117 AC_ARG_ENABLE(hwaccel,
1118   AC_HELP_STRING([--enable-hwaccel], [Specify which accleration to support to enable (none,vaapi,omap)]),
1119   if test -z ${enableval}; then
1120       hwaccel_list="none"
1121       nhwaccel=0
1122       enableval=""
1123   fi
1124   while test -n "${enableval}" ; do
1125     val=`echo ${enableval} | cut -d ' ' -f 1`
1126     [case "${val}" in
1127       no*|NO*)
1128         hwaccel_list="none"
1129         build_vaapi=no
1130         build_omap=no
1131         nhwaccel=0
1132         ;;
1133       va*|VA*)
1134         hwaccel_list="${hwaccel_list} vaapi"
1135         build_vaapi=yes
1136         nhwaccel=$((nhwaccel+1))
1137         ;;
1138       all|ALL)
1139         hwaccel_list="VAAPI OMAP"
1140         nhwaccel=2
1141         build_omap=yes
1142         build_vaapi=yes
1143         ;;
1144       omap*|OMAP*)
1145         hwaccel_list="${hwaccel_list} omap"
1146         build_omap=yes
1147         nhwaccel=$((nhwaccel+1))
1148         ;;
1149       *) AC_MSG_ERROR([invalid hwaccel feature specified: ${enableval} given (accept: none,vaapi,omap)])
1150         ;;
1151       esac]
1152     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1153     if test "x$val" = "x$enableval"; then
1154       break;
1155     fi
1156   done
1159 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi}" = x"yes"; then
1160   use_libva=no
1161   use_libva_x11=no
1162   use_libva_glx=no
1163   dnl if the version of FFmpeg is recent enough, (r20957, 52.45.0), then
1164   dnl look for VAAPI support so we can use use the VAAPI enabled FFmpeg.
1165   if test x"${have_ffmpeg_vaapi}" = xyes; then
1166     use_libva=yes
1167     GNASH_PKG_FIND([libva],
1168       [va/va.h],
1169       [Video Acceleration API],
1170       vaInitialize
1171     )
1173     use_libva_x11=yes
1174     GNASH_PKG_FIND([libva_x11],
1175       [va/va_x11.h],
1176       [VA API (X11 display)],
1177       vaGetDisplay,
1178       [], [-lva-x11]
1179     )
1181     if test x$build_ogl = xyes; then
1182       use_libva_glx=yes
1183       GNASH_PKG_FIND([libva_glx],
1184         [va/va_glx.h],
1185         [VA API (GLX display)],
1186         vaGetDisplayGLX,
1187         [], [-lva-glx]
1188       )
1189     fi
1190   fi
1193 dnl libVA drivers. We declare conditional for both the option being
1194 dnl selected, as well as whether or not it's found. This we can
1195 dnl generate better error handling if it's not found.
1196 AM_CONDITIONAL(BUILD_OMAP, test x"${build_omap}" = xyes)
1197 AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
1199 dnl Only build the vaapi support if we have a version of FFmpeg that
1200 dnl supports it.
1201 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${found_libva_incl}" = xyes; then
1202   build_vaapi=yes
1203   hwaccel_list="VAAPI"
1204   nhwaccel=1
1205 else
1206   build_vaapi=no
1207   hwaccel_list=""
1208   nhwaccel=0
1211 dnl Until the hwaccel patches in FFmpeg wind up in the ffmpeg-plugin,
1212 dnl restrict using HW Accel to using FFmpeg directly.
1213 dnl test xyes = xyes -a ( x != xyes -o x != xyes )
1214 if test x"${build_vaapi}" = x"yes" -a x"${have_ffmpeg}" != x"yes"; then
1215   AC_MSG_ERROR(["Hardware acceleration currently not supported unless using FFmpeg."])
1218 AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes)
1219 AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes)
1220 AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes)
1223 AC_PATH_PROG(PERL, perl)
1224 AM_CONDITIONAL(HAVE_PERL, test x"$PERL" != x)
1226 AC_PATH_PROG(CSOUND, csound)
1227 AM_CONDITIONAL(HAVE_CSOUND, test x"$CSOUND" != x)
1229 dnl -------------------------------------
1230 dnl LIRC
1231 dnl -------------------------------------
1232 AC_ARG_ENABLE(lirc, AC_HELP_STRING([--enable-lirc], [Disable support for Lirc]),
1233 [case "${enableval}" in
1234   yes) lirc=yes ;;
1235   no)  lirc=no ;;
1236   *)   AC_MSG_ERROR([bad value ${enableval} for enable-lirc option]) ;;
1237 esac], lirc=no)
1239 if test x"$lirc" = x"yes"; then
1240   AC_DEFINE([USE_LIRC], [], [LIRC daemon support])
1242 AM_CONDITIONAL(USE_LIRC, test x$lirc = xyes)
1244 dnl --------------------------------------------------------
1245 dnl Extension selection
1246 dnl --------------------------------------------------------
1247 extensions_list=
1248 ext_dejagnu=no
1249 ext_mysql=no
1250 ext_fileio=no
1251 ext_gtk=no
1252 ext_lirc=no
1253 ext_dbus=no
1254 ext_all=no
1255 ext_launcher=no
1256 AC_ARG_ENABLE(extensions,
1257   AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build]),
1258   if test -n ${enableval}; then
1259     if test "x${enableval}" != "xno"; then
1260       extlist="${enableval}"
1261       enableval=`echo ${enableval} | tr '\054' ' ' `
1262     else
1263       extlist=""
1264       enableval=""
1265     fi
1266   fi
1267   nextensions=0
1268   while test -n "${enableval}" ; do
1269     val=`echo ${enableval} | cut -d ' ' -f 1`
1270     extensions_list="${extensions_list} ${val}"
1271     [case "${val}" in
1272       dejagnu|DEJAGNU|dj|DJ)
1273         AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension])
1274         AC_MSG_NOTICE([Adding DejaGnu extension])
1275         ext_dejagnu=yes
1276         nextensions=$((nextensions+1))
1277         ;;
1278       mysql|MYSQL|sql|SQL)
1279         AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension])
1280         AC_MSG_NOTICE([Adding MySql extension])
1281         ext_mysql=yes
1282         nextensions=$((nextensions+1))
1283         ;;
1284       fileio|FILEIO|io|IO)
1285         AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension])
1286         AC_MSG_NOTICE([Adding FileIO extension])
1287         ext_fileio=yes
1288         nextensions=$((nextensions+1))
1289         ;;
1290       gtk|GTK|gtk2|GTK2)
1291         AC_DEFINE(USE_GTK_EXT, [1], [Build the GTK extension])
1292         ext_gtk=yes
1293         nextensions=$((nextensions+1))
1294         ;;
1295       launcher|LAUNCHER)
1296         AC_DEFINE(USE_LAUNCHER_EXT, [1], [Build the Launcher extension])
1297         ext_launcher=yes
1298         nextensions=$((nextensions+1))
1299         ;;
1300       lirc|LIRC)
1301         AC_DEFINE(USE_LIRC_EXT, [1], [Build the LIRC extension])
1302         ext_lirc=yes
1303         nextensions=$((nextensions+1))
1304         ;;
1305       dbus|DBUS)
1306         AC_DEFINE(USE_DBUS_EXT, [1], [Build the DBUS extension])
1307         ext_dbus=yes
1308         nextensions=$((nextensions+1))
1309         ;;
1310       all|ALL)
1311         AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions])
1312         ext_dejagnu=yes
1313         ext_mysql=yes
1314         ext_fileio=yes
1315         ext_gtk=yes
1316         ext_lirc=yes
1317         ext_dbus=yes
1318         ext_launcher=yes
1319         ext_all=yes
1320         nextensions=9
1321         ;;
1322       *) AC_MSG_ERROR([invalid extension specified: ${enableval} given (accept: MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)])
1323          ;;
1324       esac]
1325     enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1326     if test "x$val" = "x$enableval"; then
1327       break;
1328     fi
1329   done
1330   EXTENSIONS_LIST="$extensions_list"
1331   AC_SUBST(EXTENSIONS_LIST)
1334 if test x$ext_dbus = xyes; then
1335   GNASH_PATH_DBUS
1338 if test x$ext_mysql = xyes; then
1339   GNASH_PATH_MYSQL
1342 AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ])
1343 AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ])
1344 AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ])
1345 AM_CONDITIONAL(BUILD_LAUNCHER_EXT, [ test x$ext_launcher = xyes ])
1346 AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
1347 AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
1348 AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
1349 AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
1351 GNASH_PKG_CLASSFILE
1353 dnl --------------------------------------------------------
1354 dnl SOL dir
1355 dnl --------------------------------------------------------
1356 soldir=/tmp
1357 AC_ARG_WITH(soldir,
1358  AC_HELP_STRING([--with-soldir],
1359  [directory for .sol files]),
1360  with_soldir=${withval})
1361 if test x${with_soldir} != x; then
1362   soldir=${with_soldir}
1364 SOLDIR=${soldir}
1365 AC_SUBST(SOLDIR)
1367 dnl --------------------------------------------------------
1368 dnl AVM2
1369 dnl --------------------------------------------------------
1370 dnl AC_ARG_ENABLE(avm2,
1371 dnl   AC_HELP_STRING([--enable-avm2], [Enable support for AS3]),
1372 dnl   [case "${enableval}" in
1373 dnl     yes) avm2=yes ;;
1374 dnl     no)  avm2=no ;;
1375 dnl     *)   AC_MSG_ERROR([bad value ${enableval} for enable-avm2 option]) ;;
1376 dnl   esac], avm2=no
1377 dnl )
1378 dnl AM_CONDITIONAL(ENABLE_AVM2, [test x"$avm2" = xyes])
1379 dnl if test x$avm2 = xyes; then
1380 dnl     AC_DEFINE(ENABLE_AVM2, [1], [Enable AVM2 code])
1381 dnl fi
1382 AM_CONDITIONAL(ENABLE_AVM2, false)
1384 dnl This option is only used if you want Gnash to interwork with 
1385 dnl the Adobe player using the LocalConnection class.
1386 dnl lckey=0xdd3adabd
1387 AC_ARG_WITH(lckey,
1388  AC_HELP_STRING([--with-lckey],
1389  [shared memory key for your system]),
1390  with_lckey=${withval})
1392 if test x${with_lckey} != x; then
1393   lckey=${with_lckey}
1394 else
1395   lckey=0xcbc384f8
1397 LC_KEY=${lckey}
1398 AC_SUBST(LC_KEY)
1400 AC_ARG_ENABLE(python,
1401   AC_HELP_STRING([--enable-python],[Enable python for the python wrapper]),
1402 [case "${enableval}" in
1403   yes) python=yes ;;
1404   no)  python=no ;;
1405   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-python option]) ;;
1406 esac],python=no)
1408 dnl Look for python, which is optional. If enabled, a python loadable
1409 dnl module of Gnash is created.
1410 GNASH_PATH_PYTHON
1411 AM_CONDITIONAL([USE_PYTHON], test x"$python" = xyes)
1412 AM_CONDITIONAL([HAS_PYTHON], test x"$has_python" = xyes)
1414 # Maybe use jemalloc, which handles memory fragmentation for
1415 # ECAMscript languages better than the regular system malloc.
1416 # This seems like a good idea, as both the other player and
1417 # Mozilla/Firefox both recently switched to using jemalloc.
1418 AC_ARG_ENABLE(jemalloc,
1419   AC_HELP_STRING([--enable-jemalloc],[Enable jemalloc instead of system malloc]),
1420 [case "${enableval}" in
1421   yes) jemalloc=yes ;;
1422   no)  jemalloc=no ;;
1423   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-jemalloc option]) ;;
1424 esac],jemalloc=yes)
1426 dnl There is some weird stuff going on with NetBSD and jemalloc, so don't 
1427 dnl build it for now.
1428 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
1429   jemalloc=no
1431 dnl If the compiler doesn't have local thread storage enabled, don't try to
1432 dnl use jemalloc.
1433 if test x"${jemalloc}" = x"yes"; then
1434   AC_TRY_COMPILE([], [
1435     extern __thread int global_i; ],
1436     has_local_thread_storage=yes
1437   )
1438   if test x"${has_local_thread_storage}" = x"yes"; then
1439     AC_DEFINE([HAVE_LOCAL_THREAD_STORAGE], [1], [Has __thread (local thread storage) support])
1440     AC_DEFINE([USE_JEMALLOC], [], [Use jemalloc instead of system malloc])
1441   else
1442     jemalloc=no
1443   fi
1446 dnl We can search libs for mallinfo to decide whether we have it or not.
1447 dnl This is added to the linker flags when it's found. Usually it's -lc, but
1448 dnl on OpenSolaris it's -lmalloc, so this fixes the build.
1449 AC_SEARCH_LIBS([mallinfo], [c malloc],
1450                AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
1451                mallinfo=yes
1452                )
1454 AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes)
1455 AM_CONDITIONAL(JEMALLOC, test x$jemalloc = xyes)
1457 AC_ARG_ENABLE(debugger,
1458   AC_HELP_STRING([--enable-debugger],[Enable the Flash debugger]),
1459 [case "${enableval}" in
1460   yes) debugger=yes ;;
1461   no)  debugger=no ;;
1462   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-debugger option]) ;;
1463 esac],debugger=no)
1465 if test x"$debugger" = x"yes"; then
1466   AC_DEFINE([USE_DEBUGGER], [], [Flash Debugger support])
1468 AM_CONDITIONAL(DEBUGGER, test x$debugger = xyes)
1470 AC_ARG_ENABLE(fps-debug,
1471   AC_HELP_STRING([--enable-fps-debug],[Enable FPS debugging code]),
1472 [case "${enableval}" in
1473   yes) AC_DEFINE([GNASH_FPS_DEBUG], [1], [Enable FPS debugging code])
1474 esac])
1476 dnl When we're making binary releases, it's often nice to just statically link
1477 dnl the final executables so we don't worry about what's installed, or which
1478 dnl version it is.
1479 AC_ARG_ENABLE(allstatic,
1480   AC_HELP_STRING([--enable-allstatic],[Enable using static libraries when possible for dependencies]),
1481 [case "${enableval}" in
1482   yes) allstatic=yes ;;
1483   no)  allstatic=no ;;
1484   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-allstatic option]) ;;
1485 esac],allstatic=no)
1486 AM_CONDITIONAL(ALLSTATIC, test x$allstatic = xyes)
1489 dnl --------------------------------------------------------
1490 dnl SHM
1491 dnl --------------------------------------------------------
1492 AC_ARG_WITH(shm,
1493   AC_HELP_STRING([--with-shm],[specify a shared memory type.]),
1494   [case "${withval}" in
1495     sysv) with_shm=sysv
1496           ;;
1497     posix) with_shm=posix
1498           ;;    
1499     *)   AC_MSG_ERROR([bad value ${enableval} for --with-shm option (try sysv or posix])
1500           ;;
1501    esac],with_shm=sysv)
1503 if test x"${with_shm}" = x"sysv"; then
1504   AC_DEFINE([USE_SYSV_SHM], [1], [Use SYSV shared memory for compatability])
1505   dnl IPC_INFO isn't portable, and doesn't exist on BSD
1506   AC_TRY_COMPILE([#include <sys/ipc.h> #include <sys/shm.h>], [
1507     int flag = IPC_INFO; ],
1508     AC_DEFINE([HAVE_IPC_INFO], [1], [Use shm_info])
1509   )
1510 else
1511   AC_DEFINE([USE_POSIX_SHM], [1], [Use POSIX shared memory])
1514 dnl --------------------------------------------------------
1515 dnl Disable menus
1516 dnl --------------------------------------------------------
1517 dnl Don't add the GUI menu. Some educational systems think this adds
1518 dnl clutter and confusion, like on the OLPC.
1519 AC_ARG_ENABLE(menus,
1520   AC_HELP_STRING([--disable-menus],[Disable the GUI menus]),
1521 [case "${enableval}" in
1522   yes) menus=yes ;;
1523   no)  menus=no ;;
1524   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-menus option]) ;;
1525 esac],menus=yes)
1527 if test x"$menus" = x"yes"; then
1528   AC_DEFINE([USE_MENUS], [], [GUI Menu support])
1530 AM_CONDITIONAL(MENUS, test x$menus = xyes)
1532 dnl --------------------------------------------------------
1533 dnl Disable SWF information
1534 dnl --------------------------------------------------------
1535 dnl Don't gather SWF information in tree form. This takes
1536 dnl resources and memory that can be saved if there's no
1537 dnl need to examine SWF internals.
1538 AC_ARG_ENABLE(swftree,
1539   AC_HELP_STRING([--disable-swftree],[Disable showing SWF properties]),
1540 [case "${enableval}" in
1541   yes) swftree=yes ;;
1542   no)  swftree=no ;;
1543   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-swf-properties option]) ;;
1544 esac],swftree=yes)
1546 if test x"$swftree" = x"yes"; then
1547   AC_DEFINE([USE_SWFTREE], [], [View SWF information])
1549 AM_CONDITIONAL(SWFTREE, test x$swftree = xyes)
1551 dnl --------------------------------------------------------
1552 dnl Disable testsuite
1553 dnl --------------------------------------------------------
1554 dnl Disable running any tests for "make check". This may sound stupid, but
1555 dnl this option is designed to solely be used by maintainers in the 
1556 dnl DISTCHECK_CONFIGURE_FLAGS when building packages. Gnash's testing infrastructure
1557 dnl is complex, and often the the testsuites will work, but due to some obscure reason,
1558 dnl make distcheck fails.
1559 AC_ARG_ENABLE(testsuite,
1560   AC_HELP_STRING([--disable-testsuite],[Disable the testsuite, maintainers option only]),
1561 [case "${enableval}" in
1562   yes) testsuite=yes ;;
1563   no)  testsuite=no ;;
1564   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-testsuite option]) ;;
1565 esac],testsuite=yes)
1567 if test x"$testsuite" = x"yes"; then
1568   AC_DEFINE([USE_TESTSUITE], [], [Testsuite support, maintainers option only])
1570 AM_CONDITIONAL(TESTSUITE, test x$testsuite = xyes)
1572 dnl --------------------------------------------------------
1573 dnl Write the file to disk in the plugin
1574 dnl --------------------------------------------------------
1575 AC_ARG_ENABLE(write,
1576   AC_HELP_STRING([--enable-write], [Makes the Mozilla plugin write the currently playing SWF movie to /tmp.]),
1577 [case "${enableval}" in
1578   yes) write=yes ;;
1579   no)  write=no ;;
1580   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-write option]) ;;
1581 esac],write=no)
1583 if test x"$write" = x"yes"; then
1584   AC_DEFINE([WRITE_FILE], [], [Write files while streaming])
1587 dnl --------------------------------------------------------
1588 dnl Write a standalone gnash launcher to disk from the plugin
1589 dnl --------------------------------------------------------
1590 AC_ARG_ENABLE(sa-launcher,
1591   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.]),
1592 [case "${enableval}" in
1593   yes) sa_launcher=yes ;;
1594   no)  sa_launcher=no ;;
1595   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-sa-launcher option]) ;;
1596 esac],sa_launcher=yes)
1598 if test x"$sa_launcher" = x"yes"; then
1599   AC_DEFINE([CREATE_STANDALONE_GNASH_LAUNCHER], [], [Add support for writing a standalone executable launcher for movies embedded in web pages])
1602 dnl --------------------------------------------------------
1603 dnl Build the cygnal server if specified.
1604 dnl --------------------------------------------------------
1605 AC_ARG_ENABLE(cygnal,
1606   AC_HELP_STRING([--enable-cygnal], [Enable building of the Cygnal server]),
1607 [case "${enableval}" in
1608   yes) cygnal=yes ;;
1609   no)  cygnal=no ;;
1610   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cygnal option]) ;;
1611 esac],cygnal=no)
1612 AM_CONDITIONAL(CYGNAL, test x$cygnal = xyes)
1614 dnl --------------------------------------------------------
1615 dnl Build the cgibins server if specified.
1616 dnl --------------------------------------------------------
1617 AC_ARG_ENABLE(cgibins,
1618   AC_HELP_STRING([--enable-cgibins], [Enable building of the CGIs for Cygnal]),
1619 [case "${enableval}" in
1620   yes) cgibin=yes ;;
1621   no)  cgibin=no ;;
1622   *)   AC_MSG_ERROR([bad value ${enableval} for enable-cgibins option]) ;;
1623 esac],cgibin=yes)
1624 AM_CONDITIONAL(USE_CGI, test x$cgibin = xyes)
1625 if test x"${cgibin}" = x"yes"; then
1626   AC_DEFINE([USE_CGIBIN], [1], [Enable cgi-bin processes for Cygnal])
1629 dnl --------------------------------------------------------
1630 dnl Fix the Intel 810 LOD bias problem
1631 dnl --------------------------------------------------------
1632 AC_ARG_ENABLE(i810-lod-bias,
1633   AC_HELP_STRING([--enable-i810-lod-bias], [Enable fix for Intel 810 LOD bias problem]),
1634 [case "${enableval}" in
1635   yes) i810lodbias=yes ;;
1636   no)  i810lodbias=no ;;
1637   *)   AC_MSG_ERROR([bad value ${enableval} for enable-i810-lod-bias option]) ;;
1638 esac])
1640 if test x"${i810lodbias}" = xyes; then
1641     AC_DEFINE([FIX_I810_LOD_BIAS], [], [Fix i810 LOD bias problem])
1644 dnl --------------------------------------------------------
1645 dnl  Double buffer
1646 dnl --------------------------------------------------------
1647 dnl Add an option for double buffering when rendering, currently only used by
1648 dnl the frmaebuffer GUI.
1649 dnl If defined, an internal software-buffer is used for rendering and is then
1650 dnl copied to the video RAM. This avoids flicker and is faster for complex 
1651 dnl graphics, as video RAM access is usually slower. (strongly suggested)
1652 AC_ARG_ENABLE(doublebuf,
1653   AC_HELP_STRING([--enable-doublebuf], [Enable support for double buffering when rendering]),
1654   [case "${enableval}" in
1655     yes) doublebuf=yes ;;
1656     no)  doublebuf=no ;;
1657     *)   AC_MSG_ERROR([bad value ${enableval} for enable-doublebuf option]) ;;
1658   esac], doublebuf=no
1660 AM_CONDITIONAL(ENABLE_DBUF, [test x"$doublebuf" = xyes])
1661 if test x$doublebuf = xyes; then
1662     AC_DEFINE(ENABLE_DOUBLE_BUFFERING, [1], [Enable double buffering])
1665 dnl --------------------------------------------------------
1666 dnl  Offscreen buffer
1667 dnl --------------------------------------------------------
1668 dnl This enables rendering to an offscreen buffer, instead of directly to window
1669 AC_ARG_ENABLE(offscreen,
1670   AC_HELP_STRING([--enable-offscreen], [Enable support for rendering offscreen]),
1671   [case "${enableval}" in
1672     yes) offscreen=yes ;;
1673     no)  offscreen=no ;;
1674     *)   AC_MSG_ERROR([bad value ${enableval} for enable-offscreen option]) ;;
1675   esac], offscreen=no
1679 dnl --------------------------------------------------------
1680 dnl  SSH support selection
1681 dnl --------------------------------------------------------
1682 dnl Enable using libssh with libnet
1683 AC_ARG_ENABLE(ssh,
1684   AC_HELP_STRING([--enable-ssh], [Enable using SSH for network authentication]),
1685 [case "${enableval}" in
1686   yes) build_ssh=yes ;;
1687   no)  build_ssh=no ;;
1688   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssh option]) ;;
1689 esac], build_ssh=no)
1691 AM_CONDITIONAL(BUILD_SSH, test x"${build_ssh}" = xyes)
1692 if test x"${build_ssh}" = xyes; then
1693   GNASH_PKG_FIND(ssh, [libssh/libssh.h], [libssh library], ssh_socket_init)
1694 dnl  GNASH_PKG_FIND(poppler, [popt.h], [Poppler library], poppler_init)
1696 if test x"${has_ssh}" = x"yes"; then
1697   AC_DEFINE([USE_SSH], [1], [Use SSH for authentication])
1700 dnl --------------------------------------------------------
1701 dnl  SSL support selection
1702 dnl --------------------------------------------------------
1704 dnl Enable using OpenSSL with libnet.
1705 AC_ARG_ENABLE(ssl,
1706   AC_HELP_STRING([--enable-ssl], [Enable using OpenSSL directly]),
1707 [case "${enableval}" in
1708   yes) build_ssl=yes ;;
1709   no)  build_ssl=no ;;
1710   *)   AC_MSG_ERROR([bad value ${enableval} for --enable-ssl option]) ;;
1711 esac], build_ssl=no)
1713 with_cert=
1714 with_pem=
1715 AM_CONDITIONAL(BUILD_SSL, test x"${build_ssl}" = xyes)
1716 AC_ARG_WITH(cert,
1717   AC_HELP_STRING([--with-cert],
1718   [cert file for SSL]),
1719   with_cert=${withval})
1720 AC_ARG_WITH(pem,
1721   AC_HELP_STRING([--with-pe],
1722   [pem file for SSL]),
1723   with_pem=${withval})
1725 if test x"${build_ssl}" = xyes; then
1726   GNASH_PKG_FIND(ssl, [openssl/ssl.h], [OpenSSL library], SSL_library_init)
1728 if test x"${has_ssl}" = x"yes"; then
1729   AC_DEFINE([USE_SSL], [1], [Use SSL for authentication])
1732 dnl -----------------------------------------------------------
1733 dnl   Verify dependencies for requested GUIs are met, and
1734 dnl   disable build of the GUIS for which deps are NOT met
1735 dnl ------------------------------------------------------------
1737 dnl Look for scratchbox (used in GNASH_PATH_ALP)
1738 dnl FIXME: move it in macros/alp.m4 or at least after
1739 dnl        the build_alp conditional ?
1740 sbox=no
1741 if test x"${SBOX_REDIRECT_FROM_DIRS}" != x; then
1742   sbox=yes
1745 if test x$build_gtk = xyes -o $build_alp = xyes; then
1746    GNASH_PATH_GTK2
1747    GNASH_PATH_PANGO
1748    GNASH_PKG_FIND(atk, [atk/atk.h], [atk library], atk_focus_tracker_init, [1.0])
1749    if test x"${build_ogl}" = xyes; then
1750       GNASH_PATH_GLEXT
1751    fi
1752    if test x"${build_cairo}" = xyes; then
1753       GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1754    fi
1756 dnl TODO: add checks for all other GUIs
1759 dnl -----------------------------------------------------------
1760 dnl Try to ignore stupid dependencies
1761 dnl -----------------------------------------------------------
1763 AC_MSG_CHECKING(linker --as-needed support)
1764 gcc_cv_ld_as_needed=no
1765 # Check if linker supports --as-needed and --no-as-needed options
1766 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1767   gcc_cv_ld_as_needed=yes
1769 if test x"$gcc_cv_ld_as_needed" = xyes; then
1770   LDFLAGS+=" -Wl,--as-needed"
1772 AC_MSG_RESULT($gcc_cv_ld_as_needed)
1774 dnl AC_MSG_CHECKING(linker --no-undefined support)
1775 dnl gcc_cv_ld_undef_needed=no
1776 dnl # Check if linker supports --no-undefined
1777 dnl if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1778 dnl     gcc_cv_ld_undef_needed=yes
1779 dnl fi
1780 dnl if test x"$gcc_cv_ld_undef_needed" = xyes; then
1781 dnl     LDFLAGS=" ${LDFLAGS} -Wl,--no-undefined"
1782 dnl fi
1783 dnl AC_MSG_RESULT($gcc_cv_ld_undef_needed)
1785 AC_DEFINE(USE_GIF, [1], [Use the GIF library])
1786 AC_DEFINE(USE_PNG, [1], [Use the PNG library])
1787 AM_CONDITIONAL(USE_GIF, true)
1788 AM_CONDITIONAL(USE_PNG, true)
1790 dnl GNASH_PKG_FIND(dmalloc, [dmalloc.h], [dmalloc], mallinfo)
1791 AM_CONDITIONAL(HAVE_DMALLOC, [ test x$has_dmalloc = xyes ])
1793 AC_PATH_TOOL([AUTOTRACE], [autotrace])
1794 AC_HEADER_DIRENT
1796 dnl -----------------------------------------------------------------
1797 dnl PLUGIN RELATED STUFF
1798 dnl -----------------------------------------------------------------
1800 dnl Zip is used insted of tar when building an xpi package
1801 dnl for Mozilla/Firefox.
1802 AC_PATH_PROG(ZIP, zip, ,[${pathlist}])
1804 dnl !! This has been moved here to make --enable-npapi work
1805 dnl !! All of plugin-related macro calls could be moved into
1806 dnl !! a specialized macros/plugin.m4
1808 dnl ----------------------------------------------------
1809 dnl Add KPARTS support, if specified or KDE gui is built
1810 dnl ----------------------------------------------------
1812 AC_ARG_ENABLE(kparts3,
1813   AC_HELP_STRING([--disable-kparts3], [Disable support for Konqueror 3.x plugin (default: enabled if kde3 gui is)]),
1814 [case "${enableval}" in
1815   yes) build_kparts3=yes ;;
1816   no)  build_kparts3=no ;;
1817   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts3 option]) ;;
1818 esac],build_kparts3=$build_kde3)
1820 dnl --------------------------------------------------------
1821 dnl Add KPARTS 4.x support, if specified or KDE gui is built
1822 dnl --------------------------------------------------------
1824 AC_ARG_ENABLE(kparts4,
1825   AC_HELP_STRING([--disable-kparts4], [Disble support for Konqueror 4.x plugin (default: enabled if kde4 gui is)]),
1826 [case "${enableval}" in
1827   yes) build_kparts4=yes ;;
1828   no)  build_kparts4=no ;;
1829   *)   AC_MSG_ERROR([bad value ${enableval} for --disable-kparts4 option]) ;;
1830 esac],build_kparts4=$build_kde4)
1832 dnl -----------------------------------------------------------
1833 dnl Add NPAPI support, if specified or GTK or KDE4 gui is built
1834 dnl -----------------------------------------------------------
1836 AC_ARG_ENABLE(npapi,
1837   AC_HELP_STRING([--disable-npapi], [Disable NPAPI plugin build (default: enabled if gtk or kde4 gui is)]),
1838   [case "${enableval}" in
1839     yes) npapi=yes ;;
1840     no)  npapi=no ;;
1841     *)   AC_MSG_ERROR([bad value ${enableval} for disable-npapi option]) ;;
1842   esac],
1843   if test x$build_gtk = xyes -o x$build_kde4 = xyes; then
1844     npapi=yes
1845   fi
1848 dnl -----------------------------------------------------------------
1849 dnl Enable us to disable building all browser plugins in one command.
1850 dnl -----------------------------------------------------------------
1852 AC_ARG_ENABLE(plugins,
1853   AC_HELP_STRING([--disable-plugins], [Disable all browser plugins from building (default=no)]),
1854   [case "${enableval}" in
1855     yes) plugins=yes ;;
1856     no)  plugins=no ;;
1857     *)   AC_MSG_ERROR([bad value ${enableval} for disable-plugins option]) ;;
1858   esac],
1859   plugins=yes
1861 if test x$plugins = xno; then
1862   npapi=no
1863   build_kparts3=no
1864   build_kparts4=no
1868 dnl Set the general plugins install policy here
1870 AC_ARG_WITH(plugins-install,
1871   AC_HELP_STRING([--with-plugins-install=system|user|prefix], [Policy for plugins install. Default: user.]),
1872         [case "${withval}" in
1873           user) PLUGINS_INSTALL_POLICY=user ;;
1874           system) PLUGINS_INSTALL_POLICY=system ;;
1875           prefix) PLUGINS_INSTALL_POLICY=prefix ;;
1876           *)  AC_MSG_ERROR([bad value ${withval} for --with-plugins-install]) ;;
1877          esac 
1878         ], PLUGINS_INSTALL_POLICY=user) 
1881 GNASH_PATH_FIREFOX
1883 dnl -----------------------------------------------------------------
1884 dnl END OF PLUGIN RELATED STUFF
1885 dnl -----------------------------------------------------------------
1887 dnl IRIX-hack.
1888 case $host in
1889   *-*-irix*)
1890   dnl ABI-check
1891   save_LIBS=$LIBS
1892   dir="/usr/lib /usr/lib32 /usr/lib/lib64"
1893   for i in $dir; do
1894     LIBS=-L$i
1895     AC_SEARCH_LIBS(XDisableAccessControl, X11, [
1896       xpathed=$i
1897       break
1898     ])
1899     unset ac_cv_search_XDisableAccessControl
1900   done
1901   ac_x_libraries=$xpathed
1902   x_libraries=$xpathed
1903   LIBS=$save_LIBS
1904   ;;
1905 esac
1907 AM_CONDITIONAL(LIRC, [test x$lirc_ext = xyes])
1909 AC_CHECK_HEADERS(endian.h machine/endian.h)
1910 AC_CHECK_HEADERS(malloc.h malloc/malloc.h)
1911 AC_CHECK_HEADERS(getopt.h)
1912 AC_CHECK_HEADERS(libgen.h)
1913 AC_CHECK_HEADERS(pwd.h)
1914 AC_CHECK_HEADERS(sys/utsname.h)
1915 AC_CHECK_HEADERS(signal.h)
1916 AC_CHECK_HEADERS(unistd.h)
1917 AC_CHECK_HEADERS(sys/time.h)
1918 AC_CHECK_HEADERS(ieeefp.h)
1919 dnl libcurl3-dev on Ubuntu has a dependency on lber, and Gnash won't link
1920 dnl on most machines without it. While it isn't diretly used by Gnash at all,
1921 dnl it's to work around an Ubuntu packaging bug.
1922 AC_CHECK_LIB(lber, ber_free)
1923 AC_CHECK_LIB(bz2, BZ2_bzopen)
1924 AC_CHECK_LIB(c, getpwnam, AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
1926 dnl X11 is needed for fltk (at least),
1927 dnl and probably for many other guis too ...
1928 dnl if ! test x$build_fb = xyes; then # <--- this is wrong as build_x is non-exclusive
1929 dnl AC_PATH_XTRA
1930 dnl AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation)
1931 dnl AC_CHECK_LIB(gmp, _gmp_get_memory_functions)
1932   GNASH_PATH_X11
1933   AC_CHECK_LIB(Xi, XInput_find_display)
1934   AC_CHECK_LIB(X11, XDisableAccessControl)
1935 dnl fi
1936 AM_CONDITIONAL(HAVE_X11, [test x$x11 = xyes])
1937 AC_CHECK_LIB(rt, shm_unlink)
1938 AC_CHECK_FUNCS(shm_open shm_unlink)
1939 AC_TRY_COMPILE([#include <strings.h>], [
1940   char *p1 = (char *)"Hello";
1941   char *p2 = (char *)"World";
1942   strcasecmp(p1, p2); ],
1943   AC_DEFINE(HAVE_STRINGCASECMP, [1], [Has strcasecmp])
1946 dnl if test x$cross_compiling = xno; then
1947 AC_LANG_PUSH(C++)
1948 AC_MSG_CHECKING([to see if float formatting is broken])
1949 AC_RUN_IFELSE([
1950   AC_LANG_PROGRAM([#include <cmath>
1951     void testFloat(double d, double& s)
1952     {
1953         d /= 1000.0;
1954         s = std::fmod(d, 86400.0);
1955     }], [
1956      double d = 3.0935415006117e+23;
1957      double s;
1958      testFloat(d, s);
1959      if (static_cast<int>(s) != 61440) {
1960          return 1;
1961      }])],                         dnl end of LANG_PROGRAM
1962      broken_float=no,              dnl returns 0, works
1963      broken_float=yes,             dnl returns 1, broken
1964      broken_float=no               dnl cross compiling
1965 )                                  dnl end of RUN_IFELSE
1966 AC_LANG_POP(C++)
1967 dnl fi
1969 if test x${broken_float} = xyes; then
1970   AC_MSG_RESULT([yes])
1971   AC_DEFINE(HAVE_BROKEN_FLOAT, [1], [Has broken float support])
1972 else
1973   AC_MSG_RESULT([no])
1975 AM_CONDITIONAL(BROKEN_FLOAT, [ test x$broken_float = xyes ])
1977 dnl See if ipc_perm structure has the ipc_perm.key field, and if so,
1978 dnl which variant of the name is used.
1979 ipc_key=no
1980 AC_TRY_COMPILE([
1981   #include <sys/ipc.h>
1982   #include <sys/shm.h>], [
1983  struct shmid_ds shmseg;      
1984  key_t x = shmseg.shm_perm.key;],
1985  ipc_key=yes
1986  AC_DEFINE(IPC_PERM_KEY, [key], [Has the key field in ipc_perm])
1989 if test x$ipc_key = xno; then
1990   AC_TRY_COMPILE([
1991     #include <sys/ipc.h>
1992     #include <sys/shm.h>], [
1993     struct shmid_ds shmseg;      
1994     key_t x = shmseg.shm_perm.__key;],
1995     AC_DEFINE(IPC_PERM_KEY, [__key], [Has the key field in ipc_perm])
1996     ipc_key=yes
1997   )
2000 dnl AC_CHECK_FUNCS(strcasecmp stricmp)
2001 dnl AC_CHECK_FUNCS(vsnprintf)
2003 AC_CACHE_CHECK([for finite], ac_cv_finite,
2004  [AC_TRY_COMPILE([
2005    #include <math.h>
2006    #ifdef HAVE_IEEEFP_H
2007    #include <ieeefp.h>
2008    #endif],
2009  [double x; int y; y = finite(x);],
2010  ac_cv_finite=yes,
2011  ac_cv_finite=no
2013 if test x"$ac_cv_finite" = x"yes"; then
2014   AC_SEARCH_LIBS(finite, m,
2015     [AC_DEFINE(HAVE_FINITE, [1], [Has finite])]
2016   )
2019 AC_LANG_PUSH(C++)
2020 AC_CACHE_CHECK([for isfinite], ac_cv_isfinite,
2021  [AC_TRY_COMPILE([#include <cmath>],
2022  [using namespace std; double x; int y; y = isfinite(x);],
2023  ac_cv_isfinite=yes,
2024  ac_cv_isfinite=no
2026 AC_LANG_POP(C++)
2027 if test x"$ac_cv_isfinite" = x"yes"; then
2028   dnl Don't give up if isfinite is not found in -lm
2029   dnl isfinite is defined as a macro in C99.
2030   AC_SEARCH_LIBS(isfinite, m)
2031   AC_DEFINE(HAVE_ISFINITE, [1], [Has isfinite])
2034 AC_LANG_PUSH(C++)
2035 AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [
2036   AC_TRY_LINK([#include <cstdio>
2037 ], 
2038     [ std::printf("%s", __PRETTY_FUNCTION__); ], 
2039     [ ac_cv_implements___PRETTY_FUNCTION__="yes" ],
2040     [ ac_cv_implements___PRETTY_FUNCTION__="no" ]
2041   )
2043 if test "x$ac_cv_implements___PRETTY_FUNCTION__" = "xyes" ; then
2044   AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined])
2047 AC_CACHE_CHECK([whether $CXX implements __FUNCTION__], ac_cv_implements___FUNCTION__, [
2048   AC_TRY_LINK([#include <cstdio>
2049 ], 
2050     [ std::printf("%s", __FUNCTION__); ], 
2051     [ ac_cv_implements___FUNCTION__="yes" ],
2052     [ ac_cv_implements___FUNCTION__="no" ]
2053   )
2055 if test "x$ac_cv_implements___FUNCTION__" = "xyes" ; then
2056   AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined])
2059 AC_CACHE_CHECK([whether $CXX implements __func__], ac_cv_implements___func__, [
2060   AC_TRY_LINK([#include <cstdio>
2061 ], 
2062     [ std::printf("%s", __func__); ], 
2063     [ ac_cv_implements___func__="yes" ],
2064     [ ac_cv_implements___func__="no" ]
2065   )
2067 if test "x$ac_cv_implements___func__" = "xyes" ; then
2068   AC_DEFINE(HAVE_func, [1], [__func__ is defined])
2070 AC_LANG_POP(C++)
2071 AC_REPLACE_FUNCS(getopt)
2073 dnl Date portability stuff, used in server/asobj/Date.cpp
2074 AC_CHECK_FUNCS(gettimeofday)
2075 AC_CHECK_FUNCS(ftime)
2076 AC_CHECK_FUNCS(tzset)
2077 AC_CHECK_FUNCS(localtime_r)
2079 AC_CACHE_CHECK([whether struct tm has tm_gmtoff], ac_cv_tm_gmtoff, [
2080         AC_TRY_LINK([
2081 /* ctime(1) says "The glibc version of struct tm has additional fields
2082  * defined  when _BSD_SOURCE was set before including <time.h>"
2083  * In practice, you don't need to define it yourself (tested on glibc-2.2.1 
2084  * and 2.3.6) but if you *do* define it yourself, it makes *all* functions
2085  * favour BSD-like behaviour over of GNU/POSIX, which seems dangerous.
2086  */
2087 // #define _BSD_SOURCE 1
2088 #include <time.h>
2089 ], 
2090                 [ struct tm tm; long l = tm.tm_gmtoff; ], 
2091                 [ ac_cv_tm_gmtoff="yes" ],
2092                 [ ac_cv_tm_gmtoff="no" ]
2093         )
2095 if test "x$ac_cv_tm_gmtoff" = "xyes" ; then
2096         AC_DEFINE(HAVE_TM_GMTOFF, [1], [struct tm has member tm_gmtoff])
2099 AC_CACHE_CHECK([whether timezone is a long], ac_cv_long_timezone, [
2100         AC_TRY_LINK([
2101 /* On Linux/glibc, tzset(3) says "extern long timezone;" (seconds West of GMT)
2102  * but on BSD char *timezone(int,int) is a function returning a string name.
2103  * The BSD function timegm() may be the equivalent, but this should
2104  * not be necessary because on BSD the code should use tm.tm_gmtoff instead
2105  * (use of long timezone is a fallback strategy for when tm_gmtoff exists not).
2106  */
2107 #include <stdio.h>
2108 #include <time.h>
2109 extern long timezone;
2110   ], 
2111     [ printf("%ld", timezone); ], 
2112     [ ac_cv_long_timezone="yes" ],
2113     [ ac_cv_long_timezone="no" ]
2114    )
2116 if test "x$ac_cv_long_timezone" = "xyes" ; then
2117   AC_DEFINE(HAVE_LONG_TIMEZONE, [1], [extern timezone is a long integer, not a function])
2120 AC_CHECK_FUNCS(sysconf)
2121 AC_CHECK_FUNCS(shmget shmat shmdt mmap)
2122 AC_CHECK_FUNCS(memmove)
2123 AC_CHECK_FUNCS(scandir)         dnl supported by BSD and Linux, but you never know...
2124 dnl AC_CHECK_FUNC(strndup, AC_DEFINE(HAVE_STRNDUP, 1, [Has strndup()] ))
2125 AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has clock_gettime()] ))
2126 dnl AC_CHECK_FUNCS(strlcpy, AC_DEFINE(HAVE_STRLCPY_PROTO, [1],[Define if you have the strlcpy prototype]))
2127 dnl AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT_PROTO, [1],[Define if you have the strlcat prototype]))
2128 dnl Look for Win32 networking stuff
2129 AC_CHECK_HEADERS(winsock.h)
2130 AC_CHECK_HEADERS(winsock2.h)
2131 AC_CHECK_FUNCS(socket)
2132 AC_CHECK_FUNCS(CreateFileMappingA)
2134 dnl Shm::resize() uses this if it exists
2135 AC_CHECK_LIB(c, mremap)
2137 GNASH_PKG_FIND(nspr, [nspr.h], [Netscape Portable Runtime (NSPR)], PR_Init)
2139 AC_PATH_TOOL(WINDRES, [windres])
2140 AC_SUBST(WINDRES)
2142 GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress)
2143 GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init)
2144 if test x"${openbsd_os}" = x"yes"; then
2145   GNASH_PKG_FIND(libpng, [png.h], [png images], png_info_init)
2146 else
2147   GNASH_PKG_FIND(png, [png.h], [png images], png_info_init)
2149 GNASH_PKG_FIND(gif, [gif_lib.h], [gif images], DGifOpen)
2150 if test x"${GIF_LIBS}" = x ; then
2151  GNASH_PKG_FIND(ungif, [gif_lib.h], [gif images], DGifOpen)
2152  GIF_LIBS=${UNGIF_LIBS}
2153  GIF_CFLAGS=${UNGIF_CFLAGS}
2155 if test x"$testsuite" = x"yes"; then
2156   GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
2159 GNASH_PKG_FIND(speex, [speex.h], [speex audio codec], speex_decode_int)
2160 AM_CONDITIONAL(HAVE_SPEEX, [ test x$has_speex = xyes ])
2161 if test x$has_speex = xyes ; then
2162   AC_DEFINE([DECODING_SPEEX], [1], [Speex codec available])
2165 GNASH_PKG_FIND(speexdsp, [speex_resampler.h], [speex DSP utilities], speex_resampler_process_int)
2166 if test x$has_speexdsp = xyes ; then
2167   AC_DEFINE([RESAMPLING_SPEEX], [1], [Speex resampler available])
2170 dnl Find freetype and fontconfig
2171 dnl GNASH_PKG_FIND(freetype2, [freetype/freetype.h], [freetype2 font library], FT_Load_Char)
2172 dnl rob might be working on this or not ;)
2173 GNASH_PATH_FREETYPE2
2174 GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch)
2176 if test x$cross_compiling = xno; then
2177   AC_PATH_MING
2179 AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ])
2181 AM_CONDITIONAL(MING_VERSION_0_4,
2182         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040000  ])
2183 AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS,
2184         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040002  ])
2185 AM_CONDITIONAL(MING_SUPPORTS_INIT_ACTIONS,
2186         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040004  ])
2187 AM_CONDITIONAL(MING_SUPPORTS_REPLACE_TAG,
2188         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
2189 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_ADD_CHARACTER,
2190         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040005 ])
2191 AM_CONDITIONAL(MING_SUPPORTS_STREAMING_SOUND,
2192         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
2193 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_SET_DEPTH,
2194         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040006 ])
2195 AM_CONDITIONAL(MING_VERSION_0_4_3,
2196         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040300 ])
2197 AM_CONDITIONAL(MING_VERSION_0_4_4,
2198         [ test x"$MAKESWF" != x && test $MING_VERSION_CODE -ge 00040400 ])
2200 if test x$cross_compiling = xno; then
2201   AC_ARG_WITH([swfdec_testsuite],
2202           AC_HELP_STRING([--with-swfdec-testsuite],
2203                   [directory where swfdec testsuite (the 'test' dir) is]),
2204         SWFDEC_TESTSUITE=${withval})
2205   AC_SUBST(SWFDEC_TESTSUITE)
2207 AM_CONDITIONAL(ENABLE_SWFDEC_TESTSUITE, [ test x"$SWFDEC_TESTSUITE" != x ])
2209 if test x$cross_compiling = xno; then
2210   AC_ARG_ENABLE([http_testsuite],
2211       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2212           AC_HELP_STRING([--enable-http-testsuite=<baseurl>],
2213                   [Enable http based testsuite (default url is http://www.gnashdev.org/testcases)]),
2214               [case "${enableval}" in
2215              no) HTTP_TESTSUITE="" ;;
2216             yes) HTTP_TESTSUITE="http://www.gnashdev.org/testcases" ;;
2217               *) HTTP_TESTSUITE="${enableval}";;
2218            esac])
2219   AC_SUBST(HTTP_TESTSUITE)
2221 AM_CONDITIONAL(ENABLE_HTTP_TESTSUITE, [ test x"$HTTP_TESTSUITE" != x ])
2223 if test x$cross_compiling = xno; then
2224   AC_ARG_ENABLE([red5_testing],
2225       dnl # TODO: find out how to add [quotes] around '=<baseurl>'
2226           AC_HELP_STRING([--enable-red5-testing=<host>],
2227                   [Enable red5 based testing (default host is localhost)]),
2228               [case "${enableval}" in
2229              no) RED5_HOST="" ;;
2230             yes) RED5_HOST="localhost" ;;
2231               *) RED5_HOST="${enableval}";;
2232            esac])
2233   AC_SUBST(RED5_HOST)
2235 AM_CONDITIONAL(ENABLE_RED5_TESTING, [ test x"$RED5_HOST" != x ])
2237 dnl The name might differ between systems.
2238 if test x"$testsuite" = x"yes"; then
2239 AC_PATH_PROGS(NETCAT, [nc netcat])
2240 AC_PATH_PROG(WGET, wget)
2242 AM_CONDITIONAL(HAS_NETCAT, [ test x"$NETCAT" != x ])
2243 AM_CONDITIONAL(HAS_WGET, [ test x"$WGET" != x ])
2246 dnl See if we can use the swfmill, mtasc, swfc and haxe based testsuites 
2248 if test x"$testsuite" = x"yes" -a x$cross_compiling = xno; then
2249   AC_PATH_PROG(AS3COMPILE, as3compile)
2250   AC_PATH_PROG(SWFC, swfc)
2251   AC_PATH_SWFMILL
2252   AC_PATH_MTASC
2253   AC_PATH_HAXE
2256 AM_CONDITIONAL(ENABLE_SWFMILL, [ test x"$SWFMILL" != x ])
2257 AM_CONDITIONAL(SWFMILL_AS3_SUPPORT,
2258         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2260 dnl SWFMILL versions older than 0.3 didn't get function2 flags order correctly
2261 AM_CONDITIONAL(SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT,
2262         [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2264 AM_CONDITIONAL(ENABLE_AS3COMPILE, [ test x"$AS3COMPILE" != x ])
2265 AM_CONDITIONAL(ENABLE_MTASC, [ test x"$MTASC" != x ])
2266 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2267 AM_CONDITIONAL(ENABLE_SWFC, [ test x"$SWFC" != x ])
2268 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2270 AC_PATH_PROG(DOXYGEN, doxygen)
2271 AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ])
2273 dnl currently unused
2274 dnl GNASH_PKG_FIND(ogg, [ogg.h], [decode ogg streams], ogg_stream_init)
2276 if test x$build_sdl = xyes -o x$build_sound_sdl = xyes; then
2277   GNASH_PATH_SDL
2280 AM_CONDITIONAL(HAVE_SDL, [ test x$has_SDL = xyes ])
2282 GNASH_PATH_QT3
2283 GNASH_PATH_KDE3
2285 GNASH_PATH_QT4
2286 GNASH_PATH_KDE4
2288 dnl Qtopia is a desktop environment for embedded devices.
2289 dnl GNASH_PATH_QTOPIA3
2290 dnl GNASH_PATH_QTOPIA4
2291 has_qtopia3=no
2292 has_qtopia4=no
2295 AM_CONDITIONAL(HAVE_QTOPIA3, [test x$has_qtopia3 = xyes])
2296 AM_CONDITIONAL(HAVE_QTOPIA4, [test x$has_qtopia4 = xyes])
2297 AM_CONDITIONAL(HAVE_KDE3,    [test x$has_kde3 = xyes])
2298 AM_CONDITIONAL(HAVE_KDE4,    [test x$has_kde4 = xyes])
2299 AM_CONDITIONAL(HAVE_QT3,     [test x$has_qt3 = xyes])
2300 AM_CONDITIONAL(HAVE_QT4,     [test x$has_qt4 = xyes])
2302 AM_CONDITIONAL(WITH_KDE4,    [test "$with_kde4" != "no"])
2303 AM_CONDITIONAL([QT_X11],     [test "$platform" = "X11"])
2304 AM_CONDITIONAL([QTOPIA],     [test "$platform" = "Qtopia"])
2305 AM_CONDITIONAL([QT_OSX],     [test "$platform" = "OSX"])
2306 AM_CONDITIONAL([QT_OS9],     [test "$platform" = "OS9"])
2307 AM_CONDITIONAL([QT_WIN32],   [test "$platform" = "Win32"])
2309 dnl Need GLIB for both GTK and GST
2310 if test x"${build_gtk}" = xyes -o x"${build_media_gst}" = xyes; then
2311   GNASH_PATH_GLIB
2314 AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ])
2316 if test x$npapi = xyes; then
2317   if ! test x$build_gtk = xyes -o x$build_kde4 = xyes; then
2318     AC_MSG_WARN(["Enabled NPAPI plugin, but it's not supported by the selected GUI"])
2319   fi
2322 if test x$windows = xyes -a x$npapi = xyes; then
2323   if test "x$NSPR_CFLAGS" = x -a "x$NSPR_LIBS" = x; then
2324     AC_MSG_ERROR(["On Win32, NPAPI plugin requires NSPR."])
2325   fi
2326   if test "x$WINDRES" = x; then
2327     AC_MSG_ERROR(["On Win32, NPAPI plugin requires windres."])
2328   fi
2331 dnl Need GLIB for NPAPI plugin
2332 if test x$npapi = xyes; then
2333   GNASH_PATH_GLIB
2336 dnl if kde isn't installed, even if it's specified, don't try to build
2337 dnl the KPARTS plugin, which is KDE based.
2338 if test x$has_kde3 = xno -a x$build_kparts3 = xyes; then
2339   build_kparts3=no
2340 dnl  build_kde3=no
2341   AC_MSG_WARN(["Disabling KPARTS 3.x plugin, no KDE development found"])
2344 if test x$build_kde3 = xno -a x$build_kparts3 = xyes; then
2345   AC_MSG_WARN(["Enabled KPARTS 3.x plugin, but you aren't building a KDE based GUI!"])
2347 if test x$has_kde4 = xno -a x$build_kparts4 = xyes; then
2348   build_kparts4=no
2349 dnl  build_kde4=no
2350   AC_MSG_WARN(["Disabling KPARTS 4.x plugin, no KDE 4.x development found"])
2353 if test x$build_kde4 = xno -a x$kparts4 = xyes; then
2354   AC_MSG_WARN(["Enabled KPARTS 4.x plugin, but you aren't building a KDE 4.x based GUI!"])
2357 AM_CONDITIONAL(BUILD_QTOPIA3_GUI,  [ test x$build_qtopia3 = xyes ])
2358 AM_CONDITIONAL(BUILD_QTOPIA4_GUI,  [ test x$build_qtopia4 = xyes ])
2359 AM_CONDITIONAL(BUILD_QT3_GUI,      [ test x$build_qt3 = xyes ])
2360 AM_CONDITIONAL(BUILD_QT4_GUI,      [ test x$build_qt4 = xyes ])
2361 AM_CONDITIONAL(BUILD_KDE3_GUI,     [ test x$build_kde3 = xyes ])
2362 AM_CONDITIONAL(BUILD_KDE4_GUI,     [ test x$build_kde4 = xyes ])
2364 AM_CONDITIONAL(BUILD_GTK_GUI,      [ test x$build_gtk = xyes ])
2365 AM_CONDITIONAL(BUILD_FLTK_GUI,     [ test x$build_fltk = xyes ])
2366 AM_CONDITIONAL(BUILD_SDL_GUI,      [ test x$build_sdl = xyes ])
2367 AM_CONDITIONAL(BUILD_FB_GUI,       [ test x$build_fb = xyes ])
2368 AM_CONDITIONAL(BUILD_AQUA_GUI,     [ test x$build_aqua = xyes ])
2369 AM_CONDITIONAL(ALLSTATIC,          [ test x$build_aqua = xyes ]) dnl the Aqua-binary is always static.
2370 AM_CONDITIONAL(BUILD_RISCOS_GUI,   [ test x$build_riscos = xyes ])
2371 AM_CONDITIONAL(BUILD_DUMP_GUI,     [ test x$build_dump = xyes ])
2372 AM_CONDITIONAL(BUILD_AMIGAOS4_GUI, [ test x$build_aos4 = xyes ])
2373 AM_CONDITIONAL(BUILD_HAIKU_GUI,    [ test x$build_haiku = xyes ])
2375 # plugin building flags
2376 AM_CONDITIONAL(NPAPI,   [test x"${npapi}" = xyes])
2377 AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes])
2378 AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes])
2380 if test x"${build_gles}" = xyes; then
2381   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2382   GNASH_PATH_GLES
2385 if test x"${build_ogv}" = xyes; then
2386   GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
2387   GNASH_PKG_FIND(OpenVG, [vg/openvg.h], [OpenVG library], vgDrawImage)
2390 if test x"${build_ogl}" = xyes; then
2391   GNASH_PATH_OPENGL
2394 if test x"${build_gtk}" = xyes; then
2395   AC_ARG_ENABLE(ghelp,
2396     AC_HELP_STRING([--enable-ghelp], [Enable support for the GNOME help system]),
2397     [case "${enableval}" in
2398       yes) ghelp=yes ;;
2399       no)  ghelp=no ;;
2400       *)   AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;;
2401     esac], ghelp=no
2402   )
2404   if test x"${ghelp}" = x"yes" ; then
2405     AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2406     AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2407     AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2409     if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = x ; then
2410       ghelp=no
2411       AC_MSG_WARN([You need to install scrollkeeper for gnome help])
2412     fi
2413   fi
2415 AM_CONDITIONAL(GHELP, [test x${ghelp} = xyes])
2417 if test x${build_fltk} = xyes; then
2418   GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender)
2421 dnl Some systems have a pervered set of dependencies.
2422 dnl Fedora Core 6 appears to have a dependency on expat for fontconfig.
2423 dnl We only need the library, but this is the easy wind to find it.
2424 GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString)
2426 dnl these conditionals were moved out of kde.m4
2427 AM_CONDITIONAL(HAS_KDE3, [test x$has_kde3 = xyes])
2428 # used to disable x11-specific stuff on special platforms
2429 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
2430 AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
2431 AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
2433 AM_CONDITIONAL(HAVE_GTK2, [ test x$has_gtk2 = xyes ])
2434 AM_CONDITIONAL(HAVE_GLEXT, [test x$glext = xyes])
2436 dnl We don't have GTKGLExt, so default to SDL, and don't build the Firefox plugin
2437 if test x$glext = xno -a x$build_ogl = xyes; then
2438   if test x$gtk2 = xyes -a x$build_gtk = xyes; then
2439     AC_ERROR([You have GTK installed, but not GtkGLExt. You need GtkGLExt to use the OpenGL renderer. Attempting to build SDL version])
2440   fi
2441   gui=sdl
2442   npapi=no
2443   AC_MSG_WARN([GTK2 specified for the GUI, but GtkGlExt is not present. Trying SDL instead.])
2446 missing_codecs=""
2447 if test x"$build_media_gst" = "xyes"; then
2448   AC_PATH_PROG(GST_INSPECT, gst-inspect, ,[${pathlist}])
2449   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2450     AC_PATH_PROG(GST_INSPECT, gst-inspect-0.10, ,[${pathlist}])
2451   fi
2452   if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2453     dnl FIXME: there may be multiple acceptable plugins that are acceptable for
2454     dnl our use. For example, mad or FFmpeg will play mp3.
2455     codecs="ffdec_flv ffdec_flashsv ffdec_vp6f ffdec_flashsv mad vorbisdec ffdec_vp6"
2456     for i in $codecs; do
2457        hits="`$GST_INSPECT $i | grep -c 'Long name'`"
2458        if test $hits -eq 0; then
2459          missing_codecs="$missing_codecs $i"
2460          AC_MSG_WARN([Missing codec: $i])
2461        fi
2462     done
2463   fi
2464   GNASH_PKG_FIND(gstreamer_plugins_base, [gst/interfaces/probeprobe.h], [gstreamer interfaces library], gst_property_probe_probe_and_get_values_name, [0.10])
2465   GNASH_PKG_FIND(gstreamer_app, [gst/app/gstappsink.h], [gstreamer app library], call_gmon_start, [0.10])
2466   GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, [0.10])
2467   dnl if cross compiling, we're usually not going to be able to pop up
2468   dnl the codec installer to download the package to install, so disable
2469   dnl it if cross compiling with gstreamer support.
2470   if test x$cross_compiling = xno; then
2471     GNASH_PKG_FIND(gstpbutils, [gst/pbutils/install-plugins.h], [gstreamer PB Utils library], gst_install_plugins_supported, [0.10])
2472   fi
2473   dnl when cross compiling Gstreamer, not all supplied SDKs include all the
2474   dnl development libraries since most devices don't need to support plugin
2475   dnl development, only the runtime. In these caes we often have the header
2476   dnl files but not the libraries.
2477   if test x"${has_gstreamer_plugins_base}" = xyes; then
2478     GSTREAMER_LIBS="-lgstinterfaces-0.10 $GSTREAMER_LIBS"
2479     AC_DEFINE(HAS_GSTREAMER_PLUGINS_BASE, [1], "Has the Gstreamer Plugin Dev package installed.")
2480   fi
2483 AM_CONDITIONAL(HAVE_CAIRO, [true])
2484 dnl AM_CONDITIONAL(HAVE_CAIRO, [test x"${has_cairo}" = xyes])
2485 AM_CONDITIONAL(HAVE_OPENGL, [true])
2486 dnl AM_CONDITIONAL(HAVE_OPENGL, test x"${has_opengl}" = xyes)
2488 AM_CONDITIONAL(USE_SOUND_SDL, test x$build_sound_sdl = xyes)
2489 AM_CONDITIONAL(USE_SOUND_AHI, test x$build_sound_ahi = xyes)
2490 AM_CONDITIONAL(USE_SOUND_MKIT, test x$build_sound_mkit = xyes)
2491 AM_CONDITIONAL(USE_FFMPEG_ENGINE, test x"${build_media_ffmpeg}" = x"yes")
2492 AM_CONDITIONAL(USE_GST_ENGINE, test x"${build_media_gst}" = x"yes")
2493 AM_CONDITIONAL(HAVE_OPENGL, test x"${OPENGL_LIBS}" != x)
2494 dnl for now the Haiku media handler is experimental
2495 AM_CONDITIONAL(USE_HAIKU_ENGINE, test x"$build_media_haiku" = xyes)
2497 if test x"${build_media_ffmpeg}" = x"yes"; then
2498   AC_DEFINE([ENABLE_FFMPEG_MEDIA],  [1], [Use FFmpeg for media decoding])
2501 if test x"${build_media_gst}" = x"yes"; then
2502   AC_DEFINE([ENABLE_GST_MEDIA],  [1], [Use gstreamer for media decoding])
2505 if test x"${build_media_haiku}" = x"yes"; then
2506   AC_DEFINE([ENABLE_HAIKU_MEDIA],  [1], [Use haiku for media decoding])
2509 if test x$build_sound_mkit = xyes; then
2510   if test x"${haiku}" != xyes; then
2511     AC_MSG_ERROR([Media Kit sound handling is supported only under Haiku]);
2512   else
2513     AC_DEFINE([SOUND_MKIT],  [1], [Use Haiku's Media Kit for sound handling])
2514   fi
2517 if test x"${build_sound_sdl}" = xyes; then
2518   AC_DEFINE([SOUND_SDL],  [1], [Use SDL for sound handling])
2521 if test x"${build_sound_ahi}" = xyes; then
2522   if test x"$amigaos4" != xyes; then
2523     AC_MSG_ERROR([AHI sound handling is supported only under AmigaOS]);
2524   else
2525     AC_DEFINE([SOUND_AHI],  [1], [Use AmigaOS AHI for sound handling])
2526   fi
2529 if test x$build_fltk = xyes; then
2530   GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush)
2533 AM_CONDITIONAL(HAVE_FLTK2, [ test x$has_fltk2 = xyes ])
2534 AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ])
2536 GNASH_DOCBOOK
2537 AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x)
2538 AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes)
2539 AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_TEXI" != x -o x"$DB2X_TEXIXML" != x ])
2540 AM_CONDITIONAL(ENABLE_PDF, [ test x"$DB2X_PDF" ])
2541 AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2542 AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x -a x"$docbook_styles" != x ])
2543 AM_CONDITIONAL(ENABLE_XMLTEX, [ test x"$PDFXMLTEX" != x -a x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2544 dnl  AM_CONDITIONAL(ENABLE_DBLATEX, [ test x"$DBLATEX" != x ])
2545 AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_MAN" != x -o x"$DB2X_MANXML" != x ])
2546 AM_CONDITIONAL(HAVE_AGG, [test x"${AGG_LIBS}" != x])
2548 GNASH_PATH_CURL
2550 dnl Define winsock if we're on windows. We could do something complicated,
2551 dnl but since AC_EXEEXT does it for us, we'll do this the easy way.
2552 if test x"$EXEEXT" = "exe"; then
2553   AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32])
2556 dnl ****************************************
2557 dnl *** Check for ELF visibility support ***
2558 dnl ****************************************
2560 AC_ARG_ENABLE([visibility],
2561   AC_HELP_STRING([--enable-visibility], [Use ELF visibility attributes]), [], [enable_visibility=no])
2563 if test x"$enable_visibility" != x"no"; then
2564   dnl Check whether the compiler supports the visibility attribute
2565   save_CFLAGS="$CFLAGS"
2566   CFLAGS="$CFLAGS -Wall -Werror"
2567   AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
2568   AC_COMPILE_IFELSE(AC_LANG_SOURCE(
2569     [
2570       void __attribute__ ((visibility("default"))) test_default (void) {}
2571       void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
2572       int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
2573     ]),
2574     [
2575       AC_DEFINE([HAVE_GNUC_VISIBILITY], [1], [Define this for GCC-visibility.])
2576       AC_MSG_RESULT([yes])
2577     ],
2578     [
2579       AC_MSG_RESULT([no])
2580     ]
2581   )
2582   CFLAGS="$save_CFLAGS"
2585 AC_ARG_ENABLE([pch],
2586   AC_HELP_STRING([--enable-pch], [Enable precompiled header support]), [], [enable_pch=no])
2588 AM_CONDITIONAL([ENABLE_PCH], [test x"$enable_pch" != x"no"])
2590 PCH_FLAGS="-include all-includes.h -Winvalid-pch"
2591 AC_SUBST(PCH_FLAGS)
2593 GNASH_PATH_PTHREADS
2595 GNASH_PATH_BOOST
2596 dnl AX_GCC_ARCHFLAG(no)
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 convienience 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 dnl echo "RENDERER_LIBS=$RENDERER_LIBS"
2749 AC_SUBST(RENDERER_LIBS)
2750 AC_SUBST(RENDERER_CONFIG)
2752 HWACCEL_CONFIG="${hwaccel_list}"
2753 AC_SUBST(HWACCEL_CONFIG)
2755 dnl check for missing libraries and disable them.
2756 if test x"$BOOST_LIBS" != x; then
2757   if test x"${cygnal_missing_libs}" != x; then
2758     for i in ${cygnal_missing_libs}; do
2759       if test $i = serialization; then
2760         AC_DEFINE([BOOST_MULTI_INDEX_DISABLE_SERIALIZATION], ["1"], [if the library is missing, don't use it.])
2761       fi
2762     done
2763   fi
2766 CYGNAL_PATHS
2768 SUPPORTED_GUIS=
2769 if test x$build_qtopia3 = xyes; then
2770   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia3"
2772 if test x$build_qtopia4 = xyes; then
2773   SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia4"
2775 if test x$build_hildon = xyes; then
2776   SUPPORTED_GUIS="${SUPPORTED_GUIS},hildon"
2778 if test x$build_alp = xyes; then
2779   SUPPORTED_GUIS="${SUPPORTED_GUIS},alp"
2781 if test x$build_fb = xyes; then
2782   SUPPORTED_GUIS="${SUPPORTED_GUIS},fb"
2784 if test x$build_fltk = xyes; then
2785   SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk"
2787 if test x$build_qt3 = xyes; then
2788   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt3"
2790 if test x$build_qt4 = xyes; then
2791   SUPPORTED_GUIS="${SUPPORTED_GUIS},qt4"
2793 if test x$build_kde3 = xyes; then
2794   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde3"
2796 if test x$build_kde4 = xyes; then
2797   SUPPORTED_GUIS="${SUPPORTED_GUIS},kde4"
2799 if test x$build_gtk = xyes; then
2800   SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk"
2802 if test x$build_sdl = xyes; then
2803   SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl"
2805 if test x$build_riscos = xyes; then
2806   SUPPORTED_GUIS="${SUPPORTED_GUIS},riscos"
2808 if test x$build_aqua = xyes; then
2809   SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua"
2811 if test x$build_dump = xyes; then
2812   SUPPORTED_GUIS="${SUPPORTED_GUIS},dump"
2814 if test x$build_aos4 = xyes; then
2815   SUPPORTED_GUIS="${SUPPORTED_GUIS},aos4"
2817 if test x$build_haiku = xyes; then
2818   SUPPORTED_GUIS="${SUPPORTED_GUIS},haiku"
2820 SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
2821 AC_SUBST(SUPPORTED_GUIS)
2823 dnl AC_CONFIG_LINKS(doc/C/images)
2824 dnl AC_CONFIG_LINKS(gnashconfig.h,libltdl/config.h)
2825 AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
2826 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in)
2827 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in)
2829 AC_CONFIG_FILES(gnash.pc:gnash.pc.in)
2831 AC_OUTPUT(Makefile
2832 po/Makefile
2833 libltdl/Makefile
2834 libmedia/Makefile
2835 libsound/Makefile
2836 libbase/Makefile
2837 libcore/Makefile
2838 libcore/vm/Makefile
2839 libcore/parser/Makefile
2840 libvaapi/Makefile
2841 librender/Makefile
2842 utilities/Makefile
2843 doc/Makefile
2844 doc/C/Makefile
2845 doc/Doxyfile
2846 testsuite/Makefile
2847 testsuite/media/Makefile
2848 testsuite/libbase.all/Makefile
2849 testsuite/as3compile.all/Makefile
2850 testsuite/actionscript.all/Makefile
2851 testsuite/samples/Makefile
2852 testsuite/swfdec/Makefile
2853 testsuite/misc-ming.all/Makefile
2854 testsuite/misc-ming.all/loop/Makefile
2855 testsuite/misc-mtasc.all/Makefile
2856 testsuite/misc-haxe.all/Makefile
2857 testsuite/misc-haxe.all/classes.all/Makefile
2858 testsuite/misc-swfmill.all/Makefile
2859 testsuite/misc-swfmill.all/trace-as2/Makefile
2860 testsuite/misc-swfmill.all/trace-as3/Makefile
2861 testsuite/misc-swfc.all/Makefile
2862 testsuite/network.all/Makefile
2863 testsuite/movies.all/Makefile
2864 testsuite/libcore.all/Makefile
2865 testsuite/libmedia.all/Makefile
2866 gui/Makefile
2867 gui/Info.plist
2868 gui/pythonmod/Makefile
2869 extensions/Makefile
2870 extensions/dejagnu/Makefile
2871 extensions/mysql/Makefile
2872 extensions/fileio/Makefile
2873 extensions/gtk2/Makefile
2874 extensions/lirc/Makefile
2875 extensions/dbus/Makefile
2876 plugin/Makefile
2877 plugin/npapi/Makefile
2878 plugin/klash/Makefile
2879 plugin/klash4/Makefile
2880 plugin/win32/Makefile
2881 plugin/aos4/Makefile
2882 cygnal/Makefile
2883 cygnal/libnet/Makefile
2884 cygnal/libamf/Makefile
2885 cygnal/cgi-bin/Makefile
2886 cygnal/cgi-bin/echo/Makefile
2887 cygnal/cgi-bin/oflaDemo/Makefile
2888 cygnal/cgi-bin/fitcDemo/Makefile
2889 cygnal/testsuite/Makefile
2890 cygnal/testsuite/libamf.all/Makefile
2891 cygnal/testsuite/libnet.all/Makefile
2892 cygnal/testsuite/cygnal.all/Makefile
2896 ########################## Final report begins... ############################
2899 cerr=/tmp/gnash-configure-errors.$$
2900 cwarn=/tmp/gnash-configure-warnings.$$
2901 crec=/tmp/gnash-configure-recommended.$$
2902 echo ""
2904 #trap 'rm cerr' 0 # trap isn't a good idea, might override other traps
2905 exec 3> $cerr 
2906 exec 4> $cwarn
2907 exec 5> $crec
2909 echo "Configurable options are:"
2911 if test x"${i810lodbias}" = x"yes"; then
2912   echo "        Intel 810 LOD bias hack enabled"
2913 else
2914   echo "        Intel 810 LOD bias hack disabled (default). Use --enable-i810-lod-bias to enable."
2917 if test x"${pthreads}" = x"yes"; then
2918   echo "        POSIX Threads support enabled (default)"
2919 else
2920   if test x"${build_haiku}" = x"yes"; then
2921      echo "        POSIX Thread support built into C library."
2922   els
2923      echo "        POSIX Thread support disabled."
2924   fi
2927 if test x"${dmalloc}" = x"yes"; then
2928   echo "        DMalloc support enabled"
2929   echo "        For a list of the command-line options enter: dmalloc --usage"
2930 else
2931   echo "        DMalloc support disabled (default). Use --enable-dmalloc to enable."
2934 if test x"${npapi}" = x"yes"; then
2935   echo "        NPAPI plugin enabled (default). Use --disable-npapi to disable."
2936   echo "            NPAPI plugin will be installed in ${FIREFOX_PLUGINS}"
2937 else
2938   echo "        NPAPI plugin disabled."
2941 if test x"${build_kparts3}" = x"yes"; then
2942   echo "        KPARTS 3.x plugin enabled (default). Use --disable-kparts3 to disable"
2943   echo "            KPARTS 3.x plugin will be installed in ${KDE3_PLUGINDIR}"
2944   echo "            KPARTS 3.x service will be installed in ${KDE3_SERVICESDIR}"
2945   echo "            KPARTS 3.x config dir will be in ${KDE3_CONFIGDIR}"
2946   echo "            KPARTS 3.x appsdata will be installed in ${KDE3_APPSDATADIR}"
2947 else
2948   echo "        KPARTS 3.x plugin disabled."
2951 if test x"${build_kparts4}" = x"yes"; then
2952   echo "        KPARTS 4.x plugin enabled (default). Use --disable-kparts4 to disable"
2953   echo "            KPARTS 4.x plugin will be installed in ${KDE4_PLUGINDIR}"
2954   echo "            KPARTS 4.x service will be installed in ${KDE4_SERVICESDIR}"
2955   echo "            KPARTS 4.x config dir will be in ${KDE4_CONFIGDIR}"
2956   echo "            KPARTS 4.x appsdata will be installed in ${KDE4_APPSDATADIR}"
2957 else
2958   echo "        KPARTS 4.x plugin disabled."
2961 dnl -- if test x"${dynamic_gui}" = x"yes"; then
2962 dnl --   echo "        Loadable GUI & renderer enabled."
2963 dnl -- else
2964 dnl --   echo "        Loadable GUI & renderer disabled (default). Use --enable-dynamic-gui to enable."
2965 dnl -- fi
2967 # set a variable if we shouldn't continue. This way we can print
2968 # out everything that is missing in one pass, hopefully making it
2969 # easy for new developers to get everything they need installed.
2971 echo "Configured paths for ${build} are:"
2973 dnl Dump QT3 options is the user specified a QT3 or KDE3 GUI
2974 if test x"${build_qt3}" = xyes; then
2975   if test x"${has_qt3}" = xyes; then
2976     echo "        QT3 flags are: ${QT3_CFLAGS}"
2977     echo "        QT3 libs are: ${QT3_LIBS}"
2978   else
2979     echo "        ERROR: No QT 3.x development package installed!" >&3
2980     echo "               Install a QT 3.x development environment from http://trolltech.com" >&3
2981     echo "               or .deb users: apt-get install libqt3-mt-dev" >&3
2982     if test x$build_kde3 = xyes; then
2983       echo "               or change to a different gui with --enable-gui=..." >&3
2984     fi
2985   fi
2988 if test x"${build_qt4}" = xyes; then
2989   if test x"${has_qt4}" = xyes; then
2990     echo "        QT4 flags are: ${QT4_CFLAGS}"
2991     echo "        QT4 libs are: ${QT4_LIBS}"
2992   else
2993     echo "        ERROR: No QT 4.x development package installed!" >&3
2994     echo "               Install a QT 4.x development environment from http://trolltech.com" >&3
2995     echo "               or .deb users: apt-get install qt4-dev-tools" >&3
2996     if test x$build_kde4 = xyes; then
2997       echo "               or change to a different gui with --enable-gui=..." >&3
2998     fi
2999   fi
3002 if test x"$build_qtopia3" = xyes; then
3003   if test x"${QTOPIA3_LIBS}" != x ; then
3004     if test x"${QTOPIA3_CFLAGS}" != x ; then
3005       echo "        QTOPIA 3.x flags are: $QTOPIA3_CFLAGS"
3006     else
3007       echo "        QTOPIA 3.x flags are: default include path"
3008     fi
3009     echo "        QTOPIA 3.x libs are: $QTOPIA3_LIBS"
3010   else
3011     echo "        ERROR: No QTOPIA 3.x library development package installed!" >&3
3012     echo "               Install it from http://trolltech.com/downloads/" >&3
3013     echo "               binary packages are not available." >&3
3014   fi
3017 if test x"$build_qtopia4" = xyes; then
3018   if test x"${QTOPIA4_LIBS}" != x ; then
3019     if test x"${QTOPIA4_CFLAGS}" != x ; then
3020       echo "        QTOPIA 4.x flags are: $QTOPIA4_CFLAGS"
3021     else
3022       echo "        QTOPIA 4.x flags are: default include path"
3023     fi
3024     echo "        QTOPIA 4.x libs are: $QTOPIA4_LIBS"
3025   else
3026     echo "        ERROR: No QTOPIA 4.x library development package installed!" >&3
3027     echo "               Install it from http://trolltech.com/downloads/" >&3
3028     echo "               binary packages are not available." >&3
3029   fi
3033 # -o x$build_kparts3 = xyes
3034 if test x$build_kde3 = xyes; then
3035   if test x"$has_kde3" = xyes; then
3036     echo "        KDE 3.x flags are: $KDE3_CFLAGS"
3037     echo "        KDE 3.x libs are: $KDE3_LIBS"
3038   else
3039       echo "        ERROR: No KDE 3.x development package installed!" >&3
3040       echo "               To disable the KDE 3.x gui," >&3
3041       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
3042       echo "               and omit "kde" from the list." >&3
3043       echo "               When the option --enable-gui=... is omitted," >&3
3044       echo "               the default is the same of --enable-gui=kde,gtk" >&3
3045       echo "               To be able to build the kde 3.x gui," >&3
3046       echo "               install version 3.x of the KDE development environment from http://kde.org" >&3
3047       echo "               or .deb users: apt-get install kdelibs4-dev" >&3
3048       echo "               or .rpm users: yum install kdelibs3-devel." >&3
3049   fi
3052 # -o x$build_kparts4 = xyes
3053 if test x$build_kde4 = xyes; then
3054   if test x"$has_kde4" = xyes; then
3055     echo "        KDE 4.x flags are: $KDE4_CFLAGS"
3056     echo "        KDE 4.x libs are: $KDE4_LIBS"
3057   else
3058       echo "        ERROR: No KDE 4.x development package installed!" >&3
3059       echo "               To disable the KDE 4.x gui," >&3
3060       echo "               reconfigure using --enable-gui=<list-of-guis>" >&3
3061       echo "               and omit "kde" from the list." >&3
3062       echo "               When the option --enable-gui=... is omitted," >&3
3063       echo "               the default is the same of --enable-gui=kde,gtk" >&3
3064       echo "               To be able to build the kde 4.x gui," >&3
3065       echo "               install version 4.x of the KDE development environment from http://kde.org" >&3
3066       echo "               or .deb users: apt-get install kdelibs5-dev" >&3
3067       echo "               or .rpm users: yum install kdelibs-devel." >&3
3068   fi
3071 if test x"${JPEG_LIBS}" != x ; then
3072   if test x"${JPEG_CFLAGS}" != x ; then
3073     echo "        JPEG flags are: $JPEG_CFLAGS"
3074   else
3075     echo "        JPEG flags are: default include path"
3076   fi
3077   echo "        JPEG libs are: $JPEG_LIBS"
3078 else
3079   echo "        ERROR: No JPEG library development package installed!" >&3
3080   echo "               Install it from http://ijg.org" >&3
3081   echo "               or .deb users: apt-get install libjpeg-dev" >&3
3082   echo "               or .rpm users: yum install libjpeg-devel" >&3
3085 if test x"${GIF_LIBS}" != x ; then
3086   if test x"${GIF_CFLAGS}" != x ; then
3087     echo "        GIF flags are: $GIF_CFLAGS"
3088   else
3089     echo "        GIF flags are: default include path"
3090   fi
3091   echo "        GIF libs are: $GIF_LIBS"
3092 else
3093   echo "        ERROR: No GIF library development package installed!" >&3
3094   echo "               Install it from http://sourceforge.net/projects/giflib/" >&3
3095   echo "               or .deb users: apt-get install libungif-dev" >&3
3096   echo "               or maybe     : apt-get install libgif-dev" >&3
3097   echo "               or .rpm users: yum install libungif-devel" >&3
3100 if test x"${PNG_LIBS}" != x ; then
3101   if test x"${PNG_CFLAGS}" != x ; then
3102     echo "        PNG flags are: $PNG_CFLAGS"
3103   else
3104     echo "        PNG flags are: default include path"
3105   fi
3106   echo "        PNG libs are: $PNG_LIBS"
3107 else
3108   echo "        RECOMMENDED: No PNG library development package installed!" >&5
3109   echo "                     Gnash will be built without support for dynamic loading of PNG files." >&5
3110   echo "                     Install it from http://www.libpng.org" >&5
3111   echo "                     or .deb users: apt-get install libpng12-dev" >&5
3112   echo "                     or .rpm users: yum install libpng-devel" >&5
3115 if test x"${build_ogl}" = x"yes"; then
3116   if test x"$OPENGL_LIBS" != x; then
3117     if test x"$OPENGL_CFLAGS" != x; then
3118       echo "        OpenGL flags are: $OPENGL_CFLAGS"
3119     else
3120       echo "        OpenGL flags are: default include path"
3121     fi
3122     echo "        OpenGL libs are: $OPENGL_LIBS"
3123     else
3124       echo "        ERROR: No OpenGL development package installed!" >&3
3125       echo "               You need to install the libmesa development package" >&3
3126       echo "               or .deb users: apt-get install libgl1-mesa-dev" >&3
3127       echo "               or .rpm users: yum install xorg-x11-Mesa-libGL" >&3
3128       echo "               or use a different renderer with --enable-renderer=" >&3
3129   fi
3132 if test x"${build_gles}" = x"yes"; then
3133   if test x"${has_gles}" != x; then
3134     if test x"$GLES_CFLAGS" != x; then
3135       echo "        OpenGL-ES flags are: $GLES_CFLAGS"
3136     else
3137       echo "        OpenGL-ES flags are: default include path"
3138     fi
3139     echo "        OpenGL-ES libs are: $GLES_LIBS"
3140   else
3141       echo "        ERROR: No OpenGL-ES development package installed!" >&3
3142       echo "               You need to install the this from source proobably" >&3
3143       echo "               or use a different renderer with --enable-renderer=" >&3
3144   fi
3147 dnl GLEXT is only needed for GTK/OpenGL
3148 if test x$build_gtk = xyes -a x$build_ogl = xyes ; then
3149   if test x"$GLEXT_LIBS" != x; then
3150     if test x"$GLEXT_CFLAGS" != x; then
3151       echo "        GtkGLExt flags are: $GLEXT_CFLAGS"
3152     else
3153       echo "        GtkGLExt flags are: default include path"
3154     fi
3155       echo "        GtkGLExt libs are: $GLEXT_LIBS"
3156   else
3157     if test x$build_gtk = xyes; then
3158       if test x$build_ogl = xyes; then
3159         echo "        ERROR: No GtkGLExt development package installed!" >&3
3160         echo "               It is needed to build the GTK/OpenGL GUI/renderer combination." >&3
3161         echo "               Either install it from http://gtkglext.sourceforge.net" >&3
3162         echo "               or .deb users: apt-get install libgtkglext1-dev" >&3
3163         echo "               or .rpm users: yum install gtkglext-devel" >&3
3164         echo "               or --enable-gui=sdl or --enable-renderer=agg" >&3
3165       fi
3166     fi
3167   fi
3171 if test x$build_gtk = xyes; then #{
3172   if test x"$GTK2_LIBS" != x; then
3173     if test x"$GTK2_CFLAGS" != x; then
3174       echo "        GTK2 flags are: $GTK2_CFLAGS"
3175     else
3176       echo "        GTK2 flags are: default include path"
3177     fi
3178       echo "        GTK2 libs are: $GTK2_LIBS"
3179   else
3180     echo "        ERROR: No GTK2 development package installed!" >&3
3181     echo "               Install it from http://gtk.org" >&3
3182     echo "               or .deb users: apt-get install libgtk2.0-dev" >&3
3183     echo "               or .rpm users: yum install gtk2-devel" >&3
3184   fi
3186   if test x"$PANGO_LIBS" != x; then
3187     if test x"$PANGO_CFLAGS" != x; then
3188       echo "        Pango flags are: $PANGO_CFLAGS"
3189     else
3190       echo "        Pango flags are: default include path"
3191     fi
3192     echo "        Pango libs are: $PANGO_LIBS"
3193   else
3194     echo "        ERROR: No Pango development package installed!" >&3
3195     echo "               Install it from http://pango.org" >&3
3196     echo "               or .deb users: apt-get install libpango1.0-dev" >&3
3197     echo "               or .rpm users: yum install pango-devel" >&3
3198   fi
3200   if test x"$GLIB_LIBS" != x; then
3201     if test x"$GLIB_CFLAGS" != x; then
3202       echo "        GLib flags are: $GLIB_CFLAGS"
3203     else
3204       echo "        GLib flags are: default include path"
3205     fi
3206     echo "        GLib libs are: $GLIB_LIBS"
3207   else
3208     echo "        ERROR: No GLib development package installed!" >&3
3209     echo "               Install it from http://gtk.org" >&3
3210     echo "               or .deb users: apt-get install libglib2.0-dev" >&3
3211     echo "               or .rpm users: yum install glib2-devel" >&3
3212   fi
3214   if test x"$ATK_LIBS" != x; then
3215     if test x"$ATK_CFLAGS" != x; then
3216       echo "        ATK flags are: $ATK_CFLAGS"
3217     else
3218       echo "        ATK flags are: default include path"
3219     fi
3220       echo "        ATK libs are: $ATK_LIBS"
3221   else
3222     echo "        ERROR: No ATK development package installed!" >&3
3223     echo "               Install it from http://gtk.org" >&3
3224     echo "               or .deb users: apt-get install libatk1.0-dev" >&3
3225     echo "               or .rpm users: yum install atk-devel" >&3
3226   fi
3230 if test x"$build_media_gst" = x"yes"; then
3231   if test x"$missing_codecs" != x; then   
3232       echo "        Your Gstreamer installation is missing these codecs: $missing_codecs"
3233       echo "        Please install the gstreamer-ffmpeg for Gstreamer"
3234   fi  
3235   if test x"$GSTREAMER_LIBS" != x; then
3236     if test x"$GSTREAMER_CFLAGS" != x; then
3237       echo "        Gstreamer flags are: $GSTREAMER_CFLAGS"
3238     else
3239       echo "        Gstreamer flags are: default include path"
3240     fi
3241     echo "        Gstreamer libs are: $GSTREAMER_LIBS"
3242     if test x"$has_modern_gstpbutils" = "xno"; then
3243       echo "        RECOMMENDED: If the user has not installed the necessary Gstreamer plugins," >&5
3244       echo "                     Gstreamer can pop up a message prompting them to." >&5
3245       echo "                     Install gstpbutils (>= 0.10.15) from http://www.gstreamer.net for that to be enabled" >&5
3246       echo "                     or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&5
3247     fi
3248     if test x"$has_gstreamer_plugins_base" = "xno"; then
3249       echo "                        Install gstreamer-plugins-base from http://www.gstreamer.net" >&5
3250       echo "                        or .rpm users: yum install gstreamer-plugins-base-devel" >&5
3251       echo "                        or .deb users: apt-get install libgstreamer-plugins-base0.10-dev" >&5
3252     fi
3253   else
3254     echo "        ERROR: GST media handling requested but gstreamer-0.10+ not found" >&3
3255     echo "               Install it from http://www.gstreamer.net" >&3
3256     echo "               or .deb users: apt-get install libgstreamer0.10-dev" >&3
3257     echo "               or .rpm users: yum install gstreamer-devel" >&3
3258     echo "               or             yast install gstreamer010-devel" >&3
3259   fi
3262   if test x"${build_media_ffmpeg}" = x"yes"; then
3263     if test x"$FFMPEG_LIBS" != x; then
3264       echo "        MP3 and video support enabled through FFmpeg"
3265       if test x"${ffmpeg_version_check}" != xok; then
3266         echo "        ERROR: You have version ${ffmpeg_version} of FFmpeg installed," >&3
3267         if test x"${have_ffmpeg_swscale}" = "xno"; then
3268           echo "               with no swscale enabled." >&3
3269         else
3270           echo "               with swscale enabled." >&3
3271         fi
3272         echo "               This setup isn't supported!" >&3
3273         echo "               Version 51.11.0 or newer is required, enabling swscale if >= 52.0.0." >&3
3274         echo "               You can install libswscale from http://ffmpeg.org" >&3
3275         echo "               or .deb users: apt-get install libswscale-dev" >&3
3276       else
3277         if test x"${avformat_h}" = x; then
3278           echo "        ERROR: FFmpeg's libavcodec header is installed but not libavformat." >&3
3279           echo "               You can install FFmpeg from http://ffmpeg.org" >&3
3280           echo "               or .deb users: apt-get install libavformat-dev" >&3
3281           echo "               or YaST users: yast -i libavformat-api (but currently installs into /usr/lib64)" >&3
3282           echo "               or explicitly set the path using --with-ffmpeg-incl=" >&5
3283           echo "               or reconfigure with --enable-media=gst" >&3
3284         else
3285           if test x"$FFMPEG_CFLAGS" != x; then
3286             echo "        FFmpeg flags are: $FFMPEG_CFLAGS"
3287           else
3288             echo "        FFmpeg flags are: default include path"
3289           fi
3290           echo "        FFmpeg libs are: $FFMPEG_LIBS"
3291         fi
3292       fi
3293     else
3294       echo "        ERROR: No FFmpeg development package installed!" >&3
3295       echo "               You can install FFmpeg from http://ffmpeg.org" >&3
3296       echo "               or .deb users: apt-get install libavformat-dev" >&3
3297       echo "               or .rpm users: yum install ffmpeg-devel" >&3
3298       echo "               or reconfigure with --enable-media=gst" >&3
3299     fi
3300   fi
3302 if test x$build_cairo = xyes; then
3303   if test x"$CAIRO_LIBS" != x; then
3304     if test x"$CAIRO_CFLAGS" != x; then
3305       echo "        Cairo flags are: $CAIRO_CFLAGS"
3306     else
3307       echo "        Cairo flags are: default include path"
3308     fi
3309     echo "        Cairo libs are: $CAIRO_LIBS"
3310   else
3311     echo "        ERROR: No Cairo development package installed!" >&3
3312     echo "               You need to have the Cairo development package installed" >&3
3313     echo "               if you have used --enable-render=cairo to configure." >&3
3314     echo "               Install it from http://cairographics.org" >&3
3315     echo "               or .deb users: apt-get install libcairo-dev" >&3
3316     echo "               or .rpm users: yum install cairo-devel" >&3
3317   fi
3320 if test x$build_fltk = xyes; then
3321   if test x"$FLTK2_LIBS" != x; then
3322     if test x"$FLTK2_CFLAGS" != x; then
3323       echo "        FLTK flags are: $FLTK2_CFLAGS"
3324     else
3325       echo "        FLTK flags are: default include path"
3326     fi
3327       echo "        FLTK libs are: $FLTK2_LIBS"
3328   else
3329     echo "        ERROR: No FLTK2 development package installed!" >&3
3330     echo "               There are currently no Debian or RPM packages for FLTK2;" >&3
3331     echo "               see http://www.fltk.org to install it from source." >&3
3332     echo "               or change to a different gui with --enable-gui=..." >&3
3333 dnl What it was for FLTK 1:
3334 dnl    echo "               or .deb users: apt-get install fltk-1.1-dev"
3335 dnl    echo "               or .rpm users: yum install fltk-devel"
3336   fi
3339 if test x$build_fltk = xyes; then
3340   if test x"$XFT_LIBS" != x; then
3341     if test x"$XFT_CFLAGS" != x; then
3342       echo "        Xft flags are: $XFT_CFLAGS"
3343     else
3344       echo "        Xft flags are: default include path"
3345     fi
3346       echo "        Xft libs are: $XFT_LIBS"
3347 dnl     else
3348 dnl       echo "        ERROR: No Xft development package installed!" >&3
3349 dnl       echo "               Install the xft development package" >&3
3350 dnl       echo "               or .deb users: apt-get install libxft-dev" >&3
3351 dnl       echo "               or .rpm users: yum install xft-devel" >&3
3352   fi
3355 # See whether SDL is required
3356 need_sdl=false
3357 test x$build_sdl = xyes                 && need_sdl=true
3358 test x$build_sound_sdl = xyes   && need_sdl=true
3360 if $need_sdl; then
3361   if test x"$SDL_LIBS" != x; then
3362     echo "        SDL flags are: $SDL_CFLAGS"
3363     echo "        SDL libs are: $SDL_LIBS"
3364   else
3365     echo "        ERROR: No SDL development package installed!" >&3
3366     echo "               Install it from http://www.libsdl.org/download-1.2.php" >&3
3367     echo "               or .deb users: apt-get install libsdl1.2-dev" >&3
3368     echo "               or .rpm users: yum install SDL-devel" >&3
3369     test x$build_sdl = xyes &&
3370         echo "               or select a different GUI with --enable-gui= " >&3
3371   fi
3373 unset need_sdl
3375 if test x"$nsapi" = x"yes"; then
3376 dnl  if test x"$FIREFOX_CFLAGS" != x; then
3377 dnl    echo "        Firefox flags are: $FIREFOX_CFLAGS"
3378 dnl    echo "        Firefox libs are: $FIREFOX_LIBS"
3379     echo "        Plugin will be installed in ${FIREFOX_PLUGINS}"
3380 dnl  else
3381 dnl    echo "        ERROR: No Firefox or Mozilla development package installed!" >&3
3382 dnl  fi
3385 if test x"${pthreads}" = x"yes"; then
3386   if test x"$PTHREAD_CFLAGS" != x; then
3387     echo "        POSIX Threads flags are: $PTHREAD_CFLAGS"
3388   fi
3389   if test x"${PTHREAD_LIBS}" != x; then
3390     echo "        POSIX Threads lib is: $PTHREAD_LIBS"
3391   else
3392     if test x"${cross_compiling}" = xno; then
3393       echo "ERROR: No pthread development package installed!" >&3
3394     fi
3395   fi
3398 if test x"${docbook}" = x"yes"; then
3399   if test x"$MAKEINFO" = x; then
3400     echo "        ERROR: no makeinfo tools installed!" >&3
3401     echo "               Either install it from http://www.gnu.org/software/texinfo/" >&3
3402     echo "               or .deb users: apt-get install texinfo" >&3
3403     echo "               or configure without --enable-docbook" >&3
3404   fi
3405   dnl low-level tools
3406   if test x"$DB2X_TEXIXML" = x -o x"$DB2X_MANXML" = x -o x"$DB2X_XSLTPROC" = x; then
3407     dnl high-level tools
3408     if test x"${DB2X_TEXI}" = x -o x"${DB2X_MAN}" = x; then
3409       echo "        ERROR: No DocBook2X tools installed!" >&3
3410       echo "               Either install it from http://docbook2x.sourceforge.net" >&3
3411       echo "               or .deb users: apt-get install docbook docbook2x docbook-utils" >&3
3412       echo "                              docbook-xml docbook-xsl texinfo xsltproc" >&3
3413       echo "               or configure without --enable-docbook" >&3
3414     fi
3415   else
3416     echo "        You have version $db2x_version of the DocBook2X tools."
3417   fi
3418 else
3419   echo "        WARNING: without --enable-docbook we will use the cached" >&4
3420   echo "                 documentation files included in the gnash distribution." >&4
3421   echo "                 If you change files in doc/C, you should --enable-docbook." >&4
3424 if test x"$CURL_LIBS" != x; then
3425   if test x"$CURL_CFLAGS" != x; then
3426     echo "        CURL flags are: $CURL_CFLAGS"
3427   else
3428     echo "        CURL flags are: default include path"
3429   fi
3430     echo "        CURL libs are: $CURL_LIBS"
3431 else
3432   echo "        RECOMMENDED: If you install the CURL library, Gnash will be able to" >&5
3433   echo "                     display remote content (streaming from URLs) using CURL." >&5
3434   echo "                     Install libcurl from http://curl.haxx.se/libcurl" >&5
3435   echo "                     or .deb users: apt-get install libcurl-dev" >&5
3436   echo "                     or .rpm users: yum install curl-devel" >&5
3439 if test x"$SPEEX_LIBS" != x; then
3440   if test x"$SPEEX_CFLAGS" != x; then
3441     echo "        Speex flags are: $SPEEX_CFLAGS"
3442   else
3443     echo "        Speex flags are: default include path"
3444   fi
3445     echo "        Speex libs are: $SPEEX_LIBS"
3446 else
3447   echo "        RECOMMENDED: If you install the Speex library, Gnash will be able to" >&5
3448   echo "                     decoded Speex encoded audio in FLV files." >&5
3449   echo "                     Install libspeex from http://speex.org" >&5
3450   echo "                     or .deb users: apt-get install libspeex-dev" >&5
3451   echo "                     or .rpm users: yum install speex-devel" >&5
3454 if test x"$ext_dbus" = xyes; then
3455   if test x"$DBUS_LIBS" != x; then
3456     if test x"$DBUS_CFLAGS" != x; then
3457       echo "        DBUS flags are: $DBUS_CFLAGS"
3458     else
3459       echo "        DBUS flags are: default include path"
3460     fi
3461       echo "        DBUS libs are: $DBUS_LIBS"
3462   else
3463     echo "        WARNING: DBUS library not found." >&4
3464     echo "                 Gnash will be built without support for remote controls." >&4
3465     echo "                 Why not install libdbus from http://www.dbus.org" >&4
3466     echo "                 or .deb users: apt-get install dbus-dev" >&4
3467     echo "                 or .rpm users: yum install dbus-devel" >&4
3468   fi
3471 if test x$build_agg = xyes; then # {
3472   echo "        AGG Pixel format is: $pixelformat"
3473     if test x"$AGG_LIBS" != x; then # {
3474       if test x"${agg25}" != xyes; then # {
3475         echo "        ERROR: Your installation of AGG appears to be version 2.4 or older." >&3
3476         echo "               Please upgrade to AGG 2.5 or greater." >&3
3477         echo "               Install it from http://www.antigrain.com" >&3
3478         echo "               or .deb users: apt-get install libagg-dev" >&3
3479         echo "               or .rpm users: yum install agg-devel" >&3
3480       else # }{
3481         if test x"$AGG_CFLAGS" != x; then # {
3482           echo "        AGG flags are: $AGG_CFLAGS"
3483         else # }{
3484           echo "        AGG flags are: default include path"
3485         fi # }
3486         echo "        AGG libs are: $AGG_LIBS"
3487       fi # }
3488     else # }{
3489       echo "        ERROR: No AGG development package installed!" >&3
3490       echo "               Install it from http://www.antigrain.com" >&3
3491       echo "               or .deb users: apt-get install libagg-dev" >&3
3492       echo "               or .rpm users: yum install agg-devel" >&3
3493     fi # }
3494 fi # }
3496 if test x"$BOOST_LIBS" != x; then
3497         echo "        BOOST flags are: $BOOST_CFLAGS"
3498         echo "        BOOST libs are: $BOOST_LIBS"
3499         echo "        BOOST libs for cygnal are: $BOOST_CYGNAL_LIBS"
3500     dnl fi
3501     if test x"${missing_headers}" != x; then
3502       for i in ${missing_headers}; do
3503         echo "        ERROR: The BOOST $i header file is needed!" >&3
3504         echo "               Install it from http://boost.org" >&3
3505         echo "               or from a Boost development package" >&3
3506       done
3507     fi
3509     if test x"${cygnal}" = x"yes"; then
3510         if test x"${cygnal_missing_libs}" != x; then
3511           for i in ${cygnal_missing_libs}; do
3512             echo "          ERROR: The BOOST $i library is required for cygnal!" >&4
3513             echo "                 Either configure with --disable-cygnal or" >&4
3514             echo "                 install it from http://www.boost.org" >&4
3515             echo "                 or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&4
3516           done
3517         fi
3518     fi
3520     if test x"${missing_libs}" != x; then
3521       for i in ${missing_libs}; do
3522         echo "        ERROR: The BOOST $i library is needed!" >&3
3523         echo "               Install it from http://boost.org" >&3
3524         echo "               or .deb users: apt-get install libboost-"`echo ${i} | sed 's/_/-/g'`"-dev" >&3
3525       done
3526     fi
3527 else
3528     echo "        ERROR: No BOOST development package installed!" >&3
3529     echo "               Install it from http://www.boost.org" >&3
3530     echo "               or .deb users: apt-get install libboost-dev libboost-thread-dev" >&3
3531     if test x"$cygnal" = xyes; then
3532     echo "                              and libboost-date-time-dev (for cygnal)" >&3
3533     fi
3534     echo "               or .rpm users: yum install boost-devel" >&3
3537 dnl don't look for the flash compilers when cross compiling.
3538 if test x"$testsuite" = x"yes"; then
3539   if test x$cross_compiling = xno; then
3540     if test x"$MING_LIBS" != x; then
3541       echo "        MING flags are $MING_CFLAGS"
3542       echo "        MING libs are $MING_LIBS"
3543     else
3544       echo "        WARNING: You need to have the Ming development package" >&4
3545       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3546       echo "                 Install it from http://www.libming.org/" >&4
3547       echo "                 or .deb users: apt-get install libming-dev" >&4
3548     fi
3550     if test x"$MAKESWF" != x; then
3551       echo "        MING version code is $MING_VERSION_CODE"
3552       echo "        MAKESWF is $MAKESWF"
3553     else
3554       echo "        WARNING: You need to have the Ming utilities package" >&4
3555       echo "                 installed to run most of the tests in Gnash testsuite." >&4
3556       echo "                 Install it from http://www.libming.org" >&4
3557       echo "                 or .deb users: apt-get install libming-util" >&4
3558     fi
3560     if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; then
3561       echo "        WARNING: You have an older version of Ming installed and will not" >&4
3562       echo "                 be able to run all of the tests in Gnash testsuite." >&4
3563       echo "                 Install the latest version from http://www.libming.org" >&4
3564     fi
3566     if test x"$SWFDEC_TESTSUITE" != x; then
3567       echo "        SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
3568     fi
3570     if test x"$MTASC" != x; then
3571       echo "        MTASC is $MTASC"
3572       echo "        MTASC CLASSPATH is $MTASC_CLASSPATH"
3573     else
3574       echo "        WARNING: You need to have the MTASC compiler packages installed" >&4
3575       echo "                 to run some of the tests in Gnash testsuite." >&4
3576       echo "                 You can install it from http://mtasc.org" >&4
3577       echo "                 or .deb users: apt-get install mtasc" >&4
3578     fi
3580     if test x"$HAXE" != x; then
3581       echo "        HAXE is $HAXE"
3582       echo "        HAXE CLASSPATH is $HAXE_CLASSPATH"
3583     else
3584       echo "        WARNING: You need to have the HAXE compiler package " >&4
3585       echo "                 version 2.00 or higher installed" >&4
3586       echo "                 to run some of the tests in Gnash testsuite." >&4
3587       echo "                 You can install it from http://haxe.org" >&4
3588       echo "                 or .deb users: apt-get install haxe" >&4
3589     fi
3591     if test x"$SWFMILL" != x; then
3592       echo "        SWFMILL is $SWFMILL"
3593       if test x"$ENABLE_AVM2" != x -a "$SWFMILL_VERSION" -lt 00021206; then
3594         echo "        WARNING: You are building Gnash with AVM2 support but" >&4
3595         echo "                 your swfmill version is too old to run AS3" >&4
3596         echo "                 tests." >&4
3597       fi
3598     else
3599       echo "        WARNING: You need to have the 'swfmill' tool installed" >&4
3600       echo "                 to run some of the tests in Gnash testsuite." >&4
3601       echo "                 You can install it from http://swfmill.org/" >&4
3602       echo "                 or .deb users: apt-get install swfmill" >&4
3603     fi
3605     if test x"$SWFC" != x; then
3606       echo "        SWFC is $SWFC"
3607     else
3608       echo "        WARNING: You need to have 'swfc' from SWFTools installed" >&4
3609       echo "                 to run some of the tests in Gnash testsuite." >&4
3610       echo "                 You can install it from http://www.swftools.org/" >&4
3611       echo "                 or .deb users: apt-get install swftools" >&4
3612     fi
3614     if test x"$AS3COMPILE" != x; then
3615       echo "        AS3COMPILE is $AS3COMPILE"
3616     else
3617       echo "        WARNING: you need as3compile from SWFTools" >&4
3618       echo "                 to run some of the tests in Gnash testsuite." >&4
3619       echo "                 You can install it from http://www.swftools.org/" >&4
3620     fi
3622     if test x"$HTTP_TESTSUITE" != x; then
3623       echo "        HTTP testsuite dir is $HTTP_TESTSUITE"
3624     fi
3626     if test x"$RED5_HOST" != x; then
3627       echo "        RED5 testing host is $RED5_HOST"
3628     fi
3629   fi
3632   if test x"$PERL" != x; then
3633     echo "        PERL is $PERL"
3634   else
3635     echo "        WARNING: You need to have perl installed" >&4
3636     echo "                 to run some of the tests in Gnash testsuite." >&4
3637   fi
3639 if test x"$testsuite" = x"yes"; then
3640   if test x"$CSOUND" != x; then
3641     echo "        CSOUND is $CSOUND"
3642   fi
3645 if test x"$Z_LIBS" != x; then
3646   if test x"$Z_CFLAGS" != x; then
3647     echo "        Z flags are: $Z_CFLAGS"
3648   else
3649     echo "        Z flags are: default include path"
3650   fi
3651   echo "        Z libs are: $Z_LIBS"
3652 else
3653   echo "        RECOMMENDED: You need to have the zlib development packages installed" >&5
3654   echo "                     to play compressed SWF (most of them from version 6 up)" >&5
3655   echo "                     and to display some kinds of JPEG files." >&5
3656   echo "                     Install it from http://www.zlib.net" >&5
3657   echo "                     or .deb users: apt-get install zlib1g-dev" >&5
3658   echo "                     or .rpm users: yum install zlib-devel." >&5
3659   echo "                     It may still be possible to configure without zlib." >&5
3662 if test x"$FREETYPE2_LIBS" != x; then
3663   if test x"$FREETYPE2_CFLAGS" != x; then
3664     echo "        FreeType flags are: $FREETYPE2_CFLAGS"
3665   else
3666     echo "        FreeType flags are: default include path"
3667   fi
3668   echo "        FreeType libs are: $FREETYPE2_LIBS"
3669 else
3670   echo "        RECOMMENDED: You need to have the freetype development packages installed" >&5
3671   echo "                     to use device fonts." >&5
3672   echo "                     Install it from http://www.freetype.org" >&5
3673   echo "                     or .deb users: apt-get install libfreetype6-dev" >&5
3674   echo "                     or .rpm users: yum install freetype-devel" >&5
3675   echo "                     It may still be possible to configure without freetype." >&5
3678 if test x"$FONTCONFIG_LIBS" != x; then
3679   if test x"$FONTCONFIG_CFLAGS" != x; then
3680     echo "        Fontconfig flags are: $FONTCONFIG_CFLAGS"
3681   else
3682     echo "        Fontconfig flags are: default include path"
3683   fi
3684   echo "        Fontconfig libs are: $FONTCONFIG_LIBS"
3685 else
3686   echo "        RECOMMENDED: You need to have the fontconfig development packages installed" >&5
3687   echo "                     to use device fonts." >&5
3688   echo "                     Install it from http://www.fontconfig.org" >&5
3689   echo "                     or .deb users: apt-get install libfontconfig1-dev" >&5
3690   echo "                     or .rpm users: yum install fontconfig-devel" >&5
3691   echo "                     It may still be possible to configure without fontconfig." >&5
3694 if test x$ext_mysql = xyes; then
3695   if test x$mysql != xno; then
3696     if test x"$MYSQL_LIBS" != x; then
3697       echo "        MYSQL flags are: $MYSQL_CFLAGS"
3698       echo "        MYSQL libs are: $MYSQL_LIBS"
3699     else
3700       echo "        ERROR: No MySQL development package is installed." >&3
3701       echo "               Either reconfigure without --enable-extensions=mysql" >&3
3702       echo "               or install MySQL header files from http://www.mysql.org" >&3
3703       echo "               or .deb users: apt-get install libmysqlclient-dev" >&3
3704       echo "                 or .rpm users: yum install mysql-devel" >&4
3705     fi
3706   fi
3709 if test "$GMSGFMT" = ":"; then
3710   echo "        WARNING: You need the gettext package installed to use translations." >&4
3711   echo "                 Required for building a package or 'make distcheck'" >&4
3712   echo "                 Install it from http://www.gnu.org/software/gettext/" >&4
3713   echo "                 or .deb users: apt-get install gettext" >&4
3714   echo "                 or .rpm users: yum install gettext" >&4
3717 if test x"${build_vaapi}" = x"yes"; then
3718   if test x"${LIBVA_CFLAGS}" = xyes; then
3719       echo "        LIBVA flags are: default"
3720     else
3721       echo "        LIBVA flags are: $LIBVA_CFLAGS"
3722       echo "        LIBVA libraries are: $LIBVA_LIBS"
3723   fi
3724   if test x$use_libva_x11 = xyes; then
3725     if test x"${LIBVA_X11_CFLAGS}" = xyes; then
3726       echo "        LIBVA X11 flags are: default"
3727     else
3728       echo "        LIBVA X11 flags are: $LIBVA_X11_CFLAGS"
3729       echo "        LIBVA X11 libraries are: $LIBVA_X11_LIBS"
3730     fi
3731   fi
3732   if test x$use_libva_glx = xyes; then
3733     if test x"${LIBVA_GLX_CFLAGS}" = xyes; then
3734       echo "        LIBVA GLXflags are: default"
3735     else
3736       echo "        LIBVA GLX flags are: $LIBVA_GLX_CFLAGS"
3737     fi
3738     echo "        LIBVA GLX libraries are: $LIBVA_GLX_LIBS"
3739   fi
3742 if test x"$ac_cv_gcc_visibility" != xyes; then
3743   if test x"$npapi" = xyes; then
3744     echo "        WARNING: NPAPI (mozilla) plugin is enabled, but your compiler"
3745     echo "                 does not support symbol visibility. This may cause "
3746     echo "                 the plugin to malfunction and may result in small "
3747     echo "                 children being eaten. You have been warned!"
3748   fi
3751 if test x"${DEJAGNU}" != x""; then
3752   echo "        DEJAGNU's runtest is $DEJAGNU"
3753 else
3754   echo "        WARNING: You need the dejagnu package installed to get a summary" >&4
3755   echo "                 report after running ''make check''" >&4
3756   echo "                 Install it from http://www.gnu.org/software/dejagnu/" >&4
3757   echo "                 or .deb users: apt-get install dejagnu" >&4
3758   echo "                 or .rpm users: yum install dejagnu" >&4
3761 dnl Haiku
3762 if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o x"${build_media_haiku}" = x"yes"; then
3763     echo "        Haiku libs are: $HAIKU_LIBS"
3766 if test x"$python" = x"yes"; then
3767   if test x"$has_python" = x"yes"; then
3768     echo "        PYTHON flags are: $PYTHON_CFLAGS"
3769     echo "        PYTHON libs are: $PYTHON_LIBS"
3770     echo "        PYTHON executable is are: $PYTHON"
3771   else
3772     echo "        ERROR: No Python development package is installed, but it's enabled." >&3
3773   fi
3775 if test x${build_ssl} = xyes; then
3776   if test x"${has_ssl}" = xyes; then
3777     if test x"${SSL_CFLAGS}" = xyes; then
3778       echo "        SSL flags are: default"
3779     else
3780       echo "        SSL flags are: $SSL_CFLAGS"
3781     fi
3782     echo "        SSL libs are: $SSL_LIBS"
3783   else
3784     echo "        ERROR: No SSL development package is installed, but it's enabled." >&3
3785   fi
3788 if test x${build_ssh} = xyes; then
3789   if test x"${has_ssh}" = xyes; then
3790     if test x"${SSH_CFLAGS}" = xyes; then
3791       echo "        SSH flags are: default"
3792     else
3793       echo "        SSH flags are: $SSH_CFLAGS"
3794     fi
3795     echo "        SSH libs are: $SSH_LIBS"
3796   else
3797     echo "        ERROR: No SSH development package is installed, but it's enabled." >&3
3798   fi
3801 if test x"${build_all_as3}" = x"yes"; then
3802   echo "        Building the entire ActionScript class libary"
3803 else
3804   echo "        Only building these ActionScript classes into the library:"
3805   echo "     ${classlist}"
3808 if test x"$testsuite" = x"yes"; then
3809   if test x"$NETCAT" != x; then
3810     echo "        You have netcat installed, which is only used for testing"
3811   else
3812     echo "        Install netcat for networking test support"
3813   fi
3814   if test x"$WGET" != x; then
3815     echo "        You have wget installed, which is only used for testing"
3816   else
3817     echo "        Install wget for networking test support"
3818   fi
3821 if test x$cross_compiling = xyes; then
3822    if test x"${android_ndk}" != xno; then
3823       AC_MSG_NOTICE([This build is setup for cross compiling for Android])
3824    else
3825       AC_MSG_NOTICE([This build is setup for cross compiling])
3826    fi
3829 echo "--------"
3830 dnl if test x"${ghelp}" = x"yes"; then
3831 dnl   echo "        GNOME help enabled"
3832 dnl else
3833 dnl   echo "        GNOME help disabled (default). Use --enable-ghelp to enable."
3834 dnl fi
3836 dnl if test x"${extensions}" = x"yes"; then
3837 dnl   echo "        Building extensions enabled (default). Use --disable-extensions to disable."
3838 dnl else
3839 dnl   echo "        Building Gnash extensions disabled."
3840 dnl fi
3842 if test x"${cygnal}" = x"yes"; then
3843   echo "        Building Cygnal media server enabled (default). Use --disable-cygnal to disable."
3844 else
3845   echo "        Building Cygnal media server disabled."
3848 if test x"${debugger}" = x"yes"; then
3849   echo "        Building Flash debugger support (default). Use --disable-debugger to disable."
3850 else
3851   echo "        Building the Flash debugger is disabled."
3854 if test x"${with-top_level}" != x; then
3855   echo "        Top level for cross compiling support files is: $with_top_level"
3858 if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
3859   echo "        WARNING: Pixel format RGB565 selected in combination with the" >&4
3860   echo "                 GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)." >&4
3863 if test x"${extensions_list}" != x; then
3864   echo "        Building extensions: ${extensions_list}"
3867 if test x"${security_list}" != x; then
3868   echo "        Enabling security features: ${security_list}"
3871 if test x"${hwaccel_list}" != xnone; then
3872   echo "        Enabling hardware acceleration features: ${hwaccel_list}"
3875 if test x"${statistics_list}" != x; then
3876   echo "        Enabling statistics collecting for: ${statistics_list}"
3879 if test x"${SUPPORTED_GUIS}" = x; then
3880   AC_MSG_ERROR(no supported GUIs found);
3883 echo "        GUI toolkits supported: ${SUPPORTED_GUIS}"
3884 echo "        Renderers supported: ${renderer_list}"
3885 echo "        Hardware Acceleration: ${hwaccel_list}"
3886 echo "        Media handlers: ${media_list}"
3887 echo "        Using ${add_sound} for sound handling"
3888 echo "        Using $with_shm mode for shared memory"
3890 if test x"$docbook" = x"yes"; then
3891   echo '        DocBook document processing enabled (for "make html" and "make pdf")'
3892   if test x"$docbook_styles" != x; then
3893     echo "        Docbook styles sheets in $docbook_styles"
3894   fi
3895 else
3896   echo "        DocBook document processing disabled (default)"
3899 dnl The Framebuffer GUI has several other settings. As it doesn't have X11,
3900 dnl we have to handle input devices ourselves.
3901 if test x"${build_fb}" = xyes; then
3902 echo "        Using ${input_events} for Input"
3903   if test x"${fakefb}" != x; then
3904     echo "        Using shared memory as a fake framebuffer"
3905   fi
3906   if test x"${offscreen}" = xyes; then
3907     echo "        Using offscreen rendering"
3908   fi
3909   if test x"${doublebuf}" = xyes; then
3910     echo "        Using double buffering when rendering"
3911   fi
3914 if test -s $cwarn; then
3915   echo ""
3916   cat $cwarn
3917   rm $cwarn
3918   echo ""
3919   echo "Gnash should still compile even with these warnings."
3920   echo "If it doesn't, report the warnings as a bug."
3923 if test -s $crec; then
3924   echo ""
3925   cat $crec
3926   rm $crec
3927   echo ""
3928   echo "Gnash should still compile, but you'll miss important support"
3931 dnl If anything critical is missing, don't bother to continue
3932 if test -s $cerr; then
3933   echo ""
3934   cat $cerr >&2
3935   rm $cerr
3936   AC_MSG_ERROR([Please install required packages])
3939 if test x"$fork" = x"no"; then
3940   AC_MSG_ERROR([Currently only forking the standalone player works!])
3942 echo ""
3944 # Local Variables:
3945 # c-basic-offset: 2
3946 # tab-width: 2
3947 # indent-tabs-mode: nil
3948 # End: