]>
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 license
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
15 this global setting determintes what should we do if the setting FOO
16 requires BAR and BAR is not set: we can either silently define BAR
17 (default, recommended) or give an error and abort (mainly useful for
20 #define wxABORT_ON_CONFIG_ERROR
26 /* GUI build by default */
27 #if !defined(wxUSE_GUI)
29 #endif /* !defined(wxUSE_GUI) */
31 /* wxBase doesn't need compatibility settings as it's a new port */
33 # undef WXWIN_COMPATIBILITY
34 # undef WXWIN_COMPATIBILITY_2
35 # undef WXWIN_COMPATIBILITY_2_2
36 # define WXWIN_COMPATIBILITY 0
37 # define WXWIN_COMPATIBILITY_2 0
38 # define WXWIN_COMPATIBILITY_2_2 0
39 #endif /* !wxUSE_GUI */
42 tests for non GUI features
45 #ifndef wxUSE_DYNLIB_CLASS
46 # ifdef wxABORT_ON_CONFIG_ERROR
47 # error "wxUSE_DYNLIB_CLASS must be defined."
49 # define wxUSE_DYNLIB_CLASS 0
51 #endif /* !defined(wxUSE_DYNLIB_CLASS) */
53 /* don't give an error about this one yet, it's not fully implemented */
54 #ifndef wxUSE_FSVOLUME
55 # define wxUSE_FSVOLUME 0
56 #endif /* !defined(wxUSE_FSVOLUME) */
58 #ifndef wxUSE_DYNAMIC_LOADER
59 # ifdef wxABORT_ON_CONFIG_ERROR
60 # error "wxUSE_DYNAMIC_LOADER must be defined."
62 # define wxUSE_DYNAMIC_LOADER 0
64 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
67 # ifdef wxABORT_ON_CONFIG_ERROR
68 # error "wxUSE_LOG must be defined."
72 #endif /* !defined(wxUSE_LOG) */
74 #ifndef wxUSE_LONGLONG
75 # ifdef wxABORT_ON_CONFIG_ERROR
76 # error "wxUSE_LONGLONG must be defined."
78 # define wxUSE_LONGLONG 0
80 #endif /* !defined(wxUSE_LONGLONG) */
82 #ifndef wxUSE_MIMETYPE
83 # ifdef wxABORT_ON_CONFIG_ERROR
84 # error "wxUSE_MIMETYPE must be defined."
86 # define wxUSE_MIMETYPE 0
88 #endif /* !defined(wxUSE_MIMETYPE) */
90 #ifndef wxUSE_PROTOCOL
91 # ifdef wxABORT_ON_CONFIG_ERROR
92 # error "wxUSE_PROTOCOL must be defined."
94 # define wxUSE_PROTOCOL 0
96 #endif /* !defined(wxUSE_PROTOCOL) */
98 /* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
100 # undef wxUSE_PROTOCOL_HTTP
101 # undef wxUSE_PROTOCOL_FTP
102 # undef wxUSE_PROTOCOL_FILE
103 # define wxUSE_PROTOCOL_HTTP 0
104 # define wxUSE_PROTOCOL_FTP 0
105 # define wxUSE_PROTOCOL_FILE 0
106 #endif /* wxUSE_PROTOCOL */
108 #ifndef wxUSE_PROTOCOL_HTTP
109 # ifdef wxABORT_ON_CONFIG_ERROR
110 # error "wxUSE_PROTOCOL_HTTP must be defined."
112 # define wxUSE_PROTOCOL_HTTP 0
114 #endif /* !defined(wxUSE_PROTOCOL_HTTP) */
116 #ifndef wxUSE_PROTOCOL_FTP
117 # ifdef wxABORT_ON_CONFIG_ERROR
118 # error "wxUSE_PROTOCOL_FTP must be defined."
120 # define wxUSE_PROTOCOL_FTP 0
122 #endif /* !defined(wxUSE_PROTOCOL_FTP) */
124 #ifndef wxUSE_PROTOCOL_FILE
125 # ifdef wxABORT_ON_CONFIG_ERROR
126 # error "wxUSE_PROTOCOL_FILE must be defined."
128 # define wxUSE_PROTOCOL_FILE 0
130 #endif /* !defined(wxUSE_PROTOCOL_FILE) */
133 # ifdef wxABORT_ON_CONFIG_ERROR
134 # error "wxUSE_REGEX must be defined."
136 # define wxUSE_REGEX 0
138 #endif /* !defined(wxUSE_REGEX) */
140 #ifndef wxUSE_SOCKETS
141 # ifdef wxABORT_ON_CONFIG_ERROR
142 # error "wxUSE_SOCKETS must be defined."
144 # define wxUSE_SOCKETS 0
146 #endif /* !defined(wxUSE_SOCKETS) */
148 #ifndef wxUSE_STREAMS
149 # ifdef wxABORT_ON_CONFIG_ERROR
150 # error "wxUSE_STREAMS must be defined."
152 # define wxUSE_STREAMS 0
154 #endif /* !defined(wxUSE_STREAMS) */
156 #ifndef wxUSE_STOPWATCH
157 # ifdef wxABORT_ON_CONFIG_ERROR
158 # error "wxUSE_STOPWATCH must be defined."
160 # define wxUSE_STOPWATCH 0
162 #endif /* !defined(wxUSE_STOPWATCH) */
164 #ifndef wxUSE_TEXTBUFFER
165 # ifdef wxABORT_ON_CONFIG_ERROR
166 # error "wxUSE_TEXTBUFFER must be defined."
168 # define wxUSE_TEXTBUFFER 0
170 #endif /* !defined(wxUSE_TEXTBUFFER) */
172 #ifndef wxUSE_TEXTFILE
173 # ifdef wxABORT_ON_CONFIG_ERROR
174 # error "wxUSE_TEXTFILE must be defined."
176 # define wxUSE_TEXTFILE 0
178 #endif /* !defined(wxUSE_TEXTFILE) */
180 #ifndef wxUSE_UNICODE
181 # ifdef wxABORT_ON_CONFIG_ERROR
182 # error "wxUSE_UNICODE must be defined."
184 # define wxUSE_UNICODE 0
186 #endif /* !defined(wxUSE_UNICODE) */
189 # ifdef wxABORT_ON_CONFIG_ERROR
190 # error "wxUSE_URL must be defined."
194 #endif /* !defined(wxUSE_URL) */
197 all these tests are for GUI only
202 all of the settings tested below must be defined or we'd get an error from
203 preprocessor about invalid integer expression
207 # ifdef wxABORT_ON_CONFIG_ERROR
208 # error "wxUSE_ACCEL must be defined."
210 # define wxUSE_ACCEL 0
212 #endif /* !defined(wxUSE_ACCEL) */
214 #ifndef wxUSE_BMPBUTTON
215 # ifdef wxABORT_ON_CONFIG_ERROR
216 # error "wxUSE_BMPBUTTON must be defined."
218 # define wxUSE_BMPBUTTON 0
220 #endif /* !defined(wxUSE_BMPBUTTON) */
223 # ifdef wxABORT_ON_CONFIG_ERROR
224 # error "wxUSE_BUTTON must be defined."
226 # define wxUSE_BUTTON 0
228 #endif /* !defined(wxUSE_BUTTON) */
230 #ifndef wxUSE_CALENDARCTRL
231 # ifdef wxABORT_ON_CONFIG_ERROR
232 # error "wxUSE_CALENDARCTRL must be defined."
234 # define wxUSE_CALENDARCTRL 0
236 #endif /* !defined(wxUSE_CALENDARCTRL) */
239 # ifdef wxABORT_ON_CONFIG_ERROR
240 # error "wxUSE_CARET must be defined."
242 # define wxUSE_CARET 0
244 #endif /* !defined(wxUSE_CARET) */
246 #ifndef wxUSE_CHECKBOX
247 # ifdef wxABORT_ON_CONFIG_ERROR
248 # error "wxUSE_CHECKBOX must be defined."
250 # define wxUSE_CHECKBOX 0
252 #endif /* !defined(wxUSE_CHECKBOX) */
254 #ifndef wxUSE_CHECKLISTBOX
255 # ifdef wxABORT_ON_CONFIG_ERROR
256 # error "wxUSE_CHECKLISTBOX must be defined."
258 # define wxUSE_CHECKLISTBOX 0
260 #endif /* !defined(wxUSE_CHECKLISTBOX) */
263 # ifdef wxABORT_ON_CONFIG_ERROR
264 # error "wxUSE_CHOICE must be defined."
266 # define wxUSE_CHOICE 0
268 #endif /* !defined(wxUSE_CHOICE) */
270 #ifndef wxUSE_CHOICEDLG
271 # ifdef wxABORT_ON_CONFIG_ERROR
272 # error "wxUSE_CHOICEDLG must be defined."
274 # define wxUSE_CHOICEDLG 0
276 #endif /* !defined(wxUSE_CHOICEDLG) */
278 #ifndef wxUSE_CLIPBOARD
279 # ifdef wxABORT_ON_CONFIG_ERROR
280 # error "wxUSE_CLIPBOARD must be defined."
282 # define wxUSE_CLIPBOARD 0
284 #endif /* !defined(wxUSE_CLIPBOARD) */
286 #ifndef wxUSE_COLOURDLG
287 # ifdef wxABORT_ON_CONFIG_ERROR
288 # error "wxUSE_COLOURDLG must be defined."
290 # define wxUSE_COLOURDLG 0
292 #endif /* !defined(wxUSE_COLOURDLG) */
294 #ifndef wxUSE_COMBOBOX
295 # ifdef wxABORT_ON_CONFIG_ERROR
296 # error "wxUSE_COMBOBOX must be defined."
298 # define wxUSE_COMBOBOX 0
300 #endif /* !defined(wxUSE_COMBOBOX) */
302 #ifndef wxUSE_DATAOBJ
303 # ifdef wxABORT_ON_CONFIG_ERROR
304 # error "wxUSE_DATAOBJ must be defined."
306 # define wxUSE_DATAOBJ 0
308 #endif /* !defined(wxUSE_DATAOBJ) */
310 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
311 # ifdef wxABORT_ON_CONFIG_ERROR
312 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
314 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
316 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
318 #ifndef wxUSE_FILEDLG
319 # ifdef wxABORT_ON_CONFIG_ERROR
320 # error "wxUSE_FILEDLG must be defined."
322 # define wxUSE_FILEDLG 0
324 #endif /* !defined(wxUSE_FILEDLG) */
326 #ifndef wxUSE_FONTDLG
327 # ifdef wxABORT_ON_CONFIG_ERROR
328 # error "wxUSE_FONTDLG must be defined."
330 # define wxUSE_FONTDLG 0
332 #endif /* !defined(wxUSE_FONTDLG) */
334 #ifndef wxUSE_FONTMAP
335 # ifdef wxABORT_ON_CONFIG_ERROR
336 # error "wxUSE_FONTMAP must be defined."
338 # define wxUSE_FONTMAP 0
340 #endif /* !defined(wxUSE_FONTMAP) */
343 # ifdef wxABORT_ON_CONFIG_ERROR
344 # error "wxUSE_GAUGE must be defined."
346 # define wxUSE_GAUGE 0
348 #endif /* !defined(wxUSE_GAUGE) */
351 # ifdef wxABORT_ON_CONFIG_ERROR
352 # error "wxUSE_GRID must be defined."
354 # define wxUSE_GRID 0
356 #endif /* !defined(wxUSE_GRID) */
359 # ifdef wxABORT_ON_CONFIG_ERROR
360 # error "wxUSE_HELP must be defined."
362 # define wxUSE_HELP 0
364 #endif /* !defined(wxUSE_HELP) */
367 # ifdef wxABORT_ON_CONFIG_ERROR
368 # error "wxUSE_HTML must be defined."
370 # define wxUSE_HTML 0
372 #endif /* !defined(wxUSE_HTML) */
374 #ifndef wxUSE_ICO_CUR
375 # ifdef wxABORT_ON_CONFIG_ERROR
376 # error "wxUSE_ICO_CUR must be defined."
378 # define wxUSE_ICO_CUR 0
380 #endif /* !defined(wxUSE_ICO_CUR) */
383 # ifdef wxABORT_ON_CONFIG_ERROR
384 # error "wxUSE_IFF must be defined."
388 #endif /* !defined(wxUSE_IFF) */
390 #ifndef wxUSE_IMAGLIST
391 # ifdef wxABORT_ON_CONFIG_ERROR
392 # error "wxUSE_IMAGLIST must be defined."
394 # define wxUSE_IMAGLIST 0
396 #endif /* !defined(wxUSE_IMAGLIST) */
398 #ifndef wxUSE_JOYSTICK
399 # ifdef wxABORT_ON_CONFIG_ERROR
400 # error "wxUSE_JOYSTICK must be defined."
402 # define wxUSE_JOYSTICK 0
404 #endif /* !defined(wxUSE_JOYSTICK) */
406 #ifndef wxUSE_LISTBOX
407 # ifdef wxABORT_ON_CONFIG_ERROR
408 # error "wxUSE_LISTBOX must be defined."
410 # define wxUSE_LISTBOX 0
412 #endif /* !defined(wxUSE_LISTBOX) */
414 #ifndef wxUSE_LISTCTRL
415 # ifdef wxABORT_ON_CONFIG_ERROR
416 # error "wxUSE_LISTCTRL must be defined."
418 # define wxUSE_LISTCTRL 0
420 #endif /* !defined(wxUSE_LISTCTRL) */
423 # ifdef wxABORT_ON_CONFIG_ERROR
424 # error "wxUSE_LOGGUI must be defined."
426 # define wxUSE_LOGGUI 0
428 #endif /* !defined(wxUSE_LOGGUI) */
430 #ifndef wxUSE_LOGWINDOW
431 # ifdef wxABORT_ON_CONFIG_ERROR
432 # error "wxUSE_LOGWINDOW must be defined."
434 # define wxUSE_LOGWINDOW 0
436 #endif /* !defined(wxUSE_LOGWINDOW) */
438 #ifndef wxUSE_LOG_DIALOG
439 # ifdef wxABORT_ON_CONFIG_ERROR
440 # error "wxUSE_LOG_DIALOG must be defined."
442 # define wxUSE_LOG_DIALOG 0
444 #endif /* !defined(wxUSE_LOG_DIALOG) */
446 #ifndef wxUSE_MDI_ARCHITECTURE
447 # ifdef wxABORT_ON_CONFIG_ERROR
448 # error "wxUSE_MDI_ARCHITECTURE must be defined."
450 # define wxUSE_MDI_ARCHITECTURE 0
452 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
455 # ifdef wxABORT_ON_CONFIG_ERROR
456 # error "wxUSE_MENUS must be defined."
458 # define wxUSE_MENUS 0
460 #endif /* !defined(wxUSE_MENUS) */
463 # ifdef wxABORT_ON_CONFIG_ERROR
464 # error "wxUSE_MSGDLG must be defined."
466 # define wxUSE_MSGDLG 0
468 #endif /* !defined(wxUSE_MSGDLG) */
470 #ifndef wxUSE_NEW_GRID
471 # ifdef wxABORT_ON_CONFIG_ERROR
472 # error "wxUSE_NEW_GRID must be defined."
474 # define wxUSE_NEW_GRID 0
476 #endif /* !defined(wxUSE_NEW_GRID) */
478 #ifndef wxUSE_NOTEBOOK
479 # ifdef wxABORT_ON_CONFIG_ERROR
480 # error "wxUSE_NOTEBOOK must be defined."
482 # define wxUSE_NOTEBOOK 0
484 #endif /* !defined(wxUSE_NOTEBOOK) */
486 #ifndef wxUSE_PALETTE
487 # ifdef wxABORT_ON_CONFIG_ERROR
488 # error "wxUSE_PALETTE must be defined."
490 # define wxUSE_PALETTE 0
492 #endif /* !defined(wxUSE_PALETTE) */
494 #ifndef wxUSE_POPUPWIN
495 # ifdef wxABORT_ON_CONFIG_ERROR
496 # error "wxUSE_POPUPWIN must be defined."
498 # define wxUSE_POPUPWIN 0
500 #endif /* !defined(wxUSE_POPUPWIN) */
502 #ifndef wxUSE_PRINTING_ARCHITECTURE
503 # ifdef wxABORT_ON_CONFIG_ERROR
504 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
506 # define wxUSE_PRINTING_ARCHITECTURE 0
508 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
510 #ifndef wxUSE_RADIOBOX
511 # ifdef wxABORT_ON_CONFIG_ERROR
512 # error "wxUSE_RADIOBOX must be defined."
514 # define wxUSE_RADIOBOX 0
516 #endif /* !defined(wxUSE_RADIOBOX) */
518 #ifndef wxUSE_RADIOBTN
519 # ifdef wxABORT_ON_CONFIG_ERROR
520 # error "wxUSE_RADIOBTN must be defined."
522 # define wxUSE_RADIOBTN 0
524 #endif /* !defined(wxUSE_RADIOBTN) */
527 # ifdef wxABORT_ON_CONFIG_ERROR
528 # error "wxUSE_SASH must be defined."
530 # define wxUSE_SASH 0
532 #endif /* !defined(wxUSE_SASH) */
534 #ifndef wxUSE_SCROLLBAR
535 # ifdef wxABORT_ON_CONFIG_ERROR
536 # error "wxUSE_SCROLLBAR must be defined."
538 # define wxUSE_SCROLLBAR 0
540 #endif /* !defined(wxUSE_SCROLLBAR) */
543 # ifdef wxABORT_ON_CONFIG_ERROR
544 # error "wxUSE_SLIDER must be defined."
546 # define wxUSE_SLIDER 0
548 #endif /* !defined(wxUSE_SLIDER) */
550 #ifndef wxUSE_SPINBTN
551 # ifdef wxABORT_ON_CONFIG_ERROR
552 # error "wxUSE_SPINBTN must be defined."
554 # define wxUSE_SPINBTN 0
556 #endif /* !defined(wxUSE_SPINBTN) */
558 #ifndef wxUSE_SPINCTRL
559 # ifdef wxABORT_ON_CONFIG_ERROR
560 # error "wxUSE_SPINCTRL must be defined."
562 # define wxUSE_SPINCTRL 0
564 #endif /* !defined(wxUSE_SPINCTRL) */
567 # ifdef wxABORT_ON_CONFIG_ERROR
568 # error "wxUSE_SPLASH must be defined."
570 # define wxUSE_SPLASH 0
572 #endif /* !defined(wxUSE_SPLASH) */
574 #ifndef wxUSE_SPLITTER
575 # ifdef wxABORT_ON_CONFIG_ERROR
576 # error "wxUSE_SPLITTER must be defined."
578 # define wxUSE_SPLITTER 0
580 #endif /* !defined(wxUSE_SPLITTER) */
582 #ifndef wxUSE_STATBMP
583 # ifdef wxABORT_ON_CONFIG_ERROR
584 # error "wxUSE_STATBMP must be defined."
586 # define wxUSE_STATBMP 0
588 #endif /* !defined(wxUSE_STATBMP) */
590 #ifndef wxUSE_STATBOX
591 # ifdef wxABORT_ON_CONFIG_ERROR
592 # error "wxUSE_STATBOX must be defined."
594 # define wxUSE_STATBOX 0
596 #endif /* !defined(wxUSE_STATBOX) */
598 #ifndef wxUSE_STATLINE
599 # ifdef wxABORT_ON_CONFIG_ERROR
600 # error "wxUSE_STATLINE must be defined."
602 # define wxUSE_STATLINE 0
604 #endif /* !defined(wxUSE_STATLINE) */
606 #ifndef wxUSE_STATTEXT
607 # ifdef wxABORT_ON_CONFIG_ERROR
608 # error "wxUSE_STATTEXT must be defined."
610 # define wxUSE_STATTEXT 0
612 #endif /* !defined(wxUSE_STATTEXT) */
614 #ifndef wxUSE_STATUSBAR
615 # ifdef wxABORT_ON_CONFIG_ERROR
616 # error "wxUSE_STATUSBAR must be defined."
618 # define wxUSE_STATUSBAR 0
620 #endif /* !defined(wxUSE_STATUSBAR) */
622 #ifndef wxUSE_TAB_DIALOG
623 # ifdef wxABORT_ON_CONFIG_ERROR
624 # error "wxUSE_TAB_DIALOG must be defined."
626 # define wxUSE_TAB_DIALOG 0
628 #endif /* !defined(wxUSE_TAB_DIALOG) */
630 #ifndef wxUSE_TEXTCTRL
631 # ifdef wxABORT_ON_CONFIG_ERROR
632 # error "wxUSE_TEXTCTRL must be defined."
634 # define wxUSE_TEXTCTRL 0
636 #endif /* !defined(wxUSE_TEXTCTRL) */
638 #ifndef wxUSE_TIPWINDOW
639 # ifdef wxABORT_ON_CONFIG_ERROR
640 # error "wxUSE_TIPWINDOW must be defined."
642 # define wxUSE_TIPWINDOW 0
644 #endif /* !defined(wxUSE_TIPWINDOW) */
646 #ifndef wxUSE_TOOLBAR
647 # ifdef wxABORT_ON_CONFIG_ERROR
648 # error "wxUSE_TOOLBAR must be defined."
650 # define wxUSE_TOOLBAR 0
652 #endif /* !defined(wxUSE_TOOLBAR) */
654 #ifndef wxUSE_TOOLTIPS
655 # ifdef wxABORT_ON_CONFIG_ERROR
656 # error "wxUSE_TOOLTIPS must be defined."
658 # define wxUSE_TOOLTIPS 0
660 #endif /* !defined(wxUSE_TOOLTIPS) */
662 #ifndef wxUSE_TREECTRL
663 # ifdef wxABORT_ON_CONFIG_ERROR
664 # error "wxUSE_TREECTRL must be defined."
666 # define wxUSE_TREECTRL 0
668 #endif /* !defined(wxUSE_TREECTRL) */
670 #ifndef wxUSE_WXHTML_HELP
671 # ifdef wxABORT_ON_CONFIG_ERROR
672 # error "wxUSE_WXHTML_HELP must be defined."
674 # define wxUSE_WXHTML_HELP 0
676 #endif /* !defined(wxUSE_WXHTML_HELP) */
678 #endif /* wxUSE_GUI */
681 check consistency of the settings
684 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
686 # ifdef wxABORT_ON_CONFIG_ERROR
687 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
689 # undef wxUSE_PROTOCOL
690 # define wxUSE_PROTOCOL 1
693 #endif /* wxUSE_PROTOCOL_XXX */
697 # ifdef wxABORT_ON_CONFIG_ERROR
698 # error "wxUSE_URL requires wxUSE_PROTOCOL"
700 # undef wxUSE_PROTOCOL
701 # define wxUSE_PROTOCOL 1
704 #endif /* wxUSE_URL */
708 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
709 # ifdef wxABORT_ON_CONFIG_ERROR
710 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
712 # undef wxUSE_SOCKETS
713 # define wxUSE_SOCKETS 1
719 # ifdef wxABORT_ON_CONFIG_ERROR
720 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
722 # undef wxUSE_STREAMS
723 # define wxUSE_STREAMS 1
726 #endif /* wxUSE_PROTOCOL */
728 /* non GUI settings */
731 # ifdef wxABORT_ON_CONFIG_ERROR
732 # error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
734 # undef wxUSE_LONGLONG
735 # define wxUSE_LONGLONG 1
738 #endif /* wxUSE_STOPWATCH */
740 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
741 # ifdef wxABORT_ON_CONFIG_ERROR
742 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
744 # undef wxUSE_TEXTFILE
745 # define wxUSE_TEXTFILE 1
747 #endif /* wxUSE_MIMETYPE */
749 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
750 # ifdef wxABORT_ON_CONFIG_ERROR
751 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
753 # undef wxUSE_TEXTBUFFER
754 # define wxUSE_TEXTBUFFER 1
756 #endif /* wxUSE_TEXTFILE */
758 #if wxUSE_TEXTFILE && !wxUSE_FILE
759 # ifdef wxABORT_ON_CONFIG_ERROR
760 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
763 # define wxUSE_FILE 1
765 #endif /* wxUSE_TEXTFILE */
767 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
768 # ifdef wxABORT_ON_CONFIG_ERROR
769 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
771 # undef wxUSE_UNICODE
772 # define wxUSE_UNICODE 1
774 #endif /* wxUSE_UNICODE_MSLU */
776 #if wxUSE_ODBC && wxUSE_UNICODE
777 # ifdef wxABORT_ON_CONFIG_ERROR
778 /* (ODBC classes aren't Unicode-compatible yet) */
779 # error "wxUSE_ODBC can't be used with wxUSE_UNICODE"
782 # define wxUSE_ODBC 0
784 #endif /* wxUSE_ODBC */
786 /* the rest of the tests is for the GUI settings only */
789 #if wxUSE_BUTTON || \
790 wxUSE_CALENDARCTRL || \
795 wxUSE_CHECKLISTBOX || \
818 # ifdef wxABORT_ON_CONFIG_ERROR
819 # error "wxUSE_CONTROLS unset but some controls used"
821 # undef wxUSE_CONTROLS
822 # define wxUSE_CONTROLS 1
825 #endif /* controls */
827 /* wxUniv-specific dependencies */
828 #if defined(__WXUNIVERSAL__)
829 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
830 # ifdef wxABORT_ON_CONFIG_ERROR
831 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
833 # undef wxUSE_POPUPWIN
834 # define wxUSE_POPUPWIN 1
840 # ifdef wxABORT_ON_CONFIG_ERROR
841 # error "wxComboBox requires wxListBox in wxUniversal"
843 # undef wxUSE_LISTBOX
844 # define wxUSE_LISTBOX 1
847 # endif /* wxUSE_COMBOBOX */
851 # ifdef wxABORT_ON_CONFIG_ERROR
852 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
854 # undef wxUSE_CHECKBOX
855 # define wxUSE_CHECKBOX 1
858 # endif /* wxUSE_RADIOBTN */
862 # ifdef wxABORT_ON_CONFIG_ERROR
863 # error "wxTextCtrl requires wxCaret in wxUniversal"
866 # define wxUSE_CARET 1
868 # endif /* wxUSE_CARET */
870 # if !wxUSE_SCROLLBAR
871 # ifdef wxABORT_ON_CONFIG_ERROR
872 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
874 # undef wxUSE_SCROLLBAR
875 # define wxUSE_SCROLLBAR 1
877 # endif /* wxUSE_SCROLLBAR */
878 # endif /* wxUSE_TEXTCTRL */
879 #endif /* __WXUNIVERSAL__ */
881 /* wxGTK-specific dependencies */
883 # ifndef __WXUNIVERSAL__
884 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
885 # ifdef wxABORT_ON_CONFIG_ERROR
886 # error "MDI requires wxUSE_MENUS in wxGTK"
889 # define wxUSE_MENUS 1
892 # endif /* !__WXUNIVERSAL__ */
896 # ifdef wxABORT_ON_CONFIG_ERROR
897 # error "wxJoystick requires threads in wxGTK"
899 # undef wxUSE_JOYSTICK
900 # define wxUSE_JOYSTICK 0
904 #endif /* wxGTK && !wxUniv */
906 /* wxMSW-specific dependencies */
908 # ifndef wxUSE_UNICODE_MSLU
909 # ifdef wxABORT_ON_CONFIG_ERROR
910 # error "wxUSE_UNICODE_MSLU must be defined."
912 # define wxUSE_UNICODE_MSLU 0
914 # endif /* wxUSE_UNICODE_MSLU */
915 # ifndef wxUSE_MS_HTML_HELP
916 # ifdef wxABORT_ON_CONFIG_ERROR
917 # error "wxUSE_MS_HTML_HELP must be defined."
919 # define wxUSE_MS_HTML_HELP 0
921 # endif /* !defined(wxUSE_MS_HTML_HELP) */
922 # ifndef wxUSE_DIALUP_MANAGER
923 # ifdef wxABORT_ON_CONFIG_ERROR
924 # error "wxUSE_DIALUP_MANAGER must be defined."
926 # define wxUSE_DIALUP_MANAGER 0
928 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
930 # if !wxUSE_DYNAMIC_LOADER
931 # if wxUSE_MS_HTML_HELP
932 # ifdef wxABORT_ON_CONFIG_ERROR
933 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
935 # define wxUSE_DYNAMIC_LOADER 1
938 # if wxUSE_DIALUP_MANAGER
939 # ifdef wxABORT_ON_CONFIG_ERROR
940 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
942 # define wxUSE_DYNAMIC_LOADER 1
945 # endif /* wxUSE_DYNAMIC_LOADER */
948 /* wxMotif-specific dependencies */
949 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
950 # undef wxUSE_TAB_DIALOG
951 # define wxUSE_TAB_DIALOG 1
953 #if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
954 # undef wxUSE_TOGGLEBTN
955 # define wxUSE_TOGGLEBTN 0
958 /* generic controls dependencies */
959 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
960 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
961 /* all common controls are needed by these dialogs */
962 # if !defined(wxUSE_CHOICE) || \
963 !defined(wxUSE_TEXTCTRL) || \
964 !defined(wxUSE_BUTTON) || \
965 !defined(wxUSE_CHECKBOX) || \
966 !defined(wxUSE_STATTEXT)
967 # ifdef wxABORT_ON_CONFIG_ERROR
968 # error "These common controls are needed by common dialogs"
971 # define wxUSE_CHOICE 1
972 # undef wxUSE_TEXTCTRL
973 # define wxUSE_TEXTCTRL 1
975 # define wxUSE_BUTTON 1
976 # undef wxUSE_CHECKBOX
977 # define wxUSE_CHECKBOX 1
978 # undef wxUSE_STATTEXT
979 # define wxUSE_STATTEXT 1
983 #endif /* !wxMSW || wxUniv */
985 /* common dependencies */
986 #if wxUSE_CALENDARCTRL
987 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
988 # ifdef wxABORT_ON_CONFIG_ERROR
989 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
991 # undef wxUSE_SPINBTN
992 # undef wxUSE_COMBOBOX
993 # define wxUSE_SPINBTN 1
994 # define wxUSE_COMBOBOX 1
997 #endif /* wxUSE_CALENDARCTRL */
999 #if wxUSE_CHECKLISTBOX
1001 # ifdef wxABORT_ON_CONFIG_ERROR
1002 # error "wxCheckListBox requires wxListBox"
1004 # undef wxUSE_LISTBOX
1005 # define wxUSE_LISTBOX 1
1008 #endif /* wxUSE_RADIOBTN */
1010 #if wxUSE_WXHTML_HELP
1011 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX
1012 # ifdef wxABORT_ON_CONFIG_ERROR
1013 # error "Built in help controller can't be compiled"
1016 # define wxUSE_HELP 1
1018 # define wxUSE_HTML 1
1019 # undef wxUSE_COMBOBOX
1020 # define wxUSE_COMBOBOX 1
1023 #endif /* wxUSE_WXHTML_HELP */
1025 #if wxUSE_PRINTING_ARCHITECTURE
1026 # if !wxUSE_COMBOBOX
1027 # ifdef wxABORT_ON_CONFIG_ERROR
1028 # error "Print dialog requires wxUSE_COMBOBOX"
1030 # undef wxUSE_COMBOBOX
1031 # define wxUSE_COMBOBOX 1
1034 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1036 #if wxUSE_DOC_VIEW_ARCHITECTURE
1038 # ifdef wxABORT_ON_CONFIG_ERROR
1039 # error "DocView requires wxUSE_MENUS"
1042 # define wxUSE_MENUS 1
1045 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1048 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1049 # ifdef wxABORT_ON_CONFIG_ERROR
1050 # error "wxFileDialog must be compiled as well"
1052 # undef wxUSE_FILEDLG
1053 # define wxUSE_FILEDLG 1
1056 #endif /* wxUSE_FILEDLG */
1059 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1060 # ifdef wxABORT_ON_CONFIG_ERROR
1061 # error "wxImageList must be compiled as well"
1063 # undef wxUSE_IMAGLIST
1064 # define wxUSE_IMAGLIST 1
1067 #endif /* !wxUSE_IMAGLIST */
1070 # ifdef wxABORT_ON_CONFIG_ERROR
1071 /* FIXME: should compile without it, of course, but doesn't */
1072 # error "wxMessageBox is always needed"
1074 # undef wxUSE_MSGDLG
1075 # define wxUSE_MSGDLG 1
1080 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1081 # ifdef wxABORT_ON_CONFIG_ERROR
1082 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1084 # undef wxUSE_RADIOBTN
1085 # undef wxUSE_STATBOX
1086 # define wxUSE_RADIOBTN 1
1087 # define wxUSE_STATBOX 1
1090 #endif /* wxUSE_RADIOBOX */
1093 # if !wxUSE_TEXTCTRL
1094 # ifdef wxABORT_ON_CONFIG_ERROR
1095 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1097 # undef wxUSE_TEXTCTRL
1098 # define wxUSE_TEXTCTRL 1
1101 #endif /* wxUSE_LOGWINDOW */
1103 #if wxUSE_LOG_DIALOG
1104 # if !wxUSE_LISTCTRL
1105 # ifdef wxABORT_ON_CONFIG_ERROR
1106 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1108 # undef wxUSE_LISTCTRL
1109 # define wxUSE_LISTCTRL 1
1112 #endif /* wxUSE_LOG_DIALOG */
1114 /* I wonder if we shouldn't just remove all occurrences of
1115 wxUSE_DYNAMIC_CLASSES from the sources? */
1116 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
1117 # ifdef wxABORT_ON_CONFIG_ERROR
1118 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
1120 # undef wxUSE_DYNAMIC_CLASSES
1121 # define wxUSE_DYNAMIC_CLASSES 1
1123 #endif /* wxUSE_DYNAMIC_CLASSES */
1125 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1126 # ifdef wxABORT_ON_CONFIG_ERROR
1127 # error "wxClipboard requires wxDataObject"
1129 # undef wxUSE_DATAOBJ
1130 # define wxUSE_DATAOBJ 1
1132 #endif /* wxUSE_CLIPBOARD */
1134 #endif /* wxUSE_GUI */