2 dnl Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2015,
3 dnl 2017 Free Software Foundation, Inc.
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3 of the License, or
8 dnl (at your option) any later version.
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 AC_INIT(gnash, 0.8.11dev)
21 AC_CONFIG_SRCDIR([libcore/as_object.h])
22 AC_CONFIG_HEADERS([gnashconfig.h])
23 AC_CONFIG_MACRO_DIR([macros])
28 dnl --------------------------------------------------------
29 dnl Figure out development tool stuff
30 dnl --------------------------------------------------------
33 AX_CXX_COMPILE_STDCXX_11(noext, mandatory)
39 dnl Set the default values for Flash Version. These are converted into
40 dnl various strings to make JavaScript or ActionScript detectors
41 dnl recognize Gnash as a SWF Player.
42 DEFAULT_FLASH_MAJOR_VERSION="10"
43 DEFAULT_FLASH_MINOR_VERSION="1"
44 DEFAULT_FLASH_REV_NUMBER="999"
45 AC_SUBST(DEFAULT_FLASH_MAJOR_VERSION)
46 AC_SUBST(DEFAULT_FLASH_MINOR_VERSION)
47 AC_SUBST(DEFAULT_FLASH_REV_NUMBER)
49 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_MAJOR_VERSION], ["${DEFAULT_FLASH_MAJOR_VERSION}"], [Default Flash major version])
50 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_MINOR_VERSION], ["${DEFAULT_FLASH_MINOR_VERSION}"], [Default Flash minor version])
51 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_REV_NUMBER], ["${DEFAULT_FLASH_REV_NUMBER}"], [Default Flash revision number])
53 dnl TODO: use host/build/target -- whatever is more appropriate
56 DEFAULT_FLASH_PLATFORM_ID="MAC"
57 DEFAULT_FLASH_SYSTEM_OS="MacOS"
60 DEFAULT_FLASH_PLATFORM_ID="BSD"
61 DEFAULT_FLASH_SYSTEM_OS="OpenBSD"
63 *-freebsd* | *-kfreebsd*)
64 DEFAULT_FLASH_PLATFORM_ID="BSD"
65 DEFAULT_FLASH_SYSTEM_OS="FreeBSD"
68 DEFAULT_FLASH_PLATFORM_ID="BSD"
69 DEFAULT_FLASH_SYSTEM_OS="NetBSD"
72 DEFAULT_FLASH_PLATFORM_ID="AND"
73 DEFAULT_FLASH_SYSTEM_OS="Linux"
76 DEFAULT_FLASH_PLATFORM_ID="LNX"
77 DEFAULT_FLASH_SYSTEM_OS="GNU/Linux"
80 DEFAULT_FLASH_PLATFORM_ID="LNX"
81 DEFAULT_FLASH_SYSTEM_OS="Linux"
83 *-cygwin* | *-mingw* | *-pw32*)
84 DEFAULT_FLASH_PLATFORM_ID="WIN"
85 DEFAULT_FLASH_SYSTEM_OS="Windows"
88 DEFAULT_FLASH_PLATFORM_ID="SUN"
89 DEFAULT_FLASH_SYSTEM_OS="Solaris"
92 DEFAULT_FLASH_PLATFORM_ID="OS2"
93 DEFAULT_FLASH_SYSTEM_OS="OS/2"
96 DEFAULT_FLASH_PLATFORM_ID="SCO"
97 DEFAULT_FLASH_SYSTEM_OS="SCO/Unix"
100 DEFAULT_FLASH_PLATFORM_ID="IRX"
101 DEFAULT_FLASH_SYSTEM_OS="IRIX"
104 DEFAULT_FLASH_PLATFORM_ID="HPX"
105 DEFAULT_FLASH_SYSTEM_OS="HPUX"
108 DEFAULT_FLASH_PLATFORM_ID="OS4"
109 DEFAULT_FLASH_SYSTEM_OS="AmigaOS4"
112 DEFAULT_FLASH_PLATFORM_ID="HAIKU"
113 DEFAULT_FLASH_SYSTEM_OS="Haiku"
116 DEFAULT_FLASH_PLATFORM_ID="GNU"
117 DEFAULT_FLASH_SYSTEM_OS="GNU/HURD"
120 DEFAULT_FLASH_PLATFORM_ID="UNK"
121 DEFAULT_FLASH_SYSTEM_OS="Unknown"
125 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_PLATFORM_ID], ["${DEFAULT_FLASH_PLATFORM_ID}"], [Default 3-letter platform identifier for version string])
126 AC_DEFINE_UNQUOTED([DEFAULT_FLASH_SYSTEM_OS], ["${DEFAULT_FLASH_SYSTEM_OS}"], [Default value for System.capabilities.os])
128 AC_SUBST(DEFAULT_FLASH_PLATFORM_ID)
129 AC_SUBST(DEFAULT_FLASH_SYSTEM_OS)
131 DEFAULT_STREAMS_TIMEOUT=60
132 AC_SUBST(DEFAULT_STREAMS_TIMEOUT)
133 AC_DEFINE_UNQUOTED([DEFAULT_STREAMS_TIMEOUT], [${DEFAULT_STREAMS_TIMEOUT}], [Default streams timeout in seconds])
135 DEFAULT_SOL_SAFEDIR="~/.gnash/SharedObjects"
136 AC_SUBST(DEFAULT_SOL_SAFEDIR)
137 AC_DEFINE_UNQUOTED([DEFAULT_SOL_SAFEDIR], ["${DEFAULT_SOL_SAFEDIR}"], [Default SharedObject base directory])
140 dnl Some things you can only do by looking at the platform name.
142 powerpc-apple-darwin*)
143 AC_DEFINE([__powerpc64__], [1], [this is a 64 bit powerpc])
145 AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform])
149 AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform])
151 dnl Unfortunately, all BSD distributions are not identical, so
152 dnl as tacky as it is to look for the distribution name, we don't
153 dnl have much choice. The use of these should be avoid as much as possible.
157 AC_DEFINE([OPENBSD_HOST], [1], [this is an OpenBSD platform])
159 *-freebsd* | *-kfreebsd*)
162 AC_DEFINE([FREEBSD_HOST], [1], [this is a FreeBSD platform])
167 AC_DEFINE([NETBSD_HOST], [1], [this is a NetBSD platform])
171 AC_DEFINE([SOLARIS_HOST], [1], [this is a Solaris platform])
175 AC_DEFINE([ANDROID_HOST], [1], [this is an Android platform])
179 AC_DEFINE([LINUX_HOST], [1], [this is a Linux platform])
181 *-cygwin* | *-mingw* | *-pw32*)
183 AC_DEFINE([WIN32_HOST], [1], [this is a Win32 platform])
187 AC_DEFINE([WORDSIZE], [64], [this is a 64 platform])
191 AC_DEFINE([AMIGAOS4_HOST], [1], [this is an AmigaOS4 platform])
195 AC_DEFINE([HAIKU_HOST], [1], [this is a Haiku platform])
199 AC_DEFINE([GNU_HOST], [1], [this is a GNU platform])
203 AC_DEFINE([WINCE_HOST], [1], [this is a WINCE platform])
207 AC_DEFINE([WINCE_HOST], [1], [this is a WINCE platform])
208 AC_DEFINE([WINCE6_HOST], [1], [this is a WINCE6 platform])
213 AM_CONDITIONAL(LINUX, test x$linux = xyes)
214 AM_CONDITIONAL(WIN32, test x$windows = xyes)
215 AM_CONDITIONAL(HAIKU, test x$haiku = xyes)
216 AM_CONDITIONAL(AMIGAOS4, test x$amigaos4 = xyes)
218 dnl Get build date for helping us debugging
219 BUILDDATE="`date +%Y%m%d`"
222 dnl These are required by automake
224 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
228 AM_GNU_GETTEXT([external])
229 AM_CONDITIONAL(HAS_GETTEXT, test x$ac_cv_path_XGETTEXT != x)
231 dnl Many of the Gnash macros depend on gettext macros defining shlibext; recent
232 dnl gettext however does not.
233 if test x"${shlibext}" = x; then
234 if test x"${acl_cv_shlibext}" = x; then
235 echo "Gettext macros were supposed to define shared library extensions"
238 shlibext="${acl_cv_shlibext}"
242 dnl This is primarily used when compiling for a similar architecture,
243 dnl like pentium->geode, which can use the same compiler, but have
244 dnl different development libraries.
247 AC_HELP_STRING([--with-sysroot], [system root directory for cross compiling]),
248 with_top_level=${withval};
251 if test x"${cross_compiling}" = xyes; then
252 dnl Check if /usr isn't part of the specified path
253 if test -d ${with_top_level}/usr; then
254 with_top_level=${withval}/usr
256 dnl Check if the specified path supplies /usr
257 if test -d ${with_top_level}/include; then
258 with_top_level=${withval}
260 AC_MSG_ERROR([Specified sysroot \"${with_top_level}/include\" doesn't exist!])
265 dnl Android is a little different when using a standard cross toolchain,
266 dnl so we have to configure especially for it for now. Usually it's
267 dnl something like this:
269 dnl arm-linux-eabi-gcc -Wl,--dynamic-linker -Wl,/system/bin/linker
270 dnl -nostdlib -Wl,-rpath -Wl,/system/lib -Wl,-rpath
271 dnl -Wl,/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
272 dnl -L/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
274 dnl /opt/android-ndk-r3/build/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o
275 dnl Recent versions of G++ (I'm using 4.5 from source
277 AC_ARG_WITH([android],
278 AC_HELP_STRING([--with-android], [directory where android NDK is installed]),
279 android_ndk=${withval}
280 if test x"${withval}" != x; then
281 android_ndk=${withval}
285 if test x"${android}" = xyes; then
286 CROSS_CXXFLAGS='-fexceptions -frtti -I${prefix}/include'
287 CROSS_LDFLAGS='-all-static -L${prefix}/lib'
288 if test x"${with_top_level}" = x; then
289 with_top_level=/usr/local/android-arm/sysroot/usr
292 ANDROID_NDK=${android_ndk}
293 AC_DEFINE(ANDROID, [1], [This is an Android build])
294 CXXFLAGS="${CXXFLAGS} ${CROSS_CXXFLAGS}"
299 AC_SUBST(ANDROID_NDK)
300 AM_CONDITIONAL(ANDROID, [ test x"${android}" = xyes ])
301 AC_SUBST(CROSS_LDFLAGS)
302 AC_SUBST(CROSS_CXXFLAGS)
308 AC_PATH_PROG(DEJAGNU, runtest)
310 dnl These options are for Cygnal, which collects optional statistics
311 dnl on all the network traffic By default, we turn on statistics
312 dnl collecting for the incoming and outgoing queues, since those are
313 dnl required to be compatiable with FMS 3, and the ActionScript server
314 dnl management API. buffers are the lowest level data storage, this
315 dnl data is the time spent in the queue, and is primarily only used
316 dnl for tuning the queueing API in Gnash. Memoryis the same, it's only
317 dnl used by developers for tuning performance of memory allocations in
324 AC_ARG_WITH(statistics,
325 AC_HELP_STRING([--with-statistics], [Specify which statistics features to enable]),
326 if test -n ${withval}; then
327 if test "x${withval}" != "xno"; then
329 withval=`echo ${withval} | tr '\054' ' ' `
337 while test -n "${withval}" ; do
338 val=`echo ${withval} | cut -d ' ' -f 1`
342 nstatistics=$((nstatistics+1))
346 nstatistics=$((nstatistics+1))
350 nstatistics=$((nstatistics+1))
354 nstatistics=$((nstatistics+1))
358 nstatistics=$((nstatistics+1))
366 nstatistics=5 dnl this must be incremented if you add anything
368 *) AC_MSG_ERROR([invalid statistics feature specified: ${withval} given (accept: buffers|que|memory|cache|proplookup|all)])
371 withval=`echo ${withval} | cut -d ' ' -f 2-6`
372 if test "x$val" = "x$withval"; then
377 if test x${buffers} = xyes; then
378 statistics_list="${statistics_list} buffers"
379 AC_DEFINE(USE_STATS_BUFFERS, [1], [Support statistics collecting for the queue buffers])
380 AC_MSG_WARN([This option will effect your performance])
383 if test x${memory} = xyes; then
384 statistics_list="${statistics_list} memory"
385 AC_DEFINE(USE_STATS_MEMORY, [1], [Support statistics collecting for all memory profiling])
386 AC_MSG_WARN([This option will effect your performance])
389 if test x${que} = xyes; then
390 statistics_list="${statistics_list} queues"
391 AC_DEFINE(USE_STATS_QUEUE, [1], [Support statistics collecting for the queues])
394 if test x${cache} = xyes; then
395 statistics_list="${statistics_list} cache"
396 AC_DEFINE(USE_STATS_CACHE, [1], [Support statistics collecting for the cache])
399 if test x${stat_proplookup} = xyes; then
400 statistics_list="${statistics_list} proplookup"
401 AC_DEFINE(GNASH_STATS_OBJECT_URI_NOCASE, [1], [Collecting and report stats about ObjectURI case lookups])
402 AC_DEFINE(GNASH_STATS_PROPERTY_LOOKUPS, [1], [Collecting and report stats about property lookups])
403 AC_DEFINE(GNASH_STATS_STRING_TABLE_NOCASE, [1], [Collecting and report stats about string_table::key case lookups])
406 dnl this is just so Makefile can print the same list
407 STATISTICS_LIST="$statistics_list"
408 AC_SUBST(STATISTICS_LIST)
411 # These settings are compile time options for the security
412 # setting for anything that lets gnash exchange data with
413 # other applications. Currently this only supports Shared
414 # Objects and Local Connections. Shared Objects are like
415 # your web browsers cookies, and Local Connections use
416 # shared memory to execute methods remotely, and to
419 # The default is to enable everything, and these can
420 # also be controlled dynamically by the $HOME/.gnashrc
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
431 withval=`echo ${withval} | tr '\054' ' ' `
439 while test -n "${withval}" ; do
440 val=`echo ${withval} | cut -d ' ' -f 1`
444 nsecurity=$((nsecurity+1))
448 nsecurity=$((nsecurity+1))
455 *) AC_MSG_ERROR([invalid security feature specified: ${withval} given (accept: solreadonly|lc)])
458 withval=`echo ${withval} | cut -d ' ' -f 2-6`
459 if test "x$val" = "x$withval"; then
465 if test x$localconnection = xyes; then
466 security_list="${security_list} localconnection"
467 AC_DEFINE(USE_LC, [1],
468 [Support LocalConnection])
469 AC_MSG_NOTICE([This build supports LocalConnection])
471 if test x$solreadonly = xyes; then
472 security_list="${security_list} solreadonly"
473 AC_DEFINE(USE_SOL_READONLY, [1],
474 [Shared Objects are read-only])
475 AC_MSG_NOTICE([Shared Objects are read-only])
477 SECURITY_LIST="$security_list"
478 AC_SUBST(SECURITY_LIST)
480 dnl For Haiku, we know the sysroot is in a non-standard place
481 dnl it is important that -lagg comes before -lbe
482 if test x"${haiku}" = xyes; then
487 dnl Darwin uses libtool instead of ar to produce libraries. We determine which one
488 dnl we have here now. For some reason on Darwin, we don't get the
489 dnl count from grep via stdin correctly. Writing a temp file does the
490 dnl trick, so although it's ugly, that's what we gotta do...
491 AC_MSG_CHECKING([which type of library archiver we have])
494 archiver=`grep -c dynamic .tmp 2>&1`
496 dnl is there any good way to report what we found here?
498 if test x"${archiver}" != x && test "${archiver}" -eq 1; then
499 export MACOSX_DEPLOYMENT_TARGET="10.3"
505 dnl When cross compiling, limit the search directories cause otherwise
506 dnl we may get the host headers or libraries by accident. These values
507 dnl are exported, so all the other configure tests in macros/*.m4 use
508 dnl these same settings rather than duplicating them like we used to.
509 dnl To override thise, use the --with-*-incl= and --with-*-libs=
510 dnl options to configure.
511 if test x$cross_compiling = xyes; then
512 AC_MSG_NOTICE([Configuring Gnash for cross compilation])
513 export pkgroot="`$CXX -print-search-dirs | grep "install:" | sed -e 's/install: //' -e 's:/lib/gcc/.*::'`"
514 dnl pkgroot only works correctly with builds of cross tools not in
515 dnl /usr, ie... installed from the distribution packages, or just
516 dnl plain installed in the system tools. This contaminates configure
517 dnl when building for variations of the same basic architecture,
518 dnl like i686-linux -> i586-mingw32.
519 if test x"${pkgroot}" = x"/usr"; then
522 export incllist="`eval echo ${with_top_level}/include ${pkgroot}/${host_alias}/include ${pkgroot}/include`"
523 export libslist="`eval echo ${with_top_level}/lib ${pkgroot}/${host_alias}/lib ${pkgroot}/lib64 ${pkgroot}/lib32 ${pkgroot}/lib`"
524 export pathlist="`eval echo ${pkgroot}/${host_alias}/bin:${pkgroot}/bin`"
527 AC_MSG_NOTICE([Configuring Gnash for native compilation])
528 export incllist="`eval cat ${srcdir}/macros/incllist`"
529 libslist="`cat ${srcdir}/macros/libslist`"
530 if test -f /usr/bin/dpkg-architecture; then
531 export DEB_HOST_MULTIARCH="`eval dpkg-architecture -qDEB_HOST_MULTIARCH`"
532 export libslist="${libslist} /lib/${DEB_HOST_MULTIARCH} /usr/lib/${DEB_HOST_MULTIARCH}"
534 export pathlist=$PATH
537 if test x"${android_ndk}" != xno; then
538 incllist="${android_ndk}/include ${incllist}"
541 AM_CONDITIONAL(CROSS_COMPILING, [ test x$cross_compiling = xyes ])
543 for dir in ${incllist}; do
544 test -d ${dir} && pruned_incllist="${pruned_incllist} ${dir}";
547 for dir in ${libslist}; do
548 test -d ${dir} && pruned_libslist="${pruned_libslist} ${dir}";
551 libslist="${pruned_libslist}";
552 incllist="${pruned_incllist}";
554 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
556 dnl !! IMPORTANT NOTICE
558 dnl !! Any call to GNASH_PATH_XXX must be be given *after* this snippet.
559 dnl !! This is to ensure that PKG_CONFIG, cross_compiling and incllist are
560 dnl !! properly set at the time of call.
562 dnl !! Also GNASH_PKG_FIND has to be called later. Not sure
563 dnl !! why but calling before breaks detection of CPP (see
564 dnl !! gnash-dev mailing archives for June 12 2009
565 dnl !! http://lists.gnu.org/archive/html/gnash-dev/2009-06/index.html
568 dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
570 dnl Check for PKG_CONFIG before any GNASH_PATH call
573 dnl --------------------------------------------------------
575 dnl --------------------------------------------------------
578 build_aos4=no dnl AmigaOS4 GUI
579 build_kde3=no dnl WARNING: doesn't work (see https://savannah.gnu.org/bugs/index.php?31782)
584 build_fb=no dnl Raw framebuffer
587 build_aqua=no dnl Native MacOSX
590 AC_HELP_STRING([--enable-gui], [Enable support for the specified GUI toolkits (default=gtk,qt4)]),
591 [if test -n ${enableval}; then
592 enableval=`echo ${enableval} | tr '\054' ' ' `
594 while test -n "${enableval}" ; do
595 val=`echo ${enableval} | cut -d ' ' -f 1`
618 fltk|FLTK|fltk2|FLTK2)
635 dnl BSD doesn't have a framebuffer interface
636 if test x${linux} = xyes; then
639 if test x${openbsd} != xyes; then
645 *) AC_MSG_ERROR([invalid gui ${enableval} given (accept: gtk|kde3|qt4|fltk|sdl|aqua|fb|qtopia3|qtopia4|dump|aos4|haiku)])
648 enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
649 if test "x$val" = "x$enableval"; then
653 [ dnl Run the following code if no --enable-gui is given
656 if test x"${openbsd}" = xyes; then
659 else if test x"${haiku}" = xyes; then
670 if test x"${build_haiku}" = xyes; then
671 if test x"$haiku" != xyes; then
672 echo " ERROR: Can not build Haiku gui outside of Haiku
673 operating system." >&3
677 dnl We can use Xephyr or fbe to create a fake framebuffer instead of real
678 dnl video memory. This lets us test on a desktop machine.
680 AC_HELP_STRING([--with-fakefb],
681 [specify a file to be mapped instead of a real framebuffer]),
682 with_fakefb=${withval})
685 if test x"${with_fakefb}" = xyes; then
686 dnl This is the default file name fbe uses.
687 fakefb=/tmp/fbe_buffer
689 if test x"${with_fakefb}" != x; then
690 fakefb=${with_fakefb}
696 if test x"${fakefb}" != x; then
697 AC_DEFINE(ENABLE_FAKE_FRAMEBUFFER, [1], [Enable using a file instead of a real framebuffer])
700 dnl This enable a small handful of tests that aren't designed to be
701 dnl run as part of "make check", as they are either incomplete, or
702 dnl can only be run interactively. These are all primarily oriented
703 dnl towards code development and debugging, instead of regression
705 AC_ARG_ENABLE(devtests, AC_HELP_STRING([--enable-devtests],
706 [Developer only tests, not to be included in make check]),
707 [case "${enableval}" in
710 *) AC_MSG_ERROR([bad value ${enableval} for enable-devtests option]) ;;
712 AM_CONDITIONAL(ENABLE_DEVELOPER_TESTS, [test x${devtests} = xyes])
714 dnl --------------------------------------------------------
715 dnl Sound handler selection
716 dnl --------------------------------------------------------
723 AC_HELP_STRING([--enable-sound=[[sdl|ahi|mkit]]], [Use the specified sound handler (default=sdl)]),
724 [case "${enableval}" in
742 [if test x"${haiku}" = xyes; then
746 if test x${build_sound_none} = xno; then
753 AM_CONDITIONAL(BUILD_LIBSOUND, test x${build_sound_none} != xyes)
754 if test x${build_sound_none} != xyes; then
755 AC_DEFINE(USE_SOUND, [1], [Build any sound code])
758 dnl --------------------------------------------------------
759 dnl Media handler selection
760 dnl --------------------------------------------------------
762 build_media_ffmpeg=auto
765 AC_HELP_STRING([--enable-media=handler],
766 [Enable media handling support using the specified handlers: ffmpeg gst none(no sound) (default=auto) ]),
768 if test -n ${enableval}; then
769 enableval=`echo ${enableval} | tr '\054' ' ' `
771 dnl When --enable-media is given, all media defaults to off
772 dnl except the explicitly enabled ones
773 build_media_ffmpeg=no
775 while test -n "${enableval}"; do
776 val=`echo ${enableval} | cut -d ' ' -f 1`
780 media_list="${media_list}gst "
783 build_media_ffmpeg=yes
784 media_list="${media_list}ffmpeg "
791 AC_MSG_ERROR([bad value ${enableval} for --enable-media option])
795 enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
796 if test "x$val" = "x$enableval"; then
800 [if test x"${build_haiku}" = xyes; then
801 build_media_ffmpeg=yes
802 build_media_haiku=yes
803 media_list="ffmpeg haiku"
810 AM_CONDITIONAL(BUILD_LIBMEDIA, test x${build_media_none} != xyes)
811 if test x${build_media_none} != xyes; then
812 AC_DEFINE(USE_MEDIA, [1], [Build any media code])
815 dnl If no media is selected, and media handling isn't disabled, then enable gst
816 if test x${build_media_none} = xno -a x${build_media_gst} = xno -a x${build_media_ffmpeg} = xno; then
820 if test x"$build_media_ffmpeg" != x"no"; then # yes or auto
822 if test x"${build_media_ffmpeg}" = xauto; then
823 dnl TODO: have GNASH_PATH_FFMPEG set ${has_ffmpeg}
824 if test x"$FFMPEG_LIBS" != x; then
825 build_media_ffmpeg=yes
826 media_list="${media_list} ffmpeg"
833 MEDIA_CONFIG="${media_list}"
834 AC_SUBST(MEDIA_CONFIG)
836 dnl Multiple input devices are supported. These can all work in
837 dnl varying combinations, so several may be listed. These are only
838 dnl required when using the Framebuffer, as without the X11 desktop,
839 dnl Gnash has to handle all these internally. This can get
840 dnl messy, as one might want to use a touchscreen with a normal mouse
841 dnl or keyboard attached.
842 dnl By default, don't build any of these, as they are only for the
843 dnl Framebuffer running without X11.
844 if test x"${build_fb}" = xyes -a x"${linux}" = xyes; then
846 build_ps2keyboard=yes
847 build_input_events=yes
849 input_events="PS/2 Mouse, PS/2 Keyboard, Input Devices, Touchscreen via Tslib"
853 build_input_events=no
858 AC_HELP_STRING([--enable-input], [Enable support for the specified input devices for the framebuffer GUI (default=ps2mouse|ps2keyboard|events|touchscreen)]),
859 [if test -n ${enableval}; then
860 enableval=`echo ${enableval} | tr '\054' ' ' `
864 build_input_events=no
866 while test -n "${enableval}" ; do
867 val=`echo ${enableval} | cut -d ' ' -f 1`
869 ps2m*|PS2m*|m*|M*) dnl a PS/2 style mouse
871 input_events="${input_events}, PS/2 Mouse"
873 ps2k*|PS2K*|k*|K*) dnl a PS/2 style keyboard
874 build_ps2keyboard=yes
875 input_events="${input_events}, PS/2 Keyboard"
877 i*|I*|ev*|Ev*) dnl use the new Input Event, which supports both
878 input_events="${input_events}, Input Event Device"
879 build_input_events=yes
881 t*|T*) dnl use a touchscreen with tslib, which works like a mouse
883 input_events="${input_events}, Touchscreen"
887 build_ps2keyboard=yes
889 if test x"${linux}" = xyes; then
890 build_input_events=yes
891 input_events="PS/2 Mouse, PS/2 Keyboard, Input Devices, Touchscreen via Tslib"
893 build_input_events=no
894 input_events="PS/2 Mouse, PS/2 Keyboard, Touchscreen via Tslib"
897 *) AC_MSG_ERROR([invalid input device list! ${enableval} given (accept: ps2mouse|keyboard|events,touchscreen)])
900 enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
901 if test "x$val" = "x$enableval"; then
907 if test x$build_sdl != xno -o x$build_sound_sdl = xyes; then
910 AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} = xyes])
913 dnl -----------------------------------------------------
914 dnl Check for SDL and decide about auto gui accordingly.
915 dnl Need be done after build_sound_sdl and build_sdl are
916 dnl initialized and before they are checked for yes/no
917 dnl -----------------------------------------------------
918 if test x"${build_sdl}" = xauto; then
919 if test xyes = x"${has_sdl}"; then
922 AC_MSG_NOTICE([sdl GUI will not be built (no sdl development files found)])
927 dnl -------------------------------
928 dnl Renderer Selection
929 dnl -------------------------------
931 dnl By default, we want to to build all renderers
932 dnl DirectFB has both a device layer and a rendering layer, although
933 dnl currently the rendering part is incomplete. Configure support is
934 dnl included for development purposes.
936 dnl The OpenVG support works on both the desktop and embedded devices
937 dnl that don't run X11. It is supported by iPhone/iPad/Android
938 dnl devices, and the nouveau driver on the desktop.
940 dnl The OpenGLES1 renderer is a work in progress. It is originally
941 dnl based on a patch to Gnash 0.8.5, which of course not only didn't
942 dnl compile anymore, it was all hardcoded into the framebuffer
943 dnl code. This version compiles with the latest internal rendering
944 dnl API, and works properly with the glue code for the Gnash GUIs.
946 dnl OpenGL works, but suffers from performance and rendering quality
947 dnl problems. This should eventually be replacd by the OpenGLES1 and
950 dnl AGG is a software only renderer
953 renderer_list="agg cairo"
954 AC_ARG_ENABLE(renderer,
955 AC_HELP_STRING([--enable-renderer], [Enable support for the specified renderers (agg|cairo|opengl|openvg|all, default=all)]),
956 if test -n ${enableval}; then
957 if test "x${enableval}" != "xno" -o "x${enableval}" != "xnone" ; then
959 enableval=`echo ${enableval} | tr '\054' ' ' `
972 while test -n "${enableval}" ; do
973 val=`echo ${enableval} | cut -d ' ' -f 1`
985 renderer_list="agg cairo opengl openvg, opengles1"
992 ogl|OGL|OpenGL|opengl)
993 renderer_list="${renderer_list} opengl"
996 gles|GLES|gles1|GLES1)
997 renderer_list="${renderer_list} opengles1"
1000 nrender=$((nrender+1))
1002 ovg|OVG|OpenVG|openvg)
1003 renderer_list="${renderer_list} openvg"
1005 nrender=$((nrender+1))
1008 renderer_list="${renderer_list} DirectFB"
1010 nrender=$((nrender+1))
1013 renderer_list="${renderer_list} agg"
1017 renderer_list="${renderer_list} cairo"
1020 *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept: (opengl|openvg|cairo|agg|all)])
1023 enableval=`echo ${enableval} | cut -d ' ' -f 2-`
1024 if test "x$val" = "x$enableval"; then
1030 if test x"${build_ovg}" = xyes; then
1032 dnl If OpenVG isn't installed, disable it
1033 if test x"${has_openvg}" = xno; then
1034 AC_MSG_WARN([OpenVG specified but no development files found!])
1035 renderer_list=`echo ${renderer_list} | sed -e 's/ openvg//' `
1036 nrender=$((nrender-1))
1040 dnl VA API is used by default for all H.264 videos. HW requirements:
1041 dnl * AMD GPUs with UVD2 and xvba-video VA driver
1042 dnl * NVIDIA GPUs with vdpau-video VA driver
1043 dnl * All HW with a VA driver supporting the VA/GLX extensions or
1044 dnl vaPutSurface(Pixmap,...). This may include the Intel
1045 dnl Moorestown platform and future G45 VA driver.
1046 dnl NOTE: it is possible to use Gnash/VAAPI on platforms with an Intel
1047 dnl GMA500 but you currently will have to build the AGG renderer
1048 dnl instead of the OGL (OpenGL) one.
1049 build_vaapi_device=no
1050 build_openmax_device=no
1051 dnl These renders always require EGL support
1052 if test x${build_gles1} = xyes -o x${build_ovg} = xyes; then
1053 build_egl_device=yes
1058 build_directfb_device=no
1059 if test x"${build_fb}" = xyes -o x"${build_fb}" = xauto; then
1062 dnl AGG support for the framebuffer requires the rawfb device
1063 if test x"${build_fb_agg}" = xyes -a x"${build_agg}" = xyes; then
1064 build_rawfb_device=yes
1068 build_rawfb_device=no
1072 AC_ARG_ENABLE(device,
1073 AC_HELP_STRING([--enable-device], [Specify which hardware abstraction to use to support to enable (none,egl,directfb,rawfb,x11,vaapi)]),
1074 enableval=`echo ${enableval} | tr '\054' ' ' `
1076 build_rawfb_device=no
1079 while test -n "${enableval}" ; do
1080 val=`echo ${enableval} | cut -d ' ' -f 1`
1084 build_vaapi_device=no
1085 build_openmax_device=no
1087 build_directfb_device=no
1092 device_list="${device_list} VAAPI"
1093 build_vaapi_device=yes
1094 ndevice=$((ndevice+1))
1097 device_list="${device_list} EGL"
1098 build_egl_device=yes
1099 ndevice=$((ndevice+1))
1102 device_list="${device_list} X11"
1103 build_x11_device=yes
1104 ndevice=$((ndevice+1))
1107 device_list="${device_list} DirectFB"
1108 build_directfb_device=yes
1109 ndevice=$((ndevice+1))
1112 device_list="${device_list} RawFB"
1113 build_rawfb_device=yes
1114 ndevice=$((ndevice+1))
1117 device_list="EGL RawFB X11"
1118 build_openmax_device=no
1119 build_vaapi_device=no
1120 build_egl_device=yes
1121 build_rawfb_device=yes
1122 build_directfb_device=no
1123 build_x11_device=yes
1127 device_list="${device_list} OpenMAX"
1128 build_openmax_device=yes
1129 ndevice=$((ndevice+1))
1131 *) AC_MSG_ERROR([invalid device feature specified: ${enableval} given (accept: none,vaapi)])
1134 enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1135 if test "x$val" = "x$enableval"; then
1141 if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi_device}" = x"yes"; then
1145 dnl if the version of FFmpeg is recent enough, (r20957, 52.45.0), then
1146 dnl look for VAAPI support so we can use use the VAAPI enabled FFmpeg.
1147 if test x"${have_ffmpeg_vaapi}" = xyes; then
1149 GNASH_PKG_FIND([libva],
1151 [Video Acceleration API],
1155 GNASH_PKG_FIND([libva_x11],
1157 [VA API (X11 display)],
1162 if test x$build_ogl = xyes; then
1164 GNASH_PKG_FIND([libva_glx],
1166 [VA API (GLX display)],
1174 if test x"${build_fb_agg}" = xyes -a x"${build_rawfb_device}" = xno; then
1175 AC_MSG_ERROR([Framebuffer GUI requires the rawfb device.])
1178 dnl libVA drivers. We declare conditional for both the option being
1179 dnl selected, as well as whether or not it's found. This we can
1180 dnl generate better error handling if it's not found.
1181 AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes)
1183 dnl Until the hwaccel patches in FFmpeg wind up in the ffmpeg-plugin,
1184 dnl restrict using HW Accel to using FFmpeg directly.
1185 dnl test xyes = xyes -a ( x != xyes -o x != xyes )
1186 if test x"${build_vaapi}" = x"yes" -a x"${have_ffmpeg}" != x"yes"; then
1187 AC_MSG_ERROR(["Hardware acceleration currently not supported unless using FFmpeg."])
1190 AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes)
1191 AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes)
1192 AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes)
1194 if test x"${build_egl_device}" = xyes; then
1195 GNASH_PKG_FIND(EGL, [EGL/egl.h], [EGL library], eglGetDisplay)
1196 if test xyes = x"${has_EGL}"; then
1197 AC_DEFINE(BUILD_EGL_DEVICE, [ 1 ],
1198 [Build the EGL device for OpenVG, OpenGLES1&2, and X11/Mesa])
1200 AC_MSG_WARN(["EGL requested but development package not found!"])
1203 save_CFLAGS="$CFLAGS"
1204 CFLAGS="$CFLAGS -Wall -Werror"
1205 native_window_type=none
1206 AC_MSG_CHECKING([For EGLNativeWindowType type])
1207 AC_TRY_COMPILE([#include <EGL/eglplatform.h>], [
1208 EGLNativeWindowType foo = 1;
1211 native_window_type=int,
1212 native_window_type=void
1214 CFLAGS="$save_CFLAGS"
1215 AC_MSG_RESULT([${native_window_type}])
1216 if test x"${native_window_type}" = x"int"; then
1217 AC_DEFINE([EGL_NATIVE_WINDOW_INT], [1], [EGLNativeWindowType type])
1221 if test ${ndevice} -eq 0; then
1226 AM_CONDITIONAL(BUILD_DEVICES, test ${ndevice} -gt 0)
1228 dnl 16 bit: RGB555, RGB565
1229 dnl 24 bit: RGB24, BGR24
1230 dnl 32 bit: RGBA32, BGRA32
1232 AC_ARG_WITH(pixelformat,
1233 AC_HELP_STRING([--with-pixelformat=], [Use the specified pixel format for AGG (default=all)]),
1234 [if test -n ${withval}; then
1235 pixelformat="${withval}"
1236 withval=`echo ${withval} | tr '\054' ' ' `
1238 while test -n "${withval}" ; do
1239 val=`echo ${withval} | cut -d ' ' -f 1`
1242 # allow special value "all" set by user (handled below)
1245 AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32])
1248 AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32])
1251 AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
1254 AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24])
1257 AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32])
1260 AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24])
1263 AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555])
1266 AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565])
1268 *) AC_MSG_ERROR([invalid pixel format ${withval} given (accept: all|RGB555|RGB565|RGB24|BGR24|BGRA32|RGBA32|ARGB32|ABGR32)])
1271 withval=`echo ${withval} | cut -d ' ' -f 2-6`
1272 if test "x$val" = "x$withval"; then
1276 [if test x$build_haiku = xyes -a x$build_sdl != xyes; then
1277 AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32])
1282 if test x$pixelformat = xall; then
1283 if test x$build_agg = xyes; then
1284 ### The fact that we're building GTK doesn't mean we're not also
1285 ### building KDE or SDL, each needing its own pixel format !
1286 #if test x$build_gtk = xyes; then
1287 # AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24 pixel format])
1288 # pixelformat="RGB24"
1290 AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555 pixel format])
1291 AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565 pixel format])
1292 AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24 pixel format])
1293 AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24 pixel format])
1294 AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32 pixel format])
1295 AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32 pixel format])
1296 AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32 pixel format])
1297 AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32 pixel format])
1302 if test x"${build_ogl}" != xno; then # yes or auto
1304 if test x"${build_ogl}" = xauto; then
1305 if test xyes = x"${has_opengl}"; then
1307 renderer_list="${renderer_list} opengl"
1314 AM_CONDITIONAL(BUILD_OVG_RENDERER, [ test x${build_ovg} = xyes ])
1315 AM_CONDITIONAL(BUILD_GLES1_RENDERER, [ test x${build_gles1} = xyes ])
1316 AM_CONDITIONAL(BUILD_GLES2_RENDERER, [ test x${build_gles2} = xyes ])
1317 AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x${build_ogl} = xyes])
1318 AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x${build_agg} = xyes ])
1319 AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x${build_cairo} = xyes ])
1321 if test x"${has_openvg}" = xyes; then
1322 AC_DEFINE([RENDERER_OPENVG], [1], [Use OpenVG renderer])
1325 if test x"${build_ogl}" = xyes; then
1326 AC_DEFINE([RENDERER_OPENGL], [1], [Use OpenGL renderer])
1329 if test x"${build_agg}" = xyes; then
1330 AC_DEFINE([RENDERER_AGG], [1], [Use AntiGrain renderer])
1333 if test x"${build_cairo}" = xyes; then
1334 GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1335 AC_DEFINE([RENDERER_CAIRO], [1], [Use cairo renderer])
1338 if test x"${build_agg}" = xyes; then
1342 AC_PATH_PROG(PERL, perl)
1343 AM_CONDITIONAL(HAVE_PERL, test x"$PERL" != x)
1345 AC_PATH_PROG(CSOUND, csound)
1346 AM_CONDITIONAL(HAVE_CSOUND, test x"$CSOUND" != x)
1348 AC_PATH_PROG(GIT, git)
1351 dnl --------------------------------------------------------
1352 dnl Extension selection
1353 dnl --------------------------------------------------------
1362 extensions_support=no
1364 AC_ARG_ENABLE(extensions,
1365 AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build (default: none)])
1366 AC_HELP_STRING([--disable-extensions], [Disable support for extensions entirely]),
1367 if test -n ${enableval}; then
1368 if test "x${enableval}" != "xno"; then
1369 extlist="${enableval}"
1370 enableval=`echo ${enableval} | tr '\054' ' ' `
1371 extensions_support=yes
1378 while test -n "${enableval}" ; do
1379 val=`echo ${enableval} | cut -d ' ' -f 1`
1380 extensions_list="${extensions_list} ${val}"
1382 dejagnu|DEJAGNU|dj|DJ)
1383 AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension])
1384 AC_MSG_NOTICE([Adding DejaGnu extension])
1386 nextensions=$((nextensions+1))
1388 mysql|MYSQL|sql|SQL)
1389 AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension])
1390 AC_MSG_NOTICE([Adding MySql extension])
1392 nextensions=$((nextensions+1))
1394 fileio|FILEIO|io|IO)
1395 AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension])
1396 AC_MSG_NOTICE([Adding FileIO extension])
1398 nextensions=$((nextensions+1))
1401 AC_DEFINE(USE_GTK_EXT, [1], [Build the GTK extension])
1403 nextensions=$((nextensions+1))
1406 AC_DEFINE(USE_LIRC_EXT, [1], [Build the LIRC extension])
1408 nextensions=$((nextensions+1))
1411 AC_DEFINE(USE_DBUS_EXT, [1], [Build the DBUS extension])
1413 nextensions=$((nextensions+1))
1416 AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions])
1426 *) AC_MSG_ERROR([invalid extension specified: ${enableval} given (accept: MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)])
1429 enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1430 if test "x$val" = "x$enableval"; then
1434 EXTENSIONS_LIST="$extensions_list"
1435 AC_SUBST(EXTENSIONS_LIST)
1438 if test x$ext_dbus = xyes; then
1442 if test x$ext_mysql = xyes; then
1446 AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ])
1447 AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ])
1448 AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ])
1449 AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
1450 AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
1451 AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
1452 AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"])
1454 dnl --------------------------------------------------------
1456 dnl --------------------------------------------------------
1459 AC_LIBTOOL_WIN32_DLL
1462 AC_SUBST(LIBTOOL_DEPS)
1464 DLPREOPEN="-dlpreopen"
1468 GNASH_PKG_FIND([ltdl], [ltdl.h], [libltdl library], [lt_dlinit])
1470 if test x"$has_ltdl" = x"yes";then
1471 AC_DEFINE(HAVE_LTDL, [1], [Libtool 2.x defines this, but libtool 1.5 does not])
1474 dnl --------------------------------------------------------
1476 dnl --------------------------------------------------------
1479 AC_HELP_STRING([--with-soldir],
1480 [directory for .sol files]),
1481 with_soldir=${withval})
1482 if test x${with_soldir} != x; then
1483 soldir=${with_soldir}
1488 dnl --------------------------------------------------------
1490 dnl --------------------------------------------------------
1491 dnl AC_ARG_ENABLE(avm2,
1492 dnl AC_HELP_STRING([--enable-avm2], [Enable support for AS3]),
1493 dnl [case "${enableval}" in
1494 dnl yes) avm2=yes ;;
1496 dnl *) AC_MSG_ERROR([bad value ${enableval} for enable-avm2 option]) ;;
1499 dnl AM_CONDITIONAL(ENABLE_AVM2, [test x"$avm2" = xyes])
1500 dnl if test x$avm2 = xyes; then
1501 dnl AC_DEFINE(ENABLE_AVM2, [1], [Enable AVM2 code])
1503 AM_CONDITIONAL(ENABLE_AVM2, false)
1505 dnl This option is only used if you want Gnash to interwork with
1506 dnl the Adobe player using the LocalConnection class.
1507 dnl lckey=0xdd3adabd
1509 AC_HELP_STRING([--with-lckey],
1510 [shared memory key for your system]),
1511 with_lckey=${withval})
1513 if test x${with_lckey} != x; then
1521 AC_ARG_ENABLE(python,
1522 AC_HELP_STRING([--enable-python],[Enable python for the python wrapper]),
1523 [case "${enableval}" in
1526 *) AC_MSG_ERROR([bad value ${enableval} for --enable-python option]) ;;
1529 dnl Look for python, which is optional. If enabled, a python loadable
1530 dnl module of Gnash is created.
1532 AM_CONDITIONAL([USE_PYTHON], test x"$python" = xyes)
1533 AM_CONDITIONAL([HAS_PYTHON], test x"$has_python" = xyes)
1535 dnl By default debug logging is enabled. For better performance, it can
1536 dnl be disabled, as when running as a plugin, nobody sees the debug messages
1537 dnl anyway. Debug logging is primarily for developers, so we can turn it off
1538 dnl for package builds.
1540 AC_HELP_STRING([--enable-log],[Enable debug logging]),
1541 [case "${enableval}" in
1542 yes) debuglog=yes ;;
1544 *) AC_MSG_ERROR([bad value ${enableval} for --enable-log option]) ;;
1547 if test x"${debuglog}" = x"yes"; then
1548 AC_DEFINE([DEBUG_LOGGING], [1], [Enable debug logging])
1551 # Maybe use jemalloc, which handles memory fragmentation for
1552 # ECAMscript languages better than the regular system malloc.
1553 # This seems like a good idea, as both the other player and
1554 # Mozilla/Firefox both recently switched to using jemalloc.
1555 AC_ARG_ENABLE(jemalloc,
1556 AC_HELP_STRING([--enable-jemalloc],[Enable jemalloc instead of system malloc])
1557 AC_HELP_STRING([--disable-jemalloc],[Disable jemalloc]),
1558 [case "${enableval}" in
1559 yes) jemalloc=yes ;;
1561 *) AC_MSG_ERROR([bad value ${enableval} for --enable-jemalloc option]) ;;
1564 dnl We can search libs for mallinfo to decide whether we have it or not.
1565 dnl This is added to the linker flags when it's found. Usually it's -lc, but
1566 dnl on OpenSolaris it's -lmalloc, so this fixes the build.
1567 AC_SEARCH_LIBS([mallinfo], [c malloc],
1568 AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
1572 AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes)
1574 if test x"${jemalloc}" = x"yes"; then
1575 GNASH_PKG_FIND(jemalloc, [jemalloc.h], [jemalloc memory management], mallctl)
1578 AM_CONDITIONAL(JEMALLOC, test x"${has_jemalloc}" = xyes)
1580 AC_SEARCH_LIBS([getaddrinfo], [c])
1582 AC_ARG_ENABLE(fps-debug,
1583 AC_HELP_STRING([--enable-fps-debug],[Enable FPS debugging code]),
1584 [case "${enableval}" in
1585 yes) AC_DEFINE([GNASH_FPS_DEBUG], [1], [Enable FPS debugging code])
1588 dnl IPC_INFO isn't portable, and doesn't exist on BSD
1589 AC_TRY_COMPILE([#include <sys/ipc.h> #include <sys/shm.h>], [
1590 int flag = IPC_INFO; ],
1591 AC_DEFINE([HAVE_IPC_INFO], [1], [Use ipc_info])
1594 dnl --------------------------------------------------------
1596 dnl --------------------------------------------------------
1597 dnl Don't add the GUI menu. Some educational systems think this adds
1598 dnl clutter and confusion, like on the OLPC.
1599 AC_ARG_ENABLE(menus,
1600 AC_HELP_STRING([--disable-menus],[Disable the GUI menus]),
1601 [case "${enableval}" in
1604 *) AC_MSG_ERROR([bad value ${enableval} for --disable-menus option]) ;;
1607 if test x"$menus" = x"yes"; then
1608 AC_DEFINE([USE_MENUS], [], [GUI Menu support])
1610 AM_CONDITIONAL(MENUS, test x$menus = xyes)
1612 dnl --------------------------------------------------------
1613 dnl Disable SWF information
1614 dnl --------------------------------------------------------
1615 dnl Don't gather SWF information in tree form. This takes
1616 dnl resources and memory that can be saved if there's no
1617 dnl need to examine SWF internals.
1618 AC_ARG_ENABLE(swftree,
1619 AC_HELP_STRING([--disable-swftree],[Disable showing SWF properties]),
1620 [case "${enableval}" in
1623 *) AC_MSG_ERROR([bad value ${enableval} for --disable-swf-properties option]) ;;
1626 if test x"$swftree" = x"yes"; then
1627 AC_DEFINE([USE_SWFTREE], [], [View SWF information])
1629 AM_CONDITIONAL(SWFTREE, test x$swftree = xyes)
1631 dnl --------------------------------------------------------
1632 dnl Disable testsuite
1633 dnl --------------------------------------------------------
1634 dnl Disable running any tests for "make check". This may sound stupid, but
1635 dnl this option is designed to solely be used by maintainers in the
1636 dnl DISTCHECK_CONFIGURE_FLAGS when building packages. Gnash's testing infrastructure
1637 dnl is complex, and often the the testsuites will work, but due to some obscure reason,
1638 dnl make distcheck fails.
1639 AC_ARG_ENABLE(testsuite,
1640 AC_HELP_STRING([--disable-testsuite],[Disable the testsuite, maintainers option only]),
1641 [case "${enableval}" in
1642 yes) testsuite=yes ;;
1644 *) AC_MSG_ERROR([bad value ${enableval} for --disable-testsuite option]) ;;
1645 esac],testsuite=yes)
1647 if test x"$testsuite" = x"yes"; then
1648 AC_DEFINE([USE_TESTSUITE], [], [Testsuite support, maintainers option only])
1650 AM_CONDITIONAL(TESTSUITE, test x$testsuite = xyes)
1652 dnl --------------------------------------------------------
1653 dnl Write the file to disk in the plugin
1654 dnl --------------------------------------------------------
1655 AC_ARG_ENABLE(write,
1656 AC_HELP_STRING([--enable-write], [Makes the Mozilla plugin write the currently playing SWF movie to /tmp.]),
1657 [case "${enableval}" in
1660 *) AC_MSG_ERROR([bad value ${enableval} for --enable-write option]) ;;
1663 if test x"$write" = x"yes"; then
1664 AC_DEFINE([WRITE_FILE], [], [Write files while streaming])
1667 dnl --------------------------------------------------------
1668 dnl Write a standalone gnash launcher to disk from the plugin
1669 dnl --------------------------------------------------------
1670 AC_ARG_ENABLE(sa-launcher,
1671 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.]),
1672 [case "${enableval}" in
1673 yes) sa_launcher=yes ;;
1674 no) sa_launcher=no ;;
1675 *) AC_MSG_ERROR([bad value ${enableval} for --enable-sa-launcher option]) ;;
1676 esac],sa_launcher=yes)
1678 if test x"$sa_launcher" = x"yes"; then
1679 AC_DEFINE([CREATE_STANDALONE_GNASH_LAUNCHER], [], [Add support for writing a standalone executable launcher for movies embedded in web pages])
1682 dnl --------------------------------------------------------
1683 dnl Build the cygnal server if specified.
1684 dnl --------------------------------------------------------
1685 AC_ARG_ENABLE(cygnal,
1686 AC_HELP_STRING([--enable-cygnal], [Enable building of the Cygnal server]),
1687 [case "${enableval}" in
1689 extensions_support=yes ;;
1691 *) AC_MSG_ERROR([bad value ${enableval} for enable-cygnal option]) ;;
1693 AM_CONDITIONAL(CYGNAL, test x$cygnal = xyes)
1695 if test x$extensions_support = xyes; then
1696 AC_DEFINE([USE_EXTENSIONS], [1], [Specify that extension support is enabled.])
1698 AM_CONDITIONAL(ENABLE_EXTENSIONS, [ test "x${extensions_support}" != "xno" ])
1700 dnl --------------------------------------------------------
1701 dnl Build the cgibins server if specified.
1702 dnl --------------------------------------------------------
1703 AC_ARG_ENABLE(cgibins,
1704 AC_HELP_STRING([--enable-cgibins], [Enable building of the CGIs for Cygnal]),
1705 [case "${enableval}" in
1708 *) AC_MSG_ERROR([bad value ${enableval} for enable-cgibins option]) ;;
1710 AM_CONDITIONAL(USE_CGI, test x$cgibin = xyes)
1711 if test x"${cgibin}" = x"yes"; then
1712 AC_DEFINE([USE_CGIBIN], [1], [Enable cgi-bin processes for Cygnal])
1715 dnl --------------------------------------------------------
1717 dnl --------------------------------------------------------
1718 dnl Add an option for double buffering when rendering, currently only used by
1719 dnl the frmaebuffer GUI.
1720 dnl If defined, an internal software-buffer is used for rendering and is then
1721 dnl copied to the video RAM. This avoids flicker and is faster for complex
1722 dnl graphics, as video RAM access is usually slower. (strongly suggested)
1723 AC_ARG_ENABLE(doublebuf,
1724 AC_HELP_STRING([--disable-doublebuf], [Disble support for double buffering when rendering with AGG]),
1725 [case "${enableval}" in
1726 yes) doublebuf=yes ;;
1728 *) AC_MSG_ERROR([bad value ${enableval} for enable-doublebuf option]) ;;
1729 esac], doublebuf=yes
1731 AM_CONDITIONAL(ENABLE_DBUF, [test x"$doublebuf" = xyes])
1732 if test x$doublebuf = xyes; then
1733 AC_DEFINE(ENABLE_DOUBLE_BUFFERING, [1], [Disable double buffering for AGG])
1736 dnl --------------------------------------------------------
1737 dnl Offscreen buffer
1738 dnl --------------------------------------------------------
1739 dnl This enables rendering to an offscreen buffer, instead of directly to window
1740 AC_ARG_ENABLE(offscreen,
1741 AC_HELP_STRING([--enable-offscreen], [Enable support for rendering offscreen]),
1742 [case "${enableval}" in
1743 yes) offscreen=yes ;;
1745 *) AC_MSG_ERROR([bad value ${enableval} for enable-offscreen option]) ;;
1750 dnl --------------------------------------------------------
1751 dnl SSH support selection
1752 dnl --------------------------------------------------------
1753 dnl Enable using libssh with libnet
1755 AC_HELP_STRING([--enable-ssh], [Enable using SSH for network authentication]),
1756 [case "${enableval}" in
1757 yes) build_ssh=yes ;;
1759 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ssh option]) ;;
1760 esac], build_ssh=no)
1762 AM_CONDITIONAL(BUILD_SSH, test x"${build_ssh}" = xyes)
1763 if test x"${build_ssh}" = xyes; then
1764 GNASH_PKG_FIND(ssh, [libssh/libssh.h], [libssh library], ssh_socket_init)
1765 dnl GNASH_PKG_FIND(poppler, [popt.h], [Poppler library], poppler_init)
1767 if test x"${has_ssh}" = x"yes"; then
1768 AC_DEFINE([USE_SSH], [1], [Use SSH for authentication])
1771 dnl --------------------------------------------------------
1772 dnl SSL support selection
1773 dnl --------------------------------------------------------
1775 dnl Enable using OpenSSL with libnet.
1777 AC_HELP_STRING([--enable-ssl], [Enable using OpenSSL directly]),
1778 [case "${enableval}" in
1779 yes) build_ssl=yes ;;
1781 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ssl option]) ;;
1782 esac], build_ssl=no)
1786 AM_CONDITIONAL(BUILD_SSL, test x"${build_ssl}" = xyes)
1788 AC_HELP_STRING([--with-cert],
1789 [cert file for SSL]),
1790 with_cert=${withval})
1792 AC_HELP_STRING([--with-pe],
1793 [pem file for SSL]),
1794 with_pem=${withval})
1796 if test x"${build_ssl}" = xyes; then
1797 GNASH_PKG_FIND(ssl, [openssl/ssl.h], [OpenSSL library], SSL_library_init)
1799 if test x"${has_ssl}" = x"yes"; then
1800 AC_DEFINE([USE_SSL], [1], [Use SSL for authentication])
1803 dnl -----------------------------------------------------------
1804 dnl Set the general plugins install policy here
1805 dnl (NOTE: before GNASH_PATH_FIREFOX and GNASH_PATH_KDE*)
1806 dnl -----------------------------------------------------------
1808 AC_ARG_WITH(plugins-install,
1809 AC_HELP_STRING([--with-plugins-install=system|user|prefix], [Policy for plugins install. Default: user.]),
1810 [case "${withval}" in
1811 user) PLUGINS_INSTALL_POLICY=user ;;
1812 system) PLUGINS_INSTALL_POLICY=system ;;
1813 prefix) PLUGINS_INSTALL_POLICY=prefix ;;
1814 *) AC_MSG_ERROR([bad value ${withval} for --with-plugins-install]) ;;
1816 ], PLUGINS_INSTALL_POLICY=user)
1818 dnl -----------------------------------------------------------
1819 dnl Verify dependencies for requested GUIs are met, and
1820 dnl disable build of the GUIS for which deps are NOT met
1821 dnl ------------------------------------------------------------
1823 if test x$build_gtk = xyes; then
1826 GNASH_PKG_FIND(atk, [atk/atk.h], [atk library], atk_focus_tracker_init, [1.0])
1827 if test x"${build_ogl}" = xyes; then
1830 if test x"${build_cairo}" = xyes; then
1831 GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status)
1835 if test x"${build_qt4}" != xno; then
1839 if test x"${build_qt4}" = xauto; then
1840 if test x"${has_qt4}" = xyes; then
1847 if test x"${build_kde3}" != xno -o x"${build_qtopia3}" != xno; then
1851 if test x"${build_kde3}" != xno; then
1856 if test x"${build_kde3}" = xauto; then
1857 if test x"${has_qt3}" = xyes -a x"${has_kde3}" = xyes; then
1864 dnl Check possibility to build DUMP gui, if requested
1865 if test x"${build_dump}" != xno; then
1866 if test x"${build_agg}" = xyes; then
1869 if test x"${build_dump}" = xyes; then
1870 dnl SHOULD we just check at the end of file instead ?
1871 AC_MSG_ERROR(dump GUI cannot be built without AGG renderer);
1877 dnl Check possibility to build FB gui, if requested
1878 dnl FB dependency is a linux system (linux/fb.h)
1879 if test x"${build_fb}" != xno; then
1880 if test x"${linux}" = xyes -o x"${android}" = xyes; then
1883 if test x"${build_fb}" = xyes; then
1884 dnl SHOULD we just check at the end of file instead ?
1885 AC_MSG_ERROR(framebuffer GUI cannot be built on non-linux platforms);
1887 AC_MSG_NOTICE([framebuffer GUI won't be built (non-linux platform)])
1892 dnl TODO: add checks for all other GUIs
1894 dnl -------------------------------
1895 dnl Input Device selection
1896 dnl -------------------------------
1898 dnl Multiple input devices are supported. These can all work in
1899 dnl varying combinations, so several may be listed. These are only
1900 dnl required when using the Framebuffer, as without the X11 desktop,
1901 dnl Gnash has to handle all these internally. This can get
1902 dnl messy, as one might want to use a touchscreen with a normal mouse
1903 dnl or keyboard attached.
1904 dnl By default, don't build any of these, as they are only for the Framebuffer
1905 dnl running without X11.
1906 if test x"${build_fb}" = xyes; then
1908 build_ps2keyboard=yes
1909 build_input_events=yes
1911 input_events="Input Devices, Touchscreen via Tslib"
1914 build_ps2keyboard=no
1915 build_input_events=no
1919 AC_ARG_ENABLE(input,
1920 AC_HELP_STRING([--enable-input], [Enable support for the specified input devices for the framebuffer GUI (default=ps2mouse|ps2keyboard|events|touchscreen)]),
1921 [if test -n ${enableval}; then
1922 enableval=`echo ${enableval} | tr '\054' ' ' `
1924 while test -n "${enableval}" ; do
1925 val=`echo ${enableval} | cut -d ' ' -f 1`
1927 ps2m*|PS2m*|m*|M*) dnl a PS/2 style mouse
1929 input_events="${input_events}, PS/2 Mouse"
1931 ps2k*|PS2K*|k*|K*) dnl a PS/2 style keyboard
1932 build_ps2keyboard=yes
1933 input_events="${input_events}, PS/2 Keyboard"
1935 i*|I*|ev*|Ev*) dnl use the new Input Event, which supports both
1936 input_events="${input_events}, Input Event Device"
1937 build_input_events=yes
1939 t*|T*) dnl use a touchscreen with tslib, which works like a mouse
1941 input_events="${input_events}, Touchscreen"
1943 *) AC_MSG_ERROR([invalid input device list! ${enableval} given (accept: ps2mouse|keyboard|events,touchscreen)])
1946 enableval=`echo ${enableval} | cut -d ' ' -f 2-6`
1947 if test "x$val" = "x$enableval"; then
1953 if test x"${build_tslib}" = xyes; then
1954 AC_DEFINE(USE_TSLIB, [1], [Use a tslib supported touchscreen])
1955 GNASH_PKG_FIND(ts, [tslib.h], [Touchscreen library], ts_config)
1957 AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} != xno])
1959 if test x"${build_ps2mouse}" = xyes; then
1960 AC_DEFINE(USE_MOUSE_PS2, [1], [Add support for a directly using a PS/2 Mouse])
1962 AM_CONDITIONAL(ENABLE_MOUSE, [test x"${build_ps2mouse}" = xyes])
1964 if test x"${build_ps2keyboard}" = xyes; then
1965 AC_DEFINE(USE_KEYBOARD_PS2, [1], [Add support for directly using a PS/2 Keyboard])
1967 if test x"${build_input_events}" = xyes; then
1968 AC_DEFINE(USE_INPUT_EVENTS, [1], [Add support for a directly using Linux Input Event Devices])
1970 AM_CONDITIONAL(ENABLE_INPUT_EVENTS, [test x"${build_input_events}" = xyes])
1971 dnl this is enabled if we have any input devices at all
1972 AM_CONDITIONAL(ENABLE_INPUT_DEVICES, [test x"${input_events}" != x])
1975 dnl -----------------------------------------------------------
1976 dnl Try to ignore stupid dependencies
1977 dnl -----------------------------------------------------------
1979 AC_MSG_CHECKING(linker --as-needed support)
1980 gcc_cv_ld_as_needed=no
1981 # Check if linker supports --as-needed and --no-as-needed options
1982 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
1983 gcc_cv_ld_as_needed=yes
1985 if test x"$gcc_cv_ld_as_needed" = xyes; then
1986 LDFLAGS="$LDFLAGS -Wl,--as-needed"
1988 AC_MSG_RESULT($gcc_cv_ld_as_needed)
1990 AC_DEFINE(USE_GIF, [1], [Use the GIF library])
1991 AC_DEFINE(USE_PNG, [1], [Use the PNG library])
1992 AM_CONDITIONAL(USE_GIF, true)
1993 AM_CONDITIONAL(USE_PNG, true)
1995 AC_PATH_TOOL([AUTOTRACE], [autotrace])
1998 dnl -----------------------------------------------------------------
1999 dnl PLUGIN RELATED STUFF
2000 dnl -----------------------------------------------------------------
2002 dnl !! This has been moved here to make --enable-npapi work
2003 dnl !! All of plugin-related macro calls could be moved into
2004 dnl !! a specialized macros/plugin.m4
2006 dnl ----------------------------------------------------
2007 dnl Add KPARTS support, if specified or KDE gui is built
2008 dnl ----------------------------------------------------
2010 AC_ARG_ENABLE(kparts3,
2011 AC_HELP_STRING([--disable-kparts3], [Disable support for Konqueror 3.x plugin (default: enabled if kde3 gui is)]),
2012 [case "${enableval}" in
2013 yes) build_kparts3=yes ;;
2014 no) build_kparts3=no ;;
2015 *) AC_MSG_ERROR([bad value ${enableval} for --disable-kparts3 option]) ;;
2016 esac],build_kparts3=$build_kde3)
2018 dnl --------------------------------------------------------
2019 dnl Add KPARTS 4.x support, if specified or KDE gui is built
2020 dnl --------------------------------------------------------
2022 AC_ARG_ENABLE(kparts4,
2023 AC_HELP_STRING([--disable-kparts4], [Disable support for Konqueror 4.x plugin (default: enabled if Qt4 gui is)]),
2024 [case "${enableval}" in
2025 yes) build_kparts4=yes ;;
2026 no) build_kparts4=no ;;
2027 *) AC_MSG_ERROR([bad value ${enableval} for --disable-kparts4 option]) ;;
2028 esac],build_kparts4=$build_qt4)
2030 if test x"${build_kparts4}" != xno; then
2034 dnl -----------------------------------------------------------
2035 dnl Add NPAPI support, if specified or GTK or Qt4 gui is built
2036 dnl -----------------------------------------------------------
2038 AC_ARG_ENABLE(npapi,
2039 AC_HELP_STRING([--disable-npapi], [Disable NPAPI plugin build (default: enabled if gtk or Qt4 gui is)]),
2040 [case "${enableval}" in
2043 *) AC_MSG_ERROR([bad value ${enableval} for disable-npapi option]) ;;
2045 if test x$build_gtk = xyes -o x$build_qt4 = xyes; then
2050 if test x"$npapi" = x"yes"; then
2054 dnl -----------------------------------------------------------------
2055 dnl Enable us to disable building all browser plugins in one command.
2056 dnl -----------------------------------------------------------------
2058 AC_ARG_ENABLE(plugins,
2059 AC_HELP_STRING([--disable-plugins], [Disable all browser plugins from building (default=no)]),
2060 [case "${enableval}" in
2063 *) AC_MSG_ERROR([bad value ${enableval} for disable-plugins option]) ;;
2067 if test x$plugins = xno; then
2077 dnl New versions of the NPAPI require const for this prototype, which currently
2078 dnl seems to only be wit Ubuntu Oneiric.
2079 AC_MSG_CHECKING([for const needed for NPP_GetMIMEDescription() prototype])
2080 npapi_flags="`echo "${NPAPI_CFLAGS}" | sed -e 's/-I//' -e 's/-DXP_UNIX//' | tr -d ' '`/npapi.h"
2081 const_test="`grep NPP_GetMIMEDescription ${npapi_flags} | grep -c const`"
2082 if test ${const_test} -eq 1; then
2083 AC_DEFINE(NPAPI_CONST, [1], [Newer versions use const in prototypes])
2084 AC_MSG_RESULT([yes])
2089 AC_TRY_COMPILE([#include <linux/input.h>], [
2090 struct input_absinfo abs;
2091 abs.resolution = 0;; ],
2092 AC_DEFINE([ABSINFO_RESOLUTION], [1], [ABS Resolution field])
2095 dnl -----------------------------------------------------------------
2096 dnl END OF PLUGIN RELATED STUFF
2097 dnl -----------------------------------------------------------------
2099 AM_CONDITIONAL(LIRC, [test x$lirc_ext = xyes])
2101 AC_CHECK_HEADERS(getopt.h)
2102 AC_CHECK_HEADERS(libgen.h)
2103 AC_CHECK_HEADERS(pwd.h)
2104 AC_CHECK_HEADERS(sys/utsname.h)
2105 AC_CHECK_HEADERS(signal.h)
2106 AC_CHECK_HEADERS(unistd.h)
2107 AC_CHECK_HEADERS(sys/time.h)
2108 AC_CHECK_HEADERS(linux/uinput.h, [uinput=yes], [uinput=no])
2109 AC_CHECK_LIB(bz2, BZ2_bzopen, [AC_SUBST(BZ2_LIBS, -lbz2)])
2110 AC_CHECK_LIB(c, getpwnam, AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] ))
2112 AM_CONDITIONAL(HAS_UINPUT, [test x$uinput = xyes])
2114 dnl X11 is needed for fltk (at least),
2115 dnl and probably for many other guis too ...
2116 dnl if ! test x$build_fb = xyes; then # <--- this is wrong as build_x is non-exclusive
2118 dnl AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation)
2119 dnl AC_CHECK_LIB(gmp, _gmp_get_memory_functions)
2122 AM_CONDITIONAL(HAVE_X11, [test x${has_x11} = xyes])
2123 if test x${build_x11_device} = xyes -a x${has_x11} = xyes; then
2124 AC_DEFINE(BUILD_X11_DEVICE, [1], [Build the X11 device])
2127 dnl See if ipc_perm structure has the ipc_perm.key field, and if so,
2128 dnl which variant of the name is used.
2131 #include <sys/ipc.h>
2132 #include <sys/shm.h>], [
2133 struct shmid_ds shmseg;
2134 key_t x = shmseg.shm_perm.key;],
2136 AC_DEFINE(IPC_PERM_KEY, [key], [Has the key field in ipc_perm])
2139 if test x$ipc_key = xno; then
2141 #include <sys/ipc.h>
2142 #include <sys/shm.h>], [
2143 struct shmid_ds shmseg;
2144 key_t x = shmseg.shm_perm.__key;],
2145 AC_DEFINE(IPC_PERM_KEY, [__key], [Has the key field in ipc_perm])
2150 dnl If sysv semaphores functs are stubs (e.g. on Hurd),
2151 dnl disable LocalConnection tests
2152 AC_CHECK_FUNCS(semget, semget=yes)
2153 AM_CONDITIONAL(HAVE_SEMGET, test x${semget} = xyes)
2155 AC_CACHE_CHECK([for finite], ac_cv_finite,
2158 #ifdef HAVE_IEEEFP_H
2161 [double x; int y; y = finite(x);],
2165 if test x"$ac_cv_finite" = x"yes"; then
2166 AC_SEARCH_LIBS(finite, m,
2167 [AC_DEFINE(HAVE_FINITE, [1], [Has finite])]
2172 AC_CACHE_CHECK([for isfinite], ac_cv_isfinite,
2173 [AC_TRY_COMPILE([#include <cmath>],
2174 [using namespace std; double x; int y; y = isfinite(x);],
2179 if test x"$ac_cv_isfinite" = x"yes"; then
2180 dnl Don't give up if isfinite is not found in -lm
2181 dnl isfinite is defined as a macro in C99.
2182 AC_SEARCH_LIBS(isfinite, m)
2183 AC_DEFINE(HAVE_ISFINITE, [1], [Has isfinite])
2187 AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [
2188 AC_TRY_LINK([#include <cstdio>
2190 [ std::printf("%s", __PRETTY_FUNCTION__); ],
2191 [ ac_cv_implements___PRETTY_FUNCTION__="yes" ],
2192 [ ac_cv_implements___PRETTY_FUNCTION__="no" ]
2195 if test "x$ac_cv_implements___PRETTY_FUNCTION__" = "xyes" ; then
2196 AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined])
2199 AC_CACHE_CHECK([whether $CXX implements __FUNCTION__], ac_cv_implements___FUNCTION__, [
2200 AC_TRY_LINK([#include <cstdio>
2202 [ std::printf("%s", __FUNCTION__); ],
2203 [ ac_cv_implements___FUNCTION__="yes" ],
2204 [ ac_cv_implements___FUNCTION__="no" ]
2207 if test "x$ac_cv_implements___FUNCTION__" = "xyes" ; then
2208 AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined])
2211 AC_CACHE_CHECK([whether $CXX implements __func__], ac_cv_implements___func__, [
2212 AC_TRY_LINK([#include <cstdio>
2214 [ std::printf("%s", __func__); ],
2215 [ ac_cv_implements___func__="yes" ],
2216 [ ac_cv_implements___func__="no" ]
2219 if test "x$ac_cv_implements___func__" = "xyes" ; then
2220 AC_DEFINE(HAVE_func, [1], [__func__ is defined])
2223 AC_REPLACE_FUNCS(getopt)
2225 dnl Date portability stuff, used in server/asobj/Date.cpp
2226 AC_CHECK_FUNCS(gettimeofday)
2227 AC_CHECK_FUNCS(ftime)
2228 AC_CHECK_FUNCS(tzset)
2229 AC_CHECK_FUNCS(localtime_r)
2231 AC_CACHE_CHECK([whether struct tm has tm_gmtoff], ac_cv_tm_gmtoff, [
2233 /* ctime(1) says "The glibc version of struct tm has additional fields
2234 * defined when _BSD_SOURCE was set before including <time.h>"
2235 * In practice, you do not need to define it yourself (tested on glibc-2.2.1
2236 * and 2.3.6) but if you *do* define it yourself, it makes *all* functions
2237 * favour BSD-like behaviour over of GNU/POSIX, which seems dangerous.
2239 // #define _BSD_SOURCE 1
2242 [ struct tm tm; long l = tm.tm_gmtoff; ],
2243 [ ac_cv_tm_gmtoff="yes" ],
2244 [ ac_cv_tm_gmtoff="no" ]
2247 if test "x$ac_cv_tm_gmtoff" = "xyes" ; then
2248 AC_DEFINE(HAVE_TM_GMTOFF, [1], [struct tm has member tm_gmtoff])
2251 AC_CACHE_CHECK([whether timezone is a long], ac_cv_long_timezone, [
2253 /* On Linux/glibc, tzset(3) says "extern long timezone;" (seconds West of GMT)
2254 * but on BSD char *timezone(int,int) is a function returning a string name.
2255 * The BSD function timegm() may be the equivalent, but this should
2256 * not be necessary because on BSD the code should use tm.tm_gmtoff instead
2257 * (use of long timezone is a fallback strategy for when tm_gmtoff exists not).
2261 extern long timezone;
2263 [ printf("%ld", timezone); ],
2264 [ ac_cv_long_timezone="yes" ],
2265 [ ac_cv_long_timezone="no" ]
2268 if test "x$ac_cv_long_timezone" = "xyes" ; then
2269 AC_DEFINE(HAVE_LONG_TIMEZONE, [1], [extern timezone is a long integer, not a function])
2272 AC_CHECK_FUNCS(mkstemps)
2273 AC_CHECK_FUNCS(sysconf)
2274 AC_CHECK_FUNCS(shmget shmat shmdt mmap)
2275 AC_CHECK_FUNCS(scandir) dnl supported by BSD and Linux, but you never know...
2276 AC_CHECK_LIB(rt, clock_gettime)
2277 AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has clock_gettime()] ))
2278 dnl Look for Win32 networking stuff
2279 AC_CHECK_HEADERS(winsock.h)
2280 AC_CHECK_HEADERS(winsock2.h)
2282 GNASH_PKG_FIND(nspr, [nspr.h], [Netscape Portable Runtime (NSPR)], PR_Init)
2284 AC_PATH_TOOL(WINDRES, [windres])
2287 GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress)
2288 GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init)
2289 GNASH_PKG_FIND(png, [png.h], [png images], png_info_init)
2290 GNASH_PKG_FIND(gif, [gif_lib.h], [gif images], DGifOpen)
2291 if test x"${GIF_LIBS}" = x ; then
2292 GNASH_PKG_FIND(ungif, [gif_lib.h], [gif images], DGifOpen)
2293 GIF_LIBS=${UNGIF_LIBS}
2294 GIF_CFLAGS=${UNGIF_CFLAGS}
2296 if test x"$testsuite" = x"yes"; then
2297 GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
2300 GNASH_PKG_FIND(speex, [speex/speex.h], [speex audio codec], speex_decode_int)
2301 AM_CONDITIONAL(HAVE_SPEEX, [ test x$has_speex = xyes ])
2302 if test x$has_speex = xyes ; then
2303 AC_DEFINE([DECODING_SPEEX], [1], [Speex codec available])
2306 GNASH_PKG_FIND(speexdsp, [speex/speex_resampler.h], [speex DSP utilities], speex_resampler_process_int)
2307 if test x$has_speexdsp = xyes ; then
2308 AC_DEFINE([RESAMPLING_SPEEX], [1], [Speex resampler available])
2311 dnl Find freetype and fontconfig
2312 GNASH_PATH_FREETYPE2
2313 GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch)
2317 if test x$cross_compiling = xno; then
2321 if test x"$MING_VERSION_CODE" = x; then
2325 AM_CONDITIONAL(ENABLE_MING,
2326 [ test x"$MAKESWF" != x -a $MING_VERSION_CODE -gt 40000 ])
2328 AM_CONDITIONAL(MING_VERSION_0_4,
2329 [ test $MING_VERSION_CODE -ge 40000 ])
2330 AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS,
2331 [ test $MING_VERSION_CODE -ge 40002 ])
2332 AM_CONDITIONAL(MING_SUPPORTS_INIT_ACTIONS,
2333 [ test $MING_VERSION_CODE -ge 40004 ])
2334 AM_CONDITIONAL(MING_SUPPORTS_REPLACE_TAG,
2335 [ test $MING_VERSION_CODE -ge 40005 ])
2336 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_ADD_CHARACTER,
2337 [ test $MING_VERSION_CODE -ge 40005 ])
2338 AM_CONDITIONAL(MING_SUPPORTS_STREAMING_SOUND,
2339 [ test $MING_VERSION_CODE -ge 40006 ])
2340 AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_SET_DEPTH,
2341 [ test $MING_VERSION_CODE -ge 40006 ])
2342 AM_CONDITIONAL(MING_VERSION_0_4_3,
2343 [ test $MING_VERSION_CODE -ge 40300 ])
2344 AM_CONDITIONAL(MING_VERSION_0_4_4,
2345 [ test $MING_VERSION_CODE -ge 40400 ])
2347 if test x$cross_compiling = xno; then
2348 AC_ARG_WITH([swfdec_testsuite],
2349 AC_HELP_STRING([--with-swfdec-testsuite],
2350 [directory where swfdec testsuite (the 'test' dir) is]),
2351 if test x"${withval}" = xyes; then
2353 dir=`cd ${dir} && pwd`
2354 withval="${dir}/testsuite/swfdec/src/test"
2356 SWFDEC_TESTSUITE=${withval}
2358 AC_SUBST(SWFDEC_TESTSUITE)
2360 AM_CONDITIONAL(ENABLE_SWFDEC_TESTSUITE, [ test x"$SWFDEC_TESTSUITE" != x ])
2362 if test x$cross_compiling = xno; then
2363 AC_ARG_ENABLE([http_testsuite],
2364 AC_HELP_STRING([--enable-http-testsuite@<:@=URL@:>@],
2365 [Enable http based testsuite (default url is http://www.gnashdev.org/testcases)]),
2366 [case "${enableval}" in
2367 no) HTTP_TESTSUITE="" ;;
2368 yes) HTTP_TESTSUITE="http://www.gnashdev.org/testcases" ;;
2369 *) HTTP_TESTSUITE="${enableval}";;
2371 AC_SUBST(HTTP_TESTSUITE)
2373 AM_CONDITIONAL(ENABLE_HTTP_TESTSUITE, [ test x"$HTTP_TESTSUITE" != x ])
2375 if test x$cross_compiling = xno; then
2376 AC_ARG_ENABLE([red5_testing],
2377 AC_HELP_STRING([--enable-red5-testing@<:@=HOST@:>@],
2378 [Enable red5 based testing (default host is www.gnashdev.org)]),
2379 [case "${enableval}" in
2381 yes) RED5_HOST="www.gnashdev.org" ;;
2382 *) RED5_HOST="${enableval}";;
2384 if test x"$RED5_HOST" != x -a x"$curl_rtmp_support" != x; then
2389 AM_CONDITIONAL(ENABLE_RED5_TESTING, [ test x"$RED5_TESTING" != x ])
2391 if test x$cross_compiling = xno; then
2392 AC_ARG_ENABLE([rtmpy_testing],
2393 AC_HELP_STRING([--enable-rtmpy-testing@<:@=HOST@:>@],
2394 [Enable rtmpy based testing (default host is www.gnashdev.org)]),
2395 [case "${enableval}" in
2396 no) RTMPY_HOST="" ;;
2397 yes) RTMPY_HOST="www.gnashdev.org" ;;
2398 *) RTMPY_HOST="${enableval}";;
2400 AC_SUBST(RTMPY_HOST)
2402 AM_CONDITIONAL(ENABLE_RTMPY_TESTING, [ test x"$RTMPY_HOST" != x ])
2404 dnl The name might differ between systems.
2405 if test x"$testsuite" = x"yes"; then
2406 AC_PATH_PROGS(NETCAT, [nc netcat])
2407 AC_PATH_PROG(WGET, wget)
2409 AM_CONDITIONAL(HAS_NETCAT, [ test x"$NETCAT" != x ])
2410 AM_CONDITIONAL(HAS_WGET, [ test x"$WGET" != x ])
2413 dnl See if we can use the swfmill, mtasc, swfc and haxe based testsuites
2415 if test x"$testsuite" = x"yes" -a x$cross_compiling = xno; then
2416 AC_PATH_PROG(AS3COMPILE, as3compile)
2417 AC_PATH_PROG(SWFC, swfc)
2423 AM_CONDITIONAL(ENABLE_SWFMILL, [ test x"$SWFMILL" != x ])
2424 AM_CONDITIONAL(SWFMILL_AS3_SUPPORT,
2425 [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2427 dnl SWFMILL versions older than 0.3 didn't get function2 flags order correctly
2428 AM_CONDITIONAL(SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT,
2429 [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ])
2431 AM_CONDITIONAL(ENABLE_AS3COMPILE, [ test x"$AS3COMPILE" != x ])
2432 AM_CONDITIONAL(ENABLE_MTASC, [ test x"$MTASC" != x ])
2433 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2434 AM_CONDITIONAL(ENABLE_SWFC, [ test x"$SWFC" != x ])
2435 AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ])
2437 AC_PATH_PROG(DOXYGEN, doxygen)
2438 AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ])
2440 AM_CONDITIONAL(HAVE_KDE3, [test x$has_kde3 = xyes])
2441 AM_CONDITIONAL(HAVE_KDE4, [test x$has_kde4 = xyes])
2442 AM_CONDITIONAL(HAVE_QT3, [test x$has_qt3 = xyes])
2443 AM_CONDITIONAL(HAVE_QT4, [test x$has_qt4 = xyes])
2445 AM_CONDITIONAL([QT_X11], [test "$platform" = "X11"])
2446 AM_CONDITIONAL([QTOPIA], [test "$platform" = "Qtopia"])
2447 AM_CONDITIONAL([QT_OSX], [test "$platform" = "OSX"])
2448 AM_CONDITIONAL([QT_OS9], [test "$platform" = "OS9"])
2449 AM_CONDITIONAL([QT_WIN32], [test "$platform" = "Win32"])
2451 dnl Need GLIB for both GTK and GST
2452 if test x"${build_gtk}" = xyes -o x"${build_media_gst}" = xyes; then
2456 AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ])
2458 if test x$npapi = xyes; then
2459 if ! test x$build_gtk = xyes -o x$build_qt4 = xyes; then
2460 AC_MSG_WARN(["Enabled NPAPI plugin, but it's not supported by the selected GUI"])
2464 if test x$windows = xyes -a x$npapi = xyes; then
2465 if test "x$NSPR_CFLAGS" = x -a "x$NSPR_LIBS" = x; then
2466 AC_MSG_ERROR(["On Win32, NPAPI plugin requires NSPR."])
2468 if test "x$WINDRES" = x; then
2469 AC_MSG_ERROR(["On Win32, NPAPI plugin requires windres."])
2473 dnl Need GLIB for NPAPI plugin
2474 if test x$npapi = xyes; then
2478 dnl if kde isn't installed, even if it's specified, don't try to build
2479 dnl the KPARTS plugin, which is KDE based.
2480 if test x$has_kde3 = xno -a x$build_kparts3 = xyes; then
2482 AC_MSG_WARN(["Disabling KPARTS 3.x plugin, no KDE development found"])
2485 if test x$build_kde3 = xno -a x$build_kparts3 = xyes; then
2486 AC_MSG_WARN(["Enabled KPARTS 3.x plugin, but you aren't building a KDE based GUI!"])
2488 if test x$has_kde4 = xno -a x$build_kparts4 = xyes; then
2490 AC_MSG_WARN(["Disabling KPARTS 4.x plugin, no KDE 4.x development found"])
2493 if test x$build_qt4 = xno -a x$kparts4 = xyes; then
2494 AC_MSG_WARN(["Enabled KPARTS 4.x plugin, but you aren't building a KDE 4.x based GUI!"])
2497 AM_CONDITIONAL(BUILD_QTOPIA3_GUI, [ test x$build_qtopia3 = xyes ])
2498 AM_CONDITIONAL(BUILD_QTOPIA4_GUI, [ test x$build_qtopia4 = xyes ])
2500 AM_CONDITIONAL(BUILD_KDE3_GUI, [ test x$build_kde3 = xyes ])
2501 AM_CONDITIONAL(BUILD_QT4_GUI, [ test x$build_qt4 = xyes ])
2503 AM_CONDITIONAL(BUILD_GTK_GUI, [ test x$build_gtk = xyes ])
2504 AM_CONDITIONAL(BUILD_FLTK_GUI, [ test x$build_fltk = xyes ])
2505 AM_CONDITIONAL(BUILD_SDL_GUI, [ test x$build_sdl = xyes ])
2506 AM_CONDITIONAL(BUILD_FB_GUI, [ test x$build_fb = xyes ])
2507 AM_CONDITIONAL(BUILD_AQUA_GUI, [ test x$build_aqua = xyes ])
2508 AM_CONDITIONAL(BUILD_DUMP_GUI, [ test x$build_dump = xyes ])
2509 AM_CONDITIONAL(BUILD_AMIGAOS4_GUI, [ test x$build_aos4 = xyes ])
2510 AM_CONDITIONAL(BUILD_HAIKU_GUI, [ test x$build_haiku = xyes ])
2512 # plugin building flags
2513 AM_CONDITIONAL(NPAPI, [test x"${npapi}" = xyes])
2514 AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes])
2515 AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes])
2517 if test x"${build_gles1}"; then
2521 dnl only Linux supports /dev/fb0
2522 if test x"${build_rawfb_device}" = xyes; then
2523 AC_DEFINE([BUILD_RAWFB_DEVICE], [1], [Use raw Framebuffer device support])
2526 if test x"${build_directfb_device}" = xyes; then
2527 GNASH_PKG_FIND(directfb, [directfb.h], [DirectFB render library], DirectFBCreate)
2528 AC_DEFINE([BUILD_DIRECTFB_DEVICE], [1], [Use DirectFB device support])
2531 AM_CONDITIONAL(BUILD_VAAPI_DEVICE, [test x"${use_libva}" = xyes])
2532 AM_CONDITIONAL(BUILD_EGL_DEVICE, [test x"${build_egl_device}" = xyes])
2533 AM_CONDITIONAL(BUILD_DIRECTFB_DEVICE, [ test x${build_directfb_device} = xyes])
2534 AM_CONDITIONAL(BUILD_RAWFB_DEVICE, [ test x${build_rawfb_device} = xyes])
2535 AM_CONDITIONAL(BUILD_X11_DEVICE, [test x${build_x11_device} = xyes])
2537 if test x"${build_gtk}" = xyes; then
2538 AC_ARG_ENABLE(ghelp,
2539 AC_HELP_STRING([--enable-ghelp], [Enable support for the GNOME help system]),
2540 [case "${enableval}" in
2543 *) AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;;
2547 if test x"${ghelp}" = x"yes" ; then
2548 AC_PATH_PROG(SCROLLKEEPER, scrollkeeper-config, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2549 AC_PATH_PROG(SCROLLUPDATE, scrollkeeper-update, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2550 AC_PATH_PROG(SCROLLINSTALL, scrollkeeper-preinstall, [], [$PATH:/usr/bin/X11:/usr/local/bin/X11:/opt/X11])
2552 if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = x ; then
2554 AC_MSG_WARN([You need to install scrollkeeper for gnome help])
2558 AM_CONDITIONAL(GHELP, [test x${ghelp} = xyes])
2560 if test x${build_fltk} = xyes; then
2561 GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender)
2564 dnl Some systems have a pervered set of dependencies.
2565 dnl Fedora Core 6 appears to have a dependency on expat for fontconfig.
2566 dnl We only need the library, but this is the easy wind to find it.
2567 GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString)
2569 dnl these conditionals were moved out of kde.m4
2570 AM_CONDITIONAL(HAS_KDE3, [test x$has_kde3 = xyes])
2571 # used to disable x11-specific stuff on special platforms
2572 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
2573 AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
2574 AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
2576 AM_CONDITIONAL(HAVE_GLEXT, [test x$glext = xyes])
2578 dnl We don't have GTKGLExt, so default to SDL, and don't build the Firefox plugin
2579 if test x$glext = xno -a x$build_ogl = xyes; then
2580 if test x$gtk2 = xyes -a x$build_gtk = xyes; then
2581 AC_ERROR([You have GTK installed, but not GtkGLExt. You need GtkGLExt to use the OpenGL renderer. Attempting to build SDL version])
2585 AC_MSG_WARN([GTK2 specified for the GUI, but GtkGlExt is not present. Trying SDL instead.])
2589 if test x"$build_media_gst" = "xyes"; then
2590 AC_PATH_PROG(GST_INSPECT, gst-inspect, ,[${pathlist}])
2591 if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2592 AC_PATH_PROG(GST_INSPECT, gst-inspect-0.10, ,[${pathlist}])
2594 if test "x$GST_INSPECT" != "x" -a x"${darwin}" = xno ; then
2595 dnl FIXME: there may be multiple acceptable plugins that are acceptable for
2596 dnl our use. For example, mad or FFmpeg will play mp3.
2597 codecs="ffdec_flv ffdec_flashsv ffdec_vp6f ffdec_flashsv mad vorbisdec ffdec_vp6"
2598 for i in $codecs; do
2599 hits="`$GST_INSPECT $i | grep -c 'Long name'`"
2600 if test $hits -eq 0; then
2601 missing_codecs="$missing_codecs $i"
2602 AC_MSG_WARN([Missing codec: $i])
2606 GNASH_PKG_FIND(gstreamer_plugins_base, [gst/interfaces/probeprobe.h], [gstreamer interfaces library], gst_property_probe_probe_and_get_values_name, [0.10])
2607 GNASH_PKG_FIND(gstreamer_app, [gst/app/gstappsink.h], [gstreamer app library], call_gmon_start, [0.10])
2608 GNASH_PKG_FIND(gstreamer, [gst/gst.h], [gstreamer library], gst_init, [0.10])
2609 dnl if cross compiling, we're usually not going to be able to pop up
2610 dnl the codec installer to download the package to install, so disable
2611 dnl it if cross compiling with gstreamer support.
2612 if test x$cross_compiling = xno; then
2613 GNASH_PKG_FIND(gstreamer_pbutils, [gst/pbutils/install-plugins.h], [gstreamer PB Utils library], gst_install_plugins_supported, [0.10])
2615 dnl when cross compiling Gstreamer, not all supplied SDKs include all the
2616 dnl development libraries since most devices don't need to support plugin
2617 dnl development, only the runtime. In these caes we often have the header
2618 dnl files but not the libraries.
2619 if test x"${has_gstreamer_plugins_base}" = xyes; then
2620 GSTREAMER_LIBS="-lgstinterfaces-0.10 $GSTREAMER_LIBS"
2621 AC_DEFINE(HAS_GSTREAMER_PLUGINS_BASE, [1], [Has the Gstreamer Plugin Dev package installed])
2625 AM_CONDITIONAL(HAVE_CAIRO, [true])
2626 AM_CONDITIONAL(HAVE_OPENGL, [true])
2628 AM_CONDITIONAL(USE_SOUND_SDL, test x$build_sound_sdl = xyes)
2629 AM_CONDITIONAL(USE_SOUND_AHI, test x$build_sound_ahi = xyes)
2630 AM_CONDITIONAL(USE_SOUND_MKIT, test x$build_sound_mkit = xyes)
2631 AM_CONDITIONAL(USE_FFMPEG_ENGINE, test x"${build_media_ffmpeg}" = x"yes")
2632 AM_CONDITIONAL(USE_GST_ENGINE, test x"${build_media_gst}" = x"yes")
2633 AM_CONDITIONAL(HAVE_OPENGL, test x"${OPENGL_LIBS}" != x)
2634 dnl for now the Haiku media handler is experimental
2635 AM_CONDITIONAL(USE_HAIKU_ENGINE, test x"$build_media_haiku" = xyes)
2637 if test x"${build_media_ffmpeg}" = x"yes"; then
2638 AC_DEFINE([ENABLE_FFMPEG_MEDIA], [1], [Use FFmpeg for media decoding])
2641 if test x"${build_media_gst}" = x"yes"; then
2642 AC_DEFINE([ENABLE_GST_MEDIA], [1], [Use gstreamer for media decoding])
2645 if test x"${build_media_haiku}" = x"yes"; then
2646 AC_DEFINE([ENABLE_HAIKU_MEDIA], [1], [Use haiku for media decoding])
2649 if test x$build_sound_mkit = xyes; then
2650 if test x"${haiku}" != xyes; then
2651 AC_MSG_ERROR([Media Kit sound handling is supported only under Haiku]);
2653 AC_DEFINE([SOUND_MKIT], [1], [Use Haiku Media Kit for sound handling])
2657 if test x"${build_sound_sdl}" = xyes; then
2658 AC_DEFINE([SOUND_SDL], [1], [Use SDL for sound handling])
2661 if test x"${build_sound_ahi}" = xyes; then
2662 if test x"$amigaos4" != xyes; then
2663 AC_MSG_ERROR([AHI sound handling is supported only under AmigaOS]);
2665 AC_DEFINE([SOUND_AHI], [1], [Use AmigaOS AHI for sound handling])
2669 if test x$build_fltk = xyes; then
2670 GNASH_PKG_FIND(fltk2, [fltk/FL_API.h], [Fast Light Toolkit], fl_window_flush)
2671 if test x"${has_fltk2}" = xyes; then
2672 AC_CHECK_LIB(Xi, XInput_find_display,
2673 [AC_SUBST(FLTK2_LIBS, "$FLTK2_LIBS -lXi")])
2677 AM_CONDITIONAL(HAVE_FLTK2, [ test x$has_fltk2 = xyes ])
2678 AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ])
2681 AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x)
2682 AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes)
2683 AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_TEXI" != x -o x"$DB2X_TEXIXML" != x ])
2684 AM_CONDITIONAL(ENABLE_PDF, [ test x"$DB2X_PDF" ])
2685 AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2686 AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x -a x"$docbook_styles" != x ])
2687 AM_CONDITIONAL(ENABLE_XMLTEX, [ test x"$PDFXMLTEX" != x -a x"$XSLTPROC" != x -a x"$docbook_styles" != x ])
2688 AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_MAN" != x -o x"$DB2X_MANXML" != x ])
2689 AM_CONDITIONAL(HAVE_AGG, [test x"${AGG_LIBS}" != x])
2691 dnl Define winsock if we're on windows. We could do something complicated,
2692 dnl but since AC_EXEEXT does it for us, we'll do this the easy way.
2693 if test x"$EXEEXT" = "exe"; then
2694 AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32])
2697 dnl ****************************************
2698 dnl *** Check for ELF visibility support ***
2699 dnl ****************************************
2701 dnl Enable visibility by default, disabled if extensions are enabled
2702 AC_ARG_ENABLE([visibility],
2703 AC_HELP_STRING([--enable-visibility], [Use ELF visibility attributes])
2704 AC_HELP_STRING([--disable-visibility], [Disable ELF visibility]), [], [
2705 if test x"$extensions_support" != x"no"; then
2706 enable_visibility=no
2708 enable_visibility=yes
2711 if test x"$enable_visibility" != x"no"; then
2712 dnl Check whether the compiler supports the visibility attribute
2713 save_CFLAGS="$CFLAGS"
2714 CFLAGS="$CFLAGS -Wall -Werror"
2715 AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
2716 AC_COMPILE_IFELSE([AC_LANG_SOURCE(
2718 void __attribute__ ((visibility("default"))) test_default (void) {}
2719 void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
2720 int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
2723 AC_DEFINE([HAVE_GNUC_VISIBILITY], [1], [Define this for GCC-visibility.])
2724 AC_MSG_RESULT([yes])
2730 CFLAGS="$save_CFLAGS"
2733 AC_ARG_ENABLE([pch],
2734 AC_HELP_STRING([--enable-pch], [Enable precompiled header support]), [], [enable_pch=no])
2736 AM_CONDITIONAL([ENABLE_PCH], [test x"$enable_pch" != x"no"])
2738 PCH_FLAGS="-include all-includes.h -Winvalid-pch"
2745 AC_ARG_ENABLE([strict],
2746 AC_HELP_STRING([--enable-strict],[Accept only standards compliant code (GCC only)]),
2747 [case "${enableval}" in
2750 *) AC_MSG_ERROR([bad value ${enableval} for --enable-strict option]) ;;
2755 if test x"$strict" = x"yes" -a x$build_agg = xyes; then
2756 AC_MSG_ERROR([agg renderer will fail with --enable-strict.]);
2759 # We want warnings, lots of warnings :-)
2760 # It should be possible to build with -ansi, not with
2761 # -pedantic because of agg.
2763 # -ansi was actually dropped because it hides 'fileno', which
2764 # is used in a few places
2766 if test x"$GCC" = x"yes"; then
2767 CXXFLAGS="$CXXFLAGS \
2774 -Wnon-virtual-dtor \
2785 -Wmissing-declarations \
2786 -Wmissing-prototypes \
2787 -Wstrict-prototypes \
2789 if test x"$strict" = x"yes"; then
2790 CXXFLAGS="$CXXFLAGS \
2804 AC_ARG_ENABLE([cassert],
2805 AC_HELP_STRING([--disable-cassert],[Disable assertion checking]),
2806 [case "${enableval}" in
2809 *) AC_MSG_ERROR([bad value ${enableval} for --enable-cassert option]) ;;
2814 if test x"$cassert" = x"no"; then
2815 CXXFLAGS="$CXXFLAGS \
2823 dnl /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
2824 AC_DEFUN([CHECK_VISIBILITY_GCC_BUG],
2826 AC_CACHE_CHECK([if -fvisibility-inlines-hidden is broken], ac_cv_gcc_visibility_bug, [
2829 save_CXXFLAGS=$CXXFLAGS
2830 save_LDFLAGS=$LDFLAGS
2832 CXXFLAGS="-fPIC -fvisibility-inlines-hidden -O0"
2833 LDFLAGS="$LDFLAGS -shared -fPIC"
2837 template<typename CharT>
2842 template<typename CharT>
2843 inline VisTest<CharT>::VisTest()
2845 extern template class VisTest<char>; // It works if we drop that line
2846 int some_function( int do_something ) __attribute__((visibility("default")));
2847 int some_function( int )
2853 ac_cv_gcc_visibility_bug=no, ac_cv_gcc_visibility_bug=yes)
2856 CXXFLAGS=$save_CXXFLAGS
2857 LDFLAGS=$save_LDFLAGS
2861 if test x$ac_cv_gcc_visibility_bug = xno; then
2862 CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
2867 CHECK_VISIBILITY_GCC_BUG
2869 if test x$ac_cv_gcc_visibility_bug = xno; then
2871 AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
2872 save_CXXFLAGS=$CXXFLAGS
2873 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2874 AC_LINK_IFELSE([AC_LANG_PROGRAM()],
2875 [ac_cv_gcc_visibility=yes;
2876 AC_MSG_RESULT([yes])],
2877 [ac_cv_gcc_visibility=no;
2878 AC_MSG_RESULT([no])]);
2879 CXXFLAGS="$save_CXXFLAGS"
2884 AM_CONDITIONAL(VISIBILITY_WORKS, test x"$ac_cv_gcc_visibility" = xyes)
2886 if test x"$ac_cv_gcc_visibility" = xyes -a x"$enable_visibility" != xno; then
2887 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
2890 AC_ARG_ENABLE([harden],
2891 AC_HELP_STRING([--disable-harden],[Disable hardening]),
2892 [case "${enableval}" in
2895 *) AC_MSG_ERROR([bad value ${enableval} for --enable-harden option]) ;;
2900 AC_DEFUN([ADD_HARDENING_FLAGS],[
2901 AX_APPEND_COMPILE_FLAGS([-fpie -fPIE -Wformat -Werror=format-security])
2903 AX_CHECK_COMPILE_FLAG([-fstack-protector-strong],
2904 [AX_APPEND_FLAG([-fstack-protector-strong])],
2905 [AX_APPEND_COMPILE_FLAGS(["-fstack-protector --param ssp-buffer-size=4"])])
2908 if test x"$harden" = x"yes"; then
2909 CPPFLAGS="${CPPFLAGS} -D_FORTIFY_SOURCE=2"
2916 AX_APPEND_LINK_FLAGS([-fPIE -pie -Wl,-z,relro -Wl,-z,now])
2919 dnl Define convenience constants so Gnash can print out the
2920 dnl default configuration of the build.
2921 RENDERER_CONFIG="${renderer_list}"
2923 for rend in `echo "${add_renderer}" | tr ',' ' '`; do
2924 RENDERER_LIBS="${RENDERER_LIBS} \$(top_builddir)/librender/libgnash${rend}.la"
2926 AC_SUBST(RENDERER_LIBS)
2927 AC_SUBST(RENDERER_CONFIG)
2929 HWACCEL_CONFIG="${device_list}"
2930 AC_SUBST(HWACCEL_CONFIG)
2932 dnl check for missing libraries and disable them.
2933 if test x"$BOOST_LIBS" != x; then
2934 if test x"${missing_cygnal_libs}" != x; then
2935 for i in ${missing_cygnal_libs}; do
2936 if test $i = serialization; then
2937 AC_DEFINE([BOOST_MULTI_INDEX_DISABLE_SERIALIZATION], ["1"], [if the library is missing, don't use it.])
2943 dnl ========= Check for GConf
2945 AC_MSG_CHECKING([whether GConf support is requested])
2946 AC_ARG_WITH([gconf],
2947 [AS_HELP_STRING([--without-gconf],
2948 [Disable the use of gconf])],
2951 *-cygwin* | *-mingw* | *-pw32*) with_gconf=no ;;
2952 *) with_gconf=yes ;;
2954 AC_MSG_RESULT([$with_gconf])
2956 AM_CONDITIONAL([WITH_GCONF],[test "$with_gconf" = "yes"])
2958 if test "$with_gconf" = "yes"; then
2959 PKG_CHECK_MODULES([GCONF],[gconf-2.0])
2960 AC_DEFINE([WITH_GCONF],[1],[Define if GConf support is enabled])
2964 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [false])
2965 if test "$GCONFTOOL" = "false"; then
2966 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
2969 AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL],false)
2976 if test x$build_qtopia3 = xyes; then
2977 SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia3"
2979 if test x$build_qtopia4 = xyes; then
2980 SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia4"
2982 if test x$build_fb = xyes; then
2983 SUPPORTED_GUIS="${SUPPORTED_GUIS},fb"
2985 if test x$build_fltk = xyes; then
2986 SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk"
2988 if test x$build_kde3 = xyes; then
2989 SUPPORTED_GUIS="${SUPPORTED_GUIS},kde3"
2991 if test x$build_qt4 = xyes; then
2992 SUPPORTED_GUIS="${SUPPORTED_GUIS},qt4"
2994 if test x$build_gtk = xyes; then
2995 SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk"
2997 if test x$build_sdl = xyes; then
2998 SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl"
3000 if test x$build_aqua = xyes; then
3001 SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua"
3003 if test x$build_dump = xyes; then
3004 SUPPORTED_GUIS="${SUPPORTED_GUIS},dump"
3006 if test x$build_aos4 = xyes; then
3007 SUPPORTED_GUIS="${SUPPORTED_GUIS},aos4"
3009 if test x$build_haiku = xyes; then
3010 SUPPORTED_GUIS="${SUPPORTED_GUIS},haiku"
3012 SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma
3013 AC_SUBST(SUPPORTED_GUIS)
3015 AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in)
3016 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in)
3017 AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in)
3020 gnash.pc:gnash.pc.in
3021 desktop/gnash-gtk-launcher:desktop/gnash-gtk-launcher.in
3022 desktop/gnash-qt-launcher:desktop/gnash-qt-launcher.in
3033 libcore/parser/Makefile
3040 testsuite/media/Makefile
3041 testsuite/libbase.all/Makefile
3042 testsuite/as3compile.all/Makefile
3043 testsuite/actionscript.all/Makefile
3044 testsuite/samples/Makefile
3045 testsuite/swfdec/Makefile
3046 testsuite/misc-ming.all/Makefile
3047 testsuite/misc-ming.all/action_order/Makefile
3048 testsuite/misc-ming.all/sound/Makefile
3049 testsuite/misc-ming.all/displaylist_depths/Makefile
3050 testsuite/misc-ming.all/init_action/Makefile
3051 testsuite/misc-ming.all/loop/Makefile
3052 testsuite/misc-ming.all/loading/Makefile
3053 testsuite/misc-ming.all/register_class/Makefile
3054 testsuite/misc-mtasc.all/Makefile
3055 testsuite/misc-haxe.all/Makefile
3056 testsuite/misc-haxe.all/classes.all/Makefile
3057 testsuite/misc-swfmill.all/Makefile
3058 testsuite/misc-swfmill.all/trace-as2/Makefile
3059 testsuite/misc-swfmill.all/trace-as3/Makefile
3060 testsuite/misc-swfc.all/Makefile
3061 testsuite/network.all/Makefile
3062 testsuite/movies.all/Makefile
3063 testsuite/libcore.all/Makefile
3064 testsuite/libmedia.all/Makefile
3067 gui/pythonmod/Makefile
3069 extensions/dejagnu/Makefile
3070 extensions/mysql/Makefile
3071 extensions/fileio/Makefile
3072 extensions/gtk2/Makefile
3073 extensions/lirc/Makefile
3074 extensions/dbus/Makefile
3076 plugin/npapi/Makefile
3077 plugin/klash/Makefile
3078 plugin/klash4/Makefile
3079 plugin/win32/Makefile
3080 plugin/aos4/Makefile
3083 cygnal/libnet/Makefile
3084 cygnal/libamf/Makefile
3085 cygnal/cgi-bin/Makefile
3086 cygnal/cgi-bin/echo/Makefile
3087 cygnal/cgi-bin/oflaDemo/Makefile
3088 cygnal/cgi-bin/fitcDemo/Makefile
3089 cygnal/testsuite/Makefile
3090 cygnal/testsuite/libamf.all/Makefile
3091 cygnal/testsuite/libnet.all/Makefile
3092 cygnal/testsuite/cygnal.all/Makefile
3096 ########################## Final report begins... ############################
3099 dnl Create temporary directory in a secure way
3100 tmp=`mktemp -d ${TMPDIR=/tmp}/gnash-configure-XXXXXX`
3101 if test \! -n "$tmp" || test \! -d "$tmp"; then
3102 tmp=`(umask 077 && mkdir -d ${TMPDIR=/tmp}/gnash-configure-${RANDOM}-$$) 2>/dev/null`
3104 cerr="${tmp}/errors"
3105 cwarn="${tmp}/warnings"
3106 crec="${tmp}/recommended"
3107 deb_err="${tmp}/deb_err"
3108 deb_war="${tmp}/deb_war"
3109 deb_rec="${tmp}/deb_rec"
3110 rpm_err="${tmp}/rpm_err"
3111 rpm_war="${tmp}/rpm_war"
3112 rpm_rec="${tmp}/rpm_rec"
3113 yast_err="${tmp}/yast_err"
3114 yast_war="${tmp}/yast_war"
3115 yast_rec="${tmp}/yast_rec"
3118 #trap 'rm cerr' 0 # trap isn't a good idea, might override other traps
3123 for F in "$deb_err" "$deb_war" "$deb_rec" "$rpm_err" "$rpm_war" "$rpm_rec" "$yast_err" "$yast_war" "$yast_rec"; do
3132 dnl These macros should be portable as I checked most things used are in
3133 dnl POSIX-2008, GNU CoreUtils, and shipped in MinGW. Old unices? No clue.
3134 dnl In any case, they are hardly relevant on non-GNU systems.
3136 dnl Beware, here comes some long scary shell commands.
3141 echo " ERROR: `echo "$1" | fold -s -w 62 | sed 's/^/ /' | tr '\n' '#' | cut -b 18- | tr '#' '\n'`" >&$pkg_out_fd
3144 yast_dest="$yast_err"
3150 echo " WARNING: `echo "$1" | fold -s -w 62 | sed 's/^/ /' | tr '\n' '#' | cut -b 18- | tr '#' '\n'`" >&$pkg_out_fd
3153 yast_dest="$yast_war"
3159 echo " RECOMMENDED: `echo "$1" | fold -s -w 62 | sed 's/^/ /' | tr '\n' '#' | cut -b 18- | tr '#' '\n'`" >&$pkg_out_fd
3162 yast_dest="$yast_rec"
3165 AC_DEFUN([PKG_SUGGEST],
3167 echo "`echo "$1" | fold -s -w 62 | sed 's/^/ /'`" >&$pkg_out_fd
3170 AC_DEFUN([DEB_INSTALL],
3172 echo " or .deb users: `echo "apt-get install $1" | fold -s -w 48 | sed 's/^/ /' | tr '\n' '#' | cut -b 33- | tr '#' '\n'`" >&$pkg_out_fd
3173 echo -n " $1" >> "$deb_dest"
3176 AC_DEFUN([DEB_ALTERNATIVE],
3178 echo " or maybe : `echo "apt-get install $1" | fold -s -w 48 | sed 's/^/ /' | tr '\n' '#' | cut -b 33- | tr '#' '\n'`" >&$pkg_out_fd
3179 echo -n "/$1" >> "$deb_dest"
3182 AC_DEFUN([RPM_INSTALL],
3184 echo " or .rpm users: `echo "yum install $1" | fold -s -w 48 | sed 's/^/ /' | tr '\n' '#' | cut -b 33- | tr '#' '\n'`" >&$pkg_out_fd
3185 echo -n " $1" >> "$rpm_dest"
3188 AC_DEFUN([RPM_ALTERNATIVE],
3190 echo " or maybe : `echo "yum install $1" | fold -s -w 48 | sed 's/^/ /' | tr '\n' '#' | cut -b 33- | tr '#' '\n'`" >&$pkg_out_fd
3191 echo -n "/$1" >> "$rpm_dest"
3194 AC_DEFUN([YAST_INSTALL],
3196 echo " or yast users: `echo "yast install $1" | fold -s -w 48 | sed 's/^/ /' | tr '\n' '#' | cut -b 33- | tr '#' '\n'`" >&$pkg_out_fd
3197 echo -n " $1" >> "$yast_dest"
3200 AC_DEFUN([YAST_ALTERNATIVE],
3202 echo " or maybe : `echo "yast install $1" | fold -s -w 48 | sed 's/^/ /' | tr '\n' '#' | cut -b 33- | tr '#' '\n'`" >&$pkg_out_fd
3203 echo -n "/$1" >> "$yast_dest"
3206 AC_DEFUN([PKG_ALTERNATIVE],
3208 echo "`echo "$1" | fold -s -w 62 | sed 's/^/ /'`" >&$pkg_out_fd
3211 echo "Configurable options are:"
3213 if test x"${jemalloc}" = x"yes"; then
3214 echo " JEMALLOC Memory management enabled (default)."
3216 echo " JEMALLOC Memory management disabled."
3219 if test x"${pthreads}" = x"yes"; then
3220 echo " POSIX Threads support enabled (default)."
3222 if test x"${build_haiku}" = x"yes"; then
3223 echo " POSIX Thread support built into C library."
3225 echo " POSIX Thread support disabled."
3229 if test x"${npapi}" = x"yes"; then
3230 echo " NPAPI plugin enabled (default). Use --disable-npapi to disable."
3231 echo " NPAPI plugin will be installed in ${FIREFOX_PLUGINS}"
3233 echo " NPAPI plugin disabled."
3236 if test x"${build_kparts3}" = x"yes"; then
3237 echo " KPARTS 3.x plugin enabled (default). Use --disable-kparts3 to disable"
3238 echo " KPARTS 3.x plugin will be installed in ${KDE3_PLUGINDIR}"
3239 echo " KPARTS 3.x service will be installed in ${KDE3_SERVICESDIR}"
3240 echo " KPARTS 3.x config dir will be in ${KDE3_CONFIGDIR}"
3241 echo " KPARTS 3.x appsdata will be installed in ${KDE3_APPSDATADIR}"
3243 echo " KPARTS 3.x plugin disabled."
3246 if test x"${build_kparts4}" = x"yes"; then
3247 echo " KPARTS 4.x plugin enabled (default). Use --disable-kparts4 to disable"
3248 echo " KPARTS 4.x plugin will be installed in ${KDE4_PLUGINDIR}"
3249 echo " KPARTS 4.x service will be installed in ${KDE4_SERVICESDIR}"
3250 echo " KPARTS 4.x config dir will be in ${KDE4_CONFIGDIR}"
3251 echo " KPARTS 4.x appsdata will be installed in ${KDE4_APPSDATADIR}"
3253 echo " KPARTS 4.x plugin disabled."
3256 # set a variable if we shouldn't continue. This way we can print
3257 # out everything that is missing in one pass, hopefully making it
3258 # easy for new developers to get everything they need installed.
3261 echo "Configured paths for ${build} are:"
3263 if test x"${jemalloc}" = x"yes"; then
3264 if test x"${has_jemalloc}" = xyes; then
3265 echo " JEMALLOC flags are: ${JEMALLOC_CFLAGS}"
3266 echo " JEMALLOC libs are: ${JEMALLOC_LIBS}"
3268 PKG_ERR([No jemalloc development package installed!])
3269 PKG_SUGGEST([Install a jemalloc development environment from
3270 http://www.canonware.com/jemalloc/])
3271 DEB_INSTALL([libjemalloc-dev])
3272 RPM_INSTALL([jemalloc-devel])
3273 PKG_ALTERNATIVE([or specify --disable-jemalloc])
3277 dnl Dump QT3 options is the user specified a QTOPIA3 or KDE3 GUI
3278 if test x"${build_kde3}" = xyes -o x"${build_qtopia3}" = xyes; then
3279 if test x"${has_qt3}" = xyes; then
3280 echo " QT3 flags are: ${QT3_CFLAGS}"
3281 echo " QT3 libs are: ${QT3_LIBS}"
3283 PKG_ERR([No QT 3.x development package installed!])
3284 PKG_SUGGEST([Install a QT 3.x development environment from http://qt.nokia.com/])
3285 DEB_INSTALL([libqt3-mt-dev])
3286 RPM_INSTALL([qt3-devel])
3287 RPM_ALTERNATIVE([qt-devel])
3288 PKG_ALTERNATIVE([or change to a different gui with --enable-gui=...])
3292 dnl Dump QT4 options is the user specified a QTOPIA4 or Qt4 GUI
3293 if test x"${build_qt4}" = xyes -o x"${build_qtopia4}" = xyes; then
3294 if test x"${has_qt4}" = xyes; then
3295 echo " QT4 flags are: ${QT4_CFLAGS}"
3296 echo " QT4 libs are: ${QT4_LIBS}"
3298 PKG_ERR([No QT 4.x development package installed!])
3299 PKG_SUGGEST([Install a QT 4.x development environment from http://qt.nokia.com/])
3300 DEB_INSTALL([libqt4-dev])
3301 DEB_ALTERNATIVE([qt4-dev-tools]) dnl TODO: Is this required?
3302 RPM_INSTALL([qt4-devel])
3303 RPM_ALTERNATIVE([qt-devel])
3304 PKG_ALTERNATIVE([or change to a different gui with --enable-gui=...])
3308 if test x"${build_kparts4}" = xyes; then
3309 if test x"${has_kde4}" = xyes; then
3310 echo " KDE4 flags are: ${KDE4_CFLAGS}"
3311 echo " KDE4 libs are: ${KDE4_LIBS}"
3313 PKG_WAR([kparts4 plugin is disabled!])
3314 PKG_SUGGEST([Install version 4.x of the KDE development environment from http://kde.org])
3315 DEB_INSTALL([kdelibs5-dev])
3316 RPM_INSTALL([kdelibs-devel])
3320 if test x"$build_qtopia3" = xyes; then
3321 if test x"${QTOPIA3_LIBS}" != x ; then
3322 if test x"${QTOPIA3_CFLAGS}" != x ; then
3323 echo " QTOPIA 3.x flags are: $QTOPIA3_CFLAGS"
3325 echo " QTOPIA 3.x flags are: default include path"
3327 echo " QTOPIA 3.x libs are: $QTOPIA3_LIBS"
3329 PKG_ERR([No QTOPIA 3.x library development package installed!])
3330 PKG_SUGGEST([Install it from http://trolltech.com/downloads/ as binary packages are not available.]) dnl TODO: This link is no longer valid.
3334 if test x"$build_qtopia4" = xyes; then
3335 if test x"${QTOPIA4_LIBS}" != x ; then
3336 if test x"${QTOPIA4_CFLAGS}" != x ; then
3337 echo " QTOPIA 4.x flags are: $QTOPIA4_CFLAGS"
3339 echo " QTOPIA 4.x flags are: default include path"
3341 echo " QTOPIA 4.x libs are: $QTOPIA4_LIBS"
3343 PKG_ERR([No QTOPIA 4.x library development package installed!])
3344 PKG_SUGGEST([Install it from http://trolltech.com/downloads/ as binary packages are not available.]) dnl TODO: This link is no longer valid.
3349 # -o x$build_kparts3 = xyes
3350 if test x$build_kde3 = xyes; then
3351 if test x"$has_kde3" = xyes; then
3352 echo " KDE 3.x flags are: $KDE3_CFLAGS"
3353 echo " KDE 3.x libs are: $KDE3_LIBS"
3355 PKG_ERR([No KDE 3.x development package installed!])
3356 PKG_SUGGEST([Install version 3.x of the KDE development environment from http://kde.org])
3357 DEB_INSTALL([kdelibs4-dev])
3358 RPM_INSTALL([kdelibs3-devel])
3359 PKG_ALTERNATIVE([or disable the KDE 3.x gui, and reconfiguring using --enable-gui=<list-of-guis> and omitting kde from the list or avoiding --enable-gui=... as a whole.])
3363 if test x"${JPEG_LIBS}" != x ; then
3364 if test x"${JPEG_CFLAGS}" != x ; then
3365 echo " JPEG flags are: $JPEG_CFLAGS"
3367 echo " JPEG flags are: default include path"
3369 echo " JPEG libs are: $JPEG_LIBS"
3371 PKG_ERR([No JPEG library development package installed!])
3372 PKG_SUGGEST([Install it from http://ijg.org])
3373 DEB_INSTALL([libjpeg-dev])
3374 RPM_INSTALL([libjpeg-devel])
3377 if test x"${GIF_LIBS}" != x ; then
3378 if test x"${GIF_CFLAGS}" != x ; then
3379 echo " GIF flags are: $GIF_CFLAGS"
3381 echo " GIF flags are: default include path"
3383 echo " GIF libs are: $GIF_LIBS"
3385 PKG_ERR([No GIF library development package installed!])
3386 PKG_SUGGEST([Install it from http://sourceforge.net/projects/giflib/])
3387 DEB_INSTALL([libungif-dev])
3388 DEB_ALTERNATIVE([libgif-dev])
3389 RPM_INSTALL([libgif-devel])
3390 RPM_ALTERNATIVE([giflib-devel])
3391 RPM_ALTERNATIVE([libungif-devel])
3394 if test x"${PNG_LIBS}" != x ; then
3395 if test x"${PNG_CFLAGS}" != x ; then
3396 echo " PNG flags are: $PNG_CFLAGS"
3398 echo " PNG flags are: default include path"
3400 echo " PNG libs are: $PNG_LIBS"
3402 PKG_REC([No PNG library development package installed!])
3403 PKG_SUGGEST([Gnash will be built without support for dynamic loading of PNG files.])
3404 PKG_SUGGEST([Install it from http://www.libpng.org])
3405 DEB_INSTALL([libpng12-dev])
3406 RPM_INSTALL([libpng-devel])
3409 if test x"${build_ovg}" = x"yes"; then
3410 if test x"${has_openvg}" = xyes; then
3411 echo " OpenVG flags are: $OPENVG_CFLAGS"
3412 echo " OpenVG libs are: $OPENVG_LIBS"
3414 echo " ERROR: No OpenVG development package installed!" >&3
3415 echo " You need to install the libmesa development package" >&3
3416 echo " or .deb users: apt-get install libopenvg1-mesa-dev" >&3
3417 echo " or .rpm users: yum install mesa-libOpenVG-devel-7.8.1-7.fc13.i686" >&3
3418 echo " or use a different renderer with --enable-renderer=" >&3
3422 if test x"${build_ogl}" = x"yes"; then
3423 if test x"$OPENGL_LIBS" != x; then
3424 if test x"$OPENGL_CFLAGS" != x; then
3425 echo " OpenGL flags are: $OPENGL_CFLAGS"
3427 echo " OpenGL flags are: default include path"
3429 echo " OpenGL libs are: $OPENGL_LIBS"
3431 PKG_ERR([No OpenGL development package installed!])
3432 PKG_SUGGEST([You need to install the libmesa development package])
3433 DEB_INSTALL([libgl1-mesa-dev])
3434 RPM_INSTALL([mesa-libGL-devel])
3435 RPM_ALTERNATIVE([xorg-x11-Mesa-libGL])
3436 PKG_ALTERNATIVE([or use a different renderer with --enable-renderer=])
3440 if test x"${build_gles1}" = x"yes"; then
3441 if test x"${has_gles1}" = xyes; then
3442 if test x"${GLES1_CFLAGS}" != x; then
3443 echo " OpenGLES1 flags are: ${GLES1_CFLAGS}"
3445 echo " OpenGLES1 flags are: default include path"
3447 echo " OpenGLES1 libs are: ${GLES1_LIBS}"
3449 PKG_ERR([No OpenGL-ES development package installed!])
3450 PKG_SUGGEST([You need to install the this from source probably])
3451 PKG_ALTERNATIVE([or use a different renderer with --enable-renderer=])
3455 dnl GLEXT is only needed for GTK/OpenGL
3456 if test x$build_gtk = xyes -a x$build_ogl = xyes ; then
3457 if test x"$GLEXT_LIBS" != x; then
3458 if test x"$GLEXT_CFLAGS" != x; then
3459 echo " GtkGLExt flags are: $GLEXT_CFLAGS"
3461 echo " GtkGLExt flags are: default include path"
3463 echo " GtkGLExt libs are: $GLEXT_LIBS"
3465 PKG_ERR([No GtkGLExt development package installed!])
3466 PKG_SUGGEST([It is needed to build the GTK/OpenGL GUI/renderer combination.])
3467 PKG_SUGGEST([Install it from http://gtkglext.sourceforge.net])
3468 DEB_INSTALL([libgtkglext1-dev])
3469 RPM_INSTALL([gtkglext-devel])
3470 PKG_ALTERNATIVE([or --enable-gui=sdl or --enable-renderer=agg])
3474 if test x$build_gtk = xyes; then #{
3475 if test x"$GTK2_LIBS" != x; then
3476 if test x"$GTK2_CFLAGS" != x; then
3477 echo " GTK2 flags are: $GTK2_CFLAGS"
3479 echo " GTK2 flags are: default include path"
3481 echo " GTK2 libs are: $GTK2_LIBS"
3483 PKG_ERR([No GTK2 development package installed!])
3484 PKG_SUGGEST([Install it from http://gtk.org])
3485 DEB_INSTALL([libgtk2.0-dev])
3486 RPM_INSTALL([gtk2-devel])
3489 if test x"$PANGO_LIBS" != x; then
3490 if test x"$PANGO_CFLAGS" != x; then
3491 echo " Pango flags are: $PANGO_CFLAGS"
3493 echo " Pango flags are: default include path"
3495 echo " Pango libs are: $PANGO_LIBS"
3497 PKG_ERR([No Pango development package installed!])
3498 PKG_SUGGEST([Install it from http://pango.org])
3499 DEB_INSTALL([libpango1.0-dev])
3500 RPM_INSTALL([pango-devel])
3503 if test x"$GLIB_LIBS" != x; then
3504 if test x"$GLIB_CFLAGS" != x; then
3505 echo " GLib flags are: $GLIB_CFLAGS"
3507 echo " GLib flags are: default include path"
3509 echo " GLib libs are: $GLIB_LIBS"
3511 PKG_ERR([No GLib development package installed!])
3512 PKG_SUGGEST([Install it from http://gtk.org])
3513 DEB_INSTALL([libglib2.0-dev])
3514 RPM_INSTALL([glib2-devel])
3517 if test x"$ATK_LIBS" != x; then
3518 if test x"$ATK_CFLAGS" != x; then
3519 echo " ATK flags are: $ATK_CFLAGS"
3521 echo " ATK flags are: default include path"
3523 echo " ATK libs are: $ATK_LIBS"
3525 PKG_ERR([No ATK development package installed!])
3526 PKG_SUGGEST([Install it from http://atk.org])
3527 DEB_INSTALL([libatk1.0-dev])
3528 RPM_INSTALL([atk-devel])
3533 if test x"$build_media_gst" = x"yes"; then
3534 if test x"$missing_codecs" != x; then
3535 echo " Your Gstreamer installation is missing these codecs: $missing_codecs"
3536 echo " Please install the gstreamer-ffmpeg for Gstreamer"
3538 if test x"$GSTREAMER_LIBS" != x; then
3539 if test x"$GSTREAMER_CFLAGS" != x; then
3540 echo " Gstreamer flags are: $GSTREAMER_CFLAGS"
3542 echo " Gstreamer flags are: default include path"
3544 echo " Gstreamer libs are: $GSTREAMER_LIBS"
3546 PKG_ERR([GST media handling requested but gstreamer-0.10+ not found])
3547 PKG_SUGGEST([Install it from http://www.gstreamer.net])
3548 DEB_INSTALL([libgstreamer0.10-dev])
3549 RPM_INSTALL([gstreamer-devel])
3550 YAST_INSTALL([gstreamer010-devel])
3552 if test x"$has_gstreamer_pbutils" != "xyes"; then
3553 PKG_REC([If the user has not installed the necessary Gstreamer plugins, Gstreamer can pop up a message prompting them to.])
3554 PKG_SUGGEST([Install gstpbutils (>= 0.10.15) from http://www.gstreamer.net for that to be enabled])
3555 DEB_INSTALL([libgstreamer-plugins-base0.10-dev])
3556 PKG_SUGGEST([or .rpm users: simply install the below package]) dnl TODO: Can/should this notice be done cleaner?
3557 PKG_SUGGEST([Also see --with-gstpbutils-incl and --with-gstpbutils-lib])
3559 if test x"$has_gstreamer_plugins_base" = "xno"; then
3560 dnl TODO: Check if this is really a mandatory asset!
3561 PKG_ERR([Base plugins are required for gstreamer media!])
3562 PKG_SUGGEST([Install gstreamer-plugins-base from http://www.gstreamer.net])
3563 DEB_INSTALL([libgstreamer-plugins-base0.10-dev])
3564 RPM_INSTALL([gstreamer-plugins-base-devel])
3568 dnl TODO: figure out some RPM package names.
3569 dnl TODO: The following tests is probably incorrect for any/older/exotic systems! Could someone experienced look at it?
3570 if test x"${build_media_ffmpeg}" = x"yes"; then
3571 if test x"$FFMPEG_LIBS" != x; then
3572 echo " MP3 and video support enabled through FFmpeg"
3573 if test x"$FFMPEG_CFLAGS" != x; then
3574 echo " FFmpeg flags are: $FFMPEG_CFLAGS"
3576 echo " FFmpeg flags are: default include path"
3578 echo " FFmpeg libs are: $FFMPEG_LIBS"
3580 PKG_ERR([No FFmpeg development package installed!])
3581 PKG_SUGGEST([You can install FFmpeg from http://ffmpeg.org])
3582 DEB_INSTALL([libavcodec-dev])
3583 RPM_INSTALL([ffmpeg-devel])
3584 PKG_ALTERNATIVE(or reconfigure with --enable-media=gst)
3587 if test x"${avformat_h}" = x; then
3588 PKG_ERR([FFmpeg's avformat header is installed but not libavformat!])
3589 PKG_SUGGEST([You can install FFmpeg from http://ffmpeg.org])
3590 DEB_INSTALL([libavformat-dev])
3591 YAST_INSTALL([libavformat-api]) dnl (but currently installs into /usr/lib64)
3592 PKG_ALTERNATIVE(or explicitly set the path using --with-ffmpeg-incl=)
3593 PKG_ALTERNATIVE(or reconfigure with --enable-media=gst)
3596 if test x"${have_ffmpeg_swscale}" = "xno"; then
3597 PKG_ERR([No libswscale development package installed!])
3598 PKG_SUGGEST([You can install libswscale from http://ffmpeg.org])
3599 DEB_INSTALL([libswscale-dev])
3600 PKG_ALTERNATIVE(or reconfigure with --enable-media=gst)
3603 if test x"${have_ffmpeg_libavutil}" = "xno"; then
3604 PKG_ERR([No libavutil development package installed!])
3605 PKG_SUGGEST([You can install libavutil from http://ffmpeg.org])
3606 DEB_INSTALL([libavutil-dev])
3607 PKG_ALTERNATIVE(or reconfigure with --enable-media=gst)
3610 if test x"${ffmpeg_aac_float_planar}" = "xyes" -a \
3611 x"${have_ffmpeg_swresample}" = "xno" -a \
3612 x"${have_libav_avresample}" = "xno"; then
3613 PKG_REC([Please install libswresample/libavresample development package. If you don't, Gnash will be unable to resample some formats (e.g. AAC on youtube)])
3614 PKG_SUGGEST([You can install libavresample from http://libav.org])
3615 PKG_SUGGEST([You can install libswresample from http://ffmpeg.org])
3616 DEB_INSTALL([libavresample-dev])
3617 PKG_ALTERNATIVE(or reconfigure with --enable-media=gst)
3621 if test x$build_cairo = xyes; then
3622 if test x"$CAIRO_LIBS" != x; then
3623 if test x"$CAIRO_CFLAGS" != x; then
3624 echo " Cairo flags are: $CAIRO_CFLAGS"
3626 echo " Cairo flags are: default include path"
3628 echo " Cairo libs are: $CAIRO_LIBS"
3630 PKG_ERR([No Cairo development package installed!])
3631 PKG_SUGGEST([You need to have the Cairo development package installed if you have used --enable-render=cairo to configure.])
3632 PKG_SUGGEST([Install it from http://cairographics.org])
3633 DEB_INSTALL([libcairo-dev])
3634 RPM_INSTALL([cairo-devel])
3638 if test x$build_fltk = xyes; then
3639 if test x"$FLTK2_LIBS" != x; then
3640 if test x"$FLTK2_CFLAGS" != x; then
3641 echo " FLTK flags are: $FLTK2_CFLAGS"
3643 echo " FLTK flags are: default include path"
3645 echo " FLTK libs are: $FLTK2_LIBS"
3647 PKG_ERR([No FLTK2 development package installed!])
3648 PKG_SUGGEST([Install it from http://fltk.org])
3649 PKG_ALTERNATIVE(or change to a different gui with --enable-gui=...)
3653 if test x$build_fltk = xyes; then
3654 if test x"$XFT_LIBS" != x; then
3655 if test x"$XFT_CFLAGS" != x; then
3656 echo " Xft flags are: $XFT_CFLAGS"
3658 echo " Xft flags are: default include path"
3660 echo " Xft libs are: $XFT_LIBS"
3664 # See whether SDL is required
3666 test x$build_sdl = xyes && need_sdl=true
3667 test x$build_sound_sdl = xyes && need_sdl=true
3670 if test x"$SDL_LIBS" != x; then
3671 echo " SDL flags are: $SDL_CFLAGS"
3672 echo " SDL libs are: $SDL_LIBS"
3674 PKG_ERR([No SDL development package installed!])
3675 PKG_SUGGEST([Install it from http://www.libsdl.org/download-1.2.php])
3676 DEB_INSTALL([libsdl1.2-dev])
3677 RPM_INSTALL([SDL-devel])
3678 PKG_ALTERNATIVE(or change to a different gui with --enable-gui=...)
3683 if test x"$nsapi" = x"yes"; then
3684 echo " Plugin will be installed in ${FIREFOX_PLUGINS}"
3687 if test x"${pthreads}" = x"yes"; then
3688 if test x"$PTHREAD_CFLAGS" != x; then
3689 echo " POSIX Threads flags are: $PTHREAD_CFLAGS"
3691 if test x"${PTHREAD_LIBS}" != x; then
3692 echo " POSIX Threads lib is: $PTHREAD_LIBS"
3694 if test x"${cross_compiling}" = xno; then
3695 echo "ERROR: No pthread development package installed!" >&3
3700 if test x"${docbook}" = x"yes"; then
3701 if test x"$MAKEINFO" = x; then
3702 PKG_ERR([No makeinfo tools installed!])
3703 PKG_SUGGEST([Install it from http://www.gnu.org/software/texinfo/])
3704 DEB_INSTALL([texinfo])
3705 RPM_INSTALL([texinfo])
3706 RPM_ALTERNATIVE([texinfo-tex])
3709 if test x"$DB2X_TEXIXML" = x -o x"$DB2X_MANXML" = x -o x"$DB2X_XSLTPROC" = x; then
3710 dnl high-level tools
3711 if test x"${DB2X_TEXI}" = x -o x"${DB2X_MAN}" = x; then
3712 PKG_ERR([No DocBook2X tools installed!])
3713 PKG_SUGGEST([Install it from http://docbook2x.sourceforge.net])
3714 dnl TODO: Could someone look at this and confirm the needed software is installed?
3715 dnl FIXME: I removed the texidocbook and docbook-utilsnfo packages as they are not on my system.
3716 DEB_INSTALL([docbook2x docbook-xml docbook-xsl texinfo xsltproc])
3717 PKG_ALTERNATIVE([or configure without --enable-docbook])
3720 echo " You have version $db2x_version of the DocBook2X tools."
3723 PKG_WAR([without --enable-docbook we will use the cached documentation files included in the gnash distribution. If you change files in doc/C, you should --enable-docbook.])
3726 if test x"$CURL_LIBS" != x; then
3727 if test x"$CURL_CFLAGS" != x; then
3728 echo " CURL flags are: $CURL_CFLAGS"
3730 echo " CURL flags are: default include path"
3732 echo " CURL libs are: $CURL_LIBS"
3733 if test -z "$curl_rtmp_support"; then
3734 PKG_REC([CURL library present but built without RTMP protocol support.])
3735 PKG_SUGGEST([If you install it with RTMP protocol support, Gnash will be able to play RTMP streaming.])
3738 PKG_REC([If you install the CURL library, Gnash will be able to display remote content (streaming from URLs) using CURL.])
3739 PKG_SUGGEST([Install libcurl from http://curl.haxx.se/libcurl])
3740 DEB_INSTALL([libcurl4-gnutls-dev]) dnl TODO: Do we prefer this one? GnuTLS is LGPL'd so it's probably more licensively compatible than OpenSSL?
3741 DEB_ALTERNATIVE([libcurl-dev])
3742 RPM_INSTALL([curl-devel])
3745 if test x"$SPEEX_LIBS" != x; then
3746 if test x"$SPEEX_CFLAGS" != x; then
3747 echo " Speex flags are: $SPEEX_CFLAGS"
3749 echo " Speex flags are: default include path"
3751 echo " Speex libs are: $SPEEX_LIBS"
3753 PKG_REC([If you install the Speex library, Gnash will be able to decoded Speex encoded audio in FLV files.])
3754 PKG_SUGGEST([Install libspeex from http://speex.org])
3755 DEB_INSTALL([libspeex-dev])
3756 RPM_INSTALL([speex-devel])
3759 if test x"$SPEEXDSP_LIBS" != x; then
3760 if test x"$SPEEXDSP_CFLAGS" != x; then
3761 echo " Speex DSP flags are: $SPEEXDSP_CFLAGS"
3763 echo " Speex DSP flags are: default include path"
3765 echo " Speex DSP libs are: $SPEEXDSP_LIBS"
3767 PKG_REC([If you install the Speex DSP library, Gnash will be able to resample Speex encoded audio in FLV files.])
3768 PKG_SUGGEST([Install libspeexdsp from http://speex.org])
3769 DEB_INSTALL([libspeexdsp-dev])
3770 RPM_INSTALL([speexdsp-devel])
3773 if test x"$ext_dbus" = xyes; then
3774 if test x"$DBUS_LIBS" != x; then
3775 if test x"$DBUS_CFLAGS" != x; then
3776 echo " DBUS flags are: $DBUS_CFLAGS"
3778 echo " DBUS flags are: default include path"
3780 echo " DBUS libs are: $DBUS_LIBS"
3782 PKG_WAR([No DBUS development package was found! Gnash will be built without support for remote controls.])
3783 PKG_SUGGEST([Install libdbus from http://www.dbus.org])
3784 DEB_INSTALL([dbus-dev])
3785 DEB_ALTERNATIVE([libdbus-1-dev])
3786 RPM_INSTALL([dbus-devel])
3790 if test x$build_agg = xyes; then # {
3791 echo " AGG Pixel format is: $pixelformat"
3792 if test x"$AGG_LIBS" != x -a x"${agg25}" == xyes; then # {
3793 if test x"$AGG_CFLAGS" != x; then # {
3794 echo " AGG flags are: $AGG_CFLAGS"
3796 echo " AGG flags are: default include path"
3798 echo " AGG libs are: $AGG_LIBS"
3800 if test x"$AGG_LIBS" != x -a x"${agg25}" != xyes; then
3801 PKG_ERR([Your installation of AGG appears to be version 2.4 or older. Please upgrade to AGG 2.5 or greater.])
3803 PKG_ERR([No AGG development package installed!])
3805 PKG_SUGGEST([Install it from http://www.antigrain.com])
3806 DEB_INSTALL([libagg-dev])
3807 RPM_INSTALL([agg-devel])
3811 dnl TODO: This package is handled a bit stupidly in regard to the package
3812 dnl suggestion system. It would be better to check for each package
3813 dnl separately, instead of passing the missing ones in variables..
3814 if test x"$BOOST_LIBS" != x; then
3815 echo " BOOST flags are: $BOOST_CFLAGS"
3816 echo " BOOST libs are: $BOOST_LIBS"
3817 echo " BOOST libs for cygnal are: $BOOST_CYGNAL_LIBS"
3819 if test x"${missing_headers}" != x; then
3820 for i in ${missing_headers}; do
3821 PKG_ERR([The Boost $i header is not installed])
3822 PKG_SUGGEST([Install it from http://www.boost.org])
3826 if test x"${cygnal}" = x"yes"; then
3827 if test x"${missing_cygnal_libs}" != x; then
3828 for i in ${missing_cygnal_libs}; do
3829 PKG_ERR([No Boost $i package installed])
3830 PKG_SUGGEST([Install it from http://www.boost.org])
3831 debtmppkg="libboost-`echo ${i} | sed 's/_/-/g'`-dev"
3832 DEB_INSTALL([$debtmppkg])
3833 PKG_ALTERNATIVE([or configure with --disable-cygnal])
3838 if test x"${npapi}" = x"yes"; then
3839 if test x"${missing_plugin_libs}" != x; then
3840 for i in ${missing_plugin_libs}; do
3841 PKG_ERR([No Boost $i package installed])
3842 PKG_SUGGEST([Install it from http://www.boost.org])
3843 debtmppkg="libboost-`echo ${i} | sed 's/_/-/g'`-dev"
3844 DEB_INSTALL([$debtmppkg])
3845 PKG_ALTERNATIVE([or configure with --disable-npapi])
3850 if test x"${missing_libs}" != x; then
3851 for i in ${missing_libs}; do
3852 PKG_ERR([No Boost $i package installed])
3853 PKG_SUGGEST([Install it from http://www.boost.org])
3854 debtmppkg="libboost-`echo ${i} | sed 's/_/-/g'`-dev"
3855 DEB_INSTALL([$debtmppkg])
3859 PKG_ERR([No Boost development package installed])
3860 PKG_SUGGEST([Install it from http://www.boost.org])
3861 dnl I am not sure that libboost-program-options-dev should be passed here, but
3862 dnl it seems like the cleanest way to get it.
3863 if test x"$cygnal" = xyes; then
3864 DEB_INSTALL([libboost-dev libboost-thread-dev libboost-program-options-dev libboost-date-time-dev])
3866 DEB_INSTALL([libboost-dev libboost-thread-dev libboost-program-options-dev])
3868 RPM_INSTALL([boost-devel])
3871 dnl don't look for the flash compilers when cross compiling.
3872 if test x"$testsuite" = x"yes"; then
3873 if test x$cross_compiling = xno; then
3874 if test x"$MING_LIBS" != x; then
3875 echo " MING flags are $MING_CFLAGS"
3876 echo " MING libs are $MING_LIBS"
3878 PKG_WAR([You need to have the Ming development package installed to run most of the tests in Gnash testsuite.])
3879 PKG_SUGGEST([Install it from http://www.libming.org/])
3880 DEB_INSTALL([libming-dev])
3881 RPM_INSTALL([libming-devel])
3884 if test x"$MAKESWF" != x; then
3885 echo " MING version code is $MING_VERSION_CODE"
3886 echo " MAKESWF is $MAKESWF"
3888 PKG_WAR([You need to have the Ming utilities package version 0.4 or higher installed to run many of the tests in Gnash testsuite.])
3889 PKG_SUGGEST([Install it from http://www.libming.org/])
3890 DEB_INSTALL([libming-util])
3891 RPM_INSTALL([ming-util])
3892 RPM_ALTERNATIVE([ming-utils])
3895 if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 40006; then
3896 echo " WARNING: You have an older version of Ming installed and will not" >&4
3897 echo " be able to run all of the tests in Gnash testsuite." >&4
3898 echo " Install the latest version from http://www.libming.org" >&4
3901 if test x"$SWFDEC_TESTSUITE" != x; then
3902 echo " SWFDEC testsuite dir is $SWFDEC_TESTSUITE"
3905 if test x"$MTASC" != x; then
3906 echo " MTASC is $MTASC"
3907 echo " MTASC CLASSPATH is $MTASC_CLASSPATH"
3909 PKG_WAR([You need to have the MTASC compiler packages installed to run some of the tests in Gnash testsuite.])
3910 PKG_SUGGEST([Install it from http://mtasc.org])
3911 DEB_INSTALL([mtasc])
3912 RPM_INSTALL([mtasc])
3915 if test x"$HAXE" != x; then
3916 echo " HAXE is $HAXE"
3917 echo " HAXE CLASSPATH is $HAXE_CLASSPATH"
3919 PKG_WAR([You need to have the HAXE compiler package version 2.00 or higher installed to run some of the tests in Gnash testsuite.])
3920 PKG_SUGGEST([Install it from http://haxe.org])
3925 if test x"$SWFMILL" != x; then
3926 echo " SWFMILL is $SWFMILL"
3927 if test x"$ENABLE_AVM2" != x -a "$SWFMILL_VERSION" -lt 00021206; then
3928 PKG_WAR([You are building Gnash with AVM2 support but your swfmill version is too old to run AS3 tests.])
3931 PKG_WAR([You need to have the swfmill tool installed to run some of the tests in Gnash testsuite.])
3932 PKG_SUGGEST([Install it from http://swfmill.org])
3933 DEB_INSTALL([swfmill])
3934 RPM_INSTALL([swfmill])
3937 if test x"$SWFC" != x; then
3938 echo " SWFC is $SWFC"
3940 PKG_WAR([You need to have swfc from SWFTools installed to run some of the tests in Gnash testsuite.])
3941 PKG_SUGGEST([Install it from http://swftools.org])
3942 DEB_INSTALL([swftools])
3943 RPM_INSTALL([swftools])
3946 if test x"$AS3COMPILE" != x; then
3947 echo " AS3COMPILE is $AS3COMPILE"
3949 PKG_WAR([You need to have as3compile from SWFTools installed to run some of the tests in Gnash testsuite.])
3950 PKG_SUGGEST([Install it from http://swftools.org])
3953 if test x"$HTTP_TESTSUITE" != x; then
3954 echo " HTTP testsuite dir is $HTTP_TESTSUITE"
3957 if test x"$RED5_TESTING" != x; then
3958 echo " RED5 testing host is $RED5_HOST"
3963 if test x"$PERL" != x; then
3964 echo " PERL is $PERL"
3966 PKG_WAR([You need to have perl installed to run some of the tests in Gnash testsuite.])
3967 PKG_SUGGEST([Install it from http://perl.org])
3972 if test x"$testsuite" = x"yes"; then
3973 if test x"$CSOUND" != x; then
3974 echo " CSOUND is $CSOUND"
3976 PKG_WAR([You need to have csound installed to (re)generate some sound-related test files in Gnash testsuite.])
3977 PKG_SUGGEST([Install it from http://www.csounds.com/])
3978 DEB_INSTALL([csound])
3979 RPM_INSTALL([csound])
3983 if test x"$Z_LIBS" != x; then
3984 if test x"$Z_CFLAGS" != x; then
3985 echo " Z flags are: $Z_CFLAGS"
3987 echo " Z flags are: default include path"
3989 echo " Z libs are: $Z_LIBS"
3991 PKG_REC([You need to have the zlib development packages installed to play compressed SWF (most of them from version 6 up) and to display some kinds of JPEG files.])
3992 PKG_SUGGEST([Install it from http://zlib.net])
3993 DEB_INSTALL([zlib1g-dev])
3994 RPM_INSTALL([zlib-devel])
3995 PKG_ALTERNATIVE([It may still be possible to configure without zlib.])
3998 if test x"$FREETYPE2_LIBS" != x; then
3999 if test x"$FREETYPE2_CFLAGS" != x; then
4000 echo " FreeType flags are: $FREETYPE2_CFLAGS"
4002 echo " FreeType flags are: default include path"
4004 echo " FreeType libs are: $FREETYPE2_LIBS"
4006 PKG_REC([You need to have the freetype development packages installed to use device fonts.])
4007 PKG_SUGGEST([Install it from http://freetype.org])
4008 DEB_INSTALL([libfreetype6-dev])
4009 RPM_INSTALL([freetype-devel])
4010 PKG_ALTERNATIVE([It may still be possible to configure without freetype.])
4013 if test x"$FONTCONFIG_LIBS" != x; then
4014 if test x"$FONTCONFIG_CFLAGS" != x; then
4015 echo " Fontconfig flags are: $FONTCONFIG_CFLAGS"
4017 echo " Fontconfig flags are: default include path"
4019 echo " Fontconfig libs are: $FONTCONFIG_LIBS"
4021 PKG_REC([You need to have the fontconfig development packages installed to use device fonts.])
4022 PKG_SUGGEST([Install it from http://fontconfig.org])
4023 DEB_INSTALL([libfontconfig1-dev])
4024 RPM_INSTALL([fontconfig-devel])
4025 PKG_ALTERNATIVE([It may still be possible to configure without fontconfig.])
4028 if test x$ext_mysql = xyes; then
4029 if test x$mysql != xno; then
4030 if test x"$MYSQL_LIBS" != x; then
4031 echo " MYSQL flags are: $MYSQL_CFLAGS"
4032 echo " MYSQL libs are: $MYSQL_LIBS"
4034 PKG_ERR([No MySQL development package is installed.])
4035 PKG_SUGGEST([Install it from http://mysql.org])
4036 DEB_INSTALL([libmysqlclient-dev])
4037 RPM_INSTALL([mysql-devel])
4038 PKG_ALTERNATIVE([or reconfigure without --enable-extensions=mysql])
4043 if test "$GMSGFMT" = ":"; then
4044 PKG_WAR([You need the gettext package installed to use translations. Required for building a package or 'make distcheck'])
4045 PKG_SUGGEST([Install it from http://www.gnu.org/software/gettext/])
4046 DEB_INSTALL([gettext])
4047 RPM_INSTALL([gettext])
4050 if test x"${build_vaapi}" = x"yes"; then
4051 if test x"${LIBVA_CFLAGS}" = xyes; then
4052 echo " LIBVA flags are: default"
4054 echo " LIBVA flags are: $LIBVA_CFLAGS"
4055 echo " LIBVA libraries are: $LIBVA_LIBS"
4057 if test x$use_libva_x11 = xyes; then
4058 if test x"${LIBVA_X11_CFLAGS}" = xyes; then
4059 echo " LIBVA X11 flags are: default"
4061 echo " LIBVA X11 flags are: $LIBVA_X11_CFLAGS"
4062 echo " LIBVA X11 libraries are: $LIBVA_X11_LIBS"
4065 if test x$use_libva_glx = xyes; then
4066 if test x"${LIBVA_GLX_CFLAGS}" = xyes; then
4067 echo " LIBVA GLXflags are: default"
4069 echo " LIBVA GLX flags are: $LIBVA_GLX_CFLAGS"
4071 echo " LIBVA GLX libraries are: $LIBVA_GLX_LIBS"
4075 if test x"$ac_cv_gcc_visibility" != xyes; then
4076 if test x"$npapi" = xyes; then
4077 PKG_WAR([NPAPI (mozilla) plugin is enabled, but your compiler does not support symbol visibility. This may cause the plugin to malfunction and may result in small children being eaten. You have been warned!])
4081 if test x"$npapi" = xyes; then
4082 if test x"$has_npapi" = xyes; then
4083 echo " NPAPI flags are: $NPAPI_CFLAGS"
4085 PKG_ERR([No xulrunner development package is installed!])
4086 PKG_SUGGEST([Install it from http://releases.mozilla.org/pub/mozilla.org/xulrunner])
4087 DEB_INSTALL([xulrunner-dev])
4088 DEB_ALTERNATIVE([npapi-sdk-dev])
4089 DEB_ALTERNATIVE([firefox-dev]) dnl deprecated, see https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1671032/
4090 RPM_INSTALL([xulrunner-devel])
4091 PKG_ALTERNATIVE([or specify --disable-npapi])
4094 echo " NPAPI plugin is disabled"
4097 if test x"${DEJAGNU}" != x""; then
4098 echo " DEJAGNU's runtest is $DEJAGNU"
4100 PKG_WAR([You need the dejagnu package installed to get a summary after running 'make check'.])
4101 PKG_SUGGEST([Install it from http://www.gnu.org/software/dejagnu/])
4102 DEB_INSTALL([dejagnu])
4103 RPM_INSTALL([dejagnu])
4107 if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o x"${build_media_haiku}" = x"yes"; then
4108 echo " Haiku libs are: $HAIKU_LIBS"
4111 if test x"$has_ltdl" = x"yes";then
4112 echo " LIBLTDL flags are: $LTDL_CFLAGS"
4113 echo " LIBLTDL libs are: $LTDL_LIBS"
4115 if test x"${extensions_support}" != xno; then
4116 PKG_ERR([No libltdl development package is installed, yet --disable-extensions was not specified.])
4117 PKG_SUGGEST([Install it from ftp://ftp.gnu.org/gnu/libtool/])
4118 DEB_INSTALL([libltdl-dev])
4119 RPM_INSTALL([libtool-ltdl-devel])
4123 if test x"$enable_visibility" != xno; then
4124 if test x"${extensions_support}" != xno; then
4125 PKG_ERR([Extensions not supported with ELF visibility activated.])
4126 PKG_SUGGEST([Use --disable-extensions or --disable-visibility.])
4130 if test x"$python" = x"yes"; then
4131 if test x"$has_python" = x"yes"; then
4132 echo " PYTHON flags are: $PYTHON_CFLAGS"
4133 echo " PYTHON libs are: $PYTHON_LIBS"
4134 echo " PYTHON executable is: $PYTHON"
4136 PKG_ERR([No Python development package is installed, but it's enabled.])
4139 if test x${build_ssl} = xyes; then
4140 if test x"${has_ssl}" = xyes; then
4141 if test x"${SSL_CFLAGS}" = xyes; then
4142 echo " SSL flags are: default"
4144 echo " SSL flags are: $SSL_CFLAGS"
4146 echo " SSL libs are: $SSL_LIBS"
4148 PKG_ERR([No SSL development package is installed, but it's enabled."])
4152 if test x${build_ssh} = xyes; then
4153 if test x"${has_ssh}" = xyes; then
4154 if test x"${SSH_CFLAGS}" = xyes; then
4155 echo " SSH flags are: default"
4157 echo " SSH flags are: $SSH_CFLAGS"
4159 echo " SSH libs are: $SSH_LIBS"
4161 PKG_ERR([No SSH development package is installed, but it's enabled."])
4165 if test x"${build_all_as3}" = x"yes"; then
4166 echo " Building the entire ActionScript class libary"
4168 echo " Only building these ActionScript classes into the library:"
4169 echo " ${classlist}"
4172 if test x"$testsuite" = x"yes"; then
4173 if test x"$NETCAT" != x; then
4174 echo " You have netcat installed, which is only used for testing"
4176 echo " Install netcat for networking test support"
4178 if test x"$WGET" != x; then
4179 echo " You have wget installed, which is only used for testing"
4181 echo " Install wget for networking test support"
4185 if test x$cross_compiling = xyes; then
4186 if test x"${android_ndk}" != xno; then
4187 AC_MSG_NOTICE([This build is setup for cross compiling for Android])
4189 AC_MSG_NOTICE([This build is setup for cross compiling])
4195 if test x"${cygnal}" = x"yes"; then
4196 echo " Building Cygnal media server enabled (default). Use --disable-cygnal to disable."
4198 echo " Building Cygnal media server disabled."
4201 if test x"${with_top_level}" != x; then
4202 echo " Top level for cross compiling support files is: $with_top_level"
4205 if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then
4206 echo " WARNING: Pixel format RGB565 selected in combination with the" >&4
4207 echo " GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)." >&4
4210 if test x"${extensions_list}" != x; then
4211 echo " Building extensions: ${extensions_list}"
4214 if test x"${extensions_support}" = xno; then
4215 echo " Extension support disabled."
4218 if test x"${security_list}" != x; then
4219 echo " Enabling security features: ${security_list}"
4222 if test x"${statistics_list}" != x; then
4223 echo " Enabling statistics collecting for: ${statistics_list}"
4226 if test x"${SUPPORTED_GUIS}" = x; then
4227 AC_MSG_ERROR(no supported GUIs found);
4230 echo " GUI toolkits supported: ${SUPPORTED_GUIS}"
4231 echo " Renderers supported: ${renderer_list}"
4232 echo " Hardware Acceleration: ${device_list}"
4233 echo " Media handlers: ${media_list}"
4234 echo " Using ${add_sound} for sound handling"
4236 if test x"$docbook" = x"yes"; then
4237 echo ' DocBook document processing enabled (for "make html" and "make pdf")'
4238 if test x"$docbook_styles" != x; then
4239 echo " Docbook styles sheets in $docbook_styles"
4242 echo " DocBook document processing disabled (default)"
4245 dnl The Framebuffer GUI has several other settings. As it doesn't have X11,
4246 dnl we have to handle input devics ourselves.
4247 if test x"${build_fb}" = xyes; then
4248 echo " Using ${input_events} for Input"
4249 if test x"${fakefb}" != x; then
4250 echo " Using shared memory as a fake framebuffer"
4252 if test x"${offscreen}" = xyes; then
4253 echo " Using offscreen rendering"
4255 if test x"${doublebuf}" = xyes; then
4256 echo " Using double buffering when rendering"
4260 if test -s $cwarn; then
4265 echo "Gnash should still compile even with these warnings."
4266 echo "If it doesn't, report the warnings as a bug."
4271 if test -s $crec; then
4276 echo "Gnash should still compile, but you'll miss important support"
4281 if test -s $cerr; then
4286 deb_err="`cat $deb_err`"
4287 deb_war="`cat $deb_war`"
4288 deb_rec="`cat $deb_rec`"
4289 rpm_err="`cat $rpm_err`"
4290 rpm_war="`cat $rpm_war`"
4291 rpm_rec="`cat $rpm_rec`"
4292 yast_err="`cat $yast_err`"
4293 yast_war="`cat $yast_war`"
4294 yast_rec="`cat $yast_rec`"
4296 if test x"${android}" != xyes; then
4297 # Pipe stderr to /dev/null since Fedora complains when target isn't there.
4298 if test x`which apt-get 2>/dev/null` != x; then
4299 if test x"$deb_err" != x -o x"$deb_war" != x -o x"$deb_rec" != x; then
4300 echo "#!/bin/sh" > deb-attempt-install-dependencies.sh
4301 echo "packages=\"$deb_err $deb_war $deb_rec\"" >> deb-attempt-install-dependencies.sh
4302 echo "PKGCOMMAND=\"apt-get install -y -q\"" >> deb-attempt-install-dependencies.sh
4303 cat ${srcdir}/base-attempter.sh >> deb-attempt-install-dependencies.sh
4304 chmod +x deb-attempt-install-dependencies.sh
4306 echo ".deb users might be able to install most dependencies by executing:"
4307 echo "sudo ./deb-attempt-install-dependencies.sh"
4311 if test x`which yum 2>/dev/null` != x; then
4312 if test x"$rpm_err" != x -o x"$rpm_war" != x -o x"$deb_rec" != x; then
4313 echo "#!/bin/sh" > rpm-attempt-install-dependencies.sh
4314 echo "packages=\"$rpm_err $rpm_war $rpm_rec\"" >> rpm-attempt-install-dependencies.sh
4315 echo "PKGCOMMAND=\"yum install -y \"" >> rpm-attempt-install-dependencies.sh
4316 cat ${srcdir}/base-attempter.sh >> rpm-attempt-install-dependencies.sh
4317 chmod +x rpm-attempt-install-dependencies.sh
4319 echo ".rpm users might be able to install most dependencies by executing:"
4320 echo "sudo ./rpm-attempt-install-dependencies.sh"
4325 dnl TODO: Add support for yast here, which AFAIK is used on OpenSuse.
4327 dnl If anything critical is missing, don't bother to continue
4328 if test -s $cerr; then
4331 AC_MSG_ERROR([Please install required packages])
4338 if test x"$fork" = x"no"; then
4340 AC_MSG_ERROR([Currently only forking the standalone player works!])
4347 # indent-tabs-mode: nil