]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/chkconf.h
3 * Purpose: check the config settings for consistency
4 * Author: Vadim Zeitlin
8 * Copyright: (c) 2000 Vadim Zeitlin <vadim@wxwindows.org>
9 * Licence: wxWindows licence
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
15 Compiler-specific checking.
18 #if defined(__WXMSW__)
19 # include "wx/msw/chkconf.h"
20 #elif defined(__WXMAC__)
21 # include "wx/mac/chkconf.h"
25 this global setting determines what should we do if the setting FOO
26 requires BAR and BAR is not set: we can either silently define BAR
27 (default, recommended) or give an error and abort (mainly useful for
30 #define wxABORT_ON_CONFIG_ERROR
36 /* GUI build by default */
37 #if !defined(wxUSE_GUI)
39 #endif /* !defined(wxUSE_GUI) */
41 /* wxBase doesn't need compatibility settings as it's a new port */
43 # undef WXWIN_COMPATIBILITY
44 # undef WXWIN_COMPATIBILITY_2
45 # undef WXWIN_COMPATIBILITY_2_2
46 # define WXWIN_COMPATIBILITY 0
47 # define WXWIN_COMPATIBILITY_2 0
48 # define WXWIN_COMPATIBILITY_2_2 0
49 #endif /* !wxUSE_GUI */
52 tests for non GUI features
55 #ifndef wxUSE_DYNLIB_CLASS
56 # ifdef wxABORT_ON_CONFIG_ERROR
57 # error "wxUSE_DYNLIB_CLASS must be defined."
59 # define wxUSE_DYNLIB_CLASS 0
61 #endif /* !defined(wxUSE_DYNLIB_CLASS) */
63 #ifndef wxUSE_FILESYSTEM
64 # ifdef wxABORT_ON_CONFIG_ERROR
65 # error "wxUSE_FILESYSTEM must be defined."
67 # define wxUSE_FILESYSTEM 0
69 #endif /* !defined(wxUSE_FILESYSTEM) */
71 /* don't give an error about this one yet, it's not fully implemented */
72 #ifndef wxUSE_FSVOLUME
73 # define wxUSE_FSVOLUME 0
74 #endif /* !defined(wxUSE_FSVOLUME) */
76 #ifndef wxUSE_DYNAMIC_LOADER
77 # ifdef wxABORT_ON_CONFIG_ERROR
78 # error "wxUSE_DYNAMIC_LOADER must be defined."
80 # define wxUSE_DYNAMIC_LOADER 0
82 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
85 # ifdef wxABORT_ON_CONFIG_ERROR
86 # error "wxUSE_LOG must be defined."
90 #endif /* !defined(wxUSE_LOG) */
92 #ifndef wxUSE_LONGLONG
93 # ifdef wxABORT_ON_CONFIG_ERROR
94 # error "wxUSE_LONGLONG must be defined."
96 # define wxUSE_LONGLONG 0
98 #endif /* !defined(wxUSE_LONGLONG) */
100 #ifndef wxUSE_MIMETYPE
101 # ifdef wxABORT_ON_CONFIG_ERROR
102 # error "wxUSE_MIMETYPE must be defined."
104 # define wxUSE_MIMETYPE 0
106 #endif /* !defined(wxUSE_MIMETYPE) */
108 #ifndef wxUSE_PROTOCOL
109 # ifdef wxABORT_ON_CONFIG_ERROR
110 # error "wxUSE_PROTOCOL must be defined."
112 # define wxUSE_PROTOCOL 0
114 #endif /* !defined(wxUSE_PROTOCOL) */
116 /* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
118 # undef wxUSE_PROTOCOL_HTTP
119 # undef wxUSE_PROTOCOL_FTP
120 # undef wxUSE_PROTOCOL_FILE
121 # define wxUSE_PROTOCOL_HTTP 0
122 # define wxUSE_PROTOCOL_FTP 0
123 # define wxUSE_PROTOCOL_FILE 0
124 #endif /* wxUSE_PROTOCOL */
126 #ifndef wxUSE_PROTOCOL_HTTP
127 # ifdef wxABORT_ON_CONFIG_ERROR
128 # error "wxUSE_PROTOCOL_HTTP must be defined."
130 # define wxUSE_PROTOCOL_HTTP 0
132 #endif /* !defined(wxUSE_PROTOCOL_HTTP) */
134 #ifndef wxUSE_PROTOCOL_FTP
135 # ifdef wxABORT_ON_CONFIG_ERROR
136 # error "wxUSE_PROTOCOL_FTP must be defined."
138 # define wxUSE_PROTOCOL_FTP 0
140 #endif /* !defined(wxUSE_PROTOCOL_FTP) */
142 #ifndef wxUSE_PROTOCOL_FILE
143 # ifdef wxABORT_ON_CONFIG_ERROR
144 # error "wxUSE_PROTOCOL_FILE must be defined."
146 # define wxUSE_PROTOCOL_FILE 0
148 #endif /* !defined(wxUSE_PROTOCOL_FILE) */
151 # ifdef wxABORT_ON_CONFIG_ERROR
152 # error "wxUSE_REGEX must be defined."
154 # define wxUSE_REGEX 0
156 #endif /* !defined(wxUSE_REGEX) */
159 # ifdef wxABORT_ON_CONFIG_ERROR
160 # error "wxUSE_XML must be defined."
164 #endif /* !defined(wxUSE_XML) */
166 #ifndef wxUSE_SOCKETS
167 # ifdef wxABORT_ON_CONFIG_ERROR
168 # error "wxUSE_SOCKETS must be defined."
170 # define wxUSE_SOCKETS 0
172 #endif /* !defined(wxUSE_SOCKETS) */
174 #ifndef wxUSE_STREAMS
175 # ifdef wxABORT_ON_CONFIG_ERROR
176 # error "wxUSE_STREAMS must be defined."
178 # define wxUSE_STREAMS 0
180 #endif /* !defined(wxUSE_STREAMS) */
182 #ifndef wxUSE_STOPWATCH
183 # ifdef wxABORT_ON_CONFIG_ERROR
184 # error "wxUSE_STOPWATCH must be defined."
186 # define wxUSE_STOPWATCH 0
188 #endif /* !defined(wxUSE_STOPWATCH) */
190 #ifndef wxUSE_TEXTBUFFER
191 # ifdef wxABORT_ON_CONFIG_ERROR
192 # error "wxUSE_TEXTBUFFER must be defined."
194 # define wxUSE_TEXTBUFFER 0
196 #endif /* !defined(wxUSE_TEXTBUFFER) */
198 #ifndef wxUSE_TEXTFILE
199 # ifdef wxABORT_ON_CONFIG_ERROR
200 # error "wxUSE_TEXTFILE must be defined."
202 # define wxUSE_TEXTFILE 0
204 #endif /* !defined(wxUSE_TEXTFILE) */
206 #ifndef wxUSE_UNICODE
207 # ifdef wxABORT_ON_CONFIG_ERROR
208 # error "wxUSE_UNICODE must be defined."
210 # define wxUSE_UNICODE 0
212 #endif /* !defined(wxUSE_UNICODE) */
215 # ifdef wxABORT_ON_CONFIG_ERROR
216 # error "wxUSE_URL must be defined."
220 #endif /* !defined(wxUSE_URL) */
223 all these tests are for GUI only
228 all of the settings tested below must be defined or we'd get an error from
229 preprocessor about invalid integer expression
233 # ifdef wxABORT_ON_CONFIG_ERROR
234 # error "wxUSE_ACCEL must be defined."
236 # define wxUSE_ACCEL 0
238 #endif /* !defined(wxUSE_ACCEL) */
240 #ifndef wxUSE_BMPBUTTON
241 # ifdef wxABORT_ON_CONFIG_ERROR
242 # error "wxUSE_BMPBUTTON must be defined."
244 # define wxUSE_BMPBUTTON 0
246 #endif /* !defined(wxUSE_BMPBUTTON) */
249 # ifdef wxABORT_ON_CONFIG_ERROR
250 # error "wxUSE_BUTTON must be defined."
252 # define wxUSE_BUTTON 0
254 #endif /* !defined(wxUSE_BUTTON) */
256 #ifndef wxUSE_CALENDARCTRL
257 # ifdef wxABORT_ON_CONFIG_ERROR
258 # error "wxUSE_CALENDARCTRL must be defined."
260 # define wxUSE_CALENDARCTRL 0
262 #endif /* !defined(wxUSE_CALENDARCTRL) */
265 # ifdef wxABORT_ON_CONFIG_ERROR
266 # error "wxUSE_CARET must be defined."
268 # define wxUSE_CARET 0
270 #endif /* !defined(wxUSE_CARET) */
272 #ifndef wxUSE_CHECKBOX
273 # ifdef wxABORT_ON_CONFIG_ERROR
274 # error "wxUSE_CHECKBOX must be defined."
276 # define wxUSE_CHECKBOX 0
278 #endif /* !defined(wxUSE_CHECKBOX) */
280 #ifndef wxUSE_CHECKLISTBOX
281 # ifdef wxABORT_ON_CONFIG_ERROR
282 # error "wxUSE_CHECKLISTBOX must be defined."
284 # define wxUSE_CHECKLISTBOX 0
286 #endif /* !defined(wxUSE_CHECKLISTBOX) */
289 # ifdef wxABORT_ON_CONFIG_ERROR
290 # error "wxUSE_CHOICE must be defined."
292 # define wxUSE_CHOICE 0
294 #endif /* !defined(wxUSE_CHOICE) */
296 #ifndef wxUSE_CHOICEDLG
297 # ifdef wxABORT_ON_CONFIG_ERROR
298 # error "wxUSE_CHOICEDLG must be defined."
300 # define wxUSE_CHOICEDLG 0
302 #endif /* !defined(wxUSE_CHOICEDLG) */
304 #ifndef wxUSE_CLIPBOARD
305 # ifdef wxABORT_ON_CONFIG_ERROR
306 # error "wxUSE_CLIPBOARD must be defined."
308 # define wxUSE_CLIPBOARD 0
310 #endif /* !defined(wxUSE_CLIPBOARD) */
312 #ifndef wxUSE_COLOURDLG
313 # ifdef wxABORT_ON_CONFIG_ERROR
314 # error "wxUSE_COLOURDLG must be defined."
316 # define wxUSE_COLOURDLG 0
318 #endif /* !defined(wxUSE_COLOURDLG) */
320 #ifndef wxUSE_COMBOBOX
321 # ifdef wxABORT_ON_CONFIG_ERROR
322 # error "wxUSE_COMBOBOX must be defined."
324 # define wxUSE_COMBOBOX 0
326 #endif /* !defined(wxUSE_COMBOBOX) */
328 #ifndef wxUSE_DATAOBJ
329 # ifdef wxABORT_ON_CONFIG_ERROR
330 # error "wxUSE_DATAOBJ must be defined."
332 # define wxUSE_DATAOBJ 0
334 #endif /* !defined(wxUSE_DATAOBJ) */
336 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
337 # ifdef wxABORT_ON_CONFIG_ERROR
338 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
340 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
342 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
344 #ifndef wxUSE_FILEDLG
345 # ifdef wxABORT_ON_CONFIG_ERROR
346 # error "wxUSE_FILEDLG must be defined."
348 # define wxUSE_FILEDLG 0
350 #endif /* !defined(wxUSE_FILEDLG) */
352 #ifndef wxUSE_FONTDLG
353 # ifdef wxABORT_ON_CONFIG_ERROR
354 # error "wxUSE_FONTDLG must be defined."
356 # define wxUSE_FONTDLG 0
358 #endif /* !defined(wxUSE_FONTDLG) */
360 #ifndef wxUSE_FONTMAP
361 # ifdef wxABORT_ON_CONFIG_ERROR
362 # error "wxUSE_FONTMAP must be defined."
364 # define wxUSE_FONTMAP 0
366 #endif /* !defined(wxUSE_FONTMAP) */
369 # ifdef wxABORT_ON_CONFIG_ERROR
370 # error "wxUSE_GAUGE must be defined."
372 # define wxUSE_GAUGE 0
374 #endif /* !defined(wxUSE_GAUGE) */
377 # ifdef wxABORT_ON_CONFIG_ERROR
378 # error "wxUSE_GRID must be defined."
380 # define wxUSE_GRID 0
382 #endif /* !defined(wxUSE_GRID) */
385 # ifdef wxABORT_ON_CONFIG_ERROR
386 # error "wxUSE_HELP must be defined."
388 # define wxUSE_HELP 0
390 #endif /* !defined(wxUSE_HELP) */
393 # ifdef wxABORT_ON_CONFIG_ERROR
394 # error "wxUSE_HTML must be defined."
396 # define wxUSE_HTML 0
398 #endif /* !defined(wxUSE_HTML) */
400 #ifndef wxUSE_ICO_CUR
401 # ifdef wxABORT_ON_CONFIG_ERROR
402 # error "wxUSE_ICO_CUR must be defined."
404 # define wxUSE_ICO_CUR 0
406 #endif /* !defined(wxUSE_ICO_CUR) */
409 # ifdef wxABORT_ON_CONFIG_ERROR
410 # error "wxUSE_IFF must be defined."
414 #endif /* !defined(wxUSE_IFF) */
416 #ifndef wxUSE_IMAGLIST
417 # ifdef wxABORT_ON_CONFIG_ERROR
418 # error "wxUSE_IMAGLIST must be defined."
420 # define wxUSE_IMAGLIST 0
422 #endif /* !defined(wxUSE_IMAGLIST) */
424 #ifndef wxUSE_JOYSTICK
425 # ifdef wxABORT_ON_CONFIG_ERROR
426 # error "wxUSE_JOYSTICK must be defined."
428 # define wxUSE_JOYSTICK 0
430 #endif /* !defined(wxUSE_JOYSTICK) */
432 #ifndef wxUSE_LISTBOX
433 # ifdef wxABORT_ON_CONFIG_ERROR
434 # error "wxUSE_LISTBOX must be defined."
436 # define wxUSE_LISTBOX 0
438 #endif /* !defined(wxUSE_LISTBOX) */
440 #ifndef wxUSE_LISTCTRL
441 # ifdef wxABORT_ON_CONFIG_ERROR
442 # error "wxUSE_LISTCTRL must be defined."
444 # define wxUSE_LISTCTRL 0
446 #endif /* !defined(wxUSE_LISTCTRL) */
449 # ifdef wxABORT_ON_CONFIG_ERROR
450 # error "wxUSE_LOGGUI must be defined."
452 # define wxUSE_LOGGUI 0
454 #endif /* !defined(wxUSE_LOGGUI) */
456 #ifndef wxUSE_LOGWINDOW
457 # ifdef wxABORT_ON_CONFIG_ERROR
458 # error "wxUSE_LOGWINDOW must be defined."
460 # define wxUSE_LOGWINDOW 0
462 #endif /* !defined(wxUSE_LOGWINDOW) */
464 #ifndef wxUSE_LOG_DIALOG
465 # ifdef wxABORT_ON_CONFIG_ERROR
466 # error "wxUSE_LOG_DIALOG must be defined."
468 # define wxUSE_LOG_DIALOG 0
470 #endif /* !defined(wxUSE_LOG_DIALOG) */
472 #ifndef wxUSE_MDI_ARCHITECTURE
473 # ifdef wxABORT_ON_CONFIG_ERROR
474 # error "wxUSE_MDI_ARCHITECTURE must be defined."
476 # define wxUSE_MDI_ARCHITECTURE 0
478 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
481 # ifdef wxABORT_ON_CONFIG_ERROR
482 # error "wxUSE_MENUS must be defined."
484 # define wxUSE_MENUS 0
486 #endif /* !defined(wxUSE_MENUS) */
489 # ifdef wxABORT_ON_CONFIG_ERROR
490 # error "wxUSE_MSGDLG must be defined."
492 # define wxUSE_MSGDLG 0
494 #endif /* !defined(wxUSE_MSGDLG) */
496 #ifndef wxUSE_NOTEBOOK
497 # ifdef wxABORT_ON_CONFIG_ERROR
498 # error "wxUSE_NOTEBOOK must be defined."
500 # define wxUSE_NOTEBOOK 0
502 #endif /* !defined(wxUSE_NOTEBOOK) */
504 #ifndef wxUSE_PALETTE
505 # ifdef wxABORT_ON_CONFIG_ERROR
506 # error "wxUSE_PALETTE must be defined."
508 # define wxUSE_PALETTE 0
510 #endif /* !defined(wxUSE_PALETTE) */
512 #ifndef wxUSE_POPUPWIN
513 # ifdef wxABORT_ON_CONFIG_ERROR
514 # error "wxUSE_POPUPWIN must be defined."
516 # define wxUSE_POPUPWIN 0
518 #endif /* !defined(wxUSE_POPUPWIN) */
520 #ifndef wxUSE_PRINTING_ARCHITECTURE
521 # ifdef wxABORT_ON_CONFIG_ERROR
522 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
524 # define wxUSE_PRINTING_ARCHITECTURE 0
526 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
528 #ifndef wxUSE_RADIOBOX
529 # ifdef wxABORT_ON_CONFIG_ERROR
530 # error "wxUSE_RADIOBOX must be defined."
532 # define wxUSE_RADIOBOX 0
534 #endif /* !defined(wxUSE_RADIOBOX) */
536 #ifndef wxUSE_RADIOBTN
537 # ifdef wxABORT_ON_CONFIG_ERROR
538 # error "wxUSE_RADIOBTN must be defined."
540 # define wxUSE_RADIOBTN 0
542 #endif /* !defined(wxUSE_RADIOBTN) */
545 # ifdef wxABORT_ON_CONFIG_ERROR
546 # error "wxUSE_SASH must be defined."
548 # define wxUSE_SASH 0
550 #endif /* !defined(wxUSE_SASH) */
552 #ifndef wxUSE_SCROLLBAR
553 # ifdef wxABORT_ON_CONFIG_ERROR
554 # error "wxUSE_SCROLLBAR must be defined."
556 # define wxUSE_SCROLLBAR 0
558 #endif /* !defined(wxUSE_SCROLLBAR) */
561 # ifdef wxABORT_ON_CONFIG_ERROR
562 # error "wxUSE_SLIDER must be defined."
564 # define wxUSE_SLIDER 0
566 #endif /* !defined(wxUSE_SLIDER) */
568 #ifndef wxUSE_SPINBTN
569 # ifdef wxABORT_ON_CONFIG_ERROR
570 # error "wxUSE_SPINBTN must be defined."
572 # define wxUSE_SPINBTN 0
574 #endif /* !defined(wxUSE_SPINBTN) */
576 #ifndef wxUSE_SPINCTRL
577 # ifdef wxABORT_ON_CONFIG_ERROR
578 # error "wxUSE_SPINCTRL must be defined."
580 # define wxUSE_SPINCTRL 0
582 #endif /* !defined(wxUSE_SPINCTRL) */
585 # ifdef wxABORT_ON_CONFIG_ERROR
586 # error "wxUSE_SPLASH must be defined."
588 # define wxUSE_SPLASH 0
590 #endif /* !defined(wxUSE_SPLASH) */
592 #ifndef wxUSE_SPLITTER
593 # ifdef wxABORT_ON_CONFIG_ERROR
594 # error "wxUSE_SPLITTER must be defined."
596 # define wxUSE_SPLITTER 0
598 #endif /* !defined(wxUSE_SPLITTER) */
600 #ifndef wxUSE_STATBMP
601 # ifdef wxABORT_ON_CONFIG_ERROR
602 # error "wxUSE_STATBMP must be defined."
604 # define wxUSE_STATBMP 0
606 #endif /* !defined(wxUSE_STATBMP) */
608 #ifndef wxUSE_STATBOX
609 # ifdef wxABORT_ON_CONFIG_ERROR
610 # error "wxUSE_STATBOX must be defined."
612 # define wxUSE_STATBOX 0
614 #endif /* !defined(wxUSE_STATBOX) */
616 #ifndef wxUSE_STATLINE
617 # ifdef wxABORT_ON_CONFIG_ERROR
618 # error "wxUSE_STATLINE must be defined."
620 # define wxUSE_STATLINE 0
622 #endif /* !defined(wxUSE_STATLINE) */
624 #ifndef wxUSE_STATTEXT
625 # ifdef wxABORT_ON_CONFIG_ERROR
626 # error "wxUSE_STATTEXT must be defined."
628 # define wxUSE_STATTEXT 0
630 #endif /* !defined(wxUSE_STATTEXT) */
632 #ifndef wxUSE_STATUSBAR
633 # ifdef wxABORT_ON_CONFIG_ERROR
634 # error "wxUSE_STATUSBAR must be defined."
636 # define wxUSE_STATUSBAR 0
638 #endif /* !defined(wxUSE_STATUSBAR) */
640 #ifndef wxUSE_TAB_DIALOG
641 # ifdef wxABORT_ON_CONFIG_ERROR
642 # error "wxUSE_TAB_DIALOG must be defined."
644 # define wxUSE_TAB_DIALOG 0
646 #endif /* !defined(wxUSE_TAB_DIALOG) */
648 #ifndef wxUSE_TEXTCTRL
649 # ifdef wxABORT_ON_CONFIG_ERROR
650 # error "wxUSE_TEXTCTRL must be defined."
652 # define wxUSE_TEXTCTRL 0
654 #endif /* !defined(wxUSE_TEXTCTRL) */
656 #ifndef wxUSE_TIPWINDOW
657 # ifdef wxABORT_ON_CONFIG_ERROR
658 # error "wxUSE_TIPWINDOW must be defined."
660 # define wxUSE_TIPWINDOW 0
662 #endif /* !defined(wxUSE_TIPWINDOW) */
664 #ifndef wxUSE_TOOLBAR
665 # ifdef wxABORT_ON_CONFIG_ERROR
666 # error "wxUSE_TOOLBAR must be defined."
668 # define wxUSE_TOOLBAR 0
670 #endif /* !defined(wxUSE_TOOLBAR) */
672 #ifndef wxUSE_TOOLTIPS
673 # ifdef wxABORT_ON_CONFIG_ERROR
674 # error "wxUSE_TOOLTIPS must be defined."
676 # define wxUSE_TOOLTIPS 0
678 #endif /* !defined(wxUSE_TOOLTIPS) */
680 #ifndef wxUSE_TREECTRL
681 # ifdef wxABORT_ON_CONFIG_ERROR
682 # error "wxUSE_TREECTRL must be defined."
684 # define wxUSE_TREECTRL 0
686 #endif /* !defined(wxUSE_TREECTRL) */
688 #ifndef wxUSE_DISPLAY
689 # ifdef wxABORT_ON_CONFIG_ERROR
690 # error "wxUSE_DISPLAY must be defined."
692 # define wxUSE_DISPLAY 0
694 #endif /* !defined(wxUSE_TREECTRL) */
696 #ifndef wxUSE_WXHTML_HELP
697 # ifdef wxABORT_ON_CONFIG_ERROR
698 # error "wxUSE_WXHTML_HELP must be defined."
700 # define wxUSE_WXHTML_HELP 0
702 #endif /* !defined(wxUSE_WXHTML_HELP) */
704 #endif /* wxUSE_GUI */
707 check consistency of the settings
710 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
712 # ifdef wxABORT_ON_CONFIG_ERROR
713 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
715 # undef wxUSE_PROTOCOL
716 # define wxUSE_PROTOCOL 1
719 #endif /* wxUSE_PROTOCOL_XXX */
723 # ifdef wxABORT_ON_CONFIG_ERROR
724 # error "wxUSE_URL requires wxUSE_PROTOCOL"
726 # undef wxUSE_PROTOCOL
727 # define wxUSE_PROTOCOL 1
730 #endif /* wxUSE_URL */
734 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
735 # ifdef wxABORT_ON_CONFIG_ERROR
736 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
738 # undef wxUSE_SOCKETS
739 # define wxUSE_SOCKETS 1
745 # ifdef wxABORT_ON_CONFIG_ERROR
746 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
748 # undef wxUSE_STREAMS
749 # define wxUSE_STREAMS 1
752 #endif /* wxUSE_PROTOCOL */
754 /* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
756 # if !wxUSE_FILESYSTEM
757 # ifdef wxABORT_ON_CONFIG_ERROR
758 # error "wxHTML requires wxFileSystem"
760 # undef wxUSE_FILESYSTEM
761 # define wxUSE_FILESYSTEM 1
764 #endif /* wxUSE_HTML */
768 # ifdef wxABORT_ON_CONFIG_ERROR
769 # error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
771 # undef wxUSE_STREAMS
772 # define wxUSE_STREAMS 1
775 #endif /* wxUSE_FILESYSTEM */
779 # ifdef wxABORT_ON_CONFIG_ERROR
780 # error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
782 # undef wxUSE_PROTOCOL
783 # define wxUSE_PROTOCOL 1
786 #endif /* wxUSE_FS_INET */
788 #if wxUSE_STOPWATCH || wxUSE_DATETIME
790 # ifdef wxABORT_ON_CONFIG_ERROR
791 # error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
793 # undef wxUSE_LONGLONG
794 # define wxUSE_LONGLONG 1
797 #endif /* wxUSE_STOPWATCH */
799 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
800 # ifdef wxABORT_ON_CONFIG_ERROR
801 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
803 # undef wxUSE_TEXTFILE
804 # define wxUSE_TEXTFILE 1
806 #endif /* wxUSE_MIMETYPE */
808 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
809 # ifdef wxABORT_ON_CONFIG_ERROR
810 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
812 # undef wxUSE_TEXTBUFFER
813 # define wxUSE_TEXTBUFFER 1
815 #endif /* wxUSE_TEXTFILE */
817 #if wxUSE_TEXTFILE && !wxUSE_FILE
818 # ifdef wxABORT_ON_CONFIG_ERROR
819 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
822 # define wxUSE_FILE 1
824 #endif /* wxUSE_TEXTFILE */
826 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
827 # ifdef wxABORT_ON_CONFIG_ERROR
828 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
830 # undef wxUSE_UNICODE
831 # define wxUSE_UNICODE 1
833 #endif /* wxUSE_UNICODE_MSLU */
835 #if wxUSE_ODBC && wxUSE_UNICODE
836 # ifdef wxABORT_ON_CONFIG_ERROR
837 /* (ODBC classes aren't Unicode-compatible yet) */
838 # error "wxUSE_ODBC can't be used with wxUSE_UNICODE"
841 # define wxUSE_ODBC 0
843 #endif /* wxUSE_ODBC */
845 #if wxUSE_XML && !wxUSE_WCHAR_T
846 # ifdef wxABORT_ON_CONFIG_ERROR
847 # error "wxUSE_XML requires wxUSE_WCHAR_T"
852 #endif /* wxUSE_UNICODE_MSLU */
854 #if !wxUSE_DYNLIB_CLASS
855 # if wxUSE_DYNAMIC_LOADER
856 # ifdef wxABORT_ON_CONFIG_ERROR
857 # error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS."
859 # define wxUSE_DYNLIB_CLASS 1
862 #endif /* wxUSE_DYNLIB_CLASS */
864 /* the rest of the tests is for the GUI settings only */
867 #if wxUSE_BUTTON || \
868 wxUSE_CALENDARCTRL || \
873 wxUSE_CHECKLISTBOX || \
895 # ifdef wxABORT_ON_CONFIG_ERROR
896 # error "wxUSE_CONTROLS unset but some controls used"
898 # undef wxUSE_CONTROLS
899 # define wxUSE_CONTROLS 1
902 #endif /* controls */
904 /* wxUniv-specific dependencies */
905 #if defined(__WXUNIVERSAL__)
906 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
907 # ifdef wxABORT_ON_CONFIG_ERROR
908 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
910 # undef wxUSE_POPUPWIN
911 # define wxUSE_POPUPWIN 1
917 # ifdef wxABORT_ON_CONFIG_ERROR
918 # error "wxComboBox requires wxListBox in wxUniversal"
920 # undef wxUSE_LISTBOX
921 # define wxUSE_LISTBOX 1
924 # endif /* wxUSE_COMBOBOX */
928 # ifdef wxABORT_ON_CONFIG_ERROR
929 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
931 # undef wxUSE_CHECKBOX
932 # define wxUSE_CHECKBOX 1
935 # endif /* wxUSE_RADIOBTN */
939 # ifdef wxABORT_ON_CONFIG_ERROR
940 # error "wxTextCtrl requires wxCaret in wxUniversal"
943 # define wxUSE_CARET 1
945 # endif /* wxUSE_CARET */
947 # if !wxUSE_SCROLLBAR
948 # ifdef wxABORT_ON_CONFIG_ERROR
949 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
951 # undef wxUSE_SCROLLBAR
952 # define wxUSE_SCROLLBAR 1
954 # endif /* wxUSE_SCROLLBAR */
955 # endif /* wxUSE_TEXTCTRL */
956 #endif /* __WXUNIVERSAL__ */
958 /* wxGTK-specific dependencies */
960 # ifndef __WXUNIVERSAL__
961 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
962 # ifdef wxABORT_ON_CONFIG_ERROR
963 # error "MDI requires wxUSE_MENUS in wxGTK"
966 # define wxUSE_MENUS 1
969 # endif /* !__WXUNIVERSAL__ */
973 # ifdef wxABORT_ON_CONFIG_ERROR
974 # error "wxJoystick requires threads in wxGTK"
976 # undef wxUSE_JOYSTICK
977 # define wxUSE_JOYSTICK 0
981 #endif /* wxGTK && !wxUniv */
983 /* wxMSW-specific dependencies */
985 # ifndef wxUSE_UNICODE_MSLU
986 # ifdef wxABORT_ON_CONFIG_ERROR
987 # error "wxUSE_UNICODE_MSLU must be defined."
989 # define wxUSE_UNICODE_MSLU 0
991 # endif /* wxUSE_UNICODE_MSLU */
992 # ifndef wxUSE_UXTHEME
993 # ifdef wxABORT_ON_CONFIG_ERROR
994 # error "wxUSE_UXTHEME must be defined."
996 # define wxUSE_UXTHEME 0
998 # endif /* wxUSE_UXTHEME */
999 # ifndef wxUSE_UXTHEME_AUTO
1000 # ifdef wxABORT_ON_CONFIG_ERROR
1001 # error "wxUSE_UXTHEME_AUTO must be defined."
1003 # define wxUSE_UXTHEME_AUTO 0
1005 # endif /* wxUSE_UXTHEME_AUTO */
1006 # ifndef wxUSE_MS_HTML_HELP
1007 # ifdef wxABORT_ON_CONFIG_ERROR
1008 # error "wxUSE_MS_HTML_HELP must be defined."
1010 # define wxUSE_MS_HTML_HELP 0
1012 # endif /* !defined(wxUSE_MS_HTML_HELP) */
1013 # ifndef wxUSE_DIALUP_MANAGER
1014 # ifdef wxABORT_ON_CONFIG_ERROR
1015 # error "wxUSE_DIALUP_MANAGER must be defined."
1017 # define wxUSE_DIALUP_MANAGER 0
1019 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
1021 # if !wxUSE_DYNAMIC_LOADER
1022 # if wxUSE_MS_HTML_HELP
1023 # ifdef wxABORT_ON_CONFIG_ERROR
1024 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
1026 # define wxUSE_DYNAMIC_LOADER 1
1029 # if wxUSE_DIALUP_MANAGER
1030 # ifdef wxABORT_ON_CONFIG_ERROR
1031 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
1033 # define wxUSE_DYNAMIC_LOADER 1
1036 # endif /* wxUSE_DYNAMIC_LOADER */
1039 /* wxMAC-specific dependencies */
1043 # ifdef wxABORT_ON_CONFIG_ERROR
1044 # error "wxUSE_UNICODE is only supported for Carbon Targets."
1046 # define wxUSE_UNICODE 0
1051 /* wxMotif-specific dependencies */
1052 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
1053 # undef wxUSE_TAB_DIALOG
1054 # define wxUSE_TAB_DIALOG 1
1057 /* wxMGL-specific dependencies */
1060 # error "wxMGL requires wxUSE_PALETTE=1"
1064 // Hopefully we can emulate these dialogs in due course
1065 #if wxUSE_SMARTPHONE
1066 # ifdef wxUSE_COLOURDLG
1067 # undef wxUSE_COLOURDLG
1068 # define wxUSE_COLOURDLG 0
1070 #endif /* wxUSE_SMARTPHONE */
1073 /* generic controls dependencies */
1074 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
1075 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
1076 /* all common controls are needed by these dialogs */
1077 # if !defined(wxUSE_CHOICE) || \
1078 !defined(wxUSE_TEXTCTRL) || \
1079 !defined(wxUSE_BUTTON) || \
1080 !defined(wxUSE_CHECKBOX) || \
1081 !defined(wxUSE_STATTEXT)
1082 # ifdef wxABORT_ON_CONFIG_ERROR
1083 # error "These common controls are needed by common dialogs"
1085 # undef wxUSE_CHOICE
1086 # define wxUSE_CHOICE 1
1087 # undef wxUSE_TEXTCTRL
1088 # define wxUSE_TEXTCTRL 1
1089 # undef wxUSE_BUTTON
1090 # define wxUSE_BUTTON 1
1091 # undef wxUSE_CHECKBOX
1092 # define wxUSE_CHECKBOX 1
1093 # undef wxUSE_STATTEXT
1094 # define wxUSE_STATTEXT 1
1098 #endif /* !wxMSW || wxUniv */
1100 /* common dependencies */
1101 #if wxUSE_CALENDARCTRL
1102 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
1103 # ifdef wxABORT_ON_CONFIG_ERROR
1104 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
1106 # undef wxUSE_SPINBTN
1107 # undef wxUSE_COMBOBOX
1108 # define wxUSE_SPINBTN 1
1109 # define wxUSE_COMBOBOX 1
1113 # if !wxUSE_DATETIME
1114 # ifdef wxABORT_ON_CONFIG_ERROR
1115 # error "wxCalendarCtrl requires wxUSE_DATETIME"
1117 # undef wxUSE_DATETIME
1118 # define wxUSE_DATETIME 1
1121 #endif /* wxUSE_CALENDARCTRL */
1123 #if wxUSE_CHECKLISTBOX
1125 # ifdef wxABORT_ON_CONFIG_ERROR
1126 # error "wxCheckListBox requires wxListBox"
1128 # undef wxUSE_LISTBOX
1129 # define wxUSE_LISTBOX 1
1132 #endif /* wxUSE_RADIOBTN */
1134 #if wxUSE_WXHTML_HELP
1135 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK
1136 # ifdef wxABORT_ON_CONFIG_ERROR
1137 # error "Built in help controller can't be compiled"
1140 # define wxUSE_HELP 1
1142 # define wxUSE_HTML 1
1143 # undef wxUSE_COMBOBOX
1144 # define wxUSE_COMBOBOX 1
1145 # undef wxUSE_NOTEBOOK
1146 # define wxUSE_NOTEBOOK 1
1149 #endif /* wxUSE_WXHTML_HELP */
1151 #if wxUSE_DOC_VIEW_ARCHITECTURE
1153 # ifdef wxABORT_ON_CONFIG_ERROR
1154 # error "DocView requires wxUSE_MENUS"
1157 # define wxUSE_MENUS 1
1161 # if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
1162 # ifdef wxABORT_ON_CONFIG_ERROR
1163 # error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
1165 # undef wxUSE_STREAMS
1166 # define wxUSE_STREAMS 1
1169 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1171 #if wxUSE_PRINTING_ARCHITECTURE
1172 # if !wxUSE_COMBOBOX
1173 # ifdef wxABORT_ON_CONFIG_ERROR
1174 # error "Print dialog requires wxUSE_COMBOBOX"
1176 # undef wxUSE_COMBOBOX
1177 # define wxUSE_COMBOBOX 1
1181 # if !wxUSE_DOC_VIEW_ARCHITECTURE
1182 # ifdef wxABORT_ON_CONFIG_ERROR
1183 # error "Print architecture requires wxUSE_DOC_VIEW_ARCHITECTURE"
1185 # undef wxUSE_DOC_VIEW_ARCHITECTURE
1186 # define wxUSE_DOC_VIEW_ARCHITECTURE 1
1189 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1191 #if wxUSE_MDI_ARCHITECTURE
1192 # if !wxUSE_DOC_VIEW_ARCHITECTURE
1193 # ifdef wxABORT_ON_CONFIG_ERROR
1194 # error "MDI requires wxUSE_DOC_VIEW_ARCHITECTURE"
1196 # undef wxUSE_DOC_VIEW_ARCHITECTURE
1197 # define wxUSE_DOC_VIEW_ARCHITECTURE 1
1200 #endif /* wxUSE_MDI_ARCHITECTURE */
1203 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1204 # ifdef wxABORT_ON_CONFIG_ERROR
1205 # error "wxFileDialog must be compiled as well"
1207 # undef wxUSE_FILEDLG
1208 # define wxUSE_FILEDLG 1
1211 #endif /* wxUSE_FILEDLG */
1214 # if wxUSE_TOOLBAR_NATIVE
1215 # ifdef wxABORT_ON_CONFIG_ERROR
1216 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1"
1218 # undef wxUSE_TOOLBAR_NATIVE
1219 # define wxUSE_TOOLBAR_NATIVE 0
1223 # if wxUSE_TOOLBAR_SIMPLE
1224 # ifdef wxABORT_ON_CONFIG_ERROR
1225 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_SIMPLE is set to 1"
1227 # undef wxUSE_TOOLBAR_SIMPLE
1228 # define wxUSE_TOOLBAR_SIMPLE 0
1234 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1235 # ifdef wxABORT_ON_CONFIG_ERROR
1236 # error "wxImageList must be compiled as well"
1238 # undef wxUSE_IMAGLIST
1239 # define wxUSE_IMAGLIST 1
1242 #endif /* !wxUSE_IMAGLIST */
1245 # ifdef wxABORT_ON_CONFIG_ERROR
1246 /* FIXME: should compile without it, of course, but doesn't */
1247 # error "wxMessageBox is always needed"
1249 # undef wxUSE_MSGDLG
1250 # define wxUSE_MSGDLG 1
1255 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1256 # ifdef wxABORT_ON_CONFIG_ERROR
1257 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1259 # undef wxUSE_RADIOBTN
1260 # undef wxUSE_STATBOX
1261 # define wxUSE_RADIOBTN 1
1262 # define wxUSE_STATBOX 1
1265 #endif /* wxUSE_RADIOBOX */
1268 # if !wxUSE_TEXTCTRL
1269 # ifdef wxABORT_ON_CONFIG_ERROR
1270 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1272 # undef wxUSE_TEXTCTRL
1273 # define wxUSE_TEXTCTRL 1
1276 #endif /* wxUSE_LOGWINDOW */
1278 #if wxUSE_LOG_DIALOG
1279 # if !wxUSE_LISTCTRL
1280 # ifdef wxABORT_ON_CONFIG_ERROR
1281 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1283 # undef wxUSE_LISTCTRL
1284 # define wxUSE_LISTCTRL 1
1287 #endif /* wxUSE_LOG_DIALOG */
1289 /* I wonder if we shouldn't just remove all occurrences of
1290 wxUSE_DYNAMIC_CLASSES from the sources? */
1291 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
1292 # ifdef wxABORT_ON_CONFIG_ERROR
1293 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
1295 # undef wxUSE_DYNAMIC_CLASSES
1296 # define wxUSE_DYNAMIC_CLASSES 1
1298 #endif /* wxUSE_DYNAMIC_CLASSES */
1300 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1301 # ifdef wxABORT_ON_CONFIG_ERROR
1302 # error "wxClipboard requires wxDataObject"
1304 # undef wxUSE_DATAOBJ
1305 # define wxUSE_DATAOBJ 1
1307 #endif /* wxUSE_CLIPBOARD */
1309 #if wxUSE_WX_RESOURCES && !wxUSE_PROLOGIO
1310 # ifdef wxABORT_ON_CONFIG_ERROR
1311 # error "wxr resources require PrologIO"
1313 # undef wxUSE_PROLOGIO
1314 # define wxUSE_PROLOGIO 1
1316 #endif /* wxUSE_WX_RESOURCES */
1318 #endif /* wxUSE_GUI */