X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd74a7ad6787f028629ba32211ebf1e2aeb34dbd..553c5bcc3ab65e8b8a002dc6d5f51cba4f39292c:/include/wx/chkconf.h diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 631c99b1af..7331f4858b 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -1,15 +1,25 @@ +/** +* Name: wx/chkconf.h +* Purpose: check the config settings for consistency +* Author: Vadim Zeitlin +* Modified by: +* Created: 09.08.00 +* RCS-ID: $Id$ +* Copyright: (c) 2000 Vadim Zeitlin +* Licence: wxWindows licence +*/ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + /* - * Name: wx/chkconf.h - * Purpose: check the config settings for consistency - * Author: Vadim Zeitlin - * Modified by: - * Created: 09.08.00 - * RCS-ID: $Id$ - * Copyright: (c) 2000 Vadim Zeitlin - * Licence: wxWindows licence + Compiler-specific checking. */ -/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ +#if defined(__WXMSW__) +# include "wx/msw/chkconf.h" +#elif defined(__WXMAC__) +# include "wx/mac/chkconf.h" +#endif /* this global setting determines what should we do if the setting FOO @@ -28,16 +38,6 @@ # define wxUSE_GUI 1 #endif /* !defined(wxUSE_GUI) */ -/* wxBase doesn't need compatibility settings as it's a new port */ -#if !wxUSE_GUI -# undef WXWIN_COMPATIBILITY -# undef WXWIN_COMPATIBILITY_2 -# undef WXWIN_COMPATIBILITY_2_2 -# define WXWIN_COMPATIBILITY 0 -# define WXWIN_COMPATIBILITY_2 0 -# define WXWIN_COMPATIBILITY_2_2 0 -#endif /* !wxUSE_GUI */ - /* tests for non GUI features */ @@ -50,6 +50,14 @@ # endif #endif /* !defined(wxUSE_DYNLIB_CLASS) */ +#ifndef wxUSE_EXCEPTIONS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_EXCEPTIONS must be defined." +# else +# define wxUSE_EXCEPTIONS 0 +# endif +#endif /* !defined(wxUSE_EXCEPTIONS) */ + #ifndef wxUSE_FILESYSTEM # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_FILESYSTEM must be defined." @@ -145,6 +153,14 @@ # endif #endif /* !defined(wxUSE_REGEX) */ +#ifndef wxUSE_XML +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_XML must be defined." +# else +# define wxUSE_XML 0 +# endif +#endif /* !defined(wxUSE_XML) */ + #ifndef wxUSE_SOCKETS # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_SOCKETS must be defined." @@ -315,6 +331,14 @@ # endif #endif /* !defined(wxUSE_DATAOBJ) */ +#ifndef wxUSE_DISPLAY +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DISPLAY must be defined." +# else +# define wxUSE_DISPLAY 0 +# endif +#endif /* !defined(wxUSE_DISPLAY) */ + #ifndef wxUSE_DOC_VIEW_ARCHITECTURE # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined." @@ -379,6 +403,19 @@ # endif #endif /* !defined(wxUSE_HTML) */ +#ifndef wxUSE_LIBMSPACK +# ifndef __UNIX__ + /* set to 0 on platforms that don't have libmspack */ +# define wxUSE_LIBMSPACK 0 +# else +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LIBMSPACK must be defined." +# else +# define wxUSE_LIBMSPACK 0 +# endif +# endif +#endif /* !defined(wxUSE_LIBMSPACK) */ + #ifndef wxUSE_ICO_CUR # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_ICO_CUR must be defined." @@ -411,6 +448,14 @@ # endif #endif /* !defined(wxUSE_JOYSTICK) */ +#ifndef wxUSE_LISTBOOK +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LISTBOOK must be defined." +# else +# define wxUSE_LISTBOOK 0 +# endif +#endif /* !defined(wxUSE_LISTBOOK) */ + #ifndef wxUSE_LISTBOX # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_LISTBOX must be defined." @@ -547,6 +592,14 @@ # endif #endif /* !defined(wxUSE_SLIDER) */ +#ifndef wxUSE_SOUND +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SOUND must be defined." +# else +# define wxUSE_SOUND 0 +# endif +#endif /* !defined(wxUSE_SOUND) */ + #ifndef wxUSE_SPINBTN # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_SPINBTN must be defined." @@ -667,13 +720,13 @@ # endif #endif /* !defined(wxUSE_TREECTRL) */ -#ifndef wxUSE_DISPLAY +#ifndef wxUSE_VALIDATORS # ifdef wxABORT_ON_CONFIG_ERROR -# error "wxUSE_DISPLAY must be defined." +# error "wxUSE_VALIDATORS must be defined." # else -# define wxUSE_DISPLAY 0 +# define wxUSE_VALIDATORS 0 # endif -#endif /* !defined(wxUSE_TREECTRL) */ +#endif /* !defined(wxUSE_VALIDATORS) */ #ifndef wxUSE_WXHTML_HELP # ifdef wxABORT_ON_CONFIG_ERROR @@ -733,6 +786,17 @@ # endif #endif /* wxUSE_PROTOCOL */ +#if wxUSE_GZSTREAM +# if !wxUSE_ZLIB +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_GZSTREAM requires wxUSE_ZLIB" +# else +# undef wxUSE_ZLIB +# define wxUSE_ZLIB 1 +# endif +# endif +#endif /* wxUSE_GZSTREAM */ + /* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */ #if wxUSE_HTML # if !wxUSE_FILESYSTEM @@ -756,6 +820,17 @@ # endif #endif /* wxUSE_FILESYSTEM */ +#if wxUSE_FS_INET +# if !wxUSE_PROTOCOL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FS_INET requires wxUSE_PROTOCOL" +# else +# undef wxUSE_PROTOCOL +# define wxUSE_PROTOCOL 1 +# endif +# endif +#endif /* wxUSE_FS_INET */ + #if wxUSE_STOPWATCH || wxUSE_DATETIME # if !wxUSE_LONGLONG # ifdef wxABORT_ON_CONFIG_ERROR @@ -803,7 +878,9 @@ # endif #endif /* wxUSE_UNICODE_MSLU */ -#if wxUSE_ODBC && wxUSE_UNICODE +/* ODBC and Unicode are now compatible */ + +#if 0 /* wxUSE_ODBC && wxUSE_UNICODE */ # ifdef wxABORT_ON_CONFIG_ERROR /* (ODBC classes aren't Unicode-compatible yet) */ # error "wxUSE_ODBC can't be used with wxUSE_UNICODE" @@ -813,6 +890,25 @@ # endif #endif /* wxUSE_ODBC */ +#if wxUSE_XML && !wxUSE_WCHAR_T +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_XML requires wxUSE_WCHAR_T" +# else +# undef wxUSE_XML +# define wxUSE_XML 0 +# endif +#endif /* wxUSE_UNICODE_MSLU */ + +#if !wxUSE_DYNLIB_CLASS +# if wxUSE_DYNAMIC_LOADER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS." +# else +# define wxUSE_DYNLIB_CLASS 1 +# endif +# endif +#endif /* wxUSE_DYNLIB_CLASS */ + /* the rest of the tests is for the GUI settings only */ #if wxUSE_GUI @@ -853,6 +949,31 @@ # endif #endif /* controls */ +#if wxUSE_NOTEBOOK || wxUSE_LISTBOOK +# if defined(wxUSE_BOOKCTRL) && !wxUSE_BOOKCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_BOOKCTRL must be set." +# else +# undef wxUSE_BOOKCTRL +# endif +# endif + +# ifndef wxUSE_BOOKCTRL +# define wxUSE_BOOKCTRL 1 +# endif +#endif /* wxUSE_NOTEBOOK */ + +#if wxUSE_LISTBOOK +# if !wxUSE_LISTCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxListbook requires wxListCtrl" +# else +# undef wxUSE_LISTCTRL +# define wxUSE_LISTCTRL 1 +# endif +# endif +#endif /* wxUSE_LISTBOOK */ + /* wxUniv-specific dependencies */ #if defined(__WXUNIVERSAL__) # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN @@ -941,6 +1062,20 @@ # define wxUSE_UNICODE_MSLU 0 # endif # endif /* wxUSE_UNICODE_MSLU */ +# ifndef wxUSE_UXTHEME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_UXTHEME must be defined." +# else +# define wxUSE_UXTHEME 0 +# endif +# endif /* wxUSE_UXTHEME */ +# ifndef wxUSE_UXTHEME_AUTO +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_UXTHEME_AUTO must be defined." +# else +# define wxUSE_UXTHEME_AUTO 0 +# endif +# endif /* wxUSE_UXTHEME_AUTO */ # ifndef wxUSE_MS_HTML_HELP # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_MS_HTML_HELP must be defined." @@ -999,6 +1134,15 @@ # endif #endif /* wxMGL */ +/* Hopefully we can emulate these dialogs in due course */ +#if wxUSE_SMARTPHONE +# ifdef wxUSE_COLOURDLG +# undef wxUSE_COLOURDLG +# define wxUSE_COLOURDLG 0 +# endif +#endif /* wxUSE_SMARTPHONE */ + + /* generic controls dependencies */ #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__) # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG @@ -1077,6 +1221,104 @@ # endif #endif /* wxUSE_WXHTML_HELP */ +#if !wxUSE_IMAGE +/* + The default wxUSE_IMAGE setting is 1, so if it's set to 0 we assume the + user explicitly wants this and disable all other features that require + wxUSE_IMAGE. + */ +# if wxUSE_DRAGIMAGE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DRAGIMAGE requires wxUSE_IMAGE" +# else +# undef wxUSE_DRAGIMAGE +# define wxUSE_DRAGIMAGE 0 +# endif +# endif + +# if wxUSE_LIBPNG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LIBPNG requires wxUSE_IMAGE" +# else +# undef wxUSE_LIBPNG +# define wxUSE_LIBPNG 0 +# endif +# endif + +# if wxUSE_LIBJPEG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LIBJPEG requires wxUSE_IMAGE" +# else +# undef wxUSE_LIBJPEG +# define wxUSE_LIBJPEG 0 +# endif +# endif + +# if wxUSE_LIBTIFF +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LIBTIFF requires wxUSE_IMAGE" +# else +# undef wxUSE_LIBTIFF +# define wxUSE_LIBTIFF 0 +# endif +# endif + +# if wxUSE_GIF +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_GIF requires wxUSE_IMAGE" +# else +# undef wxUSE_GIF +# define wxUSE_GIF 0 +# endif +# endif + +# if wxUSE_PNM +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PNM requires wxUSE_IMAGE" +# else +# undef wxUSE_PNM +# define wxUSE_PNM 0 +# endif +# endif + +# if wxUSE_PCX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PCX requires wxUSE_IMAGE" +# else +# undef wxUSE_PCX +# define wxUSE_PCX 0 +# endif +# endif + +# if wxUSE_IFF +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_IFF requires wxUSE_IMAGE" +# else +# undef wxUSE_IFF +# define wxUSE_IFF 0 +# endif +# endif + +# if wxUSE_TOOLBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TOOLBAR requires wxUSE_IMAGE" +# else +# undef wxUSE_TOOLBAR +# define wxUSE_TOOLBAR 0 +# endif +# endif + +# if wxUSE_XPM +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_XPM requires wxUSE_IMAGE" +# else +# undef wxUSE_XPM +# define wxUSE_XPM 0 +# endif +# endif + +#endif /* !wxUSE_IMAGE */ + #if wxUSE_DOC_VIEW_ARCHITECTURE # if !wxUSE_MENUS # ifdef wxABORT_ON_CONFIG_ERROR @@ -1106,15 +1348,6 @@ # define wxUSE_COMBOBOX 1 # endif # endif - -# if !wxUSE_DOC_VIEW_ARCHITECTURE -# ifdef wxABORT_ON_CONFIG_ERROR -# error "Print architecture requires wxUSE_DOC_VIEW_ARCHITECTURE" -# else -# undef wxUSE_DOC_VIEW_ARCHITECTURE -# define wxUSE_DOC_VIEW_ARCHITECTURE 1 -# endif -# endif #endif /* wxUSE_PRINTING_ARCHITECTURE */ #if wxUSE_MDI_ARCHITECTURE