]>
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 #ifndef wxUSE_DYNAMIC_LOADER
54 # ifdef wxABORT_ON_CONFIG_ERROR
55 # error "wxUSE_DYNAMIC_LOADER must be defined."
57 # define wxUSE_DYNAMIC_LOADER 0
59 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
62 # ifdef wxABORT_ON_CONFIG_ERROR
63 # error "wxUSE_LOG must be defined."
67 #endif /* !defined(wxUSE_LOG) */
69 #ifndef wxUSE_LONGLONG
70 # ifdef wxABORT_ON_CONFIG_ERROR
71 # error "wxUSE_LONGLONG must be defined."
73 # define wxUSE_LONGLONG 0
75 #endif /* !defined(wxUSE_LONGLONG) */
77 #ifndef wxUSE_MIMETYPE
78 # ifdef wxABORT_ON_CONFIG_ERROR
79 # error "wxUSE_MIMETYPE must be defined."
81 # define wxUSE_MIMETYPE 0
83 #endif /* !defined(wxUSE_MIMETYPE) */
85 #ifndef wxUSE_PROTOCOL
86 # ifdef wxABORT_ON_CONFIG_ERROR
87 # error "wxUSE_PROTOCOL must be defined."
89 # define wxUSE_PROTOCOL 0
91 #endif /* !defined(wxUSE_PROTOCOL) */
93 /* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
95 # undef wxUSE_PROTOCOL_HTTP
96 # undef wxUSE_PROTOCOL_FTP
97 # undef wxUSE_PROTOCOL_FILE
98 # define wxUSE_PROTOCOL_HTTP 0
99 # define wxUSE_PROTOCOL_FTP 0
100 # define wxUSE_PROTOCOL_FILE 0
101 #endif /* wxUSE_PROTOCOL */
103 #ifndef wxUSE_PROTOCOL_HTTP
104 # ifdef wxABORT_ON_CONFIG_ERROR
105 # error "wxUSE_PROTOCOL_HTTP must be defined."
107 # define wxUSE_PROTOCOL_HTTP 0
109 #endif /* !defined(wxUSE_PROTOCOL_HTTP) */
111 #ifndef wxUSE_PROTOCOL_FTP
112 # ifdef wxABORT_ON_CONFIG_ERROR
113 # error "wxUSE_PROTOCOL_FTP must be defined."
115 # define wxUSE_PROTOCOL_FTP 0
117 #endif /* !defined(wxUSE_PROTOCOL_FTP) */
119 #ifndef wxUSE_PROTOCOL_FILE
120 # ifdef wxABORT_ON_CONFIG_ERROR
121 # error "wxUSE_PROTOCOL_FILE must be defined."
123 # define wxUSE_PROTOCOL_FILE 0
125 #endif /* !defined(wxUSE_PROTOCOL_FILE) */
128 # ifdef wxABORT_ON_CONFIG_ERROR
129 # error "wxUSE_REGEX must be defined."
131 # define wxUSE_REGEX 0
133 #endif /* !defined(wxUSE_REGEX) */
135 #ifndef wxUSE_SOCKETS
136 # ifdef wxABORT_ON_CONFIG_ERROR
137 # error "wxUSE_SOCKETS must be defined."
139 # define wxUSE_SOCKETS 0
141 #endif /* !defined(wxUSE_SOCKETS) */
143 #ifndef wxUSE_STREAMS
144 # ifdef wxABORT_ON_CONFIG_ERROR
145 # error "wxUSE_STREAMS must be defined."
147 # define wxUSE_STREAMS 0
149 #endif /* !defined(wxUSE_STREAMS) */
151 #ifndef wxUSE_STOPWATCH
152 # ifdef wxABORT_ON_CONFIG_ERROR
153 # error "wxUSE_STOPWATCH must be defined."
155 # define wxUSE_STOPWATCH 0
157 #endif /* !defined(wxUSE_STOPWATCH) */
159 #ifndef wxUSE_TEXTBUFFER
160 # ifdef wxABORT_ON_CONFIG_ERROR
161 # error "wxUSE_TEXTBUFFER must be defined."
163 # define wxUSE_TEXTBUFFER 0
165 #endif /* !defined(wxUSE_TEXTBUFFER) */
167 #ifndef wxUSE_TEXTFILE
168 # ifdef wxABORT_ON_CONFIG_ERROR
169 # error "wxUSE_TEXTFILE must be defined."
171 # define wxUSE_TEXTFILE 0
173 #endif /* !defined(wxUSE_TEXTFILE) */
175 #ifndef wxUSE_UNICODE
176 # ifdef wxABORT_ON_CONFIG_ERROR
177 # error "wxUSE_UNICODE must be defined."
179 # define wxUSE_UNICODE 0
181 #endif /* !defined(wxUSE_UNICODE) */
184 # ifdef wxABORT_ON_CONFIG_ERROR
185 # error "wxUSE_URL must be defined."
189 #endif /* !defined(wxUSE_URL) */
192 all these tests are for GUI only
197 all of the settings tested below must be defined or we'd get an error from
198 preprocessor about invalid integer expression
202 # ifdef wxABORT_ON_CONFIG_ERROR
203 # error "wxUSE_ACCEL must be defined."
205 # define wxUSE_ACCEL 0
207 #endif /* !defined(wxUSE_ACCEL) */
209 #ifndef wxUSE_BMPBUTTON
210 # ifdef wxABORT_ON_CONFIG_ERROR
211 # error "wxUSE_BMPBUTTON must be defined."
213 # define wxUSE_BMPBUTTON 0
215 #endif /* !defined(wxUSE_BMPBUTTON) */
218 # ifdef wxABORT_ON_CONFIG_ERROR
219 # error "wxUSE_BUTTON must be defined."
221 # define wxUSE_BUTTON 0
223 #endif /* !defined(wxUSE_BUTTON) */
225 #ifndef wxUSE_CALENDARCTRL
226 # ifdef wxABORT_ON_CONFIG_ERROR
227 # error "wxUSE_CALENDARCTRL must be defined."
229 # define wxUSE_CALENDARCTRL 0
231 #endif /* !defined(wxUSE_CALENDARCTRL) */
234 # ifdef wxABORT_ON_CONFIG_ERROR
235 # error "wxUSE_CARET must be defined."
237 # define wxUSE_CARET 0
239 #endif /* !defined(wxUSE_CARET) */
241 #ifndef wxUSE_CHECKBOX
242 # ifdef wxABORT_ON_CONFIG_ERROR
243 # error "wxUSE_CHECKBOX must be defined."
245 # define wxUSE_CHECKBOX 0
247 #endif /* !defined(wxUSE_CHECKBOX) */
249 #ifndef wxUSE_CHECKLISTBOX
250 # ifdef wxABORT_ON_CONFIG_ERROR
251 # error "wxUSE_CHECKLISTBOX must be defined."
253 # define wxUSE_CHECKLISTBOX 0
255 #endif /* !defined(wxUSE_CHECKLISTBOX) */
258 # ifdef wxABORT_ON_CONFIG_ERROR
259 # error "wxUSE_CHOICE must be defined."
261 # define wxUSE_CHOICE 0
263 #endif /* !defined(wxUSE_CHOICE) */
265 #ifndef wxUSE_CHOICEDLG
266 # ifdef wxABORT_ON_CONFIG_ERROR
267 # error "wxUSE_CHOICEDLG must be defined."
269 # define wxUSE_CHOICEDLG 0
271 #endif /* !defined(wxUSE_CHOICEDLG) */
273 #ifndef wxUSE_CLIPBOARD
274 # ifdef wxABORT_ON_CONFIG_ERROR
275 # error "wxUSE_CLIPBOARD must be defined."
277 # define wxUSE_CLIPBOARD 0
279 #endif /* !defined(wxUSE_CLIPBOARD) */
281 #ifndef wxUSE_COLOURDLG
282 # ifdef wxABORT_ON_CONFIG_ERROR
283 # error "wxUSE_COLOURDLG must be defined."
285 # define wxUSE_COLOURDLG 0
287 #endif /* !defined(wxUSE_COLOURDLG) */
289 #ifndef wxUSE_COMBOBOX
290 # ifdef wxABORT_ON_CONFIG_ERROR
291 # error "wxUSE_COMBOBOX must be defined."
293 # define wxUSE_COMBOBOX 0
295 #endif /* !defined(wxUSE_COMBOBOX) */
297 #ifndef wxUSE_DATAOBJ
298 # ifdef wxABORT_ON_CONFIG_ERROR
299 # error "wxUSE_DATAOBJ must be defined."
301 # define wxUSE_DATAOBJ 0
303 #endif /* !defined(wxUSE_DATAOBJ) */
305 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
306 # ifdef wxABORT_ON_CONFIG_ERROR
307 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
309 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
311 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
313 #ifndef wxUSE_FILEDLG
314 # ifdef wxABORT_ON_CONFIG_ERROR
315 # error "wxUSE_FILEDLG must be defined."
317 # define wxUSE_FILEDLG 0
319 #endif /* !defined(wxUSE_FILEDLG) */
321 #ifndef wxUSE_FONTDLG
322 # ifdef wxABORT_ON_CONFIG_ERROR
323 # error "wxUSE_FONTDLG must be defined."
325 # define wxUSE_FONTDLG 0
327 #endif /* !defined(wxUSE_FONTDLG) */
329 #ifndef wxUSE_FONTMAP
330 # ifdef wxABORT_ON_CONFIG_ERROR
331 # error "wxUSE_FONTMAP must be defined."
333 # define wxUSE_FONTMAP 0
335 #endif /* !defined(wxUSE_FONTMAP) */
338 # ifdef wxABORT_ON_CONFIG_ERROR
339 # error "wxUSE_GAUGE must be defined."
341 # define wxUSE_GAUGE 0
343 #endif /* !defined(wxUSE_GAUGE) */
346 # ifdef wxABORT_ON_CONFIG_ERROR
347 # error "wxUSE_GRID must be defined."
349 # define wxUSE_GRID 0
351 #endif /* !defined(wxUSE_GRID) */
354 # ifdef wxABORT_ON_CONFIG_ERROR
355 # error "wxUSE_HELP must be defined."
357 # define wxUSE_HELP 0
359 #endif /* !defined(wxUSE_HELP) */
362 # ifdef wxABORT_ON_CONFIG_ERROR
363 # error "wxUSE_HTML must be defined."
365 # define wxUSE_HTML 0
367 #endif /* !defined(wxUSE_HTML) */
369 #ifndef wxUSE_ICO_CUR
370 # ifdef wxABORT_ON_CONFIG_ERROR
371 # error "wxUSE_ICO_CUR must be defined."
373 # define wxUSE_ICO_CUR 0
375 #endif /* !defined(wxUSE_ICO_CUR) */
378 # ifdef wxABORT_ON_CONFIG_ERROR
379 # error "wxUSE_IFF must be defined."
383 #endif /* !defined(wxUSE_IFF) */
385 #ifndef wxUSE_IMAGLIST
386 # ifdef wxABORT_ON_CONFIG_ERROR
387 # error "wxUSE_IMAGLIST must be defined."
389 # define wxUSE_IMAGLIST 0
391 #endif /* !defined(wxUSE_IMAGLIST) */
393 #ifndef wxUSE_JOYSTICK
394 # ifdef wxABORT_ON_CONFIG_ERROR
395 # error "wxUSE_JOYSTICK must be defined."
397 # define wxUSE_JOYSTICK 0
399 #endif /* !defined(wxUSE_JOYSTICK) */
401 #ifndef wxUSE_LISTBOX
402 # ifdef wxABORT_ON_CONFIG_ERROR
403 # error "wxUSE_LISTBOX must be defined."
405 # define wxUSE_LISTBOX 0
407 #endif /* !defined(wxUSE_LISTBOX) */
409 #ifndef wxUSE_LISTCTRL
410 # ifdef wxABORT_ON_CONFIG_ERROR
411 # error "wxUSE_LISTCTRL must be defined."
413 # define wxUSE_LISTCTRL 0
415 #endif /* !defined(wxUSE_LISTCTRL) */
418 # ifdef wxABORT_ON_CONFIG_ERROR
419 # error "wxUSE_LOGGUI must be defined."
421 # define wxUSE_LOGGUI 0
423 #endif /* !defined(wxUSE_LOGGUI) */
425 #ifndef wxUSE_LOGWINDOW
426 # ifdef wxABORT_ON_CONFIG_ERROR
427 # error "wxUSE_LOGWINDOW must be defined."
429 # define wxUSE_LOGWINDOW 0
431 #endif /* !defined(wxUSE_LOGWINDOW) */
433 #ifndef wxUSE_LOG_DIALOG
434 # ifdef wxABORT_ON_CONFIG_ERROR
435 # error "wxUSE_LOG_DIALOG must be defined."
437 # define wxUSE_LOG_DIALOG 0
439 #endif /* !defined(wxUSE_LOG_DIALOG) */
441 #ifndef wxUSE_MDI_ARCHITECTURE
442 # ifdef wxABORT_ON_CONFIG_ERROR
443 # error "wxUSE_MDI_ARCHITECTURE must be defined."
445 # define wxUSE_MDI_ARCHITECTURE 0
447 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
450 # ifdef wxABORT_ON_CONFIG_ERROR
451 # error "wxUSE_MENUS must be defined."
453 # define wxUSE_MENUS 0
455 #endif /* !defined(wxUSE_MENUS) */
458 # ifdef wxABORT_ON_CONFIG_ERROR
459 # error "wxUSE_MSGDLG must be defined."
461 # define wxUSE_MSGDLG 0
463 #endif /* !defined(wxUSE_MSGDLG) */
465 #ifndef wxUSE_NEW_GRID
466 # ifdef wxABORT_ON_CONFIG_ERROR
467 # error "wxUSE_NEW_GRID must be defined."
469 # define wxUSE_NEW_GRID 0
471 #endif /* !defined(wxUSE_NEW_GRID) */
473 #ifndef wxUSE_NOTEBOOK
474 # ifdef wxABORT_ON_CONFIG_ERROR
475 # error "wxUSE_NOTEBOOK must be defined."
477 # define wxUSE_NOTEBOOK 0
479 #endif /* !defined(wxUSE_NOTEBOOK) */
481 #ifndef wxUSE_PALETTE
482 # ifdef wxABORT_ON_CONFIG_ERROR
483 # error "wxUSE_PALETTE must be defined."
485 # define wxUSE_PALETTE 0
487 #endif /* !defined(wxUSE_PALETTE) */
489 #ifndef wxUSE_POPUPWIN
490 # ifdef wxABORT_ON_CONFIG_ERROR
491 # error "wxUSE_POPUPWIN must be defined."
493 # define wxUSE_POPUPWIN 0
495 #endif /* !defined(wxUSE_POPUPWIN) */
497 #ifndef wxUSE_PRINTING_ARCHITECTURE
498 # ifdef wxABORT_ON_CONFIG_ERROR
499 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
501 # define wxUSE_PRINTING_ARCHITECTURE 0
503 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
505 #ifndef wxUSE_RADIOBOX
506 # ifdef wxABORT_ON_CONFIG_ERROR
507 # error "wxUSE_RADIOBOX must be defined."
509 # define wxUSE_RADIOBOX 0
511 #endif /* !defined(wxUSE_RADIOBOX) */
513 #ifndef wxUSE_RADIOBTN
514 # ifdef wxABORT_ON_CONFIG_ERROR
515 # error "wxUSE_RADIOBTN must be defined."
517 # define wxUSE_RADIOBTN 0
519 #endif /* !defined(wxUSE_RADIOBTN) */
522 # ifdef wxABORT_ON_CONFIG_ERROR
523 # error "wxUSE_SASH must be defined."
525 # define wxUSE_SASH 0
527 #endif /* !defined(wxUSE_SASH) */
529 #ifndef wxUSE_SCROLLBAR
530 # ifdef wxABORT_ON_CONFIG_ERROR
531 # error "wxUSE_SCROLLBAR must be defined."
533 # define wxUSE_SCROLLBAR 0
535 #endif /* !defined(wxUSE_SCROLLBAR) */
538 # ifdef wxABORT_ON_CONFIG_ERROR
539 # error "wxUSE_SLIDER must be defined."
541 # define wxUSE_SLIDER 0
543 #endif /* !defined(wxUSE_SLIDER) */
545 #ifndef wxUSE_SPINBTN
546 # ifdef wxABORT_ON_CONFIG_ERROR
547 # error "wxUSE_SPINBTN must be defined."
549 # define wxUSE_SPINBTN 0
551 #endif /* !defined(wxUSE_SPINBTN) */
553 #ifndef wxUSE_SPINCTRL
554 # ifdef wxABORT_ON_CONFIG_ERROR
555 # error "wxUSE_SPINCTRL must be defined."
557 # define wxUSE_SPINCTRL 0
559 #endif /* !defined(wxUSE_SPINCTRL) */
562 # ifdef wxABORT_ON_CONFIG_ERROR
563 # error "wxUSE_SPLASH must be defined."
565 # define wxUSE_SPLASH 0
567 #endif /* !defined(wxUSE_SPLASH) */
569 #ifndef wxUSE_SPLITTER
570 # ifdef wxABORT_ON_CONFIG_ERROR
571 # error "wxUSE_SPLITTER must be defined."
573 # define wxUSE_SPLITTER 0
575 #endif /* !defined(wxUSE_SPLITTER) */
577 #ifndef wxUSE_STATBMP
578 # ifdef wxABORT_ON_CONFIG_ERROR
579 # error "wxUSE_STATBMP must be defined."
581 # define wxUSE_STATBMP 0
583 #endif /* !defined(wxUSE_STATBMP) */
585 #ifndef wxUSE_STATBOX
586 # ifdef wxABORT_ON_CONFIG_ERROR
587 # error "wxUSE_STATBOX must be defined."
589 # define wxUSE_STATBOX 0
591 #endif /* !defined(wxUSE_STATBOX) */
593 #ifndef wxUSE_STATLINE
594 # ifdef wxABORT_ON_CONFIG_ERROR
595 # error "wxUSE_STATLINE must be defined."
597 # define wxUSE_STATLINE 0
599 #endif /* !defined(wxUSE_STATLINE) */
601 #ifndef wxUSE_STATTEXT
602 # ifdef wxABORT_ON_CONFIG_ERROR
603 # error "wxUSE_STATTEXT must be defined."
605 # define wxUSE_STATTEXT 0
607 #endif /* !defined(wxUSE_STATTEXT) */
609 #ifndef wxUSE_STATUSBAR
610 # ifdef wxABORT_ON_CONFIG_ERROR
611 # error "wxUSE_STATUSBAR must be defined."
613 # define wxUSE_STATUSBAR 0
615 #endif /* !defined(wxUSE_STATUSBAR) */
617 #ifndef wxUSE_TAB_DIALOG
618 # ifdef wxABORT_ON_CONFIG_ERROR
619 # error "wxUSE_TAB_DIALOG must be defined."
621 # define wxUSE_TAB_DIALOG 0
623 #endif /* !defined(wxUSE_TAB_DIALOG) */
625 #ifndef wxUSE_TEXTCTRL
626 # ifdef wxABORT_ON_CONFIG_ERROR
627 # error "wxUSE_TEXTCTRL must be defined."
629 # define wxUSE_TEXTCTRL 0
631 #endif /* !defined(wxUSE_TEXTCTRL) */
633 #ifndef wxUSE_TIPWINDOW
634 # ifdef wxABORT_ON_CONFIG_ERROR
635 # error "wxUSE_TIPWINDOW must be defined."
637 # define wxUSE_TIPWINDOW 0
639 #endif /* !defined(wxUSE_TIPWINDOW) */
641 #ifndef wxUSE_TOOLBAR
642 # ifdef wxABORT_ON_CONFIG_ERROR
643 # error "wxUSE_TOOLBAR must be defined."
645 # define wxUSE_TOOLBAR 0
647 #endif /* !defined(wxUSE_TOOLBAR) */
649 #ifndef wxUSE_TOOLTIPS
650 # ifdef wxABORT_ON_CONFIG_ERROR
651 # error "wxUSE_TOOLTIPS must be defined."
653 # define wxUSE_TOOLTIPS 0
655 #endif /* !defined(wxUSE_TOOLTIPS) */
657 #ifndef wxUSE_TREECTRL
658 # ifdef wxABORT_ON_CONFIG_ERROR
659 # error "wxUSE_TREECTRL must be defined."
661 # define wxUSE_TREECTRL 0
663 #endif /* !defined(wxUSE_TREECTRL) */
665 #ifndef wxUSE_WXHTML_HELP
666 # ifdef wxABORT_ON_CONFIG_ERROR
667 # error "wxUSE_WXHTML_HELP must be defined."
669 # define wxUSE_WXHTML_HELP 0
671 #endif /* !defined(wxUSE_WXHTML_HELP) */
673 #endif /* wxUSE_GUI */
676 check consistency of the settings
679 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
681 # ifdef wxABORT_ON_CONFIG_ERROR
682 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
684 # undef wxUSE_PROTOCOL
685 # define wxUSE_PROTOCOL 1
688 #endif /* wxUSE_PROTOCOL_XXX */
692 # ifdef wxABORT_ON_CONFIG_ERROR
693 # error "wxUSE_URL requires wxUSE_PROTOCOL"
695 # undef wxUSE_PROTOCOL
696 # define wxUSE_PROTOCOL 1
699 #endif /* wxUSE_URL */
703 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
704 # ifdef wxABORT_ON_CONFIG_ERROR
705 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
707 # undef wxUSE_SOCKETS
708 # define wxUSE_SOCKETS 1
714 # ifdef wxABORT_ON_CONFIG_ERROR
715 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
717 # undef wxUSE_STREAMS
718 # define wxUSE_STREAMS 1
721 #endif /* wxUSE_PROTOCOL */
723 /* non GUI settings */
726 # ifdef wxABORT_ON_CONFIG_ERROR
727 # error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
729 # undef wxUSE_LONGLONG
730 # define wxUSE_LONGLONG 1
733 #endif /* wxUSE_STOPWATCH */
735 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
736 # ifdef wxABORT_ON_CONFIG_ERROR
737 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
739 # undef wxUSE_TEXTFILE
740 # define wxUSE_TEXTFILE 1
742 #endif /* wxUSE_MIMETYPE */
744 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
745 # ifdef wxABORT_ON_CONFIG_ERROR
746 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
748 # undef wxUSE_TEXTBUFFER
749 # define wxUSE_TEXTBUFFER 1
751 #endif /* wxUSE_TEXTFILE */
753 #if wxUSE_TEXTFILE && !wxUSE_FILE
754 # ifdef wxABORT_ON_CONFIG_ERROR
755 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
758 # define wxUSE_FILE 1
760 #endif /* wxUSE_TEXTFILE */
762 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
763 # ifdef wxABORT_ON_CONFIG_ERROR
764 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
766 # undef wxUSE_UNICODE
767 # define wxUSE_UNICODE 1
769 #endif /* wxUSE_UNICODE_MSLU */
771 /* the rest of the tests is for the GUI settings only */
774 #if wxUSE_BUTTON || \
775 wxUSE_CALENDARCTRL || \
780 wxUSE_CHECKLISTBOX || \
803 # ifdef wxABORT_ON_CONFIG_ERROR
804 # error "wxUSE_CONTROLS unset but some controls used"
806 # undef wxUSE_CONTROLS
807 # define wxUSE_CONTROLS 1
810 #endif /* controls */
812 /* wxUniv-specific dependencies */
813 #if defined(__WXUNIVERSAL__)
814 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
815 # ifdef wxABORT_ON_CONFIG_ERROR
816 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
818 # undef wxUSE_POPUPWIN
819 # define wxUSE_POPUPWIN 1
825 # ifdef wxABORT_ON_CONFIG_ERROR
826 # error "wxComboBox requires wxListBox in wxUniversal"
828 # undef wxUSE_LISTBOX
829 # define wxUSE_LISTBOX 1
832 # endif /* wxUSE_COMBOBOX */
836 # ifdef wxABORT_ON_CONFIG_ERROR
837 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
839 # undef wxUSE_CHECKBOX
840 # define wxUSE_CHECKBOX 1
843 # endif /* wxUSE_RADIOBTN */
847 # ifdef wxABORT_ON_CONFIG_ERROR
848 # error "wxTextCtrl requires wxCaret in wxUniversal"
851 # define wxUSE_CARET 1
853 # endif /* wxUSE_CARET */
855 # if !wxUSE_SCROLLBAR
856 # ifdef wxABORT_ON_CONFIG_ERROR
857 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
859 # undef wxUSE_SCROLLBAR
860 # define wxUSE_SCROLLBAR 1
862 # endif /* wxUSE_SCROLLBAR */
863 # endif /* wxUSE_TEXTCTRL */
864 #endif /* __WXUNIVERSAL__ */
866 /* wxGTK-specific dependencies */
868 # ifndef __WXUNIVERSAL__
869 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
870 # ifdef wxABORT_ON_CONFIG_ERROR
871 # error "MDI requires wxUSE_MENUS in wxGTK"
874 # define wxUSE_MENUS 1
877 # endif /* !__WXUNIVERSAL__ */
881 # ifdef wxABORT_ON_CONFIG_ERROR
882 # error "wxJoystick requires threads in wxGTK"
884 # undef wxUSE_JOYSTICK
885 # define wxUSE_JOYSTICK 0
889 #endif /* wxGTK && !wxUniv */
891 /* wxMSW-specific dependencies */
893 # ifndef wxUSE_UNICODE_MSLU
894 # ifdef wxABORT_ON_CONFIG_ERROR
895 # error "wxUSE_UNICODE_MSLU must be defined."
897 # define wxUSE_UNICODE_MSLU 0
899 # endif /* wxUSE_UNICODE_MSLU */
900 # ifndef wxUSE_MS_HTML_HELP
901 # ifdef wxABORT_ON_CONFIG_ERROR
902 # error "wxUSE_MS_HTML_HELP must be defined."
904 # define wxUSE_MS_HTML_HELP 0
906 # endif /* !defined(wxUSE_MS_HTML_HELP) */
907 # ifndef wxUSE_DIALUP_MANAGER
908 # ifdef wxABORT_ON_CONFIG_ERROR
909 # error "wxUSE_DIALUP_MANAGER must be defined."
911 # define wxUSE_DIALUP_MANAGER 0
913 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
915 # if !wxUSE_DYNAMIC_LOADER
916 # if wxUSE_MS_HTML_HELP
917 # ifdef wxABORT_ON_CONFIG_ERROR
918 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
920 # define wxUSE_DYNAMIC_LOADER 1
923 # if wxUSE_DIALUP_MANAGER
924 # ifdef wxABORT_ON_CONFIG_ERROR
925 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
927 # define wxUSE_DYNAMIC_LOADER 1
930 # endif /* wxUSE_DYNAMIC_LOADER */
933 /* wxMotif-specific dependencies */
934 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
935 # undef wxUSE_TAB_DIALOG
936 # define wxUSE_TAB_DIALOG 1
938 #if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
939 # undef wxUSE_TOGGLEBTN
940 # define wxUSE_TOGGLEBTN 0
943 /* generic controls dependencies */
944 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
945 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
946 /* all common controls are needed by these dialogs */
947 # if !defined(wxUSE_CHOICE) || \
948 !defined(wxUSE_TEXTCTRL) || \
949 !defined(wxUSE_BUTTON) || \
950 !defined(wxUSE_CHECKBOX) || \
951 !defined(wxUSE_STATTEXT)
952 # ifdef wxABORT_ON_CONFIG_ERROR
953 # error "These common controls are needed by common dialogs"
956 # define wxUSE_CHOICE 1
957 # undef wxUSE_TEXTCTRL
958 # define wxUSE_TEXTCTRL 1
960 # define wxUSE_BUTTON 1
961 # undef wxUSE_CHECKBOX
962 # define wxUSE_CHECKBOX 1
963 # undef wxUSE_STATTEXT
964 # define wxUSE_STATTEXT 1
968 #endif /* !wxMSW || wxUniv */
970 /* common dependencies */
971 #if wxUSE_CALENDARCTRL
972 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
973 # ifdef wxABORT_ON_CONFIG_ERROR
974 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
976 # undef wxUSE_SPINBTN
977 # undef wxUSE_COMBOBOX
978 # define wxUSE_SPINBTN 1
979 # define wxUSE_COMBOBOX 1
982 #endif /* wxUSE_CALENDARCTRL */
984 #if wxUSE_CHECKLISTBOX
986 # ifdef wxABORT_ON_CONFIG_ERROR
987 # error "wxCheckListBox requires wxListBox"
989 # undef wxUSE_LISTBOX
990 # define wxUSE_LISTBOX 1
993 #endif /* wxUSE_RADIOBTN */
995 #if wxUSE_WXHTML_HELP
996 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX
997 # ifdef wxABORT_ON_CONFIG_ERROR
998 # error "Built in help controller can't be compiled"
1001 # define wxUSE_HELP 1
1003 # define wxUSE_HTML 1
1004 # undef wxUSE_COMBOBOX
1005 # define wxUSE_COMBOBOX 1
1008 #endif /* wxUSE_WXHTML_HELP */
1010 #if wxUSE_PRINTING_ARCHITECTURE
1011 # if !wxUSE_COMBOBOX
1012 # ifdef wxABORT_ON_CONFIG_ERROR
1013 # error "Print dialog requires wxUSE_COMBOBOX"
1015 # undef wxUSE_COMBOBOX
1016 # define wxUSE_COMBOBOX 1
1019 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1021 #if wxUSE_DOC_VIEW_ARCHITECTURE
1023 # ifdef wxABORT_ON_CONFIG_ERROR
1024 # error "DocView requires wxUSE_MENUS"
1027 # define wxUSE_MENUS 1
1030 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1033 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1034 # ifdef wxABORT_ON_CONFIG_ERROR
1035 # error "wxFileDialog must be compiled as well"
1037 # undef wxUSE_FILEDLG
1038 # define wxUSE_FILEDLG 1
1041 #endif /* wxUSE_FILEDLG */
1044 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1045 # ifdef wxABORT_ON_CONFIG_ERROR
1046 # error "wxImageList must be compiled as well"
1048 # undef wxUSE_IMAGLIST
1049 # define wxUSE_IMAGLIST 1
1052 #endif /* !wxUSE_IMAGLIST */
1055 # ifdef wxABORT_ON_CONFIG_ERROR
1056 /* FIXME: should compile without it, of course, but doesn't */
1057 # error "wxMessageBox is always needed"
1059 # undef wxUSE_MSGDLG
1060 # define wxUSE_MSGDLG 1
1065 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1066 # ifdef wxABORT_ON_CONFIG_ERROR
1067 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1069 # undef wxUSE_RADIOBTN
1070 # undef wxUSE_STATBOX
1071 # define wxUSE_RADIOBTN 1
1072 # define wxUSE_STATBOX 1
1075 #endif /* wxUSE_RADIOBOX */
1078 # if !wxUSE_TEXTCTRL
1079 # ifdef wxABORT_ON_CONFIG_ERROR
1080 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1082 # undef wxUSE_TEXTCTRL
1083 # define wxUSE_TEXTCTRL 1
1086 #endif /* wxUSE_LOGWINDOW */
1088 #if wxUSE_LOG_DIALOG
1089 # if !wxUSE_LISTCTRL
1090 # ifdef wxABORT_ON_CONFIG_ERROR
1091 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1093 # undef wxUSE_LISTCTRL
1094 # define wxUSE_LISTCTRL 1
1097 #endif /* wxUSE_LOG_DIALOG */
1099 /* I wonder if we shouldn't just remove all occurrences of
1100 wxUSE_DYNAMIC_CLASSES from the sources? */
1101 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
1102 # ifdef wxABORT_ON_CONFIG_ERROR
1103 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
1105 # undef wxUSE_DYNAMIC_CLASSES
1106 # define wxUSE_DYNAMIC_CLASSES 1
1108 #endif /* wxUSE_DYNAMIC_CLASSES */
1110 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1111 # ifdef wxABORT_ON_CONFIG_ERROR
1112 # error "wxClipboard requires wxDataObject"
1114 # undef wxUSE_DATAOBJ
1115 # define wxUSE_DATAOBJ 1
1117 #endif /* wxUSE_CLIPBOARD */
1119 #endif /* wxUSE_GUI */