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