]> git.saurik.com Git - wxWidgets.git/blob - include/wx/chkconf.h
Getting rid of odd control characters at EOL in source.
[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_IMAGLIST
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_IMAGLIST must be defined."
354 # else
355 # define wxUSE_IMAGLIST 0
356 # endif
357 #endif /* !defined(wxUSE_IMAGLIST) */
358
359 #ifndef wxUSE_JOYSTICK
360 # ifdef wxABORT_ON_CONFIG_ERROR
361 # error "wxUSE_JOYSTICK must be defined."
362 # else
363 # define wxUSE_JOYSTICK 0
364 # endif
365 #endif /* !defined(wxUSE_JOYSTICK) */
366
367 #ifndef wxUSE_LISTBOX
368 # ifdef wxABORT_ON_CONFIG_ERROR
369 # error "wxUSE_LISTBOX must be defined."
370 # else
371 # define wxUSE_LISTBOX 0
372 # endif
373 #endif /* !defined(wxUSE_LISTBOX) */
374
375 #ifndef wxUSE_LISTCTRL
376 # ifdef wxABORT_ON_CONFIG_ERROR
377 # error "wxUSE_LISTCTRL must be defined."
378 # else
379 # define wxUSE_LISTCTRL 0
380 # endif
381 #endif /* !defined(wxUSE_LISTCTRL) */
382
383 #ifndef wxUSE_LOGGUI
384 # ifdef wxABORT_ON_CONFIG_ERROR
385 # error "wxUSE_LOGGUI must be defined."
386 # else
387 # define wxUSE_LOGGUI 0
388 # endif
389 #endif /* !defined(wxUSE_LOGGUI) */
390
391 #ifndef wxUSE_LOGWINDOW
392 # ifdef wxABORT_ON_CONFIG_ERROR
393 # error "wxUSE_LOGWINDOW must be defined."
394 # else
395 # define wxUSE_LOGWINDOW 0
396 # endif
397 #endif /* !defined(wxUSE_LOGWINDOW) */
398
399 #ifndef wxUSE_LOG_DIALOG
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxUSE_LOG_DIALOG must be defined."
402 # else
403 # define wxUSE_LOG_DIALOG 0
404 # endif
405 #endif /* !defined(wxUSE_LOG_DIALOG) */
406
407 #ifndef wxUSE_MDI_ARCHITECTURE
408 # ifdef wxABORT_ON_CONFIG_ERROR
409 # error "wxUSE_MDI_ARCHITECTURE must be defined."
410 # else
411 # define wxUSE_MDI_ARCHITECTURE 0
412 # endif
413 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
414
415 #ifndef wxUSE_MENUS
416 # ifdef wxABORT_ON_CONFIG_ERROR
417 # error "wxUSE_MENUS must be defined."
418 # else
419 # define wxUSE_MENUS 0
420 # endif
421 #endif /* !defined(wxUSE_MENUS) */
422
423 #ifndef wxUSE_MSGDLG
424 # ifdef wxABORT_ON_CONFIG_ERROR
425 # error "wxUSE_MSGDLG must be defined."
426 # else
427 # define wxUSE_MSGDLG 0
428 # endif
429 #endif /* !defined(wxUSE_MSGDLG) */
430
431 #ifndef wxUSE_NEW_GRID
432 # ifdef wxABORT_ON_CONFIG_ERROR
433 # error "wxUSE_NEW_GRID must be defined."
434 # else
435 # define wxUSE_NEW_GRID 0
436 # endif
437 #endif /* !defined(wxUSE_NEW_GRID) */
438
439 #ifndef wxUSE_NOTEBOOK
440 # ifdef wxABORT_ON_CONFIG_ERROR
441 # error "wxUSE_NOTEBOOK must be defined."
442 # else
443 # define wxUSE_NOTEBOOK 0
444 # endif
445 #endif /* !defined(wxUSE_NOTEBOOK) */
446
447 #ifndef wxUSE_PALETTE
448 # ifdef wxABORT_ON_CONFIG_ERROR
449 # error "wxUSE_PALETTE must be defined."
450 # else
451 # define wxUSE_PALETTE 0
452 # endif
453 #endif /* !defined(wxUSE_PALETTE) */
454
455 #ifndef wxUSE_POPUPWIN
456 # ifdef wxABORT_ON_CONFIG_ERROR
457 # error "wxUSE_POPUPWIN must be defined."
458 # else
459 # define wxUSE_POPUPWIN 0
460 # endif
461 #endif /* !defined(wxUSE_POPUPWIN) */
462
463 #ifndef wxUSE_PRINTING_ARCHITECTURE
464 # ifdef wxABORT_ON_CONFIG_ERROR
465 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
466 # else
467 # define wxUSE_PRINTING_ARCHITECTURE 0
468 # endif
469 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
470
471 #ifndef wxUSE_RADIOBOX
472 # ifdef wxABORT_ON_CONFIG_ERROR
473 # error "wxUSE_RADIOBOX must be defined."
474 # else
475 # define wxUSE_RADIOBOX 0
476 # endif
477 #endif /* !defined(wxUSE_RADIOBOX) */
478
479 #ifndef wxUSE_RADIOBTN
480 # ifdef wxABORT_ON_CONFIG_ERROR
481 # error "wxUSE_RADIOBTN must be defined."
482 # else
483 # define wxUSE_RADIOBTN 0
484 # endif
485 #endif /* !defined(wxUSE_RADIOBTN) */
486
487 #ifndef wxUSE_SASH
488 # ifdef wxABORT_ON_CONFIG_ERROR
489 # error "wxUSE_SASH must be defined."
490 # else
491 # define wxUSE_SASH 0
492 # endif
493 #endif /* !defined(wxUSE_SASH) */
494
495 #ifndef wxUSE_SCROLLBAR
496 # ifdef wxABORT_ON_CONFIG_ERROR
497 # error "wxUSE_SCROLLBAR must be defined."
498 # else
499 # define wxUSE_SCROLLBAR 0
500 # endif
501 #endif /* !defined(wxUSE_SCROLLBAR) */
502
503 #ifndef wxUSE_SLIDER
504 # ifdef wxABORT_ON_CONFIG_ERROR
505 # error "wxUSE_SLIDER must be defined."
506 # else
507 # define wxUSE_SLIDER 0
508 # endif
509 #endif /* !defined(wxUSE_SLIDER) */
510
511 #ifndef wxUSE_SPINBTN
512 # ifdef wxABORT_ON_CONFIG_ERROR
513 # error "wxUSE_SPINBTN must be defined."
514 # else
515 # define wxUSE_SPINBTN 0
516 # endif
517 #endif /* !defined(wxUSE_SPINBTN) */
518
519 #ifndef wxUSE_SPINCTRL
520 # ifdef wxABORT_ON_CONFIG_ERROR
521 # error "wxUSE_SPINCTRL must be defined."
522 # else
523 # define wxUSE_SPINCTRL 0
524 # endif
525 #endif /* !defined(wxUSE_SPINCTRL) */
526
527 #ifndef wxUSE_SPLASH
528 # ifdef wxABORT_ON_CONFIG_ERROR
529 # error "wxUSE_SPLASH must be defined."
530 # else
531 # define wxUSE_SPLASH 0
532 # endif
533 #endif /* !defined(wxUSE_SPLASH) */
534
535 #ifndef wxUSE_SPLITTER
536 # ifdef wxABORT_ON_CONFIG_ERROR
537 # error "wxUSE_SPLITTER must be defined."
538 # else
539 # define wxUSE_SPLITTER 0
540 # endif
541 #endif /* !defined(wxUSE_SPLITTER) */
542
543 #ifndef wxUSE_STATBMP
544 # ifdef wxABORT_ON_CONFIG_ERROR
545 # error "wxUSE_STATBMP must be defined."
546 # else
547 # define wxUSE_STATBMP 0
548 # endif
549 #endif /* !defined(wxUSE_STATBMP) */
550
551 #ifndef wxUSE_STATBOX
552 # ifdef wxABORT_ON_CONFIG_ERROR
553 # error "wxUSE_STATBOX must be defined."
554 # else
555 # define wxUSE_STATBOX 0
556 # endif
557 #endif /* !defined(wxUSE_STATBOX) */
558
559 #ifndef wxUSE_STATLINE
560 # ifdef wxABORT_ON_CONFIG_ERROR
561 # error "wxUSE_STATLINE must be defined."
562 # else
563 # define wxUSE_STATLINE 0
564 # endif
565 #endif /* !defined(wxUSE_STATLINE) */
566
567 #ifndef wxUSE_STATTEXT
568 # ifdef wxABORT_ON_CONFIG_ERROR
569 # error "wxUSE_STATTEXT must be defined."
570 # else
571 # define wxUSE_STATTEXT 0
572 # endif
573 #endif /* !defined(wxUSE_STATTEXT) */
574
575 #ifndef wxUSE_STATUSBAR
576 # ifdef wxABORT_ON_CONFIG_ERROR
577 # error "wxUSE_STATUSBAR must be defined."
578 # else
579 # define wxUSE_STATUSBAR 0
580 # endif
581 #endif /* !defined(wxUSE_STATUSBAR) */
582
583 #ifndef wxUSE_TAB_DIALOG
584 # ifdef wxABORT_ON_CONFIG_ERROR
585 # error "wxUSE_TAB_DIALOG must be defined."
586 # else
587 # define wxUSE_TAB_DIALOG 0
588 # endif
589 #endif /* !defined(wxUSE_TAB_DIALOG) */
590
591 #ifndef wxUSE_TEXTCTRL
592 # ifdef wxABORT_ON_CONFIG_ERROR
593 # error "wxUSE_TEXTCTRL must be defined."
594 # else
595 # define wxUSE_TEXTCTRL 0
596 # endif
597 #endif /* !defined(wxUSE_TEXTCTRL) */
598
599 #ifndef wxUSE_TIPWINDOW
600 # ifdef wxABORT_ON_CONFIG_ERROR
601 # error "wxUSE_TIPWINDOW must be defined."
602 # else
603 # define wxUSE_TIPWINDOW 0
604 # endif
605 #endif /* !defined(wxUSE_TIPWINDOW) */
606
607 #ifndef wxUSE_TOOLBAR
608 # ifdef wxABORT_ON_CONFIG_ERROR
609 # error "wxUSE_TOOLBAR must be defined."
610 # else
611 # define wxUSE_TOOLBAR 0
612 # endif
613 #endif /* !defined(wxUSE_TOOLBAR) */
614
615 #ifndef wxUSE_TOOLTIPS
616 # ifdef wxABORT_ON_CONFIG_ERROR
617 # error "wxUSE_TOOLTIPS must be defined."
618 # else
619 # define wxUSE_TOOLTIPS 0
620 # endif
621 #endif /* !defined(wxUSE_TOOLTIPS) */
622
623 #ifndef wxUSE_TREECTRL
624 # ifdef wxABORT_ON_CONFIG_ERROR
625 # error "wxUSE_TREECTRL must be defined."
626 # else
627 # define wxUSE_TREECTRL 0
628 # endif
629 #endif /* !defined(wxUSE_TREECTRL) */
630
631 #ifndef wxUSE_WXHTML_HELP
632 # ifdef wxABORT_ON_CONFIG_ERROR
633 # error "wxUSE_WXHTML_HELP must be defined."
634 # else
635 # define wxUSE_WXHTML_HELP 0
636 # endif
637 #endif /* !defined(wxUSE_WXHTML_HELP) */
638
639 #endif /* wxUSE_GUI */
640
641 /*
642 check consistency of the settings
643 */
644
645 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
646 # if !wxUSE_PROTOCOL
647 # ifdef wxABORT_ON_CONFIG_ERROR
648 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
649 # else
650 # undef wxUSE_PROTOCOL
651 # define wxUSE_PROTOCOL 1
652 # endif
653 # endif
654 #endif /* wxUSE_PROTOCOL_XXX */
655
656 #if wxUSE_URL
657 # if !wxUSE_PROTOCOL
658 # ifdef wxABORT_ON_CONFIG_ERROR
659 # error "wxUSE_URL requires wxUSE_PROTOCOL"
660 # else
661 # undef wxUSE_PROTOCOL
662 # define wxUSE_PROTOCOL 1
663 # endif
664 # endif
665 #endif /* wxUSE_URL */
666
667 #if wxUSE_PROTOCOL
668 # if !wxUSE_SOCKETS
669 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
670 # ifdef wxABORT_ON_CONFIG_ERROR
671 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
672 # else
673 # undef wxUSE_SOCKETS
674 # define wxUSE_SOCKETS 1
675 # endif
676 # endif
677 # endif
678
679 # if !wxUSE_STREAMS
680 # ifdef wxABORT_ON_CONFIG_ERROR
681 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
682 # else
683 # undef wxUSE_STREAMS
684 # define wxUSE_STREAMS 1
685 # endif
686 # endif
687 #endif /* wxUSE_PROTOCOL */
688
689 /* non GUI settings */
690 #if wxUSE_STOPWATCH
691 # if !wxUSE_LONGLONG
692 # ifdef wxABORT_ON_CONFIG_ERROR
693 # error "wxUSE_STOPWATCH requires wxUSE_LONGLONG"
694 # else
695 # undef wxUSE_LONGLONG
696 # define wxUSE_LONGLONG 1
697 # endif
698 # endif
699 #endif /* wxUSE_STOPWATCH */
700
701 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
702 # ifdef wxABORT_ON_CONFIG_ERROR
703 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
704 # else
705 # undef wxUSE_TEXTFILE
706 # define wxUSE_TEXTFILE 1
707 # endif
708 #endif /* wxUSE_MIMETYPE */
709
710 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
711 # ifdef wxABORT_ON_CONFIG_ERROR
712 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
713 # else
714 # undef wxUSE_TEXTBUFFER
715 # define wxUSE_TEXTBUFFER 1
716 # endif
717 #endif /* wxUSE_TEXTFILE */
718
719 #if wxUSE_TEXTFILE && !wxUSE_FILE
720 # ifdef wxABORT_ON_CONFIG_ERROR
721 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
722 # else
723 # undef wxUSE_FILE
724 # define wxUSE_FILE 1
725 # endif
726 #endif /* wxUSE_TEXTFILE */
727
728 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
729 # ifdef wxABORT_ON_CONFIG_ERROR
730 # error "wxUSE_UNICODE_MSLU requires wxUSE_UNICODE"
731 # else
732 # undef wxUSE_UNICODE
733 # define wxUSE_UNICODE 1
734 # endif
735 #endif /* wxUSE_UNICODE_MSLU */
736
737 /* the rest of the tests is for the GUI settings only */
738 #if wxUSE_GUI
739
740 #if wxUSE_BUTTON || \
741 wxUSE_CALENDARCTRL || \
742 wxUSE_CARET || \
743 wxUSE_COMBOBOX || \
744 wxUSE_BMPBUTTON || \
745 wxUSE_CHECKBOX || \
746 wxUSE_CHECKLISTBOX || \
747 wxUSE_CHOICE || \
748 wxUSE_GAUGE || \
749 wxUSE_GRID || \
750 wxUSE_NEW_GRID || \
751 wxUSE_LISTBOX || \
752 wxUSE_LISTCTRL || \
753 wxUSE_NOTEBOOK || \
754 wxUSE_RADIOBOX || \
755 wxUSE_RADIOBTN || \
756 wxUSE_SCROLLBAR || \
757 wxUSE_SLIDER || \
758 wxUSE_SPINBTN || \
759 wxUSE_SPINCTRL || \
760 wxUSE_STATBMP || \
761 wxUSE_STATBOX || \
762 wxUSE_STATLINE || \
763 wxUSE_STATTEXT || \
764 wxUSE_STATUSBAR || \
765 wxUSE_TEXTCTRL || \
766 wxUSE_TOOLBAR || \
767 wxUSE_TREECTRL
768 # if !wxUSE_CONTROLS
769 # ifdef wxABORT_ON_CONFIG_ERROR
770 # error "wxUSE_CONTROLS unset but some controls used"
771 # else
772 # undef wxUSE_CONTROLS
773 # define wxUSE_CONTROLS 1
774 # endif
775 # endif
776 #endif /* controls */
777
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"
783 # else
784 # undef wxUSE_POPUPWIN
785 # define wxUSE_POPUPWIN 1
786 # endif
787 # endif
788
789 # if wxUSE_COMBOBOX
790 # if !wxUSE_LISTBOX
791 # ifdef wxABORT_ON_CONFIG_ERROR
792 # error "wxComboBox requires wxListBox in wxUniversal"
793 # else
794 # undef wxUSE_LISTBOX
795 # define wxUSE_LISTBOX 1
796 # endif
797 # endif
798 # endif /* wxUSE_COMBOBOX */
799
800 # if wxUSE_RADIOBTN
801 # if !wxUSE_CHECKBOX
802 # ifdef wxABORT_ON_CONFIG_ERROR
803 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
804 # else
805 # undef wxUSE_CHECKBOX
806 # define wxUSE_CHECKBOX 1
807 # endif
808 # endif
809 # endif /* wxUSE_RADIOBTN */
810
811 # if wxUSE_TEXTCTRL
812 # if !wxUSE_CARET
813 # ifdef wxABORT_ON_CONFIG_ERROR
814 # error "wxTextCtrl requires wxCaret in wxUniversal"
815 # else
816 # undef wxUSE_CARET
817 # define wxUSE_CARET 1
818 # endif
819 # endif /* wxUSE_CARET */
820
821 # if !wxUSE_SCROLLBAR
822 # ifdef wxABORT_ON_CONFIG_ERROR
823 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
824 # else
825 # undef wxUSE_SCROLLBAR
826 # define wxUSE_SCROLLBAR 1
827 # endif
828 # endif /* wxUSE_SCROLLBAR */
829 # endif /* wxUSE_TEXTCTRL */
830 #endif /* __WXUNIVERSAL__ */
831
832 /* wxGTK-specific dependencies */
833 #ifdef __WXGTK__
834 # ifndef __WXUNIVERSAL__
835 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
836 # ifdef wxABORT_ON_CONFIG_ERROR
837 # error "MDI requires wxUSE_MENUS in wxGTK"
838 # else
839 # undef wxUSE_MENUS
840 # define wxUSE_MENUS 1
841 # endif
842 # endif
843 # endif /* !__WXUNIVERSAL__ */
844
845 # if wxUSE_JOYSTICK
846 # if !wxUSE_THREADS
847 # ifdef wxABORT_ON_CONFIG_ERROR
848 # error "wxJoystick requires threads in wxGTK"
849 # else
850 # undef wxUSE_JOYSTICK
851 # define wxUSE_JOYSTICK 0
852 # endif
853 # endif
854 # endif
855 #endif /* wxGTK && !wxUniv */
856
857 /* wxMSW-specific dependencies */
858 #ifdef __WXMSW__
859 # ifndef wxUSE_UNICODE_MSLU
860 # ifdef wxABORT_ON_CONFIG_ERROR
861 # error "wxUSE_UNICODE_MSLU must be defined."
862 # else
863 # define wxUSE_UNICODE_MSLU 0
864 # endif
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."
869 # else
870 # define wxUSE_MS_HTML_HELP 0
871 # endif
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."
876 # else
877 # define wxUSE_DIALUP_MANAGER 0
878 # endif
879 # endif /* !defined(wxUSE_DIALUP_MANAGER) */
880
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."
885 # else
886 # define wxUSE_DYNAMIC_LOADER 1
887 # endif
888 # endif
889 # if wxUSE_DIALUP_MANAGER
890 # ifdef wxABORT_ON_CONFIG_ERROR
891 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
892 # else
893 # define wxUSE_DYNAMIC_LOADER 1
894 # endif
895 # endif
896 # endif /* wxUSE_DYNAMIC_LOADER */
897 #endif /* wxMSW */
898
899 /* wxMotif-specific dependencies */
900 #if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
901 # undef wxUSE_TAB_DIALOG
902 # define wxUSE_TAB_DIALOG 1
903 #endif
904 #if defined(__WXMOTIF__) && wxUSE_TOGGLEBTN
905 # undef wxUSE_TOGGLEBTN
906 # define wxUSE_TOGGLEBTN 0
907 #endif
908
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"
920 # else
921 # undef wxUSE_CHOICE
922 # define wxUSE_CHOICE 1
923 # undef wxUSE_TEXTCTRL
924 # define wxUSE_TEXTCTRL 1
925 # undef wxUSE_BUTTON
926 # define wxUSE_BUTTON 1
927 # undef wxUSE_CHECKBOX
928 # define wxUSE_CHECKBOX 1
929 # undef wxUSE_STATTEXT
930 # define wxUSE_STATTEXT 1
931 # endif
932 # endif
933 # endif
934 #endif /* !wxMSW || wxUniv */
935
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"
941 # else
942 # undef wxUSE_SPINBTN
943 # undef wxUSE_COMBOBOX
944 # define wxUSE_SPINBTN 1
945 # define wxUSE_COMBOBOX 1
946 # endif
947 # endif
948 #endif /* wxUSE_CALENDARCTRL */
949
950 #if wxUSE_CHECKLISTBOX
951 # if !wxUSE_LISTBOX
952 # ifdef wxABORT_ON_CONFIG_ERROR
953 # error "wxCheckListBox requires wxListBox"
954 # else
955 # undef wxUSE_LISTBOX
956 # define wxUSE_LISTBOX 1
957 # endif
958 # endif
959 #endif /* wxUSE_RADIOBTN */
960
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"
965 # else
966 # undef wxUSE_HELP
967 # define wxUSE_HELP 1
968 # undef wxUSE_HTML
969 # define wxUSE_HTML 1
970 # undef wxUSE_COMBOBOX
971 # define wxUSE_COMBOBOX 1
972 # endif
973 # endif
974 #endif /* wxUSE_WXHTML_HELP */
975
976 #if wxUSE_PRINTING_ARCHITECTURE
977 # if !wxUSE_COMBOBOX
978 # ifdef wxABORT_ON_CONFIG_ERROR
979 # error "Print dialog requires wxUSE_COMBOBOX"
980 # else
981 # undef wxUSE_COMBOBOX
982 # define wxUSE_COMBOBOX 1
983 # endif
984 # endif
985 #endif /* wxUSE_PRINTING_ARCHITECTURE */
986
987 #if wxUSE_DOC_VIEW_ARCHITECTURE
988 # if !wxUSE_MENUS
989 # ifdef wxABORT_ON_CONFIG_ERROR
990 # error "DocView requires wxUSE_MENUS"
991 # else
992 # undef wxUSE_MENUS
993 # define wxUSE_MENUS 1
994 # endif
995 # endif
996 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
997
998 #if !wxUSE_FILEDLG
999 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1000 # ifdef wxABORT_ON_CONFIG_ERROR
1001 # error "wxFileDialog must be compiled as well"
1002 # else
1003 # undef wxUSE_FILEDLG
1004 # define wxUSE_FILEDLG 1
1005 # endif
1006 # endif
1007 #endif /* wxUSE_FILEDLG */
1008
1009 #if !wxUSE_IMAGLIST
1010 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1011 # ifdef wxABORT_ON_CONFIG_ERROR
1012 # error "wxImageList must be compiled as well"
1013 # else
1014 # undef wxUSE_IMAGLIST
1015 # define wxUSE_IMAGLIST 1
1016 # endif
1017 # endif
1018 #endif /* !wxUSE_IMAGLIST */
1019
1020 #if !wxUSE_MSGDLG
1021 # ifdef wxABORT_ON_CONFIG_ERROR
1022 /* FIXME: should compile without it, of course, but doesn't */
1023 # error "wxMessageBox is always needed"
1024 # else
1025 # undef wxUSE_MSGDLG
1026 # define wxUSE_MSGDLG 1
1027 # endif
1028 #endif
1029
1030 #if wxUSE_RADIOBOX
1031 # if !wxUSE_RADIOBTN || !wxUSE_STATBOX
1032 # ifdef wxABORT_ON_CONFIG_ERROR
1033 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN and wxUSE_STATBOX"
1034 # else
1035 # undef wxUSE_RADIOBTN
1036 # undef wxUSE_STATBOX
1037 # define wxUSE_RADIOBTN 1
1038 # define wxUSE_STATBOX 1
1039 # endif
1040 # endif
1041 #endif /* wxUSE_RADIOBOX */
1042
1043 #if wxUSE_LOGWINDOW
1044 # if !wxUSE_TEXTCTRL
1045 # ifdef wxABORT_ON_CONFIG_ERROR
1046 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1047 # else
1048 # undef wxUSE_TEXTCTRL
1049 # define wxUSE_TEXTCTRL 1
1050 # endif
1051 # endif
1052 #endif /* wxUSE_LOGWINDOW */
1053
1054 #if wxUSE_LOG_DIALOG
1055 # if !wxUSE_LISTCTRL
1056 # ifdef wxABORT_ON_CONFIG_ERROR
1057 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL"
1058 # else
1059 # undef wxUSE_LISTCTRL
1060 # define wxUSE_LISTCTRL 1
1061 # endif
1062 # endif
1063 #endif /* wxUSE_LOG_DIALOG */
1064
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"
1070 # else
1071 # undef wxUSE_DYNAMIC_CLASSES
1072 # define wxUSE_DYNAMIC_CLASSES 1
1073 # endif
1074 #endif /* wxUSE_DYNAMIC_CLASSES */
1075
1076 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1077 # ifdef wxABORT_ON_CONFIG_ERROR
1078 # error "wxClipboard requires wxDataObject"
1079 # else
1080 # undef wxUSE_DATAOBJ
1081 # define wxUSE_DATAOBJ 1
1082 # endif
1083 #endif /* wxUSE_CLIPBOARD */
1084
1085 #endif /* wxUSE_GUI */
1086