]>
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_IMAGLIST
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_IMAGLIST must be defined."
355 # define wxUSE_IMAGLIST 0
357 #endif /* !defined(wxUSE_IMAGLIST) */
359 #ifndef wxUSE_JOYSTICK
360 # ifdef wxABORT_ON_CONFIG_ERROR
361 # error "wxUSE_JOYSTICK must be defined."
363 # define wxUSE_JOYSTICK 0
365 #endif /* !defined(wxUSE_JOYSTICK) */
367 #ifndef wxUSE_LISTBOX
368 # ifdef wxABORT_ON_CONFIG_ERROR
369 # error "wxUSE_LISTBOX must be defined."
371 # define wxUSE_LISTBOX 0
373 #endif /* !defined(wxUSE_LISTBOX) */
375 #ifndef wxUSE_LISTCTRL
376 # ifdef wxABORT_ON_CONFIG_ERROR
377 # error "wxUSE_LISTCTRL must be defined."
379 # define wxUSE_LISTCTRL 0
381 #endif /* !defined(wxUSE_LISTCTRL) */
384 # ifdef wxABORT_ON_CONFIG_ERROR
385 # error "wxUSE_LOGGUI must be defined."
387 # define wxUSE_LOGGUI 0
389 #endif /* !defined(wxUSE_LOGGUI) */
391 #ifndef wxUSE_LOGWINDOW
392 # ifdef wxABORT_ON_CONFIG_ERROR
393 # error "wxUSE_LOGWINDOW must be defined."
395 # define wxUSE_LOGWINDOW 0
397 #endif /* !defined(wxUSE_LOGWINDOW) */
399 #ifndef wxUSE_LOG_DIALOG
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxUSE_LOG_DIALOG must be defined."
403 # define wxUSE_LOG_DIALOG 0
405 #endif /* !defined(wxUSE_LOG_DIALOG) */
407 #ifndef wxUSE_MDI_ARCHITECTURE
408 # ifdef wxABORT_ON_CONFIG_ERROR
409 # error "wxUSE_MDI_ARCHITECTURE must be defined."
411 # define wxUSE_MDI_ARCHITECTURE 0
413 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
416 # ifdef wxABORT_ON_CONFIG_ERROR
417 # error "wxUSE_MENUS must be defined."
419 # define wxUSE_MENUS 0
421 #endif /* !defined(wxUSE_MENUS) */
424 # ifdef wxABORT_ON_CONFIG_ERROR
425 # error "wxUSE_MSGDLG must be defined."
427 # define wxUSE_MSGDLG 0
429 #endif /* !defined(wxUSE_MSGDLG) */
431 #ifndef wxUSE_NEW_GRID
432 # ifdef wxABORT_ON_CONFIG_ERROR
433 # error "wxUSE_NEW_GRID must be defined."
435 # define wxUSE_NEW_GRID 0
437 #endif /* !defined(wxUSE_NEW_GRID) */
439 #ifndef wxUSE_NOTEBOOK
440 # ifdef wxABORT_ON_CONFIG_ERROR
441 # error "wxUSE_NOTEBOOK must be defined."
443 # define wxUSE_NOTEBOOK 0
445 #endif /* !defined(wxUSE_NOTEBOOK) */
447 #ifndef wxUSE_PALETTE
448 # ifdef wxABORT_ON_CONFIG_ERROR
449 # error "wxUSE_PALETTE must be defined."
451 # define wxUSE_PALETTE 0
453 #endif /* !defined(wxUSE_PALETTE) */
455 #ifndef wxUSE_POPUPWIN
456 # ifdef wxABORT_ON_CONFIG_ERROR
457 # error "wxUSE_POPUPWIN must be defined."
459 # define wxUSE_POPUPWIN 0
461 #endif /* !defined(wxUSE_POPUPWIN) */
463 #ifndef wxUSE_PRINTING_ARCHITECTURE
464 # ifdef wxABORT_ON_CONFIG_ERROR
465 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
467 # define wxUSE_PRINTING_ARCHITECTURE 0
469 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
471 #ifndef wxUSE_RADIOBOX
472 # ifdef wxABORT_ON_CONFIG_ERROR
473 # error "wxUSE_RADIOBOX must be defined."
475 # define wxUSE_RADIOBOX 0
477 #endif /* !defined(wxUSE_RADIOBOX) */
479 #ifndef wxUSE_RADIOBTN
480 # ifdef wxABORT_ON_CONFIG_ERROR
481 # error "wxUSE_RADIOBTN must be defined."
483 # define wxUSE_RADIOBTN 0
485 #endif /* !defined(wxUSE_RADIOBTN) */
488 # ifdef wxABORT_ON_CONFIG_ERROR
489 # error "wxUSE_SASH must be defined."
491 # define wxUSE_SASH 0
493 #endif /* !defined(wxUSE_SASH) */
495 #ifndef wxUSE_SCROLLBAR
496 # ifdef wxABORT_ON_CONFIG_ERROR
497 # error "wxUSE_SCROLLBAR must be defined."
499 # define wxUSE_SCROLLBAR 0
501 #endif /* !defined(wxUSE_SCROLLBAR) */
504 # ifdef wxABORT_ON_CONFIG_ERROR
505 # error "wxUSE_SLIDER must be defined."
507 # define wxUSE_SLIDER 0
509 #endif /* !defined(wxUSE_SLIDER) */
511 #ifndef wxUSE_SPINBTN
512 # ifdef wxABORT_ON_CONFIG_ERROR
513 # error "wxUSE_SPINBTN must be defined."
515 # define wxUSE_SPINBTN 0
517 #endif /* !defined(wxUSE_SPINBTN) */
519 #ifndef wxUSE_SPINCTRL
520 # ifdef wxABORT_ON_CONFIG_ERROR
521 # error "wxUSE_SPINCTRL must be defined."
523 # define wxUSE_SPINCTRL 0
525 #endif /* !defined(wxUSE_SPINCTRL) */
528 # ifdef wxABORT_ON_CONFIG_ERROR
529 # error "wxUSE_SPLASH must be defined."
531 # define wxUSE_SPLASH 0
533 #endif /* !defined(wxUSE_SPLASH) */
535 #ifndef wxUSE_SPLITTER
536 # ifdef wxABORT_ON_CONFIG_ERROR
537 # error "wxUSE_SPLITTER must be defined."
539 # define wxUSE_SPLITTER 0
541 #endif /* !defined(wxUSE_SPLITTER) */
543 #ifndef wxUSE_STATBMP
544 # ifdef wxABORT_ON_CONFIG_ERROR
545 # error "wxUSE_STATBMP must be defined."
547 # define wxUSE_STATBMP 0
549 #endif /* !defined(wxUSE_STATBMP) */
551 #ifndef wxUSE_STATBOX
552 # ifdef wxABORT_ON_CONFIG_ERROR
553 # error "wxUSE_STATBOX must be defined."
555 # define wxUSE_STATBOX 0
557 #endif /* !defined(wxUSE_STATBOX) */
559 #ifndef wxUSE_STATLINE
560 # ifdef wxABORT_ON_CONFIG_ERROR
561 # error "wxUSE_STATLINE must be defined."
563 # define wxUSE_STATLINE 0
565 #endif /* !defined(wxUSE_STATLINE) */
567 #ifndef wxUSE_STATTEXT
568 # ifdef wxABORT_ON_CONFIG_ERROR
569 # error "wxUSE_STATTEXT must be defined."
571 # define wxUSE_STATTEXT 0
573 #endif /* !defined(wxUSE_STATTEXT) */
575 #ifndef wxUSE_STATUSBAR
576 # ifdef wxABORT_ON_CONFIG_ERROR
577 # error "wxUSE_STATUSBAR must be defined."
579 # define wxUSE_STATUSBAR 0
581 #endif /* !defined(wxUSE_STATUSBAR) */
583 #ifndef wxUSE_TAB_DIALOG
584 # ifdef wxABORT_ON_CONFIG_ERROR
585 # error "wxUSE_TAB_DIALOG must be defined."
587 # define wxUSE_TAB_DIALOG 0
589 #endif /* !defined(wxUSE_TAB_DIALOG) */
591 #ifndef wxUSE_TEXTCTRL
592 # ifdef wxABORT_ON_CONFIG_ERROR
593 # error "wxUSE_TEXTCTRL must be defined."
595 # define wxUSE_TEXTCTRL 0
597 #endif /* !defined(wxUSE_TEXTCTRL) */
599 #ifndef wxUSE_TIPWINDOW
600 # ifdef wxABORT_ON_CONFIG_ERROR
601 # error "wxUSE_TIPWINDOW must be defined."
603 # define wxUSE_TIPWINDOW 0
605 #endif /* !defined(wxUSE_TIPWINDOW) */
607 #ifndef wxUSE_TOOLBAR
608 # ifdef wxABORT_ON_CONFIG_ERROR
609 # error "wxUSE_TOOLBAR must be defined."
611 # define wxUSE_TOOLBAR 0
613 #endif /* !defined(wxUSE_TOOLBAR) */
615 #ifndef wxUSE_TOOLTIPS
616 # ifdef wxABORT_ON_CONFIG_ERROR
617 # error "wxUSE_TOOLTIPS must be defined."
619 # define wxUSE_TOOLTIPS 0
621 #endif /* !defined(wxUSE_TOOLTIPS) */
623 #ifndef wxUSE_TREECTRL
624 # ifdef wxABORT_ON_CONFIG_ERROR
625 # error "wxUSE_TREECTRL must be defined."
627 # define wxUSE_TREECTRL 0
629 #endif /* !defined(wxUSE_TREECTRL) */
631 #ifndef wxUSE_WXHTML_HELP
632 # ifdef wxABORT_ON_CONFIG_ERROR
633 # error "wxUSE_WXHTML_HELP must be defined."
635 # define wxUSE_WXHTML_HELP 0
637 #endif /* !defined(wxUSE_WXHTML_HELP) */
639 #endif /* wxUSE_GUI */
642 check consistency of the settings
645 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
647 # ifdef wxABORT_ON_CONFIG_ERROR
648 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
650 # undef wxUSE_PROTOCOL
651 # define wxUSE_PROTOCOL 1
654 #endif /* wxUSE_PROTOCOL_XXX */
658 # ifdef wxABORT_ON_CONFIG_ERROR
659 # error "wxUSE_URL requires wxUSE_PROTOCOL"
661 # undef wxUSE_PROTOCOL
662 # define wxUSE_PROTOCOL 1
665 #endif /* wxUSE_URL */
669 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
670 # ifdef wxABORT_ON_CONFIG_ERROR
671 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
673 # undef wxUSE_SOCKETS
674 # define wxUSE_SOCKETS 1
680 # ifdef wxABORT_ON_CONFIG_ERROR
681 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
683 # undef wxUSE_STREAMS
684 # define wxUSE_STREAMS 1
687 #endif /* wxUSE_PROTOCOL */
689 /* non GUI settings */
692 # ifdef wxABORT_ON_CONFIG_ERROR
693 # error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
695 # undef wxUSE_LONGLONG
696 # define wxUSE_LONGLONG 1
699 #endif /* wxUSE_STOPWATCH */
701 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
702 # ifdef wxABORT_ON_CONFIG_ERROR
703 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
705 # undef wxUSE_TEXTFILE
706 # define wxUSE_TEXTFILE 1
708 #endif /* wxUSE_MIMETYPE */
710 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
711 # ifdef wxABORT_ON_CONFIG_ERROR
712 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
714 # undef wxUSE_TEXTBUFFER
715 # define wxUSE_TEXTBUFFER 1
717 #endif /* wxUSE_TEXTFILE */
719 #if wxUSE_TEXTFILE && !wxUSE_FILE
720 # ifdef wxABORT_ON_CONFIG_ERROR
721 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
724 # define wxUSE_FILE 1
726 #endif /* wxUSE_TEXTFILE */
728 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
729 # ifdef wxABORT_ON_CONFIG_ERROR
730 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
732 # undef wxUSE_UNICODE
733 # define wxUSE_UNICODE 1
735 #endif /* wxUSE_UNICODE_MSLU */
737 /* the rest of the tests is for the GUI settings only */
740 #if wxUSE_BUTTON || \
741 wxUSE_CALENDARCTRL || \
746 wxUSE_CHECKLISTBOX || \
769 # ifdef wxABORT_ON_CONFIG_ERROR
770 # error "wxUSE_CONTROLS unset but some controls used"
772 # undef wxUSE_CONTROLS
773 # define wxUSE_CONTROLS 1
776 #endif /* controls */
778 /* wxUniv-specific dependencies */
779 #if defined(__WXUNIVERSAL__)
780 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
781 # ifdef wxABORT_ON_CONFIG_ERROR
782 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
784 # undef wxUSE_POPUPWIN
785 # define wxUSE_POPUPWIN 1
791 # ifdef wxABORT_ON_CONFIG_ERROR
792 # error "wxComboBox requires wxListBox in wxUniversal"
794 # undef wxUSE_LISTBOX
795 # define wxUSE_LISTBOX 1
798 # endif /* wxUSE_COMBOBOX */
802 # ifdef wxABORT_ON_CONFIG_ERROR
803 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
805 # undef wxUSE_CHECKBOX
806 # define wxUSE_CHECKBOX 1
809 # endif /* wxUSE_RADIOBTN */
813 # ifdef wxABORT_ON_CONFIG_ERROR
814 # error "wxTextCtrl requires wxCaret in wxUniversal"
817 # define wxUSE_CARET 1
819 # endif /* wxUSE_CARET */
821 # if !wxUSE_SCROLLBAR
822 # ifdef wxABORT_ON_CONFIG_ERROR
823 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
825 # undef wxUSE_SCROLLBAR
826 # define wxUSE_SCROLLBAR 1
828 # endif /* wxUSE_SCROLLBAR */
829 # endif /* wxUSE_TEXTCTRL */
830 #endif /* __WXUNIVERSAL__ */
832 /* wxGTK-specific dependencies */
834 # ifndef __WXUNIVERSAL__
835 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
836 # ifdef wxABORT_ON_CONFIG_ERROR
837 # error "MDI requires wxUSE_MENUS in wxGTK"
840 # define wxUSE_MENUS 1
843 # endif /* !__WXUNIVERSAL__ */
847 # ifdef wxABORT_ON_CONFIG_ERROR
848 # error "wxJoystick requires threads in wxGTK"
850 # undef wxUSE_JOYSTICK
851 # define wxUSE_JOYSTICK 0
855 #endif /* wxGTK && !wxUniv */
857 /* wxMSW-specific dependencies */
859 # ifndef wxUSE_UNICODE_MSLU
860 # ifdef wxABORT_ON_CONFIG_ERROR
861 # error "wxUSE_UNICODE_MSLU must be defined."
863 # define wxUSE_UNICODE_MSLU 0
865 # endif /* wxUSE_UNICODE_MSLU */
866 # ifndef wxUSE_MS_HTML_HELP
867 # ifdef wxABORT_ON_CONFIG_ERROR
868 # error "wxUSE_MS_HTML_HELP must be defined."
870 # define wxUSE_MS_HTML_HELP 0
872 # endif /* !defined(wxUSE_MS_HTML_HELP) */
873 # ifndef wxUSE_DIALUP_MANAGER
874 # ifdef wxABORT_ON_CONFIG_ERROR
875 # error "wxUSE_DIALUP_MANAGER must be defined."
877 # define wxUSE_DIALUP_MANAGER 0
879 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
881 # if !wxUSE_DYNAMIC_LOADER
882 # if wxUSE_MS_HTML_HELP
883 # ifdef wxABORT_ON_CONFIG_ERROR
884 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
886 # define wxUSE_DYNAMIC_LOADER 1
889 # if wxUSE_DIALUP_MANAGER
890 # ifdef wxABORT_ON_CONFIG_ERROR
891 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
893 # define wxUSE_DYNAMIC_LOADER 1
896 # endif /* wxUSE_DYNAMIC_LOADER */
899 /* wxMotif-specific dependencies */
900 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
901 # undef wxUSE_TAB_DIALOG
902 # define wxUSE_TAB_DIALOG 1
904 #if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
905 # undef wxUSE_TOGGLEBTN
906 # define wxUSE_TOGGLEBTN 0
909 /* generic controls dependencies */
910 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
911 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
912 /* all common controls are needed by these dialogs */
913 # if !defined(wxUSE_CHOICE) || \
914 !defined(wxUSE_TEXTCTRL) || \
915 !defined(wxUSE_BUTTON) || \
916 !defined(wxUSE_CHECKBOX) || \
917 !defined(wxUSE_STATTEXT)
918 # ifdef wxABORT_ON_CONFIG_ERROR
919 # error "These common controls are needed by common dialogs"
922 # define wxUSE_CHOICE 1
923 # undef wxUSE_TEXTCTRL
924 # define wxUSE_TEXTCTRL 1
926 # define wxUSE_BUTTON 1
927 # undef wxUSE_CHECKBOX
928 # define wxUSE_CHECKBOX 1
929 # undef wxUSE_STATTEXT
930 # define wxUSE_STATTEXT 1
934 #endif /* !wxMSW || wxUniv */
936 /* common dependencies */
937 #if wxUSE_CALENDARCTRL
938 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
939 # ifdef wxABORT_ON_CONFIG_ERROR
940 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
942 # undef wxUSE_SPINBTN
943 # undef wxUSE_COMBOBOX
944 # define wxUSE_SPINBTN 1
945 # define wxUSE_COMBOBOX 1
948 #endif /* wxUSE_CALENDARCTRL */
950 #if wxUSE_CHECKLISTBOX
952 # ifdef wxABORT_ON_CONFIG_ERROR
953 # error "wxCheckListBox requires wxListBox"
955 # undef wxUSE_LISTBOX
956 # define wxUSE_LISTBOX 1
959 #endif /* wxUSE_RADIOBTN */
961 #if wxUSE_WXHTML_HELP
962 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX
963 # ifdef wxABORT_ON_CONFIG_ERROR
964 # error "Built in help controller can't be compiled"
967 # define wxUSE_HELP 1
969 # define wxUSE_HTML 1
970 # undef wxUSE_COMBOBOX
971 # define wxUSE_COMBOBOX 1
974 #endif /* wxUSE_WXHTML_HELP */
976 #if wxUSE_PRINTING_ARCHITECTURE
978 # ifdef wxABORT_ON_CONFIG_ERROR
979 # error "Print dialog requires wxUSE_COMBOBOX"
981 # undef wxUSE_COMBOBOX
982 # define wxUSE_COMBOBOX 1
985 #endif /* wxUSE_PRINTING_ARCHITECTURE */
987 #if wxUSE_DOC_VIEW_ARCHITECTURE
989 # ifdef wxABORT_ON_CONFIG_ERROR
990 # error "DocView requires wxUSE_MENUS"
993 # define wxUSE_MENUS 1
996 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
999 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1000 # ifdef wxABORT_ON_CONFIG_ERROR
1001 # error "wxFileDialog must be compiled as well"
1003 # undef wxUSE_FILEDLG
1004 # define wxUSE_FILEDLG 1
1007 #endif /* wxUSE_FILEDLG */
1010 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1011 # ifdef wxABORT_ON_CONFIG_ERROR
1012 # error "wxImageList must be compiled as well"
1014 # undef wxUSE_IMAGLIST
1015 # define wxUSE_IMAGLIST 1
1018 #endif /* !wxUSE_IMAGLIST */
1021 # ifdef wxABORT_ON_CONFIG_ERROR
1022 /* FIXME: should compile without it, of course, but doesn't */
1023 # error "wxMessageBox is always needed"
1025 # undef wxUSE_MSGDLG
1026 # define wxUSE_MSGDLG 1
1031 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1032 # ifdef wxABORT_ON_CONFIG_ERROR
1033 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1035 # undef wxUSE_RADIOBTN
1036 # undef wxUSE_STATBOX
1037 # define wxUSE_RADIOBTN 1
1038 # define wxUSE_STATBOX 1
1041 #endif /* wxUSE_RADIOBOX */
1044 # if !wxUSE_TEXTCTRL
1045 # ifdef wxABORT_ON_CONFIG_ERROR
1046 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1048 # undef wxUSE_TEXTCTRL
1049 # define wxUSE_TEXTCTRL 1
1052 #endif /* wxUSE_LOGWINDOW */
1054 #if wxUSE_LOG_DIALOG
1055 # if !wxUSE_LISTCTRL
1056 # ifdef wxABORT_ON_CONFIG_ERROR
1057 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1059 # undef wxUSE_LISTCTRL
1060 # define wxUSE_LISTCTRL 1
1063 #endif /* wxUSE_LOG_DIALOG */
1065 /* I wonder if we shouldn't just remove all occurrences of
1066 wxUSE_DYNAMIC_CLASSES from the sources? */
1067 #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES
1068 # ifdef wxABORT_ON_CONFIG_ERROR
1069 # error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
1071 # undef wxUSE_DYNAMIC_CLASSES
1072 # define wxUSE_DYNAMIC_CLASSES 1
1074 #endif /* wxUSE_DYNAMIC_CLASSES */
1076 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1077 # ifdef wxABORT_ON_CONFIG_ERROR
1078 # error "wxClipboard requires wxDataObject"
1080 # undef wxUSE_DATAOBJ
1081 # define wxUSE_DATAOBJ 1
1083 #endif /* wxUSE_CLIPBOARD */
1085 #endif /* wxUSE_GUI */