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