X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6517fa86c3c162a6ce8e38ed1ab9e59cdcd9cbea..d47018c76133cf7013c1ef864481f21285c85d13:/configure.in?ds=sidebyside diff --git a/configure.in b/configure.in index 503c1be899..887522ebb7 100644 --- a/configure.in +++ b/configure.in @@ -109,9 +109,9 @@ DEFAULT_wxUSE_PM=0 DEFAULT_wxUSE_X11=0 DEFAULT_wxUSE_DFB=0 -dnl these are the values which are really default for the given platform - -dnl they're not cached and are only used if no --with-toolkit was given *and* -dnl nothing was found in the cache +dnl these are the values which are really default for the given platform: +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 @@ -361,8 +361,6 @@ dnl platform should be changed, it can be done here too) dnl dnl NB: see also DEFAULT_wxUSE variables defined above -WX_ARG_CACHE_INIT - dnl it's only necessary to list the options which should be disabled by dnl default, all the rest have default value of "yes" (or, rather, of dnl wxUSE_ALL_FEATURES which is the only which has to be set to "yes" by @@ -382,10 +380,11 @@ DEFAULT_wxUSE_OPENGL=no dnl features disabled by default DEFAULT_wxUSE_ACCESSIBILITY=no -DEFAULT_wxUSE_DATAVIEWCTRL=no DEFAULT_wxUSE_GRAPHICS_CONTEXT=no +DEFAULT_wxUSE_IPV6=no DEFAULT_wxUSE_MEDIACTRL=no DEFAULT_wxUSE_TAB_DIALOG=no +DEFAULT_wxUSE_GSTREAMER8=no DEFAULT_wxUSE_UNICODE_UTF8=auto DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no @@ -401,21 +400,6 @@ DEFAULT_wxUSE_GTK2=yes dnl Always default to no. Only special cases require this. DEFAULT_wxUSE_OBJC_UNIQUIFYING=no - -for toolkit in $ALL_TOOLKITS; do - LINE=`grep "wxUSE_$toolkit=" ${wx_arg_cache_file}` - if test "x$LINE" != "x" ; then - has_toolkit_in_cache=1 - eval "DEFAULT_$LINE" - eval "CACHE_$toolkit=1" - - LINE=`grep "wx${toolkit}_VERSION=" ${wx_arg_cache_file}` - if test "x$LINE" != "x" ; then - eval "DEFAULT_$LINE" - fi - fi -done - dnl =========================== dnl deal with configure options dnl =========================== @@ -467,8 +451,7 @@ if test "$wxUSE_UNIVERSAL" = "yes"; then fi 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, and we don't need to cache them -dnl automatically +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]) @@ -485,6 +468,96 @@ 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_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 --------------------------------------------------------------------------- dnl external libraries dnl --------------------------------------------------------------------------- @@ -493,6 +566,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) @@ -513,16 +587,6 @@ AC_MSG_CHECKING([for --with-macosx-sdk]) AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], [ wxUSE_MACOSX_SDK=$withval wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval" - echo "wxUSE_MACOSX_SDK=$wxUSE_MACOSX_SDK" >> ${wx_arg_cache_file}.tmp - ], [ - # NOTE: Empty string on purpose so that --without-macosx-sdk (thus no) - # will override --enable-universal_binary's automatic SDK usage. - wxUSE_MACOSX_SDK= - LINE=`grep "^wxUSE_MACOSX_SDK=" ${wx_arg_cache_file}` - if test "x$LINE" != x ; then - eval "$LINE" - echo "$LINE" >> ${wx_arg_cache_file}.tmp - fi ]) AC_MSG_RESULT([$wxUSE_MACOSX_SDK]) @@ -530,17 +594,6 @@ AC_MSG_CHECKING([for --with-macosx-version-min]) AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version], [ wxUSE_MACOSX_VERSION_MIN=$withval wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval" - echo "wxUSE_MACOSX_VERSION_MIN=$wxUSE_MACOSX_VERSION_MIN" >> ${wx_arg_cache_file}.tmp - ], [ - # default "yes" because when not using an SDK it means the same as no - # but when using an SDK it means to use the SDK version - wxUSE_MACOSX_VERSION_MIN=yes - # See if there is a value in the cache - LINE=`grep "^wxUSE_MACOSX_VERSION_MIN=" ${wx_arg_cache_file}` - if test "x$LINE" != x ; then - eval "$LINE" - echo "$LINE" >> ${wx_arg_cache_file}.tmp - fi ]) AC_MSG_RESULT([$wxUSE_MACOSX_VERSION_MIN]) @@ -564,18 +617,28 @@ if test "$USE_OS2" = 1; then WX_ARG_ENABLE(omf, [ --enable-omf use OMF object format], wxUSE_OMF) fi +dnl --enablle-debug is equivalent to both --enable-debug_flag and +dnl --enable-debug_info if test "$wxUSE_DEBUG" = "yes"; then - DEFAULT_wxUSE_DEBUG_FLAG=yes - DEFAULT_wxUSE_DEBUG_INFO=yes - BUILD=debug + DEFAULT_wxUSE_DEBUG_FLAG=yes + DEFAULT_wxUSE_DEBUG_INFO=yes + BUILD=debug elif test "$wxUSE_DEBUG" = "no"; then - DEFAULT_wxUSE_DEBUG_FLAG=no - DEFAULT_wxUSE_DEBUG_INFO=no - BUILD=release + DEFAULT_wxUSE_DEBUG_FLAG=no + DEFAULT_wxUSE_DEBUG_INFO=no + BUILD=release fi WX_ARG_ENABLE(debug_flag, [ --enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)], wxUSE_DEBUG_FLAG) WX_ARG_ENABLE(debug_info, [ --enable-debug_info create code with debugging information], wxUSE_DEBUG_INFO) + +dnl it's important to also do it in the other direction to get the correct +dnl output in the configure summary (which uses wxUSE_DEBUG) +if test "$wxUSE_DEBUG_FLAG" = "yes" -a "$wxUSE_DEBUG_INFO" = "yes"; then + wxUSE_DEBUG=yes + BUILD=debug +fi + 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) @@ -601,6 +664,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) @@ -608,6 +672,7 @@ WX_ARG_FEATURE(ftp, [ --enable-ftp use wxFTP (requires wxP WX_ARG_FEATURE(http, [ --enable-http use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP) WX_ARG_FEATURE(fileproto, [ --enable-fileproto use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE) WX_ARG_FEATURE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS) +WX_ARG_FEATURE(ipv6, [ --enable-ipv6 enable IPv6 support in wxSocket], wxUSE_IPV6) WX_ARG_FEATURE(ole, [ --enable-ole use OLE classes (Win32 only)], wxUSE_OLE) WX_ARG_FEATURE(dataobj, [ --enable-dataobj use data object classes], wxUSE_DATAOBJ) @@ -642,7 +707,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) @@ -651,14 +718,12 @@ 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(weakref, [ --enable-weakref make wxEvtHandler trackable with wxWeakRef<>], wxUSE_WEAKREF) 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) @@ -684,16 +749,18 @@ WX_ARG_FEATURE(xrc, [ --enable-xrc use XRC resources sub-lib WX_ARG_FEATURE(aui, [ --enable-aui use AUI docking library], wxUSE_AUI) 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 --------------------------------------------------------------------------- @@ -740,7 +807,7 @@ if test "$wxUSE_CONTROLS" = "yes"; then DEFAULT_wxUSE_GAUGE=yes DEFAULT_wxUSE_GRID=yes DEFAULT_wxUSE_HYPERLINKCTRL=yes - DEFAULT_wxUSE_DATAVIEWCTRL=no + DEFAULT_wxUSE_DATAVIEWCTRL=yes DEFAULT_wxUSE_IMAGLIST=yes DEFAULT_wxUSE_LISTBOOK=yes DEFAULT_wxUSE_LISTBOX=yes @@ -857,6 +924,7 @@ WX_ARG_FEATURE(listbook, [ --enable-listbook use wxListbook class], wx WX_ARG_FEATURE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX) WX_ARG_FEATURE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL) WX_ARG_FEATURE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK) +WX_ARG_FEATURE(notifmsg, [ --enable-notifmsg use wxNotificationMessage class], wxUSE_NOTIFICATION_MESSAGE) WX_ARG_FEATURE(odcombobox, [ --enable-odcombobox use wxOwnerDrawnComboBox class], wxUSE_ODCOMBOBOX) WX_ARG_FEATURE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX) WX_ARG_FEATURE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN) @@ -932,7 +1000,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 @@ -944,122 +1012,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 cache the options values before (may be) aborting below -WX_ARG_CACHE_FLUSH - -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 - if test "$has_toolkit_in_cache" != 1; then - var=DEFAULT_DEFAULT_wxUSE_$toolkit - else - var=DEFAULT_wxUSE_$toolkit - - eval "version=\$DEFAULT_wx${toolkit}_VERSION" - if test "x$version" != "x"; then - eval "wx${toolkit}_VERSION=$version" - fi - fi - 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 +WX_ARG_FEATURE(autoidman, [ --enable-autoidman use automatic ids management], wxUSE_AUTOID_MANAGEMENT) - 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 (maybe some are cached in configarg.cache?)) - 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 - - dnl cache the wxUSE_ values too - for toolkit in $ALL_TOOLKITS; do - var=wxUSE_$toolkit - eval "value=\$${var}" - if test "x$value" != x; then - cache_var=CACHE_$toolkit - eval "cache=\$${cache_var}" - if test "$cache" = 1; then - echo "$var=$value" >> ${wx_arg_cache_file} - eval "version=\$wx${toolkit}_VERSION" - if test "x$version" != "x"; then - echo "wx${toolkit}_VERSION=$version" >> ${wx_arg_cache_file} - fi - fi - if test "$value" = 1; then - toolkit_echo=`echo $toolkit | tr A-Z a-z` - AC_MSG_RESULT($toolkit_echo) - fi - 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 @@ -1147,6 +1109,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 @@ -1230,6 +1194,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 @@ -1879,7 +1848,7 @@ if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then if test "$wx_cv_class_stdbasicstring" != yes; then if test "$wxUSE_STL" = "yes"; then AC_MSG_ERROR([Can't use --enable-stl without $std_string or std::basic_string<$char_type>]) - elif grep wxUSE_STD_STRING $wx_arg_cache_file >/dev/null; then + elif test "$wxUSE_STD_STRING" = "yes"; then AC_MSG_ERROR([Can't use --enable-std_string without $std_string or std::basic_string<$char_type>]) else AC_MSG_WARN([No $std_string or std::basic_string<$char_type>, switching to --disable-std_string]) @@ -1895,7 +1864,7 @@ if test "$wxUSE_STD_IOSTREAM" = "yes"; then [#include ]) if test "$wxUSE_STD_IOSTREAM" != "yes"; then - if grep wxUSE_STD_IOSTREAM $wx_arg_cache_file >/dev/null; then + if test "$wxUSE_STD_IOSTREAM" = "yes"; then AC_MSG_ERROR([Can't use --enable-std_iostreams without std::istream and std::ostream]) else AC_MSG_WARN([No std::iostreams, switching to --disable-std_iostreams]) @@ -2270,7 +2239,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 @@ -2836,15 +2805,6 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config CFLAGS="$wx_cv_cflags_gtk $CFLAGS" LIBS="$LIBS $wx_cv_libs_gtk" - dnl gtk_icon_size_lookup is not available in the GTK+ headers - dnl that have shipped with some versions of Sun's JDS. Not using - dnl AC_CHECK_FUNCS here since it only checks the function exists - dnl in the lib (not the header). - AC_CHECK_DECLS([gtk_icon_size_lookup], [], - [AC_DEFINE(NEED_GTK_ICON_SIZE_LOOKUP)], - [#include ]) - - dnl test if we have at least GTK+ 2.10: AC_MSG_CHECKING([if GTK+ is version >= 2.10]) AC_TRY_COMPILE([ @@ -3447,7 +3407,7 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config if test "$TOOLKIT" = "PM" ; then TOOLKIT_DIR="os2" else - TOOLKIT_DIR=`echo ${TOOLKIT} | tr A-Z a-z` + TOOLKIT_DIR=`echo ${TOOLKIT} | tr '[[A-Z]]' '[[a-z]]'` fi if test "$wxUSE_UNIVERSAL" = "yes"; then @@ -3837,7 +3797,7 @@ if test "$wxUSE_DEBUG_INFO" = "yes"; then DEBUG_INFO=1 fi -WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}_${WX_RELEASE} | tr a-z A-Z` +WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}_${WX_RELEASE} | tr '[[a-z]]' '[[A-Z]]'` TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}" @@ -3902,8 +3862,6 @@ dnl defines pid_t if not already defined AC_TYPE_PID_T dnl defines size_t if not already defined AC_TYPE_SIZE_T -dnl defines uid_t and gid_t if not already defined -AC_TYPE_UID_T dnl sets HAVE_SSIZE_T if ssize_t is defined AC_CHECK_TYPES(ssize_t) @@ -4069,8 +4027,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, @@ -4206,6 +4165,38 @@ 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, *parse; + vsscanf(buf, "%s", parse); + ], + 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 @@ -4221,7 +4212,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 @@ -4249,9 +4240,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 @@ -4590,7 +4582,7 @@ if test "$wxUSE_TARSTREAM" = "yes"; then getgrgid_r(0, &grp, buf, sizeof(buf), &pgrp) ]]) fi - + fi @@ -5194,10 +5186,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 @@ -5231,15 +5220,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 @@ -5601,6 +5596,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) @@ -6025,6 +6027,33 @@ if test "$wxUSE_SOCKETS" = "yes" ; then fi if test "$wxUSE_SOCKETS" = "yes" ; then + if test "$wxUSE_IPV6" = "yes"; then + AC_CACHE_CHECK( + [whether we have sockaddr_in6], + [wx_cv_type_sockaddr_in6], + [ + AC_TRY_COMPILE( + [ + #include + #include + #include + ], + [ + struct sockaddr_in6 sa6; + ], + wx_cv_type_sockaddr_in6=yes, + wx_cv_type_sockaddr_in6=no + ) + ] + ) + + if test "$wx_cv_type_sockaddr_in6"="yes"; then + AC_DEFINE(wxUSE_IPV6) + else + AC_MSG_WARN([IPv6 support not available... disabled]) + fi + fi + AC_DEFINE(wxUSE_SOCKETS) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets" fi @@ -6069,6 +6098,10 @@ if test "$wxUSE_VARIANT" = "yes"; then AC_DEFINE(wxUSE_VARIANT) fi +if test "$wxUSE_WEAKREF" = "yes"; then + AC_DEFINE(wxUSE_WEAKREF) +fi + if test "$wxUSE_FS_INET" = "yes"; then AC_DEFINE(wxUSE_FS_INET) fi @@ -6543,6 +6576,10 @@ if test "$wxUSE_NOTEBOOK" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" fi +if test "$wxUSE_NOTIFICATION_MESSAGE" = "yes"; then + AC_DEFINE(wxUSE_NOTIFICATION_MESSAGE) +fi + if test "$wxUSE_ODCOMBOBOX" = "yes"; then AC_DEFINE(wxUSE_ODCOMBOBOX) USES_CONTROLS=1 @@ -6693,7 +6730,7 @@ if test "$wxUSE_TREECTRL" = "yes"; then fi if test "$wxUSE_POPUPWIN" = "yes"; then - if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 ; then + if test "$wxUSE_COCOA" = 1 ; then AC_MSG_WARN([Popup window not yet supported under Mac OS X... disabled]) else if test "$wxUSE_PM" = 1; then @@ -7009,7 +7046,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 @@ -7097,7 +7138,7 @@ if test "$wxUSE_MEDIACTRL" = "yes"; then if test "$wxUSE_GSTREAMER" = "yes"; then CPPFLAGS="$GST_CFLAGS $CPPFLAGS" - LIBS="$GST_LIBS $LIBS" + EXTRALIBS_MEDIA="$GST_LIBS" AC_DEFINE(wxUSE_GSTREAMER) else @@ -7207,7 +7248,7 @@ if test "$wxUSE_MAC" = 1 ; then fi fi if test "$USE_DARWIN" = 1; then - LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework System" + LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System" else LDFLAGS="$LDFLAGS -lCarbonLib" fi @@ -7249,6 +7290,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 @@ -7311,6 +7358,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 @@ -7337,6 +7386,7 @@ LIBS=`echo $LIBS` EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS" EXTRALIBS_XML="$EXPAT_LINK" EXTRALIBS_HTML="$MSPACK_LINK" +EXTRALIBS_MEDIA="$GST_LIBS" EXTRALIBS_STC="-lwxscintilla${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX}" if test "$wxUSE_GUI" = "yes"; then EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $WEBKIT_LINK $EXTRALIBS_HILDON $EXTRALIBS_GNOMEVFS $EXTRALIBS_GNOMEPRINT` @@ -7383,7 +7433,7 @@ if test "x$wxUSE_UNIVERSAL" = "xyes" ; then ;; *) - for t in `echo $wxUNIV_THEMES | tr , ' ' | tr a-z A-Z`; do + for t in `echo $wxUNIV_THEMES | tr , ' ' | tr '[[a-z]]' '[[A-Z]]'`; do AC_DEFINE_UNQUOTED(wxUSE_THEME_$t) done esac @@ -7435,9 +7485,11 @@ AC_SUBST(CXXWARNINGS) AC_SUBST(EXTRALIBS) AC_SUBST(EXTRALIBS_XML) AC_SUBST(EXTRALIBS_HTML) +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) @@ -7447,7 +7499,7 @@ AC_SUBST(UNICODE) AC_SUBST(BUILD) AC_SUBST(DEBUG_INFO) AC_SUBST(DEBUG_FLAG) -TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr A-Z a-z` +TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'` AC_SUBST(TOOLKIT_LOWERCASE) AC_SUBST(TOOLKIT_VERSION) AC_SUBST(SAMPLES_RPATH_FLAG) @@ -7520,7 +7572,7 @@ then if $CXX -o conftest$PROGRAM_EXT conftest.cpp >/dev/null 2>&1 then - if tr -dc a-z < conftest$PROGRAM_EXT | + if tr -dc '[a-z]' < conftest$PROGRAM_EXT | grep awidetest >/dev/null then wx_cv_gcc_pch_bug=no @@ -7618,7 +7670,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!! @@ -7823,6 +7879,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 @@ -7870,23 +7931,28 @@ for subdir in $SUBDIRS; do dnl assume that everything compiles for utils &c dnl any that shouldn't be built can be added to dnl DISABLED_UTILS, DISABLED_DEMOS - disabled_var=DISABLED_`echo $subdir | tr a-z A-Z` + disabled_var=DISABLED_`echo $subdir | tr '[[a-z]]' '[[A-Z]]'` eval "disabled=\$$disabled_var" disabled=/`echo X $disabled | sed 's@ @/|/@g'`/ makefiles=`(cd $srcdir ; find $subdir -name Makefile.in) | $EGREP -v "$disabled"` 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