X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1218de17f5ab174e4e74211c9cb24c0aac3d1201..2d1df0fc585f03cca4b194d1f9159b49a5711da6:/configure.in diff --git a/configure.in b/configure.in index 3c785eade8..c0d249972d 100644 --- a/configure.in +++ b/configure.in @@ -94,13 +94,14 @@ NEEDS_D_REENTRANT_FOR_R_FUNCS=0 dnl the list of all available toolkits dnl dnl update NUM_TOOLKITS calculation below when adding a new toolkit here! -ALL_TOOLKITS="COCOA GTK MAC MGL MICROWIN MOTIF MSW PM X11 DFB" +ALL_TOOLKITS="COCOA GTK OSX_CARBON OSX_COCOA MGL MICROWIN MOTIF MSW PM X11 DFB" dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones dnl which are either yes or no DEFAULT_wxUSE_COCOA=0 DEFAULT_wxUSE_GTK=0 -DEFAULT_wxUSE_MAC=0 +DEFAULT_wxUSE_OSX_CARBON=0 +DEFAULT_wxUSE_OSX_COCOA=0 DEFAULT_wxUSE_MGL=0 DEFAULT_wxUSE_MICROWIN=0 DEFAULT_wxUSE_MOTIF=0 @@ -114,7 +115,8 @@ dnl they're used if no --with- options were given to detect the dnl toolkit to use by default for the target platform DEFAULT_DEFAULT_wxUSE_COCOA=0 DEFAULT_DEFAULT_wxUSE_GTK=0 -DEFAULT_DEFAULT_wxUSE_MAC=0 +DEFAULT_DEFAULT_wxUSE_OSX_CARBON=0 +DEFAULT_DEFAULT_wxUSE_OSX_COCOA=0 DEFAULT_DEFAULT_wxUSE_MGL=0 DEFAULT_DEFAULT_wxUSE_MICROWIN=0 DEFAULT_DEFAULT_wxUSE_MOTIF=0 @@ -321,7 +323,7 @@ case "${host}" in AC_DEFINE(__BSD__) AC_DEFINE(__DARWIN__) AC_DEFINE(TARGET_CARBON) - DEFAULT_DEFAULT_wxUSE_MAC=1 + DEFAULT_DEFAULT_wxUSE_OSX_CARBON=1 DEFAULT_STD_FLAG=no ;; powerpc-apple-macos* ) @@ -333,7 +335,7 @@ case "${host}" in SO_SUFFIX=shlib dnl AC_DEFINE(TARGET_CARBON) dnl platform.h needs TARGET_CARBON before setup.h, we'll add it to CPPFLAGS - DEFAULT_DEFAULT_wxUSE_MAC=1 + DEFAULT_DEFAULT_wxUSE_OSX_CARBON=1 DEFAULT_STD_FLAG=no ;; @@ -454,7 +456,9 @@ dnl we use AC_ARG_WITH and not WX_ARG_WITH for the toolkit options as they dnl shouldn't default to wxUSE_ALL_FEATURES 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]) AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1]) -AC_ARG_WITH(mac, [ --with-mac use Mac OS X], [wxUSE_MAC="$withval" CACHE_MAC=1 TOOLKIT_GIVEN=1]) +AC_ARG_WITH(osx_carbon, [ --with-osx_carbon use Mac OS X (Carbon) ], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1]) +AC_ARG_WITH(osx_cocoa, [ --with-osx_cocoa use Mac OS X (Cocoa) ], [wxUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT_GIVEN=1]) +AC_ARG_WITH(mac, [ --with-mac use Mac OS X (Default) ], [wxUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(cocoa, [ --with-cocoa use Cocoa], [wxUSE_COCOA="$withval" CACHE_COCOA=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(wine, [ --with-wine use Wine], [wxUSE_WINE="$withval" CACHE_WINE=1]) AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1]) @@ -468,6 +472,103 @@ WX_ARG_ENABLE(nanox, [ --enable-nanox use NanoX], wxUSE_NANOX) AC_ARG_ENABLE(gtk2, [ --disable-gtk2 use GTK+ 1.2 instead of 2.0], [wxUSE_GTK2="$enableval"]) WX_ARG_ENABLE(gpe, [ --enable-gpe use GNOME PDA Environment features if possible], wxUSE_GPE) +dnl check that no more than one toolkit is given and that if none are given that +dnl we have a default one + +AC_MSG_CHECKING(for toolkit) + + + +# In Wine, we need to default to MSW, not GTK or MOTIF +if test "$wxUSE_WINE" = "yes"; then + DEFAULT_DEFAULT_wxUSE_GTK=0 + DEFAULT_DEFAULT_wxUSE_MOTIF=0 + DEFAULT_DEFAULT_wxUSE_MSW=1 + wxUSE_SHARED=no + CC=${CC:-winegcc} + CXX=${CXX:-wineg++} +fi + + +if test "$wxUSE_GUI" = "yes"; then + + if test "$USE_BEOS" = 1; then + AC_MSG_ERROR([BeOS GUI is not supported yet, use --disable-gui]) + fi + + if test "$TOOLKIT_GIVEN" = 1; then + dnl convert "yes", "any" or a number to 1 and "no" to 0 + for toolkit in $ALL_TOOLKITS; do + var=wxUSE_$toolkit + eval "value=\$${var}" + if test "x$value" = "xno"; then + eval "$var=0" + elif test "x$value" != "x"; then + eval "$var=1" + fi + + if test "x$value" != "x" -a "x$value" != "xyes" -a "x$value" != "xno"; then + eval "wx${toolkit}_VERSION=$value" + fi + done + else + dnl try to guess the most apropriate toolkit for this platform + for toolkit in $ALL_TOOLKITS; do + var=DEFAULT_DEFAULT_wxUSE_$toolkit + eval "wxUSE_$toolkit=\$${var}" + done + fi + + dnl we suppose that expr is available (maybe there is a better way to do + dnl this? what about using ALL_TOOLKITS? TODO) + NUM_TOOLKITS=`expr ${wxUSE_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_OSX_CARBON:-0} \ + + ${wxUSE_OSX_COCOA:-0} + ${wxUSE_MGL:-0} + ${wxUSE_DFB:-0} \ + + ${wxUSE_MICROWIN:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}` + + dnl Allow wxUSE_PM only for OS/2 with EMX. + case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}` + esac + + case "$NUM_TOOLKITS" in + 1) + ;; + 0) + AC_MSG_ERROR(Please specify a toolkit -- cannot determine the default for ${host}) + ;; + *) + AC_MSG_ERROR(Please specify at most one toolkit) + esac + + # to be removed when --disable-gtk2 isn't needed + if test "x$wxUSE_GTK2" = "xyes"; then + wxGTK_VERSION=2 + elif test "x$wxUSE_GTK2" = "xno"; then + wxGTK_VERSION=1 + fi + + for toolkit in $ALL_TOOLKITS; do + var=wxUSE_$toolkit + eval "value=\$${var}" + if test "$value" = 1; then + toolkit_echo=`echo $toolkit | tr '[[A-Z]]' '[[a-z]]'` + AC_MSG_RESULT($toolkit_echo) + fi + done +else + if test "x$host_alias" != "x"; then + AC_MSG_RESULT(base ($host_alias hosted) only) + else + AC_MSG_RESULT(base only) + fi +fi + +wxUSE_MAC=0 +if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1; then + wxUSE_MAC=1 +fi + dnl --------------------------------------------------------------------------- dnl external libraries dnl --------------------------------------------------------------------------- @@ -476,6 +577,7 @@ WX_ARG_SYS_WITH(libpng, [ --with-libpng use libpng (PNG image form WX_ARG_SYS_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], wxUSE_LIBJPEG) WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF) WX_ARG_SYS_WITH(libxpm, [ --with-libxpm use libxpm (XPM file format)], wxUSE_LIBXPM) +WX_ARG_WITH(libiconv, [ --with-libiconv use libiconv (character conversion)], wxUSE_LIBICONV) WX_ARG_WITH(libmspack, [ --with-libmspack use libmspack (CHM help files loading)], wxUSE_LIBMSPACK) WX_ARG_WITHOUT(gtkprint, [ --without-gtkprint don't use GTK printing support], wxUSE_GTKPRINT) WX_ARG_WITHOUT(gnomeprint, [ --without-gnomeprint don't use GNOME printing libraries], wxUSE_LIBGNOMEPRINT) @@ -511,7 +613,6 @@ dnl global compile options dnl --------------------------------------------------------------------------- WX_ARG_DISABLE(shared, [ --disable-shared create static library instead of shared], wxUSE_SHARED) -WX_ARG_DISABLE(optimise, [ --disable-optimise create optimised code], wxUSE_OPTIMISE) WX_ARG_ENABLE(debug, [ --enable-debug same as debug_flag and debug_info], wxUSE_DEBUG) WX_ARG_ENABLE(stl, [ --enable-stl use STL for containers], wxUSE_STL) WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM) @@ -519,7 +620,7 @@ WX_ARG_ENABLE(std_string, [ --enable-std_string use standard C++ string WX_ARG_DISABLE(unicode, [ --disable-unicode compile without Unicode support], wxUSE_UNICODE) WX_ARG_ENABLE(mslu, [ --enable-mslu use MS Layer for Unicode on Windows 9x (Win32 only)], wxUSE_UNICODE_MSLU) WX_ARG_ENABLE_PARAM(utf8, [ --enable-utf8 use UTF-8 representation for strings (Unix only)], wxUSE_UNICODE_UTF8) -WX_ARG_ENABLE(utf8only, [ --enable-utf8only only support UTF-8 locales in UTF-8 build (Unix only)], wxUSE_UNICODE_UTF8_LOCALE) +WX_ARG_ENABLE(utf8only, [ --enable-utf8only only support UTF-8 locales in UTF-8 build (Unix only)], wxUSE_UNICODE_UTF8_LOCALE) WX_ARG_ENABLE(extended_rtti, [ --enable-extended_rtti use extended RTTI (XTI)], wxUSE_EXTENDED_RTTI) if test "$USE_OS2" = 1; then DEFAULT_wxUSE_OMF=no @@ -548,6 +649,17 @@ if test "$wxUSE_DEBUG_FLAG" = "yes" -a "$wxUSE_DEBUG_INFO" = "yes"; then BUILD=debug fi +dnl disable optimizations by default if --enable-debug was used but leave them +dnl enabled if just --enable-debug_{flag,info} was +dnl +dnl in any case, only set the default value and allow overriding it with an +dnl explicit --enable-optimise +if test "$wxUSE_DEBUG" = "yes"; then + DEFAULT_wxUSE_OPTIMISE=no +fi + +WX_ARG_DISABLE(optimise, [ --disable-optimise compile without optimisations], wxUSE_OPTIMISE) + WX_ARG_ENABLE(debug_gdb, [ --enable-debug_gdb create code with extra GDB debugging information], wxUSE_DEBUG_GDB) WX_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt use wxDebugContext], wxUSE_DEBUG_CONTEXT) WX_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing create code with memory tracing], wxUSE_MEM_TRACING) @@ -573,6 +685,7 @@ dnl optional non GUI features dnl --------------------------------------------------------------------------- WX_ARG_FEATURE(intl, [ --enable-intl use internationalization system], wxUSE_INTL) +WX_ARG_FEATURE(xlocale, [ --enable-xlocale use x-locale support (requires wxLocale)], wxUSE_XLOCALE) WX_ARG_FEATURE(config, [ --enable-config use wxConfig (and derived) classes], wxUSE_CONFIG) WX_ARG_FEATURE(protocols, [ --enable-protocols use wxProtocol and derived classes], wxUSE_PROTOCOL) @@ -615,7 +728,9 @@ WX_ARG_FEATURE(geometry, [ --enable-geometry use geometry class], wx WX_ARG_FEATURE(log, [ --enable-log use logging system], wxUSE_LOG) WX_ARG_FEATURE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG) WX_ARG_FEATURE(mimetype, [ --enable-mimetype use wxMimeTypesManager], wxUSE_MIMETYPE) +WX_ARG_FEATURE(printfposparam,[ --enable-printfposparam use wxVsnprintf() which supports positional parameters], wxUSE_PRINTF_POS_PARAMS) WX_ARG_FEATURE(snglinst, [ --enable-snglinst use wxSingleInstanceChecker class], wxUSE_SNGLINST_CHECKER) +WX_ARG_FEATURE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND) WX_ARG_FEATURE(stdpaths, [ --enable-stdpaths use wxStandardPaths class], wxUSE_STDPATHS) WX_ARG_FEATURE(stopwatch, [ --enable-stopwatch use wxStopWatch class], wxUSE_STOPWATCH) WX_ARG_FEATURE(streams, [ --enable-streams use wxStream etc classes], wxUSE_STREAMS) @@ -624,14 +739,11 @@ WX_ARG_FEATURE(tarstream, [ --enable-tarstream use wxTar streams], wxU WX_ARG_FEATURE(textbuf, [ --enable-textbuf use wxTextBuffer class], wxUSE_TEXTBUFFER) WX_ARG_FEATURE(textfile, [ --enable-textfile use wxTextFile class], wxUSE_TEXTFILE) WX_ARG_FEATURE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER) -WX_ARG_FEATURE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND) -WX_ARG_FEATURE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL) -WX_ARG_FEATURE(gstreamer8, [ --enable-gstreamer8 force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix], wxUSE_GSTREAMER8) -WX_ARG_FEATURE(printfposparam,[ --enable-printfposparam use wxVsnprintf() which supports positional parameters], wxUSE_PRINTF_POS_PARAMS) +WX_ARG_FEATURE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT) WX_ARG_FEATURE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM) +dnl URL-related classes WX_ARG_FEATURE(url, [ --enable-url use wxURL class], wxUSE_URL) -WX_ARG_FEATURE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT) WX_ARG_FEATURE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL) WX_ARG_FEATURE(protocol_http, [ --enable-protocol-http HTTP support in wxProtocol], wxUSE_PROTOCOL_HTTP) WX_ARG_FEATURE(protocol_ftp, [ --enable-protocol-ftp FTP support in wxProtocol], wxUSE_PROTOCOL_FTP) @@ -655,18 +767,21 @@ WX_ARG_FEATURE(html, [ --enable-html use wxHTML sub-library], WX_ARG_FEATURE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP) WX_ARG_FEATURE(xrc, [ --enable-xrc use XRC resources sub-library], wxUSE_XRC) WX_ARG_FEATURE(aui, [ --enable-aui use AUI docking library], wxUSE_AUI) +WX_ARG_FEATURE(propgrid, [ --enable-propgrid use wxPropertyGrid library], wxUSE_PROPGRID) WX_ARG_FEATURE(stc, [ --enable-stc use wxStyledTextCtrl library], wxUSE_STC) WX_ARG_FEATURE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS) -WX_ARG_FEATURE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE) -WX_ARG_FEATURE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI) -WX_ARG_FEATURE(mdidoc, [ --enable-mdidoc use docview architecture with MDI], wxUSE_MDI_ARCHITECTURE) WX_ARG_FEATURE(loggui, [ --enable-loggui use standard GUI logger], wxUSE_LOGGUI) WX_ARG_FEATURE(logwin, [ --enable-logwin use wxLogWindow], wxUSE_LOGWINDOW) WX_ARG_FEATURE(logdialog, [ --enable-logdialog use wxLogDialog], wxUSE_LOGDIALOG) +WX_ARG_FEATURE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI) +WX_ARG_FEATURE(mdidoc, [ --enable-mdidoc use docview architecture with MDI], wxUSE_MDI_ARCHITECTURE) +WX_ARG_FEATURE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL) +WX_ARG_FEATURE(gstreamer8, [ --enable-gstreamer8 force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix], wxUSE_GSTREAMER8) WX_ARG_FEATURE(webkit, [ --enable-webkit use wxWebKitCtrl (Mac)], wxUSE_WEBKIT) WX_ARG_FEATURE(richtext, [ --enable-richtext use wxRichTextCtrl], wxUSE_RICHTEXT) WX_ARG_FEATURE(graphics_ctx,[ --enable-graphics_ctx use graphics context 2D drawing API], wxUSE_GRAPHICS_CONTEXT) WX_ARG_FEATURE(postscript, [ --enable-postscript use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT) +WX_ARG_FEATURE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE) WX_ARG_FEATURE(svg, [ --enable-svg use wxSVGFileDC device context], wxUSE_SVG) dnl --------------------------------------------------------------------------- @@ -906,7 +1021,7 @@ WX_ARG_FEATURE(tga, [ --enable-tga use tga images (TGA file WX_ARG_FEATURE(iff, [ --enable-iff use iff images (IFF file format)], wxUSE_IFF) WX_ARG_FEATURE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM) WX_ARG_FEATURE(xpm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM) -WX_ARG_FEATURE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR) +WX_ARG_FEATURE(ico_cur, [ --enable-ico_cur use Windows ICO and CUR formats], wxUSE_ICO_CUR) dnl --------------------------------------------------------------------------- dnl wxMSW-only options @@ -918,98 +1033,16 @@ WX_ARG_FEATURE(ownerdrawn, [ --enable-ownerdrawn use owner drawn controls WX_ARG_FEATURE(uxtheme, [ --enable-uxtheme enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME) WX_ARG_FEATURE(wxdib, [ --enable-wxdib use wxDIB class (Win32 only)], wxUSE_DIB) +dnl this one is not really MSW-specific but it exists mainly to be turned off +dnl under MSW, it should be off by default on the other platforms +if test "$wxUSE_MSW" != 1; then + DEFAULT_wxUSE_AUTOID_MANAGEMENT=no fi -dnl for GUI only -dnl check that no more than one toolkit is given and that if none are given that -dnl we have a default one +WX_ARG_FEATURE(autoidman, [ --enable-autoidman use automatic ids management], wxUSE_AUTOID_MANAGEMENT) -AC_MSG_CHECKING(for toolkit) - -# In Wine, we need to default to MSW, not GTK or MOTIF -if test "$wxUSE_WINE" = "yes"; then - DEFAULT_DEFAULT_wxUSE_GTK=0 - DEFAULT_DEFAULT_wxUSE_MOTIF=0 - DEFAULT_DEFAULT_wxUSE_MSW=1 - wxUSE_SHARED=no - CC=${CC:-winegcc} - CXX=${CXX:-wineg++} -fi - - -if test "$wxUSE_GUI" = "yes"; then - - if test "$USE_BEOS" = 1; then - AC_MSG_ERROR([BeOS GUI is not supported yet, use --disable-gui]) - fi - - if test "$TOOLKIT_GIVEN" = 1; then - dnl convert "yes", "any" or a number to 1 and "no" to 0 - for toolkit in $ALL_TOOLKITS; do - var=wxUSE_$toolkit - eval "value=\$${var}" - if test "x$value" = "xno"; then - eval "$var=0" - elif test "x$value" != "x"; then - eval "$var=1" - fi - - if test "x$value" != "x" -a "x$value" != "xyes" -a "x$value" != "xno"; then - eval "wx${toolkit}_VERSION=$value" - fi - done - else - dnl try to guess the most apropriate toolkit for this platform - for toolkit in $ALL_TOOLKITS; do - var=DEFAULT_DEFAULT_wxUSE_$toolkit - eval "wxUSE_$toolkit=\$${var}" - done - fi - - dnl we suppose that expr is available (maybe there is a better way to do - dnl this? what about using ALL_TOOLKITS? TODO) - NUM_TOOLKITS=`expr ${wxUSE_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_MAC:-0} \ - + ${wxUSE_MGL:-0} + ${wxUSE_DFB:-0} + ${wxUSE_MICROWIN:-0} \ - + ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}` - - dnl Allow wxUSE_PM only for OS/2 with EMX. - case "${host}" in - *-pc-os2_emx | *-pc-os2-emx ) - NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}` - esac - - case "$NUM_TOOLKITS" in - 1) - ;; - 0) - AC_MSG_ERROR(Please specify a toolkit -- cannot determine the default for ${host}) - ;; - *) - AC_MSG_ERROR(Please specify at most one toolkit) - esac - - # to be removed when --disable-gtk2 isn't needed - if test "x$wxUSE_GTK2" = "xyes"; then - wxGTK_VERSION=2 - elif test "x$wxUSE_GTK2" = "xno"; then - wxGTK_VERSION=1 - fi - - for toolkit in $ALL_TOOLKITS; do - var=wxUSE_$toolkit - eval "value=\$${var}" - if test "$value" = 1; then - toolkit_echo=`echo $toolkit | tr '[[A-Z]]' '[[a-z]]'` - AC_MSG_RESULT($toolkit_echo) - fi - done -else - if test "x$host_alias" != "x"; then - AC_MSG_RESULT(base ($host_alias hosted) only) - else - AC_MSG_RESULT(base only) - fi fi +dnl for GUI only dnl --------------------------------------------------------------------------- dnl Checks for programs @@ -1097,6 +1130,8 @@ dnl Support the old --enable-universal_binary in case anyone was using it. OSX_UNIV_OPTS="-arch ppc -arch i386" CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS" CFLAGS="$OSX_UNIV_OPTS $CFLAGS" + OBJCXXFLAGS="$OSX_UNIV_OPTS $OBJCXXFLAGS" + OBJCFLAGS="$OSX_UNIV_OPTS $OBJCFLAGS" LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS" dnl NOTE: Only the compiler driver needs arch flags. The link editor dnl is incapable of using them but the compiler driver (which we use @@ -1180,6 +1215,11 @@ dnl We need to quote the next line where we don't need macros and do need [] in else wxUSE_MACOSX_VERSION_MIN= fi +elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then + if test "$wxUSE_MAC" = 1; then + # otherwise configure stops on leopard for universal_binary + wxUSE_MACOSX_VERSION_MIN=10.4 + fi fi if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then @@ -1896,45 +1936,89 @@ if test "$wxUSE_STL" = "yes"; then AC_DEFINE(HAVE_STD_STRING_COMPARE) fi - dnl check for hash_map and hash_set headers - AC_CHECK_HEADER([hash_map], - [AC_CACHE_CHECK([for standard hash_map and hash_set], - wx_cv_class_stdhashmapset, - [AC_TRY_COMPILE([#include - #include ], - [std::hash_map, std::equal_to > test1; - std::hash_set, std::equal_to > test2;], - wx_cv_class_stdhashmapset=yes, - wx_cv_class_stdhashmapset=no) - ] - )], - [], - [ ] - ) - - if test "$wx_cv_class_stdhashmapset" = yes; then - AC_DEFINE(HAVE_HASH_MAP) - AC_DEFINE(HAVE_STD_HASH_MAP) + if test "$wx_cv_class_gnuhashmapset" = yes; then + AC_DEFINE(HAVE_EXT_HASH_MAP) + AC_DEFINE(HAVE_GNU_CXX_HASH_MAP) fi - AC_CHECK_HEADER([ext/hash_map], - [AC_CACHE_CHECK([for GNU hash_map and hash_set], - wx_cv_class_gnuhashmapset, - [AC_TRY_COMPILE([#include - #include ], - [__gnu_cxx::hash_map, std::equal_to > test1; - __gnu_cxx::hash_set, std::equal_to > test2;], - wx_cv_class_gnuhashmapset=yes, - wx_cv_class_gnuhashmapset=no) + AC_CHECK_HEADER([unordered_map], + [AC_CACHE_CHECK([for unordered_map and unordered_set in std], + wx_cv_class_stdunorderedmapset, + [AC_TRY_COMPILE([#include + #include ], + [std::unordered_map test1; + std::unordered_set test2;], + wx_cv_class_stdunorderedmapset=yes, + wx_cv_class_stdunorderedmapset=no) ] )], [], [ ] ) - if test "$wx_cv_class_gnuhashmapset" = yes; then - AC_DEFINE(HAVE_EXT_HASH_MAP) - AC_DEFINE(HAVE_GNU_CXX_HASH_MAP) + if test "$wx_cv_class_stdunorderedmapset" = yes; then + AC_DEFINE(HAVE_STD_UNORDERED_MAP) + AC_DEFINE(HAVE_STD_UNORDERED_SET) + else + AC_CHECK_HEADER([tr1/unordered_map], + [AC_CACHE_CHECK([for unordered_map and unordered_set in std::tr1], + wx_cv_class_tr1unorderedmapset, + [AC_TRY_COMPILE([#include + #include ], + [std::tr1::unordered_map test1; + std::tr1::unordered_set test2; + #if defined(__GNUC__) && (__GNUC__==4) && (__GNUC_MINOR__<2) + #error can't use unordered_{map,set} with gcc-4.[01]: http://gcc.gnu.org/PR24389 + #endif], + wx_cv_class_tr1unorderedmapset=yes, + wx_cv_class_tr1unorderedmapset=no) + ] + )], + [], + [ ] + ) + + if test "$wx_cv_class_tr1unorderedmapset" = yes; then + AC_DEFINE(HAVE_TR1_UNORDERED_MAP) + AC_DEFINE(HAVE_TR1_UNORDERED_SET) + else + dnl check for hash_map and hash_set headers + AC_CHECK_HEADER([hash_map], + [AC_CACHE_CHECK([for std::hash_map and hash_set], + wx_cv_class_stdhashmapset, + [AC_TRY_COMPILE([#include + #include ], + [std::hash_map, std::equal_to > test1; + std::hash_set, std::equal_to > test2;], + wx_cv_class_stdhashmapset=yes, + wx_cv_class_stdhashmapset=no) + ] + )], + [], + [ ] + ) + + if test "$wx_cv_class_stdhashmapset" = yes; then + AC_DEFINE(HAVE_HASH_MAP) + AC_DEFINE(HAVE_STD_HASH_MAP) + fi + + AC_CHECK_HEADER([ext/hash_map], + [AC_CACHE_CHECK([for GNU hash_map and hash_set], + wx_cv_class_gnuhashmapset, + [AC_TRY_COMPILE([#include + #include ], + [__gnu_cxx::hash_map, std::equal_to > test1; + __gnu_cxx::hash_set, std::equal_to > test2;], + wx_cv_class_gnuhashmapset=yes, + wx_cv_class_gnuhashmapset=no) + ] + )], + [], + [ ] + ) + + fi fi fi @@ -1960,6 +2044,10 @@ dnl In the same vein. Motif 2.1 should be tried before Motif 1.2 for the dnl systems which have both (AIX 4.x does) SEARCH_INCLUDE="\ /usr/local/include \ + /usr/local/X11/include \ + /usr/local/include/X11 \ + /usr/local/X11R6/include \ + /usr/local/include/X11R6 \ \ /usr/Motif-2.1/include \ /usr/Motif-1.2/include \ @@ -1972,29 +2060,25 @@ SEARCH_INCLUDE="\ \ /usr/X11R6/include \ /usr/X11R6.4/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ \ /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ \ /usr/X11/include \ /usr/include/X11 \ - /usr/local/X11/include \ - /usr/local/include/X11 \ \ /usr/XFree86/include/X11 \ /usr/pkg/include \ \ + /usr/local/X1R5/include \ + /usr/local/include/X11R5 \ + /usr/X11R5/include \ + /usr/include/X11R5 \ + \ + /usr/local/X11R4/include \ + /usr/local/include/X11R4 \ + /usr/X11R4/include \ + /usr/include/X11R4 \ + \ /usr/openwin/share/include" dnl try to find out the standard lib locations for the systems with multiple @@ -2220,7 +2304,7 @@ if test "$wxUSE_REGEX" != "no"; then AC_DEFINE(wxUSE_REGEX) if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_REGEX" = "yes"; then - AC_MSG_WARN([Defaulting to the the builtin regex library for Unicode build.]) + AC_MSG_WARN([Defaulting to the builtin regex library for Unicode build.]) wxUSE_REGEX=builtin fi @@ -2623,8 +2707,15 @@ if test "$USE_WIN32" = 1 ; then dnl --- FIXME: This is still a somewhat random list of libs, dnl --- some of them should probably be included conditionally. - LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32" - + case "${host}" in + x86_64-*-mingw32* ) + dnl --- For mingw-w64 lctl3d32's name has changed + LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lwctl3d32 -ladvapi32 -lwsock32 -lgdi32" + ;; + * ) + LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32" + ;; + esac if test "$wxUSE_ACCESSIBILITY" = "yes" ; then LIBS="$LIBS -loleacc" fi @@ -3327,7 +3418,7 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config fi fi - if test "$wxUSE_MAC" = 1; then + if test "$wxUSE_OSX_CARBON" = 1; then AC_MSG_CHECKING([for compiler syntax to enable Pascal strings]) if test "$GCC" = yes; then AC_MSG_RESULT([gcc]) @@ -3346,14 +3437,19 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config CPPFLAGS="$CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -DTARGET_CARBON $CPPFLAGS" fi - TOOLKIT=MAC + TOOLKIT=OSX_CARBON dnl we can't call this MAC_DIST or autoconf thinks its a macro - GUIDIST=MACX_DIST + GUIDIST=OSX_CARBON_DIST dnl wxMac version of wxBase and wxCocoa or wxBase-only built on Darwin dnl are different, so they need different names: WXBASEPORT="_carbon" fi + if test "$wxUSE_OSX_COCOA" = 1; then + TOOLKIT=OSX_COCOA + GUIDIST=OSX_COCOA_DIST + fi + if test "$wxUSE_COCOA" = 1; then TOOLKIT=COCOA GUIDIST=COCOA_DIST @@ -3541,7 +3637,7 @@ if test "$wxUSE_OPENGL" = "yes"; then if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then AC_MSG_WARN([wxGLCanvas not implemented for this port, library will be compiled without it.]) wxUSE_OPENGL="no" - elif test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then + elif test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_COCOA" = 1; then OPENGL_LIBS="-framework OpenGL -framework AGL" elif test "$wxUSE_MSW" = 1; then OPENGL_LIBS="-lopengl32 -lglu32" @@ -4008,8 +4104,9 @@ dnl dnl so we first check if the function is in the library dnl dnl FIXME: replace this mess with WX_CHECK_FUNCS() -AC_CHECK_FUNCS(snprintf vsnprintf) +AC_CHECK_FUNCS(snprintf vsnprintf vsscanf) +AC_LANG_PUSH(C++) if test "$ac_cv_func_vsnprintf" = "yes"; then dnl yes it is -- now check if it is in the headers AC_CACHE_CHECK([for vsnprintf declaration], wx_cv_func_vsnprintf_decl, @@ -4145,6 +4242,39 @@ define HAVE_UNIX98_PRINTF as 1 in setup.h if it is available.]) fi fi +dnl the same as above but for vsscanf() now: it's not present in at least +dnl Solaris 9 headers for gcc-3.4 (due to fixinclude's processing of stdio.h) +if test "$ac_cv_func_vsscanf" = "yes"; then + AC_CACHE_CHECK([for vsscanf declaration], wx_cv_func_vsscanf_decl, + [ + AC_TRY_COMPILE( + [ + #include + #include + #ifdef __MSL__ + #if __MSL__ >= 0x6000 + namespace std {} + using namespace std; + #endif + #endif + ], + [ + char *buf; + va_list args; + vsscanf(buf, "%s", args); + ], + wx_cv_func_vsscanf_decl=yes, + wx_cv_func_vsscanf_decl=no + ) + ] + ) + + if test "$wx_cv_func_vsscanf_decl" = "yes"; then + AC_DEFINE(HAVE_VSSCANF_DECL) + fi +fi +AC_LANG_POP() + if test "$wxUSE_UNICODE" = yes; then dnl also look if we have wide char IO functions, notice that [f]putws are @@ -4160,7 +4290,7 @@ if test "$wxUSE_UNICODE" = yes; then fi esac - WX_CHECK_FUNCS(putws fputws wprintf vswprintf,,, + WX_CHECK_FUNCS(putws fputws wprintf vswprintf vswscanf,,, [$wchar_headers]) dnl MinGW has a vswprintf with a different prototype, and @@ -4188,9 +4318,10 @@ dnl the following tests are for Unix(like) systems only if test "$TOOLKIT" != "MSW"; then dnl check for available version of iconv() - -AM_ICONV -LIBS="$LIBICONV $LIBS" +if test "$wxUSE_LIBICONV" != "no" ; then + AM_ICONV + LIBS="$LIBICONV $LIBS" +fi dnl check for POSIX signals if we need them if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then @@ -4529,7 +4660,7 @@ if test "$wxUSE_TARSTREAM" = "yes"; then getgrgid_r(0, &grp, buf, sizeof(buf), &pgrp) ]]) fi - + fi @@ -4871,12 +5002,32 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then AC_MSG_WARN([wxMutex won't be recursive on this platform]) fi fi + + dnl test for compiler thread-specific variables support + AC_CACHE_CHECK([for __thread keyword], + wx_cv_cc___thread, + [ + AC_TRY_COMPILE([#include ], + [ + static __thread int n = 0; + static __thread int *p = 0; + ], + wx_cv_cc___thread=yes, + wx_cv_cc___thread=no + ) + ]) + + if test "$wx_cv_cc___thread" = "yes"; then + AC_DEFINE(HAVE___THREAD_KEYWORD) + fi fi dnl from if !MSW else if test "$wxUSE_THREADS" = "yes" ; then case "${host}" in + x86_64-*-mingw32* ) + ;; *-*-mingw32* ) dnl check if the compiler accepts -mthreads AC_CACHE_CHECK([if compiler supports -mthreads], @@ -4983,7 +5134,6 @@ dnl compilers: we'd need a separate DEBUG_CXXFLAGS if this is ever not the case) DEBUG_CFLAGS= if test "$wxUSE_DEBUG_INFO" = "yes" ; then DEBUG_CFLAGS="-g" - wxUSE_OPTIMISE=no fi if test "$wxUSE_DEBUG_GDB" = "yes" ; then @@ -5133,10 +5283,7 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then HAVE_DL_FUNCS=0 HAVE_SHL_FUNCS=0 if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then - if test "$USE_DARWIN" = 1; then - dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X - HAVE_DL_FUNCS=1 - elif test "$USE_DOS" = 1; then + if test "$USE_DOS" = 1; then HAVE_DL_FUNCS=0 else dnl the test is a bit complicated because we check for dlopen() both with @@ -5170,15 +5317,21 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then ]) ]) - dnl check also for dlerror() - if test "$HAVE_DL_FUNCS" = 1; then - AC_CHECK_FUNCS(dlerror, - AC_DEFINE(HAVE_DLERROR), - [ - AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR)) - ] - ) + dnl check also for dlerror() + if test "$HAVE_DL_FUNCS" = 1; then + AC_CHECK_FUNCS(dlerror, + AC_DEFINE(HAVE_DLERROR), + [ + AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR)) + ] + ) + fi fi + + dnl Force HAVE_DL_FUNCS on for Darwin, even if the tests failed (e.g. pre-10.3) + if test "$USE_DARWIN" = 1; then + dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X + HAVE_DL_FUNCS=1 fi if test "$HAVE_DL_FUNCS" = 0; then @@ -5540,6 +5693,13 @@ if test "$wxUSE_INTL" = "yes" ; then fi fi +if test "$wxUSE_XLOCALE" == "yes" ; then + AC_DEFINE(wxUSE_XLOCALE) + AC_CHECK_TYPES(locale_t,,, + [#include + #include ]) +fi + if test "$wxUSE_LOG" = "yes"; then AC_DEFINE(wxUSE_LOG) @@ -6051,7 +6211,7 @@ if test "$wxUSE_GUI" = "yes" -a "$wxUSE_JOYSTICK" = "yes"; then wxUSE_JOYSTICK=yes dnl mac only available on darwin - elif test "$TOOLKIT" = "MAC" -o "$TOOLKIT" = "COCOA"; then + elif test "$TOOLKIT" = "OSX" -o "$TOOLKIT" = "COCOA"; then if test "$USE_DARWIN" = 1; then dnl check for a bug in the headers, some have bad setEventCallout AC_MSG_CHECKING([headers have declarations needed for joystick support]) @@ -6602,6 +6762,11 @@ if test "$wxUSE_TEXTCTRL" = "yes"; then AC_DEFINE(wxUSE_TEXTCTRL) USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS text" + + dnl we don't have special switches to disable wxUSE_RICHEDIT[2], it doesn't + dnl seem useful to allow disabling them + AC_DEFINE(wxUSE_RICHEDIT) + AC_DEFINE(wxUSE_RICHEDIT2) fi if test "$wxUSE_TOGGLEBTN" = "yes"; then @@ -6727,9 +6892,6 @@ if test "$wxUSE_HTML" = "yes"; then AC_DEFINE(wxUSE_HTML) USE_HTML=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox" - if test "$wxUSE_MAC" = 1; then - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl" - fi fi if test "$wxUSE_WEBKIT" = "yes"; then if test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then @@ -6754,6 +6916,9 @@ if test "$wxUSE_WEBKIT" = "yes"; then else wxUSE_WEBKIT=no fi + if test "$wxUSE_WEBKIT" = "yes"; then + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl" + fi fi USE_XRC=0 @@ -6775,6 +6940,13 @@ if test "$wxUSE_AUI" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS aui" fi +USE_PROPGRID=0 +if test "$wxUSE_PROPGRID" = "yes"; then + AC_DEFINE(wxUSE_PROPGRID) + USE_PROPGRID=1 + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS propgrid" +fi + USE_STC=0 if test "$wxUSE_STC" = "yes"; then AC_DEFINE(wxUSE_STC) @@ -6979,7 +7151,11 @@ if test "$wxUSE_MSW" = 1 ; then fi dnl wxUSE_MSW = 1 - + +dnl not quite MSW-only although mostly useful to disable this under MSW +if test "$wxUSE_AUTOID_MANAGEMENT" = "yes"; then + AC_DEFINE(wxUSE_AUTOID_MANAGEMENT) +fi if test "$USE_WIN32" = 1 ; then if test "$wxUSE_INICONF" = "yes"; then @@ -6996,6 +7172,10 @@ dnl --------------------------------------------------------------------------- dnl wxGraphicsContext dnl --------------------------------------------------------------------------- +if test "$wxUSE_MAC" = 1; then + wxUSE_GRAPHICS_CONTEXT="yes" +fi + if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then AC_DEFINE(wxUSE_GRAPHICS_CONTEXT) @@ -7148,6 +7328,9 @@ if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_AUI" = "yes" ; then BUILT_WX_LIBS="aui $BUILT_WX_LIBS" fi + if test "$wxUSE_PROPGRID" = "yes" ; then + BUILT_WX_LIBS="propgrid $BUILT_WX_LIBS" + fi if test "$wxUSE_STC" = "yes" ; then BUILT_WX_LIBS="stc $BUILT_WX_LIBS" fi @@ -7172,14 +7355,10 @@ if test "$wxUSE_MAC" = 1 ; then if test "$wxUSE_SOUND" = "yes" || test "$wxUSE_MEDIACTRL" = "yes"; then if test "$USE_DARWIN" = 1; then LDFLAGS="$LDFLAGS -framework QuickTime" - else - LDFLAGS="$LDFLAGS -lQuickTimeLib" fi fi if test "$USE_DARWIN" = 1; then - LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework System" - else - LDFLAGS="$LDFLAGS -lCarbonLib" + LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System" fi fi if test "$wxUSE_COCOA" = 1 ; then @@ -7219,6 +7398,12 @@ if test "$wxUSE_GUI" = "yes"; then fi else SAMPLES_SUBDIRS="console" + if test "$wxUSE_SOCKETS" = "yes" ; then + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets" + fi + if test "$wxUSE_IPC" = "yes" ; then + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ipc" + fi fi @@ -7281,6 +7466,8 @@ CPPFLAGS=`echo $WXCONFIG_CPPFLAGS \ C_AND_CXX_FLAGS="$DEBUG_CFLAGS $PROFILE_FLAGS $OPTIMISE_CFLAGS" CFLAGS=`echo $WXCONFIG_CFLAGS $CWARNINGS $C_AND_CXX_FLAGS $CFLAGS ` CXXFLAGS=`echo $WXCONFIG_CXXFLAGS $C_AND_CXX_FLAGS $CXXFLAGS ` +OBJCFLAGS=`echo $WXCONFIG_CFLAGS $CWARNINGS $C_AND_CXX_FLAGS $OBJCFLAGS ` +OBJCXXFLAGS=`echo $WXCONFIG_CXXFLAGS $C_AND_CXX_FLAGS $OBJCXXFLAGS ` dnl now that we added WXCONFIG_CPPFLAGS to CPPFLAGS we can add the wx-config dnl only stuff to it @@ -7410,6 +7597,7 @@ AC_SUBST(EXTRALIBS_MEDIA) AC_SUBST(EXTRALIBS_GUI) AC_SUBST(EXTRALIBS_OPENGL) AC_SUBST(EXTRALIBS_SDL) +AC_SUBST(EXTRALIBS_STC) AC_SUBST(WITH_PLUGIN_SDL) AC_SUBST(EXTRALIBS_GTKPRINT) AC_SUBST(EXTRALIBS_GNOMEPRINT) @@ -7419,7 +7607,11 @@ AC_SUBST(UNICODE) AC_SUBST(BUILD) AC_SUBST(DEBUG_INFO) AC_SUBST(DEBUG_FLAG) -TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'` +if test "$TOOLKIT" = "MAC"; then + TOOLKIT_LOWERCASE=osx +else + TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'` +fi AC_SUBST(TOOLKIT_LOWERCASE) AC_SUBST(TOOLKIT_VERSION) AC_SUBST(SAMPLES_RPATH_FLAG) @@ -7550,7 +7742,7 @@ if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then dnl resources are bundled both with shared library and applications dnl since the carb resource *must* be included in the application - if test "$wxUSE_MAC" = 1; then + if test "$wxUSE_OSX_CARBON" = 1; then POSTLINK_COMMAND="\$(REZ) -d __DARWIN__ -t APPL Carbon.r -o" RESCOMP="$REZ" WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL Carbon.r -o" @@ -7590,7 +7782,11 @@ then AC_MSG_WARN([*** see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13361]) fi - CPPFLAGS="-DWX_PRECOMP $CPPFLAGS" + # Our WX_PRECOMP flag does not make sense for any language except C++ because + # the headers that benefit from precompilation are mostly C++ headers. + CXXFLAGS="-DWX_PRECOMP $CXXFLAGS" + # When Bakefile can do multi-language PCH (e.g. C++ and Objective-C++) enable this: + #OBJCXXFLAGS="-DWX_PRECOMP $CXXFLAGS" fi dnl HACK ALERT!! @@ -7795,6 +7991,11 @@ AC_CONFIG_FILES([ lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace. [ chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ], [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ]) +dnl this is used to run ifacecheck with the same flags used by the compiler +dnl for the real compilation: +AC_CONFIG_FILES([ utils/ifacecheck/rungccxml.sh ], + [ chmod +x utils/ifacecheck/rungccxml.sh ]) + if test "$wx_cv_version_script" = "yes"; then AC_CONFIG_FILES(version-script) fi @@ -7849,16 +8050,21 @@ for subdir in $SUBDIRS; do fi else dnl we build wxBase only - dnl don't take all samples/utils, just those which build with - dnl wxBase + dnl don't take all samples/utils, just those which build with wxBase if test ${subdir} = "samples"; then - makefiles="samples/Makefile.in samples/console/Makefile.in" + dnl only take those samples which compile in the current + dnl configuration and which exist + makefiles="samples/Makefile.in $makefiles" + for sample in `echo $SAMPLES_SUBDIRS`; do + if test -d $srcdir/samples/$sample; then + makefiles="samples/$sample/Makefile.in $makefiles" + fi + done elif test ${subdir} = "utils"; then makefiles="" - for util in HelpGen tex2rtf ; do + for util in ifacecheck ; do if test -d $srcdir/utils/$util ; then - makefiles="utils/$util/Makefile.in \ - utils/$util/src/Makefile.in \ + makefiles="utils/$util/src/Makefile.in \ $makefiles" fi done