1 dnl Process this file with autoconf to produce a configure script.
6 dnl ---------------------------------------------------------------------------
8 dnl Top-level configure.in for wxWidgets by Robert Roebling, Phil Blecker,
9 dnl Vadim Zeitlin and Ron Lee
11 dnl This script is under the wxWidgets licence.
14 dnl ---------------------------------------------------------------------------
16 dnl ---------------------------------------------------------------------------
18 dnl ---------------------------------------------------------------------------
20 AC_INIT([wxWidgets], [2.9.1], [wx-dev@lists.wxwidgets.org])
22 dnl the file passed to AC_CONFIG_SRCDIR should be specific to our package
23 AC_CONFIG_SRCDIR([wx-config.in])
25 dnl sets build, host variables and the same with _alias
29 dnl notice that if --host was given but --build was not, cross_compiling is
30 dnl only set to "maybe" and not "yes" and will be either set to "yes" later or
31 dnl configure will exit with error in AC_PROG_CC so don't test for = "yes" here
32 if test "$cross_compiling" != "no"; then
33 HOST_PREFIX="${host_alias}-"
34 HOST_SUFFIX="-$host_alias"
40 dnl When making releases do:
42 dnl wx_release_number += 1
44 wx_major_version_number=2
45 wx_minor_version_number=9
47 wx_subrelease_number=0
49 WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
50 WX_VERSION=$WX_RELEASE.$wx_release_number
51 WX_SUBVERSION=$WX_VERSION.$wx_subrelease_number
53 WX_MSW_VERSION=$wx_major_version_number$wx_minor_version_number$wx_release_number
56 dnl Autoconf-2.60 changed the meaning of top_builddir variable, so we have
57 dnl to use our own replacement that will work with both 2.5x and 2.60+:
58 wx_top_builddir="`pwd`"
59 AC_SUBST(wx_top_builddir)
62 dnl ------------------------------------------------------------------------
63 dnl Check platform (host system)
64 dnl ------------------------------------------------------------------------
77 USE_DARWIN= dnl a.k.a. Mac OS X
84 USE_OSF= dnl OSF/1 (obsolete?)
86 USE_SOLARIS= dnl Solaris ("SunOS" >= 5)
87 USE_SUN= dnl SunOS or Solaris
88 USE_SUNOS= dnl old/real SunOS (obsolete)
90 USE_SYSV= dnl any System V
98 dnl on some platforms xxx_r() functions are declared inside "#ifdef
99 dnl _REENTRANT" and it's easier to just define this symbol for these platforms
100 dnl than checking it during run-time
101 NEEDS_D_REENTRANT_FOR_R_FUNCS=0
103 dnl the list of all available toolkits
105 dnl update NUM_TOOLKITS calculation below when adding a new toolkit here!
106 ALL_TOOLKITS="COCOA GTK OSX_CARBON OSX_COCOA MGL MICROWIN MOTIF MSW PM X11 DFB"
108 dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones
109 dnl which are either yes or no
110 DEFAULT_wxUSE_OLD_COCOA=0
112 DEFAULT_wxUSE_OSX_CARBON=0
113 DEFAULT_wxUSE_OSX_COCOA=0
115 DEFAULT_wxUSE_MICROWIN=0
116 DEFAULT_wxUSE_MOTIF=0
122 dnl these are the values which are really default for the given platform:
123 dnl they're used if no --with-<toolkit> options were given to detect the
124 dnl toolkit to use by default for the target platform
125 DEFAULT_DEFAULT_wxUSE_OLD_COCOA=0
126 DEFAULT_DEFAULT_wxUSE_GTK=0
127 DEFAULT_DEFAULT_wxUSE_OSX_CARBON=0
128 DEFAULT_DEFAULT_wxUSE_OSX_COCOA=0
129 DEFAULT_DEFAULT_wxUSE_MGL=0
130 DEFAULT_DEFAULT_wxUSE_MICROWIN=0
131 DEFAULT_DEFAULT_wxUSE_MOTIF=0
132 DEFAULT_DEFAULT_wxUSE_MSW=0
133 DEFAULT_DEFAULT_wxUSE_PM=0
134 DEFAULT_DEFAULT_wxUSE_X11=0
135 DEFAULT_DEFAULT_wxUSE_DFB=0
140 DYLIB_RPATH_POSTLINK=
144 dnl to support a new system, you need to add its canonical name (as determined
145 dnl by config.sub or specified by the configure command line) to this "case"
146 dnl and also define the shared library flags below - search for
147 dnl SHARED_LIB_SETUP to find the exact place
151 DEFAULT_DEFAULT_wxUSE_MOTIF=1
152 NEEDS_D_REENTRANT_FOR_R_FUNCS=1
155 dnl many standard declarations in HP-UX headers are only included if either
156 dnl _HPUX_SOURCE is defined, see stdsyms(5)
157 CPPFLAGS="-D_HPUX_SOURCE $CPPFLAGS"
163 if test "x$TMP" = "xalpha"; then
167 DEFAULT_DEFAULT_wxUSE_GTK=1
169 *-*-gnu* | *-*-k*bsd*-gnu )
172 if test "x$TMP" = "xalpha"; then
176 DEFAULT_DEFAULT_wxUSE_GTK=1
178 *-*-irix5* | *-*-irix6* )
183 DEFAULT_DEFAULT_wxUSE_MOTIF=1
190 AC_DEFINE(__SOLARIS__)
192 DEFAULT_DEFAULT_wxUSE_MOTIF=1
193 NEEDS_D_REENTRANT_FOR_R_FUNCS=1
202 DEFAULT_DEFAULT_wxUSE_MOTIF=1
207 AC_DEFINE(__FREEBSD__)
209 DEFAULT_DEFAULT_wxUSE_GTK=1
211 *-*-openbsd*|*-*-mirbsd*)
214 AC_DEFINE(__OPENBSD__)
216 DEFAULT_DEFAULT_wxUSE_GTK=1
221 AC_DEFINE(__NETBSD__)
223 DEFAULT_DEFAULT_wxUSE_GTK=1
224 NEEDS_D_REENTRANT_FOR_R_FUNCS=1
226 dnl some standard declarations in NetBSD headers are only included if
227 dnl _NETBSD_SOURCE and _LIBC are defined, e.g. getservbyname_r in netdb.h
228 CPPFLAGS="-D_NETBSD_SOURCE -D_LIBC $CPPFLAGS"
235 DEFAULT_DEFAULT_wxUSE_MOTIF=1
236 NEEDS_D_REENTRANT_FOR_R_FUNCS=1
243 DEFAULT_DEFAULT_wxUSE_MOTIF=1
250 DEFAULT_DEFAULT_wxUSE_MOTIF=1
259 DEFAULT_DEFAULT_wxUSE_MOTIF=1
266 AC_DEFINE(__UNIXWARE__)
269 *-*-cygwin* | *-*-mingw32* )
270 dnl MBN: some of the defines have been moved after toolkit detection
271 dnl because for wxMotif/wxGTK/wxX11 to build on Cygwin
272 dnl USE_UNIX must be set and not USE_WIN32
274 DEFAULT_DEFAULT_wxUSE_MSW=1
282 DEFAULT_DEFAULT_wxUSE_MGL=1
285 *-pc-os2_emx | *-pc-os2-emx )
290 DEFAULT_DEFAULT_wxUSE_PM=1
291 dnl "c++" wrapper is not always available, so always use plain gcc.
293 LDFLAGS="$LDFLAGS -Zcrtdll"
295 dnl Some special code that's automatically added by autoconf-2.57 for OS/2
296 dnl and hopefully also by autoconf-2.58 and newer on all other platforms.
297 dnl For now however, we still need it to make sure the configure script
298 dnl works on OS/2 no matter what platform it is generated on.
299 ac_executable_extensions=".exe"
300 export ac_executable_extensions
301 dnl This strange code is necessary to deal with handling of
302 dnl backslashes by ksh and pdksh's sh variant.
306 for ac_dir in $PATH; do
308 if test -z "$ac_TEMP_PATH"; then
309 ac_TEMP_PATH="$ac_dir"
311 ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir"
314 export PATH="$ac_TEMP_PATH"
320 dnl Darwin based distributions (including Mac OS X)
324 AC_DEFINE(__DARWIN__)
325 AC_DEFINE(TARGET_CARBON)
326 DEFAULT_DEFAULT_wxUSE_OSX_CARBON=1
330 dnl leave USE_UNIX on - BeOS is sufficiently Unix-like for this
336 AC_MSG_WARN([*** System type ${host} is unknown, assuming generic Unix and continuing nevertheless.])
337 AC_MSG_WARN([*** Please report the build results to wx-dev@lists.wxwidgets.org.])
339 DEFAULT_DEFAULT_wxUSE_X11=1
340 DEFAULT_wxUSE_SHARED=no
343 dnl ---------------------------------------------------------------------------
344 dnl command line options for configure
345 dnl ---------------------------------------------------------------------------
347 dnl the default values for all options - we collect them all here to simplify
348 dnl modification of the default values (for example, if the defaults for some
349 dnl platform should be changed, it can be done here too)
351 dnl NB: see also DEFAULT_wxUSE<toolkit> variables defined above
353 dnl it's only necessary to list the options which should be disabled by
354 dnl default, all the rest have default value of "yes" (or, rather, of
355 dnl wxUSE_ALL_FEATURES which is the only which has to be set to "yes" by
357 DEFAULT_wxUSE_ALL_FEATURES=yes
359 DEFAULT_wxUSE_STD_IOSTREAM=$DEFAULT_STD_FLAG
360 DEFAULT_wxUSE_STD_STRING=$DEFAULT_STD_FLAG
362 dnl libraries disabled by default
363 DEFAULT_wxUSE_DMALLOC=no
364 DEFAULT_wxUSE_LIBGNOMEVFS=no
365 DEFAULT_wxUSE_LIBHILDON=no
366 DEFAULT_wxUSE_LIBHILDON2=no
367 DEFAULT_wxUSE_LIBMSPACK=no
368 DEFAULT_wxUSE_LIBSDL=no
370 dnl features disabled by default
371 DEFAULT_wxUSE_ACCESSIBILITY=no
372 DEFAULT_wxUSE_IPV6=no
373 DEFAULT_wxUSE_GSTREAMER8=no
375 dnl automatic features
376 DEFAULT_wxUSE_UNICODE_UTF8=auto
377 DEFAULT_wxUSE_OPENGL=auto
378 DEFAULT_wxUSE_MEDIACTRL=auto
379 DEFAULT_wxUSE_COMPILER_TLS=auto
381 DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
383 dnl Mac/Cocoa users need to enable building universal binaries explicitly
384 DEFAULT_wxUSE_UNIVERSAL_BINARY=no
386 DEFAULT_wxUSE_OFFICIAL_BUILD=no
388 dnl Applicable only when --with-gtk was used:
389 DEFAULT_wxUSE_GTK2=yes
391 dnl Always default to no. Only special cases require this.
392 DEFAULT_wxUSE_OBJC_UNIQUIFYING=no
394 dnl ===========================
395 dnl deal with configure options
396 dnl ===========================
398 dnl we use several macros here:
399 dnl - AC_ARG_WITH/AC_ARG_ENABLE are the standard autoconf macros, see
400 dnl autoconf manual for details about them
401 dnl - WX_ARG_WITH/WX_ARG_ENABLE are their wx counterparts which perform
402 dnl the caching of the command line options and also use DEFAULT_foo
403 dnl variable as the default value for "foo" if neither --enable-foo nor
404 dnl --disable-foo is specified
405 dnl - WX_ARG_SYS_WITH is a special version of WX_ARG_WITH which allows
406 dnl to choose not only whether an external library is used but also if we
407 dnl use the copy of it included with wxWidgets or an already installed
409 dnl - WX_ARG_WITHOUT/WX_ARG_DISABLE mirror WX_ARG_WITH/WX_ARG_ENABLE but
410 dnl should be used for the options which are enabled by default
411 dnl - WX_ARG_FEATURE is a version of WX_ARG_ENABLE which should be used for
412 dnl optional features, i.e. options which should be disabled if
413 dnl --disable-all-features is specified (WX_ARG_WITH/WX_ARG_SYS_WITH are
414 dnl also affected by this)
416 dnl ---------------------------------------------------------------------------
417 dnl global build options
418 dnl ---------------------------------------------------------------------------
420 WX_ARG_DISABLE(gui, [ --disable-gui don't build GUI parts of the library], wxUSE_GUI)
421 WX_ARG_ENABLE(monolithic, [ --enable-monolithic build wxWidgets as single library], wxUSE_MONOLITHIC)
422 WX_ARG_ENABLE(plugins, [ --enable-plugins build parts of wxWidgets as loadable components], wxUSE_PLUGINS)
423 WX_ARG_WITHOUT(subdirs, [ --without-subdirs don't generate makefiles for samples/demos/...], wxWITH_SUBDIRS)
424 AC_ARG_WITH(flavour, [ --with-flavour=NAME specify a name to identify this build], [WX_FLAVOUR="$withval"])
425 WX_ARG_ENABLE(official_build, [ --enable-official_build official build of wxWidgets (win32 DLL only)], wxUSE_OFFICIAL_BUILD)
426 AC_ARG_ENABLE(vendor, [ --enable-vendor=VENDOR vendor name (win32 DLL only)], [VENDOR="$enableval"])
427 if test "x$VENDOR" = "x"; then
431 WX_ARG_DISABLE(all-features,[ --disable-all-features disable all optional features to build minimal library], wxUSE_ALL_FEATURES)
433 if test "$wxUSE_ALL_FEATURES" = "no"; then
434 dnl this is a bit ugly but currently we have no choice but to manually
435 dnl reset all the options with default value of auto if all features are to
436 dnl be disabled because we can't have an option with default value of
437 dnl "auto-or-no-if-wxUSE_ALL_FEATURES-is-disabled"
438 DEFAULT_wxUSE_MEDIACTRL=no
441 dnl ---------------------------------------------------------------------------
443 dnl ---------------------------------------------------------------------------
445 if test "$wxUSE_GUI" = "yes"; then
447 WX_ARG_ENABLE(universal, [ --enable-universal use wxWidgets GUI controls instead of native ones], wxUSE_UNIVERSAL)
448 if test "$wxUSE_UNIVERSAL" = "yes"; then
449 AC_ARG_WITH(themes, [ --with-themes=all|list use only the specified comma-separated list of wxUniversal themes], [wxUNIV_THEMES="$withval"])
452 dnl we use AC_ARG_WITH and not WX_ARG_WITH for the toolkit options as they
453 dnl shouldn't default to wxUSE_ALL_FEATURES
454 AC_ARG_WITH(gtk, [[ --with-gtk[=VERSION] use GTK+, VERSION can be 2 (default), 1 or "any"]], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1])
455 AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1])
456 AC_ARG_WITH(osx_carbon, [ --with-osx_carbon use Mac OS X (Carbon)], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
457 AC_ARG_WITH(osx_cocoa, [ --with-osx_cocoa use Mac OS X (Cocoa)], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
458 AC_ARG_WITH(osx, [ --with-osx use Mac OS X (default port, currently Carbon)], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
459 AC_ARG_WITH(carbon, [ --with-carbon same as --with-osx_carbon], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
460 AC_ARG_WITH(cocoa, [ --with-cocoa same as --with-osx_cocoa], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1])
461 AC_ARG_WITH(mac, [ --with-mac same as --with-osx], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1])
462 AC_ARG_WITH(old_cocoa, [ --with-old_cocoa use old, deprecated, Cocoa port], [wxUSE_OLD_COCOA="$withval" CACHE_OLD_COCOA=1 TOOLKIT_GIVEN=1])
463 AC_ARG_WITH(wine, [ --with-wine use Wine], [wxUSE_WINE="$withval" CACHE_WINE=1])
464 AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1])
465 AC_ARG_WITH(pm, [ --with-pm use OS/2 Presentation Manager], [wxUSE_PM="$withval" CACHE_PM=1 TOOLKIT_GIVEN=1])
466 AC_ARG_WITH(mgl, [ --with-mgl use SciTech MGL], [wxUSE_MGL="$withval" wxUSE_UNIVERSAL="yes" CACHE_MGL=1 TOOLKIT_GIVEN=1])
467 AC_ARG_WITH(directfb, [ --with-directfb use DirectFB], [wxUSE_DFB="$withval" wxUSE_UNIVERSAL="yes" CACHE_DFB=1 TOOLKIT_GIVEN=1])
468 AC_ARG_WITH(microwin, [ --with-microwin use MicroWindows], [wxUSE_MICROWIN="$withval" CACHE_MICROWIN=1 TOOLKIT_GIVEN=1])
469 AC_ARG_WITH(x11, [ --with-x11 use X11], [wxUSE_X11="$withval" wxUSE_UNIVERSAL="yes" CACHE_X11=1 TOOLKIT_GIVEN=1])
470 WX_ARG_ENABLE(nanox, [ --enable-nanox use NanoX], wxUSE_NANOX)
472 AC_ARG_ENABLE(gtk2, [ --disable-gtk2 use GTK+ 1.2 instead of 2.0], [wxUSE_GTK2="$enableval"])
473 WX_ARG_ENABLE(gpe, [ --enable-gpe use GNOME PDA Environment features if possible], wxUSE_GPE)
475 dnl check that no more than one toolkit is given and that if none are given that
476 dnl we have a default one
478 AC_MSG_CHECKING(for toolkit)
482 # In Wine, we need to default to MSW, not GTK or MOTIF
483 if test "$wxUSE_WINE" = "yes"; then
484 DEFAULT_DEFAULT_wxUSE_GTK=0
485 DEFAULT_DEFAULT_wxUSE_MOTIF=0
486 DEFAULT_DEFAULT_wxUSE_MSW=1
493 if test "$wxUSE_GUI" = "yes"; then
495 if test "$USE_BEOS" = 1; then
496 AC_MSG_ERROR([BeOS GUI is not supported yet, use --disable-gui])
499 if test "$TOOLKIT_GIVEN" = 1; then
500 dnl convert "yes", "any" or a number to 1 and "no" to 0
501 for toolkit in $ALL_TOOLKITS; do
503 eval "value=\$${var}"
504 if test "x$value" = "xno"; then
506 elif test "x$value" != "x"; then
510 if test "x$value" != "x" -a "x$value" != "xyes" -a "x$value" != "xno"; then
511 eval "wx${toolkit}_VERSION=$value"
515 dnl try to guess the most apropriate toolkit for this platform
516 for toolkit in $ALL_TOOLKITS; do
517 var=DEFAULT_DEFAULT_wxUSE_$toolkit
518 eval "wxUSE_$toolkit=\$${var}"
522 dnl we suppose that expr is available (maybe there is a better way to do
523 dnl this? what about using ALL_TOOLKITS? TODO)
524 NUM_TOOLKITS=`expr ${wxUSE_OLD_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \
525 + ${wxUSE_OSX_COCOA:-0} + ${wxUSE_MGL:-0} + ${wxUSE_DFB:-0} \
526 + ${wxUSE_MICROWIN:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}`
528 dnl Allow wxUSE_PM only for OS/2 with EMX.
530 *-pc-os2_emx | *-pc-os2-emx )
531 NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}`
534 case "$NUM_TOOLKITS" in
538 AC_MSG_ERROR(Please specify a toolkit -- cannot determine the default for ${host})
541 AC_MSG_ERROR(Please specify at most one toolkit)
544 # to be removed when --disable-gtk2 isn't needed
545 if test "x$wxUSE_GTK2" = "xyes"; then
547 elif test "x$wxUSE_GTK2" = "xno"; then
551 for toolkit in $ALL_TOOLKITS; do
553 eval "value=\$${var}"
554 if test "$value" = 1; then
555 toolkit_echo=`echo $toolkit | tr '[[A-Z]]' '[[a-z]]'`
556 AC_MSG_RESULT($toolkit_echo)
560 if test "x$host_alias" != "x"; then
561 AC_MSG_RESULT(base ($host_alias hosted) only)
563 AC_MSG_RESULT(base only)
568 if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1; then
572 dnl ---------------------------------------------------------------------------
573 dnl external libraries
574 dnl ---------------------------------------------------------------------------
576 WX_ARG_SYS_WITH(libpng, [ --with-libpng use libpng (PNG image format)], wxUSE_LIBPNG)
577 WX_ARG_SYS_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], wxUSE_LIBJPEG)
578 WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF)
579 WX_ARG_SYS_WITH(libxpm, [ --with-libxpm use libxpm (XPM file format)], wxUSE_LIBXPM)
580 WX_ARG_WITH(libiconv, [ --with-libiconv use libiconv (character conversion)], wxUSE_LIBICONV)
581 WX_ARG_WITH(libmspack, [ --with-libmspack use libmspack (CHM help files loading)], wxUSE_LIBMSPACK)
582 WX_ARG_WITHOUT(gtkprint, [ --without-gtkprint don't use GTK printing support], wxUSE_GTKPRINT)
583 WX_ARG_WITHOUT(gnomeprint, [ --without-gnomeprint don't use GNOME printing libraries], wxUSE_LIBGNOMEPRINT)
584 WX_ARG_WITH(gnomevfs, [ --with-gnomevfs use GNOME VFS for associating MIME types], wxUSE_LIBGNOMEVFS)
585 WX_ARG_WITH(hildon, [ --with-hildon use Hildon framework for Nokia 770/800/810], wxUSE_LIBHILDON)
586 WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL)
591 WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (http://dmalloc.com/)], wxUSE_DMALLOC)
592 WX_ARG_WITH(sdl, [ --with-sdl use SDL for audio on Unix], wxUSE_LIBSDL)
593 WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx class], wxUSE_REGEX)
594 WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
595 WX_ARG_SYS_WITH(expat, [ --with-expat enable XML support using expat parser], wxUSE_EXPAT)
597 AC_MSG_CHECKING([for --with-macosx-sdk])
598 AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], [
599 wxUSE_MACOSX_SDK=$withval
600 wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval"
602 AC_MSG_RESULT([$wxUSE_MACOSX_SDK])
604 AC_MSG_CHECKING([for --with-macosx-version-min])
605 AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version], [
606 wxUSE_MACOSX_VERSION_MIN=$withval
607 wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval"
609 AC_MSG_RESULT([$wxUSE_MACOSX_VERSION_MIN])
611 dnl ---------------------------------------------------------------------------
612 dnl debugging options
613 dnl ---------------------------------------------------------------------------
615 dnl don't use WX_ARG_ENABLE as it just gets in the way instead of helping with
616 dnl this rather unusual option
617 AC_MSG_CHECKING([for --enable-debug])
618 AC_ARG_ENABLE(debug, [ --enable-debug build library for debugging],
620 if test "$enableval" = yes; then
622 elif test "$enableval" = no; then
624 elif test "$enableval" = max; then
626 WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -DwxDEBUG_LEVEL=2"
628 AC_MSG_ERROR([Invalid --enable-debug value, must be yes, no or max])
634 case "$wxUSE_DEBUG" in
636 dnl build the library for debugging: enable debugging code and generate
637 dnl the debug information for the library itself
638 DEFAULT_wxUSE_DEBUG_FLAG=yes
639 DEFAULT_wxUSE_DEBUG_INFO=yes
641 dnl also disable optimizations by default if --enable-debug was used
642 dnl (this can still be overridden by an explicit --enable-optimise)
643 DEFAULT_wxUSE_OPTIMISE=no
647 dnl --disable-debug is equivalent to both --disable-debug_flag and
648 dnl --disable-debug_info
649 DEFAULT_wxUSE_DEBUG_FLAG=no
650 DEFAULT_wxUSE_DEBUG_INFO=no
654 dnl the library is built with debugging support by default but without
655 dnl debug information as this requires much, much more disk space
656 DEFAULT_wxUSE_DEBUG_FLAG=yes
657 DEFAULT_wxUSE_DEBUG_INFO=no
661 WX_ARG_DISABLE(debug_flag, [ --disable-debug_flag disable all debugging support], wxUSE_DEBUG_FLAG)
662 WX_ARG_ENABLE(debug_info, [ --enable-debug_info generate debug information], wxUSE_DEBUG_INFO)
664 dnl enabled if just --enable-debug_{flag,info} was
666 dnl in any case, only set the default value and allow overriding it with an
668 WX_ARG_ENABLE(debug_gdb, [ --enable-debug_gdb create code with extra GDB debugging information], wxUSE_DEBUG_GDB)
669 WX_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt obsolete, don't use: use wxDebugContext], wxUSE_DEBUG_CONTEXT)
670 WX_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing obsolete, don't use: create code with memory tracing], wxUSE_MEM_TRACING)
672 dnl ---------------------------------------------------------------------------
673 dnl global compile options
674 dnl ---------------------------------------------------------------------------
676 WX_ARG_DISABLE(shared, [ --disable-shared create static library instead of shared], wxUSE_SHARED)
677 WX_ARG_ENABLE(stl, [ --enable-stl use STL for containers], wxUSE_STL)
678 WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM)
679 WX_ARG_ENABLE(std_string, [ --enable-std_string use standard C++ string classes], wxUSE_STD_STRING)
680 WX_ARG_DISABLE(unicode, [ --disable-unicode compile without Unicode support], wxUSE_UNICODE)
681 WX_ARG_ENABLE(mslu, [ --enable-mslu use MS Layer for Unicode on Windows 9x (Win32 only)], wxUSE_UNICODE_MSLU)
682 WX_ARG_ENABLE_PARAM(utf8, [ --enable-utf8 use UTF-8 representation for strings (Unix only)], wxUSE_UNICODE_UTF8)
683 WX_ARG_ENABLE(utf8only, [ --enable-utf8only only support UTF-8 locales in UTF-8 build (Unix only)], wxUSE_UNICODE_UTF8_LOCALE)
684 WX_ARG_ENABLE(extended_rtti, [ --enable-extended_rtti use extended RTTI (XTI)], wxUSE_EXTENDED_RTTI)
685 if test "$USE_OS2" = 1; then
687 WX_ARG_ENABLE(omf, [ --enable-omf use OMF object format], wxUSE_OMF)
690 WX_ARG_DISABLE(optimise, [ --disable-optimise compile without optimisations], wxUSE_OPTIMISE)
692 WX_ARG_ENABLE(profile, [ --enable-profile create code with profiling information], wxUSE_PROFILE)
693 WX_ARG_ENABLE(no_rtti, [ --enable-no_rtti create code without RTTI information], wxUSE_NO_RTTI)
694 WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++ exceptions handling], wxUSE_NO_EXCEPTIONS)
695 WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
696 WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
697 WX_ARG_DISABLE(vararg_macros,[ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS)
698 WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary create Mac PowerPC and Intel Universal binary]], wxUSE_UNIVERSAL_BINARY)
700 WX_ARG_ENABLE(compat26, [ --enable-compat26 enable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6)
701 WX_ARG_DISABLE(compat28, [ --disable-compat28 disable wxWidgets 2.8 compatibility], WXWIN_COMPATIBILITY_2_8)
703 WX_ARG_DISABLE(rpath, [ --disable-rpath disable use of rpath for uninstalled builds], wxUSE_RPATH)
705 WX_ARG_ENABLE(objc_uniquifying,[ --enable-objc_uniquifying enable Objective-C class name uniquifying], wxUSE_OBJC_UNIQUIFYING)
707 WX_ARG_DISABLE(visibility, [ --disable-visibility disable use of ELF symbols visibility even if supported], wxUSE_VISIBILITY)
708 WX_ARG_DISABLE(tls, [ --disable-tls disable use of compiler TLS support], wxUSE_COMPILER_TLS)
710 dnl ---------------------------------------------------------------------------
711 dnl optional non GUI features
712 dnl ---------------------------------------------------------------------------
714 WX_ARG_FEATURE(intl, [ --enable-intl use internationalization system], wxUSE_INTL)
715 WX_ARG_FEATURE(xlocale, [ --enable-xlocale use x-locale support (requires wxLocale)], wxUSE_XLOCALE)
716 WX_ARG_FEATURE(config, [ --enable-config use wxConfig (and derived) classes], wxUSE_CONFIG)
718 WX_ARG_FEATURE(protocols, [ --enable-protocols use wxProtocol and derived classes], wxUSE_PROTOCOL)
719 WX_ARG_FEATURE(ftp, [ --enable-ftp use wxFTP (requires wxProtocol], wxUSE_PROTOCOL_FTP)
720 WX_ARG_FEATURE(http, [ --enable-http use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP)
721 WX_ARG_FEATURE(fileproto, [ --enable-fileproto use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE)
722 WX_ARG_FEATURE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS)
723 WX_ARG_FEATURE(ipv6, [ --enable-ipv6 enable IPv6 support in wxSocket], wxUSE_IPV6)
724 WX_ARG_FEATURE(ole, [ --enable-ole use OLE classes (Win32 only)], wxUSE_OLE)
725 WX_ARG_FEATURE(dataobj, [ --enable-dataobj use data object classes], wxUSE_DATAOBJ)
727 WX_ARG_FEATURE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], wxUSE_IPC)
729 WX_ARG_FEATURE(baseevtloop, [ --enable-baseevtloop use event loop in console programs too], wxUSE_CONSOLE_EVENTLOOP)
730 WX_ARG_FEATURE(epollloop, [ --enable-epollloop use wxEpollDispatcher class (Linux only)], wxUSE_EPOLL_DISPATCHER)
731 WX_ARG_FEATURE(selectloop, [ --enable-selectloop use wxSelectDispatcher class], wxUSE_SELECT_DISPATCHER)
733 dnl please keep the settings below in alphabetical order
734 WX_ARG_FEATURE(any, [ --enable-any use wxAny class], wxUSE_ANY)
735 WX_ARG_FEATURE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE)
736 WX_ARG_FEATURE(arcstream, [ --enable-arcstream use wxArchive streams], wxUSE_ARCHIVE_STREAMS)
737 WX_ARG_FEATURE(base64, [ --enable-base64 use base64 encoding/decoding functions], wxUSE_BASE64)
738 WX_ARG_FEATURE(backtrace, [ --enable-backtrace use wxStackWalker class for getting backtraces], wxUSE_STACKWALKER)
739 WX_ARG_FEATURE(catch_segvs, [ --enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only)], wxUSE_ON_FATAL_EXCEPTION)
740 WX_ARG_FEATURE(cmdline, [ --enable-cmdline use wxCmdLineParser class], wxUSE_CMDLINE_PARSER)
741 WX_ARG_FEATURE(datetime, [ --enable-datetime use wxDateTime class], wxUSE_DATETIME)
742 WX_ARG_FEATURE(debugreport, [ --enable-debugreport use wxDebugReport class], wxUSE_DEBUGREPORT)
743 WX_ARG_FEATURE(dialupman, [ --enable-dialupman use dialup network classes], wxUSE_DIALUP_MANAGER)
744 WX_ARG_FEATURE(dynlib, [ --enable-dynlib use wxLibrary class for DLL loading], wxUSE_DYNLIB_CLASS)
745 WX_ARG_FEATURE(dynamicloader, [ --enable-dynamicloader use (new) wxDynamicLibrary class], wxUSE_DYNAMIC_LOADER)
746 WX_ARG_FEATURE(exceptions, [ --enable-exceptions build exception-safe library], wxUSE_EXCEPTIONS)
747 WX_ARG_FEATURE(ffile, [ --enable-ffile use wxFFile class], wxUSE_FFILE)
748 WX_ARG_FEATURE(file, [ --enable-file use wxFile class], wxUSE_FILE)
749 WX_ARG_FEATURE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM)
750 WX_ARG_FEATURE(fontenum, [ --enable-fontenum use wxFontEnumerator class], wxUSE_FONTENUM)
751 WX_ARG_FEATURE(fontmap, [ --enable-fontmap use font encodings conversion classes], wxUSE_FONTMAP)
752 WX_ARG_FEATURE(fs_archive, [ --enable-fs_archive use virtual archive filesystems], wxUSE_FS_ARCHIVE)
753 WX_ARG_FEATURE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
754 WX_ARG_FEATURE(fs_zip, [ --enable-fs_zip now replaced by fs_archive], wxUSE_FS_ZIP)
755 WX_ARG_FEATURE(fswatcher, [ --enable-fswatcher use wxFileSystemWatcher class], wxUSE_FSWATCHER)
756 WX_ARG_FEATURE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY)
757 WX_ARG_FEATURE(log, [ --enable-log use logging system], wxUSE_LOG)
758 WX_ARG_FEATURE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG)
759 WX_ARG_FEATURE(mimetype, [ --enable-mimetype use wxMimeTypesManager], wxUSE_MIMETYPE)
760 WX_ARG_FEATURE(printfposparam,[ --enable-printfposparam use wxVsnprintf() which supports positional parameters], wxUSE_PRINTF_POS_PARAMS)
761 WX_ARG_FEATURE(snglinst, [ --enable-snglinst use wxSingleInstanceChecker class], wxUSE_SNGLINST_CHECKER)
762 WX_ARG_FEATURE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND)
763 WX_ARG_FEATURE(stdpaths, [ --enable-stdpaths use wxStandardPaths class], wxUSE_STDPATHS)
764 WX_ARG_FEATURE(stopwatch, [ --enable-stopwatch use wxStopWatch class], wxUSE_STOPWATCH)
765 WX_ARG_FEATURE(streams, [ --enable-streams use wxStream etc classes], wxUSE_STREAMS)
766 WX_ARG_FEATURE(sysoptions, [ --enable-sysoptions use wxSystemOptions], wxUSE_SYSTEM_OPTIONS)
767 WX_ARG_FEATURE(tarstream, [ --enable-tarstream use wxTar streams], wxUSE_TARSTREAM)
768 WX_ARG_FEATURE(textbuf, [ --enable-textbuf use wxTextBuffer class], wxUSE_TEXTBUFFER)
769 WX_ARG_FEATURE(textfile, [ --enable-textfile use wxTextFile class], wxUSE_TEXTFILE)
770 WX_ARG_FEATURE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER)
771 WX_ARG_FEATURE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT)
772 WX_ARG_FEATURE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
774 dnl URL-related classes
775 WX_ARG_FEATURE(url, [ --enable-url use wxURL class], wxUSE_URL)
776 WX_ARG_FEATURE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL)
777 WX_ARG_FEATURE(protocol_http, [ --enable-protocol-http HTTP support in wxProtocol], wxUSE_PROTOCOL_HTTP)
778 WX_ARG_FEATURE(protocol_ftp, [ --enable-protocol-ftp FTP support in wxProtocol], wxUSE_PROTOCOL_FTP)
779 WX_ARG_FEATURE(protocol_file, [ --enable-protocol-file FILE support in wxProtocol], wxUSE_PROTOCOL_FILE)
781 WX_ARG_FEATURE(threads, [ --enable-threads use threads], wxUSE_THREADS)
783 WX_ARG_ENABLE(iniconf, [ --enable-iniconf use wxIniConfig (Win32 only)], wxUSE_INICONF)
784 WX_ARG_FEATURE(regkey, [ --enable-regkey use wxRegKey class (Win32 only)], wxUSE_REGKEY)
786 if test "$wxUSE_GUI" = "yes"; then
788 dnl ---------------------------------------------------------------------------
789 dnl optional "big" GUI features
790 dnl ---------------------------------------------------------------------------
792 WX_ARG_FEATURE(docview, [ --enable-docview use document view architecture], wxUSE_DOC_VIEW_ARCHITECTURE)
793 WX_ARG_FEATURE(help, [ --enable-help use help subsystem], wxUSE_HELP)
794 WX_ARG_FEATURE(mshtmlhelp, [ --enable-mshtmlhelp use MS HTML Help (win32)], wxUSE_MS_HTML_HELP)
795 WX_ARG_FEATURE(html, [ --enable-html use wxHTML sub-library], wxUSE_HTML)
796 WX_ARG_FEATURE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP)
797 WX_ARG_FEATURE(xrc, [ --enable-xrc use XRC resources sub-library], wxUSE_XRC)
798 WX_ARG_FEATURE(aui, [ --enable-aui use AUI docking library], wxUSE_AUI)
799 WX_ARG_FEATURE(propgrid, [ --enable-propgrid use wxPropertyGrid library], wxUSE_PROPGRID)
800 WX_ARG_FEATURE(ribbon, [ --enable-ribbon use wxRibbon library], wxUSE_RIBBON)
801 WX_ARG_FEATURE(stc, [ --enable-stc use wxStyledTextCtrl library], wxUSE_STC)
802 WX_ARG_FEATURE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS)
803 WX_ARG_FEATURE(loggui, [ --enable-loggui use standard GUI logger], wxUSE_LOGGUI)
804 WX_ARG_FEATURE(logwin, [ --enable-logwin use wxLogWindow], wxUSE_LOGWINDOW)
805 WX_ARG_FEATURE(logdialog, [ --enable-logdialog use wxLogDialog], wxUSE_LOGDIALOG)
806 WX_ARG_FEATURE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI)
807 WX_ARG_FEATURE(mdidoc, [ --enable-mdidoc use docview architecture with MDI], wxUSE_MDI_ARCHITECTURE)
808 WX_ARG_FEATURE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL)
809 WX_ARG_FEATURE(gstreamer8, [ --enable-gstreamer8 force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix], wxUSE_GSTREAMER8)
810 WX_ARG_FEATURE(webkit, [ --enable-webkit use wxWebKitCtrl (Mac)], wxUSE_WEBKIT)
811 WX_ARG_FEATURE(richtext, [ --enable-richtext use wxRichTextCtrl], wxUSE_RICHTEXT)
812 WX_ARG_FEATURE(postscript, [ --enable-postscript use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT)
813 WX_ARG_FEATURE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE)
814 WX_ARG_FEATURE(svg, [ --enable-svg use wxSVGFileDC device context], wxUSE_SVG)
816 dnl wxDC is implemented in terms of wxGraphicsContext in wxOSX so the latter
817 dnl can't be disabled, don't even provide an option to do it
818 if test "$wxUSE_MAC" != 1; then
819 WX_ARG_FEATURE(graphics_ctx,[ --enable-graphics_ctx use graphics context 2D drawing API], wxUSE_GRAPHICS_CONTEXT)
822 dnl ---------------------------------------------------------------------------
824 dnl ---------------------------------------------------------------------------
826 WX_ARG_FEATURE(clipboard, [ --enable-clipboard use wxClipboard class], wxUSE_CLIPBOARD)
827 WX_ARG_FEATURE(dnd, [ --enable-dnd use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP)
828 WX_ARG_FEATURE(metafile, [ --enable-metafile use win32 metafiles], wxUSE_METAFILE)
830 dnl ---------------------------------------------------------------------------
831 dnl optional GUI controls (in alphabetical order except the first one)
832 dnl ---------------------------------------------------------------------------
834 dnl don't set DEFAULT_wxUSE_XXX below if the option is not specified
835 DEFAULT_wxUSE_CONTROLS=none
836 WX_ARG_DISABLE(controls, [ --disable-controls disable compilation of all standard controls], wxUSE_CONTROLS)
838 dnl even with --disable-controls, some may be enabled by an explicit
839 dnl --enable-<control> later on the command line -- but by default all will be
841 if test "$wxUSE_CONTROLS" = "no"; then
842 DEFAULT_wxUSE_ACCEL=no
843 DEFAULT_wxUSE_ANIMATIONCTRL=no
844 DEFAULT_wxUSE_BMPBUTTON=no
845 DEFAULT_wxUSE_BUTTON=no
846 DEFAULT_wxUSE_CALCTRL=no
847 DEFAULT_wxUSE_CARET=no
848 DEFAULT_wxUSE_CHECKBOX=no
849 DEFAULT_wxUSE_CHECKLISTBOX=no
850 DEFAULT_wxUSE_CHOICE=no
851 DEFAULT_wxUSE_CHOICEBOOK=no
852 DEFAULT_wxUSE_COLLPANE=no
853 DEFAULT_wxUSE_COLOURPICKERCTRL=no
854 DEFAULT_wxUSE_COMBOBOX=no
855 DEFAULT_wxUSE_COMBOBOX=no
856 DEFAULT_wxUSE_DATAVIEWCTRL=no
857 DEFAULT_wxUSE_DATEPICKCTRL=no
858 DEFAULT_wxUSE_DETECT_SM=no
859 DEFAULT_wxUSE_DIRPICKERCTRL=no
860 DEFAULT_wxUSE_DISPLAY=no
861 DEFAULT_wxUSE_FILECTRL=no
862 DEFAULT_wxUSE_FILEPICKERCTRL=no
863 DEFAULT_wxUSE_FONTPICKERCTRL=no
864 DEFAULT_wxUSE_GAUGE=no
865 DEFAULT_wxUSE_GRID=no
866 DEFAULT_wxUSE_HEADERCTRL=no
867 DEFAULT_wxUSE_HYPERLINKCTRL=no
868 DEFAULT_wxUSE_IMAGLIST=no
869 DEFAULT_wxUSE_LISTBOOK=no
870 DEFAULT_wxUSE_LISTBOX=no
871 DEFAULT_wxUSE_LISTCTRL=no
872 DEFAULT_wxUSE_NOTEBOOK=no
873 DEFAULT_wxUSE_POPUPWIN=no
874 DEFAULT_wxUSE_RADIOBOX=no
875 DEFAULT_wxUSE_RADIOBTN=no
876 DEFAULT_wxUSE_REARRANGECTRL=no
877 DEFAULT_wxUSE_SASH=no
878 DEFAULT_wxUSE_SCROLLBAR=no
879 DEFAULT_wxUSE_SEARCHCTRL=no
880 DEFAULT_wxUSE_SLIDER=no
881 DEFAULT_wxUSE_SPINBTN=no
882 DEFAULT_wxUSE_SPINCTRL=no
883 DEFAULT_wxUSE_SPLITTER=no
884 DEFAULT_wxUSE_STATBMP=no
885 DEFAULT_wxUSE_STATBOX=no
886 DEFAULT_wxUSE_STATLINE=no
887 DEFAULT_wxUSE_STATUSBAR=no
888 DEFAULT_wxUSE_TIPWINDOW=no
889 DEFAULT_wxUSE_TOGGLEBTN=no
890 DEFAULT_wxUSE_TOOLBAR=no
891 DEFAULT_wxUSE_TOOLBAR_NATIVE=no
892 DEFAULT_wxUSE_TOOLBOOK=no
893 DEFAULT_wxUSE_TOOLTIPS=no
894 DEFAULT_wxUSE_TREEBOOK=no
895 DEFAULT_wxUSE_TREECTRL=no
898 dnl please keep the settings below in alphabetical order
899 WX_ARG_FEATURE(accel, [ --enable-accel use accelerators], wxUSE_ACCEL)
900 WX_ARG_FEATURE(animatectrl, [ --enable-animatectrl use wxAnimationCtrl class], wxUSE_ANIMATIONCTRL)
901 WX_ARG_FEATURE(bmpbutton, [ --enable-bmpbutton use wxBitmapButton class], wxUSE_BMPBUTTON)
902 WX_ARG_FEATURE(bmpcombobox, [ --enable-bmpcombobox use wxBitmapComboBox class], wxUSE_BITMAPCOMBOBOX)
903 WX_ARG_FEATURE(button, [ --enable-button use wxButton class], wxUSE_BUTTON)
904 WX_ARG_FEATURE(calendar, [ --enable-calendar use wxCalendarCtrl class], wxUSE_CALCTRL)
905 WX_ARG_FEATURE(caret, [ --enable-caret use wxCaret class], wxUSE_CARET)
906 WX_ARG_FEATURE(checkbox, [ --enable-checkbox use wxCheckBox class], wxUSE_CHECKBOX)
907 WX_ARG_FEATURE(checklst, [ --enable-checklst use wxCheckListBox (listbox with checkboxes) class], wxUSE_CHECKLST)
908 WX_ARG_FEATURE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE)
909 WX_ARG_FEATURE(choicebook, [ --enable-choicebook use wxChoicebook class], wxUSE_CHOICEBOOK)
910 WX_ARG_FEATURE(collpane, [ --enable-collpane use wxCollapsiblePane class], wxUSE_COLLPANE)
911 WX_ARG_FEATURE(colourpicker,[ --enable-colourpicker use wxColourPickerCtrl class], wxUSE_COLOURPICKERCTRL)
912 WX_ARG_FEATURE(combobox, [ --enable-combobox use wxComboBox class], wxUSE_COMBOBOX)
913 WX_ARG_FEATURE(comboctrl, [ --enable-comboctrl use wxComboCtrl class], wxUSE_COMBOCTRL)
914 WX_ARG_FEATURE(dataviewctrl,[ --enable-dataviewctrl use wxDataViewCtrl class], wxUSE_DATAVIEWCTRL)
915 WX_ARG_FEATURE(datepick, [ --enable-datepick use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL)
916 WX_ARG_FEATURE(detect_sm, [ --enable-detect_sm use code to detect X11 session manager], wxUSE_DETECT_SM)
917 WX_ARG_FEATURE(dirpicker, [ --enable-dirpicker use wxDirPickerCtrl class], wxUSE_DIRPICKERCTRL)
918 WX_ARG_FEATURE(display, [ --enable-display use wxDisplay class], wxUSE_DISPLAY)
919 WX_ARG_FEATURE(editablebox, [ --enable-editablebox use wxEditableListBox class], wxUSE_EDITABLELISTBOX)
920 WX_ARG_FEATURE(filectrl, [ --enable-filectrl use wxFileCtrl class], wxUSE_FILECTRL)
921 WX_ARG_FEATURE(filepicker, [ --enable-filepicker use wxFilePickerCtrl class], wxUSE_FILEPICKERCTRL)
922 WX_ARG_FEATURE(fontpicker, [ --enable-fontpicker use wxFontPickerCtrl class], wxUSE_FONTPICKERCTRL)
923 WX_ARG_FEATURE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
924 WX_ARG_FEATURE(grid, [ --enable-grid use wxGrid class], wxUSE_GRID)
925 WX_ARG_FEATURE(headerctrl, [ --enable-headerctrl use wxHeaderCtrl class], wxUSE_HEADERCTRL)
926 WX_ARG_FEATURE(hyperlink, [ --enable-hyperlink use wxHyperlinkCtrl class], wxUSE_HYPERLINKCTRL)
927 WX_ARG_FEATURE(imaglist, [ --enable-imaglist use wxImageList class], wxUSE_IMAGLIST)
928 WX_ARG_FEATURE(infobar, [ --enable-infobar use wxInfoBar class], wxUSE_INFOBAR)
929 WX_ARG_FEATURE(listbook, [ --enable-listbook use wxListbook class], wxUSE_LISTBOOK)
930 WX_ARG_FEATURE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX)
931 WX_ARG_FEATURE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL)
932 WX_ARG_FEATURE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK)
933 WX_ARG_FEATURE(notifmsg, [ --enable-notifmsg use wxNotificationMessage class], wxUSE_NOTIFICATION_MESSAGE)
934 WX_ARG_FEATURE(odcombobox, [ --enable-odcombobox use wxOwnerDrawnComboBox class], wxUSE_ODCOMBOBOX)
935 WX_ARG_FEATURE(popupwin, [ --enable-popupwin use wxPopUpWindow class], wxUSE_POPUPWIN)
936 WX_ARG_FEATURE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX)
937 WX_ARG_FEATURE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN)
938 WX_ARG_FEATURE(rearrangectrl,[ --enable-rearrangectrl use wxRearrangeList/Ctrl/Dialog], wxUSE_REARRANGECTRL)
939 WX_ARG_FEATURE(sash, [ --enable-sash use wxSashWindow class], wxUSE_SASH)
940 WX_ARG_FEATURE(scrollbar, [ --enable-scrollbar use wxScrollBar class and scrollable windows], wxUSE_SCROLLBAR)
941 WX_ARG_FEATURE(searchctrl, [ --enable-searchctrl use wxSearchCtrl class], wxUSE_SEARCHCTRL)
942 WX_ARG_FEATURE(slider, [ --enable-slider use wxSlider class], wxUSE_SLIDER)
943 WX_ARG_FEATURE(spinbtn, [ --enable-spinbtn use wxSpinButton class], wxUSE_SPINBTN)
944 WX_ARG_FEATURE(spinctrl, [ --enable-spinctrl use wxSpinCtrl class], wxUSE_SPINCTRL)
945 WX_ARG_FEATURE(splitter, [ --enable-splitter use wxSplitterWindow class], wxUSE_SPLITTER)
946 WX_ARG_FEATURE(statbmp, [ --enable-statbmp use wxStaticBitmap class], wxUSE_STATBMP)
947 WX_ARG_FEATURE(statbox, [ --enable-statbox use wxStaticBox class], wxUSE_STATBOX)
948 WX_ARG_FEATURE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE)
949 WX_ARG_FEATURE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT)
950 WX_ARG_FEATURE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
951 WX_ARG_FEATURE(taskbaricon, [ --enable-taskbaricon use wxTaskBarIcon class], wxUSE_TASKBARICON)
952 WX_ARG_FEATURE(tbarnative, [ --enable-tbarnative use native wxToolBar class], wxUSE_TOOLBAR_NATIVE)
953 WX_ARG_FEATURE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
954 WX_ARG_FEATURE(tipwindow, [ --enable-tipwindow use wxTipWindow class], wxUSE_TIPWINDOW)
955 WX_ARG_FEATURE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN)
956 WX_ARG_FEATURE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR)
957 WX_ARG_FEATURE(toolbook, [ --enable-toolbook use wxToolbook class], wxUSE_TOOLBOOK)
958 WX_ARG_FEATURE(treebook, [ --enable-treebook use wxTreebook class], wxUSE_TREEBOOK)
959 WX_ARG_FEATURE(treectrl, [ --enable-treectrl use wxTreeCtrl class], wxUSE_TREECTRL)
961 dnl ---------------------------------------------------------------------------
963 dnl ---------------------------------------------------------------------------
965 WX_ARG_FEATURE(commondlg, [ --enable-commondlg use all common dialogs], wxUSE_COMMONDLGS)
966 WX_ARG_FEATURE(aboutdlg, [ --enable-aboutdlg use wxAboutBox], wxUSE_ABOUTDLG)
967 WX_ARG_FEATURE(choicedlg, [ --enable-choicedlg use wxChoiceDialog], wxUSE_CHOICEDLG)
968 WX_ARG_FEATURE(coldlg, [ --enable-coldlg use wxColourDialog], wxUSE_COLOURDLG)
969 WX_ARG_FEATURE(filedlg, [ --enable-filedlg use wxFileDialog], wxUSE_FILEDLG)
970 WX_ARG_FEATURE(finddlg, [ --enable-finddlg use wxFindReplaceDialog], wxUSE_FINDREPLDLG)
971 WX_ARG_FEATURE(fontdlg, [ --enable-fontdlg use wxFontDialog], wxUSE_FONTDLG)
972 WX_ARG_FEATURE(dirdlg, [ --enable-dirdlg use wxDirDialog], wxUSE_DIRDLG)
973 WX_ARG_FEATURE(msgdlg, [ --enable-msgdlg use wxMessageDialog], wxUSE_MSGDLG)
974 WX_ARG_FEATURE(numberdlg, [ --enable-numberdlg use wxNumberEntryDialog], wxUSE_NUMBERDLG)
975 WX_ARG_FEATURE(splash, [ --enable-splash use wxSplashScreen], wxUSE_SPLASH)
976 WX_ARG_FEATURE(textdlg, [ --enable-textdlg use wxTextDialog], wxUSE_TEXTDLG)
977 WX_ARG_FEATURE(tipdlg, [ --enable-tipdlg use startup tips], wxUSE_STARTUP_TIPS)
978 WX_ARG_FEATURE(progressdlg, [ --enable-progressdlg use wxProgressDialog], wxUSE_PROGRESSDLG)
979 WX_ARG_FEATURE(wizarddlg, [ --enable-wizarddlg use wxWizard], wxUSE_WIZARDDLG)
981 dnl ---------------------------------------------------------------------------
983 dnl ---------------------------------------------------------------------------
985 WX_ARG_FEATURE(menus, [ --enable-menus use wxMenu/wxMenuBar/wxMenuItem classes], wxUSE_MENUS)
986 WX_ARG_FEATURE(miniframe, [ --enable-miniframe use wxMiniFrame class], wxUSE_MINIFRAME)
987 WX_ARG_FEATURE(tooltips, [ --enable-tooltips use wxToolTip class], wxUSE_TOOLTIPS)
988 WX_ARG_FEATURE(splines, [ --enable-splines use spline drawing code], wxUSE_SPLINES)
989 WX_ARG_FEATURE(mousewheel, [ --enable-mousewheel use mousewheel], wxUSE_MOUSEWHEEL)
990 WX_ARG_FEATURE(validators, [ --enable-validators use wxValidator and derived classes], wxUSE_VALIDATORS)
991 WX_ARG_FEATURE(busyinfo, [ --enable-busyinfo use wxBusyInfo], wxUSE_BUSYINFO)
992 WX_ARG_FEATURE(joystick, [ --enable-joystick use wxJoystick], wxUSE_JOYSTICK)
993 WX_ARG_FEATURE(metafile, [ --enable-metafiles use wxMetaFile (Win32 only)], wxUSE_METAFILE)
994 WX_ARG_FEATURE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE)
995 WX_ARG_FEATURE(accessibility,[ --enable-accessibility enable accessibility support], wxUSE_ACCESSIBILITY)
997 dnl ---------------------------------------------------------------------------
998 dnl support for image formats that do not rely on external library
999 dnl ---------------------------------------------------------------------------
1001 WX_ARG_FEATURE(palette, [ --enable-palette use wxPalette class], wxUSE_PALETTE)
1002 WX_ARG_FEATURE(image, [ --enable-image use wxImage class], wxUSE_IMAGE)
1003 WX_ARG_FEATURE(gif, [ --enable-gif use gif images (GIF file format)], wxUSE_GIF)
1004 WX_ARG_FEATURE(pcx, [ --enable-pcx use pcx images (PCX file format)], wxUSE_PCX)
1005 WX_ARG_FEATURE(tga, [ --enable-tga use tga images (TGA file format)], wxUSE_TGA)
1006 WX_ARG_FEATURE(iff, [ --enable-iff use iff images (IFF file format)], wxUSE_IFF)
1007 WX_ARG_FEATURE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM)
1008 WX_ARG_FEATURE(xpm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM)
1009 WX_ARG_FEATURE(ico_cur, [ --enable-ico_cur use Windows ICO and CUR formats], wxUSE_ICO_CUR)
1011 dnl ---------------------------------------------------------------------------
1012 dnl wxMSW-only options
1013 dnl ---------------------------------------------------------------------------
1015 WX_ARG_FEATURE(dccache, [ --enable-dccache cache temporary wxDC objects (Win32 only)], wxUSE_DC_CACHEING)
1016 WX_ARG_FEATURE(ps-in-msw, [ --enable-ps-in-msw use PS printing in wxMSW (Win32 only)], wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
1017 WX_ARG_FEATURE(ownerdrawn, [ --enable-ownerdrawn use owner drawn controls (Win32 and OS/2 only)], wxUSE_OWNER_DRAWN)
1018 WX_ARG_FEATURE(uxtheme, [ --enable-uxtheme enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME)
1019 WX_ARG_FEATURE(wxdib, [ --enable-wxdib use wxDIB class (Win32 only)], wxUSE_DIB)
1021 dnl this one is not really MSW-specific but it exists mainly to be turned off
1022 dnl under MSW, it should be off by default on the other platforms
1023 if test "$wxUSE_MSW" != 1; then
1024 DEFAULT_wxUSE_AUTOID_MANAGEMENT=no
1027 WX_ARG_FEATURE(autoidman, [ --enable-autoidman use automatic ids management], wxUSE_AUTOID_MANAGEMENT)
1032 dnl ---------------------------------------------------------------------------
1033 dnl Checks for programs
1034 dnl ---------------------------------------------------------------------------
1036 dnl flush the cache because checking for programs might abort
1039 dnl C-compiler checks
1040 dnl defines CC with the compiler to use
1041 dnl defines GCC with yes if using gcc
1042 dnl defines GCC empty if not using gcc
1045 dnl this magic incantation is needed to prevent AC_PROG_CC from setting the
1046 dnl default CFLAGS (something like "-g -O2") -- we don't need this as we add
1047 dnl (if not already present in C*FLAGS) the -g and -O flags ourselves below
1051 dnl is -traditional needed for correct compilations
1052 dnl adds -traditional for gcc if needed
1053 AC_PROG_GCC_TRADITIONAL
1055 dnl C++-compiler checks
1056 dnl defines CXX with the compiler to use
1057 dnl defines GXX with yes if using gxx
1058 dnl defines GXX empty if not using gxx
1059 dnl defines CXXFLAGS
1061 dnl see CFLAGS line above
1062 CXXFLAGS=${CXXFLAGS:=}
1063 AC_BAKEFILE_PROG_CXX
1065 dnl configure always sets CXX to something as it falls back to g++ even if no
1066 dnl C++ compiler was found, but we prefer to abort now with a clear error
1067 dnl message rather than give errors about all tests failures below
1068 if test "$CXX" = "g++" -a "$GXX" != "yes"; then
1069 AC_MSG_ERROR([C++ compiler is needed to build wxWidgets])
1073 dnl defines AR with the appropriate command
1075 dnl For Sun CC AC_BAKEFILE below sets AR to the compiler itself.
1076 if test "x$SUNCXX" != xyes; then
1077 AC_CHECK_TOOL(AR, ar)
1078 if test "x$AR" = "x" ; then
1079 AC_MSG_ERROR([ar is needed to build wxWidgets])
1083 dnl ---------------------------------------------------------------------------
1084 dnl Mac-specific SDK/architectures checks
1085 dnl ---------------------------------------------------------------------------
1087 if test "$wxUSE_MAC" = 1; then
1089 retest_macosx_linking=no
1091 dnl Support the old --enable-universal_binary in case anyone was using it.
1092 if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
1093 dnl --enable-universal_binary uses a default SDK (currently 10.4u)
1094 dnl --enable-universal_binary=SDK names a path to an SDK
1095 if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
1096 # Implicitly turn on the new --with-macosx-sdk using the default
1097 # SDK which provides the behavior this option has always had.
1098 if test "x$wxUSE_MACOSX_SDK" = "x"; then
1099 AC_MSG_WARN([Enabling default SDK due to --enable-universal_binary.])
1100 AC_MSG_WARN([If you don't want this, specify --without-macosx-sdk])
1101 wxUSE_MACOSX_SDK=yes
1104 # Complain to user if he specified an argument to --enable-universal_binary
1105 # and also 1) specified --with-macosx-sdk using the default (yes) or
1106 # 2) specified --with-macosx-sdk using a path or 3) specified
1107 # --without-macosx-sdk (no).
1108 if test "x$wxUSE_MACOSX_SDK" != "x" ; then
1109 AC_MSG_FAILURE([Please specify the new --with-macosx-sdk=PATH and do not specify an arg to --enable-universal_binary])
1111 # Put the SDK path into the wxUSE_MACOSX_SDK. We don't have to
1112 # special-case the empty string because the below test simply
1113 # converts "no" to the empty string anyway.
1114 wxUSE_MACOSX_SDK="$wxUSE_UNIVERSAL_BINARY"
1115 dnl Warn about deprecated usage.
1116 AC_MSG_WARN([Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument])
1119 dnl FIXME: I think it would be better to put this into CC, CXX, and LD rather than the flags.
1120 OSX_UNIV_OPTS="-arch ppc -arch i386"
1121 CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
1122 CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
1123 OBJCXXFLAGS="$OSX_UNIV_OPTS $OBJCXXFLAGS"
1124 OBJCFLAGS="$OSX_UNIV_OPTS $OBJCFLAGS"
1125 LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
1126 dnl NOTE: Only the compiler driver needs arch flags. The link editor
1127 dnl is incapable of using them but the compiler driver (which we use
1128 dnl as LD when building dynamic libraries) uses them to invoke the
1129 dnl real ld multiple times. If we moved to libtool -dynamic we would
1130 dnl need no arch flags because libtool automatically invokes ld for
1131 dnl every architecture found in the fat input files.
1133 dnl For static library builds, AR/RANLIB automatically create proper
1134 dnl fat archives although AR is unable to update them once RANLIB has
1135 dnl made them into proper fat archives. Fortunately, our link process
1136 dnl simply removes the .a file before using ar to create a new one.
1137 dnl If we did move to libtool -static we still wouldn't need arch flags
1138 dnl because libtool automatically figures it out based on input.
1139 retest_macosx_linking=yes
1141 dnl HACK: PCH could be made to work by precompiling for each architecture into separate directories
1142 dnl and including all architecture directories with each compiler invocation.
1143 dnl That would require a major rework of Bakefile and at the same time it would be nice to have
1144 dnl Objective-C++ precompiled headers.
1145 AC_MSG_WARN([Disabling precompiled headers due to universal binary build.])
1149 dnl Set up the Mac OS X SDK. We do this early so configure tests will occur
1150 dnl with the SDK in place.
1151 dnl NOTE: We clobber wxUSE_MACOSX_SDK with the SDK path
1152 if test "x$wxUSE_MACOSX_SDK" = "xno"; then
1154 elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
1155 # TODO: Search for most recent SDK and use it.
1156 wxUSE_MACOSX_SDK="/Developer/SDKs/MacOSX10.4u.sdk"
1160 if test "x$wxUSE_MACOSX_SDK" != "x"; then
1161 AC_MSG_CHECKING([for SDK directory $wxUSE_MACOSX_SDK])
1162 if ! test -d "$wxUSE_MACOSX_SDK"; then
1163 AC_MSG_FAILURE([not found])
1165 AC_MSG_RESULT([exists])
1167 MACOSX_SDK_OPTS="-isysroot $wxUSE_MACOSX_SDK"
1168 eval "CC=\"$CC $MACOSX_SDK_OPTS\""
1169 eval "CXX=\"$CXX $MACOSX_SDK_OPTS\""
1170 eval "LD=\"$LD $MACOSX_SDK_OPTS\""
1171 retest_macosx_linking=yes
1172 dnl NOTE: When libtool is used in lieu of AR/RANLIB (i.e. in static mode)
1173 dnl the syslibroot makes no difference. We aren't using libtool now but
1174 dnl if we ever did, be aware that you don't need to worry about it.
1177 dnl Set up the deployment target
1178 dnl No : Don't specify a min version even if using an SDK
1179 dnl Yes : Use the version from the SDK if used, otherwise same as no
1180 dnl Param: Use the specified version
1181 if test "x$wxUSE_MACOSX_VERSION_MIN" = "xno"; then
1182 wxUSE_MACOSX_VERSION_MIN=
1183 elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then
1184 if test "x$wxUSE_MACOSX_SDK" != "x"; then
1185 AC_MSG_CHECKING([SDK deployment version])
1186 dnl We need to quote the next line where we don't need macros and do need [] in the regex
1188 MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
1190 # If that failed, try again with the new key
1191 if test "x$MACOSX_SDK_PLIST_VERSION_MIN" == "x"; then
1193 MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
1197 if test "x$MACOSX_SDK_PLIST_VERSION_MIN" != "x"; then
1198 wxUSE_MACOSX_VERSION_MIN=$MACOSX_SDK_PLIST_VERSION_MIN
1199 AC_MSG_RESULT([$wxUSE_MACOSX_VERSION_MIN])
1201 AC_MSG_WARN([Could not determine deployment target from SDKSettings.plist])
1202 wxUSE_MACOSX_VERSION_MIN=
1205 wxUSE_MACOSX_VERSION_MIN=
1207 elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then
1208 OSX_VERSION=`sw_vers -productVersion | grep 10.[[0-9]]`
1209 if test "$wxUSE_OSX_CARBON" = 1 -o "x$OSX_VERSION" = "x10.4"; then
1210 # otherwise configure stops on leopard for universal_binary
1211 wxUSE_MACOSX_VERSION_MIN=10.4
1213 # for OS X Cocoa, use 10.5 so we can get 64-bit compile on Snow Leopard
1214 wxUSE_MACOSX_VERSION_MIN=10.5
1219 if test "x$wxUSE_MACOSX_VERSION_MIN" == "x10.4"; then
1223 if test "$wxUSE_OSX_CARBON" = 1; then
1227 if test "x$NEEDS_GCC40" == "xyes"; then
1228 # gcc 4.2 cannot compile 10.4 compatible code, so if the user is using it
1229 # and wants 10.4 compatible code, then 'downgrade' to 4.0
1230 # This is also the simplest way to get 32-bit binaries on Snow Leopard.
1231 if test "x$CC" = "xgcc"; then
1232 CCVERSION=`$CC --version | grep 4.[[2-9]].`
1233 if test "x$CCVERSION" != "x"; then
1234 echo "$as_me:$LINENO: WARNING: gcc >= 4.2 cannot compile 10.4 compatible code. Using gcc 4.0 instead."
1235 CC="/usr/bin/gcc-4.0"
1239 if test "x$CXX" = "xg++"; then
1240 CCVERSION=`$CXX --version | grep 4.[[2-9]].`
1241 if test "x$CCVERSION" != "x"; then
1242 CXX="/usr/bin/g++-4.0"
1247 if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then
1248 MACOSX_VERSION_MIN_OPTS="-mmacosx-version-min=$wxUSE_MACOSX_VERSION_MIN"
1249 eval "CC=\"$CC $MACOSX_VERSION_MIN_OPTS\""
1250 eval "CXX=\"$CXX $MACOSX_VERSION_MIN_OPTS\""
1251 eval "LD=\"$LD $MACOSX_VERSION_MIN_OPTS\""
1252 retest_macosx_linking=yes
1255 dnl If either an SDK or a version option was added, make sure that we can
1256 dnl still compile and link both C and C++. If we didn't do this, then most
1257 dnl of the remaining tests would fail.
1258 if test "x$retest_macosx_linking" = "xyes"; then
1260 AC_MSG_CHECKING([if C compiler works with SDK/version options])
1261 AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1])
1265 AC_MSG_CHECKING([if C++ compiler works with SDK/version options])
1266 AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1])
1274 dnl The other BSD's should probably go in here too, since this is
1275 dnl to workaround a strange static lib BSDism.
1276 dnl Mac OS X install seems to ignore -p option...
1278 INSTALL_PROGRAM="cp -fp"
1279 INSTALL_DATA="cp -fp"
1285 dnl ------------------------------------------------------------------------
1286 dnl Platform specific tests
1287 dnl ------------------------------------------------------------------------
1289 dnl xlC needs -qunique under AIX so that one source file can be
1290 dnl compiled to multiple object files and safely linked together.
1291 if test "x$XLCXX" = "xyes" -a "x$USE_AIX" = "x1"; then
1292 CXXFLAGS="-qunique $CXXFLAGS"
1295 dnl This case is for PowerPC OS X vs. everything else
1298 AC_MSG_CHECKING([if __POWERPC__ is already defined])
1299 AC_TRY_COMPILE([],[#ifndef __POWERPC__
1300 choke me for lack of PowerPC
1303 [AC_MSG_RESULT([yes])],
1304 [AC_MSG_RESULT([no])
1305 AC_DEFINE(__POWERPC__)
1310 dnl This case is for OS X vs. everything else
1313 AC_MSG_CHECKING([if CoreFoundation/CFBase.h is usable])
1314 AC_TRY_COMPILE([#include <CoreFoundation/CFBase.h>
1316 [AC_MSG_RESULT([yes])],
1317 [AC_MSG_RESULT([no])
1318 AC_MSG_CHECKING([if __CF_USE_FRAMEWORK_INCLUDES__ is required])
1319 AC_TRY_COMPILE([#define __CF_USE_FRAMEWORK_INCLUDES__
1320 #include <CoreFoundation/CFBase.h>
1322 [AC_MSG_RESULT([yes])
1323 dnl We must use -D so source files that don't include wx/setup.h
1324 dnl but do include CFBase will work.
1325 CPPFLAGS="-D__CF_USE_FRAMEWORK_INCLUDES__ $CPPFLAGS"],
1326 [AC_MSG_FAILURE([no. CoreFoundation not available.])]
1333 dnl Determine whether we want to use Cygwin as Windows or POSIX platform: the
1334 dnl latter makes more sense for wxGTK/Motif/X11 ports
1339 if test "$wxUSE_MSW" = 1 ; then
1342 dnl when we use cygwin compiler with -mno-cygwin option it uses mingw32
1343 dnl headers and libraries, so it's Windows-like in this case
1344 AC_CACHE_CHECK([if -mno-cygwin is in effect], wx_cv_nocygwin,
1359 if test "$wx_cv_nocygwin" = "yes"; then
1365 if test "$wants_win32" = 1 ; then
1366 BAKEFILE_FORCE_PLATFORM=win32
1374 if test "$wxUSE_WINE" = "yes"; then
1376 LDFLAGS_GUI="-mwindows"
1379 dnl NB: The two tests bellow are *NOT* mutually exclusive! They should only
1380 dnl take effect on Cygwin/Mingw and not other platforms.
1381 if test "$wants_win32" = 1 ; then
1384 AC_DEFINE(__WIN32__)
1385 AC_DEFINE(__WIN95__)
1386 AC_DEFINE(__WINDOWS__)
1387 AC_DEFINE(__GNUWIN32__)
1390 if test "$doesnt_want_win32" = 1 ; then
1394 dnl (end of Windows-only piece)
1396 if test "$USE_UNIX" = 1 ; then
1401 dnl This case is for OS/2 vs. everything else
1403 *-pc-os2_emx | *-pc-os2-emx )
1404 dnl ---------------------------------------------------------------------
1405 dnl When we are using gcc on OS/2, we want to be either using resources
1406 dnl (PM) or a more complete POSIX emulation for Motif/GTK+/X11.
1407 dnl Moreover we need to link explicitly against either stdcpp.a or
1408 dnl stdcxx.a (depending on compiler version), since we are using "gcc",
1410 dnl ---------------------------------------------------------------------
1411 dnl (OS/2-only piece)
1412 if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
1413 dnl More complete Unix emulation for unix-like ports
1414 dnl by linking in POSIX/2's cExt (if available).
1415 AC_CHECK_LIB(cExt, drand48, LIBS="$LIBS -lcExt")
1417 dnl Include resources for the "native" port (wxPM).
1418 RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res"
1420 dnl Check for the gcc version (and thereby for the C runtime library).
1421 dnl wx_cv_gccversion = EMX2 -> Standard EMX environment
1422 dnl wx_cv_gccversion = EMX3 -> EMX with gcc-3.0.3 or gcc-3.2.1
1423 dnl wx_cv_gccversion = Innotek5 -> gcc-3.2.2 with Innotek libc5
1424 dnl wx_cv_gccversion = Innotek6 -> gcc-3.3.5 with Innotek libc6.
1425 AC_CACHE_CHECK([for gcc/libc version], wx_cv_gccversion,[
1427 dnl Check the gcc version macro.
1433 FILE *f=fopen("conftestval", "w");
1438 #elif (__GNUC__==3) && ((__GNUC_MINOR__ < 2) || ((__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__<2)))
1440 #elif (__GNUC__==3) && (__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__==2)
1449 wx_cv_gccversion=`cat conftestval`,
1450 wx_cv_gccversion="EMX2",
1451 dnl Compilation error: Assuming standard EMX environment
1452 wx_cv_gccversion="EMX2"
1455 if test "$wx_cv_gccversion" = "EMX2"; then
1456 LIBS="$LIBS -lstdcpp"
1457 LDFLAGS="$LDFLAGS -Zsysv-signals"
1459 if test "$wx_cv_gccversion" = "EMX3"; then
1460 LIBS="$LIBS -lstdcxx -lgcc"
1461 LDFLAGS="$LDFLAGS -Zsysv-signals"
1463 LIBS="$LIBS -lstdc++"
1466 if test "$wxUSE_SHARED" = "yes" -a "$wxUSE_OMF" = "no"; then
1467 AC_MSG_WARN([Building DLLs requires OMF mode, enabled])
1471 dnl (end of OS/2-only piece)
1474 dnl ---------------------------------------------------------------------
1475 dnl look for strcasecmp() in string.h and then strings.h if it's not
1476 dnl there. Don't do this on OS/2, where "stricmp" is the function to be
1478 dnl ---------------------------------------------------------------------
1479 dnl (non-OS/2-only piece)
1481 AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
1486 strcasecmp("foo", "bar");
1488 ac_cv_string_strcasecmp=yes,
1489 ac_cv_string_strcasecmp=no
1493 if test x"$ac_cv_string_strcasecmp" = "xyes"; then
1494 AC_DEFINE(HAVE_STRCASECMP_IN_STRING_H)
1496 AC_CACHE_CHECK([for strcasecmp() in strings.h], ac_cv_strings_strcasecmp, [
1498 #include <strings.h>
1501 strcasecmp("foo", "bar");
1503 ac_cv_strings_strcasecmp=yes,
1504 ac_cv_strings_strcasecmp=no
1508 if test x"$ac_cv_strings_strcasecmp" = "xyes"; then
1509 AC_DEFINE(HAVE_STRCASECMP_IN_STRINGS_H)
1511 AC_MSG_ERROR([No case-insensitive string comparison function found.])
1515 dnl (end of non-OS/2-only piece)
1519 dnl ------------------------------------------------------------------------
1520 dnl Check for headers
1521 dnl ------------------------------------------------------------------------
1523 dnl Note: non-empty last parameter makes check compile-only,
1524 dnl skipping worthless preprocessing check
1525 AC_CHECK_HEADERS(langinfo.h wchar.h,,, [AC_INCLUDES_DEFAULT])
1527 dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
1528 if test "$ac_cv_header_wchar_h" != "yes"; then
1529 AC_CHECK_HEADERS([wcstr.h],,, [AC_INCLUDES_DEFAULT()])
1533 *-pc-os2_emx | *-pc-os2-emx )
1534 dnl Explicitly link -lintl if langinfo.h is available
1535 dnl and intl not yet included in libc
1536 if test $ac_cv_header_langinfo_h = "yes" \
1537 -a \( "$wx_cv_gccversion" = "EMX2" \
1538 -o "$wx_cv_gccversion" = "EMX3" \
1539 -o "$wx_cv_gccversion" = "Innotek5" \); then
1545 dnl POSIX needs this for select(), but old systems don't have it
1546 if test "$USE_UNIX" = 1 ; then
1547 AC_CHECK_HEADERS([sys/select.h],,, [AC_INCLUDES_DEFAULT()])
1550 dnl ---------------------------------------------------------------------------
1551 dnl Checks for compiler characteristics
1552 dnl ---------------------------------------------------------------------------
1554 dnl defines const to be empty if c-compiler does not support const fully
1556 dnl defines inline to a sensible value for the c-compiler
1559 dnl check the sizes of integral types (give some reasonable default values for
1560 dnl cross-compiling)
1561 dnl defines the size of certain types of variables in SIZEOF_<TYPE>
1562 AC_CHECK_SIZEOF(short, 2)
1563 AC_CHECK_SIZEOF(void *, 4)
1564 AC_CHECK_SIZEOF(int, 4)
1565 AC_CHECK_SIZEOF(long, 4)
1566 AC_CHECK_SIZEOF(size_t, 4)
1570 AC_CHECK_SIZEOF(long long, 8)
1573 AC_CHECK_SIZEOF(long long, 0)
1574 if test "$ac_cv_sizeof_long_long" != 0; then
1575 dnl HPUX 10.20 headers need this define in order to use long long definitions
1576 CPPFLAGS="-D_INCLUDE_LONGLONG $CPPFLAGS"
1580 AC_CHECK_SIZEOF(long long, 0)
1583 dnl SGI/Irix's stdio.h does not include wchar_t. Mac OS X does not provide
1584 dnl wchar.h and wchar_t is defined by stdlib.h (GD)
1585 AC_CHECK_SIZEOF(wchar_t, 0,
1587 /* DJGPP's wchar_t is now a keyword in C++ (still not C though) */
1588 #if defined(__DJGPP__) && !( (__GNUC_MINOR__ >= 8 && __GNUC__ == 2 ) || __GNUC__ >= 3 )
1589 # error "fake wchar_t"
1593 # include <stddef.h>
1597 #ifdef HAVE_STDLIB_H
1598 # include <stdlib.h>
1603 if test "$ac_cv_sizeof_wchar_t" != 0; then
1609 dnl checks needed to define wxVaCopy
1610 AC_CACHE_CHECK([for va_copy],
1616 void foo(char *f, ...)
1629 wx_cv_func_va_copy=yes,
1630 wx_cv_func_va_copy=no
1636 if test $wx_cv_func_va_copy = "yes"; then
1637 AC_DEFINE(HAVE_VA_COPY)
1639 dnl try to understand how can we copy va_lists
1640 AC_CACHE_CHECK([if va_list can be copied by value],
1641 wx_cv_type_va_list_lvalue,
1645 int foo(char *f, ...)
1650 if ( va_arg(ap1, int) != 17 || va_arg(ap2, int) != 17 )
1658 return foo("hi", 17);
1660 wx_cv_type_va_list_lvalue=yes,
1661 wx_cv_type_va_list_lvalue=no,
1662 dnl assume most common case for cross-compiling...
1663 wx_cv_type_va_list_lvalue=yes
1668 if test $wx_cv_type_va_list_lvalue != "yes"; then
1669 dnl we suppose that the only thing which can't be copied like this
1670 dnl are arrays... only experience will show whether this is really true
1671 AC_DEFINE(VA_LIST_IS_ARRAY)
1675 dnl don't check for vararg macros if they're explicitly disabled: this is
1676 dnl useful if the user code using the library wants to limit itself to standard
1677 dnl C++ only (e.g. is compiled with g++ -std=c++98)
1678 if test "$wxUSE_VARARG_MACROS" = "yes"; then
1680 dnl Check if variadic macros (C99 feature) are supported:
1682 [whether the compiler supports variadic macros],
1683 [wx_cv_have_variadic_macros],
1685 dnl C compiler might support variadic macros when C++ one doesn't
1686 dnl (happens with gcc/g++ 2.95.4), so must use C++ one explicitly
1692 #define test(fmt, ...) printf(fmt, __VA_ARGS__)
1695 test("%s %d %p", "test", 1, 0);
1698 [wx_cv_have_variadic_macros=yes],
1699 [wx_cv_have_variadic_macros=no]
1705 if test $wx_cv_have_variadic_macros = "yes"; then
1706 AC_DEFINE(HAVE_VARIADIC_MACROS)
1709 fi dnl wxUSE_VARARG_MACROS == yes
1712 dnl check for large file support
1715 if test "$ac_cv_sys_file_offset_bits" = "64"; then
1716 LARGEFILE_CPPFLAGS="-D_FILE_OFFSET_BITS=64"
1717 elif test "$ac_cv_sys_large_files" = 1; then
1718 LARGEFILE_CPPFLAGS="-D_LARGE_FILES"
1721 dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command
1722 dnl line because otherwise the system headers risk being included before
1723 dnl wx/defs.h which defines these constants leading to inconsistent
1724 dnl sizeof(off_t) in different source files of the same program and linking
1726 if test -n "$LARGEFILE_CPPFLAGS"; then
1727 WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS $LARGEFILE_CPPFLAGS"
1729 dnl We get "Large Files (ILP32) not supported in strict ANSI mode."
1730 dnl #error from HP standard headers unless __STDC_EXT__ is defined.
1731 dnl The compiler should define it automatically, but some old g++
1732 dnl versions don't define it, so test and add it if necessary. AFAIK
1733 dnl the problem only affects the C++ compiler so it is added to
1735 if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then
1737 [if -D__STDC_EXT__ is required],
1738 wx_cv_STDC_EXT_required,
1744 #ifndef __STDC_EXT__
1748 wx_cv_STDC_EXT_required=no,
1749 wx_cv_STDC_EXT_required=yes
1754 if test "x$wx_cv_STDC_EXT_required" = "xyes"; then
1755 WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__"
1760 dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source
1762 dnl it may be affected by large file flags (this happens under HP-UX 11 for
1763 dnl example) so set them before using it and also use C++ to ensure that we get
1764 dnl errors, not warnings, about the missing functions
1766 old_CPPFLAGS="$CPPFLAGS"
1767 CPPFLAGS="$CPPFLAGS $LARGEFILE_CPPFLAGS"
1769 CPPFLAGS="$old_CPPFLAGS"
1771 if test "$ac_cv_sys_largefile_source" != no; then
1772 WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
1775 dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
1778 dnl check for iostream (as opposed to iostream.h) standard header
1779 WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
1781 dnl check whether C++ compiler supports explicit keyword
1784 dnl With Sun CC, temporaries have block scope by default. This flag is needed
1785 dnl to get the expression scope behaviour that conforms to the standard.
1786 if test "x$SUNCXX" = xyes; then
1787 CXXFLAGS="-features=tmplife $CXXFLAGS"
1790 dnl Sun X11 headers are (still, in 2005!) non-ANSI and the best they could do
1791 dnl was to hack their C++ compiler to accept them silently -- but C compiler
1792 dnl still spits out dozens of warnings for each X include file, so suppress
1794 if test "x$SUNCC" = xyes; then
1795 CFLAGS="-erroff=E_NO_EXPLICIT_TYPE_GIVEN $CFLAGS"
1798 dnl SGI mipsPro compiler gives this warning for "conversion from pointer to
1799 dnl same-sized integral type" even when there is an explicit cast and as there
1800 dnl is no way to turn it off and there are hundreds of these warnings in wx
1801 dnl sources, just turn it off for now
1803 dnl a better long term solution would be to use #pragma set/reset woff in
1804 dnl wxPtrToUInt() and use it instead of casts elsewhere
1805 if test "x$SGICC" = "xyes"; then
1806 CFLAGS="-woff 3970 $CFLAGS"
1808 if test "x$SGICXX" = "xyes"; then
1809 CXXFLAGS="-woff 3970 $CXXFLAGS"
1812 dnl HP-UX c89/aCC compiler warnings
1813 if test "x$HPCC" = "xyes"; then
1814 dnl 2011: "unrecognized preprocessor directive": nice warning but it's given
1815 dnl even for directives inside #if which is not true (i.e. which are
1816 dnl used for other compilers/OS) and so we have no way to get rid of it
1817 dnl 2450: "long long is non standard" -- yes, we know
1818 CFLAGS="+W 2011,2450 $CFLAGS"
1820 if test "x$HPCXX" = "xyes"; then
1821 dnl 2340: "value copied to temporary, reference to temporary used": very
1822 dnl painful as triggered by any occurrence of user-defined conversion
1823 dnl 4232: "conversion from 'Foo *' to a more strictly aligned type 'Bar *'
1824 dnl may cause misaligned access": this might indicate a real problem
1825 dnl but any use of GTK+ cast macros results in it so it's unusable
1827 CXXFLAGS="+W 2340,4232 $CXXFLAGS"
1830 dnl DEC/Compaq/HP cxx warnings
1831 if test "x$COMPAQCXX" = "xyes"; then
1832 dnl -w0 enables all warnings, then we disable some of them:
1833 dnl basclsnondto: base class dtor non virtual (sometimes we do want this)
1834 dnl unrimpret: "end of routine block may be unreachable" is given for
1835 dnl every "if ( ) return ...; else return ...;"
1836 dnl intconlosbit: "conversion to integral type of smaller size could lose
1837 dnl data" this is a useful warning but there are too many of
1839 CXXFLAGS="-w0 -msg_disable basclsnondto,unrimpret,intconlosbit"
1842 dnl the next few tests are all for C++ features and so need to be done using
1846 dnl check for std::string or std::wstring
1847 if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then
1848 if test "$wxUSE_UNICODE" = "yes"; then
1849 std_string="std::wstring"
1852 std_string="std::string"
1856 dnl check if <string> declares std::[w]string
1857 AC_CACHE_CHECK([for $std_string in <string>],
1858 wx_cv_class_stdstring,
1860 AC_TRY_COMPILE([#include <string>],
1862 wx_cv_class_stdstring=yes,
1863 wx_cv_class_stdstring=no
1868 if test "$wx_cv_class_stdstring" = yes; then
1869 if test "$wxUSE_UNICODE" = "yes"; then
1870 AC_DEFINE(HAVE_STD_WSTRING)
1872 dnl we don't need HAVE_STD_STRING, we just suppose it's available if
1873 dnl wxUSE_STD_STRING==yes
1875 AC_CACHE_CHECK([if std::basic_string<$char_type> works],
1876 wx_cv_class_stdbasicstring,
1881 # include <stddef.h>
1885 #ifdef HAVE_STDLIB_H
1886 # include <stdlib.h>
1891 [std::basic_string<$char_type> foo;
1892 const $char_type* dummy = foo.c_str();],
1893 wx_cv_class_stdbasicstring=yes,
1894 wx_cv_class_stdbasicstring=no
1899 if test "$wx_cv_class_stdbasicstring" != yes; then
1900 if test "$wxUSE_STL" = "yes"; then
1901 AC_MSG_ERROR([Can't use --enable-stl without $std_string or std::basic_string<$char_type>])
1902 elif test "$wxUSE_STD_STRING" = "yes"; then
1903 AC_MSG_ERROR([Can't use --enable-std_string without $std_string or std::basic_string<$char_type>])
1905 AC_MSG_WARN([No $std_string or std::basic_string<$char_type>, switching to --disable-std_string])
1912 if test "$wxUSE_STD_IOSTREAM" = "yes"; then
1913 AC_CHECK_TYPES([std::istream, std::ostream],,
1914 [wxUSE_STD_IOSTREAM=no],
1915 [#include <iostream>])
1917 if test "$wxUSE_STD_IOSTREAM" != "yes"; then
1918 if test "$wxUSE_STD_IOSTREAM" = "yes"; then
1919 AC_MSG_ERROR([Can't use --enable-std_iostreams without std::istream and std::ostream])
1921 AC_MSG_WARN([No std::iostreams, switching to --disable-std_iostreams])
1926 if test "$wxUSE_STL" = "yes"; then
1927 dnl check for basic STL functionality
1928 AC_CACHE_CHECK([for basic STL functionality],
1930 [AC_TRY_COMPILE([#include <string>
1931 #include <functional>
1932 #include <algorithm>
1935 [std::vector<int> moo;
1937 std::vector<int>::iterator it =
1938 std::find_if(moo.begin(), moo.end(),
1939 std::bind2nd(std::less<int>(), 3));],
1945 if test "$wx_cv_lib_stl" != yes; then
1946 AC_MSG_ERROR([Can't use --enable-stl as basic STL functionality is missing])
1949 dnl check for compliant std::string::compare
1950 AC_CACHE_CHECK([for compliant std::string::compare],
1951 wx_cv_func_stdstring_compare,
1952 [AC_TRY_COMPILE([#include <string>],
1953 [std::string foo, bar;
1955 foo.compare(1, 1, bar);
1956 foo.compare(1, 1, bar, 1, 1);
1958 foo.compare(1, 1, "");
1959 foo.compare(1, 1, "", 2);],
1960 wx_cv_func_stdstring_compare=yes,
1961 wx_cv_func_stdstring_compare=no
1965 if test "$wx_cv_func_stdstring_compare" = yes; then
1966 AC_DEFINE(HAVE_STD_STRING_COMPARE)
1969 if test "$wx_cv_class_gnuhashmapset" = yes; then
1970 AC_DEFINE(HAVE_EXT_HASH_MAP)
1971 AC_DEFINE(HAVE_GNU_CXX_HASH_MAP)
1974 AC_CHECK_HEADER([unordered_map],
1975 [AC_CACHE_CHECK([for unordered_map and unordered_set in std],
1976 wx_cv_class_stdunorderedmapset,
1977 [AC_TRY_COMPILE([#include <unordered_map>
1978 #include <unordered_set>],
1979 [std::unordered_map<double*, char*> test1;
1980 std::unordered_set<char*> test2;],
1981 wx_cv_class_stdunorderedmapset=yes,
1982 wx_cv_class_stdunorderedmapset=no)
1989 if test "$wx_cv_class_stdunorderedmapset" = yes; then
1990 AC_DEFINE(HAVE_STD_UNORDERED_MAP)
1991 AC_DEFINE(HAVE_STD_UNORDERED_SET)
1993 AC_CHECK_HEADER([tr1/unordered_map],
1994 [AC_CACHE_CHECK([for unordered_map and unordered_set in std::tr1],
1995 wx_cv_class_tr1unorderedmapset,
1996 [AC_TRY_COMPILE([#include <tr1/unordered_map>
1997 #include <tr1/unordered_set>],
1998 [std::tr1::unordered_map<double*, char*> test1;
1999 std::tr1::unordered_set<char*> test2;
2000 #if defined(__GNUC__) && (__GNUC__==4) && (__GNUC_MINOR__<2)
2001 #error can't use unordered_{map,set} with gcc-4.[01]: http://gcc.gnu.org/PR24389
2003 wx_cv_class_tr1unorderedmapset=yes,
2004 wx_cv_class_tr1unorderedmapset=no)
2011 if test "$wx_cv_class_tr1unorderedmapset" = yes; then
2012 AC_DEFINE(HAVE_TR1_UNORDERED_MAP)
2013 AC_DEFINE(HAVE_TR1_UNORDERED_SET)
2015 dnl check for hash_map and hash_set headers
2016 AC_CHECK_HEADER([hash_map],
2017 [AC_CACHE_CHECK([for std::hash_map and hash_set],
2018 wx_cv_class_stdhashmapset,
2019 [AC_TRY_COMPILE([#include <hash_map>
2020 #include <hash_set>],
2021 [std::hash_map<double*, char*, std::hash<double*>, std::equal_to<double*> > test1;
2022 std::hash_set<char*, std::hash<char*>, std::equal_to<char*> > test2;],
2023 wx_cv_class_stdhashmapset=yes,
2024 wx_cv_class_stdhashmapset=no)
2031 if test "$wx_cv_class_stdhashmapset" = yes; then
2032 AC_DEFINE(HAVE_HASH_MAP)
2033 AC_DEFINE(HAVE_STD_HASH_MAP)
2036 AC_CHECK_HEADER([ext/hash_map],
2037 [AC_CACHE_CHECK([for GNU hash_map and hash_set],
2038 wx_cv_class_gnuhashmapset,
2039 [AC_TRY_COMPILE([#include <ext/hash_map>
2040 #include <ext/hash_set>],
2041 [__gnu_cxx::hash_map<double*, char*, __gnu_cxx::hash<double*>, std::equal_to<double*> > test1;
2042 __gnu_cxx::hash_set<char*, __gnu_cxx::hash<char*>, std::equal_to<char*> > test2;],
2043 wx_cv_class_gnuhashmapset=yes,
2044 wx_cv_class_gnuhashmapset=no)
2055 dnl check for atomic operations builtins for wx/atomic.h:
2061 dnl ---------------------------------------------------------------------------
2062 dnl Define search path for includes and libraries: all headers and libs will be
2063 dnl looked for in all directories of this path
2064 dnl ---------------------------------------------------------------------------
2066 dnl Notice that /usr/include should *not* be in this list, otherwise it breaks
2067 dnl compilation on Solaris/AIX/... with gcc because standard (non ANSI C)
2068 dnl headers are included instead of the "fixed" (ANSI-fied) gcc ones.
2070 dnl Also try to put all directories which may contain X11R6 before those which
2071 dnl may contain X11R5/4 - we want to use R6 on machines which have both!
2073 dnl In the same vein. Motif 2.1 should be tried before Motif 1.2 for the
2074 dnl systems which have both (AIX 4.x does)
2076 /usr/local/include \
2077 /usr/local/X11/include \
2078 /usr/local/include/X11 \
2079 /usr/local/X11R7/include \
2080 /usr/local/X11R6/include \
2081 /usr/local/include/X11R7 \
2082 /usr/local/include/X11R6 \
2084 /usr/Motif-2.1/include \
2085 /usr/Motif-1.2/include \
2086 /usr/include/Motif1.2 \
2089 /usr/openwin/include \
2093 /usr/X11R7/include \
2094 /usr/X11R6/include \
2095 /usr/X11R6.4/include \
2097 /usr/include/X11R7 \
2098 /usr/include/X11R6 \
2103 /usr/XFree86/include/X11 \
2106 /usr/local/X1R5/include \
2107 /usr/local/include/X11R5 \
2108 /usr/X11R5/include \
2109 /usr/include/X11R5 \
2111 /usr/local/X11R4/include \
2112 /usr/local/include/X11R4 \
2113 /usr/X11R4/include \
2114 /usr/include/X11R4 \
2116 /usr/openwin/share/include"
2118 dnl try to find out the standard lib locations for the systems with multiple
2120 AC_MSG_CHECKING([for libraries directory])
2127 for d in WX_STD_LIBPATH(); do
2128 for e in a so sl dylib dll.a; do
2130 if test -f $libc; then
2133 AC_LINK_IFELSE([int main() { return 0; }],
2134 wx_cv_std_libpath=`echo $d | sed s@/usr/@@`)
2136 if test "x$wx_cv_std_libpath" != "x"; then
2142 if test "x$wx_cv_std_libpath" = "x"; then
2143 wx_cv_std_libpath="lib"
2150 dnl use ../lib or ../lib/64 depending on the size of void*
2151 if test "$ac_cv_sizeof_void_p" = 8 -a -d "/usr/lib/64"; then
2152 wx_cv_std_libpath="lib/64"
2154 wx_cv_std_libpath="lib"
2159 dnl use ../lib or ../lib64 depending on the size of void*
2160 if test "$ac_cv_sizeof_void_p" = 8 -a \
2161 -d "/usr/lib64" -a ! -h "/usr/lib64"; then
2162 wx_cv_std_libpath="lib64"
2164 wx_cv_std_libpath="lib"
2169 wx_cv_std_libpath="lib";
2173 AC_MSG_RESULT($wx_cv_std_libpath)
2175 SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` /usr/$wx_cv_std_libpath"
2177 dnl Cross compiling with gcc?
2178 if test "$build" != "$host" -a "$GCC" = yes; then
2179 dnl for gcc cross-compilers "$CC -print-prog-name=ld" prints the path to
2180 dnl the linker. Stripping off the trailing '/bin/ld' gives us a candiate
2181 dnl for a 'root' below which libraries and headers for the target system
2182 dnl might be installed.
2183 if cross_root=`$CC -print-prog-name=ld 2>/dev/null`; then
2184 cross_root=`dirname $cross_root`
2185 cross_root=`dirname $cross_root`
2187 dnl substitute this candiate root for '^/usr' in the search lists,
2188 dnl strip out any that don't start '^/usr'.
2189 SEARCH_LIB=`for x in $SEARCH_LIB; do echo $x; done | sed -ne "s|^/usr|$cross_root|p"`
2190 SEARCH_INCLUDE=`for x in $SEARCH_INCLUDE; do echo $x; done | sed -ne "s|^/usr|$cross_root|p"`
2191 SEARCH_INCLUDE="$SEARCH_INCLUDE $cross_root/include"
2193 dnl also have pkg-config search for *.pc files under this 'root'
2194 if test -z "$PKG_CONFIG_PATH"; then
2195 PKG_CONFIG_PATH="$cross_root/local/lib/pkgconfig:$cross_root/lib/pkgconfig"
2196 export PKG_CONFIG_PATH
2199 dnl AC_PATH_XTRA doesn't work currently unless -x-includes and
2200 dnl -x-libraries are given on the command line. So if they are not
2201 dnl set then set them here to plausible defaults.
2202 if test -z "$x_includes" -o "$x_includes" = NONE; then
2203 WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, X11/Intrinsic.h)
2204 x_includes=$ac_find_includes
2206 if test -z "$x_libraries" -o "$x_libraries" = NONE; then
2207 WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xt)
2208 x_libraries=$ac_find_libraries
2213 dnl ------------------------------------------------------------------------
2214 dnl Check for libraries
2215 dnl ------------------------------------------------------------------------
2217 dnl flush the cache because checking for libraries below might abort
2220 dnl check for glibc version
2222 dnl VZ: I have no idea why had this check been there originally, but now
2223 dnl we could probably do without it by just always adding _GNU_SOURCE
2224 if test "$USE_LINUX" = 1 -o "$USE_GNU" = 1; then
2225 AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[
2226 AC_TRY_COMPILE([#include <features.h>],
2228 #if (__GLIBC__ < 2) || (__GLIBC_MINOR__ < 1)
2233 wx_cv_lib_glibc21=yes
2236 wx_cv_lib_glibc21=no
2240 if test "$wx_cv_lib_glibc21" = "yes"; then
2241 AC_DEFINE(wxHAVE_GLIBC2)
2245 dnl we may need _GNU_SOURCE for 2 things:
2247 dnl 1. to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+ (strictly speaking we
2248 dnl only need _XOPEN_SOURCE=500 but just defining this disables _BSD_SOURCE
2249 dnl which breaks libtiff compilation, so it is simpler to just define
2250 dnl _GNU_SOURCE to get everything)
2252 dnl 2. for Unicode functions
2253 if test "x$wx_cv_lib_glibc21" = "xyes"; then
2254 if test "$wxUSE_UNICODE" = "yes" -o "$wxUSE_THREADS" = "yes"; then
2255 AC_DEFINE(_GNU_SOURCE)
2259 dnl Only add the -lm library if floating point functions cannot be used
2260 dnl without it. This check is important on cygwin because of the bizarre
2261 dnl way that they have organized functions into libraries. On cygwin, both
2262 dnl libc.a and libm.a are symbolic links to a single lib libcygwin.a. This
2264 dnl 1) linking with -lm is not necessary, and
2265 dnl 2) linking with -lm is dangerous if the order of libraries is wrong
2266 dnl In particular, if you compile any program with -mno-cygwin and link with
2267 dnl -lm, it will crash instantly when it is run. This happens because the
2268 dnl linker incorrectly links the Cygwin libm.a (==libcygwin.a), which replaces
2269 dnl the ___main function instead of allowing it to be defined by
2270 dnl /usr/lib/mingw/libmingw32.a as it should be.
2272 dnl On MacOS X, this test will find that -lm is unnecessary and leave it out.
2274 dnl Just check a few floating point functions. If they are all found without
2275 dnl -lm, then we must not need -lm.
2278 AC_CHECK_FUNCS(cos, have_cos=1)
2279 AC_CHECK_FUNCS(floor, have_floor=1)
2280 AC_MSG_CHECKING(if floating point functions link without -lm)
2281 if test "$have_cos" = 1 -a "$have_floor" = 1; then
2286 # use different functions to avoid configure caching
2289 AC_CHECK_FUNCS(sin, have_sin=1)
2290 AC_CHECK_FUNCS(ceil, have_ceil=1)
2291 AC_MSG_CHECKING(if floating point functions link with -lm)
2292 if test "$have_sin" = 1 -a "$have_ceil" = 1; then
2296 # not sure we should warn the user, crash, etc.
2300 dnl check for C99 string to long long conversion functions, assume that if we
2301 dnl have the unsigned variants, then we have the signed ones as well
2303 dnl at least under SGI these functions are only available in C99 code and not
2304 dnl in C++ so do these tests using C++ compiler
2306 if test "wxUSE_UNICODE" = "yes"; then
2307 WX_CHECK_FUNCS(wcstoull)
2309 WX_CHECK_FUNCS(strtoull)
2313 dnl ---------------------------------------------------------------------------
2314 dnl Optional libraries
2316 dnl --with-<lib>=sys
2317 dnl looks for system library and fails if not found
2320 dnl --with-<lib>=yes
2321 dnl looks for system library and, if not found, prints a warning,
2322 dnl falls back to the builtin wx version, and continues configuration
2324 dnl --with-<lib>=builtin
2325 dnl uses builtin wx version without searching for system library
2329 dnl do not use library (neither system nor builtin wx version)
2331 dnl ---------------------------------------------------------------------------
2333 dnl ------------------------------------------------------------------------
2334 dnl Check for regex libraries
2335 dnl ------------------------------------------------------------------------
2337 if test "$wxUSE_REGEX" != "no"; then
2338 AC_DEFINE(wxUSE_REGEX)
2340 if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_REGEX" = "yes"; then
2341 AC_MSG_WARN([Defaulting to the builtin regex library for Unicode build.])
2345 if test "$wxUSE_REGEX" = "sys" -o "$wxUSE_REGEX" = "yes" ; then
2346 dnl according to Unix 98 specs, regcomp() is in libc but I believe that
2347 dnl on some old systems it may be in libregex - check for it too?
2348 AC_CHECK_HEADER(regex.h, [AC_CHECK_FUNCS(regcomp re_search)],, [ ])
2350 if test "x$ac_cv_func_regcomp" != "xyes"; then
2351 if test "$wxUSE_REGEX" = "sys" ; then
2352 AC_MSG_ERROR([system regex library not found! Use --with-regex to use built-in version])
2354 AC_MSG_WARN([system regex library not found, will use built-in instead])
2358 dnl we are using the system library
2360 dnl only the built-in supports advanced REs
2361 AC_DEFINE(WX_NO_REGEX_ADVANCED)
2366 dnl ------------------------------------------------------------------------
2367 dnl Check for zlib compression library
2368 dnl ------------------------------------------------------------------------
2371 if test "$wxUSE_ZLIB" != "no" ; then
2372 AC_DEFINE(wxUSE_ZLIB)
2374 if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then
2375 dnl don't test for zlib under Mac -- its verson there is 1.1.3 but we
2376 dnl should still use it because hopefully (can someone confirm this?)
2377 dnl Apple did fix the security problem in it and not using the system
2378 dnl library results in a whole bunch of warnings when linking with
2379 dnl Carbon framework
2380 if test "$USE_DARWIN" = 1; then
2381 system_zlib_h_ok="yes"
2383 dnl we have troubles with ancient zlib versions (e.g. 1.0.4 is
2384 dnl known to not work) and although I don't know which is
2385 dnl the minimal required version it's safer to test for 1.1.4 as
2386 dnl it fixes a security problem in 1.1.3 -- and hopefully nobody
2387 dnl has anything more ancient (1.1.3 was released in July 1998)
2389 AC_CACHE_CHECK([for zlib.h >= 1.1.4], ac_cv_header_zlib_h,
2391 dnl zlib.h defines ZLIB_VERSION="x.y.z"
2398 FILE *f=fopen("conftestval", "w");
2401 ZLIB_VERSION[0] == '1' &&
2402 (ZLIB_VERSION[2] > '1' ||
2403 (ZLIB_VERSION[2] == '1' &&
2404 ZLIB_VERSION[4] >= '4')) ? "yes" : "no");
2408 ac_cv_header_zlib_h=`cat conftestval`,
2409 ac_cv_header_zlib_h=no,
2410 dnl cross-compiling: don't have an answer, try later
2411 unset ac_cv_header_zlib_h
2414 dnl If the test above did not come up with a value (e.g. cross
2415 dnl compiling) then this should give a definitive answer
2416 AC_CHECK_HEADER(zlib.h,,, [ ])
2418 system_zlib_h_ok=$ac_cv_header_zlib_h
2421 if test "$system_zlib_h_ok" = "yes"; then
2422 AC_CHECK_LIB(z, deflate, ZLIB_LINK=" -lz")
2425 if test "x$ZLIB_LINK" = "x" ; then
2426 if test "$wxUSE_ZLIB" = "sys" ; then
2427 AC_MSG_ERROR([zlib library not found or too old! Use --with-zlib=builtin to use built-in version])
2429 AC_MSG_WARN([zlib library not found or too old, will use built-in instead])
2433 dnl we are using the system library
2439 dnl ------------------------------------------------------------------------
2440 dnl Check for png library
2441 dnl ------------------------------------------------------------------------
2444 if test "$wxUSE_LIBPNG" != "no" ; then
2445 AC_DEFINE(wxUSE_LIBPNG)
2447 if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBPNG" = "builtin" ; then
2448 AC_MSG_WARN([wxMGL doesn't work with builtin png library, will use MGL one instead])
2452 dnl for the check below to have a chance to succeed, we must already have
2453 dnl libz somewhere (don't do this when bulding wxMGL since its libpng
2454 dnl doesn't depend on zlib)
2455 if test "$wxUSE_MGL" != 1 -a "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then
2456 AC_MSG_WARN([system png library doesn't work without system zlib, will use built-in instead])
2457 wxUSE_LIBPNG=builtin
2460 if test "$wxUSE_MGL" != 1 ; then
2461 dnl Don't check for libpng when building wxMGL, libmgl contains it
2462 if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then
2463 dnl libpng version 0.9 is known to not work, if an even newer
2464 dnl version is required, just bump it up in the test below
2465 AC_CACHE_CHECK([for png.h > 0.90], ac_cv_header_png_h,
2467 dnl png.h defines PNG_LIBPNG_VER=number
2474 FILE *f=fopen("conftestval", "w");
2477 PNG_LIBPNG_VER > 90 ? "yes" : "no");
2481 ac_cv_header_png_h=`cat conftestval`,
2482 ac_cv_header_png_h=no,
2483 dnl cross-compiling: test (later) if we have any png.h
2484 unset ac_cv_header_png_h
2487 AC_CHECK_HEADER(png.h,,, [ ])
2489 if test "$ac_cv_header_png_h" = "yes"; then
2490 AC_CHECK_LIB(png, png_check_sig, PNG_LINK=" -lpng -lz", , [-lz -lm])
2493 if test "x$PNG_LINK" = "x" ; then
2494 if test "$wxUSE_LIBPNG" = "sys" ; then
2495 AC_MSG_ERROR([system png library not found or too old! Use --with-libpng=builtin to use built-in version])
2497 AC_MSG_WARN([system png library not found or too old, will use built-in instead])
2498 wxUSE_LIBPNG=builtin
2501 dnl we are using the system library
2508 dnl ------------------------------------------------------------------------
2509 dnl Check for jpeg library
2510 dnl ------------------------------------------------------------------------
2512 dnl this check must be done before the check for libtiff as libtiff uses
2515 if test "$wxUSE_LIBJPEG" != "no" ; then
2516 AC_DEFINE(wxUSE_LIBJPEG)
2518 if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBJPEG" = "builtin" ; then
2519 AC_MSG_WARN([wxMGL doesn't work with builtin jpeg library, will use MGL one instead])
2523 if test "$wxUSE_MGL" != 1 ; then
2524 dnl Don't check for libjpeg when building wxMGL, libmgl contains it
2525 if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then
2526 dnl can't use AC_CHECK_HEADER as jconfig.h defines things like
2527 dnl HAVE_STDLIB_H which are already defined and this provokes
2528 dnl a compiler warning which configure considers as an error...
2529 AC_MSG_CHECKING(for jpeglib.h)
2530 AC_CACHE_VAL(ac_cv_header_jpeglib_h,
2533 #undef HAVE_STDLIB_H
2535 #include <jpeglib.h>
2539 ac_cv_header_jpeglib_h=yes,
2540 ac_cv_header_jpeglib_h=no
2543 AC_MSG_RESULT($ac_cv_header_jpeglib_h)
2545 if test "$ac_cv_header_jpeglib_h" = "yes"; then
2546 AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK=" -ljpeg")
2549 if test "x$JPEG_LINK" = "x" ; then
2550 if test "$wxUSE_LIBJPEG" = "sys" ; then
2551 AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version])
2553 AC_MSG_WARN([system jpeg library not found, will use built-in instead])
2554 wxUSE_LIBJPEG=builtin
2557 dnl we are using the system library
2560 if test "$wxUSE_MSW" = 1; then
2561 dnl boolean is defined by the jpeg headers and also by the
2562 dnl Windows headers of some compilers. This type has been
2563 dnl renamed in the builtin, so it is only an issue when
2564 dnl using an external jpeg lib on Windows.
2574 #include <jpeglib.h>
2578 [wxInt`expr 8 \* $ac_cv_sizeof_boolean`])
2581 [#include <windows.h>])
2588 dnl ------------------------------------------------------------------------
2589 dnl Check for tiff library
2590 dnl ------------------------------------------------------------------------
2593 TIFF_PREREQ_LINKS=-lm
2594 if test "$wxUSE_LIBTIFF" != "no" ; then
2595 AC_DEFINE(wxUSE_LIBTIFF)
2597 if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then
2598 dnl libtiff may depend on libjpeg and libz so use them in the test
2599 dnl below or it would fail
2600 if test "$wxUSE_LIBJPEG" = "sys"; then
2601 TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK"
2603 if test "$wxUSE_ZLIB" = "sys"; then
2604 TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK"
2606 AC_CHECK_HEADER(tiffio.h,
2608 AC_CHECK_LIB(tiff, TIFFError,
2609 TIFF_LINK=" -ltiff",
2617 if test "x$TIFF_LINK" = "x" ; then
2618 if test "$wxUSE_LIBTIFF" = "sys" ; then
2619 AC_MSG_ERROR([system tiff library not found! Use --with-libtiff=builtin to use built-in version])
2621 AC_MSG_WARN([system tiff library not found, will use built-in instead])
2622 wxUSE_LIBTIFF=builtin
2625 dnl we are using the system library
2629 if test "$wxUSE_LIBTIFF" = "builtin" ; then
2630 if test "$wxUSE_LIBJPEG" = "no"; then
2631 dnl we have to prevent the builtin libtiff configure from building the
2632 dnl library with JPEG support as this was explicitly disabled by user,
2633 dnl but unfortunately it needs --disable-jpeg and not --without-libjpeg
2634 dnl (which will be passed to it anyhow as configure passes arguments to
2635 dnl the top-level script to all the other ones called recursively), so
2636 dnl we need to hack around this
2637 ac_configure_args="$ac_configure_args --disable-jpeg"
2639 AC_CONFIG_SUBDIRS([src/tiff])
2643 dnl ------------------------------------------------------------------------
2644 dnl Check for expat libraries
2645 dnl ------------------------------------------------------------------------
2647 if test "$wxUSE_WCHAR_T" != "yes"; then
2648 if test "$wxUSE_EXPAT" != "no"; then
2649 AC_MSG_WARN([wxWidgets requires wchar_t to use expat, disabling])
2652 if test "$wxUSE_XML" != "no"; then
2653 AC_MSG_WARN([wxWidgets requires wchar_t to use xml, disabling])
2658 if test "$wxUSE_EXPAT" != "no"; then
2660 AC_DEFINE(wxUSE_EXPAT)
2661 AC_DEFINE(wxUSE_XML)
2663 if test "$wxUSE_EXPAT" = "sys" -o "$wxUSE_EXPAT" = "yes" ; then
2664 AC_CHECK_HEADER([expat.h], [found_expat_h=1],, [ ])
2665 if test "x$found_expat_h" = "x1"; then
2666 dnl Expat 1.95.6 comes with broken expat.h:
2667 AC_CACHE_CHECK([if expat.h is valid C++ header],
2668 wx_cv_expat_is_not_broken,
2671 AC_TRY_COMPILE([#include <expat.h>],[],
2672 wx_cv_expat_is_not_broken=yes,
2673 wx_cv_expat_is_not_broken=no
2678 if test "$wx_cv_expat_is_not_broken" = "yes" ; then
2679 AC_CHECK_LIB(expat, XML_ParserCreate, EXPAT_LINK=" -lexpat")
2682 if test "x$EXPAT_LINK" = "x" ; then
2683 if test "$wxUSE_EXPAT" = "sys" ; then
2684 AC_MSG_ERROR([system expat library not found! Use --with-expat=builtin to use built-in version])
2686 AC_MSG_WARN([system expat library not found, will use built-in instead])
2690 dnl we are using the system library
2694 if test "$wxUSE_EXPAT" = "builtin" ; then
2695 dnl Expat needs this:
2696 AC_CONFIG_SUBDIRS([src/expat])
2701 dnl ------------------------------------------------------------------------
2702 dnl Check for libmspack
2703 dnl ------------------------------------------------------------------------
2705 if test "$wxUSE_LIBMSPACK" != "no"; then
2706 AC_CHECK_HEADER([mspack.h], [found_mspack_h=1],, [ ])
2707 if test "x$found_mspack_h" = "x1"; then
2708 AC_CHECK_LIB(mspack, mspack_create_chm_decompressor,
2709 MSPACK_LINK=" -lmspack")
2711 if test "x$MSPACK_LINK" = "x" ; then
2716 if test "$wxUSE_LIBMSPACK" != "no"; then
2717 AC_DEFINE(wxUSE_LIBMSPACK)
2721 dnl ----------------------------------------------------------------
2722 dnl search for toolkit (widget sets)
2723 dnl ----------------------------------------------------------------
2732 dnl are we building for a win32 target environment?
2733 dnl If so, setup common stuff needed for both GUI and Base libs.
2734 if test "$USE_WIN32" = 1 ; then
2735 AC_CHECK_HEADERS(w32api.h,,, [ ])
2736 AC_CHECK_HEADER(windows.h,,
2738 AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
2742 dnl --- FIXME: This is still a somewhat random list of libs,
2743 dnl --- some of them should probably be included conditionally.
2746 dnl --- For mingw-w64 lctl3d32's name has changed
2747 LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lwctl3d32 -ladvapi32 -lwsock32 -lgdi32"
2749 dnl we need to define this to embed the manifest for correct
2750 dnl platform from wx/msw/wx.rc (this is not needed for x86 which is
2751 dnl the default in wx/msw/rcdefs.h)
2752 WINDRES_CPU_DEFINE="--define WX_CPU_AMD64"
2755 LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32"
2758 if test "$wxUSE_ACCESSIBILITY" = "yes" ; then
2759 LIBS="$LIBS -loleacc"
2764 dnl Cygwin doesn't include these by default
2765 LIBS="$LIBS -lkernel32 -luser32"
2768 dnl This one is still used by some sample makefiles.
2769 RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
2770 RESPROGRAMOBJ="\$(PROGRAM)_resources.o"
2772 dnl This lot we export to wx-config. It must add the relevant
2773 dnl include directories at the point when they can be known.
2774 dnl (but are these (still) required anyway?)
2775 WXCONFIG_RESFLAGS="--define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
2777 dnl install Win32-specific files in "make install"
2778 WIN32INSTALL=win32install
2780 dnl pbt.h is missing on Wine at least
2781 AC_CHECK_HEADER([pbt.h],, [AC_DEFINE(NEED_PBT_H)], [ ])
2784 if test "$wxUSE_GUI" = "yes"; then
2794 if test "$wxUSE_OLD_COCOA" = 1 ; then
2795 if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes"; then
2796 AC_MSG_WARN([Printing not supported under wxCocoa yet, disabled])
2797 wxUSE_PRINTING_ARCHITECTURE=no
2799 if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
2800 AC_MSG_WARN([Drag and Drop not supported under wxCocoa yet, disabled])
2801 wxUSE_DRAG_AND_DROP=no
2803 if test "$wxUSE_DRAGIMAGE" = "yes"; then
2804 AC_MSG_WARN([wxDragImage not supported under wxCocoa yet, disabled])
2809 if test "$wxUSE_MSW" = 1 ; then
2813 dnl -mwindows causes a heap of other default gui libs to be linked in.
2816 WXCONFIG_LDFLAGS_GUI="$LDFLAGS -Wl,--subsystem,windows -mwindows"
2820 if test "$wxUSE_GTK" = 1; then
2821 dnl GTK+ test program must be compiled with C compiler
2822 AC_MSG_CHECKING([for GTK+ version])
2824 gtk_version_cached=1
2825 AC_CACHE_VAL(wx_cv_lib_gtk,
2827 dnl stupid GTK+ AM macros produce their own messages, so we
2828 dnl have to pass to the next line
2829 gtk_version_cached=0
2832 dnl we must link against lgthread unless the user
2833 dnl used --disable-threads
2835 if test "$wxUSE_THREADS" = "yes"; then
2841 if test "x$wxGTK_VERSION" != "x1"
2843 dnl The gthread.pc that ships with Solaris returns '-mt',
2844 dnl it's correct for Sun CC, but gcc requires '-pthreads'.
2845 dnl So disable the compile check and remove the -mt below.
2848 if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then
2853 AM_PATH_GTK_2_0(2.4.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
2855 dnl Solaris also requires -lX11 for static lib
2858 if test "$wxUSE_SHARED" != "yes"; then
2859 GTK_LIBS="$GTK_LIBS -lX11"
2865 if test -z "$wx_cv_lib_gtk"; then
2866 if test "x$wxGTK_VERSION" = "x1" -o "x$wxGTK_VERSION" = "xany" ; then
2867 AM_PATH_GTK(1.2.7, wx_cv_lib_gtk=1.2.7, , $GTK_MODULES)
2869 if test -z "$wx_cv_lib_gtk"; then
2870 AM_PATH_GTK(1.2.3, wx_cv_lib_gtk=1.2.3, , $GTK_MODULES)
2875 if test -z "$wx_cv_lib_gtk"; then
2876 dnl looks better in AC_MSG_RESULT
2879 dnl we need to cache GTK_CFLAGS and GTK_LIBS for the
2881 wx_cv_cflags_gtk=$GTK_CFLAGS
2882 wx_cv_libs_gtk=`echo $GTK_LIBS | sed -e 's/ -l[[^ ]]*cairo[[^ ]]*//g'`
2887 dnl if it wasn't cached, the messages from AM_PATH_GTK() above are
2889 if test "$gtk_version_cached" = 1; then
2890 AC_MSG_RESULT($wx_cv_lib_gtk)
2893 case "$wx_cv_lib_gtk" in
2903 The development files for GTK+ were not found. For GTK+ 2, please
2904 ensure that pkg-config is in the path and that gtk+-2.0.pc is
2905 installed. For GTK+ 1.2 please check that gtk-config is in the path,
2906 and that the version is 1.2.3 or above. Also check that the
2907 libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
2908 --libs' are in the LD_LIBRARY_PATH or equivalent.
2913 if test "$WXGTK2" = 1; then
2914 save_CFLAGS="$CFLAGS"
2916 CFLAGS="$wx_cv_cflags_gtk $CFLAGS"
2917 LIBS="$LIBS $wx_cv_libs_gtk"
2919 dnl test if we have at least GTK+ 2.18:
2920 AC_MSG_CHECKING([if GTK+ is version >= 2.18])
2922 #include <gtk/gtk.h>
2925 #if !GTK_CHECK_VERSION(2,18,0)
2930 AC_DEFINE(__WXGTK218__)
2931 AC_DEFINE(__WXGTK210__)
2932 AC_DEFINE(__WXGTK26__)
2933 AC_MSG_RESULT([yes])
2941 if test "$ac_wxgtk218" = 0; then
2942 dnl test if we have at least GTK+ 2.10:
2943 AC_MSG_CHECKING([if GTK+ is version >= 2.10])
2945 #include <gtk/gtk.h>
2948 #if !GTK_CHECK_VERSION(2,10,0)
2953 AC_DEFINE(__WXGTK210__)
2954 AC_DEFINE(__WXGTK26__)
2955 AC_MSG_RESULT([yes])
2963 if test "$ac_wxgtk210" = 0; then
2964 dnl test if we have at least GTK+ 2.6:
2965 AC_MSG_CHECKING([if GTK+ is version >= 2.6])
2967 #include <gtk/gtk.h>
2970 #if !GTK_CHECK_VERSION(2,6,0)
2975 AC_DEFINE(__WXGTK26__)
2976 AC_MSG_RESULT([yes])
2986 CFLAGS="$save_CFLAGS"
2989 if test "$wxUSE_UNICODE" = "yes"; then
2990 AC_MSG_WARN([Unicode configuration not supported with GTK+ 1.x])
2994 dnl test for XIM support in libgdk
2995 AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
2997 dnl we need poll() in src/gtk1/app.cpp (we know that Darwin doesn't
2998 dnl have it but we do the check for the others)
2999 if test "$USE_DARWIN" != 1; then
3000 AC_CHECK_FUNCS(poll)
3004 TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
3005 GUI_TK_LIBRARY="$wx_cv_libs_gtk $GUI_TK_LIBRARY"
3007 dnl disable GTK runtime type checks
3008 TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -DG_DISABLE_CAST_CHECKS"
3010 AFMINSTALL=afminstall
3014 dnl test for external libxpm if we're configured to use it
3015 if test "$wxUSE_GPE" = "yes"; then
3016 AC_MSG_CHECKING(for gpewidget library)
3017 WX_PATH_FIND_LIBRARIES($SEARCH_LIB,gpewidget)
3018 if test "$ac_find_libraries" != "" ; then
3019 WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
3020 dnl -lgpewidget must be before all GTK libs and
3021 dnl we guess its path from the prefix
3022 GUI_TK_LIBRARY="-L${prefix}/lib -lgpewidget $GUI_TK_LIBRARY"
3024 AC_MSG_RESULT([found in $ac_find_libraries])
3026 AC_MSG_RESULT(not found)
3029 dnl AC_MSG_CHECKING(for gpe library)
3030 dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB,gpe)
3031 dnl if test "$ac_find_libraries" != "" ; then
3032 dnl WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
3033 dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lgpe"
3034 dnl AC_MSG_RESULT(found in $ac_find_libraries)
3036 dnl AC_MSG_RESULT(not found)
3041 if test "$wxUSE_MGL" = 1; then
3042 AC_MSG_CHECKING(for SciTech MGL library)
3043 if test "x$MGL_ROOT" = x ; then
3044 AC_MSG_RESULT(not found)
3045 AC_MSG_ERROR([Cannot find MGL library. Make sure MGL_ROOT is set.])
3047 AC_MSG_RESULT($MGL_ROOT)
3050 AC_MSG_CHECKING(for libmgl location)
3051 dnl Find MGL library that we want
3052 dnl FIXME_MGL - test for MGL variants for freebsd etc.;
3053 dnl and for non-x86 versions
3056 dnl glibc.so, glibc are for older versions of MGL,
3057 dnl x86/a, x86/so are used by >= 5.0 R11
3058 if test "x$wxUSE_SHARED" = xyes ; then
3059 mgl_os_candidates="linux/gcc/x86/so linux/gcc/x86/a linux/gcc/glibc.so linux/gcc/glibc"
3061 mgl_os_candidates="linux/gcc/x86/a linux/gcc/x86/so linux/gcc/glibc linux/gcc/glibc.so"
3065 mgl_os_candidates="dos32/dj2"
3068 AC_MSG_ERROR(This system type ${host} is not yet supported by wxMGL.)
3074 for mgl_os_i in $mgl_os_candidates ; do
3075 if test "x$mgl_os" = x ; then
3076 if test "$wxUSE_DEBUG_FLAG" = yes ; then
3077 if test -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.a -o \
3078 -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.so; then
3083 if test "x$mgl_lib_type" = x ; then
3084 if test -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.a -o \
3085 -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.so; then
3086 mgl_lib_type=release
3093 if test "x$mgl_os" = x ; then
3094 AC_MSG_RESULT(not found)
3095 AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.])
3097 AC_MSG_RESULT("$MGL_ROOT/lib/$mgl_lib_type/$mgl_os")
3099 wxUSE_UNIVERSAL="yes"
3101 TOOLKIT_INCLUDE="-I$MGL_ROOT/include"
3102 GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$mgl_lib_type/$mgl_os -lmgl -lmglcpp -lpm"
3104 AFMINSTALL=afminstall
3109 if test "$wxUSE_DFB" = 1; then
3110 PKG_PROG_PKG_CONFIG()
3112 PKG_CHECK_MODULES(DIRECTFB,
3113 [directfb >= 0.9.23],
3115 wxUSE_UNIVERSAL="yes"
3116 TOOLKIT_INCLUDE="$DIRECTFB_CFLAGS"
3117 GUI_TK_LIBRARY="$DIRECTFB_LIBS"
3122 AC_MSG_ERROR([DirectFB not found.])
3127 if test "$wxUSE_MICROWIN" = 1; then
3128 AC_MSG_CHECKING(for MicroWindows)
3129 if test "x$MICROWINDOWS" = x ; then
3130 AC_MSG_RESULT(not found)
3131 AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWINDOWS is set.])
3133 AC_MSG_RESULT($MICROWINDOWS)
3136 if test -f $MICROWINDOWS/lib/libmwin.a; then
3137 AC_MSG_RESULT(MicroWindows' libraries found.)
3139 AC_MSG_ERROR([Cannot find MicroWindows libraries, make sure they are compiled.])
3142 TOOLKIT_INCLUDE="-I$MICROWINDOWS/include"
3143 GUI_TK_LIBRARY="-L$MICROWINDOWS/lib -lmwin -lmwengine -mwfonts -mwdrivers -mwinlib"
3145 wxUSE_UNIVERSAL="yes"
3147 AFMINSTALL=afminstall
3149 GUIDIST=MICROWIN_DIST
3151 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMSW__ -D__WIN95__ -D__WIN32__ -DMWIN -DMICROWIN_NOCONTROLS -DMICROWIN_TODO=1"
3154 dnl common part of X11 and Motif port checks
3155 if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then
3156 dnl use standard macros to check for X headers/libs, this brings
3157 dnl support for the standard configure options --x-includes,
3158 dnl --x-libraries and --no-x
3161 if test "$no_x" = "yes"; then
3162 AC_MSG_ERROR([X11 not found, please use --x-includes and/or --x-libraries options (see config.log for details)])
3165 dnl for some reason AC_PATH_XTRA seems to add -INONE and -LNONE (and
3166 dnl also sometimes -RNONE) to X_CFLAGS and X_LIBS respectively, filter
3168 GUI_TK_LIBRARY=`echo $X_LIBS | sed 's/ -LNONE//' | sed 's/ -RNONE//'`
3169 TOOLKIT_INCLUDE=`echo $X_CFLAGS | sed 's/ -INONE//'`
3170 AFMINSTALL=afminstall
3171 COMPILED_X_PROGRAM=0
3175 if test "$wxUSE_X11" = 1; then
3176 if test "$wxUSE_NANOX" = "yes"; then
3177 AC_MSG_CHECKING(for MicroWindows/NanoX distribution)
3178 if test "x$MICROWIN" = x ; then
3179 AC_MSG_RESULT(not found)
3180 AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWIN is set.])
3182 AC_MSG_RESULT($MICROWIN)
3183 AC_DEFINE(wxUSE_NANOX)
3187 if test "$wxUSE_UNICODE" = "yes"; then
3188 PKG_PROG_PKG_CONFIG()
3190 PKG_CHECK_MODULES(PANGOX, pangox,
3192 CFLAGS="$PANGOX_CFLAGS $CFLAGS"
3193 CXXFLAGS="$PANGOX_CFLAGS $CXXFLAGS"
3194 GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOX_LIBS"
3197 AC_MSG_ERROR([pangox library not found, library cannot be compiled in Unicode mode])
3200 PKG_CHECK_MODULES(PANGOFT2, pangoft2,
3202 CFLAGS="$PANGOFT2_CFLAGS $CFLAGS"
3203 CXXFLAGS="$PANGOFT2_CFLAGS $CXXFLAGS"
3204 GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS"
3207 AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support])
3208 wxUSE_PRINTING_ARCHITECTURE="no"
3211 PKG_CHECK_MODULES(PANGOXFT, pangoxft,
3213 AC_DEFINE(HAVE_PANGO_XFT)
3214 CFLAGS="$PANGOXFT_CFLAGS $CFLAGS"
3215 CXXFLAGS="$PANGOXFT_CFLAGS $CXXFLAGS"
3216 GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
3219 AC_MSG_WARN([pangoxft library not found, library will be compiled without anti-aliasing support])
3223 LIBS="$LIBS $PANGOX_LIBS"
3224 AC_CHECK_FUNCS([pango_font_family_is_monospace])
3228 wxUSE_UNIVERSAL="yes"
3230 if test "$wxUSE_NANOX" = "yes"; then
3231 TOOLKIT_INCLUDE="-I\$(top_srcdir)/include/wx/x11/nanox -I\$(MICROWIN)/src/include $TOOLKIT_INCLUDE"
3232 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__ -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1"
3233 GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$(MICROWIN)/src/lib/libnano-X.a"
3235 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11"
3242 if test "$wxUSE_MOTIF" = 1; then
3243 AC_MSG_CHECKING(for Motif/Lesstif headers)
3244 WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h)
3245 if test "$ac_find_includes" != "" ; then
3246 AC_MSG_RESULT(found in $ac_find_includes)
3247 WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
3248 TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
3251 CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3259 version = xmUseVersion;
3262 AC_MSG_RESULT(found in default search path)
3263 COMPILED_X_PROGRAM=1
3267 AC_MSG_ERROR(please set CPPFLAGS to contain the location of Xm/Xm.h)
3275 AC_MSG_CHECKING(for Motif/Lesstif library)
3276 WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm)
3278 if test "x$ac_find_libraries" != "x" ; then
3279 AC_MSG_RESULT(found in $ac_find_libraries)
3281 WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
3282 GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
3284 dnl it might happen that we found headers in one of the standard
3285 dnl paths but the libs are elsewhere but still in default (linker)
3286 dnl path -- try to compile a test program to check for this
3288 CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3290 LIBS="$GUI_TK_LIBRARY -lXm -lXmu -lXext -lX11"
3298 version = xmUseVersion;
3301 AC_MSG_RESULT(found in default search path)
3302 COMPILED_X_PROGRAM=1
3306 AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm)
3314 AC_MSG_CHECKING([if we need -lXp and/or -lSM -lICE])
3318 for libp in "" " -lXp"; do
3319 if test "$libs_found" = 0; then
3320 for libsm_ice in "" " -lSM -lICE"; do
3321 if test "$libs_found" = 0; then
3323 LIBS="$GUI_TK_LIBRARY -lXm ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11"
3325 CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3330 #include <Xm/List.h>
3333 XmString string = NULL;
3336 XmListAddItem(w, string, position);
3340 libsm_ice_link="$libsm_ice"
3342 [need${libp_link}${libsm_ice_link}])
3354 if test "$libs_found" = 0; then
3355 AC_MSG_RESULT([can't find the right libraries])
3356 AC_MSG_ERROR([can't link a simple motif program])
3359 dnl this seems to be needed under IRIX and shouldn't do any harm
3361 AC_CHECK_LIB(Sgm, [SgCreateList], [libsgm_link=" -lSgm"])
3364 CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3366 AC_CACHE_CHECK([for Motif 2],
3372 #if XmVersion < 2000
3376 wx_cv_lib_motif2="yes",
3377 wx_cv_lib_motif2="no"))
3378 if test "$wx_cv_lib_motif2" = "yes"; then
3379 AC_DEFINE(__WXMOTIF20__,1)
3381 AC_DEFINE(__WXMOTIF20__,0)
3384 AC_CACHE_CHECK([whether Motif is Lesstif],
3390 #if !defined(LesstifVersion) || LesstifVersion <= 0
3394 wx_cv_lib_lesstif="yes",
3395 wx_cv_lib_lesstif="no")
3397 if test "$wx_cv_lib_lesstif" = "yes"; then
3398 AC_DEFINE(__WXLESSTIF__,1)
3400 AC_DEFINE(__WXLESSTIF__,0)
3405 GUI_TK_LIBRARY="$GUI_TK_LIBRARY${libsgm_link} -lXm${libp_link} -lXmu -lXext -lXt${libsm_ice_link} -lX11"
3410 dnl more tests common to X11 and Motif:
3411 if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then
3412 dnl test for external libxpm if we're configured to use it
3413 if test "$wxUSE_LIBXPM" = "sys"; then
3414 AC_MSG_CHECKING(for Xpm library)
3415 WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
3416 if test "$ac_find_libraries" != "" ; then
3417 WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
3418 GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
3419 AC_MSG_RESULT(found in $ac_find_libraries)
3421 AC_CACHE_CHECK([for X11/xpm.h],
3425 CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3429 #include <X11/xpm.h>
3433 version = XpmLibraryVersion();
3435 wx_cv_x11_xpm_h=yes,
3443 if test $wx_cv_x11_xpm_h = "yes"; then
3444 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXpm"
3445 AC_DEFINE(wxHAVE_LIB_XPM)
3447 AC_MSG_WARN([built-in less efficient XPM decoder will be used])
3453 dnl XShapeQueryExtension checks: first the library, then prototype
3454 AC_CHECK_LIB([Xext], [XShapeQueryExtension],
3456 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXext"
3459 [], [$GUI_TK_LIBRARY -lX11])
3461 if test "$wxHAVE_XEXT_LIB" = 1; then
3462 save_CFLAGS="$CFLAGS"
3463 CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3465 AC_MSG_CHECKING([for X11/extensions/shape.h])
3467 #include <X11/Xlib.h>
3468 #include <X11/extensions/shape.h>
3472 XShapeQueryExtension((Display*)NULL,
3473 (int*)NULL, (int*)NULL);
3476 AC_DEFINE(HAVE_XSHAPE)
3477 AC_MSG_RESULT([found])
3480 AC_MSG_RESULT([not found])
3482 CFLAGS="$save_CFLAGS"
3487 if test "$wxUSE_OSX_CARBON" = 1; then
3488 AC_MSG_CHECKING([for compiler syntax to enable Pascal strings])
3489 if test "$GCC" = yes; then
3490 AC_MSG_RESULT([gcc])
3491 CPPFLAGS_PASCAL="-fpascal-strings"
3492 elif test "`echo $CXX | sed -e 's@.*/@@'`" = "xlC"; then
3493 AC_MSG_RESULT([xlc])
3494 CPPFLAGS_PASCAL="-qmacpstr"
3496 AC_MSG_RESULT([none])
3499 if test "x$wxUSE_UNIX" = "xyes"; then
3500 CPPFLAGS="$CPPFLAGS_PASCAL -I/Developer/Headers/FlatCarbon $CPPFLAGS"
3502 dnl platform.h needs TARGET_CARBON before setup.h
3503 CPPFLAGS="$CPPFLAGS_PASCAL -DTARGET_CARBON $CPPFLAGS"
3507 dnl we can't call this MAC_DIST or autoconf thinks its a macro
3508 GUIDIST=OSX_CARBON_DIST
3509 dnl wxMac version of wxBase and wxCocoa or wxBase-only built on Darwin
3510 dnl are different, so they need different names:
3511 WXBASEPORT="_carbon"
3513 dnl in addition to defining __WXOSX_CARBON__ for this toolkit we want
3514 dnl to also define these extra symbols to make it possible to test for
3515 dnl any Mac port (__WXMAC__ is for backwards compatibility, __WXOSX__
3517 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMAC__ -D__WXOSX__"
3520 if test "$wxUSE_OSX_COCOA" = 1; then
3522 GUIDIST=OSX_COCOA_DIST
3524 dnl see the comment above in wxUSE_OSX_CARBON branch
3525 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMAC__ -D__WXOSX__"
3528 if test "$wxUSE_OLD_COCOA" = 1; then
3533 if test "$wxUSE_PM" = 1; then
3536 AC_CACHE_CHECK([for type SPBCDATA],
3553 if test $wx_cv_spbcdata = "yes"; then
3554 AC_DEFINE(HAVE_SPBCDATA)
3558 dnl the name of the directory where the files for this toolkit live
3559 if test "$TOOLKIT" = "PM" ; then
3562 TOOLKIT_DIR=`echo ${TOOLKIT} | tr '[[A-Z]]' '[[a-z]]'`
3565 if test "$wxUSE_UNIVERSAL" = "yes"; then
3566 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__"
3570 dnl distribute samples/demos/utils with GUI versions
3571 GUIDIST="${GUIDIST} SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST"
3572 DISTDIR="wx\$(TOOLKIT)"
3576 dnl this doesn't quite work right for wxBase, but the places
3577 dnl where it is wrong aren't fatal (yet) though.
3580 dnl the sources, their dependenices and the headers
3581 if test "$USE_WIN32" = 1 ; then
3582 dnl yes, the toolkit for wxBase on win32 is actually MSW
3583 dnl wxBase on unix does not need a 'TOOLKIT' defined.
3587 dnl distribute only wxBase sources/headers
3593 dnl ---------------------------------------------------------------------------
3595 dnl ---------------------------------------------------------------------------
3597 dnl If UTF-8 support wasn't explicitly enabled or disabled, enable it only
3598 dnl for ports where it makes sense by default (GTK+, DirectFB):
3599 if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_UTF8" = "auto" ; then
3600 if test "$USE_UNIX" = 1 -a "$wxUSE_DARWIN" != 1 ; then
3601 wxUSE_UNICODE_UTF8=yes
3602 elif test "$USE_OS2" = 1 ; then
3603 dnl wide char support is quite incomplete in libc;
3604 dnl UTF-8 might actually work when evaluating/setting
3605 dnl code pages correctly, even for ports other than GTK20.
3606 wxUSE_UNICODE_UTF8=yes
3608 wxUSE_UNICODE_UTF8=no
3612 dnl ---------------------------------------------------------------------------
3613 dnl Optional libraries included when system library is not used
3614 dnl ---------------------------------------------------------------------------
3616 dnl do this after test for X11 above so that we have a chance of finding Xlib.h
3617 if test "$wxUSE_GUI" = "yes"; then
3618 if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then
3619 dnl defines HAVE_X11_XKBLIB_H
3620 AC_CHECK_HEADERS([X11/Xlib.h],,, [ ])
3621 AC_CHECK_HEADERS([X11/XKBlib.h],,,
3624 #include <X11/Xlib.h>
3631 dnl ---------------------------------------------------------------------------
3632 dnl wxDisplay Sanity checks
3633 dnl ---------------------------------------------------------------------------
3635 if test "$wxUSE_DISPLAY" = "yes"; then
3636 dnl ---------------------------------------------------------------------------
3637 dnl Xinerama (for unix ) - Brian Victor
3638 dnl ---------------------------------------------------------------------------
3639 if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1; then
3640 AC_MSG_CHECKING([for Xinerama])
3641 WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xinerama)
3642 if test "$ac_find_libraries" != "" ; then
3643 WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
3644 if test "$ac_path_to_link" != " -L/usr/lib" ; then
3645 LDFLAGS="$LDFLAGS $ac_path_to_link"
3647 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXinerama"
3648 AC_MSG_RESULT([yes])
3650 AC_MSG_CHECKING([for Xxf86vm extension])
3651 WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xxf86vm)
3652 if test "$ac_find_libraries" != "" ; then
3653 AC_MSG_RESULT([yes])
3654 AC_CHECK_HEADERS([X11/extensions/xf86vmode.h],
3656 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXxf86vm"
3661 #include <X11/Xlib.h>
3670 AC_MSG_WARN([Xinerama not found; disabling wxDisplay])
3673 elif test "$wxUSE_MSW" = 1; then
3674 dnl ---------------------------------------------------------------------------
3675 dnl DirectDraw for MSW - optionally used by WxDisplay.
3676 dnl ---------------------------------------------------------------------------
3677 AC_CHECK_HEADER([ddraw.h], [], [], [#include <windows.h>])
3681 dnl ---------------------------------------------------------------------------
3682 dnl X11 session management
3683 dnl ---------------------------------------------------------------------------
3684 if test "$wxUSE_DETECT_SM" = "yes"; then
3685 if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1; then
3686 AC_MSG_CHECKING([for -lSM - X11 session management])
3687 WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],SM)
3688 if test "$ac_find_libraries" != "" ; then
3689 WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
3690 if test "$ac_path_to_link" != " -L/usr/lib" ; then
3691 LDFLAGS="$LDFLAGS $ac_path_to_link"
3693 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lSM"
3694 AC_MSG_RESULT([yes])
3697 AC_MSG_WARN([libSM not found; disabling session management detection])
3698 wxUSE_DETECT_SM="no"
3701 wxUSE_DETECT_SM="no"
3706 dnl ---------------------------------------------------------------------------
3707 dnl OpenGL libraries
3708 dnl ---------------------------------------------------------------------------
3711 if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then
3713 dnl look in glcanvas.h for the list of platforms supported by wxGlCanvas:
3715 if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OLD_COCOA" = 1; then
3716 OPENGL_LIBS="-framework OpenGL -framework AGL"
3717 elif test "$wxUSE_MSW" = 1; then
3718 OPENGL_LIBS="-lopengl32 -lglu32"
3719 elif test "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1 -o "$wxUSE_GTK2" = 1 -o "$wxUSE_GTK" = 1; then
3721 dnl adjust CPPFLAGS to include GL/gl.h location if necessary
3722 dnl (/opt/graphics/OpenGL is for HP-UX systems, bug 925307)
3723 AC_MSG_CHECKING([for OpenGL headers])
3724 WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /opt/graphics/OpenGL/include], GL/gl.h)
3725 if test "$ac_find_includes" != "" ; then
3726 AC_MSG_RESULT(found in $ac_find_includes)
3727 WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS)
3728 CPPFLAGS="$ac_path_to_include $CPPFLAGS"
3730 AC_MSG_RESULT([not found])
3733 AC_CHECK_HEADER(GL/gl.h, [
3734 AC_CHECK_HEADER(GL/glu.h, [
3737 AC_MSG_CHECKING([for -lGL])
3738 WX_PATH_FIND_LIBRARIES([$SEARCH_LIB /opt/graphics/OpenGL/lib],GL)
3739 if test "$ac_find_libraries" != "" ; then
3740 AC_MSG_RESULT([found in $ac_find_libraries])
3742 WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
3743 if test "$ac_path_to_link" != " -L/usr/lib" ; then
3744 LDFLAGS_GL="$ac_path_to_link"
3747 dnl don't suppose that libGL and libGLU are always in the
3748 dnl same directory -- this is not true for some common
3750 AC_MSG_CHECKING([for -lGLU])
3751 WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],GLU)
3752 if test "$ac_find_libraries" != "" ; then
3753 WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
3754 if test "$ac_path_to_link" != " -L/usr/lib" -a \
3755 "$ac_path_to_link" != "$LDFLAGS_GL"; then
3756 LDFLAGS_GL="$LDFLAGS_GL$ac_path_to_link"
3760 OPENGL_LIBS="-lGL -lGLU"
3761 AC_MSG_RESULT([yes])
3769 if test "$found_gl" != 1; then
3770 AC_MSG_CHECKING([for -lMesaGL])
3771 WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],MesaGL)
3772 if test "$ac_find_libraries" != "" ; then
3773 WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
3774 LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
3775 OPENGL_LIBS="-lMesaGL -lMesaGLU"
3776 AC_MSG_RESULT([yes])
3786 if test "x$OPENGL_LIBS" = "x"; then
3787 if test "$wxUSE_OPENGL" = "yes"; then
3788 AC_MSG_ERROR([OpenGL libraries not available])
3790 dnl case wxUSE_OPENGL=auto
3791 AC_MSG_WARN([OpenGL libraries not available, disabling support for OpenGL])
3797 AC_MSG_WARN([wxGLCanvas not implemented for this port, library will be compiled without it.])
3801 if test "$wxUSE_OPENGL" = "auto"; then
3802 dnl if the OpenGL libraries were unavailable, this would have been
3803 dnl changed to "no" above, if it wasn't, change it to "yes" as we've
3804 dnl verified that we can indeed use OpenGL
3808 if test "$wxUSE_OPENGL" = "yes"; then
3810 AC_DEFINE(wxUSE_OPENGL)
3811 AC_DEFINE(wxUSE_GLCANVAS)
3812 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl opengl/cube opengl/penguin opengl/isosurf"
3817 dnl the symbol which allows conditional compilation for the given toolkit
3818 if test -n "$TOOLKIT" ; then
3819 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WX${TOOLKIT}__"
3823 dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP ---
3825 if test "$wxUSE_SHARED" = "yes"; then
3828 dnl only static for now
3830 AC_MSG_WARN([Host system doesn't support shared libraries, disabling])
3835 if test "$wxUSE_SHARED" = "yes"; then
3837 dnl use versioned symbols if available on the platform
3838 WX_VERSIONED_SYMBOLS([\$(wx_top_builddir)/version-script])
3840 dnl test for GCC's visibility support (sets CFLAGS_VISIBILITY, which is
3841 dnl assigned to CFLAGS and CXXFLAGS below)
3842 if test "$wxUSE_VISIBILITY" != "no"; then
3846 dnl test for Sun CC which can be used under both Solaris and Linux
3847 if test "x$SUNCXX" = xyes; then
3848 SAMPLES_RPATH_FLAG="-R\$(wx_top_builddir)/lib"
3849 WXCONFIG_RPATH="-R\$libdir"
3852 *-*-linux* | *-*-gnu* )
3853 SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib"
3854 WXCONFIG_RPATH="-Wl,-rpath,\$libdir"
3858 dnl here we know that Sun CC is not used as we tested for it above,
3859 dnl hence we must be using gcc
3861 dnl newer versions of gcc need -isystem to compile X headers on
3862 dnl Solaris (which use old style C syntax)
3863 CPPFLAGS="-isystem /usr/openwin/include $CPPFLAGS"
3865 dnl gcc may use Sun's ld, in which case -rpath gives a confusing
3866 dnl error message. We have to try both -Wl,-rpath and -Wl,-R:
3867 saveLdflags="$LDFLAGS"
3868 LDFLAGS="$saveLdflags -Wl,-rpath,/"
3869 AC_MSG_CHECKING([if the linker accepts -rpath])
3873 AC_MSG_RESULT([yes])
3874 SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib"
3875 WXCONFIG_RPATH="-Wl,-rpath,\$libdir"
3878 AC_MSG_CHECKING([if the linker accepts -R])
3879 LDFLAGS="$saveLdflags -Wl,-R,/"
3883 AC_MSG_RESULT([yes])
3884 SAMPLES_RPATH_FLAG="-Wl,-R,\$(wx_top_builddir)/lib"
3885 WXCONFIG_RPATH="-Wl,-R,\$libdir"
3890 LDFLAGS="$saveLdflags"
3894 install_name_tool=`which ${HOST_PREFIX}install_name_tool`
3895 if test "$install_name_tool" -a -x "$install_name_tool"; then
3896 DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
3897 cat <<EOF >change-install-names
3899 libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\`
3900 for i in \${libnames} ; do
3901 ${HOST_PREFIX}install_name_tool -id \${1}/\${i} \${1}/\${i}
3902 for dep in \${libnames} ; do
3903 ${HOST_PREFIX}install_name_tool -change \${2}/\${dep} \${1}/\${dep} \${1}/\${i}
3907 chmod +x change-install-names
3908 DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${libdir} \$(wx_top_builddir)/lib"
3911 dnl the HEADER_PAD_OPTION is required by some wx samples to avoid the error:
3912 dnl "install_name_tool: changing install names can't be redone for: the_exe_name
3913 dnl (for architecture ppc) because larger updated load commands do not fit
3914 dnl (the program must be relinked)"
3915 HEADER_PAD_OPTION="-headerpad_max_install_names"
3918 *-*-cygwin* | *-*-mingw32* )
3922 SAMPLES_RPATH_FLAG="-Wl,+b,\$(wx_top_builddir)/lib"
3923 WXCONFIG_RPATH="-Wl,+b,\$libdir"
3929 dnl this one shouldn't be used for the library build so put it in a
3930 dnl separate variable from WXCONFIG_CPPFLAGS
3931 WXCONFIG_ONLY_CPPFLAGS="$WXCONFIG_ONLY_CPPFLAGS -DWXUSINGDLL"
3933 if test $wxUSE_RPATH = "no"; then
3934 SAMPLES_RPATH_FLAG=''
3935 DYLIB_PATH_POSTLINK=''
3943 config_linkage_component="-static"
3952 if test "$wxUSE_UNICODE" = "yes"; then
3953 lib_unicode_suffix=u
3954 WX_CHARTYPE="unicode"
3958 WX_FLAVOUR=${WX_FLAVOUR:+-$WX_FLAVOUR}
3959 WX_LIB_FLAVOUR=`echo $WX_FLAVOUR | tr '-' '_'`
3962 if test "$wxUSE_DEBUG_INFO" = "yes"; then
3966 WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${WX_LIB_FLAVOUR}_${WX_RELEASE} | tr '[[a-z]]' '[[A-Z]]'`
3968 TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX}"
3970 TOOLCHAIN_FULLNAME="${HOST_PREFIX}${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}-${WX_CHARTYPE}${config_linkage_component}-${WX_RELEASE}${WX_FLAVOUR}"
3972 dnl library link name
3973 dnl These just save us from exporting lib_{unicode,flavour}_suffix.
3974 dnl If we ever need to do that, we won't need to keep these.
3976 if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OLD_COCOA" = 1; then
3977 WX_LIBRARY_BASENAME_NOGUI="wx_base${lib_unicode_suffix}${WX_LIB_FLAVOUR}"
3979 WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${WX_LIB_FLAVOUR}"
3981 if test "${TOOLKIT_DIR}" = "os2"; then
3982 WX_LIBRARY_BASENAME_GUI="wx_pm${WIDGET_SET}${lib_unicode_suffix}${WX_LIB_FLAVOUR}"
3984 WX_LIBRARY_BASENAME_GUI="wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${WX_LIB_FLAVOUR}"
3989 if test "$wxUSE_OLD_COCOA" = 1; then
3991 AC_WX_LANG_OBJECTIVEC
3992 dnl Recent AppKit/NSEvent.h include parts of IOKit which eventually
3993 dnl gets IOKit/graphics/IOGraphicsTypes.h included which typedefs
3994 dnl Point but only if MacTypes.h was not included first. Of course,
3995 dnl if MacTypes.h is included later then you're screwed when it
3996 dnl tries to typedef Point. Defining __Point__ will cause IOGraphicsTypes.h
3997 dnl to not typedef Point and thus fix the problem.
3998 AC_MSG_CHECKING([if AppKit/NSEvent.h conflicts with CoreFoundation])
3999 AC_TRY_COMPILE([#include <AppKit/NSEvent.h>
4000 #include <CoreFoundation/CoreFoundation.h>
4002 [AC_MSG_RESULT([no])],
4003 [AC_MSG_RESULT([yes])
4004 AC_MSG_CHECKING([if defining __Point__ will fix it])
4005 AC_TRY_COMPILE([#define __Point__ 1
4006 #include <AppKit/NSEvent.h>
4007 #include <CoreFoundation/CoreFoundation.h>
4009 [AC_MSG_RESULT([yes])
4010 AC_DEFINE(__Point__)
4012 [AC_MSG_FAILURE([no])]
4018 dnl ---------------------------------------------------------------------------
4019 dnl Checks for typedefs
4020 dnl ---------------------------------------------------------------------------
4022 dnl defines mode_t if not already defined
4024 dnl defines off_t if not already defined
4026 dnl defines pid_t if not already defined
4028 dnl defines size_t if not already defined
4031 dnl sets HAVE_SSIZE_T if ssize_t is defined
4032 AC_CHECK_TYPES(ssize_t)
4034 dnl check what exactly size_t is on this machine - this is necessary to avoid
4035 dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h
4036 AC_LANG_PUSH(C++) dnl tests below use overloaded functions and so need C++
4037 AC_CACHE_CHECK([if size_t is unsigned int],
4038 wx_cv_size_t_is_uint,
4040 dnl an obvious check like AC_TRY_COMPILE[struct Foo { ... };] doesn't work
4041 dnl with egcs (at least) up to 1.1.1 as it allows you to compile duplicate
4042 dnl methods in a local class (i.e. class inside a function) declaration
4043 dnl without any objections!!
4045 dnl hence the hack below: we must have Foo at global scope!
4046 AC_TRY_COMPILE([#include <stddef.h>],
4050 struct Foo { void foo(size_t); void foo(unsigned int); };
4054 wx_cv_size_t_is_uint=no,
4055 wx_cv_size_t_is_uint=yes
4060 if test "$wx_cv_size_t_is_uint" = "yes"; then
4061 AC_DEFINE(wxSIZE_T_IS_UINT)
4063 AC_CACHE_CHECK([if size_t is unsigned long],
4064 wx_cv_size_t_is_ulong,
4065 AC_TRY_COMPILE([#include <stddef.h>],
4069 struct Foo { void foo(size_t); void foo(unsigned long); };
4073 wx_cv_size_t_is_ulong=no,
4074 wx_cv_size_t_is_ulong=yes
4078 if test "$wx_cv_size_t_is_ulong" = "yes"; then
4079 AC_DEFINE(wxSIZE_T_IS_ULONG)
4083 AC_CACHE_CHECK([if wchar_t is separate type],
4084 wx_cv_wchar_t_is_separate_type,
4085 AC_TRY_COMPILE([#include <wchar.h>],
4089 struct Foo { void foo(wchar_t);
4090 void foo(unsigned short);
4091 void foo(unsigned int);
4092 void foo(unsigned long); };
4096 wx_cv_wchar_t_is_separate_type=yes,
4097 wx_cv_wchar_t_is_separate_type=no
4101 if test "$wx_cv_wchar_t_is_separate_type" = "yes"; then
4102 AC_DEFINE(wxWCHAR_T_IS_REAL_TYPE, 1)
4104 AC_DEFINE(wxWCHAR_T_IS_REAL_TYPE, 0)
4107 AC_LANG_POP() dnl C++
4109 dnl ---------------------------------------------------------------------------
4110 dnl Checks for structures
4111 dnl ---------------------------------------------------------------------------
4113 dnl does passwd struct has the pw_gecos field?
4114 AC_CACHE_CHECK([for pw_gecos in struct passwd], wx_cv_struct_pw_gecos,
4116 AC_TRY_COMPILE([#include <pwd.h>],
4123 wx_cv_struct_pw_gecos=yes
4126 wx_cv_struct_pw_gecos=no
4132 if test "$wx_cv_struct_pw_gecos" = "yes"; then
4133 AC_DEFINE(HAVE_PW_GECOS)
4136 dnl ---------------------------------------------------------------------------
4137 dnl Check for functions
4138 dnl ---------------------------------------------------------------------------
4140 dnl don't check for wchar_t functions if we haven't got wchar_t itself
4141 if test "$wxUSE_WCHAR_T" = "yes"; then
4142 AC_DEFINE(wxUSE_WCHAR_T)
4144 dnl check for wcslen in all possible places
4147 AC_CHECK_FUNCS(wcslen, WCSLEN_FOUND=1)
4149 if test "$WCSLEN_FOUND" = 0; then
4150 if test "$TOOLKIT" = "MSW"; then
4151 AC_CHECK_LIB(msvcrt, wcslen, WCHAR_OK=1)
4153 AC_CHECK_LIB(w, wcslen, [
4160 if test "$WCSLEN_FOUND" = 1; then
4161 AC_DEFINE(HAVE_WCSLEN)
4164 AC_CHECK_FUNCS([wcsdup strnlen wcsnlen wcscasecmp wcsncasecmp])
4166 dnl On HP-UX aCC need this define to find mbstrtowcs() &c
4167 dnl Can't be used for g++ since the mbstate_t in wchar.h can conflict
4168 dnl with g++'s in <cwchar> (unless -D_INCLUDE__STDC_A1_SOURCE is in the
4169 dnl flags when g++ is configured, it will declare it's own).
4170 if test "$USE_HPUX" = 1 -a "$GCC" != "yes"; then
4171 CPPFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CPPFLAGS"
4174 dnl Try to use wcsrtombs instead of wcstombs which is buggy in old GNU
4175 dnl libc versions if possible. AC_CHECK_FUNCS only checks it's in the
4176 dnl library, not the header, so do a header check for mbstate_t first.
4177 AC_CHECK_TYPES([mbstate_t],
4178 [AC_CHECK_FUNCS(wcsrtombs)],
4180 [#include <wchar.h>])
4182 AC_MSG_WARN([Wide character support is unavailable])
4185 dnl check for vsnprintf() -- a safe version of vsprintf())
4187 dnl the trouble here is that on some systems (e.g HP-UX 10) this function is
4188 dnl present in libc but not in the system headers and so AC_CHECK_FUNCS (which,
4189 dnl stupidly, provides a dummy function declaration inside its extension)
4190 dnl succeeds, even with C++ compiler, but the compilation of wxWidgets fails
4192 dnl so we first check if the function is in the library
4194 dnl FIXME: replace this mess with WX_CHECK_FUNCS()
4195 AC_CHECK_FUNCS(snprintf vsnprintf vsscanf)
4198 if test "$ac_cv_func_vsnprintf" = "yes"; then
4199 dnl yes it is -- now check if it is in the headers
4200 AC_CACHE_CHECK([for vsnprintf declaration], wx_cv_func_vsnprintf_decl,
4202 dnl our troubles are not over: HP-UX 11 prototypes vsnprintf() as
4203 dnl taking "char *" and not "const char *" while Metrowerks does
4204 dnl provide a correct vsnprintf declaration but in C++ mode it's
4205 dnl always in std namespace and so we have to bring it in scope
4211 #if __MSL__ >= 0x6000
4213 using namespace std;
4220 vsnprintf(buf, 10u, "%s", ap);
4222 wx_cv_func_vsnprintf_decl=yes,
4223 wx_cv_func_vsnprintf_decl=no
4228 if test "$wx_cv_func_vsnprintf_decl" = "yes"; then
4229 AC_DEFINE(HAVE_VSNPRINTF_DECL)
4231 dnl we know there is a vsnprintf declaration, but some old headers
4232 dnl may have one taking a "char *" format instead of "const char *"
4233 AC_CACHE_CHECK([if vsnprintf declaration is broken], wx_cv_func_broken_vsnprintf_decl,
4240 #if __MSL__ >= 0x6000
4242 using namespace std;
4249 const char *fmt = "%s";
4250 vsnprintf(buf, 10u, fmt, ap);
4252 wx_cv_func_broken_vsnprintf_decl=no,
4253 wx_cv_func_broken_vsnprintf_decl=yes
4258 if test "$wx_cv_func_broken_vsnprintf_decl" = "yes"; then
4259 AC_DEFINE(HAVE_BROKEN_VSNPRINTF_DECL)
4264 dnl the same as above but for snprintf() now: it's not present in at least AIX
4266 if test "$ac_cv_func_snprintf" = "yes"; then
4267 AC_CACHE_CHECK([for snprintf declaration], wx_cv_func_snprintf_decl,
4274 #if __MSL__ >= 0x6000
4276 using namespace std;
4282 snprintf(buf, 10u, "%s", "wx");
4284 wx_cv_func_snprintf_decl=yes,
4285 wx_cv_func_snprintf_decl=no
4290 if test "$wx_cv_func_snprintf_decl" = "yes"; then
4291 AC_DEFINE(HAVE_SNPRINTF_DECL)
4294 if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then
4296 dnl check if snprintf() has support for positional arguments
4297 dnl NB: if snprintf() has positional support we can safely suppose that also
4298 dnl other *printf() functions support them as they all belong to the same
4299 dnl family and they all fallback to the same implementation
4300 AC_CACHE_CHECK([if snprintf supports positional arguments], wx_cv_func_snprintf_pos_params,
4309 snprintf (buffer, 128, "%2$d %3$d %1$d", 1, 2, 3);
4310 if (strcmp ("2 3 1", buffer) == 0)
4315 wx_cv_func_snprintf_pos_params=no,
4316 wx_cv_func_snprintf_pos_params=yes,
4317 dnl be pessimistic when cross-compiling
4319 AC_MSG_WARN([Assuming Unix98 printf() is not available,
4320 define HAVE_UNIX98_PRINTF as 1 in setup.h if it is available.])
4321 wx_cv_func_snprintf_pos_params=no
4327 if test "$wx_cv_func_snprintf_pos_params" = "yes"; then
4328 AC_DEFINE(HAVE_UNIX98_PRINTF)
4333 dnl the same as above but for vsscanf() now: it's not present in at least
4334 dnl Solaris 9 headers for gcc-3.4 (due to fixinclude's processing of stdio.h)
4335 if test "$ac_cv_func_vsscanf" = "yes"; then
4336 AC_CACHE_CHECK([for vsscanf declaration], wx_cv_func_vsscanf_decl,
4343 #if __MSL__ >= 0x6000
4345 using namespace std;
4352 vsscanf(buf, "%s", args);
4354 wx_cv_func_vsscanf_decl=yes,
4355 wx_cv_func_vsscanf_decl=no
4360 if test "$wx_cv_func_vsscanf_decl" = "yes"; then
4361 AC_DEFINE(HAVE_VSSCANF_DECL)
4366 if test "$wxUSE_UNICODE" = yes; then
4368 dnl also look if we have wide char IO functions, notice that [f]putws are
4369 dnl declared in special widec.h under Solaris
4370 wchar_headers="#include <stdio.h>
4374 AC_CHECK_HEADERS(widec.h,,, [AC_INCLUDES_DEFAULT()])
4375 if test "$ac_cv_header_widec_h" = "yes"; then
4376 wchar_headers="$wchar_headers
4381 WX_CHECK_FUNCS(putws fputws wprintf vswprintf vswscanf,,,
4384 dnl MinGW has a vswprintf with a different prototype, and
4385 dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS
4386 dnl finds it even if it is not declared in some versions...
4387 AC_MSG_CHECKING([for _vsnwprintf])
4388 AC_TRY_COMPILE([#include <wchar.h>],
4390 [AC_MSG_RESULT([yes])
4391 AC_DEFINE(HAVE__VSNWPRINTF)],
4392 [AC_MSG_RESULT([no])]);
4395 if test "$wxUSE_FILE" = "yes"; then
4396 WX_CHECK_FUNCS(fsync)
4399 dnl at least under IRIX with mipsPro the C99 round() function is available when
4400 dnl building using the C compiler but not when using C++ one
4402 WX_CHECK_FUNCS(round,,,[#include <math.h>])
4405 dnl the following tests are for Unix(like) systems only
4406 if test "$TOOLKIT" != "MSW"; then
4408 dnl check for available version of iconv()
4409 if test "$wxUSE_LIBICONV" != "no" ; then
4411 LIBS="$LIBICONV $LIBS"
4414 dnl check for POSIX signals if we need them
4415 if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
4416 AC_CHECK_FUNCS(sigaction)
4418 if test "$ac_cv_func_sigaction" = "no"; then
4419 AC_MSG_WARN([No POSIX signal functions on this system, wxApp::OnFatalException will not be called])
4420 wxUSE_ON_FATAL_EXCEPTION=no
4423 if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
4424 AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler,
4426 dnl C compiler happily compiles the code even if there is type mismatch
4428 AC_TRY_COMPILE([#include <signal.h>],
4430 extern void testSigHandler(int);
4432 struct sigaction sa;
4433 sa.sa_handler = testSigHandler;
4435 wx_cv_type_sa_handler=int
4437 wx_cv_type_sa_handler=void
4442 AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler)
4446 dnl backtrace() and backtrace_symbols() for wxStackWalker
4447 if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then
4448 AC_CACHE_CHECK([for backtrace() in <execinfo.h>], wx_cv_func_backtrace,
4451 AC_TRY_COMPILE([#include <execinfo.h>],
4456 backtrace(trace, 1);
4457 messages = backtrace_symbols(trace, 1);
4459 wx_cv_func_backtrace=yes,
4460 wx_cv_func_backtrace=no
4467 if test "$wx_cv_func_backtrace" = "no"; then
4468 AC_MSG_WARN([backtrace() is not available, wxStackWalker will not be available])
4469 wxUSE_STACKWALKER=no
4471 AC_CACHE_CHECK([for __cxa_demangle() in <cxxabi.h>], wx_cv_func_cxa_demangle,
4474 AC_TRY_LINK([#include <cxxabi.h>],
4477 __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc);
4479 wx_cv_func_cxa_demangle=yes,
4480 wx_cv_func_cxa_demangle=no
4486 if test "$wx_cv_func_cxa_demangle" = "yes"; then
4487 AC_DEFINE(HAVE_CXA_DEMANGLE)
4492 if test "$wxUSE_STACKWALKER" = "yes" -a "$USE_WIN32" != 1 -a "$USE_UNIX" != 1; then
4493 AC_MSG_WARN([wxStackWalker is only available on Win32 and UNIX... disabled])
4494 wxUSE_STACKWALKER=no
4498 dnl check for the function for temp files creation
4499 AC_CHECK_FUNCS(mkstemp mktemp, break)
4501 dnl get the library function to use for wxGetDiskSpace(): it is statfs() under
4502 dnl Linux and *BSD and statvfs() under Solaris
4503 AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
4506 #if defined(__BSD__)
4507 #include <sys/param.h>
4508 #include <sys/mount.h>
4510 #include <sys/vfs.h>
4521 wx_cv_func_statfs=yes,
4522 wx_cv_func_statfs=no
4526 if test "$wx_cv_func_statfs" = "yes"; then
4527 dnl check whether we have its dcelaration too: some systems (AIX 4) lack it
4528 AC_CACHE_CHECK(for statfs declaration, wx_cv_func_statfs_decl,
4532 #if defined(__BSD__)
4533 #include <sys/param.h>
4534 #include <sys/mount.h>
4536 #include <sys/vfs.h>
4543 wx_cv_func_statfs_decl=yes,
4544 wx_cv_func_statfs_decl=no
4549 if test "$wx_cv_func_statfs_decl" = "yes"; then
4550 AC_DEFINE(HAVE_STATFS_DECL)
4553 wx_cv_type_statvfs_t="struct statfs"
4554 AC_DEFINE(HAVE_STATFS)
4556 AC_CACHE_CHECK(for statvfs, wx_cv_func_statvfs,
4560 #include <sys/statvfs.h>
4565 wx_cv_func_statvfs=yes,
4566 wx_cv_func_statvfs=no
4570 if test "$wx_cv_func_statvfs" = "yes"; then
4571 dnl we also have to check whether we should use statvfs_t (works under
4572 dnl Solaris 8, doesn't work under Solaris 7) or "struct statvfs" (vice
4573 dnl versa) as the argument for statvfs in 64 bit off_t mode (in 32 bit
4574 dnl mode both work fine)
4576 dnl for this check C++ compiler has to be used as passing incompatible
4577 dnl pointers is just a warning and not an error in C
4578 AC_CACHE_CHECK(for statvfs argument type, wx_cv_type_statvfs_t,
4582 #include <sys/statvfs.h>
4592 wx_cv_type_statvfs_t=statvfs_t,
4596 #include <sys/statvfs.h>
4606 wx_cv_type_statvfs_t="struct statvfs",
4607 wx_cv_type_statvfs_t="unknown"
4614 if test "$wx_cv_type_statvfs_t" != "unknown"; then
4615 AC_DEFINE(HAVE_STATVFS)
4618 dnl set it for the test below
4619 wx_cv_type_statvfs_t="unknown"
4623 if test "$wx_cv_type_statvfs_t" != "unknown"; then
4624 AC_DEFINE_UNQUOTED(WX_STATFS_T, $wx_cv_type_statvfs_t)
4626 AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()])
4629 dnl check for fcntl() or at least flock() needed by Unix implementation of
4630 dnl wxSingleInstanceChecker
4631 if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
4632 AC_CHECK_FUNCS(fcntl flock, break)
4634 if test "$ac_cv_func_fcntl" != "yes" -a "$ac_cv_func_flock" != "yes"; then
4635 AC_MSG_WARN(wxSingleInstanceChecker not available)
4636 wxUSE_SNGLINST_CHECKER=no
4640 dnl look for a function to modify the environment
4641 AC_CHECK_FUNCS(setenv putenv, break)
4642 if test "$ac_cv_func_setenv" = "yes"; then
4643 AC_CHECK_FUNCS(unsetenv)
4646 HAVE_SOME_SLEEP_FUNC=0
4647 if test "$USE_BEOS" = 1; then
4648 dnl BeOS has its own (wonder where did they get it from) sleep() function
4650 AC_DEFINE(HAVE_SLEEP)
4651 HAVE_SOME_SLEEP_FUNC=1
4654 if test "$USE_DARWIN" = 1; then
4655 dnl Mac OS X/Darwin has both nanosleep and usleep
4656 dnl but only usleep is defined in unistd.h
4657 AC_DEFINE(HAVE_USLEEP)
4658 HAVE_SOME_SLEEP_FUNC=1
4661 if test "$HAVE_SOME_SLEEP_FUNC" != 1; then
4662 dnl try nanosleep() in libc and libposix4, if this fails - usleep()
4664 AC_CHECK_FUNCS(nanosleep,
4665 AC_DEFINE(HAVE_NANOSLEEP),
4667 AC_CHECK_LIB(posix4, nanosleep,
4669 AC_DEFINE(HAVE_NANOSLEEP)
4670 POSIX4_LINK=" -lposix4"
4673 WX_CHECK_FUNCS(usleep,,
4674 AC_MSG_WARN([wxSleep() function will not work])
4682 dnl check for uname (POSIX) and gethostname (BSD)
4683 WX_CHECK_FUNCS(uname,,,[#include <sys/utsname.h>])
4684 if test "$wx_cv_func_uname" != yes; then
4685 WX_CHECK_FUNCS(gethostname)
4688 WX_CHECK_FUNCS(strtok_r, [], [], [#define _REENTRANT])
4690 dnl check for inet_addr and inet_aton (these may live either in libc, or in
4691 dnl libnsl or libresolv or libsocket)
4693 AC_CHECK_FUNCS(inet_addr,
4694 AC_DEFINE(HAVE_INET_ADDR),
4696 AC_CHECK_LIB(nsl, inet_addr,
4699 AC_CHECK_LIB(resolv, inet_addr,
4702 AC_CHECK_LIB(socket, inet_addr,
4712 AC_CHECK_FUNCS(inet_aton,
4713 AC_DEFINE(HAVE_INET_ATON),
4715 dnl only check it in the same lib
4716 AC_CHECK_LIB($INET_LINK, inet_aton, AC_DEFINE(HAVE_INET_ATON))
4719 if test "x$INET_LINK" != "x"; then
4720 AC_DEFINE(HAVE_INET_ADDR)
4721 INET_LINK=" -l$INET_LINK"
4724 WX_CHECK_FUNCS(fdopen)
4726 if test "$wxUSE_TARSTREAM" = "yes"; then
4727 WX_CHECK_FUNCS(sysconf)
4729 WX_CHECK_FUNCS(getpwuid_r, [], [],
4735 struct passwd pw, *ppw;
4737 getpwuid_r(0, &pw, buf, sizeof(buf), &ppw)
4740 WX_CHECK_FUNCS(getgrgid_r, [], [],
4746 struct group grp, *pgrp;
4748 getgrgid_r(0, &grp, buf, sizeof(buf), &pgrp)
4755 dnl ===========================================================================
4756 dnl Now we have all the info we need - use it!
4757 dnl ===========================================================================
4762 dnl ---------------------------------------------------------------------------
4763 dnl thread support for Unix (for Win32 and OS/2 see past
4764 dnl the next matching "else")
4765 dnl ---------------------------------------------------------------------------
4767 dnl under MSW (except mingw32) we always have thread support
4768 if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
4772 dnl defines THREADS_LINK and THREADS_CFLAGS which are the options
4773 dnl necessary to build the MT programs for the linker and compiler
4776 dnl sets wxUSE_THREADS=1 if thread support is activated
4781 if test "$wxUSE_THREADS" = "yes" ; then
4782 if test "$USE_BEOS" = 1; then
4783 AC_MSG_WARN([BeOS threads are not yet supported... disabled])
4788 if test "$wxUSE_THREADS" = "yes" ; then
4789 dnl find if POSIX threads are available
4791 dnl the tests here are based on ACX_PTHREAD macro from autoconf macro
4792 dnl archive from http://ac-archive.sourceforge.net/
4794 dnl thanks to Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro
4795 dnl Forero Cuervo <bachue@bachue.com> for the original code
4797 dnl TODO: cache the result
4799 dnl define the list of the thread options to try in the loop below
4800 dnl with the convention that anything starting with '-' is a cpp flag
4801 dnl while anything else is a library (i.e. there is an implicit "-l")
4802 THREAD_OPTS="-pthread"
4803 if test "x$SUNCXX" = xyes; then
4804 THREAD_OPTS="-mt lthread $THREAD_OPTS"
4808 *-*-solaris2* | *-*-sunos4* )
4809 if test "x$GCC" = "xyes"; then
4810 dnl Solaris/gcc combination use this one for some reason
4811 THREAD_OPTS="-pthreads $THREAD_OPTS"
4815 dnl look, in order, for the kernel threads, then Linux threads
4816 dnl and finally the userland threads
4817 THREAD_OPTS="-kthread lthread $THREAD_OPTS c_r"
4819 *-*-darwin* | *-*-cygwin* )
4820 dnl Darwin / Mac OS X just uses -lpthread tested below
4821 dnl and so does Cygwin
4825 dnl AIX calls the library libpthreads - thanks IBM!
4826 THREAD_OPTS="pthreads"
4829 if test "x$GCC" = "xyes"; then
4830 dnl g++ versions before 3.3.2 don't support -pthread.
4831 $CXX -dumpspecs | grep 'pthread:' >/dev/null ||
4834 dnl HP-UX aCC (tested with version B3910B A.06.05 [Jul 25
4835 dnl 2005]) supports -mt
4841 dnl gcc under IRIX doesn't seem to like -pthread, but it
4842 dnl doesn't give an error for it neither, just a warning
4843 dnl message -- but this is still very annoying
4844 if test "x$GCC" = "xyes"; then
4850 dnl flying by man pages here: Caldera online docs use this
4851 if test "x$GCC" != "xyes"; then
4852 THREAD_OPTS="-Ethread"
4857 dnl simply linking with libpthread should make the test below work but
4858 dnl it's far from certain that the threaded programs compiled without
4859 dnl any special switches actually work, so try it after all the others
4860 THREAD_OPTS="$THREAD_OPTS pthread none"
4862 dnl now test for all possibilities
4864 for flag in $THREAD_OPTS; do
4867 AC_MSG_CHECKING([whether pthreads work without any flags])
4871 AC_MSG_CHECKING([whether pthreads work with $flag])
4872 THREADS_CFLAGS="$flag"
4876 AC_MSG_CHECKING([for the pthreads library -l$flag])
4877 THREADS_LINK="-l$flag"
4882 save_CFLAGS="$CFLAGS"
4883 LIBS="$THREADS_LINK $LIBS"
4884 CFLAGS="$THREADS_CFLAGS $CFLAGS"
4886 AC_TRY_LINK([#include <pthread.h>],
4887 [pthread_create(0,0,0,0);],
4891 CFLAGS="$save_CFLAGS"
4893 AC_MSG_RESULT($THREADS_OK)
4894 if test "x$THREADS_OK" = "xyes"; then
4902 if test "x$THREADS_OK" != "xyes"; then
4904 AC_MSG_WARN([No thread support on this system... disabled])
4906 dnl yes, these special compiler flags should be used with the
4909 dnl NB: add them to LDFLAGS immediately because we need them to be
4910 dnl used for the subsequent tests some of which can fail without
4911 dnl MT support, hence the reason for the duplication below:
4912 dnl adding them just to WXCONFIG_LDFLAGS and adding the entire
4913 dnl contents of the latter to LDFLAGS in the end is not enough.
4914 LDFLAGS="$THREADS_CFLAGS $LDFLAGS"
4915 WXCONFIG_LDFLAGS="$THREADS_CFLAGS $WXCONFIG_LDFLAGS"
4916 LIBS="$THREADS_LINK $LIBS"
4918 AC_MSG_CHECKING([if more special flags are required for pthreads])
4922 dnl again quoting from
4923 dnl http://www-1.ibm.com/servers/esdd/articles/gnu.html:
4925 dnl When compiling and linking with -pthread, the library
4926 dnl search path should include -L/usr/lib/threads at the
4927 dnl beginning of the path.
4928 LDFLAGS="-L/usr/lib/threads $LDFLAGS"
4929 WXCONFIG_LDFLAGS="-L/usr/lib/threads $WXCONFIG_LDFLAGS"
4930 flag="-D_THREAD_SAFE"
4933 flag="-D_THREAD_SAFE"
4937 if test "x$GCC" != "xyes"; then
4938 dnl see http://docs.hp.com/hpux/onlinedocs/2213/threads.htm
4939 flag="$flag -D_RWSTD_MULTI_THREAD"
4942 *solaris* | alpha*-osf*)
4946 AC_MSG_RESULT(${flag})
4947 if test "x$flag" != xno; then
4948 THREADS_CFLAGS="$THREADS_CFLAGS $flag"
4951 dnl don't add these options to CPPFLAGS as cpp might not know them
4952 WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS $THREADS_CFLAGS"
4956 dnl do other tests only if we are using threads
4957 if test "$wxUSE_THREADS" = "yes" ; then
4958 AC_CHECK_FUNCS(thr_setconcurrency)
4960 dnl can't use AC_CHECK_FUNCS for this one as it's usually a macro and so
4961 dnl wouldn't be found by it
4962 AC_CACHE_CHECK([for pthread_cleanup_push/pop], wx_cv_func_pthread_cleanup,
4964 dnl C compiler may treat pthread_cleanup_push() as an undeclared
4965 dnl function and not give a warning even if it's unavailable, so use
4966 dnl the C++ one for this test
4968 AC_TRY_COMPILE([#include <pthread.h>
4969 void ThreadCleanupFunc(void *p);
4973 pthread_cleanup_push(ThreadCleanupFunc, p);
4974 pthread_cleanup_pop(0);
4976 wx_cv_func_pthread_cleanup=yes
4978 wx_cv_func_pthread_cleanup=no
4983 if test "x$wx_cv_func_pthread_cleanup" = "xyes"; then
4984 AC_DEFINE(wxHAVE_PTHREAD_CLEANUP)
4987 AC_CHECK_HEADERS(sched.h,,, [AC_INCLUDES_DEFAULT()])
4988 if test "$ac_cv_header_sched_h" = "yes"; then
4989 AC_CHECK_FUNC(sched_yield,
4990 AC_DEFINE(HAVE_SCHED_YIELD),
4992 AC_CHECK_LIB(posix4,
4994 [AC_DEFINE(HAVE_SCHED_YIELD) POSIX4_LINK=" -lposix4"],
4995 AC_MSG_WARN(wxThread::Yield will not work properly)
5001 dnl to be able to set the thread priority, we need to have all of the
5002 dnl following functions:
5003 dnl 1. pthread_attr_getschedpolicy
5004 dnl 2. sched_get_priority_min and sched_get_priority_max
5005 dnl (this one can be in either libpthread or libposix4 (under Solaris))
5006 dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam
5008 AC_CHECK_FUNC(pthread_attr_getschedpolicy,
5009 [AC_CHECK_FUNC(pthread_attr_setschedparam,
5010 [AC_CHECK_FUNC(sched_get_priority_max,
5012 [AC_CHECK_LIB([posix4], sched_get_priority_max,
5015 POSIX4_LINK=" -lposix4"
5022 if test "$HAVE_PRIOR_FUNCS" = 1; then
5023 AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS)
5025 AC_MSG_WARN(Setting thread priority will not work)
5028 AC_CHECK_FUNC(pthread_cancel,
5029 AC_DEFINE(HAVE_PTHREAD_CANCEL),
5030 AC_MSG_WARN([wxThread::Kill() will not work properly]))
5032 AC_CHECK_FUNC(pthread_mutex_timedlock,
5033 AC_DEFINE(HAVE_PTHREAD_MUTEX_TIMEDLOCK),
5034 AC_MSG_WARN([wxMutex::LockTimeout() will not work]))
5036 AC_CHECK_FUNC(pthread_attr_setstacksize,
5037 AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE))
5039 dnl mutexattr_t initialization is done in quite different ways on different
5040 dnl platforms, so check for a few things:
5042 dnl HAVE_MUTEX_RECURSIVE means that we can create recursive mutexes
5043 dnl HAVE_MUTEXATTR_SETTYPE means that we do it using
5044 dnl pthread_mutexattr_settype(PTHREAD_MUTEX_RECURSIVE) and if it is not
5045 dnl defined, we do it by directly assigned
5046 dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
5048 AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
5050 AC_TRY_COMPILE([#include <pthread.h>],
5052 pthread_mutexattr_t attr;
5053 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
5055 wx_cv_type_pthread_mutexattr_t=yes,
5056 wx_cv_type_pthread_mutexattr_t=no
5060 if test "$wx_cv_type_pthread_mutexattr_t" = "yes"; then
5061 AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_T)
5063 dnl check if we already have the declaration we need, it is not
5064 dnl present in some systems' headers
5065 AC_CACHE_CHECK([for pthread_mutexattr_settype declaration],
5066 wx_cv_func_pthread_mutexattr_settype_decl, [
5067 AC_TRY_COMPILE([#include <pthread.h>],
5069 pthread_mutexattr_t attr;
5070 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
5072 wx_cv_func_pthread_mutexattr_settype_decl=yes,
5073 wx_cv_func_pthread_mutexattr_settype_decl=no
5076 if test "$wx_cv_func_pthread_mutexattr_settype_decl" = "yes"; then
5077 AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL)
5080 dnl don't despair, there may be another way to do it
5081 AC_CACHE_CHECK([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER],
5082 wx_cv_type_pthread_rec_mutex_init,
5084 AC_TRY_COMPILE([#include <pthread.h>],
5086 pthread_mutex_t attr = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
5088 wx_cv_type_pthread_rec_mutex_init=yes
5090 wx_cv_type_pthread_rec_mutex_init=no
5094 if test "$wx_cv_type_pthread_rec_mutex_init" = "yes"; then
5095 AC_DEFINE(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
5097 dnl this may break code working elsewhere, so at least warn about it
5098 AC_MSG_WARN([wxMutex won't be recursive on this platform])
5102 if test "$wxUSE_COMPILER_TLS" = "auto"; then
5103 if test "$USE_NETBSD" = 1; then
5104 AC_MSG_WARN([Disabling TLS under NetBSD, please contact wx-dev if it works now])
5105 wxUSE_COMPILER_TLS=no
5107 wxUSE_COMPILER_TLS=yes
5111 if test "$wxUSE_COMPILER_TLS" = "yes"; then
5112 dnl test for compiler thread-specific variables support
5113 AC_CACHE_CHECK([for __thread keyword],
5116 AC_TRY_COMPILE([#include <pthread.h>],
5118 static __thread int n = 0;
5119 static __thread int *p = 0;
5121 wx_cv_cc___thread=yes,
5122 wx_cv_cc___thread=no
5127 if test "$wx_cv_cc___thread" = "yes"; then
5129 if test -n "$ax_cv_gxx_version"; then
5130 dnl g++ supports __thread since at least version 3.3 but its support
5131 dnl seems to be broken until 4.1, see
5132 dnl http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/108388
5134 dnl NB: we still need to test __thread support with
5135 dnl AC_TRY_COMPILE above even for g++ 4 as it doesn't
5136 dnl support it for all architectures (e.g. it doesn't
5137 dnl work under OS X)
5138 AC_MSG_CHECKING([whether __thread support in g++ is usable])
5139 case "$ax_cv_gxx_version" in
5141 AC_MSG_RESULT([no, it's broken])
5142 wx_cv_cc___thread=no
5145 AC_MSG_RESULT([yes, it works])
5151 if test "$wx_cv_cc___thread" = "yes"; then
5152 AC_DEFINE(HAVE___THREAD_KEYWORD)
5159 if test "$wxUSE_THREADS" = "yes" ; then
5164 dnl check if the compiler accepts -mthreads
5165 AC_CACHE_CHECK([if compiler supports -mthreads],
5166 wx_cv_cflags_mthread,
5168 CFLAGS_OLD="$CFLAGS"
5169 CFLAGS="-mthreads $CFLAGS"
5170 AC_TRY_COMPILE([], [],
5171 wx_cv_cflags_mthread=yes,
5172 wx_cv_cflags_mthread=no
5177 if test "$wx_cv_cflags_mthread" = "yes"; then
5179 WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -mthreads"
5180 LDFLAGS="$LDFLAGS -mthreads"
5183 CFLAGS="$CFLAGS_OLD"
5187 WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -Zmt -D__ST_MT_ERRNO__"
5188 LDFLAGS="$LDFLAGS -Zmt"
5194 AC_CHECK_FUNC(localtime_r, [ AC_DEFINE(HAVE_LOCALTIME_R) ])
5195 AC_CHECK_FUNC(gmtime_r, [ AC_DEFINE(HAVE_GMTIME_R) ])
5196 dnl By preference, we probably should use getaddrinfo which avoids thread
5197 dnl safety issues and supports IPv6, however there currently is no code
5198 dnl for it, so testing for it is temporarily disabled and we are restricted
5199 dnl to gethostbyname_r/gethostbyaddr_r and getservbyname_r
5201 dnl AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), [
5202 dnl no getaddrinfo, so check for gethostbyname_r and
5203 dnl related functions (taken from python's configure.in)
5204 dnl sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments
5205 AX_FUNC_WHICH_GETHOSTBYNAME_R
5206 if test "x$ac_cv_func_which_gethostbyname_r" = "xno" -o \
5207 "x$ac_cv_func_which_gethostbyname_r" = "xunknown" ; then
5208 AC_CHECK_FUNC(gethostbyname, [ AC_DEFINE(HAVE_GETHOSTBYNAME) ])
5210 dnl A similar test for getservbyname_r
5211 dnl I'm tempted to just not do this test which is taking much time and
5212 dnl do something similar as for gethostbyaddr_r, but OTOH the macro
5213 dnl doing the test already exists, so using it is easy enough. - SN
5214 AC_raf_FUNC_WHICH_GETSERVBYNAME_R
5215 if test "x$ac_cv_func_which_getservbyname_r" = "xno" -o \
5216 "x$ac_cv_func_which_getservbyname_r" = "xunknown" ; then
5217 AC_CHECK_FUNCS(getservbyname,[ AC_DEFINE(HAVE_GETSERVBYNAME) ])
5219 dnl For gethostbyaddr_r, we currently do no separate test, instead, we
5220 dnl silently assume it's available exactly if gethostbyname_r is
5221 dnl available and always requires two more arguments than
5222 dnl gethostbyname_r.
5223 dnl (also, I'm lazy and there no m4 file that's ready for use for this
5224 dnl function, although it should be easy to rewrite the gethostbyname_r
5225 dnl check to fit this case, if it's really needed. - SN )
5229 if test "$wxUSE_THREADS" = "yes"; then
5230 AC_DEFINE(wxUSE_THREADS)
5232 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
5234 dnl on some systems, _REENTRANT should be defined if we want to use any _r()
5235 dnl functions - add tests for other functions here as well
5236 if test "$wx_cv_func_strtok_r" = "yes"; then
5237 AC_MSG_CHECKING(if -D_REENTRANT is needed)
5238 if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
5239 WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_REENTRANT"
5247 if test "$WXGTK2" = 1 ; then
5248 AC_DEFINE_UNQUOTED(__WXGTK20__,$WXGTK2)
5252 if test "$WXGTK12" = 1 ; then
5253 AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12)
5256 if test "$WXGTK127" = 1 ; then
5257 AC_DEFINE_UNQUOTED(__WXGTK127__,$WXGTK127)
5260 if test "$WXGPE" = 1 ; then
5261 AC_DEFINE_UNQUOTED(__WXGPE__,$WXGPE)
5264 dnl DEBUG_CFLAGS contains debugging options (supposed to be the same for C and C++
5265 dnl compilers: we'd need a separate DEBUG_CXXFLAGS if this is ever not the case)
5267 if `echo $CXXFLAGS $CFLAGS | grep " -g" >/dev/null`; then
5268 dnl the CXXFLAGS or the CFLAGS variable already contains the -g flag
5269 dnl (e.g. it was specified by the user before running configure); since
5270 dnl later they will be merged with DEBUG_CFLAGS, don't set the -g option
5271 dnl in DEBUG_CFLAGS to avoid (possibly different) flag duplicates
5272 AC_MSG_WARN([CXXFLAGS/CFLAGS already contains -g flag; ignoring the --enable-debug_info option])
5273 elif test "$wxUSE_DEBUG_INFO" = "yes" ; then
5277 if test "$wxUSE_DEBUG_GDB" = "yes" ; then
5278 wxUSE_DEBUG_INFO=yes
5279 if test "$GCC" = yes; then
5280 DEBUG_CFLAGS="-ggdb"
5284 if test "$wxUSE_DEBUG_FLAG" = "no" ; then
5285 if test "$wxUSE_GTK" = 1 ; then
5286 if test "x$wxGTK_VERSION" = "x1" ; then
5287 CPPFLAGS="-DGTK_NO_CHECK_CASTS $CPPFLAGS"
5292 if test "$wxUSE_MEM_TRACING" = "yes" ; then
5293 AC_DEFINE(wxUSE_MEMORY_TRACING)
5294 AC_DEFINE(wxUSE_GLOBAL_MEMORY_OPERATORS)
5295 AC_DEFINE(wxUSE_DEBUG_NEW_ALWAYS)
5296 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS memcheck"
5299 if test "$wxUSE_DMALLOC" = "yes" ; then
5300 DMALLOC_LIBS="-ldmallocthcxx"
5303 dnl cc/cxx/ld option for profiling
5305 if test "$wxUSE_PROFILE" = "yes" ; then
5306 PROFILE_FLAGS=" -pg"
5309 if test "$GCC" = "yes" ; then
5310 if test "$wxUSE_NO_RTTI" = "yes" ; then
5311 WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-rtti"
5313 if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
5314 WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-exceptions"
5316 if test "$wxUSE_PERMISSIVE" = "yes" ; then
5317 WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -fpermissive"
5320 dnl Ian Brown <ian.brown@printsoft.de> reports that versions of gcc before
5321 dnl 3.0 overflow the table of contents on rs6000 as they create an entry
5322 dnl for each subroutine by default -- using the switch below only creates
5323 dnl one entry per file instead at the price of minor performance penalty
5325 dnl As of wx2.4 a bug in the hppa gcc compiler causes a similar problem
5326 dnl without -ffunction-sections. No idea how long we'll need to maintain
5327 dnl this, or even the extent of gcc/wx version combinations affected, but
5328 dnl also as above, this 'fix' does not come without side effects.
5330 dnl TODO: test for the gcc version here (how?)
5333 WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -mminimal-toc"
5336 WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -ffunction-sections"
5341 dnl C/C++ compiler option for optimization (supposed to be the same for both)
5343 if `echo $CXXFLAGS $CFLAGS | grep " -O" >/dev/null`; then
5344 dnl the CXXFLAGS or the CFLAGS variable already contains -O optimization flag
5345 dnl (e.g. it was specified by the user before running configure); since
5346 dnl later they will be merged with OPTIMISE_CFLAGS, don't set the -O option
5347 dnl in OPTIMISE_CFLAGS to avoid (possibly different) flag duplicates
5348 AC_MSG_WARN([CXXFLAGS/CFLAGS already contains -O flag; ignoring the --disable-optimise option])
5350 if test "$wxUSE_OPTIMISE" = "no" ; then
5351 if test "$GCC" = yes ; then
5352 dnl use -O0 because compiling with it is faster than compiling with no
5353 dnl optimization options at all (at least with g++ 3.2)
5354 OPTIMISE_CFLAGS="-O0"
5357 if test "$GCC" = yes ; then
5359 *-pc-os2_emx | *-pc-os2-emx )
5360 dnl Not all of the supported gcc versions understand
5361 dnl -fstrict-aliasing and none actually needs it (yet).
5362 OPTIMISE_CFLAGS="-O2"
5365 dnl Switch on optimisation but keep strict-aliasing off for
5366 dnl now (see -fstrict-aliasing in the gcc manual). When it is
5367 dnl switched back on consider using -Wstrict-aliasing=2.
5368 OPTIMISE_CFLAGS="-O2 -fno-strict-aliasing"
5372 OPTIMISE_CFLAGS="-O"
5377 dnl ---------------------------------------------------------------------------
5378 dnl compatibility level
5379 dnl ---------------------------------------------------------------------------
5381 if test "x$WXWIN_COMPATIBILITY_2_6" = "xyes"; then
5382 AC_DEFINE(WXWIN_COMPATIBILITY_2_6)
5384 WXWIN_COMPATIBILITY_2_8="yes"
5387 if test "x$WXWIN_COMPATIBILITY_2_8" != "xno"; then
5388 AC_DEFINE(WXWIN_COMPATIBILITY_2_8)
5391 dnl ---------------------------------------------------------------------------
5392 dnl the library may be built without GUI classes at all
5393 dnl ---------------------------------------------------------------------------
5395 if test "$wxUSE_GUI" = "yes"; then
5396 AC_DEFINE(wxUSE_GUI)
5398 dnl the things we always pull in the GUI version of the library:
5399 dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
5400 dnl library really can't be built without those)
5401 dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
5402 dnl almost any program and the first 2 are needed to show a message box
5403 dnl which want to be always able to do)
5404 dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
5405 dnl to compile without them (if the app doesn't do any drawing, it doesn't
5406 dnl need the dcs, pens, brushes, ...), this just can't be done now
5407 dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
5408 dnl 5. misc stuff: timers, settings, message box
5411 dnl ---------------------------------------------------------------------------
5413 dnl ---------------------------------------------------------------------------
5415 if test "$wxUSE_UNIX" = "yes"; then
5416 AC_DEFINE(wxUSE_UNIX)
5419 dnl ------------------------------------------------------------------------
5421 dnl ------------------------------------------------------------------------
5423 dnl under MSW we always have LoadLibrary/GetProcAddress
5424 if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
5428 if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then
5429 if test "$USE_DOS" = 1; then
5432 dnl the test is a bit complicated because we check for dlopen() both with
5433 dnl and without -ldl and we also try to find shl_load() if there is no
5434 dnl dlopen() on this system
5435 AC_CHECK_FUNCS(dlopen,
5437 AC_DEFINE(HAVE_DLOPEN)
5441 AC_CHECK_LIB(dl, dlopen,
5443 AC_DEFINE(HAVE_DLOPEN)
5445 DL_LINK=" -ldl$DL_LINK"
5448 AC_CHECK_FUNCS(shl_load,
5450 AC_DEFINE(HAVE_SHL_LOAD)
5454 AC_CHECK_LIB(shl_load, dld,
5457 DL_LINK=" -ldld$DL_LINK"
5463 dnl check also for dlerror()
5464 if test "$HAVE_DL_FUNCS" = 1; then
5465 AC_CHECK_FUNCS(dlerror,
5466 AC_DEFINE(HAVE_DLERROR),
5468 AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))
5474 dnl Force HAVE_DL_FUNCS on for Darwin, even if the tests failed (e.g. pre-10.3)
5475 if test "$USE_DARWIN" = 1; then
5476 dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
5480 if test "$HAVE_DL_FUNCS" = 0; then
5481 if test "$HAVE_SHL_FUNCS" = 0; then
5482 if test "$USE_UNIX" = 1 -o "$USE_DOS" = 1; then
5483 AC_MSG_WARN([Missing dynamic loading support, several features will be disabled])
5484 wxUSE_DYNAMIC_LOADER=no
5485 wxUSE_DYNLIB_CLASS=no
5487 AC_MSG_WARN([Assuming wxLibrary class works on this platform])
5494 if test "$wxUSE_DYNAMIC_LOADER" = "yes" ; then
5495 AC_DEFINE(wxUSE_DYNAMIC_LOADER)
5497 if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then
5498 AC_DEFINE(wxUSE_DYNLIB_CLASS)
5502 dnl ---------------------------------------------------------------------------
5503 dnl Verify consistency of plugins/monolithic/shared settings:
5504 dnl ---------------------------------------------------------------------------
5506 if test "$wxUSE_PLUGINS" = "yes" ; then
5507 if test "$wxUSE_SHARED" = "no" ; then
5508 AC_MSG_WARN([plugins supported only in shared build, disabling])
5511 if test "$wxUSE_MONOLITHIC" = "yes" ; then
5512 AC_MSG_WARN([plugins not supported monolithic build, disabling])
5515 if test "$wxUSE_DYNLIB_CLASS" = "no" ; then
5516 AC_MSG_WARN([plugins require wxDynamicLibrary, disabling])
5519 if test "$wxUSE_PLUGINS" = "yes" ; then
5520 AC_DEFINE(wxUSE_PLUGINS)
5524 dnl ---------------------------------------------------------------------------
5525 dnl File system watcher checks
5526 dnl ---------------------------------------------------------------------------
5528 if test "$wxUSE_FSWATCHER" = "yes"; then
5529 AC_DEFINE(wxUSE_FSWATCHER)
5530 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS fswatcher"
5532 if test "$wxUSE_UNIX" = "yes"; then
5533 AC_CHECK_HEADERS(sys/inotify.h,,, [AC_INCLUDES_DEFAULT()])
5534 if test "$ac_cv_header_sys_inotify_h" = "yes"; then
5535 AC_DEFINE(wxHAS_INOTIFY)
5537 AC_CHECK_HEADERS(sys/event.h,,, [AC_INCLUDES_DEFAULT()])
5538 if test "$ac_cv_header_sys_event_h" = "yes"; then
5539 AC_DEFINE(wxHAS_KQUEUE)
5541 AC_MSG_WARN([No native wxFileSystemWatcher implementation available for on this platform])
5547 dnl ---------------------------------------------------------------------------
5548 dnl Register non-GUI class options for makefiles and setup.h
5549 dnl ---------------------------------------------------------------------------
5551 if test "$wxUSE_STL" = "yes"; then
5552 AC_DEFINE(wxUSE_STL)
5555 if test "$wxUSE_EXTENDED_RTTI" = "yes"; then
5556 AC_DEFINE(wxUSE_EXTENDED_RTTI)
5559 if test "$wxUSE_ANY" = "yes"; then
5560 AC_DEFINE(wxUSE_ANY)
5563 if test "$wxUSE_APPLE_IEEE" = "yes"; then
5564 AC_DEFINE(wxUSE_APPLE_IEEE)
5567 if test "$wxUSE_TIMER" = "yes"; then
5568 AC_DEFINE(wxUSE_TIMER)
5571 dnl Unix implementation needs additional checks because audio support
5572 dnl comes in many favours:
5573 if test "$USE_UNIX" = 1 ; then
5574 dnl mmedia doesn't compile with wxMGL, remove this if this is ever fixed
5575 if test "$wxUSE_MGL" != 1; then
5576 dnl it's not enough to check for just the header because OSS under NetBSD
5577 dnl redefines ioctl as oss_ioctrl inside it and so we also need to test
5578 dnl whether we need -lossaudio at link-time
5579 AC_CACHE_CHECK([for SNDCTL_DSP_SPEED in sys/soundcard.h], ac_cv_header_sys_soundcard, [
5581 #include <sys/ioctl.h>
5582 #include <sys/soundcard.h>
5585 ioctl(0, SNDCTL_DSP_SPEED, 0);
5587 ac_cv_header_sys_soundcard=yes,
5590 LIBS="$saveLibs -lossaudio"
5592 #include <sys/ioctl.h>
5593 #include <sys/soundcard.h>
5596 ioctl(0, SNDCTL_DSP_SPEED, 0);
5598 ac_cv_header_sys_soundcard=yes,
5601 ac_cv_header_sys_soundcard=no
5609 if test "$ac_cv_header_sys_soundcard" = "yes"; then
5610 AC_DEFINE(HAVE_SYS_SOUNDCARD_H)
5615 if test "$wxUSE_SOUND" = "yes"; then
5616 if test "$USE_UNIX" = 1 ; then
5617 if test "$wxUSE_LIBSDL" != "no"; then
5618 AM_PATH_SDL([1.2.0],
5620 EXTRALIBS_SDL="$SDL_LIBS"
5621 CFLAGS="$SDL_CFLAGS $CFLAGS"
5622 CXXFLAGS="$SDL_CFLAGS $CXXFLAGS"
5623 AC_DEFINE(wxUSE_LIBSDL)
5625 [wxUSE_LIBSDL="no"])
5626 if test "$wxUSE_LIBSDL" = "yes" -a "$wxUSE_PLUGINS" = "yes" ; then
5631 dnl wxMGL doesn't support sound under DOS, only under Unix
5632 if test "$wxUSE_MGL" = 1; then
5633 AC_MSG_WARN([wxSound not supported in MGL under DOS... disabled])
5639 if test "$wxUSE_SOUND" = "yes"; then
5640 AC_DEFINE(wxUSE_SOUND)
5641 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sound"
5644 if test "$WXGTK2" = 1; then
5645 PKG_PROG_PKG_CONFIG()
5647 if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
5649 if test "$wxUSE_GTKPRINT" = "yes" ; then
5651 PKG_CHECK_MODULES(GTKPRINT,
5652 [gtk+-unix-print-2.0 >= 2.10],
5654 CFLAGS="$GTKPRINT_CFLAGS $CFLAGS"
5655 CXXFLAGS="$GTKPRINT_CFLAGS $CXXFLAGS"
5656 AC_DEFINE(wxUSE_GTKPRINT)
5659 AC_MSG_WARN([GTK printing support not found (GTK+ >= 2.10), library will use GNOME printing support or standard PostScript printing])
5665 if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then
5667 PKG_CHECK_MODULES(LIBGNOMEPRINTUI,
5668 [libgnomeprintui-2.2 >= 2.8],
5670 CFLAGS="$LIBGNOMEPRINTUI_CFLAGS $CFLAGS"
5671 CXXFLAGS="$LIBGNOMEPRINTUI_CFLAGS $CXXFLAGS"
5672 AC_DEFINE(wxUSE_LIBGNOMEPRINT)
5675 AC_MSG_WARN([libgnomeprintui not found, library will use standard PostScript printing])
5676 wxUSE_LIBGNOMEPRINT="no"
5682 if test "$wxUSE_MIMETYPE" = "yes" ; then
5683 if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then
5685 PKG_CHECK_MODULES(GNOMEVFS,
5686 [gnome-vfs-2.0 >= 2.0],
5688 CFLAGS="$GNOMEVFS_CFLAGS $CFLAGS"
5689 CXXFLAGS="$GNOMEVFS_CFLAGS $CXXFLAGS"
5690 AC_DEFINE(wxUSE_LIBGNOMEVFS)
5693 AC_MSG_WARN([libgnomevfs not found, library won't be able to associate MIME type])
5694 wxUSE_LIBGNOMEVFS="no"
5700 if test "$wxUSE_LIBHILDON" = "yes" ; then
5701 PKG_CHECK_MODULES(HILDON,
5702 [hildon-lgpl >= 0.9],
5704 EXTRALIBS_HILDON="$HILDON_LIBS"
5705 CFLAGS="$CFLAGS $HILDON_CFLAGS"
5706 CXXFLAGS="$CXXFLAGS $HILDON_CFLAGS"
5707 AC_DEFINE(wxUSE_LIBHILDON)
5711 AC_MSG_WARN([libhildon_lgpl not found])
5712 wxUSE_LIBHILDON="no"
5717 if test "$ac_hildon_lgpl" = 0 ; then
5718 PKG_CHECK_MODULES(HILDON2,
5721 EXTRALIBS_HILDON="$HILDON2_LIBS"
5722 CFLAGS="$CFLAGS $HILDON2_CFLAGS"
5723 CXXFLAGS="$CXXFLAGS $HILDON2_CFLAGS"
5724 AC_DEFINE(wxUSE_LIBHILDON2)
5727 AC_MSG_WARN([libhildon_1 not found])
5728 wxUSE_LIBHILDON2="no"
5735 if test "$wxUSE_CMDLINE_PARSER" = "yes"; then
5736 AC_DEFINE(wxUSE_CMDLINE_PARSER)
5739 if test "$wxUSE_STOPWATCH" = "yes"; then
5740 AC_DEFINE(wxUSE_STOPWATCH)
5743 if test "$wxUSE_DATETIME" = "yes"; then
5744 AC_DEFINE(wxUSE_DATETIME)
5747 if test "$wxUSE_FILE" = "yes"; then
5748 AC_DEFINE(wxUSE_FILE)
5751 if test "$wxUSE_FFILE" = "yes"; then
5752 AC_DEFINE(wxUSE_FFILE)
5755 if test "$wxUSE_ARCHIVE_STREAMS" = "yes"; then
5756 if test "$wxUSE_STREAMS" != yes; then
5757 AC_MSG_WARN(wxArchive requires wxStreams... disabled)
5758 wxUSE_ARCHIVE_STREAMS=no
5760 AC_DEFINE(wxUSE_ARCHIVE_STREAMS)
5764 if test "$wxUSE_ZIPSTREAM" = "yes"; then
5765 if test "$wxUSE_ARCHIVE_STREAMS" != "yes"; then
5766 AC_MSG_WARN(wxZip requires wxArchive... disabled)
5767 elif test "$wxUSE_ZLIB" = "no"; then
5768 AC_MSG_WARN(wxZip requires wxZlib... disabled)
5770 AC_DEFINE(wxUSE_ZIPSTREAM)
5774 if test "$wxUSE_TARSTREAM" = "yes"; then
5775 if test "$wxUSE_ARCHIVE_STREAMS" != "yes"; then
5776 AC_MSG_WARN(wxTar requires wxArchive... disabled)
5778 AC_DEFINE(wxUSE_TARSTREAM)
5782 if test "$wxUSE_FILESYSTEM" = "yes"; then
5783 if test "$wxUSE_STREAMS" != yes -o \( "$wxUSE_FILE" != yes -a "$wxUSE_FFILE" != yes \); then
5784 AC_MSG_WARN(wxFileSystem requires wxStreams and wxFile or wxFFile... disabled)
5787 AC_DEFINE(wxUSE_FILESYSTEM)
5791 if test "$wxUSE_FS_ARCHIVE" = "yes"; then
5792 if test "$wxUSE_FILESYSTEM" != yes -o "$wxUSE_ARCHIVE_STREAMS" != yes; then
5793 AC_MSG_WARN(wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled)
5795 AC_DEFINE(wxUSE_FS_ARCHIVE)
5799 if test "$wxUSE_FS_ZIP" = "yes"; then
5800 if test "$wxUSE_FS_ARCHIVE" != yes; then
5801 AC_MSG_WARN(wxZipFSHandler requires wxArchiveFSHandler... disabled)
5803 AC_DEFINE(wxUSE_FS_ZIP)
5807 if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
5808 if test "$USE_UNIX" != 1; then
5809 AC_MSG_WARN([Catching fatal exceptions not currently supported on this system, wxApp::OnFatalException will not be called])
5810 wxUSE_ON_FATAL_EXCEPTION=no
5812 AC_DEFINE(wxUSE_ON_FATAL_EXCEPTION)
5816 if test "$wxUSE_STACKWALKER" = "yes"; then
5817 AC_DEFINE(wxUSE_STACKWALKER)
5820 if test "$wxUSE_DEBUGREPORT" = "yes"; then
5821 if test "$USE_UNIX" != 1 -a "$USE_WIN32" != 1; then
5822 AC_MSG_WARN([Creating debug reports not currently supported on this system, disabled])
5823 wxUSE_DEBUGREPORT=no
5825 AC_DEFINE(wxUSE_DEBUGREPORT)
5826 if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
5827 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS debugrpt"
5832 if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
5833 AC_DEFINE(wxUSE_SNGLINST_CHECKER)
5836 if test "$wxUSE_BUSYINFO" = "yes"; then
5837 AC_DEFINE(wxUSE_BUSYINFO)
5840 if test "$wxUSE_STD_IOSTREAM" = "yes"; then
5841 AC_DEFINE(wxUSE_STD_IOSTREAM)
5844 if test "$wxUSE_STD_STRING" = "yes"; then
5845 AC_DEFINE(wxUSE_STD_STRING)
5848 if test "$wxUSE_STDPATHS" = "yes"; then
5849 AC_DEFINE(wxUSE_STDPATHS)
5852 if test "$wxUSE_TEXTBUFFER" = "yes"; then
5853 AC_DEFINE(wxUSE_TEXTBUFFER)
5856 if test "$wxUSE_TEXTFILE" = "yes"; then
5857 if test "$wxUSE_FILE" != "yes" -o "$wxUSE_TEXTBUFFER" != "yes" ; then
5858 AC_MSG_WARN(wxTextFile requires wxFile and wxTextBuffer... disabled)
5860 AC_DEFINE(wxUSE_TEXTFILE)
5864 if test "$wxUSE_CONFIG" = "yes" ; then
5865 if test "$wxUSE_TEXTFILE" != "yes"; then
5866 AC_MSG_WARN(wxConfig requires wxTextFile... disabled)
5868 AC_DEFINE(wxUSE_CONFIG)
5869 AC_DEFINE(wxUSE_CONFIG_NATIVE)
5870 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS config"
5874 if test "$wxUSE_INTL" = "yes" ; then
5875 if test "$wxUSE_FILE" != "yes"; then
5876 AC_MSG_WARN(I18n code requires wxFile... disabled)
5878 AC_DEFINE(wxUSE_INTL)
5879 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS internat"
5880 GUIDIST="$GUIDIST INTL_DIST"
5884 if test "$wxUSE_XLOCALE" = "yes" ; then
5885 AC_DEFINE(wxUSE_XLOCALE)
5886 AC_CHECK_TYPES(locale_t,,,
5887 [#include <xlocale.h>
5888 #include <locale.h>])
5891 if test "$wxUSE_LOG" = "yes"; then
5892 AC_DEFINE(wxUSE_LOG)
5894 if test "$wxUSE_LOGGUI" = "yes"; then
5895 AC_DEFINE(wxUSE_LOGGUI)
5898 if test "$wxUSE_LOGWINDOW" = "yes"; then
5899 AC_DEFINE(wxUSE_LOGWINDOW)
5902 if test "$wxUSE_LOGDIALOG" = "yes"; then
5903 AC_DEFINE(wxUSE_LOG_DIALOG)
5906 dnl the keyboard sample requires wxUSE_LOG
5907 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS keyboard"
5910 if test "$wxUSE_LONGLONG" = "yes"; then
5911 AC_DEFINE(wxUSE_LONGLONG)
5914 if test "$wxUSE_GEOMETRY" = "yes"; then
5915 AC_DEFINE(wxUSE_GEOMETRY)
5918 if test "$wxUSE_BASE64" = "yes"; then
5919 AC_DEFINE(wxUSE_BASE64)
5922 if test "$wxUSE_STREAMS" = "yes" ; then
5923 AC_DEFINE(wxUSE_STREAMS)
5926 if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then
5927 AC_DEFINE(wxUSE_PRINTF_POS_PARAMS)
5930 if test "$wxUSE_OBJC_UNIQUIFYING" = "yes"; then
5931 AC_DEFINE(wxUSE_OBJC_UNIQUIFYING)
5934 dnl ---------------------------------------------------------------------------
5935 dnl console event loop stuff
5936 dnl ---------------------------------------------------------------------------
5938 if test "$wxUSE_CONSOLE_EVENTLOOP" = "yes"; then
5939 AC_DEFINE(wxUSE_CONSOLE_EVENTLOOP)
5941 if test "$wxUSE_UNIX" = "yes"; then
5942 if test "$wxUSE_SELECT_DISPATCHER" = "yes"; then
5943 AC_DEFINE(wxUSE_SELECT_DISPATCHER)
5946 if test "$wxUSE_EPOLL_DISPATCHER" = "yes"; then
5947 AC_CHECK_HEADERS(sys/epoll.h,,, [AC_INCLUDES_DEFAULT()])
5948 if test "$ac_cv_header_sys_epoll_h" = "yes"; then
5949 AC_DEFINE(wxUSE_EPOLL_DISPATCHER)
5951 AC_MSG_WARN([sys/epoll.h not available, wxEpollDispatcher disabled])
5957 dnl ---------------------------------------------------------------------------
5958 dnl time/date functions
5959 dnl ---------------------------------------------------------------------------
5961 dnl check for gettimeofday (SVr4, BSD 4.3) and ftime (V7, BSD 4.3) for the
5962 dnl function to be used for high resolution timers
5963 AC_CHECK_FUNCS(gettimeofday ftime, break)
5965 if test "$ac_cv_func_gettimeofday" = "yes"; then
5966 AC_CACHE_CHECK([whether gettimeofday takes two arguments],
5967 wx_cv_func_gettimeofday_has_2_args,
5969 dnl on some _really_ old systems it takes only 1 argument
5972 #include <sys/time.h>
5977 gettimeofday(&tv, NULL);
5979 wx_cv_func_gettimeofday_has_2_args=yes,
5982 #include <sys/time.h>
5989 wx_cv_func_gettimeofday_has_2_args=no,
5991 AC_MSG_WARN([failed to determine number of gettimeofday() arguments])
5992 wx_cv_func_gettimeofday_has_2_args=unknown
5998 if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then
5999 AC_DEFINE(WX_GETTIMEOFDAY_NO_TZ)
6003 if test "$wxUSE_DATETIME" = "yes"; then
6004 dnl check for timezone variable
6005 dnl doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead
6006 AC_CACHE_CHECK(for timezone variable in <time.h>,
6019 wx_cv_var_timezone=timezone
6031 wx_cv_var_timezone=_timezone
6043 wx_cv_var_timezone=__timezone
6046 if test "$USE_DOS" = 0 ; then
6047 AC_MSG_WARN(no timezone variable, will use tm_gmtoff instead)
6059 dnl as we want $wx_cv_var_timezone to be expanded, use AC_DEFINE_UNQUOTED
6060 if test "x$wx_cv_var_timezone" != x ; then
6061 AC_DEFINE_UNQUOTED(WX_TIMEZONE, $wx_cv_var_timezone)
6064 dnl check for localtime (it's POSIX, but the check can do no harm...)
6065 AC_CHECK_FUNCS(localtime)
6067 if test "$ac_cv_func_localtime" = "yes"; then
6068 AC_CACHE_CHECK(for tm_gmtoff in struct tm,
6069 wx_cv_struct_tm_has_gmtoff,
6080 wx_cv_struct_tm_has_gmtoff=yes
6082 wx_cv_struct_tm_has_gmtoff=no
6087 if test "$wx_cv_struct_tm_has_gmtoff" = "yes"; then
6088 AC_DEFINE(WX_GMTOFF_IN_TM)
6091 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest"
6094 dnl ------------------------------------------------------------------------
6096 dnl ------------------------------------------------------------------------
6098 dnl VZ: the GUI hooks wxSocket needs are not implemented yet in some toolkits
6099 if test "$wxUSE_SOCKETS" = "yes"; then
6100 if test "$wxUSE_MGL" = 1; then
6101 AC_MSG_WARN([wxSocket not yet supported under MGL... disabled])
6106 if test "$wxUSE_SOCKETS" = "yes"; then
6107 dnl under MSW we always have sockets
6108 if test "$TOOLKIT" != "MSW"; then
6109 dnl under Solaris and OS/2, socket functions live in -lsocket
6110 AC_CHECK_FUNC(socket,,
6112 AC_CHECK_LIB(socket, socket,
6113 if test "$INET_LINK" != " -lsocket"; then
6114 INET_LINK="$INET_LINK -lsocket"
6117 AC_MSG_WARN([socket library not found - sockets will be disabled])
6126 if test "$wxUSE_SOCKETS" = "yes" ; then
6127 dnl this test may be appropriate if building under cygwin
6128 dnl right now I'm assuming it also uses the winsock stuff
6129 dnl like mingw does.. -- RL
6130 if test "$TOOLKIT" != "MSW"; then
6131 dnl determine the type of third argument for getsockname
6132 dnl This test needs to be done in C++ mode since gsocket.cpp now
6133 dnl is C++ code and pointer cast that are possible even without
6134 dnl warning in C still fail in C++.
6135 AC_CACHE_CHECK([what is the type of the third argument of getsockname],
6136 wx_cv_type_getsockname3,
6141 #include <sys/types.h>
6142 #include <sys/socket.h>
6146 getsockname(0, 0, &len);
6148 wx_cv_type_getsockname3=socklen_t,
6150 dnl the compiler will compile the version with size_t
6151 dnl even if the real type of the last parameter is int
6152 dnl but it should give at least a warning about
6153 dnl converting between incompatible pointer types, so
6154 dnl try to use it to get the correct behaviour at
6155 dnl least with gcc (otherwise we'd always use size_t)
6156 CFLAGS_OLD="$CFLAGS"
6157 if test "$GCC" = yes ; then
6158 CFLAGS="-Werror $CFLAGS"
6163 #include <sys/types.h>
6164 #include <sys/socket.h>
6168 getsockname(0, 0, &len);
6170 wx_cv_type_getsockname3=size_t,
6173 #include <sys/types.h>
6174 #include <sys/socket.h>
6178 getsockname(0, 0, &len);
6180 wx_cv_type_getsockname3=int,
6181 wx_cv_type_getsockname3=unknown
6185 CFLAGS="$CFLAGS_OLD"
6191 if test "$wx_cv_type_getsockname3" = "unknown"; then
6193 AC_MSG_WARN([Couldn't find socklen_t synonym for this system])
6195 AC_DEFINE_UNQUOTED(WX_SOCKLEN_T, $wx_cv_type_getsockname3)
6197 dnl Do this again for getsockopt as it may be different
6198 AC_CACHE_CHECK([what is the type of the fifth argument of getsockopt],
6199 wx_cv_type_getsockopt5,
6201 dnl Note that the rules for compatibility of pointers
6202 dnl are somewhat different between C and C++, so code
6203 dnl that fails in C++ may not even give a warning about
6204 dnl converting between incompatible pointer types in C.
6205 dnl So this test needs to be done in C++ mode.
6209 #include <sys/types.h>
6210 #include <sys/socket.h>
6214 getsockopt(0, 0, 0, 0, &len);
6216 wx_cv_type_getsockopt5=socklen_t,
6220 #include <sys/types.h>
6221 #include <sys/socket.h>
6225 getsockopt(0, 0, 0, 0, &len);
6227 wx_cv_type_getsockopt5=size_t,
6230 #include <sys/types.h>
6231 #include <sys/socket.h>
6235 getsockopt(0, 0, 0, 0, &len);
6237 wx_cv_type_getsockopt5=int,
6238 wx_cv_type_getsockopt5=unknown
6246 if test "$wx_cv_type_getsockopt5" = "unknown"; then
6248 AC_MSG_WARN([Couldn't find socklen_t synonym for this system])
6250 AC_DEFINE_UNQUOTED(SOCKOPTLEN_T, $wx_cv_type_getsockopt5)
6255 if test "$wxUSE_SOCKETS" = "yes" ; then
6256 if test "$wxUSE_IPV6" = "yes"; then
6258 [whether we have sockaddr_in6],
6259 [wx_cv_type_sockaddr_in6],
6263 #include <sys/types.h>
6264 #include <sys/socket.h>
6265 #include <netinet/in.h>
6268 struct sockaddr_in6 sa6;
6270 wx_cv_type_sockaddr_in6=yes,
6271 wx_cv_type_sockaddr_in6=no
6276 if test "$wx_cv_type_sockaddr_in6"="yes"; then
6277 AC_DEFINE(wxUSE_IPV6)
6279 AC_MSG_WARN([IPv6 support not available... disabled])
6283 AC_DEFINE(wxUSE_SOCKETS)
6284 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets"
6287 if test "$wxUSE_PROTOCOL" = "yes"; then
6288 if test "$wxUSE_SOCKETS" != "yes"; then
6289 AC_MSG_WARN(Protocol classes require sockets... disabled)
6294 if test "$wxUSE_PROTOCOL" = "yes"; then
6295 AC_DEFINE(wxUSE_PROTOCOL)
6297 if test "$wxUSE_PROTOCOL_HTTP" = "yes"; then
6298 AC_DEFINE(wxUSE_PROTOCOL_HTTP)
6300 if test "$wxUSE_PROTOCOL_FTP" = "yes"; then
6301 AC_DEFINE(wxUSE_PROTOCOL_FTP)
6303 if test "$wxUSE_PROTOCOL_FILE" = "yes"; then
6304 AC_DEFINE(wxUSE_PROTOCOL_FILE)
6307 if test "$wxUSE_FS_INET" = "yes"; then
6308 AC_MSG_WARN([HTTP filesystem require protocol classes... disabled])
6313 if test "$wxUSE_URL" = "yes"; then
6314 if test "$wxUSE_PROTOCOL" != "yes"; then
6315 AC_MSG_WARN(wxURL class requires wxProtocol... disabled)
6318 if test "$wxUSE_URL" = "yes"; then
6319 AC_DEFINE(wxUSE_URL)
6323 if test "$wxUSE_VARIANT" = "yes"; then
6324 AC_DEFINE(wxUSE_VARIANT)
6327 if test "$wxUSE_FS_INET" = "yes"; then
6328 AC_DEFINE(wxUSE_FS_INET)
6331 dnl ---------------------------------------------------------------------------
6332 dnl Joystick support
6333 dnl ---------------------------------------------------------------------------
6335 if test "$wxUSE_GUI" = "yes" -a "$wxUSE_JOYSTICK" = "yes"; then
6338 dnl under MSW we always have joystick support
6339 if test "$TOOLKIT" = "MSW"; then
6342 dnl mac only available on darwin
6343 elif test "$TOOLKIT" = "OSX" -o "$TOOLKIT" = "COCOA"; then
6344 if test "$USE_DARWIN" = 1; then
6345 dnl check for a bug in the headers, some have bad setEventCallout
6346 AC_MSG_CHECKING([headers have declarations needed for joystick support])
6348 AC_TRY_COMPILE( [ #include <IOKit/hid/IOHIDLib.h> ],
6349 [ IOHIDQueueInterface *qi = NULL;
6350 IOHIDCallbackFunction cb = NULL;
6351 qi->setEventCallout(NULL, cb, NULL, NULL); ],
6352 [ wxUSE_JOYSTICK=yes ]
6355 AC_MSG_RESULT($wxUSE_JOYSTICK)
6358 dnl joystick support is only for Linux 2.1.x or greater
6360 dnl wxJoystick not supported by wxMGL at all
6361 if test "$wxUSE_MGL" != 1; then
6362 dnl notice the dummy includes argument: without it, AC_CHECK_HEADER
6363 dnl checks only whether the header can be preprocessed, not that it
6364 dnl can be compiled and in Linux 2.6.16 joystick.h is present but
6365 dnl can't be compiled because of an error and with the default
6366 dnl AC_CHECK_HEADER semantics we'd still detect it in this case and
6367 dnl build would fail later
6368 AC_CHECK_HEADERS([linux/joystick.h], [wxUSE_JOYSTICK=yes],, [AC_INCLUDES_DEFAULT()])
6372 if test "$wxUSE_JOYSTICK" = "yes"; then
6373 AC_DEFINE(wxUSE_JOYSTICK)
6374 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest"
6376 AC_MSG_WARN(Joystick not supported by this system... disabled)
6381 dnl ---------------------------------------------------------------------------
6383 dnl ---------------------------------------------------------------------------
6385 if test "$wxUSE_FONTENUM" = "yes" ; then
6386 AC_DEFINE(wxUSE_FONTENUM)
6389 if test "$wxUSE_FONTMAP" = "yes" ; then
6390 AC_DEFINE(wxUSE_FONTMAP)
6393 if test "$wxUSE_UNICODE" = "yes" ; then
6394 AC_DEFINE(wxUSE_UNICODE)
6396 if test "$USE_WIN32" != 1; then
6397 wxUSE_UNICODE_MSLU=no
6400 if test "$USE_WIN32" = 1 -a "$wxUSE_UNICODE_MSLU" = "yes"; then
6401 AC_CHECK_LIB(unicows,main,
6403 AC_DEFINE(wxUSE_UNICODE_MSLU)
6406 AC_MSG_WARN([Compiler doesn't support MSLU (libunicows.a), disabled.
6407 Applications will only run on Windows NT/2000/XP!])
6408 wxUSE_UNICODE_MSLU=no
6413 if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_UTF8" = "yes"; then
6414 AC_DEFINE(wxUSE_UNICODE_UTF8)
6416 if test "$wxUSE_UNICODE_UTF8_LOCALE" = "yes"; then
6417 AC_DEFINE(wxUSE_UTF8_LOCALE_ONLY)
6421 dnl ---------------------------------------------------------------------------
6422 dnl big GUI components: MDI, doc/view, printing, help, ...
6423 dnl ---------------------------------------------------------------------------
6425 if test "$wxUSE_CONSTRAINTS" = "yes"; then
6426 AC_DEFINE(wxUSE_CONSTRAINTS)
6427 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS layout"
6430 if test "$wxUSE_MDI" = "yes"; then
6431 AC_DEFINE(wxUSE_MDI)
6433 if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then
6434 AC_DEFINE(wxUSE_MDI_ARCHITECTURE)
6435 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mdi"
6439 if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = "yes" ; then
6440 AC_DEFINE(wxUSE_DOC_VIEW_ARCHITECTURE)
6441 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docview"
6444 if test "$wxUSE_HELP" = "yes"; then
6445 AC_DEFINE(wxUSE_HELP)
6446 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help"
6448 if test "$wxUSE_MSW" = 1; then
6449 if test "$wxUSE_MS_HTML_HELP" = "yes"; then
6450 AC_DEFINE(wxUSE_MS_HTML_HELP)
6454 if test "$wxUSE_WXHTML_HELP" = "yes"; then
6455 if test "$wxUSE_HTML" = "yes"; then
6456 AC_DEFINE(wxUSE_WXHTML_HELP)
6458 AC_MSG_WARN(Cannot use wxHTML-based help without wxHTML so it won't be compiled)
6459 wxUSE_WXHTML_HELP=no
6464 if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
6465 AC_DEFINE(wxUSE_PRINTING_ARCHITECTURE)
6466 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS printing"
6469 if test "$wxUSE_POSTSCRIPT" = "yes" ; then
6470 AC_DEFINE(wxUSE_POSTSCRIPT)
6473 AC_DEFINE(wxUSE_AFM_FOR_POSTSCRIPT)
6475 if test "$wxUSE_SVG" = "yes"; then
6476 AC_DEFINE(wxUSE_SVG)
6479 dnl ---------------------------------------------------------------------------
6480 dnl wxMetafile availability
6481 dnl ---------------------------------------------------------------------------
6483 if test "$wxUSE_METAFILE" = "yes"; then
6484 if test "$wxUSE_MSW" != 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_PM" != 1; then
6485 AC_MSG_WARN([wxMetafile is not available on this system... disabled])
6490 dnl ---------------------------------------------------------------------------
6491 dnl IPC: IPC, Drag'n'Drop, Clipboard, ...
6492 dnl ---------------------------------------------------------------------------
6494 dnl check for ole headers and disable a few features requiring it if not
6495 dnl present (earlier versions of mingw32 don't have ole2.h)
6496 if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
6497 -o "$wxUSE_CLIPBOARD" = "yes" \
6498 -o "$wxUSE_OLE" = "yes" \
6499 -o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
6500 AC_CHECK_HEADER(ole2.h,,, [ ])
6502 if test "$ac_cv_header_ole2_h" = "yes" ; then
6503 if test "$GCC" = yes ; then
6504 AC_MSG_CHECKING([if g++ requires -fvtable-thunks])
6505 AC_TRY_COMPILE([#include <windows.h>
6508 [AC_MSG_RESULT(no)],
6510 WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fvtable-thunks"])
6511 LIBS=" -lrpcrt4 -loleaut32 -lole32 -luuid$LIBS"
6512 if test "$wxUSE_OLE" = "yes" ; then
6513 AC_DEFINE(wxUSE_OLE)
6514 AC_DEFINE(wxUSE_OLE_AUTOMATION)
6515 AC_DEFINE(wxUSE_ACTIVEX)
6516 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto"
6520 dnl for OLE clipboard and dnd
6521 if test "$wxUSE_DATAOBJ" = "yes" ; then
6522 AC_DEFINE(wxUSE_DATAOBJ)
6525 AC_MSG_WARN([Some features disabled because OLE headers not found])
6528 wxUSE_DRAG_AND_DROP=no
6533 if test "$wxUSE_METAFILE" = "yes"; then
6534 AC_DEFINE(wxUSE_METAFILE)
6536 dnl this one should probably be made separately configurable
6537 AC_DEFINE(wxUSE_ENH_METAFILE)
6541 if test "$wxUSE_IPC" = "yes"; then
6542 if test "$wxUSE_SOCKETS" != "yes" -a "$USE_WIN32" != 1; then
6543 AC_MSG_WARN(wxWidgets IPC classes require sockets... disabled)
6547 if test "$wxUSE_IPC" = "yes"; then
6548 AC_DEFINE(wxUSE_IPC)
6549 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ipc"
6553 if test "$wxUSE_DATAOBJ" = "yes"; then
6554 if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then
6555 AC_MSG_WARN([wxDataObject not yet supported under $TOOLKIT... disabled])
6558 AC_DEFINE(wxUSE_DATAOBJ)
6561 AC_MSG_WARN([Clipboard and drag-and-drop require wxDataObject -- disabled])
6563 wxUSE_DRAG_AND_DROP=no
6566 if test "$wxUSE_CLIPBOARD" = "yes"; then
6567 if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then
6568 AC_MSG_WARN([Clipboard not yet supported under $TOOLKIT... disabled])
6572 if test "$wxUSE_CLIPBOARD" = "yes"; then
6573 AC_DEFINE(wxUSE_CLIPBOARD)
6577 if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
6578 if test "$wxUSE_GTK" = 1; then
6579 if test "$WXGTK12" != 1; then
6580 AC_MSG_WARN([Drag and drop is only supported under GTK+ 1.2... disabled])
6581 wxUSE_DRAG_AND_DROP=no
6585 if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1 -o "$wxUSE_MGL" = 1 -o \
6586 "$wxUSE_DFB" = 1; then
6587 AC_MSG_WARN([Drag and drop not yet supported under $TOOLKIT... disabled])
6588 wxUSE_DRAG_AND_DROP=no
6591 if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
6592 AC_DEFINE(wxUSE_DRAG_AND_DROP)
6597 if test "$wxUSE_DRAG_AND_DROP" = "yes" -o "$wxUSE_CLIPBOARD" = "yes"; then
6598 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd"
6601 if test "$wxUSE_CLIPBOARD" = "yes"; then
6602 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS clipboard"
6605 if test "$wxUSE_SPLINES" = "yes" ; then
6606 AC_DEFINE(wxUSE_SPLINES)
6609 if test "$wxUSE_MOUSEWHEEL" = "yes" ; then
6610 AC_DEFINE(wxUSE_MOUSEWHEEL)
6613 dnl ---------------------------------------------------------------------------
6615 dnl ---------------------------------------------------------------------------
6618 if test "$wxUSE_CONTROLS" = "yes"; then
6622 if test "$wxUSE_ACCEL" = "yes"; then
6623 AC_DEFINE(wxUSE_ACCEL)
6627 if test "$wxUSE_ANIMATIONCTRL" = "yes"; then
6628 AC_DEFINE(wxUSE_ANIMATIONCTRL)
6630 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS animate"
6633 if test "$wxUSE_BUTTON" = "yes"; then
6634 AC_DEFINE(wxUSE_BUTTON)
6638 if test "$wxUSE_BMPBUTTON" = "yes"; then
6639 AC_DEFINE(wxUSE_BMPBUTTON)
6643 if test "$wxUSE_CALCTRL" = "yes"; then
6644 AC_DEFINE(wxUSE_CALENDARCTRL)
6646 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS calendar"
6649 if test "$wxUSE_CARET" = "yes"; then
6650 AC_DEFINE(wxUSE_CARET)
6652 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret"
6655 if test "$wxUSE_COLLPANE" = "yes"; then
6656 AC_DEFINE(wxUSE_COLLPANE)
6658 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS collpane"
6661 if test "$wxUSE_COMBOBOX" = "yes"; then
6662 AC_DEFINE(wxUSE_COMBOBOX)
6666 if test "$wxUSE_COMBOCTRL" = "yes"; then
6667 AC_DEFINE(wxUSE_COMBOCTRL)
6671 if test "$wxUSE_CHOICE" = "yes"; then
6672 AC_DEFINE(wxUSE_CHOICE)
6676 if test "$wxUSE_CHOICEBOOK" = "yes"; then
6677 AC_DEFINE(wxUSE_CHOICEBOOK)
6681 if test "$wxUSE_CHECKBOX" = "yes"; then
6682 AC_DEFINE(wxUSE_CHECKBOX)
6686 if test "$wxUSE_CHECKLST" = "yes"; then
6687 AC_DEFINE(wxUSE_CHECKLISTBOX)
6691 if test "$wxUSE_COLOURPICKERCTRL" = "yes"; then
6692 AC_DEFINE(wxUSE_COLOURPICKERCTRL)
6696 if test "$wxUSE_DATEPICKCTRL" = "yes"; then
6697 AC_DEFINE(wxUSE_DATEPICKCTRL)
6701 if test "$wxUSE_DIRPICKERCTRL" = "yes"; then
6702 AC_DEFINE(wxUSE_DIRPICKERCTRL)
6706 if test "$wxUSE_FILECTRL" = "yes"; then
6707 AC_DEFINE(wxUSE_FILECTRL)
6711 if test "$wxUSE_FILEPICKERCTRL" = "yes"; then
6712 AC_DEFINE(wxUSE_FILEPICKERCTRL)
6716 if test "$wxUSE_FONTPICKERCTRL" = "yes"; then
6717 AC_DEFINE(wxUSE_FONTPICKERCTRL)
6721 if test "$wxUSE_DISPLAY" = "yes"; then
6722 if test "$wxUSE_DFB" = 1 -o "$wxUSE_MGL" = 1; then
6723 AC_MSG_WARN([wxDisplay not yet supported under $TOOLKIT... disabled])
6726 AC_DEFINE(wxUSE_DISPLAY)
6727 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS display"
6731 if test "$wxUSE_DETECT_SM" = "yes"; then
6732 AC_DEFINE(wxUSE_DETECT_SM)
6735 if test "$wxUSE_GAUGE" = "yes"; then
6736 AC_DEFINE(wxUSE_GAUGE)
6740 if test "$wxUSE_GRID" = "yes"; then
6741 AC_DEFINE(wxUSE_GRID)
6743 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS grid"
6746 if test "$wxUSE_HEADERCTRL" = "yes"; then
6747 AC_DEFINE(wxUSE_HEADERCTRL)
6751 if test "$wxUSE_HYPERLINKCTRL" = "yes"; then
6752 AC_DEFINE(wxUSE_HYPERLINKCTRL)
6756 if test "$wxUSE_BITMAPCOMBOBOX" = "yes"; then
6757 AC_DEFINE(wxUSE_BITMAPCOMBOBOX)
6761 if test "$wxUSE_DATAVIEWCTRL" = "yes"; then
6762 AC_DEFINE(wxUSE_DATAVIEWCTRL)
6764 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dataview"
6767 if test "$wxUSE_IMAGLIST" = "yes"; then
6768 AC_DEFINE(wxUSE_IMAGLIST)
6771 if test "$wxUSE_INFOBAR" = "yes"; then
6772 AC_DEFINE(wxUSE_INFOBAR)
6775 if test "$wxUSE_LISTBOOK" = "yes"; then
6776 AC_DEFINE(wxUSE_LISTBOOK)
6780 if test "$wxUSE_LISTBOX" = "yes"; then
6781 AC_DEFINE(wxUSE_LISTBOX)
6785 if test "$wxUSE_LISTCTRL" = "yes"; then
6786 if test "$wxUSE_IMAGLIST" = "yes"; then
6787 AC_DEFINE(wxUSE_LISTCTRL)
6789 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listctrl"
6791 AC_MSG_WARN([wxListCtrl requires wxImageList and won't be compiled without it])
6795 if test "$wxUSE_EDITABLELISTBOX" = "yes"; then
6796 AC_DEFINE(wxUSE_EDITABLELISTBOX)
6800 if test "$wxUSE_NOTEBOOK" = "yes"; then
6801 AC_DEFINE(wxUSE_NOTEBOOK)
6803 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
6806 if test "$wxUSE_NOTIFICATION_MESSAGE" = "yes"; then
6807 AC_DEFINE(wxUSE_NOTIFICATION_MESSAGE)
6810 if test "$wxUSE_ODCOMBOBOX" = "yes"; then
6811 AC_DEFINE(wxUSE_ODCOMBOBOX)
6813 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS combo"
6816 if test "$wxUSE_RADIOBOX" = "yes"; then
6817 AC_DEFINE(wxUSE_RADIOBOX)
6821 if test "$wxUSE_RADIOBTN" = "yes"; then
6822 AC_DEFINE(wxUSE_RADIOBTN)
6826 if test "$wxUSE_REARRANGECTRL" = "yes"; then
6827 AC_DEFINE(wxUSE_REARRANGECTRL)
6830 if test "$wxUSE_SASH" = "yes"; then
6831 AC_DEFINE(wxUSE_SASH)
6832 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sashtest"
6835 if test "$wxUSE_SCROLLBAR" = "yes"; then
6836 AC_DEFINE(wxUSE_SCROLLBAR)
6838 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS scroll"
6841 if test "$wxUSE_SEARCHCTRL" = "yes"; then
6842 AC_DEFINE(wxUSE_SEARCHCTRL)
6846 if test "$wxUSE_SLIDER" = "yes"; then
6847 AC_DEFINE(wxUSE_SLIDER)
6851 if test "$wxUSE_SPINBTN" = "yes"; then
6852 AC_DEFINE(wxUSE_SPINBTN)
6856 if test "$wxUSE_SPINCTRL" = "yes"; then
6857 AC_DEFINE(wxUSE_SPINCTRL)
6861 if test "$wxUSE_SPLITTER" = "yes"; then
6862 AC_DEFINE(wxUSE_SPLITTER)
6863 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splitter"
6866 if test "$wxUSE_STATBMP" = "yes"; then
6867 AC_DEFINE(wxUSE_STATBMP)
6871 if test "$wxUSE_STATBOX" = "yes"; then
6872 AC_DEFINE(wxUSE_STATBOX)
6876 if test "$wxUSE_STATTEXT" = "yes"; then
6877 AC_DEFINE(wxUSE_STATTEXT)
6881 if test "$wxUSE_STATLINE" = "yes"; then
6882 AC_DEFINE(wxUSE_STATLINE)
6886 if test "$wxUSE_STATUSBAR" = "yes"; then
6887 dnl this will get undefined in wx/chkconf.h if it's not supported
6888 AC_DEFINE(wxUSE_NATIVE_STATUSBAR)
6889 AC_DEFINE(wxUSE_STATUSBAR)
6892 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar"
6895 if test "$wxUSE_TEXTCTRL" = "yes"; then
6896 AC_DEFINE(wxUSE_TEXTCTRL)
6898 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS text"
6900 dnl we don't have special switches to disable wxUSE_RICHEDIT[2], it doesn't
6901 dnl seem useful to allow disabling them
6902 AC_DEFINE(wxUSE_RICHEDIT)
6903 AC_DEFINE(wxUSE_RICHEDIT2)
6906 if test "$wxUSE_TOGGLEBTN" = "yes"; then
6907 if test "$wxUSE_OLD_COCOA" = 1 ; then
6908 AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled])
6912 if test "$wxUSE_TOGGLEBTN" = "yes"; then
6913 AC_DEFINE(wxUSE_TOGGLEBTN)
6918 if test "$wxUSE_TOOLBAR" = "yes"; then
6919 AC_DEFINE(wxUSE_TOOLBAR)
6922 if test "$wxUSE_UNIVERSAL" = "yes"; then
6923 wxUSE_TOOLBAR_NATIVE="no"
6925 wxUSE_TOOLBAR_NATIVE="yes"
6926 AC_DEFINE(wxUSE_TOOLBAR_NATIVE)
6929 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS toolbar"
6932 if test "$wxUSE_TOOLTIPS" = "yes"; then
6933 if test "$wxUSE_MOTIF" = 1; then
6934 AC_MSG_WARN([wxTooltip not supported yet under Motif... disabled])
6936 if test "$wxUSE_UNIVERSAL" = "yes"; then
6937 AC_MSG_WARN([wxTooltip not supported yet in wxUniversal... disabled])
6939 AC_DEFINE(wxUSE_TOOLTIPS)
6944 if test "$wxUSE_TREEBOOK" = "yes"; then
6945 AC_DEFINE(wxUSE_TREEBOOK)
6949 if test "$wxUSE_TOOLBOOK" = "yes"; then
6950 AC_DEFINE(wxUSE_TOOLBOOK)
6954 if test "$wxUSE_TREECTRL" = "yes"; then
6955 if test "$wxUSE_IMAGLIST" = "yes"; then
6956 AC_DEFINE(wxUSE_TREECTRL)
6958 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treectrl"
6960 AC_MSG_WARN([wxTreeCtrl requires wxImageList and won't be compiled without it])
6964 if test "$wxUSE_POPUPWIN" = "yes"; then
6965 if test "$wxUSE_OLD_COCOA" = 1 ; then
6966 AC_MSG_WARN([Popup window not yet supported under Mac OS X... disabled])
6968 if test "$wxUSE_PM" = 1; then
6969 AC_MSG_WARN([wxPopupWindow not yet supported under PM... disabled])
6971 AC_DEFINE(wxUSE_POPUPWIN)
6972 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup"
6979 if test "$wxUSE_DIALUP_MANAGER" = "yes"; then
6980 if test "$wxUSE_MAC" = 1 -o "$wxUSE_OLD_COCOA" = 1 -o "$wxUSE_MGL" = 1; then
6981 AC_MSG_WARN([Dialup manager not supported on this platform... disabled])
6983 AC_DEFINE(wxUSE_DIALUP_MANAGER)
6984 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dialup"
6988 if test "$wxUSE_TIPWINDOW" = "yes"; then
6989 if test "$wxUSE_PM" = 1; then
6990 AC_MSG_WARN([wxTipWindow not yet supported under PM... disabled])
6992 AC_DEFINE(wxUSE_TIPWINDOW)
6996 if test "$USES_CONTROLS" = 1; then
6997 AC_DEFINE(wxUSE_CONTROLS)
7000 dnl ---------------------------------------------------------------------------
7002 dnl ---------------------------------------------------------------------------
7004 dnl please keep the settings below in alphabetical order
7005 if test "$wxUSE_ACCESSIBILITY" = "yes"; then
7006 AC_DEFINE(wxUSE_ACCESSIBILITY)
7007 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS access"
7010 if test "$wxUSE_DRAGIMAGE" = "yes"; then
7011 AC_DEFINE(wxUSE_DRAGIMAGE)
7012 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dragimag"
7015 if test "$wxUSE_EXCEPTIONS" = "yes"; then
7016 if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
7017 AC_MSG_WARN([--enable-exceptions can't be used with --enable-no_exceptions])
7019 AC_DEFINE(wxUSE_EXCEPTIONS)
7020 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS except"
7025 if test "$wxUSE_HTML" = "yes"; then
7026 AC_DEFINE(wxUSE_HTML)
7028 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox"
7030 if test "$wxUSE_WEBKIT" = "yes"; then
7031 if test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then
7032 old_CPPFLAGS="$CPPFLAGS"
7033 CPPFLAGS="-x objective-c++ $CPPFLAGS"
7034 AC_CHECK_HEADER([WebKit/HIWebView.h],
7036 AC_DEFINE(wxUSE_WEBKIT)
7037 WEBKIT_LINK="-framework WebKit"
7040 AC_MSG_WARN([WebKit headers not found; disabling wxWebKit])
7044 #include <Carbon/Carbon.h>
7045 #include <WebKit/WebKit.h>
7047 CPPFLAGS="$old_CPPFLAGS"
7048 elif test "$wxUSE_OLD_COCOA" = 1; then
7049 AC_DEFINE(wxUSE_WEBKIT)
7053 if test "$wxUSE_WEBKIT" = "yes"; then
7054 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl"
7059 if test "$wxUSE_XRC" = "yes"; then
7060 if test "$wxUSE_XML" != "yes"; then
7061 AC_MSG_WARN([XML library not built, XRC resources disabled])
7064 AC_DEFINE(wxUSE_XRC)
7066 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS xrc"
7071 if test "$wxUSE_AUI" = "yes"; then
7072 AC_DEFINE(wxUSE_AUI)
7074 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS aui"
7078 if test "$wxUSE_PROPGRID" = "yes"; then
7079 AC_DEFINE(wxUSE_PROPGRID)
7081 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS propgrid"
7085 if test "$wxUSE_RIBBON" = "yes"; then
7086 AC_DEFINE(wxUSE_RIBBON)
7088 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ribbon"
7092 if test "$wxUSE_STC" = "yes"; then
7093 AC_DEFINE(wxUSE_STC)
7095 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS stc"
7097 dnl python is used to update src/stc.h (see build/bakefiles/scintilla.bkl)
7098 AC_PATH_PROG(PYTHON, python)
7099 if test "x$PYTHON" = "x"; then
7102 AC_SUBST(COND_PYTHON)
7105 if test "$wxUSE_MENUS" = "yes"; then
7106 AC_DEFINE(wxUSE_MENUS)
7107 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS menu"
7110 if test "$wxUSE_METAFILE" = "yes"; then
7111 AC_DEFINE(wxUSE_METAFILE)
7114 if test "$wxUSE_MIMETYPE" = "yes"; then
7115 AC_DEFINE(wxUSE_MIMETYPE)
7118 if test "$wxUSE_MINIFRAME" = "yes"; then
7119 AC_DEFINE(wxUSE_MINIFRAME)
7122 if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then
7123 AC_DEFINE(wxUSE_SYSTEM_OPTIONS)
7126 if test "$wxUSE_TASKBARICON" = "yes"; then
7127 AC_DEFINE(wxUSE_TASKBARICON)
7128 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS taskbar"
7132 if test "$wxUSE_VALIDATORS" = "yes"; then
7133 AC_DEFINE(wxUSE_VALIDATORS)
7134 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate"
7137 if test "$wxUSE_PALETTE" = "yes" ; then
7138 if test "$wxUSE_DFB" = 1; then
7139 AC_MSG_WARN([wxPalette not yet supported under DFB... disabled])
7142 AC_DEFINE(wxUSE_PALETTE)
7146 if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_MSLU" = "yes" ; then
7147 dnl Must be done this late because -lunicows must be before all the other libs
7148 LIBS=" -lunicows $LIBS"
7152 if test "$wxUSE_RICHTEXT" = "yes"; then
7153 AC_DEFINE(wxUSE_RICHTEXT)
7155 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS richtext"
7158 dnl ---------------------------------------------------------------------------
7160 dnl ---------------------------------------------------------------------------
7162 if test "$wxUSE_IMAGE" = "yes" ; then
7163 AC_DEFINE(wxUSE_IMAGE)
7165 if test "$wxUSE_GIF" = "yes" ; then
7166 AC_DEFINE(wxUSE_GIF)
7169 if test "$wxUSE_PCX" = "yes" ; then
7170 AC_DEFINE(wxUSE_PCX)
7173 if test "$wxUSE_TGA" = "yes" ; then
7174 AC_DEFINE(wxUSE_TGA)
7177 if test "$wxUSE_IFF" = "yes" ; then
7178 AC_DEFINE(wxUSE_IFF)
7181 if test "$wxUSE_PNM" = "yes" ; then
7182 AC_DEFINE(wxUSE_PNM)
7185 if test "$wxUSE_XPM" = "yes" ; then
7186 AC_DEFINE(wxUSE_XPM)
7189 if test "$wxUSE_ICO_CUR" = "yes" ; then
7190 AC_DEFINE(wxUSE_ICO_CUR)
7194 dnl ---------------------------------------------------------------------------
7196 dnl ---------------------------------------------------------------------------
7198 if test "$wxUSE_ABOUTDLG" = "yes"; then
7199 AC_DEFINE(wxUSE_ABOUTDLG)
7202 if test "$wxUSE_CHOICEDLG" = "yes"; then
7203 AC_DEFINE(wxUSE_CHOICEDLG)
7206 if test "$wxUSE_COLOURDLG" = "yes"; then
7207 AC_DEFINE(wxUSE_COLOURDLG)
7210 if test "$wxUSE_FILEDLG" = "yes"; then
7211 AC_DEFINE(wxUSE_FILEDLG)
7214 if test "$wxUSE_FINDREPLDLG" = "yes"; then
7215 AC_DEFINE(wxUSE_FINDREPLDLG)
7218 if test "$wxUSE_FONTDLG" = "yes"; then
7219 AC_DEFINE(wxUSE_FONTDLG)
7222 if test "$wxUSE_DIRDLG" = "yes"; then
7223 if test "$wxUSE_TREECTRL" != "yes"; then
7224 AC_MSG_WARN(wxDirDialog requires wxTreeCtrl so it won't be compiled without it)
7226 AC_DEFINE(wxUSE_DIRDLG)
7230 if test "$wxUSE_MSGDLG" = "yes"; then
7231 AC_DEFINE(wxUSE_MSGDLG)
7234 if test "$wxUSE_NUMBERDLG" = "yes"; then
7235 AC_DEFINE(wxUSE_NUMBERDLG)
7238 if test "$wxUSE_PROGRESSDLG" = "yes"; then
7239 AC_DEFINE(wxUSE_PROGRESSDLG)
7242 if test "$wxUSE_SPLASH" = "yes"; then
7243 AC_DEFINE(wxUSE_SPLASH)
7244 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splash"
7247 if test "$wxUSE_STARTUP_TIPS" = "yes"; then
7248 AC_DEFINE(wxUSE_STARTUP_TIPS)
7251 if test "$wxUSE_TEXTDLG" = "yes"; then
7252 AC_DEFINE(wxUSE_TEXTDLG)
7255 if test "$wxUSE_WIZARDDLG" = "yes"; then
7256 AC_DEFINE(wxUSE_WIZARDDLG)
7257 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wizard"
7260 dnl ---------------------------------------------------------------------------
7261 dnl options used under wxMSW and wxPM
7262 dnl ---------------------------------------------------------------------------
7264 if test "$wxUSE_MSW" = 1 -o "$wxUSE_PM" = 1; then
7265 if test "$wxUSE_OWNER_DRAWN" = "yes"; then
7266 AC_DEFINE(wxUSE_OWNER_DRAWN)
7270 dnl ---------------------------------------------------------------------------
7271 dnl wxMSW-only options
7272 dnl ---------------------------------------------------------------------------
7274 if test "$wxUSE_MSW" = 1 ; then
7276 if test "$wxUSE_DC_CACHEING" = "yes"; then
7277 AC_DEFINE(wxUSE_DC_CACHEING)
7280 if test "$wxUSE_DIB" = "yes"; then
7281 AC_DEFINE(wxUSE_WXDIB)
7284 if test "$wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW" = "yes"; then
7285 AC_DEFINE(wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
7288 if test "$wxUSE_UXTHEME" = "yes"; then
7289 AC_DEFINE(wxUSE_UXTHEME)
7295 dnl not quite MSW-only although mostly useful to disable this under MSW
7296 if test "$wxUSE_AUTOID_MANAGEMENT" = "yes"; then
7297 AC_DEFINE(wxUSE_AUTOID_MANAGEMENT)
7300 if test "$USE_WIN32" = 1 ; then
7301 if test "$wxUSE_INICONF" = "yes"; then
7302 AC_DEFINE(wxUSE_INICONF)
7305 if test "$wxUSE_REGKEY" = "yes"; then
7306 AC_DEFINE(wxUSE_REGKEY)
7311 dnl ---------------------------------------------------------------------------
7312 dnl wxGraphicsContext
7313 dnl ---------------------------------------------------------------------------
7315 dnl Under Mac we don't even provide --enable-graphics_ctx switch as we always
7316 dnl need it -- but because we don't have the option, wxUSE_GRAPHICS_CONTEXT is
7317 dnl not defined automatically and we need to do it ourselves
7318 if test "$wxUSE_MAC" = 1; then
7319 wxUSE_GRAPHICS_CONTEXT="yes"
7322 if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then
7324 if test "$wxUSE_MSW" = 1; then
7325 AC_CACHE_CHECK([if GDI+ is available], wx_cv_lib_gdiplus,
7327 dnl we need just the header, not the library, as we load the
7328 dnl GDI+ DLL dynamically anyhow during run-time
7331 [#include <gdiplus.h>],
7333 using namespace Gdiplus;
7335 wx_cv_lib_gdiplus=yes,
7336 wx_cv_lib_gdiplus=no
7341 if test "$wx_cv_lib_gdiplus" = "yes"; then
7344 elif test "$wxUSE_GTK" = 1; then
7345 PKG_CHECK_MODULES(CAIRO, cairo,
7346 [wx_has_graphics=1],
7347 [AC_MSG_WARN([Cairo library not found])]
7350 dnl assume it's ok, add more checks here if needed
7354 if test "$wx_has_graphics" = 1; then
7355 AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
7357 AC_MSG_WARN([wxGraphicsContext won't be available])
7361 dnl ---------------------------------------------------------------------------
7363 dnl ---------------------------------------------------------------------------
7367 if test "$wxUSE_MEDIACTRL" = "yes" -o "$wxUSE_MEDIACTRL" = "auto"; then
7370 dnl -----------------------------------------------------------------------
7372 dnl -----------------------------------------------------------------------
7373 if test "$wxUSE_GTK" = 1; then
7374 wxUSE_GSTREAMER="no"
7376 dnl -------------------------------------------------------------------
7377 dnl Test for at least 0.8 gstreamer module from pkg-config
7378 dnl Even totem doesn't accept 0.9 evidently.
7380 dnl So, we first check to see if 0.10 if available - if not we
7381 dnl try the older 0.8 version
7382 dnl -------------------------------------------------------------------
7384 GST_VERSION_MINOR=10
7385 GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR
7387 if test "$wxUSE_GSTREAMER8" = "no"; then
7388 PKG_CHECK_MODULES(GST,
7389 [gstreamer-$GST_VERSION gstreamer-plugins-base-$GST_VERSION gconf-2.0],
7391 wxUSE_GSTREAMER="yes"
7392 GST_LIBS="$GST_LIBS -lgstinterfaces-$GST_VERSION"
7395 AC_MSG_WARN([GStreamer 0.10 not available, falling back to 0.8])
7400 dnl check only for 0.8
7404 if test $GST_VERSION_MINOR = "8"; then
7405 GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR
7406 PKG_CHECK_MODULES(GST,
7407 [gstreamer-$GST_VERSION gstreamer-interfaces-$GST_VERSION gstreamer-gconf-$GST_VERSION],
7408 wxUSE_GSTREAMER="yes",
7410 AC_MSG_WARN([GStreamer 0.8/0.10 not available.])
7415 if test "$wxUSE_GSTREAMER" = "yes"; then
7416 CPPFLAGS="$GST_CFLAGS $CPPFLAGS"
7417 EXTRALIBS_MEDIA="$GST_LIBS"
7419 AC_DEFINE(wxUSE_GSTREAMER)
7425 if test $USE_MEDIA = 1; then
7426 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer"
7427 AC_DEFINE(wxUSE_MEDIACTRL)
7429 if test "$wxUSE_MEDIACTRL" = "yes"; then
7430 AC_MSG_ERROR([GStreamer not available])
7432 dnl was set to 'auto'
7433 AC_MSG_WARN([GStreamer not available... disabling wxMediaCtrl])
7438 dnl ---------------------------------------------------------------------------
7439 dnl get the string with OS info - used by wxGetOsDescription() on MacOS X
7440 dnl ---------------------------------------------------------------------------
7442 if test "$cross_compiling" != "no"; then
7443 dnl Use best guess from host as we can't use uname when cross compiling
7446 dnl attualy work out OS version
7447 OSINFO=`uname -s -r -m`
7448 OSINFO="\"$OSINFO\""
7451 AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO)
7453 dnl ---------------------------------------------------------------------------
7454 dnl define the variable containing the installation prefix (used in dcpsg.cpp)
7455 dnl ---------------------------------------------------------------------------
7457 if test "x$prefix" != "xNONE"; then
7460 wxPREFIX=$ac_default_prefix
7463 AC_DEFINE_UNQUOTED(wxINSTALL_PREFIX, "$wxPREFIX")
7466 dnl ---------------------------------------------------------------------------
7467 dnl define variables with all built libraries for wx-config
7468 dnl ---------------------------------------------------------------------------
7470 STD_BASE_LIBS="base"
7472 BUILT_WX_LIBS="base"
7473 ALL_WX_LIBS="xrc stc gl media qa html adv core xml net base"
7475 if test "$wxUSE_SOCKETS" = "yes" ; then
7476 STD_BASE_LIBS="net $STD_BASE_LIBS"
7477 BUILT_WX_LIBS="net $BUILT_WX_LIBS"
7479 if test "$wxUSE_XML" = "yes" ; then
7480 STD_BASE_LIBS="xml $STD_BASE_LIBS"
7481 BUILT_WX_LIBS="xml $BUILT_WX_LIBS"
7484 if test "$wxUSE_GUI" = "yes"; then
7485 STD_GUI_LIBS="adv core"
7486 BUILT_WX_LIBS="$STD_GUI_LIBS $BUILT_WX_LIBS"
7488 if test "$wxUSE_DEBUGREPORT" = "yes" ; then
7489 STD_GUI_LIBS="qa $STD_GUI_LIBS"
7490 BUILT_WX_LIBS="qa $BUILT_WX_LIBS"
7492 if test "$wxUSE_HTML" = "yes" ; then
7493 STD_GUI_LIBS="html $STD_GUI_LIBS"
7494 BUILT_WX_LIBS="html $BUILT_WX_LIBS"
7496 if test "$wxUSE_MEDIACTRL" = "yes" ; then
7497 BUILT_WX_LIBS="media $BUILT_WX_LIBS"
7499 if test "$wxUSE_OPENGL" = "yes" ; then
7500 BUILT_WX_LIBS="gl $BUILT_WX_LIBS"
7502 if test "$wxUSE_AUI" = "yes" ; then
7503 BUILT_WX_LIBS="aui $BUILT_WX_LIBS"
7505 if test "$wxUSE_PROPGRID" = "yes" ; then
7506 BUILT_WX_LIBS="propgrid $BUILT_WX_LIBS"
7508 if test "$wxUSE_RIBBON" = "yes" ; then
7509 BUILT_WX_LIBS="ribbon $BUILT_WX_LIBS"
7511 if test "$wxUSE_RICHTEXT" = "yes" ; then
7512 BUILT_WX_LIBS="richtext $BUILT_WX_LIBS"
7514 if test "$wxUSE_STC" = "yes" ; then
7515 BUILT_WX_LIBS="stc $BUILT_WX_LIBS"
7517 if test "$wxUSE_XRC" = "yes" ; then
7518 STD_GUI_LIBS="xrc $STD_GUI_LIBS"
7519 BUILT_WX_LIBS="xrc $BUILT_WX_LIBS"
7523 AC_SUBST(ALL_WX_LIBS)
7524 AC_SUBST(BUILT_WX_LIBS)
7525 AC_SUBST(STD_BASE_LIBS)
7526 AC_SUBST(STD_GUI_LIBS)
7528 dnl ---------------------------------------------------------------------------
7529 dnl Output the makefiles and such from the results found above
7530 dnl ---------------------------------------------------------------------------
7532 dnl all additional libraries (except wxWidgets itself) we link with
7534 if test "$wxUSE_MAC" = 1 ; then
7535 if test "$USE_DARWIN" = 1; then
7536 EXTRA_FRAMEWORKS="-framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime"
7539 if test "$wxUSE_OLD_COCOA" = 1 ; then
7540 EXTRA_FRAMEWORKS="-framework IOKit -framework Cocoa"
7541 if test "$wxUSE_MEDIACTRL" = "yes"; then
7542 EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework QuickTime"
7545 if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_OLD_COCOA" != 1 ; then
7546 EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
7549 LDFLAGS="$LDFLAGS $EXTRA_FRAMEWORKS"
7550 WXCONFIG_LDFLAGS="$WXCONFIG_LDFLAGS $EXTRA_FRAMEWORKS"
7552 LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS"
7554 if test "$wxUSE_GUI" = "yes"; then
7556 dnl TODO add checks that these samples will really compile (i.e. all the
7557 dnl library features they need are present)
7559 dnl TODO some samples are never built so far: mfc (requires VC++)
7560 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs drawing \
7561 erase event exec font image minimal render \
7562 shaped svg taborder vscroll widgets wrapsizer"
7564 if test "$wxUSE_MONOLITHIC" != "yes"; then
7565 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS console"
7567 if test "$TOOLKIT" = "MSW"; then
7568 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS regtest"
7569 if test "$wxUSE_UNIVERSAL" != "yes"; then
7570 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ownerdrw nativdlg dll"
7573 if test "$TOOLKIT" = "PM" -a "$wxUSE_UNIVERSAL" != "yes"; then
7574 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ownerdrw"
7577 SAMPLES_SUBDIRS="console"
7578 if test "$wxUSE_SOCKETS" = "yes" ; then
7579 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets"
7581 if test "$wxUSE_IPC" = "yes" ; then
7582 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ipc"
7587 dnl C/C++ compiler options used to compile wxWidgets
7589 dnl check for icc before gcc as icc is also recognized as gcc
7590 if test "x$INTELCC" = "xyes" ; then
7591 dnl Warnings which can't be easily suppressed in C code are disabled:
7593 dnl #810: conversion from "x" to "y" may lose significant bits
7594 dnl #869: parameter "foo" was never referenced
7595 dnl #1572: floating-point equality and inequality comparisons
7597 dnl #1684: conversion from pointer to same-sized integral type
7598 dnl #2259: non-pointer conversion from "x" to "y" may lose significant
7600 CWARNINGS="-Wall -wd810,869,981,1418,1572,1684,2259"
7601 elif test "$GCC" = yes ; then
7602 CWARNINGS="-Wall -Wundef"
7605 if test "x$INTELCXX" = "xyes" ; then
7606 dnl Intel compiler gives some warnings which simply can't be worked
7607 dnl around or of which we have too many (810, 869) so it's impractical to
7608 dnl keep them enabled even if in theory it would be nice and some others
7609 dnl (279) are generated for standard macros and so there is nothing we can
7612 dnl #279: controlling expression is constant
7613 dnl #383: value copied to temporary, reference to temporary used
7614 dnl #444: destructor for base class "xxx" is not virtual
7615 dnl #981: operands are evaluated in unspecified order
7616 dnl #1418: external definition with no prior declaration
7617 dnl #1419: external declaration in primary source file
7618 dnl #1881: argument must be a constant null pointer value
7620 dnl (for others see CWARNINGS above)
7621 CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419,1881,2259"
7622 elif test "$GXX" = yes ; then
7623 CXXWARNINGS="-Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy"
7624 AX_CXXFLAGS_GCC_OPTION(-Woverloaded-virtual, CXXWARNINGS)
7626 dnl when building under Mac we currently get hundreds of deprecation
7627 dnl warnings for Carbon symbols from the standard headers -- disable them
7628 dnl as we already know that they're deprecated and nothing else can be seen
7629 dnl with these warnings on
7630 if test "$wxUSE_MAC" = 1 ; then
7631 CXXWARNINGS="$CXXWARNINGS -Wno-deprecated-declarations"
7636 dnl combine everything together and remove the extra white space while doing it
7637 WXCONFIG_CFLAGS=`echo $WXCONFIG_CFLAGS`
7638 WXCONFIG_CXXFLAGS=`echo $WXCONFIG_CFLAGS $WXCONFIG_CXXFLAGS`
7641 dnl add -I options we use during library compilation
7643 dnl note that the order is somewhat important: wxWidgets headers should
7644 dnl come first and the one with setup.h should be before $(top_srcdir)/include
7645 dnl in case the latter contains setup.h used by non-autoconf makefiles (e.g.
7647 CPPFLAGS=`echo $WXCONFIG_CPPFLAGS \
7648 -I\\${wx_top_builddir}/lib/wx/include/${TOOLCHAIN_FULLNAME} \
7649 -I\\${top_srcdir}/include $TOOLKIT_INCLUDE \
7652 C_AND_CXX_FLAGS="$DEBUG_CFLAGS $PROFILE_FLAGS $OPTIMISE_CFLAGS"
7653 CFLAGS=`echo $WXCONFIG_CFLAGS $CWARNINGS $C_AND_CXX_FLAGS $CFLAGS `
7654 CXXFLAGS=`echo $WXCONFIG_CXXFLAGS $C_AND_CXX_FLAGS $CXXFLAGS `
7655 OBJCFLAGS=`echo $WXCONFIG_CFLAGS $CWARNINGS $C_AND_CXX_FLAGS $OBJCFLAGS `
7656 OBJCXXFLAGS=`echo $WXCONFIG_CXXFLAGS $C_AND_CXX_FLAGS $OBJCXXFLAGS `
7658 dnl now that we added WXCONFIG_CPPFLAGS to CPPFLAGS we can add the wx-config
7659 dnl only stuff to it
7660 WXCONFIG_CPPFLAGS=`echo $WXCONFIG_CPPFLAGS $WXCONFIG_ONLY_CPPFLAGS`
7663 if test "x$MWCC" = "xyes"; then
7664 dnl Correct MW 8.3 to be more similar to GCC. In particular we
7665 dnl must use <regex.h> from system not our local copy on OS X,
7666 dnl but must use local not system on OS 9.
7667 dnl The following should make all -I paths usable for <> includes
7668 dnl while first checking in real system paths. With 8.3 using
7669 dnl -gccincludes it will actually check local paths before system
7670 dnl even for <> which is totally wrong.
7672 dnl Note that because this absolutely needs to be before any -I
7673 dnl that we have to tack it on to the end of the compiler commandline.
7674 CC="$CC -cwd source -I-"
7675 CXX="$CXX -cwd source -I-"
7680 EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
7681 EXTRALIBS_XML="$EXPAT_LINK"
7682 EXTRALIBS_HTML="$MSPACK_LINK"
7683 EXTRALIBS_MEDIA="$GST_LIBS"
7684 EXTRALIBS_STC="-lwxscintilla${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX}"
7685 if test "$wxUSE_GUI" = "yes"; then
7686 EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $WEBKIT_LINK $EXTRALIBS_HILDON $EXTRALIBS_GNOMEVFS $EXTRALIBS_GNOMEPRINT`
7688 if test "$wxUSE_OPENGL" = "yes"; then
7689 EXTRALIBS_OPENGL="$LDFLAGS_GL $OPENGL_LIBS"
7692 LDFLAGS="$LDFLAGS $PROFILE_FLAGS"
7694 WXCONFIG_LIBS="$LIBS"
7696 dnl wx-config must output builtin 3rd party libs in --libs in static build:
7697 if test "$wxUSE_REGEX" = "builtin" ; then
7698 wxconfig_3rdparty="regex${lib_unicode_suffix} $wxconfig_3rdparty"
7700 if test "$wxUSE_EXPAT" = "builtin" ; then
7701 wxconfig_3rdparty="expat $wxconfig_3rdparty"
7703 if test "$wxUSE_LIBTIFF" = "builtin" ; then
7704 wxconfig_3rdparty="tiff $wxconfig_3rdparty"
7706 if test "$wxUSE_LIBJPEG" = "builtin" ; then
7707 wxconfig_3rdparty="jpeg $wxconfig_3rdparty"
7709 if test "$wxUSE_LIBPNG" = "builtin" ; then
7710 wxconfig_3rdparty="png $wxconfig_3rdparty"
7712 if test "$wxUSE_ZLIB" = "builtin" ; then
7713 wxconfig_3rdparty="zlib $wxconfig_3rdparty"
7716 for i in $wxconfig_3rdparty ; do
7717 WXCONFIG_LIBS="-lwx${i}${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX} $WXCONFIG_LIBS"
7721 if test "x$wxUSE_UNIVERSAL" = "xyes" ; then
7724 case "$wxUNIV_THEMES" in
7726 AC_DEFINE(wxUSE_ALL_THEMES)
7730 for t in `echo $wxUNIV_THEMES | tr , ' ' | tr '[[a-z]]' '[[A-Z]]'`; do
7731 AC_DEFINE_UNQUOTED(wxUSE_THEME_$t)
7738 AC_SUBST(wxUSE_ZLIB)
7739 AC_SUBST(wxUSE_REGEX)
7740 AC_SUBST(wxUSE_EXPAT)
7741 AC_SUBST(wxUSE_LIBJPEG)
7742 AC_SUBST(wxUSE_LIBPNG)
7743 AC_SUBST(wxUSE_LIBTIFF)
7745 if test $wxUSE_MONOLITHIC = "yes" ; then
7751 if test $wxUSE_PLUGINS = "yes" ; then
7757 if test "$wxUSE_DEBUGREPORT" = "yes" ; then
7763 if test $wxUSE_OFFICIAL_BUILD = "yes" ; then
7770 AC_SUBST(OFFICIAL_BUILD)
7771 AC_SUBST(WX_FLAVOUR)
7772 AC_SUBST(WX_LIB_FLAVOUR)
7775 AC_SUBST(MONOLITHIC)
7776 AC_SUBST(USE_PLUGINS)
7778 AC_SUBST(CXXWARNINGS)
7780 AC_SUBST(EXTRALIBS_XML)
7781 AC_SUBST(EXTRALIBS_HTML)
7782 AC_SUBST(EXTRALIBS_MEDIA)
7783 AC_SUBST(EXTRALIBS_GUI)
7784 AC_SUBST(EXTRALIBS_OPENGL)
7785 AC_SUBST(EXTRALIBS_SDL)
7786 AC_SUBST(EXTRALIBS_STC)
7787 AC_SUBST(WITH_PLUGIN_SDL)
7788 AC_SUBST(EXTRALIBS_GTKPRINT)
7789 AC_SUBST(EXTRALIBS_GNOMEPRINT)
7790 AC_SUBST(EXTRALIBS_GNOMEVFS)
7791 AC_SUBST(EXTRALIBS_HILDON)
7793 AC_SUBST(DEBUG_INFO)
7794 AC_SUBST(DEBUG_FLAG)
7795 TOOLKIT_LOWERCASE=xxx
7796 if test "$TOOLKIT" = "MAC"; then
7797 TOOLKIT_LOWERCASE=osx_carbon
7799 if test "$TOOLKIT" = "OSX_CARBON"; then
7800 TOOLKIT_LOWERCASE=osx_carbon
7802 if test "$TOOLKIT" = "OSX_COCOA"; then
7803 TOOLKIT_LOWERCASE=osx_cocoa
7805 if test "$TOOLKIT_LOWERCASE" = "xxx"; then
7806 TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'`
7808 AC_SUBST(TOOLKIT_LOWERCASE)
7809 AC_SUBST(TOOLKIT_VERSION)
7810 AC_SUBST(DYLIB_RPATH_INSTALL)
7811 AC_SUBST(DYLIB_RPATH_POSTLINK)
7812 AC_SUBST(SAMPLES_RPATH_FLAG)
7813 AC_SUBST(HEADER_PAD_OPTION)
7814 AC_SUBST(HOST_SUFFIX)
7815 AC_SUBST(CPPUNIT_CFLAGS)
7816 AC_SUBST(CPPUNIT_LIBS)
7821 if test "$WXGTK2" = 1; then
7822 TOOLKIT_DESC="$TOOLKIT_DESC 2"
7823 if test "$wxUSE_GTKPRINT" = "yes" ; then
7824 TOOLKIT_EXTRA="$TOOLKIT_EXTRA GTK+ printing";
7826 if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then
7827 TOOLKIT_EXTRA="$TOOLKIT_EXTRA gnomeprint";
7829 if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then
7830 TOOLKIT_EXTRA="$TOOLKIT_EXTRA gnomevfs"
7832 if test "$wxUSE_LIBHILDON" = "yes"; then
7833 TOOLKIT_EXTRA="$TOOLKIT_EXTRA hildon"
7835 if test "$wxUSE_LIBHILDON2" = "yes"; then
7836 TOOLKIT_EXTRA="$TOOLKIT_EXTRA hildon"
7839 if test "$TOOLKIT_EXTRA" != ""; then
7840 TOOLKIT_DESC="$TOOLKIT_DESC with support for `echo $TOOLKIT_EXTRA | tr -s ' '`"
7846 TOOLKIT_DESC=$TOOLKIT_LOWERCASE
7850 TOOLKIT_DESC="base only"
7854 if test "$wxUSE_WINE" = "yes"; then
7855 BAKEFILE_FORCE_PLATFORM=win32
7858 dnl gcc 3.4 has a pch bug which truncates wide character constants in headers.
7859 dnl Hopefully for a non-unicode build there aren't any wide constants in
7860 dnl headers, but for a unicode build it's best to disable pch.
7861 if test "$wxUSE_UNICODE" = yes -a "$GCC" = yes -a "$bk_use_pch" != no
7864 [for gcc precompiled header bug],
7865 [wx_cv_gcc_pch_bug],
7867 echo '#include <stdio.h>
7868 const wchar_t test_var[] = L"awidetest";' > conftest.h
7870 echo '#include "conftest.h"
7873 printf("%ls", test_var);
7877 wx_cv_gcc_pch_bug="pch not supported"
7879 if $CXX conftest.h >/dev/null 2>&1
7883 if $CXX -o conftest$PROGRAM_EXT conftest.cpp >/dev/null 2>&1
7885 if tr -dc '[a-z]' < conftest$PROGRAM_EXT |
7886 grep awidetest >/dev/null
7888 wx_cv_gcc_pch_bug=no
7890 wx_cv_gcc_pch_bug=yes
7895 rm -f conftest.h conftest.gch conftest.cpp conftest$PROGRAM_EXT
7898 if test "$wx_cv_gcc_pch_bug" = yes; then
7899 dnl make the default for pch 'no'
7900 dnl further below check whether the user overrode and warn them
7905 AC_BAKEFILE([m4_include(autoconf_inc.m4)])
7907 dnl make install path absolute (if not already);
7908 dnl will fail with (some) MSDOS paths
7912 ?:* ) # Drive letter, considered as absolute.
7915 INSTALL=`pwd`/${INSTALL} ;;
7918 if test "$wxUSE_GUI" = "yes"; then
7920 if test "$wxUSE_MSW" = 1 ; then
7921 if test "x$WINDRES" = "x"; then
7922 AC_MSG_ERROR([Required windres program not found])
7925 RESCOMP="$WINDRES $WINDRES_CPU_DEFINE"
7928 if test "$wxUSE_MAC" = 1 -o "$wxUSE_OLD_COCOA" = 1; then
7929 dnl base name of the resource file for wxMac must be the same
7930 dnl as library installation base name (-install_name)
7931 WX_RESOURCES_MACOSX_ASCII="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.r"
7932 WX_RESOURCES_MACOSX_DATA="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.rsrc"
7934 dnl add the resources target for wxMac
7935 LIBWXMACRES="\$(wx_top_builddir)/lib/${WX_RESOURCES_MACOSX_ASCII}"
7937 AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez)
7939 MACSETFILE="\$(SETFILE)"
7941 dnl resources are bundled both with shared library and applications
7942 dnl since the carb resource *must* be included in the application
7943 if test "$wxUSE_OSX_CARBON" = 1; then
7944 POSTLINK_COMMAND="\$(REZ) -d __DARWIN__ -t APPL Carbon.r -o"
7946 WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL Carbon.r -o"
7948 POSTLINK_COMMAND="cat /dev/null | \$(REZ) -d __DARWIN__ -t APPL ${LIBWXMACRES}"
7949 RESCOMP="cat /dev/null \| $REZ"
7950 WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL \$libdir/$WX_RESOURCES_MACOSX_ASCII"
7954 dnl default value is to (silently) do nothing in the makefile
7957 if test "$wxUSE_PM" = 1; then
7959 WXCONFIG_RESFLAGS="-ep"
7961 dnl Is this one really used anywhere for pm?
7962 POSTLINK_COMMAND="$RESCOMP $WXCONFIG_RESFLAGS"
7964 POSTLINK_COMMAND="@true"
7972 dnl find out if the compiler supports PCH
7974 dnl TODO: this should be in bakefile
7975 if test $GCC_PCH = 1
7977 if test "$wx_cv_gcc_pch_bug" = yes; then
7978 AC_MSG_WARN([*** Precompiled header support is broken on this compiler])
7979 AC_MSG_WARN([*** --enable-precomp-headers is not recommended])
7980 AC_MSG_WARN([*** see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13361])
7983 # Our WX_PRECOMP flag does not make sense for any language except C++ because
7984 # the headers that benefit from precompilation are mostly C++ headers.
7985 CXXFLAGS="-DWX_PRECOMP $CXXFLAGS"
7986 # When Bakefile can do multi-language PCH (e.g. C++ and Objective-C++) enable this:
7987 #OBJCXXFLAGS="-DWX_PRECOMP $CXXFLAGS"
7991 dnl For now, we need to alter bk-deps not to generate deps
7992 dnl when we've configured a Universal binary build.
7993 dnl The next version of Bakefile will have the correct fix for this
7994 dnl at which time, this hack can be removed.
7996 if test "$wxUSE_MAC" = 1 ; then
7997 if test "x$wxUSE_UNIVERSAL_BINARY" != "xno" ; then
7998 sed "s/DEPSMODE=gcc/DEPSMODE=none/" < bk-deps > temp
8004 if test "$wxUSE_SHARED" = "yes"; then
8005 dnl Need addtional flag on OS/2, so override bakefiles value
8006 dnl (there currently is no suitable variable to which the
8007 dnl missing flags could be added, AFAICS. SN, 18.12.2004. )
8009 *-pc-os2_emx | *-pc-os2-emx )
8010 SHARED_LD_CC="`pwd`/dllar.sh -name-mangler-script ./dllnames.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
8011 SHARED_LD_CXX="`pwd`/dllar.sh -name-mangler-script ./dllnames.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
8012 cp -p ${srcdir}/src/os2/dllnames.sh .
8013 cp -p ${srcdir}/src/os2/dllar.sh .
8017 if test "$wxUSE_OMF" = "yes"; then
8019 *-pc-os2_emx | *-pc-os2-emx )
8020 LDFLAGS="$LDFLAGS -Zlinker /EXEPACK"
8021 LDFLAGS_GUI="-Zlinker /PMTYPE:PM"
8022 WXCONFIG_LDFLAGS_GUI="-Zlinker /PMTYPE:PM"
8027 dnl TOOLCHAIN_DEFS should be used for both wx and client code
8028 WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS $TOOLCHAIN_DEFS"
8031 dnl Sun cc is compatible with gcc and so either of them can use the C
8032 dnl libraries built with the other, i.e. gcc can be used to build wxGTK under
8033 dnl Solaris where GTK+ is compiled using cc and cc can be used under Linux
8034 dnl where GTK+ is built with gcc
8036 dnl However the compiler options are not compatible at all and in particular
8037 dnl gcc doesn't like cc -mt option and cc doesn't like -pthread. We simply
8038 dnl filter them out as we already have the correct options for multithreaded
8039 dnl programs if we're using threads (and if we don't, it shouldn't matter)
8042 dnl system packages are compiled with Sun CC and so pkg-config outputs
8043 dnl CC-specific "-mt" flag, remove it when using gcc
8044 if test "$GCC" = yes; then
8045 CPPFLAGS=`echo $CPPFLAGS | sed 's/-mt//'`
8046 LIBS=`echo $LIBS | sed 's/-mt//'`
8047 EXTRALIBS_GUI=`echo $EXTRALIBS_GUI | sed 's/-mt//'`
8052 dnl OTOH when using Sun CC under Linux, the flags contain gcc-specific
8053 dnl -pthreads which Sun CC doesn't know about
8054 if test "x$SUNCXX" = xyes; then
8055 CPPFLAGS=`echo $CPPFLAGS | sed 's/-pthread//'`
8056 LIBS=`echo $LIBS | sed 's/-pthread//'`
8057 EXTRALIBS_GUI=`echo $EXTRALIBS_GUI | sed 's/-pthread//'`
8062 dnl Add visibility support flags to CFLAGS/CXXFLAGS - do it this late so that
8063 dnl it doesn't affect compilation checks above
8064 CFLAGS="$CFLAGS $CFLAGS_VISIBILITY"
8065 CXXFLAGS="$CXXFLAGS $CXXFLAGS_VISIBILITY"
8066 OBJCFLAGS="$OBJCFLAGS $CFLAGS_VISIBILITY"
8067 OBJCXXFLAGS="$OBJCXXFLAGS $CXXFLAGS_VISIBILITY"
8069 dnl for convenience, sort the samples in alphabetical order
8071 dnl FIXME For some mysterious reasons, sometimes the directories are duplicated
8072 dnl in this list - hence uniq. But normally, this shouldn't be needed!
8074 dnl Unfortunately, there is a bug in OS/2's tr, such that
8075 dnl tr ' ' '\n' introduces DOS-like line breaks, whereas tr '\n' ' '
8076 dnl only removes the Unix-like part of the introduced line break.
8077 SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq | tr '\n' ' '| tr -d '\r'`"
8079 dnl subtle bakefile goop.
8080 dnl Used in wx-config now too, as its STATIC_FLAG with different makeup.
8081 dnl I wish we would have called it something less likely to clash with
8086 AC_SUBST(WX_LIBRARY_BASENAME_NOGUI)
8087 AC_SUBST(WX_LIBRARY_BASENAME_GUI)
8091 AC_SUBST(AFMINSTALL)
8092 AC_SUBST(WIN32INSTALL)
8094 AC_SUBST(TOOLKIT_DIR)
8095 AC_SUBST(TOOLCHAIN_NAME)
8096 AC_SUBST(TOOLCHAIN_FULLNAME)
8098 dnl wx-config options
8099 AC_SUBST(host_alias)
8100 AC_SUBST(cross_compiling)
8101 AC_SUBST(WIDGET_SET)
8102 AC_SUBST(WX_RELEASE)
8103 AC_SUBST(WX_VERSION)
8104 AC_SUBST(WX_SUBVERSION)
8105 AC_SUBST(WX_CHARTYPE)
8107 dnl note that in addition to the usual CPP/C/CXXFLAGS which are used for
8108 dnl building the library itself, we also have WXCONFIG_-prefixed variants which
8109 dnl are used when building the libraries using the library
8111 dnl so put anything which should be used only during the library build in, e.g.
8112 dnl CXXFLAGS, but put everything else (by default) into WXCONFIG_CXXFLAGS
8114 dnl and, finally, for some things which should be only used by wx-config but
8115 dnl not during the library compilation, use WXCONFIG_ONLY_CPPFLAGS which is
8116 dnl added to WXCONFIG_CPPFLAGS after adding the latter to CPPFLAGS
8117 AC_SUBST(WXCONFIG_CPPFLAGS)
8118 AC_SUBST(WXCONFIG_CFLAGS)
8119 AC_SUBST(WXCONFIG_CXXFLAGS)
8121 AC_SUBST(WXCONFIG_LIBS)
8122 AC_SUBST(WXCONFIG_RPATH)
8123 AC_SUBST(WXCONFIG_LDFLAGS)
8124 AC_SUBST(WXCONFIG_LDFLAGS_GUI)
8125 AC_SUBST(WXCONFIG_RESFLAGS)
8127 dnl distribution vars
8131 dnl additional subdirectories where we will build
8132 AC_SUBST(SAMPLES_SUBDIRS)
8134 dnl additional libraries and linker settings
8136 AC_SUBST(LDFLAGS_GL)
8137 AC_SUBST(OPENGL_LIBS)
8138 AC_SUBST(DMALLOC_LIBS)
8139 AC_SUBST(WX_VERSION_TAG)
8141 dnl additional resurces settings
8146 AC_SUBST(RESPROGRAMOBJ)
8147 AC_SUBST(WX_RESOURCES_MACOSX_ASCII)
8148 AC_SUBST(WX_RESOURCES_MACOSX_DATA)
8150 dnl additional for Mac OS X
8152 AC_SUBST(LIBWXMACRES)
8153 AC_SUBST(POSTLINK_COMMAND)
8154 AC_SUBST(MACSETFILE)
8161 dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE
8162 dnl itself (this macro is required if SUBDIRS variable is used in Makefile.am
8163 dnl - and we do use it)
8167 AC_CONFIG_HEADERS([lib/wx/include/${TOOLCHAIN_FULLNAME}/wx/setup.h:setup.h.in])
8169 if test "$USE_WIN32" = 1; then
8170 AC_CONFIG_COMMANDS([rcdefs.h],
8173 $CPP $infile | sed 's/^# *[1-9].*//;s/^ *//;/./,/^$/!d' > $outdir/rcdefs.h
8177 infile="$srcdir/include/wx/msw/genrcdefs.h"
8178 outdir="lib/wx/include/$TOOLCHAIN_FULLNAME/wx/msw"
8183 AC_CONFIG_FILES([ lib/wx/config/${TOOLCHAIN_FULLNAME}:wx-config.in ],
8184 [ chmod +x lib/wx/config/${TOOLCHAIN_FULLNAME} ],
8185 [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ])
8187 AC_CONFIG_FILES([ lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace.in ],
8188 [ chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ],
8189 [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ])
8191 dnl this is used to run ifacecheck with the same flags used by the compiler
8192 dnl for the real compilation:
8193 AC_CONFIG_FILES([ utils/ifacecheck/rungccxml.sh ],
8194 [ chmod +x utils/ifacecheck/rungccxml.sh ])
8196 if test "$wx_cv_version_script" = "yes"; then
8197 AC_CONFIG_FILES(version-script)
8199 AC_CONFIG_FILES(Makefile)
8201 AC_CONFIG_COMMANDS([wx-config],
8203 ${LN_S} lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} wx-config
8205 [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}"
8209 dnl This would give us us build dir that in every significant way
8210 dnl resembles an installed wx in prefix=$builddir. It is troublesome
8211 dnl though in this form because AC_CONFIG_LINKS will fail for directories
8212 dnl on platforms that do not have symlinks.
8213 dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR:include ])
8215 if test "$wxWITH_SUBDIRS" != "no"; then
8216 dnl Configure samples, demos etc. directories, but only if they are present:
8217 if test "$wxUSE_GUI" = "yes"; then
8218 SUBDIRS="samples demos utils"
8220 dnl we build wxBase only
8221 dnl there are no wxBase programs in demos
8222 SUBDIRS="samples utils"
8224 dnl Add tests to the list of subdirs if cppunit 1.8.0+ is detected
8225 AM_PATH_CPPUNIT(1.8.0, [SUBDIRS="$SUBDIRS tests"])
8227 for subdir in $SUBDIRS; do
8228 if test -d ${srcdir}/${subdir} ; then
8229 if test "$wxUSE_GUI" = "yes"; then
8230 if test ${subdir} = "samples"; then
8231 dnl only take those samples which compile in the current
8232 dnl configuration and which exist
8233 makefiles="samples/Makefile.in $makefiles"
8234 for sample in $SAMPLES_SUBDIRS; do
8235 if test -d $srcdir/samples/$sample; then
8236 makefiles="samples/$sample/Makefile.in $makefiles"
8240 dnl assume that everything compiles for utils &c
8241 dnl any that shouldn't be built can be added to
8242 dnl DISABLED_UTILS, DISABLED_DEMOS
8243 disabled_var=DISABLED_`echo $subdir | tr '[[a-z]]' '[[A-Z]]'`
8244 eval "disabled=\$$disabled_var"
8245 disabled=/`echo X $disabled | sed 's@ @/|/@g'`/
8246 makefiles=`(cd $srcdir ; find $subdir -name Makefile.in) | $EGREP -v "$disabled"`
8249 dnl we build wxBase only
8250 dnl don't take all samples/utils, just those which build with wxBase
8251 if test ${subdir} = "samples"; then
8252 dnl only take those samples which compile in the current
8253 dnl configuration and which exist
8254 makefiles="samples/Makefile.in $makefiles"
8255 for sample in `echo $SAMPLES_SUBDIRS`; do
8256 if test -d $srcdir/samples/$sample; then
8257 makefiles="samples/$sample/Makefile.in $makefiles"
8260 elif test ${subdir} = "utils"; then
8262 for util in ifacecheck ; do
8263 if test -d $srcdir/utils/$util ; then
8264 makefiles="utils/$util/src/Makefile.in \
8269 dnl assume that everything compiles for tests
8270 makefiles=`(cd $srcdir ; find $subdir -name Makefile.in)`
8274 for mkin in $makefiles ; do
8275 mk=`echo $mkin | sed 's/Makefile\.in/Makefile/g'`
8276 AC_CONFIG_FILES([$mk])
8280 fi dnl wxWITH_SUBDIRS
8284 dnl report how we have been configured
8286 echo "Configured wxWidgets ${WX_VERSION} for \`${host}'"
8288 echo " Which GUI toolkit should wxWidgets use? ${TOOLKIT_DESC}"
8289 echo " Should wxWidgets be compiled into single library? ${wxUSE_MONOLITHIC:-yes}"
8290 echo " Should wxWidgets be linked as a shared library? ${wxUSE_SHARED:-no}"
8291 echo $ECHO_N " Should wxWidgets support Unicode? ${wxUSE_UNICODE:-no}$ECHO_C"
8292 if test "$wxUSE_UNICODE" = "yes"; then
8293 if test "$wxUSE_UNICODE_UTF8" = "yes"; then
8294 echo " (using UTF-8)"
8296 echo " (using wchar_t)"
8302 echo " What level of wxWidgets compatibility should be enabled?"
8303 echo " wxWidgets 2.6 ${WXWIN_COMPATIBILITY_2_6:-no}"
8304 echo " wxWidgets 2.8 ${WXWIN_COMPATIBILITY_2_8:-yes}"
8306 echo " Which libraries should wxWidgets use?"
8307 echo " STL ${wxUSE_STL}"
8308 echo " jpeg ${wxUSE_LIBJPEG-none}"
8309 echo " png ${wxUSE_LIBPNG-none}"
8310 echo " regex ${wxUSE_REGEX}"
8311 echo " tiff ${wxUSE_LIBTIFF-none}"
8312 if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then
8313 echo " xpm ${wxUSE_LIBXPM-none}"
8315 echo " zlib ${wxUSE_ZLIB}"
8316 echo " expat ${wxUSE_EXPAT}"
8317 echo " libmspack ${wxUSE_LIBMSPACK}"
8318 echo " sdl ${wxUSE_LIBSDL}"
8322 dnl vi: set et sts=4 sw=4 com=\:dnl: