]> git.saurik.com Git - wxWidgets.git/blob - include/wx/chkconf.h
bracketed include def for CW nothrow flag for MAKINGDLL only
[wxWidgets.git] / include / wx / chkconf.h
1 /*
2 * Name: wx/chkconf.h
3 * Purpose: check the config settings for consistency
4 * Author: Vadim Zeitlin
5 * Modified by:
6 * Created: 09.08.00
7 * RCS-ID: $Id$
8 * Copyright: (c) 2000 Vadim Zeitlin <vadim@wxwindows.org>
9 * Licence: wxWindows license
10 */
11
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
13
14 /*
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
18 developpers only)
19 */
20 #define wxABORT_ON_CONFIG_ERROR
21
22
23 /*
24 tests for non GUI features
25 */
26
27 #ifndef wxUSE_DYNLIB_CLASS
28 # ifdef wxABORT_ON_CONFIG_ERROR
29 # error "wxUSE_DYNLIB_CLASS must be defined."
30 # else
31 # define wxUSE_DYNLIB_CLASS 0
32 # endif
33 #endif /* !defined(wxUSE_DYNLIB_CLASS) */
34
35 #ifndef wxUSE_DYNAMIC_LOADER
36 # ifdef wxABORT_ON_CONFIG_ERROR
37 # error "wxUSE_DYNAMIC_LOADER must be defined."
38 # else
39 # define wxUSE_DYNAMIC_LOADER 0
40 # endif
41 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
42
43 #ifndef wxUSE_LOG
44 # ifdef wxABORT_ON_CONFIG_ERROR
45 # error "wxUSE_LOG must be defined."
46 # else
47 # define wxUSE_LOG 0
48 # endif
49 #endif /* !defined(wxUSE_LOG) */
50
51 #ifndef wxUSE_LONGLONG
52 # ifdef wxABORT_ON_CONFIG_ERROR
53 # error "wxUSE_LONGLONG must be defined."
54 # else
55 # define wxUSE_LONGLONG 0
56 # endif
57 #endif /* !defined(wxUSE_LONGLONG) */
58
59 #ifndef wxUSE_MIMETYPE
60 # ifdef wxABORT_ON_CONFIG_ERROR
61 # error "wxUSE_MIMETYPE must be defined."
62 # else
63 # define wxUSE_MIMETYPE 0
64 # endif
65 #endif /* !defined(wxUSE_MIMETYPE) */
66
67 #ifndef wxUSE_PROTOCOL
68 # ifdef wxABORT_ON_CONFIG_ERROR
69 # error "wxUSE_PROTOCOL must be defined."
70 # else
71 # define wxUSE_PROTOCOL 0
72 # endif
73 #endif /* !defined(wxUSE_PROTOCOL) */
74
75 /* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
76 #if !wxUSE_PROTOCOL
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 */
84
85 #ifndef wxUSE_PROTOCOL_HTTP
86 # ifdef wxABORT_ON_CONFIG_ERROR
87 # error "wxUSE_PROTOCOL_HTTP must be defined."
88 # else
89 # define wxUSE_PROTOCOL_HTTP 0
90 # endif
91 #endif /* !defined(wxUSE_PROTOCOL_HTTP) */
92
93 #ifndef wxUSE_PROTOCOL_FTP
94 # ifdef wxABORT_ON_CONFIG_ERROR
95 # error "wxUSE_PROTOCOL_FTP must be defined."
96 # else
97 # define wxUSE_PROTOCOL_FTP 0
98 # endif
99 #endif /* !defined(wxUSE_PROTOCOL_FTP) */
100
101 #ifndef wxUSE_PROTOCOL_FILE
102 # ifdef wxABORT_ON_CONFIG_ERROR
103 # error "wxUSE_PROTOCOL_FILE must be defined."
104 # else
105 # define wxUSE_PROTOCOL_FILE 0
106 # endif
107 #endif /* !defined(wxUSE_PROTOCOL_FILE) */
108
109 #ifndef wxUSE_REGEX
110 # ifdef wxABORT_ON_CONFIG_ERROR
111 # error "wxUSE_REGEX must be defined."
112 # else
113 # define wxUSE_REGEX 0
114 # endif
115 #endif /* !defined(wxUSE_REGEX) */
116
117 #ifndef wxUSE_SOCKETS
118 # ifdef wxABORT_ON_CONFIG_ERROR
119 # error "wxUSE_SOCKETS must be defined."
120 # else
121 # define wxUSE_SOCKETS 0
122 # endif
123 #endif /* !defined(wxUSE_SOCKETS) */
124
125 #ifndef wxUSE_STREAMS
126 # ifdef wxABORT_ON_CONFIG_ERROR
127 # error "wxUSE_STREAMS must be defined."
128 # else
129 # define wxUSE_STREAMS 0
130 # endif
131 #endif /* !defined(wxUSE_STREAMS) */
132
133 #ifndef wxUSE_STOPWATCH
134 # ifdef wxABORT_ON_CONFIG_ERROR
135 # error "wxUSE_STOPWATCH must be defined."
136 # else
137 # define wxUSE_STOPWATCH 0
138 # endif
139 #endif /* !defined(wxUSE_STOPWATCH) */
140
141 #ifndef wxUSE_TEXTBUFFER
142 # ifdef wxABORT_ON_CONFIG_ERROR
143 # error "wxUSE_TEXTBUFFER must be defined."
144 # else
145 # define wxUSE_TEXTBUFFER 0
146 # endif
147 #endif /* !defined(wxUSE_TEXTBUFFER) */
148
149 #ifndef wxUSE_TEXTFILE
150 # ifdef wxABORT_ON_CONFIG_ERROR
151 # error "wxUSE_TEXTFILE must be defined."
152 # else
153 # define wxUSE_TEXTFILE 0
154 # endif
155 #endif /* !defined(wxUSE_TEXTFILE) */
156
157 #ifndef wxUSE_UNICODE
158 # ifdef wxABORT_ON_CONFIG_ERROR
159 # error "wxUSE_UNICODE must be defined."
160 # else
161 # define wxUSE_UNICODE 0
162 # endif
163 #endif /* !defined(wxUSE_UNICODE) */
164
165 #ifndef wxUSE_URL
166 # ifdef wxABORT_ON_CONFIG_ERROR
167 # error "wxUSE_URL must be defined."
168 # else
169 # define wxUSE_URL 0
170 # endif
171 #endif /* !defined(wxUSE_URL) */
172
173 /*
174 all these tests are for GUI only
175 */
176 #if wxUSE_GUI
177
178 /*
179 all of the settings tested below must be defined or we'd get an error from
180 preprocessor about invalid integer expression
181 */
182
183 #ifndef wxUSE_ACCEL
184 # ifdef wxABORT_ON_CONFIG_ERROR
185 # error "wxUSE_ACCEL must be defined."
186 # else
187 # define wxUSE_ACCEL 0
188 # endif
189 #endif /* !defined(wxUSE_ACCEL) */
190
191 #ifndef wxUSE_BMPBUTTON
192 # ifdef wxABORT_ON_CONFIG_ERROR
193 # error "wxUSE_BMPBUTTON must be defined."
194 # else
195 # define wxUSE_BMPBUTTON 0
196 # endif
197 #endif /* !defined(wxUSE_BMPBUTTON) */
198
199 #ifndef wxUSE_BUTTON
200 # ifdef wxABORT_ON_CONFIG_ERROR
201 # error "wxUSE_BUTTON must be defined."
202 # else
203 # define wxUSE_BUTTON 0
204 # endif
205 #endif /* !defined(wxUSE_BUTTON) */
206
207 #ifndef wxUSE_CALENDARCTRL
208 # ifdef wxABORT_ON_CONFIG_ERROR
209 # error "wxUSE_CALENDARCTRL must be defined."
210 # else
211 # define wxUSE_CALENDARCTRL 0
212 # endif
213 #endif /* !defined(wxUSE_CALENDARCTRL) */
214
215 #ifndef wxUSE_CARET
216 # ifdef wxABORT_ON_CONFIG_ERROR
217 # error "wxUSE_CARET must be defined."
218 # else
219 # define wxUSE_CARET 0
220 # endif
221 #endif /* !defined(wxUSE_CARET) */
222
223 #ifndef wxUSE_CHECKBOX
224 # ifdef wxABORT_ON_CONFIG_ERROR
225 # error "wxUSE_CHECKBOX must be defined."
226 # else
227 # define wxUSE_CHECKBOX 0
228 # endif
229 #endif /* !defined(wxUSE_CHECKBOX) */
230
231 #ifndef wxUSE_CHECKLISTBOX
232 # ifdef wxABORT_ON_CONFIG_ERROR
233 # error "wxUSE_CHECKLISTBOX must be defined."
234 # else
235 # define wxUSE_CHECKLISTBOX 0
236 # endif
237 #endif /* !defined(wxUSE_CHECKLISTBOX) */
238
239 #ifndef wxUSE_CHOICE
240 # ifdef wxABORT_ON_CONFIG_ERROR
241 # error "wxUSE_CHOICE must be defined."
242 # else
243 # define wxUSE_CHOICE 0
244 # endif
245 #endif /* !defined(wxUSE_CHOICE) */
246
247 #ifndef wxUSE_CHOICEDLG
248 # ifdef wxABORT_ON_CONFIG_ERROR
249 # error "wxUSE_CHOICEDLG must be defined."
250 # else
251 # define wxUSE_CHOICEDLG 0
252 # endif
253 #endif /* !defined(wxUSE_CHOICEDLG) */
254
255 #ifndef wxUSE_CLIPBOARD
256 # ifdef wxABORT_ON_CONFIG_ERROR
257 # error "wxUSE_CLIPBOARD must be defined."
258 # else
259 # define wxUSE_CLIPBOARD 0
260 # endif
261 #endif /* !defined(wxUSE_CLIPBOARD) */
262
263 #ifndef wxUSE_COLOURDLG
264 # ifdef wxABORT_ON_CONFIG_ERROR
265 # error "wxUSE_COLOURDLG must be defined."
266 # else
267 # define wxUSE_COLOURDLG 0
268 # endif
269 #endif /* !defined(wxUSE_COLOURDLG) */
270
271 #ifndef wxUSE_COMBOBOX
272 # ifdef wxABORT_ON_CONFIG_ERROR
273 # error "wxUSE_COMBOBOX must be defined."
274 # else
275 # define wxUSE_COMBOBOX 0
276 # endif
277 #endif /* !defined(wxUSE_COMBOBOX) */
278
279 #ifndef wxUSE_DATAOBJ
280 # ifdef wxABORT_ON_CONFIG_ERROR
281 # error "wxUSE_DATAOBJ must be defined."
282 # else
283 # define wxUSE_DATAOBJ 0
284 # endif
285 #endif /* !defined(wxUSE_DATAOBJ) */
286
287 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
288 # ifdef wxABORT_ON_CONFIG_ERROR
289 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
290 # else
291 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
292 # endif
293 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
294
295 #ifndef wxUSE_FILEDLG
296 # ifdef wxABORT_ON_CONFIG_ERROR
297 # error "wxUSE_FILEDLG must be defined."
298 # else
299 # define wxUSE_FILEDLG 0
300 # endif
301 #endif /* !defined(wxUSE_FILEDLG) */
302
303 #ifndef wxUSE_FONTDLG
304 # ifdef wxABORT_ON_CONFIG_ERROR
305 # error "wxUSE_FONTDLG must be defined."
306 # else
307 # define wxUSE_FONTDLG 0
308 # endif
309 #endif /* !defined(wxUSE_FONTDLG) */
310
311 #ifndef wxUSE_FONTMAP
312 # ifdef wxABORT_ON_CONFIG_ERROR
313 # error "wxUSE_FONTMAP must be defined."
314 # else
315 # define wxUSE_FONTMAP 0
316 # endif
317 #endif /* !defined(wxUSE_FONTMAP) */
318
319 #ifndef wxUSE_GAUGE
320 # ifdef wxABORT_ON_CONFIG_ERROR
321 # error "wxUSE_GAUGE must be defined."
322 # else
323 # define wxUSE_GAUGE 0
324 # endif
325 #endif /* !defined(wxUSE_GAUGE) */
326
327 #ifndef wxUSE_GRID
328 # ifdef wxABORT_ON_CONFIG_ERROR
329 # error "wxUSE_GRID must be defined."
330 # else
331 # define wxUSE_GRID 0
332 # endif
333 #endif /* !defined(wxUSE_GRID) */
334
335 #ifndef wxUSE_HELP
336 # ifdef wxABORT_ON_CONFIG_ERROR
337 # error "wxUSE_HELP must be defined."
338 # else
339 # define wxUSE_HELP 0
340 # endif
341 #endif /* !defined(wxUSE_HELP) */
342
343 #ifndef wxUSE_HTML
344 # ifdef wxABORT_ON_CONFIG_ERROR
345 # error "wxUSE_HTML must be defined."
346 # else
347 # define wxUSE_HTML 0
348 # endif
349 #endif /* !defined(wxUSE_HTML) */
350
351 #ifndef wxUSE_ICO_CUR
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_ICO_CUR must be defined."
354 # else
355 # define wxUSE_ICO_CUR 0
356 # endif
357 #endif /* !defined(wxUSE_ICO_CUR) */
358
359 #ifndef wxUSE_IFF
360 # ifdef wxABORT_ON_CONFIG_ERROR
361 # error "wxUSE_IFF must be defined."
362 # else
363 # define wxUSE_IFF 0
364 # endif
365 #endif /* !defined(wxUSE_IFF) */
366
367 #ifndef wxUSE_IMAGLIST
368 # ifdef wxABORT_ON_CONFIG_ERROR
369 # error "wxUSE_IMAGLIST must be defined."
370 # else
371 # define wxUSE_IMAGLIST 0
372 # endif
373 #endif /* !defined(wxUSE_IMAGLIST) */
374
375 #ifndef wxUSE_JOYSTICK
376 # ifdef wxABORT_ON_CONFIG_ERROR
377 # error "wxUSE_JOYSTICK must be defined."
378 # else
379 # define wxUSE_JOYSTICK 0
380 # endif
381 #endif /* !defined(wxUSE_JOYSTICK) */
382
383 #ifndef wxUSE_LISTBOX
384 # ifdef wxABORT_ON_CONFIG_ERROR
385 # error "wxUSE_LISTBOX must be defined."
386 # else
387 # define wxUSE_LISTBOX 0
388 # endif
389 #endif /* !defined(wxUSE_LISTBOX) */
390
391 #ifndef wxUSE_LISTCTRL
392 # ifdef wxABORT_ON_CONFIG_ERROR
393 # error "wxUSE_LISTCTRL must be defined."
394 # else
395 # define wxUSE_LISTCTRL 0
396 # endif
397 #endif /* !defined(wxUSE_LISTCTRL) */
398
399 #ifndef wxUSE_LOGGUI
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxUSE_LOGGUI must be defined."
402 # else
403 # define wxUSE_LOGGUI 0
404 # endif
405 #endif /* !defined(wxUSE_LOGGUI) */
406
407 #ifndef wxUSE_LOGWINDOW
408 # ifdef wxABORT_ON_CONFIG_ERROR
409 # error "wxUSE_LOGWINDOW must be defined."
410 # else
411 # define wxUSE_LOGWINDOW 0
412 # endif
413 #endif /* !defined(wxUSE_LOGWINDOW) */
414
415 #ifndef wxUSE_LOG_DIALOG
416 # ifdef wxABORT_ON_CONFIG_ERROR
417 # error "wxUSE_LOG_DIALOG must be defined."
418 # else
419 # define wxUSE_LOG_DIALOG 0
420 # endif
421 #endif /* !defined(wxUSE_LOG_DIALOG) */
422
423 #ifndef wxUSE_MDI_ARCHITECTURE
424 # ifdef wxABORT_ON_CONFIG_ERROR
425 # error "wxUSE_MDI_ARCHITECTURE must be defined."
426 # else
427 # define wxUSE_MDI_ARCHITECTURE 0
428 # endif
429 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
430
431 #ifndef wxUSE_MENUS
432 # ifdef wxABORT_ON_CONFIG_ERROR
433 # error "wxUSE_MENUS must be defined."
434 # else
435 # define wxUSE_MENUS 0
436 # endif
437 #endif /* !defined(wxUSE_MENUS) */
438
439 #ifndef wxUSE_MSGDLG
440 # ifdef wxABORT_ON_CONFIG_ERROR
441 # error "wxUSE_MSGDLG must be defined."
442 # else
443 # define wxUSE_MSGDLG 0
444 # endif
445 #endif /* !defined(wxUSE_MSGDLG) */
446
447 #ifndef wxUSE_NEW_GRID
448 # ifdef wxABORT_ON_CONFIG_ERROR
449 # error "wxUSE_NEW_GRID must be defined."
450 # else
451 # define wxUSE_NEW_GRID 0
452 # endif
453 #endif /* !defined(wxUSE_NEW_GRID) */
454
455 #ifndef wxUSE_NOTEBOOK
456 # ifdef wxABORT_ON_CONFIG_ERROR
457 # error "wxUSE_NOTEBOOK must be defined."
458 # else
459 # define wxUSE_NOTEBOOK 0
460 # endif
461 #endif /* !defined(wxUSE_NOTEBOOK) */
462
463 #ifndef wxUSE_PALETTE
464 # ifdef wxABORT_ON_CONFIG_ERROR
465 # error "wxUSE_PALETTE must be defined."
466 # else
467 # define wxUSE_PALETTE 0
468 # endif
469 #endif /* !defined(wxUSE_PALETTE) */
470
471 #ifndef wxUSE_POPUPWIN
472 # ifdef wxABORT_ON_CONFIG_ERROR
473 # error "wxUSE_POPUPWIN must be defined."
474 # else
475 # define wxUSE_POPUPWIN 0
476 # endif
477 #endif /* !defined(wxUSE_POPUPWIN) */
478
479 #ifndef wxUSE_PRINTING_ARCHITECTURE
480 # ifdef wxABORT_ON_CONFIG_ERROR
481 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
482 # else
483 # define wxUSE_PRINTING_ARCHITECTURE 0
484 # endif
485 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
486
487 #ifndef wxUSE_RADIOBOX
488 # ifdef wxABORT_ON_CONFIG_ERROR
489 # error "wxUSE_RADIOBOX must be defined."
490 # else
491 # define wxUSE_RADIOBOX 0
492 # endif
493 #endif /* !defined(wxUSE_RADIOBOX) */
494
495 #ifndef wxUSE_RADIOBTN
496 # ifdef wxABORT_ON_CONFIG_ERROR
497 # error "wxUSE_RADIOBTN must be defined."
498 # else
499 # define wxUSE_RADIOBTN 0
500 # endif
501 #endif /* !defined(wxUSE_RADIOBTN) */
502
503 #ifndef wxUSE_SASH
504 # ifdef wxABORT_ON_CONFIG_ERROR
505 # error "wxUSE_SASH must be defined."
506 # else
507 # define wxUSE_SASH 0
508 # endif
509 #endif /* !defined(wxUSE_SASH) */
510
511 #ifndef wxUSE_SCROLLBAR
512 # ifdef wxABORT_ON_CONFIG_ERROR
513 # error "wxUSE_SCROLLBAR must be defined."
514 # else
515 # define wxUSE_SCROLLBAR 0
516 # endif
517 #endif /* !defined(wxUSE_SCROLLBAR) */
518
519 #ifndef wxUSE_SLIDER
520 # ifdef wxABORT_ON_CONFIG_ERROR
521 # error "wxUSE_SLIDER must be defined."
522 # else
523 # define wxUSE_SLIDER 0
524 # endif
525 #endif /* !defined(wxUSE_SLIDER) */
526
527 #ifndef wxUSE_SPINBTN
528 # ifdef wxABORT_ON_CONFIG_ERROR
529 # error "wxUSE_SPINBTN must be defined."
530 # else
531 # define wxUSE_SPINBTN 0
532 # endif
533 #endif /* !defined(wxUSE_SPINBTN) */
534
535 #ifndef wxUSE_SPINCTRL
536 # ifdef wxABORT_ON_CONFIG_ERROR
537 # error "wxUSE_SPINCTRL must be defined."
538 # else
539 # define wxUSE_SPINCTRL 0
540 # endif
541 #endif /* !defined(wxUSE_SPINCTRL) */
542
543 #ifndef wxUSE_SPLASH
544 # ifdef wxABORT_ON_CONFIG_ERROR
545 # error "wxUSE_SPLASH must be defined."
546 # else
547 # define wxUSE_SPLASH 0
548 # endif
549 #endif /* !defined(wxUSE_SPLASH) */
550
551 #ifndef wxUSE_SPLITTER
552 # ifdef wxABORT_ON_CONFIG_ERROR
553 # error "wxUSE_SPLITTER must be defined."
554 # else
555 # define wxUSE_SPLITTER 0
556 # endif
557 #endif /* !defined(wxUSE_SPLITTER) */
558
559 #ifndef wxUSE_STATBMP
560 # ifdef wxABORT_ON_CONFIG_ERROR
561 # error "wxUSE_STATBMP must be defined."
562 # else
563 # define wxUSE_STATBMP 0
564 # endif
565 #endif /* !defined(wxUSE_STATBMP) */
566
567 #ifndef wxUSE_STATBOX
568 # ifdef wxABORT_ON_CONFIG_ERROR
569 # error "wxUSE_STATBOX must be defined."
570 # else
571 # define wxUSE_STATBOX 0
572 # endif
573 #endif /* !defined(wxUSE_STATBOX) */
574
575 #ifndef wxUSE_STATLINE
576 # ifdef wxABORT_ON_CONFIG_ERROR
577 # error "wxUSE_STATLINE must be defined."
578 # else
579 # define wxUSE_STATLINE 0
580 # endif
581 #endif /* !defined(wxUSE_STATLINE) */
582
583 #ifndef wxUSE_STATTEXT
584 # ifdef wxABORT_ON_CONFIG_ERROR
585 # error "wxUSE_STATTEXT must be defined."
586 # else
587 # define wxUSE_STATTEXT 0
588 # endif
589 #endif /* !defined(wxUSE_STATTEXT) */
590
591 #ifndef wxUSE_STATUSBAR
592 # ifdef wxABORT_ON_CONFIG_ERROR
593 # error "wxUSE_STATUSBAR must be defined."
594 # else
595 # define wxUSE_STATUSBAR 0
596 # endif
597 #endif /* !defined(wxUSE_STATUSBAR) */
598
599 #ifndef wxUSE_TAB_DIALOG
600 # ifdef wxABORT_ON_CONFIG_ERROR
601 # error "wxUSE_TAB_DIALOG must be defined."
602 # else
603 # define wxUSE_TAB_DIALOG 0
604 # endif
605 #endif /* !defined(wxUSE_TAB_DIALOG) */
606
607 #ifndef wxUSE_TEXTCTRL
608 # ifdef wxABORT_ON_CONFIG_ERROR
609 # error "wxUSE_TEXTCTRL must be defined."
610 # else
611 # define wxUSE_TEXTCTRL 0
612 # endif
613 #endif /* !defined(wxUSE_TEXTCTRL) */
614
615 #ifndef wxUSE_TIPWINDOW
616 # ifdef wxABORT_ON_CONFIG_ERROR
617 # error "wxUSE_TIPWINDOW must be defined."
618 # else
619 # define wxUSE_TIPWINDOW 0
620 # endif
621 #endif /* !defined(wxUSE_TIPWINDOW) */
622
623 #ifndef wxUSE_TOOLBAR
624 # ifdef wxABORT_ON_CONFIG_ERROR
625 # error "wxUSE_TOOLBAR must be defined."
626 # else
627 # define wxUSE_TOOLBAR 0
628 # endif
629 #endif /* !defined(wxUSE_TOOLBAR) */
630
631 #ifndef wxUSE_TOOLTIPS
632 # ifdef wxABORT_ON_CONFIG_ERROR
633 # error "wxUSE_TOOLTIPS must be defined."
634 # else
635 # define wxUSE_TOOLTIPS 0
636 # endif
637 #endif /* !defined(wxUSE_TOOLTIPS) */
638
639 #ifndef wxUSE_TREECTRL
640 # ifdef wxABORT_ON_CONFIG_ERROR
641 # error "wxUSE_TREECTRL must be defined."
642 # else
643 # define wxUSE_TREECTRL 0
644 # endif
645 #endif /* !defined(wxUSE_TREECTRL) */
646
647 #ifndef wxUSE_WXHTML_HELP
648 # ifdef wxABORT_ON_CONFIG_ERROR
649 # error "wxUSE_WXHTML_HELP must be defined."
650 # else
651 # define wxUSE_WXHTML_HELP 0
652 # endif
653 #endif /* !defined(wxUSE_WXHTML_HELP) */
654
655 #endif /* wxUSE_GUI */
656
657 /*
658 check consistency of the settings
659 */
660
661 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
662 # if !wxUSE_PROTOCOL
663 # ifdef wxABORT_ON_CONFIG_ERROR
664 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
665 # else
666 # undef wxUSE_PROTOCOL
667 # define wxUSE_PROTOCOL 1
668 # endif
669 # endif
670 #endif /* wxUSE_PROTOCOL_XXX */
671
672 #if wxUSE_URL
673 # if !wxUSE_PROTOCOL
674 # ifdef wxABORT_ON_CONFIG_ERROR
675 # error "wxUSE_URL requires wxUSE_PROTOCOL"
676 # else
677 # undef wxUSE_PROTOCOL
678 # define wxUSE_PROTOCOL 1
679 # endif
680 # endif
681 #endif /* wxUSE_URL */
682
683 #if wxUSE_PROTOCOL
684 # if !wxUSE_SOCKETS
685 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
686 # ifdef wxABORT_ON_CONFIG_ERROR
687 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
688 # else
689 # undef wxUSE_SOCKETS
690 # define wxUSE_SOCKETS 1
691 # endif
692 # endif
693 # endif
694
695 # if !wxUSE_STREAMS
696 # ifdef wxABORT_ON_CONFIG_ERROR
697 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
698 # else
699 # undef wxUSE_STREAMS
700 # define wxUSE_STREAMS 1
701 # endif
702 # endif
703 #endif /* wxUSE_PROTOCOL */
704
705 /* non GUI settings */
706 #if wxUSE_STOPWATCH
707 # if !wxUSE_LONGLONG
708 # ifdef wxABORT_ON_CONFIG_ERROR
709 # error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
710 # else
711 # undef wxUSE_LONGLONG
712 # define wxUSE_LONGLONG 1
713 # endif
714 # endif
715 #endif /* wxUSE_STOPWATCH */
716
717 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
718 # ifdef wxABORT_ON_CONFIG_ERROR
719 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
720 # else
721 # undef wxUSE_TEXTFILE
722 # define wxUSE_TEXTFILE 1
723 # endif
724 #endif /* wxUSE_MIMETYPE */
725
726 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
727 # ifdef wxABORT_ON_CONFIG_ERROR
728 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
729 # else
730 # undef wxUSE_TEXTBUFFER
731 # define wxUSE_TEXTBUFFER 1
732 # endif
733 #endif /* wxUSE_TEXTFILE */
734
735 #if wxUSE_TEXTFILE && !wxUSE_FILE
736 # ifdef wxABORT_ON_CONFIG_ERROR
737 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
738 # else
739 # undef wxUSE_FILE
740 # define wxUSE_FILE 1
741 # endif
742 #endif /* wxUSE_TEXTFILE */
743
744 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
745 # ifdef wxABORT_ON_CONFIG_ERROR
746 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
747 # else
748 # undef wxUSE_UNICODE
749 # define wxUSE_UNICODE 1
750 # endif
751 #endif /* wxUSE_UNICODE_MSLU */
752
753 /* the rest of the tests is for the GUI settings only */
754 #if wxUSE_GUI
755
756 #if wxUSE_BUTTON || \
757 wxUSE_CALENDARCTRL || \
758 wxUSE_CARET || \
759 wxUSE_COMBOBOX || \
760 wxUSE_BMPBUTTON || \
761 wxUSE_CHECKBOX || \
762 wxUSE_CHECKLISTBOX || \
763 wxUSE_CHOICE || \
764 wxUSE_GAUGE || \
765 wxUSE_GRID || \
766 wxUSE_NEW_GRID || \
767 wxUSE_LISTBOX || \
768 wxUSE_LISTCTRL || \
769 wxUSE_NOTEBOOK || \
770 wxUSE_RADIOBOX || \
771 wxUSE_RADIOBTN || \
772 wxUSE_SCROLLBAR || \
773 wxUSE_SLIDER || \
774 wxUSE_SPINBTN || \
775 wxUSE_SPINCTRL || \
776 wxUSE_STATBMP || \
777 wxUSE_STATBOX || \
778 wxUSE_STATLINE || \
779 wxUSE_STATTEXT || \
780 wxUSE_STATUSBAR || \
781 wxUSE_TEXTCTRL || \
782 wxUSE_TOOLBAR || \
783 wxUSE_TREECTRL
784 # if !wxUSE_CONTROLS
785 # ifdef wxABORT_ON_CONFIG_ERROR
786 # error "wxUSE_CONTROLS unset but some controls used"
787 # else
788 # undef wxUSE_CONTROLS
789 # define wxUSE_CONTROLS 1
790 # endif
791 # endif
792 #endif /* controls */
793
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"
799 # else
800 # undef wxUSE_POPUPWIN
801 # define wxUSE_POPUPWIN 1
802 # endif
803 # endif
804
805 # if wxUSE_COMBOBOX
806 # if !wxUSE_LISTBOX
807 # ifdef wxABORT_ON_CONFIG_ERROR
808 # error "wxComboBox requires wxListBox in wxUniversal"
809 # else
810 # undef wxUSE_LISTBOX
811 # define wxUSE_LISTBOX 1
812 # endif
813 # endif
814 # endif /* wxUSE_COMBOBOX */
815
816 # if wxUSE_RADIOBTN
817 # if !wxUSE_CHECKBOX
818 # ifdef wxABORT_ON_CONFIG_ERROR
819 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
820 # else
821 # undef wxUSE_CHECKBOX
822 # define wxUSE_CHECKBOX 1
823 # endif
824 # endif
825 # endif /* wxUSE_RADIOBTN */
826
827 # if wxUSE_TEXTCTRL
828 # if !wxUSE_CARET
829 # ifdef wxABORT_ON_CONFIG_ERROR
830 # error "wxTextCtrl requires wxCaret in wxUniversal"
831 # else
832 # undef wxUSE_CARET
833 # define wxUSE_CARET 1
834 # endif
835 # endif /* wxUSE_CARET */
836
837 # if !wxUSE_SCROLLBAR
838 # ifdef wxABORT_ON_CONFIG_ERROR
839 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
840 # else
841 # undef wxUSE_SCROLLBAR
842 # define wxUSE_SCROLLBAR 1
843 # endif
844 # endif /* wxUSE_SCROLLBAR */
845 # endif /* wxUSE_TEXTCTRL */
846 #endif /* __WXUNIVERSAL__ */
847
848 /* wxGTK-specific dependencies */
849 #ifdef __WXGTK__
850 # ifndef __WXUNIVERSAL__
851 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
852 # ifdef wxABORT_ON_CONFIG_ERROR
853 # error "MDI requires wxUSE_MENUS in wxGTK"
854 # else
855 # undef wxUSE_MENUS
856 # define wxUSE_MENUS 1
857 # endif
858 # endif
859 # endif /* !__WXUNIVERSAL__ */
860
861 # if wxUSE_JOYSTICK
862 # if !wxUSE_THREADS
863 # ifdef wxABORT_ON_CONFIG_ERROR
864 # error "wxJoystick requires threads in wxGTK"
865 # else
866 # undef wxUSE_JOYSTICK
867 # define wxUSE_JOYSTICK 0
868 # endif
869 # endif
870 # endif
871 #endif /* wxGTK && !wxUniv */
872
873 /* wxMSW-specific dependencies */
874 #ifdef __WXMSW__
875 # ifndef wxUSE_UNICODE_MSLU
876 # ifdef wxABORT_ON_CONFIG_ERROR
877 # error "wxUSE_UNICODE_MSLU must be defined."
878 # else
879 # define wxUSE_UNICODE_MSLU 0
880 # endif
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."
885 # else
886 # define wxUSE_MS_HTML_HELP 0
887 # endif
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."
892 # else
893 # define wxUSE_DIALUP_MANAGER 0
894 # endif
895 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
896
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."
901 # else
902 # define wxUSE_DYNAMIC_LOADER 1
903 # endif
904 # endif
905 # if wxUSE_DIALUP_MANAGER
906 # ifdef wxABORT_ON_CONFIG_ERROR
907 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
908 # else
909 # define wxUSE_DYNAMIC_LOADER 1
910 # endif
911 # endif
912 # endif /* wxUSE_DYNAMIC_LOADER */
913 #endif /* wxMSW */
914
915 /* wxMotif-specific dependencies */
916 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
917 # undef wxUSE_TAB_DIALOG
918 # define wxUSE_TAB_DIALOG 1
919 #endif
920 #if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
921 # undef wxUSE_TOGGLEBTN
922 # define wxUSE_TOGGLEBTN 0
923 #endif
924
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"
936 # else
937 # undef wxUSE_CHOICE
938 # define wxUSE_CHOICE 1
939 # undef wxUSE_TEXTCTRL
940 # define wxUSE_TEXTCTRL 1
941 # undef wxUSE_BUTTON
942 # define wxUSE_BUTTON 1
943 # undef wxUSE_CHECKBOX
944 # define wxUSE_CHECKBOX 1
945 # undef wxUSE_STATTEXT
946 # define wxUSE_STATTEXT 1
947 # endif
948 # endif
949 # endif
950 #endif /* !wxMSW || wxUniv */
951
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"
957 # else
958 # undef wxUSE_SPINBTN
959 # undef wxUSE_COMBOBOX
960 # define wxUSE_SPINBTN 1
961 # define wxUSE_COMBOBOX 1
962 # endif
963 # endif
964 #endif /* wxUSE_CALENDARCTRL */
965
966 #if wxUSE_CHECKLISTBOX
967 # if !wxUSE_LISTBOX
968 # ifdef wxABORT_ON_CONFIG_ERROR
969 # error "wxCheckListBox requires wxListBox"
970 # else
971 # undef wxUSE_LISTBOX
972 # define wxUSE_LISTBOX 1
973 # endif
974 # endif
975 #endif /* wxUSE_RADIOBTN */
976
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"
981 # else
982 # undef wxUSE_HELP
983 # define wxUSE_HELP 1
984 # undef wxUSE_HTML
985 # define wxUSE_HTML 1
986 # undef wxUSE_COMBOBOX
987 # define wxUSE_COMBOBOX 1
988 # endif
989 # endif
990 #endif /* wxUSE_WXHTML_HELP */
991
992 #if wxUSE_PRINTING_ARCHITECTURE
993 # if !wxUSE_COMBOBOX
994 # ifdef wxABORT_ON_CONFIG_ERROR
995 # error "Print dialog requires wxUSE_COMBOBOX"
996 # else
997 # undef wxUSE_COMBOBOX
998 # define wxUSE_COMBOBOX 1
999 # endif
1000 # endif
1001 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1002
1003 #if wxUSE_DOC_VIEW_ARCHITECTURE
1004 # if !wxUSE_MENUS
1005 # ifdef wxABORT_ON_CONFIG_ERROR
1006 # error "DocView requires wxUSE_MENUS"
1007 # else
1008 # undef wxUSE_MENUS
1009 # define wxUSE_MENUS 1
1010 # endif
1011 # endif
1012 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1013
1014 #if !wxUSE_FILEDLG
1015 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1016 # ifdef wxABORT_ON_CONFIG_ERROR
1017 # error "wxFileDialog must be compiled as well"
1018 # else
1019 # undef wxUSE_FILEDLG
1020 # define wxUSE_FILEDLG 1
1021 # endif
1022 # endif
1023 #endif /* wxUSE_FILEDLG */
1024
1025 #if !wxUSE_IMAGLIST
1026 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1027 # ifdef wxABORT_ON_CONFIG_ERROR
1028 # error "wxImageList must be compiled as well"
1029 # else
1030 # undef wxUSE_IMAGLIST
1031 # define wxUSE_IMAGLIST 1
1032 # endif
1033 # endif
1034 #endif /* !wxUSE_IMAGLIST */
1035
1036 #if !wxUSE_MSGDLG
1037 # ifdef wxABORT_ON_CONFIG_ERROR
1038 /* FIXME: should compile without it, of course, but doesn't */
1039 # error "wxMessageBox is always needed"
1040 # else
1041 # undef wxUSE_MSGDLG
1042 # define wxUSE_MSGDLG 1
1043 # endif
1044 #endif
1045
1046 #if wxUSE_RADIOBOX
1047 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1048 # ifdef wxABORT_ON_CONFIG_ERROR
1049 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1050 # else
1051 # undef wxUSE_RADIOBTN
1052 # undef wxUSE_STATBOX
1053 # define wxUSE_RADIOBTN 1
1054 # define wxUSE_STATBOX 1
1055 # endif
1056 # endif
1057 #endif /* wxUSE_RADIOBOX */
1058
1059 #if wxUSE_LOGWINDOW
1060 # if !wxUSE_TEXTCTRL
1061 # ifdef wxABORT_ON_CONFIG_ERROR
1062 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1063 # else
1064 # undef wxUSE_TEXTCTRL
1065 # define wxUSE_TEXTCTRL 1
1066 # endif
1067 # endif
1068 #endif /* wxUSE_LOGWINDOW */
1069
1070 #if wxUSE_LOG_DIALOG
1071 # if !wxUSE_LISTCTRL
1072 # ifdef wxABORT_ON_CONFIG_ERROR
1073 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1074 # else
1075 # undef wxUSE_LISTCTRL
1076 # define wxUSE_LISTCTRL 1
1077 # endif
1078 # endif
1079 #endif /* wxUSE_LOG_DIALOG */
1080
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"
1086 # else
1087 # undef wxUSE_DYNAMIC_CLASSES
1088 # define wxUSE_DYNAMIC_CLASSES 1
1089 # endif
1090 #endif /* wxUSE_DYNAMIC_CLASSES */
1091
1092 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1093 # ifdef wxABORT_ON_CONFIG_ERROR
1094 # error "wxClipboard requires wxDataObject"
1095 # else
1096 # undef wxUSE_DATAOBJ
1097 # define wxUSE_DATAOBJ 1
1098 # endif
1099 #endif /* wxUSE_CLIPBOARD */
1100
1101 #endif /* wxUSE_GUI */
1102