]>
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_LIBMSPACK
408 /* set to 0 on platforms that don't have libmspack */
409 # define wxUSE_LIBMSPACK 0
411 # ifdef wxABORT_ON_CONFIG_ERROR
412 # error "wxUSE_LIBMSPACK must be defined."
414 # define wxUSE_LIBMSPACK 0
417 #endif /* !defined(wxUSE_LIBMSPACK) */
419 #ifndef wxUSE_ICO_CUR
420 # ifdef wxABORT_ON_CONFIG_ERROR
421 # error "wxUSE_ICO_CUR must be defined."
423 # define wxUSE_ICO_CUR 0
425 #endif /* !defined(wxUSE_ICO_CUR) */
428 # ifdef wxABORT_ON_CONFIG_ERROR
429 # error "wxUSE_IFF must be defined."
433 #endif /* !defined(wxUSE_IFF) */
435 #ifndef wxUSE_IMAGLIST
436 # ifdef wxABORT_ON_CONFIG_ERROR
437 # error "wxUSE_IMAGLIST must be defined."
439 # define wxUSE_IMAGLIST 0
441 #endif /* !defined(wxUSE_IMAGLIST) */
443 #ifndef wxUSE_JOYSTICK
444 # ifdef wxABORT_ON_CONFIG_ERROR
445 # error "wxUSE_JOYSTICK must be defined."
447 # define wxUSE_JOYSTICK 0
449 #endif /* !defined(wxUSE_JOYSTICK) */
451 #ifndef wxUSE_LISTBOOK
452 # ifdef wxABORT_ON_CONFIG_ERROR
453 # error "wxUSE_LISTBOOK must be defined."
455 # define wxUSE_LISTBOOK 0
457 #endif /* !defined(wxUSE_LISTBOOK) */
459 #ifndef wxUSE_LISTBOX
460 # ifdef wxABORT_ON_CONFIG_ERROR
461 # error "wxUSE_LISTBOX must be defined."
463 # define wxUSE_LISTBOX 0
465 #endif /* !defined(wxUSE_LISTBOX) */
467 #ifndef wxUSE_LISTCTRL
468 # ifdef wxABORT_ON_CONFIG_ERROR
469 # error "wxUSE_LISTCTRL must be defined."
471 # define wxUSE_LISTCTRL 0
473 #endif /* !defined(wxUSE_LISTCTRL) */
476 # ifdef wxABORT_ON_CONFIG_ERROR
477 # error "wxUSE_LOGGUI must be defined."
479 # define wxUSE_LOGGUI 0
481 #endif /* !defined(wxUSE_LOGGUI) */
483 #ifndef wxUSE_LOGWINDOW
484 # ifdef wxABORT_ON_CONFIG_ERROR
485 # error "wxUSE_LOGWINDOW must be defined."
487 # define wxUSE_LOGWINDOW 0
489 #endif /* !defined(wxUSE_LOGWINDOW) */
491 #ifndef wxUSE_LOG_DIALOG
492 # ifdef wxABORT_ON_CONFIG_ERROR
493 # error "wxUSE_LOG_DIALOG must be defined."
495 # define wxUSE_LOG_DIALOG 0
497 #endif /* !defined(wxUSE_LOG_DIALOG) */
499 #ifndef wxUSE_MDI_ARCHITECTURE
500 # ifdef wxABORT_ON_CONFIG_ERROR
501 # error "wxUSE_MDI_ARCHITECTURE must be defined."
503 # define wxUSE_MDI_ARCHITECTURE 0
505 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
508 # ifdef wxABORT_ON_CONFIG_ERROR
509 # error "wxUSE_MENUS must be defined."
511 # define wxUSE_MENUS 0
513 #endif /* !defined(wxUSE_MENUS) */
516 # ifdef wxABORT_ON_CONFIG_ERROR
517 # error "wxUSE_MSGDLG must be defined."
519 # define wxUSE_MSGDLG 0
521 #endif /* !defined(wxUSE_MSGDLG) */
523 #ifndef wxUSE_NOTEBOOK
524 # ifdef wxABORT_ON_CONFIG_ERROR
525 # error "wxUSE_NOTEBOOK must be defined."
527 # define wxUSE_NOTEBOOK 0
529 #endif /* !defined(wxUSE_NOTEBOOK) */
531 #ifndef wxUSE_PALETTE
532 # ifdef wxABORT_ON_CONFIG_ERROR
533 # error "wxUSE_PALETTE must be defined."
535 # define wxUSE_PALETTE 0
537 #endif /* !defined(wxUSE_PALETTE) */
539 #ifndef wxUSE_POPUPWIN
540 # ifdef wxABORT_ON_CONFIG_ERROR
541 # error "wxUSE_POPUPWIN must be defined."
543 # define wxUSE_POPUPWIN 0
545 #endif /* !defined(wxUSE_POPUPWIN) */
547 #ifndef wxUSE_PRINTING_ARCHITECTURE
548 # ifdef wxABORT_ON_CONFIG_ERROR
549 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
551 # define wxUSE_PRINTING_ARCHITECTURE 0
553 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
555 #ifndef wxUSE_RADIOBOX
556 # ifdef wxABORT_ON_CONFIG_ERROR
557 # error "wxUSE_RADIOBOX must be defined."
559 # define wxUSE_RADIOBOX 0
561 #endif /* !defined(wxUSE_RADIOBOX) */
563 #ifndef wxUSE_RADIOBTN
564 # ifdef wxABORT_ON_CONFIG_ERROR
565 # error "wxUSE_RADIOBTN must be defined."
567 # define wxUSE_RADIOBTN 0
569 #endif /* !defined(wxUSE_RADIOBTN) */
572 # ifdef wxABORT_ON_CONFIG_ERROR
573 # error "wxUSE_SASH must be defined."
575 # define wxUSE_SASH 0
577 #endif /* !defined(wxUSE_SASH) */
579 #ifndef wxUSE_SCROLLBAR
580 # ifdef wxABORT_ON_CONFIG_ERROR
581 # error "wxUSE_SCROLLBAR must be defined."
583 # define wxUSE_SCROLLBAR 0
585 #endif /* !defined(wxUSE_SCROLLBAR) */
588 # ifdef wxABORT_ON_CONFIG_ERROR
589 # error "wxUSE_SLIDER must be defined."
591 # define wxUSE_SLIDER 0
593 #endif /* !defined(wxUSE_SLIDER) */
596 # ifdef wxABORT_ON_CONFIG_ERROR
597 # error "wxUSE_SOUND must be defined."
599 # define wxUSE_SOUND 0
601 #endif /* !defined(wxUSE_SOUND) */
603 #ifndef wxUSE_SPINBTN
604 # ifdef wxABORT_ON_CONFIG_ERROR
605 # error "wxUSE_SPINBTN must be defined."
607 # define wxUSE_SPINBTN 0
609 #endif /* !defined(wxUSE_SPINBTN) */
611 #ifndef wxUSE_SPINCTRL
612 # ifdef wxABORT_ON_CONFIG_ERROR
613 # error "wxUSE_SPINCTRL must be defined."
615 # define wxUSE_SPINCTRL 0
617 #endif /* !defined(wxUSE_SPINCTRL) */
620 # ifdef wxABORT_ON_CONFIG_ERROR
621 # error "wxUSE_SPLASH must be defined."
623 # define wxUSE_SPLASH 0
625 #endif /* !defined(wxUSE_SPLASH) */
627 #ifndef wxUSE_SPLITTER
628 # ifdef wxABORT_ON_CONFIG_ERROR
629 # error "wxUSE_SPLITTER must be defined."
631 # define wxUSE_SPLITTER 0
633 #endif /* !defined(wxUSE_SPLITTER) */
635 #ifndef wxUSE_STATBMP
636 # ifdef wxABORT_ON_CONFIG_ERROR
637 # error "wxUSE_STATBMP must be defined."
639 # define wxUSE_STATBMP 0
641 #endif /* !defined(wxUSE_STATBMP) */
643 #ifndef wxUSE_STATBOX
644 # ifdef wxABORT_ON_CONFIG_ERROR
645 # error "wxUSE_STATBOX must be defined."
647 # define wxUSE_STATBOX 0
649 #endif /* !defined(wxUSE_STATBOX) */
651 #ifndef wxUSE_STATLINE
652 # ifdef wxABORT_ON_CONFIG_ERROR
653 # error "wxUSE_STATLINE must be defined."
655 # define wxUSE_STATLINE 0
657 #endif /* !defined(wxUSE_STATLINE) */
659 #ifndef wxUSE_STATTEXT
660 # ifdef wxABORT_ON_CONFIG_ERROR
661 # error "wxUSE_STATTEXT must be defined."
663 # define wxUSE_STATTEXT 0
665 #endif /* !defined(wxUSE_STATTEXT) */
667 #ifndef wxUSE_STATUSBAR
668 # ifdef wxABORT_ON_CONFIG_ERROR
669 # error "wxUSE_STATUSBAR must be defined."
671 # define wxUSE_STATUSBAR 0
673 #endif /* !defined(wxUSE_STATUSBAR) */
675 #ifndef wxUSE_TAB_DIALOG
676 # ifdef wxABORT_ON_CONFIG_ERROR
677 # error "wxUSE_TAB_DIALOG must be defined."
679 # define wxUSE_TAB_DIALOG 0
681 #endif /* !defined(wxUSE_TAB_DIALOG) */
683 #ifndef wxUSE_TEXTCTRL
684 # ifdef wxABORT_ON_CONFIG_ERROR
685 # error "wxUSE_TEXTCTRL must be defined."
687 # define wxUSE_TEXTCTRL 0
689 #endif /* !defined(wxUSE_TEXTCTRL) */
691 #ifndef wxUSE_TIPWINDOW
692 # ifdef wxABORT_ON_CONFIG_ERROR
693 # error "wxUSE_TIPWINDOW must be defined."
695 # define wxUSE_TIPWINDOW 0
697 #endif /* !defined(wxUSE_TIPWINDOW) */
699 #ifndef wxUSE_TOOLBAR
700 # ifdef wxABORT_ON_CONFIG_ERROR
701 # error "wxUSE_TOOLBAR must be defined."
703 # define wxUSE_TOOLBAR 0
705 #endif /* !defined(wxUSE_TOOLBAR) */
707 #ifndef wxUSE_TOOLTIPS
708 # ifdef wxABORT_ON_CONFIG_ERROR
709 # error "wxUSE_TOOLTIPS must be defined."
711 # define wxUSE_TOOLTIPS 0
713 #endif /* !defined(wxUSE_TOOLTIPS) */
715 #ifndef wxUSE_TREECTRL
716 # ifdef wxABORT_ON_CONFIG_ERROR
717 # error "wxUSE_TREECTRL must be defined."
719 # define wxUSE_TREECTRL 0
721 #endif /* !defined(wxUSE_TREECTRL) */
723 #ifndef wxUSE_VALIDATORS
724 # ifdef wxABORT_ON_CONFIG_ERROR
725 # error "wxUSE_VALIDATORS must be defined."
727 # define wxUSE_VALIDATORS 0
729 #endif /* !defined(wxUSE_VALIDATORS) */
731 #ifndef wxUSE_WXHTML_HELP
732 # ifdef wxABORT_ON_CONFIG_ERROR
733 # error "wxUSE_WXHTML_HELP must be defined."
735 # define wxUSE_WXHTML_HELP 0
737 #endif /* !defined(wxUSE_WXHTML_HELP) */
739 #endif /* wxUSE_GUI */
742 check consistency of the settings
745 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
747 # ifdef wxABORT_ON_CONFIG_ERROR
748 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
750 # undef wxUSE_PROTOCOL
751 # define wxUSE_PROTOCOL 1
754 #endif /* wxUSE_PROTOCOL_XXX */
758 # ifdef wxABORT_ON_CONFIG_ERROR
759 # error "wxUSE_URL requires wxUSE_PROTOCOL"
761 # undef wxUSE_PROTOCOL
762 # define wxUSE_PROTOCOL 1
765 #endif /* wxUSE_URL */
769 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
770 # ifdef wxABORT_ON_CONFIG_ERROR
771 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
773 # undef wxUSE_SOCKETS
774 # define wxUSE_SOCKETS 1
780 # ifdef wxABORT_ON_CONFIG_ERROR
781 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
783 # undef wxUSE_STREAMS
784 # define wxUSE_STREAMS 1
787 #endif /* wxUSE_PROTOCOL */
789 /* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
791 # if !wxUSE_FILESYSTEM
792 # ifdef wxABORT_ON_CONFIG_ERROR
793 # error "wxHTML requires wxFileSystem"
795 # undef wxUSE_FILESYSTEM
796 # define wxUSE_FILESYSTEM 1
799 #endif /* wxUSE_HTML */
803 # ifdef wxABORT_ON_CONFIG_ERROR
804 # error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
806 # undef wxUSE_STREAMS
807 # define wxUSE_STREAMS 1
810 #endif /* wxUSE_FILESYSTEM */
814 # ifdef wxABORT_ON_CONFIG_ERROR
815 # error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
817 # undef wxUSE_PROTOCOL
818 # define wxUSE_PROTOCOL 1
821 #endif /* wxUSE_FS_INET */
823 #if wxUSE_STOPWATCH || wxUSE_DATETIME
825 # ifdef wxABORT_ON_CONFIG_ERROR
826 # error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
828 # undef wxUSE_LONGLONG
829 # define wxUSE_LONGLONG 1
832 #endif /* wxUSE_STOPWATCH */
834 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
835 # ifdef wxABORT_ON_CONFIG_ERROR
836 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
838 # undef wxUSE_TEXTFILE
839 # define wxUSE_TEXTFILE 1
841 #endif /* wxUSE_MIMETYPE */
843 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
844 # ifdef wxABORT_ON_CONFIG_ERROR
845 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
847 # undef wxUSE_TEXTBUFFER
848 # define wxUSE_TEXTBUFFER 1
850 #endif /* wxUSE_TEXTFILE */
852 #if wxUSE_TEXTFILE && !wxUSE_FILE
853 # ifdef wxABORT_ON_CONFIG_ERROR
854 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
857 # define wxUSE_FILE 1
859 #endif /* wxUSE_TEXTFILE */
861 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
862 # ifdef wxABORT_ON_CONFIG_ERROR
863 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
865 # undef wxUSE_UNICODE
866 # define wxUSE_UNICODE 1
868 #endif /* wxUSE_UNICODE_MSLU */
870 /* ODBC and Unicode are now compatible */
872 #if 0 /* wxUSE_ODBC && wxUSE_UNICODE */
873 # ifdef wxABORT_ON_CONFIG_ERROR
874 /* (ODBC classes aren't Unicode-compatible yet) */
875 # error "wxUSE_ODBC can't be used with wxUSE_UNICODE"
878 # define wxUSE_ODBC 0
880 #endif /* wxUSE_ODBC */
882 #if wxUSE_XML && !wxUSE_WCHAR_T
883 # ifdef wxABORT_ON_CONFIG_ERROR
884 # error "wxUSE_XML requires wxUSE_WCHAR_T"
889 #endif /* wxUSE_UNICODE_MSLU */
891 #if !wxUSE_DYNLIB_CLASS
892 # if wxUSE_DYNAMIC_LOADER
893 # ifdef wxABORT_ON_CONFIG_ERROR
894 # error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS."
896 # define wxUSE_DYNLIB_CLASS 1
899 #endif /* wxUSE_DYNLIB_CLASS */
901 /* the rest of the tests is for the GUI settings only */
904 #if wxUSE_BUTTON || \
905 wxUSE_CALENDARCTRL || \
910 wxUSE_CHECKLISTBOX || \
932 # ifdef wxABORT_ON_CONFIG_ERROR
933 # error "wxUSE_CONTROLS unset but some controls used"
935 # undef wxUSE_CONTROLS
936 # define wxUSE_CONTROLS 1
939 #endif /* controls */
941 #if wxUSE_NOTEBOOK || wxUSE_LISTBOOK
942 # if defined(wxUSE_BOOKCTRL) && !wxUSE_BOOKCTRL
943 # ifdef wxABORT_ON_CONFIG_ERROR
944 # error "wxUSE_BOOKCTRL must be set."
946 # undef wxUSE_BOOKCTRL
950 # ifndef wxUSE_BOOKCTRL
951 # define wxUSE_BOOKCTRL 1
953 #endif /* wxUSE_NOTEBOOK */
957 # ifdef wxABORT_ON_CONFIG_ERROR
958 # error "wxListbook requires wxListCtrl"
960 # undef wxUSE_LISTCTRL
961 # define wxUSE_LISTCTRL 1
964 #endif /* wxUSE_LISTBOOK */
966 /* wxUniv-specific dependencies */
967 #if defined(__WXUNIVERSAL__)
968 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
969 # ifdef wxABORT_ON_CONFIG_ERROR
970 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
972 # undef wxUSE_POPUPWIN
973 # define wxUSE_POPUPWIN 1
979 # ifdef wxABORT_ON_CONFIG_ERROR
980 # error "wxComboBox requires wxListBox in wxUniversal"
982 # undef wxUSE_LISTBOX
983 # define wxUSE_LISTBOX 1
986 # endif /* wxUSE_COMBOBOX */
990 # ifdef wxABORT_ON_CONFIG_ERROR
991 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
993 # undef wxUSE_CHECKBOX
994 # define wxUSE_CHECKBOX 1
997 # endif /* wxUSE_RADIOBTN */
1001 # ifdef wxABORT_ON_CONFIG_ERROR
1002 # error "wxTextCtrl requires wxCaret in wxUniversal"
1005 # define wxUSE_CARET 1
1007 # endif /* wxUSE_CARET */
1009 # if !wxUSE_SCROLLBAR
1010 # ifdef wxABORT_ON_CONFIG_ERROR
1011 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
1013 # undef wxUSE_SCROLLBAR
1014 # define wxUSE_SCROLLBAR 1
1016 # endif /* wxUSE_SCROLLBAR */
1017 # endif /* wxUSE_TEXTCTRL */
1018 #endif /* __WXUNIVERSAL__ */
1020 /* wxGTK-specific dependencies */
1022 # ifndef __WXUNIVERSAL__
1023 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
1024 # ifdef wxABORT_ON_CONFIG_ERROR
1025 # error "MDI requires wxUSE_MENUS in wxGTK"
1028 # define wxUSE_MENUS 1
1031 # endif /* !__WXUNIVERSAL__ */
1035 # ifdef wxABORT_ON_CONFIG_ERROR
1036 # error "wxJoystick requires threads in wxGTK"
1038 # undef wxUSE_JOYSTICK
1039 # define wxUSE_JOYSTICK 0
1043 #endif /* wxGTK && !wxUniv */
1045 /* wxMSW-specific dependencies */
1047 # ifndef wxUSE_UNICODE_MSLU
1048 # ifdef wxABORT_ON_CONFIG_ERROR
1049 # error "wxUSE_UNICODE_MSLU must be defined."
1051 # define wxUSE_UNICODE_MSLU 0
1053 # endif /* wxUSE_UNICODE_MSLU */
1054 # ifndef wxUSE_UXTHEME
1055 # ifdef wxABORT_ON_CONFIG_ERROR
1056 # error "wxUSE_UXTHEME must be defined."
1058 # define wxUSE_UXTHEME 0
1060 # endif /* wxUSE_UXTHEME */
1061 # ifndef wxUSE_UXTHEME_AUTO
1062 # ifdef wxABORT_ON_CONFIG_ERROR
1063 # error "wxUSE_UXTHEME_AUTO must be defined."
1065 # define wxUSE_UXTHEME_AUTO 0
1067 # endif /* wxUSE_UXTHEME_AUTO */
1068 # ifndef wxUSE_MS_HTML_HELP
1069 # ifdef wxABORT_ON_CONFIG_ERROR
1070 # error "wxUSE_MS_HTML_HELP must be defined."
1072 # define wxUSE_MS_HTML_HELP 0
1074 # endif /* !defined(wxUSE_MS_HTML_HELP) */
1075 # ifndef wxUSE_DIALUP_MANAGER
1076 # ifdef wxABORT_ON_CONFIG_ERROR
1077 # error "wxUSE_DIALUP_MANAGER must be defined."
1079 # define wxUSE_DIALUP_MANAGER 0
1081 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
1083 # if !wxUSE_DYNAMIC_LOADER
1084 # if wxUSE_MS_HTML_HELP
1085 # ifdef wxABORT_ON_CONFIG_ERROR
1086 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
1088 # define wxUSE_DYNAMIC_LOADER 1
1091 # if wxUSE_DIALUP_MANAGER
1092 # ifdef wxABORT_ON_CONFIG_ERROR
1093 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
1095 # define wxUSE_DYNAMIC_LOADER 1
1098 # endif /* wxUSE_DYNAMIC_LOADER */
1101 /* wxMAC-specific dependencies */
1105 # ifdef wxABORT_ON_CONFIG_ERROR
1106 # error "wxUSE_UNICODE is only supported for Carbon Targets."
1108 # define wxUSE_UNICODE 0
1113 /* wxMotif-specific dependencies */
1114 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
1115 # undef wxUSE_TAB_DIALOG
1116 # define wxUSE_TAB_DIALOG 1
1119 /* wxMGL-specific dependencies */
1122 # error "wxMGL requires wxUSE_PALETTE=1"
1126 /* Hopefully we can emulate these dialogs in due course */
1127 #if wxUSE_SMARTPHONE
1128 # ifdef wxUSE_COLOURDLG
1129 # undef wxUSE_COLOURDLG
1130 # define wxUSE_COLOURDLG 0
1132 #endif /* wxUSE_SMARTPHONE */
1135 /* generic controls dependencies */
1136 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
1137 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
1138 /* all common controls are needed by these dialogs */
1139 # if !defined(wxUSE_CHOICE) || \
1140 !defined(wxUSE_TEXTCTRL) || \
1141 !defined(wxUSE_BUTTON) || \
1142 !defined(wxUSE_CHECKBOX) || \
1143 !defined(wxUSE_STATTEXT)
1144 # ifdef wxABORT_ON_CONFIG_ERROR
1145 # error "These common controls are needed by common dialogs"
1147 # undef wxUSE_CHOICE
1148 # define wxUSE_CHOICE 1
1149 # undef wxUSE_TEXTCTRL
1150 # define wxUSE_TEXTCTRL 1
1151 # undef wxUSE_BUTTON
1152 # define wxUSE_BUTTON 1
1153 # undef wxUSE_CHECKBOX
1154 # define wxUSE_CHECKBOX 1
1155 # undef wxUSE_STATTEXT
1156 # define wxUSE_STATTEXT 1
1160 #endif /* !wxMSW || wxUniv */
1162 /* common dependencies */
1163 #if wxUSE_CALENDARCTRL
1164 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
1165 # ifdef wxABORT_ON_CONFIG_ERROR
1166 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
1168 # undef wxUSE_SPINBTN
1169 # undef wxUSE_COMBOBOX
1170 # define wxUSE_SPINBTN 1
1171 # define wxUSE_COMBOBOX 1
1175 # if !wxUSE_DATETIME
1176 # ifdef wxABORT_ON_CONFIG_ERROR
1177 # error "wxCalendarCtrl requires wxUSE_DATETIME"
1179 # undef wxUSE_DATETIME
1180 # define wxUSE_DATETIME 1
1183 #endif /* wxUSE_CALENDARCTRL */
1185 #if wxUSE_CHECKLISTBOX
1187 # ifdef wxABORT_ON_CONFIG_ERROR
1188 # error "wxCheckListBox requires wxListBox"
1190 # undef wxUSE_LISTBOX
1191 # define wxUSE_LISTBOX 1
1194 #endif /* wxUSE_RADIOBTN */
1196 #if wxUSE_WXHTML_HELP
1197 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK
1198 # ifdef wxABORT_ON_CONFIG_ERROR
1199 # error "Built in help controller can't be compiled"
1202 # define wxUSE_HELP 1
1204 # define wxUSE_HTML 1
1205 # undef wxUSE_COMBOBOX
1206 # define wxUSE_COMBOBOX 1
1207 # undef wxUSE_NOTEBOOK
1208 # define wxUSE_NOTEBOOK 1
1211 #endif /* wxUSE_WXHTML_HELP */
1215 The default wxUSE_IMAGE setting is 1, so if it's set to 0 we assume the
1216 user explicitly wants this and disable all other features that require
1219 # if wxUSE_DRAGIMAGE
1220 # ifdef wxABORT_ON_CONFIG_ERROR
1221 # error "wxUSE_DRAGIMAGE requires wxUSE_IMAGE"
1223 # undef wxUSE_DRAGIMAGE
1224 # define wxUSE_DRAGIMAGE 0
1229 # ifdef wxABORT_ON_CONFIG_ERROR
1230 # error "wxUSE_LIBPNG requires wxUSE_IMAGE"
1232 # undef wxUSE_LIBPNG
1233 # define wxUSE_LIBPNG 0
1238 # ifdef wxABORT_ON_CONFIG_ERROR
1239 # error "wxUSE_LIBJPEG requires wxUSE_IMAGE"
1241 # undef wxUSE_LIBJPEG
1242 # define wxUSE_LIBJPEG 0
1247 # ifdef wxABORT_ON_CONFIG_ERROR
1248 # error "wxUSE_LIBTIFF requires wxUSE_IMAGE"
1250 # undef wxUSE_LIBTIFF
1251 # define wxUSE_LIBTIFF 0
1256 # ifdef wxABORT_ON_CONFIG_ERROR
1257 # error "wxUSE_GIF requires wxUSE_IMAGE"
1260 # define wxUSE_GIF 0
1265 # ifdef wxABORT_ON_CONFIG_ERROR
1266 # error "wxUSE_PNM requires wxUSE_IMAGE"
1269 # define wxUSE_PNM 0
1274 # ifdef wxABORT_ON_CONFIG_ERROR
1275 # error "wxUSE_PCX requires wxUSE_IMAGE"
1278 # define wxUSE_PCX 0
1283 # ifdef wxABORT_ON_CONFIG_ERROR
1284 # error "wxUSE_IFF requires wxUSE_IMAGE"
1287 # define wxUSE_IFF 0
1292 # ifdef wxABORT_ON_CONFIG_ERROR
1293 # error "wxUSE_TOOLBAR requires wxUSE_IMAGE"
1295 # undef wxUSE_TOOLBAR
1296 # define wxUSE_TOOLBAR 0
1301 # ifdef wxABORT_ON_CONFIG_ERROR
1302 # error "wxUSE_XPM requires wxUSE_IMAGE"
1305 # define wxUSE_XPM 0
1309 #endif /* !wxUSE_IMAGE */
1311 #if wxUSE_DOC_VIEW_ARCHITECTURE
1313 # ifdef wxABORT_ON_CONFIG_ERROR
1314 # error "DocView requires wxUSE_MENUS"
1317 # define wxUSE_MENUS 1
1321 # if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
1322 # ifdef wxABORT_ON_CONFIG_ERROR
1323 # error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
1325 # undef wxUSE_STREAMS
1326 # define wxUSE_STREAMS 1
1329 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1331 #if wxUSE_PRINTING_ARCHITECTURE
1332 # if !wxUSE_COMBOBOX
1333 # ifdef wxABORT_ON_CONFIG_ERROR
1334 # error "Print dialog requires wxUSE_COMBOBOX"
1336 # undef wxUSE_COMBOBOX
1337 # define wxUSE_COMBOBOX 1
1340 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1342 #if wxUSE_MDI_ARCHITECTURE
1343 # if !wxUSE_DOC_VIEW_ARCHITECTURE
1344 # ifdef wxABORT_ON_CONFIG_ERROR
1345 # error "MDI requires wxUSE_DOC_VIEW_ARCHITECTURE"
1347 # undef wxUSE_DOC_VIEW_ARCHITECTURE
1348 # define wxUSE_DOC_VIEW_ARCHITECTURE 1
1351 #endif /* wxUSE_MDI_ARCHITECTURE */
1354 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1355 # ifdef wxABORT_ON_CONFIG_ERROR
1356 # error "wxFileDialog must be compiled as well"
1358 # undef wxUSE_FILEDLG
1359 # define wxUSE_FILEDLG 1
1362 #endif /* wxUSE_FILEDLG */
1365 # if wxUSE_TOOLBAR_NATIVE
1366 # ifdef wxABORT_ON_CONFIG_ERROR
1367 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1"
1369 # undef wxUSE_TOOLBAR_NATIVE
1370 # define wxUSE_TOOLBAR_NATIVE 0
1374 # if wxUSE_TOOLBAR_SIMPLE
1375 # ifdef wxABORT_ON_CONFIG_ERROR
1376 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_SIMPLE is set to 1"
1378 # undef wxUSE_TOOLBAR_SIMPLE
1379 # define wxUSE_TOOLBAR_SIMPLE 0
1385 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1386 # ifdef wxABORT_ON_CONFIG_ERROR
1387 # error "wxImageList must be compiled as well"
1389 # undef wxUSE_IMAGLIST
1390 # define wxUSE_IMAGLIST 1
1393 #endif /* !wxUSE_IMAGLIST */
1396 # ifdef wxABORT_ON_CONFIG_ERROR
1397 /* FIXME: should compile without it, of course, but doesn't */
1398 # error "wxMessageBox is always needed"
1400 # undef wxUSE_MSGDLG
1401 # define wxUSE_MSGDLG 1
1406 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1407 # ifdef wxABORT_ON_CONFIG_ERROR
1408 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1410 # undef wxUSE_RADIOBTN
1411 # undef wxUSE_STATBOX
1412 # define wxUSE_RADIOBTN 1
1413 # define wxUSE_STATBOX 1
1416 #endif /* wxUSE_RADIOBOX */
1419 # if !wxUSE_TEXTCTRL
1420 # ifdef wxABORT_ON_CONFIG_ERROR
1421 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1423 # undef wxUSE_TEXTCTRL
1424 # define wxUSE_TEXTCTRL 1
1427 #endif /* wxUSE_LOGWINDOW */
1429 #if wxUSE_LOG_DIALOG
1430 # if !wxUSE_LISTCTRL
1431 # ifdef wxABORT_ON_CONFIG_ERROR
1432 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1434 # undef wxUSE_LISTCTRL
1435 # define wxUSE_LISTCTRL 1
1438 #endif /* wxUSE_LOG_DIALOG */
1440 /* I wonder if we shouldn't just remove all occurrences of
1441 wxUSE_DYNAMIC_CLASSES from the sources? */
1442 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
1443 # ifdef wxABORT_ON_CONFIG_ERROR
1444 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
1446 # undef wxUSE_DYNAMIC_CLASSES
1447 # define wxUSE_DYNAMIC_CLASSES 1
1449 #endif /* wxUSE_DYNAMIC_CLASSES */
1451 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1452 # ifdef wxABORT_ON_CONFIG_ERROR
1453 # error "wxClipboard requires wxDataObject"
1455 # undef wxUSE_DATAOBJ
1456 # define wxUSE_DATAOBJ 1
1458 #endif /* wxUSE_CLIPBOARD */
1460 #if wxUSE_WX_RESOURCES && !wxUSE_PROLOGIO
1461 # ifdef wxABORT_ON_CONFIG_ERROR
1462 # error "wxr resources require PrologIO"
1464 # undef wxUSE_PROLOGIO
1465 # define wxUSE_PROLOGIO 1
1467 #endif /* wxUSE_WX_RESOURCES */
1469 #endif /* wxUSE_GUI */