1dnl 2dnl Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 3dnl Free Software Foundation, Inc. 4dnl 5dnl This program is free software; you can redistribute it and/or modify 6dnl it under the terms of the GNU General Public License as published by 7dnl the Free Software Foundation; either version 3 of the License, or 8dnl (at your option) any later version. 9dnl 10dnl This program is distributed in the hope that it will be useful, 11dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 12dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13dnl GNU General Public License for more details. 14dnl You should have received a copy of the GNU General Public License 15dnl along with this program; if not, write to the Free Software 16dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17dnl 18 19AC_PREREQ(2.59c) 20AC_INIT(gnash, 0.8.11dev) 21AC_CONFIG_SRCDIR([libcore/as_object.h]) 22AC_CONFIG_HEADERS([gnashconfig.h]) 23AC_CONFIG_MACRO_DIR([macros]) 24 25AC_CANONICAL_BUILD 26AC_CANONICAL_HOST 27 28dnl -------------------------------------------------------- 29dnl Figure out development tool stuff 30dnl -------------------------------------------------------- 31 32AC_PROG_CXX 33AX_CXX_COMPILE_STDCXX_11(noext, mandatory) 34AC_PROG_CC 35AM_PROG_CC_C_O 36AC_EXEEXT 37AC_PROG_INSTALL 38 39dnl Set the default values for Flash Version. These are converted into 40dnl various strings to make JavaScript or ActionScript detectors 41dnl recognize Gnash as a SWF Player. 42DEFAULT_FLASH_MAJOR_VERSION="10" 43DEFAULT_FLASH_MINOR_VERSION="1" 44DEFAULT_FLASH_REV_NUMBER="999" 45AC_SUBST(DEFAULT_FLASH_MAJOR_VERSION) 46AC_SUBST(DEFAULT_FLASH_MINOR_VERSION) 47AC_SUBST(DEFAULT_FLASH_REV_NUMBER) 48 49AC_DEFINE_UNQUOTED([DEFAULT_FLASH_MAJOR_VERSION], ["${DEFAULT_FLASH_MAJOR_VERSION}"], [Default Flash major version]) 50AC_DEFINE_UNQUOTED([DEFAULT_FLASH_MINOR_VERSION], ["${DEFAULT_FLASH_MINOR_VERSION}"], [Default Flash minor version]) 51AC_DEFINE_UNQUOTED([DEFAULT_FLASH_REV_NUMBER], ["${DEFAULT_FLASH_REV_NUMBER}"], [Default Flash revision number]) 52 53dnl TODO: use host/build/target -- whatever is more appropriate 54case "${host}" in 55 *-apple-*) 56 DEFAULT_FLASH_PLATFORM_ID="MAC" 57 DEFAULT_FLASH_SYSTEM_OS="MacOS" 58 ;; 59 *-openbsd*) 60 DEFAULT_FLASH_PLATFORM_ID="BSD" 61 DEFAULT_FLASH_SYSTEM_OS="OpenBSD" 62 ;; 63 *-freebsd* | *-kfreebsd*) 64 DEFAULT_FLASH_PLATFORM_ID="BSD" 65 DEFAULT_FLASH_SYSTEM_OS="FreeBSD" 66 ;; 67 *-netbsd*) 68 DEFAULT_FLASH_PLATFORM_ID="BSD" 69 DEFAULT_FLASH_SYSTEM_OS="NetBSD" 70 ;; 71 *-android*) 72 DEFAULT_FLASH_PLATFORM_ID="AND" 73 DEFAULT_FLASH_SYSTEM_OS="Linux" 74 ;; 75 *-linux-gnu) 76 DEFAULT_FLASH_PLATFORM_ID="LNX" 77 DEFAULT_FLASH_SYSTEM_OS="GNU/Linux" 78 ;; 79 *-linux*) 80 DEFAULT_FLASH_PLATFORM_ID="LNX" 81 DEFAULT_FLASH_SYSTEM_OS="Linux" 82 ;; 83 *-cygwin* | *-mingw* | *-pw32*) 84 DEFAULT_FLASH_PLATFORM_ID="WIN" 85 DEFAULT_FLASH_SYSTEM_OS="Windows" 86 ;; 87 *-*solaris*) 88 DEFAULT_FLASH_PLATFORM_ID="SUN" 89 DEFAULT_FLASH_SYSTEM_OS="Solaris" 90 ;; 91 *-os2*) 92 DEFAULT_FLASH_PLATFORM_ID="OS2" 93 DEFAULT_FLASH_SYSTEM_OS="OS/2" 94 ;; 95 *-sco*) 96 DEFAULT_FLASH_PLATFORM_ID="SCO" 97 DEFAULT_FLASH_SYSTEM_OS="SCO/Unix" 98 ;; 99 *-irix*) 100 DEFAULT_FLASH_PLATFORM_ID="IRX" 101 DEFAULT_FLASH_SYSTEM_OS="IRIX" 102 ;; 103 *-hpux*) 104 DEFAULT_FLASH_PLATFORM_ID="HPX" 105 DEFAULT_FLASH_SYSTEM_OS="HPUX" 106 ;; 107 *-amigaos*) 108 DEFAULT_FLASH_PLATFORM_ID="OS4" 109 DEFAULT_FLASH_SYSTEM_OS="AmigaOS4" 110 ;; 111 *-haiku*) 112 DEFAULT_FLASH_PLATFORM_ID="HAIKU" 113 DEFAULT_FLASH_SYSTEM_OS="Haiku" 114 ;; 115 *-gnu*) 116 DEFAULT_FLASH_PLATFORM_ID="GNU" 117 DEFAULT_FLASH_SYSTEM_OS="GNU/HURD" 118 ;; 119 *) 120 DEFAULT_FLASH_PLATFORM_ID="UNK" 121 DEFAULT_FLASH_SYSTEM_OS="Unknown" 122 ;; 123esac 124 125AC_DEFINE_UNQUOTED([DEFAULT_FLASH_PLATFORM_ID], ["${DEFAULT_FLASH_PLATFORM_ID}"], [Default 3-letter platform identifier for version string]) 126AC_DEFINE_UNQUOTED([DEFAULT_FLASH_SYSTEM_OS], ["${DEFAULT_FLASH_SYSTEM_OS}"], [Default value for System.capabilities.os]) 127 128AC_SUBST(DEFAULT_FLASH_PLATFORM_ID) 129AC_SUBST(DEFAULT_FLASH_SYSTEM_OS) 130 131DEFAULT_STREAMS_TIMEOUT=60 132AC_SUBST(DEFAULT_STREAMS_TIMEOUT) 133AC_DEFINE_UNQUOTED([DEFAULT_STREAMS_TIMEOUT], [${DEFAULT_STREAMS_TIMEOUT}], [Default streams timeout in seconds]) 134 135DEFAULT_SOL_SAFEDIR="~/.gnash/SharedObjects" 136AC_SUBST(DEFAULT_SOL_SAFEDIR) 137AC_DEFINE_UNQUOTED([DEFAULT_SOL_SAFEDIR], ["${DEFAULT_SOL_SAFEDIR}"], [Default SharedObject base directory]) 138 139 140dnl Some things you can only do by looking at the platform name. 141case "${host}" in 142 powerpc-apple-darwin*) 143 AC_DEFINE([__powerpc64__], [1], [this is a 64 bit powerpc]) 144 darwin=yes 145 AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform]) 146 ;; 147 *-apple-darwin*) 148 darwin=yes 149 AC_DEFINE([DARWIN_HOST], [1], [this is a Darwin platform]) 150 ;; 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. 154 *-openbsd*) 155 bsd=yes 156 openbsd=yes 157 AC_DEFINE([OPENBSD_HOST], [1], [this is an OpenBSD platform]) 158 ;; 159 *-freebsd* | *-kfreebsd*) 160 bsd=yes 161 freebsd=yes 162 AC_DEFINE([FREEBSD_HOST], [1], [this is a FreeBSD platform]) 163 ;; 164 *-netbsd*) 165 bsd=yes 166 netbsd=yes 167 AC_DEFINE([NETBSD_HOST], [1], [this is a NetBSD platform]) 168 ;; 169 *-*solaris*) 170 solaris=yes 171 AC_DEFINE([SOLARIS_HOST], [1], [this is a Solaris platform]) 172 ;; 173 *-android*) 174 android=yes 175 AC_DEFINE([ANDROID_HOST], [1], [this is an Android platform]) 176 ;; 177 *-*linux*) 178 linux=yes 179 AC_DEFINE([LINUX_HOST], [1], [this is a Linux platform]) 180 ;; 181 *-cygwin* | *-mingw* | *-pw32*) 182 windows=yes 183 AC_DEFINE([WIN32_HOST], [1], [this is a Win32 platform]) 184 ;; 185 *64-*-*bsd*) 186 bsd_os=bsd 187 AC_DEFINE([WORDSIZE], [64], [this is a 64 platform]) 188 ;; 189 *-*amigaos*) 190 amigaos4=yes 191 AC_DEFINE([AMIGAOS4_HOST], [1], [this is an AmigaOS4 platform]) 192 ;; 193 *-*haiku*) 194 haiku=yes 195 AC_DEFINE([HAIKU_HOST], [1], [this is a Haiku platform]) 196 ;; 197 *-gnu*) 198 gnu=yes 199 AC_DEFINE([GNU_HOST], [1], [this is a GNU platform]) 200 ;; 201 *-*wince) 202 wince=yes 203 AC_DEFINE([WINCE_HOST], [1], [this is a WINCE platform]) 204 ;; 205 *-*winmo) 206 wince=yes 207 AC_DEFINE([WINCE_HOST], [1], [this is a WINCE platform]) 208 AC_DEFINE([WINCE6_HOST], [1], [this is a WINCE6 platform]) 209 ;; 210esac 211 212 213AM_CONDITIONAL(LINUX, test x$linux = xyes) 214AM_CONDITIONAL(WIN32, test x$windows = xyes) 215AM_CONDITIONAL(HAIKU, test x$haiku = xyes) 216AM_CONDITIONAL(AMIGAOS4, test x$amigaos4 = xyes) 217 218dnl Get build date for helping us debugging 219BUILDDATE="`date +%Y%m%d`" 220AC_SUBST(BUILDDATE) 221 222dnl These are required by automake 223AM_INIT_AUTOMAKE 224m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 225AM_MAINTAINER_MODE 226AC_PROG_MAKE_SET 227 228AM_GNU_GETTEXT([external]) 229AM_CONDITIONAL(HAS_GETTEXT, test x$ac_cv_path_XGETTEXT != x) 230 231dnl Many of the Gnash macros depend on gettext macros defining shlibext; recent 232dnl gettext however does not. 233if 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" 236 exit 1; 237 else 238 shlibext="${acl_cv_shlibext}" 239 fi 240fi 241 242dnl This is primarily used when compiling for a similar architecture, 243dnl like pentium->geode, which can use the same compiler, but have 244dnl different development libraries. 245 246AC_ARG_WITH(sysroot, 247 AC_HELP_STRING([--with-sysroot], [system root directory for cross compiling]), 248 with_top_level=${withval}; 249 cross_compiling=yes) 250 251if 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 255 else 256 dnl Check if the specified path supplies /usr 257 if test -d ${with_top_level}/include; then 258 with_top_level=${withval} 259 else 260 AC_MSG_ERROR([Specified sysroot \"${with_top_level}/include\" doesn't exist!]) 261 fi 262 fi 263fi 264 265dnl Android is a little different when using a standard cross toolchain, 266dnl so we have to configure especially for it for now. Usually it's 267dnl something like this: 268dnl 269dnl arm-linux-eabi-gcc -Wl,--dynamic-linker -Wl,/system/bin/linker 270dnl -nostdlib -Wl,-rpath -Wl,/system/lib -Wl,-rpath 271dnl -Wl,/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib 272dnl -L/opt/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib 273dnl -lc -o hello 274dnl /opt/android-ndk-r3/build/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o 275dnl Recent versions of G++ (I'm using 4.5 from source 276android_ndk=no 277AC_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} 282 fi 283) 284CROSS_CXXFLAGS= 285if 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 290 cross_compiling=yes 291 fi 292 ANDROID_NDK=${android_ndk} 293 AC_DEFINE(ANDROID, [1], [This is an Android build]) 294 CXXFLAGS="${CXXFLAGS} ${CROSS_CXXFLAGS}" 295else 296 CROSS_CXXFLAGS= 297 ANDROID_NDK= 298fi 299AC_SUBST(ANDROID_NDK) 300AM_CONDITIONAL(ANDROID, [ test x"${android}" = xyes ]) 301AC_SUBST(CROSS_LDFLAGS) 302AC_SUBST(CROSS_CXXFLAGS) 303 304AC_C_BIGENDIAN 305AC_C_CONST 306AC_C_INLINE 307 308AC_PATH_PROG(DEJAGNU, runtest) 309 310dnl These options are for Cygnal, which collects optional statistics 311dnl on all the network traffic By default, we turn on statistics 312dnl collecting for the incoming and outgoing queues, since those are 313dnl required to be compatiable with FMS 3, and the ActionScript server 314dnl management API. buffers are the lowest level data storage, this 315dnl data is the time spent in the queue, and is primarily only used 316dnl for tuning the queueing API in Gnash. Memoryis the same, it's only 317dnl used by developers for tuning performance of memory allocations in 318dnl Gnash. 319buffers=no 320que=no 321memory=no 322cache=yes 323stat_proplookup=no 324AC_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 328 extlist="${withval}" 329 withval=`echo ${withval} | tr '\054' ' ' ` 330 else 331 extlist="" 332 withval="" 333 fi 334 fi 335 statistics_list="" 336 nstatistics=0 337 while test -n "${withval}" ; do 338 val=`echo ${withval} | cut -d ' ' -f 1` 339 [case "${val}" in 340 buffers) 341 buffers=yes 342 nstatistics=$((nstatistics+1)) 343 ;; 344 que) 345 que=yes 346 nstatistics=$((nstatistics+1)) 347 ;; 348 memory) 349 memory=yes 350 nstatistics=$((nstatistics+1)) 351 ;; 352 cache) 353 cache=yes 354 nstatistics=$((nstatistics+1)) 355 ;; 356 proplookup) 357 stat_proplookup=yes 358 nstatistics=$((nstatistics+1)) 359 ;; 360 all|ALL) 361 buffers=yes 362 memory=yes 363 queu=yes 364 cache=yes 365 stat_proplookup=yes 366 nstatistics=5 dnl this must be incremented if you add anything 367 ;; 368 *) AC_MSG_ERROR([invalid statistics feature specified: ${withval} given (accept: buffers|que|memory|cache|proplookup|all)]) 369 ;; 370 esac] 371 withval=`echo ${withval} | cut -d ' ' -f 2-6` 372 if test "x$val" = "x$withval"; then 373 break; 374 fi 375 done 376) 377if 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]) 381fi 382 383if 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]) 387fi 388 389if test x${que} = xyes; then 390 statistics_list="${statistics_list} queues" 391 AC_DEFINE(USE_STATS_QUEUE, [1], [Support statistics collecting for the queues]) 392fi 393 394if test x${cache} = xyes; then 395 statistics_list="${statistics_list} cache" 396 AC_DEFINE(USE_STATS_CACHE, [1], [Support statistics collecting for the cache]) 397fi 398 399if 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]) 404fi 405 406dnl this is just so Makefile can print the same list 407STATISTICS_LIST="$statistics_list" 408AC_SUBST(STATISTICS_LIST) 409 410# 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 417# exchange data. 418# 419# The default is to enable everything, and these can 420# also be controlled dynamically by the $HOME/.gnashrc 421# file. 422# 423solreadonly=no 424localconnection=yes 425 426AC_ARG_WITH(security, 427 AC_HELP_STRING([--with-security], [Specify which security features to enable]), 428 if test -n ${withval}; then 429 if test "x${withval}" != "xno"; then 430 extlist="${withval}" 431 withval=`echo ${withval} | tr '\054' ' ' ` 432 else 433 extlist="" 434 withval="" 435 fi 436 fi 437 security_list="" 438 nsecurity=0 439 while test -n "${withval}" ; do 440 val=`echo ${withval} | cut -d ' ' -f 1` 441 [case "${val}" in 442 solreadonly) 443 solreadonly=yes 444 nsecurity=$((nsecurity+1)) 445 ;; 446 lc) 447 localconnection=yes 448 nsecurity=$((nsecurity+1)) 449 ;; 450 all|ALL) 451 solreadonly=yes 452 lc=yes 453 nsecurity=3 454 ;; 455 *) AC_MSG_ERROR([invalid security feature specified: ${withval} given (accept: solreadonly|lc)]) 456 ;; 457 esac] 458 withval=`echo ${withval} | cut -d ' ' -f 2-6` 459 if test "x$val" = "x$withval"; then 460 break; 461 fi 462 done 463) 464 465if 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]) 470fi 471if 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]) 476fi 477SECURITY_LIST="$security_list" 478AC_SUBST(SECURITY_LIST) 479 480dnl For Haiku, we know the sysroot is in a non-standard place 481dnl it is important that -lagg comes before -lbe 482if test x"${haiku}" = xyes; then 483 HAIKU_LIBS=-lbe 484 AC_SUBST(HAIKU_LIBS) 485fi 486 487dnl Darwin uses libtool instead of ar to produce libraries. We determine which one 488dnl we have here now. For some reason on Darwin, we don't get the 489dnl count from grep via stdin correctly. Writing a temp file does the 490dnl trick, so although it's ugly, that's what we gotta do... 491AC_MSG_CHECKING([which type of library archiver we have]) 492rm -f .tmp 493libtool > .tmp 2>&1 494archiver=`grep -c dynamic .tmp 2>&1` 495rm -f .tmp 496dnl is there any good way to report what we found here? 497AC_MSG_RESULT() 498if test x"${archiver}" != x && test "${archiver}" -eq 1; then 499 export MACOSX_DEPLOYMENT_TARGET="10.3" 500 darwin=yes 501else 502 darwin=no 503fi 504 505dnl When cross compiling, limit the search directories cause otherwise 506dnl we may get the host headers or libraries by accident. These values 507dnl are exported, so all the other configure tests in macros/*.m4 use 508dnl these same settings rather than duplicating them like we used to. 509dnl To override thise, use the --with-*-incl= and --with-*-libs= 510dnl options to configure. 511if 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 520 export pkgroot="" 521 fi 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`" 525 npapi=no 526else 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}" 533 fi 534 export pathlist=$PATH 535fi 536 537if test x"${android_ndk}" != xno; then 538 incllist="${android_ndk}/include ${incllist}" 539fi 540 541AM_CONDITIONAL(CROSS_COMPILING, [ test x$cross_compiling = xyes ]) 542 543for dir in ${incllist}; do 544 test -d ${dir} && pruned_incllist="${pruned_incllist} ${dir}"; 545done 546 547for dir in ${libslist}; do 548 test -d ${dir} && pruned_libslist="${pruned_libslist} ${dir}"; 549done 550 551libslist="${pruned_libslist}"; 552incllist="${pruned_incllist}"; 553 554dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 555dnl !! 556dnl !! IMPORTANT NOTICE 557dnl !! 558dnl !! Any call to GNASH_PATH_XXX must be be given *after* this snippet. 559dnl !! This is to ensure that PKG_CONFIG, cross_compiling and incllist are 560dnl !! properly set at the time of call. 561dnl !! 562dnl !! Also GNASH_PKG_FIND has to be called later. Not sure 563dnl !! why but calling before breaks detection of CPP (see 564dnl !! gnash-dev mailing archives for June 12 2009 565dnl !! http://lists.gnu.org/archive/html/gnash-dev/2009-06/index.html 566dnl !! 567dnl !! 568dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 569 570dnl Check for PKG_CONFIG before any GNASH_PATH call 571PKG_PROG_PKG_CONFIG 572 573dnl -------------------------------------------------------- 574dnl GUI selection 575dnl -------------------------------------------------------- 576 577build_haiku=no 578build_aos4=no dnl AmigaOS4 GUI 579build_kde3=no dnl WARNING: doesn't work (see https://savannah.gnu.org/bugs/index.php?31782) 580build_qt4=no 581build_qtopia3=no 582build_qtopia4=no 583build_gtk=no 584build_fb=no dnl Raw framebuffer 585build_fltk=no 586build_sdl=no 587build_aqua=no dnl Native MacOSX 588build_dump=no 589AC_ARG_ENABLE(gui, 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' ' ' ` 593 fi 594 while test -n "${enableval}" ; do 595 val=`echo ${enableval} | cut -d ' ' -f 1` 596 case "${val}" in 597 gtk|GTK|gtk2|GTK2) 598 build_gtk=yes 599 ;; 600 kde3|KDE3) 601 build_kde3=yes 602 ;; 603 qt4|QT4|kde4|KDE4) 604 build_qt4=yes 605 ;; 606 qtopia3|QTOPIA3) 607 build_qtopia3=yes 608 ;; 609 qtopia4|QTOPIA4) 610 build_qtopia4=yes 611 ;; 612 sdl|SDL) 613 build_sdl=yes 614 ;; 615 aqua|AQUA|Aqua) 616 build_aqua=yes 617 ;; 618 fltk|FLTK|fltk2|FLTK2) 619 build_fltk=yes 620 ;; 621 fb|FB) 622 build_fb=yes 623 ;; 624 aos4|AOS4) 625 build_aos4=yes 626 ;; 627 haiku|HAIKU) 628 build_haiku=yes 629 ;; 630 dump|DUMP) 631 build_dump=yes 632 ;; 633 all|ALL) 634 build_dump=yes 635 dnl BSD doesn't have a framebuffer interface 636 if test x${linux} = xyes; then 637 build_fb=yes 638 fi 639 if test x${openbsd} != xyes; then 640 build_qt4=yes 641 fi 642 build_sdl=yes 643 build_gtk=yes 644 ;; 645 *) AC_MSG_ERROR([invalid gui ${enableval} given (accept: gtk|kde3|qt4|fltk|sdl|aqua|fb|qtopia3|qtopia4|dump|aos4|haiku)]) 646 ;; 647 esac 648 enableval=`echo ${enableval} | cut -d ' ' -f 2-6` 649 if test "x$val" = "x$enableval"; then 650 break; 651 fi 652 done], 653 [ dnl Run the following code if no --enable-gui is given 654 build_fb=auto 655 build_sdl=auto 656 if test x"${openbsd}" = xyes; then 657 build_gtk=yes 658 build_dump=auto 659 else if test x"${haiku}" = xyes; then 660 build_haiku=yes; 661 else 662 build_qt4=auto 663 build_gtk=yes 664 build_dump=auto 665 fi 666 fi 667 ] 668) 669 670if test x"${build_haiku}" = xyes; then 671 if test x"$haiku" != xyes; then 672 echo " ERROR: Can not build Haiku gui outside of Haiku 673operating system." >&3 674 fi 675fi 676 677dnl We can use Xephyr or fbe to create a fake framebuffer instead of real 678dnl video memory. This lets us test on a desktop machine. 679AC_ARG_WITH(fakefb, 680AC_HELP_STRING([--with-fakefb], 681 [specify a file to be mapped instead of a real framebuffer]), 682 with_fakefb=${withval}) 683 684fakefb= 685if test x"${with_fakefb}" = xyes; then 686 dnl This is the default file name fbe uses. 687 fakefb=/tmp/fbe_buffer 688else 689 if test x"${with_fakefb}" != x; then 690 fakefb=${with_fakefb} 691 fi 692fi 693FAKEFB=${fakefb} 694AC_SUBST(FAKEFB) 695 696if test x"${fakefb}" != x; then 697 AC_DEFINE(ENABLE_FAKE_FRAMEBUFFER, [1], [Enable using a file instead of a real framebuffer]) 698fi 699 700dnl This enable a small handful of tests that aren't designed to be 701dnl run as part of "make check", as they are either incomplete, or 702dnl can only be run interactively. These are all primarily oriented 703dnl towards code development and debugging, instead of regression 704dnl or unit testing. 705AC_ARG_ENABLE(devtests, AC_HELP_STRING([--enable-devtests], 706 [Developer only tests, not to be included in make check]), 707[case "${enableval}" in 708 yes) devtests=yes ;; 709 no) devtests=no ;; 710 *) AC_MSG_ERROR([bad value ${enableval} for enable-devtests option]) ;; 711esac], devtests=no) 712AM_CONDITIONAL(ENABLE_DEVELOPER_TESTS, [test x${devtests} = xyes]) 713 714dnl -------------------------------------------------------- 715dnl Sound handler selection 716dnl -------------------------------------------------------- 717add_sound= 718build_sound_none=no 719build_sound_sdl=no 720build_sound_ahi=no 721build_sound_mkit=no 722AC_ARG_ENABLE(sound, 723 AC_HELP_STRING([--enable-sound=[[sdl|ahi|mkit]]], [Use the specified sound handler (default=sdl)]), 724 [case "${enableval}" in 725 sdl|SDL|Sdl) 726 build_sound_sdl=yes 727 add_sound="sdl" 728 ;; 729 none|NONE|None) 730 build_sound_none=yes 731 add_sound="none" 732 ;; 733 ahi|AHI|Ahi) 734 build_sound_ahi=yes 735 add_sound="ahi" 736 ;; 737 mkit|MKIT|Mkit) 738 build_sound_mkit=yes 739 add_sound="mkit" 740 ;; 741 esac], 742 [if test x"${haiku}" = xyes; then 743 build_sound_mkit=yes 744 add_sound="mkit" 745 else 746 if test x${build_sound_none} = xno; then 747 build_sound_sdl=yes 748 add_sound=sdl 749 fi 750 fi] 751) 752 753AM_CONDITIONAL(BUILD_LIBSOUND, test x${build_sound_none} != xyes) 754if test x${build_sound_none} != xyes; then 755 AC_DEFINE(USE_SOUND, [1], [Build any sound code]) 756fi 757 758dnl -------------------------------------------------------- 759dnl Media handler selection 760dnl -------------------------------------------------------- 761build_media_gst=no 762build_media_ffmpeg=auto 763build_media_none=no 764AC_ARG_ENABLE(media, 765 AC_HELP_STRING([--enable-media=handler], 766 [Enable media handling support using the specified handlers: ffmpeg gst none(no sound) (default=auto) ]), 767 768 if test -n ${enableval}; then 769 enableval=`echo ${enableval} | tr '\054' ' ' ` 770 fi 771 dnl When --enable-media is given, all media defaults to off 772 dnl except the explicitly enabled ones 773 build_media_ffmpeg=no 774 build_media_gst=no 775 while test -n "${enableval}"; do 776 val=`echo ${enableval} | cut -d ' ' -f 1` 777 [case "${val}" in 778 GST|gst) 779 build_media_gst=yes 780 media_list="${media_list}gst " 781 ;; 782 FFMPEG|ffmpeg) 783 build_media_ffmpeg=yes 784 media_list="${media_list}ffmpeg " 785 ;; 786 no|NO|none) 787 build_media_none=yes 788 media_list="none" 789 ;; 790 *) 791 AC_MSG_ERROR([bad value ${enableval} for --enable-media option]) 792 ;; 793 794 esac] 795 enableval=`echo ${enableval} | cut -d ' ' -f 2-6` 796 if test "x$val" = "x$enableval"; then 797 break; 798 fi 799 done, 800 [if test x"${build_haiku}" = xyes; then 801 build_media_ffmpeg=yes 802 build_media_haiku=yes 803 media_list="ffmpeg haiku" 804 else 805 build_media_gst=yes 806 media_list="gst" 807 fi] 808) 809 810AM_CONDITIONAL(BUILD_LIBMEDIA, test x${build_media_none} != xyes) 811if test x${build_media_none} != xyes; then 812 AC_DEFINE(USE_MEDIA, [1], [Build any media code]) 813fi 814 815dnl If no media is selected, and media handling isn't disabled, then enable gst 816if test x${build_media_none} = xno -a x${build_media_gst} = xno -a x${build_media_ffmpeg} = xno; then 817 build_media_gst=yes 818fi 819 820if test x"$build_media_ffmpeg" != x"no"; then # yes or auto 821 GNASH_PATH_FFMPEG 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" 827 else 828 build_ogl=no 829 fi 830 fi 831fi 832 833MEDIA_CONFIG="${media_list}" 834AC_SUBST(MEDIA_CONFIG) 835 836dnl Multiple input devices are supported. These can all work in 837dnl varying combinations, so several may be listed. These are only 838dnl required when using the Framebuffer, as without the X11 desktop, 839dnl Gnash has to handle all these internally. This can get 840dnl messy, as one might want to use a touchscreen with a normal mouse 841dnl or keyboard attached. 842dnl By default, don't build any of these, as they are only for the 843dnl Framebuffer running without X11. 844if test x"${build_fb}" = xyes -a x"${linux}" = xyes; then 845 build_ps2mouse=no 846 build_ps2keyboard=yes 847 build_input_events=yes 848 build_tslib=yes 849 input_events="PS/2 Mouse, PS/2 Keyboard, Input Devices, Touchscreen via Tslib" 850else 851 build_ps2mouse=no 852 build_ps2keyboard=no 853 build_input_events=no 854 build_tslib=no 855 input_events= 856fi 857AC_ARG_ENABLE(input, 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' ' ' ` 861 fi 862 build_ps2mouse=no 863 build_ps2keyboard=no 864 build_input_events=no 865 build_tslib=no 866 while test -n "${enableval}" ; do 867 val=`echo ${enableval} | cut -d ' ' -f 1` 868 case "${val}" in 869 ps2m*|PS2m*|m*|M*) dnl a PS/2 style mouse 870 build_ps2mouse=yes 871 input_events="${input_events}, PS/2 Mouse" 872 ;; 873 ps2k*|PS2K*|k*|K*) dnl a PS/2 style keyboard 874 build_ps2keyboard=yes 875 input_events="${input_events}, PS/2 Keyboard" 876 ;; 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 880 ;; 881 t*|T*) dnl use a touchscreen with tslib, which works like a mouse 882 build_tslib=yes 883 input_events="${input_events}, Touchscreen" 884 ;; 885 a*) dnl all 886 build_ps2mouse=yes 887 build_ps2keyboard=yes 888 build_tslib=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" 892 else 893 build_input_events=no 894 input_events="PS/2 Mouse, PS/2 Keyboard, Touchscreen via Tslib" 895 fi 896 ;; 897 *) AC_MSG_ERROR([invalid input device list! ${enableval} given (accept: ps2mouse|keyboard|events,touchscreen)]) 898 ;; 899 esac 900 enableval=`echo ${enableval} | cut -d ' ' -f 2-6` 901 if test "x$val" = "x$enableval"; then 902 break; 903 fi 904 done], 905) 906 907if test x$build_sdl != xno -o x$build_sound_sdl = xyes; then 908 GNASH_PATH_SDL 909fi 910AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} = xyes]) 911 912 913dnl ----------------------------------------------------- 914dnl Check for SDL and decide about auto gui accordingly. 915dnl Need be done after build_sound_sdl and build_sdl are 916dnl initialized and before they are checked for yes/no 917dnl ----------------------------------------------------- 918if test x"${build_sdl}" = xauto; then 919 if test xyes = x"${has_sdl}"; then 920 build_sdl=yes 921 else 922 AC_MSG_NOTICE([sdl GUI will not be built (no sdl development files found)]) 923 build_sdl=no 924 fi 925fi 926 927dnl ------------------------------- 928dnl Renderer Selection 929dnl ------------------------------- 930input_events= 931dnl By default, we want to to build all renderers 932dnl DirectFB has both a device layer and a rendering layer, although 933dnl currently the rendering part is incomplete. Configure support is 934dnl included for development purposes. 935build_directfb=no 936dnl The OpenVG support works on both the desktop and embedded devices 937dnl that don't run X11. It is supported by iPhone/iPad/Android 938dnl devices, and the nouveau driver on the desktop. 939build_ovg=no 940dnl The OpenGLES1 renderer is a work in progress. It is originally 941dnl based on a patch to Gnash 0.8.5, which of course not only didn't 942dnl compile anymore, it was all hardcoded into the framebuffer 943dnl code. This version compiles with the latest internal rendering 944dnl API, and works properly with the glue code for the Gnash GUIs. 945build_gles1=no 946dnl OpenGL works, but suffers from performance and rendering quality 947dnl problems. This should eventually be replacd by the OpenGLES1 and 948dnl OpenVG renders. 949build_ogl=no 950dnl AGG is a software only renderer 951build_agg=yes 952build_cairo=yes 953renderer_list="agg cairo" 954AC_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 958 renderer_list="none" 959 enableval=`echo ${enableval} | tr '\054' ' ' ` 960 else 961 renderer_list="" 962 enableval="" 963 fi 964 fi 965 renderer_list="" 966 build_ovg=no 967 build_ogl=no 968 build_gles1=no 969 build_gles2=no 970 build_agg=no 971 build_cairo=no 972 while test -n "${enableval}" ; do 973 val=`echo ${enableval} | cut -d ' ' -f 1` 974 [case "${val}" in 975 no*|NO*) 976 renderer_list="none" 977 build_ovg=no 978 build_ogl=no 979 build_gles1=no 980 build_gles2=no 981 build_agg=no 982 build_cairo=no 983 ;; 984 all|ALL) 985 renderer_list="agg cairo opengl openvg, opengles1" 986 build_ogl=yes 987 build_agg=yes 988 build_cairo=yes 989 build_ovg=no 990 nrender=3 991 ;; 992 ogl|OGL|OpenGL|opengl) 993 renderer_list="${renderer_list} opengl" 994 build_ogl=yes 995 ;; 996 gles|GLES|gles1|GLES1) 997 renderer_list="${renderer_list} opengles1" 998 build_gles1=yes 999 build_ogl=no 1000 nrender=$((nrender+1)) 1001 ;; 1002 ovg|OVG|OpenVG|openvg) 1003 renderer_list="${renderer_list} openvg" 1004 build_ovg=yes 1005 nrender=$((nrender+1)) 1006 ;; 1007 directfb|dfb) 1008 renderer_list="${renderer_list} DirectFB" 1009 build_directfb=yes 1010 nrender=$((nrender+1)) 1011 ;; 1012 agg|AGG) 1013 renderer_list="${renderer_list} agg" 1014 build_agg=yes 1015 ;; 1016 cairo|CAIRO|Cairo*) 1017 renderer_list="${renderer_list} cairo" 1018 build_cairo=yes 1019 ;; 1020 *) AC_MSG_ERROR([invalid renderer specified: ${enableval} given (accept: (opengl|openvg|cairo|agg|all)]) 1021 ;; 1022 esac] 1023 enableval=`echo ${enableval} | cut -d ' ' -f 2-` 1024 if test "x$val" = "x$enableval"; then 1025 break; 1026 fi 1027 done 1028) 1029 1030if test x"${build_ovg}" = xyes; then 1031 GNASH_PATH_OPENVG 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)) 1037 fi 1038fi 1039 1040dnl VA API is used by default for all H.264 videos. HW requirements: 1041dnl * AMD GPUs with UVD2 and xvba-video VA driver 1042dnl * NVIDIA GPUs with vdpau-video VA driver 1043dnl * All HW with a VA driver supporting the VA/GLX extensions or 1044dnl vaPutSurface(Pixmap,...). This may include the Intel 1045dnl Moorestown platform and future G45 VA driver. 1046dnl NOTE: it is possible to use Gnash/VAAPI on platforms with an Intel 1047dnl GMA500 but you currently will have to build the AGG renderer 1048dnl instead of the OGL (OpenGL) one. 1049build_vaapi_device=no 1050build_openmax_device=no 1051dnl These renders always require EGL support 1052if test x${build_gles1} = xyes -o x${build_ovg} = xyes; then 1053 build_egl_device=yes 1054else 1055 build_egl_device=no 1056fi 1057build_x11_device=no 1058build_directfb_device=no 1059if test x"${build_fb}" = xyes -o x"${build_fb}" = xauto; then 1060 build_fb_agg=yes 1061fi 1062dnl AGG support for the framebuffer requires the rawfb device 1063if test x"${build_fb_agg}" = xyes -a x"${build_agg}" = xyes; then 1064 build_rawfb_device=yes 1065 device_list="RawFB" 1066 ndevice=1 1067else 1068 build_rawfb_device=no 1069 device_list="" 1070 ndevice=0 1071fi 1072AC_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' ' ' ` 1075 build_egl_device=no 1076 build_rawfb_device=no 1077 device_list="" 1078 ndevice=0 1079 while test -n "${enableval}" ; do 1080 val=`echo ${enableval} | cut -d ' ' -f 1` 1081 [case "${val}" in 1082 no*|NO*) 1083 device_list="none" 1084 build_vaapi_device=no 1085 build_openmax_device=no 1086 build_egl_device=no 1087 build_directfb_device=no 1088 build_x11_device=no 1089 ndevice=0 1090 ;; 1091 va*|VA*) 1092 device_list="${device_list} VAAPI" 1093 build_vaapi_device=yes 1094 ndevice=$((ndevice+1)) 1095 ;; 1096 eg*|EG*) 1097 device_list="${device_list} EGL" 1098 build_egl_device=yes 1099 ndevice=$((ndevice+1)) 1100 ;; 1101 x1*|X1*) 1102 device_list="${device_list} X11" 1103 build_x11_device=yes 1104 ndevice=$((ndevice+1)) 1105 ;; 1106 di*|Di*|DI*|dfb) 1107 device_list="${device_list} DirectFB" 1108 build_directfb_device=yes 1109 ndevice=$((ndevice+1)) 1110 ;; 1111 ra*|RAW*) 1112 device_list="${device_list} RawFB" 1113 build_rawfb_device=yes 1114 ndevice=$((ndevice+1)) 1115 ;; 1116 all|ALL) 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 1124 ndevice=3 1125 ;; 1126 op*|Op*|OP*) 1127 device_list="${device_list} OpenMAX" 1128 build_openmax_device=yes 1129 ndevice=$((ndevice+1)) 1130 ;; 1131 *) AC_MSG_ERROR([invalid device feature specified: ${enableval} given (accept: none,vaapi)]) 1132 ;; 1133 esac] 1134 enableval=`echo ${enableval} | cut -d ' ' -f 2-6` 1135 if test "x$val" = "x$enableval"; then 1136 break; 1137 fi 1138 done 1139) 1140 1141if test x"${have_ffmpeg_vaapi}" = x"yes" -a x"${build_vaapi_device}" = x"yes"; then 1142 use_libva=no 1143 use_libva_x11=no 1144 use_libva_glx=no 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 1148 use_libva=yes 1149 GNASH_PKG_FIND([libva], 1150 [va/va.h], 1151 [Video Acceleration API], 1152 vaInitialize 1153 ) 1154 use_libva_x11=yes 1155 GNASH_PKG_FIND([libva_x11], 1156 [va/va_x11.h], 1157 [VA API (X11 display)], 1158 vaGetDisplay, 1159 [], [-lva-x11] 1160 ) 1161 1162 if test x$build_ogl = xyes; then 1163 use_libva_glx=yes 1164 GNASH_PKG_FIND([libva_glx], 1165 [va/va_glx.h], 1166 [VA API (GLX display)], 1167 vaGetDisplayGLX, 1168 [], [-lva-glx] 1169 ) 1170 fi 1171 fi 1172fi 1173 1174if test x"${build_fb_agg}" = xyes -a x"${build_rawfb_device}" = xno; then 1175 AC_MSG_ERROR([Framebuffer GUI requires the rawfb device.]) 1176fi 1177 1178dnl libVA drivers. We declare conditional for both the option being 1179dnl selected, as well as whether or not it's found. This we can 1180dnl generate better error handling if it's not found. 1181AM_CONDITIONAL(USE_VAAPI, test x"${use_libva}" = xyes) 1182 1183dnl Until the hwaccel patches in FFmpeg wind up in the ffmpeg-plugin, 1184dnl restrict using HW Accel to using FFmpeg directly. 1185dnl test xyes = xyes -a ( x != xyes -o x != xyes ) 1186if 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."]) 1188fi 1189 1190AM_CONDITIONAL(HAVE_VAAPI, test x"${found_libva_incl}" = xyes) 1191AM_CONDITIONAL(HAVE_VAAPI_GLX, test x"${found_libva_glx_incl}" = xyes) 1192AM_CONDITIONAL(HAVE_VAAPI_X11, test x"${found_libva_x11_incl}" = xyes) 1193 1194if 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]) 1199 else 1200 AC_MSG_WARN(["EGL requested but development package not found!"]) 1201 build_egl_device=no 1202 fi 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; 1209 int bar = foo; 1210 bar++; ], 1211 native_window_type=int, 1212 native_window_type=void 1213 ) 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]) 1218 fi 1219fi 1220 1221if test ${ndevice} -eq 0; then 1222 device_list="none" 1223 ndevice=1 1224fi 1225 1226AM_CONDITIONAL(BUILD_DEVICES, test ${ndevice} -gt 0) 1227 1228dnl 16 bit: RGB555, RGB565 1229dnl 24 bit: RGB24, BGR24 1230dnl 32 bit: RGBA32, BGRA32 1231pixelformat=all 1232AC_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' ' ' ` 1237 fi 1238 while test -n "${withval}" ; do 1239 val=`echo ${withval} | cut -d ' ' -f 1` 1240 case "${val}" in 1241 all) 1242 # allow special value "all" set by user (handled below) 1243 ;; 1244 argb32|ARGB32) 1245 AC_DEFINE(PIXELFORMAT_ARGB32, [1], [ARGB32]) 1246 ;; 1247 abgr32|ABGR32) 1248 AC_DEFINE(PIXELFORMAT_ABGR32, [1], [ABGR32]) 1249 ;; 1250 bgra32|BGRA32) 1251 AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32]) 1252 ;; 1253 bgr24|BGR24) 1254 AC_DEFINE(PIXELFORMAT_BGR24, [1], [BGR24]) 1255 ;; 1256 rgba32|RGBA32) 1257 AC_DEFINE(PIXELFORMAT_RGBA32, [1], [RGBA32]) 1258 ;; 1259 rgb24|RGB24) 1260 AC_DEFINE(PIXELFORMAT_RGB24, [1], [RGB24]) 1261 ;; 1262 rgb555|RGB555) 1263 AC_DEFINE(PIXELFORMAT_RGB555, [1], [RGB555]) 1264 ;; 1265 rgb565|RGB565) 1266 AC_DEFINE(PIXELFORMAT_RGB565, [1], [RGB565]) 1267 ;; 1268 *) AC_MSG_ERROR([invalid pixel format ${withval} given (accept: all|RGB555|RGB565|RGB24|BGR24|BGRA32|RGBA32|ARGB32|ABGR32)]) 1269 ;; 1270 esac 1271 withval=`echo ${withval} | cut -d ' ' -f 2-6` 1272 if test "x$val" = "x$withval"; then 1273 break; 1274 fi 1275 done], 1276 [if test x$build_haiku = xyes -a x$build_sdl != xyes; then 1277 AC_DEFINE(PIXELFORMAT_BGRA32, [1], [BGRA32]) 1278 pixelformat=BGRA32 1279 fi] 1280) 1281 1282if 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" 1289 #else 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]) 1298 #fi 1299 fi 1300fi 1301 1302if test x"${build_ogl}" != xno; then # yes or auto 1303 GNASH_PATH_OPENGL 1304 if test x"${build_ogl}" = xauto; then 1305 if test xyes = x"${has_opengl}"; then 1306 build_ogl=yes 1307 renderer_list="${renderer_list} opengl" 1308 else 1309 build_ogl=no 1310 fi 1311 fi 1312fi 1313 1314AM_CONDITIONAL(BUILD_OVG_RENDERER, [ test x${build_ovg} = xyes ]) 1315AM_CONDITIONAL(BUILD_GLES1_RENDERER, [ test x${build_gles1} = xyes ]) 1316AM_CONDITIONAL(BUILD_GLES2_RENDERER, [ test x${build_gles2} = xyes ]) 1317AM_CONDITIONAL(BUILD_OGL_RENDERER, [ test x${build_ogl} = xyes]) 1318AM_CONDITIONAL(BUILD_AGG_RENDERER, [ test x${build_agg} = xyes ]) 1319AM_CONDITIONAL(BUILD_CAIRO_RENDERER, [ test x${build_cairo} = xyes ]) 1320 1321if test x"${has_openvg}" = xyes; then 1322 AC_DEFINE([RENDERER_OPENVG], [1], [Use OpenVG renderer]) 1323fi 1324 1325if test x"${build_ogl}" = xyes; then 1326 AC_DEFINE([RENDERER_OPENGL], [1], [Use OpenGL renderer]) 1327fi 1328 1329if test x"${build_agg}" = xyes; then 1330 AC_DEFINE([RENDERER_AGG], [1], [Use AntiGrain renderer]) 1331fi 1332 1333if 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]) 1336fi 1337 1338if test x"${build_agg}" = xyes; then 1339 GNASH_PATH_AGG 1340fi 1341 1342AC_PATH_PROG(PERL, perl) 1343AM_CONDITIONAL(HAVE_PERL, test x"$PERL" != x) 1344 1345AC_PATH_PROG(CSOUND, csound) 1346AM_CONDITIONAL(HAVE_CSOUND, test x"$CSOUND" != x) 1347 1348AC_PATH_PROG(GIT, git) 1349AC_SUBST(GIT) 1350 1351dnl -------------------------------------------------------- 1352dnl Extension selection 1353dnl -------------------------------------------------------- 1354ext_dejagnu=no 1355ext_mysql=no 1356ext_fileio=no 1357ext_gtk=no 1358ext_lirc=no 1359ext_dbus=no 1360ext_all=no 1361extensions_list= 1362extensions_support=no 1363nextensions=0 1364AC_ARG_ENABLE(extensions, 1365 AC_HELP_STRING([--enable-extensions=], [Specify which extensions to build (default: none)]) 1366AC_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 1372 else 1373 extlist="" 1374 enableval="" 1375 fi 1376 fi 1377 nextensions=0 1378 while test -n "${enableval}" ; do 1379 val=`echo ${enableval} | cut -d ' ' -f 1` 1380 extensions_list="${extensions_list} ${val}" 1381 [case "${val}" in 1382 dejagnu|DEJAGNU|dj|DJ) 1383 AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension]) 1384 AC_MSG_NOTICE([Adding DejaGnu extension]) 1385 ext_dejagnu=yes 1386 nextensions=$((nextensions+1)) 1387 ;; 1388 mysql|MYSQL|sql|SQL) 1389 AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension]) 1390 AC_MSG_NOTICE([Adding MySql extension]) 1391 ext_mysql=yes 1392 nextensions=$((nextensions+1)) 1393 ;; 1394 fileio|FILEIO|io|IO) 1395 AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension]) 1396 AC_MSG_NOTICE([Adding FileIO extension]) 1397 ext_fileio=yes 1398 nextensions=$((nextensions+1)) 1399 ;; 1400 gtk|GTK|gtk2|GTK2) 1401 AC_DEFINE(USE_GTK_EXT, [1], [Build the GTK extension]) 1402 ext_gtk=yes 1403 nextensions=$((nextensions+1)) 1404 ;; 1405 lirc|LIRC) 1406 AC_DEFINE(USE_LIRC_EXT, [1], [Build the LIRC extension]) 1407 ext_lirc=yes 1408 nextensions=$((nextensions+1)) 1409 ;; 1410 dbus|DBUS) 1411 AC_DEFINE(USE_DBUS_EXT, [1], [Build the DBUS extension]) 1412 ext_dbus=yes 1413 nextensions=$((nextensions+1)) 1414 ;; 1415 all|ALL) 1416 AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions]) 1417 ext_dejagnu=yes 1418 ext_mysql=yes 1419 ext_fileio=yes 1420 ext_gtk=yes 1421 ext_lirc=yes 1422 ext_dbus=yes 1423 ext_all=yes 1424 nextensions=9 1425 ;; 1426 *) AC_MSG_ERROR([invalid extension specified: ${enableval} given (accept: MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)]) 1427 ;; 1428 esac] 1429 enableval=`echo ${enableval} | cut -d ' ' -f 2-6` 1430 if test "x$val" = "x$enableval"; then 1431 break; 1432 fi 1433 done 1434 EXTENSIONS_LIST="$extensions_list" 1435 AC_SUBST(EXTENSIONS_LIST) 1436) 1437 1438if test x$ext_dbus = xyes; then 1439 GNASH_PATH_DBUS 1440fi 1441 1442if test x$ext_mysql = xyes; then 1443 GNASH_PATH_MYSQL 1444fi 1445 1446AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ]) 1447AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ]) 1448AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ]) 1449AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ]) 1450AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ]) 1451AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ]) 1452AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n "$extensions_list"]) 1453 1454dnl -------------------------------------------------------- 1455dnl Libtool 1456dnl -------------------------------------------------------- 1457 1458AC_LIBTOOL_DLOPEN 1459AC_LIBTOOL_WIN32_DLL 1460AC_DISABLE_STATIC 1461AC_PROG_LIBTOOL 1462AC_SUBST(LIBTOOL_DEPS) 1463DLOPEN="-dlopen" 1464DLPREOPEN="-dlpreopen" 1465AC_SUBST(DLOPEN) 1466AC_SUBST(DLPREOPEN) 1467 1468GNASH_PKG_FIND([ltdl], [ltdl.h], [libltdl library], [lt_dlinit]) 1469 1470if test x"$has_ltdl" = x"yes";then 1471 AC_DEFINE(HAVE_LTDL, [1], [Libtool 2.x defines this, but libtool 1.5 does not]) 1472fi 1473 1474dnl -------------------------------------------------------- 1475dnl SOL dir 1476dnl -------------------------------------------------------- 1477soldir=/tmp 1478AC_ARG_WITH(soldir, 1479 AC_HELP_STRING([--with-soldir], 1480 [directory for .sol files]), 1481 with_soldir=${withval}) 1482if test x${with_soldir} != x; then 1483 soldir=${with_soldir} 1484fi 1485SOLDIR=${soldir} 1486AC_SUBST(SOLDIR) 1487 1488dnl -------------------------------------------------------- 1489dnl AVM2 1490dnl -------------------------------------------------------- 1491dnl AC_ARG_ENABLE(avm2, 1492dnl AC_HELP_STRING([--enable-avm2], [Enable support for AS3]), 1493dnl [case "${enableval}" in 1494dnl yes) avm2=yes ;; 1495dnl no) avm2=no ;; 1496dnl *) AC_MSG_ERROR([bad value ${enableval} for enable-avm2 option]) ;; 1497dnl esac], avm2=no 1498dnl ) 1499dnl AM_CONDITIONAL(ENABLE_AVM2, [test x"$avm2" = xyes]) 1500dnl if test x$avm2 = xyes; then 1501dnl AC_DEFINE(ENABLE_AVM2, [1], [Enable AVM2 code]) 1502dnl fi 1503AM_CONDITIONAL(ENABLE_AVM2, false) 1504 1505dnl This option is only used if you want Gnash to interwork with 1506dnl the Adobe player using the LocalConnection class. 1507dnl lckey=0xdd3adabd 1508AC_ARG_WITH(lckey, 1509 AC_HELP_STRING([--with-lckey], 1510 [shared memory key for your system]), 1511 with_lckey=${withval}) 1512 1513if test x${with_lckey} != x; then 1514 lckey=${with_lckey} 1515else 1516 lckey=0xcbc384f8 1517fi 1518LC_KEY=${lckey} 1519AC_SUBST(LC_KEY) 1520 1521AC_ARG_ENABLE(python, 1522 AC_HELP_STRING([--enable-python],[Enable python for the python wrapper]), 1523[case "${enableval}" in 1524 yes) python=yes ;; 1525 no) python=no ;; 1526 *) AC_MSG_ERROR([bad value ${enableval} for --enable-python option]) ;; 1527esac],python=no) 1528 1529dnl Look for python, which is optional. If enabled, a python loadable 1530dnl module of Gnash is created. 1531GNASH_PATH_PYTHON 1532AM_CONDITIONAL([USE_PYTHON], test x"$python" = xyes) 1533AM_CONDITIONAL([HAS_PYTHON], test x"$has_python" = xyes) 1534 1535dnl By default debug logging is enabled. For better performance, it can 1536dnl be disabled, as when running as a plugin, nobody sees the debug messages 1537dnl anyway. Debug logging is primarily for developers, so we can turn it off 1538dnl for package builds. 1539AC_ARG_ENABLE(log, 1540 AC_HELP_STRING([--enable-log],[Enable debug logging]), 1541[case "${enableval}" in 1542 yes) debuglog=yes ;; 1543 no) debuglog=no ;; 1544 *) AC_MSG_ERROR([bad value ${enableval} for --enable-log option]) ;; 1545esac],debuglog=yes) 1546 1547if test x"${debuglog}" = x"yes"; then 1548 AC_DEFINE([DEBUG_LOGGING], [1], [Enable debug logging]) 1549fi 1550 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. 1555AC_ARG_ENABLE(jemalloc, 1556 AC_HELP_STRING([--enable-jemalloc],[Enable jemalloc instead of system malloc]) 1557AC_HELP_STRING([--disable-jemalloc],[Disable jemalloc]), 1558[case "${enableval}" in 1559 yes) jemalloc=yes ;; 1560 no) jemalloc=no ;; 1561 *) AC_MSG_ERROR([bad value ${enableval} for --enable-jemalloc option]) ;; 1562esac],jemalloc=yes) 1563 1564dnl We can search libs for mallinfo to decide whether we have it or not. 1565dnl This is added to the linker flags when it's found. Usually it's -lc, but 1566dnl on OpenSolaris it's -lmalloc, so this fixes the build. 1567AC_SEARCH_LIBS([mallinfo], [c malloc], 1568 AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()]) 1569 mallinfo=yes 1570 ) 1571 1572AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes) 1573 1574if test x"${jemalloc}" = x"yes"; then 1575 GNASH_PKG_FIND(jemalloc, [jemalloc.h], [jemalloc memory management], mallctl) 1576fi 1577 1578AM_CONDITIONAL(JEMALLOC, test x"${has_jemalloc}" = xyes) 1579 1580AC_SEARCH_LIBS([getaddrinfo], [c]) 1581 1582AC_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]) 1586esac]) 1587 1588dnl IPC_INFO isn't portable, and doesn't exist on BSD 1589AC_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]) 1592) 1593 1594dnl -------------------------------------------------------- 1595dnl Disable menus 1596dnl -------------------------------------------------------- 1597dnl Don't add the GUI menu. Some educational systems think this adds 1598dnl clutter and confusion, like on the OLPC. 1599AC_ARG_ENABLE(menus, 1600 AC_HELP_STRING([--disable-menus],[Disable the GUI menus]), 1601[case "${enableval}" in 1602 yes) menus=yes ;; 1603 no) menus=no ;; 1604 *) AC_MSG_ERROR([bad value ${enableval} for --disable-menus option]) ;; 1605esac],menus=yes) 1606 1607if test x"$menus" = x"yes"; then 1608 AC_DEFINE([USE_MENUS], [], [GUI Menu support]) 1609fi 1610AM_CONDITIONAL(MENUS, test x$menus = xyes) 1611 1612dnl -------------------------------------------------------- 1613dnl Disable SWF information 1614dnl -------------------------------------------------------- 1615dnl Don't gather SWF information in tree form. This takes 1616dnl resources and memory that can be saved if there's no 1617dnl need to examine SWF internals. 1618AC_ARG_ENABLE(swftree, 1619 AC_HELP_STRING([--disable-swftree],[Disable showing SWF properties]), 1620[case "${enableval}" in 1621 yes) swftree=yes ;; 1622 no) swftree=no ;; 1623 *) AC_MSG_ERROR([bad value ${enableval} for --disable-swf-properties option]) ;; 1624esac],swftree=yes) 1625 1626if test x"$swftree" = x"yes"; then 1627 AC_DEFINE([USE_SWFTREE], [], [View SWF information]) 1628fi 1629AM_CONDITIONAL(SWFTREE, test x$swftree = xyes) 1630 1631dnl -------------------------------------------------------- 1632dnl Disable testsuite 1633dnl -------------------------------------------------------- 1634dnl Disable running any tests for "make check". This may sound stupid, but 1635dnl this option is designed to solely be used by maintainers in the 1636dnl DISTCHECK_CONFIGURE_FLAGS when building packages. Gnash's testing infrastructure 1637dnl is complex, and often the the testsuites will work, but due to some obscure reason, 1638dnl make distcheck fails. 1639AC_ARG_ENABLE(testsuite, 1640 AC_HELP_STRING([--disable-testsuite],[Disable the testsuite, maintainers option only]), 1641[case "${enableval}" in 1642 yes) testsuite=yes ;; 1643 no) testsuite=no ;; 1644 *) AC_MSG_ERROR([bad value ${enableval} for --disable-testsuite option]) ;; 1645esac],testsuite=yes) 1646 1647if test x"$testsuite" = x"yes"; then 1648 AC_DEFINE([USE_TESTSUITE], [], [Testsuite support, maintainers option only]) 1649fi 1650AM_CONDITIONAL(TESTSUITE, test x$testsuite = xyes) 1651 1652dnl -------------------------------------------------------- 1653dnl Write the file to disk in the plugin 1654dnl -------------------------------------------------------- 1655AC_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 1658 yes) write=yes ;; 1659 no) write=no ;; 1660 *) AC_MSG_ERROR([bad value ${enableval} for --enable-write option]) ;; 1661esac],write=no) 1662 1663if test x"$write" = x"yes"; then 1664 AC_DEFINE([WRITE_FILE], [], [Write files while streaming]) 1665fi 1666 1667dnl -------------------------------------------------------- 1668dnl Write a standalone gnash launcher to disk from the plugin 1669dnl -------------------------------------------------------- 1670AC_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]) ;; 1676esac],sa_launcher=yes) 1677 1678if 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]) 1680fi 1681 1682dnl -------------------------------------------------------- 1683dnl Build the cygnal server if specified. 1684dnl -------------------------------------------------------- 1685AC_ARG_ENABLE(cygnal, 1686 AC_HELP_STRING([--enable-cygnal], [Enable building of the Cygnal server]), 1687[case "${enableval}" in 1688 yes) cygnal=yes 1689 extensions_support=yes ;; 1690 no) cygnal=no ;; 1691 *) AC_MSG_ERROR([bad value ${enableval} for enable-cygnal option]) ;; 1692esac],cygnal=no) 1693AM_CONDITIONAL(CYGNAL, test x$cygnal = xyes) 1694 1695if test x$extensions_support = xyes; then 1696 AC_DEFINE([USE_EXTENSIONS], [1], [Specify that extension support is enabled.]) 1697fi 1698AM_CONDITIONAL(ENABLE_EXTENSIONS, [ test "x${extensions_support}" != "xno" ]) 1699 1700dnl -------------------------------------------------------- 1701dnl Build the cgibins server if specified. 1702dnl -------------------------------------------------------- 1703AC_ARG_ENABLE(cgibins, 1704 AC_HELP_STRING([--enable-cgibins], [Enable building of the CGIs for Cygnal]), 1705[case "${enableval}" in 1706 yes) cgibin=yes ;; 1707 no) cgibin=no ;; 1708 *) AC_MSG_ERROR([bad value ${enableval} for enable-cgibins option]) ;; 1709esac],cgibin=yes) 1710AM_CONDITIONAL(USE_CGI, test x$cgibin = xyes) 1711if test x"${cgibin}" = x"yes"; then 1712 AC_DEFINE([USE_CGIBIN], [1], [Enable cgi-bin processes for Cygnal]) 1713fi 1714 1715dnl -------------------------------------------------------- 1716dnl Double buffer 1717dnl -------------------------------------------------------- 1718dnl Add an option for double buffering when rendering, currently only used by 1719dnl the frmaebuffer GUI. 1720dnl If defined, an internal software-buffer is used for rendering and is then 1721dnl copied to the video RAM. This avoids flicker and is faster for complex 1722dnl graphics, as video RAM access is usually slower. (strongly suggested) 1723AC_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 ;; 1727 no) doublebuf=no ;; 1728 *) AC_MSG_ERROR([bad value ${enableval} for enable-doublebuf option]) ;; 1729 esac], doublebuf=yes 1730) 1731AM_CONDITIONAL(ENABLE_DBUF, [test x"$doublebuf" = xyes]) 1732if test x$doublebuf = xyes; then 1733 AC_DEFINE(ENABLE_DOUBLE_BUFFERING, [1], [Disable double buffering for AGG]) 1734fi 1735 1736dnl -------------------------------------------------------- 1737dnl Offscreen buffer 1738dnl -------------------------------------------------------- 1739dnl This enables rendering to an offscreen buffer, instead of directly to window 1740AC_ARG_ENABLE(offscreen, 1741 AC_HELP_STRING([--enable-offscreen], [Enable support for rendering offscreen]), 1742 [case "${enableval}" in 1743 yes) offscreen=yes ;; 1744 no) offscreen=no ;; 1745 *) AC_MSG_ERROR([bad value ${enableval} for enable-offscreen option]) ;; 1746 esac], offscreen=no 1747) 1748 1749 1750dnl -------------------------------------------------------- 1751dnl SSH support selection 1752dnl -------------------------------------------------------- 1753dnl Enable using libssh with libnet 1754AC_ARG_ENABLE(ssh, 1755 AC_HELP_STRING([--enable-ssh], [Enable using SSH for network authentication]), 1756[case "${enableval}" in 1757 yes) build_ssh=yes ;; 1758 no) build_ssh=no ;; 1759 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ssh option]) ;; 1760esac], build_ssh=no) 1761 1762AM_CONDITIONAL(BUILD_SSH, test x"${build_ssh}" = xyes) 1763if test x"${build_ssh}" = xyes; then 1764 GNASH_PKG_FIND(ssh, [libssh/libssh.h], [libssh library], ssh_socket_init) 1765dnl GNASH_PKG_FIND(poppler, [popt.h], [Poppler library], poppler_init) 1766fi 1767if test x"${has_ssh}" = x"yes"; then 1768 AC_DEFINE([USE_SSH], [1], [Use SSH for authentication]) 1769fi 1770 1771dnl -------------------------------------------------------- 1772dnl SSL support selection 1773dnl -------------------------------------------------------- 1774 1775dnl Enable using OpenSSL with libnet. 1776AC_ARG_ENABLE(ssl, 1777 AC_HELP_STRING([--enable-ssl], [Enable using OpenSSL directly]), 1778[case "${enableval}" in 1779 yes) build_ssl=yes ;; 1780 no) build_ssl=no ;; 1781 *) AC_MSG_ERROR([bad value ${enableval} for --enable-ssl option]) ;; 1782esac], build_ssl=no) 1783 1784with_cert= 1785with_pem= 1786AM_CONDITIONAL(BUILD_SSL, test x"${build_ssl}" = xyes) 1787AC_ARG_WITH(cert, 1788 AC_HELP_STRING([--with-cert], 1789 [cert file for SSL]), 1790 with_cert=${withval}) 1791AC_ARG_WITH(pem, 1792 AC_HELP_STRING([--with-pe], 1793 [pem file for SSL]), 1794 with_pem=${withval}) 1795 1796if test x"${build_ssl}" = xyes; then 1797 GNASH_PKG_FIND(ssl, [openssl/ssl.h], [OpenSSL library], SSL_library_init) 1798fi 1799if test x"${has_ssl}" = x"yes"; then 1800 AC_DEFINE([USE_SSL], [1], [Use SSL for authentication]) 1801fi 1802 1803dnl ----------------------------------------------------------- 1804dnl Set the general plugins install policy here 1805dnl (NOTE: before GNASH_PATH_FIREFOX and GNASH_PATH_KDE*) 1806dnl ----------------------------------------------------------- 1807 1808AC_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]) ;; 1815 esac 1816 ], PLUGINS_INSTALL_POLICY=user) 1817 1818dnl ----------------------------------------------------------- 1819dnl Verify dependencies for requested GUIs are met, and 1820dnl disable build of the GUIS for which deps are NOT met 1821dnl ------------------------------------------------------------ 1822 1823if test x$build_gtk = xyes; then 1824 GNASH_PATH_GTK2 1825 GNASH_PATH_PANGO 1826 GNASH_PKG_FIND(atk, [atk/atk.h], [atk library], atk_focus_tracker_init, [1.0]) 1827 if test x"${build_ogl}" = xyes; then 1828 GNASH_PATH_GLEXT 1829 fi 1830 if test x"${build_cairo}" = xyes; then 1831 GNASH_PKG_FIND(cairo, [cairo.h], [cairo render library], cairo_status) 1832 fi 1833fi 1834 1835if test x"${build_qt4}" != xno; then 1836 GNASH_PATH_QT4 1837fi 1838 1839if test x"${build_qt4}" = xauto; then 1840 if test x"${has_qt4}" = xyes; then 1841 build_qt4=yes 1842 else 1843 build_qt4=no 1844 fi 1845fi 1846 1847if test x"${build_kde3}" != xno -o x"${build_qtopia3}" != xno; then 1848 GNASH_PATH_QT3 1849fi 1850 1851if test x"${build_kde3}" != xno; then 1852 GNASH_PATH_KDE3 1853fi 1854 1855 1856if test x"${build_kde3}" = xauto; then 1857 if test x"${has_qt3}" = xyes -a x"${has_kde3}" = xyes; then 1858 build_kde3=yes 1859 else 1860 build_kde3=no 1861 fi 1862fi 1863 1864dnl Check possibility to build DUMP gui, if requested 1865if test x"${build_dump}" != xno; then 1866 if test x"${build_agg}" = xyes; then 1867 build_dump=yes 1868 else 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); 1872 fi 1873 build_dump=no 1874 fi 1875fi 1876 1877dnl Check possibility to build FB gui, if requested 1878dnl FB dependency is a linux system (linux/fb.h) 1879if test x"${build_fb}" != xno; then 1880 if test x"${linux}" = xyes -o x"${android}" = xyes; then 1881 build_fb=yes 1882 else 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); 1886 fi 1887 AC_MSG_NOTICE([framebuffer GUI won't be built (non-linux platform)]) 1888 build_fb=no 1889 fi 1890fi 1891 1892dnl TODO: add checks for all other GUIs 1893 1894dnl ------------------------------- 1895dnl Input Device selection 1896dnl ------------------------------- 1897 1898dnl Multiple input devices are supported. These can all work in 1899dnl varying combinations, so several may be listed. These are only 1900dnl required when using the Framebuffer, as without the X11 desktop, 1901dnl Gnash has to handle all these internally. This can get 1902dnl messy, as one might want to use a touchscreen with a normal mouse 1903dnl or keyboard attached. 1904dnl By default, don't build any of these, as they are only for the Framebuffer 1905dnl running without X11. 1906if test x"${build_fb}" = xyes; then 1907 build_ps2mouse=no 1908 build_ps2keyboard=yes 1909 build_input_events=yes 1910 build_tslib=yes 1911 input_events="Input Devices, Touchscreen via Tslib" 1912else 1913 build_ps2mouse=no 1914 build_ps2keyboard=no 1915 build_input_events=no 1916 build_tslib=no 1917 input_events= 1918fi 1919AC_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' ' ' ` 1923 fi 1924 while test -n "${enableval}" ; do 1925 val=`echo ${enableval} | cut -d ' ' -f 1` 1926 case "${val}" in 1927 ps2m*|PS2m*|m*|M*) dnl a PS/2 style mouse 1928 build_ps2mouse=yes 1929 input_events="${input_events}, PS/2 Mouse" 1930 ;; 1931 ps2k*|PS2K*|k*|K*) dnl a PS/2 style keyboard 1932 build_ps2keyboard=yes 1933 input_events="${input_events}, PS/2 Keyboard" 1934 ;; 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 1938 ;; 1939 t*|T*) dnl use a touchscreen with tslib, which works like a mouse 1940 build_tslib=yes 1941 input_events="${input_events}, Touchscreen" 1942 ;; 1943 *) AC_MSG_ERROR([invalid input device list! ${enableval} given (accept: ps2mouse|keyboard|events,touchscreen)]) 1944 ;; 1945 esac 1946 enableval=`echo ${enableval} | cut -d ' ' -f 2-6` 1947 if test "x$val" = "x$enableval"; then 1948 break; 1949 fi 1950 done], 1951) 1952 1953if 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) 1956fi 1957AM_CONDITIONAL(ENABLE_TSLIB, [test x${ac_cv_header_tslib_h} != xno]) 1958 1959if test x"${build_ps2mouse}" = xyes; then 1960 AC_DEFINE(USE_MOUSE_PS2, [1], [Add support for a directly using a PS/2 Mouse]) 1961fi 1962AM_CONDITIONAL(ENABLE_MOUSE, [test x"${build_ps2mouse}" = xyes]) 1963 1964if test x"${build_ps2keyboard}" = xyes; then 1965 AC_DEFINE(USE_KEYBOARD_PS2, [1], [Add support for directly using a PS/2 Keyboard]) 1966fi 1967if test x"${build_input_events}" = xyes; then 1968 AC_DEFINE(USE_INPUT_EVENTS, [1], [Add support for a directly using Linux Input Event Devices]) 1969fi 1970AM_CONDITIONAL(ENABLE_INPUT_EVENTS, [test x"${build_input_events}" = xyes]) 1971dnl this is enabled if we have any input devices at all 1972AM_CONDITIONAL(ENABLE_INPUT_DEVICES, [test x"${input_events}" != x]) 1973 1974 1975dnl ----------------------------------------------------------- 1976dnl Try to ignore stupid dependencies 1977dnl ----------------------------------------------------------- 1978 1979AC_MSG_CHECKING(linker --as-needed support) 1980gcc_cv_ld_as_needed=no 1981# Check if linker supports --as-needed and --no-as-needed options 1982if $LD --help 2>/dev/null | grep as-needed > /dev/null; then 1983 gcc_cv_ld_as_needed=yes 1984fi 1985if test x"$gcc_cv_ld_as_needed" = xyes; then 1986 LDFLAGS="$LDFLAGS -Wl,--as-needed" 1987fi 1988AC_MSG_RESULT($gcc_cv_ld_as_needed) 1989 1990AC_DEFINE(USE_GIF, [1], [Use the GIF library]) 1991AC_DEFINE(USE_PNG, [1], [Use the PNG library]) 1992AM_CONDITIONAL(USE_GIF, true) 1993AM_CONDITIONAL(USE_PNG, true) 1994 1995AC_PATH_TOOL([AUTOTRACE], [autotrace]) 1996AC_HEADER_DIRENT 1997 1998dnl ----------------------------------------------------------------- 1999dnl PLUGIN RELATED STUFF 2000dnl ----------------------------------------------------------------- 2001 2002dnl !! This has been moved here to make --enable-npapi work 2003dnl !! All of plugin-related macro calls could be moved into 2004dnl !! a specialized macros/plugin.m4 2005 2006dnl ---------------------------------------------------- 2007dnl Add KPARTS support, if specified or KDE gui is built 2008dnl ---------------------------------------------------- 2009 2010AC_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]) ;; 2016esac],build_kparts3=$build_kde3) 2017 2018dnl -------------------------------------------------------- 2019dnl Add KPARTS 4.x support, if specified or KDE gui is built 2020dnl -------------------------------------------------------- 2021 2022AC_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]) ;; 2028esac],build_kparts4=$build_qt4) 2029 2030if test x"${build_kparts4}" != xno; then 2031 GNASH_PATH_KDE4 2032fi 2033 2034dnl ----------------------------------------------------------- 2035dnl Add NPAPI support, if specified or GTK or Qt4 gui is built 2036dnl ----------------------------------------------------------- 2037 2038AC_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 2041 yes) npapi=yes ;; 2042 no) npapi=no ;; 2043 *) AC_MSG_ERROR([bad value ${enableval} for disable-npapi option]) ;; 2044 esac], 2045 if test x$build_gtk = xyes -o x$build_qt4 = xyes; then 2046 npapi=yes 2047 fi 2048) 2049 2050if test x"$npapi" = x"yes"; then 2051 GNASH_PATH_NPAPI 2052fi 2053 2054dnl ----------------------------------------------------------------- 2055dnl Enable us to disable building all browser plugins in one command. 2056dnl ----------------------------------------------------------------- 2057 2058AC_ARG_ENABLE(plugins, 2059 AC_HELP_STRING([--disable-plugins], [Disable all browser plugins from building (default=no)]), 2060 [case "${enableval}" in 2061 yes) plugins=yes ;; 2062 no) plugins=no ;; 2063 *) AC_MSG_ERROR([bad value ${enableval} for disable-plugins option]) ;; 2064 esac], 2065 plugins=yes 2066) 2067if test x$plugins = xno; then 2068 npapi=no 2069 build_kparts3=no 2070 build_kparts4=no 2071fi 2072 2073 2074GNASH_PATH_FIREFOX 2075 2076dnl 2077dnl New versions of the NPAPI require const for this prototype, which currently 2078dnl seems to only be wit Ubuntu Oneiric. 2079AC_MSG_CHECKING([for const needed for NPP_GetMIMEDescription() prototype]) 2080npapi_flags="`echo "${NPAPI_CFLAGS}" | sed -e 's/-I//' -e 's/-DXP_UNIX//' | tr -d ' '`/npapi.h" 2081const_test="`grep NPP_GetMIMEDescription ${npapi_flags} | grep -c const`" 2082if test ${const_test} -eq 1; then 2083 AC_DEFINE(NPAPI_CONST, [1], [Newer versions use const in prototypes]) 2084 AC_MSG_RESULT([yes]) 2085else 2086 AC_MSG_RESULT([no]) 2087fi 2088 2089AC_TRY_COMPILE([#include <linux/input.h>], [ 2090 struct input_absinfo abs; 2091 abs.resolution = 0;; ], 2092 AC_DEFINE([ABSINFO_RESOLUTION], [1], [ABS Resolution field]) 2093) 2094 2095dnl ----------------------------------------------------------------- 2096dnl END OF PLUGIN RELATED STUFF 2097dnl ----------------------------------------------------------------- 2098 2099AM_CONDITIONAL(LIRC, [test x$lirc_ext = xyes]) 2100 2101AC_CHECK_HEADERS(getopt.h) 2102AC_CHECK_HEADERS(libgen.h) 2103AC_CHECK_HEADERS(pwd.h) 2104AC_CHECK_HEADERS(sys/utsname.h) 2105AC_CHECK_HEADERS(signal.h) 2106AC_CHECK_HEADERS(unistd.h) 2107AC_CHECK_HEADERS(sys/time.h) 2108AC_CHECK_HEADERS(linux/uinput.h, [uinput=yes], [uinput=no]) 2109AC_CHECK_LIB(bz2, BZ2_bzopen, [AC_SUBST(BZ2_LIBS, -lbz2)]) 2110AC_CHECK_LIB(c, getpwnam, AC_DEFINE(HAVE_GETPWNAM, 1, [Has getpwnam] )) 2111 2112AM_CONDITIONAL(HAS_UINPUT, [test x$uinput = xyes]) 2113 2114dnl X11 is needed for fltk (at least), 2115dnl and probably for many other guis too ... 2116dnl if ! test x$build_fb = xyes; then # <--- this is wrong as build_x is non-exclusive 2117dnl AC_PATH_XTRA 2118dnl AC_CHECK_LIB(Xmu, XmuCvtStringToOrientation) 2119dnl AC_CHECK_LIB(gmp, _gmp_get_memory_functions) 2120GNASH_PATH_X11 2121dnl fi 2122AM_CONDITIONAL(HAVE_X11, [test x${has_x11} = xyes]) 2123if test x${build_x11_device} = xyes -a x${has_x11} = xyes; then 2124 AC_DEFINE(BUILD_X11_DEVICE, [1], [Build the X11 device]) 2125fi 2126 2127dnl See if ipc_perm structure has the ipc_perm.key field, and if so, 2128dnl which variant of the name is used. 2129ipc_key=no 2130AC_TRY_COMPILE([ 2131 #include <sys/ipc.h> 2132 #include <sys/shm.h>], [ 2133 struct shmid_ds shmseg; 2134 key_t x = shmseg.shm_perm.key;], 2135 ipc_key=yes 2136 AC_DEFINE(IPC_PERM_KEY, [key], [Has the key field in ipc_perm]) 2137) 2138 2139if test x$ipc_key = xno; then 2140 AC_TRY_COMPILE([ 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]) 2146 ipc_key=yes 2147 ) 2148fi 2149 2150dnl If sysv semaphores functs are stubs (e.g. on Hurd), 2151dnl disable LocalConnection tests 2152AC_CHECK_FUNCS(semget, semget=yes) 2153AM_CONDITIONAL(HAVE_SEMGET, test x${semget} = xyes) 2154 2155AC_CACHE_CHECK([for finite], ac_cv_finite, 2156 [AC_TRY_COMPILE([ 2157 #include <math.h> 2158 #ifdef HAVE_IEEEFP_H 2159 #include <ieeefp.h> 2160 #endif], 2161 [double x; int y; y = finite(x);], 2162 ac_cv_finite=yes, 2163 ac_cv_finite=no 2164)]) 2165if test x"$ac_cv_finite" = x"yes"; then 2166 AC_SEARCH_LIBS(finite, m, 2167 [AC_DEFINE(HAVE_FINITE, [1], [Has finite])] 2168 ) 2169fi 2170 2171AC_LANG_PUSH(C++) 2172AC_CACHE_CHECK([for isfinite], ac_cv_isfinite, 2173 [AC_TRY_COMPILE([#include <cmath>], 2174 [using namespace std; double x; int y; y = isfinite(x);], 2175 ac_cv_isfinite=yes, 2176 ac_cv_isfinite=no 2177)]) 2178AC_LANG_POP(C++) 2179if 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]) 2184fi 2185 2186AC_LANG_PUSH(C++) 2187AC_CACHE_CHECK([whether $CXX implements __PRETTY_FUNCTION__], ac_cv_implements___PRETTY_FUNCTION__, [ 2188 AC_TRY_LINK([#include <cstdio> 2189], 2190 [ std::printf("%s", __PRETTY_FUNCTION__); ], 2191 [ ac_cv_implements___PRETTY_FUNCTION__="yes" ], 2192 [ ac_cv_implements___PRETTY_FUNCTION__="no" ] 2193 ) 2194]) 2195if test "x$ac_cv_implements___PRETTY_FUNCTION__" = "xyes" ; then 2196 AC_DEFINE(HAVE_PRETTY_FUNCTION, [1], [__PRETTY_FUNCTION__ is defined]) 2197fi 2198 2199AC_CACHE_CHECK([whether $CXX implements __FUNCTION__], ac_cv_implements___FUNCTION__, [ 2200 AC_TRY_LINK([#include <cstdio> 2201], 2202 [ std::printf("%s", __FUNCTION__); ], 2203 [ ac_cv_implements___FUNCTION__="yes" ], 2204 [ ac_cv_implements___FUNCTION__="no" ] 2205 ) 2206]) 2207if test "x$ac_cv_implements___FUNCTION__" = "xyes" ; then 2208 AC_DEFINE(HAVE_FUNCTION, [1], [__FUNCTION__ is defined]) 2209fi 2210 2211AC_CACHE_CHECK([whether $CXX implements __func__], ac_cv_implements___func__, [ 2212 AC_TRY_LINK([#include <cstdio> 2213], 2214 [ std::printf("%s", __func__); ], 2215 [ ac_cv_implements___func__="yes" ], 2216 [ ac_cv_implements___func__="no" ] 2217 ) 2218]) 2219if test "x$ac_cv_implements___func__" = "xyes" ; then 2220 AC_DEFINE(HAVE_func, [1], [__func__ is defined]) 2221fi 2222AC_LANG_POP(C++) 2223AC_REPLACE_FUNCS(getopt) 2224 2225dnl Date portability stuff, used in server/asobj/Date.cpp 2226AC_CHECK_FUNCS(gettimeofday) 2227AC_CHECK_FUNCS(ftime) 2228AC_CHECK_FUNCS(tzset) 2229AC_CHECK_FUNCS(localtime_r) 2230 2231AC_CACHE_CHECK([whether struct tm has tm_gmtoff], ac_cv_tm_gmtoff, [ 2232 AC_TRY_LINK([ 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. 2238 */ 2239// #define _BSD_SOURCE 1 2240#include <time.h> 2241], 2242 [ struct tm tm; long l = tm.tm_gmtoff; ], 2243 [ ac_cv_tm_gmtoff="yes" ], 2244 [ ac_cv_tm_gmtoff="no" ] 2245 ) 2246]) 2247if test "x$ac_cv_tm_gmtoff" = "xyes" ; then 2248 AC_DEFINE(HAVE_TM_GMTOFF, [1], [struct tm has member tm_gmtoff]) 2249fi 2250 2251AC_CACHE_CHECK([whether timezone is a long], ac_cv_long_timezone, [ 2252 AC_TRY_LINK([ 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). 2258 */ 2259#include <stdio.h> 2260#include <time.h> 2261extern long timezone; 2262 ], 2263 [ printf("%ld", timezone); ], 2264 [ ac_cv_long_timezone="yes" ], 2265 [ ac_cv_long_timezone="no" ] 2266 ) 2267]) 2268if test "x$ac_cv_long_timezone" = "xyes" ; then 2269 AC_DEFINE(HAVE_LONG_TIMEZONE, [1], [extern timezone is a long integer, not a function]) 2270fi 2271 2272AC_CHECK_FUNCS(mkstemps) 2273AC_CHECK_FUNCS(sysconf) 2274AC_CHECK_FUNCS(shmget shmat shmdt mmap) 2275AC_CHECK_FUNCS(scandir) dnl supported by BSD and Linux, but you never know... 2276AC_CHECK_LIB(rt, clock_gettime) 2277AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Has clock_gettime()] )) 2278dnl Look for Win32 networking stuff 2279AC_CHECK_HEADERS(winsock.h) 2280AC_CHECK_HEADERS(winsock2.h) 2281 2282GNASH_PKG_FIND(nspr, [nspr.h], [Netscape Portable Runtime (NSPR)], PR_Init) 2283 2284AC_PATH_TOOL(WINDRES, [windres]) 2285AC_SUBST(WINDRES) 2286 2287GNASH_PKG_FIND(z, [zlib.h], [zlib compression library], compress) 2288GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init) 2289GNASH_PKG_FIND(png, [png.h], [png images], png_info_init) 2290GNASH_PKG_FIND(gif, [gif_lib.h], [gif images], DGifOpen) 2291if 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} 2295fi 2296if test x"$testsuite" = x"yes"; then 2297 GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h]) 2298fi 2299 2300GNASH_PKG_FIND(speex, [speex/speex.h], [speex audio codec], speex_decode_int) 2301AM_CONDITIONAL(HAVE_SPEEX, [ test x$has_speex = xyes ]) 2302if test x$has_speex = xyes ; then 2303 AC_DEFINE([DECODING_SPEEX], [1], [Speex codec available]) 2304fi 2305 2306GNASH_PKG_FIND(speexdsp, [speex/speex_resampler.h], [speex DSP utilities], speex_resampler_process_int) 2307if test x$has_speexdsp = xyes ; then 2308 AC_DEFINE([RESAMPLING_SPEEX], [1], [Speex resampler available]) 2309fi 2310 2311dnl Find freetype and fontconfig 2312GNASH_PATH_FREETYPE2 2313GNASH_PKG_FIND(fontconfig, [fontconfig/fontconfig.h], [fontconfig library], FcFontMatch) 2314 2315GNASH_PATH_CURL 2316 2317if test x$cross_compiling = xno; then 2318 AC_PATH_MING 2319fi 2320 2321if test x"$MING_VERSION_CODE" = x; then 2322 MING_VERSION_CODE=00000000 2323fi 2324 2325AM_CONDITIONAL(ENABLE_MING, 2326 [ test x"$MAKESWF" != x -a $MING_VERSION_CODE -gt 00040000 ]) 2327 2328AM_CONDITIONAL(MING_VERSION_0_4, 2329 [ test $MING_VERSION_CODE -ge 00040000 ]) 2330AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS, 2331 [ test $MING_VERSION_CODE -ge 00040002 ]) 2332AM_CONDITIONAL(MING_SUPPORTS_INIT_ACTIONS, 2333 [ test $MING_VERSION_CODE -ge 00040004 ]) 2334AM_CONDITIONAL(MING_SUPPORTS_REPLACE_TAG, 2335 [ test $MING_VERSION_CODE -ge 00040005 ]) 2336AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_ADD_CHARACTER, 2337 [ test $MING_VERSION_CODE -ge 00040005 ]) 2338AM_CONDITIONAL(MING_SUPPORTS_STREAMING_SOUND, 2339 [ test $MING_VERSION_CODE -ge 00040006 ]) 2340AM_CONDITIONAL(MING_SUPPORTS_SWFBUTTON_SET_DEPTH, 2341 [ test $MING_VERSION_CODE -ge 00040006 ]) 2342AM_CONDITIONAL(MING_VERSION_0_4_3, 2343 [ test $MING_VERSION_CODE -ge 00040300 ]) 2344AM_CONDITIONAL(MING_VERSION_0_4_4, 2345 [ test $MING_VERSION_CODE -ge 00040400 ]) 2346 2347if 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 2352 dir=`dirname $0` 2353 dir=`cd ${dir} && pwd` 2354 withval="${dir}/testsuite/swfdec/src/test" 2355 fi 2356 SWFDEC_TESTSUITE=${withval} 2357 ) 2358 AC_SUBST(SWFDEC_TESTSUITE) 2359fi 2360AM_CONDITIONAL(ENABLE_SWFDEC_TESTSUITE, [ test x"$SWFDEC_TESTSUITE" != x ]) 2361 2362if 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}";; 2370 esac]) 2371 AC_SUBST(HTTP_TESTSUITE) 2372fi 2373AM_CONDITIONAL(ENABLE_HTTP_TESTSUITE, [ test x"$HTTP_TESTSUITE" != x ]) 2374 2375if 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 2380 no) RED5_HOST="" ;; 2381 yes) RED5_HOST="www.gnashdev.org" ;; 2382 *) RED5_HOST="${enableval}";; 2383 esac 2384 if test x"$RED5_HOST" != x -a x"$curl_rtmp_support" != x; then 2385 RED5_TESTING=yes 2386 fi]) 2387 AC_SUBST(RED5_HOST) 2388fi 2389AM_CONDITIONAL(ENABLE_RED5_TESTING, [ test x"$RED5_TESTING" != x ]) 2390 2391if 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}";; 2399 esac]) 2400 AC_SUBST(RTMPY_HOST) 2401fi 2402AM_CONDITIONAL(ENABLE_RTMPY_TESTING, [ test x"$RTMPY_HOST" != x ]) 2403 2404dnl The name might differ between systems. 2405if test x"$testsuite" = x"yes"; then 2406AC_PATH_PROGS(NETCAT, [nc netcat]) 2407AC_PATH_PROG(WGET, wget) 2408fi 2409AM_CONDITIONAL(HAS_NETCAT, [ test x"$NETCAT" != x ]) 2410AM_CONDITIONAL(HAS_WGET, [ test x"$WGET" != x ]) 2411 2412dnl 2413dnl See if we can use the swfmill, mtasc, swfc and haxe based testsuites 2414dnl 2415if test x"$testsuite" = x"yes" -a x$cross_compiling = xno; then 2416 AC_PATH_PROG(AS3COMPILE, as3compile) 2417 AC_PATH_PROG(SWFC, swfc) 2418 AC_PATH_SWFMILL 2419 AC_PATH_MTASC 2420 AC_PATH_HAXE 2421fi 2422 2423AM_CONDITIONAL(ENABLE_SWFMILL, [ test x"$SWFMILL" != x ]) 2424AM_CONDITIONAL(SWFMILL_AS3_SUPPORT, 2425 [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ]) 2426 2427dnl SWFMILL versions older than 0.3 didn't get function2 flags order correctly 2428AM_CONDITIONAL(SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT, 2429 [ test x"$SWFMILL" != x && test $SWFMILL_VERSION -ge 00021206 ]) 2430 2431AM_CONDITIONAL(ENABLE_AS3COMPILE, [ test x"$AS3COMPILE" != x ]) 2432AM_CONDITIONAL(ENABLE_MTASC, [ test x"$MTASC" != x ]) 2433AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ]) 2434AM_CONDITIONAL(ENABLE_SWFC, [ test x"$SWFC" != x ]) 2435AM_CONDITIONAL(ENABLE_HAXE, [ test x"$HAXE" != x ]) 2436 2437AC_PATH_PROG(DOXYGEN, doxygen) 2438AM_CONDITIONAL(ENABLE_DOXYGEN, [ test x"$DOXYGEN" != x ]) 2439 2440AM_CONDITIONAL(HAVE_KDE3, [test x$has_kde3 = xyes]) 2441AM_CONDITIONAL(HAVE_KDE4, [test x$has_kde4 = xyes]) 2442AM_CONDITIONAL(HAVE_QT3, [test x$has_qt3 = xyes]) 2443AM_CONDITIONAL(HAVE_QT4, [test x$has_qt4 = xyes]) 2444 2445AM_CONDITIONAL([QT_X11], [test "$platform" = "X11"]) 2446AM_CONDITIONAL([QTOPIA], [test "$platform" = "Qtopia"]) 2447AM_CONDITIONAL([QT_OSX], [test "$platform" = "OSX"]) 2448AM_CONDITIONAL([QT_OS9], [test "$platform" = "OS9"]) 2449AM_CONDITIONAL([QT_WIN32], [test "$platform" = "Win32"]) 2450 2451dnl Need GLIB for both GTK and GST 2452if test x"${build_gtk}" = xyes -o x"${build_media_gst}" = xyes; then 2453 GNASH_PATH_GLIB 2454fi 2455 2456AM_CONDITIONAL(HAVE_GLIB, [ test x"${has_glib}" = xyes ]) 2457 2458if 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"]) 2461 fi 2462fi 2463 2464if 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."]) 2467 fi 2468 if test "x$WINDRES" = x; then 2469 AC_MSG_ERROR(["On Win32, NPAPI plugin requires windres."]) 2470 fi 2471fi 2472 2473dnl Need GLIB for NPAPI plugin 2474if test x$npapi = xyes; then 2475 GNASH_PATH_GLIB 2476fi 2477 2478dnl if kde isn't installed, even if it's specified, don't try to build 2479dnl the KPARTS plugin, which is KDE based. 2480if test x$has_kde3 = xno -a x$build_kparts3 = xyes; then 2481 build_kparts3=no 2482 AC_MSG_WARN(["Disabling KPARTS 3.x plugin, no KDE development found"]) 2483fi 2484 2485if 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!"]) 2487fi 2488if test x$has_kde4 = xno -a x$build_kparts4 = xyes; then 2489 build_kparts4=no 2490 AC_MSG_WARN(["Disabling KPARTS 4.x plugin, no KDE 4.x development found"]) 2491fi 2492 2493if 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!"]) 2495fi 2496 2497AM_CONDITIONAL(BUILD_QTOPIA3_GUI, [ test x$build_qtopia3 = xyes ]) 2498AM_CONDITIONAL(BUILD_QTOPIA4_GUI, [ test x$build_qtopia4 = xyes ]) 2499 2500AM_CONDITIONAL(BUILD_KDE3_GUI, [ test x$build_kde3 = xyes ]) 2501AM_CONDITIONAL(BUILD_QT4_GUI, [ test x$build_qt4 = xyes ]) 2502 2503AM_CONDITIONAL(BUILD_GTK_GUI, [ test x$build_gtk = xyes ]) 2504AM_CONDITIONAL(BUILD_FLTK_GUI, [ test x$build_fltk = xyes ]) 2505AM_CONDITIONAL(BUILD_SDL_GUI, [ test x$build_sdl = xyes ]) 2506AM_CONDITIONAL(BUILD_FB_GUI, [ test x$build_fb = xyes ]) 2507AM_CONDITIONAL(BUILD_AQUA_GUI, [ test x$build_aqua = xyes ]) 2508AM_CONDITIONAL(BUILD_DUMP_GUI, [ test x$build_dump = xyes ]) 2509AM_CONDITIONAL(BUILD_AMIGAOS4_GUI, [ test x$build_aos4 = xyes ]) 2510AM_CONDITIONAL(BUILD_HAIKU_GUI, [ test x$build_haiku = xyes ]) 2511 2512# plugin building flags 2513AM_CONDITIONAL(NPAPI, [test x"${npapi}" = xyes]) 2514AM_CONDITIONAL(KPARTS3, [test x"${build_kparts3}" = xyes]) 2515AM_CONDITIONAL(KPARTS4, [test x"${build_kparts4}" = xyes]) 2516 2517if test x"${build_gles1}"; then 2518 GNASH_PATH_GLES 2519fi 2520 2521dnl only Linux supports /dev/fb0 2522if test x"${build_rawfb_device}" = xyes; then 2523 AC_DEFINE([BUILD_RAWFB_DEVICE], [1], [Use raw Framebuffer device support]) 2524fi 2525 2526if 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]) 2529fi 2530 2531AM_CONDITIONAL(BUILD_VAAPI_DEVICE, [test x"${use_libva}" = xyes]) 2532AM_CONDITIONAL(BUILD_EGL_DEVICE, [test x"${build_egl_device}" = xyes]) 2533AM_CONDITIONAL(BUILD_DIRECTFB_DEVICE, [ test x${build_directfb_device} = xyes]) 2534AM_CONDITIONAL(BUILD_RAWFB_DEVICE, [ test x${build_rawfb_device} = xyes]) 2535AM_CONDITIONAL(BUILD_X11_DEVICE, [test x${build_x11_device} = xyes]) 2536 2537if 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 2541 yes) ghelp=yes ;; 2542 no) ghelp=no ;; 2543 *) AC_MSG_ERROR([bad value ${enableval} for enable-ghelp option]) ;; 2544 esac], ghelp=no 2545 ) 2546 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]) 2551 2552 if test x"$SCROLLKEEPER" = x -o x"$SCROLLUPDATE" = x -o x"$SCROLLINSTALL" = x ; then 2553 ghelp=no 2554 AC_MSG_WARN([You need to install scrollkeeper for gnome help]) 2555 fi 2556 fi 2557fi 2558AM_CONDITIONAL(GHELP, [test x${ghelp} = xyes]) 2559 2560if test x${build_fltk} = xyes; then 2561 GNASH_PKG_FIND(Xft, [Xft.h], [xft library], XftGlyphRender) 2562fi 2563 2564dnl Some systems have a pervered set of dependencies. 2565dnl Fedora Core 6 appears to have a dependency on expat for fontconfig. 2566dnl We only need the library, but this is the easy wind to find it. 2567GNASH_PKG_FIND(expat, [expat.h], [Expat library], XML_ErrorString) 2568 2569dnl these conditionals were moved out of kde.m4 2570AM_CONDITIONAL(HAS_KDE3, [test x$has_kde3 = xyes]) 2571# used to disable x11-specific stuff on special platforms 2572AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no") 2573AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no") 2574AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes") 2575 2576AM_CONDITIONAL(HAVE_GLEXT, [test x$glext = xyes]) 2577 2578dnl We don't have GTKGLExt, so default to SDL, and don't build the Firefox plugin 2579if 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]) 2582 fi 2583 gui=sdl 2584 npapi=no 2585 AC_MSG_WARN([GTK2 specified for the GUI, but GtkGlExt is not present. Trying SDL instead.]) 2586fi 2587 2588missing_codecs="" 2589if 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}]) 2593 fi 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]) 2603 fi 2604 done 2605 fi 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]) 2614 fi 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]) 2622 fi 2623fi 2624 2625AM_CONDITIONAL(HAVE_CAIRO, [true]) 2626AM_CONDITIONAL(HAVE_OPENGL, [true]) 2627 2628AM_CONDITIONAL(USE_SOUND_SDL, test x$build_sound_sdl = xyes) 2629AM_CONDITIONAL(USE_SOUND_AHI, test x$build_sound_ahi = xyes) 2630AM_CONDITIONAL(USE_SOUND_MKIT, test x$build_sound_mkit = xyes) 2631AM_CONDITIONAL(USE_FFMPEG_ENGINE, test x"${build_media_ffmpeg}" = x"yes") 2632AM_CONDITIONAL(USE_GST_ENGINE, test x"${build_media_gst}" = x"yes") 2633AM_CONDITIONAL(HAVE_OPENGL, test x"${OPENGL_LIBS}" != x) 2634dnl for now the Haiku media handler is experimental 2635AM_CONDITIONAL(USE_HAIKU_ENGINE, test x"$build_media_haiku" = xyes) 2636 2637if test x"${build_media_ffmpeg}" = x"yes"; then 2638 AC_DEFINE([ENABLE_FFMPEG_MEDIA], [1], [Use FFmpeg for media decoding]) 2639fi 2640 2641if test x"${build_media_gst}" = x"yes"; then 2642 AC_DEFINE([ENABLE_GST_MEDIA], [1], [Use gstreamer for media decoding]) 2643fi 2644 2645if test x"${build_media_haiku}" = x"yes"; then 2646 AC_DEFINE([ENABLE_HAIKU_MEDIA], [1], [Use haiku for media decoding]) 2647fi 2648 2649if 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]); 2652 else 2653 AC_DEFINE([SOUND_MKIT], [1], [Use Haiku Media Kit for sound handling]) 2654 fi 2655fi 2656 2657if test x"${build_sound_sdl}" = xyes; then 2658 AC_DEFINE([SOUND_SDL], [1], [Use SDL for sound handling]) 2659fi 2660 2661if 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]); 2664 else 2665 AC_DEFINE([SOUND_AHI], [1], [Use AmigaOS AHI for sound handling]) 2666 fi 2667fi 2668 2669if 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")]) 2674 fi 2675fi 2676 2677AM_CONDITIONAL(HAVE_FLTK2, [ test x$has_fltk2 = xyes ]) 2678AM_CONDITIONAL(HAS_XFT, [ test x$has_xft = xyes ]) 2679 2680GNASH_DOCBOOK 2681AM_CONDITIONAL(ENABLE_INFO, test x${INSTALL_INFO} != x) 2682AM_CONDITIONAL(DOCBOOK, test x$docbook = xyes) 2683AM_CONDITIONAL(ENABLE_TEXI, [ test x"$DB2X_TEXI" != x -o x"$DB2X_TEXIXML" != x ]) 2684AM_CONDITIONAL(ENABLE_PDF, [ test x"$DB2X_PDF" ]) 2685AM_CONDITIONAL(ENABLE_HTML, [ test x"$XSLTPROC" != x -a x"$docbook_styles" != x ]) 2686AM_CONDITIONAL(ENABLE_FOP, [ test x"$FOP" != x -a x"$docbook_styles" != x ]) 2687AM_CONDITIONAL(ENABLE_XMLTEX, [ test x"$PDFXMLTEX" != x -a x"$XSLTPROC" != x -a x"$docbook_styles" != x ]) 2688AM_CONDITIONAL(ENABLE_MAN, [ test x"$DB2X_MAN" != x -o x"$DB2X_MANXML" != x ]) 2689AM_CONDITIONAL(HAVE_AGG, [test x"${AGG_LIBS}" != x]) 2690 2691dnl Define winsock if we're on windows. We could do something complicated, 2692dnl but since AC_EXEEXT does it for us, we'll do this the easy way. 2693if test x"$EXEEXT" = "exe"; then 2694 AC_DEFINE(HAVE_WINSOCK,1,[This is defined is we are on Win32]) 2695fi 2696 2697dnl **************************************** 2698dnl *** Check for ELF visibility support *** 2699dnl **************************************** 2700 2701dnl Enable visibility by default, disabled if extensions are enabled 2702AC_ARG_ENABLE([visibility], 2703 AC_HELP_STRING([--enable-visibility], [Use ELF visibility attributes]) 2704AC_HELP_STRING([--disable-visibility], [Disable ELF visibility]), [], [ 2705 if test x"$extensions_support" != x"no"; then 2706 enable_visibility=no 2707 else 2708 enable_visibility=yes 2709 fi]) 2710 2711if 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( 2717 [ 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; } 2721 ])], 2722 [ 2723 AC_DEFINE([HAVE_GNUC_VISIBILITY], [1], [Define this for GCC-visibility.]) 2724 AC_MSG_RESULT([yes]) 2725 ], 2726 [ 2727 AC_MSG_RESULT([no]) 2728 ] 2729 ) 2730 CFLAGS="$save_CFLAGS" 2731fi 2732 2733AC_ARG_ENABLE([pch], 2734 AC_HELP_STRING([--enable-pch], [Enable precompiled header support]), [], [enable_pch=no]) 2735 2736AM_CONDITIONAL([ENABLE_PCH], [test x"$enable_pch" != x"no"]) 2737 2738PCH_FLAGS="-include all-includes.h -Winvalid-pch" 2739AC_SUBST(PCH_FLAGS) 2740 2741GNASH_PATH_PTHREADS 2742 2743GNASH_PATH_BOOST 2744 2745AC_ARG_ENABLE([strict], 2746 AC_HELP_STRING([--enable-strict],[Accept only standards compliant code (GCC only)]), 2747 [case "${enableval}" in 2748 yes) strict=yes ;; 2749 no) strict=no ;; 2750 *) AC_MSG_ERROR([bad value ${enableval} for --enable-strict option]) ;; 2751 esac], 2752 [strict=no] 2753) 2754 2755if test x"$strict" = x"yes" -a x$build_agg = xyes; then 2756 AC_MSG_ERROR([agg renderer will fail with --enable-strict.]); 2757fi 2758 2759# We want warnings, lots of warnings :-) 2760# It should be possible to build with -ansi, not with 2761# -pedantic because of agg. 2762# 2763# -ansi was actually dropped because it hides 'fileno', which 2764# is used in a few places 2765# 2766if test x"$GCC" = x"yes"; then 2767 CXXFLAGS="$CXXFLAGS \ 2768 $CROSS_CXXFLAGS \ 2769 -W \ 2770 -Wall \ 2771 -Wcast-qual \ 2772 -Wpointer-arith \ 2773 -Wreturn-type \ 2774 -Wnon-virtual-dtor \ 2775 -Wunused \ 2776 " 2777 CFLAGS="$CFLAGS \ 2778 $CROSS_CXXFLAGS \ 2779 -W \ 2780 -Wall \ 2781 -Wcast-align \ 2782 -Wcast-qual \ 2783 -Wpointer-arith \ 2784 -Wreturn-type \ 2785 -Wmissing-declarations \ 2786 -Wmissing-prototypes \ 2787 -Wstrict-prototypes \ 2788 " 2789 if test x"$strict" = x"yes"; then 2790 CXXFLAGS="$CXXFLAGS \ 2791 -Wextra \ 2792 -pedantic \ 2793 -Wno-long-long \ 2794 " 2795 2796 CFLAGS="$CFLAGS \ 2797 -pedantic \ 2798 -Wno-long-long \ 2799 -ansi \ 2800 " 2801 fi 2802fi 2803 2804AC_ARG_ENABLE([cassert], 2805 AC_HELP_STRING([--disable-cassert],[Disable assertion checking]), 2806 [case "${enableval}" in 2807 yes) cassert=yes ;; 2808 no) cassert=no ;; 2809 *) AC_MSG_ERROR([bad value ${enableval} for --enable-cassert option]) ;; 2810 esac], 2811 [cassert=yes] 2812) 2813 2814if test x"$cassert" = x"no"; then 2815 CXXFLAGS="$CXXFLAGS \ 2816 -DNDEBUG \ 2817 " 2818 CFLAGS="$CFLAGS \ 2819 -DNDEBUG \ 2820 " 2821fi 2822 2823dnl /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */ 2824AC_DEFUN([CHECK_VISIBILITY_GCC_BUG], 2825 [ 2826 AC_CACHE_CHECK([if -fvisibility-inlines-hidden is broken], ac_cv_gcc_visibility_bug, [ 2827 AC_LANG_PUSH(C++) 2828 save_CFLAGS=$CFLAGS 2829 save_CXXFLAGS=$CXXFLAGS 2830 save_LDFLAGS=$LDFLAGS 2831 CFLAGS="-fPIC -O0" 2832 CXXFLAGS="-fPIC -fvisibility-inlines-hidden -O0" 2833 LDFLAGS="$LDFLAGS -shared -fPIC" 2834 2835 AC_TRY_LINK( 2836 [ 2837 template<typename CharT> 2838 struct VisTest 2839 { 2840 inline VisTest (); 2841 }; 2842 template<typename CharT> 2843 inline VisTest<CharT>::VisTest() 2844 {} 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 ) 2848 { 2849 VisTest<char> a; 2850 return 0; 2851 } 2852 ], [], 2853 ac_cv_gcc_visibility_bug=no, ac_cv_gcc_visibility_bug=yes) 2854 2855 CFLAGS=$save_CFLAGS 2856 CXXFLAGS=$save_CXXFLAGS 2857 LDFLAGS=$save_LDFLAGS 2858 AC_LANG_POP(C++) 2859 ] 2860 ) 2861 if test x$ac_cv_gcc_visibility_bug = xno; then 2862 CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden" 2863 fi 2864 ] 2865) 2866 2867CHECK_VISIBILITY_GCC_BUG 2868 2869if test x$ac_cv_gcc_visibility_bug = xno; then 2870 AC_LANG_PUSH(C++) 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" 2880 AC_LANG_POP(C++) 2881fi 2882 2883 2884AM_CONDITIONAL(VISIBILITY_WORKS, test x"$ac_cv_gcc_visibility" = xyes) 2885 2886if test x"$ac_cv_gcc_visibility" = xyes -a x"$enable_visibility" != xno; then 2887 CXXFLAGS="$CXXFLAGS -fvisibility=hidden" 2888fi 2889 2890AC_ARG_ENABLE([harden], 2891 AC_HELP_STRING([--disable-harden],[Disable hardening]), 2892 [case "${enableval}" in 2893 yes) harden=yes ;; 2894 no) harden=no ;; 2895 *) AC_MSG_ERROR([bad value ${enableval} for --enable-harden option]) ;; 2896 esac], 2897 [harden=yes] 2898) 2899 2900AC_DEFUN([ADD_HARDENING_FLAGS],[ 2901 AX_APPEND_COMPILE_FLAGS([-fpie -fPIE -Wformat -Werror=format-security]) 2902 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"])]) 2906]) 2907 2908if test x"$harden" = x"yes"; then 2909 CPPFLAGS="${CPPFLAGS} -D_FORTIFY_SOURCE=2" 2910 2911 ADD_HARDENING_FLAGS 2912 AC_LANG_PUSH(C++) 2913 ADD_HARDENING_FLAGS 2914 AC_LANG_POP(C++) 2915 2916 AX_APPEND_LINK_FLAGS([-fPIE -pie -Wl,-z,relro -Wl,-z,now]) 2917fi 2918 2919dnl Define convenience constants so Gnash can print out the 2920dnl default configuration of the build. 2921RENDERER_CONFIG="${renderer_list}" 2922RENDERER_LIBS= 2923for rend in `echo "${add_renderer}" | tr ',' ' '`; do 2924 RENDERER_LIBS="${RENDERER_LIBS} \$(top_builddir)/librender/libgnash${rend}.la" 2925done 2926AC_SUBST(RENDERER_LIBS) 2927AC_SUBST(RENDERER_CONFIG) 2928 2929HWACCEL_CONFIG="${device_list}" 2930AC_SUBST(HWACCEL_CONFIG) 2931 2932dnl check for missing libraries and disable them. 2933if 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.]) 2938 fi 2939 done 2940 fi 2941fi 2942 2943dnl ========= Check for GConf 2944 2945AC_MSG_CHECKING([whether GConf support is requested]) 2946AC_ARG_WITH([gconf], 2947 [AS_HELP_STRING([--without-gconf], 2948 [Disable the use of gconf])], 2949 [], 2950 [case "${host}" in 2951 *-cygwin* | *-mingw* | *-pw32*) with_gconf=no ;; 2952 *) with_gconf=yes ;; 2953 esac]) 2954AC_MSG_RESULT([$with_gconf]) 2955 2956AM_CONDITIONAL([WITH_GCONF],[test "$with_gconf" = "yes"]) 2957 2958if 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]) 2961 2962 AM_GCONF_SOURCE_2 2963 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]) 2967 fi 2968else 2969 AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL],false) 2970fi 2971 2972 2973CYGNAL_PATHS 2974 2975SUPPORTED_GUIS= 2976if test x$build_qtopia3 = xyes; then 2977 SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia3" 2978fi 2979if test x$build_qtopia4 = xyes; then 2980 SUPPORTED_GUIS="${SUPPORTED_GUIS},qtopia4" 2981fi 2982if test x$build_fb = xyes; then 2983 SUPPORTED_GUIS="${SUPPORTED_GUIS},fb" 2984fi 2985if test x$build_fltk = xyes; then 2986 SUPPORTED_GUIS="${SUPPORTED_GUIS},fltk" 2987fi 2988if test x$build_kde3 = xyes; then 2989 SUPPORTED_GUIS="${SUPPORTED_GUIS},kde3" 2990fi 2991if test x$build_qt4 = xyes; then 2992 SUPPORTED_GUIS="${SUPPORTED_GUIS},qt4" 2993fi 2994if test x$build_gtk = xyes; then 2995 SUPPORTED_GUIS="${SUPPORTED_GUIS},gtk" 2996fi 2997if test x$build_sdl = xyes; then 2998 SUPPORTED_GUIS="${SUPPORTED_GUIS},sdl" 2999fi 3000if test x$build_aqua = xyes; then 3001 SUPPORTED_GUIS="${SUPPORTED_GUIS},aqua" 3002fi 3003if test x$build_dump = xyes; then 3004 SUPPORTED_GUIS="${SUPPORTED_GUIS},dump" 3005fi 3006if test x$build_aos4 = xyes; then 3007 SUPPORTED_GUIS="${SUPPORTED_GUIS},aos4" 3008fi 3009if test x$build_haiku = xyes; then 3010 SUPPORTED_GUIS="${SUPPORTED_GUIS},haiku" 3011fi 3012SUPPORTED_GUIS="`echo ${SUPPORTED_GUIS} | sed 's/,//'`" # Strip leading comma 3013AC_SUBST(SUPPORTED_GUIS) 3014 3015AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all/cygnalrc.in) 3016AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc:testsuite/libbase.all/gnashrc.in) 3017AC_CONFIG_LINKS(testsuite/libbase.all/gnashrc-local:testsuite/libbase.all/gnashrc-local.in) 3018 3019AC_CONFIG_FILES( 3020gnash.pc:gnash.pc.in 3021desktop/gnash-gtk-launcher:desktop/gnash-gtk-launcher.in 3022desktop/gnash-qt-launcher:desktop/gnash-qt-launcher.in 3023) 3024 3025AC_OUTPUT(Makefile 3026desktop/Makefile 3027po/Makefile 3028libmedia/Makefile 3029libsound/Makefile 3030libbase/Makefile 3031libcore/Makefile 3032libcore/vm/Makefile 3033libcore/parser/Makefile 3034librender/Makefile 3035utilities/Makefile 3036doc/Makefile 3037doc/C/Makefile 3038doc/Doxyfile 3039testsuite/Makefile 3040testsuite/media/Makefile 3041testsuite/libbase.all/Makefile 3042testsuite/as3compile.all/Makefile 3043testsuite/actionscript.all/Makefile 3044testsuite/samples/Makefile 3045testsuite/swfdec/Makefile 3046testsuite/misc-ming.all/Makefile 3047testsuite/misc-ming.all/action_order/Makefile 3048testsuite/misc-ming.all/sound/Makefile 3049testsuite/misc-ming.all/displaylist_depths/Makefile 3050testsuite/misc-ming.all/init_action/Makefile 3051testsuite/misc-ming.all/loop/Makefile 3052testsuite/misc-ming.all/loading/Makefile 3053testsuite/misc-ming.all/register_class/Makefile 3054testsuite/misc-mtasc.all/Makefile 3055testsuite/misc-haxe.all/Makefile 3056testsuite/misc-haxe.all/classes.all/Makefile 3057testsuite/misc-swfmill.all/Makefile 3058testsuite/misc-swfmill.all/trace-as2/Makefile 3059testsuite/misc-swfmill.all/trace-as3/Makefile 3060testsuite/misc-swfc.all/Makefile 3061testsuite/network.all/Makefile 3062testsuite/movies.all/Makefile 3063testsuite/libcore.all/Makefile 3064testsuite/libmedia.all/Makefile 3065gui/Makefile 3066gui/Info.plist 3067gui/pythonmod/Makefile 3068extensions/Makefile 3069extensions/dejagnu/Makefile 3070extensions/mysql/Makefile 3071extensions/fileio/Makefile 3072extensions/gtk2/Makefile 3073extensions/lirc/Makefile 3074extensions/dbus/Makefile 3075plugin/Makefile 3076plugin/npapi/Makefile 3077plugin/klash/Makefile 3078plugin/klash4/Makefile 3079plugin/win32/Makefile 3080plugin/aos4/Makefile 3081libdevice/Makefile 3082cygnal/Makefile 3083cygnal/libnet/Makefile 3084cygnal/libamf/Makefile 3085cygnal/cgi-bin/Makefile 3086cygnal/cgi-bin/echo/Makefile 3087cygnal/cgi-bin/oflaDemo/Makefile 3088cygnal/cgi-bin/fitcDemo/Makefile 3089cygnal/testsuite/Makefile 3090cygnal/testsuite/libamf.all/Makefile 3091cygnal/testsuite/libnet.all/Makefile 3092cygnal/testsuite/cygnal.all/Makefile 3093) 3094 3095### 3096########################## Final report begins... ############################ 3097### 3098 3099dnl Create temporary directory in a secure way 3100tmp=`mktemp -d ${TMPDIR=/tmp}/gnash-configure-XXXXXX` 3101if test \! -n "$tmp" || test \! -d "$tmp"; then 3102 tmp=`(umask 077 && mkdir -d ${TMPDIR=/tmp}/gnash-configure-${RANDOM}-$$) 2>/dev/null` 3103fi 3104cerr="${tmp}/errors" 3105cwarn="${tmp}/warnings" 3106crec="${tmp}/recommended" 3107deb_err="${tmp}/deb_err" 3108deb_war="${tmp}/deb_war" 3109deb_rec="${tmp}/deb_rec" 3110rpm_err="${tmp}/rpm_err" 3111rpm_war="${tmp}/rpm_war" 3112rpm_rec="${tmp}/rpm_rec" 3113yast_err="${tmp}/yast_err" 3114yast_war="${tmp}/yast_war" 3115yast_rec="${tmp}/yast_rec" 3116echo "" 3117 3118#trap 'rm cerr' 0 # trap isn't a good idea, might override other traps 3119exec 3> $cerr 3120exec 4> $cwarn 3121exec 5> $crec 3122 3123for F in "$deb_err" "$deb_war" "$deb_rec" "$rpm_err" "$rpm_war" "$rpm_rec" "$yast_err" "$yast_war" "$yast_rec"; do 3124 touch "$F"; 3125done 3126 3127pkg_out_fd= 3128deb_dest= 3129rpm_dest= 3130yast_dest= 3131 3132dnl These macros should be portable as I checked most things used are in 3133dnl POSIX-2008, GNU CoreUtils, and shipped in MinGW. Old unices? No clue. 3134dnl In any case, they are hardly relevant on non-GNU systems. 3135 3136dnl Beware, here comes some long scary shell commands. 3137 3138AC_DEFUN([PKG_ERR], 3139[ 3140 pkg_out_fd=3 3141 echo " ERROR: `echo "$1" | fold -s -w 62 | sed 's/^/ /' | tr '\n' '#' | cut -b 18- | tr '#' '\n'`" >&$pkg_out_fd 3142 deb_dest="$deb_err" 3143 rpm_dest="$rpm_err" 3144 yast_dest="$yast_err" 3145]) 3146 3147AC_DEFUN([PKG_WAR], 3148[ 3149 pkg_out_fd=4 3150 echo " WARNING: `echo "$1" | fold -s -w 62 | sed 's/^/ /' | tr '\n' '#' | cut -b 18- | tr '#' '\n'`" >&$pkg_out_fd 3151 deb_dest="$deb_war" 3152 rpm_dest="$rpm_war" 3153 yast_dest="$yast_war" 3154]) 3155 3156AC_DEFUN([PKG_REC], 3157[ 3158 pkg_out_fd=5 3159 echo " RECOMMENDED: `echo "$1" | fold -s -w 62 | sed 's/^/ /' | tr '\n' '#' | cut -b 18- | tr '#' '\n'`" >&$pkg_out_fd 3160 deb_dest="$deb_rec" 3161 rpm_dest="$rpm_rec" 3162 yast_dest="$yast_rec" 3163]) 3164 3165AC_DEFUN([PKG_SUGGEST], 3166[ 3167 echo "`echo "$1" | fold -s -w 62 | sed 's/^/ /'`" >&$pkg_out_fd 3168]) 3169 3170AC_DEFUN([DEB_INSTALL], 3171[ 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" 3174]) 3175 3176AC_DEFUN([DEB_ALTERNATIVE], 3177[ 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" 3180]) 3181 3182AC_DEFUN([RPM_INSTALL], 3183[ 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" 3186]) 3187 3188AC_DEFUN([RPM_ALTERNATIVE], 3189[ 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" 3192]) 3193 3194AC_DEFUN([YAST_INSTALL], 3195[ 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" 3198]) 3199 3200AC_DEFUN([YAST_ALTERNATIVE], 3201[ 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" 3204]) 3205 3206AC_DEFUN([PKG_ALTERNATIVE], 3207[ 3208 echo "`echo "$1" | fold -s -w 62 | sed 's/^/ /'`" >&$pkg_out_fd 3209]) 3210 3211echo "Configurable options are:" 3212 3213if test x"${jemalloc}" = x"yes"; then 3214 echo " JEMALLOC Memory management enabled (default)." 3215else 3216 echo " JEMALLOC Memory management disabled." 3217fi 3218 3219if test x"${pthreads}" = x"yes"; then 3220 echo " POSIX Threads support enabled (default)." 3221else 3222 if test x"${build_haiku}" = x"yes"; then 3223 echo " POSIX Thread support built into C library." 3224 else 3225 echo " POSIX Thread support disabled." 3226 fi 3227fi 3228 3229if 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}" 3232else 3233 echo " NPAPI plugin disabled." 3234fi 3235 3236if 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}" 3242else 3243 echo " KPARTS 3.x plugin disabled." 3244fi 3245 3246if 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}" 3252else 3253 echo " KPARTS 4.x plugin disabled." 3254fi 3255 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. 3259 3260echo "" 3261echo "Configured paths for ${build} are:" 3262 3263if 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}" 3267 else 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]) 3274 fi 3275fi 3276 3277dnl Dump QT3 options is the user specified a QTOPIA3 or KDE3 GUI 3278if 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}" 3282 else 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=...]) 3289 fi 3290fi 3291 3292dnl Dump QT4 options is the user specified a QTOPIA4 or Qt4 GUI 3293if 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}" 3297 else 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=...]) 3305 fi 3306fi 3307 3308if 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}" 3312 else 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]) 3317 fi 3318fi 3319 3320if 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" 3324 else 3325 echo " QTOPIA 3.x flags are: default include path" 3326 fi 3327 echo " QTOPIA 3.x libs are: $QTOPIA3_LIBS" 3328 else 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. 3331 fi 3332fi 3333 3334if 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" 3338 else 3339 echo " QTOPIA 4.x flags are: default include path" 3340 fi 3341 echo " QTOPIA 4.x libs are: $QTOPIA4_LIBS" 3342 else 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. 3345 fi 3346fi 3347 3348 3349# -o x$build_kparts3 = xyes 3350if 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" 3354 else 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.]) 3360 fi 3361fi 3362 3363if test x"${JPEG_LIBS}" != x ; then 3364 if test x"${JPEG_CFLAGS}" != x ; then 3365 echo " JPEG flags are: $JPEG_CFLAGS" 3366 else 3367 echo " JPEG flags are: default include path" 3368 fi 3369 echo " JPEG libs are: $JPEG_LIBS" 3370else 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]) 3375fi 3376 3377if test x"${GIF_LIBS}" != x ; then 3378 if test x"${GIF_CFLAGS}" != x ; then 3379 echo " GIF flags are: $GIF_CFLAGS" 3380 else 3381 echo " GIF flags are: default include path" 3382 fi 3383 echo " GIF libs are: $GIF_LIBS" 3384else 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]) 3392fi 3393 3394if test x"${PNG_LIBS}" != x ; then 3395 if test x"${PNG_CFLAGS}" != x ; then 3396 echo " PNG flags are: $PNG_CFLAGS" 3397 else 3398 echo " PNG flags are: default include path" 3399 fi 3400 echo " PNG libs are: $PNG_LIBS" 3401else 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]) 3407fi 3408 3409if 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" 3413 else 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 3419 fi 3420fi 3421 3422if 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" 3426 else 3427 echo " OpenGL flags are: default include path" 3428 fi 3429 echo " OpenGL libs are: $OPENGL_LIBS" 3430 else 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=]) 3437 fi 3438fi 3439 3440if 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}" 3444 else 3445 echo " OpenGLES1 flags are: default include path" 3446 fi 3447 echo " OpenGLES1 libs are: ${GLES1_LIBS}" 3448 else 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=]) 3452 fi 3453fi 3454 3455dnl GLEXT is only needed for GTK/OpenGL 3456if 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" 3460 else 3461 echo " GtkGLExt flags are: default include path" 3462 fi 3463 echo " GtkGLExt libs are: $GLEXT_LIBS" 3464 else 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]) 3471 fi 3472fi 3473 3474if 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" 3478 else 3479 echo " GTK2 flags are: default include path" 3480 fi 3481 echo " GTK2 libs are: $GTK2_LIBS" 3482 else 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]) 3487 fi 3488 3489 if test x"$PANGO_LIBS" != x; then 3490 if test x"$PANGO_CFLAGS" != x; then 3491 echo " Pango flags are: $PANGO_CFLAGS" 3492 else 3493 echo " Pango flags are: default include path" 3494 fi 3495 echo " Pango libs are: $PANGO_LIBS" 3496 else 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]) 3501 fi 3502 3503 if test x"$GLIB_LIBS" != x; then 3504 if test x"$GLIB_CFLAGS" != x; then 3505 echo " GLib flags are: $GLIB_CFLAGS" 3506 else 3507 echo " GLib flags are: default include path" 3508 fi 3509 echo " GLib libs are: $GLIB_LIBS" 3510 else 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]) 3515 fi 3516 3517 if test x"$ATK_LIBS" != x; then 3518 if test x"$ATK_CFLAGS" != x; then 3519 echo " ATK flags are: $ATK_CFLAGS" 3520 else 3521 echo " ATK flags are: default include path" 3522 fi 3523 echo " ATK libs are: $ATK_LIBS" 3524 else 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]) 3529 fi 3530 3531fi 3532 3533if 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" 3537 fi 3538 if test x"$GSTREAMER_LIBS" != x; then 3539 if test x"$GSTREAMER_CFLAGS" != x; then 3540 echo " Gstreamer flags are: $GSTREAMER_CFLAGS" 3541 else 3542 echo " Gstreamer flags are: default include path" 3543 fi 3544 echo " Gstreamer libs are: $GSTREAMER_LIBS" 3545 else 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]) 3551 fi 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]) 3558 fi 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]) 3565 fi 3566fi 3567 3568dnl TODO: figure out some RPM package names. 3569dnl TODO: The following tests is probably incorrect for any/older/exotic systems! Could someone experienced look at it? 3570if 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" 3575 else 3576 echo " FFmpeg flags are: default include path" 3577 fi 3578 echo " FFmpeg libs are: $FFMPEG_LIBS" 3579 else 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) 3585 fi 3586 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) 3594 fi 3595 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) 3601 fi 3602 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) 3608 fi 3609 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) 3618 fi 3619fi 3620 3621if 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" 3625 else 3626 echo " Cairo flags are: default include path" 3627 fi 3628 echo " Cairo libs are: $CAIRO_LIBS" 3629 else 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]) 3635 fi 3636fi 3637 3638if 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" 3642 else 3643 echo " FLTK flags are: default include path" 3644 fi 3645 echo " FLTK libs are: $FLTK2_LIBS" 3646 else 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=...) 3650 fi 3651fi 3652 3653if 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" 3657 else 3658 echo " Xft flags are: default include path" 3659 fi 3660 echo " Xft libs are: $XFT_LIBS" 3661 fi 3662fi 3663 3664# See whether SDL is required 3665need_sdl=false 3666test x$build_sdl = xyes && need_sdl=true 3667test x$build_sound_sdl = xyes && need_sdl=true 3668 3669if $need_sdl; then 3670 if test x"$SDL_LIBS" != x; then 3671 echo " SDL flags are: $SDL_CFLAGS" 3672 echo " SDL libs are: $SDL_LIBS" 3673 else 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=...) 3679 fi 3680fi 3681unset need_sdl 3682 3683if test x"$nsapi" = x"yes"; then 3684 echo " Plugin will be installed in ${FIREFOX_PLUGINS}" 3685fi 3686 3687if test x"${pthreads}" = x"yes"; then 3688 if test x"$PTHREAD_CFLAGS" != x; then 3689 echo " POSIX Threads flags are: $PTHREAD_CFLAGS" 3690 fi 3691 if test x"${PTHREAD_LIBS}" != x; then 3692 echo " POSIX Threads lib is: $PTHREAD_LIBS" 3693 else 3694 if test x"${cross_compiling}" = xno; then 3695 echo "ERROR: No pthread development package installed!" >&3 3696 fi 3697 fi 3698fi 3699 3700if 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]) 3707 fi 3708 dnl low-level tools 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]) 3718 fi 3719 else 3720 echo " You have version $db2x_version of the DocBook2X tools." 3721 fi 3722else 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.]) 3724fi 3725 3726if test x"$CURL_LIBS" != x; then 3727 if test x"$CURL_CFLAGS" != x; then 3728 echo " CURL flags are: $CURL_CFLAGS" 3729 else 3730 echo " CURL flags are: default include path" 3731 fi 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.]) 3736 fi 3737else 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]) 3743fi 3744 3745if test x"$SPEEX_LIBS" != x; then 3746 if test x"$SPEEX_CFLAGS" != x; then 3747 echo " Speex flags are: $SPEEX_CFLAGS" 3748 else 3749 echo " Speex flags are: default include path" 3750 fi 3751 echo " Speex libs are: $SPEEX_LIBS" 3752else 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]) 3757fi 3758 3759if test x"$SPEEXDSP_LIBS" != x; then 3760 if test x"$SPEEXDSP_CFLAGS" != x; then 3761 echo " Speex DSP flags are: $SPEEXDSP_CFLAGS" 3762 else 3763 echo " Speex DSP flags are: default include path" 3764 fi 3765 echo " Speex DSP libs are: $SPEEXDSP_LIBS" 3766else 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]) 3771fi 3772 3773if 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" 3777 else 3778 echo " DBUS flags are: default include path" 3779 fi 3780 echo " DBUS libs are: $DBUS_LIBS" 3781 else 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]) 3787 fi 3788fi 3789 3790if 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" 3795 else # }{ 3796 echo " AGG flags are: default include path" 3797 fi # } 3798 echo " AGG libs are: $AGG_LIBS" 3799 else # }{ 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.]) 3802 else 3803 PKG_ERR([No AGG development package installed!]) 3804 fi 3805 PKG_SUGGEST([Install it from http://www.antigrain.com]) 3806 DEB_INSTALL([libagg-dev]) 3807 RPM_INSTALL([agg-devel]) 3808 fi # } 3809fi # } 3810 3811dnl TODO: This package is handled a bit stupidly in regard to the package 3812dnl suggestion system. It would be better to check for each package 3813dnl separately, instead of passing the missing ones in variables.. 3814if 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" 3818 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]) 3823 done 3824 fi 3825 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]) 3834 done 3835 fi 3836 fi 3837 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]) 3846 done 3847 fi 3848 fi 3849 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]) 3856 done 3857 fi 3858else 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]) 3865 else 3866 DEB_INSTALL([libboost-dev libboost-thread-dev libboost-program-options-dev]) 3867 fi 3868 RPM_INSTALL([boost-devel]) 3869fi 3870 3871dnl don't look for the flash compilers when cross compiling. 3872if 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" 3877 else 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]) 3882 fi 3883 3884 if test x"$MAKESWF" != x; then 3885 echo " MING version code is $MING_VERSION_CODE" 3886 echo " MAKESWF is $MAKESWF" 3887 else 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]) 3893 fi 3894 3895 if test x"$MAKESWF" != x && test $MING_VERSION_CODE -lt 00040006; 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 3899 fi 3900 3901 if test x"$SWFDEC_TESTSUITE" != x; then 3902 echo " SWFDEC testsuite dir is $SWFDEC_TESTSUITE" 3903 fi 3904 3905 if test x"$MTASC" != x; then 3906 echo " MTASC is $MTASC" 3907 echo " MTASC CLASSPATH is $MTASC_CLASSPATH" 3908 else 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]) 3913 fi 3914 3915 if test x"$HAXE" != x; then 3916 echo " HAXE is $HAXE" 3917 echo " HAXE CLASSPATH is $HAXE_CLASSPATH" 3918 else 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]) 3921 DEB_INSTALL([haxe]) 3922 RPM_INSTALL([haxe]) 3923 fi 3924 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.]) 3929 fi 3930 else 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]) 3935 fi 3936 3937 if test x"$SWFC" != x; then 3938 echo " SWFC is $SWFC" 3939 else 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]) 3944 fi 3945 3946 if test x"$AS3COMPILE" != x; then 3947 echo " AS3COMPILE is $AS3COMPILE" 3948 else 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]) 3951 fi 3952 3953 if test x"$HTTP_TESTSUITE" != x; then 3954 echo " HTTP testsuite dir is $HTTP_TESTSUITE" 3955 fi 3956 3957 if test x"$RED5_TESTING" != x; then 3958 echo " RED5 testing host is $RED5_HOST" 3959 fi 3960 fi 3961fi 3962 3963 if test x"$PERL" != x; then 3964 echo " PERL is $PERL" 3965 else 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]) 3968 DEB_INSTALL([perl]) 3969 RPM_INSTALL([perl]) 3970 fi 3971 3972if test x"$testsuite" = x"yes"; then 3973 if test x"$CSOUND" != x; then 3974 echo " CSOUND is $CSOUND" 3975 else 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]) 3980 fi 3981fi 3982 3983if test x"$Z_LIBS" != x; then 3984 if test x"$Z_CFLAGS" != x; then 3985 echo " Z flags are: $Z_CFLAGS" 3986 else 3987 echo " Z flags are: default include path" 3988 fi 3989 echo " Z libs are: $Z_LIBS" 3990else 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.]) 3996fi 3997 3998if test x"$FREETYPE2_LIBS" != x; then 3999 if test x"$FREETYPE2_CFLAGS" != x; then 4000 echo " FreeType flags are: $FREETYPE2_CFLAGS" 4001 else 4002 echo " FreeType flags are: default include path" 4003 fi 4004 echo " FreeType libs are: $FREETYPE2_LIBS" 4005else 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.]) 4011fi 4012 4013if test x"$FONTCONFIG_LIBS" != x; then 4014 if test x"$FONTCONFIG_CFLAGS" != x; then 4015 echo " Fontconfig flags are: $FONTCONFIG_CFLAGS" 4016 else 4017 echo " Fontconfig flags are: default include path" 4018 fi 4019 echo " Fontconfig libs are: $FONTCONFIG_LIBS" 4020else 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.]) 4026fi 4027 4028if 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" 4033 else 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]) 4039 fi 4040 fi 4041fi 4042 4043if 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]) 4048fi 4049 4050if test x"${build_vaapi}" = x"yes"; then 4051 if test x"${LIBVA_CFLAGS}" = xyes; then 4052 echo " LIBVA flags are: default" 4053 else 4054 echo " LIBVA flags are: $LIBVA_CFLAGS" 4055 echo " LIBVA libraries are: $LIBVA_LIBS" 4056 fi 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" 4060 else 4061 echo " LIBVA X11 flags are: $LIBVA_X11_CFLAGS" 4062 echo " LIBVA X11 libraries are: $LIBVA_X11_LIBS" 4063 fi 4064 fi 4065 if test x$use_libva_glx = xyes; then 4066 if test x"${LIBVA_GLX_CFLAGS}" = xyes; then 4067 echo " LIBVA GLXflags are: default" 4068 else 4069 echo " LIBVA GLX flags are: $LIBVA_GLX_CFLAGS" 4070 fi 4071 echo " LIBVA GLX libraries are: $LIBVA_GLX_LIBS" 4072 fi 4073fi 4074 4075if 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!]) 4078 fi 4079fi 4080 4081if test x"$npapi" = xyes; then 4082 if test x"$has_npapi" = xyes; then 4083 echo " NPAPI flags are: $NPAPI_CFLAGS" 4084 else 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([firefox-dev]) 4089 RPM_INSTALL([xulrunner-devel]) 4090 PKG_ALTERNATIVE([or specify --disable-npapi]) 4091 fi 4092else 4093 echo " NPAPI plugin is disabled" 4094fi 4095 4096if test x"${DEJAGNU}" != x""; then 4097 echo " DEJAGNU's runtest is $DEJAGNU" 4098else 4099 PKG_WAR([You need the dejagnu package installed to get a summary after running 'make check'.]) 4100 PKG_SUGGEST([Install it from http://www.gnu.org/software/dejagnu/]) 4101 DEB_INSTALL([dejagnu]) 4102 RPM_INSTALL([dejagnu]) 4103fi 4104 4105dnl Haiku 4106if test x"${build_haiku}" = xyes -o x"${build_sound_mkit}" = xyes -o x"${build_media_haiku}" = x"yes"; then 4107 echo " Haiku libs are: $HAIKU_LIBS" 4108fi 4109 4110if test x"$has_ltdl" = x"yes";then 4111 echo " LIBLTDL flags are: $LTDL_CFLAGS" 4112 echo " LIBLTDL libs are: $LTDL_LIBS" 4113else 4114 if test x"${extensions_support}" != xno; then 4115 PKG_ERR([No libltdl development package is installed, yet --disable-extensions was not specified.]) 4116 PKG_SUGGEST([Install it from ftp://ftp.gnu.org/gnu/libtool/]) 4117 DEB_INSTALL([libltdl-dev]) 4118 RPM_INSTALL([libtool-ltdl-devel]) 4119 fi 4120fi 4121 4122if test x"$enable_visibility" != xno; then 4123 if test x"${extensions_support}" != xno; then 4124 PKG_ERR([Extensions not supported with ELF visibility activated.]) 4125 PKG_SUGGEST([Use --disable-extensions or --disable-visibility.]) 4126 fi 4127fi 4128 4129if test x"$python" = x"yes"; then 4130 if test x"$has_python" = x"yes"; then 4131 echo " PYTHON flags are: $PYTHON_CFLAGS" 4132 echo " PYTHON libs are: $PYTHON_LIBS" 4133 echo " PYTHON executable is: $PYTHON" 4134 else 4135 PKG_ERR([No Python development package is installed, but it's enabled.]) 4136 fi 4137fi 4138if test x${build_ssl} = xyes; then 4139 if test x"${has_ssl}" = xyes; then 4140 if test x"${SSL_CFLAGS}" = xyes; then 4141 echo " SSL flags are: default" 4142 else 4143 echo " SSL flags are: $SSL_CFLAGS" 4144 fi 4145 echo " SSL libs are: $SSL_LIBS" 4146 else 4147 PKG_ERR([No SSL development package is installed, but it's enabled.]) 4148 fi 4149fi 4150 4151if test x${build_ssh} = xyes; then 4152 if test x"${has_ssh}" = xyes; then 4153 if test x"${SSH_CFLAGS}" = xyes; then 4154 echo " SSH flags are: default" 4155 else 4156 echo " SSH flags are: $SSH_CFLAGS" 4157 fi 4158 echo " SSH libs are: $SSH_LIBS" 4159 else 4160 PKG_ERR([No SSH development package is installed, but it's enabled.]) 4161 fi 4162fi 4163 4164if test x"${build_all_as3}" = x"yes"; then 4165 echo " Building the entire ActionScript class libary" 4166else 4167 echo " Only building these ActionScript classes into the library:" 4168 echo " ${classlist}" 4169fi 4170 4171if test x"$testsuite" = x"yes"; then 4172 if test x"$NETCAT" != x; then 4173 echo " You have netcat installed, which is only used for testing" 4174 else 4175 echo " Install netcat for networking test support" 4176 fi 4177 if test x"$WGET" != x; then 4178 echo " You have wget installed, which is only used for testing" 4179 else 4180 echo " Install wget for networking test support" 4181 fi 4182fi 4183 4184if test x$cross_compiling = xyes; then 4185 if test x"${android_ndk}" != xno; then 4186 AC_MSG_NOTICE([This build is setup for cross compiling for Android]) 4187 else 4188 AC_MSG_NOTICE([This build is setup for cross compiling]) 4189 fi 4190fi 4191 4192echo "--------" 4193 4194if test x"${cygnal}" = x"yes"; then 4195 echo " Building Cygnal media server enabled (default). Use --disable-cygnal to disable." 4196else 4197 echo " Building Cygnal media server disabled." 4198fi 4199 4200if test x"${with_top_level}" != x; then 4201 echo " Top level for cross compiling support files is: $with_top_level" 4202fi 4203 4204if test x"${build_gtk}" = xyes -a x"${pixelformat}" = xrgb565; then 4205 echo " WARNING: Pixel format RGB565 selected in combination with the" >&4 4206 echo " GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)." >&4 4207fi 4208 4209if test x"${extensions_list}" != x; then 4210 echo " Building extensions: ${extensions_list}" 4211fi 4212 4213if test x"${extensions_support}" = xno; then 4214 echo " Extension support disabled." 4215fi 4216 4217if test x"${security_list}" != x; then 4218 echo " Enabling security features: ${security_list}" 4219fi 4220 4221if test x"${statistics_list}" != x; then 4222 echo " Enabling statistics collecting for: ${statistics_list}" 4223fi 4224 4225if test x"${SUPPORTED_GUIS}" = x; then 4226 AC_MSG_ERROR(no supported GUIs found); 4227fi 4228 4229echo " GUI toolkits supported: ${SUPPORTED_GUIS}" 4230echo " Renderers supported: ${renderer_list}" 4231echo " Hardware Acceleration: ${device_list}" 4232echo " Media handlers: ${media_list}" 4233echo " Using ${add_sound} for sound handling" 4234 4235if test x"$docbook" = x"yes"; then 4236 echo ' DocBook document processing enabled (for "make html" and "make pdf")' 4237 if test x"$docbook_styles" != x; then 4238 echo " Docbook styles sheets in $docbook_styles" 4239 fi 4240else 4241 echo " DocBook document processing disabled (default)" 4242fi 4243 4244dnl The Framebuffer GUI has several other settings. As it doesn't have X11, 4245dnl we have to handle input devics ourselves. 4246if test x"${build_fb}" = xyes; then 4247echo " Using ${input_events} for Input" 4248 if test x"${fakefb}" != x; then 4249 echo " Using shared memory as a fake framebuffer" 4250 fi 4251 if test x"${offscreen}" = xyes; then 4252 echo " Using offscreen rendering" 4253 fi 4254 if test x"${doublebuf}" = xyes; then 4255 echo " Using double buffering when rendering" 4256 fi 4257fi 4258 4259if test -s $cwarn; then 4260 echo "" 4261 cat $cwarn 4262 rm $cwarn 4263 echo "" 4264 echo "Gnash should still compile even with these warnings." 4265 echo "If it doesn't, report the warnings as a bug." 4266else 4267 rm $cwarn 4268fi 4269 4270if test -s $crec; then 4271 echo "" 4272 cat $crec 4273 rm $crec 4274 echo "" 4275 echo "Gnash should still compile, but you'll miss important support" 4276else 4277 rm $crec 4278fi 4279 4280if test -s $cerr; then 4281 echo "" 4282 cat $cerr >&2 4283fi 4284 4285deb_err="`cat $deb_err`" 4286deb_war="`cat $deb_war`" 4287deb_rec="`cat $deb_rec`" 4288rpm_err="`cat $rpm_err`" 4289rpm_war="`cat $rpm_war`" 4290rpm_rec="`cat $rpm_rec`" 4291yast_err="`cat $yast_err`" 4292yast_war="`cat $yast_war`" 4293yast_rec="`cat $yast_rec`" 4294 4295if test x"${android}" != xyes; then 4296 # Pipe stderr to /dev/null since Fedora complains when target isn't there. 4297 if test x`which apt-get 2>/dev/null` != x; then 4298 if test x"$deb_err" != x -o x"$deb_war" != x -o x"$deb_rec" != x; then 4299 echo "#!/bin/sh" > deb-attempt-install-dependencies.sh 4300 echo "packages=\"$deb_err $deb_war $deb_rec\"" >> deb-attempt-install-dependencies.sh 4301 echo "PKGCOMMAND=\"apt-get install -y -q\"" >> deb-attempt-install-dependencies.sh 4302 cat ${srcdir}/base-attempter.sh >> deb-attempt-install-dependencies.sh 4303 chmod +x deb-attempt-install-dependencies.sh 4304 echo "" 4305 echo ".deb users might be able to install most dependencies by executing:" 4306 echo "sudo ./deb-attempt-install-dependencies.sh" 4307 fi 4308 fi 4309 4310 if test x`which yum 2>/dev/null` != x; then 4311 if test x"$rpm_err" != x -o x"$rpm_war" != x -o x"$deb_rec" != x; then 4312 echo "#!/bin/sh" > rpm-attempt-install-dependencies.sh 4313 echo "packages=\"$rpm_err $rpm_war $rpm_rec\"" >> rpm-attempt-install-dependencies.sh 4314 echo "PKGCOMMAND=\"yum install -y \"" >> rpm-attempt-install-dependencies.sh 4315 cat ${srcdir}/base-attempter.sh >> rpm-attempt-install-dependencies.sh 4316 chmod +x rpm-attempt-install-dependencies.sh 4317 echo "" 4318 echo ".rpm users might be able to install most dependencies by executing:" 4319 echo "sudo ./rpm-attempt-install-dependencies.sh" 4320 fi 4321 fi 4322fi 4323 4324dnl TODO: Add support for yast here, which AFAIK is used on OpenSuse. 4325 4326dnl If anything critical is missing, don't bother to continue 4327if test -s $cerr; then 4328 echo "" 4329 rm $cerr 4330 AC_MSG_ERROR([Please install required packages]) 4331else 4332 rm $cerr 4333fi 4334 4335rm -rf $tmp 4336 4337if test x"$fork" = x"no"; then 4338 echo "" 4339 AC_MSG_ERROR([Currently only forking the standalone player works!]) 4340fi 4341echo "" 4342 4343# Local Variables: 4344# c-basic-offset: 2 4345# tab-width: 2 4346# indent-tabs-mode: nil 4347# End: 4348