]> git.saurik.com Git - wxWidgets.git/blob - include/wx/chkconf.h
Build fix after recent changes in wxRendererNative class.
[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@wxwidgets.org>
9 * Licence: wxWindows licence
10 */
11
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
13
14 /*
15 Platform-specific checking.
16 */
17
18 #if defined(__WXPALMOS__)
19 # include "wx/palmos/chkconf.h"
20 #elif defined(__WXWINCE__)
21 # include "wx/msw/wince/chkconf.h"
22 #elif defined(__WXMSW__)
23 # include "wx/msw/chkconf.h"
24 #elif defined(__WXMAC__)
25 # include "wx/mac/chkconf.h"
26 #elif defined(__OS2__)
27 # include "wx/os2/chkconf.h"
28 #elif defined(__WXMGL__)
29 # include "wx/mgl/chkconf.h"
30 #elif defined(__WXMOTIF__)
31 # include "wx/motif/chkconf.h"
32 #endif
33
34 /*
35 this global setting determines what should we do if the setting FOO
36 requires BAR and BAR is not set: we can either silently unset FOO as well
37 (do this if you're trying to build the smallest possible library) or give an
38 error and abort (default as leads to least surprizing behaviour)
39 */
40 #define wxABORT_ON_CONFIG_ERROR
41
42 /*
43 global features
44 */
45
46 /* GUI build by default */
47 #if !defined(wxUSE_GUI)
48 # define wxUSE_GUI 1
49 #endif /* !defined(wxUSE_GUI) */
50
51 /*
52 If we're compiling without support for threads/exceptions we have to
53 disable the corresponding features.
54 */
55 #ifdef wxNO_THREADS
56 # undef wxUSE_THREADS
57 # define wxUSE_THREADS 0
58 #endif /* wxNO_THREADS */
59
60 #ifdef wxNO_EXCEPTIONS
61 # undef wxUSE_EXCEPTIONS
62 # define wxUSE_EXCEPTIONS 0
63 #endif /* wxNO_EXCEPTIONS */
64
65 /* we also must disable exceptions if compiler doesn't support them */
66 #if defined(_MSC_VER) && !defined(_CPPUNWIND)
67 # undef wxUSE_EXCEPTIONS
68 # define wxUSE_EXCEPTIONS 0
69 #endif /* VC++ without exceptions support */
70
71
72 /*
73 tests for non GUI features
74 */
75
76 #ifndef wxUSE_CRASHREPORT
77 /* this one is special: as currently it is Windows-only, don't force it
78 to be defined on other platforms */
79 # if defined(wxABORT_ON_CONFIG_ERROR) && defined(__WXMSW__)
80 # error "wxUSE_CRASHREPORT must be defined."
81 # else
82 # define wxUSE_CRASHREPORT 0
83 # endif
84 #endif /* !defined(wxUSE_CRASHREPORT) */
85
86 #ifndef wxUSE_DYNLIB_CLASS
87 # ifdef wxABORT_ON_CONFIG_ERROR
88 # error "wxUSE_DYNLIB_CLASS must be defined."
89 # else
90 # define wxUSE_DYNLIB_CLASS 0
91 # endif
92 #endif /* !defined(wxUSE_DYNLIB_CLASS) */
93
94 #ifndef wxUSE_EXCEPTIONS
95 # ifdef wxABORT_ON_CONFIG_ERROR
96 # error "wxUSE_EXCEPTIONS must be defined."
97 # else
98 # define wxUSE_EXCEPTIONS 0
99 # endif
100 #endif /* !defined(wxUSE_EXCEPTIONS) */
101
102 #ifndef wxUSE_FILESYSTEM
103 # ifdef wxABORT_ON_CONFIG_ERROR
104 # error "wxUSE_FILESYSTEM must be defined."
105 # else
106 # define wxUSE_FILESYSTEM 0
107 # endif
108 #endif /* !defined(wxUSE_FILESYSTEM) */
109
110 /* don't give an error about this one yet, it's not fully implemented */
111 #ifndef wxUSE_FSVOLUME
112 # define wxUSE_FSVOLUME 0
113 #endif /* !defined(wxUSE_FSVOLUME) */
114
115 #ifndef wxUSE_DYNAMIC_LOADER
116 # ifdef wxABORT_ON_CONFIG_ERROR
117 # error "wxUSE_DYNAMIC_LOADER must be defined."
118 # else
119 # define wxUSE_DYNAMIC_LOADER 0
120 # endif
121 #endif /* !defined(wxUSE_DYNAMIC_LOADER) */
122
123 #ifndef wxUSE_LOG
124 # ifdef wxABORT_ON_CONFIG_ERROR
125 # error "wxUSE_LOG must be defined."
126 # else
127 # define wxUSE_LOG 0
128 # endif
129 #endif /* !defined(wxUSE_LOG) */
130
131 #ifndef wxUSE_LONGLONG
132 # ifdef wxABORT_ON_CONFIG_ERROR
133 # error "wxUSE_LONGLONG must be defined."
134 # else
135 # define wxUSE_LONGLONG 0
136 # endif
137 #endif /* !defined(wxUSE_LONGLONG) */
138
139 #ifndef wxUSE_MIMETYPE
140 # ifdef wxABORT_ON_CONFIG_ERROR
141 # error "wxUSE_MIMETYPE must be defined."
142 # else
143 # define wxUSE_MIMETYPE 0
144 # endif
145 #endif /* !defined(wxUSE_MIMETYPE) */
146
147 #ifndef wxUSE_ON_FATAL_EXCEPTION
148 # ifdef wxABORT_ON_CONFIG_ERROR
149 # error "wxUSE_ON_FATAL_EXCEPTION must be defined."
150 # else
151 # define wxUSE_ON_FATAL_EXCEPTION 0
152 # endif
153 #endif /* !defined(wxUSE_ON_FATAL_EXCEPTION) */
154
155 #ifndef wxUSE_PROTOCOL
156 # ifdef wxABORT_ON_CONFIG_ERROR
157 # error "wxUSE_PROTOCOL must be defined."
158 # else
159 # define wxUSE_PROTOCOL 0
160 # endif
161 #endif /* !defined(wxUSE_PROTOCOL) */
162
163 /* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
164 #if !wxUSE_PROTOCOL
165 # undef wxUSE_PROTOCOL_HTTP
166 # undef wxUSE_PROTOCOL_FTP
167 # undef wxUSE_PROTOCOL_FILE
168 # define wxUSE_PROTOCOL_HTTP 0
169 # define wxUSE_PROTOCOL_FTP 0
170 # define wxUSE_PROTOCOL_FILE 0
171 #endif /* wxUSE_PROTOCOL */
172
173 #ifndef wxUSE_PROTOCOL_HTTP
174 # ifdef wxABORT_ON_CONFIG_ERROR
175 # error "wxUSE_PROTOCOL_HTTP must be defined."
176 # else
177 # define wxUSE_PROTOCOL_HTTP 0
178 # endif
179 #endif /* !defined(wxUSE_PROTOCOL_HTTP) */
180
181 #ifndef wxUSE_PROTOCOL_FTP
182 # ifdef wxABORT_ON_CONFIG_ERROR
183 # error "wxUSE_PROTOCOL_FTP must be defined."
184 # else
185 # define wxUSE_PROTOCOL_FTP 0
186 # endif
187 #endif /* !defined(wxUSE_PROTOCOL_FTP) */
188
189 #ifndef wxUSE_PROTOCOL_FILE
190 # ifdef wxABORT_ON_CONFIG_ERROR
191 # error "wxUSE_PROTOCOL_FILE must be defined."
192 # else
193 # define wxUSE_PROTOCOL_FILE 0
194 # endif
195 #endif /* !defined(wxUSE_PROTOCOL_FILE) */
196
197 #ifndef wxUSE_REGEX
198 # ifdef wxABORT_ON_CONFIG_ERROR
199 # error "wxUSE_REGEX must be defined."
200 # else
201 # define wxUSE_REGEX 0
202 # endif
203 #endif /* !defined(wxUSE_REGEX) */
204
205 #ifndef wxUSE_STDPATHS
206 # ifdef wxABORT_ON_CONFIG_ERROR
207 # error "wxUSE_STDPATHS must be defined."
208 # else
209 # define wxUSE_STDPATHS 1
210 # endif
211 #endif /* !defined(wxUSE_STDPATHS) */
212
213 #ifndef wxUSE_XML
214 # ifdef wxABORT_ON_CONFIG_ERROR
215 # error "wxUSE_XML must be defined."
216 # else
217 # define wxUSE_XML 0
218 # endif
219 #endif /* !defined(wxUSE_XML) */
220
221 #ifndef wxUSE_SOCKETS
222 # ifdef wxABORT_ON_CONFIG_ERROR
223 # error "wxUSE_SOCKETS must be defined."
224 # else
225 # define wxUSE_SOCKETS 0
226 # endif
227 #endif /* !defined(wxUSE_SOCKETS) */
228
229 #ifndef wxUSE_STREAMS
230 # ifdef wxABORT_ON_CONFIG_ERROR
231 # error "wxUSE_STREAMS must be defined."
232 # else
233 # define wxUSE_STREAMS 0
234 # endif
235 #endif /* !defined(wxUSE_STREAMS) */
236
237 #ifndef wxUSE_STOPWATCH
238 # ifdef wxABORT_ON_CONFIG_ERROR
239 # error "wxUSE_STOPWATCH must be defined."
240 # else
241 # define wxUSE_STOPWATCH 0
242 # endif
243 #endif /* !defined(wxUSE_STOPWATCH) */
244
245 #ifndef wxUSE_TEXTBUFFER
246 # ifdef wxABORT_ON_CONFIG_ERROR
247 # error "wxUSE_TEXTBUFFER must be defined."
248 # else
249 # define wxUSE_TEXTBUFFER 0
250 # endif
251 #endif /* !defined(wxUSE_TEXTBUFFER) */
252
253 #ifndef wxUSE_TEXTFILE
254 # ifdef wxABORT_ON_CONFIG_ERROR
255 # error "wxUSE_TEXTFILE must be defined."
256 # else
257 # define wxUSE_TEXTFILE 0
258 # endif
259 #endif /* !defined(wxUSE_TEXTFILE) */
260
261 #ifndef wxUSE_UNICODE
262 # ifdef wxABORT_ON_CONFIG_ERROR
263 # error "wxUSE_UNICODE must be defined."
264 # else
265 # define wxUSE_UNICODE 0
266 # endif
267 #endif /* !defined(wxUSE_UNICODE) */
268
269 #ifndef wxUSE_URL
270 # ifdef wxABORT_ON_CONFIG_ERROR
271 # error "wxUSE_URL must be defined."
272 # else
273 # define wxUSE_URL 0
274 # endif
275 #endif /* !defined(wxUSE_URL) */
276
277 /*
278 all these tests are for GUI only
279 */
280 #if wxUSE_GUI
281
282 /*
283 all of the settings tested below must be defined or we'd get an error from
284 preprocessor about invalid integer expression
285 */
286
287 #ifndef wxUSE_ACCEL
288 # ifdef wxABORT_ON_CONFIG_ERROR
289 # error "wxUSE_ACCEL must be defined."
290 # else
291 # define wxUSE_ACCEL 0
292 # endif
293 #endif /* !defined(wxUSE_ACCEL) */
294
295 #ifndef wxUSE_BMPBUTTON
296 # ifdef wxABORT_ON_CONFIG_ERROR
297 # error "wxUSE_BMPBUTTON must be defined."
298 # else
299 # define wxUSE_BMPBUTTON 0
300 # endif
301 #endif /* !defined(wxUSE_BMPBUTTON) */
302
303 #ifndef wxUSE_BUTTON
304 # ifdef wxABORT_ON_CONFIG_ERROR
305 # error "wxUSE_BUTTON must be defined."
306 # else
307 # define wxUSE_BUTTON 0
308 # endif
309 #endif /* !defined(wxUSE_BUTTON) */
310
311 #ifndef wxUSE_CALENDARCTRL
312 # ifdef wxABORT_ON_CONFIG_ERROR
313 # error "wxUSE_CALENDARCTRL must be defined."
314 # else
315 # define wxUSE_CALENDARCTRL 0
316 # endif
317 #endif /* !defined(wxUSE_CALENDARCTRL) */
318
319 #ifndef wxUSE_CARET
320 # ifdef wxABORT_ON_CONFIG_ERROR
321 # error "wxUSE_CARET must be defined."
322 # else
323 # define wxUSE_CARET 0
324 # endif
325 #endif /* !defined(wxUSE_CARET) */
326
327 #ifndef wxUSE_CHECKBOX
328 # ifdef wxABORT_ON_CONFIG_ERROR
329 # error "wxUSE_CHECKBOX must be defined."
330 # else
331 # define wxUSE_CHECKBOX 0
332 # endif
333 #endif /* !defined(wxUSE_CHECKBOX) */
334
335 #ifndef wxUSE_CHECKLISTBOX
336 # ifdef wxABORT_ON_CONFIG_ERROR
337 # error "wxUSE_CHECKLISTBOX must be defined."
338 # else
339 # define wxUSE_CHECKLISTBOX 0
340 # endif
341 #endif /* !defined(wxUSE_CHECKLISTBOX) */
342
343 #ifndef wxUSE_CHOICE
344 # ifdef wxABORT_ON_CONFIG_ERROR
345 # error "wxUSE_CHOICE must be defined."
346 # else
347 # define wxUSE_CHOICE 0
348 # endif
349 #endif /* !defined(wxUSE_CHOICE) */
350
351 #ifndef wxUSE_CHOICEBOOK
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_CHOICEBOOK must be defined."
354 # else
355 # define wxUSE_CHOICEBOOK 0
356 # endif
357 #endif /* !defined(wxUSE_CHOICEBOOK) */
358
359 #ifndef wxUSE_CHOICEDLG
360 # ifdef wxABORT_ON_CONFIG_ERROR
361 # error "wxUSE_CHOICEDLG must be defined."
362 # else
363 # define wxUSE_CHOICEDLG 0
364 # endif
365 #endif /* !defined(wxUSE_CHOICEDLG) */
366
367 #ifndef wxUSE_CLIPBOARD
368 # ifdef wxABORT_ON_CONFIG_ERROR
369 # error "wxUSE_CLIPBOARD must be defined."
370 # else
371 # define wxUSE_CLIPBOARD 0
372 # endif
373 #endif /* !defined(wxUSE_CLIPBOARD) */
374
375 #ifndef wxUSE_COLOURDLG
376 # ifdef wxABORT_ON_CONFIG_ERROR
377 # error "wxUSE_COLOURDLG must be defined."
378 # else
379 # define wxUSE_COLOURDLG 0
380 # endif
381 #endif /* !defined(wxUSE_COLOURDLG) */
382
383 #ifndef wxUSE_COMBOBOX
384 # ifdef wxABORT_ON_CONFIG_ERROR
385 # error "wxUSE_COMBOBOX must be defined."
386 # else
387 # define wxUSE_COMBOBOX 0
388 # endif
389 #endif /* !defined(wxUSE_COMBOBOX) */
390
391 #ifndef wxUSE_DATAOBJ
392 # ifdef wxABORT_ON_CONFIG_ERROR
393 # error "wxUSE_DATAOBJ must be defined."
394 # else
395 # define wxUSE_DATAOBJ 0
396 # endif
397 #endif /* !defined(wxUSE_DATAOBJ) */
398
399 #ifndef wxUSE_DATEPICKCTRL
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxUSE_DATEPICKCTRL must be defined."
402 # else
403 # define wxUSE_DATEPICKCTRL 0
404 # endif
405 #endif /* !defined(wxUSE_DATEPICKCTRL) */
406
407 #ifndef wxUSE_DISPLAY
408 # ifdef wxABORT_ON_CONFIG_ERROR
409 # error "wxUSE_DISPLAY must be defined."
410 # else
411 # define wxUSE_DISPLAY 0
412 # endif
413 #endif /* !defined(wxUSE_DISPLAY) */
414
415 #ifndef wxUSE_DOC_VIEW_ARCHITECTURE
416 # ifdef wxABORT_ON_CONFIG_ERROR
417 # error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
418 # else
419 # define wxUSE_DOC_VIEW_ARCHITECTURE 0
420 # endif
421 #endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
422
423 #ifndef wxUSE_FILEDLG
424 # ifdef wxABORT_ON_CONFIG_ERROR
425 # error "wxUSE_FILEDLG must be defined."
426 # else
427 # define wxUSE_FILEDLG 0
428 # endif
429 #endif /* !defined(wxUSE_FILEDLG) */
430
431 #ifndef wxUSE_FONTDLG
432 # ifdef wxABORT_ON_CONFIG_ERROR
433 # error "wxUSE_FONTDLG must be defined."
434 # else
435 # define wxUSE_FONTDLG 0
436 # endif
437 #endif /* !defined(wxUSE_FONTDLG) */
438
439 #ifndef wxUSE_FONTMAP
440 # ifdef wxABORT_ON_CONFIG_ERROR
441 # error "wxUSE_FONTMAP must be defined."
442 # else
443 # define wxUSE_FONTMAP 0
444 # endif
445 #endif /* !defined(wxUSE_FONTMAP) */
446
447 #ifndef wxUSE_GAUGE
448 # ifdef wxABORT_ON_CONFIG_ERROR
449 # error "wxUSE_GAUGE must be defined."
450 # else
451 # define wxUSE_GAUGE 0
452 # endif
453 #endif /* !defined(wxUSE_GAUGE) */
454
455 #ifndef wxUSE_GRID
456 # ifdef wxABORT_ON_CONFIG_ERROR
457 # error "wxUSE_GRID must be defined."
458 # else
459 # define wxUSE_GRID 0
460 # endif
461 #endif /* !defined(wxUSE_GRID) */
462
463 #ifndef wxUSE_HELP
464 # ifdef wxABORT_ON_CONFIG_ERROR
465 # error "wxUSE_HELP must be defined."
466 # else
467 # define wxUSE_HELP 0
468 # endif
469 #endif /* !defined(wxUSE_HELP) */
470
471 #ifndef wxUSE_HTML
472 # ifdef wxABORT_ON_CONFIG_ERROR
473 # error "wxUSE_HTML must be defined."
474 # else
475 # define wxUSE_HTML 0
476 # endif
477 #endif /* !defined(wxUSE_HTML) */
478
479 #ifndef wxUSE_XRC
480 # ifdef wxABORT_ON_CONFIG_ERROR
481 # error "wxUSE_XRC must be defined."
482 # else
483 # define wxUSE_XRC 0
484 # endif
485 #endif /* !defined(wxUSE_XRC) */
486
487 #ifndef wxUSE_LIBMSPACK
488 # ifndef __UNIX__
489 /* set to 0 on platforms that don't have libmspack */
490 # define wxUSE_LIBMSPACK 0
491 # else
492 # ifdef wxABORT_ON_CONFIG_ERROR
493 # error "wxUSE_LIBMSPACK must be defined."
494 # else
495 # define wxUSE_LIBMSPACK 0
496 # endif
497 # endif
498 #endif /* !defined(wxUSE_LIBMSPACK) */
499
500 #ifndef wxUSE_ICO_CUR
501 # ifdef wxABORT_ON_CONFIG_ERROR
502 # error "wxUSE_ICO_CUR must be defined."
503 # else
504 # define wxUSE_ICO_CUR 0
505 # endif
506 #endif /* !defined(wxUSE_ICO_CUR) */
507
508 #ifndef wxUSE_IFF
509 # ifdef wxABORT_ON_CONFIG_ERROR
510 # error "wxUSE_IFF must be defined."
511 # else
512 # define wxUSE_IFF 0
513 # endif
514 #endif /* !defined(wxUSE_IFF) */
515
516 #ifndef wxUSE_IMAGLIST
517 # ifdef wxABORT_ON_CONFIG_ERROR
518 # error "wxUSE_IMAGLIST must be defined."
519 # else
520 # define wxUSE_IMAGLIST 0
521 # endif
522 #endif /* !defined(wxUSE_IMAGLIST) */
523
524 #ifndef wxUSE_JOYSTICK
525 # ifdef wxABORT_ON_CONFIG_ERROR
526 # error "wxUSE_JOYSTICK must be defined."
527 # else
528 # define wxUSE_JOYSTICK 0
529 # endif
530 #endif /* !defined(wxUSE_JOYSTICK) */
531
532 #ifndef wxUSE_LISTBOOK
533 # ifdef wxABORT_ON_CONFIG_ERROR
534 # error "wxUSE_LISTBOOK must be defined."
535 # else
536 # define wxUSE_LISTBOOK 0
537 # endif
538 #endif /* !defined(wxUSE_LISTBOOK) */
539
540 #ifndef wxUSE_LISTBOX
541 # ifdef wxABORT_ON_CONFIG_ERROR
542 # error "wxUSE_LISTBOX must be defined."
543 # else
544 # define wxUSE_LISTBOX 0
545 # endif
546 #endif /* !defined(wxUSE_LISTBOX) */
547
548 #ifndef wxUSE_LISTCTRL
549 # ifdef wxABORT_ON_CONFIG_ERROR
550 # error "wxUSE_LISTCTRL must be defined."
551 # else
552 # define wxUSE_LISTCTRL 0
553 # endif
554 #endif /* !defined(wxUSE_LISTCTRL) */
555
556 #ifndef wxUSE_LOGGUI
557 # ifdef wxABORT_ON_CONFIG_ERROR
558 # error "wxUSE_LOGGUI must be defined."
559 # else
560 # define wxUSE_LOGGUI 0
561 # endif
562 #endif /* !defined(wxUSE_LOGGUI) */
563
564 #ifndef wxUSE_LOGWINDOW
565 # ifdef wxABORT_ON_CONFIG_ERROR
566 # error "wxUSE_LOGWINDOW must be defined."
567 # else
568 # define wxUSE_LOGWINDOW 0
569 # endif
570 #endif /* !defined(wxUSE_LOGWINDOW) */
571
572 #ifndef wxUSE_LOG_DIALOG
573 # ifdef wxABORT_ON_CONFIG_ERROR
574 # error "wxUSE_LOG_DIALOG must be defined."
575 # else
576 # define wxUSE_LOG_DIALOG 0
577 # endif
578 #endif /* !defined(wxUSE_LOG_DIALOG) */
579
580 #ifndef wxUSE_MDI
581 # ifdef wxABORT_ON_CONFIG_ERROR
582 # error "wxUSE_MDI must be defined."
583 # else
584 # define wxUSE_MDI 0
585 # endif
586 #endif /* !defined(wxUSE_MDI) */
587
588 #ifndef wxUSE_MDI_ARCHITECTURE
589 # ifdef wxABORT_ON_CONFIG_ERROR
590 # error "wxUSE_MDI_ARCHITECTURE must be defined."
591 # else
592 # define wxUSE_MDI_ARCHITECTURE 0
593 # endif
594 #endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
595
596 #ifndef wxUSE_MENUS
597 # ifdef wxABORT_ON_CONFIG_ERROR
598 # error "wxUSE_MENUS must be defined."
599 # else
600 # define wxUSE_MENUS 0
601 # endif
602 #endif /* !defined(wxUSE_MENUS) */
603
604 #ifndef wxUSE_MSGDLG
605 # ifdef wxABORT_ON_CONFIG_ERROR
606 # error "wxUSE_MSGDLG must be defined."
607 # else
608 # define wxUSE_MSGDLG 0
609 # endif
610 #endif /* !defined(wxUSE_MSGDLG) */
611
612 #ifndef wxUSE_NOTEBOOK
613 # ifdef wxABORT_ON_CONFIG_ERROR
614 # error "wxUSE_NOTEBOOK must be defined."
615 # else
616 # define wxUSE_NOTEBOOK 0
617 # endif
618 #endif /* !defined(wxUSE_NOTEBOOK) */
619
620 #ifndef wxUSE_PALETTE
621 # ifdef wxABORT_ON_CONFIG_ERROR
622 # error "wxUSE_PALETTE must be defined."
623 # else
624 # define wxUSE_PALETTE 0
625 # endif
626 #endif /* !defined(wxUSE_PALETTE) */
627
628 #ifndef wxUSE_POPUPWIN
629 # ifdef wxABORT_ON_CONFIG_ERROR
630 # error "wxUSE_POPUPWIN must be defined."
631 # else
632 # define wxUSE_POPUPWIN 0
633 # endif
634 #endif /* !defined(wxUSE_POPUPWIN) */
635
636 #ifndef wxUSE_PRINTING_ARCHITECTURE
637 # ifdef wxABORT_ON_CONFIG_ERROR
638 # error "wxUSE_PRINTING_ARCHITECTURE must be defined."
639 # else
640 # define wxUSE_PRINTING_ARCHITECTURE 0
641 # endif
642 #endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
643
644 #ifndef wxUSE_RADIOBOX
645 # ifdef wxABORT_ON_CONFIG_ERROR
646 # error "wxUSE_RADIOBOX must be defined."
647 # else
648 # define wxUSE_RADIOBOX 0
649 # endif
650 #endif /* !defined(wxUSE_RADIOBOX) */
651
652 #ifndef wxUSE_RADIOBTN
653 # ifdef wxABORT_ON_CONFIG_ERROR
654 # error "wxUSE_RADIOBTN must be defined."
655 # else
656 # define wxUSE_RADIOBTN 0
657 # endif
658 #endif /* !defined(wxUSE_RADIOBTN) */
659
660 #ifndef wxUSE_SASH
661 # ifdef wxABORT_ON_CONFIG_ERROR
662 # error "wxUSE_SASH must be defined."
663 # else
664 # define wxUSE_SASH 0
665 # endif
666 #endif /* !defined(wxUSE_SASH) */
667
668 #ifndef wxUSE_SCROLLBAR
669 # ifdef wxABORT_ON_CONFIG_ERROR
670 # error "wxUSE_SCROLLBAR must be defined."
671 # else
672 # define wxUSE_SCROLLBAR 0
673 # endif
674 #endif /* !defined(wxUSE_SCROLLBAR) */
675
676 #ifndef wxUSE_SLIDER
677 # ifdef wxABORT_ON_CONFIG_ERROR
678 # error "wxUSE_SLIDER must be defined."
679 # else
680 # define wxUSE_SLIDER 0
681 # endif
682 #endif /* !defined(wxUSE_SLIDER) */
683
684 #ifndef wxUSE_SOUND
685 # ifdef wxABORT_ON_CONFIG_ERROR
686 # error "wxUSE_SOUND must be defined."
687 # else
688 # define wxUSE_SOUND 0
689 # endif
690 #endif /* !defined(wxUSE_SOUND) */
691
692 #ifndef wxUSE_SPINBTN
693 # ifdef wxABORT_ON_CONFIG_ERROR
694 # error "wxUSE_SPINBTN must be defined."
695 # else
696 # define wxUSE_SPINBTN 0
697 # endif
698 #endif /* !defined(wxUSE_SPINBTN) */
699
700 #ifndef wxUSE_SPINCTRL
701 # ifdef wxABORT_ON_CONFIG_ERROR
702 # error "wxUSE_SPINCTRL must be defined."
703 # else
704 # define wxUSE_SPINCTRL 0
705 # endif
706 #endif /* !defined(wxUSE_SPINCTRL) */
707
708 #ifndef wxUSE_SPLASH
709 # ifdef wxABORT_ON_CONFIG_ERROR
710 # error "wxUSE_SPLASH must be defined."
711 # else
712 # define wxUSE_SPLASH 0
713 # endif
714 #endif /* !defined(wxUSE_SPLASH) */
715
716 #ifndef wxUSE_SPLITTER
717 # ifdef wxABORT_ON_CONFIG_ERROR
718 # error "wxUSE_SPLITTER must be defined."
719 # else
720 # define wxUSE_SPLITTER 0
721 # endif
722 #endif /* !defined(wxUSE_SPLITTER) */
723
724 #ifndef wxUSE_STATBMP
725 # ifdef wxABORT_ON_CONFIG_ERROR
726 # error "wxUSE_STATBMP must be defined."
727 # else
728 # define wxUSE_STATBMP 0
729 # endif
730 #endif /* !defined(wxUSE_STATBMP) */
731
732 #ifndef wxUSE_STATBOX
733 # ifdef wxABORT_ON_CONFIG_ERROR
734 # error "wxUSE_STATBOX must be defined."
735 # else
736 # define wxUSE_STATBOX 0
737 # endif
738 #endif /* !defined(wxUSE_STATBOX) */
739
740 #ifndef wxUSE_STATLINE
741 # ifdef wxABORT_ON_CONFIG_ERROR
742 # error "wxUSE_STATLINE must be defined."
743 # else
744 # define wxUSE_STATLINE 0
745 # endif
746 #endif /* !defined(wxUSE_STATLINE) */
747
748 #ifndef wxUSE_STATTEXT
749 # ifdef wxABORT_ON_CONFIG_ERROR
750 # error "wxUSE_STATTEXT must be defined."
751 # else
752 # define wxUSE_STATTEXT 0
753 # endif
754 #endif /* !defined(wxUSE_STATTEXT) */
755
756 #ifndef wxUSE_STATUSBAR
757 # ifdef wxABORT_ON_CONFIG_ERROR
758 # error "wxUSE_STATUSBAR must be defined."
759 # else
760 # define wxUSE_STATUSBAR 0
761 # endif
762 #endif /* !defined(wxUSE_STATUSBAR) */
763
764 #ifndef wxUSE_TAB_DIALOG
765 # ifdef wxABORT_ON_CONFIG_ERROR
766 # error "wxUSE_TAB_DIALOG must be defined."
767 # else
768 # define wxUSE_TAB_DIALOG 0
769 # endif
770 #endif /* !defined(wxUSE_TAB_DIALOG) */
771
772 #ifndef wxUSE_TEXTCTRL
773 # ifdef wxABORT_ON_CONFIG_ERROR
774 # error "wxUSE_TEXTCTRL must be defined."
775 # else
776 # define wxUSE_TEXTCTRL 0
777 # endif
778 #endif /* !defined(wxUSE_TEXTCTRL) */
779
780 #ifndef wxUSE_TIPWINDOW
781 # ifdef wxABORT_ON_CONFIG_ERROR
782 # error "wxUSE_TIPWINDOW must be defined."
783 # else
784 # define wxUSE_TIPWINDOW 0
785 # endif
786 #endif /* !defined(wxUSE_TIPWINDOW) */
787
788 #ifndef wxUSE_TOOLBAR
789 # ifdef wxABORT_ON_CONFIG_ERROR
790 # error "wxUSE_TOOLBAR must be defined."
791 # else
792 # define wxUSE_TOOLBAR 0
793 # endif
794 #endif /* !defined(wxUSE_TOOLBAR) */
795
796 #ifndef wxUSE_TOOLTIPS
797 # ifdef wxABORT_ON_CONFIG_ERROR
798 # error "wxUSE_TOOLTIPS must be defined."
799 # else
800 # define wxUSE_TOOLTIPS 0
801 # endif
802 #endif /* !defined(wxUSE_TOOLTIPS) */
803
804 #ifndef wxUSE_TREECTRL
805 # ifdef wxABORT_ON_CONFIG_ERROR
806 # error "wxUSE_TREECTRL must be defined."
807 # else
808 # define wxUSE_TREECTRL 0
809 # endif
810 #endif /* !defined(wxUSE_TREECTRL) */
811
812 #ifndef wxUSE_VALIDATORS
813 # ifdef wxABORT_ON_CONFIG_ERROR
814 # error "wxUSE_VALIDATORS must be defined."
815 # else
816 # define wxUSE_VALIDATORS 0
817 # endif
818 #endif /* !defined(wxUSE_VALIDATORS) */
819
820 #ifndef wxUSE_WXHTML_HELP
821 # ifdef wxABORT_ON_CONFIG_ERROR
822 # error "wxUSE_WXHTML_HELP must be defined."
823 # else
824 # define wxUSE_WXHTML_HELP 0
825 # endif
826 #endif /* !defined(wxUSE_WXHTML_HELP) */
827
828 #endif /* wxUSE_GUI */
829
830 /*
831 check consistency of the settings
832 */
833
834 #if WXWIN_COMPATIBILITY_2_4
835 # if !WXWIN_COMPATIBILITY_2_6
836 # ifdef wxABORT_ON_CONFIG_ERROR
837 # error "2.4.X compatibility requires 2.6.X compatibility"
838 # else
839 # undef WXWIN_COMPATIBILITY_2_6
840 # define WXWIN_COMPATIBILITY_2_6 1
841 # endif
842 # endif
843 #endif /* WXWIN_COMPATIBILITY_2_4 */
844
845 #if wxUSE_ARCHIVE_STREAMS
846 # if !wxUSE_DATETIME
847 # ifdef wxABORT_ON_CONFIG_ERROR
848 # error "wxArchive requires wxUSE_DATETIME"
849 # else
850 # undef wxUSE_ARCHIVE_STREAMS
851 # define wxUSE_ARCHIVE_STREAMS 0
852 # endif
853 # endif
854 #endif /* wxUSE_ARCHIVE_STREAMS */
855
856 #if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
857 # ifdef wxABORT_ON_CONFIG_ERROR
858 # error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
859 # else
860 # undef wxUSE_CRASHREPORT
861 # define wxUSE_CRASHREPORT 0
862 # endif
863 #endif /* wxUSE_CRASHREPORT */
864
865 #if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
866 # if !wxUSE_PROTOCOL
867 # ifdef wxABORT_ON_CONFIG_ERROR
868 # error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
869 # else
870 # undef wxUSE_PROTOCOL
871 # define wxUSE_PROTOCOL 1
872 # endif
873 # endif
874 #endif /* wxUSE_PROTOCOL_XXX */
875
876 #if wxUSE_URL
877 # if !wxUSE_PROTOCOL
878 # ifdef wxABORT_ON_CONFIG_ERROR
879 # error "wxUSE_URL requires wxUSE_PROTOCOL"
880 # else
881 # undef wxUSE_PROTOCOL
882 # define wxUSE_PROTOCOL 1
883 # endif
884 # endif
885 #endif /* wxUSE_URL */
886
887 #if wxUSE_PROTOCOL
888 # if !wxUSE_SOCKETS
889 # if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
890 # ifdef wxABORT_ON_CONFIG_ERROR
891 # error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
892 # else
893 # undef wxUSE_SOCKETS
894 # define wxUSE_SOCKETS 1
895 # endif
896 # endif
897 # endif
898
899 # if !wxUSE_STREAMS
900 # ifdef wxABORT_ON_CONFIG_ERROR
901 # error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
902 # else
903 # undef wxUSE_STREAMS
904 # define wxUSE_STREAMS 1
905 # endif
906 # endif
907 #endif /* wxUSE_PROTOCOL */
908
909 /* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
910 #if wxUSE_HTML
911 # if !wxUSE_FILESYSTEM
912 # ifdef wxABORT_ON_CONFIG_ERROR
913 # error "wxHTML requires wxFileSystem"
914 # else
915 # undef wxUSE_FILESYSTEM
916 # define wxUSE_FILESYSTEM 1
917 # endif
918 # endif
919 #endif /* wxUSE_HTML */
920
921 #if wxUSE_FILESYSTEM
922 # if !wxUSE_STREAMS
923 # ifdef wxABORT_ON_CONFIG_ERROR
924 # error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
925 # else
926 # undef wxUSE_STREAMS
927 # define wxUSE_STREAMS 1
928 # endif
929 # endif
930 #endif /* wxUSE_FILESYSTEM */
931
932 #if wxUSE_FS_INET
933 # if !wxUSE_PROTOCOL
934 # ifdef wxABORT_ON_CONFIG_ERROR
935 # error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
936 # else
937 # undef wxUSE_PROTOCOL
938 # define wxUSE_PROTOCOL 1
939 # endif
940 # endif
941 #endif /* wxUSE_FS_INET */
942
943 #if wxUSE_STOPWATCH || wxUSE_DATETIME
944 # if !wxUSE_LONGLONG
945 # ifdef wxABORT_ON_CONFIG_ERROR
946 # error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
947 # else
948 # undef wxUSE_LONGLONG
949 # define wxUSE_LONGLONG 1
950 # endif
951 # endif
952 #endif /* wxUSE_STOPWATCH */
953
954 #if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
955 # ifdef wxABORT_ON_CONFIG_ERROR
956 # error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
957 # else
958 # undef wxUSE_TEXTFILE
959 # define wxUSE_TEXTFILE 1
960 # endif
961 #endif /* wxUSE_MIMETYPE */
962
963 #if wxUSE_ODBC
964 # if !wxUSE_DATETIME
965 # ifdef wxABORT_ON_CONFIG_ERROR
966 # error "wxODBC requires wxUSE_DATETIME"
967 # else
968 # undef wxUSE_ODBC
969 # define wxUSE_ODBC 0
970 # endif
971 # endif
972 #endif /* wxUSE_ODBC */
973
974 #if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
975 # ifdef wxABORT_ON_CONFIG_ERROR
976 # error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
977 # else
978 # undef wxUSE_TEXTBUFFER
979 # define wxUSE_TEXTBUFFER 1
980 # endif
981 #endif /* wxUSE_TEXTFILE */
982
983 #if wxUSE_TEXTFILE && !wxUSE_FILE
984 # ifdef wxABORT_ON_CONFIG_ERROR
985 # error "wxUSE_TEXTFILE requires wxUSE_FILE"
986 # else
987 # undef wxUSE_FILE
988 # define wxUSE_FILE 1
989 # endif
990 #endif /* wxUSE_TEXTFILE */
991
992 #if wxUSE_XML && !wxUSE_WCHAR_T
993 # ifdef wxABORT_ON_CONFIG_ERROR
994 # error "wxUSE_XML requires wxUSE_WCHAR_T"
995 # else
996 # undef wxUSE_XML
997 # define wxUSE_XML 0
998 # endif
999 #endif /* wxUSE_XML */
1000
1001 #if !wxUSE_DYNLIB_CLASS
1002 # if wxUSE_DYNAMIC_LOADER
1003 # ifdef wxABORT_ON_CONFIG_ERROR
1004 # error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS."
1005 # else
1006 # define wxUSE_DYNLIB_CLASS 1
1007 # endif
1008 # endif
1009 #endif /* wxUSE_DYNLIB_CLASS */
1010
1011 #if wxUSE_ZIPSTREAM
1012 # if !wxUSE_ZLIB
1013 # ifdef wxABORT_ON_CONFIG_ERROR
1014 # error "wxZip requires wxZlib"
1015 # else
1016 # undef wxUSE_ZLIB
1017 # define wxUSE_ZLIB 1
1018 # endif
1019 # endif
1020 # if !wxUSE_ARCHIVE_STREAMS
1021 # ifdef wxABORT_ON_CONFIG_ERROR
1022 # error "wxZip requires wxArchive"
1023 # else
1024 # undef wxUSE_ARCHIVE_STREAMS
1025 # define wxUSE_ARCHIVE_STREAMS 1
1026 # endif
1027 # endif
1028 #endif /* wxUSE_ZIPSTREAM */
1029
1030 /* the rest of the tests is for the GUI settings only */
1031 #if wxUSE_GUI
1032
1033 #if wxUSE_BUTTON || \
1034 wxUSE_CALENDARCTRL || \
1035 wxUSE_CARET || \
1036 wxUSE_COMBOBOX || \
1037 wxUSE_BMPBUTTON || \
1038 wxUSE_CHECKBOX || \
1039 wxUSE_CHECKLISTBOX || \
1040 wxUSE_CHOICE || \
1041 wxUSE_GAUGE || \
1042 wxUSE_GRID || \
1043 wxUSE_LISTBOX || \
1044 wxUSE_LISTCTRL || \
1045 wxUSE_NOTEBOOK || \
1046 wxUSE_RADIOBOX || \
1047 wxUSE_RADIOBTN || \
1048 wxUSE_SCROLLBAR || \
1049 wxUSE_SLIDER || \
1050 wxUSE_SPINBTN || \
1051 wxUSE_SPINCTRL || \
1052 wxUSE_STATBMP || \
1053 wxUSE_STATBOX || \
1054 wxUSE_STATLINE || \
1055 wxUSE_STATTEXT || \
1056 wxUSE_STATUSBAR || \
1057 wxUSE_TEXTCTRL || \
1058 wxUSE_TOOLBAR || \
1059 wxUSE_TREECTRL
1060 # if !wxUSE_CONTROLS
1061 # ifdef wxABORT_ON_CONFIG_ERROR
1062 # error "wxUSE_CONTROLS unset but some controls used"
1063 # else
1064 # undef wxUSE_CONTROLS
1065 # define wxUSE_CONTROLS 1
1066 # endif
1067 # endif
1068 #endif /* controls */
1069
1070 #if wxUSE_BMPBUTTON
1071 # if !wxUSE_BUTTON
1072 # ifdef wxABORT_ON_CONFIG_ERROR
1073 # error "wxUSE_BMPBUTTON requires wxUSE_BUTTON"
1074 # else
1075 # undef wxUSE_BUTTON
1076 # define wxUSE_BUTTON 1
1077 # endif
1078 # endif
1079 #endif /* wxUSE_BMPBUTTON */
1080
1081 #if wxUSE_NOTEBOOK || wxUSE_LISTBOOK || wxUSE_CHOICEBOOK
1082 # if defined(wxUSE_BOOKCTRL) && !wxUSE_BOOKCTRL
1083 # ifdef wxABORT_ON_CONFIG_ERROR
1084 # error "wxUSE_BOOKCTRL must be set."
1085 # else
1086 # undef wxUSE_BOOKCTRL
1087 # endif
1088 # endif
1089
1090 # ifndef wxUSE_BOOKCTRL
1091 # define wxUSE_BOOKCTRL 1
1092 # endif
1093 #endif /* wxUSE_NOTEBOOK */
1094
1095 #if wxUSE_LISTBOOK
1096 # if !wxUSE_LISTCTRL
1097 # ifdef wxABORT_ON_CONFIG_ERROR
1098 # error "wxListbook requires wxListCtrl"
1099 # else
1100 # undef wxUSE_LISTCTRL
1101 # define wxUSE_LISTCTRL 1
1102 # endif
1103 # endif
1104 #endif /* wxUSE_LISTBOOK */
1105
1106 #if wxUSE_CHOICEBOOK
1107 # if !wxUSE_CHOICE
1108 # ifdef wxABORT_ON_CONFIG_ERROR
1109 # error "wxChoicebook requires wxChoice"
1110 # else
1111 # undef wxUSE_CHOICE
1112 # define wxUSE_CHOICE 1
1113 # endif
1114 # endif
1115 #endif /* wxUSE_CHOICEBOOK */
1116
1117 /* don't attempt to use native status bar on the platforms not having it */
1118 #ifndef wxUSE_NATIVE_STATUSBAR
1119 # define wxUSE_NATIVE_STATUSBAR 0
1120 #elif wxUSE_NATIVE_STATUSBAR
1121 # if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \
1122 defined(__WXMAC__) || \
1123 defined(__WXPALMOS__) )
1124 # undef wxUSE_NATIVE_STATUSBAR
1125 # define wxUSE_NATIVE_STATUSBAR 0
1126 # endif
1127 #endif
1128
1129 /* wxUniv-specific dependencies */
1130 #if defined(__WXUNIVERSAL__)
1131 # if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
1132 # ifdef wxABORT_ON_CONFIG_ERROR
1133 # error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
1134 # else
1135 # undef wxUSE_POPUPWIN
1136 # define wxUSE_POPUPWIN 1
1137 # endif
1138 # endif
1139
1140 # if wxUSE_COMBOBOX
1141 # if !wxUSE_LISTBOX
1142 # ifdef wxABORT_ON_CONFIG_ERROR
1143 # error "wxComboBox requires wxListBox in wxUniversal"
1144 # else
1145 # undef wxUSE_LISTBOX
1146 # define wxUSE_LISTBOX 1
1147 # endif
1148 # endif
1149 # endif /* wxUSE_COMBOBOX */
1150
1151 # if wxUSE_RADIOBTN
1152 # if !wxUSE_CHECKBOX
1153 # ifdef wxABORT_ON_CONFIG_ERROR
1154 # error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
1155 # else
1156 # undef wxUSE_CHECKBOX
1157 # define wxUSE_CHECKBOX 1
1158 # endif
1159 # endif
1160 # endif /* wxUSE_RADIOBTN */
1161
1162 # if wxUSE_TEXTCTRL
1163 # if !wxUSE_CARET
1164 # ifdef wxABORT_ON_CONFIG_ERROR
1165 # error "wxTextCtrl requires wxCaret in wxUniversal"
1166 # else
1167 # undef wxUSE_CARET
1168 # define wxUSE_CARET 1
1169 # endif
1170 # endif /* wxUSE_CARET */
1171
1172 # if !wxUSE_SCROLLBAR
1173 # ifdef wxABORT_ON_CONFIG_ERROR
1174 # error "wxTextCtrl requires wxScrollBar in wxUniversal"
1175 # else
1176 # undef wxUSE_SCROLLBAR
1177 # define wxUSE_SCROLLBAR 1
1178 # endif
1179 # endif /* wxUSE_SCROLLBAR */
1180 # endif /* wxUSE_TEXTCTRL */
1181 #endif /* __WXUNIVERSAL__ */
1182
1183 /* wxGTK-specific dependencies */
1184 #ifdef __WXGTK__
1185 # ifndef __WXUNIVERSAL__
1186 # if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
1187 # ifdef wxABORT_ON_CONFIG_ERROR
1188 # error "MDI requires wxUSE_MENUS in wxGTK"
1189 # else
1190 # undef wxUSE_MENUS
1191 # define wxUSE_MENUS 1
1192 # endif
1193 # endif
1194 # endif /* !__WXUNIVERSAL__ */
1195
1196 # if wxUSE_JOYSTICK
1197 # if !wxUSE_THREADS
1198 # ifdef wxABORT_ON_CONFIG_ERROR
1199 # error "wxJoystick requires threads in wxGTK"
1200 # else
1201 # undef wxUSE_JOYSTICK
1202 # define wxUSE_JOYSTICK 0
1203 # endif
1204 # endif
1205 # endif
1206 #endif /* wxGTK && !wxUniv */
1207
1208 /* wxMGL-specific dependencies */
1209 #ifdef __WXMGL__
1210 # if !wxUSE_PALETTE
1211 # error "wxMGL requires wxUSE_PALETTE=1"
1212 # endif
1213 #endif /* wxMGL */
1214
1215 /* Hopefully we can emulate these dialogs in due course */
1216 #if defined(__SMARTPHONE__) && defined(__WXWINCE__)
1217 # ifdef wxUSE_COLOURDLG
1218 # undef wxUSE_COLOURDLG
1219 # define wxUSE_COLOURDLG 0
1220 # endif
1221 #endif /* __SMARTPHONE__ && __WXWINCE__ */
1222
1223
1224 /* generic controls dependencies */
1225 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
1226 # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
1227 /* all common controls are needed by these dialogs */
1228 # if !defined(wxUSE_CHOICE) || \
1229 !defined(wxUSE_TEXTCTRL) || \
1230 !defined(wxUSE_BUTTON) || \
1231 !defined(wxUSE_CHECKBOX) || \
1232 !defined(wxUSE_STATTEXT)
1233 # ifdef wxABORT_ON_CONFIG_ERROR
1234 # error "These common controls are needed by common dialogs"
1235 # else
1236 # undef wxUSE_CHOICE
1237 # define wxUSE_CHOICE 1
1238 # undef wxUSE_TEXTCTRL
1239 # define wxUSE_TEXTCTRL 1
1240 # undef wxUSE_BUTTON
1241 # define wxUSE_BUTTON 1
1242 # undef wxUSE_CHECKBOX
1243 # define wxUSE_CHECKBOX 1
1244 # undef wxUSE_STATTEXT
1245 # define wxUSE_STATTEXT 1
1246 # endif
1247 # endif
1248 # endif
1249 #endif /* !wxMSW || wxUniv */
1250
1251 /* common dependencies */
1252 #if wxUSE_CALENDARCTRL
1253 # if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
1254 # ifdef wxABORT_ON_CONFIG_ERROR
1255 # error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
1256 # else
1257 # undef wxUSE_SPINBTN
1258 # undef wxUSE_COMBOBOX
1259 # define wxUSE_SPINBTN 1
1260 # define wxUSE_COMBOBOX 1
1261 # endif
1262 # endif
1263
1264 # if !wxUSE_DATETIME
1265 # ifdef wxABORT_ON_CONFIG_ERROR
1266 # error "wxCalendarCtrl requires wxUSE_DATETIME"
1267 # else
1268 # undef wxUSE_DATETIME
1269 # define wxUSE_DATETIME 1
1270 # endif
1271 # endif
1272 #endif /* wxUSE_CALENDARCTRL */
1273
1274 #if wxUSE_DATEPICKCTRL
1275 # if !wxUSE_DATETIME
1276 # ifdef wxABORT_ON_CONFIG_ERROR
1277 # error "wxDatePickerCtrl requires wxUSE_DATETIME"
1278 # else
1279 # undef wxUSE_DATETIME
1280 # define wxUSE_DATETIME 1
1281 # endif
1282 # endif
1283 #endif /* wxUSE_DATEPICKCTRL */
1284
1285 #if wxUSE_CHECKLISTBOX
1286 # if !wxUSE_LISTBOX
1287 # ifdef wxABORT_ON_CONFIG_ERROR
1288 # error "wxCheckListBox requires wxListBox"
1289 # else
1290 # undef wxUSE_LISTBOX
1291 # define wxUSE_LISTBOX 1
1292 # endif
1293 # endif
1294 #endif /* wxUSE_CHECKLISTBOX */
1295
1296 #if wxUSE_CHOICEDLG
1297 # if !wxUSE_LISTBOX
1298 # ifdef wxABORT_ON_CONFIG_ERROR
1299 # error "Choice dialogs requires wxListBox"
1300 # else
1301 # undef wxUSE_LISTBOX
1302 # define wxUSE_LISTBOX 1
1303 # endif
1304 # endif
1305 #endif /* wxUSE_CHOICEDLG */
1306
1307 #if wxUSE_HELP
1308 # if !wxUSE_BMPBUTTON
1309 # ifdef wxABORT_ON_CONFIG_ERROR
1310 # error "wxUSE_HELP requires wxUSE_BMPBUTTON"
1311 # else
1312 # undef wxUSE_BMPBUTTON
1313 # define wxUSE_BMPBUTTON 1
1314 # endif
1315 # endif
1316
1317 # if !wxUSE_CHOICEDLG
1318 # ifdef wxABORT_ON_CONFIG_ERROR
1319 # error "wxUSE_HELP requires wxUSE_CHOICEDLG"
1320 # else
1321 # undef wxUSE_CHOICEDLG
1322 # define wxUSE_CHOICEDLG 1
1323 # endif
1324 # endif
1325 #endif /* wxUSE_HELP */
1326
1327 #if wxUSE_WXHTML_HELP
1328 # if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK || !wxUSE_SPINCTRL
1329 # ifdef wxABORT_ON_CONFIG_ERROR
1330 # error "Built in help controller can't be compiled"
1331 # else
1332 # undef wxUSE_HELP
1333 # define wxUSE_HELP 1
1334 # undef wxUSE_HTML
1335 # define wxUSE_HTML 1
1336 # undef wxUSE_COMBOBOX
1337 # define wxUSE_COMBOBOX 1
1338 # undef wxUSE_NOTEBOOK
1339 # define wxUSE_NOTEBOOK 1
1340 # undef wxUSE_SPINCTRL
1341 # define wxUSE_SPINCTRL 1
1342 # endif
1343 # endif
1344 #endif /* wxUSE_WXHTML_HELP */
1345
1346 #if !wxUSE_IMAGE
1347 /*
1348 The default wxUSE_IMAGE setting is 1, so if it's set to 0 we assume the
1349 user explicitly wants this and disable all other features that require
1350 wxUSE_IMAGE.
1351 */
1352 # if wxUSE_DRAGIMAGE
1353 # ifdef wxABORT_ON_CONFIG_ERROR
1354 # error "wxUSE_DRAGIMAGE requires wxUSE_IMAGE"
1355 # else
1356 # undef wxUSE_DRAGIMAGE
1357 # define wxUSE_DRAGIMAGE 0
1358 # endif
1359 # endif
1360
1361 # if wxUSE_LIBPNG
1362 # ifdef wxABORT_ON_CONFIG_ERROR
1363 # error "wxUSE_LIBPNG requires wxUSE_IMAGE"
1364 # else
1365 # undef wxUSE_LIBPNG
1366 # define wxUSE_LIBPNG 0
1367 # endif
1368 # endif
1369
1370 # if wxUSE_LIBJPEG
1371 # ifdef wxABORT_ON_CONFIG_ERROR
1372 # error "wxUSE_LIBJPEG requires wxUSE_IMAGE"
1373 # else
1374 # undef wxUSE_LIBJPEG
1375 # define wxUSE_LIBJPEG 0
1376 # endif
1377 # endif
1378
1379 # if wxUSE_LIBTIFF
1380 # ifdef wxABORT_ON_CONFIG_ERROR
1381 # error "wxUSE_LIBTIFF requires wxUSE_IMAGE"
1382 # else
1383 # undef wxUSE_LIBTIFF
1384 # define wxUSE_LIBTIFF 0
1385 # endif
1386 # endif
1387
1388 # if wxUSE_GIF
1389 # ifdef wxABORT_ON_CONFIG_ERROR
1390 # error "wxUSE_GIF requires wxUSE_IMAGE"
1391 # else
1392 # undef wxUSE_GIF
1393 # define wxUSE_GIF 0
1394 # endif
1395 # endif
1396
1397 # if wxUSE_PNM
1398 # ifdef wxABORT_ON_CONFIG_ERROR
1399 # error "wxUSE_PNM requires wxUSE_IMAGE"
1400 # else
1401 # undef wxUSE_PNM
1402 # define wxUSE_PNM 0
1403 # endif
1404 # endif
1405
1406 # if wxUSE_PCX
1407 # ifdef wxABORT_ON_CONFIG_ERROR
1408 # error "wxUSE_PCX requires wxUSE_IMAGE"
1409 # else
1410 # undef wxUSE_PCX
1411 # define wxUSE_PCX 0
1412 # endif
1413 # endif
1414
1415 # if wxUSE_IFF
1416 # ifdef wxABORT_ON_CONFIG_ERROR
1417 # error "wxUSE_IFF requires wxUSE_IMAGE"
1418 # else
1419 # undef wxUSE_IFF
1420 # define wxUSE_IFF 0
1421 # endif
1422 # endif
1423
1424 # if wxUSE_TOOLBAR
1425 # ifdef wxABORT_ON_CONFIG_ERROR
1426 # error "wxUSE_TOOLBAR requires wxUSE_IMAGE"
1427 # else
1428 # undef wxUSE_TOOLBAR
1429 # define wxUSE_TOOLBAR 0
1430 # endif
1431 # endif
1432
1433 # if wxUSE_XPM
1434 # ifdef wxABORT_ON_CONFIG_ERROR
1435 # error "wxUSE_XPM requires wxUSE_IMAGE"
1436 # else
1437 # undef wxUSE_XPM
1438 # define wxUSE_XPM 0
1439 # endif
1440 # endif
1441
1442 #endif /* !wxUSE_IMAGE */
1443
1444 #if wxUSE_DOC_VIEW_ARCHITECTURE
1445 # if !wxUSE_MENUS
1446 # ifdef wxABORT_ON_CONFIG_ERROR
1447 # error "DocView requires wxUSE_MENUS"
1448 # else
1449 # undef wxUSE_MENUS
1450 # define wxUSE_MENUS 1
1451 # endif
1452 # endif
1453
1454 # if !wxUSE_CHOICEDLG
1455 # ifdef wxABORT_ON_CONFIG_ERROR
1456 # error "DocView requires wxUSE_CHOICEDLG"
1457 # else
1458 # undef wxUSE_CHOICEDLG
1459 # define wxUSE_CHOICEDLG 1
1460 # endif
1461 # endif
1462
1463 # if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
1464 # ifdef wxABORT_ON_CONFIG_ERROR
1465 # error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
1466 # else
1467 # undef wxUSE_STREAMS
1468 # define wxUSE_STREAMS 1
1469 # endif
1470 # endif
1471 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
1472
1473 #if wxUSE_PRINTING_ARCHITECTURE
1474 # if !wxUSE_COMBOBOX
1475 # ifdef wxABORT_ON_CONFIG_ERROR
1476 # error "Print dialog requires wxUSE_COMBOBOX"
1477 # else
1478 # undef wxUSE_COMBOBOX
1479 # define wxUSE_COMBOBOX 1
1480 # endif
1481 # endif
1482 #endif /* wxUSE_PRINTING_ARCHITECTURE */
1483
1484 #if wxUSE_MDI_ARCHITECTURE
1485 # if !wxUSE_MDI
1486 # ifdef wxABORT_ON_CONFIG_ERROR
1487 # error "MDI requires wxUSE_MDI"
1488 # else
1489 # undef wxUSE_MDI
1490 # define wxUSE_MDI 1
1491 # endif
1492 # endif
1493
1494 # if !wxUSE_DOC_VIEW_ARCHITECTURE
1495 # ifdef wxABORT_ON_CONFIG_ERROR
1496 # error "wxUSE_MDI_ARCHITECTURE requires wxUSE_DOC_VIEW_ARCHITECTURE"
1497 # else
1498 # undef wxUSE_DOC_VIEW_ARCHITECTURE
1499 # define wxUSE_DOC_VIEW_ARCHITECTURE 1
1500 # endif
1501 # endif
1502 #endif /* wxUSE_MDI_ARCHITECTURE */
1503
1504 #if !wxUSE_FILEDLG
1505 # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
1506 # ifdef wxABORT_ON_CONFIG_ERROR
1507 # error "wxUSE_FILEDLG is required by wxUSE_DOC_VIEW_ARCHITECTURE and wxUSE_WXHTML_HELP!"
1508 # else
1509 # undef wxUSE_FILEDLG
1510 # define wxUSE_FILEDLG 1
1511 # endif
1512 # endif
1513 #endif /* wxUSE_FILEDLG */
1514
1515 #if !wxUSE_GAUGE || !wxUSE_BUTTON
1516 # if wxUSE_PROGRESSDLG && !defined(__WXPALMOS__)
1517 # ifdef wxABORT_ON_CONFIG_ERROR
1518 # error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
1519 # else
1520 # undef wxUSE_GAUGE
1521 # undef wxUSE_BUTTON
1522 # define wxUSE_GAUGE 1
1523 # define wxUSE_BUTTON 1
1524 # endif
1525 # endif
1526 #endif /* !wxUSE_GAUGE */
1527
1528 #if !wxUSE_BUTTON
1529 # if wxUSE_FONTDLG || \
1530 wxUSE_FILEDLG || \
1531 wxUSE_CHOICEDLG || \
1532 wxUSE_NUMBERDLG || \
1533 wxUSE_TEXTDLG || \
1534 wxUSE_DIRDLG || \
1535 wxUSE_STARTUP_TIPS || \
1536 wxUSE_WIZARDDLG
1537 # ifdef wxABORT_ON_CONFIG_ERROR
1538 # error "Common and generic dialogs require wxUSE_BUTTON"
1539 # else
1540 # undef wxUSE_BUTTON
1541 # define wxUSE_BUTTON 1
1542 # endif
1543 # endif
1544 #endif /* !wxUSE_BUTTON */
1545
1546 #if !wxUSE_TOOLBAR
1547 # if wxUSE_TOOLBAR_NATIVE
1548 # ifdef wxABORT_ON_CONFIG_ERROR
1549 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1"
1550 # else
1551 # undef wxUSE_TOOLBAR_NATIVE
1552 # define wxUSE_TOOLBAR_NATIVE 0
1553 # endif
1554 # endif
1555
1556 # if wxUSE_TOOLBAR_SIMPLE
1557 # ifdef wxABORT_ON_CONFIG_ERROR
1558 # error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_SIMPLE is set to 1"
1559 # else
1560 # undef wxUSE_TOOLBAR_SIMPLE
1561 # define wxUSE_TOOLBAR_SIMPLE 0
1562 # endif
1563 # endif
1564 #endif
1565
1566 #if !wxUSE_IMAGLIST
1567 # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
1568 # ifdef wxABORT_ON_CONFIG_ERROR
1569 # error "wxImageList must be compiled as well"
1570 # else
1571 # undef wxUSE_IMAGLIST
1572 # define wxUSE_IMAGLIST 1
1573 # endif
1574 # endif
1575 #endif /* !wxUSE_IMAGLIST */
1576
1577 #if !wxUSE_MSGDLG
1578 # ifdef wxABORT_ON_CONFIG_ERROR
1579 /* FIXME: should compile without it, of course, but doesn't */
1580 # error "wxMessageBox is always needed"
1581 # else
1582 # undef wxUSE_MSGDLG
1583 # define wxUSE_MSGDLG 1
1584 # endif
1585 #endif
1586
1587 #if wxUSE_RADIOBOX
1588 # if !wxUSE_RADIOBTN
1589 # ifdef wxABORT_ON_CONFIG_ERROR
1590 # error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN"
1591 # else
1592 # undef wxUSE_RADIOBTN
1593 # define wxUSE_RADIOBTN 1
1594 # endif
1595 # endif
1596 # if !wxUSE_STATBOX && !defined(__WXPALMOS__)
1597 # ifdef wxABORT_ON_CONFIG_ERROR
1598 # error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
1599 # else
1600 # undef wxUSE_STATBOX
1601 # define wxUSE_STATBOX 1
1602 # endif
1603 # endif
1604 #endif /* wxUSE_RADIOBOX */
1605
1606 #if wxUSE_LOGWINDOW
1607 # if !wxUSE_TEXTCTRL
1608 # ifdef wxABORT_ON_CONFIG_ERROR
1609 # error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
1610 # else
1611 # undef wxUSE_TEXTCTRL
1612 # define wxUSE_TEXTCTRL 1
1613 # endif
1614 # endif
1615 #endif /* wxUSE_LOGWINDOW */
1616
1617 #if wxUSE_LOG_DIALOG
1618 # if !wxUSE_LISTCTRL || !wxUSE_BUTTON
1619 # ifdef wxABORT_ON_CONFIG_ERROR
1620 # error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL and wxUSE_BUTTON"
1621 # else
1622 # undef wxUSE_LISTCTRL
1623 # define wxUSE_LISTCTRL 1
1624 # undef wxUSE_BUTTON
1625 # define wxUSE_BUTTON 1
1626 # endif
1627 # endif
1628 #endif /* wxUSE_LOG_DIALOG */
1629
1630 #if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
1631 # ifdef wxABORT_ON_CONFIG_ERROR
1632 # error "wxClipboard requires wxDataObject"
1633 # else
1634 # undef wxUSE_DATAOBJ
1635 # define wxUSE_DATAOBJ 1
1636 # endif
1637 #endif /* wxUSE_CLIPBOARD */
1638
1639 #if wxUSE_WX_RESOURCES && !wxUSE_PROLOGIO
1640 # ifdef wxABORT_ON_CONFIG_ERROR
1641 # error "wxr resources require PrologIO"
1642 # else
1643 # undef wxUSE_PROLOGIO
1644 # define wxUSE_PROLOGIO 1
1645 # endif
1646 #endif /* wxUSE_WX_RESOURCES */
1647
1648 #if wxUSE_XRC && !wxUSE_XML
1649 # ifdef wxABORT_ON_CONFIG_ERROR
1650 # error "wxUSE_XRC requires wxUSE_XML"
1651 # else
1652 # undef wxUSE_XRC
1653 # define wxUSE_XRC 0
1654 # endif
1655 #endif /* wxUSE_XRC */
1656
1657 #if wxUSE_SOCKETS && !wxUSE_STOPWATCH
1658 # ifdef wxABORT_ON_CONFIG_ERROR
1659 # error "wxUSE_SOCKETS requires wxUSE_STOPWATCH"
1660 # else
1661 # undef wxUSE_SOCKETS
1662 # define wxUSE_SOCKETS 0
1663 # endif
1664 #endif /* wxUSE_SOCKETS */
1665
1666 #endif /* wxUSE_GUI */