]> git.saurik.com Git - wxWidgets.git/blame - configure.in
added missing return to avoid 'control reaches end of non-void function'
[wxWidgets.git] / configure.in
CommitLineData
9a98a854
VZ
1dnl Process this file with autoconf to produce a configure script.
2AC_REVISION($Id$)dnl
3
4dnl ---------------------------------------------------------------------------
5dnl
3a922bb4
RL
6dnl Top-level configure.in for wxWindows by Robert Roebling, Phil Blecker,
7dnl Vadim Zeitlin and Ron Lee
9a98a854
VZ
8dnl
9dnl This script is under the wxWindows licence.
10dnl
11dnl Version: $Id$
bcd2b961 12dnl ---------------------------------------------------------------------------
9a98a854
VZ
13
14dnl ---------------------------------------------------------------------------
15dnl initialization
16dnl ---------------------------------------------------------------------------
17
a9b5e89f 18dnl the file passed to AC_INIT should be specific to our package
a72a4bfa 19AC_INIT([wx-config.in])
9a98a854 20
e59890c3 21dnl sets build, host, target variables and the same with _alias
7c66a493
VZ
22AC_CANONICAL_SYSTEM
23
24dnl When making releases do:
25dnl
26dnl WX_RELEASE_NUMBER += 1
2b6f061f 27dnl
6426998c
RL
28dnl ..and update WX_CURRENT, WX_RELEASE and WX_AGE according to the
29dnl following rules:
2b6f061f 30dnl
6426998c
RL
31dnl If any changes have been made to the public interface, that is if any
32dnl exported class, method, global or global type has been added, removed
33dnl or changed in any way, then do: WX_CURRENT += 1
34dnl
35dnl If source changes have been made that *do not* alter the public
36dnl interface then do: WX_REVISION += 1
37dnl If WX_CURRENT was incremented (as above) instead do: WX_REVISION = 0
38dnl
39dnl If any public interface was added, do: WX_AGE += 1
40dnl If any public interface was removed (or altered in a way effectively
41dnl removing the previous definition), instead do: WX_AGE = 0
42dnl
43dnl When the major or minor version numbers are incremented, all the above
44dnl variables should be reset to 0.
45dnl
46dnl The resulting library name will be of the form:
47dnl libwx_$(TOOLKIT)-$(WX_RELEASE).so.$(WX_CURRENT).$(WX_REVISION).$(WX_AGE)
9a98a854
VZ
48
49WX_MAJOR_VERSION_NUMBER=2
1d43cb9e 50WX_MINOR_VERSION_NUMBER=3
a0d927d1 51WX_RELEASE_NUMBER=3
9a98a854 52
2b6f061f 53WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER
2aa88730 54WX_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER
6426998c 55
978f1259
RL
56WX_MSW_VERSION=$WX_MAJOR_VERSION_NUMBER$WX_MINOR_VERSION_NUMBER$WX_RELEASE_NUMBER
57
a0d927d1 58WX_CURRENT=2
6426998c
RL
59WX_REVISION=0
60WX_AGE=0
61
9a98a854
VZ
62
63dnl ------------------------------------------------------------------------
64dnl Check platform (host system)
65dnl ------------------------------------------------------------------------
66
67dnl assume Unix
68USE_UNIX=1
4882bf1b 69USE_WIN32=0
f9bc1684 70USE_DOS=0
b12915c1 71USE_BEOS=0
1216f52d 72USE_MAC=0
b12915c1 73
9a98a854
VZ
74USE_LINUX=
75USE_SGI=
76USE_HPUX=
77USE_SYSV=
78USE_SVR4=
79USE_AIX=
80USE_SUN=
81USE_SOLARIS=
82USE_SUNOS=
83USE_ALPHA=
84USE_OSF=
85USE_BSD=
f11bdd03 86USE_DARWIN=
9a98a854 87USE_FREEBSD=
1cf8c0a9 88USE_OPENBSD=
f6bcfd97 89USE_NETBSD=
9a98a854
VZ
90USE_VMS=
91USE_ULTRIX=
9a98a854
VZ
92USE_DATA_GENERAL=
93
ab9b9eab
VZ
94dnl on some platforms xxx_r() functions are declared inside "#ifdef
95dnl _REENTRANT" and it's easier to just define this symbol for these platforms
96dnl than checking it during run-time
97NEEDS_D_REENTRANT_FOR_R_FUNCS=0
98
ced859c3 99dnl the list of all available toolkits
1e6feb95
VZ
100dnl
101dnl update NUM_TOOLKITS calculation below when adding a new toolkit here!
7f5c07ab 102ALL_TOOLKITS="GTK MAC MGL MICROWIN MOTIF MSW PM WINE X11"
ced859c3 103
9a98a854
VZ
104dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones
105dnl which are either yes or no
106DEFAULT_wxUSE_GTK=0
1e6feb95
VZ
107DEFAULT_wxUSE_MAC=0
108DEFAULT_wxUSE_MGL=0
1725144d 109DEFAULT_wxUSE_MICROWIN=0
9a98a854
VZ
110DEFAULT_wxUSE_MOTIF=0
111DEFAULT_wxUSE_MSW=0
e07802fc 112DEFAULT_wxUSE_PM=0
1e6feb95 113DEFAULT_wxUSE_WINE=0
7f5c07ab 114DEFAULT_wxUSE_X11=0
9a98a854 115
143121c5
VZ
116dnl these are the values which are really default for the given platform -
117dnl they're not cached and are only used if no --with-toolkit was given *and*
118dnl nothing was found in the cache
119DEFAULT_DEFAULT_wxUSE_GTK=0
1e6feb95
VZ
120DEFAULT_DEFAULT_wxUSE_MAC=0
121DEFAULT_DEFAULT_wxUSE_MGL=0
1725144d 122DEFAULT_DEFAULT_wxUSE_MICROWIN=0
143121c5
VZ
123DEFAULT_DEFAULT_wxUSE_MOTIF=0
124DEFAULT_DEFAULT_wxUSE_MSW=0
e07802fc 125DEFAULT_DEFAULT_wxUSE_PM=0
1e6feb95 126DEFAULT_DEFAULT_wxUSE_WINE=0
7f5c07ab 127DEFAULT_DEFAULT_wxUSE_X11=0
143121c5 128
d6a55c4b 129PROGRAM_EXT=
3a922bb4 130SO_SUFFIX=so
d6a55c4b 131
b12915c1
VZ
132dnl to support a new system, you need to add its canonical name (as determined
133dnl by config.sub or specified by the configure command line) to this "case"
134dnl and also define the shared library flags below - search for
135dnl SHARED_LIB_SETUP to find the exact place
9a98a854
VZ
136case "${host}" in
137 *-hp-hpux* )
138 USE_HPUX=1
143121c5 139 DEFAULT_DEFAULT_wxUSE_MOTIF=1
ab9b9eab 140 NEEDS_D_REENTRANT_FOR_R_FUNCS=1
3a922bb4 141 SO_SUFFIX=sl
9a98a854
VZ
142 AC_DEFINE(__HPUX__)
143 ;;
144 *-*-linux* )
145 USE_LINUX=1
146 AC_DEFINE(__LINUX__)
147 TMP=`uname -m`
148 if test "x$TMP" = "xalpha"; then
149 USE_ALPHA=1
150 AC_DEFINE(__ALPHA__)
151 fi
143121c5 152 DEFAULT_DEFAULT_wxUSE_GTK=1
9a98a854
VZ
153 ;;
154 *-*-irix5* | *-*-irix6* )
155 USE_SGI=1
156 USE_SVR4=1
157 AC_DEFINE(__SGI__)
158 AC_DEFINE(__SVR4__)
143121c5 159 DEFAULT_DEFAULT_wxUSE_MOTIF=1
9a98a854
VZ
160 ;;
161 *-*-solaris2* )
162 USE_SUN=1
163 USE_SOLARIS=1
164 USE_SVR4=1
165 AC_DEFINE(__SUN__)
166 AC_DEFINE(__SOLARIS__)
167 AC_DEFINE(__SVR4__)
143121c5 168 DEFAULT_DEFAULT_wxUSE_MOTIF=1
ab9b9eab 169 NEEDS_D_REENTRANT_FOR_R_FUNCS=1
9a98a854
VZ
170 ;;
171 *-*-sunos4* )
172 USE_SUN=1
173 USE_SUNOS=1
174 USE_BSD=1
175 AC_DEFINE(__SUN__)
176 AC_DEFINE(__SUNOS__)
177 AC_DEFINE(__BSD__)
143121c5 178 DEFAULT_DEFAULT_wxUSE_MOTIF=1
9a98a854 179 ;;
f6bcfd97 180 *-*-freebsd*)
9a98a854
VZ
181 USE_BSD=1
182 USE_FREEBSD=1
183 AC_DEFINE(__FREEBSD__)
184 AC_DEFINE(__BSD__)
143121c5 185 DEFAULT_DEFAULT_wxUSE_GTK=1
9a98a854 186 ;;
1cf8c0a9
VZ
187 *-*-openbsd*)
188 USE_BSD=1
189 USE_OPENBSD=1
190 AC_DEFINE(__FREEBSD__)
191 AC_DEFINE(__OPENBSD__)
192 DEFAULT_DEFAULT_wxUSE_GTK=1
193 ;;
f6bcfd97
BP
194 *-*-netbsd*)
195 USE_BSD=1
196 USE_NETBSD=1
197 AC_DEFINE(__FREEBSD__)
198 AC_DEFINE(__NETBSD__)
199 DEFAULT_DEFAULT_wxUSE_GTK=1
200 ;;
9a98a854
VZ
201 *-*-osf* )
202 USE_ALPHA=1
203 USE_OSF=1
204 AC_DEFINE(__ALPHA__)
205 AC_DEFINE(__OSF__)
143121c5 206 DEFAULT_DEFAULT_wxUSE_MOTIF=1
f6bcfd97 207 NEEDS_D_REENTRANT_FOR_R_FUNCS=1
9a98a854
VZ
208 ;;
209 *-*-dgux5* )
210 USE_ALPHA=1
211 USE_SVR4=1
212 AC_DEFINE(__ALPHA__)
213 AC_DEFINE(__SVR4__)
143121c5 214 DEFAULT_DEFAULT_wxUSE_MOTIF=1
9a98a854
VZ
215 ;;
216 *-*-sysv5* )
217 USE_SYSV=1
218 USE_SVR4=1
219 AC_DEFINE(__SYSV__)
220 AC_DEFINE(__SVR4__)
143121c5 221 DEFAULT_DEFAULT_wxUSE_MOTIF=1
9a98a854
VZ
222 ;;
223 *-*-aix* )
224 USE_AIX=1
225 USE_SYSV=1
226 USE_SVR4=1
321d2b14
VZ
227 dnl Irvin Probst <irvin.probst@fr.thalesgroup.com> reports that the shared
228 dnl libraries under AIX have the same suffix as the normal ones
229 SO_SUFFIX=a
9a98a854
VZ
230 AC_DEFINE(__AIX__)
231 AC_DEFINE(__SYSV__)
232 AC_DEFINE(__SVR4__)
143121c5 233 DEFAULT_DEFAULT_wxUSE_MOTIF=1
9a98a854 234 ;;
a9b5e89f 235
1c8183e2 236 *-*-cygwin* | *-*-mingw32* )
17234b26
MB
237 dnl MBN: some of the defines have been moved after toolkit detection
238 dnl because for wxMotif/wxGTK/wxX11 to build on Cygwin
239 dnl USE_UNIX must be set and not USE_WIN32
3a922bb4 240 SO_SUFFIX=dll
cf27ef00 241 PROGRAM_EXT=".exe"
7b7a7637 242 RESCOMP=windres
a9b5e89f
VZ
243 DEFAULT_DEFAULT_wxUSE_MSW=1
244 ;;
245
f9bc1684
VS
246 *-pc-msdosdjgpp )
247 USE_UNIX=0
248 USE_DOS=1
249 AC_DEFINE(__DOS__)
250 PROGRAM_EXT=".exe"
251 DEFAULT_DEFAULT_wxUSE_MGL=1
f9bc1684
VS
252 ;;
253
9829f277 254 *-pc-os2_emx | *-pc-os2-emx )
91b8de8d 255 AC_DEFINE(__EMX__)
cf27ef00 256 PROGRAM_EXT=".exe"
e07802fc 257 DEFAULT_DEFAULT_wxUSE_PM=1
590b1a4d 258 LIBS="$LIBS -lstdcpp"
91b8de8d 259 ;;
a9b5e89f 260
d08b457b
GD
261 powerpc-*-darwin* )
262 dnl PowerPC Darwin based distributions (including Mac OS X)
b4085ce6 263 USE_BSD=1
f11bdd03 264 USE_DARWIN=1
3a922bb4 265 SO_SUFFIX=dylib
b4085ce6 266 AC_DEFINE(__BSD__)
f11bdd03 267 AC_DEFINE(__DARWIN__)
d08b457b 268 AC_DEFINE(__POWERPC__)
b4085ce6
GD
269 DEFAULT_DEFAULT_wxUSE_MAC=1
270 ;;
271
b12915c1
VZ
272 *-*-beos* )
273 dnl leave USE_UNIX on - BeOS is sufficiently Unix-like for this
274 USE_BEOS=1
275 AC_DEFINE(__BEOS__)
276 ;;
277
9a98a854 278 *)
a9b5e89f 279 AC_MSG_ERROR(unknown system type ${host}.)
9a98a854
VZ
280esac
281
9a98a854
VZ
282dnl ---------------------------------------------------------------------------
283dnl command line options for configure
284dnl ---------------------------------------------------------------------------
285
286dnl the default values for all options - we collect them all here to simplify
287dnl modification of the default values (for example, if the defaults for some
288dnl platform should be changed, it can be done here too)
289dnl
290dnl NB: see also DEFAULT_wxUSE<toolkit> variables defined above
291
143121c5
VZ
292WX_ARG_CACHE_INIT
293
9a98a854
VZ
294dnl useful to test the compilation with minimum options, define as 0 for normal
295dnl usage
296DEBUG_CONFIGURE=0
297if test $DEBUG_CONFIGURE = 1; then
1e6feb95
VZ
298 DEFAULT_wxUSE_UNIVERSAL=no
299
6ec507fd
JS
300 DEFAULT_wxUSE_NANOX=no
301
9a98a854
VZ
302 DEFAULT_wxUSE_THREADS=yes
303
2aa88730 304 DEFAULT_wxUSE_SHARED=yes
3a922bb4 305 DEFAULT_wxUSE_SONAME=no
1e6feb95 306 DEFAULT_wxUSE_OPTIMISE=no
9a98a854 307 DEFAULT_wxUSE_PROFILE=no
5586805b 308 DEFAULT_wxUSE_NO_DEPS=no
8f4a9a10
RR
309 DEFAULT_wxUSE_NO_RTTI=no
310 DEFAULT_wxUSE_NO_EXCEPTIONS=no
5586805b 311 DEFAULT_wxUSE_PERMISSIVE=no
9a98a854
VZ
312 DEFAULT_wxUSE_DEBUG_FLAG=yes
313 DEFAULT_wxUSE_DEBUG_INFO=yes
314 DEFAULT_wxUSE_DEBUG_GDB=yes
315 DEFAULT_wxUSE_MEM_TRACING=no
143121c5 316 DEFAULT_wxUSE_DEBUG_CONTEXT=no
9a98a854 317 DEFAULT_wxUSE_DMALLOC=no
a7ae7112 318 DEFAULT_wxUSE_PRECOMP=no
9a98a854
VZ
319 DEFAULT_wxUSE_APPLE_IEEE=no
320
321 DEFAULT_wxUSE_LOG=yes
1e6feb95
VZ
322 DEFAULT_wxUSE_LOGWINDOW=no
323 DEFAULT_wxUSE_LOGGUI=no
69d27ff7 324 DEFAULT_wxUSE_LOGDIALOG=no
9a98a854
VZ
325
326 DEFAULT_wxUSE_GUI=yes
1e6feb95 327 DEFAULT_wxUSE_CONTROLS=no
9a98a854 328
3e44f09d 329 DEFAULT_wxUSE_REGEX=no
9a98a854
VZ
330 DEFAULT_wxUSE_ZLIB=no
331 DEFAULT_wxUSE_LIBPNG=no
9a98a854 332 DEFAULT_wxUSE_LIBJPEG=no
c7a2bf27 333 DEFAULT_wxUSE_LIBTIFF=no
9a98a854 334 DEFAULT_wxUSE_ODBC=no
bdad4e7e 335 DEFAULT_wxUSE_OPENGL=no
9a98a854 336
eb4efbdc 337 DEFAULT_wxUSE_ON_FATAL_EXCEPTION=no
4f3c5f06 338 DEFAULT_wxUSE_SNGLINST_CHECKER=no
fd15d8f1 339 DEFAULT_wxUSE_STD_IOSTREAM=no
1e6feb95
VZ
340 DEFAULT_wxUSE_CMDLINE_PARSER=no
341 DEFAULT_wxUSE_DATETIME=no
342 DEFAULT_wxUSE_TIMEDATE=no
343 DEFAULT_wxUSE_TIMER=no
344 DEFAULT_wxUSE_STOPWATCH=no
9a98a854 345 DEFAULT_wxUSE_FILE=no
1e6feb95 346 DEFAULT_wxUSE_FFILE=no
a3a584a7 347 DEFAULT_wxUSE_TEXTBUFFER=no
9a98a854 348 DEFAULT_wxUSE_TEXTFILE=no
2749089a 349 DEFAULT_wxUSE_WAVE=no
9a98a854
VZ
350 DEFAULT_wxUSE_INTL=no
351 DEFAULT_wxUSE_CONFIG=no
1e6feb95 352 DEFAULT_wxUSE_FONTMAP=no
9a98a854
VZ
353 DEFAULT_wxUSE_STREAMS=no
354 DEFAULT_wxUSE_SOCKETS=no
1c8515f9 355 DEFAULT_wxUSE_DIALUP_MANAGER=no
9a98a854 356 DEFAULT_wxUSE_JOYSTICK=no
6bff71f8 357 DEFAULT_wxUSE_DYNLIB_CLASS=no
0b9ab0bd 358 DEFAULT_wxUSE_DYNAMIC_LOADER=no
9a98a854 359 DEFAULT_wxUSE_LONGLONG=no
e8f65ba6 360 DEFAULT_wxUSE_GEOMETRY=no
9a98a854
VZ
361
362 DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=no
363 DEFAULT_wxUSE_NORMALIZED_PS_FONTS=no
364 DEFAULT_wxUSE_POSTSCRIPT=no
365
366 DEFAULT_wxUSE_X_RESOURCES=no
367 DEFAULT_wxUSE_CLIPBOARD=no
368 DEFAULT_wxUSE_TOOLTIPS=no
369 DEFAULT_wxUSE_DRAG_AND_DROP=no
24fd6d87 370 DEFAULT_wxUSE_DRAGIMAGE=no
9a98a854
VZ
371 DEFAULT_wxUSE_SPLINES=no
372
373 DEFAULT_wxUSE_MDI_ARCHITECTURE=no
374 DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=no
375 DEFAULT_wxUSE_PRINTING_ARCHITECTURE=no
376
377 DEFAULT_wxUSE_PROLOGIO=no
378 DEFAULT_wxUSE_RESOURCES=no
379 DEFAULT_wxUSE_CONSTRAINTS=no
380 DEFAULT_wxUSE_IPC=no
381 DEFAULT_wxUSE_HELP=no
29fd3c0c 382 DEFAULT_wxUSE_MS_HTML_HELP=no
3379ed37 383 DEFAULT_wxUSE_WXHTML_HELP=no
24176f2c 384 DEFAULT_wxUSE_TREELAYOUT=no
9a98a854 385 DEFAULT_wxUSE_METAFILE=no
1e6feb95 386 DEFAULT_wxUSE_MIMETYPE=no
4cdb0ab0
VS
387 DEFAULT_wxUSE_SYSTEM_OPTIONS=no
388 DEFAULT_wxUSE_PROTOCOL=no
389 DEFAULT_wxUSE_PROTOCOL_HTTP=no
390 DEFAULT_wxUSE_PROTOCOL_FTP=no
391 DEFAULT_wxUSE_PROTOCOL_FILE=no
392 DEFAULT_wxUSE_URL=no
393
9a98a854 394 DEFAULT_wxUSE_COMMONDLGS=no
1e6feb95
VZ
395 DEFAULT_wxUSE_CHOICEDLG=no
396 DEFAULT_wxUSE_COLOURDLG=no
ce4169a4 397 DEFAULT_wxUSE_DIRDLG=no
1e6feb95 398 DEFAULT_wxUSE_FILEDLG=no
8db37e06 399 DEFAULT_wxUSE_FINDREPLDLG=no
1e6feb95
VZ
400 DEFAULT_wxUSE_FONTDLG=no
401 DEFAULT_wxUSE_MSGDLG=no
402 DEFAULT_wxUSE_NUMBERDLG=no
c11584af 403 DEFAULT_wxUSE_TEXTDLG=no
cbca9943 404 DEFAULT_wxUSE_SPLASH=no
a641505f 405 DEFAULT_wxUSE_STARTUP_TIPS=no
ce4169a4 406 DEFAULT_wxUSE_PROGRESSDLG=no
b1f5d087
VZ
407 DEFAULT_wxUSE_WIZARDDLG=no
408
1e6feb95 409 DEFAULT_wxUSE_MENUS=no
9a98a854 410 DEFAULT_wxUSE_MINIFRAME=no
5526e819 411 DEFAULT_wxUSE_HTML=no
24528b0c 412 DEFAULT_wxUSE_FILESYSTEM=no
e3e717ec
VZ
413 DEFAULT_wxUSE_FS_INET=no
414 DEFAULT_wxUSE_FS_ZIP=no
d78b3d64
VS
415 DEFAULT_wxUSE_BUSYINFO=no
416 DEFAULT_wxUSE_ZIPSTREAM=no
1e6feb95 417 DEFAULT_wxUSE_VALIDATORS=no
9a98a854
VZ
418
419 DEFAULT_wxUSE_ACCEL=no
1e6feb95 420 DEFAULT_wxUSE_BUTTON=no
9a98a854 421 DEFAULT_wxUSE_BMPBUTTON=no
1e6feb95
VZ
422 DEFAULT_wxUSE_CALCTRL=no
423 DEFAULT_wxUSE_CARET=no
9a98a854
VZ
424 DEFAULT_wxUSE_CHECKBOX=no
425 DEFAULT_wxUSE_CHECKLST=no
1e6feb95 426 DEFAULT_wxUSE_CHOICE=no
9a98a854
VZ
427 DEFAULT_wxUSE_COMBOBOX=no
428 DEFAULT_wxUSE_GAUGE=no
429 DEFAULT_wxUSE_GRID=no
f85afd4e 430 DEFAULT_wxUSE_NEW_GRID=no
9a98a854
VZ
431 DEFAULT_wxUSE_IMAGLIST=no
432 DEFAULT_wxUSE_LISTBOX=no
433 DEFAULT_wxUSE_LISTCTRL=no
434 DEFAULT_wxUSE_NOTEBOOK=no
24176f2c 435 DEFAULT_wxUSE_PROPSHEET=no
9a98a854
VZ
436 DEFAULT_wxUSE_RADIOBOX=no
437 DEFAULT_wxUSE_RADIOBTN=no
e602002e 438 DEFAULT_wxUSE_SASH=no
9a98a854
VZ
439 DEFAULT_wxUSE_SCROLLBAR=no
440 DEFAULT_wxUSE_SLIDER=no
441 DEFAULT_wxUSE_SPINBTN=no
66f38406 442 DEFAULT_wxUSE_SPINCTRL=no
9a98a854
VZ
443 DEFAULT_wxUSE_SPLITTER=no
444 DEFAULT_wxUSE_STATBMP=no
445 DEFAULT_wxUSE_STATBOX=no
446 DEFAULT_wxUSE_STATLINE=no
1e6feb95 447 DEFAULT_wxUSE_STATTEXT=no
9a98a854
VZ
448 DEFAULT_wxUSE_STATUSBAR=yes
449 DEFAULT_wxUSE_TABDIALOG=no
1e6feb95 450 DEFAULT_wxUSE_TEXTCTRL=no
1db8dc4a 451 DEFAULT_wxUSE_TOGGLEBTN=no
9a98a854 452 DEFAULT_wxUSE_TOOLBAR=no
360d6699
VZ
453 DEFAULT_wxUSE_TOOLBAR_NATIVE=no
454 DEFAULT_wxUSE_TOOLBAR_SIMPLE=no
9a98a854 455 DEFAULT_wxUSE_TREECTRL=no
9f41d601 456 DEFAULT_wxUSE_POPUPWIN=no
0b01706f 457 DEFAULT_wxUSE_TIPWINDOW=no
9a98a854
VZ
458
459 DEFAULT_wxUSE_UNICODE=no
a72a4bfa 460 DEFAULT_wxUSE_UNICODE_MSLU=no
9a98a854 461 DEFAULT_wxUSE_WCSRTOMBS=no
e90c1d2a 462
d275c7eb 463 DEFAULT_wxUSE_PALETTE=no
0046ff7c 464 DEFAULT_wxUSE_IMAGE=no
0940bcf7
HH
465 DEFAULT_wxUSE_GIF=no
466 DEFAULT_wxUSE_PCX=no
467 DEFAULT_wxUSE_PNM=no
4b6b4dfc 468 DEFAULT_wxUSE_IFF=no
0046ff7c 469 DEFAULT_wxUSE_XPM=no
658974ae 470 DEFAULT_wxUSE_ICO_CUR=no
9a98a854 471else
1e6feb95
VZ
472 DEFAULT_wxUSE_UNIVERSAL=no
473
6ec507fd
JS
474 DEFAULT_wxUSE_NANOX=no
475
9a98a854
VZ
476 DEFAULT_wxUSE_THREADS=yes
477
2aa88730 478 DEFAULT_wxUSE_SHARED=yes
3a922bb4 479 DEFAULT_wxUSE_SONAME=no
9a98a854
VZ
480 DEFAULT_wxUSE_OPTIMISE=yes
481 DEFAULT_wxUSE_PROFILE=no
5586805b 482 DEFAULT_wxUSE_NO_DEPS=no
8f4a9a10
RR
483 DEFAULT_wxUSE_NO_RTTI=no
484 DEFAULT_wxUSE_NO_EXCEPTIONS=no
5586805b 485 DEFAULT_wxUSE_PERMISSIVE=no
9a98a854
VZ
486 DEFAULT_wxUSE_DEBUG_FLAG=no
487 DEFAULT_wxUSE_DEBUG_INFO=no
488 DEFAULT_wxUSE_DEBUG_GDB=no
489 DEFAULT_wxUSE_MEM_TRACING=no
143121c5 490 DEFAULT_wxUSE_DEBUG_CONTEXT=no
9a98a854 491 DEFAULT_wxUSE_DMALLOC=no
a7ae7112 492 DEFAULT_wxUSE_PRECOMP=no
9a98a854
VZ
493 DEFAULT_wxUSE_APPLE_IEEE=yes
494
495 DEFAULT_wxUSE_LOG=yes
d73be714
VZ
496 DEFAULT_wxUSE_LOGWINDOW=yes
497 DEFAULT_wxUSE_LOGGUI=yes
69d27ff7 498 DEFAULT_wxUSE_LOGDIALOG=yes
9a98a854
VZ
499
500 DEFAULT_wxUSE_GUI=yes
501
831b3152 502 DEFAULT_wxUSE_REGEX=yes
9a98a854
VZ
503 DEFAULT_wxUSE_ZLIB=yes
504 DEFAULT_wxUSE_LIBPNG=yes
9a98a854 505 DEFAULT_wxUSE_LIBJPEG=yes
b47c832e 506 DEFAULT_wxUSE_LIBTIFF=yes
16b52fa1 507 DEFAULT_wxUSE_ODBC=no
bdad4e7e 508 DEFAULT_wxUSE_OPENGL=no
9a98a854 509
eb4efbdc 510 DEFAULT_wxUSE_ON_FATAL_EXCEPTION=yes
4f3c5f06 511 DEFAULT_wxUSE_SNGLINST_CHECKER=yes
073478b3 512 DEFAULT_wxUSE_STD_IOSTREAM=no
1e6feb95
VZ
513 DEFAULT_wxUSE_CMDLINE_PARSER=yes
514 DEFAULT_wxUSE_DATETIME=yes
515 DEFAULT_wxUSE_TIMEDATE=no
516 DEFAULT_wxUSE_TIMER=yes
517 DEFAULT_wxUSE_STOPWATCH=yes
9a98a854 518 DEFAULT_wxUSE_FILE=yes
1e6feb95 519 DEFAULT_wxUSE_FFILE=yes
a3a584a7 520 DEFAULT_wxUSE_TEXTBUFFER=yes
9a98a854 521 DEFAULT_wxUSE_TEXTFILE=yes
2749089a 522 DEFAULT_wxUSE_WAVE=no
9a98a854
VZ
523 DEFAULT_wxUSE_INTL=yes
524 DEFAULT_wxUSE_CONFIG=yes
1e6feb95 525 DEFAULT_wxUSE_FONTMAP=yes
9a98a854
VZ
526 DEFAULT_wxUSE_STREAMS=yes
527 DEFAULT_wxUSE_SOCKETS=yes
1c8515f9 528 DEFAULT_wxUSE_DIALUP_MANAGER=yes
9a98a854 529 DEFAULT_wxUSE_JOYSTICK=yes
6bff71f8 530 DEFAULT_wxUSE_DYNLIB_CLASS=yes
9337b578 531 DEFAULT_wxUSE_DYNAMIC_LOADER=yes
b685cd9b 532 DEFAULT_wxUSE_LONGLONG=yes
e8f65ba6 533 DEFAULT_wxUSE_GEOMETRY=yes
9a98a854
VZ
534
535 DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=yes
536 DEFAULT_wxUSE_NORMALIZED_PS_FONTS=yes
537 DEFAULT_wxUSE_POSTSCRIPT=yes
538
539 DEFAULT_wxUSE_X_RESOURCES=no
540 DEFAULT_wxUSE_CLIPBOARD=yes
541 DEFAULT_wxUSE_TOOLTIPS=yes
542 DEFAULT_wxUSE_DRAG_AND_DROP=yes
24fd6d87 543 DEFAULT_wxUSE_DRAGIMAGE=yes
9a98a854
VZ
544 DEFAULT_wxUSE_SPLINES=yes
545
546 DEFAULT_wxUSE_MDI_ARCHITECTURE=yes
547 DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=yes
548 DEFAULT_wxUSE_PRINTING_ARCHITECTURE=yes
549
550 DEFAULT_wxUSE_PROLOGIO=yes
551 DEFAULT_wxUSE_RESOURCES=yes
552 DEFAULT_wxUSE_CONSTRAINTS=yes
553 DEFAULT_wxUSE_IPC=yes
554 DEFAULT_wxUSE_HELP=yes
29fd3c0c 555 DEFAULT_wxUSE_MS_HTML_HELP=yes
3379ed37 556 DEFAULT_wxUSE_WXHTML_HELP=yes
24176f2c 557 DEFAULT_wxUSE_TREELAYOUT=yes
9a98a854 558 DEFAULT_wxUSE_METAFILE=yes
1e6feb95 559 DEFAULT_wxUSE_MIMETYPE=yes
0cbff120 560 DEFAULT_wxUSE_SYSTEM_OPTIONS=yes
4cdb0ab0
VS
561 DEFAULT_wxUSE_PROTOCOL=yes
562 DEFAULT_wxUSE_PROTOCOL_HTTP=yes
563 DEFAULT_wxUSE_PROTOCOL_FTP=yes
564 DEFAULT_wxUSE_PROTOCOL_FILE=yes
565 DEFAULT_wxUSE_URL=yes
9a98a854
VZ
566
567 DEFAULT_wxUSE_COMMONDLGS=yes
1e6feb95
VZ
568 DEFAULT_wxUSE_CHOICEDLG=yes
569 DEFAULT_wxUSE_COLOURDLG=yes
ce4169a4 570 DEFAULT_wxUSE_DIRDLG=yes
1e6feb95 571 DEFAULT_wxUSE_FILEDLG=yes
8db37e06 572 DEFAULT_wxUSE_FINDREPLDLG=yes
1e6feb95
VZ
573 DEFAULT_wxUSE_FONTDLG=yes
574 DEFAULT_wxUSE_MSGDLG=yes
575 DEFAULT_wxUSE_NUMBERDLG=yes
c11584af 576 DEFAULT_wxUSE_TEXTDLG=yes
cbca9943 577 DEFAULT_wxUSE_SPLASH=yes
a641505f 578 DEFAULT_wxUSE_STARTUP_TIPS=yes
ce4169a4 579 DEFAULT_wxUSE_PROGRESSDLG=yes
f33f19dd
VZ
580 DEFAULT_wxUSE_WIZARDDLG=yes
581
1e6feb95 582 DEFAULT_wxUSE_MENUS=yes
9a98a854 583 DEFAULT_wxUSE_MINIFRAME=yes
d4c241b9 584 DEFAULT_wxUSE_HTML=yes
24528b0c 585 DEFAULT_wxUSE_FILESYSTEM=yes
d4c241b9
RR
586 DEFAULT_wxUSE_FS_INET=yes
587 DEFAULT_wxUSE_FS_ZIP=yes
588 DEFAULT_wxUSE_BUSYINFO=yes
589 DEFAULT_wxUSE_ZIPSTREAM=yes
9a98a854
VZ
590 DEFAULT_wxUSE_VALIDATORS=yes
591
592 DEFAULT_wxUSE_ACCEL=yes
1e6feb95 593 DEFAULT_wxUSE_BUTTON=yes
9a98a854 594 DEFAULT_wxUSE_BMPBUTTON=yes
1e6feb95
VZ
595 DEFAULT_wxUSE_CALCTRL=yes
596 DEFAULT_wxUSE_CARET=yes
9a98a854
VZ
597 DEFAULT_wxUSE_CHECKBOX=yes
598 DEFAULT_wxUSE_CHECKLST=yes
ce4169a4 599 DEFAULT_wxUSE_CHOICE=yes
9a98a854
VZ
600 DEFAULT_wxUSE_COMBOBOX=yes
601 DEFAULT_wxUSE_GAUGE=yes
602 DEFAULT_wxUSE_GRID=yes
cc977e5f 603 DEFAULT_wxUSE_NEW_GRID=yes
9a98a854
VZ
604 DEFAULT_wxUSE_IMAGLIST=yes
605 DEFAULT_wxUSE_LISTBOX=yes
606 DEFAULT_wxUSE_LISTCTRL=yes
607 DEFAULT_wxUSE_NOTEBOOK=yes
24176f2c 608 DEFAULT_wxUSE_PROPSHEET=yes
9a98a854
VZ
609 DEFAULT_wxUSE_RADIOBOX=yes
610 DEFAULT_wxUSE_RADIOBTN=yes
e602002e 611 DEFAULT_wxUSE_SASH=yes
9a98a854
VZ
612 DEFAULT_wxUSE_SCROLLBAR=yes
613 DEFAULT_wxUSE_SLIDER=yes
614 DEFAULT_wxUSE_SPINBTN=yes
66f38406 615 DEFAULT_wxUSE_SPINCTRL=yes
9a98a854
VZ
616 DEFAULT_wxUSE_SPLITTER=yes
617 DEFAULT_wxUSE_STATBMP=yes
618 DEFAULT_wxUSE_STATBOX=yes
619 DEFAULT_wxUSE_STATLINE=yes
1e6feb95 620 DEFAULT_wxUSE_STATTEXT=yes
9a98a854
VZ
621 DEFAULT_wxUSE_STATUSBAR=yes
622 DEFAULT_wxUSE_TABDIALOG=no
1e6feb95 623 DEFAULT_wxUSE_TEXTCTRL=yes
1db8dc4a 624 DEFAULT_wxUSE_TOGGLEBTN=yes
9a98a854 625 DEFAULT_wxUSE_TOOLBAR=yes
360d6699
VZ
626 DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
627 DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes
9a98a854 628 DEFAULT_wxUSE_TREECTRL=yes
9f41d601 629 DEFAULT_wxUSE_POPUPWIN=yes
0b01706f 630 DEFAULT_wxUSE_TIPWINDOW=yes
9a98a854
VZ
631
632 DEFAULT_wxUSE_UNICODE=no
a72a4bfa 633 DEFAULT_wxUSE_UNICODE_MSLU=yes
9a98a854 634 DEFAULT_wxUSE_WCSRTOMBS=no
e90c1d2a 635
d275c7eb 636 DEFAULT_wxUSE_PALETTE=yes
0046ff7c 637 DEFAULT_wxUSE_IMAGE=yes
0940bcf7
HH
638 DEFAULT_wxUSE_GIF=yes
639 DEFAULT_wxUSE_PCX=yes
cc0e8480 640 DEFAULT_wxUSE_IFF=no
0940bcf7 641 DEFAULT_wxUSE_PNM=yes
0046ff7c 642 DEFAULT_wxUSE_XPM=yes
658974ae 643 DEFAULT_wxUSE_ICO_CUR=yes
9a98a854
VZ
644fi
645
143121c5 646dnl WX_ARG_WITH should be used to select whether an external package will be
9a98a854 647dnl used or not, to configure compile-time features of this package itself,
143121c5 648dnl use WX_ARG_ENABLE instead
9a98a854
VZ
649
650dnl ============================
651dnl external package dependecies
652dnl ============================
653
143121c5
VZ
654dnl these options use AC_ARG_WITH and not WX_ARG_WITH on purpose - we cache
655dnl these values manually
ced859c3 656for toolkit in `echo $ALL_TOOLKITS`; do
143121c5
VZ
657 LINE=`grep "wxUSE_$toolkit" ${wx_arg_cache_file}`
658 if test "x$LINE" != x ; then
659 has_toolkit_in_cache=1
660 eval "DEFAULT_$LINE"
ced859c3 661 eval "CACHE_$toolkit=1"
143121c5
VZ
662 fi
663done
664
e90c1d2a
VZ
665dnl ---------------------------------------------------------------------------
666dnl --disable-gui will build only non-GUI part of wxWindows: check for this
667dnl first to disable many other switches if it's given
668dnl
669dnl NB: this is still in testing stage, don't use if you don't know what you're
670dnl doing
671dnl ---------------------------------------------------------------------------
672
673WX_ARG_ENABLE(gui, [ --enable-gui use GUI classes], wxUSE_GUI)
674
b12915c1 675if test "$wxUSE_GUI" = "yes"; then
e90c1d2a 676
1e6feb95 677WX_ARG_ENABLE(universal, [ --enable-universal use wxWindows GUI controls instead of native ones], wxUSE_UNIVERSAL)
ced859c3
VZ
678AC_ARG_WITH(gtk, [ --with-gtk use GTK+], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1])
679AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1])
b4085ce6 680AC_ARG_WITH(mac, [ --with-mac use Mac OS X], [wxUSE_MAC="$withval" TOOLKIT_GIVEN=1])
ced859c3 681AC_ARG_WITH(wine, [ --with-wine use WINE], [wxUSE_WINE="$withval" CACHE_WINE=1 TOOLKIT_GIVEN=1])
b4efce5e 682AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1])
e07802fc 683AC_ARG_WITH(pm, [ --with-pm use OS/2 Presentation Manager], [wxUSE_PM="$withval" CACHE_PM=1 TOOLKIT_GIVEN=1])
6c657b52 684AC_ARG_WITH(mgl, [ --with-mgl use SciTech MGL], [wxUSE_MGL="$withval" wxUSE_UNIVERSAL="yes" CACHE_MGL=1 TOOLKIT_GIVEN=1])
1725144d 685AC_ARG_WITH(microwin, [ --with-microwin use MicroWindows], [wxUSE_MICROWIN="$withval" CACHE_MICROWIN=1 TOOLKIT_GIVEN=1])
3c011993 686AC_ARG_WITH(x11, [ --with-x11 use X11], [wxUSE_X11="$withval" wxUSE_UNIVERSAL="yes" CACHE_X11=1 TOOLKIT_GIVEN=1])
ba875e66 687WX_ARG_ENABLE(nanox, [ --enable-nanox use NanoX], wxUSE_NANOX)
143121c5 688
9e691f46 689AC_ARG_ENABLE(gtk2, [ --enable-gtk2 use GTK+ 2.0 if available (EXPERIMENTAL)],wxUSE_GTK2="yes",wxUSE_GTK2="no")
a9b5e89f 690
422107f9
VZ
691WX_ARG_SYS_WITH(libpng, [ --with-libpng use libpng (PNG image format)], wxUSE_LIBPNG)
692WX_ARG_SYS_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], wxUSE_LIBJPEG)
0dcf9893 693WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF)
143121c5 694WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL)
b12915c1
VZ
695
696fi
697dnl for GUI only
698
d0e9b150 699WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (http://dmalloc.com/)], wxUSE_DMALLOC)
3e44f09d 700WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx class], wxUSE_REGEX)
422107f9 701WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
143121c5 702WX_ARG_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], wxUSE_ODBC)
9a98a854 703
9a98a854
VZ
704dnl ---------------------------------------------------------------------------
705dnl compile options
706dnl ---------------------------------------------------------------------------
707
2aa88730 708WX_ARG_ENABLE(shared, [ --enable-shared create shared library code], wxUSE_SHARED)
3a922bb4 709WX_ARG_ENABLE(soname, [ --enable-soname set the DT_SONAME field in ELF shared libraries], wxUSE_SONAME)
143121c5 710WX_ARG_ENABLE(optimise, [ --enable-optimise create optimised code], wxUSE_OPTIMISE)
143121c5 711WX_ARG_ENABLE(debug, [ --enable-debug same as debug_flag and debug_info], wxUSE_DEBUG)
70d1b3cf 712
683dccda
GD
713dnl allow the precompiled header option to be disabled under Mac OS X
714WX_ARG_ENABLE(precomp, [ --enable-precomp enable use of precompiled headers (Mac OS X)], wxUSE_PRECOMP)
715
70d1b3cf
VZ
716if test "$wxUSE_DEBUG" = "yes"; then
717 DEFAULT_wxUSE_DEBUG_FLAG=yes
718 DEFAULT_wxUSE_DEBUG_INFO=yes
719elif test "$wxUSE_DEBUG" = "no"; then
720 DEFAULT_wxUSE_DEBUG_FLAG=no
721 DEFAULT_wxUSE_DEBUG_INFO=no
722fi
723
f7bdcdd7
RR
724WX_ARG_ENABLE(debug_flag, [ --enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)], wxUSE_DEBUG_FLAG)
725WX_ARG_ENABLE(debug_info, [ --enable-debug_info create code with debugging information], wxUSE_DEBUG_INFO)
726WX_ARG_ENABLE(debug_gdb, [ --enable-debug_gdb create code with extra GDB debugging information], wxUSE_DEBUG_GDB)
727WX_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt use wxDebugContext], wxUSE_DEBUG_CONTEXT)
728WX_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing create code with memory tracing], wxUSE_MEM_TRACING)
729WX_ARG_ENABLE(profile, [ --enable-profile create code with profiling information], wxUSE_PROFILE)
730WX_ARG_ENABLE(no_rtti, [ --enable-no_rtti create code without RTTI information], wxUSE_NO_RTTI)
b3e8d00a 731WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++ exceptions handling], wxUSE_NO_EXCEPTIONS)
5586805b
RR
732WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
733WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
9a98a854 734
b3e8d00a 735WX_ARG_ENABLE(compat20, [ --enable-compat20 enable wxWindows 2.0 compatibility], WXWIN_COMPATIBILITY_2)
0c9a1c32 736WX_ARG_ENABLE(compat22, [ --disable-compat22 disable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
54276ccf 737
9a98a854
VZ
738dnl ---------------------------------------------------------------------------
739dnl (small) optional non GUI classes
740dnl ---------------------------------------------------------------------------
741
fd15d8f1
RR
742WX_ARG_ENABLE(intl, [ --enable-intl use internationalization system], wxUSE_INTL)
743WX_ARG_ENABLE(config, [ --enable-config use wxConfig (and derived) classes], wxUSE_CONFIG)
b12915c1 744
a5d46b73
VZ
745WX_ARG_ENABLE(protocols, [ --enable-protocols use wxProtocol and derived classes], wxUSE_PROTOCOL)
746WX_ARG_ENABLE(ftp, [ --enable-ftp use wxFTP (requires wxProtocol], wxUSE_PROTOCOL_FTP)
747WX_ARG_ENABLE(http, [ --enable-http use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP)
748WX_ARG_ENABLE(fileproto, [ --enable-fileproto use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE)
fd15d8f1 749WX_ARG_ENABLE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS)
b12915c1 750
fd15d8f1 751WX_ARG_ENABLE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], wxUSE_IPC)
eb4efbdc 752
1e6feb95
VZ
753WX_ARG_ENABLE(cmdline, [ --enable-cmdline use wxCmdLineParser class], wxUSE_CMDLINE_PARSER)
754WX_ARG_ENABLE(datetime, [ --enable-datetime use wxDateTime class], wxUSE_DATETIME)
755WX_ARG_ENABLE(timedate, [ --enable-timedate use obsolete wxDate/wxTime classes], wxUSE_TIMEDATE)
756WX_ARG_ENABLE(stopwatch, [ --enable-stopwatch use wxStopWatch class], wxUSE_STOPWATCH)
eb4efbdc 757WX_ARG_ENABLE(dialupman, [ --enable-dialupman use dialup network classes], wxUSE_DIALUP_MANAGER)
fd15d8f1 758WX_ARG_ENABLE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE)
1e6feb95 759WX_ARG_ENABLE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER)
fd15d8f1
RR
760WX_ARG_ENABLE(wave, [ --enable-wave use wxWave class], wxUSE_WAVE)
761WX_ARG_ENABLE(fraction, [ --enable-fraction use wxFraction class], wxUSE_FRACTION)
762WX_ARG_ENABLE(dynlib, [ --enable-dynlib use wxLibrary class for DLL loading], wxUSE_DYNLIB_CLASS)
0b9ab0bd 763WX_ARG_ENABLE(dynamicloader, [ --enable-dynamicloader use (new) wxDynamicLibrary class], wxUSE_DYNAMIC_LOADER)
fd15d8f1 764WX_ARG_ENABLE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG)
e8f65ba6 765WX_ARG_ENABLE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY)
fd15d8f1
RR
766WX_ARG_ENABLE(log, [ --enable-log use logging system], wxUSE_LOG)
767WX_ARG_ENABLE(streams, [ --enable-streams use wxStream etc classes], wxUSE_STREAMS)
768WX_ARG_ENABLE(file, [ --enable-file use wxFile classes], wxUSE_FILE)
1e6feb95 769WX_ARG_ENABLE(ffile, [ --enable-ffile use wxFFile classes], wxUSE_FFILE)
a3a584a7
VZ
770WX_ARG_ENABLE(textbuf, [ --enable-textbuf use wxTextBuffer class], wxUSE_TEXTBUFFER)
771WX_ARG_ENABLE(textfile, [ --enable-textfile use wxTextFile class], wxUSE_TEXTFILE)
1e6feb95 772WX_ARG_ENABLE(fontmap, [ --enable-fontmap use font encodings conversion classes], wxUSE_FONTMAP)
fd15d8f1 773WX_ARG_ENABLE(unicode, [ --enable-unicode compile wxString with Unicode support], wxUSE_UNICODE)
a72a4bfa 774WX_ARG_ENABLE(mslu, [ --enable-mslu use MS Layer for Unicode on Windows 9x (win32 only)], wxUSE_UNICODE_MSLU)
fd15d8f1 775WX_ARG_ENABLE(wxprintfv, [ --enable-wxprintfv use wxWindows implementation of vprintf()], wxUSE_EXPERIMENTAL_PRINTF)
fd15d8f1 776WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM)
24528b0c 777WX_ARG_ENABLE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM)
e3e717ec
VZ
778WX_ARG_ENABLE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
779WX_ARG_ENABLE(fs_zip, [ --enable-fs_zip use virtual ZIP filesystems], wxUSE_FS_ZIP)
d78b3d64 780WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZipInputStream], wxUSE_ZIPSTREAM)
9a98a854 781
eb4efbdc 782WX_ARG_ENABLE(catch_segvs, [ --enable-catch_segvs catch signals and pass them to wxApp::OnFatalException], wxUSE_ON_FATAL_EXCEPTION)
4f3c5f06 783WX_ARG_ENABLE(snglinst, [ --enable-snglinst use wxSingleInstanceChecker class], wxUSE_SNGLINST_CHECKER)
eb4efbdc 784
69d27ff7 785WX_ARG_ENABLE(mimetype, [ --enable-mimetype use wxMimeTypesManager], wxUSE_MIMETYPE)
b3e8d00a 786WX_ARG_ENABLE(system_options,[ --enable-sysoptions use wxSystemOptions], wxUSE_SYSTEM_OPTIONS)
1e6feb95 787
4cdb0ab0
VS
788WX_ARG_ENABLE(url, [ --enable-url use wxURL class], wxUSE_URL)
789WX_ARG_ENABLE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL)
790WX_ARG_ENABLE(protocol_http, [ --enable-protocol-http HTTP support in wxProtocol], wxUSE_PROTOCOL_HTTP)
791WX_ARG_ENABLE(protocol_ftp, [ --enable-protocol-ftp FTP support in wxProtocol], wxUSE_PROTOCOL_FTP)
792WX_ARG_ENABLE(protocol_file, [ --enable-protocol-file FILE support in wxProtocol], wxUSE_PROTOCOL_FILE)
793
794
9a98a854
VZ
795dnl ---------------------------------------------------------------------------
796dnl "big" options (i.e. those which change a lot of things throughout the library)
797dnl ---------------------------------------------------------------------------
798
143121c5 799WX_ARG_ENABLE(threads, [ --enable-threads use threads], wxUSE_THREADS)
9a98a854 800
b12915c1
VZ
801if test "$wxUSE_GUI" = "yes"; then
802
9a98a854
VZ
803dnl ---------------------------------------------------------------------------
804dnl "big" GUI options
805dnl ---------------------------------------------------------------------------
806
143121c5 807WX_ARG_ENABLE(docview, [ --enable-docview use document view architecture], wxUSE_DOC_VIEW_ARCHITECTURE)
3379ed37 808WX_ARG_ENABLE(help, [ --enable-help use help subsystem], wxUSE_HELP)
29fd3c0c 809WX_ARG_ENABLE(mshtmlhelp, [ --enable-mshtmlhelp use MS HTML Help (win32)], wxUSE_MS_HTML_HELP)
3379ed37
VZ
810WX_ARG_ENABLE(html, [ --enable-html use wxHTML sub-library], wxUSE_HTML)
811WX_ARG_ENABLE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP)
143121c5
VZ
812WX_ARG_ENABLE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS)
813WX_ARG_ENABLE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE)
814WX_ARG_ENABLE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI_ARCHITECTURE)
1e6feb95
VZ
815WX_ARG_ENABLE(loggui, [ --enable-loggui use standard GUI logger], wxUSE_LOGGUI)
816WX_ARG_ENABLE(logwin, [ --enable-logwin use wxLogWindow], wxUSE_LOGWINDOW)
69d27ff7 817WX_ARG_ENABLE(logdialog, [ --enable-logdialog use wxLogDialog], wxUSE_LOGDIALOG)
9a98a854
VZ
818
819dnl ---------------------------------------------------------------------------
820dnl PostScript options
821dnl ---------------------------------------------------------------------------
143121c5 822WX_ARG_ENABLE(postscript, [ --enable-postscript use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT)
9a98a854
VZ
823
824dnl VZ: these options seem to be always on, if someone wants to change it please do
143121c5
VZ
825dnl WX_ARG_ENABLE(PS-normalized, [ --enable-PS-normalized use normalized PS fonts], dnl wxUSE_NORMALIZED_PS_FONTS)
826dnl WX_ARG_ENABLE(afmfonts, [ --enable-afmfonts use Adobe Font Metric Font table], dnl wxUSE_AFM_FOR_POSTSCRIPT)
9a98a854
VZ
827
828dnl ---------------------------------------------------------------------------
829dnl resources
830dnl ---------------------------------------------------------------------------
1e6feb95 831
143121c5
VZ
832WX_ARG_ENABLE(prologio, [ --enable-prologio use Prolog IO library], wxUSE_PROLOGIO)
833WX_ARG_ENABLE(resources, [ --enable-resources use wxWindows resources], wxUSE_RESOURCES)
834
835WX_ARG_ENABLE(xresources, [ --enable-xresources use X resources for save (default for gtk+)], wxUSE_X_RESOURCES)
9a98a854 836
9a98a854
VZ
837dnl ---------------------------------------------------------------------------
838dnl IPC &c
839dnl ---------------------------------------------------------------------------
9a98a854 840
143121c5
VZ
841WX_ARG_ENABLE(clipboard, [ --enable-clipboard use wxClipboard classes], wxUSE_CLIPBOARD)
842WX_ARG_ENABLE(dnd, [ --enable-dnd use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP)
b64f0a5f 843WX_ARG_ENABLE(metafile, [ --enable-metafile use win32 metafiles], wxUSE_METAFILE)
143121c5 844
24176f2c 845WX_ARG_ENABLE(treelayout, [ --enable-treelayout use wxTreeLayout classes], wxUSE_TREELAYOUT)
9a98a854
VZ
846
847dnl ---------------------------------------------------------------------------
848dnl optional GUI controls (in alphabetical order except the first one)
849dnl ---------------------------------------------------------------------------
850
143121c5 851WX_ARG_ENABLE(controls, [ --enable-controls use all usual controls], wxUSE_CONTROLS)
9a98a854
VZ
852
853dnl even with --enable-controls, some may be disabled by giving
854dnl --disable-<control> later on the command line - but by default all will be
855dnl used (and vice versa)
856if test "$wxUSE_CONTROLS" = "yes"; then
857 DEFAULT_wxUSE_ACCEL=yes
1e6feb95
VZ
858 DEFAULT_wxUSE_BMPBUTTON=yes
859 DEFAULT_wxUSE_BUTTON=yes
860 DEFAULT_wxUSE_CALCTRL=no
9a98a854
VZ
861 DEFAULT_wxUSE_CARET=yes
862 DEFAULT_wxUSE_COMBOBOX=yes
9a98a854
VZ
863 DEFAULT_wxUSE_CHECKBOX=yes
864 DEFAULT_wxUSE_CHECKLISTBOX=yes
ce4169a4 865 DEFAULT_wxUSE_CHOICE=yes
9a98a854
VZ
866 DEFAULT_wxUSE_GAUGE=yes
867 DEFAULT_wxUSE_GRID=yes
cc977e5f 868 DEFAULT_wxUSE_NEW_GRID=yes
9a98a854
VZ
869 DEFAULT_wxUSE_IMAGLIST=yes
870 DEFAULT_wxUSE_LISTBOX=yes
871 DEFAULT_wxUSE_LISTCTRL=yes
872 DEFAULT_wxUSE_NOTEBOOK=yes
24176f2c 873 DEFAULT_wxUSE_PROPSHEET=yes
9a98a854
VZ
874 DEFAULT_wxUSE_RADIOBOX=yes
875 DEFAULT_wxUSE_RADIOBTN=yes
876 DEFAULT_wxUSE_SASH=yes
877 DEFAULT_wxUSE_SCROLLBAR=yes
878 DEFAULT_wxUSE_SLIDER=yes
879 DEFAULT_wxUSE_SPINBTN=yes
66f38406 880 DEFAULT_wxUSE_SPINCTRL=yes
9a98a854
VZ
881 DEFAULT_wxUSE_SPLITTER=yes
882 DEFAULT_wxUSE_STATBMP=yes
883 DEFAULT_wxUSE_STATBOX=yes
884 DEFAULT_wxUSE_STATLINE=yes
885 DEFAULT_wxUSE_STATUSBAR=yes
886 DEFAULT_wxUSE_TAB_DIALOG=yes
1db8dc4a 887 DEFAULT_wxUSE_TOGGLEBTN=yes
9a98a854 888 DEFAULT_wxUSE_TOOLBAR=yes
360d6699
VZ
889 DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
890 DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes
9a98a854
VZ
891 DEFAULT_wxUSE_TOOLTIPS=yes
892 DEFAULT_wxUSE_TREECTRL=yes
9f41d601 893 DEFAULT_wxUSE_POPUPWIN=yes
0b01706f 894 DEFAULT_wxUSE_TIPWINDOW=yes
9a98a854
VZ
895elif test "$wxUSE_CONTROLS" = "no"; then
896 DEFAULT_wxUSE_ACCEL=no
1e6feb95
VZ
897 DEFAULT_wxUSE_BMPBUTTON=no
898 DEFAULT_wxUSE_BUTTON=no
899 DEFAULT_wxUSE_CALCTRL=no
9a98a854
VZ
900 DEFAULT_wxUSE_CARET=no
901 DEFAULT_wxUSE_COMBOBOX=no
9a98a854
VZ
902 DEFAULT_wxUSE_CHECKBOX=no
903 DEFAULT_wxUSE_CHECKLISTBOX=no
ce4169a4 904 DEFAULT_wxUSE_CHOICE=no
9a98a854
VZ
905 DEFAULT_wxUSE_GAUGE=no
906 DEFAULT_wxUSE_GRID=no
f85afd4e 907 DEFAULT_wxUSE_NEW_GRID=no
9a98a854
VZ
908 DEFAULT_wxUSE_IMAGLIST=no
909 DEFAULT_wxUSE_LISTBOX=no
910 DEFAULT_wxUSE_LISTCTRL=no
911 DEFAULT_wxUSE_NOTEBOOK=no
24176f2c 912 DEFAULT_wxUSE_PROPSHEET=no
9a98a854
VZ
913 DEFAULT_wxUSE_RADIOBOX=no
914 DEFAULT_wxUSE_RADIOBTN=no
915 DEFAULT_wxUSE_SASH=no
916 DEFAULT_wxUSE_SCROLLBAR=no
917 DEFAULT_wxUSE_SLIDER=no
918 DEFAULT_wxUSE_SPINBTN=no
66f38406 919 DEFAULT_wxUSE_SPINCTRL=no
9a98a854
VZ
920 DEFAULT_wxUSE_SPLITTER=no
921 DEFAULT_wxUSE_STATBMP=no
922 DEFAULT_wxUSE_STATBOX=no
923 DEFAULT_wxUSE_STATLINE=no
924 DEFAULT_wxUSE_STATUSBAR=no
925 DEFAULT_wxUSE_TAB_DIALOG=no
1db8dc4a 926 DEFAULT_wxUSE_TOGGLEBTN=no
9a98a854 927 DEFAULT_wxUSE_TOOLBAR=no
360d6699
VZ
928 DEFAULT_wxUSE_TOOLBAR_NATIVE=no
929 DEFAULT_wxUSE_TOOLBAR_SIMPLE=no
9a98a854
VZ
930 DEFAULT_wxUSE_TOOLTIPS=no
931 DEFAULT_wxUSE_TREECTRL=no
9f41d601 932 DEFAULT_wxUSE_POPUPWIN=no
0b01706f 933 DEFAULT_wxUSE_TIPWINDOW=no
9a98a854
VZ
934fi
935
143121c5 936WX_ARG_ENABLE(accel, [ --enable-accel use accelerators], wxUSE_ACCEL)
1e6feb95 937WX_ARG_ENABLE(button, [ --enable-button use wxButton class], wxUSE_BUTTON)
143121c5 938WX_ARG_ENABLE(bmpbutton, [ --enable-bmpbutton use wxBitmapButton class], wxUSE_BMPBUTTON)
1e6feb95
VZ
939WX_ARG_ENABLE(calendar, [ --enable-calendar use wxCalendarCtrl class], wxUSE_CALCTRL)
940WX_ARG_ENABLE(caret, [ --enable-caret use wxCaret class], wxUSE_CARET)
143121c5
VZ
941WX_ARG_ENABLE(checkbox, [ --enable-checkbox use wxCheckBox class], wxUSE_CHECKBOX)
942WX_ARG_ENABLE(checklst, [ --enable-checklst use wxCheckListBox (listbox with checkboxes) class], wxUSE_CHECKLST)
ce4169a4
RR
943WX_ARG_ENABLE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE)
944WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox classes], wxUSE_COMBOBOX)
143121c5
VZ
945WX_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
946WX_ARG_ENABLE(grid, [ --enable-grid use wxGrid class], wxUSE_GRID)
f85afd4e 947WX_ARG_ENABLE(newgrid, [ --enable-newgrid use new wxGrid class], wxUSE_NEW_GRID)
143121c5
VZ
948WX_ARG_ENABLE(imaglist, [ --enable-imaglist use wxImageList class], wxUSE_IMAGLIST)
949WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX)
950WX_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL)
951WX_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK)
24176f2c 952WX_ARG_ENABLE(propsheet, [ --enable-propsheet use wxPropertySheet class], wxUSE_PROPSHEET)
143121c5
VZ
953WX_ARG_ENABLE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX)
954WX_ARG_ENABLE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN)
955WX_ARG_ENABLE(sash, [ --enable-sash use wxSashWindow class], wxUSE_SASH)
956WX_ARG_ENABLE(scrollbar, [ --enable-scrollbar use wxScrollBar class and scrollable windows], wxUSE_SCROLLBAR)
957WX_ARG_ENABLE(slider, [ --enable-slider use wxSlider class], wxUSE_SLIDER)
958WX_ARG_ENABLE(spinbtn, [ --enable-spinbtn use wxSpinButton class], wxUSE_SPINBTN)
66f38406 959WX_ARG_ENABLE(spinctrl, [ --enable-spinctrl use wxSpinCtrl class], wxUSE_SPINCTRL)
143121c5
VZ
960WX_ARG_ENABLE(splitter, [ --enable-splitter use wxSplitterWindow class], wxUSE_SPLITTER)
961WX_ARG_ENABLE(statbmp, [ --enable-statbmp use wxStaticBitmap class], wxUSE_STATBMP)
962WX_ARG_ENABLE(statbox, [ --enable-statbox use wxStaticBox class], wxUSE_STATBOX)
963WX_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE)
1e6feb95 964WX_ARG_ENABLE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT)
143121c5
VZ
965WX_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
966WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TABDIALOG)
1e6feb95 967WX_ARG_ENABLE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
1db8dc4a 968WX_ARG_ENABLE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN)
143121c5 969WX_ARG_ENABLE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR)
360d6699
VZ
970WX_ARG_ENABLE(tbarnative, [ --enable-tbarnative use native wxToolBar class], wxUSE_TOOLBAR_NATIVE)
971WX_ARG_ENABLE(tbarsmpl, [ --enable-tbarsmpl use wxToolBarSimple class], wxUSE_TOOLBAR_SIMPLE)
143121c5 972WX_ARG_ENABLE(treectrl, [ --enable-treectrl use wxTreeCtrl class], wxUSE_TREECTRL)
0b01706f 973WX_ARG_ENABLE(tipwindow, [ --enable-tipwindow use wxTipWindow class], wxUSE_TIPWINDOW)
9f41d601 974WX_ARG_ENABLE(popupwin, [ --enable-popupwin use wxPopUpWindow class], wxUSE_POPUPWIN)
9a98a854
VZ
975
976dnl ---------------------------------------------------------------------------
b1f5d087 977dnl common dialogs
9a98a854
VZ
978dnl ---------------------------------------------------------------------------
979
b3e8d00a 980WX_ARG_ENABLE(commondlg, [ --enable-commondlg use all common dialogs], wxUSE_COMMONDLGS)
1e6feb95
VZ
981WX_ARG_ENABLE(choicedlg, [ --enable-choicedlg use wxChoiceDialog], wxUSE_CHOICEDLG)
982WX_ARG_ENABLE(coldlg, [ --enable-coldlg use wxColourDialog], wxUSE_COLOURDLG)
983WX_ARG_ENABLE(filedlg, [ --enable-filedlg use wxFileDialog], wxUSE_FILEDLG)
69d27ff7 984WX_ARG_ENABLE(finddlg, [ --enable-finddlg use wxFindReplaceDialog], wxUSE_FINDREPLDLG)
1e6feb95 985WX_ARG_ENABLE(fontdlg, [ --enable-fontdlg use wxFontDialog], wxUSE_FONTDLG)
ce4169a4 986WX_ARG_ENABLE(dirdlg, [ --enable-dirdlg use wxDirDialog], wxUSE_DIRDLG)
1e6feb95
VZ
987WX_ARG_ENABLE(msgdlg, [ --enable-msgdlg use wxMessageDialog], wxUSE_MSGDLG)
988WX_ARG_ENABLE(numberdlg, [ --enable-numberdlg use wxNumberEntryDialog], wxUSE_NUMBERDLG)
cbca9943 989WX_ARG_ENABLE(splash, [ --enable-splash use wxSplashScreen], wxUSE_SPLASH)
c11584af 990WX_ARG_ENABLE(textdlg, [ --enable-textdlg use wxTextDialog], wxUSE_TEXTDLG)
a641505f 991WX_ARG_ENABLE(tipdlg, [ --enable-tipdlg use startup tips], wxUSE_STARTUP_TIPS)
ce4169a4 992WX_ARG_ENABLE(progressdlg, [ --enable-progressdlg use wxProgressDialog], wxUSE_PROGRESSDLG)
b1f5d087
VZ
993WX_ARG_ENABLE(wizarddlg, [ --enable-wizarddlg use wxWizard], wxUSE_WIZARDDLG)
994
995dnl ---------------------------------------------------------------------------
996dnl misc GUI options
997dnl ---------------------------------------------------------------------------
998
1e6feb95 999WX_ARG_ENABLE(menus, [ --enable-menus use wxMenu/wxMenuBar/wxMenuItem classes], wxUSE_MENUS)
143121c5
VZ
1000WX_ARG_ENABLE(miniframe, [ --enable-miniframe use wxMiniFrame class], wxUSE_MINIFRAME)
1001WX_ARG_ENABLE(tooltips, [ --enable-tooltips use wxToolTip class], wxUSE_TOOLTIPS)
1002WX_ARG_ENABLE(splines, [ --enable-splines use spline drawing code], wxUSE_SPLINES)
1003WX_ARG_ENABLE(validators, [ --enable-validators use wxValidator and derived classes], wxUSE_VALIDATORS)
d78b3d64 1004WX_ARG_ENABLE(busyinfo, [ --enable-busyinfo use wxBusyInfo], wxUSE_BUSYINFO)
b3e8d00a 1005WX_ARG_ENABLE(joystick, [ --enable-joystick use wxJoystick (Linux only)], wxUSE_JOYSTICK)
1e6feb95 1006WX_ARG_ENABLE(metafile, [ --enable-metafiles use wxMetaFile (Windows only)], wxUSE_METAFILE)
24fd6d87 1007WX_ARG_ENABLE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE)
143121c5 1008
0940bcf7
HH
1009dnl ---------------------------------------------------------------------------
1010dnl support for image formats that do not rely on external library
1011dnl ---------------------------------------------------------------------------
1012
d275c7eb 1013WX_ARG_ENABLE(palette, [ --enable-palette use wxPalette class], wxUSE_PALETTE)
0046ff7c 1014WX_ARG_ENABLE(image, [ --enable-image use wxImage class], wxUSE_IMAGE)
6b5286d1
HH
1015WX_ARG_ENABLE(gif, [ --enable-gif use gif images (GIF file format)], wxUSE_GIF)
1016WX_ARG_ENABLE(pcx, [ --enable-pcx use pcx images (PCX file format)], wxUSE_PCX)
4b6b4dfc 1017WX_ARG_ENABLE(iff, [ --enable-iff use iff images (IFF file format)], wxUSE_IFF)
6b5286d1 1018WX_ARG_ENABLE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM)
69d27ff7 1019WX_ARG_ENABLE(xpm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM)
c7206e64 1020WX_ARG_ENABLE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR)
0940bcf7 1021
b12915c1 1022fi
590b1a4d
SN
1023
1024dnl General settings (needed for GUI and non-GUI compilations alike).
1025dnl Path separator; ':' for unix, ';' for OS/2
1026dnl Stem for flex output; lexyy for OS/2, lex.yy otherwise
1027case "${host}" in
1028 *-pc-os2_emx | *-pc-os2-emx )
1029 dnl PATH_IFS is autodetected by OS/2's configure (usually ';')
1030 LEX_STEM="lexyy"
1031 ;;
1032 *)
1033 PATH_IFS=':'
1034 LEX_STEM="lex.yy"
1035 ;;
1036esac
1037
b12915c1
VZ
1038dnl for GUI only
1039
143121c5
VZ
1040dnl cache the options values before (may be) aborting below
1041WX_ARG_CACHE_FLUSH
9a98a854
VZ
1042
1043dnl check that no more than one toolkit is given and that if none are given that
1044dnl we have a default one
efeb0365 1045
143121c5
VZ
1046AC_MSG_CHECKING(for toolkit)
1047
e90c1d2a
VZ
1048if test "$wxUSE_GUI" = "yes"; then
1049
3a922bb4
RL
1050 if test "$USE_BEOS" = 1; then
1051 AC_MSG_ERROR([BeOS GUI is not supported yet, use --disable-gui])
1052 fi
b12915c1 1053
3a922bb4
RL
1054 if test "$TOOLKIT_GIVEN" = 1; then
1055 dnl convert "yes" to 1 and "no" to 0
1056 for toolkit in `echo $ALL_TOOLKITS`; do
1057 var=wxUSE_$toolkit
1058 eval "value=\$${var}"
1059 eval "$var=`echo \$value | sed -e "s/yes/1/" -e "s/no/0/"`"
1060 done
143121c5 1061 else
3a922bb4
RL
1062 dnl try to guess the most apropriate toolkit for this platform
1063 for toolkit in `echo $ALL_TOOLKITS`; do
1064 if test "$has_toolkit_in_cache" != 1; then
1065 var=DEFAULT_DEFAULT_wxUSE_$toolkit
1066 else
1067 var=DEFAULT_wxUSE_$toolkit
1068 fi
1069 eval "wxUSE_$toolkit=\$${var}"
1070 done
143121c5 1071 fi
4c0ed911 1072
3a922bb4
RL
1073 dnl we suppose that expr is available (maybe there is a better way to do
1074 dnl this? what about using ALL_TOOLKITS? TODO)
1075 NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_MAC:-0} \
f79bd02d 1076 + ${wxUSE_WINE:-0} + ${wxUSE_MSW:-0} + ${wxUSE_MGL:-0} + ${wxUSE_MICROWIN:-0} + ${wxUSE_X11:-0}`
9a98a854 1077
3a922bb4 1078 dnl Allow wxUSE_PM only for OS/2 with EMX.
3a922bb4 1079 case "${host}" in
9829f277 1080 *-pc-os2_emx | *-pc-os2-emx )
3a922bb4 1081 NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}`
3a922bb4 1082 esac
9a98a854 1083
3a922bb4
RL
1084 case "$NUM_TOOLKITS" in
1085 1)
1086 ;;
1087 0)
1088 AC_MSG_ERROR(Please specify a toolkit - cannot determine the default for ${host})
1089 ;;
1090 *)
1091 AC_MSG_ERROR(Please specify at most one toolkit (may be some are cached?))
1092 esac
143121c5 1093
3a922bb4
RL
1094 dnl cache the wxUSE_<TOOLKIT> values too
1095 for toolkit in `echo $ALL_TOOLKITS`; do
1096 var=wxUSE_$toolkit
1097 eval "value=\$${var}"
1098 if test "x$value" != x; then
1099 cache_var=CACHE_$toolkit
1100 eval "cache=\$${cache_var}"
1101 if test "$cache" = 1; then
1102 echo "$var=$value" >> ${wx_arg_cache_file}
1103 fi
1104 if test "$value" = 1; then
1105 toolkit_echo=`echo $toolkit | tr [[A-Z]] [[a-z]]`
1106 AC_MSG_RESULT($toolkit_echo)
1107 fi
1108 fi
1109 done
e90c1d2a 1110else
3a922bb4 1111 AC_MSG_RESULT(base ($host_alias hosted) only)
e90c1d2a
VZ
1112fi
1113
17234b26
MB
1114dnl ---------------------------------------------------------------------------
1115dnl When we are using Cygwin with Motif/GTK+, we want it to appear like
1116dnl 'just' a POSIX platform, so the Win32 API must not be available
1117dnl ---------------------------------------------------------------------------
1118
1119define_win32=0
1120case "${host}" in
1121 *-*-cygwin*)
1122 if test "$wxUSE_MSW" = 1 ; then
1123 define_win32=1
1124 fi
1125 ;;
1126 *-*-mingw*)
1127 define_win32=1
1128 ;;
1129esac
1130
1131if test "$define_win32" = 1 ; then
1132 USE_UNIX=0
1133 USE_WIN32=1
1134 AC_DEFINE(__WIN32__)
1135 AC_DEFINE(__WIN95__)
1136 AC_DEFINE(__WINDOWS__)
1137 AC_DEFINE(__GNUWIN32__)
1138 AC_DEFINE(STRICT)
1139 AC_DEFINE(WINVER, 0x0400)
1140else
1141 USE_UNIX=1
1142 USE_WIN32=0
1143fi
1144
1145if test "$USE_UNIX" = 1 ; then
1146 wxUSE_UNIX=yes
1147 AC_DEFINE(__UNIX__)
1148fi
1149
9a98a854
VZ
1150dnl ---------------------------------------------------------------------------
1151dnl Checks for programs
1152dnl ---------------------------------------------------------------------------
1153
1154dnl flush the cache because checking for programs might abort
1155AC_CACHE_SAVE
1156
1157dnl cross-compiling support: we're cross compiling if the build system is
1158dnl different from the target one (assume host and target be always the same)
e59890c3 1159if test "$build" != "$host" ; then
9d353d4a 1160 if test "$USE_WIN32" = 1 -o "$USE_DOS" = 1 -o "$USE_UNIX"; then
3a922bb4
RL
1161 CC=$host_alias-gcc
1162 CXX=$host_alias-c++
1163 AR=$host_alias-ar
1164 RANLIB=$host_alias-ranlib
1165 DLLTOOL=$host_alias-dlltool
1166 RESCOMP=$host_alias-windres
1167 LD=$host_alias-ld
1168 NM=$host_alias-nm
1169 STRIP=$host_alias-strip
1170 else
1171 AC_MSG_ERROR($build_alias -> $host_alias cross compilation not supported yet.)
1172 fi
9a98a854
VZ
1173fi
1174
1175dnl C-compiler checks
1176dnl defines CC with the compiler to use
1177dnl defines GCC with yes if using gcc
1178dnl defines GCC empty if not using gcc
1179dnl defines CFLAGS
04727afd
VZ
1180dnl
1181dnl this magic incantation is needed to prevent AC_PROG_CC from setting the
1182dnl default CFLAGS (something like "-g -O2") - we don't need this as add
1183dnl -g and -O flags ourselves below
ec603395 1184CFLAGS=${CFLAGS:=}
9a98a854
VZ
1185AC_PROG_CC
1186
9a98a854
VZ
1187dnl is -traditional needed for correct compilations
1188dnl adds -traditional for gcc if needed
1189AC_PROG_GCC_TRADITIONAL
1190
1191AC_LANG_SAVE
1192AC_LANG_CPLUSPLUS
1193
1194dnl C++-compiler checks
1195dnl defines CXX with the compiler to use
1196dnl defines GXX with yes if using gxx
1197dnl defines GXX empty if not using gxx
1198dnl defines CXXFLAGS
04727afd
VZ
1199dnl
1200dnl see CFLAGS line above
ec603395 1201CXXFLAGS=${CXXFLAGS:=}
9a98a854
VZ
1202AC_PROG_CXX
1203
9a98a854
VZ
1204AC_LANG_RESTORE
1205
1206dnl ranlib command
1207dnl defines RANLIB with the appropriate command
1208AC_PROG_RANLIB
1209
1210dnl ar command
1211dnl defines AR with the appropriate command
1212AC_CHECK_PROG(AR, ar, ar, ar)
1213
1214dnl install checks
1215dnl defines INSTALL with the appropriate command
6054113a 1216AC_PROG_INSTALL
2e033fd1
CE
1217
1218dnl make install path absolute (if not already); will fail with MSDOS paths
1219case ${INSTALL} in
1220 /* ) # Absolute
1221 ;;
1222 *)
1223 INSTALL=`pwd`/${INSTALL} ;;
1224esac
1225
1226
d6853540
RL
1227case "${host}" in
1228
b5853384
GD
1229 dnl The other BSD's should probably go in here too, since this is
1230 dnl to workaround a strange static lib BSDism.
1231 dnl Mac OS X install seems to ignore -p option...
d6853540 1232 powerpc-*-darwin* )
eb99ae0b
GD
1233 INSTALL_PROGRAM="cp -fp"
1234 INSTALL_DATA="cp -fp"
d6853540
RL
1235 ;;
1236 *)
6054113a 1237 ;;
d6853540 1238esac
9a98a854 1239
9a98a854
VZ
1240dnl strip command
1241dnl defines STRIP as strip or nothing if not found
1242AC_CHECK_PROG(STRIP, strip, strip, true)
1243
414eab6d
VZ
1244dnl does make support "-include" (only GNU make does AFAIK)?
1245AC_CACHE_CHECK([if make is GNU make], wx_cv_prog_makeisgnu,
1246[
1247 if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null |
c13b1125 1248 egrep -s GNU > /dev/null); then
414eab6d
VZ
1249 wx_cv_prog_makeisgnu="yes"
1250 else
1251 wx_cv_prog_makeisgnu="no"
1252 fi
1253])
1254
1255if test "x$wx_cv_prog_makeisgnu" = "xyes"; then
1256 IF_GNU_MAKE=""
1257else
1258 IF_GNU_MAKE="#"
1259fi
1260
1261AC_SUBST(IF_GNU_MAKE)
1262
1263dnl we don't need to check for VPATH support in GNU make - it does have it
1264if test "x$wx_cv_prog_makeisgnu" != "xyes"; then
9a98a854 1265dnl check if VPATH works
04e7a216 1266AC_CACHE_CHECK([if make supports VPATH], wx_cv_prog_makevpath, [
9a98a854
VZ
1267dnl create Makefile
1268cat - << EOF > confMake
1269check : file
1270 cp \$? \$@
1271 cp \$? final_file
1272EOF
1273
1274if test ! -d sub ; then
1275 mkdir sub
1276fi
1277echo dummy > sub/file
f6bcfd97 1278${MAKE-make} -f confMake VPATH=sub 2>&5 > /dev/null
9a98a854
VZ
1279RESULT=$?
1280rm -f sub/file check final_file confMake
1281rmdir sub
1282if test "$RESULT" = 0; then
04e7a216 1283 wx_cv_prog_makevpath="yes"
9a98a854 1284else
04e7a216
VZ
1285 wx_cv_prog_makevpath="no"
1286fi
1287])
1288
1289if test "x$wx_cv_prog_makevpath" != "xyes"; then
1290AC_MSG_ERROR([
9a98a854
VZ
1291You need a make-utility that is able to use the variable
1292VPATH correctly.
1293If your version of make does not support VPATH correctly,
1294please install GNU-make (possibly as gmake), and start
1295configure with the following command:
1296export MAKE=gmake; ./configure for sh-type shells
1297setenv MAKE gmake; ./configure for csh-type shells
1298Also please do remember to use gmake in this case every time
1299you are trying to compile.
1e487827 1300])
414eab6d
VZ
1301fi dnl make without VPATH
1302fi dnl not GNU make
613d0995 1303
9a98a854
VZ
1304dnl YACC checks
1305dnl defines YACC with the appropriate command
1306AC_PROG_YACC
1307
1308dnl LEX checks
1309dnl defines LEX with the appropriate command
1310dnl defines LEXLIB with the appropriate library
2aa88730 1311AC_PROG_LEX
9a98a854 1312
c7114f59
VZ
1313dnl needed for making link to setup.h
1314AC_PROG_LN_S
1315
21d1c967
GD
1316dnl ------------------------------------------------------------------------
1317dnl Check for headers
1318dnl ------------------------------------------------------------------------
1319
1320dnl test for strings.h needed under AIX, but do not check for it wxMac as
1321dnl it exists but is only a simple redirection to string.h and it is in
1322dnl conflict with Strings.h in FlatCarbon headers
1323if test "$wxUSE_MAC" != 1; then
1324 dnl defines HAVE_STRINGS_H
1325 AC_CHECK_HEADERS(strings.h)
1326fi
1327
1328dnl defines HAVE_STDLIB_H
1329AC_CHECK_HEADERS(stdlib.h)
1330dnl defines HAVE_MALLOC_H
1331AC_CHECK_HEADERS(malloc.h)
1332dnl defines HAVE_UNISTD_H
1333AC_CHECK_HEADERS(unistd.h)
1334dnl defines HAVE_WCHAR_H
1335AC_CHECK_HEADERS(wchar.h)
1336
1337dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
1338if test "$ac_cv_header_wchar_h" != "yes"; then
1339 dnl defines HAVE_WCSTR_H
1340 AC_CHECK_HEADERS(wcstr.h)
1341fi
1342
1343dnl checking for wctype.h is useless as we need wcslen(), not just wchar_t and
1344dnl this function is never provided by it
1345dnl AC_CHECK_HEADERS(wctype.h)
1346
1347dnl defines HAVE_FNMATCH_H
1348AC_CHECK_HEADERS(fnmatch.h)
1349
1350if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
1351 AC_CHECK_FUNCS(fnmatch)
1352fi
1353
1354dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
1355AC_CHECK_HEADERS(langinfo.h)
1356
1357if test "$wxUSE_GUI" = "yes"; then
1358 if test "$wxUSE_UNIX" = "yes"; then
1359 dnl defines HAVE_X11_XKBLIB_H
1360 AC_CHECK_HEADERS(X11/XKBlib.h)
1361 fi
1362fi
1363
90dd450c
VZ
1364dnl ---------------------------------------------------------------------------
1365dnl Checks for compiler characteristics
1366dnl ---------------------------------------------------------------------------
1367
1368dnl defines const to be empty if c-compiler does not support const fully
1369AC_C_CONST
1370dnl defines inline to a sensible value for the c-compiler
1371AC_C_INLINE
1372
1373dnl check the sizes of integral types (give some reasonable default values for
1374dnl cross-compiling)
1375dnl defines the size of certain types of variables in SIZEOF_<TYPE>
1376AC_CHECK_SIZEOF(char, 1)
1377AC_CHECK_SIZEOF(short, 2)
1378AC_CHECK_SIZEOF(void *, 4)
1379AC_CHECK_SIZEOF(int, 4)
1380AC_CHECK_SIZEOF(long, 4)
1381
1382case "${host}" in
1383 arm-*-linux* )
1384 AC_CHECK_SIZEOF(long long, 8)
1385 ;;
1386 * )
1387 AC_CHECK_SIZEOF(long long, 0)
1388esac
1389
90dd450c
VZ
1390dnl we have to do it ourselves because SGI/Irix's stdio.h does not include
1391dnl wchar_t and AC_CHECK_SIZEOF only includes stdio.h
1392dnl Mac OS X does not provide wchar.h and wchar_t is defined by stdlib.h (GD)
1393AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t,
1394[
1395 AC_TRY_RUN(
1396 [
1397 #ifdef HAVE_WCHAR_H
1398 # ifdef __CYGWIN__
1399 # include <stddef.h>
1400 # endif
1401 # include <wchar.h>
1402 #endif
1403 #ifdef HAVE_STDLIB_H
1404 # include <stdlib.h>
1405 #endif
1406 #include <stdio.h>
1407 int main()
1408 {
1409 FILE *f=fopen("conftestval", "w");
1410 if (!f) exit(1);
1411 fprintf(f, "%i", sizeof(wchar_t));
1412 exit(0);
1413 }
1414 ],
1415 wx_cv_sizeof_wchar_t=`cat conftestval`,
1416 wx_cv_sizeof_wchar_t=0,
1417 wx_cv_sizeof_wchar_t=4
1418 )
1419])
1420
1421AC_DEFINE_UNQUOTED(SIZEOF_WCHAR_T, $wx_cv_sizeof_wchar_t)
1422
1423dnl check for large file support
1424AC_SYS_LARGEFILE
1425
1426dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
1427WX_C_BIGENDIAN
1428
1429dnl check for iostream (as opposed to iostream.h) standard header
1430WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
1431
1432dnl check whether C++ compiler supports bool built-in type
1433WX_CPP_BOOL
1434
986ecc86
VZ
1435dnl check whether C++ compiler supports explicit keyword
1436WX_CPP_EXPLICIT
1437
9a98a854
VZ
1438dnl ---------------------------------------------------------------------------
1439dnl Define search path for includes and libraries: all headers and libs will be
1440dnl looked for in all directories of this path
1441dnl ---------------------------------------------------------------------------
1442
ee31c269
VZ
1443dnl notice that /usr/include should not be in this list, otherwise it breaks
1444dnl compilation on Solaris/gcc because standard headers are included instead
928b5c08
VZ
1445dnl of the gcc ones (correction: it *is* needed for broken AIX compiler - but
1446dnl do put it last!)
afc31813
VZ
1447dnl
1448dnl Also try to put all directories which may contain X11R6 before those which
1449dnl may contain X11R5/4 - we want to use R6 on machines which have both!
9a98a854 1450SEARCH_INCLUDE="\
ee31c269
VZ
1451 /usr/local/include \
1452 \
9a98a854
VZ
1453 /usr/Motif-1.2/include \
1454 /usr/Motif-2.1/include \
1455 \
1456 /usr/include/Motif1.2 \
1457 /opt/xpm/include/X11 \
8636aed8
RR
1458 /opt/GBxpm/include/ \
1459 /opt/GBxpm/X11/include/ \
9a98a854
VZ
1460 \
1461 /usr/Motif1.2/include \
1462 /usr/dt/include \
afc31813
VZ
1463 /usr/openwin/include \
1464 \
9a98a854
VZ
1465 /usr/include/Xm \
1466 \
1467 /usr/X11R6/include \
afc31813 1468 /usr/X11R6.4/include \
9a98a854
VZ
1469 /usr/X11R5/include \
1470 /usr/X11R4/include \
1471 \
9a98a854
VZ
1472 /usr/include/X11R6 \
1473 /usr/include/X11R5 \
1474 /usr/include/X11R4 \
1475 \
1476 /usr/local/X11R6/include \
1477 /usr/local/X11R5/include \
1478 /usr/local/X11R4/include \
1479 \
1480 /usr/local/include/X11R6 \
1481 /usr/local/include/X11R5 \
1482 /usr/local/include/X11R4 \
1483 \
1484 /usr/X11/include \
1485 /usr/include/X11 \
1486 /usr/local/X11/include \
1487 /usr/local/include/X11 \
1488 \
1489 /usr/X386/include \
1490 /usr/x386/include \
1491 /usr/XFree86/include/X11 \
1492 \
4c0ed911 1493 X:/XFree86/include \
d51e8205
SN
1494 X:/XFree86/include/X11 \
1495 \
9a98a854 1496 /usr/include/gtk \
5a92d200 1497 /usr/local/include/gtk \
9a98a854 1498 /usr/include/glib \
5a92d200
RR
1499 /usr/local/include/glib \
1500 \
1501 /usr/include/qt \
1502 /usr/local/include/qt \
1503 \
a9b5e89f 1504 /usr/include/windows \
5a92d200
RR
1505 /usr/include/wine \
1506 /usr/local/include/wine \
1507 \
9a98a854
VZ
1508 /usr/unsupported/include \
1509 /usr/athena/include \
1510 /usr/local/x11r5/include \
1511 /usr/lpp/Xamples/include \
1512 \
9a98a854 1513 /usr/openwin/share/include \
928b5c08
VZ
1514 \
1515 /usr/include"
9a98a854
VZ
1516
1517SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` "
1518
1519dnl ------------------------------------------------------------------------
1520dnl Check for libraries
1521dnl ------------------------------------------------------------------------
1522
143121c5 1523dnl flush the cache because checking for libraries below might abort
9a98a854
VZ
1524AC_CACHE_SAVE
1525
19bc6aad 1526dnl check for glibc version
efdc61a6
VZ
1527dnl
1528dnl VZ: I have no idea why had this check been there originally, but now
1529dnl it is only used to get the recursive mutexes under Linux
19bc6aad
VZ
1530if test "$USE_LINUX" = 1; then
1531 AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[
1532 AC_TRY_COMPILE([#include <features.h>],
1533 [
efdc61a6 1534 #if (__GLIBC__ < 2) || (__GLIBC_MINOR__ < 1)
19bc6aad
VZ
1535 #error not glibc2.1
1536 #endif
1537 ],
1538 [
1539 wx_cv_lib_glibc21=yes
1540 ],
1541 [
1542 wx_cv_lib_glibc21=no
1543 ]
1544 )
1545 ])
1546 if test "$wx_cv_lib_glibc21" = "yes"; then
1547 AC_DEFINE(wxHAVE_GLIBC2)
1548 fi
1549fi
1550
4f14bcd8
GD
1551dnl ---------------------------------------------------------------------------
1552dnl Optional libraries
1553dnl
1554dnl --with-<lib>=sys
1555dnl looks for system library and fails if not found
1556dnl
1557dnl --with-<lib>
1558dnl --with-<lib>=yes
1559dnl looks for system library and, if not found, prints a warning,
1560dnl falls back to the builtin wx version, and continues configuration
1561dnl
1562dnl --with-<lib>=builtin
1563dnl uses builtin wx version without searching for system library
1564dnl
1565dnl --with-<lib>=no
1566dnl --without-<lib>
1567dnl do not use library (neither system nor builtin wx version)
1568dnl
1569dnl ---------------------------------------------------------------------------
1570
18dbb1f6
VZ
1571dnl ------------------------------------------------------------------------
1572dnl Check for regex libraries
1573dnl ------------------------------------------------------------------------
1574
1575REGEX_INCLUDE=
1576if test "$wxUSE_REGEX" != "no"; then
4f14bcd8
GD
1577 AC_DEFINE(wxUSE_REGEX)
1578
1579 if test "$wxUSE_REGEX" = "sys" -o "$wxUSE_REGEX" = "yes" ; then
1580 dnl according to Unix 98 specs, regcomp() is in libc but I believe that
1581 dnl on some old systems it may be in libregex - check for it too?
1582 AC_CHECK_HEADER(regex.h, AC_CHECK_FUNCS(regcomp))
1583
1584 if test "x$ac_cv_func_regcomp" != "xyes"; then
1585 if test "$wxUSE_REGEX" = "sys" ; then
1586 AC_MSG_ERROR([system regex library not found! Use --with-regex to use built-in version])
1587 else
a3df447d 1588 AC_MSG_WARN([system regex library not found, will use built-in instead])
4f14bcd8
GD
1589 wxUSE_REGEX=builtin
1590 fi
1591 else
1592 dnl we are using the system library
1593 wxUSE_REGEX=sys
18dbb1f6 1594 fi
4f14bcd8 1595 fi
18dbb1f6 1596
4f14bcd8 1597 if test "$wxUSE_REGEX" = "builtin" ; then
18dbb1f6
VZ
1598 REGEX_INCLUDE="-I\${top_srcdir}/src/regex"
1599 fi
4f14bcd8 1600fi
18dbb1f6 1601
4f14bcd8
GD
1602dnl ------------------------------------------------------------------------
1603dnl Check for zlib compression library
1604dnl ------------------------------------------------------------------------
1605
1606ZLIB_INCLUDE=
1607ZLIB_LINK=
1608if test "$wxUSE_ZLIB" != "no" ; then
1609 AC_DEFINE(wxUSE_ZLIB)
1610
1611 if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then
3d63bc3a 1612 AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, deflate, ZLIB_LINK=" -lz"))
4f14bcd8
GD
1613
1614 if test "x$ZLIB_LINK" = "x" ; then
1615 if test "$wxUSE_ZLIB" = "sys" ; then
1616 AC_MSG_ERROR([system zlib compression library not found! Use --with-zlib=builtin to use built-in version])
1617 else
a3df447d 1618 AC_MSG_WARN([system zlib compression library not found, will use built-in instead])
4f14bcd8
GD
1619 wxUSE_ZLIB=builtin
1620 fi
1621 else
1622 dnl we are using the system library
1623 wxUSE_ZLIB=sys
1624 fi
1625 fi
1626
1627 if test "$wxUSE_ZLIB" = "builtin" ; then
1628 ZLIB_INCLUDE="-I\${top_srcdir}/src/zlib"
1629 fi
1630fi
1631
1632dnl ------------------------------------------------------------------------
1633dnl Check for png library
1634dnl ------------------------------------------------------------------------
1635
1636PNG_INCLUDE=
1637PNG_LINK=
1638if test "$wxUSE_LIBPNG" != "no" ; then
1639 AC_DEFINE(wxUSE_LIBPNG)
81809c07
VS
1640
1641 if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBPNG" = "builtin" ; then
1642 AC_MSG_WARN([wxMGL doesn't work with builtin png library, will use MGL one instead])
1643 wxUSE_LIBPNG=sys
1644 fi
4f14bcd8
GD
1645
1646 dnl for the check below to have a chance to succeed, we must already have
81809c07
VS
1647 dnl libz somewhere (don't do this when bulding wxMGL since its libpng
1648 dnl doesn't depend on zlib)
1649 if test "$wxUSE_MGL" != 1 -a "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then
a3df447d 1650 AC_MSG_WARN([system png library doesn't work without system zlib, will use built-in instead])
4f14bcd8
GD
1651 wxUSE_LIBPNG=builtin
1652 fi
1653
81809c07
VS
1654 if test "$wxUSE_MGL" != 1 ; then
1655 dnl Don't check for libpng when building wxMGL, libmgl contains it
1656 if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then
1657 AC_CHECK_HEADER(png.h,
1658 AC_CHECK_LIB(png, png_check_sig,
1659 PNG_LINK=" -lpng",
1660 ,
1661 [-lz -lm])
1662 )
1663
1664 if test "x$PNG_LINK" = "x" ; then
1665 if test "$wxUSE_LIBPNG" = "sys" ; then
1666 AC_MSG_ERROR([system png library not found! Use --with-libpng=builtin to use built-in version])
1667 else
1668 AC_MSG_WARN([system png library not found, will use built-in instead])
1669 wxUSE_LIBPNG=builtin
1670 fi
4f14bcd8 1671 else
81809c07
VS
1672 dnl we are using the system library
1673 wxUSE_LIBPNG=yes
4f14bcd8 1674 fi
4f14bcd8
GD
1675 fi
1676 fi
1677
1678 if test "$wxUSE_LIBPNG" = "builtin" ; then
1679 PNG_INCLUDE="-I\${top_srcdir}/src/png"
1680 fi
1681
1682 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png"
1683fi
1684
1685dnl ------------------------------------------------------------------------
1686dnl Check for jpeg library
1687dnl ------------------------------------------------------------------------
1688
1689JPEG_INCLUDE=
1690JPEG_LINK=
1691if test "$wxUSE_LIBJPEG" != "no" ; then
1692 AC_DEFINE(wxUSE_LIBJPEG)
1693
81809c07
VS
1694 if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBJPEG" = "builtin" ; then
1695 AC_MSG_WARN([wxMGL doesn't work with builtin jpeg library, will use MGL one instead])
1696 wxUSE_LIBJPEG=sys
1697 fi
1698
1699 if test "$wxUSE_MGL" != 1 ; then
1700 dnl Don't check for libjpeg when building wxMGL, libmgl contains it
1701 if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then
1702 dnl can't use AC_CHECK_HEADER as jconfig.h defines things like
1703 dnl HAVE_STDLIB_H which are already defined and this provokes
1704 dnl a compiler warning which configure considers as an error...
1705 AC_MSG_CHECKING(for jpeglib.h)
1706 AC_CACHE_VAL(ac_cv_header_jpeglib_h,
1707 AC_TRY_COMPILE(
1708 [
1709 #undef HAVE_STDLIB_H
1710 #include <stdio.h>
1711 #include <jpeglib.h>
1712 ],
1713 [
1714 ],
1715 ac_cv_header_jpeglib_h=yes,
1716 ac_cv_header_jpeglib_h=no
1717 )
4f14bcd8 1718 )
81809c07 1719 AC_MSG_RESULT($ac_cv_header_jpeglib_h)
4f14bcd8 1720
81809c07
VS
1721 if test "$ac_cv_header_jpeglib_h" = "yes"; then
1722 AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK=" -ljpeg")
1723 fi
4f14bcd8 1724
81809c07
VS
1725 if test "x$JPEG_LINK" = "x" ; then
1726 if test "$wxUSE_LIBJPEG" = "sys" ; then
1727 AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version])
1728 else
1729 AC_MSG_WARN([system jpeg library not found, will use built-in instead])
1730 wxUSE_LIBJPEG=builtin
1731 fi
4f14bcd8 1732 else
81809c07
VS
1733 dnl we are using the system library
1734 wxUSE_LIBJPEG=sys
4f14bcd8 1735 fi
4f14bcd8
GD
1736 fi
1737 fi
1738
1739 if test "$wxUSE_LIBJPEG" = "builtin" ; then
1740 JPEG_INCLUDE="-I\${top_srcdir}/src/jpeg"
1741 fi
1742fi
1743
1744dnl ------------------------------------------------------------------------
1745dnl Check for tiff library
1746dnl ------------------------------------------------------------------------
1747
1748TIFF_INCLUDE=
1749TIFF_LINK=
1750if test "$wxUSE_LIBTIFF" != "no" ; then
1751 AC_DEFINE(wxUSE_LIBTIFF)
1752
1753 if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then
1754 AC_CHECK_HEADER(tiffio.h,
1755 AC_CHECK_LIB(tiff, TIFFError,
3d63bc3a 1756 TIFF_LINK=" -ltiff",
4f14bcd8
GD
1757 ,
1758 -lm)
1759 )
1760
1761 if test "x$TIFF_LINK" = "x" ; then
1762 if test "$wxUSE_LIBTIFF" = "sys" ; then
1763 AC_MSG_ERROR([system tiff library not found! Use --with-libtiff=builtin to use built-in version])
1764 else
a3df447d 1765 AC_MSG_WARN([system tiff library not found, will use built-in instead])
4f14bcd8
GD
1766 wxUSE_LIBTIFF=builtin
1767 fi
1768 else
1769 dnl we are using the system library
1770 wxUSE_LIBTIFF=sys
1771 fi
1772 fi
1773
1774 if test "$wxUSE_LIBTIFF" = "builtin" ; then
1775 TIFF_INCLUDE="-I\${top_srcdir}/src/tiff"
1776 fi
1777fi
1778
9a98a854
VZ
1779dnl ----------------------------------------------------------------
1780dnl search for toolkit (widget sets)
1781dnl ----------------------------------------------------------------
1782
dad6c0ea
VZ
1783AFMINSTALL=
1784
3a922bb4
RL
1785TOOLKIT=
1786TOOLKIT_INCLUDE=
1787WIDGET_SET=
e90c1d2a 1788
3a922bb4
RL
1789dnl are we building for a win32 target environment?
1790dnl If so, setup common stuff needed for both GUI and Base libs.
1791if test "$USE_WIN32" = 1 ; then
1792 AC_CHECK_HEADERS(w32api.h)
1793 AC_CHECK_HEADER(windows.h, [],
1794 [
1795 AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
1796 ])
dad6c0ea 1797
ea7682f0
VS
1798 dnl check if can use _WIN32_IE macro
1799 AC_CACHE_CHECK([if w32api has good enough MSIE support], wx_cv_w32api_win32_ie,
3a922bb4
RL
1800 [
1801 AC_TRY_COMPILE([#include <w32api.h>],
1802 [
1803 #define wxCHECK_W32API_VERSION( major, minor ) \
1804 ( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \
1805 && ( ( __W32API_MAJOR_VERSION > (major) ) \
1806 || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor))))
1807
1808 #if !wxCHECK_W32API_VERSION(1,1)
1809 #error You need w32api 1.1 or newer
1810 #endif
1811 ], [
ea7682f0 1812 wx_cv_w32api_win32_ie=yes
3a922bb4 1813 ], [
ea7682f0 1814 wx_cv_w32api_win32_ie=no
3a922bb4
RL
1815 ])
1816 ])
ea7682f0
VS
1817 if test "$wx_cv_w32api_win32_ie" = "yes" ; then
1818 CPPFLAGS="$CPPFLAGS -D_WIN32_IE=0x400"
1819 fi
9a98a854 1820
3a922bb4
RL
1821 dnl --- FIXME: This is still a somewhat random list of libs,
1822 dnl --- some of them should probably be included conditionally.
1823 LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32"
9a98a854 1824
77e13408
RL
1825 case "${host}" in
1826 *-*-cygwin* )
1827 dnl Cygwin doesn't include these by default
1828 LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32"
1829 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WIN95__"
1830 esac
7b7a7637 1831
3a922bb4
RL
1832 dnl add extra odbc libs if we have compiled in odbc
1833 if test "$wxUSE_ODBC" = "yes" ; then
a72a4bfa 1834 LIBS=" -lodbc32 -lole32 -loleaut32 $LIBS"
3a922bb4 1835 fi
9a98a854 1836
3a922bb4
RL
1837 RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
1838 RESPROGRAMOBJ="\$(PROGRAM)_resources.o"
1839fi
3f0f0161 1840
3a922bb4
RL
1841if test "$wxUSE_GUI" = "yes"; then
1842 USE_GUI=1
a9b5e89f 1843
3a922bb4 1844 GUI_TK_LIBRARY=
32832908 1845
3a922bb4
RL
1846 WXGTK12=
1847 WXGTK127=
1848 WXGTK20=
32832908 1849
77e13408 1850 if test "$wxUSE_MSW" = 1 ; then
1e6feb95
VZ
1851 TOOLKIT=MSW
1852 GUIDIST=MSW_DIST
77e13408
RL
1853
1854 dnl -mwindows causes a heap of other default gui libs to be linked in.
1855 dnl FIXME: If cygwin needs this, please push it above, if not, please
1856 dnl remove this comment :-)
1857 case "${host}" in
1858 *-*-mingw32* )
3d63bc3a 1859 LDFLAGS="$LDFLAGS -Wl,--subsystem,windows -mwindows"
77e13408 1860 esac
7e99ad86
VZ
1861 fi
1862
1e6feb95 1863 if test "$wxUSE_GTK" = 1; then
8168de4c 1864 AC_MSG_CHECKING([for GTK+ version])
b9fa850d 1865
8168de4c
VZ
1866 gtk_version_cached=1
1867 AC_CACHE_VAL(wx_cv_lib_gtk,
1868 [
1869 dnl stupid GTK+ AM macros produce their own messages, so we
1870 dnl have to pass to the next line
1871 gtk_version_cached=0
d48ad9bd 1872 AC_MSG_RESULT()
8168de4c 1873
3f345b47
VZ
1874 dnl we must link against lgthread unless the user
1875 dnl used --disable-threads
1876 GTK_MODULES=
1877 if test "$wxUSE_THREADS" = "yes"; then
1878 GTK_MODULES=gthread
1879 fi
1880
8168de4c
VZ
1881 wx_cv_lib_gtk=
1882 if test "x$wxUSE_GTK2" = "xyes"; then
1ae7bd02 1883 AM_PATH_GTK_2_0(2.0.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
8168de4c
VZ
1884 fi
1885
1886 if test -z "$wx_cv_lib_gtk"; then
3f345b47 1887 AM_PATH_GTK(1.2.7, wx_cv_lib_gtk=1.2.7, , $GTK_MODULES)
8168de4c
VZ
1888 fi
1889
1890 if test -z "$wx_cv_lib_gtk"; then
3f345b47 1891 AM_PATH_GTK(1.2.3, wx_cv_lib_gtk=1.2.3, , $GTK_MODULES)
8168de4c
VZ
1892 fi
1893
1894 if test -z "$wx_cv_lib_gtk"; then
1895 dnl looks better in AC_MSG_RESULT
1896 wx_cv_lib_gtk=none
138be253
VZ
1897 else
1898 dnl we need to cache GTK_CFLAGS and GTK_LIBS for the
1899 dnl subsequent runs
1900 wx_cv_cflags_gtk=$GTK_CFLAGS
1901 wx_cv_libs_gtk=$GTK_LIBS
8168de4c
VZ
1902 fi
1903 ]
1904 )
b9fa850d 1905
8168de4c
VZ
1906 dnl if it wasn't cached, the messages from AM_PATH_GTK() above are
1907 dnl enough
1908 if test "$gtk_version_cached" = 1; then
1909 AC_MSG_RESULT($wx_cv_lib_gtk)
1910 fi
b9fa850d 1911
8168de4c
VZ
1912 case "$wx_cv_lib_gtk" in
1913 2.0) WXGTK20=1
1914 ;;
1915 1.2.7) WXGTK127=1
d1a8d972 1916 WXGTK12=1
8168de4c
VZ
1917 ;;
1918 1.2.3) WXGTK12=1
1919 ;;
1920 *) AC_MSG_ERROR([
1921Please check that gtk-config is in path, the directory
1922where GTK+ libraries are installed (returned by
1923'gtk-config --libs' command) is in LD_LIBRARY_PATH or
1924equivalent variable and GTK+ is version 1.2.3 or above.
1925 ])
1926 ;;
1927 esac
c596875e 1928
138be253 1929 TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
11dfaa5f 1930 GUI_TK_LIBRARY="$wx_cv_libs_gtk"
7799a2d7 1931
1e6feb95
VZ
1932 AFMINSTALL=afminstall
1933 TOOLKIT=GTK
1934 GUIDIST=GTK_DIST
9a98a854 1935
1e6feb95
VZ
1936 dnl test for XIM support in libgdk
1937 AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
5a92d200
RR
1938 fi
1939
1e6feb95 1940 if test "$wxUSE_MGL" = 1; then
1e6feb95
VZ
1941 AC_MSG_CHECKING(for SciTech MGL library)
1942 if test "x$MGL_ROOT" = x ; then
1943 AC_MSG_RESULT(not found)
1944 AC_MSG_ERROR([Cannot find MGL library. Make sure MGL_ROOT is set.])
1945 else
1946 AC_MSG_RESULT($MGL_ROOT)
1947 fi
5a92d200 1948
f9bc1684
VS
1949 dnl Find MGL library that we want
1950 dnl FIXME_MGL - test for MGL variants for freebsd etc.
1951 case "${host}" in
1952 *-*-linux* )
1953 mgl_os=linux/gcc/glibc
1954 ;;
1955 *-pc-msdosdjgpp )
1956 mgl_os=dos32/dj2
1957 ;;
1958 *)
1959 AC_MSG_ERROR(This system type ${host} is not yet supported by wxMGL.)
1960 esac
1961
3a922bb4 1962 mgl_lib_type=""
5a92d200 1963
1e6feb95 1964 if test "$wxUSE_DEBUG_FLAG" = yes ; then
223e7fbf
VS
1965 if test -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.a -o \
1966 -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.so; then
3a922bb4 1967 mgl_lib_type=debug
1e6feb95
VZ
1968 fi
1969 fi
3a922bb4 1970 if test "x$mgl_lib_type" = x ; then
223e7fbf
VS
1971 if test -f $MGL_ROOT/lib/release/$mgl_os/libmgl.a -o \
1972 -f $MGL_ROOT/lib/release/$mgl_os/libmgl.so; then
3a922bb4 1973 mgl_lib_type=release
1e6feb95
VZ
1974 else
1975 AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.])
1976 fi
1977 fi
264de0cc 1978
1d1b75ac
VZ
1979 wxUSE_UNIVERSAL="yes"
1980
1e6feb95 1981 TOOLKIT_INCLUDE="-I$MGL_ROOT/include"
3a922bb4 1982 GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$mgl_lib_type/$mgl_os -lmgl -lmglcpp -lpm"
d607e6c3 1983
1e6feb95
VZ
1984 AFMINSTALL=afminstall
1985 TOOLKIT=MGL
1986 GUIDIST=MGL_DIST
d607e6c3 1987 fi
143121c5 1988
1725144d
RR
1989 if test "$wxUSE_MICROWIN" = 1; then
1990 AC_MSG_CHECKING(for MicroWindows)
1991 if test "x$MICROWINDOWS" = x ; then
1992 AC_MSG_RESULT(not found)
1993 AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWINDOWS is set.])
1994 else
1995 AC_MSG_RESULT($MICROWINDOWS)
1996 fi
1997
1998 if test -f $MICROWINDOWS/lib/libmwin.a; then
1999 AC_MSG_RESULT(MicroWindows' libraries found.)
2000 else
2001 AC_MSG_ERROR([Cannot find MicroWindows libraries, make sure they are compiled.])
2002 fi
2003
2004 TOOLKIT_INCLUDE="-I$MICROWINDOWS/include"
2005 GUI_TK_LIBRARY="-L$MICROWINDOWS/lib -lmwin -lmwengine -mwfonts -mwdrivers -mwinlib"
2006
1d1b75ac
VZ
2007 wxUSE_UNIVERSAL="yes"
2008
1725144d
RR
2009 AFMINSTALL=afminstall
2010 TOOLKIT=MICROWIN
2011 GUIDIST=MICROWIN_DIST
1d1b75ac
VZ
2012
2013 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMSW__ -D__WIN95__ -D__WIN32__ -DMWIN -DMICROWIN_NOCONTROLS -DMICROWIN_TODO=1"
1725144d
RR
2014 fi
2015
7f5c07ab
JS
2016 if test "$wxUSE_X11" = 1; then
2017 dnl use standard macros to check for X headers/libs, this brings support
2018 dnl for the standard configure options --x-includes and --x-libraries
2019 AC_PATH_XTRA
2020
2021 if test "$no_x" = "yes"; then
2022 AC_MSG_ERROR(X11 not found, please use --x-includes and/or --x-libraries options)
2023 fi
2024
2025 GUI_TK_LIBRARY="$X_LIBS"
2026 TOOLKIT_INCLUDE="$X_CFLAGS"
2027 AFMINSTALL=afminstall
2028 COMPILED_X_PROGRAM=0
2029
256d631a 2030 if test "$wxUSE_NANOX" = "yes"; then
6ec507fd
JS
2031 AC_MSG_CHECKING(for MicroWindows/NanoX distribution)
2032 if test "x$MICROWIN" = x ; then
2033 AC_MSG_RESULT(not found)
2034 AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWIN is set.])
2035 else
2036 AC_MSG_RESULT($MICROWIN)
c79a329d 2037 AC_DEFINE(wxUSE_NANOX)
6ec507fd
JS
2038 fi
2039 fi
2040
7f5c07ab
JS
2041 xpm_link=
2042 AC_MSG_CHECKING(for Xpm library)
2043 WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
2044 if test "$ac_find_libraries" != "" ; then
2045 WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
2046 GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
2047 xpm_link=" -lXpm"
2048 AC_DEFINE(wxHAVE_LIB_XPM)
2049 AC_MSG_RESULT(found at $ac_find_libraries)
2050 else
2051 AC_TRY_COMPILE(
2052 [
2053 #include <X11/xpm.h>
2054 ],
2055 [
2056 int version;
2057 version = XpmLibraryVersion();
2058 ],
2059 [
2060 xpm_link=" -lXpm"
2061 AC_DEFINE(wxHAVE_LIB_XPM)
2062 AC_MSG_RESULT(found in default search path)
2063 COMPILED_X_PROGRAM=0
2064 ],
2065 [
2066 AC_MSG_RESULT(no)
2067 AC_MSG_WARN(library will be compiled without support for images in XPM format)
2068 ]
2069 )
2070 fi
2071
1d1b75ac
VZ
2072 wxUSE_UNIVERSAL="yes"
2073
256d631a 2074 if test "$wxUSE_NANOX" = "yes"; then
4e5a4800 2075 TOOLKIT_INCLUDE="-I\$(top_srcdir)/include/wx/x11/nanox -I\$(MICROWIN)/src/include $TOOLKIT_INCLUDE"
0b5c0e1a 2076 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__ -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DLINUX=1 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1"
461e93f9 2077 GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$(MICROWIN)/src/lib/libnano-X.a"
6ec507fd 2078 else
0feee163 2079 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11$xpm_link"
6ec507fd
JS
2080 fi
2081
3c011993 2082 TOOLKIT_VPATH="\${top_srcdir}/src/x11"
7f5c07ab
JS
2083 TOOLKIT=X11
2084 GUIDIST=X11_DIST
7f5c07ab
JS
2085 fi
2086
1e6feb95 2087 if test "$wxUSE_WINE" = 1; then
3a922bb4
RL
2088 AC_CHECK_HEADER(windows.h, [],
2089 [
1e6feb95 2090 AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
3a922bb4 2091 ])
788deba1 2092
3d63bc3a 2093 xpm_link=
1e6feb95
VZ
2094 AC_MSG_CHECKING(for Xpm library)
2095 WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
2096 if test "$ac_find_libraries" != "" ; then
2097 GUI_TK_LIBRARY="-L$ac_find_libraries"
3d63bc3a 2098 xpm_link=" -lXpm"
1e6feb95
VZ
2099 AC_DEFINE(wxHAVE_LIB_XPM)
2100 AC_MSG_RESULT(found at $ac_find_libraries)
2101 else
2102 AC_MSG_RESULT(no)
2103 AC_MSG_WARN(library will be compiled without support for images in XPM format)
2104 fi
dad6c0ea 2105
3d63bc3a 2106 mesa_link=
1e6feb95
VZ
2107 AC_MSG_CHECKING(for Mesa library)
2108 WX_PATH_FIND_LIBRARIES($SEARCH_LIB,MesaGL)
2109 if test "$ac_find_libraries" != "" ; then
2110 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -L$ac_find_libraries"
3d63bc3a 2111 mesa_link=" -lMesaGL"
1e6feb95
VZ
2112 AC_MSG_RESULT(found at $ac_find_libraries)
2113 else
2114 AC_MSG_ERROR(no)
2115 fi
cd6d6d5b 2116
3d63bc3a 2117 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwine$mesa_link$xpm_link -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses"
1e6feb95
VZ
2118 TOOLKIT=MSW
2119 GUIDIST=MSW_DIST
3a922bb4 2120 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXWINE__"
9a98a854
VZ
2121 fi
2122
1e6feb95 2123 if test "$wxUSE_MOTIF" = 1; then
d714471b
VZ
2124 dnl use standard macros to check for X headers/libs, this brings support
2125 dnl for the standard configure options --x-includes and --x-libraries
2126 AC_PATH_XTRA
2127
1e6feb95
VZ
2128 if test "$no_x" = "yes"; then
2129 AC_MSG_ERROR(X11 not found, please use --x-includes and/or --x-libraries options)
2130 fi
2131
2132 GUI_TK_LIBRARY="$X_LIBS"
2133 TOOLKIT_INCLUDE="$X_CFLAGS"
1e6feb95 2134 AFMINSTALL=afminstall
1e6feb95
VZ
2135 COMPILED_X_PROGRAM=0
2136
2137 AC_MSG_CHECKING(for Motif/Lesstif headers)
2138 WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h)
2139 if test "$ac_find_includes" != "" ; then
2140 AC_MSG_RESULT(found $ac_find_includes)
cd6d6d5b 2141 else
cd6d6d5b
VZ
2142 AC_TRY_COMPILE(
2143 [
2144 #include <Xm/Xm.h>
2145 ],
2146 [
2147 int version;
cd6d6d5b
VZ
2148 version = xmUseVersion;
2149 ],
2150 [
2151 AC_MSG_RESULT(found in default search path)
2152 COMPILED_X_PROGRAM=1
2153 ],
2154 [
2155 AC_MSG_RESULT(no)
1e6feb95 2156 AC_MSG_ERROR(please set CFLAGS to contain the location of Xm/Xm.h)
cd6d6d5b
VZ
2157 ]
2158 )
2159 fi
9a98a854 2160
1e6feb95
VZ
2161 if test "$COMPILED_X_PROGRAM" = 0; then
2162 AC_MSG_CHECKING(for Motif/Lesstif library)
2163 WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm)
2164 if test "$ac_find_libraries" != "" ; then
2165 WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
2166 WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
2167
62d0491b
RL
2168 GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
2169 TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
1e6feb95
VZ
2170 AC_MSG_RESULT(found at $ac_find_libraries)
2171 else
2172 dnl it might happen that we found headers in one of the standard
2173 dnl paths but the libs are elsewhere - we do need to try to
2174 dnl compile a sample program then here
2175 AC_TRY_COMPILE(
2176 [
2177 #include <Xm/Xm.h>
2178 ],
2179 [
2180 int version;
1e6feb95
VZ
2181 version = xmUseVersion;
2182 ],
2183 [
2184 AC_MSG_RESULT(found in default search path)
2185 COMPILED_X_PROGRAM=1
2186 ],
2187 [
2188 AC_MSG_RESULT(no)
2189 AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm)
2190 ]
2191 )
2192 fi
2193 fi
2194
3d63bc3a 2195 xpm_link=
1e6feb95
VZ
2196 AC_MSG_CHECKING(for Xpm library)
2197 WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
2198 if test "$ac_find_libraries" != "" ; then
2199 WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
62d0491b 2200 GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
3d63bc3a 2201 xpm_link=" -lXpm"
f6bcfd97 2202 AC_DEFINE(wxHAVE_LIB_XPM)
1e6feb95
VZ
2203 AC_MSG_RESULT(found at $ac_find_libraries)
2204 else
2205 AC_TRY_COMPILE(
2206 [
2207 #include <X11/xpm.h>
2208 ],
2209 [
2210 int version;
1e6feb95
VZ
2211 version = XpmLibraryVersion();
2212 ],
2213 [
3d63bc3a 2214 xpm_link=" -lXpm"
3a922bb4 2215 AC_DEFINE(wxHAVE_LIB_XPM)
1e6feb95
VZ
2216 AC_MSG_RESULT(found in default search path)
2217 COMPILED_X_PROGRAM=0
2218 ],
2219 [
2220 AC_MSG_RESULT(no)
2221 AC_MSG_WARN(library will be compiled without support for images in XPM format)
2222 ]
2223 )
2224 fi
9a98a854 2225
17234b26
MB
2226 dnl MBN: this should really be an AC_TRY_LINK, but it is faster
2227 dnl to special case it
2228 xt_needs_sm_ice=
2229 case "${host}" in
2230 *-*-cygwin* )
2231 xt_needs_sm_ice=" -lSM -lICE"
2232 ;;
2233 esac
2234
2235 GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXm$xpm_link -lXmu -lXext -lXt${xt_needs_sm_ice} -lX11"
334f0d2c 2236 TOOLKIT_VPATH="\${top_srcdir}/src/motif${PATH_IFS}\${top_srcdir}/src/motif/xmcombo"
1e6feb95
VZ
2237 TOOLKIT=MOTIF
2238 GUIDIST=MOTIF_DIST
2239 fi
b4085ce6 2240
1e6feb95 2241 if test "$wxUSE_MAC" = 1; then
683dccda 2242 if test "$wxUSE_PRECOMP" = "yes"; then
3d63bc3a 2243 CPPFLAGS="$CPPFLAGS -cpp-precomp"
62cc730f
GD
2244 else
2245 CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
683dccda 2246 fi
3d63bc3a
RL
2247 CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon -I\${top_srcdir}/src/mac/morefile"
2248 CFLAGS="$CFLAGS -fpascal-strings"
2249 CXXFLAGS="$CXXFLAGS -fpascal-strings"
d08b457b 2250
13c0541d 2251 TOOLKIT_VPATH="\${top_srcdir}/src/mac${PATH_IFS}\${top_srcdir}/src/mac/morefile"
1e6feb95 2252 TOOLKIT=MAC
683dccda 2253 dnl we can't call this MAC_DIST or autoconf thinks its a macro
1e6feb95
VZ
2254 GUIDIST=MACX_DIST
2255 fi
e07802fc 2256
1e6feb95
VZ
2257 if test "$wxUSE_PM" = 1; then
2258 TOOLKIT=PM
2259 GUIDIST=GTK_DIST
2260 fi
2261
2262 dnl the name of the directory where the files for this toolkit live
3a922bb4 2263 if test "$TOOLKIT" = "PM" ; then
1e6feb95 2264 TOOLKIT_DIR="os2"
f6bcfd97 2265 else
3a922bb4 2266 TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[[A-Z]]" "[[a-z]]"`
1e6feb95 2267 fi
9a98a854 2268
3a922bb4
RL
2269 dnl misc other files depending on the port
2270 PORT_FILES="\${top_srcdir}/src/\$(TOOLKITDIR)/files.lst"
517a619d 2271
1e6feb95
VZ
2272 if test "$wxUSE_UNIVERSAL" = "yes"; then
2273 ALL_OBJECTS="\$(GUI_LOWLEVEL_OBJS) \${UNIVOBJS}"
9b695262
VZ
2274
2275 dnl ALL_SOURCES and ALL_HEADERS shouldn't include really all sources
2276 dnl and headers as some/most are not needed for wxUniv but I don't
2277 dnl have time to add GUI_LOWLEVEL_SOURCES/HEADERS stuff now (TODO!)
2278 ALL_SOURCES="\$(ALL_SOURCES) \${UNIV_SOURCES}"
2279 ALL_HEADERS="\$(ALL_HEADERS) \${UNIV_HEADERS}"
2280
3a922bb4 2281 PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst"
4175e952
RR
2282 if test "$wxUSE_X11" = 1; then
2283 TOOLKIT_VPATH="\${top_srcdir}/src/${TOOLKIT_DIR}${PATH_IFS}\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes"
2284 else
2285 TOOLKIT_VPATH="\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes${PATH_IFS}\${top_srcdir}/src/${TOOLKIT_DIR}"
2286 fi
3a922bb4
RL
2287 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__"
2288 WIDGET_SET=univ
1e6feb95
VZ
2289 else
2290 ALL_OBJECTS="\$(GUIOBJS)"
9b695262
VZ
2291 ALL_SOURCES="\$(ALL_SOURCES)"
2292 ALL_HEADERS="\$(ALL_HEADERS)"
1e6feb95
VZ
2293 fi
2294
ba0e650c 2295 ALL_OBJECTS="${ALL_OBJECTS} \$(COMMONOBJS) \$(GENERICOBJS)"
1e6feb95 2296
f9bc1684 2297 if test "$TOOLKIT" != "MSW" -a "$USE_DOS" != 1; then
1e6feb95
VZ
2298 ALL_OBJECTS="${ALL_OBJECTS} \$(UNIXOBJS)"
2299 fi
2300
2301 if test "$wxUSE_HTML" = "yes"; then
2302 ALL_OBJECTS="${ALL_OBJECTS} \$(HTMLOBJS)"
2303 fi
3fcdd07b 2304
4f14bcd8 2305 if test "$wxUSE_LIBJPEG" = "builtin" ; then
2224580a 2306 ALL_OBJECTS="${ALL_OBJECTS} \$(JPEGOBJS)"
d9d8273d 2307 fi
4f14bcd8 2308 if test "$wxUSE_LIBTIFF" = "builtin" ; then
d9d8273d
RR
2309 ALL_OBJECTS="${ALL_OBJECTS} \$(TIFFOBJS)"
2310 fi
4f14bcd8 2311 if test "$wxUSE_LIBPNG" = "builtin" ; then
d9d8273d
RR
2312 ALL_OBJECTS="${ALL_OBJECTS} \$(PNGOBJS)"
2313 fi
2224580a 2314
2224580a
VZ
2315 dnl distribute samples/demos/utils with GUI versions
2316 GUIDIST="${GUIDIST} SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST"
2317 DISTDIR="wx\$(TOOLKIT)"
e90c1d2a 2318else
dad6c0ea
VZ
2319 USE_GUI=0
2320
3a922bb4
RL
2321 dnl this doesn't quite work right for wxBase, but the places
2322 dnl where it is wrong aren't fatal (yet) though.
07eb77a6 2323 TOOLKIT_DIR="base"
f6bcfd97 2324
e90c1d2a 2325 dnl the sources, their dependenices and the headers
3a922bb4
RL
2326 if test "$USE_WIN32" = 1 ; then
2327 ALL_OBJECTS="\${BASE_OBJS} \${BASE_MSW_OBJS}"
2328 TOOLKIT_VPATH="\${top_srcdir}/src/msw"
e90c1d2a 2329
3a922bb4
RL
2330 dnl yes, the toolkit for wxBase on win32 is actually MSW
2331 dnl wxBase on unix does not need a 'TOOLKIT' defined.
2332 TOOLKIT="MSW"
2333 else
2334 ALL_OBJECTS="\${BASE_OBJS} \${BASE_UNIX_OBJS}"
2335 TOOLKIT_VPATH="\${top_srcdir}/src/unix"
a20b6d3a
VZ
2336 fi
2337
d8356fa3
VZ
2338 ALL_SOURCES="\$(ALL_SOURCES)"
2339 ALL_HEADERS="\$(ALL_HEADERS)"
2340
831b3152 2341 PORT_FILES="\${top_srcdir}/src/files.lst"
2224580a
VZ
2342
2343 dnl distribute only wxBase sources/headers
2344 GUIDIST="BASE_DIST"
2345 DISTDIR="wxBase"
e90c1d2a
VZ
2346fi
2347
4f14bcd8
GD
2348dnl ---------------------------------------------------------------------------
2349dnl Optional libraries included when system library is not used
2350dnl ---------------------------------------------------------------------------
e45387bf
VZ
2351
2352dnl ODBC objects are Unix only
2353if test "$TOOLKIT" != "MSW" -a "$wxUSE_ODBC" = "yes" ; then
2354 ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)"
2355fi
2356
4f14bcd8 2357if test "$wxUSE_REGEX" = "builtin" ; then
3a922bb4
RL
2358 ALL_OBJECTS="${ALL_OBJECTS} \$(REGEXOBJS)"
2359fi
4f14bcd8 2360if test "$wxUSE_ZLIB" = "builtin" ; then
3a922bb4
RL
2361 ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)"
2362fi
2363
4f14bcd8
GD
2364dnl ---------------------------------------------------------------------------
2365dnl OpenGL libraries
2366dnl ---------------------------------------------------------------------------
be505a65 2367
3a922bb4 2368if test "$wxUSE_OPENGL" = "yes"; then
62d0491b
RL
2369 if test "$wxUSE_MAC" = 1; then
2370 OPENGL_LIBS="-framework OpenGL -framework AGL"
be505a65
VZ
2371 elif test "$wxUSE_MSW" = 1; then
2372 OPENGL_LIBS="-lopengl32 -lglu32"
62d0491b 2373 else
62d0491b
RL
2374 AC_CHECK_HEADER(GL/gl.h,
2375 [
1352efdf 2376 AC_MSG_CHECKING([for -lGL])
62d0491b
RL
2377 WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],[GL])
2378 if test "$ac_find_libraries" != "" ; then
2379 WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
4b6b4dfc
RR
2380 if test "$ac_path_to_link" = " -L/usr/lib" ; then
2381 LDFLAGS_GL="$LDFLAGS"
2382 else
2383 LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
2384 fi
62d0491b 2385 OPENGL_LIBS="-lGL -lGLU"
1352efdf 2386 AC_MSG_RESULT([yes])
62d0491b 2387 else
1352efdf
RL
2388 AC_MSG_RESULT([no])
2389 AC_MSG_CHECKING([for -lMesaGL])
62d0491b
RL
2390 WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],[MesaGL])
2391 if test "$ac_find_libraries" != "" ; then
2392 WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
2393 LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
2394 OPENGL_LIBS="-lMesaGL -lMesaGLU"
1352efdf
RL
2395 AC_MSG_RESULT([yes])
2396 else
2397 AC_MSG_RESULT([no])
62d0491b
RL
2398 fi
2399 fi
2400 ])
fb56368a 2401
62d0491b
RL
2402 if test "x$OPENGL_LIBS" = "x"; then
2403 dnl it should be an error and not a warning because OpenGL is not on
2404 dnl by default and so if it had been explicitely requested, we
2405 dnl shouldn't just fall back to compiling the library without it
2406 AC_MSG_ERROR(OpenGL libraries not available)
2407 fi
6f754473 2408 fi
6f754473 2409
62d0491b
RL
2410 if test "$wxUSE_OPENGL" = "yes"; then
2411 AC_DEFINE(wxUSE_OPENGL)
2412 AC_DEFINE(wxUSE_GLCANVAS)
2413 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl"
2414 fi
3a922bb4
RL
2415fi
2416
2417if test -z "$TOOLKIT_VPATH" ; then
2418 TOOLKIT_VPATH="\${top_srcdir}/src/${TOOLKIT_DIR}"
2419fi
2420
2421dnl the symbol which allows conditional compilation for the given toolkit
2422if test -n "$TOOLKIT" ; then
2423 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WX${TOOLKIT}__"
2424fi
2425
f676c7ff
MB
2426lib_unicode_suffix=
2427if test "$wxUSE_UNICODE" = "yes"; then
2428 lib_unicode_suffix=u
2429fi
2430
3a922bb4
RL
2431lib_debug_suffix=
2432if test "$wxUSE_DEBUG_FLAG" = "yes"; then
2433 lib_debug_suffix=d
3a922bb4
RL
2434fi
2435
f676c7ff
MB
2436TOOLCHAIN_NAME="${TOOLKIT_DIR}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}-${WX_RELEASE}"
2437TOOLCHAIN_NAME_GL="${TOOLKIT_DIR}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_gl-${WX_RELEASE}"
3a922bb4
RL
2438
2439if test "$cross_compiling" = "yes"; then
2440 TOOLCHAIN_NAME="${TOOLCHAIN_NAME}-${host_alias}"
2441 TOOLCHAIN_NAME_GL="${TOOLCHAIN_NAME_GL}-${host_alias}"
2442fi
2443
2444dnl library link name
2445WX_LIBRARY="wx_${TOOLCHAIN_NAME}"
2446WX_LIBRARY_GL="wx_${TOOLCHAIN_NAME_GL}"
2447
3a922bb4
RL
2448dnl the name of the shared library
2449WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
2450WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
b12915c1 2451
3a922bb4
RL
2452dnl the name of the links to the shared library
2453WX_LIBRARY_LINK1="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}"
2454WX_LIBRARY_LINK2="lib${WX_LIBRARY}.${SO_SUFFIX}"
2455WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}"
2456WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}"
55e80573 2457
978f1259
RL
2458case "${host}" in
2459 *-*-cygwin* | *-*-mingw32* )
2460
2461 dnl If we are cross compiling we want to use the 'full' unix type name for the
2462 dnl lib, but for a native install use the windows style naming convention.
2da4f892 2463 dnl (excepting again that we strip the ELF style version numbers off it).
978f1259
RL
2464
2465 dnl FIXME: is this GL stuff actually even used for wxMSW? should it be??
2466
17234b26 2467 if test "$cross_compiling" != "yes" -a "$TOOLKIT_DIR" = "msw"; then
978f1259
RL
2468 WX_LIBRARY="wxmsw${WX_MSW_VERSION}${lib_unicode_suffix}${lib_debug_suffix}"
2469 WX_LIBRARY_GL="wxmsw_gl${WX_MSW_VERSION}${lib_unicode_suffix}${lib_debug_suffix}"
2470 WX_LIBRARY_NAME_SHARED="${WX_LIBRARY}.${SO_SUFFIX}"
2471 WX_LIBRARY_NAME_SHARED_GL="${WX_LIBRARY_GL}.${SO_SUFFIX}"
2da4f892
RL
2472 else
2473 WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}"
2474 WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}"
978f1259 2475 fi
e95edd8d 2476 ;;
978f1259 2477
e95edd8d
GD
2478 *-*-darwin* )
2479 dnl Under Mac OS X, we should build real frameworks instead of simple
2480 dnl dynamic shared libraries (in order to embed the resources)
2481 if test "$wxUSE_MAC" = 1; then
2482 dnl the name of the resources file for wxMac
2483 WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.r"
2484 WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.rsrc"
2485 fi
2486 ;;
978f1259
RL
2487esac
2488
2489dnl the name of the static library
2490WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a"
2491WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY_GL}.a"
2492
2493dnl define which libs wx-config should link.
2494WXCONFIG_LIBS="-l${WX_LIBRARY}"
885d4bf5 2495WXCONFIG_LIBS_STATIC="lib${WX_LIBRARY}.a"
978f1259
RL
2496
2497if test "$wxUSE_OPENGL" = "yes"; then
885d4bf5
VS
2498 WXCONFIG_LIBS_GL="-l${WX_LIBRARY_GL} ${OPENGL_LIBS}"
2499 WXCONFIG_LIBS_STATIC_GL="lib${WX_LIBRARY_GL}.a ${OPENGL_LIBS}"
978f1259
RL
2500fi
2501
2502
3a922bb4 2503dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP ---
55e80573 2504
4222829b
VS
2505if test "$wxUSE_SHARED" = "yes"; then
2506 case "${host}" in
2507 *-pc-os2_emx | *-pc-os2-emx | \
2508 *-pc-msdosdjgpp )
2509 dnl only static for now
2510 wxUSE_SHARED=no
2511 AC_MSG_WARN([Host system doesn't support shared libraries, disabling])
2512 ;;
2513 esac
2514fi
2515
3a922bb4 2516if test "$wxUSE_SHARED" = "yes"; then
55e80573
VZ
2517
2518 dnl install targets
2519 if test "$wxUSE_OPENGL" = "yes"; then
2520 WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
3a922bb4 2521 WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1} \$(build_libdir)/${WX_LIBRARY_LINK1_GL}"
55e80573
VZ
2522 else
2523 WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
3a922bb4 2524 WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1}"
55e80573
VZ
2525 fi
2526
2527 dnl the extra compiler flags needed for compilation of shared library
dd4f7467
VZ
2528 if test "$GCC" = "yes"; then
2529 dnl the switch for gcc is the same under all platforms
2530 PIC_FLAG="-fPIC"
2531 fi
55e80573
VZ
2532
2533 dnl the command to use for creating the shared library
2534 SHARED_LD="${CXX} -shared -o"
2535
2536 case "${host}" in
2537 *-hp-hpux* )
2538 dnl default settings are good for gcc but not for the native HP-UX
d569ea8d
GD
2539 if test "$GCC" == "yes"; then
2540 SHARED_LD="${SHARED_LD} ${PIC_FLAG}"
2541 else
f6bcfd97 2542 dnl no idea why it wants it, but it does
3d63bc3a 2543 LDFLAGS="$LDFLAGS -L/usr/lib"
f6bcfd97 2544
be087207
RR
2545 SHARED_LD="${CXX} -b -o"
2546 PIC_FLAG="+Z"
2547 fi
55e80573 2548
7b7a7637
RL
2549 dnl install shared libs without symlinks
2550 if test "$wxUSE_OPENGL" = "yes"; then
2551 WX_ALL_INSTALLED="preinstall_gl"
2552 WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}"
2553 else
2554 WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
2555 fi
de87c353 2556 ;;
b12915c1 2557
de87c353 2558 *-*-linux* )
55e80573
VZ
2559 if test "$GCC" != "yes"; then
2560 AC_CACHE_CHECK([for Intel compiler], wx_cv_prog_icc,
2561 [
2562 AC_TRY_COMPILE([],
2563 [
2564 #ifndef __INTEL_COMPILER
dd4f7467 2565 #error Not icc
55e80573
VZ
2566 #endif
2567 ],
2568 wx_cv_prog_icc=yes,
2569 wx_cv_prog_icc=no
2570 )
2571 ])
55e80573
VZ
2572 if test "$wx_cv_prog_icc" = "yes"; then
2573 PIC_FLAG="-KPIC"
2574 fi
2575 fi
2576
3a922bb4
RL
2577 if test "$wxUSE_SONAME" = "yes" ; then
2578 SONAME_FLAGS="-Wl,-soname,${WX_LIBRARY_LINK1}"
2579 SONAME_FLAGS_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}"
f6bcfd97
BP
2580 dnl substitute this in makelib.env for the contrib libs
2581 WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)"
00cf1208 2582 fi
de87c353 2583 ;;
55e80573 2584
de87c353
RR
2585 *-*-solaris2* )
2586 if test "$GCC" = yes ; then
f6bcfd97
BP
2587 dnl newer versions of gcc need -isystem to compile X headers on
2588 dnl Solaris (which use old style C syntax)
2589 CPPFLAGS="$CPPFLAGS -isystem /usr/openwin/include"
de87c353
RR
2590 else
2591 SHARED_LD="${CXX} -G -o"
10f2d63a 2592 PIC_FLAG="-KPIC"
7b7a7637 2593 SONAME_FLAGS="-h ${WX_LIBRARY_NAME_SHARED}"
471944dc 2594 SONAME_FLAGS_GL="-h ${WX_LIBRARY_NAME_SHARED_GL}"
de87c353 2595 fi
de87c353 2596 ;;
55e80573 2597
b4085ce6 2598 *-*-darwin* )
90f3fe56
GD
2599 dnl For Unix to MacOS X porting instructions, see:
2600 dnl http://fink.sourceforge.net/doc/porting/porting.html
e95edd8d
GD
2601 CFLAGS="$CFLAGS -fno-common -DWXMAKINGDLL"
2602 CXXFLAGS="$CXXFLAGS -fno-common -DWXMAKINGDLL"
fe0d8518
GD
2603 dnl wxWindows must be fully binded (lazy binding breaks RTTI classinfo)
2604 dnl this can be done either with the exe linker flag -Wl,-bind_at_load
2605 dnl or with a double stage link in order to create a single module
2606 dnl "-init _wxWindowsDylibInit" not useful with lazy linking solved
2607 SHARED_LD="\${top_srcdir}/distrib/mac/shared-ld-sh -undefined suppress -flat_namespace -o"
ea5999b9 2608 PIC_FLAG="-dynamic -fPIC"
90f3fe56
GD
2609 SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}"
2610 SONAME_FLAGS_GL=${SONAME_FLAGS}
de87c353 2611 ;;
55e80573 2612
de87c353 2613 *-*-aix* )
321d2b14
VZ
2614 dnl the abs path below used to be hardcoded here so I guess it must
2615 dnl be some sort of standard location under AIX?
2616 AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib,
2617 makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib)
2618
2619 SHARED_LD="$(AIX_CXX_LD) -p 0 -o"
de87c353 2620 ;;
55e80573 2621
7b7a7637 2622 *-*-cygwin* | *-*-mingw32* )
77e13408 2623
2da4f892 2624 WX_LIBRARY_IMPORTLIB="${WX_LIBRARY_NAME_SHARED}.a"
77e13408 2625
77e13408 2626 SHARED_LD="${CXX} -shared -Wl,--out-implib,lib/${WX_LIBRARY_IMPORTLIB} -o"
00c81359 2627 TOOLCHAIN_DLL_DEFS="${TOOLCHAIN_DLL_DEFS} -DWXUSINGDLL=1"
25d0687a
RL
2628
2629 PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
7b7a7637
RL
2630
2631 dnl install shared libs without symlinks
f6bcfd97
BP
2632 if test "$wxUSE_OPENGL" = "yes"; then
2633 WX_ALL_INSTALLED="preinstall_gl"
978f1259 2634 WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}"
f6bcfd97 2635 else
978f1259 2636 WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
f6bcfd97 2637 fi
de87c353 2638 ;;
55e80573 2639
b12915c1
VZ
2640 *-*-beos* )
2641 dnl can't use gcc under BeOS for shared library creation because it
2642 dnl complains about missing 'main'
2643 SHARED_LD="${LD} -shared -o"
b12915c1 2644 ;;
55e80573
VZ
2645
2646 *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
2647 *-*-sunos4* | \
2648 *-*-irix5* | *-*-irix6* | \
2649 *-*-osf* | \
2650 *-*-dgux5* | \
2651 *-*-sysv5* )
2652 dnl defaults are ok
2653 ;;
2654
de87c353 2655 *)
7b7a7637 2656 AC_MSG_ERROR(unknown system type $host.)
de87c353 2657 esac
9a98a854 2658
72dd34b5
VZ
2659 dnl set target to shared if not explicitly chose static before
2660 if test "x$WX_TARGET_LIBRARY" = "x"; then
2661 WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
bdad4e7e 2662 WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}"
72dd34b5 2663 fi
55e80573 2664
3711412e
RL
2665 dnl do not alter the LIBRARY_TYPE strings "so" and "a", they are magic
2666 WX_TARGET_LIBRARY_TYPE="so"
885d4bf5 2667 INSTALL_LIBRARY='$(INSTALL_PROGRAM)'
3a922bb4 2668fi
f6bcfd97 2669
3a922bb4
RL
2670dnl do not 'else' this, it may be changed in the above conditional.
2671if test "$wxUSE_SHARED" = "no"; then
f6bcfd97 2672
3a922bb4
RL
2673 dnl give static wxBase and wxMSW build a working install target
2674 if test "$wxUSE_GUI" = "no" -o "$USE_WIN32" = 1 ; then
f6bcfd97
BP
2675 dnl we're here because WX_ALL_INSTALLED is empty, but play safe anyway
2676 WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall"
2677 fi
2678
6fa882bd
RR
2679 if test "$wxUSE_MAC" = 1; then
2680 WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall"
2681 fi
2682
3a922bb4
RL
2683 if test "$wxUSE_OPENGL" = "yes"; then
2684 WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall_gl"
2685 WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_STATIC} \$(build_libdir)/${WX_LIBRARY_NAME_STATIC_GL}"
2686 else
2687 WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_STATIC}"
2688 fi
2689
2690 WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
2691 WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
2692
3711412e 2693 WX_TARGET_LIBRARY_TYPE="a"
885d4bf5 2694 INSTALL_LIBRARY='$(INSTALL_DATA)'
517a619d
RR
2695fi
2696
d08b457b
GD
2697if test "$wxUSE_MAC" = 1; then
2698 dnl add the resources target for wxMac
336e99e2
GD
2699 LIBWXMACRES="\$(top_builddir)/lib/${WX_RESOURCES_MACOSX_ASCII}"
2700 WX_ALL="${WX_ALL} ${LIBWXMACRES}"
e23081de 2701 WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall_res"
d08b457b 2702 AC_CHECK_PROG(RESCOMP, Rez, Rez, /Developer/Tools/Rez)
9f8148b1 2703 AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez)
ef7f2189 2704 MACOSX_BUNDLE="bundle"
336e99e2
GD
2705 if test "$wxUSE_SHARED" = "yes"; then
2706 dnl resources are bundled with shared library, not with applications
2707 LIBWXMACRESCOMP="\$(RESCOMP) -t APPL Carbon.r -o \$(BIN_PROGRAM)"
2708 LIBWXMACRESWXCONFIG="${RESCOMP} -t APPL Carbon.r -o"
2709 else
2710 dnl resources are bundled with applications, not with static library
2711 LIBWXMACRESCOMP="\$(RESCOMP) -t APPL Carbon.r ${LIBWXMACRES} -o \$(BIN_PROGRAM)"
2712 LIBWXMACRESWXCONFIG="${RESCOMP} -t APPL Carbon.r \${prefix}/lib/${WX_RESOURCES_MACOSX_ASCII} -o"
2713 fi
590b1a4d
SN
2714else
2715 if test "$wxUSE_PM" = 1; then
2716 LIBWXMACRESCOMP="emxbind -ep \$(BIN_PROGRAM)"
2717 fi
d08b457b
GD
2718fi
2719
9a98a854
VZ
2720dnl ---------------------------------------------------------------------------
2721dnl Checks for typedefs
2722dnl ---------------------------------------------------------------------------
2723
2724dnl defines mode_t if not already defined
2725AC_TYPE_MODE_T
2726dnl defines off_t if not already defined
2727AC_TYPE_OFF_T
2728dnl defines pid_t if not already defined
2729AC_TYPE_PID_T
2730dnl defines size_t if not already defined
2731AC_TYPE_SIZE_T
2732dnl defines uid_t and gid_t if not already defined
2733AC_TYPE_UID_T
2734
d836ee96
VZ
2735dnl check what exactly size_t is on this machine - this is necessary to avoid
2736dnl ambiguos overloads in several places, notably wx/string.h and wx/array.h
19af3b06
VZ
2737AC_LANG_SAVE
2738AC_LANG_CPLUSPLUS
d836ee96
VZ
2739AC_CACHE_CHECK([if size_t is unsigned int],
2740 wx_cv_size_t_is_uint,
dd2c8b7c
VZ
2741 dnl an obvious check like AC_TRY_COMPILE[struct Foo { ... };] doesn't work
2742 dnl with egcs (at least) up to 1.1.1 as it allows you to compile duplicate
2743 dnl methods in a local class (i.e. class inside a function) declaration
2744 dnl without any objections!!
2745 dnl
2746 dnl hence the hack below: we must have Foo at global scope!
d836ee96
VZ
2747 AC_TRY_COMPILE([#include <stddef.h>],
2748 [
dd2c8b7c
VZ
2749 return 0; }
2750
d836ee96 2751 struct Foo { void foo(size_t); void foo(unsigned int); };
dd2c8b7c
VZ
2752
2753 int bar() {
d836ee96
VZ
2754 ],
2755 wx_cv_size_t_is_uint=no,
2756 wx_cv_size_t_is_uint=yes
2757 )
2758)
2759
2760if test "$wx_cv_size_t_is_uint" = "yes"; then
2761 AC_DEFINE(wxSIZE_T_IS_UINT)
2762else
2763 AC_CACHE_CHECK([if size_t is unsigned long],
2764 wx_cv_size_t_is_ulong,
2765 AC_TRY_COMPILE([#include <stddef.h>],
2766 [
dd2c8b7c
VZ
2767 return 0; }
2768
d836ee96 2769 struct Foo { void foo(size_t); void foo(unsigned long); };
dd2c8b7c
VZ
2770
2771 int bar() {
d836ee96
VZ
2772 ],
2773 wx_cv_size_t_is_ulong=no,
2774 wx_cv_size_t_is_ulong=yes
2775 )
2776 )
2777
2778 if test "$wx_cv_size_t_is_ulong" = "yes"; then
2779 AC_DEFINE(wxSIZE_T_IS_ULONG)
2780 fi
2781fi
2782
19af3b06
VZ
2783AC_LANG_RESTORE
2784
9a98a854
VZ
2785dnl ---------------------------------------------------------------------------
2786dnl Checks for structures
2787dnl ---------------------------------------------------------------------------
2788
b12915c1
VZ
2789dnl does passwd struct has the pw_gecos field?
2790AC_CACHE_CHECK([for pw_gecos in struct passwd], wx_cv_struct_pw_gecos,
2791 [
2792 AC_TRY_COMPILE([#include <pwd.h>],
2793 [
2794 char *p;
2795 struct passwd *pw;
2796 p = pw->pw_gecos;
2797 ],
2798 [
2799 wx_cv_struct_pw_gecos=yes
b12915c1
VZ
2800 ],
2801 [
2802 wx_cv_struct_pw_gecos=no
2803 ]
2804 )
2805 ]
2806)
2807
bd3277fe
VZ
2808if test "$wx_cv_struct_pw_gecos" = "yes"; then
2809 AC_DEFINE(HAVE_PW_GECOS)
2810fi
2811
9a98a854 2812dnl ---------------------------------------------------------------------------
9a98a854
VZ
2813dnl Check for functions
2814dnl ---------------------------------------------------------------------------
2815
d29b553b
VZ
2816dnl don't check for wchar_t functions if we haven't got wchar_t itself
2817WCHAR_OK=0
2818if test "$wx_cv_sizeof_wchar_t" != "0"; then
2819 dnl check for wcslen
2820 WCHAR_LINK=
7a30264c 2821 AC_CHECK_FUNCS(wcslen, [
18dbb1f6 2822 AC_DEFINE(HAVE_WCSLEN)
d29b553b 2823 WCHAR_OK=1
7a30264c 2824 ])
d29b553b 2825
7a30264c
VZ
2826 if test "$WCHAR_OK" = 0; then
2827 if test "$TOOLKIT" = "MSW"; then
2828 AC_CHECK_LIB(msvcrt, wcslen, [
2829 AC_DEFINE(HAVE_WCSLEN)
2830 WCHAR_OK=1
2831 ])
2832 else
2833 AC_CHECK_LIB(w, wcslen, [
2834 AC_DEFINE(HAVE_WCSLEN)
2835 WCHAR_LINK=" -lw"
2836 WCHAR_OK=1
2837 ])
2838 fi
d29b553b
VZ
2839 fi
2840fi
9a98a854 2841
d29b553b
VZ
2842dnl we need at least the definition of wchar_t itself and wcslen() to compile
2843dnl with wchar_t support -- turn it off if we don't have this
2844if test "$WCHAR_OK" = 1; then
2845 AC_DEFINE(wxUSE_WCHAR_T)
2846
2847 dnl also try to use wcsrtombs instead of wcstombs which is buggy in old GNU
2848 dnl libc versions if possible
2849 AC_CHECK_FUNCS(wcsrtombs)
2850else
a1ea5055
GD
2851 dnl use built-in wcslen for Darwin (what about other BSD based systems?)
2852 if test "$USE_DARWIN" = 1; then
2853 AC_DEFINE(wxUSE_WCHAR_T)
2854 else
2855 AC_MSG_WARN([Wide character support is unavailable])
2856 fi
d29b553b 2857fi
b3e8d00a 2858
9a98a854
VZ
2859dnl check for vprintf/vsprintf() which are GNU extensions
2860AC_FUNC_VPRINTF
2861
f6bcfd97
BP
2862dnl check for vsscanf() and vsnprintf() - on some platforms (Linux, glibc
2863dnl 2.1.1 for the first one, HP-UX for the second) it's available in the
f9bc1684
VS
2864dnl library but the prototype is missing, so we can't use AC_CHECK_FUNCS() here,
2865dnl do it manually. We can't use AC_TRY_COMPILE(), either, because it doesn't
2866dnl check if the symbol is available at linking time
f6bcfd97 2867
f9bc1684
VS
2868dnl we use AC_TRY_LINK() here instead of AC_TRY_RUN() to make the checks
2869dnl work for cross-compilation, but AC_TRY_LINK() normally only compiles
f6bcfd97 2870dnl one function while we need at least 2 - hence the ugly hack below. To
f9bc1684 2871dnl understand why it works, remember that AC_TRY_LINK() just prepends
f6bcfd97
BP
2872dnl "int main() {" in the beginning of the code and "; return 0; }" at the
2873dnl end...
2874
c521c494
RL
2875dnl if we fail to find vsnprintf, also try for _vsnprintf as that is what
2876dnl we'll find under MSW if it exists.
2877
f9bc1684 2878dnl final note: AC_TRY_LINK will only be executed if there is nothing in
9d8deca0
VZ
2879dnl the cache so we have to do AC_DEFINE(HAVE_VSNPRINTF) below and not inside
2880dnl it or the symbol wouldn't be defined for the 2nd and subsequent configure
2881dnl runs
2882
f6bcfd97
BP
2883dnl check for vsnprintf() - a safe version of vsprintf()
2884AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
aea02638 2885[
f9bc1684 2886 AC_TRY_LINK([
f6bcfd97
BP
2887 #include <stdio.h>
2888 #include <stdarg.h>
2889 ], [
2890 int wx_test_vsnprintf(const char *, ...);
3a3eed31 2891
f6bcfd97
BP
2892 wx_test_vsnprintf("%s");
2893 return 0;
2894 }
2895
2896 int wx_test_vsnprintf(const char *fmt, ...)
2897 {
2898 char *s;
3a3eed31 2899
f6bcfd97
BP
2900 va_list argp;
2901 va_start(argp, fmt);
2902 vsnprintf(s, 42, fmt, argp);
2903 va_end(argp);
2904 ], [
f6bcfd97
BP
2905 wx_cv_func_vsnprintf=yes
2906 ], [
f9bc1684 2907 AC_TRY_LINK([
c521c494
RL
2908 #include <stdio.h>
2909 #include <stdarg.h>
2910 ], [
2911 int wx_test_vsnprintf(const char *, ...);
2912
2913 wx_test_vsnprintf("%s");
2914 return 0;
2915 }
2916
2917 int wx_test_vsnprintf(const char *fmt, ...)
2918 {
2919 char *s;
2920
2921 va_list argp;
2922 va_start(argp, fmt);
2923 _vsnprintf(s, 42, fmt, argp);
2924 va_end(argp);
2925 ], [
c521c494
RL
2926 wx_cv_func_vsnprintf=yes
2927 ], [
c521c494
RL
2928 wx_cv_func_vsnprintf=no
2929 ])
f6bcfd97
BP
2930 ])
2931])
3a3eed31 2932
9d8deca0
VZ
2933if test "$wx_cv_func_vsnprintf" = yes; then
2934 AC_DEFINE(HAVE_VSNPRINTF)
2935else
f9bc1684 2936 AC_MSG_WARN(unsafe function vsprintf will be used instead of vsnprintf)
9d8deca0
VZ
2937fi
2938
f6bcfd97
BP
2939dnl check for vsscanf()
2940AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
2941[
2942 AC_TRY_COMPILE([
2943 #include <stdio.h>
2944 #include <stdarg.h>
2945 ], [
2946 int wx_test_vsscanf(const char *, ...);
2947
2948 wx_test_vsscanf("%d");
2949 return 0;
3a3eed31
VZ
2950 }
2951
f6bcfd97 2952 int wx_test_vsscanf(const char *fmt, ...)
3a3eed31 2953 {
f6bcfd97
BP
2954 va_list argp;
2955 va_start(argp, fmt);
2956 vsscanf("42", fmt, argp);
2957 va_end(argp);
2958 ], [
f6bcfd97
BP
2959 wx_cv_func_vsscanf=yes
2960 ], [
2961 wx_cv_func_vsscanf=no
2962 ])
aea02638
VZ
2963])
2964
9d8deca0
VZ
2965if test "$wx_cv_func_vsscanf" = yes; then
2966 AC_DEFINE(HAVE_VSSCANF)
2967fi
2968
f6bcfd97 2969dnl the following tests are for Unix(like) systems only
b089607b 2970if test "$TOOLKIT" != "MSW"; then
a0c79abb 2971
95c8801c
VS
2972dnl check for available version of iconv()
2973
2974AC_LANG_SAVE
2975AC_LANG_CPLUSPLUS
b040e242
VS
2976AM_ICONV
2977LIBS="$LIBICONV $LIBS"
95c8801c 2978AC_LANG_RESTORE
95c8801c 2979
eb4efbdc
VZ
2980dnl check for POSIX signals if we need them
2981if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
2982 AC_CHECK_FUNCS(sigaction)
2983
2984 if test "$ac_cv_func_sigaction" = "no"; then
2985 AC_MSG_WARN([No POSIX signal functions on this system, wxApp::OnFatalException will not be called])
2986 wxUSE_ON_FATAL_EXCEPTION=no
2987 fi
f6bcfd97
BP
2988
2989 if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
2990 AC_LANG_SAVE
2991 AC_LANG_CPLUSPLUS
2992
2993 AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler,
2994 [
2995 AC_TRY_COMPILE([#include <signal.h>],
2996 [
2997 extern void testSigHandler(int);
2998
2999 struct sigaction sa;
3000 sa.sa_handler = testSigHandler;
3001 ], [
3002 wx_cv_type_sa_handler=int
3003 ], [
3004 wx_cv_type_sa_handler=void
3005 ])
3006 ])
3007
3008 AC_LANG_RESTORE
3009
3010 AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler)
3011 fi
eb4efbdc
VZ
3012fi
3013
9a98a854
VZ
3014dnl check for vfork() (even if it's the same as fork() in modern Unices)
3015AC_CHECK_FUNCS(vfork)
3016
ade35f11
VZ
3017dnl check for the function for temp files creation
3018AC_CHECK_FUNCS(mkstemp mktemp, break)
3019
9952adac
VZ
3020dnl get the library function to use for wxGetDiskSpace(): it is statfs() under
3021dnl Linux and *BSD and statvfs() under Solaris
52e8b690
VZ
3022AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
3023 AC_TRY_COMPILE(
3024 [
9952adac 3025 #if defined(__BSD__)
d08b457b
GD
3026 #include <sys/param.h>
3027 #include <sys/mount.h>
3028 #else
3029 #include <sys/vfs.h>
3030 #endif
52e8b690
VZ
3031 ],
3032 [
3033 long l;
3034 struct statfs fs;
3035 statfs("/", &fs);
3036 l = fs.f_bsize;
3037 l += fs.f_blocks;
3038 l += fs.f_bavail;
3039 ],
3040 [
3041 wx_cv_func_statfs=yes
3042 ],
3043 [
3044 wx_cv_func_statfs=no
3045 ]
3046 )
3047)
3048
3049if test "$wx_cv_func_statfs" = "yes"; then
3050 AC_DEFINE(HAVE_STATFS)
3051else
9952adac
VZ
3052 AC_CACHE_CHECK(for statvfs, wx_cv_func_statvfs,
3053 AC_TRY_COMPILE(
3054 [
3055 #include <sys/statvfs.h>
3056 ],
3057 [
3058 long l;
3059 struct statvfs fs;
3060 statvfs("/", &fs);
3061 l = fs.f_bsize;
3062 l += fs.f_blocks;
3063 l += fs.f_bavail;
3064 ],
3065 [
3066 wx_cv_func_statvfs=yes
3067 ],
3068 [
3069 wx_cv_func_statvfs=no
3070 ]
3071 )
af15babd 3072 )
9952adac
VZ
3073
3074 if test "$wx_cv_func_statvfs" = "yes"; then
3075 AC_DEFINE(HAVE_STATVFS)
3076 else
3077 AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()])
3078 fi
52e8b690
VZ
3079fi
3080
4f3c5f06
VZ
3081dnl check for fcntl() or at least flock() needed by Unix implementation of
3082dnl wxSingleInstanceChecker
3083if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
3084 AC_CHECK_FUNCS(fcntl flock, break)
3085
3086 if test "$ac_cv_func_fcntl" != "yes" -a "$ac_cv_func_flock" != "yes"; then
3087 AC_MSG_WARN(wxSingleInstanceChecker not available)
3088 wxUSE_SNGLINST_CHECKER=no
3089 fi
3090fi
3091
270a909e
VZ
3092dnl check for timegm() used by datetime.cpp
3093AC_CHECK_FUNCS(timegm)
3094
4f3c5f06 3095dnl look for a function to modify the environment
8fd0d89b
VZ
3096AC_CHECK_FUNCS(putenv setenv, break)
3097
b12915c1
VZ
3098HAVE_SOME_SLEEP_FUNC=0
3099if test "$USE_BEOS" = 1; then
3100 dnl BeOS has its own (wonder where did they get it from) sleep() function
3101 dnl in unistd.h
3102 AC_DEFINE(HAVE_SLEEP)
3103 HAVE_SOME_SLEEP_FUNC=1
3104fi
3105
f11bdd03 3106if test "$USE_DARWIN" = 1; then
b4085ce6
GD
3107 dnl Mac OS X has both nanosleep and usleep
3108 dnl but only usleep is defined in unistd.h
3109 AC_DEFINE(HAVE_USLEEP)
3110 HAVE_SOME_SLEEP_FUNC=1
3111fi
3112
b12915c1
VZ
3113if test "$HAVE_SOME_SLEEP_FUNC" != 1; then
3114 dnl try nanosleep() in libc and libposix4, if this fails - usleep()
3115 POSIX4_LINK=
3116 AC_CHECK_FUNCS(nanosleep,
3117 AC_DEFINE(HAVE_NANOSLEEP),
3118 [
3119 AC_CHECK_LIB(posix4, nanosleep,
3120 [
3121 AC_DEFINE(HAVE_NANOSLEEP)
3d63bc3a 3122 POSIX4_LINK=" -lposix4"
b12915c1
VZ
3123 ],
3124 [
b4085ce6 3125 AC_CHECK_FUNCS(usleep,
4f3c5f06
VZ
3126 AC_DEFINE(HAVE_USLEEP),
3127 AC_MSG_WARN([wxSleep() function will not work])
3128 )
b12915c1
VZ
3129 ]
3130 )
3131 ]
3132 )
3133fi
9a98a854
VZ
3134
3135dnl check for uname (POSIX) and gethostname (BSD)
3136AC_CHECK_FUNCS(uname gethostname, break)
3137
6098c7f9
VZ
3138dnl check for MT-safe version of strtok (on DEC Alpha, it's ok for C compiler
3139dnl but not for C++ one - hence change language)
3140AC_LANG_SAVE
3141AC_LANG_CPLUSPLUS
3142
e90c1d2a
VZ
3143AC_CHECK_FUNCS(strtok_r)
3144
6098c7f9
VZ
3145AC_LANG_RESTORE
3146
c63c7106 3147dnl check for inet_addr and inet_aton (these may live either in libc, or in
c6712985 3148dnl libnsl or libresolv or libsocket)
c63c7106
VZ
3149INET_LINK=
3150AC_CHECK_FUNCS(inet_addr,
3151 AC_DEFINE(HAVE_INET_ADDR),
3152 [
3153 AC_CHECK_LIB(nsl, inet_addr,
270a909e 3154 INET_LINK="nsl",
c63c7106 3155 AC_CHECK_LIB(resolv, inet_addr,
c6712985
SN
3156 INET_LINK="resolv",
3157 AC_CHECK_LIB(socket, inet_addr,
3158 INET_LINK="socket"
3159 )
c63c7106
VZ
3160 )
3161 )
3162 ]
3163)
3164
3165AC_CHECK_FUNCS(inet_aton,
3166 AC_DEFINE(HAVE_INET_ATON),
3167 [
3168 dnl only check it in the same lib
3169 AC_CHECK_LIB($INET_LINK, inet_aton, AC_DEFINE(HAVE_INET_ATON))
3170 ])
3171
3172if test "x$INET_LINK" != "x"; then
3173 AC_DEFINE(HAVE_INET_ADDR)
3d63bc3a 3174 INET_LINK=" -l$INET_LINK"
c63c7106 3175fi
e96ac54e 3176
a0c79abb 3177fi
b089607b 3178dnl if !MSW
a0c79abb 3179
9a98a854
VZ
3180dnl ===========================================================================
3181dnl Now we have all the info we need - use it!
3182dnl ===========================================================================
3183
3184dnl flush the cache
3185AC_CACHE_SAVE
3186
3187dnl ---------------------------------------------------------------------------
a9b5e89f 3188dnl thread support for Unix (always available under Win32)
9a98a854
VZ
3189dnl ---------------------------------------------------------------------------
3190
b089607b 3191dnl under MSW we always have thread support
009fead0 3192CPP_MT_FLAG=
b089607b 3193if test "$TOOLKIT" != "MSW"; then
a9b5e89f 3194
7274f1c7 3195 dnl the code below:
009fead0
VZ
3196 dnl
3197 dnl defines THREADS_LINK and THREADS_CFLAGS which are the options
3198 dnl necessary to build the MT programs for the linker and compiler
3199 dnl respectively
3200 dnl
3201 dnl sets wxUSE_THREADS=1 if thread support is activated
7274f1c7
RL
3202
3203 THREADS_LINK=
009fead0 3204 THREADS_CFLAGS=
7274f1c7
RL
3205
3206 if test "$wxUSE_THREADS" = "yes" ; then
3207 if test "$wxUSE_WINE" = 1 ; then
156b2523 3208 AC_MSG_WARN([Threads are not supported under WINE... disabled])
7274f1c7
RL
3209 wxUSE_THREADS="no"
3210 elif test "$USE_BEOS" = 1; then
156b2523 3211 AC_MSG_WARN([BeOS threads are not yet supported... disabled])
7274f1c7
RL
3212 wxUSE_THREADS="no"
3213 fi
77c85c2b 3214 fi
39c9d5ac 3215
7274f1c7
RL
3216 if test "$wxUSE_THREADS" = "yes" ; then
3217 dnl find if POSIX threads are available
009fead0
VZ
3218 dnl
3219 dnl the tests here are based on ACX_PTHREAD macro from autoconf macro
3220 dnl archive from http://ac-archive.sourceforge.net/
3221 dnl
3222 dnl thanks to Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro
3223 dnl Forero Cuervo <bachue@bachue.com> for the original code
3224
3225 dnl TODO: cache the result
3226
3227 dnl define the list of the thread options to try in the loop below
3228 dnl with the convention that anything starting with '-' is a cpp flag
3229 dnl while anything else is a library (i.e. there is an implicit "-l")
3230 THREAD_OPTS="-pthread"
3231 case "${host}" in
3232 *-*-solaris2* | *-*-sunos4* )
3233 if test "x$GCC" = "xyes"; then
126be6b4
VZ
3234 dnl Solaris/gcc combination use this one for some reason
3235 THREAD_OPTS="-pthreads $THREAD_OPTS"
009fead0
VZ
3236 else
3237 THREAD_OPTS="-mt $THREAD_OPTS"
3238 fi
3239 ;;
3240 *-*-freebsd*)
3241 dnl look, in order, for the kernel threads, then Linux threads
3242 dnl and finally the userland threads
3243 THREAD_OPTS="-kthread lthread $THREAD_OPTS c_r"
3244 ;;
17234b26 3245 *-*-darwin* | *-*-cygwin* )
4101db81 3246 dnl Darwin / Mac OS X just uses -lpthread tested below
17234b26 3247 dnl and so does Cygwin
4101db81
GD
3248 THREAD_OPTS=""
3249 ;;
3250 *-*-aix*)
009fead0
VZ
3251 dnl AIX calls the library libpthreads - thanks IBM!
3252 THREAD_OPTS="pthreads"
3253 ;;
009fead0 3254 esac
c596875e 3255
595e0e44
VZ
3256 dnl simply linking with libpthread should make the test below work but
3257 dnl it's far from certain that the threaded programs compiled without
3258 dnl any special switches actually work, so try it after all the others
02a1dfba 3259 THREAD_OPTS="$THREAD_OPTS pthread none"
595e0e44 3260
009fead0
VZ
3261 dnl now test for all possibilities
3262 THREADS_OK=no
3263 for flag in $THREAD_OPTS; do
3264 case $flag in
3265 none)
3266 AC_MSG_CHECKING([whether pthreads work without any flags])
3267 ;;
f6bcfd97 3268
009fead0
VZ
3269 -*)
3270 AC_MSG_CHECKING([whether pthreads work with $flag])
3271 THREADS_CFLAGS="$flag"
3272 ;;
9a98a854 3273
009fead0
VZ
3274 *)
3275 AC_MSG_CHECKING([for the pthreads library -l$flag])
3276 THREADS_LINK="-l$flag"
3277 ;;
3278 esac
3279
3280 save_LIBS="$LIBS"
3281 save_CFLAGS="$CFLAGS"
3282 LIBS="$THREADS_LINK $LIBS"
04727afd 3283 CFLAGS="$THREADS_CFLAGS $CFLAGS"
009fead0
VZ
3284
3285 AC_TRY_LINK([#include <pthread.h>],
3286 [pthread_create(0,0,0,0);],
3287 THREADS_OK=yes)
3288
3289 LIBS="$save_LIBS"
3290 CFLAGS="$save_CFLAGS"
3291
3292 AC_MSG_RESULT($THREADS_OK)
3293 if test "x$THREADS_OK" = "xyes"; then
3294 break;
3295 fi
3296
3297 THREADS_LINK=""
3298 THREADS_CFLAGS=""
3299 done
3300
3301 if test "x$THREADS_OK" != "xyes"; then
3302 wxUSE_THREADS=no
3303 AC_MSG_WARN([No thread support on this system... disabled])
3304 else
fe5a9cab
VZ
3305 dnl yes, these special compiler flags should be used with the
3306 dnl linker as well
3307 LIBS="$THREADS_LINK $THREADS_CFLAGS $LIBS"
3308
009fead0
VZ
3309 AC_MSG_CHECKING([if more special flags are required for pthreads])
3310 flag=no
3311 case "${host}" in
3312 *-aix* | *-freebsd*)
3313 flag="-D_THREAD_SAFE"
3314 ;;
3315 *solaris* | alpha*-osf*)
3316 flag="-D_REENTRANT"
3317 ;;
3318 esac
3319 AC_MSG_RESULT(${flag})
3320 if test "x$flag" != xno; then
04727afd 3321 THREADS_CFLAGS="$THREADS_CFLAGS $flag"
009fead0
VZ
3322 fi
3323
009fead0 3324 if test "x$THREADS_CFLAGS" != "x"; then
fe5a9cab 3325 dnl don't add these options to CPPFLAGS as cpp might not know them
009fead0
VZ
3326 CFLAGS="$CFLAGS $THREADS_CFLAGS"
3327 CXXFLAGS="$CXXFLAGS $THREADS_CFLAGS"
3328 fi
3329 fi
aea02638 3330 fi
9a98a854 3331
7274f1c7
RL
3332 dnl do other tests only if we are using threads
3333 if test "$wxUSE_THREADS" = "yes" ; then
3334 AC_CHECK_FUNCS(thr_setconcurrency)
3335
7274f1c7 3336 AC_CHECK_HEADERS(sched.h)
009fead0
VZ
3337 if test "$ac_cv_header_sched_h" = "yes"; then
3338 AC_CHECK_FUNC(sched_yield,
3339 AC_DEFINE(HAVE_SCHED_YIELD),
3340 [
3341 AC_CHECK_LIB(posix4,
3342 sched_yield,
3343 [AC_DEFINE(HAVE_SCHED_YIELD) POSIX4_LINK=" -lposix4"],
3344 AC_MSG_WARN(wxThread::Yield will not work properly)
3345 )
3346 ]
3347 )
3348 fi
9a98a854 3349
7274f1c7
RL
3350 dnl to be able to set the thread priority, we need to have all of the
3351 dnl following functions:
3352 dnl 1. pthread_attr_getschedpolicy
3353 dnl 2. sched_get_priority_min and sched_get_priority_max
3354 dnl (this one can be in either libpthread or libposix4 (under Solaris))
3355 dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam
3356 HAVE_PRIOR_FUNCS=0
009fead0
VZ
3357 AC_CHECK_FUNC(pthread_attr_getschedpolicy,
3358 AC_CHECK_FUNC(pthread_attr_setschedparam,
3359 AC_CHECK_FUNC(sched_get_priority_max,
7274f1c7
RL
3360 HAVE_PRIOR_FUNCS=1,
3361 AC_CHECK_LIB([posix4], sched_get_priority_max,
3362 [
3363 HAVE_PRIOR_FUNCS=1
3364 POSIX4_LINK=" -lposix4"
3365 ],
3366 )
3367 )
3368 )
3369 )
f6bcfd97 3370
7274f1c7
RL
3371 if test "$HAVE_PRIOR_FUNCS" = 1; then
3372 AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS)
3373 else
3374 AC_MSG_WARN(Setting thread priority will not work)
3375 fi
9a98a854 3376
009fead0
VZ
3377 AC_CHECK_FUNC(pthread_cancel,
3378 AC_DEFINE(HAVE_PTHREAD_CANCEL),
3379 AC_MSG_WARN([wxThread::Kill() will not work properly]))
9a98a854 3380
7274f1c7
RL
3381 AC_CACHE_CHECK([for pthread_cleanup_push/pop], wx_cv_func_pthread_cleanup_push,
3382 [
3383 AC_TRY_COMPILE([#include <pthread.h>],
3384 [
3385 pthread_cleanup_push(NULL, NULL);
3386 pthread_cleanup_pop(0);
3387 ], [
3388 wx_cv_func_pthread_cleanup_push=yes
3389 ], [
3390 wx_cv_func_pthread_cleanup_push=no
3391 ])
3392 ])
d9b9876f 3393
7274f1c7
RL
3394 if test "$wx_cv_func_pthread_cleanup_push" = "yes"; then
3395 AC_DEFINE(HAVE_THREAD_CLEANUP_FUNCTIONS)
3396 fi
ab252f7b 3397
7274f1c7
RL
3398 dnl mutexattr_t initialization is done in quite different ways on different
3399 dnl platforms, so check for a few things:
3400 dnl
3401 dnl HAVE_MUTEX_RECURSIVE means that we can create recursive mutexes
3402 dnl HAVE_MUTEXATTR_SETTYPE means that we do it using
3403 dnl pthread_mutexattr_settype(PTHREAD_MUTEX_RECURSIVE) and if it is not
3404 dnl defined, we do it by directly assigned
3405 dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
3406
3407 dnl we need _GNU_SOURCE to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+
3408 dnl (strictly speaking we only need _XOPEN_SOURCE=500 but just defining
3409 dnl this disables _BSD_SOURCE which breaks libtiff compilation, so it is
3410 dnl simpler to just define _GNU_SOURCE to get everything)
19bc6aad 3411 if test "x$wx_cv_lib_glibc21" = "xyes"; then
7274f1c7
RL
3412 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3413 fi
d9b9876f 3414
7274f1c7
RL
3415 AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
3416 [
d9b9876f
VZ
3417 AC_TRY_COMPILE([#include <pthread.h>],
3418 [
7274f1c7
RL
3419 pthread_mutexattr_t attr;
3420 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
d9b9876f 3421 ], [
7274f1c7 3422 wx_cv_type_pthread_mutexattr_t=yes
d9b9876f 3423 ], [
7274f1c7 3424 wx_cv_type_pthread_mutexattr_t=no
d9b9876f
VZ
3425 ]
3426 )
7274f1c7 3427 ])
d9b9876f 3428
7274f1c7
RL
3429 if test "$wx_cv_type_pthread_mutexattr_t" = "yes"; then
3430 AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_T)
3431 else
3432 dnl don't despair, there may be another way to do it
3433 AC_CACHE_CHECK([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER],
3434 wx_cv_type_pthread_rec_mutex_init,
3435 [
3436 AC_TRY_COMPILE([#include <pthread.h>],
3437 [
3438 pthread_mutex_t attr = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
3439 ], [
3440 wx_cv_type_pthread_rec_mutex_init=yes
3441 ], [
3442 wx_cv_type_pthread_rec_mutex_init=no
3443 ]
3444 )
3445 ])
3446 if test "$wx_cv_type_pthread_rec_mutex_init" = "yes"; then
3447 AC_DEFINE(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
3448 else
3449 dnl this may break code working elsewhere, so at least warn about it
3450 AC_MSG_WARN([wxMutex won't be recursive on this platform])
3451 fi
3452 fi
7274f1c7 3453 fi
9a98a854 3454
b089607b 3455dnl from if !MSW
a9b5e89f
VZ
3456fi
3457
3458if test "$wxUSE_THREADS" = "yes"; then
3459 AC_DEFINE(wxUSE_THREADS)
3460
a9b5e89f 3461 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
d64af447 3462else
b12915c1 3463 dnl on some systems, _REENTRANT should be defined if we want to use any _r()
d64af447
VZ
3464 dnl functions - add tests for other functions here as well
3465 if test "$ac_cv_func_strtok_r" = "yes"; then
ab9b9eab
VZ
3466 AC_MSG_CHECKING(if -D_REENTRANT is needed)
3467 if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
3a922bb4 3468 TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D_REENTRANT"
ab9b9eab
VZ
3469 AC_MSG_RESULT(yes)
3470 else
3471 AC_MSG_RESULT(no)
ee31c269 3472 fi
d64af447 3473 fi
a9b5e89f
VZ
3474fi
3475
6f72b082
OK
3476if test "$WXGTK20" = 1 ; then
3477 AC_DEFINE_UNQUOTED(__WXGTK20__,$WXGTK20)
13111b2a
VZ
3478 WXGTK12=1
3479fi
3480
9a98a854
VZ
3481if test "$WXGTK12" = 1 ; then
3482 AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12)
3483fi
3484
f6bcfd97
BP
3485if test "$WXGTK127" = 1 ; then
3486 AC_DEFINE_UNQUOTED(__WXGTK127__,$WXGTK127)
3487fi
3488
9a98a854 3489WXDEBUG=
9a98a854
VZ
3490
3491if test "$wxUSE_DEBUG_INFO" = "yes" ; then
3492 WXDEBUG="-g"
3493 wxUSE_OPTIMISE=no
3494fi
3495
5586805b
RR
3496if test "$wxUSE_DEBUG_GDB" = "yes" ; then
3497 wxUSE_DEBUG_INFO=yes
3498 WXDEBUG="-ggdb"
3499fi
3500
9a98a854 3501if test "$wxUSE_DEBUG_FLAG" = "yes" ; then
77c85c2b
RR
3502 AC_DEFINE(WXDEBUG)
3503 WXDEBUG_DEFINE="-D__WXDEBUG__"
9a98a854 3504else
04338f96
RR
3505 if test "$wxUSE_GTK" = 1 ; then
3506 WXDEBUG_DEFINE="-DGTK_NO_CHECK_CASTS"
3507 fi
9a98a854
VZ
3508fi
3509
3510if test "$wxUSE_MEM_TRACING" = "yes" ; then
77c85c2b
RR
3511 AC_DEFINE(wxUSE_MEMORY_TRACING)
3512 AC_DEFINE(wxUSE_GLOBAL_MEMORY_OPERATORS)
47c13eb7 3513 AC_DEFINE(wxUSE_DEBUG_NEW_ALWAYS)
77c85c2b 3514 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS memcheck"
9a98a854
VZ
3515fi
3516
3517if test "$wxUSE_DMALLOC" = "yes" ; then
3d63bc3a 3518 DMALLOC_LIBS="-ldmalloc"
9a98a854
VZ
3519fi
3520
3521PROFILE=
3522if test "$wxUSE_PROFILE" = "yes" ; then
3d63bc3a 3523 PROFILE=" -pg"
9a98a854
VZ
3524fi
3525
009fead0
VZ
3526CODE_GEN_FLAGS=
3527CODE_GEN_FLAGS_CXX=
88e30f2b 3528if test "$GCC" = "yes" ; then
f7bdcdd7 3529 if test "$wxUSE_NO_RTTI" = "yes" ; then
3a922bb4 3530 CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fno-rtti"
f7bdcdd7
RR
3531 fi
3532 if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
3a922bb4 3533 CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fno-exceptions"
f7bdcdd7 3534 fi
5586805b 3535 if test "$wxUSE_PERMISSIVE" = "yes" ; then
d08b457b 3536 CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fpermissive"
5586805b 3537 fi
3a922bb4
RL
3538 if test "$USE_WIN32" = 1 ; then
3539 # I'm not even really sure what this was ever added to solve,
3540 # but someone added it for mingw native builds, so I guess
3541 # they had a reason, right??
3542 CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-pcc-struct-return"
5586805b 3543 fi
1d1b75ac
VZ
3544
3545 dnl Ian Brown <ian.brown@printsoft.de> reports that versions of gcc before
3546 dnl 3.0 overflow the table of contents on rs6000 as they create an entry
3547 dnl for each subroutine by default -- using the switch below only creates
3548 dnl one entry per file instead at the price of minor performance penalty
3549 dnl
3550 dnl TODO: test for the gcc version here (how?)
3551 case "${host}" in
3552 powerpc*-*-aix* )
3553 CODE_GEN_FLAGS="$CODE_GEN_FLAGS -mminimal-toc"
3554 ;;
3555 esac
c596875e
RD
3556fi
3557
9a98a854 3558if test "$wxUSE_OPTIMISE" = "no" ; then
77c85c2b 3559 OPTIMISE=
9a98a854 3560else
77c85c2b 3561 if test "$GCC" = yes ; then
04338f96 3562 OPTIMISE="-O2"
77c85c2b
RR
3563 case "${host}" in
3564 i586-*-*|i686-*-* )
3565 OPTIMISE="${OPTIMISE} "
3566 ;;
3567 esac
3568 else
3569 OPTIMISE="-O"
3570 fi
9a98a854
VZ
3571fi
3572
54276ccf
VZ
3573if test "$WXWIN_COMPATIBILITY_2" = "yes"; then
3574 AC_DEFINE(WXWIN_COMPATIBILITY_2)
3575
3576 WXWIN_COMPATIBILITY_2_2="yes"
3577fi
3578
0c9a1c32 3579if test "x$WXWIN_COMPATIBILITY_2_2" != "xno"; then
54276ccf
VZ
3580 AC_DEFINE(WXWIN_COMPATIBILITY_2_2)
3581fi
3582
9a98a854
VZ
3583dnl ---------------------------------------------------------------------------
3584dnl the library may be built without GUI classes at all
3585dnl ---------------------------------------------------------------------------
3586
3587if test "$wxUSE_GUI" = "yes"; then
3588 AC_DEFINE(wxUSE_GUI)
3589
3590 dnl the things we always pull in the GUI version of the library:
3591 dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
3592 dnl library really can't be built without those)
3593 dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
3594 dnl almost any program and the first 2 are needed to show a message box
3595 dnl which want to be always able to do)
3596 dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
3597 dnl to compile without them (if the app doesn't do any drawing, it doesn't
3598 dnl need the dcs, pens, brushes, ...), this just can't be done now
3599 dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
3600 dnl 5. misc stuff: timers, settings, message box
9a98a854
VZ
3601else
3602 AC_DEFINE(wxUSE_NOGUI)
3603fi
3604
3605dnl ---------------------------------------------------------------------------
3606dnl Unix/Windows
3607dnl ---------------------------------------------------------------------------
3608
3609if test "$wxUSE_UNIX" = "yes"; then
3610 AC_DEFINE(wxUSE_UNIX)
9a98a854
VZ
3611fi
3612
3613dnl ---------------------------------------------------------------------------
3614dnl Register non-GUI class options for makefiles and setup.h
3615dnl ---------------------------------------------------------------------------
3616
3617if test "$wxUSE_APPLE_IEEE" = "yes"; then
3618 AC_DEFINE(wxUSE_APPLE_IEEE)
9a98a854
VZ
3619fi
3620
1e6feb95
VZ
3621if test "$wxUSE_TIMER" = "yes"; then
3622 AC_DEFINE(wxUSE_TIMER)
3623fi
3624
2749089a
KB
3625if test "$wxUSE_WAVE" = "yes"; then
3626 AC_DEFINE(wxUSE_WAVE)
3627fi
3628
1e6feb95
VZ
3629if test "$wxUSE_CMDLINE_PARSER" = "yes"; then
3630 AC_DEFINE(wxUSE_CMDLINE_PARSER)
3631fi
3632
3633if test "$wxUSE_STOPWATCH" = "yes"; then
3634 AC_DEFINE(wxUSE_STOPWATCH)
3635fi
3636
3637if test "$wxUSE_DATETIME" = "yes"; then
3638 AC_DEFINE(wxUSE_DATETIME)
3639fi
3640
3641if test "$wxUSE_TIMEDATE" = "yes"; then
3642 AC_DEFINE(wxUSE_TIMEDATE)
3643fi
3644
9a98a854
VZ
3645if test "$wxUSE_FILE" = "yes"; then
3646 AC_DEFINE(wxUSE_FILE)
9a98a854
VZ
3647fi
3648
1e6feb95
VZ
3649if test "$wxUSE_FFILE" = "yes"; then
3650 AC_DEFINE(wxUSE_FFILE)
3651fi
3652
24528b0c
VS
3653if test "$wxUSE_FILESYSTEM" = "yes"; then
3654 AC_DEFINE(wxUSE_FILESYSTEM)
3655fi
3656
e3e717ec
VZ
3657if test "$wxUSE_FS_INET" = "yes"; then
3658 AC_DEFINE(wxUSE_FS_INET)
3659fi
3660
3661if test "$wxUSE_FS_ZIP" = "yes"; then
3662 AC_DEFINE(wxUSE_FS_ZIP)
3663fi
3664
d78b3d64
VS
3665if test "$wxUSE_ZIPSTREAM" = "yes"; then
3666 AC_DEFINE(wxUSE_ZIPSTREAM)
3667fi
3668
eb4efbdc
VZ
3669if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
3670 AC_DEFINE(wxUSE_ON_FATAL_EXCEPTION)
3671fi
3672
4f3c5f06
VZ
3673if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
3674 AC_DEFINE(wxUSE_SNGLINST_CHECKER)
3675fi
3676
d78b3d64
VS
3677if test "$wxUSE_BUSYINFO" = "yes"; then
3678 AC_DEFINE(wxUSE_BUSYINFO)
3679fi
3680
fd15d8f1
RR
3681if test "$wxUSE_STD_IOSTREAM" = "yes"; then
3682 AC_DEFINE(wxUSE_STD_IOSTREAM)
3683fi
3684
a3a584a7
VZ
3685if test "$wxUSE_TEXTBUFFER" = "yes"; then
3686 AC_DEFINE(wxUSE_TEXTBUFFER)
3687fi
3688
9a98a854 3689if test "$wxUSE_TEXTFILE" = "yes"; then
a3a584a7 3690 if test "$wxUSE_FILE" != "yes" -o "$wxUSE_TEXTBUFFER" != "yes" ; then
156b2523 3691 AC_MSG_WARN(wxTextFile requires wxFile and wxTextBuffer... disabled)
9a98a854
VZ
3692 else
3693 AC_DEFINE(wxUSE_TEXTFILE)
9a98a854
VZ
3694 fi
3695fi
3696
3697if test "$wxUSE_CONFIG" = "yes" ; then
3698 if test "$wxUSE_TEXTFILE" != "yes"; then
156b2523 3699 AC_MSG_WARN(wxConfig requires wxTextFile... disabled)
9a98a854
VZ
3700 else
3701 AC_DEFINE(wxUSE_CONFIG)
9a98a854
VZ
3702 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS config"
3703 fi
3704fi
3705
3706if test "$wxUSE_INTL" = "yes" ; then
3707 if test "$wxUSE_FILE" != "yes"; then
156b2523 3708 AC_MSG_WARN(I18n code requires wxFile... disabled)
9a98a854
VZ
3709 else
3710 AC_DEFINE(wxUSE_INTL)
9a98a854 3711 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS internat"
f6bcfd97 3712 GUIDIST="$GUIDIST INTL_DIST"
9a98a854
VZ
3713 fi
3714fi
3715
3716if test "$wxUSE_LOG" = "yes"; then
3717 AC_DEFINE(wxUSE_LOG)
d73be714
VZ
3718
3719 if test "$wxUSE_LOGGUI" = "yes"; then
3720 AC_DEFINE(wxUSE_LOGGUI)
3721 fi
3722
3723 if test "$wxUSE_LOGWINDOW" = "yes"; then
3724 AC_DEFINE(wxUSE_LOGWINDOW)
3725 fi
69d27ff7
MB
3726
3727 if test "$wxUSE_LOGDIALOG" = "yes"; then
3728 AC_DEFINE(wxUSE_LOG_DIALOG)
3729 fi
9a98a854
VZ
3730fi
3731
3732if test "$wxUSE_LONGLONG" = "yes"; then
3733 AC_DEFINE(wxUSE_LONGLONG)
9a98a854
VZ
3734fi
3735
e8f65ba6
RR
3736if test "$wxUSE_GEOMETRY" = "yes"; then
3737 AC_DEFINE(wxUSE_GEOMETRY)
3738fi
3739
1c8515f9
KB
3740if test "$wxUSE_DIALUP_MANAGER" = "yes" ; then
3741 AC_DEFINE(wxUSE_DIALUP_MANAGER)
70f7a477 3742 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dialup"
1c8515f9
KB
3743fi
3744
9a98a854
VZ
3745if test "$wxUSE_STREAMS" = "yes" ; then
3746 AC_DEFINE(wxUSE_STREAMS)
9a98a854
VZ
3747fi
3748
52e8b690 3749dnl ---------------------------------------------------------------------------
afc31813
VZ
3750dnl time/date functions
3751dnl ------------------------------------------------------------------------
3752
1e6feb95 3753if test "$wxUSE_DATETIME" = "yes"; then
83307f33
VZ
3754 dnl check for strptime
3755 AC_CHECK_FUNCS(strptime)
3756
360d6699 3757 dnl check for timezone variable
62cc730f 3758 dnl doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead
360d6699
VZ
3759 AC_CACHE_CHECK(for timezone variable in <time.h>,
3760 wx_cv_var_timezone,
3761 [
3762 AC_TRY_COMPILE(
3763 [
3764 #include <time.h>
3765 ],
3766 [
3767 int tz;
4f11a343 3768 tz = timezone;
360d6699
VZ
3769 ],
3770 [
4f11a343 3771 wx_cv_var_timezone=timezone
360d6699
VZ
3772 ],
3773 [
3774 AC_TRY_COMPILE(
3775 [
3776 #include <time.h>
3777 ],
3778 [
3779 int tz;
3780 tz = _timezone;
3781 ],
3782 [
3783 wx_cv_var_timezone=_timezone
3784 ],
5357c8e8
VZ
3785 [
3786 AC_TRY_COMPILE(
3787 [
3788 #include <time.h>
3789 ],
3790 [
3791 int tz;
4f11a343 3792 tz = __timezone;
5357c8e8
VZ
3793 ],
3794 [
4f11a343 3795 wx_cv_var_timezone=__timezone
5357c8e8 3796 ],
f9bc1684
VS
3797 [
3798 if test "$USE_DOS" = 0 ; then
62cc730f 3799 AC_MSG_WARN(no timezone variable, will use tm_gmtoff instead)
f9bc1684
VS
3800 fi
3801 ]
5357c8e8
VZ
3802 )
3803 ]
360d6699
VZ
3804 )
3805 ]
3806 )
3807 ]
3808 )
3809
3810 dnl as we want $wx_cv_var_timezone to be expanded, use AC_DEFINE_UNQUOTED
f9bc1684
VS
3811 if test "x$wx_cv_var_timezone" != x ; then
3812 AC_DEFINE_UNQUOTED(WX_TIMEZONE, $wx_cv_var_timezone)
3813 fi
360d6699 3814
3fcdd07b
VZ
3815 dnl check for localtime (it's POSIX, but the check can do no harm...)
3816 AC_CHECK_FUNCS(localtime)
afc31813 3817
0470b1e6
VZ
3818 if test "$ac_cv_func_localtime" = "yes"; then
3819 AC_CACHE_CHECK(for tm_gmtoff in struct tm,
3820 wx_cv_struct_tm_has_gmtoff,
3821 [
3822 AC_TRY_COMPILE(
3823 [
3824 #include <time.h>
3825 ],
3826 [
3827 struct tm tm;
3828 tm.tm_gmtoff++;
3829 ],
3830 [
f03a98d8 3831 wx_cv_struct_tm_has_gmtoff=yes
0470b1e6
VZ
3832 ],
3833 wx_cv_struct_tm_has_gmtoff=no
3834 )
3835 ])
3fcdd07b
VZ
3836 fi
3837
6232543b
VS
3838 if test "$wx_cv_struct_tm_has_gmtoff" = "yes"; then
3839 AC_DEFINE(WX_GMTOFF_IN_TM)
3840 fi
3841
3fcdd07b
VZ
3842 dnl check for gettimeofday (SVr4, BSD 4.3) and ftime (V7, BSD 4.3) for the
3843 dnl function to be used for high resolution timers
3844 AC_CHECK_FUNCS(gettimeofday ftime, break)
3845
3846 if test "$ac_cv_func_gettimeofday" = "yes"; then
afc31813
VZ
3847 AC_CACHE_CHECK([whether gettimeofday takes two arguments],
3848 wx_cv_func_gettimeofday_has_2_args,
3849 [
3850 dnl on some _really_ old systems it takes only 1 argument
3851 AC_LANG_SAVE
3852 AC_LANG_CPLUSPLUS
3853
3854 AC_TRY_COMPILE(
3855 [
3856 #include <sys/time.h>
3857 #include <unistd.h>
3858 ],
3859 [
3860 struct timeval tv;
776862b4 3861 gettimeofday(&tv, NULL);
afc31813
VZ
3862 ],
3863 wx_cv_func_gettimeofday_has_2_args=yes,
3864 AC_TRY_COMPILE(
3865 [
3866 #include <sys/time.h>
3867 #include <unistd.h>
3868 ],
3869 [
3870 struct timeval tv;
3871 gettimeofday(&tv);
3872 ],
3873 wx_cv_func_gettimeofday_has_2_args=no,
776862b4
VZ
3874 [
3875 AC_MSG_WARN([failed to determine number of gettimeofday() arguments])
3876 wx_cv_func_gettimeofday_has_2_args=unknown
3877 ]
afc31813
VZ
3878 )
3879 )
3880 AC_LANG_RESTORE
3881 ])
3882
3883 if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then
3884 AC_DEFINE(WX_GETTIMEOFDAY_NO_TZ)
3885 fi
3886 fi
3887
3888 AC_DEFINE(wxUSE_TIMEDATE)
3889 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest"
3890fi
3891
9a98a854
VZ
3892dnl ------------------------------------------------------------------------
3893dnl wxSocket
3894dnl ------------------------------------------------------------------------
3895
0feee163
VZ
3896dnl VZ: the GUI hooks wxSocket needs are not implemented yet in wxX11
3897if test "$wxUSE_SOCKETS" = "yes"; then
6c657b52 3898 if test "$wxUSE_X11" = "1"; then
0feee163
VZ
3899 AC_MSG_WARN([wxSocket not yet supported under X11... disabled])
3900 wxUSE_SOCKETS="no"
3901 fi
6c657b52
VS
3902
3903 if test "$wxUSE_MGL" = "1"; then
3904 AC_MSG_WARN([wxSocket not yet supported under MGL... disabled])
3905 wxUSE_SOCKETS="no"
3906 fi
0feee163 3907fi
b089607b 3908
0feee163
VZ
3909if test "$wxUSE_SOCKETS" = "yes"; then
3910 dnl under MSW we always have sockets
3911 if test "$TOOLKIT" != "MSW"; then
590b1a4d 3912 dnl under Solaris and OS/2, socket functions live in -lsocket
3a922bb4
RL
3913 AC_CHECK_FUNC(socket,,
3914 AC_CHECK_LIB(socket, socket,
590b1a4d 3915 if test "$INET_LINK" != " -lsocket"; then
e5ee4c90
SN
3916 INET_LINK="$INET_LINK -lsocket"
3917 fi,
3a922bb4
RL
3918 [
3919 AC_MSG_WARN([socket library not found - sockets will be disabled])
3920 wxUSE_SOCKETS=no
3921 ]
3922 )
afc31813 3923 )
3a922bb4 3924 fi
0feee163 3925fi
afc31813 3926
0feee163 3927if test "$wxUSE_SOCKETS" = "yes" ; then
3a922bb4
RL
3928 dnl this test may be appropriate if building under cygwin
3929 dnl right now I'm assuming it also uses the winsock stuff
3930 dnl like mingw does.. -- RL
0feee163 3931 if test "$TOOLKIT" != "MSW"; then
3a922bb4
RL
3932 dnl determine the type of third argument for getsockname
3933 AC_CACHE_CHECK([what is the type of the third argument of getsockname],
3934 wx_cv_type_getsockname3,
3935 [
3936 AC_LANG_SAVE
3937 AC_LANG_CPLUSPLUS
51a9faba 3938
51a9faba
VZ
3939 AC_TRY_COMPILE(
3940 [
4370c5b2 3941 #include <sys/types.h>
51a9faba
VZ
3942 #include <sys/socket.h>
3943 ],
3944 [
3a922bb4 3945 socklen_t len;
51a9faba
VZ
3946 getsockname(0, 0, &len);
3947 ],
3a922bb4 3948 wx_cv_type_getsockname3=socklen_t,
51a9faba
VZ
3949 AC_TRY_COMPILE(
3950 [
4370c5b2 3951 #include <sys/types.h>
51a9faba
VZ
3952 #include <sys/socket.h>
3953 ],
3954 [
3a922bb4 3955 size_t len;
51a9faba
VZ
3956 getsockname(0, 0, &len);
3957 ],
3a922bb4
RL
3958 wx_cv_type_getsockname3=size_t,
3959 AC_TRY_COMPILE(
3960 [
3961 #include <sys/types.h>
3962 #include <sys/socket.h>
3963 ],
3964 [
3965 int len;
3966 getsockname(0, 0, &len);
3967 ],
3968 wx_cv_type_getsockname3=int,
3969 wx_cv_type_getsockname3=unknown
3970 )
51a9faba
VZ
3971 )
3972 )
c63c7106 3973
3a922bb4
RL
3974 AC_LANG_RESTORE
3975 ])
51a9faba 3976
3a922bb4
RL
3977 if test "$wx_cv_type_getsockname3" = "unknown"; then
3978 wxUSE_SOCKETS=no
3979 AC_MSG_WARN([Couldn't find socklen_t synonym for this system])
3980 else
3981 AC_DEFINE_UNQUOTED(SOCKLEN_T, $wx_cv_type_getsockname3)
3982 fi
51a9faba
VZ
3983 fi
3984fi
c521c494 3985
51a9faba 3986if test "$wxUSE_SOCKETS" = "yes" ; then
afc31813 3987 AC_DEFINE(wxUSE_SOCKETS)
70f7a477 3988 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets"
9a98a854
VZ
3989fi
3990
3991dnl ---------------------------------------------------------------------------
3992dnl Joystick support
3993dnl ---------------------------------------------------------------------------
3994
dc3d889d
VZ
3995if test "$wxUSE_GUI" = "yes"; then
3996
156b2523
GD
3997 if test "$TOOLKIT" = "MAC"; then
3998 AC_MSG_WARN([Joystick not yet supported under Mac OS X... disabled])
3999 wxUSE_JOYSTICK=no
4000 fi
4001 if test "$TOOLKIT" = "MOTIF"; then
4002 AC_MSG_WARN([Joystick not yet supported under Motif... disabled])
4003 wxUSE_JOYSTICK=no
4004 fi
7f5c07ab
JS
4005 if test "$TOOLKIT" = "X11"; then
4006 AC_MSG_WARN([Joystick not yet supported under X11... disabled])
4007 wxUSE_JOYSTICK=no
4008 fi
156b2523 4009
3a922bb4
RL
4010 dnl under MSW we always have joystick support
4011 if test "$TOOLKIT" != "MSW"; then
4012 if test "$wxUSE_JOYSTICK" = "yes"; then
4013 dnl joystick support is only for Linux 2.1.x or greater
4014 AC_CHECK_HEADERS(linux/joystick.h)
4015 if test "$ac_cv_header_linux_joystick_h" != "yes"; then
4016 wxUSE_JOYSTICK=no
156b2523 4017 AC_MSG_WARN(Joystick not supported by this system... disabled)
3a922bb4
RL
4018 fi
4019 fi
4020 fi
9a98a854 4021
3a922bb4
RL
4022 if test "$wxUSE_JOYSTICK" = "yes"; then
4023 AC_DEFINE(wxUSE_JOYSTICK)
4024 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest"
4025 fi
dc3d889d 4026fi
dc3d889d 4027
9a98a854
VZ
4028dnl ------------------------------------------------------------------------
4029dnl DLL support
4030dnl ------------------------------------------------------------------------
4031
b089607b
VZ
4032dnl under MSW we always have LoadLibrary/GetProcAddress
4033if test "$TOOLKIT" != "MSW"; then
4034
3a922bb4
RL
4035 HAVE_DL_FUNCS=0
4036 HAVE_SHL_FUNCS=0
0b9ab0bd 4037 if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then
3a922bb4
RL
4038 if test "$USE_DARWIN" = 1; then
4039 dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
37667812 4040 HAVE_DL_FUNCS=1
3a922bb4
RL
4041 else
4042 dnl the test is a bit complicated because we check for dlopen() both with
4043 dnl and without -ldl and we also try to find shl_load() if there is no
4044 dnl dlopen() on this system
4045 AC_CHECK_FUNCS(dlopen,
4046 [
4047 AC_DEFINE(HAVE_DLOPEN)
4048 HAVE_DL_FUNCS=1
4049 ],
4050 [
4051 AC_CHECK_LIB(dl, dlopen,
4052 [
4053 AC_DEFINE(HAVE_DLOPEN)
4054 HAVE_DL_FUNCS=1
3d63bc3a 4055 DL_LINK=" -ldl$DL_LINK"
3a922bb4
RL
4056 ],
4057 [
4058 AC_CHECK_FUNCS(shl_load,
4059 [
4060 AC_DEFINE(HAVE_SHL_LOAD)
4061 HAVE_SHL_FUNCS=1
4062 ],
4063 [
4064 AC_CHECK_LIB(shl_load, dld,
4065 [
4066 HAVE_SHL_FUNCS=1
3d63bc3a 4067 DL_LINK=" -ldld$DL_LINK"
3a922bb4
RL
4068 ])
4069 ])
4070 ])
4071 ])
9a98a854 4072
3a922bb4
RL
4073 dnl check also for dlerror()
4074 if test "$HAVE_DL_FUNCS" = 1; then
4075 AC_CHECK_FUNCS(dlerror,
4076 AC_DEFINE(HAVE_DLERROR),
4077 AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR)))
4078 fi
4079 fi
f6bcfd97 4080
3a922bb4
RL
4081 if test "$HAVE_DL_FUNCS" = 0; then
4082 if test "$HAVE_SHL_FUNCS" = 0; then
4083 if test "$USE_UNIX" = 1; then
4084 AC_MSG_WARN([Missing dynamic loading support, several features will be disabled])
0b9ab0bd 4085 wxUSE_DYNAMIC_LOADER=no
3a922bb4
RL
4086 wxUSE_DYNLIB_CLASS=no
4087 else
4088 AC_MSG_WARN([Assuming wxLibrary class works on this platform])
4089 fi
4090 fi
e90c1d2a 4091 fi
9a98a854
VZ
4092 fi
4093fi
4094
0b9ab0bd
RL
4095if test "$wxUSE_DYNAMIC_LOADER" = "yes" ; then
4096 AC_DEFINE(wxUSE_DYNAMIC_LOADER)
4097elif test "$wxUSE_DYNLIB_CLASS" = "yes" ; then
b12915c1 4098 AC_DEFINE(wxUSE_DYNLIB_CLASS)
9a98a854
VZ
4099fi
4100
4101dnl ---------------------------------------------------------------------------
ced859c3 4102dnl String stuff
9a98a854
VZ
4103dnl ---------------------------------------------------------------------------
4104
1e6feb95
VZ
4105if test "$wxUSE_FONTMAP" = "yes" ; then
4106 AC_DEFINE(wxUSE_FONTMAP)
4107fi
4108
9a98a854
VZ
4109if test "$wxUSE_UNICODE" = "yes" ; then
4110 AC_DEFINE(wxUSE_UNICODE)
bbc3925a
VS
4111
4112 if test "$wxUSE_MSW" != 1; then
4113 wxUSE_UNICODE_MSLU=no
4114 fi
a72a4bfa
VS
4115
4116 if test "$wxUSE_MSW" = 1 -a "$wxUSE_UNICODE_MSLU" = "yes"; then
4117 AC_CHECK_LIB(unicows,main,
4118 [
4119 AC_DEFINE(wxUSE_UNICODE_MSLU)
4120 ],
4121 [
4122 AC_MSG_WARN([Compiler doesn't support MSLU (libunicows.a), disabled.
4123 Applications will only run on Windows NT/2000/XP!])
4124 wxUSE_UNICODE_MSLU=no
4125 ])
4126 fi
9a98a854
VZ
4127fi
4128
ced859c3
VZ
4129if test "$wxUSE_wxUSE_EXPERIMENTAL_PRINTF" = "yes"; then
4130 AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF)
4131fi
4132
b12915c1 4133
9a98a854
VZ
4134dnl ----------------------------------------------------------------
4135dnl iODBC support
4136dnl ----------------------------------------------------------------
4137
4138IODBC_C_SRC=""
4139if test "$wxUSE_ODBC" = "yes" ; then
a0c79abb
VZ
4140 AC_DEFINE(wxUSE_ODBC)
4141 WXODBCFLAG="-D_IODBC_"
4142 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db"
9a98a854
VZ
4143fi
4144
4145dnl ----------------------------------------------------------------
4146dnl Register PostScript options for makefiles and setup.h
4147dnl ----------------------------------------------------------------
4148
4149if test "$wxUSE_POSTSCRIPT" = "yes" ; then
4150 AC_DEFINE(wxUSE_POSTSCRIPT)
9a98a854
VZ
4151fi
4152
4153AC_DEFINE(wxUSE_AFM_FOR_POSTSCRIPT)
4154
4155AC_DEFINE(wxUSE_NORMALIZED_PS_FONTS)
4156
4157dnl ---------------------------------------------------------------------------
4158dnl big GUI components: MDI, doc/view, printing, help, ...
4159dnl ---------------------------------------------------------------------------
4160
4161if test "$wxUSE_CONSTRAINTS" = "yes"; then
ce4169a4
RR
4162 AC_DEFINE(wxUSE_CONSTRAINTS)
4163 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS layout"
9a98a854
VZ
4164fi
4165
4166if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then
fc26f4ab 4167 if test "$wxUSE_UNIVERSAL" = "yes"; then
3c011993 4168 AC_MSG_WARN(MDI not yet supported for wxUniversal... disabled)
fc26f4ab
RL
4169 wxUSE_MDI_ARCHITECTURE=no
4170 fi
4171
4172 if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then
4173 AC_DEFINE(wxUSE_MDI_ARCHITECTURE)
4174 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mdi"
4175 fi
9a98a854
VZ
4176fi
4177
4178if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = "yes" ; then
ce4169a4
RR
4179 AC_DEFINE(wxUSE_DOC_VIEW_ARCHITECTURE)
4180 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docview"
4181 if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then
4182 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docvwmdi"
4183 fi
9a98a854
VZ
4184fi
4185
4186if test "$wxUSE_HELP" = "yes"; then
ce4169a4
RR
4187 AC_DEFINE(wxUSE_HELP)
4188 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help"
3379ed37 4189
77e13408 4190 if test "$wxUSE_MSW" = 1; then
031d8228 4191 if test "$wxUSE_MS_HTML_HELP" = "yes"; then
3b7bc64a 4192 AC_DEFINE(wxUSE_MS_HTML_HELP)
29fd3c0c 4193 fi
3379ed37 4194 fi
031d8228
VS
4195
4196 if test "$wxUSE_WXHTML_HELP" = "yes"; then
4197 if test "$wxUSE_HTML" = "yes"; then
4198 AC_DEFINE(wxUSE_WXHTML_HELP)
4199 else
4200 AC_MSG_WARN(Cannot use wxHTML-based help without wxHTML so it won't be compiled)
4201 wxUSE_WXHTML_HELP=no
4202 fi
4203 fi
9a98a854
VZ
4204fi
4205
4206if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
ce4169a4
RR
4207 if test "$wxUSE_CONSTRAINTS" != "yes"; then
4208 AC_MSG_WARN(Printing support cannot be used without constraints so it won't be compiled without it)
4209 else
4210 AC_DEFINE(wxUSE_PRINTING_ARCHITECTURE)
4211 fi
4212 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS printing"
9a98a854
VZ
4213fi
4214
4215if test "$wxUSE_PROLOGIO" = "yes" ; then
ce4169a4 4216 AC_DEFINE(wxUSE_PROLOGIO)
9a98a854
VZ
4217fi
4218
4219if test "$wxUSE_RESOURCES" = "yes" ; then
256d631a
JS
4220 if test "$wxUSE_NANOX" = "yes"; then
4221 AC_MSG_WARN([Cannot use resource database functions in NanoX])
4222 else
4223 AC_DEFINE(wxUSE_RESOURCES)
4224 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource"
4225 fi
9a98a854
VZ
4226fi
4227
4228if test "$wxUSE_X_RESOURCES" = "yes"; then
ce4169a4 4229 AC_DEFINE(wxUSE_X_RESOURCES)
9a98a854
VZ
4230fi
4231
4232dnl ---------------------------------------------------------------------------
77c85c2b 4233dnl IPC: IPC, Drag'n'Drop, Clipboard, ...
9a98a854
VZ
4234dnl ---------------------------------------------------------------------------
4235
2b9bdf71
VZ
4236dnl check for ole headers and disable a few features requiring it if not
4237dnl present (earlier versions of mingw32 don't have ole2.h)
77e13408
RL
4238if test "$wxUSE_MSW" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
4239 -o "$wxUSE_CLIPBOARD" = "yes" \
4240 -o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
2b9bdf71
VZ
4241 AC_CHECK_HEADERS(ole2.h)
4242
4243 if test "$ac_cv_header_ole2_h" = "yes" ; then
4244 if test "$GCC" = yes ; then
4245 ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
2b9bdf71 4246 CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"
3d63bc3a 4247 LIBS=" -lrpcrt4 -loleaut32 -lole32 -luuid$LIBS"
2b9bdf71
VZ
4248 AC_DEFINE(wxUSE_OLE)
4249
4250 fi
4251
4252 dnl for OLE clipboard and dnd
4253 AC_DEFINE(wxUSE_DATAOBJ)
4254 else
4255 AC_MSG_WARN([Some features disabled because OLE headers not found])
4256
4257 wxUSE_CLIPBOARD=no
4258 wxUSE_DRAG_AND_DROP=no
4259 wxUSE_DATAOBJ=no
4260 fi
4261
2b9bdf71
VZ
4262 if test "$wxUSE_METAFILE" = "yes"; then
4263 AC_DEFINE(wxUSE_METAFILE)
4264
4265 dnl this one should probably be made separately configurable
4266 AC_DEFINE(wxUSE_ENH_METAFILE)
4267 fi
4268fi
4269
9a98a854 4270if test "$wxUSE_IPC" = "yes"; then
eb4efbdc 4271 if test "$wxUSE_SOCKETS" != "yes"; then
156b2523 4272 AC_MSG_WARN(wxWindows IPC classes require sockets... disabled)
eb4efbdc
VZ
4273 fi
4274
ce4169a4 4275 AC_DEFINE(wxUSE_IPC)
9a98a854
VZ
4276fi
4277
4278if test "$wxUSE_CLIPBOARD" = "yes"; then
6c657b52
VS
4279 if test "$wxUSE_MGL" = 1; then
4280 AC_MSG_WARN([Clipboard not yet supported under MGL... disabled])
4281 wxUSE_CLIPBOARD=no
4282 fi
178572bb 4283
6c657b52
VS
4284 if test "$wxUSE_CLIPBOARD" = "yes"; then
4285 AC_DEFINE(wxUSE_CLIPBOARD)
4286
4287 dnl required by clipboard code in configuration check
4288 AC_DEFINE(wxUSE_DATAOBJ)
4289 fi
9a98a854
VZ
4290fi
4291
39c9d5ac 4292if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
ce4169a4
RR
4293 if test "$wxUSE_GTK" = 1; then
4294 if test "$WXGTK12" != 1; then
156b2523 4295 AC_MSG_WARN([Drag and drop is only supported under GTK+ 1.2... disabled])
e90c1d2a 4296 wxUSE_DRAG_AND_DROP=no
ce4169a4 4297 fi
a9b5e89f 4298 fi
a9b5e89f 4299
ce4169a4 4300 if test "$wxUSE_MOTIF" = 1; then
156b2523 4301 AC_MSG_WARN([Drag and drop not yet supported under Motif... disabled])
e90c1d2a 4302 wxUSE_DRAG_AND_DROP=no
ce4169a4 4303 fi
a9b5e89f 4304
7f5c07ab
JS
4305 if test "$wxUSE_X11" = 1; then
4306 AC_MSG_WARN([Drag and drop not yet supported under X11... disabled])
4307 wxUSE_DRAG_AND_DROP=no
4308 fi
4309
6c657b52
VS
4310 if test "$wxUSE_MGL" = 1; then
4311 AC_MSG_WARN([Drag and drop not yet supported under MGL... disabled])
4312 wxUSE_DRAG_AND_DROP=no
4313 fi
4314
ce4169a4
RR
4315 if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
4316 AC_DEFINE(wxUSE_DRAG_AND_DROP)
4317 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd"
4318 fi
4882bf1b 4319
9a98a854
VZ
4320fi
4321
4322if test "$wxUSE_SPLINES" = "yes" ; then
4323 AC_DEFINE(wxUSE_SPLINES)
4324fi
4325
4326dnl ---------------------------------------------------------------------------
4327dnl GUI controls
4328dnl ---------------------------------------------------------------------------
4329
1e6feb95
VZ
4330USES_CONTROLS=0
4331if test "$wxUSE_CONTROLS" = "yes"; then
4332 USES_CONTROLS=1
4333fi
4334
9a98a854
VZ
4335if test "$wxUSE_ACCEL" = "yes"; then
4336 AC_DEFINE(wxUSE_ACCEL)
1e6feb95
VZ
4337 USES_CONTROLS=1
4338fi
4339
4340if test "$wxUSE_BUTTON" = "yes"; then
4341 AC_DEFINE(wxUSE_BUTTON)
4342 USES_CONTROLS=1
4343fi
4344
4345if test "$wxUSE_BMPBUTTON" = "yes"; then
4346 AC_DEFINE(wxUSE_BMPBUTTON)
4347 USES_CONTROLS=1
4348fi
4349
4350if test "$wxUSE_CALCTRL" = "yes"; then
4351 AC_DEFINE(wxUSE_CALENDARCTRL)
4352 USES_CONTROLS=1
4353 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS calendar"
9a98a854
VZ
4354fi
4355
4356if test "$wxUSE_CARET" = "yes"; then
4357 AC_DEFINE(wxUSE_CARET)
1e6feb95 4358 USES_CONTROLS=1
9a98a854
VZ
4359 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret"
4360fi
4361
4362if test "$wxUSE_COMBOBOX" = "yes"; then
4363 AC_DEFINE(wxUSE_COMBOBOX)
1e6feb95 4364 USES_CONTROLS=1
9a98a854
VZ
4365fi
4366
ce4169a4
RR
4367if test "$wxUSE_CHOICE" = "yes"; then
4368 AC_DEFINE(wxUSE_CHOICE)
1e6feb95 4369 USES_CONTROLS=1
9a98a854
VZ
4370fi
4371
4372if test "$wxUSE_CHECKBOX" = "yes"; then
4373 AC_DEFINE(wxUSE_CHECKBOX)
1e6feb95 4374 USES_CONTROLS=1
9a98a854
VZ
4375fi
4376
4377if test "$wxUSE_CHECKLST" = "yes"; then
4378 AC_DEFINE(wxUSE_CHECKLISTBOX)
1e6feb95 4379 USES_CONTROLS=1
9a98a854
VZ
4380 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst"
4381fi
4382
4383if test "$wxUSE_GAUGE" = "yes"; then
4384 AC_DEFINE(wxUSE_GAUGE)
1e6feb95 4385 USES_CONTROLS=1
9a98a854
VZ
4386fi
4387
f85afd4e 4388if test "$wxUSE_NEW_GRID" = "yes"; then
d6a55c4b 4389 wxUSE_GRID="yes"
f85afd4e 4390 AC_DEFINE(wxUSE_NEW_GRID)
1e6feb95 4391 USES_CONTROLS=1
f85afd4e
MB
4392 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS newgrid"
4393fi
4394
d6a55c4b
VZ
4395if test "$wxUSE_GRID" = "yes"; then
4396 AC_DEFINE(wxUSE_GRID)
1e6feb95 4397 USES_CONTROLS=1
d6a55c4b
VZ
4398 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS grid"
4399fi
4400
9a98a854 4401if test "$wxUSE_IMAGLIST" = "yes"; then
ce4169a4 4402 AC_DEFINE(wxUSE_IMAGLIST)
9a98a854
VZ
4403fi
4404
4405if test "$wxUSE_LISTBOX" = "yes"; then
ce4169a4 4406 AC_DEFINE(wxUSE_LISTBOX)
1e6feb95 4407 USES_CONTROLS=1
9a98a854
VZ
4408fi
4409
4410if test "$wxUSE_LISTCTRL" = "yes"; then
ce4169a4
RR
4411 if test "$wxUSE_IMAGLIST" = "yes"; then
4412 AC_DEFINE(wxUSE_LISTCTRL)
1e6feb95 4413 USES_CONTROLS=1
ce4169a4
RR
4414 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listctrl"
4415 else
4416 AC_MSG_WARN([wxListCtrl requires wxImageList and won't be compiled without it])
4417 fi
9a98a854
VZ
4418fi
4419
4420if test "$wxUSE_NOTEBOOK" = "yes"; then
ce4169a4 4421 AC_DEFINE(wxUSE_NOTEBOOK)
1e6feb95 4422 USES_CONTROLS=1
ce4169a4 4423 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
9a98a854
VZ
4424fi
4425
24176f2c
GD
4426if test "$wxUSE_PROPSHEET" = "yes"; then
4427 AC_DEFINE(wxUSE_PROPSHEET)
4428 USES_CONTROLS=1
4429 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS proplist"
4430fi
4431
9a98a854 4432if test "$wxUSE_RADIOBOX" = "yes"; then
ce4169a4 4433 AC_DEFINE(wxUSE_RADIOBOX)
1e6feb95 4434 USES_CONTROLS=1
9a98a854
VZ
4435fi
4436
4437if test "$wxUSE_RADIOBTN" = "yes"; then
ce4169a4 4438 AC_DEFINE(wxUSE_RADIOBTN)
1e6feb95 4439 USES_CONTROLS=1
9a98a854
VZ
4440fi
4441
79b00c62 4442if test "$wxUSE_SASH" = "yes"; then
ce4169a4
RR
4443 AC_DEFINE(wxUSE_SASH)
4444 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sashtest"
9a98a854
VZ
4445fi
4446
4447if test "$wxUSE_SCROLLBAR" = "yes"; then
ce4169a4 4448 AC_DEFINE(wxUSE_SCROLLBAR)
1e6feb95 4449 USES_CONTROLS=1
678b92a9 4450 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS scroll scrollsub"
9a98a854
VZ
4451fi
4452
4453if test "$wxUSE_SLIDER" = "yes"; then
ce4169a4 4454 AC_DEFINE(wxUSE_SLIDER)
1e6feb95 4455 USES_CONTROLS=1
9a98a854
VZ
4456fi
4457
4458if test "$wxUSE_SPINBTN" = "yes"; then
ce4169a4 4459 AC_DEFINE(wxUSE_SPINBTN)
1e6feb95 4460 USES_CONTROLS=1
9a98a854
VZ
4461fi
4462
66f38406
RR
4463if test "$wxUSE_SPINCTRL" = "yes"; then
4464 AC_DEFINE(wxUSE_SPINCTRL)
1e6feb95 4465 USES_CONTROLS=1
66f38406
RR
4466fi
4467
9a98a854 4468if test "$wxUSE_SPLITTER" = "yes"; then
ce4169a4
RR
4469 AC_DEFINE(wxUSE_SPLITTER)
4470 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splitter"
9a98a854
VZ
4471fi
4472
4473if test "$wxUSE_STATBMP" = "yes"; then
ce4169a4 4474 AC_DEFINE(wxUSE_STATBMP)
1e6feb95 4475 USES_CONTROLS=1
9a98a854
VZ
4476fi
4477
4478if test "$wxUSE_STATBOX" = "yes"; then
ce4169a4 4479 AC_DEFINE(wxUSE_STATBOX)
1e6feb95
VZ
4480 USES_CONTROLS=1
4481fi
4482
4483if test "$wxUSE_STATTEXT" = "yes"; then
4484 AC_DEFINE(wxUSE_STATTEXT)
4485 USES_CONTROLS=1
9a98a854
VZ
4486fi
4487
4488if test "$wxUSE_STATLINE" = "yes"; then
f53561f1
RR
4489 if test "$wxUSE_WINE" = 1 ; then
4490 AC_MSG_WARN([wxStaticLine is not supported under WINE])
4491 else
e90c1d2a 4492 AC_DEFINE(wxUSE_STATLINE)
1e6feb95 4493 USES_CONTROLS=1
f53561f1 4494 fi
9a98a854
VZ
4495fi
4496
4497if test "$wxUSE_STATUSBAR" = "yes"; then
ce4169a4 4498 AC_DEFINE(wxUSE_STATUSBAR)
1e6feb95 4499 USES_CONTROLS=1
2286341c
VZ
4500
4501 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar"
9a98a854
VZ
4502fi
4503
4504if test "$wxUSE_TABDIALOG" = "yes"; then
ce4169a4
RR
4505 AC_DEFINE(wxUSE_TAB_DIALOG)
4506 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS tab"
9a98a854
VZ
4507fi
4508
1e6feb95
VZ
4509if test "$wxUSE_TEXTCTRL" = "yes"; then
4510 AC_DEFINE(wxUSE_TEXTCTRL)
4511 USES_CONTROLS=1
4512 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS text"
4513fi
4514
1db8dc4a 4515if test "$wxUSE_TOGGLEBTN" = "yes"; then
156b2523
GD
4516 if test "$wxUSE_MAC" = 1; then
4517 AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled])
4518 wxUSE_TOGGLEBTN=no
4519 fi
4520 if test "$wxUSE_UNIVERSAL" = "yes"; then
3c011993 4521 AC_MSG_WARN([Toggle button not yet supported under wxUniversal... disabled])
a45d7ab7
GD
4522 wxUSE_TOGGLEBTN=no
4523 fi
4524
4525 if test "$wxUSE_TOGGLEBTN" = "yes"; then
4526 AC_DEFINE(wxUSE_TOGGLEBTN)
1e6feb95 4527 USES_CONTROLS=1
a45d7ab7 4528 fi
1db8dc4a
VZ
4529fi
4530
360d6699
VZ
4531if test "$wxUSE_TOOLBAR_SIMPLE" = "yes"; then
4532 AC_DEFINE(wxUSE_TOOLBAR_SIMPLE)
4533 wxUSE_TOOLBAR="yes"
1e6feb95 4534 USES_CONTROLS=1
360d6699
VZ
4535fi
4536
9a98a854 4537if test "$wxUSE_TOOLBAR" = "yes"; then
ce4169a4 4538 AC_DEFINE(wxUSE_TOOLBAR)
1e6feb95 4539 USES_CONTROLS=1
360d6699
VZ
4540
4541 dnl if wxUSE_TOOLBAR and !wxUSE_TOOLBAR_SIMPLE => wxUSE_TOOLBAR_NATIVE
4542 if test "$wxUSE_TOOLBAR_SIMPLE" != "yes"; then
4543 wxUSE_TOOLBAR_NATIVE="yes"
4544 fi
4545
1e6feb95
VZ
4546 if test "$wxUSE_TOOLBAR_NATIVE" = "yes"; then
4547 AC_DEFINE(wxUSE_TOOLBAR_NATIVE)
4548 USES_CONTROLS=1
4549 fi
9a98a854 4550
1e6feb95 4551 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS toolbar"
360d6699
VZ
4552fi
4553
39c9d5ac 4554if test "$wxUSE_TOOLTIPS" = "yes"; then
ced859c3 4555 if test "$wxUSE_MOTIF" = 1; then
156b2523 4556 AC_MSG_WARN([wxTooltip not supported yet under Motif... disabled])
9a98a854 4557 else
ce4169a4 4558 if test "$wxUSE_WINE" = 1; then
156b2523 4559 AC_MSG_WARN([wxTooltip not supported under WINE... disabled])
ce4169a4 4560 else
69d27ff7 4561 if test "$wxUSE_UNIVERSAL" = "yes"; then
3c011993 4562 AC_MSG_WARN([wxTooltip not supported yet in wxUniversal... disabled])
69d27ff7 4563 else
3c011993 4564 AC_DEFINE(wxUSE_TOOLTIPS)
69d27ff7 4565 fi
ce4169a4 4566 fi
9a98a854
VZ
4567 fi
4568fi
4569
4570if test "$wxUSE_TREECTRL" = "yes"; then
ce4169a4
RR
4571 if test "$wxUSE_IMAGLIST" = "yes"; then
4572 AC_DEFINE(wxUSE_TREECTRL)
1e6feb95 4573 USES_CONTROLS=1
ce4169a4
RR
4574 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treectrl"
4575 else
4576 AC_MSG_WARN([wxTreeCtrl requires wxImageList and won't be compiled without it])
4577 fi
9a98a854
VZ
4578fi
4579
9f41d601 4580if test "$wxUSE_POPUPWIN" = "yes"; then
6abe4b65 4581 if test "$wxUSE_MAC" = 1; then
156b2523 4582 AC_MSG_WARN([Popup window not yet supported under Mac OS X... disabled])
6abe4b65 4583 else
485cf710
VZ
4584 if test "$wxUSE_MOTIF" = 1; then
4585 AC_MSG_WARN([wxPopupWindow not yet supported under Motif... disabled])
4586 else
c6712985
SN
4587 if test "$wxUSE_PM" = 1; then
4588 AC_MSG_WARN([wxPopupWindow not yet supported under PM... disabled])
4589 else
4590 AC_DEFINE(wxUSE_POPUPWIN)
0b01706f 4591
c6712985
SN
4592 USES_CONTROLS=1
4593 fi
485cf710 4594 fi
6abe4b65 4595 fi
9f41d601
RR
4596fi
4597
dd964dcc 4598if test "$wxUSE_TIPWINDOW" = "yes"; then
c6712985
SN
4599 if test "$wxUSE_PM" = 1; then
4600 AC_MSG_WARN([wxTipWindow not yet supported under PM... disabled])
4601 else
4602 AC_DEFINE(wxUSE_TIPWINDOW)
4603 fi
dd964dcc
VZ
4604fi
4605
1e6feb95
VZ
4606if test "$USES_CONTROLS" = 1; then
4607 AC_DEFINE(wxUSE_CONTROLS)
4608fi
4609
9a98a854
VZ
4610dnl ---------------------------------------------------------------------------
4611dnl misc options
4612dnl ---------------------------------------------------------------------------
4613
24176f2c
GD
4614if test "$wxUSE_TREELAYOUT" = "yes"; then
4615 AC_DEFINE(wxUSE_TREELAYOUT)
4616 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treelay"
4617fi
9a98a854 4618
24fd6d87
VZ
4619if test "$wxUSE_DRAGIMAGE" = "yes"; then
4620 AC_DEFINE(wxUSE_DRAGIMAGE)
4621 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dragimag"
4622fi
4623
1e6feb95
VZ
4624if test "$wxUSE_MENUS" = "yes"; then
4625 AC_DEFINE(wxUSE_MENUS)
4626 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS menu"
ce4169a4 4627fi
9a98a854 4628
1e6feb95
VZ
4629if test "$wxUSE_METAFILE" = "yes"; then
4630 AC_DEFINE(wxUSE_METAFILE)
c11584af
RR
4631fi
4632
1e6feb95
VZ
4633if test "$wxUSE_MIMETYPE" = "yes"; then
4634 AC_DEFINE(wxUSE_MIMETYPE)
9a98a854
VZ
4635fi
4636
0cbff120
JS
4637if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then
4638 AC_DEFINE(wxUSE_SYSTEM_OPTIONS)
b2261c5b
JS
4639if test "$TOOLKIT" = "MSW"; then
4640 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS taskbar"
4641fi
4642
0cbff120
JS
4643fi
4644
4cdb0ab0 4645if test "$wxUSE_PROTOCOL" = "yes"; then
3954f9ca
VS
4646 if test "$wxUSE_SOCKETS" != "yes"; then
4647 AC_MSG_WARN(Protocol classes require sockets... disabled)
4648 wxUSE_PROTOCOL=no
4649 fi
4650
4651 if test "$wxUSE_PROTOCOL" = "yes"; then
4652 AC_DEFINE(wxUSE_PROTOCOL)
4cdb0ab0 4653
3954f9ca
VS
4654 if test "$wxUSE_PROTOCOL_HTTP" = "yes"; then
4655 AC_DEFINE(wxUSE_PROTOCOL_HTTP)
4656 fi
4657 if test "$wxUSE_PROTOCOL_FTP" = "yes"; then
4658 AC_DEFINE(wxUSE_PROTOCOL_FTP)
4659 fi
4660 if test "$wxUSE_PROTOCOL_FILE" = "yes"; then
4661 AC_DEFINE(wxUSE_PROTOCOL_FILE)
4662 fi
4cdb0ab0 4663 fi
3954f9ca
VS
4664fi
4665
4666if test "$wxUSE_URL" = "yes"; then
4667 if test "$wxUSE_PROTOCOL" != "yes"; then
4668 AC_MSG_WARN(wxURL class requires wxProtocol... disabled)
4669 wxUSE_URL=no
4cdb0ab0 4670 fi
3954f9ca
VS
4671 if test "$wxUSE_URL" = "yes"; then
4672 AC_DEFINE(wxUSE_URL)
4cdb0ab0
VS
4673 fi
4674fi
4675
9a98a854 4676if test "$wxUSE_MINIFRAME" = "yes"; then
ce4169a4
RR
4677 AC_DEFINE(wxUSE_MINIFRAME)
4678 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS minifram"
9a98a854
VZ
4679fi
4680
5526e819
VS
4681if test "$wxUSE_HTML" = "yes"; then
4682 AC_DEFINE(wxUSE_HTML)
4683 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html"
4684fi
4685
9a98a854 4686if test "$wxUSE_VALIDATORS" = "yes"; then
ce4169a4
RR
4687 AC_DEFINE(wxUSE_VALIDATORS)
4688 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate"
9a98a854
VZ
4689fi
4690
d275c7eb
VZ
4691if test "$wxUSE_PALETTE" = "yes" ; then
4692 AC_DEFINE(wxUSE_PALETTE)
4693fi
4694
0046ff7c
VS
4695if test "$wxUSE_IMAGE" = "yes" ; then
4696 AC_DEFINE(wxUSE_IMAGE)
4697fi
4698
0940bcf7
HH
4699if test "$wxUSE_GIF" = "yes" ; then
4700 AC_DEFINE(wxUSE_GIF)
4701fi
4702
4703if test "$wxUSE_PCX" = "yes" ; then
4704 AC_DEFINE(wxUSE_PCX)
4705fi
4706
4b6b4dfc
RR
4707if test "$wxUSE_IFF" = "yes" ; then
4708 AC_DEFINE(wxUSE_IFF)
4709fi
4710
0940bcf7
HH
4711if test "$wxUSE_PNM" = "yes" ; then
4712 AC_DEFINE(wxUSE_PNM)
4713fi
4714
0046ff7c
VS
4715if test "$wxUSE_XPM" = "yes" ; then
4716 AC_DEFINE(wxUSE_XPM)
4717fi
4718
658974ae
VS
4719if test "$wxUSE_ICO_CUR" = "yes" ; then
4720 AC_DEFINE(wxUSE_ICO_CUR)
4721fi
4722
a72a4bfa
VS
4723if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_MSLU" = "yes" ; then
4724 dnl Must be done this late because -lunicows must be before all the other libs
4725 LIBS=" -lunicows $LIBS"
4726fi
4727
1e6feb95
VZ
4728dnl ---------------------------------------------------------------------------
4729dnl common dialog
4730dnl ---------------------------------------------------------------------------
4731
4732if test "$wxUSE_CHOICEDLG" = "yes"; then
4733 AC_DEFINE(wxUSE_CHOICEDLG)
4734fi
4735
4736if test "$wxUSE_COLOURDLG" = "yes"; then
4737 AC_DEFINE(wxUSE_COLOURDLG)
4738fi
4739
4740if test "$wxUSE_FILEDLG" = "yes"; then
4741 AC_DEFINE(wxUSE_FILEDLG)
4742fi
4743
8db37e06
VZ
4744if test "$wxUSE_FINDREPLDLG" = "yes"; then
4745 AC_DEFINE(wxUSE_FINDREPLDLG)
4746fi
4747
1e6feb95
VZ
4748if test "$wxUSE_FONTDLG" = "yes"; then
4749 AC_DEFINE(wxUSE_FONTDLG)
4750fi
4751
4752if test "$wxUSE_DIRDLG" = "yes"; then
ae1daed0
JS
4753 if test "$wxUSE_TREECTRL" != "yes"; then
4754 AC_MSG_WARN(wxDirDialog requires wxTreeCtrl so it won't be compiled without it)
1e6feb95 4755 else
ae1daed0 4756 AC_DEFINE(wxUSE_DIRDLG)
1e6feb95
VZ
4757 fi
4758fi
4759
4760if test "$wxUSE_MSGDLG" = "yes"; then
4761 AC_DEFINE(wxUSE_MSGDLG)
4762fi
4763
4764if test "$wxUSE_NUMBERDLG" = "yes"; then
4765 AC_DEFINE(wxUSE_NUMBERDLG)
4766fi
4767
4768if test "$wxUSE_PROGRESSDLG" = "yes"; then
4769 if test "$wxUSE_CONSTRAINTS" != "yes"; then
4770 AC_MSG_WARN(wxProgressDialog requires constraints so it won't be compiled without them)
4771 else
4772 AC_DEFINE(wxUSE_PROGRESSDLG)
4773 fi
4774fi
4775
cbca9943
VZ
4776if test "$wxUSE_SPLASH" = "yes"; then
4777 AC_DEFINE(wxUSE_SPLASH)
4778fi
4779
1e6feb95
VZ
4780if test "$wxUSE_STARTUP_TIPS" = "yes"; then
4781 if test "$wxUSE_CONSTRAINTS" != "yes"; then
4782 AC_MSG_WARN(Startup tips requires constraints and won't be compiled without them)
4783 else
4784 AC_DEFINE(wxUSE_STARTUP_TIPS)
4785 fi
4786fi
4787
4788if test "$wxUSE_TEXTDLG" = "yes"; then
4789 AC_DEFINE(wxUSE_TEXTDLG)
4790fi
4791
b1f5d087
VZ
4792if test "$wxUSE_WIZARDDLG" = "yes"; then
4793 AC_DEFINE(wxUSE_WIZARDDLG)
4794 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wizard"
4795fi
4796
bdc72a22
VZ
4797dnl ---------------------------------------------------------------------------
4798dnl get the string with OS info - used by wxGetOsDescription()
4799dnl ---------------------------------------------------------------------------
4800
32832908
VZ
4801if test "$cross_compiling" = "yes"; then
4802 dnl Use best guess from host as we can't use uname when cross compiling
4803 OSINFO="\"$host\""
4804else
4805 dnl attualy work out OS version
4806 OSINFO=`uname -s -r -m`
4807 OSINFO="\"$OSINFO\""
4808fi
4809
bdc72a22
VZ
4810AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO)
4811
7e67ed0d
VZ
4812dnl ---------------------------------------------------------------------------
4813dnl define the variable containing the installation prefix (used in dcpsg.cpp)
4814dnl ---------------------------------------------------------------------------
4815
06dda230
VZ
4816if test "x$prefix" != "xNONE"; then
4817 wxPREFIX=$prefix
4818else
4819 wxPREFIX=$ac_default_prefix
4820fi
4821
4822AC_DEFINE_UNQUOTED(wxINSTALL_PREFIX, "$wxPREFIX")
7e67ed0d 4823
9a98a854
VZ
4824dnl ---------------------------------------------------------------------------
4825dnl Output the makefiles and such from the results found above
4826dnl ---------------------------------------------------------------------------
4827
9a98a854 4828dnl all additional libraries (except wxWindows itself) we link with
3d63bc3a 4829
b4085ce6
GD
4830dnl note that we always link with -lm except for Mac OS X
4831dnl extended.c uses floor() and is always linked in
3a922bb4 4832
f11bdd03 4833if test "$wxUSE_MAC" = 1 ; then
3d63bc3a 4834 LDFLAGS="$LDFLAGS -framework Carbon -framework System"
b4085ce6 4835fi
3a922bb4 4836
3d63bc3a
RL
4837dnl FIXME: should this be covered by the conditional above
4838dnl given the -lm comment there? Or should that comment (and
4839dnl this one) be removed.. [ 7 Nov 2001 ]
4840
009fead0 4841LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK -lm $LIBS"
3d63bc3a 4842
e90c1d2a 4843if test "$wxUSE_GUI" = "yes"; then
3d63bc3a 4844
cb61c62d 4845 LIBS="$GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $LIBS"
3a922bb4
RL
4846
4847 dnl TODO add checks that these samples will really compile (i.e. all the
4848 dnl library features they need are present)
4849
4850 dnl TODO some samples are never built so far:
4851 dnl ipc, mfc, nativdlg, oleauto, ownerdrw
867a54b6 4852 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs \
3a922bb4
RL
4853 drawing dynamic erase event exec font image \
4854 minimal richedit rotate widgets"
4855
3a922bb4
RL
4856 dnl this is needed to be able to find AFM files
4857 CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)"
4858else
4859 SAMPLES_SUBDIRS="console"
e90c1d2a 4860fi
9a98a854 4861
8e877c19 4862
9a98a854 4863dnl all -I options we must pass to the compiler
44a5856d
VZ
4864dnl
4865dnl note that the order is somewhat important, in particular the ZLIB_INCLUDE
4866dnl and other stuff for the built in libraries should come first to avoid
4867dnl including the system headers with the same name (it is particularly
4868dnl important for zlib because XFree 4.2.0 has its own, horribly old and
4869dnl incompatible, zlib.h) and the wxWindows headers should come first anyhow
4870INCLUDES="-I\${top_builddir}/lib/wx/include/${TOOLCHAIN_NAME} \
4871-I\${top_srcdir}/include \
4872$REGEX_INCLUDE $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE \
4873$TOOLKIT_INCLUDE"
9a98a854 4874
f6bcfd97 4875dnl wxGTK does not need TOOLKIT includes in wx-config
63e7762e 4876if test "$wxUSE_GTK" = 1; then
3d63bc3a 4877 WXCONFIG_INCLUDE=
f6bcfd97
BP
4878else
4879 WXCONFIG_INCLUDE="$TOOLKIT_INCLUDE"
4880fi
4881
9a98a854 4882dnl C/C++ compiler options used to compile wxWindows
bea74fbb 4883if test "$GXX" = yes ; then
ce4169a4
RR
4884 dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror"
4885 CXXWARNINGS="-Wall"
d6a55c4b 4886 dnl should enable this one day...
ce4169a4 4887 dnl CXXWARNINGS="-Wall -Werror"
88e30f2b
RL
4888
4889 dnl Add this *after* all compile tests, we don't need or want generated
4890 dnl depfiles until actually building the lib
4891 if test "$wxUSE_NO_DEPS" = "no" ; then
4892 CFLAGS="-MMD $CFLAGS"
4893 CXXFLAGS="-MMD $CXXFLAGS"
4894 fi
9a98a854 4895fi
88e30f2b 4896
1725144d 4897EXTRA_CFLAGS="$WXDEBUG $WXODBCFLAG $PROFILE $OPTIMISE $INCLUDES"
9a98a854 4898
fe5a9cab 4899dnl remove the extra white space from the cc/c++/ld options
f6bcfd97 4900CFLAGS=`echo $CFLAGS $EXTRA_CFLAGS $CXXWARNINGS | sed 's/ \\+/ /g'`
ee31c269 4901CXXFLAGS=`echo $CXXFLAGS $EXTRA_CFLAGS $CXXWARNINGS | sed 's/ \+/ /g'`
fe5a9cab 4902LIBS=`echo $LIBS | sed 's/ \+/ /g'`
9a98a854 4903
fe5a9cab 4904LDFLAGS="$LDFLAGS $PROFILE"
e694c22c 4905
70d1b3cf
VZ
4906dnl for convenience, sort the samples in alphabetical order
4907dnl
4908dnl FIXME For some mysterious reasons, sometimes the directories are duplicated
4909dnl in this list - hence uniq. But normally, this shouldn't be needed!
d6a55c4b
VZ
4910dnl
4911dnl Unfortunately, there is a bug in OS/2's tr, such that
d51e8205
SN
4912dnl tr ' ' '\n' introduces DOS-like line breaks, whereas tr '\n' ' '
4913dnl only removes the Unix-like part of the introduced line break.
4914SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq | tr '\n' ' '| tr -d '\r'`"
4915
4916dnl makefile variables
4917AC_SUBST(LEX_STEM)
4918AC_SUBST(PATH_IFS)
70d1b3cf 4919
9a98a854
VZ
4920dnl global options
4921AC_SUBST(WX_MAJOR_VERSION_NUMBER)
4922AC_SUBST(WX_MINOR_VERSION_NUMBER)
4923AC_SUBST(WX_RELEASE_NUMBER)
48b1d0ff
RR
4924AC_SUBST(WX_LIBRARY_NAME_STATIC)
4925AC_SUBST(WX_LIBRARY_NAME_SHARED)
77e13408 4926AC_SUBST(WX_LIBRARY_IMPORTLIB)
48b1d0ff
RR
4927AC_SUBST(WX_TARGET_LIBRARY)
4928AC_SUBST(WX_LIBRARY_LINK1)
4929AC_SUBST(WX_LIBRARY_LINK2)
80d895cd 4930AC_SUBST(PROGRAM_EXT)
48b1d0ff 4931
bdad4e7e 4932dnl global gl options
bdad4e7e
RR
4933AC_SUBST(WX_LIBRARY_NAME_STATIC_GL)
4934AC_SUBST(WX_LIBRARY_NAME_SHARED_GL)
bdad4e7e
RR
4935AC_SUBST(WX_TARGET_LIBRARY_GL)
4936AC_SUBST(WX_LIBRARY_LINK1_GL)
4937AC_SUBST(WX_LIBRARY_LINK2_GL)
bdad4e7e 4938
48b1d0ff 4939dnl are we supposed to create the links?
de87c353
RR
4940AC_SUBST(WX_ALL)
4941AC_SUBST(WX_ALL_INSTALLED)
9a98a854 4942
48b1d0ff
RR
4943AC_SUBST(SHARED_LD)
4944AC_SUBST(PIC_FLAG)
caa2c79b 4945AC_SUBST(CODE_GEN_FLAGS)
0f3f1cbc 4946AC_SUBST(CODE_GEN_FLAGS_CXX)
3a922bb4
RL
4947
4948AC_SUBST(SONAME_FLAGS)
4949AC_SUBST(SONAME_FLAGS_GL)
f6bcfd97 4950AC_SUBST(WX_TARGET_LIBRARY_SONAME)
3711412e 4951AC_SUBST(WX_TARGET_LIBRARY_TYPE)
48b1d0ff 4952
9a98a854
VZ
4953dnl debugging options
4954AC_SUBST(WXDEBUG_DEFINE)
4955
4956dnl toolkit options
dad6c0ea
VZ
4957AC_SUBST(USE_GUI)
4958AC_SUBST(AFMINSTALL)
9a98a854 4959AC_SUBST(TOOLKIT)
9a98a854 4960AC_SUBST(TOOLKIT_DIR)
1e6feb95 4961AC_SUBST(TOOLKIT_VPATH)
3a922bb4
RL
4962AC_SUBST(TOOLCHAIN_NAME)
4963AC_SUBST(TOOLCHAIN_DEFS)
00c81359 4964AC_SUBST(TOOLCHAIN_DLL_DEFS)
3a922bb4
RL
4965
4966dnl wx-config options
77e13408 4967AC_SUBST(host_alias)
3a922bb4
RL
4968AC_SUBST(cross_compiling)
4969AC_SUBST(WXCONFIG_LIBS)
4970AC_SUBST(WXCONFIG_LIBS_GL)
885d4bf5
VS
4971AC_SUBST(WXCONFIG_LIBS_STATIC)
4972AC_SUBST(WXCONFIG_LIBS_STATIC_GL)
f6bcfd97 4973AC_SUBST(WXCONFIG_INCLUDE)
9a98a854 4974
9b695262 4975dnl the list of files to compile/install
e90c1d2a 4976AC_SUBST(ALL_OBJECTS)
9b695262
VZ
4977AC_SUBST(ALL_HEADERS)
4978AC_SUBST(ALL_SOURCES)
2224580a
VZ
4979
4980dnl distribution vars
a4aad961 4981AC_SUBST(GUIDIST)
2224580a
VZ
4982AC_SUBST(PORT_FILES)
4983AC_SUBST(DISTDIR)
073478b3 4984
9a98a854 4985dnl additional subdirectories where we will build
9a98a854 4986AC_SUBST(SAMPLES_SUBDIRS)
9a98a854 4987
e694c22c
VZ
4988dnl additional libraries and linker settings
4989AC_SUBST(LDFLAGS)
62d0491b 4990AC_SUBST(LDFLAGS_GL)
40f7145c 4991AC_SUBST(LDFLAGS_EXE)
f6bcfd97 4992AC_SUBST(OPENGL_LIBS)
3d63bc3a 4993AC_SUBST(DMALLOC_LIBS)
b12915c1 4994AC_SUBST(EXTRADEFS)
9a98a854 4995
32832908 4996dnl additional resurces settings
32832908
VZ
4997AC_SUBST(RESCOMP)
4998AC_SUBST(RESFLAGS)
3a922bb4 4999AC_SUBST(RESPROGRAMOBJ)
e95edd8d
GD
5000AC_SUBST(WX_RESOURCES_MACOSX_ASCII)
5001AC_SUBST(WX_RESOURCES_MACOSX_DATA)
3a922bb4 5002
2f51a9ec 5003dnl additional for Mac OS X
2f51a9ec 5004AC_SUBST(DEREZ)
ef7f2189 5005AC_SUBST(MACOSX_BUNDLE)
2f51a9ec
GD
5006AC_SUBST(LIBWXMACRES)
5007AC_SUBST(LIBWXMACRESCOMP)
2baaf735 5008AC_SUBST(LIBWXMACRESWXCONFIG)
32832908 5009
3a922bb4 5010dnl These seem to be missing
32832908
VZ
5011AC_SUBST(DLLTOOL)
5012AC_SUBST(AS)
5013AC_SUBST(NM)
5014AC_SUBST(LD)
5015AC_SUBST(MAKEINFO)
885d4bf5
VS
5016AC_SUBST(INSTALL_LIBRARY)
5017
9a98a854 5018dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE
156b2523 5019dnl itself (this macro is required if SUBDIRS variable is used in Makefile.am
9a98a854
VZ
5020dnl - and we do use it)
5021AC_PROG_MAKE_SET
5022
00cf1208 5023dnl move setup.h back if available
3a922bb4
RL
5024if test -f lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h; then
5025 mv -f lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h setup.h
00cf1208 5026fi
014e19de 5027
2aa88730
RR
5028AC_CONFIG_HEADER(setup.h:setup.h.in)
5029
57973b9c
VZ
5030dnl we need to pass SAMPLES_SUBDIRS (and some other) to the configure in
5031dnl samples and the only way to do it is to use the environment (another
5032dnl idea could have been to use the cache but this wouldn't work when
5033dnl configure doesn't use cache at all which is the default with autoconf 2.50)
5034wx_cv_path_samplesubdirs=$SAMPLES_SUBDIRS
5035wx_cv_if_gnu_make=$IF_GNU_MAKE
5036wx_cv_path_ifs=$PATH_IFS
5037wx_cv_program_ext=$PROGRAM_EXT
5038wx_cv_target_library=$WX_TARGET_LIBRARY
5039wx_cv_target_library_gl=$WX_TARGET_LIBRARY_GL
5040wx_cv_target_libtype=$WX_TARGET_LIBRARY_TYPE
5041export wx_cv_path_samplesubdirs wx_cv_if_gnu_make \
5042 wx_cv_path_ifs wx_cv_program_ext \
5043 wx_cv_target_library wx_cv_target_library_gl wx_cv_target_libtype
5044
5045AC_CONFIG_SUBDIRS(demos samples utils contrib)
2aa88730 5046
9a98a854
VZ
5047dnl create each of the files in the space separated list from the file.in
5048dnl (the original file name may be overriden by appending another name after a
5049dnl colon)
5050AC_OUTPUT([
ff684c98 5051 wx-config
e90c1d2a
VZ
5052 src/make.env
5053 src/makeprog.env
5054 src/makelib.env
bcd2b961 5055 Makefile
9a98a854 5056 ],
a2cddd63 5057 [
3a922bb4
RL
5058 dnl This test is required to make the following idempotent.
5059 dnl Otherwise running config.status or rerunning configure
5060 dnl would stomp the wx-config link or try to move it onto
5061 dnl itself.
652d930d
GD
5062 dnl Use -h instead of -L to test for link (GD)
5063 dnl -h is documented as obsolete under Mac OS X but works
5064 dnl -L is obsolete under Solaris8
5065 if test ! -h wx-config; then
991a5759 5066 chmod +x wx-config
3a922bb4
RL
5067 mv wx-config wx${TOOLCHAIN_NAME}-config
5068 ${LN_S} wx${TOOLCHAIN_NAME}-config wx-config
991a5759 5069 fi
014e19de 5070
00cf1208
RR
5071 if test ! -d lib; then
5072 mkdir lib
5073 fi
5074 if test ! -d lib/wx; then
5075 mkdir lib/wx
5076 fi
5077 if test ! -d lib/wx/include; then
5078 mkdir lib/wx/include
5079 fi
3a922bb4
RL
5080 if test ! -d lib/wx/include/${TOOLCHAIN_NAME}; then
5081 mkdir lib/wx/include/${TOOLCHAIN_NAME}
e90c1d2a 5082 fi
3a922bb4
RL
5083 if test ! -d lib/wx/include/${TOOLCHAIN_NAME}/wx; then
5084 mkdir lib/wx/include/${TOOLCHAIN_NAME}/wx
e90c1d2a 5085 fi
afc31813 5086 if test -f setup.h; then
3a922bb4 5087 mv -f setup.h lib/wx/include/${TOOLCHAIN_NAME}/wx/setup.h
afc31813 5088 fi
a2cddd63
VZ
5089 ],
5090 [
3a922bb4 5091 TOOLCHAIN_NAME="${TOOLCHAIN_NAME}"
07eb77a6 5092 LN_S="${LN_S}"
a2cddd63
VZ
5093 ]
5094 )
9a98a854 5095
3a922bb4 5096dnl vi: set et sts=4 sw=4: