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