]>
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) */
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 #ifndef wxUSE_EXCEPTIONS
54 # ifdef wxABORT_ON_CONFIG_ERROR
55 # error "wxUSE_EXCEPTIONS must be defined."
57 # define wxUSE_EXCEPTIONS 0
59 #endif /* !defined(wxUSE_EXCEPTIONS) */
61 #ifndef wxUSE_FILESYSTEM
62 # ifdef wxABORT_ON_CONFIG_ERROR
63 # error "wxUSE_FILESYSTEM must be defined."
65 # define wxUSE_FILESYSTEM 0
67 #endif /* !defined(wxUSE_FILESYSTEM) */
69 /* don't give an error about this one yet, it's not fully implemented */
70 #ifndef wxUSE_FSVOLUME
71 # define wxUSE_FSVOLUME 0
72 #endif /* !defined(wxUSE_FSVOLUME) */
74 #ifndef wxUSE_DYNAMIC_LOADER
75 # ifdef wxABORT_ON_CONFIG_ERROR
76 # error "wxUSE_DYNAMIC_LOADER must be defined."
78 # define wxUSE_DYNAMIC_LOADER 0
80 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
83 # ifdef wxABORT_ON_CONFIG_ERROR
84 # error "wxUSE_LOG must be defined."
88 #endif /* !defined(wxUSE_LOG) */
90 #ifndef wxUSE_LONGLONG
91 # ifdef wxABORT_ON_CONFIG_ERROR
92 # error "wxUSE_LONGLONG must be defined."
94 # define wxUSE_LONGLONG 0
96 #endif /* !defined(wxUSE_LONGLONG) */
98 #ifndef wxUSE_MIMETYPE
99 # ifdef wxABORT_ON_CONFIG_ERROR
100 # error "wxUSE_MIMETYPE must be defined."
102 # define wxUSE_MIMETYPE 0
104 #endif /* !defined(wxUSE_MIMETYPE) */
106 #ifndef wxUSE_PROTOCOL
107 # ifdef wxABORT_ON_CONFIG_ERROR
108 # error "wxUSE_PROTOCOL must be defined."
110 # define wxUSE_PROTOCOL 0
112 #endif /* !defined(wxUSE_PROTOCOL) */
114 /* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
116 # undef wxUSE_PROTOCOL_HTTP
117 # undef wxUSE_PROTOCOL_FTP
118 # undef wxUSE_PROTOCOL_FILE
119 # define wxUSE_PROTOCOL_HTTP 0
120 # define wxUSE_PROTOCOL_FTP 0
121 # define wxUSE_PROTOCOL_FILE 0
122 #endif /* wxUSE_PROTOCOL */
124 #ifndef wxUSE_PROTOCOL_HTTP
125 # ifdef wxABORT_ON_CONFIG_ERROR
126 # error "wxUSE_PROTOCOL_HTTP must be defined."
128 # define wxUSE_PROTOCOL_HTTP 0
130 #endif /* !defined(wxUSE_PROTOCOL_HTTP) */
132 #ifndef wxUSE_PROTOCOL_FTP
133 # ifdef wxABORT_ON_CONFIG_ERROR
134 # error "wxUSE_PROTOCOL_FTP must be defined."
136 # define wxUSE_PROTOCOL_FTP 0
138 #endif /* !defined(wxUSE_PROTOCOL_FTP) */
140 #ifndef wxUSE_PROTOCOL_FILE
141 # ifdef wxABORT_ON_CONFIG_ERROR
142 # error "wxUSE_PROTOCOL_FILE must be defined."
144 # define wxUSE_PROTOCOL_FILE 0
146 #endif /* !defined(wxUSE_PROTOCOL_FILE) */
149 # ifdef wxABORT_ON_CONFIG_ERROR
150 # error "wxUSE_REGEX must be defined."
152 # define wxUSE_REGEX 0
154 #endif /* !defined(wxUSE_REGEX) */
157 # ifdef wxABORT_ON_CONFIG_ERROR
158 # error "wxUSE_XML must be defined."
162 #endif /* !defined(wxUSE_XML) */
164 #ifndef wxUSE_SOCKETS
165 # ifdef wxABORT_ON_CONFIG_ERROR
166 # error "wxUSE_SOCKETS must be defined."
168 # define wxUSE_SOCKETS 0
170 #endif /* !defined(wxUSE_SOCKETS) */
172 #ifndef wxUSE_STREAMS
173 # ifdef wxABORT_ON_CONFIG_ERROR
174 # error "wxUSE_STREAMS must be defined."
176 # define wxUSE_STREAMS 0
178 #endif /* !defined(wxUSE_STREAMS) */
180 #ifndef wxUSE_STOPWATCH
181 # ifdef wxABORT_ON_CONFIG_ERROR
182 # error "wxUSE_STOPWATCH must be defined."
184 # define wxUSE_STOPWATCH 0
186 #endif /* !defined(wxUSE_STOPWATCH) */
188 #ifndef wxUSE_TEXTBUFFER
189 # ifdef wxABORT_ON_CONFIG_ERROR
190 # error "wxUSE_TEXTBUFFER must be defined."
192 # define wxUSE_TEXTBUFFER 0
194 #endif /* !defined(wxUSE_TEXTBUFFER) */
196 #ifndef wxUSE_TEXTFILE
197 # ifdef wxABORT_ON_CONFIG_ERROR
198 # error "wxUSE_TEXTFILE must be defined."
200 # define wxUSE_TEXTFILE 0
202 #endif /* !defined(wxUSE_TEXTFILE) */
204 #ifndef wxUSE_UNICODE
205 # ifdef wxABORT_ON_CONFIG_ERROR
206 # error "wxUSE_UNICODE must be defined."
208 # define wxUSE_UNICODE 0
210 #endif /* !defined(wxUSE_UNICODE) */
213 # ifdef wxABORT_ON_CONFIG_ERROR
214 # error "wxUSE_URL must be defined."
218 #endif /* !defined(wxUSE_URL) */
221 all these tests are for GUI only
226 all of the settings tested below must be defined or we'd get an error from
227 preprocessor about invalid integer expression
231 # ifdef wxABORT_ON_CONFIG_ERROR
232 # error "wxUSE_ACCEL must be defined."
234 # define wxUSE_ACCEL 0
236 #endif /* !defined(wxUSE_ACCEL) */
238 #ifndef wxUSE_BMPBUTTON
239 # ifdef wxABORT_ON_CONFIG_ERROR
240 # error "wxUSE_BMPBUTTON must be defined."
242 # define wxUSE_BMPBUTTON 0
244 #endif /* !defined(wxUSE_BMPBUTTON) */
247 # ifdef wxABORT_ON_CONFIG_ERROR
248 # error "wxUSE_BUTTON must be defined."
250 # define wxUSE_BUTTON 0
252 #endif /* !defined(wxUSE_BUTTON) */
254 #ifndef wxUSE_CALENDARCTRL
255 # ifdef wxABORT_ON_CONFIG_ERROR
256 # error "wxUSE_CALENDARCTRL must be defined."
258 # define wxUSE_CALENDARCTRL 0
260 #endif /* !defined(wxUSE_CALENDARCTRL) */
263 # ifdef wxABORT_ON_CONFIG_ERROR
264 # error "wxUSE_CARET must be defined."
266 # define wxUSE_CARET 0
268 #endif /* !defined(wxUSE_CARET) */
270 #ifndef wxUSE_CHECKBOX
271 # ifdef wxABORT_ON_CONFIG_ERROR
272 # error "wxUSE_CHECKBOX must be defined."
274 # define wxUSE_CHECKBOX 0
276 #endif /* !defined(wxUSE_CHECKBOX) */
278 #ifndef wxUSE_CHECKLISTBOX
279 # ifdef wxABORT_ON_CONFIG_ERROR
280 # error "wxUSE_CHECKLISTBOX must be defined."
282 # define wxUSE_CHECKLISTBOX 0
284 #endif /* !defined(wxUSE_CHECKLISTBOX) */
287 # ifdef wxABORT_ON_CONFIG_ERROR
288 # error "wxUSE_CHOICE must be defined."
290 # define wxUSE_CHOICE 0
292 #endif /* !defined(wxUSE_CHOICE) */
294 #ifndef wxUSE_CHOICEDLG
295 # ifdef wxABORT_ON_CONFIG_ERROR
296 # error "wxUSE_CHOICEDLG must be defined."
298 # define wxUSE_CHOICEDLG 0
300 #endif /* !defined(wxUSE_CHOICEDLG) */
302 #ifndef wxUSE_CLIPBOARD
303 # ifdef wxABORT_ON_CONFIG_ERROR
304 # error "wxUSE_CLIPBOARD must be defined."
306 # define wxUSE_CLIPBOARD 0
308 #endif /* !defined(wxUSE_CLIPBOARD) */
310 #ifndef wxUSE_COLOURDLG
311 # ifdef wxABORT_ON_CONFIG_ERROR
312 # error "wxUSE_COLOURDLG must be defined."
314 # define wxUSE_COLOURDLG 0
316 #endif /* !defined(wxUSE_COLOURDLG) */
318 #ifndef wxUSE_COMBOBOX
319 # ifdef wxABORT_ON_CONFIG_ERROR
320 # error "wxUSE_COMBOBOX must be defined."
322 # define wxUSE_COMBOBOX 0
324 #endif /* !defined(wxUSE_COMBOBOX) */
326 #ifndef wxUSE_DATAOBJ
327 # ifdef wxABORT_ON_CONFIG_ERROR
328 # error "wxUSE_DATAOBJ must be defined."
330 # define wxUSE_DATAOBJ 0
332 #endif /* !defined(wxUSE_DATAOBJ) */
334 #ifndef wxUSE_DISPLAY
335 # ifdef wxABORT_ON_CONFIG_ERROR
336 # error "wxUSE_DISPLAY must be defined."
338 # define wxUSE_DISPLAY 0
340 #endif /* !defined(wxUSE_DISPLAY) */
342 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
343 # ifdef wxABORT_ON_CONFIG_ERROR
344 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
346 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
348 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
350 #ifndef wxUSE_FILEDLG
351 # ifdef wxABORT_ON_CONFIG_ERROR
352 # error "wxUSE_FILEDLG must be defined."
354 # define wxUSE_FILEDLG 0
356 #endif /* !defined(wxUSE_FILEDLG) */
358 #ifndef wxUSE_FONTDLG
359 # ifdef wxABORT_ON_CONFIG_ERROR
360 # error "wxUSE_FONTDLG must be defined."
362 # define wxUSE_FONTDLG 0
364 #endif /* !defined(wxUSE_FONTDLG) */
366 #ifndef wxUSE_FONTMAP
367 # ifdef wxABORT_ON_CONFIG_ERROR
368 # error "wxUSE_FONTMAP must be defined."
370 # define wxUSE_FONTMAP 0
372 #endif /* !defined(wxUSE_FONTMAP) */
375 # ifdef wxABORT_ON_CONFIG_ERROR
376 # error "wxUSE_GAUGE must be defined."
378 # define wxUSE_GAUGE 0
380 #endif /* !defined(wxUSE_GAUGE) */
383 # ifdef wxABORT_ON_CONFIG_ERROR
384 # error "wxUSE_GRID must be defined."
386 # define wxUSE_GRID 0
388 #endif /* !defined(wxUSE_GRID) */
391 # ifdef wxABORT_ON_CONFIG_ERROR
392 # error "wxUSE_HELP must be defined."
394 # define wxUSE_HELP 0
396 #endif /* !defined(wxUSE_HELP) */
399 # ifdef wxABORT_ON_CONFIG_ERROR
400 # error "wxUSE_HTML must be defined."
402 # define wxUSE_HTML 0
404 #endif /* !defined(wxUSE_HTML) */
406 #ifndef wxUSE_ICO_CUR
407 # ifdef wxABORT_ON_CONFIG_ERROR
408 # error "wxUSE_ICO_CUR must be defined."
410 # define wxUSE_ICO_CUR 0
412 #endif /* !defined(wxUSE_ICO_CUR) */
415 # ifdef wxABORT_ON_CONFIG_ERROR
416 # error "wxUSE_IFF must be defined."
420 #endif /* !defined(wxUSE_IFF) */
422 #ifndef wxUSE_IMAGLIST
423 # ifdef wxABORT_ON_CONFIG_ERROR
424 # error "wxUSE_IMAGLIST must be defined."
426 # define wxUSE_IMAGLIST 0
428 #endif /* !defined(wxUSE_IMAGLIST) */
430 #ifndef wxUSE_JOYSTICK
431 # ifdef wxABORT_ON_CONFIG_ERROR
432 # error "wxUSE_JOYSTICK must be defined."
434 # define wxUSE_JOYSTICK 0
436 #endif /* !defined(wxUSE_JOYSTICK) */
438 #ifndef wxUSE_LISTBOOK
439 # ifdef wxABORT_ON_CONFIG_ERROR
440 # error "wxUSE_LISTBOOK must be defined."
442 # define wxUSE_LISTBOOK 0
444 #endif /* !defined(wxUSE_LISTBOOK) */
446 #ifndef wxUSE_LISTBOX
447 # ifdef wxABORT_ON_CONFIG_ERROR
448 # error "wxUSE_LISTBOX must be defined."
450 # define wxUSE_LISTBOX 0
452 #endif /* !defined(wxUSE_LISTBOX) */
454 #ifndef wxUSE_LISTCTRL
455 # ifdef wxABORT_ON_CONFIG_ERROR
456 # error "wxUSE_LISTCTRL must be defined."
458 # define wxUSE_LISTCTRL 0
460 #endif /* !defined(wxUSE_LISTCTRL) */
463 # ifdef wxABORT_ON_CONFIG_ERROR
464 # error "wxUSE_LOGGUI must be defined."
466 # define wxUSE_LOGGUI 0
468 #endif /* !defined(wxUSE_LOGGUI) */
470 #ifndef wxUSE_LOGWINDOW
471 # ifdef wxABORT_ON_CONFIG_ERROR
472 # error "wxUSE_LOGWINDOW must be defined."
474 # define wxUSE_LOGWINDOW 0
476 #endif /* !defined(wxUSE_LOGWINDOW) */
478 #ifndef wxUSE_LOG_DIALOG
479 # ifdef wxABORT_ON_CONFIG_ERROR
480 # error "wxUSE_LOG_DIALOG must be defined."
482 # define wxUSE_LOG_DIALOG 0
484 #endif /* !defined(wxUSE_LOG_DIALOG) */
486 #ifndef wxUSE_MDI_ARCHITECTURE
487 # ifdef wxABORT_ON_CONFIG_ERROR
488 # error "wxUSE_MDI_ARCHITECTURE must be defined."
490 # define wxUSE_MDI_ARCHITECTURE 0
492 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
495 # ifdef wxABORT_ON_CONFIG_ERROR
496 # error "wxUSE_MENUS must be defined."
498 # define wxUSE_MENUS 0
500 #endif /* !defined(wxUSE_MENUS) */
503 # ifdef wxABORT_ON_CONFIG_ERROR
504 # error "wxUSE_MSGDLG must be defined."
506 # define wxUSE_MSGDLG 0
508 #endif /* !defined(wxUSE_MSGDLG) */
510 #ifndef wxUSE_NOTEBOOK
511 # ifdef wxABORT_ON_CONFIG_ERROR
512 # error "wxUSE_NOTEBOOK must be defined."
514 # define wxUSE_NOTEBOOK 0
516 #endif /* !defined(wxUSE_NOTEBOOK) */
518 #ifndef wxUSE_PALETTE
519 # ifdef wxABORT_ON_CONFIG_ERROR
520 # error "wxUSE_PALETTE must be defined."
522 # define wxUSE_PALETTE 0
524 #endif /* !defined(wxUSE_PALETTE) */
526 #ifndef wxUSE_POPUPWIN
527 # ifdef wxABORT_ON_CONFIG_ERROR
528 # error "wxUSE_POPUPWIN must be defined."
530 # define wxUSE_POPUPWIN 0
532 #endif /* !defined(wxUSE_POPUPWIN) */
534 #ifndef wxUSE_PRINTING_ARCHITECTURE
535 # ifdef wxABORT_ON_CONFIG_ERROR
536 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
538 # define wxUSE_PRINTING_ARCHITECTURE 0
540 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
542 #ifndef wxUSE_RADIOBOX
543 # ifdef wxABORT_ON_CONFIG_ERROR
544 # error "wxUSE_RADIOBOX must be defined."
546 # define wxUSE_RADIOBOX 0
548 #endif /* !defined(wxUSE_RADIOBOX) */
550 #ifndef wxUSE_RADIOBTN
551 # ifdef wxABORT_ON_CONFIG_ERROR
552 # error "wxUSE_RADIOBTN must be defined."
554 # define wxUSE_RADIOBTN 0
556 #endif /* !defined(wxUSE_RADIOBTN) */
559 # ifdef wxABORT_ON_CONFIG_ERROR
560 # error "wxUSE_SASH must be defined."
562 # define wxUSE_SASH 0
564 #endif /* !defined(wxUSE_SASH) */
566 #ifndef wxUSE_SCROLLBAR
567 # ifdef wxABORT_ON_CONFIG_ERROR
568 # error "wxUSE_SCROLLBAR must be defined."
570 # define wxUSE_SCROLLBAR 0
572 #endif /* !defined(wxUSE_SCROLLBAR) */
575 # ifdef wxABORT_ON_CONFIG_ERROR
576 # error "wxUSE_SLIDER must be defined."
578 # define wxUSE_SLIDER 0
580 #endif /* !defined(wxUSE_SLIDER) */
582 #ifndef wxUSE_SPINBTN
583 # ifdef wxABORT_ON_CONFIG_ERROR
584 # error "wxUSE_SPINBTN must be defined."
586 # define wxUSE_SPINBTN 0
588 #endif /* !defined(wxUSE_SPINBTN) */
590 #ifndef wxUSE_SPINCTRL
591 # ifdef wxABORT_ON_CONFIG_ERROR
592 # error "wxUSE_SPINCTRL must be defined."
594 # define wxUSE_SPINCTRL 0
596 #endif /* !defined(wxUSE_SPINCTRL) */
599 # ifdef wxABORT_ON_CONFIG_ERROR
600 # error "wxUSE_SPLASH must be defined."
602 # define wxUSE_SPLASH 0
604 #endif /* !defined(wxUSE_SPLASH) */
606 #ifndef wxUSE_SPLITTER
607 # ifdef wxABORT_ON_CONFIG_ERROR
608 # error "wxUSE_SPLITTER must be defined."
610 # define wxUSE_SPLITTER 0
612 #endif /* !defined(wxUSE_SPLITTER) */
614 #ifndef wxUSE_STATBMP
615 # ifdef wxABORT_ON_CONFIG_ERROR
616 # error "wxUSE_STATBMP must be defined."
618 # define wxUSE_STATBMP 0
620 #endif /* !defined(wxUSE_STATBMP) */
622 #ifndef wxUSE_STATBOX
623 # ifdef wxABORT_ON_CONFIG_ERROR
624 # error "wxUSE_STATBOX must be defined."
626 # define wxUSE_STATBOX 0
628 #endif /* !defined(wxUSE_STATBOX) */
630 #ifndef wxUSE_STATLINE
631 # ifdef wxABORT_ON_CONFIG_ERROR
632 # error "wxUSE_STATLINE must be defined."
634 # define wxUSE_STATLINE 0
636 #endif /* !defined(wxUSE_STATLINE) */
638 #ifndef wxUSE_STATTEXT
639 # ifdef wxABORT_ON_CONFIG_ERROR
640 # error "wxUSE_STATTEXT must be defined."
642 # define wxUSE_STATTEXT 0
644 #endif /* !defined(wxUSE_STATTEXT) */
646 #ifndef wxUSE_STATUSBAR
647 # ifdef wxABORT_ON_CONFIG_ERROR
648 # error "wxUSE_STATUSBAR must be defined."
650 # define wxUSE_STATUSBAR 0
652 #endif /* !defined(wxUSE_STATUSBAR) */
654 #ifndef wxUSE_TAB_DIALOG
655 # ifdef wxABORT_ON_CONFIG_ERROR
656 # error "wxUSE_TAB_DIALOG must be defined."
658 # define wxUSE_TAB_DIALOG 0
660 #endif /* !defined(wxUSE_TAB_DIALOG) */
662 #ifndef wxUSE_TEXTCTRL
663 # ifdef wxABORT_ON_CONFIG_ERROR
664 # error "wxUSE_TEXTCTRL must be defined."
666 # define wxUSE_TEXTCTRL 0
668 #endif /* !defined(wxUSE_TEXTCTRL) */
670 #ifndef wxUSE_TIPWINDOW
671 # ifdef wxABORT_ON_CONFIG_ERROR
672 # error "wxUSE_TIPWINDOW must be defined."
674 # define wxUSE_TIPWINDOW 0
676 #endif /* !defined(wxUSE_TIPWINDOW) */
678 #ifndef wxUSE_TOOLBAR
679 # ifdef wxABORT_ON_CONFIG_ERROR
680 # error "wxUSE_TOOLBAR must be defined."
682 # define wxUSE_TOOLBAR 0
684 #endif /* !defined(wxUSE_TOOLBAR) */
686 #ifndef wxUSE_TOOLTIPS
687 # ifdef wxABORT_ON_CONFIG_ERROR
688 # error "wxUSE_TOOLTIPS must be defined."
690 # define wxUSE_TOOLTIPS 0
692 #endif /* !defined(wxUSE_TOOLTIPS) */
694 #ifndef wxUSE_TREECTRL
695 # ifdef wxABORT_ON_CONFIG_ERROR
696 # error "wxUSE_TREECTRL must be defined."
698 # define wxUSE_TREECTRL 0
700 #endif /* !defined(wxUSE_TREECTRL) */
702 #ifndef wxUSE_VALIDATORS
703 # ifdef wxABORT_ON_CONFIG_ERROR
704 # error "wxUSE_VALIDATORS must be defined."
706 # define wxUSE_VALIDATORS 0
708 #endif /* !defined(wxUSE_VALIDATORS) */
710 #ifndef wxUSE_WXHTML_HELP
711 # ifdef wxABORT_ON_CONFIG_ERROR
712 # error "wxUSE_WXHTML_HELP must be defined."
714 # define wxUSE_WXHTML_HELP 0
716 #endif /* !defined(wxUSE_WXHTML_HELP) */
718 #endif /* wxUSE_GUI */
721 check consistency of the settings
724 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
726 # ifdef wxABORT_ON_CONFIG_ERROR
727 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
729 # undef wxUSE_PROTOCOL
730 # define wxUSE_PROTOCOL 1
733 #endif /* wxUSE_PROTOCOL_XXX */
737 # ifdef wxABORT_ON_CONFIG_ERROR
738 # error "wxUSE_URL requires wxUSE_PROTOCOL"
740 # undef wxUSE_PROTOCOL
741 # define wxUSE_PROTOCOL 1
744 #endif /* wxUSE_URL */
748 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
749 # ifdef wxABORT_ON_CONFIG_ERROR
750 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
752 # undef wxUSE_SOCKETS
753 # define wxUSE_SOCKETS 1
759 # ifdef wxABORT_ON_CONFIG_ERROR
760 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
762 # undef wxUSE_STREAMS
763 # define wxUSE_STREAMS 1
766 #endif /* wxUSE_PROTOCOL */
768 /* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
770 # if !wxUSE_FILESYSTEM
771 # ifdef wxABORT_ON_CONFIG_ERROR
772 # error "wxHTML requires wxFileSystem"
774 # undef wxUSE_FILESYSTEM
775 # define wxUSE_FILESYSTEM 1
778 #endif /* wxUSE_HTML */
782 # ifdef wxABORT_ON_CONFIG_ERROR
783 # error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
785 # undef wxUSE_STREAMS
786 # define wxUSE_STREAMS 1
789 #endif /* wxUSE_FILESYSTEM */
793 # ifdef wxABORT_ON_CONFIG_ERROR
794 # error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
796 # undef wxUSE_PROTOCOL
797 # define wxUSE_PROTOCOL 1
800 #endif /* wxUSE_FS_INET */
802 #if wxUSE_STOPWATCH || wxUSE_DATETIME
804 # ifdef wxABORT_ON_CONFIG_ERROR
805 # error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
807 # undef wxUSE_LONGLONG
808 # define wxUSE_LONGLONG 1
811 #endif /* wxUSE_STOPWATCH */
813 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
814 # ifdef wxABORT_ON_CONFIG_ERROR
815 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
817 # undef wxUSE_TEXTFILE
818 # define wxUSE_TEXTFILE 1
820 #endif /* wxUSE_MIMETYPE */
822 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
823 # ifdef wxABORT_ON_CONFIG_ERROR
824 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
826 # undef wxUSE_TEXTBUFFER
827 # define wxUSE_TEXTBUFFER 1
829 #endif /* wxUSE_TEXTFILE */
831 #if wxUSE_TEXTFILE && !wxUSE_FILE
832 # ifdef wxABORT_ON_CONFIG_ERROR
833 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
836 # define wxUSE_FILE 1
838 #endif /* wxUSE_TEXTFILE */
840 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
841 # ifdef wxABORT_ON_CONFIG_ERROR
842 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
844 # undef wxUSE_UNICODE
845 # define wxUSE_UNICODE 1
847 #endif /* wxUSE_UNICODE_MSLU */
849 #if wxUSE_ODBC && wxUSE_UNICODE
850 # ifdef wxABORT_ON_CONFIG_ERROR
851 /* (ODBC classes aren't Unicode-compatible yet) */
852 # error "wxUSE_ODBC can't be used with wxUSE_UNICODE"
855 # define wxUSE_ODBC 0
857 #endif /* wxUSE_ODBC */
859 #if wxUSE_XML && !wxUSE_WCHAR_T
860 # ifdef wxABORT_ON_CONFIG_ERROR
861 # error "wxUSE_XML requires wxUSE_WCHAR_T"
866 #endif /* wxUSE_UNICODE_MSLU */
868 #if !wxUSE_DYNLIB_CLASS
869 # if wxUSE_DYNAMIC_LOADER
870 # ifdef wxABORT_ON_CONFIG_ERROR
871 # error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS."
873 # define wxUSE_DYNLIB_CLASS 1
876 #endif /* wxUSE_DYNLIB_CLASS */
878 /* the rest of the tests is for the GUI settings only */
881 #if wxUSE_BUTTON || \
882 wxUSE_CALENDARCTRL || \
887 wxUSE_CHECKLISTBOX || \
909 # ifdef wxABORT_ON_CONFIG_ERROR
910 # error "wxUSE_CONTROLS unset but some controls used"
912 # undef wxUSE_CONTROLS
913 # define wxUSE_CONTROLS 1
916 #endif /* controls */
918 #if wxUSE_NOTEBOOK || wxUSE_LISTBOOK
919 # if defined(wxUSE_BOOKCTRL) && !wxUSE_BOOKCTRL
920 # ifdef wxABORT_ON_CONFIG_ERROR
921 # error "wxUSE_BOOKCTRL must be set."
923 # undef wxUSE_BOOKCTRL
927 # ifndef wxUSE_BOOKCTRL
928 # define wxUSE_BOOKCTRL 1
930 #endif /* wxUSE_NOTEBOOK */
934 # ifdef wxABORT_ON_CONFIG_ERROR
935 # error "wxListbook requires wxListCtrl"
937 # undef wxUSE_LISTCTRL
938 # define wxUSE_LISTCTRL 1
941 #endif /* wxUSE_LISTBOOK */
943 /* wxUniv-specific dependencies */
944 #if defined(__WXUNIVERSAL__)
945 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
946 # ifdef wxABORT_ON_CONFIG_ERROR
947 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
949 # undef wxUSE_POPUPWIN
950 # define wxUSE_POPUPWIN 1
956 # ifdef wxABORT_ON_CONFIG_ERROR
957 # error "wxComboBox requires wxListBox in wxUniversal"
959 # undef wxUSE_LISTBOX
960 # define wxUSE_LISTBOX 1
963 # endif /* wxUSE_COMBOBOX */
967 # ifdef wxABORT_ON_CONFIG_ERROR
968 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
970 # undef wxUSE_CHECKBOX
971 # define wxUSE_CHECKBOX 1
974 # endif /* wxUSE_RADIOBTN */
978 # ifdef wxABORT_ON_CONFIG_ERROR
979 # error "wxTextCtrl requires wxCaret in wxUniversal"
982 # define wxUSE_CARET 1
984 # endif /* wxUSE_CARET */
986 # if !wxUSE_SCROLLBAR
987 # ifdef wxABORT_ON_CONFIG_ERROR
988 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
990 # undef wxUSE_SCROLLBAR
991 # define wxUSE_SCROLLBAR 1
993 # endif /* wxUSE_SCROLLBAR */
994 # endif /* wxUSE_TEXTCTRL */
995 #endif /* __WXUNIVERSAL__ */
997 /* wxGTK-specific dependencies */
999 # ifndef __WXUNIVERSAL__
1000 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
1001 # ifdef wxABORT_ON_CONFIG_ERROR
1002 # error "MDI requires wxUSE_MENUS in wxGTK"
1005 # define wxUSE_MENUS 1
1008 # endif /* !__WXUNIVERSAL__ */
1012 # ifdef wxABORT_ON_CONFIG_ERROR
1013 # error "wxJoystick requires threads in wxGTK"
1015 # undef wxUSE_JOYSTICK
1016 # define wxUSE_JOYSTICK 0
1020 #endif /* wxGTK && !wxUniv */
1022 /* wxMSW-specific dependencies */
1024 # ifndef wxUSE_UNICODE_MSLU
1025 # ifdef wxABORT_ON_CONFIG_ERROR
1026 # error "wxUSE_UNICODE_MSLU must be defined."
1028 # define wxUSE_UNICODE_MSLU 0
1030 # endif /* wxUSE_UNICODE_MSLU */
1031 # ifndef wxUSE_UXTHEME
1032 # ifdef wxABORT_ON_CONFIG_ERROR
1033 # error "wxUSE_UXTHEME must be defined."
1035 # define wxUSE_UXTHEME 0
1037 # endif /* wxUSE_UXTHEME */
1038 # ifndef wxUSE_UXTHEME_AUTO
1039 # ifdef wxABORT_ON_CONFIG_ERROR
1040 # error "wxUSE_UXTHEME_AUTO must be defined."
1042 # define wxUSE_UXTHEME_AUTO 0
1044 # endif /* wxUSE_UXTHEME_AUTO */
1045 # ifndef wxUSE_MS_HTML_HELP
1046 # ifdef wxABORT_ON_CONFIG_ERROR
1047 # error "wxUSE_MS_HTML_HELP must be defined."
1049 # define wxUSE_MS_HTML_HELP 0
1051 # endif /* !defined(wxUSE_MS_HTML_HELP) */
1052 # ifndef wxUSE_DIALUP_MANAGER
1053 # ifdef wxABORT_ON_CONFIG_ERROR
1054 # error "wxUSE_DIALUP_MANAGER must be defined."
1056 # define wxUSE_DIALUP_MANAGER 0
1058 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
1060 # if !wxUSE_DYNAMIC_LOADER
1061 # if wxUSE_MS_HTML_HELP
1062 # ifdef wxABORT_ON_CONFIG_ERROR
1063 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
1065 # define wxUSE_DYNAMIC_LOADER 1
1068 # if wxUSE_DIALUP_MANAGER
1069 # ifdef wxABORT_ON_CONFIG_ERROR
1070 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
1072 # define wxUSE_DYNAMIC_LOADER 1
1075 # endif /* wxUSE_DYNAMIC_LOADER */
1078 /* wxMAC-specific dependencies */
1082 # ifdef wxABORT_ON_CONFIG_ERROR
1083 # error "wxUSE_UNICODE is only supported for Carbon Targets."
1085 # define wxUSE_UNICODE 0
1090 /* wxMotif-specific dependencies */
1091 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
1092 # undef wxUSE_TAB_DIALOG
1093 # define wxUSE_TAB_DIALOG 1
1096 /* wxMGL-specific dependencies */
1099 # error "wxMGL requires wxUSE_PALETTE=1"
1103 // Hopefully we can emulate these dialogs in due course
1104 #if wxUSE_SMARTPHONE
1105 # ifdef wxUSE_COLOURDLG
1106 # undef wxUSE_COLOURDLG
1107 # define wxUSE_COLOURDLG 0
1109 #endif /* wxUSE_SMARTPHONE */
1112 /* generic controls dependencies */
1113 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
1114 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
1115 /* all common controls are needed by these dialogs */
1116 # if !defined(wxUSE_CHOICE) || \
1117 !defined(wxUSE_TEXTCTRL) || \
1118 !defined(wxUSE_BUTTON) || \
1119 !defined(wxUSE_CHECKBOX) || \
1120 !defined(wxUSE_STATTEXT)
1121 # ifdef wxABORT_ON_CONFIG_ERROR
1122 # error "These common controls are needed by common dialogs"
1124 # undef wxUSE_CHOICE
1125 # define wxUSE_CHOICE 1
1126 # undef wxUSE_TEXTCTRL
1127 # define wxUSE_TEXTCTRL 1
1128 # undef wxUSE_BUTTON
1129 # define wxUSE_BUTTON 1
1130 # undef wxUSE_CHECKBOX
1131 # define wxUSE_CHECKBOX 1
1132 # undef wxUSE_STATTEXT
1133 # define wxUSE_STATTEXT 1
1137 #endif /* !wxMSW || wxUniv */
1139 /* common dependencies */
1140 #if wxUSE_CALENDARCTRL
1141 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
1142 # ifdef wxABORT_ON_CONFIG_ERROR
1143 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
1145 # undef wxUSE_SPINBTN
1146 # undef wxUSE_COMBOBOX
1147 # define wxUSE_SPINBTN 1
1148 # define wxUSE_COMBOBOX 1
1152 # if !wxUSE_DATETIME
1153 # ifdef wxABORT_ON_CONFIG_ERROR
1154 # error "wxCalendarCtrl requires wxUSE_DATETIME"
1156 # undef wxUSE_DATETIME
1157 # define wxUSE_DATETIME 1
1160 #endif /* wxUSE_CALENDARCTRL */
1162 #if wxUSE_CHECKLISTBOX
1164 # ifdef wxABORT_ON_CONFIG_ERROR
1165 # error "wxCheckListBox requires wxListBox"
1167 # undef wxUSE_LISTBOX
1168 # define wxUSE_LISTBOX 1
1171 #endif /* wxUSE_RADIOBTN */
1173 #if wxUSE_WXHTML_HELP
1174 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK
1175 # ifdef wxABORT_ON_CONFIG_ERROR
1176 # error "Built in help controller can't be compiled"
1179 # define wxUSE_HELP 1
1181 # define wxUSE_HTML 1
1182 # undef wxUSE_COMBOBOX
1183 # define wxUSE_COMBOBOX 1
1184 # undef wxUSE_NOTEBOOK
1185 # define wxUSE_NOTEBOOK 1
1188 #endif /* wxUSE_WXHTML_HELP */
1190 #if wxUSE_DOC_VIEW_ARCHITECTURE
1192 # ifdef wxABORT_ON_CONFIG_ERROR
1193 # error "DocView requires wxUSE_MENUS"
1196 # define wxUSE_MENUS 1
1200 # if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
1201 # ifdef wxABORT_ON_CONFIG_ERROR
1202 # error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
1204 # undef wxUSE_STREAMS
1205 # define wxUSE_STREAMS 1
1208 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1210 #if wxUSE_PRINTING_ARCHITECTURE
1211 # if !wxUSE_COMBOBOX
1212 # ifdef wxABORT_ON_CONFIG_ERROR
1213 # error "Print dialog requires wxUSE_COMBOBOX"
1215 # undef wxUSE_COMBOBOX
1216 # define wxUSE_COMBOBOX 1
1219 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1221 #if wxUSE_MDI_ARCHITECTURE
1222 # if !wxUSE_DOC_VIEW_ARCHITECTURE
1223 # ifdef wxABORT_ON_CONFIG_ERROR
1224 # error "MDI requires wxUSE_DOC_VIEW_ARCHITECTURE"
1226 # undef wxUSE_DOC_VIEW_ARCHITECTURE
1227 # define wxUSE_DOC_VIEW_ARCHITECTURE 1
1230 #endif /* wxUSE_MDI_ARCHITECTURE */
1233 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1234 # ifdef wxABORT_ON_CONFIG_ERROR
1235 # error "wxFileDialog must be compiled as well"
1237 # undef wxUSE_FILEDLG
1238 # define wxUSE_FILEDLG 1
1241 #endif /* wxUSE_FILEDLG */
1244 # if wxUSE_TOOLBAR_NATIVE
1245 # ifdef wxABORT_ON_CONFIG_ERROR
1246 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1"
1248 # undef wxUSE_TOOLBAR_NATIVE
1249 # define wxUSE_TOOLBAR_NATIVE 0
1253 # if wxUSE_TOOLBAR_SIMPLE
1254 # ifdef wxABORT_ON_CONFIG_ERROR
1255 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_SIMPLE is set to 1"
1257 # undef wxUSE_TOOLBAR_SIMPLE
1258 # define wxUSE_TOOLBAR_SIMPLE 0
1264 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1265 # ifdef wxABORT_ON_CONFIG_ERROR
1266 # error "wxImageList must be compiled as well"
1268 # undef wxUSE_IMAGLIST
1269 # define wxUSE_IMAGLIST 1
1272 #endif /* !wxUSE_IMAGLIST */
1275 # ifdef wxABORT_ON_CONFIG_ERROR
1276 /* FIXME: should compile without it, of course, but doesn't */
1277 # error "wxMessageBox is always needed"
1279 # undef wxUSE_MSGDLG
1280 # define wxUSE_MSGDLG 1
1285 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1286 # ifdef wxABORT_ON_CONFIG_ERROR
1287 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1289 # undef wxUSE_RADIOBTN
1290 # undef wxUSE_STATBOX
1291 # define wxUSE_RADIOBTN 1
1292 # define wxUSE_STATBOX 1
1295 #endif /* wxUSE_RADIOBOX */
1298 # if !wxUSE_TEXTCTRL
1299 # ifdef wxABORT_ON_CONFIG_ERROR
1300 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1302 # undef wxUSE_TEXTCTRL
1303 # define wxUSE_TEXTCTRL 1
1306 #endif /* wxUSE_LOGWINDOW */
1308 #if wxUSE_LOG_DIALOG
1309 # if !wxUSE_LISTCTRL
1310 # ifdef wxABORT_ON_CONFIG_ERROR
1311 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1313 # undef wxUSE_LISTCTRL
1314 # define wxUSE_LISTCTRL 1
1317 #endif /* wxUSE_LOG_DIALOG */
1319 /* I wonder if we shouldn't just remove all occurrences of
1320 wxUSE_DYNAMIC_CLASSES from the sources? */
1321 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
1322 # ifdef wxABORT_ON_CONFIG_ERROR
1323 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
1325 # undef wxUSE_DYNAMIC_CLASSES
1326 # define wxUSE_DYNAMIC_CLASSES 1
1328 #endif /* wxUSE_DYNAMIC_CLASSES */
1330 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1331 # ifdef wxABORT_ON_CONFIG_ERROR
1332 # error "wxClipboard requires wxDataObject"
1334 # undef wxUSE_DATAOBJ
1335 # define wxUSE_DATAOBJ 1
1337 #endif /* wxUSE_CLIPBOARD */
1339 #if wxUSE_WX_RESOURCES && !wxUSE_PROLOGIO
1340 # ifdef wxABORT_ON_CONFIG_ERROR
1341 # error "wxr resources require PrologIO"
1343 # undef wxUSE_PROLOGIO
1344 # define wxUSE_PROLOGIO 1
1346 #endif /* wxUSE_WX_RESOURCES */
1348 #endif /* wxUSE_GUI */