]>
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
24 tests for non GUI features
27 #ifndef wxUSE_DYNLIB_CLASS
28 # ifdef wxABORT_ON_CONFIG_ERROR
29 # error "wxUSE_DYNLIB_CLASS must be defined."
31 # define wxUSE_DYNLIB_CLASS 0
33 #endif /* !defined(wxUSE_DYNLIB_CLASS) */
35 #ifndef wxUSE_DYNAMIC_LOADER
36 # ifdef wxABORT_ON_CONFIG_ERROR
37 # error "wxUSE_DYNAMIC_LOADER must be defined."
39 # define wxUSE_DYNAMIC_LOADER 0
41 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
44 # ifdef wxABORT_ON_CONFIG_ERROR
45 # error "wxUSE_LOG must be defined."
49 #endif /* !defined(wxUSE_LOG) */
51 #ifndef wxUSE_LONGLONG
52 # ifdef wxABORT_ON_CONFIG_ERROR
53 # error "wxUSE_LONGLONG must be defined."
55 # define wxUSE_LONGLONG 0
57 #endif /* !defined(wxUSE_LONGLONG) */
59 #ifndef wxUSE_MIMETYPE
60 # ifdef wxABORT_ON_CONFIG_ERROR
61 # error "wxUSE_MIMETYPE must be defined."
63 # define wxUSE_MIMETYPE 0
65 #endif /* !defined(wxUSE_MIMETYPE) */
67 #ifndef wxUSE_PROTOCOL
68 # ifdef wxABORT_ON_CONFIG_ERROR
69 # error "wxUSE_PROTOCOL must be defined."
71 # define wxUSE_PROTOCOL 0
73 #endif /* !defined(wxUSE_PROTOCOL) */
75 /* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
77 # undef wxUSE_PROTOCOL_HTTP
78 # undef wxUSE_PROTOCOL_FTP
79 # undef wxUSE_PROTOCOL_FILE
80 # define wxUSE_PROTOCOL_HTTP 0
81 # define wxUSE_PROTOCOL_FTP 0
82 # define wxUSE_PROTOCOL_FILE 0
83 #endif /* wxUSE_PROTOCOL */
85 #ifndef wxUSE_PROTOCOL_HTTP
86 # ifdef wxABORT_ON_CONFIG_ERROR
87 # error "wxUSE_PROTOCOL_HTTP must be defined."
89 # define wxUSE_PROTOCOL_HTTP 0
91 #endif /* !defined(wxUSE_PROTOCOL_HTTP) */
93 #ifndef wxUSE_PROTOCOL_FTP
94 # ifdef wxABORT_ON_CONFIG_ERROR
95 # error "wxUSE_PROTOCOL_FTP must be defined."
97 # define wxUSE_PROTOCOL_FTP 0
99 #endif /* !defined(wxUSE_PROTOCOL_FTP) */
101 #ifndef wxUSE_PROTOCOL_FILE
102 # ifdef wxABORT_ON_CONFIG_ERROR
103 # error "wxUSE_PROTOCOL_FILE must be defined."
105 # define wxUSE_PROTOCOL_FILE 0
107 #endif /* !defined(wxUSE_PROTOCOL_FILE) */
110 # ifdef wxABORT_ON_CONFIG_ERROR
111 # error "wxUSE_REGEX must be defined."
113 # define wxUSE_REGEX 0
115 #endif /* !defined(wxUSE_REGEX) */
117 #ifndef wxUSE_SOCKETS
118 # ifdef wxABORT_ON_CONFIG_ERROR
119 # error "wxUSE_SOCKETS must be defined."
121 # define wxUSE_SOCKETS 0
123 #endif /* !defined(wxUSE_SOCKETS) */
125 #ifndef wxUSE_STREAMS
126 # ifdef wxABORT_ON_CONFIG_ERROR
127 # error "wxUSE_STREAMS must be defined."
129 # define wxUSE_STREAMS 0
131 #endif /* !defined(wxUSE_STREAMS) */
133 #ifndef wxUSE_STOPWATCH
134 # ifdef wxABORT_ON_CONFIG_ERROR
135 # error "wxUSE_STOPWATCH must be defined."
137 # define wxUSE_STOPWATCH 0
139 #endif /* !defined(wxUSE_STOPWATCH) */
141 #ifndef wxUSE_TEXTBUFFER
142 # ifdef wxABORT_ON_CONFIG_ERROR
143 # error "wxUSE_TEXTBUFFER must be defined."
145 # define wxUSE_TEXTBUFFER 0
147 #endif /* !defined(wxUSE_TEXTBUFFER) */
149 #ifndef wxUSE_TEXTFILE
150 # ifdef wxABORT_ON_CONFIG_ERROR
151 # error "wxUSE_TEXTFILE must be defined."
153 # define wxUSE_TEXTFILE 0
155 #endif /* !defined(wxUSE_TEXTFILE) */
157 #ifndef wxUSE_UNICODE
158 # ifdef wxABORT_ON_CONFIG_ERROR
159 # error "wxUSE_UNICODE must be defined."
161 # define wxUSE_UNICODE 0
163 #endif /* !defined(wxUSE_UNICODE) */
166 # ifdef wxABORT_ON_CONFIG_ERROR
167 # error "wxUSE_URL must be defined."
171 #endif /* !defined(wxUSE_URL) */
174 all these tests are for GUI only
179 all of the settings tested below must be defined or we'd get an error from
180 preprocessor about invalid integer expression
184 # ifdef wxABORT_ON_CONFIG_ERROR
185 # error "wxUSE_ACCEL must be defined."
187 # define wxUSE_ACCEL 0
189 #endif /* !defined(wxUSE_ACCEL) */
191 #ifndef wxUSE_BMPBUTTON
192 # ifdef wxABORT_ON_CONFIG_ERROR
193 # error "wxUSE_BMPBUTTON must be defined."
195 # define wxUSE_BMPBUTTON 0
197 #endif /* !defined(wxUSE_BMPBUTTON) */
200 # ifdef wxABORT_ON_CONFIG_ERROR
201 # error "wxUSE_BUTTON must be defined."
203 # define wxUSE_BUTTON 0
205 #endif /* !defined(wxUSE_BUTTON) */
207 #ifndef wxUSE_CALENDARCTRL
208 # ifdef wxABORT_ON_CONFIG_ERROR
209 # error "wxUSE_CALENDARCTRL must be defined."
211 # define wxUSE_CALENDARCTRL 0
213 #endif /* !defined(wxUSE_CALENDARCTRL) */
216 # ifdef wxABORT_ON_CONFIG_ERROR
217 # error "wxUSE_CARET must be defined."
219 # define wxUSE_CARET 0
221 #endif /* !defined(wxUSE_CARET) */
223 #ifndef wxUSE_CHECKBOX
224 # ifdef wxABORT_ON_CONFIG_ERROR
225 # error "wxUSE_CHECKBOX must be defined."
227 # define wxUSE_CHECKBOX 0
229 #endif /* !defined(wxUSE_CHECKBOX) */
231 #ifndef wxUSE_CHECKLISTBOX
232 # ifdef wxABORT_ON_CONFIG_ERROR
233 # error "wxUSE_CHECKLISTBOX must be defined."
235 # define wxUSE_CHECKLISTBOX 0
237 #endif /* !defined(wxUSE_CHECKLISTBOX) */
240 # ifdef wxABORT_ON_CONFIG_ERROR
241 # error "wxUSE_CHOICE must be defined."
243 # define wxUSE_CHOICE 0
245 #endif /* !defined(wxUSE_CHOICE) */
247 #ifndef wxUSE_CHOICEDLG
248 # ifdef wxABORT_ON_CONFIG_ERROR
249 # error "wxUSE_CHOICEDLG must be defined."
251 # define wxUSE_CHOICEDLG 0
253 #endif /* !defined(wxUSE_CHOICEDLG) */
255 #ifndef wxUSE_CLIPBOARD
256 # ifdef wxABORT_ON_CONFIG_ERROR
257 # error "wxUSE_CLIPBOARD must be defined."
259 # define wxUSE_CLIPBOARD 0
261 #endif /* !defined(wxUSE_CLIPBOARD) */
263 #ifndef wxUSE_COLOURDLG
264 # ifdef wxABORT_ON_CONFIG_ERROR
265 # error "wxUSE_COLOURDLG must be defined."
267 # define wxUSE_COLOURDLG 0
269 #endif /* !defined(wxUSE_COLOURDLG) */
271 #ifndef wxUSE_COMBOBOX
272 # ifdef wxABORT_ON_CONFIG_ERROR
273 # error "wxUSE_COMBOBOX must be defined."
275 # define wxUSE_COMBOBOX 0
277 #endif /* !defined(wxUSE_COMBOBOX) */
279 #ifndef wxUSE_DATAOBJ
280 # ifdef wxABORT_ON_CONFIG_ERROR
281 # error "wxUSE_DATAOBJ must be defined."
283 # define wxUSE_DATAOBJ 0
285 #endif /* !defined(wxUSE_DATAOBJ) */
287 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
288 # ifdef wxABORT_ON_CONFIG_ERROR
289 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
291 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
293 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
295 #ifndef wxUSE_FILEDLG
296 # ifdef wxABORT_ON_CONFIG_ERROR
297 # error "wxUSE_FILEDLG must be defined."
299 # define wxUSE_FILEDLG 0
301 #endif /* !defined(wxUSE_FILEDLG) */
303 #ifndef wxUSE_FONTDLG
304 # ifdef wxABORT_ON_CONFIG_ERROR
305 # error "wxUSE_FONTDLG must be defined."
307 # define wxUSE_FONTDLG 0
309 #endif /* !defined(wxUSE_FONTDLG) */
311 #ifndef wxUSE_FONTMAP
312 # ifdef wxABORT_ON_CONFIG_ERROR
313 # error "wxUSE_FONTMAP must be defined."
315 # define wxUSE_FONTMAP 0
317 #endif /* !defined(wxUSE_FONTMAP) */
320 # ifdef wxABORT_ON_CONFIG_ERROR
321 # error "wxUSE_GAUGE must be defined."
323 # define wxUSE_GAUGE 0
325 #endif /* !defined(wxUSE_GAUGE) */
328 # ifdef wxABORT_ON_CONFIG_ERROR
329 # error "wxUSE_GRID must be defined."
331 # define wxUSE_GRID 0
333 #endif /* !defined(wxUSE_GRID) */
336 # ifdef wxABORT_ON_CONFIG_ERROR
337 # error "wxUSE_HELP must be defined."
339 # define wxUSE_HELP 0
341 #endif /* !defined(wxUSE_HELP) */
344 # ifdef wxABORT_ON_CONFIG_ERROR
345 # error "wxUSE_HTML must be defined."
347 # define wxUSE_HTML 0
349 #endif /* !defined(wxUSE_HTML) */
351 #ifndef wxUSE_ICO_CUR
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_ICO_CUR must be defined."
355 # define wxUSE_ICO_CUR 0
357 #endif /* !defined(wxUSE_ICO_CUR) */
360 # ifdef wxABORT_ON_CONFIG_ERROR
361 # error "wxUSE_IFF must be defined."
365 #endif /* !defined(wxUSE_IFF) */
367 #ifndef wxUSE_IMAGLIST
368 # ifdef wxABORT_ON_CONFIG_ERROR
369 # error "wxUSE_IMAGLIST must be defined."
371 # define wxUSE_IMAGLIST 0
373 #endif /* !defined(wxUSE_IMAGLIST) */
375 #ifndef wxUSE_JOYSTICK
376 # ifdef wxABORT_ON_CONFIG_ERROR
377 # error "wxUSE_JOYSTICK must be defined."
379 # define wxUSE_JOYSTICK 0
381 #endif /* !defined(wxUSE_JOYSTICK) */
383 #ifndef wxUSE_LISTBOX
384 # ifdef wxABORT_ON_CONFIG_ERROR
385 # error "wxUSE_LISTBOX must be defined."
387 # define wxUSE_LISTBOX 0
389 #endif /* !defined(wxUSE_LISTBOX) */
391 #ifndef wxUSE_LISTCTRL
392 # ifdef wxABORT_ON_CONFIG_ERROR
393 # error "wxUSE_LISTCTRL must be defined."
395 # define wxUSE_LISTCTRL 0
397 #endif /* !defined(wxUSE_LISTCTRL) */
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxUSE_LOGGUI must be defined."
403 # define wxUSE_LOGGUI 0
405 #endif /* !defined(wxUSE_LOGGUI) */
407 #ifndef wxUSE_LOGWINDOW
408 # ifdef wxABORT_ON_CONFIG_ERROR
409 # error "wxUSE_LOGWINDOW must be defined."
411 # define wxUSE_LOGWINDOW 0
413 #endif /* !defined(wxUSE_LOGWINDOW) */
415 #ifndef wxUSE_LOG_DIALOG
416 # ifdef wxABORT_ON_CONFIG_ERROR
417 # error "wxUSE_LOG_DIALOG must be defined."
419 # define wxUSE_LOG_DIALOG 0
421 #endif /* !defined(wxUSE_LOG_DIALOG) */
423 #ifndef wxUSE_MDI_ARCHITECTURE
424 # ifdef wxABORT_ON_CONFIG_ERROR
425 # error "wxUSE_MDI_ARCHITECTURE must be defined."
427 # define wxUSE_MDI_ARCHITECTURE 0
429 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
432 # ifdef wxABORT_ON_CONFIG_ERROR
433 # error "wxUSE_MENUS must be defined."
435 # define wxUSE_MENUS 0
437 #endif /* !defined(wxUSE_MENUS) */
440 # ifdef wxABORT_ON_CONFIG_ERROR
441 # error "wxUSE_MSGDLG must be defined."
443 # define wxUSE_MSGDLG 0
445 #endif /* !defined(wxUSE_MSGDLG) */
447 #ifndef wxUSE_NEW_GRID
448 # ifdef wxABORT_ON_CONFIG_ERROR
449 # error "wxUSE_NEW_GRID must be defined."
451 # define wxUSE_NEW_GRID 0
453 #endif /* !defined(wxUSE_NEW_GRID) */
455 #ifndef wxUSE_NOTEBOOK
456 # ifdef wxABORT_ON_CONFIG_ERROR
457 # error "wxUSE_NOTEBOOK must be defined."
459 # define wxUSE_NOTEBOOK 0
461 #endif /* !defined(wxUSE_NOTEBOOK) */
463 #ifndef wxUSE_PALETTE
464 # ifdef wxABORT_ON_CONFIG_ERROR
465 # error "wxUSE_PALETTE must be defined."
467 # define wxUSE_PALETTE 0
469 #endif /* !defined(wxUSE_PALETTE) */
471 #ifndef wxUSE_POPUPWIN
472 # ifdef wxABORT_ON_CONFIG_ERROR
473 # error "wxUSE_POPUPWIN must be defined."
475 # define wxUSE_POPUPWIN 0
477 #endif /* !defined(wxUSE_POPUPWIN) */
479 #ifndef wxUSE_PRINTING_ARCHITECTURE
480 # ifdef wxABORT_ON_CONFIG_ERROR
481 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
483 # define wxUSE_PRINTING_ARCHITECTURE 0
485 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
487 #ifndef wxUSE_RADIOBOX
488 # ifdef wxABORT_ON_CONFIG_ERROR
489 # error "wxUSE_RADIOBOX must be defined."
491 # define wxUSE_RADIOBOX 0
493 #endif /* !defined(wxUSE_RADIOBOX) */
495 #ifndef wxUSE_RADIOBTN
496 # ifdef wxABORT_ON_CONFIG_ERROR
497 # error "wxUSE_RADIOBTN must be defined."
499 # define wxUSE_RADIOBTN 0
501 #endif /* !defined(wxUSE_RADIOBTN) */
504 # ifdef wxABORT_ON_CONFIG_ERROR
505 # error "wxUSE_SASH must be defined."
507 # define wxUSE_SASH 0
509 #endif /* !defined(wxUSE_SASH) */
511 #ifndef wxUSE_SCROLLBAR
512 # ifdef wxABORT_ON_CONFIG_ERROR
513 # error "wxUSE_SCROLLBAR must be defined."
515 # define wxUSE_SCROLLBAR 0
517 #endif /* !defined(wxUSE_SCROLLBAR) */
520 # ifdef wxABORT_ON_CONFIG_ERROR
521 # error "wxUSE_SLIDER must be defined."
523 # define wxUSE_SLIDER 0
525 #endif /* !defined(wxUSE_SLIDER) */
527 #ifndef wxUSE_SPINBTN
528 # ifdef wxABORT_ON_CONFIG_ERROR
529 # error "wxUSE_SPINBTN must be defined."
531 # define wxUSE_SPINBTN 0
533 #endif /* !defined(wxUSE_SPINBTN) */
535 #ifndef wxUSE_SPINCTRL
536 # ifdef wxABORT_ON_CONFIG_ERROR
537 # error "wxUSE_SPINCTRL must be defined."
539 # define wxUSE_SPINCTRL 0
541 #endif /* !defined(wxUSE_SPINCTRL) */
544 # ifdef wxABORT_ON_CONFIG_ERROR
545 # error "wxUSE_SPLASH must be defined."
547 # define wxUSE_SPLASH 0
549 #endif /* !defined(wxUSE_SPLASH) */
551 #ifndef wxUSE_SPLITTER
552 # ifdef wxABORT_ON_CONFIG_ERROR
553 # error "wxUSE_SPLITTER must be defined."
555 # define wxUSE_SPLITTER 0
557 #endif /* !defined(wxUSE_SPLITTER) */
559 #ifndef wxUSE_STATBMP
560 # ifdef wxABORT_ON_CONFIG_ERROR
561 # error "wxUSE_STATBMP must be defined."
563 # define wxUSE_STATBMP 0
565 #endif /* !defined(wxUSE_STATBMP) */
567 #ifndef wxUSE_STATBOX
568 # ifdef wxABORT_ON_CONFIG_ERROR
569 # error "wxUSE_STATBOX must be defined."
571 # define wxUSE_STATBOX 0
573 #endif /* !defined(wxUSE_STATBOX) */
575 #ifndef wxUSE_STATLINE
576 # ifdef wxABORT_ON_CONFIG_ERROR
577 # error "wxUSE_STATLINE must be defined."
579 # define wxUSE_STATLINE 0
581 #endif /* !defined(wxUSE_STATLINE) */
583 #ifndef wxUSE_STATTEXT
584 # ifdef wxABORT_ON_CONFIG_ERROR
585 # error "wxUSE_STATTEXT must be defined."
587 # define wxUSE_STATTEXT 0
589 #endif /* !defined(wxUSE_STATTEXT) */
591 #ifndef wxUSE_STATUSBAR
592 # ifdef wxABORT_ON_CONFIG_ERROR
593 # error "wxUSE_STATUSBAR must be defined."
595 # define wxUSE_STATUSBAR 0
597 #endif /* !defined(wxUSE_STATUSBAR) */
599 #ifndef wxUSE_TAB_DIALOG
600 # ifdef wxABORT_ON_CONFIG_ERROR
601 # error "wxUSE_TAB_DIALOG must be defined."
603 # define wxUSE_TAB_DIALOG 0
605 #endif /* !defined(wxUSE_TAB_DIALOG) */
607 #ifndef wxUSE_TEXTCTRL
608 # ifdef wxABORT_ON_CONFIG_ERROR
609 # error "wxUSE_TEXTCTRL must be defined."
611 # define wxUSE_TEXTCTRL 0
613 #endif /* !defined(wxUSE_TEXTCTRL) */
615 #ifndef wxUSE_TIPWINDOW
616 # ifdef wxABORT_ON_CONFIG_ERROR
617 # error "wxUSE_TIPWINDOW must be defined."
619 # define wxUSE_TIPWINDOW 0
621 #endif /* !defined(wxUSE_TIPWINDOW) */
623 #ifndef wxUSE_TOOLBAR
624 # ifdef wxABORT_ON_CONFIG_ERROR
625 # error "wxUSE_TOOLBAR must be defined."
627 # define wxUSE_TOOLBAR 0
629 #endif /* !defined(wxUSE_TOOLBAR) */
631 #ifndef wxUSE_TOOLTIPS
632 # ifdef wxABORT_ON_CONFIG_ERROR
633 # error "wxUSE_TOOLTIPS must be defined."
635 # define wxUSE_TOOLTIPS 0
637 #endif /* !defined(wxUSE_TOOLTIPS) */
639 #ifndef wxUSE_TREECTRL
640 # ifdef wxABORT_ON_CONFIG_ERROR
641 # error "wxUSE_TREECTRL must be defined."
643 # define wxUSE_TREECTRL 0
645 #endif /* !defined(wxUSE_TREECTRL) */
647 #ifndef wxUSE_WXHTML_HELP
648 # ifdef wxABORT_ON_CONFIG_ERROR
649 # error "wxUSE_WXHTML_HELP must be defined."
651 # define wxUSE_WXHTML_HELP 0
653 #endif /* !defined(wxUSE_WXHTML_HELP) */
655 #endif /* wxUSE_GUI */
658 check consistency of the settings
661 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
663 # ifdef wxABORT_ON_CONFIG_ERROR
664 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
666 # undef wxUSE_PROTOCOL
667 # define wxUSE_PROTOCOL 1
670 #endif /* wxUSE_PROTOCOL_XXX */
674 # ifdef wxABORT_ON_CONFIG_ERROR
675 # error "wxUSE_URL requires wxUSE_PROTOCOL"
677 # undef wxUSE_PROTOCOL
678 # define wxUSE_PROTOCOL 1
681 #endif /* wxUSE_URL */
685 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
686 # ifdef wxABORT_ON_CONFIG_ERROR
687 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
689 # undef wxUSE_SOCKETS
690 # define wxUSE_SOCKETS 1
696 # ifdef wxABORT_ON_CONFIG_ERROR
697 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
699 # undef wxUSE_STREAMS
700 # define wxUSE_STREAMS 1
703 #endif /* wxUSE_PROTOCOL */
705 /* non GUI settings */
708 # ifdef wxABORT_ON_CONFIG_ERROR
709 # error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
711 # undef wxUSE_LONGLONG
712 # define wxUSE_LONGLONG 1
715 #endif /* wxUSE_STOPWATCH */
717 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
718 # ifdef wxABORT_ON_CONFIG_ERROR
719 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
721 # undef wxUSE_TEXTFILE
722 # define wxUSE_TEXTFILE 1
724 #endif /* wxUSE_MIMETYPE */
726 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
727 # ifdef wxABORT_ON_CONFIG_ERROR
728 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
730 # undef wxUSE_TEXTBUFFER
731 # define wxUSE_TEXTBUFFER 1
733 #endif /* wxUSE_TEXTFILE */
735 #if wxUSE_TEXTFILE && !wxUSE_FILE
736 # ifdef wxABORT_ON_CONFIG_ERROR
737 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
740 # define wxUSE_FILE 1
742 #endif /* wxUSE_TEXTFILE */
744 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
745 # ifdef wxABORT_ON_CONFIG_ERROR
746 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
748 # undef wxUSE_UNICODE
749 # define wxUSE_UNICODE 1
751 #endif /* wxUSE_UNICODE_MSLU */
753 /* the rest of the tests is for the GUI settings only */
756 #if wxUSE_BUTTON || \
757 wxUSE_CALENDARCTRL || \
762 wxUSE_CHECKLISTBOX || \
785 # ifdef wxABORT_ON_CONFIG_ERROR
786 # error "wxUSE_CONTROLS unset but some controls used"
788 # undef wxUSE_CONTROLS
789 # define wxUSE_CONTROLS 1
792 #endif /* controls */
794 /* wxUniv-specific dependencies */
795 #if defined(__WXUNIVERSAL__)
796 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
797 # ifdef wxABORT_ON_CONFIG_ERROR
798 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
800 # undef wxUSE_POPUPWIN
801 # define wxUSE_POPUPWIN 1
807 # ifdef wxABORT_ON_CONFIG_ERROR
808 # error "wxComboBox requires wxListBox in wxUniversal"
810 # undef wxUSE_LISTBOX
811 # define wxUSE_LISTBOX 1
814 # endif /* wxUSE_COMBOBOX */
818 # ifdef wxABORT_ON_CONFIG_ERROR
819 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
821 # undef wxUSE_CHECKBOX
822 # define wxUSE_CHECKBOX 1
825 # endif /* wxUSE_RADIOBTN */
829 # ifdef wxABORT_ON_CONFIG_ERROR
830 # error "wxTextCtrl requires wxCaret in wxUniversal"
833 # define wxUSE_CARET 1
835 # endif /* wxUSE_CARET */
837 # if !wxUSE_SCROLLBAR
838 # ifdef wxABORT_ON_CONFIG_ERROR
839 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
841 # undef wxUSE_SCROLLBAR
842 # define wxUSE_SCROLLBAR 1
844 # endif /* wxUSE_SCROLLBAR */
845 # endif /* wxUSE_TEXTCTRL */
846 #endif /* __WXUNIVERSAL__ */
848 /* wxGTK-specific dependencies */
850 # ifndef __WXUNIVERSAL__
851 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
852 # ifdef wxABORT_ON_CONFIG_ERROR
853 # error "MDI requires wxUSE_MENUS in wxGTK"
856 # define wxUSE_MENUS 1
859 # endif /* !__WXUNIVERSAL__ */
863 # ifdef wxABORT_ON_CONFIG_ERROR
864 # error "wxJoystick requires threads in wxGTK"
866 # undef wxUSE_JOYSTICK
867 # define wxUSE_JOYSTICK 0
871 #endif /* wxGTK && !wxUniv */
873 /* wxMSW-specific dependencies */
875 # ifndef wxUSE_UNICODE_MSLU
876 # ifdef wxABORT_ON_CONFIG_ERROR
877 # error "wxUSE_UNICODE_MSLU must be defined."
879 # define wxUSE_UNICODE_MSLU 0
881 # endif /* wxUSE_UNICODE_MSLU */
882 # ifndef wxUSE_MS_HTML_HELP
883 # ifdef wxABORT_ON_CONFIG_ERROR
884 # error "wxUSE_MS_HTML_HELP must be defined."
886 # define wxUSE_MS_HTML_HELP 0
888 # endif /* !defined(wxUSE_MS_HTML_HELP) */
889 # ifndef wxUSE_DIALUP_MANAGER
890 # ifdef wxABORT_ON_CONFIG_ERROR
891 # error "wxUSE_DIALUP_MANAGER must be defined."
893 # define wxUSE_DIALUP_MANAGER 0
895 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
897 # if !wxUSE_DYNAMIC_LOADER
898 # if wxUSE_MS_HTML_HELP
899 # ifdef wxABORT_ON_CONFIG_ERROR
900 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
902 # define wxUSE_DYNAMIC_LOADER 1
905 # if wxUSE_DIALUP_MANAGER
906 # ifdef wxABORT_ON_CONFIG_ERROR
907 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
909 # define wxUSE_DYNAMIC_LOADER 1
912 # endif /* wxUSE_DYNAMIC_LOADER */
915 /* wxMotif-specific dependencies */
916 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
917 # undef wxUSE_TAB_DIALOG
918 # define wxUSE_TAB_DIALOG 1
920 #if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
921 # undef wxUSE_TOGGLEBTN
922 # define wxUSE_TOGGLEBTN 0
925 /* generic controls dependencies */
926 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
927 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
928 /* all common controls are needed by these dialogs */
929 # if !defined(wxUSE_CHOICE) || \
930 !defined(wxUSE_TEXTCTRL) || \
931 !defined(wxUSE_BUTTON) || \
932 !defined(wxUSE_CHECKBOX) || \
933 !defined(wxUSE_STATTEXT)
934 # ifdef wxABORT_ON_CONFIG_ERROR
935 # error "These common controls are needed by common dialogs"
938 # define wxUSE_CHOICE 1
939 # undef wxUSE_TEXTCTRL
940 # define wxUSE_TEXTCTRL 1
942 # define wxUSE_BUTTON 1
943 # undef wxUSE_CHECKBOX
944 # define wxUSE_CHECKBOX 1
945 # undef wxUSE_STATTEXT
946 # define wxUSE_STATTEXT 1
950 #endif /* !wxMSW || wxUniv */
952 /* common dependencies */
953 #if wxUSE_CALENDARCTRL
954 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
955 # ifdef wxABORT_ON_CONFIG_ERROR
956 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
958 # undef wxUSE_SPINBTN
959 # undef wxUSE_COMBOBOX
960 # define wxUSE_SPINBTN 1
961 # define wxUSE_COMBOBOX 1
964 #endif /* wxUSE_CALENDARCTRL */
966 #if wxUSE_CHECKLISTBOX
968 # ifdef wxABORT_ON_CONFIG_ERROR
969 # error "wxCheckListBox requires wxListBox"
971 # undef wxUSE_LISTBOX
972 # define wxUSE_LISTBOX 1
975 #endif /* wxUSE_RADIOBTN */
977 #if wxUSE_WXHTML_HELP
978 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX
979 # ifdef wxABORT_ON_CONFIG_ERROR
980 # error "Built in help controller can't be compiled"
983 # define wxUSE_HELP 1
985 # define wxUSE_HTML 1
986 # undef wxUSE_COMBOBOX
987 # define wxUSE_COMBOBOX 1
990 #endif /* wxUSE_WXHTML_HELP */
992 #if wxUSE_PRINTING_ARCHITECTURE
994 # ifdef wxABORT_ON_CONFIG_ERROR
995 # error "Print dialog requires wxUSE_COMBOBOX"
997 # undef wxUSE_COMBOBOX
998 # define wxUSE_COMBOBOX 1
1001 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1003 #if wxUSE_DOC_VIEW_ARCHITECTURE
1005 # ifdef wxABORT_ON_CONFIG_ERROR
1006 # error "DocView requires wxUSE_MENUS"
1009 # define wxUSE_MENUS 1
1012 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1015 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1016 # ifdef wxABORT_ON_CONFIG_ERROR
1017 # error "wxFileDialog must be compiled as well"
1019 # undef wxUSE_FILEDLG
1020 # define wxUSE_FILEDLG 1
1023 #endif /* wxUSE_FILEDLG */
1026 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1027 # ifdef wxABORT_ON_CONFIG_ERROR
1028 # error "wxImageList must be compiled as well"
1030 # undef wxUSE_IMAGLIST
1031 # define wxUSE_IMAGLIST 1
1034 #endif /* !wxUSE_IMAGLIST */
1037 # ifdef wxABORT_ON_CONFIG_ERROR
1038 /* FIXME: should compile without it, of course, but doesn't */
1039 # error "wxMessageBox is always needed"
1041 # undef wxUSE_MSGDLG
1042 # define wxUSE_MSGDLG 1
1047 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1048 # ifdef wxABORT_ON_CONFIG_ERROR
1049 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1051 # undef wxUSE_RADIOBTN
1052 # undef wxUSE_STATBOX
1053 # define wxUSE_RADIOBTN 1
1054 # define wxUSE_STATBOX 1
1057 #endif /* wxUSE_RADIOBOX */
1060 # if !wxUSE_TEXTCTRL
1061 # ifdef wxABORT_ON_CONFIG_ERROR
1062 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1064 # undef wxUSE_TEXTCTRL
1065 # define wxUSE_TEXTCTRL 1
1068 #endif /* wxUSE_LOGWINDOW */
1070 #if wxUSE_LOG_DIALOG
1071 # if !wxUSE_LISTCTRL
1072 # ifdef wxABORT_ON_CONFIG_ERROR
1073 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1075 # undef wxUSE_LISTCTRL
1076 # define wxUSE_LISTCTRL 1
1079 #endif /* wxUSE_LOG_DIALOG */
1081 /* I wonder if we shouldn't just remove all occurrences of
1082 wxUSE_DYNAMIC_CLASSES from the sources? */
1083 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
1084 # ifdef wxABORT_ON_CONFIG_ERROR
1085 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
1087 # undef wxUSE_DYNAMIC_CLASSES
1088 # define wxUSE_DYNAMIC_CLASSES 1
1090 #endif /* wxUSE_DYNAMIC_CLASSES */
1092 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1093 # ifdef wxABORT_ON_CONFIG_ERROR
1094 # error "wxClipboard requires wxDataObject"
1096 # undef wxUSE_DATAOBJ
1097 # define wxUSE_DATAOBJ 1
1099 #endif /* wxUSE_CLIPBOARD */
1101 #endif /* wxUSE_GUI */