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