]>
Commit | Line | Data |
---|---|---|
9a98a854 VZ |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_REVISION($Id$)dnl | |
3 | ||
44309ea1 | 4 | AC_PREREQ(2.58) |
e6cc62c6 | 5 | |
9a98a854 VZ |
6 | dnl --------------------------------------------------------------------------- |
7 | dnl | |
77ffb593 | 8 | dnl Top-level configure.in for wxWidgets by Robert Roebling, Phil Blecker, |
3a922bb4 | 9 | dnl Vadim Zeitlin and Ron Lee |
9a98a854 | 10 | dnl |
77ffb593 | 11 | dnl This script is under the wxWidgets licence. |
9a98a854 VZ |
12 | dnl |
13 | dnl Version: $Id$ | |
bcd2b961 | 14 | dnl --------------------------------------------------------------------------- |
9a98a854 VZ |
15 | |
16 | dnl --------------------------------------------------------------------------- | |
17 | dnl initialization | |
18 | dnl --------------------------------------------------------------------------- | |
19 | ||
25bb1412 | 20 | AC_INIT([wxWidgets], [2.8.0], [wx-dev@lists.wxwidgets.org]) |
e6cc62c6 VS |
21 | |
22 | dnl the file passed to AC_CONFIG_SRCDIR should be specific to our package | |
23 | AC_CONFIG_SRCDIR([wx-config.in]) | |
9a98a854 | 24 | |
e59890c3 | 25 | dnl sets build, host, target variables and the same with _alias |
e6cc62c6 VS |
26 | AC_CANONICAL_BUILD |
27 | AC_CANONICAL_HOST | |
28 | AC_CANONICAL_TARGET | |
29 | ||
7c66a493 VZ |
30 | |
31 | dnl When making releases do: | |
32 | dnl | |
ceec2216 | 33 | dnl wx_release_number += 1 |
9a98a854 | 34 | |
ceec2216 | 35 | wx_major_version_number=2 |
25bb1412 RD |
36 | wx_minor_version_number=8 |
37 | wx_release_number=0 | |
2add9e3c | 38 | wx_subrelease_number=0 |
9a98a854 | 39 | |
ceec2216 RL |
40 | WX_RELEASE=$wx_major_version_number.$wx_minor_version_number |
41 | WX_VERSION=$WX_RELEASE.$wx_release_number | |
42 | WX_SUBVERSION=$WX_VERSION.$wx_subrelease_number | |
6426998c | 43 | |
ceec2216 | 44 | WX_MSW_VERSION=$wx_major_version_number$wx_minor_version_number$wx_release_number |
978f1259 | 45 | |
6426998c | 46 | |
6589dc98 VS |
47 | dnl Autoconf-2.60 changed the meaning of top_builddir variable, so we have |
48 | dnl to use our own replacement that will work with both 2.5x and 2.60+: | |
49 | wx_top_builddir="`pwd`" | |
50 | AC_SUBST(wx_top_builddir) | |
51 | ||
9a98a854 VZ |
52 | |
53 | dnl ------------------------------------------------------------------------ | |
54 | dnl Check platform (host system) | |
55 | dnl ------------------------------------------------------------------------ | |
56 | ||
4a8900f2 | 57 | dnl OS (assume Unix) |
9a98a854 | 58 | USE_UNIX=1 |
5cc55caf | 59 | USE_OS2=0 |
4882bf1b | 60 | USE_WIN32=0 |
f9bc1684 | 61 | USE_DOS=0 |
b12915c1 | 62 | USE_BEOS=0 |
1216f52d | 63 | USE_MAC=0 |
b12915c1 | 64 | |
4a8900f2 | 65 | dnl Unix kind |
9a98a854 | 66 | USE_AIX= |
32b38f99 VZ |
67 | USE_BSD= dnl any BSD |
68 | USE_DARWIN= dnl a.k.a. Mac OS X | |
9a98a854 | 69 | USE_FREEBSD= |
32b38f99 | 70 | USE_GNU= dnl GNU/Hurd |
4a8900f2 VZ |
71 | USE_HPUX= |
72 | USE_LINUX= | |
f6bcfd97 | 73 | USE_NETBSD= |
4a8900f2 | 74 | USE_OPENBSD= |
32b38f99 | 75 | USE_OSF= dnl OSF/1 (obsolete?) |
4a8900f2 | 76 | USE_SGI= |
32b38f99 VZ |
77 | USE_SOLARIS= dnl Solaris ("SunOS" >= 5) |
78 | USE_SUN= dnl SunOS or Solaris | |
79 | USE_SUNOS= dnl old/real SunOS (obsolete) | |
80 | USE_SVR4= dnl SysV R4 | |
81 | USE_SYSV= dnl any System V | |
9a98a854 VZ |
82 | USE_VMS= |
83 | USE_ULTRIX= | |
4a8900f2 VZ |
84 | USE_UNIXWARE= |
85 | ||
86 | dnl hardware platform | |
87 | USE_ALPHA= | |
9a98a854 | 88 | |
ab9b9eab VZ |
89 | dnl on some platforms xxx_r() functions are declared inside "#ifdef |
90 | dnl _REENTRANT" and it's easier to just define this symbol for these platforms | |
91 | dnl than checking it during run-time | |
92 | NEEDS_D_REENTRANT_FOR_R_FUNCS=0 | |
93 | ||
ced859c3 | 94 | dnl the list of all available toolkits |
1e6feb95 VZ |
95 | dnl |
96 | dnl update NUM_TOOLKITS calculation below when adding a new toolkit here! | |
b3c86150 | 97 | ALL_TOOLKITS="COCOA GTK MAC MGL MICROWIN MOTIF MSW PM X11 DFB" |
ced859c3 | 98 | |
9a98a854 VZ |
99 | dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones |
100 | dnl which are either yes or no | |
ac0c4cc3 | 101 | DEFAULT_wxUSE_COCOA=0 |
9a98a854 | 102 | DEFAULT_wxUSE_GTK=0 |
1e6feb95 VZ |
103 | DEFAULT_wxUSE_MAC=0 |
104 | DEFAULT_wxUSE_MGL=0 | |
1725144d | 105 | DEFAULT_wxUSE_MICROWIN=0 |
9a98a854 VZ |
106 | DEFAULT_wxUSE_MOTIF=0 |
107 | DEFAULT_wxUSE_MSW=0 | |
e07802fc | 108 | DEFAULT_wxUSE_PM=0 |
7f5c07ab | 109 | DEFAULT_wxUSE_X11=0 |
b3c86150 | 110 | DEFAULT_wxUSE_DFB=0 |
9a98a854 | 111 | |
143121c5 VZ |
112 | dnl these are the values which are really default for the given platform - |
113 | dnl they're not cached and are only used if no --with-toolkit was given *and* | |
114 | dnl nothing was found in the cache | |
ac0c4cc3 | 115 | DEFAULT_DEFAULT_wxUSE_COCOA=0 |
143121c5 | 116 | DEFAULT_DEFAULT_wxUSE_GTK=0 |
1e6feb95 VZ |
117 | DEFAULT_DEFAULT_wxUSE_MAC=0 |
118 | DEFAULT_DEFAULT_wxUSE_MGL=0 | |
1725144d | 119 | DEFAULT_DEFAULT_wxUSE_MICROWIN=0 |
143121c5 VZ |
120 | DEFAULT_DEFAULT_wxUSE_MOTIF=0 |
121 | DEFAULT_DEFAULT_wxUSE_MSW=0 | |
e07802fc | 122 | DEFAULT_DEFAULT_wxUSE_PM=0 |
7f5c07ab | 123 | DEFAULT_DEFAULT_wxUSE_X11=0 |
b3c86150 | 124 | DEFAULT_DEFAULT_wxUSE_DFB=0 |
143121c5 | 125 | |
d6a55c4b | 126 | PROGRAM_EXT= |
3a922bb4 | 127 | SO_SUFFIX=so |
fe0895cf | 128 | SAMPLES_RPATH_FLAG= |
ef0add05 | 129 | SAMPLES_RPATH_POSTLINK= |
d6a55c4b | 130 | |
a03b8b04 RD |
131 | DEFAULT_STD_FLAG=yes |
132 | ||
b12915c1 VZ |
133 | dnl to support a new system, you need to add its canonical name (as determined |
134 | dnl by config.sub or specified by the configure command line) to this "case" | |
135 | dnl and also define the shared library flags below - search for | |
136 | dnl SHARED_LIB_SETUP to find the exact place | |
9a98a854 VZ |
137 | case "${host}" in |
138 | *-hp-hpux* ) | |
139 | USE_HPUX=1 | |
143121c5 | 140 | DEFAULT_DEFAULT_wxUSE_MOTIF=1 |
ab9b9eab | 141 | NEEDS_D_REENTRANT_FOR_R_FUNCS=1 |
3a922bb4 | 142 | SO_SUFFIX=sl |
9a98a854 | 143 | AC_DEFINE(__HPUX__) |
65baafba VZ |
144 | |
145 | dnl many standard declarations in HP-UX headers are only included if either | |
146 | dnl _HPUX_SOURCE is defined, see stdsyms(5) | |
c92ad099 | 147 | CPPFLAGS="-D_HPUX_SOURCE $CPPFLAGS" |
9a98a854 VZ |
148 | ;; |
149 | *-*-linux* ) | |
150 | USE_LINUX=1 | |
151 | AC_DEFINE(__LINUX__) | |
152 | TMP=`uname -m` | |
153 | if test "x$TMP" = "xalpha"; then | |
154 | USE_ALPHA=1 | |
155 | AC_DEFINE(__ALPHA__) | |
156 | fi | |
143121c5 | 157 | DEFAULT_DEFAULT_wxUSE_GTK=1 |
9a98a854 | 158 | ;; |
e1293dcf | 159 | *-*-gnu* | *-*-k*bsd*-gnu ) |
32b38f99 | 160 | USE_GNU=1 |
32b38f99 VZ |
161 | TMP=`uname -m` |
162 | if test "x$TMP" = "xalpha"; then | |
163 | USE_ALPHA=1 | |
164 | AC_DEFINE(__ALPHA__) | |
165 | fi | |
166 | DEFAULT_DEFAULT_wxUSE_GTK=1 | |
167 | ;; | |
9a98a854 VZ |
168 | *-*-irix5* | *-*-irix6* ) |
169 | USE_SGI=1 | |
170 | USE_SVR4=1 | |
171 | AC_DEFINE(__SGI__) | |
172 | AC_DEFINE(__SVR4__) | |
143121c5 | 173 | DEFAULT_DEFAULT_wxUSE_MOTIF=1 |
9a98a854 VZ |
174 | ;; |
175 | *-*-solaris2* ) | |
176 | USE_SUN=1 | |
177 | USE_SOLARIS=1 | |
178 | USE_SVR4=1 | |
179 | AC_DEFINE(__SUN__) | |
180 | AC_DEFINE(__SOLARIS__) | |
181 | AC_DEFINE(__SVR4__) | |
143121c5 | 182 | DEFAULT_DEFAULT_wxUSE_MOTIF=1 |
ab9b9eab | 183 | NEEDS_D_REENTRANT_FOR_R_FUNCS=1 |
9a98a854 VZ |
184 | ;; |
185 | *-*-sunos4* ) | |
186 | USE_SUN=1 | |
187 | USE_SUNOS=1 | |
188 | USE_BSD=1 | |
189 | AC_DEFINE(__SUN__) | |
190 | AC_DEFINE(__SUNOS__) | |
191 | AC_DEFINE(__BSD__) | |
143121c5 | 192 | DEFAULT_DEFAULT_wxUSE_MOTIF=1 |
9a98a854 | 193 | ;; |
f6bcfd97 | 194 | *-*-freebsd*) |
9a98a854 VZ |
195 | USE_BSD=1 |
196 | USE_FREEBSD=1 | |
197 | AC_DEFINE(__FREEBSD__) | |
198 | AC_DEFINE(__BSD__) | |
143121c5 | 199 | DEFAULT_DEFAULT_wxUSE_GTK=1 |
9a98a854 | 200 | ;; |
58247773 | 201 | *-*-openbsd*|*-*-mirbsd*) |
1cf8c0a9 VZ |
202 | USE_BSD=1 |
203 | USE_OPENBSD=1 | |
1cf8c0a9 | 204 | AC_DEFINE(__OPENBSD__) |
2b5f62a0 | 205 | AC_DEFINE(__BSD__) |
1cf8c0a9 VZ |
206 | DEFAULT_DEFAULT_wxUSE_GTK=1 |
207 | ;; | |
f6bcfd97 BP |
208 | *-*-netbsd*) |
209 | USE_BSD=1 | |
210 | USE_NETBSD=1 | |
f6bcfd97 | 211 | AC_DEFINE(__NETBSD__) |
2b5f62a0 | 212 | AC_DEFINE(__BSD__) |
f6bcfd97 | 213 | DEFAULT_DEFAULT_wxUSE_GTK=1 |
728258f4 | 214 | NEEDS_D_REENTRANT_FOR_R_FUNCS=1 |
def7c04a SN |
215 | |
216 | dnl some standard declarations in NetBSD headers are only included if | |
217 | dnl _NETBSD_SOURCE and _LIBC are defined, e.g. getservbyname_r in netdb.h | |
218 | CPPFLAGS="-D_NETBSD_SOURCE -D_LIBC $CPPFLAGS" | |
f6bcfd97 | 219 | ;; |
9a98a854 VZ |
220 | *-*-osf* ) |
221 | USE_ALPHA=1 | |
222 | USE_OSF=1 | |
223 | AC_DEFINE(__ALPHA__) | |
224 | AC_DEFINE(__OSF__) | |
143121c5 | 225 | DEFAULT_DEFAULT_wxUSE_MOTIF=1 |
f6bcfd97 | 226 | NEEDS_D_REENTRANT_FOR_R_FUNCS=1 |
9a98a854 VZ |
227 | ;; |
228 | *-*-dgux5* ) | |
229 | USE_ALPHA=1 | |
230 | USE_SVR4=1 | |
231 | AC_DEFINE(__ALPHA__) | |
232 | AC_DEFINE(__SVR4__) | |
143121c5 | 233 | DEFAULT_DEFAULT_wxUSE_MOTIF=1 |
9a98a854 VZ |
234 | ;; |
235 | *-*-sysv5* ) | |
236 | USE_SYSV=1 | |
237 | USE_SVR4=1 | |
238 | AC_DEFINE(__SYSV__) | |
239 | AC_DEFINE(__SVR4__) | |
143121c5 | 240 | DEFAULT_DEFAULT_wxUSE_MOTIF=1 |
9a98a854 VZ |
241 | ;; |
242 | *-*-aix* ) | |
243 | USE_AIX=1 | |
244 | USE_SYSV=1 | |
245 | USE_SVR4=1 | |
2b5f62a0 VZ |
246 | dnl quoting from http://www-1.ibm.com/servers/esdd/articles/gnu.html: |
247 | dnl | |
248 | dnl Both archive libraries and shared libraries on AIX have an .a | |
249 | dnl extension. This will explain why you can't link with an .so and | |
1542ea39 | 250 | dnl why it works with the name changed to .a. |
321d2b14 | 251 | SO_SUFFIX=a |
9a98a854 VZ |
252 | AC_DEFINE(__AIX__) |
253 | AC_DEFINE(__SYSV__) | |
254 | AC_DEFINE(__SVR4__) | |
143121c5 | 255 | DEFAULT_DEFAULT_wxUSE_MOTIF=1 |
9a98a854 | 256 | ;; |
a9b5e89f | 257 | |
4a8900f2 VZ |
258 | *-*-*UnixWare*) |
259 | USE_SYSV=1 | |
260 | USE_SVR4=1 | |
261 | USE_UNIXWARE=1 | |
262 | AC_DEFINE(__UNIXWARE__) | |
263 | ;; | |
264 | ||
1c8183e2 | 265 | *-*-cygwin* | *-*-mingw32* ) |
17234b26 MB |
266 | dnl MBN: some of the defines have been moved after toolkit detection |
267 | dnl because for wxMotif/wxGTK/wxX11 to build on Cygwin | |
268 | dnl USE_UNIX must be set and not USE_WIN32 | |
3a922bb4 | 269 | SO_SUFFIX=dll |
cf27ef00 | 270 | PROGRAM_EXT=".exe" |
a9b5e89f VZ |
271 | DEFAULT_DEFAULT_wxUSE_MSW=1 |
272 | ;; | |
273 | ||
f9bc1684 VS |
274 | *-pc-msdosdjgpp ) |
275 | USE_UNIX=0 | |
276 | USE_DOS=1 | |
277 | AC_DEFINE(__DOS__) | |
278 | PROGRAM_EXT=".exe" | |
279 | DEFAULT_DEFAULT_wxUSE_MGL=1 | |
f9bc1684 VS |
280 | ;; |
281 | ||
9829f277 | 282 | *-pc-os2_emx | *-pc-os2-emx ) |
91b8de8d | 283 | AC_DEFINE(__EMX__) |
5cc55caf | 284 | USE_OS2=1 |
ff398597 | 285 | AC_DEFINE(__OS2__) |
cf27ef00 | 286 | PROGRAM_EXT=".exe" |
e07802fc | 287 | DEFAULT_DEFAULT_wxUSE_PM=1 |
35c49c4b SN |
288 | dnl "c++" wrapper is not always available, so always use plain gcc. |
289 | CXX=gcc | |
dc4118b8 | 290 | LDFLAGS="$LDFLAGS -Zcrtdll" |
e223b099 SN |
291 | dnl |
292 | dnl Some special code that's automatically added by autoconf-2.57 for OS/2 | |
293 | dnl and hopefully also by autoconf-2.58 and newer on all other platforms. | |
294 | dnl For now however, we still need it to make sure the configure script | |
295 | dnl works on OS/2 no matter what platform it is generated on. | |
296 | ac_executable_extensions=".exe" | |
297 | export ac_executable_extensions | |
298 | dnl This strange code is necessary to deal with handling of | |
299 | dnl backslashes by ksh and pdksh's sh variant. | |
300 | ac_save_IFS="$IFS" | |
4199367e | 301 | IFS='\\' |
e223b099 SN |
302 | ac_TEMP_PATH= |
303 | for ac_dir in $PATH; do | |
304 | IFS=$ac_save_IFS | |
305 | if test -z "$ac_TEMP_PATH"; then | |
306 | ac_TEMP_PATH="$ac_dir" | |
307 | else | |
308 | ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir" | |
309 | fi | |
310 | done | |
311 | export PATH="$ac_TEMP_PATH" | |
312 | unset ac_TEMP_PATH | |
a03b8b04 | 313 | DEFAULT_STD_FLAG=no |
91b8de8d | 314 | ;; |
a9b5e89f | 315 | |
cfda0ea8 DE |
316 | *-*-darwin* ) |
317 | dnl Darwin based distributions (including Mac OS X) | |
b4085ce6 | 318 | USE_BSD=1 |
f11bdd03 | 319 | USE_DARWIN=1 |
3a922bb4 | 320 | SO_SUFFIX=dylib |
b4085ce6 | 321 | AC_DEFINE(__BSD__) |
f11bdd03 | 322 | AC_DEFINE(__DARWIN__) |
82d43113 | 323 | AC_DEFINE(TARGET_CARBON) |
b4085ce6 | 324 | DEFAULT_DEFAULT_wxUSE_MAC=1 |
a03b8b04 | 325 | DEFAULT_STD_FLAG=no |
b4085ce6 | 326 | ;; |
031e9160 DE |
327 | powerpc-apple-macos* ) |
328 | dnl Classic Mac OS (< X) | |
329 | USE_UNIX=0 | |
330 | dnl For some reason the test that should be cross-compiler capable fails | |
331 | dnl However, there is no doubt that MacOS PowerPC is big endian. | |
332 | ac_cv_c_bigendian=yes | |
333 | SO_SUFFIX=shlib | |
334 | dnl AC_DEFINE(TARGET_CARBON) | |
335 | dnl platform.h needs TARGET_CARBON before setup.h, we'll add it to CPPFLAGS | |
336 | DEFAULT_DEFAULT_wxUSE_MAC=1 | |
a03b8b04 | 337 | DEFAULT_STD_FLAG=no |
031e9160 | 338 | ;; |
b4085ce6 | 339 | |
b12915c1 VZ |
340 | *-*-beos* ) |
341 | dnl leave USE_UNIX on - BeOS is sufficiently Unix-like for this | |
342 | USE_BEOS=1 | |
343 | AC_DEFINE(__BEOS__) | |
344 | ;; | |
345 | ||
9a98a854 | 346 | *) |
88aaf4f5 VZ |
347 | AC_MSG_WARN([*** System type ${host} is unknown, assuming generic Unix and continuing nevertheless.]) |
348 | AC_MSG_WARN([*** Please report the build results to wx-dev@lists.wxwidgets.org.]) | |
047cffd2 MW |
349 | |
350 | DEFAULT_DEFAULT_wxUSE_X11=1 | |
351 | DEFAULT_wxUSE_SHARED=no | |
9a98a854 VZ |
352 | esac |
353 | ||
9a98a854 VZ |
354 | dnl --------------------------------------------------------------------------- |
355 | dnl command line options for configure | |
356 | dnl --------------------------------------------------------------------------- | |
357 | ||
358 | dnl the default values for all options - we collect them all here to simplify | |
359 | dnl modification of the default values (for example, if the defaults for some | |
360 | dnl platform should be changed, it can be done here too) | |
361 | dnl | |
362 | dnl NB: see also DEFAULT_wxUSE<toolkit> variables defined above | |
363 | ||
143121c5 VZ |
364 | WX_ARG_CACHE_INIT |
365 | ||
9a98a854 VZ |
366 | dnl useful to test the compilation with minimum options, define as 0 for normal |
367 | dnl usage | |
368 | DEBUG_CONFIGURE=0 | |
369 | if test $DEBUG_CONFIGURE = 1; then | |
1e6feb95 | 370 | DEFAULT_wxUSE_UNIVERSAL=no |
df5168c4 | 371 | DEFAULT_wxUSE_STL=no |
1e6feb95 | 372 | |
6ec507fd JS |
373 | DEFAULT_wxUSE_NANOX=no |
374 | ||
9a98a854 VZ |
375 | DEFAULT_wxUSE_THREADS=yes |
376 | ||
047cffd2 | 377 | DEFAULT_wxUSE_SHARED=${DEFAULT_wxUSE_SHARED:-yes} |
1e6feb95 | 378 | DEFAULT_wxUSE_OPTIMISE=no |
9a98a854 | 379 | DEFAULT_wxUSE_PROFILE=no |
5586805b | 380 | DEFAULT_wxUSE_NO_DEPS=no |
70c536f3 | 381 | DEFAULT_wxUSE_VARARG_MACROS=no |
8f4a9a10 RR |
382 | DEFAULT_wxUSE_NO_RTTI=no |
383 | DEFAULT_wxUSE_NO_EXCEPTIONS=no | |
32df13a5 | 384 | DEFAULT_wxUSE_UNIVERSAL_BINARY=no |
ffa0583f | 385 | DEFAULT_wxUSE_RPATH=yes |
5586805b | 386 | DEFAULT_wxUSE_PERMISSIVE=no |
9a98a854 VZ |
387 | DEFAULT_wxUSE_DEBUG_FLAG=yes |
388 | DEFAULT_wxUSE_DEBUG_INFO=yes | |
389 | DEFAULT_wxUSE_DEBUG_GDB=yes | |
390 | DEFAULT_wxUSE_MEM_TRACING=no | |
143121c5 | 391 | DEFAULT_wxUSE_DEBUG_CONTEXT=no |
9a98a854 VZ |
392 | DEFAULT_wxUSE_DMALLOC=no |
393 | DEFAULT_wxUSE_APPLE_IEEE=no | |
394 | ||
4199367e | 395 | DEFAULT_wxUSE_EXCEPTIONS=no |
9a98a854 | 396 | DEFAULT_wxUSE_LOG=yes |
1e6feb95 VZ |
397 | DEFAULT_wxUSE_LOGWINDOW=no |
398 | DEFAULT_wxUSE_LOGGUI=no | |
69d27ff7 | 399 | DEFAULT_wxUSE_LOGDIALOG=no |
9a98a854 VZ |
400 | |
401 | DEFAULT_wxUSE_GUI=yes | |
1e6feb95 | 402 | DEFAULT_wxUSE_CONTROLS=no |
9a98a854 | 403 | |
3e44f09d | 404 | DEFAULT_wxUSE_REGEX=no |
672abd7a VS |
405 | DEFAULT_wxUSE_XML=no |
406 | DEFAULT_wxUSE_EXPAT=no | |
9a98a854 VZ |
407 | DEFAULT_wxUSE_ZLIB=no |
408 | DEFAULT_wxUSE_LIBPNG=no | |
9a98a854 | 409 | DEFAULT_wxUSE_LIBJPEG=no |
c7a2bf27 | 410 | DEFAULT_wxUSE_LIBTIFF=no |
89fe663f | 411 | DEFAULT_wxUSE_LIBXPM=no |
f93ca9fd VS |
412 | DEFAULT_wxUSE_LIBMSPACK=no |
413 | DEFAULT_wxUSE_LIBSDL=no | |
7c72311f | 414 | DEFAULT_wxUSE_LIBGNOMEPRINT=no |
2b850ae1 | 415 | DEFAULT_wxUSE_LIBGNOMEVFS=no |
3565d135 | 416 | DEFAULT_wxUSE_LIBHILDON=no |
9a98a854 | 417 | DEFAULT_wxUSE_ODBC=no |
bdad4e7e | 418 | DEFAULT_wxUSE_OPENGL=no |
9a98a854 | 419 | |
eb4efbdc | 420 | DEFAULT_wxUSE_ON_FATAL_EXCEPTION=no |
eaff0f0d | 421 | DEFAULT_wxUSE_STACKWALKER=no |
36b6448c | 422 | DEFAULT_wxUSE_DEBUGREPORT=no |
4f3c5f06 | 423 | DEFAULT_wxUSE_SNGLINST_CHECKER=no |
fd15d8f1 | 424 | DEFAULT_wxUSE_STD_IOSTREAM=no |
668d55c9 | 425 | DEFAULT_wxUSE_STD_STRING=no |
1e6feb95 VZ |
426 | DEFAULT_wxUSE_CMDLINE_PARSER=no |
427 | DEFAULT_wxUSE_DATETIME=no | |
1e6feb95 VZ |
428 | DEFAULT_wxUSE_TIMER=no |
429 | DEFAULT_wxUSE_STOPWATCH=no | |
9a98a854 | 430 | DEFAULT_wxUSE_FILE=no |
1e6feb95 | 431 | DEFAULT_wxUSE_FFILE=no |
07158944 | 432 | DEFAULT_wxUSE_STDPATHS=no |
a3a584a7 | 433 | DEFAULT_wxUSE_TEXTBUFFER=no |
9a98a854 | 434 | DEFAULT_wxUSE_TEXTFILE=no |
002ed9af | 435 | DEFAULT_wxUSE_SOUND=no |
5ff751d6 | 436 | DEFAULT_wxUSE_MEDIACTRL=no |
557002cf | 437 | DEFAULT_wxUSE_GSTREAMER8=no |
178b9777 | 438 | DEFAULT_wxUSE_PRINTF_POS_PARAMS=no |
9a98a854 VZ |
439 | DEFAULT_wxUSE_INTL=no |
440 | DEFAULT_wxUSE_CONFIG=no | |
1e6feb95 | 441 | DEFAULT_wxUSE_FONTMAP=no |
9a98a854 VZ |
442 | DEFAULT_wxUSE_STREAMS=no |
443 | DEFAULT_wxUSE_SOCKETS=no | |
3bce6687 JS |
444 | DEFAULT_wxUSE_OLE=no |
445 | DEFAULT_wxUSE_DATAOBJ=no | |
1c8515f9 | 446 | DEFAULT_wxUSE_DIALUP_MANAGER=no |
9a98a854 | 447 | DEFAULT_wxUSE_JOYSTICK=no |
6bff71f8 | 448 | DEFAULT_wxUSE_DYNLIB_CLASS=no |
0b9ab0bd | 449 | DEFAULT_wxUSE_DYNAMIC_LOADER=no |
9a98a854 | 450 | DEFAULT_wxUSE_LONGLONG=no |
e8f65ba6 | 451 | DEFAULT_wxUSE_GEOMETRY=no |
9a98a854 VZ |
452 | |
453 | DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=no | |
454 | DEFAULT_wxUSE_NORMALIZED_PS_FONTS=no | |
455 | DEFAULT_wxUSE_POSTSCRIPT=no | |
456 | ||
9a98a854 VZ |
457 | DEFAULT_wxUSE_CLIPBOARD=no |
458 | DEFAULT_wxUSE_TOOLTIPS=no | |
459 | DEFAULT_wxUSE_DRAG_AND_DROP=no | |
24fd6d87 | 460 | DEFAULT_wxUSE_DRAGIMAGE=no |
9a98a854 | 461 | DEFAULT_wxUSE_SPLINES=no |
060e10d9 | 462 | DEFAULT_wxUSE_MOUSEWHEEL=no |
9a98a854 | 463 | |
efd17a1d | 464 | DEFAULT_wxUSE_MDI=no |
9a98a854 VZ |
465 | DEFAULT_wxUSE_MDI_ARCHITECTURE=no |
466 | DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=no | |
467 | DEFAULT_wxUSE_PRINTING_ARCHITECTURE=no | |
468 | ||
9a98a854 VZ |
469 | DEFAULT_wxUSE_RESOURCES=no |
470 | DEFAULT_wxUSE_CONSTRAINTS=no | |
471 | DEFAULT_wxUSE_IPC=no | |
472 | DEFAULT_wxUSE_HELP=no | |
29fd3c0c | 473 | DEFAULT_wxUSE_MS_HTML_HELP=no |
3379ed37 | 474 | DEFAULT_wxUSE_WXHTML_HELP=no |
24176f2c | 475 | DEFAULT_wxUSE_TREELAYOUT=no |
9a98a854 | 476 | DEFAULT_wxUSE_METAFILE=no |
1e6feb95 | 477 | DEFAULT_wxUSE_MIMETYPE=no |
4cdb0ab0 VS |
478 | DEFAULT_wxUSE_SYSTEM_OPTIONS=no |
479 | DEFAULT_wxUSE_PROTOCOL=no | |
480 | DEFAULT_wxUSE_PROTOCOL_HTTP=no | |
481 | DEFAULT_wxUSE_PROTOCOL_FTP=no | |
482 | DEFAULT_wxUSE_PROTOCOL_FILE=no | |
483 | DEFAULT_wxUSE_URL=no | |
ca5c6ac3 | 484 | DEFAULT_wxUSE_VARIANT=no |
3bd8fb5f | 485 | |
319c5ed4 | 486 | DEFAULT_wxUSE_ABOUTDLG=no |
9a98a854 | 487 | DEFAULT_wxUSE_COMMONDLGS=no |
1e6feb95 VZ |
488 | DEFAULT_wxUSE_CHOICEDLG=no |
489 | DEFAULT_wxUSE_COLOURDLG=no | |
ce4169a4 | 490 | DEFAULT_wxUSE_DIRDLG=no |
1e6feb95 | 491 | DEFAULT_wxUSE_FILEDLG=no |
8db37e06 | 492 | DEFAULT_wxUSE_FINDREPLDLG=no |
1e6feb95 VZ |
493 | DEFAULT_wxUSE_FONTDLG=no |
494 | DEFAULT_wxUSE_MSGDLG=no | |
495 | DEFAULT_wxUSE_NUMBERDLG=no | |
c11584af | 496 | DEFAULT_wxUSE_TEXTDLG=no |
cbca9943 | 497 | DEFAULT_wxUSE_SPLASH=no |
a641505f | 498 | DEFAULT_wxUSE_STARTUP_TIPS=no |
ce4169a4 | 499 | DEFAULT_wxUSE_PROGRESSDLG=no |
b1f5d087 VZ |
500 | DEFAULT_wxUSE_WIZARDDLG=no |
501 | ||
1e6feb95 | 502 | DEFAULT_wxUSE_MENUS=no |
9a98a854 | 503 | DEFAULT_wxUSE_MINIFRAME=no |
5526e819 | 504 | DEFAULT_wxUSE_HTML=no |
5d7836c4 | 505 | DEFAULT_wxUSE_RICHTEXT=no |
9a8f0513 | 506 | DEFAULT_wxUSE_XRC=no |
50acee04 | 507 | DEFAULT_wxUSE_AUI=no |
ec9f9256 | 508 | DEFAULT_wxUSE_WEBKIT=no |
24528b0c | 509 | DEFAULT_wxUSE_FILESYSTEM=no |
e3e717ec VZ |
510 | DEFAULT_wxUSE_FS_INET=no |
511 | DEFAULT_wxUSE_FS_ZIP=no | |
26e422a9 | 512 | DEFAULT_wxUSE_FS_ARCHIVE=no |
d78b3d64 | 513 | DEFAULT_wxUSE_BUSYINFO=no |
9e8e867f | 514 | DEFAULT_wxUSE_ARCHIVE_STREAMS=no |
d78b3d64 | 515 | DEFAULT_wxUSE_ZIPSTREAM=no |
26e422a9 | 516 | DEFAULT_wxUSE_TARSTREAM=no |
1e6feb95 | 517 | DEFAULT_wxUSE_VALIDATORS=no |
9a98a854 VZ |
518 | |
519 | DEFAULT_wxUSE_ACCEL=no | |
72045d57 | 520 | DEFAULT_wxUSE_ANIMATIONCTRL=no |
1e6feb95 | 521 | DEFAULT_wxUSE_BUTTON=no |
9a98a854 | 522 | DEFAULT_wxUSE_BMPBUTTON=no |
95a46303 | 523 | DEFAULT_wxUSE_BITMAPCOMBOBOX=no |
1e6feb95 VZ |
524 | DEFAULT_wxUSE_CALCTRL=no |
525 | DEFAULT_wxUSE_CARET=no | |
9a98a854 VZ |
526 | DEFAULT_wxUSE_CHECKBOX=no |
527 | DEFAULT_wxUSE_CHECKLST=no | |
1e6feb95 | 528 | DEFAULT_wxUSE_CHOICE=no |
92bbdbcd | 529 | DEFAULT_wxUSE_CHOICEBOOK=no |
912c3932 | 530 | DEFAULT_wxUSE_COLLPANE=no |
ec376c8f | 531 | DEFAULT_wxUSE_COLOURPICKERCTRL=no |
9a98a854 | 532 | DEFAULT_wxUSE_COMBOBOX=no |
a57d600f | 533 | DEFAULT_wxUSE_COMBOCTRL=no |
da98e9be | 534 | DEFAULT_wxUSE_DATEPICKCTRL=no |
ddb4769e | 535 | DEFAULT_wxUSE_DISPLAY=no |
88bbc332 | 536 | DEFAULT_wxUSE_DETECT_SM=no |
ec376c8f VZ |
537 | DEFAULT_wxUSE_DIRPICKERCTRL=no |
538 | DEFAULT_wxUSE_FILEPICKERCTRL=no | |
539 | DEFAULT_wxUSE_FONTPICKERCTRL=no | |
9a98a854 | 540 | DEFAULT_wxUSE_GAUGE=no |
f43426c1 | 541 | DEFAULT_wxUSE_GRAPHICS_CONTEXT=no |
9a98a854 | 542 | DEFAULT_wxUSE_GRID=no |
17e91437 | 543 | DEFAULT_wxUSE_HYPERLINKCTRL=no |
20e34ecc | 544 | DEFAULT_wxUSE_DATAVIEWCTRL=no |
9a98a854 | 545 | DEFAULT_wxUSE_IMAGLIST=no |
e9c0df38 | 546 | DEFAULT_wxUSE_LISTBOOK=no |
9a98a854 VZ |
547 | DEFAULT_wxUSE_LISTBOX=no |
548 | DEFAULT_wxUSE_LISTCTRL=no | |
549 | DEFAULT_wxUSE_NOTEBOOK=no | |
a57d600f | 550 | DEFAULT_wxUSE_ODCOMBOBOX=no |
9a98a854 VZ |
551 | DEFAULT_wxUSE_RADIOBOX=no |
552 | DEFAULT_wxUSE_RADIOBTN=no | |
e602002e | 553 | DEFAULT_wxUSE_SASH=no |
9a98a854 VZ |
554 | DEFAULT_wxUSE_SCROLLBAR=no |
555 | DEFAULT_wxUSE_SLIDER=no | |
556 | DEFAULT_wxUSE_SPINBTN=no | |
66f38406 | 557 | DEFAULT_wxUSE_SPINCTRL=no |
9a98a854 VZ |
558 | DEFAULT_wxUSE_SPLITTER=no |
559 | DEFAULT_wxUSE_STATBMP=no | |
560 | DEFAULT_wxUSE_STATBOX=no | |
561 | DEFAULT_wxUSE_STATLINE=no | |
1e6feb95 | 562 | DEFAULT_wxUSE_STATTEXT=no |
9a98a854 | 563 | DEFAULT_wxUSE_STATUSBAR=yes |
db6d3918 | 564 | DEFAULT_wxUSE_TAB_DIALOG=no |
1e6feb95 | 565 | DEFAULT_wxUSE_TEXTCTRL=no |
1db8dc4a | 566 | DEFAULT_wxUSE_TOGGLEBTN=no |
9a98a854 | 567 | DEFAULT_wxUSE_TOOLBAR=no |
360d6699 | 568 | DEFAULT_wxUSE_TOOLBAR_NATIVE=no |
eca15c0d | 569 | DEFAULT_wxUSE_TREEBOOK=no |
7dcea26b | 570 | DEFAULT_wxUSE_TOOLBOOK=no |
9a98a854 | 571 | DEFAULT_wxUSE_TREECTRL=no |
9f41d601 | 572 | DEFAULT_wxUSE_POPUPWIN=no |
0b01706f | 573 | DEFAULT_wxUSE_TIPWINDOW=no |
9a98a854 VZ |
574 | |
575 | DEFAULT_wxUSE_UNICODE=no | |
a72a4bfa | 576 | DEFAULT_wxUSE_UNICODE_MSLU=no |
9a98a854 | 577 | DEFAULT_wxUSE_WCSRTOMBS=no |
e90c1d2a | 578 | |
d275c7eb | 579 | DEFAULT_wxUSE_PALETTE=no |
0046ff7c | 580 | DEFAULT_wxUSE_IMAGE=no |
0940bcf7 HH |
581 | DEFAULT_wxUSE_GIF=no |
582 | DEFAULT_wxUSE_PCX=no | |
bb9e79c0 | 583 | DEFAULT_wxUSE_TGA=no |
0940bcf7 | 584 | DEFAULT_wxUSE_PNM=no |
4b6b4dfc | 585 | DEFAULT_wxUSE_IFF=no |
0046ff7c | 586 | DEFAULT_wxUSE_XPM=no |
658974ae | 587 | DEFAULT_wxUSE_ICO_CUR=no |
7bb2947d | 588 | DEFAULT_wxUSE_ACCESSIBILITY=no |
5ff751d6 | 589 | |
e9e0dc15 | 590 | DEFAULT_wxUSE_MONOLITHIC=no |
f93ca9fd | 591 | DEFAULT_wxUSE_PLUGINS=no |
029b47ad | 592 | DEFAULT_wxUSE_OFFICIAL_BUILD=no |
9a98a854 | 593 | else |
1e6feb95 | 594 | DEFAULT_wxUSE_UNIVERSAL=no |
df5168c4 | 595 | DEFAULT_wxUSE_STL=no |
1e6feb95 | 596 | |
6ec507fd JS |
597 | DEFAULT_wxUSE_NANOX=no |
598 | ||
9a98a854 VZ |
599 | DEFAULT_wxUSE_THREADS=yes |
600 | ||
047cffd2 | 601 | DEFAULT_wxUSE_SHARED=${DEFAULT_wxUSE_SHARED:-yes} |
9a98a854 VZ |
602 | DEFAULT_wxUSE_OPTIMISE=yes |
603 | DEFAULT_wxUSE_PROFILE=no | |
5586805b | 604 | DEFAULT_wxUSE_NO_DEPS=no |
70c536f3 | 605 | DEFAULT_wxUSE_VARARG_MACROS=yes |
8f4a9a10 RR |
606 | DEFAULT_wxUSE_NO_RTTI=no |
607 | DEFAULT_wxUSE_NO_EXCEPTIONS=no | |
32df13a5 | 608 | DEFAULT_wxUSE_UNIVERSAL_BINARY=no |
ffa0583f | 609 | DEFAULT_wxUSE_RPATH=yes |
5586805b | 610 | DEFAULT_wxUSE_PERMISSIVE=no |
9a98a854 VZ |
611 | DEFAULT_wxUSE_DEBUG_FLAG=no |
612 | DEFAULT_wxUSE_DEBUG_INFO=no | |
613 | DEFAULT_wxUSE_DEBUG_GDB=no | |
614 | DEFAULT_wxUSE_MEM_TRACING=no | |
143121c5 | 615 | DEFAULT_wxUSE_DEBUG_CONTEXT=no |
9a98a854 VZ |
616 | DEFAULT_wxUSE_DMALLOC=no |
617 | DEFAULT_wxUSE_APPLE_IEEE=yes | |
618 | ||
4199367e | 619 | DEFAULT_wxUSE_EXCEPTIONS=yes |
9a98a854 | 620 | DEFAULT_wxUSE_LOG=yes |
d73be714 VZ |
621 | DEFAULT_wxUSE_LOGWINDOW=yes |
622 | DEFAULT_wxUSE_LOGGUI=yes | |
69d27ff7 | 623 | DEFAULT_wxUSE_LOGDIALOG=yes |
9a98a854 VZ |
624 | |
625 | DEFAULT_wxUSE_GUI=yes | |
626 | ||
aa2d9ecc | 627 | DEFAULT_wxUSE_REGEX=yes |
672abd7a | 628 | DEFAULT_wxUSE_XML=yes |
aa2d9ecc VZ |
629 | DEFAULT_wxUSE_EXPAT=yes |
630 | DEFAULT_wxUSE_ZLIB=yes | |
631 | DEFAULT_wxUSE_LIBPNG=yes | |
632 | DEFAULT_wxUSE_LIBJPEG=yes | |
633 | DEFAULT_wxUSE_LIBTIFF=yes | |
634 | DEFAULT_wxUSE_LIBXPM=yes | |
3527f29c | 635 | DEFAULT_wxUSE_LIBMSPACK=yes |
f93ca9fd | 636 | DEFAULT_wxUSE_LIBSDL=no |
a65f8220 | 637 | DEFAULT_wxUSE_LIBGNOMEPRINT=no |
2b850ae1 | 638 | DEFAULT_wxUSE_LIBGNOMEVFS=no |
3565d135 | 639 | DEFAULT_wxUSE_LIBHILDON=no |
16b52fa1 | 640 | DEFAULT_wxUSE_ODBC=no |
52cb607e | 641 | DEFAULT_wxUSE_OPENGL=no |
9a98a854 | 642 | |
eb4efbdc | 643 | DEFAULT_wxUSE_ON_FATAL_EXCEPTION=yes |
eaff0f0d | 644 | DEFAULT_wxUSE_STACKWALKER=yes |
61639efb | 645 | DEFAULT_wxUSE_DEBUGREPORT=yes |
4f3c5f06 | 646 | DEFAULT_wxUSE_SNGLINST_CHECKER=yes |
a03b8b04 RD |
647 | DEFAULT_wxUSE_STD_IOSTREAM=$DEFAULT_STD_FLAG |
648 | DEFAULT_wxUSE_STD_STRING=$DEFAULT_STD_FLAG | |
1e6feb95 VZ |
649 | DEFAULT_wxUSE_CMDLINE_PARSER=yes |
650 | DEFAULT_wxUSE_DATETIME=yes | |
1e6feb95 VZ |
651 | DEFAULT_wxUSE_TIMER=yes |
652 | DEFAULT_wxUSE_STOPWATCH=yes | |
9a98a854 | 653 | DEFAULT_wxUSE_FILE=yes |
1e6feb95 | 654 | DEFAULT_wxUSE_FFILE=yes |
07158944 | 655 | DEFAULT_wxUSE_STDPATHS=yes |
a3a584a7 | 656 | DEFAULT_wxUSE_TEXTBUFFER=yes |
9a98a854 | 657 | DEFAULT_wxUSE_TEXTFILE=yes |
002ed9af | 658 | DEFAULT_wxUSE_SOUND=yes |
103e7595 | 659 | DEFAULT_wxUSE_MEDIACTRL=no |
557002cf | 660 | DEFAULT_wxUSE_GSTREAMER8=no |
15291213 | 661 | DEFAULT_wxUSE_PRINTF_POS_PARAMS=yes |
9a98a854 VZ |
662 | DEFAULT_wxUSE_INTL=yes |
663 | DEFAULT_wxUSE_CONFIG=yes | |
1e6feb95 | 664 | DEFAULT_wxUSE_FONTMAP=yes |
9a98a854 VZ |
665 | DEFAULT_wxUSE_STREAMS=yes |
666 | DEFAULT_wxUSE_SOCKETS=yes | |
3bce6687 JS |
667 | DEFAULT_wxUSE_OLE=yes |
668 | DEFAULT_wxUSE_DATAOBJ=yes | |
1c8515f9 | 669 | DEFAULT_wxUSE_DIALUP_MANAGER=yes |
9a98a854 | 670 | DEFAULT_wxUSE_JOYSTICK=yes |
6bff71f8 | 671 | DEFAULT_wxUSE_DYNLIB_CLASS=yes |
9337b578 | 672 | DEFAULT_wxUSE_DYNAMIC_LOADER=yes |
b685cd9b | 673 | DEFAULT_wxUSE_LONGLONG=yes |
e8f65ba6 | 674 | DEFAULT_wxUSE_GEOMETRY=yes |
9a98a854 VZ |
675 | |
676 | DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=yes | |
677 | DEFAULT_wxUSE_NORMALIZED_PS_FONTS=yes | |
678 | DEFAULT_wxUSE_POSTSCRIPT=yes | |
679 | ||
9a98a854 VZ |
680 | DEFAULT_wxUSE_CLIPBOARD=yes |
681 | DEFAULT_wxUSE_TOOLTIPS=yes | |
682 | DEFAULT_wxUSE_DRAG_AND_DROP=yes | |
24fd6d87 | 683 | DEFAULT_wxUSE_DRAGIMAGE=yes |
9a98a854 | 684 | DEFAULT_wxUSE_SPLINES=yes |
060e10d9 | 685 | DEFAULT_wxUSE_MOUSEWHEEL=yes |
9a98a854 | 686 | |
efd17a1d | 687 | DEFAULT_wxUSE_MDI=yes |
9a98a854 VZ |
688 | DEFAULT_wxUSE_MDI_ARCHITECTURE=yes |
689 | DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=yes | |
690 | DEFAULT_wxUSE_PRINTING_ARCHITECTURE=yes | |
691 | ||
2b5f62a0 | 692 | DEFAULT_wxUSE_RESOURCES=no |
9a98a854 VZ |
693 | DEFAULT_wxUSE_CONSTRAINTS=yes |
694 | DEFAULT_wxUSE_IPC=yes | |
695 | DEFAULT_wxUSE_HELP=yes | |
29fd3c0c | 696 | DEFAULT_wxUSE_MS_HTML_HELP=yes |
3379ed37 | 697 | DEFAULT_wxUSE_WXHTML_HELP=yes |
24176f2c | 698 | DEFAULT_wxUSE_TREELAYOUT=yes |
9a98a854 | 699 | DEFAULT_wxUSE_METAFILE=yes |
1e6feb95 | 700 | DEFAULT_wxUSE_MIMETYPE=yes |
0cbff120 | 701 | DEFAULT_wxUSE_SYSTEM_OPTIONS=yes |
4cdb0ab0 VS |
702 | DEFAULT_wxUSE_PROTOCOL=yes |
703 | DEFAULT_wxUSE_PROTOCOL_HTTP=yes | |
704 | DEFAULT_wxUSE_PROTOCOL_FTP=yes | |
705 | DEFAULT_wxUSE_PROTOCOL_FILE=yes | |
706 | DEFAULT_wxUSE_URL=yes | |
ca5c6ac3 | 707 | DEFAULT_wxUSE_VARIANT=yes |
9a98a854 | 708 | |
319c5ed4 | 709 | DEFAULT_wxUSE_ABOUTDLG=yes |
9a98a854 | 710 | DEFAULT_wxUSE_COMMONDLGS=yes |
1e6feb95 VZ |
711 | DEFAULT_wxUSE_CHOICEDLG=yes |
712 | DEFAULT_wxUSE_COLOURDLG=yes | |
ce4169a4 | 713 | DEFAULT_wxUSE_DIRDLG=yes |
1e6feb95 | 714 | DEFAULT_wxUSE_FILEDLG=yes |
8db37e06 | 715 | DEFAULT_wxUSE_FINDREPLDLG=yes |
1e6feb95 VZ |
716 | DEFAULT_wxUSE_FONTDLG=yes |
717 | DEFAULT_wxUSE_MSGDLG=yes | |
718 | DEFAULT_wxUSE_NUMBERDLG=yes | |
c11584af | 719 | DEFAULT_wxUSE_TEXTDLG=yes |
cbca9943 | 720 | DEFAULT_wxUSE_SPLASH=yes |
a641505f | 721 | DEFAULT_wxUSE_STARTUP_TIPS=yes |
ce4169a4 | 722 | DEFAULT_wxUSE_PROGRESSDLG=yes |
f33f19dd VZ |
723 | DEFAULT_wxUSE_WIZARDDLG=yes |
724 | ||
1e6feb95 | 725 | DEFAULT_wxUSE_MENUS=yes |
9a98a854 | 726 | DEFAULT_wxUSE_MINIFRAME=yes |
d4c241b9 | 727 | DEFAULT_wxUSE_HTML=yes |
5d7836c4 | 728 | DEFAULT_wxUSE_RICHTEXT=yes |
9a8f0513 | 729 | DEFAULT_wxUSE_XRC=yes |
50acee04 | 730 | DEFAULT_wxUSE_AUI=yes |
ec9f9256 | 731 | DEFAULT_wxUSE_WEBKIT=yes |
24528b0c | 732 | DEFAULT_wxUSE_FILESYSTEM=yes |
d4c241b9 RR |
733 | DEFAULT_wxUSE_FS_INET=yes |
734 | DEFAULT_wxUSE_FS_ZIP=yes | |
26e422a9 | 735 | DEFAULT_wxUSE_FS_ARCHIVE=yes |
d4c241b9 | 736 | DEFAULT_wxUSE_BUSYINFO=yes |
9e8e867f | 737 | DEFAULT_wxUSE_ARCHIVE_STREAMS=yes |
d4c241b9 | 738 | DEFAULT_wxUSE_ZIPSTREAM=yes |
26e422a9 | 739 | DEFAULT_wxUSE_TARSTREAM=yes |
9a98a854 VZ |
740 | DEFAULT_wxUSE_VALIDATORS=yes |
741 | ||
742 | DEFAULT_wxUSE_ACCEL=yes | |
72045d57 | 743 | DEFAULT_wxUSE_ANIMATIONCTRL=yes |
1e6feb95 | 744 | DEFAULT_wxUSE_BUTTON=yes |
9a98a854 | 745 | DEFAULT_wxUSE_BMPBUTTON=yes |
95a46303 | 746 | DEFAULT_wxUSE_BITMAPCOMBOBOX=yes |
1e6feb95 VZ |
747 | DEFAULT_wxUSE_CALCTRL=yes |
748 | DEFAULT_wxUSE_CARET=yes | |
9a98a854 VZ |
749 | DEFAULT_wxUSE_CHECKBOX=yes |
750 | DEFAULT_wxUSE_CHECKLST=yes | |
ce4169a4 | 751 | DEFAULT_wxUSE_CHOICE=yes |
92bbdbcd | 752 | DEFAULT_wxUSE_CHOICEBOOK=yes |
912c3932 | 753 | DEFAULT_wxUSE_COLLPANE=yes |
ec376c8f | 754 | DEFAULT_wxUSE_COLOURPICKERCTRL=yes |
9a98a854 | 755 | DEFAULT_wxUSE_COMBOBOX=yes |
a57d600f | 756 | DEFAULT_wxUSE_COMBOCTRL=yes |
da98e9be | 757 | DEFAULT_wxUSE_DATEPICKCTRL=yes |
45b7f819 | 758 | DEFAULT_wxUSE_DISPLAY=yes |
88bbc332 | 759 | DEFAULT_wxUSE_DETECT_SM=yes |
ec376c8f VZ |
760 | DEFAULT_wxUSE_DIRPICKERCTRL=yes |
761 | DEFAULT_wxUSE_FILEPICKERCTRL=yes | |
762 | DEFAULT_wxUSE_FONTPICKERCTRL=yes | |
9a98a854 VZ |
763 | DEFAULT_wxUSE_GAUGE=yes |
764 | DEFAULT_wxUSE_GRID=yes | |
f43426c1 | 765 | DEFAULT_wxUSE_GRAPHICS_CONTEXT=no |
17e91437 | 766 | DEFAULT_wxUSE_HYPERLINKCTRL=yes |
20e34ecc | 767 | DEFAULT_wxUSE_DATAVIEWCTRL=no |
9a98a854 | 768 | DEFAULT_wxUSE_IMAGLIST=yes |
e9c0df38 | 769 | DEFAULT_wxUSE_LISTBOOK=yes |
9a98a854 VZ |
770 | DEFAULT_wxUSE_LISTBOX=yes |
771 | DEFAULT_wxUSE_LISTCTRL=yes | |
772 | DEFAULT_wxUSE_NOTEBOOK=yes | |
a57d600f | 773 | DEFAULT_wxUSE_ODCOMBOBOX=yes |
9a98a854 VZ |
774 | DEFAULT_wxUSE_RADIOBOX=yes |
775 | DEFAULT_wxUSE_RADIOBTN=yes | |
e602002e | 776 | DEFAULT_wxUSE_SASH=yes |
9a98a854 VZ |
777 | DEFAULT_wxUSE_SCROLLBAR=yes |
778 | DEFAULT_wxUSE_SLIDER=yes | |
779 | DEFAULT_wxUSE_SPINBTN=yes | |
66f38406 | 780 | DEFAULT_wxUSE_SPINCTRL=yes |
9a98a854 VZ |
781 | DEFAULT_wxUSE_SPLITTER=yes |
782 | DEFAULT_wxUSE_STATBMP=yes | |
783 | DEFAULT_wxUSE_STATBOX=yes | |
784 | DEFAULT_wxUSE_STATLINE=yes | |
1e6feb95 | 785 | DEFAULT_wxUSE_STATTEXT=yes |
9a98a854 | 786 | DEFAULT_wxUSE_STATUSBAR=yes |
db6d3918 | 787 | DEFAULT_wxUSE_TAB_DIALOG=no |
1e6feb95 | 788 | DEFAULT_wxUSE_TEXTCTRL=yes |
1db8dc4a | 789 | DEFAULT_wxUSE_TOGGLEBTN=yes |
9a98a854 | 790 | DEFAULT_wxUSE_TOOLBAR=yes |
360d6699 | 791 | DEFAULT_wxUSE_TOOLBAR_NATIVE=yes |
eca15c0d | 792 | DEFAULT_wxUSE_TREEBOOK=yes |
7dcea26b | 793 | DEFAULT_wxUSE_TOOLBOOK=yes |
9a98a854 | 794 | DEFAULT_wxUSE_TREECTRL=yes |
9f41d601 | 795 | DEFAULT_wxUSE_POPUPWIN=yes |
0b01706f | 796 | DEFAULT_wxUSE_TIPWINDOW=yes |
9a98a854 | 797 | |
78de529b | 798 | DEFAULT_wxUSE_UNICODE=no |
a72a4bfa | 799 | DEFAULT_wxUSE_UNICODE_MSLU=yes |
9a98a854 | 800 | DEFAULT_wxUSE_WCSRTOMBS=no |
e90c1d2a | 801 | |
d275c7eb | 802 | DEFAULT_wxUSE_PALETTE=yes |
0046ff7c | 803 | DEFAULT_wxUSE_IMAGE=yes |
0940bcf7 HH |
804 | DEFAULT_wxUSE_GIF=yes |
805 | DEFAULT_wxUSE_PCX=yes | |
bb9e79c0 VZ |
806 | DEFAULT_wxUSE_TGA=yes |
807 | DEFAULT_wxUSE_IFF=no dnl why is this set to "no"? | |
0940bcf7 | 808 | DEFAULT_wxUSE_PNM=yes |
0046ff7c | 809 | DEFAULT_wxUSE_XPM=yes |
658974ae | 810 | DEFAULT_wxUSE_ICO_CUR=yes |
7bb2947d | 811 | DEFAULT_wxUSE_ACCESSIBILITY=no |
5ff751d6 | 812 | |
e9e0dc15 | 813 | DEFAULT_wxUSE_MONOLITHIC=no |
f93ca9fd | 814 | DEFAULT_wxUSE_PLUGINS=no |
029b47ad | 815 | DEFAULT_wxUSE_OFFICIAL_BUILD=no |
9f45f08e | 816 | |
58247773 | 817 | dnl Applicable only when --with-gtk was used: |
f34ca037 | 818 | DEFAULT_wxUSE_GTK2=yes |
9a98a854 VZ |
819 | fi |
820 | ||
f34ca037 | 821 | |
143121c5 | 822 | dnl WX_ARG_WITH should be used to select whether an external package will be |
9a98a854 | 823 | dnl used or not, to configure compile-time features of this package itself, |
143121c5 | 824 | dnl use WX_ARG_ENABLE instead |
9a98a854 VZ |
825 | |
826 | dnl ============================ | |
827 | dnl external package dependecies | |
828 | dnl ============================ | |
829 | ||
143121c5 VZ |
830 | dnl these options use AC_ARG_WITH and not WX_ARG_WITH on purpose - we cache |
831 | dnl these values manually | |
ced859c3 | 832 | for toolkit in `echo $ALL_TOOLKITS`; do |
d74f4b5a VZ |
833 | LINE=`grep "wxUSE_$toolkit=" ${wx_arg_cache_file}` |
834 | if test "x$LINE" != "x" ; then | |
143121c5 VZ |
835 | has_toolkit_in_cache=1 |
836 | eval "DEFAULT_$LINE" | |
ced859c3 | 837 | eval "CACHE_$toolkit=1" |
5ff751d6 | 838 | |
f34ca037 MW |
839 | LINE=`grep "wx${toolkit}_VERSION=" ${wx_arg_cache_file}` |
840 | if test "x$LINE" != "x" ; then | |
841 | eval "DEFAULT_$LINE" | |
842 | fi | |
143121c5 VZ |
843 | fi |
844 | done | |
845 | ||
e90c1d2a | 846 | dnl --------------------------------------------------------------------------- |
77ffb593 | 847 | dnl --disable-gui will build only non-GUI part of wxWidgets: check for this |
e90c1d2a VZ |
848 | dnl first to disable many other switches if it's given |
849 | dnl | |
850 | dnl NB: this is still in testing stage, don't use if you don't know what you're | |
851 | dnl doing | |
852 | dnl --------------------------------------------------------------------------- | |
853 | ||
854 | WX_ARG_ENABLE(gui, [ --enable-gui use GUI classes], wxUSE_GUI) | |
77ffb593 JS |
855 | WX_ARG_ENABLE(monolithic, [ --enable-monolithic build wxWidgets as single library], wxUSE_MONOLITHIC) |
856 | WX_ARG_ENABLE(plugins, [ --enable-plugins build parts of wxWidgets as loadable components], wxUSE_PLUGINS) | |
1c14217d | 857 | WX_ARG_WITH(subdirs, [ --without-subdirs don't generate makefiles for samples/demos/...], wxWITH_SUBDIRS, without) |
e90c1d2a | 858 | |
b12915c1 | 859 | if test "$wxUSE_GUI" = "yes"; then |
e90c1d2a | 860 | |
77ffb593 | 861 | WX_ARG_ENABLE(universal, [ --enable-universal use wxWidgets GUI controls instead of native ones], wxUSE_UNIVERSAL) |
f34ca037 | 862 | AC_ARG_WITH(gtk, [[ --with-gtk[=VERSION] use GTK+, VERSION can be 2 (default), 1 or "any"]], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1]) |
ced859c3 | 863 | AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1]) |
c228d3a4 RN |
864 | AC_ARG_WITH(mac, [ --with-mac use Mac OS X], [wxUSE_MAC="$withval" CACHE_MAC=1 TOOLKIT_GIVEN=1]) |
865 | AC_ARG_WITH(cocoa, [ --with-cocoa use Cocoa], [wxUSE_COCOA="$withval" CACHE_COCOA=1 TOOLKIT_GIVEN=1]) | |
d1188635 | 866 | AC_ARG_WITH(wine, [ --with-wine use Wine], [wxUSE_WINE="$withval" CACHE_WINE=1]) |
b4efce5e | 867 | AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1]) |
e07802fc | 868 | AC_ARG_WITH(pm, [ --with-pm use OS/2 Presentation Manager], [wxUSE_PM="$withval" CACHE_PM=1 TOOLKIT_GIVEN=1]) |
6c657b52 | 869 | AC_ARG_WITH(mgl, [ --with-mgl use SciTech MGL], [wxUSE_MGL="$withval" wxUSE_UNIVERSAL="yes" CACHE_MGL=1 TOOLKIT_GIVEN=1]) |
b3c86150 | 870 | AC_ARG_WITH(directfb, [ --with-directfb use DirectFB], [wxUSE_DFB="$withval" wxUSE_UNIVERSAL="yes" CACHE_DFB=1 TOOLKIT_GIVEN=1]) |
1725144d | 871 | AC_ARG_WITH(microwin, [ --with-microwin use MicroWindows], [wxUSE_MICROWIN="$withval" CACHE_MICROWIN=1 TOOLKIT_GIVEN=1]) |
3c011993 | 872 | AC_ARG_WITH(x11, [ --with-x11 use X11], [wxUSE_X11="$withval" wxUSE_UNIVERSAL="yes" CACHE_X11=1 TOOLKIT_GIVEN=1]) |
ba875e66 | 873 | WX_ARG_ENABLE(nanox, [ --enable-nanox use NanoX], wxUSE_NANOX) |
143121c5 | 874 | |
f34ca037 | 875 | AC_ARG_ENABLE(gtk2, [ --disable-gtk2 use GTK+ 1.2 instead of 2.0], [wxUSE_GTK2="$enableval"]) |
16bd311d | 876 | WX_ARG_ENABLE(gpe, [ --enable-gpe use GNOME PDA Environment features if possible], wxUSE_GPE) |
a9b5e89f | 877 | |
422107f9 VZ |
878 | WX_ARG_SYS_WITH(libpng, [ --with-libpng use libpng (PNG image format)], wxUSE_LIBPNG) |
879 | WX_ARG_SYS_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], wxUSE_LIBJPEG) | |
0dcf9893 | 880 | WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF) |
c8818622 | 881 | WX_ARG_SYS_WITH(libxpm, [ --with-libxpm use libxpm (XPM file format)], wxUSE_LIBXPM) |
3527f29c | 882 | WX_ARG_WITH(libmspack, [ --with-libmspack use libmspack (CHM help files loading)], wxUSE_LIBMSPACK) |
f93ca9fd | 883 | WX_ARG_WITH(sdl, [ --with-sdl use SDL for audio on Unix], wxUSE_LIBSDL) |
2b850ae1 RR |
884 | WX_ARG_WITH(gnomeprint, [ --with-gnomeprint use GNOME print for printing under GNOME], wxUSE_LIBGNOMEPRINT) |
885 | WX_ARG_WITH(gnomevfs, [ --with-gnomevfs use GNOME VFS for associating MIME types], wxUSE_LIBGNOMEVFS) | |
3565d135 | 886 | WX_ARG_WITH(hildon, [ --with-hildon use Hildon framework for Nokia 770], wxUSE_LIBHILDON) |
143121c5 | 887 | WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL) |
b12915c1 | 888 | |
4353a8df VZ |
889 | if test "$wxUSE_UNIVERSAL" = "yes"; then |
890 | AC_ARG_WITH(themes, [ --with-themes=all|list use only the specified comma-separated list of wxUniversal themes], [wxUNIV_THEMES="$withval"]) | |
891 | fi | |
892 | ||
b12915c1 VZ |
893 | fi |
894 | dnl for GUI only | |
895 | ||
d0e9b150 | 896 | WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (http://dmalloc.com/)], wxUSE_DMALLOC) |
3e44f09d | 897 | WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx class], wxUSE_REGEX) |
422107f9 | 898 | WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB) |
8647bec6 | 899 | WX_ARG_SYS_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], wxUSE_ODBC) |
672abd7a | 900 | WX_ARG_SYS_WITH(expat, [ --with-expat enable XML support using expat parser], wxUSE_EXPAT) |
9a98a854 | 901 | |
9a98a854 VZ |
902 | dnl --------------------------------------------------------------------------- |
903 | dnl compile options | |
904 | dnl --------------------------------------------------------------------------- | |
905 | ||
2aa88730 | 906 | WX_ARG_ENABLE(shared, [ --enable-shared create shared library code], wxUSE_SHARED) |
143121c5 | 907 | WX_ARG_ENABLE(optimise, [ --enable-optimise create optimised code], wxUSE_OPTIMISE) |
143121c5 | 908 | WX_ARG_ENABLE(debug, [ --enable-debug same as debug_flag and debug_info], wxUSE_DEBUG) |
df5168c4 | 909 | WX_ARG_ENABLE(stl, [ --enable-stl use STL for containers], wxUSE_STL) |
3cceb09b | 910 | if test "$USE_OS2" = "1"; then |
f47af52b | 911 | DEFAULT_wxUSE_OMF=no |
3cceb09b SN |
912 | WX_ARG_ENABLE(omf, [ --enable-omf use OMF object format], wxUSE_OMF) |
913 | fi | |
70d1b3cf VZ |
914 | |
915 | if test "$wxUSE_DEBUG" = "yes"; then | |
916 | DEFAULT_wxUSE_DEBUG_FLAG=yes | |
917 | DEFAULT_wxUSE_DEBUG_INFO=yes | |
6c67131a | 918 | BUILD=debug |
70d1b3cf VZ |
919 | elif test "$wxUSE_DEBUG" = "no"; then |
920 | DEFAULT_wxUSE_DEBUG_FLAG=no | |
921 | DEFAULT_wxUSE_DEBUG_INFO=no | |
6c67131a | 922 | BUILD=release |
70d1b3cf VZ |
923 | fi |
924 | ||
f7bdcdd7 RR |
925 | WX_ARG_ENABLE(debug_flag, [ --enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)], wxUSE_DEBUG_FLAG) |
926 | WX_ARG_ENABLE(debug_info, [ --enable-debug_info create code with debugging information], wxUSE_DEBUG_INFO) | |
927 | WX_ARG_ENABLE(debug_gdb, [ --enable-debug_gdb create code with extra GDB debugging information], wxUSE_DEBUG_GDB) | |
928 | WX_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt use wxDebugContext], wxUSE_DEBUG_CONTEXT) | |
929 | WX_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing create code with memory tracing], wxUSE_MEM_TRACING) | |
930 | WX_ARG_ENABLE(profile, [ --enable-profile create code with profiling information], wxUSE_PROFILE) | |
931 | WX_ARG_ENABLE(no_rtti, [ --enable-no_rtti create code without RTTI information], wxUSE_NO_RTTI) | |
b3e8d00a | 932 | WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++ exceptions handling], wxUSE_NO_EXCEPTIONS) |
5586805b RR |
933 | WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE) |
934 | WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS) | |
70c536f3 | 935 | WX_ARG_ENABLE(vararg_macros, [ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS) |
95768535 | 936 | WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary[=SDK] create Mac PowerPC and Intel Universal binary (not yet working)]], wxUSE_UNIVERSAL_BINARY) |
9a98a854 | 937 | |
dee1a63f MB |
938 | WX_ARG_ENABLE(compat24, [ --enable-compat24 enable wxWidgets 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, enable) |
939 | WX_ARG_ENABLE(compat26, [ --disable-compat26 disable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6, disable) | |
54276ccf | 940 | |
ffa0583f | 941 | WX_ARG_ENABLE(rpath, [ --disable-rpath disable use of rpath for uninstalled builds], wxUSE_RPATH) |
3bd8fb5f RD |
942 | |
943 | ||
9a98a854 VZ |
944 | dnl --------------------------------------------------------------------------- |
945 | dnl (small) optional non GUI classes | |
946 | dnl --------------------------------------------------------------------------- | |
947 | ||
fd15d8f1 RR |
948 | WX_ARG_ENABLE(intl, [ --enable-intl use internationalization system], wxUSE_INTL) |
949 | WX_ARG_ENABLE(config, [ --enable-config use wxConfig (and derived) classes], wxUSE_CONFIG) | |
b12915c1 | 950 | |
a5d46b73 VZ |
951 | WX_ARG_ENABLE(protocols, [ --enable-protocols use wxProtocol and derived classes], wxUSE_PROTOCOL) |
952 | WX_ARG_ENABLE(ftp, [ --enable-ftp use wxFTP (requires wxProtocol], wxUSE_PROTOCOL_FTP) | |
953 | WX_ARG_ENABLE(http, [ --enable-http use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP) | |
954 | WX_ARG_ENABLE(fileproto, [ --enable-fileproto use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE) | |
fd15d8f1 | 955 | WX_ARG_ENABLE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS) |
4199367e | 956 | WX_ARG_ENABLE(ole, [ --enable-ole use OLE classes (Win32 only)], wxUSE_OLE) |
3bce6687 | 957 | WX_ARG_ENABLE(dataobj, [ --enable-dataobj use data object classes], wxUSE_DATAOBJ) |
b12915c1 | 958 | |
fd15d8f1 | 959 | WX_ARG_ENABLE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], wxUSE_IPC) |
eb4efbdc | 960 | |
4199367e VZ |
961 | dnl please keep the settings below in alphabetical order |
962 | WX_ARG_ENABLE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE) | |
9e8e867f | 963 | WX_ARG_ENABLE(arcstream, [ --enable-arcstream use wxArchive streams], wxUSE_ARCHIVE_STREAMS) |
eaff0f0d | 964 | WX_ARG_ENABLE(backtrace, [ --enable-backtrace use wxStackWalker class for getting backtraces], wxUSE_STACKWALKER) |
36b6448c | 965 | WX_ARG_ENABLE(catch_segvs, [ --enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only)], wxUSE_ON_FATAL_EXCEPTION) |
1e6feb95 VZ |
966 | WX_ARG_ENABLE(cmdline, [ --enable-cmdline use wxCmdLineParser class], wxUSE_CMDLINE_PARSER) |
967 | WX_ARG_ENABLE(datetime, [ --enable-datetime use wxDateTime class], wxUSE_DATETIME) | |
36b6448c | 968 | WX_ARG_ENABLE(debugreport, [ --enable-debugreport use wxDebugReport class], wxUSE_DEBUGREPORT) |
eb4efbdc | 969 | WX_ARG_ENABLE(dialupman, [ --enable-dialupman use dialup network classes], wxUSE_DIALUP_MANAGER) |
fd15d8f1 | 970 | WX_ARG_ENABLE(dynlib, [ --enable-dynlib use wxLibrary class for DLL loading], wxUSE_DYNLIB_CLASS) |
0b9ab0bd | 971 | WX_ARG_ENABLE(dynamicloader, [ --enable-dynamicloader use (new) wxDynamicLibrary class], wxUSE_DYNAMIC_LOADER) |
4199367e VZ |
972 | WX_ARG_ENABLE(exceptions, [ --enable-exceptions build exception-safe library], wxUSE_EXCEPTIONS) |
973 | WX_ARG_ENABLE(ffile, [ --enable-ffile use wxFFile class], wxUSE_FFILE) | |
974 | WX_ARG_ENABLE(file, [ --enable-file use wxFile class], wxUSE_FILE) | |
975 | WX_ARG_ENABLE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM) | |
976 | WX_ARG_ENABLE(fontmap, [ --enable-fontmap use font encodings conversion classes], wxUSE_FONTMAP) | |
26e422a9 | 977 | WX_ARG_ENABLE(fs_archive, [ --enable-fs_archive use virtual archive filesystems], wxUSE_FS_ARCHIVE) |
4199367e | 978 | WX_ARG_ENABLE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET) |
916af76f | 979 | WX_ARG_ENABLE(fs_zip, [ --enable-fs_zip now replaced by fs_archive], wxUSE_FS_ZIP) |
e8f65ba6 | 980 | WX_ARG_ENABLE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY) |
fd15d8f1 | 981 | WX_ARG_ENABLE(log, [ --enable-log use logging system], wxUSE_LOG) |
4199367e VZ |
982 | WX_ARG_ENABLE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG) |
983 | WX_ARG_ENABLE(mimetype, [ --enable-mimetype use wxMimeTypesManager], wxUSE_MIMETYPE) | |
984 | WX_ARG_ENABLE(mslu, [ --enable-mslu use MS Layer for Unicode on Windows 9x (Win32 only)], wxUSE_UNICODE_MSLU) | |
985 | WX_ARG_ENABLE(snglinst, [ --enable-snglinst use wxSingleInstanceChecker class], wxUSE_SNGLINST_CHECKER) | |
4199367e | 986 | WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM) |
668d55c9 | 987 | WX_ARG_ENABLE(std_string, [ --enable-std_string use standard C++ string classes], wxUSE_STD_STRING) |
07158944 | 988 | WX_ARG_ENABLE(stdpaths, [ --enable-stdpaths use wxStandardPaths class], wxUSE_STDPATHS) |
4199367e | 989 | WX_ARG_ENABLE(stopwatch, [ --enable-stopwatch use wxStopWatch class], wxUSE_STOPWATCH) |
07158944 | 990 | WX_ARG_ENABLE(streams, [ --enable-streams use wxStream etc classes], wxUSE_STREAMS) |
4199367e | 991 | WX_ARG_ENABLE(system_options,[ --enable-sysoptions use wxSystemOptions], wxUSE_SYSTEM_OPTIONS) |
26e422a9 | 992 | WX_ARG_ENABLE(tarstream, [ --enable-tarstream use wxTar streams], wxUSE_TARSTREAM) |
a3a584a7 VZ |
993 | WX_ARG_ENABLE(textbuf, [ --enable-textbuf use wxTextBuffer class], wxUSE_TEXTBUFFER) |
994 | WX_ARG_ENABLE(textfile, [ --enable-textfile use wxTextFile class], wxUSE_TEXTFILE) | |
4199367e | 995 | WX_ARG_ENABLE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER) |
fd15d8f1 | 996 | WX_ARG_ENABLE(unicode, [ --enable-unicode compile wxString with Unicode support], wxUSE_UNICODE) |
002ed9af | 997 | WX_ARG_ENABLE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND) |
103e7595 | 998 | WX_ARG_ENABLE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL) |
15291213 | 999 | WX_ARG_ENABLE(gstreamer8, [ --enable-gstreamer8 force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix], wxUSE_GSTREAMER8) |
7b4eedf6 | 1000 | WX_ARG_ENABLE(printfposparam,[ --enable-printfposparam use wxVsnprintf() which supports positional parameters], wxUSE_PRINTF_POS_PARAMS) |
81f90336 | 1001 | WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM) |
9a98a854 | 1002 | |
4cdb0ab0 | 1003 | WX_ARG_ENABLE(url, [ --enable-url use wxURL class], wxUSE_URL) |
ca5c6ac3 | 1004 | WX_ARG_ENABLE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT) |
4cdb0ab0 VS |
1005 | WX_ARG_ENABLE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL) |
1006 | WX_ARG_ENABLE(protocol_http, [ --enable-protocol-http HTTP support in wxProtocol], wxUSE_PROTOCOL_HTTP) | |
1007 | WX_ARG_ENABLE(protocol_ftp, [ --enable-protocol-ftp FTP support in wxProtocol], wxUSE_PROTOCOL_FTP) | |
1008 | WX_ARG_ENABLE(protocol_file, [ --enable-protocol-file FILE support in wxProtocol], wxUSE_PROTOCOL_FILE) | |
1009 | ||
1010 | ||
9a98a854 VZ |
1011 | dnl --------------------------------------------------------------------------- |
1012 | dnl "big" options (i.e. those which change a lot of things throughout the library) | |
1013 | dnl --------------------------------------------------------------------------- | |
1014 | ||
143121c5 | 1015 | WX_ARG_ENABLE(threads, [ --enable-threads use threads], wxUSE_THREADS) |
9a98a854 | 1016 | |
b12915c1 VZ |
1017 | if test "$wxUSE_GUI" = "yes"; then |
1018 | ||
9a98a854 VZ |
1019 | dnl --------------------------------------------------------------------------- |
1020 | dnl "big" GUI options | |
1021 | dnl --------------------------------------------------------------------------- | |
1022 | ||
143121c5 | 1023 | WX_ARG_ENABLE(docview, [ --enable-docview use document view architecture], wxUSE_DOC_VIEW_ARCHITECTURE) |
3379ed37 | 1024 | WX_ARG_ENABLE(help, [ --enable-help use help subsystem], wxUSE_HELP) |
29fd3c0c | 1025 | WX_ARG_ENABLE(mshtmlhelp, [ --enable-mshtmlhelp use MS HTML Help (win32)], wxUSE_MS_HTML_HELP) |
3379ed37 VZ |
1026 | WX_ARG_ENABLE(html, [ --enable-html use wxHTML sub-library], wxUSE_HTML) |
1027 | WX_ARG_ENABLE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP) | |
9a8f0513 | 1028 | WX_ARG_ENABLE(xrc, [ --enable-xrc use XRC resources sub-library], wxUSE_XRC) |
50acee04 | 1029 | WX_ARG_ENABLE(aui, [ --enable-aui use AUI docking library], wxUSE_AUI) |
143121c5 VZ |
1030 | WX_ARG_ENABLE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS) |
1031 | WX_ARG_ENABLE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE) | |
efd17a1d VZ |
1032 | WX_ARG_ENABLE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI) |
1033 | WX_ARG_ENABLE(mdidoc, [ --enable-mdidoc use docview architecture with MDI], wxUSE_MDI_ARCHITECTURE) | |
1e6feb95 VZ |
1034 | WX_ARG_ENABLE(loggui, [ --enable-loggui use standard GUI logger], wxUSE_LOGGUI) |
1035 | WX_ARG_ENABLE(logwin, [ --enable-logwin use wxLogWindow], wxUSE_LOGWINDOW) | |
69d27ff7 | 1036 | WX_ARG_ENABLE(logdialog, [ --enable-logdialog use wxLogDialog], wxUSE_LOGDIALOG) |
ec9f9256 | 1037 | WX_ARG_ENABLE(webkit, [ --enable-webkit use wxWebKitCtrl (Mac)], wxUSE_WEBKIT) |
322f55e8 | 1038 | WX_ARG_ENABLE(richtext, [ --enable-richtext use wxRichTextCtrl], wxUSE_RICHTEXT) |
f43426c1 | 1039 | WX_ARG_ENABLE(graphics_ctx, [ --enable-graphics_ctx use graphics context 2D drawing API], wxUSE_GRAPHICS_CONTEXT) |
9a98a854 VZ |
1040 | |
1041 | dnl --------------------------------------------------------------------------- | |
1042 | dnl PostScript options | |
1043 | dnl --------------------------------------------------------------------------- | |
143121c5 | 1044 | WX_ARG_ENABLE(postscript, [ --enable-postscript use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT) |
9a98a854 VZ |
1045 | |
1046 | dnl VZ: these options seem to be always on, if someone wants to change it please do | |
143121c5 VZ |
1047 | dnl WX_ARG_ENABLE(PS-normalized, [ --enable-PS-normalized use normalized PS fonts], dnl wxUSE_NORMALIZED_PS_FONTS) |
1048 | dnl WX_ARG_ENABLE(afmfonts, [ --enable-afmfonts use Adobe Font Metric Font table], dnl wxUSE_AFM_FOR_POSTSCRIPT) | |
9a98a854 VZ |
1049 | |
1050 | dnl --------------------------------------------------------------------------- | |
1051 | dnl resources | |
1052 | dnl --------------------------------------------------------------------------- | |
1e6feb95 | 1053 | |
1b86c3ac VZ |
1054 | WX_ARG_ENABLE(prologio, [ --enable-prologio not available; see contrib], wxUSE_PROLOGIO) |
1055 | WX_ARG_ENABLE(resources, [ --enable-resources not available; see contrib], wxUSE_RESOURCES) | |
143121c5 | 1056 | |
9a98a854 VZ |
1057 | dnl --------------------------------------------------------------------------- |
1058 | dnl IPC &c | |
1059 | dnl --------------------------------------------------------------------------- | |
9a98a854 | 1060 | |
ddb4769e | 1061 | WX_ARG_ENABLE(clipboard, [ --enable-clipboard use wxClipboard class], wxUSE_CLIPBOARD) |
143121c5 | 1062 | WX_ARG_ENABLE(dnd, [ --enable-dnd use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP) |
b64f0a5f | 1063 | WX_ARG_ENABLE(metafile, [ --enable-metafile use win32 metafiles], wxUSE_METAFILE) |
143121c5 | 1064 | |
2fc9385a | 1065 | dnl WX_ARG_ENABLE(treelayout, [ --enable-treelayout use wxTreeLayout class], wxUSE_TREELAYOUT) |
9a98a854 VZ |
1066 | |
1067 | dnl --------------------------------------------------------------------------- | |
1068 | dnl optional GUI controls (in alphabetical order except the first one) | |
1069 | dnl --------------------------------------------------------------------------- | |
1070 | ||
143121c5 | 1071 | WX_ARG_ENABLE(controls, [ --enable-controls use all usual controls], wxUSE_CONTROLS) |
9a98a854 VZ |
1072 | |
1073 | dnl even with --enable-controls, some may be disabled by giving | |
1074 | dnl --disable-<control> later on the command line - but by default all will be | |
1075 | dnl used (and vice versa) | |
1076 | if test "$wxUSE_CONTROLS" = "yes"; then | |
1077 | DEFAULT_wxUSE_ACCEL=yes | |
72045d57 | 1078 | DEFAULT_wxUSE_ANIMATIONCTRL=yes |
1e6feb95 VZ |
1079 | DEFAULT_wxUSE_BMPBUTTON=yes |
1080 | DEFAULT_wxUSE_BUTTON=yes | |
da98e9be | 1081 | DEFAULT_wxUSE_CALCTRL=yes |
9a98a854 VZ |
1082 | DEFAULT_wxUSE_CARET=yes |
1083 | DEFAULT_wxUSE_COMBOBOX=yes | |
9a98a854 VZ |
1084 | DEFAULT_wxUSE_CHECKBOX=yes |
1085 | DEFAULT_wxUSE_CHECKLISTBOX=yes | |
ce4169a4 | 1086 | DEFAULT_wxUSE_CHOICE=yes |
92bbdbcd | 1087 | DEFAULT_wxUSE_CHOICEBOOK=yes |
912c3932 | 1088 | DEFAULT_wxUSE_COLLPANE=yes |
ec376c8f VZ |
1089 | DEFAULT_wxUSE_COLOURPICKERCTRL=yes |
1090 | DEFAULT_wxUSE_COMBOBOX=yes | |
da98e9be | 1091 | DEFAULT_wxUSE_DATEPICKCTRL=yes |
ec376c8f | 1092 | DEFAULT_wxUSE_DISPLAY=yes |
88bbc332 | 1093 | DEFAULT_wxUSE_DETECT_SM=yes |
ec376c8f VZ |
1094 | DEFAULT_wxUSE_DIRPICKERCTRL=yes |
1095 | DEFAULT_wxUSE_FILEPICKERCTRL=yes | |
1096 | DEFAULT_wxUSE_FONTPICKERCTRL=yes | |
9a98a854 VZ |
1097 | DEFAULT_wxUSE_GAUGE=yes |
1098 | DEFAULT_wxUSE_GRID=yes | |
17e91437 | 1099 | DEFAULT_wxUSE_HYPERLINKCTRL=yes |
20e34ecc | 1100 | DEFAULT_wxUSE_DATAVIEWCTRL=no |
9a98a854 | 1101 | DEFAULT_wxUSE_IMAGLIST=yes |
e9c0df38 | 1102 | DEFAULT_wxUSE_LISTBOOK=yes |
9a98a854 VZ |
1103 | DEFAULT_wxUSE_LISTBOX=yes |
1104 | DEFAULT_wxUSE_LISTCTRL=yes | |
1105 | DEFAULT_wxUSE_NOTEBOOK=yes | |
1106 | DEFAULT_wxUSE_RADIOBOX=yes | |
1107 | DEFAULT_wxUSE_RADIOBTN=yes | |
1108 | DEFAULT_wxUSE_SASH=yes | |
1109 | DEFAULT_wxUSE_SCROLLBAR=yes | |
1110 | DEFAULT_wxUSE_SLIDER=yes | |
1111 | DEFAULT_wxUSE_SPINBTN=yes | |
66f38406 | 1112 | DEFAULT_wxUSE_SPINCTRL=yes |
9a98a854 VZ |
1113 | DEFAULT_wxUSE_SPLITTER=yes |
1114 | DEFAULT_wxUSE_STATBMP=yes | |
1115 | DEFAULT_wxUSE_STATBOX=yes | |
1116 | DEFAULT_wxUSE_STATLINE=yes | |
1117 | DEFAULT_wxUSE_STATUSBAR=yes | |
1118 | DEFAULT_wxUSE_TAB_DIALOG=yes | |
1db8dc4a | 1119 | DEFAULT_wxUSE_TOGGLEBTN=yes |
9a98a854 | 1120 | DEFAULT_wxUSE_TOOLBAR=yes |
360d6699 | 1121 | DEFAULT_wxUSE_TOOLBAR_NATIVE=yes |
9a98a854 | 1122 | DEFAULT_wxUSE_TOOLTIPS=yes |
eca15c0d | 1123 | DEFAULT_wxUSE_TREEBOOK=yes |
7dcea26b | 1124 | DEFAULT_wxUSE_TOOLBOOK=yes |
9a98a854 | 1125 | DEFAULT_wxUSE_TREECTRL=yes |
9f41d601 | 1126 | DEFAULT_wxUSE_POPUPWIN=yes |
0b01706f | 1127 | DEFAULT_wxUSE_TIPWINDOW=yes |
9a98a854 VZ |
1128 | elif test "$wxUSE_CONTROLS" = "no"; then |
1129 | DEFAULT_wxUSE_ACCEL=no | |
72045d57 | 1130 | DEFAULT_wxUSE_ANIMATIONCTRL=no |
1e6feb95 VZ |
1131 | DEFAULT_wxUSE_BMPBUTTON=no |
1132 | DEFAULT_wxUSE_BUTTON=no | |
1133 | DEFAULT_wxUSE_CALCTRL=no | |
9a98a854 | 1134 | DEFAULT_wxUSE_CARET=no |
912c3932 | 1135 | DEFAULT_wxUSE_COLLPANE=no |
9a98a854 | 1136 | DEFAULT_wxUSE_COMBOBOX=no |
9a98a854 VZ |
1137 | DEFAULT_wxUSE_CHECKBOX=no |
1138 | DEFAULT_wxUSE_CHECKLISTBOX=no | |
ce4169a4 | 1139 | DEFAULT_wxUSE_CHOICE=no |
92bbdbcd | 1140 | DEFAULT_wxUSE_CHOICEBOOK=no |
ec376c8f VZ |
1141 | DEFAULT_wxUSE_COLOURPICKERCTRL=no |
1142 | DEFAULT_wxUSE_COMBOBOX=no | |
da98e9be | 1143 | DEFAULT_wxUSE_DATEPICKCTRL=no |
ec376c8f | 1144 | DEFAULT_wxUSE_DISPLAY=no |
88bbc332 | 1145 | DEFAULT_wxUSE_DETECT_SM=no |
ec376c8f VZ |
1146 | DEFAULT_wxUSE_DIRPICKERCTRL=no |
1147 | DEFAULT_wxUSE_FILEPICKERCTRL=no | |
1148 | DEFAULT_wxUSE_FONTPICKERCTRL=no | |
9a98a854 VZ |
1149 | DEFAULT_wxUSE_GAUGE=no |
1150 | DEFAULT_wxUSE_GRID=no | |
17e91437 | 1151 | DEFAULT_wxUSE_HYPERLINKCTRL=no |
20e34ecc | 1152 | DEFAULT_wxUSE_DATAVIEWCTRL=no |
9a98a854 | 1153 | DEFAULT_wxUSE_IMAGLIST=no |
e9c0df38 | 1154 | DEFAULT_wxUSE_LISTBOOK=no |
9a98a854 VZ |
1155 | DEFAULT_wxUSE_LISTBOX=no |
1156 | DEFAULT_wxUSE_LISTCTRL=no | |
1157 | DEFAULT_wxUSE_NOTEBOOK=no | |
1158 | DEFAULT_wxUSE_RADIOBOX=no | |
1159 | DEFAULT_wxUSE_RADIOBTN=no | |
1160 | DEFAULT_wxUSE_SASH=no | |
1161 | DEFAULT_wxUSE_SCROLLBAR=no | |
1162 | DEFAULT_wxUSE_SLIDER=no | |
1163 | DEFAULT_wxUSE_SPINBTN=no | |
66f38406 | 1164 | DEFAULT_wxUSE_SPINCTRL=no |
9a98a854 VZ |
1165 | DEFAULT_wxUSE_SPLITTER=no |
1166 | DEFAULT_wxUSE_STATBMP=no | |
1167 | DEFAULT_wxUSE_STATBOX=no | |
1168 | DEFAULT_wxUSE_STATLINE=no | |
1169 | DEFAULT_wxUSE_STATUSBAR=no | |
1170 | DEFAULT_wxUSE_TAB_DIALOG=no | |
1db8dc4a | 1171 | DEFAULT_wxUSE_TOGGLEBTN=no |
9a98a854 | 1172 | DEFAULT_wxUSE_TOOLBAR=no |
360d6699 | 1173 | DEFAULT_wxUSE_TOOLBAR_NATIVE=no |
9a98a854 | 1174 | DEFAULT_wxUSE_TOOLTIPS=no |
eca15c0d | 1175 | DEFAULT_wxUSE_TREEBOOK=no |
7dcea26b | 1176 | DEFAULT_wxUSE_TOOLBOOK=no |
9a98a854 | 1177 | DEFAULT_wxUSE_TREECTRL=no |
9f41d601 | 1178 | DEFAULT_wxUSE_POPUPWIN=no |
0b01706f | 1179 | DEFAULT_wxUSE_TIPWINDOW=no |
9a98a854 VZ |
1180 | fi |
1181 | ||
143121c5 | 1182 | WX_ARG_ENABLE(accel, [ --enable-accel use accelerators], wxUSE_ACCEL) |
72045d57 | 1183 | WX_ARG_ENABLE(animatectrl, [ --enable-animatectrl use wxAnimationCtrl class], wxUSE_ANIMATIONCTRL) |
1e6feb95 | 1184 | WX_ARG_ENABLE(button, [ --enable-button use wxButton class], wxUSE_BUTTON) |
143121c5 | 1185 | WX_ARG_ENABLE(bmpbutton, [ --enable-bmpbutton use wxBitmapButton class], wxUSE_BMPBUTTON) |
95a46303 | 1186 | WX_ARG_ENABLE(bmpcombobox, [ --enable-bmpcombobox use wxBitmapComboBox class], wxUSE_BITMAPCOMBOBOX) |
1e6feb95 VZ |
1187 | WX_ARG_ENABLE(calendar, [ --enable-calendar use wxCalendarCtrl class], wxUSE_CALCTRL) |
1188 | WX_ARG_ENABLE(caret, [ --enable-caret use wxCaret class], wxUSE_CARET) | |
143121c5 VZ |
1189 | WX_ARG_ENABLE(checkbox, [ --enable-checkbox use wxCheckBox class], wxUSE_CHECKBOX) |
1190 | WX_ARG_ENABLE(checklst, [ --enable-checklst use wxCheckListBox (listbox with checkboxes) class], wxUSE_CHECKLST) | |
ce4169a4 | 1191 | WX_ARG_ENABLE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE) |
92bbdbcd | 1192 | WX_ARG_ENABLE(choicebook, [ --enable-choicebook use wxChoicebook class], wxUSE_CHOICEBOOK) |
912c3932 | 1193 | WX_ARG_ENABLE(collpane, [ --enable-collpane use wxCollapsiblePane class], wxUSE_COLLPANE) |
ec376c8f | 1194 | WX_ARG_ENABLE(colourpicker,[ --enable-colourpicker use wxColourPickerCtrl class], wxUSE_COLOURPICKERCTRL) |
ddb4769e | 1195 | WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox class], wxUSE_COMBOBOX) |
a57d600f | 1196 | WX_ARG_ENABLE(comboctrl, [ --enable-comboctrl use wxComboCtrl class], wxUSE_COMBOCTRL) |
da98e9be | 1197 | WX_ARG_ENABLE(datepick, [ --enable-datepick use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL) |
ec376c8f | 1198 | WX_ARG_ENABLE(dirpicker, [ --enable-dirpicker use wxDirPickerCtrl class], wxUSE_DIRPICKERCTRL) |
ddb4769e | 1199 | WX_ARG_ENABLE(display, [ --enable-display use wxDisplay class], wxUSE_DISPLAY) |
88bbc332 | 1200 | WX_ARG_ENABLE(detect_sm, [ --enable-detect_sm use code to detect X11 session manager], wxUSE_DETECT_SM) |
ec376c8f VZ |
1201 | WX_ARG_ENABLE(filepicker, [ --enable-filepicker use wxFilePickerCtrl class], wxUSE_FILEPICKERCTRL) |
1202 | WX_ARG_ENABLE(fontpicker, [ --enable-fontpicker use wxFontPickerCtrl class], wxUSE_FONTPICKERCTRL) | |
143121c5 VZ |
1203 | WX_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE) |
1204 | WX_ARG_ENABLE(grid, [ --enable-grid use wxGrid class], wxUSE_GRID) | |
20e34ecc | 1205 | WX_ARG_ENABLE(dataviewctrl,[ --enable-dataviewctrl, use wxDataViewCtrl class], wxUSE_DATAVIEWCTRL) |
17e91437 | 1206 | WX_ARG_ENABLE(hyperlink, [ --enable-hyperlink use wxHyperlinkCtrl class], wxUSE_HYPERLINKCTRL) |
143121c5 | 1207 | WX_ARG_ENABLE(imaglist, [ --enable-imaglist use wxImageList class], wxUSE_IMAGLIST) |
e9c0df38 | 1208 | WX_ARG_ENABLE(listbook, [ --enable-listbook use wxListbook class], wxUSE_LISTBOOK) |
143121c5 VZ |
1209 | WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX) |
1210 | WX_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL) | |
1211 | WX_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK) | |
a57d600f | 1212 | WX_ARG_ENABLE(odcombobox, [ --enable-odcombobox use wxOwnerDrawnComboBox class], wxUSE_ODCOMBOBOX) |
143121c5 VZ |
1213 | WX_ARG_ENABLE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX) |
1214 | WX_ARG_ENABLE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN) | |
1215 | WX_ARG_ENABLE(sash, [ --enable-sash use wxSashWindow class], wxUSE_SASH) | |
1216 | WX_ARG_ENABLE(scrollbar, [ --enable-scrollbar use wxScrollBar class and scrollable windows], wxUSE_SCROLLBAR) | |
1217 | WX_ARG_ENABLE(slider, [ --enable-slider use wxSlider class], wxUSE_SLIDER) | |
1218 | WX_ARG_ENABLE(spinbtn, [ --enable-spinbtn use wxSpinButton class], wxUSE_SPINBTN) | |
66f38406 | 1219 | WX_ARG_ENABLE(spinctrl, [ --enable-spinctrl use wxSpinCtrl class], wxUSE_SPINCTRL) |
143121c5 VZ |
1220 | WX_ARG_ENABLE(splitter, [ --enable-splitter use wxSplitterWindow class], wxUSE_SPLITTER) |
1221 | WX_ARG_ENABLE(statbmp, [ --enable-statbmp use wxStaticBitmap class], wxUSE_STATBMP) | |
1222 | WX_ARG_ENABLE(statbox, [ --enable-statbox use wxStaticBox class], wxUSE_STATBOX) | |
1223 | WX_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE) | |
1e6feb95 | 1224 | WX_ARG_ENABLE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT) |
143121c5 | 1225 | WX_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR) |
db6d3918 | 1226 | WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TAB_DIALOG) |
1e6feb95 | 1227 | WX_ARG_ENABLE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL) |
1db8dc4a | 1228 | WX_ARG_ENABLE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN) |
143121c5 | 1229 | WX_ARG_ENABLE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR) |
360d6699 | 1230 | WX_ARG_ENABLE(tbarnative, [ --enable-tbarnative use native wxToolBar class], wxUSE_TOOLBAR_NATIVE) |
eca15c0d | 1231 | WX_ARG_ENABLE(treebook, [ --enable-treebook use wxTreebook class], wxUSE_TREEBOOK) |
7dcea26b | 1232 | WX_ARG_ENABLE(toolbook, [ --enable-toolbook use wxToolbook class], wxUSE_TOOLBOOK) |
143121c5 | 1233 | WX_ARG_ENABLE(treectrl, [ --enable-treectrl use wxTreeCtrl class], wxUSE_TREECTRL) |
0b01706f | 1234 | WX_ARG_ENABLE(tipwindow, [ --enable-tipwindow use wxTipWindow class], wxUSE_TIPWINDOW) |
9f41d601 | 1235 | WX_ARG_ENABLE(popupwin, [ --enable-popupwin use wxPopUpWindow class], wxUSE_POPUPWIN) |
9a98a854 VZ |
1236 | |
1237 | dnl --------------------------------------------------------------------------- | |
b1f5d087 | 1238 | dnl common dialogs |
9a98a854 VZ |
1239 | dnl --------------------------------------------------------------------------- |
1240 | ||
b3e8d00a | 1241 | WX_ARG_ENABLE(commondlg, [ --enable-commondlg use all common dialogs], wxUSE_COMMONDLGS) |
319c5ed4 | 1242 | WX_ARG_ENABLE(aboutdlg, [ --enable-aboutdlg use wxAboutBox], wxUSE_ABOUTDLG) |
1e6feb95 VZ |
1243 | WX_ARG_ENABLE(choicedlg, [ --enable-choicedlg use wxChoiceDialog], wxUSE_CHOICEDLG) |
1244 | WX_ARG_ENABLE(coldlg, [ --enable-coldlg use wxColourDialog], wxUSE_COLOURDLG) | |
1245 | WX_ARG_ENABLE(filedlg, [ --enable-filedlg use wxFileDialog], wxUSE_FILEDLG) | |
69d27ff7 | 1246 | WX_ARG_ENABLE(finddlg, [ --enable-finddlg use wxFindReplaceDialog], wxUSE_FINDREPLDLG) |
1e6feb95 | 1247 | WX_ARG_ENABLE(fontdlg, [ --enable-fontdlg use wxFontDialog], wxUSE_FONTDLG) |
ce4169a4 | 1248 | WX_ARG_ENABLE(dirdlg, [ --enable-dirdlg use wxDirDialog], wxUSE_DIRDLG) |
1e6feb95 VZ |
1249 | WX_ARG_ENABLE(msgdlg, [ --enable-msgdlg use wxMessageDialog], wxUSE_MSGDLG) |
1250 | WX_ARG_ENABLE(numberdlg, [ --enable-numberdlg use wxNumberEntryDialog], wxUSE_NUMBERDLG) | |
cbca9943 | 1251 | WX_ARG_ENABLE(splash, [ --enable-splash use wxSplashScreen], wxUSE_SPLASH) |
c11584af | 1252 | WX_ARG_ENABLE(textdlg, [ --enable-textdlg use wxTextDialog], wxUSE_TEXTDLG) |
a641505f | 1253 | WX_ARG_ENABLE(tipdlg, [ --enable-tipdlg use startup tips], wxUSE_STARTUP_TIPS) |
ce4169a4 | 1254 | WX_ARG_ENABLE(progressdlg, [ --enable-progressdlg use wxProgressDialog], wxUSE_PROGRESSDLG) |
b1f5d087 VZ |
1255 | WX_ARG_ENABLE(wizarddlg, [ --enable-wizarddlg use wxWizard], wxUSE_WIZARDDLG) |
1256 | ||
1257 | dnl --------------------------------------------------------------------------- | |
1258 | dnl misc GUI options | |
1259 | dnl --------------------------------------------------------------------------- | |
1260 | ||
1e6feb95 | 1261 | WX_ARG_ENABLE(menus, [ --enable-menus use wxMenu/wxMenuBar/wxMenuItem classes], wxUSE_MENUS) |
143121c5 VZ |
1262 | WX_ARG_ENABLE(miniframe, [ --enable-miniframe use wxMiniFrame class], wxUSE_MINIFRAME) |
1263 | WX_ARG_ENABLE(tooltips, [ --enable-tooltips use wxToolTip class], wxUSE_TOOLTIPS) | |
1264 | WX_ARG_ENABLE(splines, [ --enable-splines use spline drawing code], wxUSE_SPLINES) | |
060e10d9 | 1265 | WX_ARG_ENABLE(mousewheel, [ --enable-mousewheel use mousewheel], wxUSE_MOUSEWHEEL) |
143121c5 | 1266 | WX_ARG_ENABLE(validators, [ --enable-validators use wxValidator and derived classes], wxUSE_VALIDATORS) |
d78b3d64 | 1267 | WX_ARG_ENABLE(busyinfo, [ --enable-busyinfo use wxBusyInfo], wxUSE_BUSYINFO) |
4cb1d3da | 1268 | WX_ARG_ENABLE(joystick, [ --enable-joystick use wxJoystick], wxUSE_JOYSTICK) |
38b4a946 | 1269 | WX_ARG_ENABLE(metafile, [ --enable-metafiles use wxMetaFile (Win32 only)], wxUSE_METAFILE) |
24fd6d87 | 1270 | WX_ARG_ENABLE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE) |
7bb2947d | 1271 | WX_ARG_ENABLE(accessibility,[ --enable-accessibility enable accessibility support], wxUSE_ACCESSIBILITY) |
143121c5 | 1272 | |
38b4a946 VZ |
1273 | if test "$wxUSE_MSW" = "1"; then |
1274 | WX_ARG_ENABLE(dccache, [ --enable-dccache cache temporary wxDC objects (Win32 only)], wxUSE_DC_CACHEING) | |
1275 | fi | |
1276 | ||
0940bcf7 HH |
1277 | dnl --------------------------------------------------------------------------- |
1278 | dnl support for image formats that do not rely on external library | |
1279 | dnl --------------------------------------------------------------------------- | |
1280 | ||
d275c7eb | 1281 | WX_ARG_ENABLE(palette, [ --enable-palette use wxPalette class], wxUSE_PALETTE) |
0046ff7c | 1282 | WX_ARG_ENABLE(image, [ --enable-image use wxImage class], wxUSE_IMAGE) |
6b5286d1 HH |
1283 | WX_ARG_ENABLE(gif, [ --enable-gif use gif images (GIF file format)], wxUSE_GIF) |
1284 | WX_ARG_ENABLE(pcx, [ --enable-pcx use pcx images (PCX file format)], wxUSE_PCX) | |
bb9e79c0 | 1285 | WX_ARG_ENABLE(tga, [ --enable-tga use tga images (TGA file format)], wxUSE_TGA) |
4b6b4dfc | 1286 | WX_ARG_ENABLE(iff, [ --enable-iff use iff images (IFF file format)], wxUSE_IFF) |
6b5286d1 | 1287 | WX_ARG_ENABLE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM) |
69d27ff7 | 1288 | WX_ARG_ENABLE(xpm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM) |
c7206e64 | 1289 | WX_ARG_ENABLE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR) |
0940bcf7 | 1290 | |
b12915c1 | 1291 | fi |
590b1a4d | 1292 | |
ceec2216 RL |
1293 | dnl --------------------------------------------------------------------------- |
1294 | dnl flavour support | |
1295 | dnl --------------------------------------------------------------------------- | |
1296 | ||
1297 | dnl Should this be --enable? I flip-flopped a couple of times and this seems | |
1298 | dnl in the spirit if not the letter, we have gtk-prefix and the like in this group. | |
1299 | dnl It doesn't actually change anything but the output file names. | |
1300 | AC_ARG_WITH(flavour, [ --with-flavour=NAME specify a name to identify this build], [WX_FLAVOUR="$withval"]) | |
1301 | ||
029b47ad VS |
1302 | dnl --------------------------------------------------------------------------- |
1303 | dnl some win32 settings | |
1304 | dnl --------------------------------------------------------------------------- | |
1305 | ||
77ffb593 | 1306 | WX_ARG_ENABLE(official_build, [ --enable-official_build official build of wxWidgets (win32 DLL only)], wxUSE_OFFICIAL_BUILD) |
029b47ad VS |
1307 | AC_ARG_ENABLE(vendor, [ --enable-vendor=VENDOR vendor name (win32 DLL only)], [VENDOR="$enableval"]) |
1308 | if test "x$VENDOR" = "x"; then | |
1309 | VENDOR="custom" | |
1310 | fi | |
1311 | ||
590b1a4d | 1312 | |
b12915c1 VZ |
1313 | dnl for GUI only |
1314 | ||
143121c5 VZ |
1315 | dnl cache the options values before (may be) aborting below |
1316 | WX_ARG_CACHE_FLUSH | |
9a98a854 VZ |
1317 | |
1318 | dnl check that no more than one toolkit is given and that if none are given that | |
1319 | dnl we have a default one | |
efeb0365 | 1320 | |
143121c5 VZ |
1321 | AC_MSG_CHECKING(for toolkit) |
1322 | ||
d1188635 JS |
1323 | # In Wine, we need to default to MSW, not GTK or MOTIF |
1324 | if test "$wxUSE_WINE" = "yes"; then | |
1325 | DEFAULT_DEFAULT_wxUSE_GTK=0 | |
1326 | DEFAULT_DEFAULT_wxUSE_MOTIF=0 | |
1327 | DEFAULT_DEFAULT_wxUSE_MSW=1 | |
d030c68a | 1328 | wxUSE_SHARED=no |
0eb69691 MW |
1329 | CC=${CC:-winegcc} |
1330 | CXX=${CXX:-wineg++} | |
d1188635 JS |
1331 | fi |
1332 | ||
f597b41c | 1333 | |
e90c1d2a VZ |
1334 | if test "$wxUSE_GUI" = "yes"; then |
1335 | ||
3a922bb4 RL |
1336 | if test "$USE_BEOS" = 1; then |
1337 | AC_MSG_ERROR([BeOS GUI is not supported yet, use --disable-gui]) | |
1338 | fi | |
b12915c1 | 1339 | |
3a922bb4 | 1340 | if test "$TOOLKIT_GIVEN" = 1; then |
f34ca037 | 1341 | dnl convert "yes", "any" or a number to 1 and "no" to 0 |
3a922bb4 RL |
1342 | for toolkit in `echo $ALL_TOOLKITS`; do |
1343 | var=wxUSE_$toolkit | |
1344 | eval "value=\$${var}" | |
f34ca037 MW |
1345 | if test "x$value" = "xno"; then |
1346 | eval "$var=0" | |
1347 | elif test "x$value" != "x"; then | |
1348 | eval "$var=1" | |
1349 | fi | |
1350 | ||
1351 | if test "x$value" != "x" -a "x$value" != "xyes" -a "x$value" != "xno"; then | |
1352 | eval "wx${toolkit}_VERSION=$value" | |
1353 | fi | |
3a922bb4 | 1354 | done |
143121c5 | 1355 | else |
3a922bb4 RL |
1356 | dnl try to guess the most apropriate toolkit for this platform |
1357 | for toolkit in `echo $ALL_TOOLKITS`; do | |
1358 | if test "$has_toolkit_in_cache" != 1; then | |
1359 | var=DEFAULT_DEFAULT_wxUSE_$toolkit | |
1360 | else | |
1361 | var=DEFAULT_wxUSE_$toolkit | |
f34ca037 MW |
1362 | |
1363 | eval "version=\$DEFAULT_wx${toolkit}_VERSION" | |
1364 | if test "x$version" != "x"; then | |
1365 | eval "wx${toolkit}_VERSION=$version" | |
1366 | fi | |
3a922bb4 RL |
1367 | fi |
1368 | eval "wxUSE_$toolkit=\$${var}" | |
1369 | done | |
143121c5 | 1370 | fi |
4c0ed911 | 1371 | |
3a922bb4 RL |
1372 | dnl we suppose that expr is available (maybe there is a better way to do |
1373 | dnl this? what about using ALL_TOOLKITS? TODO) | |
ac0c4cc3 | 1374 | NUM_TOOLKITS=`expr ${wxUSE_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_MAC:-0} \ |
b3c86150 | 1375 | + ${wxUSE_MGL:-0} + ${wxUSE_DFB:-0} + ${wxUSE_MICROWIN:-0} \ |
ac0c4cc3 | 1376 | + ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}` |
9a98a854 | 1377 | |
3a922bb4 | 1378 | dnl Allow wxUSE_PM only for OS/2 with EMX. |
3a922bb4 | 1379 | case "${host}" in |
9829f277 | 1380 | *-pc-os2_emx | *-pc-os2-emx ) |
3a922bb4 | 1381 | NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}` |
3a922bb4 | 1382 | esac |
9a98a854 | 1383 | |
3a922bb4 RL |
1384 | case "$NUM_TOOLKITS" in |
1385 | 1) | |
1386 | ;; | |
1387 | 0) | |
d74f4b5a | 1388 | AC_MSG_ERROR(Please specify a toolkit -- cannot determine the default for ${host}) |
3a922bb4 RL |
1389 | ;; |
1390 | *) | |
d74f4b5a | 1391 | AC_MSG_ERROR(Please specify at most one toolkit (maybe some are cached in configarg.cache?)) |
3a922bb4 | 1392 | esac |
143121c5 | 1393 | |
f34ca037 MW |
1394 | # to be removed when --disable-gtk2 isn't needed |
1395 | if test "x$wxUSE_GTK2" = "xyes"; then | |
1396 | wxGTK_VERSION=2 | |
1397 | elif test "x$wxUSE_GTK2" = "xno"; then | |
1398 | wxGTK_VERSION=1 | |
1399 | fi | |
1400 | ||
3a922bb4 RL |
1401 | dnl cache the wxUSE_<TOOLKIT> values too |
1402 | for toolkit in `echo $ALL_TOOLKITS`; do | |
1403 | var=wxUSE_$toolkit | |
1404 | eval "value=\$${var}" | |
1405 | if test "x$value" != x; then | |
1406 | cache_var=CACHE_$toolkit | |
1407 | eval "cache=\$${cache_var}" | |
1408 | if test "$cache" = 1; then | |
1409 | echo "$var=$value" >> ${wx_arg_cache_file} | |
f34ca037 MW |
1410 | eval "version=\$wx${toolkit}_VERSION" |
1411 | if test "x$version" != "x"; then | |
1412 | echo "wx${toolkit}_VERSION=$version" >> ${wx_arg_cache_file} | |
1413 | fi | |
3a922bb4 RL |
1414 | fi |
1415 | if test "$value" = 1; then | |
aa961a51 | 1416 | toolkit_echo=`echo $toolkit | tr "[[A-Z]]" "[[a-z]]"` |
3a922bb4 RL |
1417 | AC_MSG_RESULT($toolkit_echo) |
1418 | fi | |
1419 | fi | |
1420 | done | |
e90c1d2a | 1421 | else |
9de9b8f0 VZ |
1422 | if test "x$host_alias" != "x"; then |
1423 | AC_MSG_RESULT(base ($host_alias hosted) only) | |
1424 | else | |
1425 | AC_MSG_RESULT(base only) | |
1426 | fi | |
e90c1d2a VZ |
1427 | fi |
1428 | ||
9a98a854 VZ |
1429 | dnl --------------------------------------------------------------------------- |
1430 | dnl Checks for programs | |
1431 | dnl --------------------------------------------------------------------------- | |
1432 | ||
1433 | dnl flush the cache because checking for programs might abort | |
1434 | AC_CACHE_SAVE | |
1435 | ||
9a98a854 VZ |
1436 | dnl C-compiler checks |
1437 | dnl defines CC with the compiler to use | |
1438 | dnl defines GCC with yes if using gcc | |
1439 | dnl defines GCC empty if not using gcc | |
1440 | dnl defines CFLAGS | |
04727afd VZ |
1441 | dnl |
1442 | dnl this magic incantation is needed to prevent AC_PROG_CC from setting the | |
2b5f62a0 | 1443 | dnl default CFLAGS (something like "-g -O2") -- we don't need this as we add |
04727afd | 1444 | dnl -g and -O flags ourselves below |
ec603395 | 1445 | CFLAGS=${CFLAGS:=} |
6dcfc289 | 1446 | AC_BAKEFILE_PROG_CC |
9a98a854 | 1447 | |
9a98a854 VZ |
1448 | dnl is -traditional needed for correct compilations |
1449 | dnl adds -traditional for gcc if needed | |
1450 | AC_PROG_GCC_TRADITIONAL | |
1451 | ||
9a98a854 VZ |
1452 | dnl C++-compiler checks |
1453 | dnl defines CXX with the compiler to use | |
1454 | dnl defines GXX with yes if using gxx | |
1455 | dnl defines GXX empty if not using gxx | |
1456 | dnl defines CXXFLAGS | |
04727afd VZ |
1457 | dnl |
1458 | dnl see CFLAGS line above | |
ec603395 | 1459 | CXXFLAGS=${CXXFLAGS:=} |
6dcfc289 | 1460 | AC_BAKEFILE_PROG_CXX |
9a98a854 | 1461 | |
9a98a854 VZ |
1462 | dnl ranlib command |
1463 | dnl defines RANLIB with the appropriate command | |
1464 | AC_PROG_RANLIB | |
1465 | ||
1466 | dnl ar command | |
1467 | dnl defines AR with the appropriate command | |
8c80d384 | 1468 | AC_CHECK_TOOL(AR, ar) |
911740e7 | 1469 | if test "x$AR" = "x" ; then |
77ffb593 | 1470 | AC_MSG_ERROR([ar is needed to build wxWidgets]) |
911740e7 | 1471 | fi |
9a98a854 VZ |
1472 | |
1473 | dnl install checks | |
1474 | dnl defines INSTALL with the appropriate command | |
6054113a | 1475 | AC_PROG_INSTALL |
2e033fd1 | 1476 | |
ab9f788e SN |
1477 | dnl make install path absolute (if not already); |
1478 | dnl will fail with (some) MSDOS paths | |
2e033fd1 CE |
1479 | case ${INSTALL} in |
1480 | /* ) # Absolute | |
1481 | ;; | |
ab9f788e SN |
1482 | ?:* ) # Drive letter, considered as absolute. |
1483 | ;; | |
3bd8fb5f | 1484 | *) |
2e033fd1 CE |
1485 | INSTALL=`pwd`/${INSTALL} ;; |
1486 | esac | |
1487 | ||
1488 | ||
d6853540 RL |
1489 | case "${host}" in |
1490 | ||
b5853384 GD |
1491 | dnl The other BSD's should probably go in here too, since this is |
1492 | dnl to workaround a strange static lib BSDism. | |
1493 | dnl Mac OS X install seems to ignore -p option... | |
cfda0ea8 | 1494 | *-*-darwin* ) |
eb99ae0b GD |
1495 | INSTALL_PROGRAM="cp -fp" |
1496 | INSTALL_DATA="cp -fp" | |
d6853540 RL |
1497 | ;; |
1498 | *) | |
6054113a | 1499 | ;; |
d6853540 | 1500 | esac |
9a98a854 | 1501 | |
9a98a854 | 1502 | dnl strip command |
8c80d384 DE |
1503 | dnl defines STRIP as strip or nothing (true) if not found |
1504 | AC_CHECK_TOOL(STRIP, strip, true) | |
1505 | ||
1506 | dnl Win32 tools | |
1507 | if test "$wxUSE_WINE" = "yes"; then | |
891ace05 | 1508 | AC_CHECK_TOOL(WINDRES, wrc) |
004ee6da | 1509 | RESCOMP="$WINDRES" |
8c80d384 DE |
1510 | else |
1511 | case "${host}" in | |
1512 | *-*-cygwin* | *-*-mingw32* ) | |
891ace05 | 1513 | dnl Bakefile CVS (as of 2005-11-24) now detects windres properly |
004ee6da RL |
1514 | dnl ... maybe it does, but it does not make it available here |
1515 | dnl anymore, so do it ourselves still. | |
1516 | AC_CHECK_TOOL(WINDRES, windres) | |
1517 | RESCOMP="$WINDRES" | |
8c80d384 DE |
1518 | AC_CHECK_TOOL(DLLTOOL, dlltool) |
1519 | ;; | |
1520 | esac | |
1521 | fi | |
9a98a854 | 1522 | |
414eab6d VZ |
1523 | dnl does make support "-include" (only GNU make does AFAIK)? |
1524 | AC_CACHE_CHECK([if make is GNU make], wx_cv_prog_makeisgnu, | |
1525 | [ | |
1526 | if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null | | |
252a5022 | 1527 | $EGREP -s GNU > /dev/null); then |
414eab6d VZ |
1528 | wx_cv_prog_makeisgnu="yes" |
1529 | else | |
1530 | wx_cv_prog_makeisgnu="no" | |
1531 | fi | |
1532 | ]) | |
1533 | ||
1534 | if test "x$wx_cv_prog_makeisgnu" = "xyes"; then | |
1535 | IF_GNU_MAKE="" | |
1536 | else | |
1537 | IF_GNU_MAKE="#" | |
1538 | fi | |
1539 | ||
1540 | AC_SUBST(IF_GNU_MAKE) | |
1541 | ||
1542 | dnl we don't need to check for VPATH support in GNU make - it does have it | |
1543 | if test "x$wx_cv_prog_makeisgnu" != "xyes"; then | |
9a98a854 | 1544 | dnl check if VPATH works |
04e7a216 | 1545 | AC_CACHE_CHECK([if make supports VPATH], wx_cv_prog_makevpath, [ |
9a98a854 VZ |
1546 | dnl create Makefile |
1547 | cat - << EOF > confMake | |
1548 | check : file | |
1549 | cp \$? \$@ | |
1550 | cp \$? final_file | |
1551 | EOF | |
1552 | ||
1553 | if test ! -d sub ; then | |
1554 | mkdir sub | |
1555 | fi | |
1556 | echo dummy > sub/file | |
f6bcfd97 | 1557 | ${MAKE-make} -f confMake VPATH=sub 2>&5 > /dev/null |
9a98a854 VZ |
1558 | RESULT=$? |
1559 | rm -f sub/file check final_file confMake | |
1560 | rmdir sub | |
1561 | if test "$RESULT" = 0; then | |
04e7a216 | 1562 | wx_cv_prog_makevpath="yes" |
9a98a854 | 1563 | else |
04e7a216 VZ |
1564 | wx_cv_prog_makevpath="no" |
1565 | fi | |
1566 | ]) | |
1567 | ||
1568 | if test "x$wx_cv_prog_makevpath" != "xyes"; then | |
1569 | AC_MSG_ERROR([ | |
9a98a854 VZ |
1570 | You need a make-utility that is able to use the variable |
1571 | VPATH correctly. | |
1572 | If your version of make does not support VPATH correctly, | |
1573 | please install GNU-make (possibly as gmake), and start | |
1574 | configure with the following command: | |
1575 | export MAKE=gmake; ./configure for sh-type shells | |
1576 | setenv MAKE gmake; ./configure for csh-type shells | |
1577 | Also please do remember to use gmake in this case every time | |
1578 | you are trying to compile. | |
1e487827 | 1579 | ]) |
414eab6d VZ |
1580 | fi dnl make without VPATH |
1581 | fi dnl not GNU make | |
613d0995 | 1582 | |
c7114f59 VZ |
1583 | dnl needed for making link to setup.h |
1584 | AC_PROG_LN_S | |
1585 | ||
bcaab0f9 | 1586 | |
a3603620 SN |
1587 | dnl ------------------------------------------------------------------------ |
1588 | dnl Platform specific tests | |
1589 | dnl ------------------------------------------------------------------------ | |
1590 | ||
4a4aafb2 | 1591 | dnl xlC needs -qunique under AIX so that one source file can be |
9273ffba | 1592 | dnl compiled to multiple object files and safely linked together. |
4a4aafb2 | 1593 | if test "x$XLCXX" = "xyes" -a "x$USE_AIX" = "x1"; then |
c92ad099 | 1594 | CXXFLAGS="-qunique $CXXFLAGS" |
9273ffba DE |
1595 | fi |
1596 | ||
cfda0ea8 | 1597 | dnl This case is for PowerPC OS X vs. everything else |
4d7ec9f1 DE |
1598 | case "${host}" in |
1599 | powerpc-*-darwin* ) | |
1600 | AC_MSG_CHECKING([if __POWERPC__ is already defined]) | |
1601 | AC_TRY_COMPILE([],[#ifndef __POWERPC__ | |
1602 | choke me for lack of PowerPC | |
1603 | #endif | |
1604 | ], | |
1605 | [AC_MSG_RESULT([yes])], | |
1606 | [AC_MSG_RESULT([no]) | |
1607 | AC_DEFINE(__POWERPC__) | |
1608 | ]) | |
cfda0ea8 DE |
1609 | ;; |
1610 | esac | |
1611 | ||
1612 | dnl This case is for OS X vs. everything else | |
1613 | case "${host}" in | |
1614 | *-*-darwin* ) | |
4d7ec9f1 DE |
1615 | AC_MSG_CHECKING([if CoreFoundation/CFBase.h is usable]) |
1616 | AC_TRY_COMPILE([#include <CoreFoundation/CFBase.h> | |
1617 | ],[], | |
1618 | [AC_MSG_RESULT([yes])], | |
1619 | [AC_MSG_RESULT([no]) | |
1620 | AC_MSG_CHECKING([if __CF_USE_FRAMEWORK_INCLUDES__ is required]) | |
1621 | AC_TRY_COMPILE([#define __CF_USE_FRAMEWORK_INCLUDES__ | |
1622 | #include <CoreFoundation/CFBase.h> | |
1623 | ],[], | |
1624 | [AC_MSG_RESULT([yes]) | |
1625 | dnl We must use -D so source files that don't include wx/setup.h | |
1626 | dnl but do include CFBase will work. | |
c92ad099 | 1627 | CPPFLAGS="-D__CF_USE_FRAMEWORK_INCLUDES__ $CPPFLAGS"], |
4d7ec9f1 DE |
1628 | [AC_MSG_FAILURE([no. CoreFoundation not available.])] |
1629 | ) | |
1630 | ] | |
1631 | ) | |
1632 | ;; | |
1633 | esac | |
1634 | ||
4922025a VZ |
1635 | dnl Determine whether we want to use Cygwin as Windows or POSIX platform: the |
1636 | dnl latter makes more sense for wxGTK/Motif/X11 ports | |
1637 | wants_win32=0 | |
1638 | doesnt_want_win32=0 | |
1639 | case "${host}" in | |
1640 | *-*-cygwin*) | |
1641 | if test "$wxUSE_MSW" = 1 ; then | |
1642 | wants_win32=1 | |
1643 | else | |
1644 | dnl when we use cygwin compiler with -mno-cygwin option it uses mingw32 | |
1645 | dnl headers and libraries, so it's Windows-like in this case | |
1646 | AC_CACHE_CHECK([if -mno-cygwin is in effect], wx_cv_nocygwin, | |
1647 | [ | |
1648 | AC_TRY_COMPILE( | |
1649 | [], | |
1650 | [ | |
1651 | #ifdef __MINGW32__ | |
1652 | choke me | |
1653 | #endif | |
1654 | ], | |
1655 | wx_cv_nocygwin=no, | |
1656 | wx_cv_nocygwin=yes | |
1657 | ) | |
1658 | ] | |
1659 | ) | |
1660 | ||
1661 | if test "$wx_cv_nocygwin" = "yes"; then | |
1662 | wants_win32=1 | |
1663 | else | |
1664 | doesnt_want_win32=1 | |
1665 | fi | |
1666 | fi | |
1667 | if test "$wants_win32" = 1 ; then | |
1668 | BAKEFILE_FORCE_PLATFORM=win32 | |
1669 | fi | |
1670 | ;; | |
1671 | *-*-mingw*) | |
1672 | wants_win32=1 | |
1673 | ;; | |
1674 | esac | |
1675 | ||
1676 | if test "$wxUSE_WINE" = "yes"; then | |
1677 | wants_win32=1 | |
4922025a VZ |
1678 | LDFLAGS_GUI="-mwindows" |
1679 | fi | |
1680 | ||
1681 | dnl NB: The two tests bellow are *NOT* mutually exclusive! They should only | |
1682 | dnl take effect on Cygwin/Mingw and not other platforms. | |
1683 | if test "$wants_win32" = 1 ; then | |
1684 | USE_UNIX=0 | |
1685 | USE_WIN32=1 | |
1686 | AC_DEFINE(__WIN32__) | |
1687 | AC_DEFINE(__WIN95__) | |
1688 | AC_DEFINE(__WINDOWS__) | |
1689 | AC_DEFINE(__GNUWIN32__) | |
1690 | AC_DEFINE(STRICT) | |
1691 | fi | |
1692 | if test "$doesnt_want_win32" = 1 ; then | |
1693 | USE_UNIX=1 | |
1694 | USE_WIN32=0 | |
1695 | fi | |
1696 | dnl (end of Windows-only piece) | |
1697 | ||
1698 | if test "$USE_UNIX" = 1 ; then | |
1699 | wxUSE_UNIX=yes | |
1700 | AC_DEFINE(__UNIX__) | |
1701 | fi | |
1702 | ||
4d7ec9f1 | 1703 | dnl This case is for OS/2 vs. everything else |
2b5f62a0 VZ |
1704 | case "${host}" in |
1705 | *-pc-os2_emx | *-pc-os2-emx ) | |
a3603620 SN |
1706 | dnl --------------------------------------------------------------------- |
1707 | dnl When we are using gcc on OS/2, we want to be either using resources | |
1708 | dnl (PM) or a more complete POSIX emulation for Motif/GTK+/X11. | |
1709 | dnl Moreover we need to link explicitly against either stdcpp.a or | |
1710 | dnl stdcxx.a (depending on compiler version), since we are using "gcc", | |
1711 | dnl not "g++/c++". | |
1712 | dnl --------------------------------------------------------------------- | |
1713 | dnl (OS/2-only piece) | |
2b5f62a0 VZ |
1714 | if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then |
1715 | dnl More complete Unix emulation for unix-like ports | |
1716 | dnl by linking in POSIX/2's cExt (if available). | |
1717 | AC_CHECK_LIB(cExt, drand48, LIBS="$LIBS -lcExt") | |
1718 | else | |
1719 | dnl Include resources for the "native" port (wxPM). | |
1720 | RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res" | |
1721 | fi | |
7f8c0d74 SN |
1722 | dnl Check for the gcc version (and thereby for the C runtime library). |
1723 | dnl wx_cv_gccversion = EMX2 -> Standard EMX environment | |
1724 | dnl wx_cv_gccversion = EMX3 -> EMX with gcc-3.0.3 or gcc-3.2.1 | |
1725 | dnl wx_cv_gccversion = Innotek5 -> gcc-3.2.2 with Innotek libc5 | |
1726 | dnl wx_cv_gccversion = Innotek6 -> gcc-3.3.5 with Innotek libc6. | |
f47af52b | 1727 | AC_CACHE_CHECK([for gcc/libc version], wx_cv_gccversion,[ |
7f8c0d74 | 1728 | AC_TRY_RUN( |
5ff751d6 | 1729 | dnl Check the gcc version macro. |
4cbbb631 | 1730 | [ |
7f8c0d74 SN |
1731 | #include <stdio.h> |
1732 | ||
1733 | int main() | |
1734 | { | |
1735 | FILE *f=fopen("conftestval", "w"); | |
1736 | if (!f) exit(1); | |
1737 | fprintf(f, | |
4cbbb631 | 1738 | #if (__GNUC__ < 3) |
7f8c0d74 SN |
1739 | "EMX2" |
1740 | #elif (__GNUC__==3) && ((__GNUC_MINOR__ < 2) || ((__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__<2))) | |
1741 | "EMX3" | |
1742 | #elif (__GNUC__==3) && (__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__==2) | |
1743 | "Innotek5" | |
1744 | #else | |
1745 | "Innotek6" | |
4cbbb631 | 1746 | #endif |
5039a2df | 1747 | ); |
7f8c0d74 SN |
1748 | exit(0); |
1749 | } | |
4cbbb631 | 1750 | ], |
5039a2df | 1751 | wx_cv_gccversion=`cat conftestval`, |
7f8c0d74 SN |
1752 | wx_cv_gccversion="EMX2", |
1753 | dnl Compilation error: Assuming standard EMX environment | |
1754 | wx_cv_gccversion="EMX2" | |
4cbbb631 SN |
1755 | ) |
1756 | ]) | |
7f8c0d74 | 1757 | if test "$wx_cv_gccversion" = "EMX2"; then |
4cbbb631 | 1758 | LIBS="$LIBS -lstdcpp" |
dc4118b8 | 1759 | LDFLAGS="$LDFLAGS -Zsysv-signals" |
4cbbb631 | 1760 | else |
7f8c0d74 | 1761 | if test "$wx_cv_gccversion" = "EMX3"; then |
1ff6a165 | 1762 | LIBS="$LIBS -lstdcxx -lgcc" |
dc4118b8 SN |
1763 | LDFLAGS="$LDFLAGS -Zsysv-signals" |
1764 | else | |
1765 | LIBS="$LIBS -lstdc++" | |
1766 | fi | |
4cbbb631 | 1767 | fi |
f6a9b35e SN |
1768 | if test "$wxUSE_SHARED" = "yes" -a "$wxUSE_OMF" = "no"; then |
1769 | AC_MSG_WARN([Building DLLs requires OMF mode, enabled]) | |
1770 | wxUSE_OMF=yes | |
1e613d22 | 1771 | enable_omf=yes |
f6a9b35e | 1772 | fi |
a3603620 SN |
1773 | dnl (end of OS/2-only piece) |
1774 | ;; | |
1775 | *) | |
1776 | dnl --------------------------------------------------------------------- | |
1777 | dnl look for strcasecmp() in string.h and then strings.h if it's not | |
1778 | dnl there. Don't do this on OS/2, where "stricmp" is the function to be | |
1779 | dnl used. | |
1780 | dnl --------------------------------------------------------------------- | |
1781 | dnl (non-OS/2-only piece) | |
1782 | ||
a3603620 SN |
1783 | AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [ |
1784 | AC_TRY_LINK([ | |
1785 | #include <string.h> | |
1786 | ], | |
1787 | [ | |
1788 | strcasecmp("foo", "bar"); | |
1789 | ], | |
1790 | ac_cv_string_strcasecmp=yes, | |
1791 | ac_cv_string_strcasecmp=no | |
1792 | ) | |
1793 | ]) | |
1794 | ||
1795 | if test x"$ac_cv_string_strcasecmp" = "xyes"; then | |
1796 | AC_DEFINE(HAVE_STRCASECMP_IN_STRING_H) | |
1797 | else | |
1798 | AC_CACHE_CHECK([for strcasecmp() in strings.h], ac_cv_strings_strcasecmp, [ | |
1799 | AC_TRY_LINK([ | |
1800 | #include <strings.h> | |
1801 | ], | |
1802 | [ | |
1803 | strcasecmp("foo", "bar"); | |
1804 | ], | |
1805 | ac_cv_strings_strcasecmp=yes, | |
1806 | ac_cv_strings_strcasecmp=no | |
1807 | ) | |
1808 | ]) | |
1809 | ||
858e1e7c | 1810 | if test x"$ac_cv_strings_strcasecmp" = "xyes"; then |
a3603620 SN |
1811 | AC_DEFINE(HAVE_STRCASECMP_IN_STRINGS_H) |
1812 | else | |
1813 | AC_MSG_ERROR([No case-insensitive string comparison function found.]) | |
1814 | fi | |
1815 | fi | |
1816 | ||
a3603620 | 1817 | dnl (end of non-OS/2-only piece) |
2b5f62a0 VZ |
1818 | ;; |
1819 | esac | |
2b5f62a0 | 1820 | |
21d1c967 GD |
1821 | dnl ------------------------------------------------------------------------ |
1822 | dnl Check for headers | |
1823 | dnl ------------------------------------------------------------------------ | |
1824 | ||
55e34571 | 1825 | AC_CHECK_HEADERS(stdlib.h fnmatch.h langinfo.h malloc.h unistd.h wchar.h) |
21d1c967 GD |
1826 | |
1827 | dnl maybe wchar_t is in wcstr.h if we don't have wchar.h? | |
1828 | if test "$ac_cv_header_wchar_h" != "yes"; then | |
21d1c967 GD |
1829 | AC_CHECK_HEADERS(wcstr.h) |
1830 | fi | |
1831 | ||
ab9f788e SN |
1832 | case "${host}" in |
1833 | *-pc-os2_emx | *-pc-os2-emx ) | |
7f8c0d74 SN |
1834 | dnl Explicitly link -lintl if langinfo.h is available |
1835 | dnl and intl not yet included in libc | |
1836 | if test $ac_cv_header_langinfo_h = "yes" \ | |
1837 | -a \( "$wx_cv_gccversion" = "EMX2" \ | |
1838 | -o "$wx_cv_gccversion" = "EMX3" \ | |
1839 | -o "$wx_cv_gccversion" = "Innotek5" \); then | |
ab9f788e SN |
1840 | LIBS="$LIBS -lintl" |
1841 | fi | |
1842 | ;; | |
1843 | esac | |
1542ea39 | 1844 | |
bc023abb MW |
1845 | dnl POSIX needs this for select(), but old systems don't have it |
1846 | if test "$USE_UNIX" = 1 ; then | |
1847 | AC_CHECK_HEADERS([sys/select.h]) | |
1848 | fi | |
1849 | ||
90dd450c VZ |
1850 | dnl --------------------------------------------------------------------------- |
1851 | dnl Checks for compiler characteristics | |
1852 | dnl --------------------------------------------------------------------------- | |
1853 | ||
1854 | dnl defines const to be empty if c-compiler does not support const fully | |
1855 | AC_C_CONST | |
1856 | dnl defines inline to a sensible value for the c-compiler | |
1857 | AC_C_INLINE | |
1858 | ||
1859 | dnl check the sizes of integral types (give some reasonable default values for | |
1860 | dnl cross-compiling) | |
1861 | dnl defines the size of certain types of variables in SIZEOF_<TYPE> | |
1862 | AC_CHECK_SIZEOF(char, 1) | |
1863 | AC_CHECK_SIZEOF(short, 2) | |
1864 | AC_CHECK_SIZEOF(void *, 4) | |
1865 | AC_CHECK_SIZEOF(int, 4) | |
1866 | AC_CHECK_SIZEOF(long, 4) | |
a369f7c8 | 1867 | AC_CHECK_SIZEOF(size_t, 4) |
90dd450c VZ |
1868 | |
1869 | case "${host}" in | |
1870 | arm-*-linux* ) | |
1871 | AC_CHECK_SIZEOF(long long, 8) | |
1872 | ;; | |
4f57cf11 GD |
1873 | *-hp-hpux* ) |
1874 | AC_CHECK_SIZEOF(long long, 0) | |
1875 | if test "$ac_cv_sizeof_long_long" != "0"; then | |
1876 | dnl HPUX 10.20 headers need this define in order to use long long definitions | |
c92ad099 | 1877 | CPPFLAGS="-D_INCLUDE_LONGLONG $CPPFLAGS" |
4f57cf11 GD |
1878 | fi |
1879 | ;; | |
90dd450c VZ |
1880 | * ) |
1881 | AC_CHECK_SIZEOF(long long, 0) | |
1882 | esac | |
1883 | ||
238ecede MW |
1884 | dnl SGI/Irix's stdio.h does not include wchar_t. Mac OS X does not provide |
1885 | dnl wchar.h and wchar_t is defined by stdlib.h (GD) | |
1886 | AC_CHECK_SIZEOF(wchar_t, 0, | |
1887 | [ | |
db6d93de MW |
1888 | /* DJGPP's wchar_t is now a keyword in C++ (still not C though) */ |
1889 | #if defined(__DJGPP__) && !( (__GNUC_MINOR__ >= 8 && __GNUC__ == 2 ) || __GNUC__ >= 3 ) | |
238ecede MW |
1890 | # error "fake wchar_t" |
1891 | #endif | |
1892 | #ifdef HAVE_WCHAR_H | |
1893 | # ifdef __CYGWIN__ | |
1894 | # include <stddef.h> | |
1895 | # endif | |
1896 | # include <wchar.h> | |
1897 | #endif | |
1898 | #ifdef HAVE_STDLIB_H | |
1899 | # include <stdlib.h> | |
1900 | #endif | |
1901 | #include <stdio.h> | |
1902 | ] | |
1903 | ) | |
61c213fe MW |
1904 | if test "$ac_cv_sizeof_wchar_t" != "0"; then |
1905 | wxUSE_WCHAR_T=yes | |
1906 | else | |
1907 | wxUSE_WCHAR_T=no | |
1908 | fi | |
90dd450c | 1909 | |
8fa53e0e VZ |
1910 | dnl checks needed to define wxVaCopy |
1911 | AC_CACHE_CHECK([for va_copy], | |
1912 | wx_cv_func_va_copy, | |
1913 | [ | |
ba3d13e1 | 1914 | AC_LINK_IFELSE([ |
8fa53e0e VZ |
1915 | #include <stdarg.h> |
1916 | void foo(char *f, ...) | |
1917 | { | |
1918 | va_list ap1, ap2; | |
1919 | va_start(ap1, f); | |
1920 | va_copy(ap2, ap1); | |
1921 | va_end(ap2); | |
1922 | va_end(ap1); | |
5886b072 VZ |
1923 | } |
1924 | int main() | |
1925 | { | |
b902e639 VZ |
1926 | foo("hi", 17); |
1927 | return 0; | |
8fa53e0e VZ |
1928 | }], |
1929 | wx_cv_func_va_copy=yes, | |
1930 | wx_cv_func_va_copy=no | |
1931 | ) | |
1932 | ] | |
1933 | ) | |
1934 | ||
1935 | if test $wx_cv_func_va_copy = "yes"; then | |
1936 | AC_DEFINE(HAVE_VA_COPY) | |
1937 | else | |
1938 | dnl try to understand how can we copy va_lists | |
1939 | AC_CACHE_CHECK([if va_list can be copied by value], | |
1940 | wx_cv_type_va_list_lvalue, | |
1941 | [ | |
1942 | AC_RUN_IFELSE([ | |
1943 | #include <stdarg.h> | |
1944 | int foo(char *f, ...) | |
1945 | { | |
1946 | va_list ap1, ap2; | |
1947 | va_start(ap1, f); | |
1948 | ap2 = ap1; | |
1949 | if ( va_arg(ap1, int) != 17 || va_arg(ap2, int) != 17 ) | |
1950 | return 1; | |
1951 | va_end(ap2); | |
1952 | va_end(ap1); | |
1953 | return 0; | |
1954 | } | |
1955 | int main() | |
1956 | { | |
1957 | return foo("hi", 17); | |
1958 | }], | |
1959 | wx_cv_type_va_list_lvalue=yes, | |
1960 | wx_cv_type_va_list_lvalue=no, | |
1961 | dnl assume most common case for cross-compiling... | |
1962 | wx_cv_type_va_list_lvalue=yes | |
1963 | ) | |
1964 | ] | |
1965 | ) | |
1966 | ||
1967 | if test $wx_cv_type_va_list_lvalue != "yes"; then | |
1968 | dnl we suppose that the only thing which can't be copied like this | |
1969 | dnl are arrays... only experience will show whether this is really true | |
1970 | AC_DEFINE(VA_LIST_IS_ARRAY) | |
1971 | fi | |
1972 | fi | |
1973 | ||
70c536f3 VZ |
1974 | dnl don't check for vararg macros if they're explicitly disabled: this is |
1975 | dnl useful if the user code using the library wants to limit itself to standard | |
1976 | dnl C++ only (e.g. is compiled with g++ -std=c++98) | |
1977 | if test "$wxUSE_VARARG_MACROS" = "yes"; then | |
1978 | ||
ca766534 VS |
1979 | dnl Check if variadic macros (C99 feature) are supported: |
1980 | AC_CACHE_CHECK( | |
1981 | [whether the compiler supports variadic macros], | |
1982 | [wx_cv_have_variadic_macros], | |
1983 | [ | |
38c6938f VZ |
1984 | dnl C compiler might support variadic macros when C++ one doesn't |
1985 | dnl (happens with gcc/g++ 2.95.4), so must use C++ one explicitly | |
1986 | AC_LANG_PUSH(C++) | |
ca766534 VS |
1987 | AC_COMPILE_IFELSE( |
1988 | AC_LANG_PROGRAM( | |
1989 | [ | |
1990 | #include <stdio.h> | |
1991 | #define test(fmt, ...) printf(fmt, __VA_ARGS__) | |
1992 | ], | |
1993 | [ | |
1994 | test("%s %d %p", "test", 1, 0); | |
1995 | ] | |
1996 | ), | |
1997 | [wx_cv_have_variadic_macros=yes], | |
1998 | [wx_cv_have_variadic_macros=no] | |
1999 | ) | |
38c6938f | 2000 | AC_LANG_POP() |
ca766534 VS |
2001 | ] |
2002 | ) | |
2003 | ||
2004 | if test $wx_cv_have_variadic_macros = "yes"; then | |
2005 | AC_DEFINE(HAVE_VARIADIC_MACROS) | |
2006 | fi | |
2007 | ||
70c536f3 VZ |
2008 | fi dnl wxUSE_VARARG_MACROS == yes |
2009 | ||
90dd450c VZ |
2010 | dnl check for large file support |
2011 | AC_SYS_LARGEFILE | |
2012 | ||
f02444d0 VZ |
2013 | dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command |
2014 | dnl line because otherwise the system headers risk being included before | |
2015 | dnl wx/defs.h which defines these constants leading to inconsistent | |
2016 | dnl sizeof(off_t) in different source files of the same program and linking | |
2017 | dnl problems | |
2018 | if test "x$wx_largefile" = "xyes"; then | |
e26c13cf | 2019 | if test "x$ac_cv_sys_file_offset_bits" = "x64"; then |
5ff751d6 | 2020 | WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" |
00421666 MW |
2021 | |
2022 | dnl We get "Large Files (ILP32) not supported in strict ANSI mode." | |
2023 | dnl #error from HP standard headers unless __STDC_EXT__ is defined. | |
2024 | dnl The compiler should define it automatically, but some old g++ | |
2025 | dnl versions don't define it, so test and add it if necessary. AFAIK | |
2026 | dnl the problem only affects the C++ compiler so it is added to | |
2027 | dnl CXXFLAGS only. | |
2028 | if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then | |
2029 | AC_CACHE_CHECK( | |
2030 | [if -D__STDC_EXT__ is required], | |
2031 | wx_cv_STDC_EXT_required, | |
2032 | [ | |
d0dec913 | 2033 | AC_LANG_PUSH(C++) |
00421666 MW |
2034 | AC_TRY_COMPILE( |
2035 | [], | |
2036 | [ | |
2037 | #ifndef __STDC_EXT__ | |
2038 | choke me | |
2039 | #endif | |
2040 | ], | |
2041 | wx_cv_STDC_EXT_required=no, | |
2042 | wx_cv_STDC_EXT_required=yes | |
2043 | ) | |
d0dec913 | 2044 | AC_LANG_POP() |
00421666 MW |
2045 | ] |
2046 | ) | |
2047 | if test "x$wx_cv_STDC_EXT_required" = "xyes"; then | |
5ff751d6 | 2048 | WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__" |
00421666 MW |
2049 | fi |
2050 | fi | |
f02444d0 | 2051 | else |
5ff751d6 | 2052 | WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGE_FILES" |
f02444d0 | 2053 | fi |
026d8152 SN |
2054 | dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source |
2055 | AC_FUNC_FSEEKO | |
2056 | if test "$ac_cv_sys_largefile_source" != no; then | |
5ff751d6 | 2057 | WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source" |
026d8152 | 2058 | fi |
f02444d0 VZ |
2059 | fi |
2060 | ||
90dd450c VZ |
2061 | dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling) |
2062 | WX_C_BIGENDIAN | |
2063 | ||
2064 | dnl check for iostream (as opposed to iostream.h) standard header | |
2065 | WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH)) | |
2066 | ||
2067 | dnl check whether C++ compiler supports bool built-in type | |
2068 | WX_CPP_BOOL | |
2069 | ||
986ecc86 VZ |
2070 | dnl check whether C++ compiler supports explicit keyword |
2071 | WX_CPP_EXPLICIT | |
2072 | ||
521196a2 MB |
2073 | dnl check whether C++ compiler supports C++ casts |
2074 | AC_CXX_CONST_CAST | |
4ebb542f | 2075 | AC_CXX_REINTERPRET_CAST |
ecfd48ca | 2076 | AC_CXX_STATIC_CAST |
5df6b3dc VZ |
2077 | dnl we don't use HAVE_DYNAMIC_CAST anywhere right now... |
2078 | dnl AC_CXX_DYNAMIC_CAST | |
521196a2 | 2079 | |
8bc9a2f0 MW |
2080 | dnl With Sun CC, temporaries have block scope by default. This flag is needed |
2081 | dnl to get the expression scope behaviour that conforms to the standard. | |
2082 | if test "x$SUNCXX" = xyes; then | |
c92ad099 | 2083 | CXXFLAGS="-features=tmplife $CXXFLAGS" |
8bc9a2f0 MW |
2084 | fi |
2085 | ||
9122d155 VZ |
2086 | dnl Sun X11 headers are (still, in 2005!) non-ANSI and the best they could do |
2087 | dnl was to hack their C++ compiler to accept them silently -- but C compiler | |
2088 | dnl still spits out dozens of warnings for each X include file, so suppress | |
2089 | dnl them | |
2090 | if test "x$SUNCC" = xyes; then | |
c92ad099 | 2091 | CFLAGS="-erroff=E_NO_EXPLICIT_TYPE_GIVEN $CFLAGS" |
9122d155 VZ |
2092 | fi |
2093 | ||
15b17d22 VZ |
2094 | dnl SGI mipsPro compiler gives this warning for "conversion from pointer to |
2095 | dnl same-sized integral type" even when there is an explicit cast and as there | |
2096 | dnl is no way to turn it off and there are hundreds of these warnings in wx | |
2097 | dnl sources, just turn it off for now | |
2098 | dnl | |
2099 | dnl a better long term solution would be to use #pragma set/reset woff in | |
2100 | dnl wxPtrToUInt() and use it instead of casts elsewhere | |
2101 | if test "x$SGICC" = "xyes"; then | |
c92ad099 | 2102 | CFLAGS="-woff 3970 $CFLAGS" |
15b17d22 VZ |
2103 | fi |
2104 | if test "x$SGICXX" = "xyes"; then | |
c92ad099 | 2105 | CXXFLAGS="-woff 3970 $CXXFLAGS" |
15b17d22 VZ |
2106 | fi |
2107 | ||
76f13e90 VZ |
2108 | dnl HP-UX c89/aCC compiler warnings |
2109 | if test "x$HPCC" = "xyes"; then | |
2110 | dnl 2011: "unrecognized preprocessor directive": nice warning but it's given | |
2111 | dnl even for directives inside #if which is not true (i.e. which are | |
2112 | dnl used for other compilers/OS) and so we have no way to get rid of it | |
2113 | dnl 2450: "long long is non standard" -- yes, we know | |
c92ad099 | 2114 | CFLAGS="+W 2011,2450 $CFLAGS" |
76f13e90 VZ |
2115 | fi |
2116 | if test "x$HPCXX" = "xyes"; then | |
2117 | dnl 2340: "value copied to temporary, reference to temporary used": very | |
2118 | dnl painful as triggered by any occurrence of user-defined conversion | |
c92ad099 | 2119 | CXXFLAGS="+W 2340 $CXXFLAGS" |
76f13e90 VZ |
2120 | fi |
2121 | ||
179daed8 VZ |
2122 | dnl DEC/Compaq/HP cxx warnings |
2123 | if test "x$COMPAQCXX" = "xyes"; then | |
2124 | dnl -w0 enables all warnings, then we disable some of them: | |
2125 | dnl basclsnondto: base class dtor non virtual (sometimes we do want this) | |
2126 | dnl unrimpret: "end of routine block may be unreachable" is given for | |
2127 | dnl every "if ( ) return ...; else return ...;" | |
2128 | dnl intconlosbit: "conversion to integral type of smaller size could lose | |
2129 | dnl data" this is a useful warning but there are too many of | |
2130 | dnl them for now | |
2131 | CXXFLAGS="-w0 -msg_disable basclsnondto,unrimpret,intconlosbit" | |
2132 | fi | |
2133 | ||
224d4f6d VZ |
2134 | dnl the next few tests are all for C++ features and so need to be done using |
2135 | dnl C++ compiler | |
2136 | AC_LANG_PUSH(C++) | |
2137 | ||
f56c22b4 MW |
2138 | dnl check for std::string or std::wstring |
2139 | if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then | |
f56c22b4 MW |
2140 | if test "$wxUSE_UNICODE" = "yes"; then |
2141 | std_string="std::wstring" | |
2142 | char_type="wchar_t" | |
2143 | else | |
2144 | std_string="std::string" | |
2145 | char_type="char" | |
2146 | fi | |
2147 | ||
224d4f6d | 2148 | dnl check if <string> declares std::[w]string |
d92b393c VZ |
2149 | AC_CACHE_CHECK([for $std_string in <string>], |
2150 | wx_cv_class_stdstring, | |
2151 | [ | |
2152 | AC_TRY_COMPILE([#include <string>], | |
2153 | [$std_string foo;], | |
2154 | wx_cv_class_stdstring=yes, | |
2155 | wx_cv_class_stdstring=no | |
2156 | ) | |
2157 | ] | |
2158 | ) | |
2159 | ||
2160 | if test "$wx_cv_class_stdstring" = yes; then | |
2161 | if test "$wxUSE_UNICODE" = "yes"; then | |
2162 | AC_DEFINE(HAVE_STD_WSTRING) | |
2163 | fi | |
2164 | dnl we don't need HAVE_STD_STRING, we just suppose it's available if | |
2165 | dnl wxUSE_STD_STRING==yes | |
2166 | else | |
2167 | AC_CACHE_CHECK([if std::basic_string<$char_type> works], | |
2168 | wx_cv_class_stdbasicstring, | |
2169 | [ | |
2170 | AC_TRY_COMPILE([ | |
2171 | #ifdef HAVE_WCHAR_H | |
2172 | # ifdef __CYGWIN__ | |
2173 | # include <stddef.h> | |
2174 | # endif | |
2175 | # include <wchar.h> | |
2176 | #endif | |
2177 | #ifdef HAVE_STDLIB_H | |
2178 | # include <stdlib.h> | |
2179 | #endif | |
2180 | #include <stdio.h> | |
2181 | #include <string> | |
2182 | ], | |
2183 | [std::basic_string<$char_type> foo; | |
2184 | const $char_type* dummy = foo.c_str();], | |
2185 | wx_cv_class_stdbasicstring=yes, | |
2186 | wx_cv_class_stdbasicstring=no | |
2187 | ) | |
2188 | ] | |
2189 | ) | |
2190 | ||
2191 | if test "$wx_cv_class_stdbasicstring" != yes; then | |
2192 | if test "$wxUSE_STL" = "yes"; then | |
2193 | AC_MSG_ERROR([Can't use --enable-stl without $std_string or std::basic_string<$char_type>]) | |
2194 | elif grep wxUSE_STD_STRING $wx_arg_cache_file >/dev/null; then | |
2195 | AC_MSG_ERROR([Can't use --enable-std_string without $std_string or std::basic_string<$char_type>]) | |
2196 | else | |
2197 | AC_MSG_WARN([No $std_string or std::basic_string<$char_type>, switching to --disable-std_string]) | |
2198 | wxUSE_STD_STRING=no | |
2199 | fi | |
2200 | fi | |
2201 | fi | |
0a08f02a MB |
2202 | fi |
2203 | ||
f56c22b4 | 2204 | if test "$wxUSE_STD_IOSTREAM" = "yes"; then |
f56c22b4 MW |
2205 | AC_CHECK_TYPES([std::istream, std::ostream],, |
2206 | [wxUSE_STD_IOSTREAM=no], | |
2207 | [#include <iostream>]) | |
2208 | ||
2209 | if test "$wxUSE_STD_IOSTREAM" != "yes"; then | |
4b9918c5 MW |
2210 | if grep wxUSE_STD_IOSTREAM $wx_arg_cache_file >/dev/null; then |
2211 | AC_MSG_ERROR([Can't use --enable-std_iostreams without std::istream and std::ostream]) | |
2212 | else | |
2213 | AC_MSG_WARN([No std::iostreams, switching to --disable-std_iostreams]) | |
2214 | fi | |
f56c22b4 | 2215 | fi |
f56c22b4 MW |
2216 | fi |
2217 | ||
e87b7833 | 2218 | if test "$wxUSE_STL" = "yes"; then |
e87b7833 | 2219 | dnl check for basic STL functionality |
d92b393c VZ |
2220 | AC_CACHE_CHECK([for basic STL functionality], |
2221 | wx_cv_lib_stl, | |
2222 | [AC_TRY_COMPILE([#include <string> | |
2223 | #include <functional> | |
2224 | #include <algorithm> | |
2225 | #include <vector> | |
2226 | #include <list>], | |
2227 | [std::vector<int> moo; | |
2228 | std::list<int> foo; | |
2229 | std::vector<int>::iterator it = | |
2230 | std::find_if(moo.begin(), moo.end(), | |
2231 | std::bind2nd(std::less<int>(), 3));], | |
2232 | wx_cv_lib_stl=yes, | |
d0dec913 VZ |
2233 | wx_cv_lib_stl=no |
2234 | )] | |
d92b393c VZ |
2235 | ) |
2236 | ||
2237 | if test "$wx_cv_lib_stl" != yes; then | |
2238 | AC_MSG_ERROR([Can't use --enable-stl as basic STL functionality is missing]) | |
2239 | fi | |
e87b7833 | 2240 | |
e87b7833 | 2241 | dnl check for compliant std::string::compare |
d92b393c VZ |
2242 | AC_CACHE_CHECK([for compliant std::string::compare], |
2243 | wx_cv_func_stdstring_compare, | |
2244 | [AC_TRY_COMPILE([#include <string>], | |
2245 | [std::string foo, bar; | |
2246 | foo.compare(bar); | |
2247 | foo.compare(1, 1, bar); | |
2248 | foo.compare(1, 1, bar, 1, 1); | |
2249 | foo.compare(""); | |
2250 | foo.compare(1, 1, ""); | |
2251 | foo.compare(1, 1, "", 2);], | |
2252 | wx_cv_func_stdstring_compare=yes, | |
2253 | wx_cv_func_stdstring_compare=no | |
2254 | )] | |
2255 | ) | |
2256 | ||
2257 | if test "$wx_cv_func_stdstring_compare" = yes; then | |
2258 | AC_DEFINE(HAVE_STD_STRING_COMPARE) | |
2259 | fi | |
e87b7833 | 2260 | |
bdcade0a MB |
2261 | dnl check for hash_map and hash_set headers |
2262 | AC_CHECK_HEADER([hash_map], | |
d92b393c VZ |
2263 | [AC_CACHE_CHECK([for standard hash_map and hash_set], |
2264 | wx_cv_class_stdhashmapset, | |
2265 | [AC_TRY_COMPILE([#include <hash_map> | |
2266 | #include <hash_set>], | |
2267 | [std::hash_map<double*, char*, std::hash<double*>, std::equal_to<double*> > test1; | |
2268 | std::hash_set<char*, std::hash<char*>, std::equal_to<char*> > test2;], | |
2269 | wx_cv_class_stdhashmapset=yes, | |
2270 | wx_cv_class_stdhashmapset=no) | |
2271 | ] | |
2272 | )] | |
2273 | ) | |
2274 | ||
2275 | if test "$wx_cv_class_stdhashmapset" = yes; then | |
2276 | AC_DEFINE(HAVE_HASH_MAP) | |
2277 | AC_DEFINE(HAVE_STD_HASH_MAP) | |
2278 | fi | |
bdcade0a MB |
2279 | |
2280 | AC_CHECK_HEADER([ext/hash_map], | |
d92b393c VZ |
2281 | [AC_CACHE_CHECK([for GNU hash_map and hash_set], |
2282 | wx_cv_class_gnuhashmapset, | |
2283 | [AC_TRY_COMPILE([#include <ext/hash_map> | |
2284 | #include <ext/hash_set>], | |
2285 | [__gnu_cxx::hash_map<double*, char*, __gnu_cxx::hash<double*>, std::equal_to<double*> > test1; | |
2286 | __gnu_cxx::hash_set<char*, __gnu_cxx::hash<char*>, std::equal_to<char*> > test2;], | |
2287 | wx_cv_class_gnuhashmapset=yes, | |
2288 | wx_cv_class_gnuhashmapset=no) | |
2289 | ] | |
2290 | )] | |
2291 | ) | |
2292 | ||
2293 | if test "$wx_cv_class_gnuhashmapset" = yes; then | |
2294 | AC_DEFINE(HAVE_EXT_HASH_MAP) | |
2295 | AC_DEFINE(HAVE_GNU_CXX_HASH_MAP) | |
2296 | fi | |
e87b7833 MB |
2297 | fi |
2298 | ||
224d4f6d VZ |
2299 | dnl pop C++ |
2300 | AC_LANG_POP() | |
2301 | ||
9a98a854 VZ |
2302 | dnl --------------------------------------------------------------------------- |
2303 | dnl Define search path for includes and libraries: all headers and libs will be | |
2304 | dnl looked for in all directories of this path | |
2305 | dnl --------------------------------------------------------------------------- | |
2306 | ||
2b5f62a0 VZ |
2307 | dnl Notice that /usr/include should *not* be in this list, otherwise it breaks |
2308 | dnl compilation on Solaris/AIX/... with gcc because standard (non ANSI C) | |
2309 | dnl headers are included instead of the "fixed" (ANSI-fied) gcc ones. | |
afc31813 VZ |
2310 | dnl |
2311 | dnl Also try to put all directories which may contain X11R6 before those which | |
2312 | dnl may contain X11R5/4 - we want to use R6 on machines which have both! | |
789c5f4a VZ |
2313 | dnl |
2314 | dnl In the same vein. Motif 2.1 should be tried before Motif 1.2 for the | |
2315 | dnl systems which have both (AIX 4.x does) | |
9a98a854 | 2316 | SEARCH_INCLUDE="\ |
ee31c269 VZ |
2317 | /usr/local/include \ |
2318 | \ | |
9a98a854 | 2319 | /usr/Motif-2.1/include \ |
789c5f4a | 2320 | /usr/Motif-1.2/include \ |
9a98a854 | 2321 | /usr/include/Motif1.2 \ |
9a98a854 | 2322 | \ |
9a98a854 | 2323 | /usr/dt/include \ |
afc31813 VZ |
2324 | /usr/openwin/include \ |
2325 | \ | |
9a98a854 VZ |
2326 | /usr/include/Xm \ |
2327 | \ | |
2328 | /usr/X11R6/include \ | |
afc31813 | 2329 | /usr/X11R6.4/include \ |
9a98a854 VZ |
2330 | /usr/X11R5/include \ |
2331 | /usr/X11R4/include \ | |
2332 | \ | |
9a98a854 VZ |
2333 | /usr/include/X11R6 \ |
2334 | /usr/include/X11R5 \ | |
2335 | /usr/include/X11R4 \ | |
2336 | \ | |
2337 | /usr/local/X11R6/include \ | |
2338 | /usr/local/X11R5/include \ | |
2339 | /usr/local/X11R4/include \ | |
2340 | \ | |
2341 | /usr/local/include/X11R6 \ | |
2342 | /usr/local/include/X11R5 \ | |
2343 | /usr/local/include/X11R4 \ | |
2344 | \ | |
2345 | /usr/X11/include \ | |
2346 | /usr/include/X11 \ | |
2347 | /usr/local/X11/include \ | |
2348 | /usr/local/include/X11 \ | |
2349 | \ | |
9a98a854 | 2350 | /usr/XFree86/include/X11 \ |
e051b34e MW |
2351 | /usr/pkg/include \ |
2352 | \ | |
2b5f62a0 | 2353 | /usr/openwin/share/include" |
9a98a854 | 2354 | |
c687b303 VZ |
2355 | dnl try to find out the standard lib locations for the systems with multiple |
2356 | dnl ABIs | |
0aaa804e MW |
2357 | AC_MSG_CHECKING([for libraries directory]) |
2358 | ||
c687b303 | 2359 | case "${host}" in |
0aaa804e MW |
2360 | *-*-irix6* ) |
2361 | AC_CACHE_VAL( | |
c687b303 VZ |
2362 | wx_cv_std_libpath, |
2363 | [ | |
2364 | for d in WX_STD_LIBPATH(); do | |
2365 | for e in a so sl dylib dll.a; do | |
2366 | libc="$d/libc.$e" | |
2367 | if test -f $libc; then | |
2368 | save_LIBS="$LIBS" | |
2369 | LIBS="$libc" | |
2370 | AC_LINK_IFELSE([int main() { return 0; }], | |
2371 | wx_cv_std_libpath=`echo $d | sed s@/usr/@@`) | |
2372 | LIBS="$save_LIBS" | |
2373 | if test "x$wx_cv_std_libpath" != "x"; then | |
2374 | break 2 | |
2375 | fi | |
2376 | fi | |
2377 | done | |
2378 | done | |
2379 | if test "x$wx_cv_std_libpath" = "x"; then | |
2380 | wx_cv_std_libpath="lib" | |
e7272c08 | 2381 | fi |
c687b303 VZ |
2382 | ] |
2383 | ) | |
2384 | ;; | |
2385 | ||
0aaa804e MW |
2386 | *-*-solaris2* ) |
2387 | dnl use ../lib or ../lib/64 depending on the size of void* | |
2388 | if test "$ac_cv_sizeof_void_p" = 8 -a -d "/usr/lib/64"; then | |
2389 | wx_cv_std_libpath="lib/64" | |
2390 | else | |
2391 | wx_cv_std_libpath="lib" | |
2392 | fi | |
2393 | ;; | |
2394 | ||
2395 | *-*-linux* ) | |
2396 | dnl use ../lib or ../lib64 depending on the size of void* | |
2397 | if test "$ac_cv_sizeof_void_p" = 8 -a \ | |
2398 | -d "/usr/lib64" -a ! -h "/usr/lib64"; then | |
2399 | wx_cv_std_libpath="lib64" | |
2400 | else | |
2401 | wx_cv_std_libpath="lib" | |
2402 | fi | |
2403 | ;; | |
2404 | ||
c687b303 VZ |
2405 | *) |
2406 | wx_cv_std_libpath="lib"; | |
2407 | ;; | |
2408 | esac | |
e7272c08 | 2409 | |
0aaa804e MW |
2410 | AC_MSG_RESULT($wx_cv_std_libpath) |
2411 | ||
2412 | SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` /usr/$wx_cv_std_libpath" | |
9a98a854 | 2413 | |
3eca31dc MW |
2414 | dnl Cross compiling with gcc? |
2415 | if test "$build" != "$host" -a "$GCC" = yes; then | |
2416 | dnl for gcc cross-compilers "$CC -print-prog-name=ld" prints the path to | |
2417 | dnl the linker. Stripping off the trailing '/bin/ld' gives us a candiate | |
2418 | dnl for a 'root' below which libraries and headers for the target system | |
2419 | dnl might be installed. | |
2420 | if cross_root=`$CC -print-prog-name=ld 2>/dev/null`; then | |
2421 | cross_root=`dirname $cross_root` | |
2422 | cross_root=`dirname $cross_root` | |
2423 | ||
2424 | dnl substitute this candiate root for '^/usr' in the search lists, | |
2425 | dnl strip out any that don't start '^/usr'. | |
2426 | SEARCH_LIB=`for x in $SEARCH_LIB; do echo $x; done | sed -ne "s|^/usr|$cross_root|p"` | |
2427 | SEARCH_INCLUDE=`for x in $SEARCH_INCLUDE; do echo $x; done | sed -ne "s|^/usr|$cross_root|p"` | |
e4809643 | 2428 | SEARCH_INCLUDE="$SEARCH_INCLUDE $cross_root/include" |
3eca31dc MW |
2429 | |
2430 | dnl also have pkg-config search for *.pc files under this 'root' | |
2431 | if test -z "$PKG_CONFIG_PATH"; then | |
2432 | PKG_CONFIG_PATH="$cross_root/local/lib/pkgconfig:$cross_root/lib/pkgconfig" | |
2433 | export PKG_CONFIG_PATH | |
2434 | fi | |
2435 | ||
2436 | dnl AC_PATH_XTRA doesn't work currently unless -x-includes and | |
2437 | dnl -x-libraries are given on the command line. So if they are not | |
2438 | dnl set then set them here to plausible defaults. | |
2439 | if test -z "$x_includes" -o "$x_includes" = NONE; then | |
2440 | WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, X11/Intrinsic.h) | |
2441 | x_includes=$ac_find_includes | |
2442 | fi | |
2443 | if test -z "$x_libraries" -o "$x_libraries" = NONE; then | |
2444 | WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xt) | |
2445 | x_libraries=$ac_find_libraries | |
2446 | fi | |
2447 | fi | |
2448 | fi | |
2449 | ||
9a98a854 VZ |
2450 | dnl ------------------------------------------------------------------------ |
2451 | dnl Check for libraries | |
2452 | dnl ------------------------------------------------------------------------ | |
2453 | ||
143121c5 | 2454 | dnl flush the cache because checking for libraries below might abort |
9a98a854 VZ |
2455 | AC_CACHE_SAVE |
2456 | ||
19bc6aad | 2457 | dnl check for glibc version |
efdc61a6 VZ |
2458 | dnl |
2459 | dnl VZ: I have no idea why had this check been there originally, but now | |
5c0a20c3 | 2460 | dnl we could probably do without it by just always adding _GNU_SOURCE |
32b38f99 | 2461 | if test "$USE_LINUX" = 1 -o "$USE_GNU" = 1; then |
19bc6aad VZ |
2462 | AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[ |
2463 | AC_TRY_COMPILE([#include <features.h>], | |
2464 | [ | |
efdc61a6 | 2465 | #if (__GLIBC__ < 2) || (__GLIBC_MINOR__ < 1) |
dd6abbac | 2466 | not glibc 2.1 |
19bc6aad VZ |
2467 | #endif |
2468 | ], | |
2469 | [ | |
2470 | wx_cv_lib_glibc21=yes | |
2471 | ], | |
2472 | [ | |
2473 | wx_cv_lib_glibc21=no | |
2474 | ] | |
2475 | ) | |
2476 | ]) | |
2477 | if test "$wx_cv_lib_glibc21" = "yes"; then | |
2478 | AC_DEFINE(wxHAVE_GLIBC2) | |
2479 | fi | |
2480 | fi | |
2481 | ||
5c0a20c3 VZ |
2482 | dnl we may need _GNU_SOURCE for 2 things: |
2483 | dnl | |
2484 | dnl 1. to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+ (strictly speaking we | |
2485 | dnl only need _XOPEN_SOURCE=500 but just defining this disables _BSD_SOURCE | |
2486 | dnl which breaks libtiff compilation, so it is simpler to just define | |
2487 | dnl _GNU_SOURCE to get everything) | |
2488 | dnl | |
2489 | dnl 2. for Unicode functions | |
2490 | if test "x$wx_cv_lib_glibc21" = "xyes"; then | |
2491 | if test "$wxUSE_UNICODE" = "yes" -o "$wxUSE_THREADS" = "yes"; then | |
2492 | AC_DEFINE(_GNU_SOURCE) | |
2493 | fi | |
2494 | fi | |
2495 | ||
8006bf3c VZ |
2496 | dnl Only add the -lm library if floating point functions cannot be used |
2497 | dnl without it. This check is important on cygwin because of the bizarre | |
2498 | dnl way that they have organized functions into libraries. On cygwin, both | |
2499 | dnl libc.a and libm.a are symbolic links to a single lib libcygwin.a. This | |
2500 | dnl means that | |
2501 | dnl 1) linking with -lm is not necessary, and | |
2502 | dnl 2) linking with -lm is dangerous if the order of libraries is wrong | |
2503 | dnl In particular, if you compile any program with -mno-cygwin and link with | |
2504 | dnl -lm, it will crash instantly when it is run. This happens because the | |
2505 | dnl linker incorrectly links the Cygwin libm.a (==libcygwin.a), which replaces | |
2506 | dnl the ___main function instead of allowing it to be defined by | |
2507 | dnl /usr/lib/mingw/libmingw32.a as it should be. | |
2508 | dnl | |
2509 | dnl On MacOS X, this test will find that -lm is unnecessary and leave it out. | |
2510 | dnl | |
2511 | dnl Just check a few floating point functions. If they are all found without | |
2512 | dnl -lm, then we must not need -lm. | |
2513 | have_cos=0 | |
2514 | have_floor=0 | |
2515 | AC_CHECK_FUNCS(cos, have_cos=1) | |
2516 | AC_CHECK_FUNCS(floor, have_floor=1) | |
2517 | AC_MSG_CHECKING(if floating point functions link without -lm) | |
2518 | if test "$have_cos" = 1 -a "$have_floor" = 1; then | |
2519 | AC_MSG_RESULT(yes) | |
2520 | else | |
2521 | AC_MSG_RESULT(no) | |
2522 | LIBS="$LIBS -lm" | |
2523 | # use different functions to avoid configure caching | |
2524 | have_sin=0 | |
2525 | have_ceil=0 | |
2526 | AC_CHECK_FUNCS(sin, have_sin=1) | |
2527 | AC_CHECK_FUNCS(ceil, have_ceil=1) | |
2528 | AC_MSG_CHECKING(if floating point functions link with -lm) | |
2529 | if test "$have_sin" = 1 -a "$have_ceil" = 1; then | |
2530 | AC_MSG_RESULT(yes) | |
2531 | else | |
2532 | AC_MSG_RESULT(no) | |
2533 | # not sure we should warn the user, crash, etc. | |
2534 | fi | |
2535 | fi | |
2536 | ||
ec3edcc9 VZ |
2537 | dnl check for C99 string to long long conversion functions, assume that if we |
2538 | dnl have the unsigned variants, then we have the signed ones as well | |
2539 | if test "wxUSE_UNICODE" = "yes"; then | |
fd5199d6 | 2540 | WX_CHECK_FUNCS(wcstoull) |
ec3edcc9 | 2541 | else |
fd5199d6 | 2542 | WX_CHECK_FUNCS(strtoull) |
ec3edcc9 VZ |
2543 | fi |
2544 | ||
4f14bcd8 GD |
2545 | dnl --------------------------------------------------------------------------- |
2546 | dnl Optional libraries | |
2547 | dnl | |
2548 | dnl --with-<lib>=sys | |
2549 | dnl looks for system library and fails if not found | |
2550 | dnl | |
2551 | dnl --with-<lib> | |
2552 | dnl --with-<lib>=yes | |
2553 | dnl looks for system library and, if not found, prints a warning, | |
2554 | dnl falls back to the builtin wx version, and continues configuration | |
2555 | dnl | |
2556 | dnl --with-<lib>=builtin | |
2557 | dnl uses builtin wx version without searching for system library | |
2558 | dnl | |
2559 | dnl --with-<lib>=no | |
2560 | dnl --without-<lib> | |
2561 | dnl do not use library (neither system nor builtin wx version) | |
2562 | dnl | |
2563 | dnl --------------------------------------------------------------------------- | |
2564 | ||
18dbb1f6 VZ |
2565 | dnl ------------------------------------------------------------------------ |
2566 | dnl Check for regex libraries | |
2567 | dnl ------------------------------------------------------------------------ | |
2568 | ||
18dbb1f6 | 2569 | if test "$wxUSE_REGEX" != "no"; then |
4f14bcd8 | 2570 | AC_DEFINE(wxUSE_REGEX) |
5ff751d6 | 2571 | |
30f2fa6c | 2572 | if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_REGEX" = "yes"; then |
4996f261 | 2573 | AC_MSG_WARN([Defaulting to the the builtin regex library for Unicode build.]) |
30f2fa6c VS |
2574 | wxUSE_REGEX=builtin |
2575 | fi | |
4f14bcd8 GD |
2576 | |
2577 | if test "$wxUSE_REGEX" = "sys" -o "$wxUSE_REGEX" = "yes" ; then | |
2578 | dnl according to Unix 98 specs, regcomp() is in libc but I believe that | |
2579 | dnl on some old systems it may be in libregex - check for it too? | |
ab0f0edd | 2580 | AC_CHECK_HEADER(regex.h, [AC_CHECK_FUNCS(regcomp re_search)]) |
4f14bcd8 GD |
2581 | |
2582 | if test "x$ac_cv_func_regcomp" != "xyes"; then | |
2583 | if test "$wxUSE_REGEX" = "sys" ; then | |
2584 | AC_MSG_ERROR([system regex library not found! Use --with-regex to use built-in version]) | |
2585 | else | |
a3df447d | 2586 | AC_MSG_WARN([system regex library not found, will use built-in instead]) |
4f14bcd8 GD |
2587 | wxUSE_REGEX=builtin |
2588 | fi | |
2589 | else | |
2590 | dnl we are using the system library | |
2591 | wxUSE_REGEX=sys | |
4996f261 VS |
2592 | dnl only the built-in supports advanced REs |
2593 | AC_DEFINE(WX_NO_REGEX_ADVANCED) | |
18dbb1f6 | 2594 | fi |
4f14bcd8 | 2595 | fi |
4f14bcd8 | 2596 | fi |
18dbb1f6 | 2597 | |
4f14bcd8 GD |
2598 | dnl ------------------------------------------------------------------------ |
2599 | dnl Check for zlib compression library | |
2600 | dnl ------------------------------------------------------------------------ | |
2601 | ||
4f14bcd8 GD |
2602 | ZLIB_LINK= |
2603 | if test "$wxUSE_ZLIB" != "no" ; then | |
2604 | AC_DEFINE(wxUSE_ZLIB) | |
2605 | ||
2606 | if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then | |
d775acfa VZ |
2607 | dnl don't test for zlib under Mac -- its verson there is 1.1.3 but we |
2608 | dnl should still use it because hopefully (can someone confirm this?) | |
2609 | dnl Apple did fix the security problem in it and not using the system | |
2610 | dnl library results in a whole bunch of warnings when linking with | |
2611 | dnl Carbon framework | |
2612 | if test "$USE_DARWIN" = 1; then | |
2613 | system_zlib_h_ok="yes" | |
2614 | else | |
2615 | dnl we have troubles with ancient zlib versions (e.g. 1.0.4 is | |
2616 | dnl known to not work) and although I don't know which is | |
2617 | dnl the minimal required version it's safer to test for 1.1.4 as | |
2618 | dnl it fixes a security problem in 1.1.3 -- and hopefully nobody | |
2619 | dnl has anything more ancient (1.1.3 was released in July 1998) | |
2620 | dnl anyhow | |
2621 | AC_CACHE_CHECK([for zlib.h >= 1.1.4], ac_cv_header_zlib_h, | |
ef33c576 VZ |
2622 | [AC_TRY_RUN( |
2623 | dnl zlib.h defines ZLIB_VERSION="x.y.z" | |
d775acfa | 2624 | [ |
d775acfa VZ |
2625 | #include <zlib.h> |
2626 | #include <stdio.h> | |
2627 | ||
d775acfa VZ |
2628 | int main() |
2629 | { | |
2630 | FILE *f=fopen("conftestval", "w"); | |
2631 | if (!f) exit(1); | |
2632 | fprintf(f, "%s", | |
2633 | ZLIB_VERSION[0] == '1' && | |
2634 | (ZLIB_VERSION[2] > '1' || | |
2635 | (ZLIB_VERSION[2] == '1' && | |
2636 | ZLIB_VERSION[4] >= '4')) ? "yes" : "no"); | |
2637 | exit(0); | |
2638 | } | |
d775acfa VZ |
2639 | ], |
2640 | ac_cv_header_zlib_h=`cat conftestval`, | |
2641 | ac_cv_header_zlib_h=no, | |
d1188635 JS |
2642 | dnl cross-compiling: don't have an answer, try later |
2643 | unset ac_cv_header_zlib_h | |
ef33c576 | 2644 | )] |
d643b80e | 2645 | ) |
d1188635 JS |
2646 | dnl If the test above did not come up with a value (e.g. cross |
2647 | dnl compiling) then this should give a definitive answer | |
2648 | AC_CHECK_HEADER(zlib.h) | |
d643b80e | 2649 | |
d775acfa VZ |
2650 | system_zlib_h_ok=$ac_cv_header_zlib_h |
2651 | fi | |
2652 | ||
2653 | if test "$system_zlib_h_ok" = "yes"; then | |
d643b80e VZ |
2654 | AC_CHECK_LIB(z, deflate, ZLIB_LINK=" -lz") |
2655 | fi | |
4f14bcd8 GD |
2656 | |
2657 | if test "x$ZLIB_LINK" = "x" ; then | |
2658 | if test "$wxUSE_ZLIB" = "sys" ; then | |
d643b80e | 2659 | AC_MSG_ERROR([zlib library not found or too old! Use --with-zlib=builtin to use built-in version]) |
4f14bcd8 | 2660 | else |
d643b80e | 2661 | AC_MSG_WARN([zlib library not found or too old, will use built-in instead]) |
4f14bcd8 GD |
2662 | wxUSE_ZLIB=builtin |
2663 | fi | |
2664 | else | |
2665 | dnl we are using the system library | |
2666 | wxUSE_ZLIB=sys | |
2667 | fi | |
2668 | fi | |
4f14bcd8 GD |
2669 | fi |
2670 | ||
2671 | dnl ------------------------------------------------------------------------ | |
2672 | dnl Check for png library | |
2673 | dnl ------------------------------------------------------------------------ | |
2674 | ||
4f14bcd8 GD |
2675 | PNG_LINK= |
2676 | if test "$wxUSE_LIBPNG" != "no" ; then | |
2677 | AC_DEFINE(wxUSE_LIBPNG) | |
3bd8fb5f | 2678 | |
81809c07 VS |
2679 | if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBPNG" = "builtin" ; then |
2680 | AC_MSG_WARN([wxMGL doesn't work with builtin png library, will use MGL one instead]) | |
2681 | wxUSE_LIBPNG=sys | |
2682 | fi | |
4f14bcd8 GD |
2683 | |
2684 | dnl for the check below to have a chance to succeed, we must already have | |
81809c07 VS |
2685 | dnl libz somewhere (don't do this when bulding wxMGL since its libpng |
2686 | dnl doesn't depend on zlib) | |
2687 | if test "$wxUSE_MGL" != 1 -a "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then | |
a3df447d | 2688 | AC_MSG_WARN([system png library doesn't work without system zlib, will use built-in instead]) |
4f14bcd8 GD |
2689 | wxUSE_LIBPNG=builtin |
2690 | fi | |
2691 | ||
81809c07 VS |
2692 | if test "$wxUSE_MGL" != 1 ; then |
2693 | dnl Don't check for libpng when building wxMGL, libmgl contains it | |
2694 | if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then | |
5d3f766d VZ |
2695 | dnl libpng version 0.9 is known to not work, if an even newer |
2696 | dnl version is required, just bump it up in the test below | |
2697 | AC_CACHE_CHECK([for png.h > 0.90], ac_cv_header_png_h, | |
ef33c576 VZ |
2698 | [AC_TRY_RUN( |
2699 | dnl png.h defines PNG_LIBPNG_VER=number | |
5d3f766d | 2700 | [ |
5d3f766d VZ |
2701 | #include <png.h> |
2702 | #include <stdio.h> | |
2703 | ||
2704 | int main() | |
2705 | { | |
2706 | FILE *f=fopen("conftestval", "w"); | |
2707 | if (!f) exit(1); | |
2708 | fprintf(f, "%s", | |
2709 | PNG_LIBPNG_VER > 90 ? "yes" : "no"); | |
2710 | exit(0); | |
2711 | } | |
2712 | ], | |
2713 | ac_cv_header_png_h=`cat conftestval`, | |
2714 | ac_cv_header_png_h=no, | |
d1188635 JS |
2715 | dnl cross-compiling: test (later) if we have any png.h |
2716 | unset ac_cv_header_png_h | |
ef33c576 | 2717 | )] |
5d3f766d | 2718 | ) |
d1188635 | 2719 | AC_CHECK_HEADER(png.h) |
5d3f766d VZ |
2720 | |
2721 | if test "$ac_cv_header_png_h" = "yes"; then | |
b3c7058a | 2722 | AC_CHECK_LIB(png, png_check_sig, PNG_LINK=" -lpng -lz", , [-lz -lm]) |
5d3f766d | 2723 | fi |
81809c07 VS |
2724 | |
2725 | if test "x$PNG_LINK" = "x" ; then | |
2726 | if test "$wxUSE_LIBPNG" = "sys" ; then | |
0c98a14e | 2727 | AC_MSG_ERROR([system png library not found or too old! Use --with-libpng=builtin to use built-in version]) |
81809c07 | 2728 | else |
0c98a14e | 2729 | AC_MSG_WARN([system png library not found or too old, will use built-in instead]) |
81809c07 VS |
2730 | wxUSE_LIBPNG=builtin |
2731 | fi | |
4f14bcd8 | 2732 | else |
81809c07 | 2733 | dnl we are using the system library |
2b5f62a0 | 2734 | wxUSE_LIBPNG=sys |
4f14bcd8 | 2735 | fi |
4f14bcd8 GD |
2736 | fi |
2737 | fi | |
2738 | ||
4f14bcd8 GD |
2739 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png" |
2740 | fi | |
2741 | ||
2742 | dnl ------------------------------------------------------------------------ | |
2743 | dnl Check for jpeg library | |
2744 | dnl ------------------------------------------------------------------------ | |
2745 | ||
4f14bcd8 GD |
2746 | JPEG_LINK= |
2747 | if test "$wxUSE_LIBJPEG" != "no" ; then | |
2748 | AC_DEFINE(wxUSE_LIBJPEG) | |
2749 | ||
81809c07 VS |
2750 | if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBJPEG" = "builtin" ; then |
2751 | AC_MSG_WARN([wxMGL doesn't work with builtin jpeg library, will use MGL one instead]) | |
2752 | wxUSE_LIBJPEG=sys | |
2753 | fi | |
2754 | ||
2755 | if test "$wxUSE_MGL" != 1 ; then | |
2756 | dnl Don't check for libjpeg when building wxMGL, libmgl contains it | |
2757 | if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then | |
2758 | dnl can't use AC_CHECK_HEADER as jconfig.h defines things like | |
2759 | dnl HAVE_STDLIB_H which are already defined and this provokes | |
2760 | dnl a compiler warning which configure considers as an error... | |
2761 | AC_MSG_CHECKING(for jpeglib.h) | |
2762 | AC_CACHE_VAL(ac_cv_header_jpeglib_h, | |
2763 | AC_TRY_COMPILE( | |
2764 | [ | |
2765 | #undef HAVE_STDLIB_H | |
2766 | #include <stdio.h> | |
2767 | #include <jpeglib.h> | |
2768 | ], | |
2769 | [ | |
2770 | ], | |
2771 | ac_cv_header_jpeglib_h=yes, | |
2772 | ac_cv_header_jpeglib_h=no | |
2773 | ) | |
4f14bcd8 | 2774 | ) |
81809c07 | 2775 | AC_MSG_RESULT($ac_cv_header_jpeglib_h) |
4f14bcd8 | 2776 | |
81809c07 VS |
2777 | if test "$ac_cv_header_jpeglib_h" = "yes"; then |
2778 | AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK=" -ljpeg") | |
2779 | fi | |
4f14bcd8 | 2780 | |
81809c07 VS |
2781 | if test "x$JPEG_LINK" = "x" ; then |
2782 | if test "$wxUSE_LIBJPEG" = "sys" ; then | |
2783 | AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version]) | |
2784 | else | |
2785 | AC_MSG_WARN([system jpeg library not found, will use built-in instead]) | |
2786 | wxUSE_LIBJPEG=builtin | |
2787 | fi | |
4f14bcd8 | 2788 | else |
81809c07 VS |
2789 | dnl we are using the system library |
2790 | wxUSE_LIBJPEG=sys | |
90eaf433 MW |
2791 | |
2792 | if test "$wxUSE_MSW" = 1; then | |
2793 | dnl boolean is defined by the jpeg headers and also by the | |
2794 | dnl Windows headers of some compilers. This type has been | |
2795 | dnl renamed in the builtin, so it is only an issue when | |
2796 | dnl using an external jpeg lib on Windows. | |
2797 | AC_CHECK_TYPES( | |
2798 | [boolean], | |
2799 | [ | |
2800 | AC_CHECK_SIZEOF( | |
2801 | [boolean], | |
2802 | [], | |
2803 | [ | |
2804 | #undef HAVE_BOOLEAN | |
2805 | #include <stdio.h> | |
2806 | #include <jpeglib.h> | |
2807 | ]) | |
2808 | AC_DEFINE_UNQUOTED( | |
2809 | [wxHACK_BOOLEAN], | |
2810 | [wxInt`expr 8 \* $ac_cv_sizeof_boolean`]) | |
2811 | ], | |
2812 | [], | |
2813 | [#include <windows.h>]) | |
2814 | fi | |
4f14bcd8 | 2815 | fi |
4f14bcd8 GD |
2816 | fi |
2817 | fi | |
4f14bcd8 GD |
2818 | fi |
2819 | ||
2820 | dnl ------------------------------------------------------------------------ | |
2821 | dnl Check for tiff library | |
2822 | dnl ------------------------------------------------------------------------ | |
2823 | ||
4f14bcd8 | 2824 | TIFF_LINK= |
2b5f62a0 | 2825 | TIFF_PREREQ_LINKS=-lm |
4f14bcd8 GD |
2826 | if test "$wxUSE_LIBTIFF" != "no" ; then |
2827 | AC_DEFINE(wxUSE_LIBTIFF) | |
2828 | ||
2829 | if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then | |
2b5f62a0 VZ |
2830 | dnl libtiff may depend on libjpeg and libz so use them in the test |
2831 | dnl below or it would fail | |
2832 | if test "$wxUSE_LIBJPEG" = "sys"; then | |
2833 | TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK" | |
2834 | fi | |
2835 | if test "$wxUSE_ZLIB" = "sys"; then | |
2836 | TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK" | |
2837 | fi | |
4f14bcd8 | 2838 | AC_CHECK_HEADER(tiffio.h, |
4c15b7af SN |
2839 | [ |
2840 | AC_CHECK_LIB(tiff, TIFFError, | |
2841 | TIFF_LINK=" -ltiff", | |
2842 | , | |
2843 | $TIFF_PREREQ_LINKS) | |
2844 | ] | |
4f14bcd8 GD |
2845 | ) |
2846 | ||
2847 | if test "x$TIFF_LINK" = "x" ; then | |
2848 | if test "$wxUSE_LIBTIFF" = "sys" ; then | |
2849 | AC_MSG_ERROR([system tiff library not found! Use --with-libtiff=builtin to use built-in version]) | |
2850 | else | |
a3df447d | 2851 | AC_MSG_WARN([system tiff library not found, will use built-in instead]) |
4f14bcd8 GD |
2852 | wxUSE_LIBTIFF=builtin |
2853 | fi | |
2854 | else | |
2855 | dnl we are using the system library | |
2856 | wxUSE_LIBTIFF=sys | |
2857 | fi | |
2858 | fi | |
4f14bcd8 GD |
2859 | fi |
2860 | ||
672abd7a VS |
2861 | dnl ------------------------------------------------------------------------ |
2862 | dnl Check for expat libraries | |
2863 | dnl ------------------------------------------------------------------------ | |
2864 | ||
61c213fe MW |
2865 | if test "$wxUSE_WCHAR_T" != "yes"; then |
2866 | if test "$wxUSE_EXPAT" != "no"; then | |
2867 | AC_MSG_WARN([wxWidgets requires wchar_t to use expat, disabling]) | |
2868 | wxUSE_EXPAT=no | |
2869 | fi | |
2870 | if test "$wxUSE_XML" != "no"; then | |
2871 | AC_MSG_WARN([wxWidgets requires wchar_t to use xml, disabling]) | |
2872 | wxUSE_XML=no | |
2873 | fi | |
2874 | fi | |
2875 | ||
672abd7a | 2876 | if test "$wxUSE_EXPAT" != "no"; then |
8bcf2d20 | 2877 | wxUSE_XML=yes |
672abd7a VS |
2878 | AC_DEFINE(wxUSE_EXPAT) |
2879 | AC_DEFINE(wxUSE_XML) | |
5ff751d6 VZ |
2880 | |
2881 | if test "$wxUSE_EXPAT" = "sys" -o "$wxUSE_EXPAT" = "yes" ; then | |
5f0b6dff VS |
2882 | AC_CHECK_HEADER([expat.h], [found_expat_h=1]) |
2883 | if test "x$found_expat_h" = "x1"; then | |
2884 | dnl Expat 1.95.6 comes with broken expat.h: | |
2885 | AC_CACHE_CHECK([if expat.h is valid C++ header], | |
2886 | wx_cv_expat_is_not_broken, | |
2887 | [ | |
224d4f6d | 2888 | AC_LANG_PUSH(C++) |
5f0b6dff VS |
2889 | AC_TRY_COMPILE([#include <expat.h>],[], |
2890 | wx_cv_expat_is_not_broken=yes, | |
2891 | wx_cv_expat_is_not_broken=no | |
2892 | ) | |
224d4f6d | 2893 | AC_LANG_POP() |
5f0b6dff VS |
2894 | ] |
2895 | ) | |
2896 | if test "$wx_cv_expat_is_not_broken" = "yes" ; then | |
2897 | AC_CHECK_LIB(expat, XML_ParserCreate, EXPAT_LINK=" -lexpat") | |
2898 | fi | |
672abd7a VS |
2899 | fi |
2900 | if test "x$EXPAT_LINK" = "x" ; then | |
2901 | if test "$wxUSE_EXPAT" = "sys" ; then | |
2902 | AC_MSG_ERROR([system expat library not found! Use --with-expat=builtin to use built-in version]) | |
2903 | else | |
2904 | AC_MSG_WARN([system expat library not found, will use built-in instead]) | |
2905 | wxUSE_EXPAT=builtin | |
2906 | fi | |
2907 | else | |
2908 | dnl we are using the system library | |
2909 | wxUSE_EXPAT=sys | |
2910 | fi | |
2911 | fi | |
2912 | if test "$wxUSE_EXPAT" = "builtin" ; then | |
2913 | dnl Expat needs this: | |
2914 | AC_CONFIG_SUBDIRS([src/expat]) | |
2915 | fi | |
2916 | fi | |
2917 | ||
2918 | ||
3527f29c VS |
2919 | dnl ------------------------------------------------------------------------ |
2920 | dnl Check for libmspack | |
2921 | dnl ------------------------------------------------------------------------ | |
2922 | ||
2923 | if test "$wxUSE_LIBMSPACK" != "no"; then | |
3527f29c VS |
2924 | AC_CHECK_HEADER([mspack.h], [found_mspack_h=1]) |
2925 | if test "x$found_mspack_h" = "x1"; then | |
2926 | AC_CHECK_LIB(mspack, mspack_create_chm_decompressor, | |
2927 | MSPACK_LINK=" -lmspack") | |
2928 | fi | |
2929 | if test "x$MSPACK_LINK" = "x" ; then | |
2930 | wxUSE_LIBMSPACK=no | |
3527f29c VS |
2931 | fi |
2932 | fi | |
2933 | ||
dd3a2d96 VZ |
2934 | if test "$wxUSE_LIBMSPACK" != "no"; then |
2935 | AC_DEFINE(wxUSE_LIBMSPACK) | |
dd3a2d96 VZ |
2936 | fi |
2937 | ||
3527f29c | 2938 | |
9a98a854 VZ |
2939 | dnl ---------------------------------------------------------------- |
2940 | dnl search for toolkit (widget sets) | |
2941 | dnl ---------------------------------------------------------------- | |
2942 | ||
dad6c0ea | 2943 | AFMINSTALL= |
2b5f62a0 | 2944 | WIN32INSTALL= |
dad6c0ea | 2945 | |
3a922bb4 RL |
2946 | TOOLKIT= |
2947 | TOOLKIT_INCLUDE= | |
2948 | WIDGET_SET= | |
e90c1d2a | 2949 | |
3a922bb4 RL |
2950 | dnl are we building for a win32 target environment? |
2951 | dnl If so, setup common stuff needed for both GUI and Base libs. | |
2952 | if test "$USE_WIN32" = 1 ; then | |
2953 | AC_CHECK_HEADERS(w32api.h) | |
2954 | AC_CHECK_HEADER(windows.h, [], | |
2955 | [ | |
2956 | AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h) | |
2957 | ]) | |
dad6c0ea | 2958 | |
3a922bb4 RL |
2959 | dnl --- FIXME: This is still a somewhat random list of libs, |
2960 | dnl --- some of them should probably be included conditionally. | |
b3dfbbc9 | 2961 | LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32" |
9a98a854 | 2962 | |
7bb2947d MB |
2963 | if test "$wxUSE_ACCESSIBILITY" = "yes" ; then |
2964 | LIBS="$LIBS -loleacc" | |
2965 | fi | |
2966 | ||
77e13408 RL |
2967 | case "${host}" in |
2968 | *-*-cygwin* ) | |
2969 | dnl Cygwin doesn't include these by default | |
b3dfbbc9 | 2970 | LIBS="$LIBS -lkernel32 -luser32" |
77e13408 | 2971 | esac |
7b7a7637 | 2972 | |
3a922bb4 | 2973 | dnl add extra odbc libs if we have compiled in odbc |
8647bec6 RG |
2974 | if test "$wxUSE_ODBC" = "sys" ; then |
2975 | wxUSE_ODBC = "yes" | |
2976 | fi | |
3a922bb4 | 2977 | if test "$wxUSE_ODBC" = "yes" ; then |
a72a4bfa | 2978 | LIBS=" -lodbc32 -lole32 -loleaut32 $LIBS" |
8647bec6 | 2979 | AC_DEFINE(wxUSE_ODBC) |
3a922bb4 | 2980 | fi |
8647bec6 | 2981 | dnl We might want to abort here if wxUSE_ODBC="builtin" isn't supported on msw. |
9a98a854 | 2982 | |
370d2fd7 | 2983 | dnl This one is still used by some sample makefiles. |
3a922bb4 RL |
2984 | RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__" |
2985 | RESPROGRAMOBJ="\$(PROGRAM)_resources.o" | |
2b5f62a0 | 2986 | |
004ee6da RL |
2987 | dnl This lot we export to wx-config. It must add the relevant |
2988 | dnl include directories at the point when they can be known. | |
2989 | dnl (but are these (still) required anyway?) | |
2990 | WXCONFIG_RESFLAGS="--define __WIN32__ --define __WIN95__ --define __GNUWIN32__" | |
370d2fd7 | 2991 | |
2b5f62a0 VZ |
2992 | dnl install Win32-specific files in "make install" |
2993 | WIN32INSTALL=win32install | |
5f41d1bf | 2994 | |
dcfd4ac4 MW |
2995 | dnl pbt.h is missing on Wine at least |
2996 | AC_CHECK_HEADERS(pbt.h, [], [AC_DEFINE(NEED_PBT_H)]) | |
3a922bb4 | 2997 | fi |
3f0f0161 | 2998 | |
3a922bb4 RL |
2999 | if test "$wxUSE_GUI" = "yes"; then |
3000 | USE_GUI=1 | |
a9b5e89f | 3001 | |
3a922bb4 | 3002 | GUI_TK_LIBRARY= |
32832908 | 3003 | |
3a922bb4 RL |
3004 | WXGTK12= |
3005 | WXGTK127= | |
3006 | WXGTK20= | |
16bd311d | 3007 | WXGPE= |
32832908 | 3008 | |
207bc66c RN |
3009 | if test "$wxUSE_COCOA" = 1 ; then |
3010 | if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes"; then | |
3011 | AC_MSG_WARN([Printing not supported under wxCocoa yet, disabled]) | |
3012 | wxUSE_PRINTING_ARCHITECTURE=no | |
3013 | fi | |
3014 | if test "$wxUSE_DRAG_AND_DROP" = "yes"; then | |
3015 | AC_MSG_WARN([Drag and Drop not supported under wxCocoa yet, disabled]) | |
3016 | wxUSE_DRAG_AND_DROP=no | |
3017 | fi | |
3018 | if test "$wxUSE_DRAGIMAGE" = "yes"; then | |
3019 | AC_MSG_WARN([Drag Image and DandD not supported under wxCocoa yet, disabled]) | |
3020 | wxUSE_DRAGIMAGE=no | |
3021 | fi | |
3022 | fi | |
3023 | ||
77e13408 | 3024 | if test "$wxUSE_MSW" = 1 ; then |
1e6feb95 VZ |
3025 | TOOLKIT=MSW |
3026 | GUIDIST=MSW_DIST | |
ffef10f6 VS |
3027 | |
3028 | dnl -mwindows causes a heap of other default gui libs to be linked in. | |
ffef10f6 VS |
3029 | case "${host}" in |
3030 | *-*-mingw32* ) | |
3031 | WXCONFIG_LDFLAGS_GUI="$LDFLAGS -Wl,--subsystem,windows -mwindows" | |
3032 | esac | |
7e99ad86 VZ |
3033 | fi |
3034 | ||
1e6feb95 | 3035 | if test "$wxUSE_GTK" = 1; then |
d84cedb3 | 3036 | dnl GTK+ test program must be compiled with C compiler |
8168de4c | 3037 | AC_MSG_CHECKING([for GTK+ version]) |
b9fa850d | 3038 | |
8168de4c VZ |
3039 | gtk_version_cached=1 |
3040 | AC_CACHE_VAL(wx_cv_lib_gtk, | |
3041 | [ | |
3042 | dnl stupid GTK+ AM macros produce their own messages, so we | |
3043 | dnl have to pass to the next line | |
3044 | gtk_version_cached=0 | |
d48ad9bd | 3045 | AC_MSG_RESULT() |
8168de4c | 3046 | |
3f345b47 VZ |
3047 | dnl we must link against lgthread unless the user |
3048 | dnl used --disable-threads | |
3049 | GTK_MODULES= | |
3050 | if test "$wxUSE_THREADS" = "yes"; then | |
3051 | GTK_MODULES=gthread | |
3052 | fi | |
3053 | ||
f34ca037 | 3054 | dnl detect GTK2 |
8168de4c | 3055 | wx_cv_lib_gtk= |
5001df0d MW |
3056 | if test "x$wxGTK_VERSION" != "x1" |
3057 | then | |
3058 | dnl The gthread.pc that ships with solaris returns '-mt', | |
3059 | dnl it's correct for Sun CC, but gcc requires '-pthreads'. | |
3060 | dnl So disable the compile check and remove the -mt below. | |
3061 | case "${host}" in | |
3062 | *-*-solaris2* ) | |
3063 | if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then | |
5ff751d6 | 3064 | enable_gtktest=no |
5001df0d MW |
3065 | fi |
3066 | esac | |
3067 | ||
1ae7bd02 | 3068 | AM_PATH_GTK_2_0(2.0.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES) |
5001df0d MW |
3069 | |
3070 | dnl Remove the '-mt' for gcc on solaris | |
3071 | case "${host}" in | |
3072 | *-*-solaris2* ) | |
3073 | if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then | |
3074 | GTK_CFLAGS=`echo $GTK_CFLAGS | sed 's/-mt//'` | |
3075 | GTK_LIBS=`echo $GTK_LIBS | sed 's/-mt//'` | |
3076 | fi | |
3077 | dnl solaris also requires -lX11 for static lib | |
3078 | if test "$wxUSE_SHARED" != "yes"; then | |
3079 | GTK_LIBS="$GTK_LIBS -lX11" | |
3080 | fi | |
3081 | esac | |
f597b41c MW |
3082 | fi |
3083 | ||
f34ca037 MW |
3084 | dnl detect GTK1.x |
3085 | if test -z "$wx_cv_lib_gtk"; then | |
3086 | if test "x$wxGTK_VERSION" = "x1" -o "x$wxGTK_VERSION" = "xany" ; then | |
3087 | AM_PATH_GTK(1.2.7, wx_cv_lib_gtk=1.2.7, , $GTK_MODULES) | |
8168de4c | 3088 | |
f34ca037 MW |
3089 | if test -z "$wx_cv_lib_gtk"; then |
3090 | AM_PATH_GTK(1.2.3, wx_cv_lib_gtk=1.2.3, , $GTK_MODULES) | |
3091 | fi | |
2b5f62a0 | 3092 | fi |
8168de4c VZ |
3093 | fi |
3094 | ||
3095 | if test -z "$wx_cv_lib_gtk"; then | |
3096 | dnl looks better in AC_MSG_RESULT | |
3097 | wx_cv_lib_gtk=none | |
138be253 VZ |
3098 | else |
3099 | dnl we need to cache GTK_CFLAGS and GTK_LIBS for the | |
3100 | dnl subsequent runs | |
3101 | wx_cv_cflags_gtk=$GTK_CFLAGS | |
631e67db | 3102 | wx_cv_libs_gtk=`echo $GTK_LIBS | sed -e 's/ -l[[^ ]]*cairo[[^ ]]*//g'` |
8168de4c VZ |
3103 | fi |
3104 | ] | |
3105 | ) | |
b9fa850d | 3106 | |
8168de4c VZ |
3107 | dnl if it wasn't cached, the messages from AM_PATH_GTK() above are |
3108 | dnl enough | |
3109 | if test "$gtk_version_cached" = 1; then | |
3110 | AC_MSG_RESULT($wx_cv_lib_gtk) | |
3111 | fi | |
b9fa850d | 3112 | |
8168de4c VZ |
3113 | case "$wx_cv_lib_gtk" in |
3114 | 2.0) WXGTK20=1 | |
2b5f62a0 | 3115 | TOOLKIT_VERSION=2 |
8168de4c VZ |
3116 | ;; |
3117 | 1.2.7) WXGTK127=1 | |
d1a8d972 | 3118 | WXGTK12=1 |
8168de4c VZ |
3119 | ;; |
3120 | 1.2.3) WXGTK12=1 | |
3121 | ;; | |
3122 | *) AC_MSG_ERROR([ | |
f597b41c MW |
3123 | The development files for GTK+ were not found. For GTK+ 2, please |
3124 | ensure that pkg-config is in the path and that gtk+-2.0.pc is | |
3125 | installed. For GTK+ 1.2 please check that gtk-config is in the path, | |
3126 | and that the version is 1.2.3 or above. Also check that the | |
3127 | libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config | |
3128 | --libs' are in the LD_LIBRARY_PATH or equivalent. | |
8168de4c VZ |
3129 | ]) |
3130 | ;; | |
3131 | esac | |
c596875e | 3132 | |
b13cd66e | 3133 | if test "$WXGTK20" = 1; then |
831778df | 3134 | save_CFLAGS="$CFLAGS" |
304205f1 | 3135 | save_LIBS="$LIBS" |
831778df | 3136 | CFLAGS="$wx_cv_cflags_gtk $CFLAGS" |
fb4c95cb | 3137 | LIBS="$LIBS $wx_cv_libs_gtk" |
6ebeb4c7 | 3138 | |
abc736fd MW |
3139 | dnl gtk_icon_size_lookup is not available in the GTK+ headers |
3140 | dnl that have shipped with some versions of Sun's JDS. Not using | |
3141 | dnl AC_CHECK_FUNCS here since it only checks the function exists | |
3142 | dnl in the lib (not the header). | |
58e65954 MW |
3143 | AC_CHECK_DECLS([gtk_icon_size_lookup], [], |
3144 | [AC_DEFINE(NEED_GTK_ICON_SIZE_LOOKUP)], | |
3145 | [#include <gtk/gtk.h>]) | |
6ebeb4c7 | 3146 | |
ec376c8f VZ |
3147 | dnl test if we have at least GTK+ 2.6: |
3148 | AC_MSG_CHECKING([if GTK+ is version >= 2.6]) | |
3149 | AC_TRY_COMPILE([ | |
3150 | #include <gtk/gtk.h> | |
3151 | ], | |
3152 | [ | |
3153 | #if !GTK_CHECK_VERSION(2,6,0) | |
3154 | Not GTK+ 2.6 | |
3155 | #endif | |
3156 | ], | |
3157 | [ | |
3158 | AC_DEFINE(__WXGTK26__) | |
3159 | AC_DEFINE(__WXGTK24__) | |
3160 | AC_MSG_RESULT([yes]) | |
3161 | ac_wxgtk26=1 | |
3162 | ], | |
3163 | [ | |
3164 | AC_MSG_RESULT([no]) | |
3165 | ac_wxgtk26=0 | |
3166 | ]) | |
3167 | ||
3168 | if test "$ac_wxgtk26" = 0; then | |
9755e73b VS |
3169 | dnl test if we have at least GTK+ 2.4: |
3170 | AC_MSG_CHECKING([if GTK+ is version >= 2.4]) | |
3171 | AC_TRY_COMPILE([ | |
3172 | #include <gtk/gtk.h> | |
3173 | ], | |
3174 | [ | |
3175 | #if !GTK_CHECK_VERSION(2,4,0) | |
dd6abbac | 3176 | Not GTK+ 2.4 |
9755e73b VS |
3177 | #endif |
3178 | ], | |
3179 | [ | |
3180 | AC_DEFINE(__WXGTK24__) | |
3181 | AC_MSG_RESULT([yes]) | |
3182 | ], | |
3183 | [ | |
3184 | AC_MSG_RESULT([no]) | |
3185 | ]) | |
ec376c8f | 3186 | fi |
6ebeb4c7 | 3187 | |
831778df | 3188 | CFLAGS="$save_CFLAGS" |
304205f1 | 3189 | LIBS="$save_LIBS" |
2b5f62a0 VZ |
3190 | else |
3191 | if test "$wxUSE_UNICODE" = "yes"; then | |
3192 | AC_MSG_WARN([Unicode configuration not supported with GTK+ 1.x]) | |
3193 | wxUSE_UNICODE=no | |
3194 | fi | |
bfeeb7f3 PC |
3195 | |
3196 | dnl test for XIM support in libgdk | |
3197 | AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM)) | |
2b5f62a0 VZ |
3198 | fi |
3199 | ||
3200 | dnl we need poll() in src/gtk/app.cpp (we know that Darwin doesn't | |
3201 | dnl have it but we do the check for the others) | |
3202 | if test "$USE_DARWIN" != 1; then | |
3203 | AC_CHECK_FUNCS(poll) | |
f09359cf VS |
3204 | fi |
3205 | ||
138be253 | 3206 | TOOLKIT_INCLUDE="$wx_cv_cflags_gtk" |
c74dc163 | 3207 | GUI_TK_LIBRARY="$wx_cv_libs_gtk $GUI_TK_LIBRARY" |
7799a2d7 | 3208 | |
1e6feb95 VZ |
3209 | AFMINSTALL=afminstall |
3210 | TOOLKIT=GTK | |
3211 | GUIDIST=GTK_DIST | |
9a98a854 | 3212 | |
16bd311d RR |
3213 | dnl test for external libxpm if we're configured to use it |
3214 | if test "$wxUSE_GPE" = "yes"; then | |
3215 | AC_MSG_CHECKING(for gpewidget library) | |
3216 | WX_PATH_FIND_LIBRARIES($SEARCH_LIB,gpewidget) | |
3217 | if test "$ac_find_libraries" != "" ; then | |
3218 | WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY) | |
3219 | dnl -lgpewidget must be before all GTK libs and | |
3220 | dnl we guess its path from the prefix | |
3221 | GUI_TK_LIBRARY="-L${prefix}/lib -lgpewidget $GUI_TK_LIBRARY" | |
3222 | WXGPE=1 | |
a8793ff9 | 3223 | AC_MSG_RESULT([found in $ac_find_libraries]) |
16bd311d RR |
3224 | else |
3225 | AC_MSG_RESULT(not found) | |
3226 | fi | |
3227 | ||
3228 | dnl AC_MSG_CHECKING(for gpe library) | |
3229 | dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB,gpe) | |
3230 | dnl if test "$ac_find_libraries" != "" ; then | |
3231 | dnl WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY) | |
3232 | dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lgpe" | |
a8793ff9 | 3233 | dnl AC_MSG_RESULT(found in $ac_find_libraries) |
16bd311d RR |
3234 | dnl else |
3235 | dnl AC_MSG_RESULT(not found) | |
3236 | dnl fi | |
3237 | fi | |
5a92d200 RR |
3238 | fi |
3239 | ||
1e6feb95 | 3240 | if test "$wxUSE_MGL" = 1; then |
63a76696 | 3241 | AC_MSG_CHECKING(for SciTech MGL library) |
1e6feb95 VZ |
3242 | if test "x$MGL_ROOT" = x ; then |
3243 | AC_MSG_RESULT(not found) | |
3244 | AC_MSG_ERROR([Cannot find MGL library. Make sure MGL_ROOT is set.]) | |
3245 | else | |
3246 | AC_MSG_RESULT($MGL_ROOT) | |
3247 | fi | |
5a92d200 | 3248 | |
63a76696 | 3249 | AC_MSG_CHECKING(for libmgl location) |
f9bc1684 | 3250 | dnl Find MGL library that we want |
e46d2a18 VS |
3251 | dnl FIXME_MGL - test for MGL variants for freebsd etc.; |
3252 | dnl and for non-x86 versions | |
f9bc1684 VS |
3253 | case "${host}" in |
3254 | *-*-linux* ) | |
e46d2a18 VS |
3255 | dnl glibc.so, glibc are for older versions of MGL, |
3256 | dnl x86/a, x86/so are used by >= 5.0 R11 | |
63a76696 | 3257 | if test "x$wxUSE_SHARED" = xyes ; then |
e46d2a18 | 3258 | mgl_os_candidates="linux/gcc/x86/so linux/gcc/x86/a linux/gcc/glibc.so linux/gcc/glibc" |
63a76696 | 3259 | else |
e46d2a18 | 3260 | mgl_os_candidates="linux/gcc/x86/a linux/gcc/x86/so linux/gcc/glibc linux/gcc/glibc.so" |
63a76696 | 3261 | fi |
f9bc1684 VS |
3262 | ;; |
3263 | *-pc-msdosdjgpp ) | |
63a76696 | 3264 | mgl_os_candidates="dos32/dj2" |
f9bc1684 VS |
3265 | ;; |
3266 | *) | |
3267 | AC_MSG_ERROR(This system type ${host} is not yet supported by wxMGL.) | |
3268 | esac | |
3269 | ||
3a922bb4 | 3270 | mgl_lib_type="" |
63a76696 VS |
3271 | mgl_os="" |
3272 | ||
3273 | for mgl_os_i in $mgl_os_candidates ; do | |
3274 | if test "x$mgl_os" = x ; then | |
3275 | if test "$wxUSE_DEBUG_FLAG" = yes ; then | |
3276 | if test -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.a -o \ | |
3277 | -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.so; then | |
3278 | mgl_lib_type=debug | |
3279 | mgl_os=$mgl_os_i | |
3280 | fi | |
3281 | fi | |
3282 | if test "x$mgl_lib_type" = x ; then | |
3283 | if test -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.a -o \ | |
3284 | -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.so; then | |
3285 | mgl_lib_type=release | |
3286 | mgl_os=$mgl_os_i | |
3287 | fi | |
3288 | fi | |
1e6feb95 | 3289 | fi |
63a76696 | 3290 | done |
264de0cc | 3291 | |
63a76696 VS |
3292 | if test "x$mgl_os" = x ; then |
3293 | AC_MSG_RESULT(not found) | |
3294 | AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.]) | |
3295 | fi | |
3296 | AC_MSG_RESULT("$MGL_ROOT/lib/$mgl_lib_type/$mgl_os") | |
1542ea39 | 3297 | |
1d1b75ac VZ |
3298 | wxUSE_UNIVERSAL="yes" |
3299 | ||
1e6feb95 | 3300 | TOOLKIT_INCLUDE="-I$MGL_ROOT/include" |
3a922bb4 | 3301 | GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$mgl_lib_type/$mgl_os -lmgl -lmglcpp -lpm" |
d607e6c3 | 3302 | |
1e6feb95 VZ |
3303 | AFMINSTALL=afminstall |
3304 | TOOLKIT=MGL | |
3305 | GUIDIST=MGL_DIST | |
d607e6c3 | 3306 | fi |
143121c5 | 3307 | |
b3c86150 | 3308 | if test "$wxUSE_DFB" = 1; then |
479c790c VZ |
3309 | PKG_PROG_PKG_CONFIG() |
3310 | ||
b3c86150 | 3311 | PKG_CHECK_MODULES(DIRECTFB, |
d7ae4a62 | 3312 | [directfb >= 0.9.23], |
b3c86150 VS |
3313 | [ |
3314 | wxUSE_UNIVERSAL="yes" | |
3315 | TOOLKIT_INCLUDE="$DIRECTFB_CFLAGS" | |
3316 | GUI_TK_LIBRARY="$DIRECTFB_LIBS" | |
3317 | TOOLKIT=DFB | |
3318 | GUIDIST=DFB_DIST | |
3319 | ], | |
3320 | [ | |
3321 | AC_MSG_ERROR([DirectFB not found.]) | |
3322 | ] | |
3323 | ) | |
3324 | fi | |
3325 | ||
1725144d RR |
3326 | if test "$wxUSE_MICROWIN" = 1; then |
3327 | AC_MSG_CHECKING(for MicroWindows) | |
3328 | if test "x$MICROWINDOWS" = x ; then | |
3329 | AC_MSG_RESULT(not found) | |
3330 | AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWINDOWS is set.]) | |
3331 | else | |
3332 | AC_MSG_RESULT($MICROWINDOWS) | |
3333 | fi | |
3334 | ||
3335 | if test -f $MICROWINDOWS/lib/libmwin.a; then | |
3336 | AC_MSG_RESULT(MicroWindows' libraries found.) | |
3337 | else | |
3338 | AC_MSG_ERROR([Cannot find MicroWindows libraries, make sure they are compiled.]) | |
3339 | fi | |
3340 | ||
3341 | TOOLKIT_INCLUDE="-I$MICROWINDOWS/include" | |
3342 | GUI_TK_LIBRARY="-L$MICROWINDOWS/lib -lmwin -lmwengine -mwfonts -mwdrivers -mwinlib" | |
3343 | ||
1d1b75ac VZ |
3344 | wxUSE_UNIVERSAL="yes" |
3345 | ||
1725144d RR |
3346 | AFMINSTALL=afminstall |
3347 | TOOLKIT=MICROWIN | |
3348 | GUIDIST=MICROWIN_DIST | |
1d1b75ac VZ |
3349 | |
3350 | TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMSW__ -D__WIN95__ -D__WIN32__ -DMWIN -DMICROWIN_NOCONTROLS -DMICROWIN_TODO=1" | |
1725144d RR |
3351 | fi |
3352 | ||
0acc5a40 VZ |
3353 | dnl common part of X11 and Motif port checks |
3354 | if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then | |
3355 | dnl use standard macros to check for X headers/libs, this brings | |
3356 | dnl support for the standard configure options --x-includes, | |
3357 | dnl --x-libraries and --no-x | |
7f5c07ab JS |
3358 | AC_PATH_XTRA |
3359 | ||
3360 | if test "$no_x" = "yes"; then | |
89d90d6d | 3361 | AC_MSG_ERROR([X11 not found, please use --x-includes and/or --x-libraries options (see config.log for details)]) |
7f5c07ab JS |
3362 | fi |
3363 | ||
0acc5a40 VZ |
3364 | dnl for some reason AC_PATH_XTRA seems to add -INONE and -LNONE (and |
3365 | dnl also sometimes -RNONE) to X_CFLAGS and X_LIBS respectively, filter | |
3366 | dnl this junk out | |
3367 | GUI_TK_LIBRARY=`echo $X_LIBS | sed 's/ -LNONE//' | sed 's/ -RNONE//'` | |
3368 | TOOLKIT_INCLUDE=`echo $X_CFLAGS | sed 's/ -INONE//'` | |
7f5c07ab JS |
3369 | AFMINSTALL=afminstall |
3370 | COMPILED_X_PROGRAM=0 | |
3371 | ||
0acc5a40 VZ |
3372 | fi |
3373 | ||
3374 | if test "$wxUSE_X11" = 1; then | |
256d631a | 3375 | if test "$wxUSE_NANOX" = "yes"; then |
6ec507fd JS |
3376 | AC_MSG_CHECKING(for MicroWindows/NanoX distribution) |
3377 | if test "x$MICROWIN" = x ; then | |
3378 | AC_MSG_RESULT(not found) | |
3379 | AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWIN is set.]) | |
3380 | else | |
3381 | AC_MSG_RESULT($MICROWIN) | |
c79a329d | 3382 | AC_DEFINE(wxUSE_NANOX) |
6ec507fd JS |
3383 | fi |
3384 | fi | |
3385 | ||
2b5f62a0 | 3386 | if test "$wxUSE_UNICODE" = "yes"; then |
479c790c VZ |
3387 | PKG_PROG_PKG_CONFIG() |
3388 | ||
3389 | PKG_CHECK_MODULES(PANGOX, pangox, | |
3390 | [ | |
d0dec913 | 3391 | CFLAGS="$PANGOX_CFLAGS $CFLAGS" |
479c790c VZ |
3392 | CXXFLAGS="$PANGOX_CFLAGS $CXXFLAGS" |
3393 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOX_LIBS" | |
3394 | ], | |
3395 | [ | |
3396 | AC_MSG_ERROR([pangox library not found, library cannot be compiled in Unicode mode]) | |
3397 | ] | |
3398 | ) | |
3399 | PKG_CHECK_MODULES(PANGOFT2, pangoft2, | |
3400 | [ | |
d0dec913 | 3401 | CFLAGS="$PANGOFT2_CFLAGS $CFLAGS" |
479c790c VZ |
3402 | CXXFLAGS="$PANGOFT2_CFLAGS $CXXFLAGS" |
3403 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS" | |
3404 | ], | |
3405 | [ | |
3406 | AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support]) | |
3407 | wxUSE_PRINTING_ARCHITECTURE="no" | |
3408 | ] | |
3409 | ) | |
3410 | PKG_CHECK_MODULES(PANGOXFT, pangoxft, | |
3411 | [ | |
3412 | AC_DEFINE(HAVE_PANGO_XFT) | |
d0dec913 | 3413 | CFLAGS="$PANGOXFT_CFLAGS $CFLAGS" |
479c790c VZ |
3414 | CXXFLAGS="$PANGOXFT_CFLAGS $CXXFLAGS" |
3415 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS" | |
3416 | ], | |
3417 | [ | |
3418 | AC_MSG_WARN([pangoxft library not found, library will be compiled without anti-aliasing support]) | |
3419 | ] | |
3420 | ) | |
479c790c | 3421 | save_LIBS="$LIBS" |
479c790c VZ |
3422 | LIBS="$LIBS $PANGOX_LIBS" |
3423 | AC_CHECK_FUNCS([pango_font_family_is_monospace]) | |
479c790c | 3424 | LIBS="$save_LIBS" |
2b5f62a0 VZ |
3425 | fi |
3426 | ||
1d1b75ac VZ |
3427 | wxUSE_UNIVERSAL="yes" |
3428 | ||
256d631a | 3429 | if test "$wxUSE_NANOX" = "yes"; then |
4e5a4800 | 3430 | TOOLKIT_INCLUDE="-I\$(top_srcdir)/include/wx/x11/nanox -I\$(MICROWIN)/src/include $TOOLKIT_INCLUDE" |
32b38f99 | 3431 | 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 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1" |
461e93f9 | 3432 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$(MICROWIN)/src/lib/libnano-X.a" |
6ec507fd | 3433 | else |
93a543aa | 3434 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11" |
6ec507fd JS |
3435 | fi |
3436 | ||
7f5c07ab JS |
3437 | TOOLKIT=X11 |
3438 | GUIDIST=X11_DIST | |
7f5c07ab JS |
3439 | fi |
3440 | ||
1e6feb95 | 3441 | if test "$wxUSE_MOTIF" = 1; then |
0a08f02a MB |
3442 | if test "$wxUSE_UNICODE" = "yes"; then |
3443 | AC_MSG_ERROR([Unicode configuration not supported with Motif]) | |
3444 | fi | |
3445 | ||
1e6feb95 VZ |
3446 | AC_MSG_CHECKING(for Motif/Lesstif headers) |
3447 | WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h) | |
3448 | if test "$ac_find_includes" != "" ; then | |
dd0e4a90 VZ |
3449 | AC_MSG_RESULT(found in $ac_find_includes) |
3450 | WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE) | |
3451 | TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include" | |
cd6d6d5b | 3452 | else |
d0dec913 VZ |
3453 | save_CFLAGS=$CFLAGS |
3454 | CFLAGS="$TOOLKIT_INCLUDE $CFLAGS" | |
e051b34e | 3455 | |
cd6d6d5b VZ |
3456 | AC_TRY_COMPILE( |
3457 | [ | |
3458 | #include <Xm/Xm.h> | |
3459 | ], | |
3460 | [ | |
3461 | int version; | |
cd6d6d5b VZ |
3462 | version = xmUseVersion; |
3463 | ], | |
3464 | [ | |
3465 | AC_MSG_RESULT(found in default search path) | |
3466 | COMPILED_X_PROGRAM=1 | |
3467 | ], | |
3468 | [ | |
3469 | AC_MSG_RESULT(no) | |
e051b34e | 3470 | AC_MSG_ERROR(please set CPPFLAGS to contain the location of Xm/Xm.h) |
cd6d6d5b VZ |
3471 | ] |
3472 | ) | |
e051b34e | 3473 | |
d0dec913 | 3474 | CFLAGS=$save_CFLAGS |
cd6d6d5b | 3475 | fi |
9a98a854 | 3476 | |
1e6feb95 | 3477 | |
e7272c08 VZ |
3478 | AC_MSG_CHECKING(for Motif/Lesstif library) |
3479 | WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm) | |
dd0e4a90 | 3480 | |
e7272c08 VZ |
3481 | if test "x$ac_find_libraries" != "x" ; then |
3482 | AC_MSG_RESULT(found in $ac_find_libraries) | |
3483 | ||
3484 | WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY) | |
3485 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link" | |
3486 | else | |
3487 | dnl it might happen that we found headers in one of the standard | |
3488 | dnl paths but the libs are elsewhere but still in default (linker) | |
3489 | dnl path -- try to compile a test program to check for this | |
d0dec913 VZ |
3490 | save_CFLAGS=$CFLAGS |
3491 | CFLAGS="$TOOLKIT_INCLUDE $CFLAGS" | |
214774ce MW |
3492 | save_LIBS="$LIBS" |
3493 | LIBS="$GUI_TK_LIBRARY -lXm -lXmu -lXext -lX11" | |
e7272c08 VZ |
3494 | |
3495 | AC_TRY_LINK( | |
3496 | [ | |
3497 | #include <Xm/Xm.h> | |
3498 | ], | |
3499 | [ | |
3500 | int version; | |
3501 | version = xmUseVersion; | |
3502 | ], | |
3503 | [ | |
3504 | AC_MSG_RESULT(found in default search path) | |
3505 | COMPILED_X_PROGRAM=1 | |
3506 | ], | |
3507 | [ | |
214774ce MW |
3508 | AC_MSG_RESULT(no) |
3509 | AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm) | |
3510 | ] | |
3511 | ) | |
dd0e4a90 | 3512 | |
d0dec913 | 3513 | CFLAGS=$save_CFLAGS |
214774ce | 3514 | LIBS="$save_LIBS" |
1e6feb95 VZ |
3515 | fi |
3516 | ||
6a30f1c8 MB |
3517 | AC_MSG_CHECKING([if we need -lXp and/or -lSM -lICE]) |
3518 | libp_link="" | |
3519 | libsm_ice_link="" | |
3520 | libs_found=0 | |
3521 | for libp in "" " -lXp"; do | |
3522 | if test "$libs_found" = "0"; then | |
ccabcd49 | 3523 | for libsm_ice in "" " -lSM -lICE"; do |
e26c13cf | 3524 | if test "$libs_found" = "0"; then |
6a30f1c8 | 3525 | save_LIBS="$LIBS" |
93a543aa | 3526 | LIBS="$GUI_TK_LIBRARY -lXm ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11" |
d0dec913 VZ |
3527 | save_CFLAGS=$CFLAGS |
3528 | CFLAGS="$TOOLKIT_INCLUDE $CFLAGS" | |
dd0e4a90 | 3529 | |
6a30f1c8 MB |
3530 | AC_TRY_LINK( |
3531 | [ | |
3532 | #include <Xm/Xm.h> | |
3533 | #include <Xm/List.h> | |
3534 | ], | |
3535 | [ | |
3536 | XmString string = NULL; | |
3537 | Widget w = NULL; | |
3538 | int position = 0; | |
3539 | XmListAddItem(w, string, position); | |
3540 | ], | |
3541 | [ | |
3542 | libp_link="$libp" | |
3543 | libsm_ice_link="$libsm_ice" | |
3544 | AC_MSG_RESULT( | |
3545 | [need${libp_link}${libsm_ice_link}]) | |
3546 | libs_found=1 | |
3547 | ], [] | |
3548 | ) | |
dd0e4a90 | 3549 | |
6a30f1c8 | 3550 | LIBS="$save_LIBS" |
d0dec913 | 3551 | CFLAGS=$save_CFLAGS |
6a30f1c8 MB |
3552 | fi |
3553 | done | |
3554 | fi | |
3555 | done | |
3556 | ||
3557 | if test "$libs_found" = "0"; then | |
3558 | AC_MSG_RESULT([can't find the right libraries]) | |
3559 | AC_MSG_ERROR([can't link a simple motif program]) | |
3560 | fi | |
17234b26 | 3561 | |
e08ed308 VZ |
3562 | dnl this seems to be needed under IRIX and shouldn't do any harm |
3563 | dnl elsewhere | |
3564 | AC_CHECK_LIB(Sgm, [SgCreateList], [libsgm_link=" -lSgm"]) | |
3565 | ||
d0dec913 VZ |
3566 | save_CFLAGS=$CFLAGS |
3567 | CFLAGS="$TOOLKIT_INCLUDE $CFLAGS" | |
72e4e6a3 VZ |
3568 | |
3569 | AC_CACHE_CHECK([for Motif 2], | |
3570 | wx_cv_lib_motif2, | |
3571 | AC_TRY_COMPILE([ | |
3572 | #include <Xm/Xm.h> | |
3573 | ], | |
3574 | [ | |
3575 | #if XmVersion < 2000 | |
3576 | Not Motif 2 | |
3577 | #endif | |
3578 | ], | |
3579 | wx_cv_lib_motif2="yes", | |
3580 | wx_cv_lib_motif2="no")) | |
3581 | if test "$wx_cv_lib_motif2" = "yes"; then | |
3582 | AC_DEFINE(__WXMOTIF20__,1) | |
3583 | else | |
3584 | AC_DEFINE(__WXMOTIF20__,0) | |
3585 | fi | |
3586 | ||
3587 | AC_CACHE_CHECK([whether Motif is Lesstif], | |
3588 | wx_cv_lib_lesstif, | |
3589 | AC_TRY_COMPILE([ | |
3590 | #include <Xm/Xm.h> | |
3591 | ], | |
3592 | [ | |
3593 | #if !defined(LesstifVersion) || LesstifVersion <= 0 | |
3594 | Not Lesstif | |
3595 | #endif | |
3596 | ], | |
3597 | wx_cv_lib_lesstif="yes", | |
3598 | wx_cv_lib_lesstif="no") | |
3599 | ) | |
3600 | if test "$wx_cv_lib_lesstif" = "yes"; then | |
3601 | AC_DEFINE(__WXLESSTIF__,1) | |
3602 | else | |
3603 | AC_DEFINE(__WXLESSTIF__,0) | |
3604 | fi | |
3605 | ||
d0dec913 | 3606 | CFLAGS=$save_CFLAGS |
da494b40 | 3607 | |
e08ed308 | 3608 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY${libsgm_link} -lXm${libp_link} -lXmu -lXext -lXt${libsm_ice_link} -lX11" |
1e6feb95 VZ |
3609 | TOOLKIT=MOTIF |
3610 | GUIDIST=MOTIF_DIST | |
f7f78039 MB |
3611 | fi |
3612 | ||
0acc5a40 | 3613 | dnl more tests common to X11 and Motif: |
c8818622 VZ |
3614 | if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then |
3615 | dnl test for external libxpm if we're configured to use it | |
3616 | if test "$wxUSE_LIBXPM" = "sys"; then | |
3617 | AC_MSG_CHECKING(for Xpm library) | |
3618 | WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) | |
3619 | if test "$ac_find_libraries" != "" ; then | |
3620 | WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY) | |
3621 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link" | |
a8793ff9 | 3622 | AC_MSG_RESULT(found in $ac_find_libraries) |
f7f78039 | 3623 | |
89fe663f VZ |
3624 | AC_CACHE_CHECK([for X11/xpm.h], |
3625 | wx_cv_x11_xpm_h, | |
c8818622 | 3626 | [ |
d0dec913 VZ |
3627 | save_CFLAGS=$CFLAGS |
3628 | CFLAGS="$TOOLKIT_INCLUDE $CFLAGS" | |
89fe663f VZ |
3629 | |
3630 | AC_TRY_COMPILE( | |
3631 | [ | |
3632 | #include <X11/xpm.h> | |
3633 | ], | |
3634 | [ | |
3635 | int version; | |
3636 | version = XpmLibraryVersion(); | |
3637 | ], | |
3638 | wx_cv_x11_xpm_h=yes, | |
3639 | wx_cv_x11_xpm_h=no | |
3640 | ) | |
3641 | ||
d0dec913 | 3642 | CFLAGS=$save_CFLAGS |
c8818622 VZ |
3643 | ] |
3644 | ) | |
3645 | ||
89fe663f | 3646 | if test $wx_cv_x11_xpm_h = "yes"; then |
93a543aa | 3647 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXpm" |
89fe663f VZ |
3648 | AC_DEFINE(wxHAVE_LIB_XPM) |
3649 | else | |
3650 | AC_MSG_WARN([built-in less efficient XPM decoder will be used]) | |
3651 | fi | |
c8818622 VZ |
3652 | fi |
3653 | ||
3654 | fi | |
3655 | ||
3656 | dnl XShapeQueryExtension checks: first the library, then prototype | |
3657 | AC_CHECK_LIB([Xext], [XShapeQueryExtension], | |
3658 | [ | |
3659 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXext" | |
3660 | wxHAVE_XEXT_LIB=1 | |
3661 | ], | |
3662 | [], [$GUI_TK_LIBRARY -lX11]) | |
3663 | ||
3664 | if test "$wxHAVE_XEXT_LIB" = 1; then | |
d0dec913 VZ |
3665 | save_CFLAGS="$CFLAGS" |
3666 | CFLAGS="$TOOLKIT_INCLUDE $CFLAGS" | |
c8818622 VZ |
3667 | |
3668 | AC_MSG_CHECKING([for X11/extensions/shape.h]) | |
3669 | AC_TRY_COMPILE([ | |
5ff751d6 | 3670 | #include <X11/Xlib.h> |
c8818622 VZ |
3671 | #include <X11/extensions/shape.h> |
3672 | ], | |
3673 | [ | |
3674 | int dummy1, dummy2; | |
3675 | XShapeQueryExtension((Display*)NULL, | |
3676 | (int*)NULL, (int*)NULL); | |
3677 | ], | |
3678 | [ | |
3679 | AC_DEFINE(HAVE_XSHAPE) | |
3680 | AC_MSG_RESULT([found]) | |
3681 | ], | |
3682 | [ | |
3683 | AC_MSG_RESULT([not found]) | |
3684 | ]) | |
d0dec913 | 3685 | CFLAGS="$save_CFLAGS" |
c8818622 VZ |
3686 | |
3687 | fi | |
1e6feb95 | 3688 | fi |
b4085ce6 | 3689 | |
1e6feb95 | 3690 | if test "$wxUSE_MAC" = 1; then |
8e91c6f3 VZ |
3691 | AC_MSG_CHECKING([for compiler syntax to enable Pascal strings]) |
3692 | if test "$GCC" = yes; then | |
3693 | AC_MSG_RESULT([gcc]) | |
3694 | CPPFLAGS_PASCAL="-fpascal-strings" | |
3695 | elif test "`echo $CXX | sed -e 's@.*/@@'`" = "xlC"; then | |
3696 | AC_MSG_RESULT([xlc]) | |
3697 | CPPFLAGS_PASCAL="-qmacpstr" | |
3698 | else | |
3699 | AC_MSG_RESULT([none]) | |
3700 | fi | |
3701 | ||
031e9160 | 3702 | if test "x$wxUSE_UNIX" = "xyes"; then |
c92ad099 | 3703 | CPPFLAGS="$CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon $CPPFLAGS" |
031e9160 DE |
3704 | else |
3705 | dnl platform.h needs TARGET_CARBON before setup.h | |
c92ad099 | 3706 | CPPFLAGS="$CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -DTARGET_CARBON $CPPFLAGS" |
031e9160 | 3707 | fi |
d08b457b | 3708 | |
1e6feb95 | 3709 | TOOLKIT=MAC |
683dccda | 3710 | dnl we can't call this MAC_DIST or autoconf thinks its a macro |
1e6feb95 | 3711 | GUIDIST=MACX_DIST |
cf615ebb VS |
3712 | dnl wxMac version of wxBase and wxCocoa or wxBase-only built on Darwin |
3713 | dnl are different, so they need different names: | |
dd21ced8 | 3714 | WXBASEPORT="_carbon" |
1e6feb95 | 3715 | fi |
e07802fc | 3716 | |
ac0c4cc3 | 3717 | if test "$wxUSE_COCOA" = 1; then |
ac0c4cc3 DE |
3718 | TOOLKIT=COCOA |
3719 | GUIDIST=COCOA_DIST | |
3720 | fi | |
3721 | ||
1e6feb95 VZ |
3722 | if test "$wxUSE_PM" = 1; then |
3723 | TOOLKIT=PM | |
0ed330b4 SN |
3724 | GUIDIST=PM_DIST |
3725 | AC_CACHE_CHECK([for type SPBCDATA], | |
3726 | wx_cv_spbcdata, | |
3727 | [ | |
3728 | AC_TRY_COMPILE( | |
3729 | [ | |
3730 | #define INCL_PM | |
3731 | #include <os2.h> | |
3732 | ], | |
3733 | [ | |
3734 | SPBCDATA test; | |
3735 | ], | |
3736 | wx_cv_spbcdata=yes, | |
3737 | wx_cv_spbcdata=no | |
3738 | ) | |
3739 | ] | |
3740 | ) | |
3741 | ||
3742 | if test $wx_cv_spbcdata = "yes"; then | |
3743 | AC_DEFINE(HAVE_SPBCDATA) | |
3744 | fi | |
1e6feb95 VZ |
3745 | fi |
3746 | ||
3747 | dnl the name of the directory where the files for this toolkit live | |
3a922bb4 | 3748 | if test "$TOOLKIT" = "PM" ; then |
1e6feb95 | 3749 | TOOLKIT_DIR="os2" |
f6bcfd97 | 3750 | else |
aa961a51 | 3751 | TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[[A-Z]]" "[[a-z]]"` |
1e6feb95 | 3752 | fi |
9a98a854 | 3753 | |
1e6feb95 | 3754 | if test "$wxUSE_UNIVERSAL" = "yes"; then |
3a922bb4 RL |
3755 | TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__" |
3756 | WIDGET_SET=univ | |
d9d8273d | 3757 | fi |
2224580a | 3758 | |
2224580a VZ |
3759 | dnl distribute samples/demos/utils with GUI versions |
3760 | GUIDIST="${GUIDIST} SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST" | |
3761 | DISTDIR="wx\$(TOOLKIT)" | |
e90c1d2a | 3762 | else |
dad6c0ea VZ |
3763 | USE_GUI=0 |
3764 | ||
3a922bb4 RL |
3765 | dnl this doesn't quite work right for wxBase, but the places |
3766 | dnl where it is wrong aren't fatal (yet) though. | |
07eb77a6 | 3767 | TOOLKIT_DIR="base" |
f6bcfd97 | 3768 | |
e90c1d2a | 3769 | dnl the sources, their dependenices and the headers |
3a922bb4 | 3770 | if test "$USE_WIN32" = 1 ; then |
3a922bb4 RL |
3771 | dnl yes, the toolkit for wxBase on win32 is actually MSW |
3772 | dnl wxBase on unix does not need a 'TOOLKIT' defined. | |
3773 | TOOLKIT="MSW" | |
a20b6d3a VZ |
3774 | fi |
3775 | ||
2224580a VZ |
3776 | dnl distribute only wxBase sources/headers |
3777 | GUIDIST="BASE_DIST" | |
3778 | DISTDIR="wxBase" | |
e90c1d2a VZ |
3779 | fi |
3780 | ||
4f14bcd8 GD |
3781 | dnl --------------------------------------------------------------------------- |
3782 | dnl Optional libraries included when system library is not used | |
3783 | dnl --------------------------------------------------------------------------- | |
e45387bf | 3784 | |
2971ea9d VZ |
3785 | dnl do this after test for X11 above so that we have a chance of finding Xlib.h |
3786 | if test "$wxUSE_GUI" = "yes"; then | |
3787 | if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then | |
3788 | dnl defines HAVE_X11_XKBLIB_H | |
3789 | AC_CHECK_HEADERS(X11/Xlib.h) | |
5ff751d6 | 3790 | AC_CHECK_HEADERS([X11/XKBlib.h], [], [], |
2971ea9d VZ |
3791 | [ |
3792 | #if HAVE_X11_XLIB_H | |
3793 | #include <X11/Xlib.h> | |
3794 | #endif | |
3795 | ]) | |
3796 | fi | |
3797 | fi | |
3798 | ||
8647bec6 RG |
3799 | |
3800 | dnl ---------------------------------------------------------------- | |
3801 | dnl iODBC support | |
3802 | dnl ---------------------------------------------------------------- | |
3803 | ||
3804 | IODBC_C_SRC="" | |
3805 | ||
3806 | ||
5ff751d6 | 3807 | dnl ODBC is handled separately for MSW |
8647bec6 RG |
3808 | if test "$TOOLKIT" != "MSW" ; then |
3809 | ||
bb41dcbe VS |
3810 | if test "$wxUSE_ODBC" = "sys" -o "$wxUSE_ODBC" = "yes" ; then |
3811 | dnl This is not ideal we really ough to use the unixodbc-config | |
3812 | dnl or iodbc-config if they exist. | |
3813 | ||
3814 | AC_CHECK_HEADER([sql.h], [found_sql_h=1]) | |
3815 | if test "x$found_sql_h" = "x1" ; then | |
84dfd58f | 3816 | AC_CHECK_LIB(iodbc, SQLAllocEnv, ODBC_LINK=" -liodbc", |
bb41dcbe | 3817 | [ |
84dfd58f | 3818 | AC_CHECK_LIB(unixodbc, SQLAllocEnv, ODBC_LINK=" -lunixodbc", |
bb41dcbe | 3819 | [ |
84dfd58f | 3820 | AC_CHECK_LIB(odbc, SQLAllocEnv, ODBC_LINK=" -lodbc") |
bb41dcbe VS |
3821 | ]) |
3822 | ]) | |
5ff751d6 | 3823 | fi |
bb41dcbe VS |
3824 | if test "x$ODBC_LINK" = "x" ; then |
3825 | if test "$wxUSE_ODBC" = "sys" ; then | |
3826 | AC_MSG_ERROR([system ODBC library not found! Use --with-odbc=builtin to use built-in version]) | |
3827 | else | |
3828 | AC_MSG_WARN([system ODBC library not found, will use built-in instead]) | |
3829 | wxUSE_ODBC=builtin | |
3830 | fi | |
3831 | else | |
3832 | dnl we are using the system library | |
3833 | wxUSE_ODBC=sys | |
3834 | fi | |
3835 | fi | |
a8e4cf25 VZ |
3836 | |
3837 | if test "$wxUSE_ODBC" = "builtin" ; then | |
3838 | AC_DEFINE(wxUSE_BUILTIN_IODBC) | |
8647bec6 | 3839 | fi |
e45387bf VZ |
3840 | fi |
3841 | ||
a8e4cf25 VZ |
3842 | if test "$wxUSE_ODBC" != "no" ; then |
3843 | AC_DEFINE(wxUSE_ODBC) | |
3844 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db" | |
3845 | ||
3846 | dnl is this still necessary? | |
5ff751d6 | 3847 | WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_IODBC_" |
a8e4cf25 | 3848 | fi |
3a922bb4 | 3849 | |
b3bfe4e5 | 3850 | dnl --------------------------------------------------------------------------- |
01cb68df | 3851 | dnl wxDisplay Sanity checks |
b3bfe4e5 | 3852 | dnl --------------------------------------------------------------------------- |
01cb68df | 3853 | |
b3bfe4e5 | 3854 | if test "$wxUSE_DISPLAY" = "yes"; then |
01cb68df RG |
3855 | dnl --------------------------------------------------------------------------- |
3856 | dnl Xinerama (for unix ) - Brian Victor | |
3857 | dnl --------------------------------------------------------------------------- | |
2a5d7a98 | 3858 | if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1; then |
b3bfe4e5 RN |
3859 | AC_MSG_CHECKING([for Xinerama]) |
3860 | WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xinerama) | |
3861 | if test "$ac_find_libraries" != "" ; then | |
3862 | WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) | |
3863 | if test "$ac_path_to_link" != " -L/usr/lib" ; then | |
3864 | LDFLAGS="$LDFLAGS $ac_path_to_link" | |
3865 | fi | |
3866 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXinerama" | |
3867 | AC_MSG_RESULT([yes]) | |
505c8ccd VS |
3868 | |
3869 | AC_MSG_CHECKING([for Xxf86vm extension]) | |
3870 | WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xxf86vm) | |
3871 | if test "$ac_find_libraries" != "" ; then | |
3872 | AC_MSG_RESULT([yes]) | |
3873 | AC_CHECK_HEADERS([X11/extensions/xf86vmode.h], | |
3874 | [ | |
3875 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXxf86vm" | |
3876 | ], | |
5ff751d6 | 3877 | [], |
505c8ccd VS |
3878 | [ |
3879 | #if HAVE_X11_XLIB_H | |
3880 | #include <X11/Xlib.h> | |
3881 | #endif | |
3882 | ]) | |
3883 | else | |
3884 | AC_MSG_RESULT([no]) | |
3885 | fi | |
5ff751d6 | 3886 | |
b3bfe4e5 RN |
3887 | else |
3888 | AC_MSG_RESULT([no]) | |
dcc1b6ad | 3889 | AC_MSG_WARN([Xinerama not found; disabling wxDisplay]) |
b3bfe4e5 RN |
3890 | wxUSE_DISPLAY="no" |
3891 | fi | |
01cb68df RG |
3892 | elif test "$wxUSE_MSW" = 1; then |
3893 | dnl --------------------------------------------------------------------------- | |
01c54165 | 3894 | dnl DirectDraw for MSW - optionally used by WxDisplay. |
01cb68df | 3895 | dnl --------------------------------------------------------------------------- |
01c54165 | 3896 | AC_CHECK_HEADERS([ddraw.h], [], [], [#include <windows.h>]) |
b3bfe4e5 RN |
3897 | fi |
3898 | fi | |
3899 | ||
88bbc332 RR |
3900 | dnl --------------------------------------------------------------------------- |
3901 | dnl X11 session management | |
3902 | dnl --------------------------------------------------------------------------- | |
3903 | if test "$wxUSE_DETECT_SM" = "yes"; then | |
3904 | if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1; then | |
3905 | AC_MSG_CHECKING([for -lSM - X11 session management]) | |
3906 | WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],SM) | |
3907 | if test "$ac_find_libraries" != "" ; then | |
3908 | WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) | |
3909 | if test "$ac_path_to_link" != " -L/usr/lib" ; then | |
3910 | LDFLAGS="$LDFLAGS $ac_path_to_link" | |
3911 | fi | |
3912 | GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lSM" | |
3913 | AC_MSG_RESULT([yes]) | |
3914 | else | |
3915 | AC_MSG_RESULT([no]) | |
3916 | AC_MSG_WARN([libSM not found; disabling session management detection]) | |
3917 | wxUSE_DETECT_SM="no" | |
3918 | fi | |
3919 | else | |
3920 | wxUSE_DETECT_SM="no" | |
3921 | fi | |
3922 | fi | |
3923 | ||
3924 | ||
4f14bcd8 GD |
3925 | dnl --------------------------------------------------------------------------- |
3926 | dnl OpenGL libraries | |
3927 | dnl --------------------------------------------------------------------------- | |
be505a65 | 3928 | |
4d264332 | 3929 | USE_OPENGL=0 |
3a922bb4 | 3930 | if test "$wxUSE_OPENGL" = "yes"; then |
2e35565a VZ |
3931 | if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = "1"; then |
3932 | AC_MSG_WARN([wxGLCanvas not implemented for this port, library will be compiled without it.]) | |
3933 | wxUSE_OPENGL="no" | |
3934 | elif test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = "1"; then | |
62d0491b | 3935 | OPENGL_LIBS="-framework OpenGL -framework AGL" |
be505a65 VZ |
3936 | elif test "$wxUSE_MSW" = 1; then |
3937 | OPENGL_LIBS="-lopengl32 -lglu32" | |
62d0491b | 3938 | else |
02b05020 VZ |
3939 | dnl adjust CPPFLAGS to include GL/gl.h location if necessary |
3940 | dnl (/opt/graphics/OpenGL is for HP-UX systems, bug 925307) | |
e541dae0 | 3941 | AC_MSG_CHECKING([for OpenGL headers]) |
02b05020 | 3942 | WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /opt/graphics/OpenGL/include], GL/gl.h) |
01aa5863 VS |
3943 | if test "$ac_find_includes" != "" ; then |
3944 | AC_MSG_RESULT(found in $ac_find_includes) | |
01aa5863 | 3945 | WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS) |
c92ad099 | 3946 | CPPFLAGS="$ac_path_to_include $CPPFLAGS" |
e541dae0 VZ |
3947 | else |
3948 | AC_MSG_RESULT([not found]) | |
01aa5863 VS |
3949 | fi |
3950 | ||
5dfc7e56 VZ |
3951 | AC_CHECK_HEADER(GL/gl.h, [ |
3952 | AC_CHECK_HEADER(GL/glu.h, [ | |
021fde89 VZ |
3953 | found_gl=0 |
3954 | ||
1352efdf | 3955 | AC_MSG_CHECKING([for -lGL]) |
02b05020 | 3956 | WX_PATH_FIND_LIBRARIES([$SEARCH_LIB /opt/graphics/OpenGL/lib],GL) |
62d0491b | 3957 | if test "$ac_find_libraries" != "" ; then |
02b05020 | 3958 | AC_MSG_RESULT([found in $ac_find_libraries]) |
69120ee4 | 3959 | |
62d0491b | 3960 | WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) |
021fde89 VZ |
3961 | if test "$ac_path_to_link" != " -L/usr/lib" ; then |
3962 | LDFLAGS_GL="$ac_path_to_link" | |
4b6b4dfc | 3963 | fi |
021fde89 VZ |
3964 | |
3965 | dnl don't suppose that libGL and libGLU are always in the | |
3966 | dnl same directory -- this is not true for some common | |
3967 | dnl distributions | |
69120ee4 | 3968 | AC_MSG_CHECKING([for -lGLU]) |
021fde89 VZ |
3969 | WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],GLU) |
3970 | if test "$ac_find_libraries" != "" ; then | |
3971 | WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) | |
3972 | if test "$ac_path_to_link" != " -L/usr/lib" -a \ | |
3973 | "$ac_path_to_link" != "$LDFLAGS_GL"; then | |
3974 | LDFLAGS_GL="$LDFLAGS_GL$ac_path_to_link" | |
3975 | fi | |
3976 | ||
3977 | found_gl=1 | |
3978 | OPENGL_LIBS="-lGL -lGLU" | |
3979 | AC_MSG_RESULT([yes]) | |
69120ee4 VZ |
3980 | else |
3981 | AC_MSG_RESULT([no]) | |
021fde89 | 3982 | fi |
69120ee4 VZ |
3983 | else |
3984 | AC_MSG_RESULT([no]) | |
021fde89 VZ |
3985 | fi |
3986 | ||
bb41dcbe | 3987 | if test "$found_gl" != 1; then |
1352efdf | 3988 | AC_MSG_CHECKING([for -lMesaGL]) |
021fde89 | 3989 | WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],MesaGL) |
62d0491b RL |
3990 | if test "$ac_find_libraries" != "" ; then |
3991 | WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) | |
3992 | LDFLAGS_GL="$LDFLAGS$ac_path_to_link" | |
3993 | OPENGL_LIBS="-lMesaGL -lMesaGLU" | |
1352efdf RL |
3994 | AC_MSG_RESULT([yes]) |
3995 | else | |
3996 | AC_MSG_RESULT([no]) | |
62d0491b RL |
3997 | fi |
3998 | fi | |
3999 | ]) | |
5dfc7e56 | 4000 | ]) |
fb56368a | 4001 | |
62d0491b RL |
4002 | if test "x$OPENGL_LIBS" = "x"; then |
4003 | dnl it should be an error and not a warning because OpenGL is not on | |
3103e8a9 | 4004 | dnl by default and so if it had been explicitly requested, we |
62d0491b RL |
4005 | dnl shouldn't just fall back to compiling the library without it |
4006 | AC_MSG_ERROR(OpenGL libraries not available) | |
4007 | fi | |
6f754473 | 4008 | fi |
6f754473 | 4009 | |
62d0491b | 4010 | if test "$wxUSE_OPENGL" = "yes"; then |
4d264332 | 4011 | USE_OPENGL=1 |
62d0491b RL |
4012 | AC_DEFINE(wxUSE_OPENGL) |
4013 | AC_DEFINE(wxUSE_GLCANVAS) | |
520755bb | 4014 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl opengl/cube opengl/penguin opengl/isosurf" |
62d0491b | 4015 | fi |
3a922bb4 RL |
4016 | fi |
4017 | ||
3a922bb4 RL |
4018 | |
4019 | dnl the symbol which allows conditional compilation for the given toolkit | |
4020 | if test -n "$TOOLKIT" ; then | |
4021 | TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WX${TOOLKIT}__" | |
4022 | fi | |
4023 | ||
978f1259 | 4024 | |
3a922bb4 | 4025 | dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP --- |
55e80573 | 4026 | |
4222829b VS |
4027 | if test "$wxUSE_SHARED" = "yes"; then |
4028 | case "${host}" in | |
4222829b VS |
4029 | *-pc-msdosdjgpp ) |
4030 | dnl only static for now | |
4031 | wxUSE_SHARED=no | |
4032 | AC_MSG_WARN([Host system doesn't support shared libraries, disabling]) | |
4033 | ;; | |
4034 | esac | |
4035 | fi | |
4036 | ||
3a922bb4 | 4037 | if test "$wxUSE_SHARED" = "yes"; then |
55e80573 | 4038 | |
2b5f62a0 | 4039 | dnl use versioned symbols if available on the platform |
6589dc98 | 4040 | WX_VERSIONED_SYMBOLS([\$(wx_top_builddir)/version-script]) |
2b5f62a0 | 4041 | |
55e80573 | 4042 | case "${host}" in |
32b38f99 | 4043 | *-*-linux* | *-*-gnu* ) |
6589dc98 | 4044 | SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib" |
ffa0583f | 4045 | WXCONFIG_RPATH="-Wl,-rpath,\$libdir" |
6ebeb4c7 | 4046 | ;; |
55e80573 | 4047 | |
de87c353 RR |
4048 | *-*-solaris2* ) |
4049 | if test "$GCC" = yes ; then | |
f6bcfd97 BP |
4050 | dnl newer versions of gcc need -isystem to compile X headers on |
4051 | dnl Solaris (which use old style C syntax) | |
c92ad099 | 4052 | CPPFLAGS="-isystem /usr/openwin/include $CPPFLAGS" |
fe0895cf VS |
4053 | |
4054 | dnl gcc may use Sun's ld, in which case -rpath gives a confusing | |
4055 | dnl error message. We have to try both -Wl,-rpath and -Wl,-R: | |
4056 | saveLdflags="$LDFLAGS" | |
4057 | LDFLAGS="$saveLdflags -Wl,-rpath,/" | |
4058 | AC_MSG_CHECKING([if the linker accepts -rpath]) | |
4059 | AC_TRY_LINK( | |
4060 | [],[], | |
4061 | [ | |
4062 | AC_MSG_RESULT([yes]) | |
6589dc98 | 4063 | SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib" |
ffa0583f RL |
4064 | WXCONFIG_RPATH="-Wl,-rpath,\$libdir" |
4065 | ],[ | |
fe0895cf VS |
4066 | AC_MSG_RESULT([no]) |
4067 | AC_MSG_CHECKING([if the linker accepts -R]) | |
4068 | LDFLAGS="$saveLdflags -Wl,-R,/" | |
4069 | AC_TRY_LINK( | |
4070 | [],[], | |
4071 | [ | |
ffa0583f | 4072 | AC_MSG_RESULT([yes]) |
6589dc98 | 4073 | SAMPLES_RPATH_FLAG="-Wl,-R,\$(wx_top_builddir)/lib" |
ffa0583f RL |
4074 | WXCONFIG_RPATH="-Wl,-R,\$libdir" |
4075 | ],[ | |
fe0895cf | 4076 | AC_MSG_RESULT([no]) |
5ff751d6 | 4077 | ]) |
fe0895cf VS |
4078 | ]) |
4079 | LDFLAGS="$saveLdflags" | |
de87c353 | 4080 | else |
6589dc98 | 4081 | SAMPLES_RPATH_FLAG="-R\$(wx_top_builddir)/lib" |
ffa0583f | 4082 | WXCONFIG_RPATH="-R\$libdir" |
de87c353 | 4083 | fi |
de87c353 | 4084 | ;; |
5ff751d6 | 4085 | |
cfda0ea8 | 4086 | *-*-darwin* ) |
0caebc27 MW |
4087 | install_name_tool=`which install_name_tool` |
4088 | if test "$install_name_tool" -a -x "$install_name_tool"; then | |
6589dc98 | 4089 | SAMPLES_RPATH_POSTLINK="\$(wx_top_builddir)/change-install-names \$(LIBDIRNAME) \$(prefix) \$@" |
0caebc27 | 4090 | cat <<EOF >change-install-names |
ef0add05 VS |
4091 | #!/bin/sh |
4092 | libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\` | |
4093 | inst_cmd="install_name_tool " | |
4094 | for i in \${libnames} ; do | |
4095 | inst_cmd="\${inst_cmd} -change \${2}/lib/\${i} \${1}/\${i}" | |
4096 | done | |
4097 | \${inst_cmd} \${3} | |
4098 | EOF | |
0caebc27 MW |
4099 | chmod +x change-install-names |
4100 | fi | |
ef0add05 | 4101 | ;; |
5ff751d6 | 4102 | |
e194780e | 4103 | *-*-cygwin* | *-*-mingw32* ) |
5ff751d6 VZ |
4104 | dnl this one shouldn't be used for the library build so put it in a |
4105 | dnl separate variable from WXCONFIG_CPPFLAGS | |
4106 | WXCONFIG_ONLY_CPPFLAGS="$WXCONFIG_ONLY_CPPFLAGS -DWXUSINGDLL" | |
4107 | ;; | |
4108 | ||
2fc79cf2 | 4109 | *-*-hpux* ) |
6589dc98 | 4110 | SAMPLES_RPATH_FLAG="-Wl,+b,\$(wx_top_builddir)/lib" |
2fc79cf2 | 4111 | WXCONFIG_RPATH="-Wl,+b,\$libdir" |
5ff751d6 VZ |
4112 | ;; |
4113 | ||
de87c353 | 4114 | esac |
f6bcfd97 | 4115 | |
ffa0583f RL |
4116 | if test $wxUSE_RPATH = "no"; then |
4117 | SAMPLES_RPATH_FLAG='' | |
4118 | SAMPLES_RPATH_POSTLINK='' | |
4119 | WXCONFIG_RPATH='' | |
4120 | fi | |
4121 | ||
4122 | SHARED=1 | |
4123 | ||
4124 | else | |
4125 | ||
ceec2216 RL |
4126 | config_linkage_component="-static" |
4127 | SHARED=0 | |
ffa0583f | 4128 | |
ceec2216 | 4129 | fi |
f6bcfd97 | 4130 | |
f6bcfd97 | 4131 | |
ceec2216 RL |
4132 | UNICODE=0 |
4133 | lib_unicode_suffix= | |
4134 | WX_CHARTYPE="ansi" | |
4135 | if test "$wxUSE_UNICODE" = "yes"; then | |
4136 | lib_unicode_suffix=u | |
4137 | WX_CHARTYPE="unicode" | |
4138 | UNICODE=1 | |
4139 | fi | |
6fa882bd | 4140 | |
ceec2216 RL |
4141 | lib_debug_suffix= |
4142 | WX_DEBUGTYPE="release" | |
4143 | DEBUG_FLAG=0 | |
4144 | if test "$wxUSE_DEBUG_FLAG" = "yes"; then | |
4145 | lib_debug_suffix=d | |
4146 | WX_DEBUGTYPE="debug" | |
4147 | DEBUG_FLAG=1 | |
4148 | fi | |
3a922bb4 | 4149 | |
ceec2216 RL |
4150 | WX_FLAVOUR=${WX_FLAVOUR:+-$WX_FLAVOUR} |
4151 | WX_LIB_FLAVOUR=`echo $WX_FLAVOUR | tr '-' '_'` | |
3a922bb4 | 4152 | |
ceec2216 RL |
4153 | DEBUG_INFO=0 |
4154 | if test "$wxUSE_DEBUG_INFO" = "yes"; then | |
4155 | DEBUG_INFO=1 | |
4156 | fi | |
2bffed64 | 4157 | |
ceec2216 RL |
4158 | WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}_${WX_RELEASE} | tr "[[a-z]]" "[[A-Z]]"` |
4159 | ||
4160 | TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}" | |
4161 | ||
4162 | TOOLCHAIN_FULLNAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}-${WX_CHARTYPE}-${WX_DEBUGTYPE}${config_linkage_component}-${WX_RELEASE}${WX_FLAVOUR}" | |
4163 | ||
4164 | if test "$cross_compiling" = "yes"; then | |
4165 | HOST_SUFFIX="-$host_alias" | |
4166 | TOOLCHAIN_NAME="$TOOLCHAIN_NAME$HOST_SUFFIX" | |
4167 | TOOLCHAIN_FULLNAME="${host_alias}-$TOOLCHAIN_FULLNAME" | |
517a619d RR |
4168 | fi |
4169 | ||
ceec2216 RL |
4170 | dnl library link name |
4171 | dnl These just save us from exporting lib_{unicode,debug,flavour}_suffix. | |
4172 | dnl If we ever need to do that, we won't need to keep these. | |
dd21ced8 | 4173 | WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}" |
b9efe021 SN |
4174 | if test "${TOOLKIT_DIR}" = "os2"; then |
4175 | WX_LIBRARY_BASENAME_GUI="wx_pm${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}" | |
4176 | else | |
4177 | WX_LIBRARY_BASENAME_GUI="wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}" | |
4178 | fi | |
ceec2216 RL |
4179 | |
4180 | ||
4181 | ||
1d1af5ea DE |
4182 | if test "$wxUSE_COCOA" = 1; then |
4183 | AC_LANG_SAVE | |
4184 | AC_WX_LANG_OBJECTIVEC | |
4185 | dnl Recent AppKit/NSEvent.h include parts of IOKit which eventually | |
4186 | dnl gets IOKit/graphics/IOGraphicsTypes.h included which typedefs | |
4187 | dnl Point but only if MacTypes.h was not included first. Of course, | |
4188 | dnl if MacTypes.h is included later then you're screwed when it | |
4189 | dnl tries to typedef Point. Defining __Point__ will cause IOGraphicsTypes.h | |
4190 | dnl to not typedef Point and thus fix the problem. | |
4191 | AC_MSG_CHECKING([if AppKit/NSEvent.h conflicts with CoreFoundation]) | |
4192 | AC_TRY_COMPILE([#include <AppKit/NSEvent.h> | |
4193 | #include <CoreFoundation/CoreFoundation.h> | |
4194 | ],[], | |
4195 | [AC_MSG_RESULT([no])], | |
4196 | [AC_MSG_RESULT([yes]) | |
4197 | AC_MSG_CHECKING([if defining __Point__ will fix it]) | |
4198 | AC_TRY_COMPILE([#define __Point__ 1 | |
4199 | #include <AppKit/NSEvent.h> | |
4200 | #include <CoreFoundation/CoreFoundation.h> | |
4201 | ],[], | |
4202 | [AC_MSG_RESULT([yes]) | |
4203 | AC_DEFINE(__Point__) | |
4204 | ], | |
4205 | [AC_MSG_FAILURE([no])] | |
4206 | )] | |
4207 | ) | |
4208 | AC_LANG_RESTORE | |
4209 | fi | |
4210 | ||
09d3439c | 4211 | if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then |
ceec2216 RL |
4212 | dnl base name of the resource file for wxMac must be the same |
4213 | dnl as library installation base name (-install_name) | |
abb9aae7 VZ |
4214 | WX_RESOURCES_MACOSX_ASCII="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.r" |
4215 | WX_RESOURCES_MACOSX_DATA="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.rsrc" | |
ceec2216 | 4216 | |
d08b457b | 4217 | dnl add the resources target for wxMac |
6589dc98 | 4218 | LIBWXMACRES="\$(wx_top_builddir)/lib/${WX_RESOURCES_MACOSX_ASCII}" |
09d3439c | 4219 | |
891ace05 | 4220 | AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez) |
9f8148b1 | 4221 | AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez) |
36825681 | 4222 | AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile) |
09d3439c VZ |
4223 | |
4224 | MACSETFILE="\$(SETFILE)" | |
4225 | ||
2b5f62a0 VZ |
4226 | dnl resources are bundled both with shared library and applications |
4227 | dnl since the carb resource *must* be included in the application | |
09d3439c | 4228 | if test "$wxUSE_MAC" = 1; then |
891ace05 | 4229 | POSTLINK_COMMAND="\$(REZ) -d __DARWIN__ -t APPL Carbon.r -o" |
004ee6da RL |
4230 | RESCOMP="$REZ" |
4231 | WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL Carbon.r -o" | |
09d3439c | 4232 | else |
004ee6da RL |
4233 | POSTLINK_COMMAND="echo -n | \$(REZ) -d __DARWIN__ -t APPL ${LIBWXMACRES}" |
4234 | RESCOMP="echo -n \| $REZ" | |
4235 | WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL \$libdir/$WX_RESOURCES_MACOSX_ASCII" | |
09d3439c | 4236 | fi |
004ee6da | 4237 | |
590b1a4d | 4238 | else |
09d3439c | 4239 | dnl default value is to (silently) do nothing in the makefile |
68e24a7b | 4240 | MACSETFILE="@true" |
09d3439c | 4241 | |
590b1a4d | 4242 | if test "$wxUSE_PM" = 1; then |
004ee6da RL |
4243 | RESCOMP="emxbind" |
4244 | WXCONFIG_RESFLAGS="-ep" | |
4245 | ||
4246 | dnl Is this one really used anywhere for pm? | |
4247 | POSTLINK_COMMAND="$RESCOMP $WXCONFIG_RESFLAGS" | |
09d3439c | 4248 | else |
891ace05 | 4249 | POSTLINK_COMMAND="@true" |
590b1a4d | 4250 | fi |
004ee6da | 4251 | |
d08b457b GD |
4252 | fi |
4253 | ||
f93ca9fd | 4254 | |
9a98a854 VZ |
4255 | dnl --------------------------------------------------------------------------- |
4256 | dnl Checks for typedefs | |
4257 | dnl --------------------------------------------------------------------------- | |
4258 | ||
4259 | dnl defines mode_t if not already defined | |
4260 | AC_TYPE_MODE_T | |
4261 | dnl defines off_t if not already defined | |
4262 | AC_TYPE_OFF_T | |
4263 | dnl defines pid_t if not already defined | |
4264 | AC_TYPE_PID_T | |
4265 | dnl defines size_t if not already defined | |
4266 | AC_TYPE_SIZE_T | |
4267 | dnl defines uid_t and gid_t if not already defined | |
4268 | AC_TYPE_UID_T | |
4269 | ||
d51253e8 RL |
4270 | dnl sets HAVE_SSIZE_T if ssize_t is defined |
4271 | AC_CHECK_TYPES(ssize_t) | |
4272 | ||
d836ee96 | 4273 | dnl check what exactly size_t is on this machine - this is necessary to avoid |
ef33c576 | 4274 | dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h |
224d4f6d | 4275 | AC_LANG_PUSH(C++) dnl tests below use overloaded functions and so need C++ |
d836ee96 VZ |
4276 | AC_CACHE_CHECK([if size_t is unsigned int], |
4277 | wx_cv_size_t_is_uint, | |
ef33c576 | 4278 | [ |
dd2c8b7c VZ |
4279 | dnl an obvious check like AC_TRY_COMPILE[struct Foo { ... };] doesn't work |
4280 | dnl with egcs (at least) up to 1.1.1 as it allows you to compile duplicate | |
4281 | dnl methods in a local class (i.e. class inside a function) declaration | |
4282 | dnl without any objections!! | |
4283 | dnl | |
4284 | dnl hence the hack below: we must have Foo at global scope! | |
d836ee96 VZ |
4285 | AC_TRY_COMPILE([#include <stddef.h>], |
4286 | [ | |
dd2c8b7c VZ |
4287 | return 0; } |
4288 | ||
d836ee96 | 4289 | struct Foo { void foo(size_t); void foo(unsigned int); }; |
dd2c8b7c VZ |
4290 | |
4291 | int bar() { | |
d836ee96 VZ |
4292 | ], |
4293 | wx_cv_size_t_is_uint=no, | |
4294 | wx_cv_size_t_is_uint=yes | |
4295 | ) | |
ef33c576 | 4296 | ] |
d836ee96 VZ |
4297 | ) |
4298 | ||
4299 | if test "$wx_cv_size_t_is_uint" = "yes"; then | |
4300 | AC_DEFINE(wxSIZE_T_IS_UINT) | |
4301 | else | |
4302 | AC_CACHE_CHECK([if size_t is unsigned long], | |
4303 | wx_cv_size_t_is_ulong, | |
4304 | AC_TRY_COMPILE([#include <stddef.h>], | |
4305 | [ | |
dd2c8b7c VZ |
4306 | return 0; } |
4307 | ||
d836ee96 | 4308 | struct Foo { void foo(size_t); void foo(unsigned long); }; |
dd2c8b7c VZ |
4309 | |
4310 | int bar() { | |
d836ee96 VZ |
4311 | ], |
4312 | wx_cv_size_t_is_ulong=no, | |
4313 | wx_cv_size_t_is_ulong=yes | |
4314 | ) | |
4315 | ) | |
4316 | ||
4317 | if test "$wx_cv_size_t_is_ulong" = "yes"; then | |
4318 | AC_DEFINE(wxSIZE_T_IS_ULONG) | |
4319 | fi | |
4320 | fi | |
4321 | ||
224d4f6d VZ |
4322 | AC_LANG_POP() dnl C++ |
4323 | ||
9a98a854 VZ |
4324 | dnl --------------------------------------------------------------------------- |
4325 | dnl Checks for structures | |
4326 | dnl --------------------------------------------------------------------------- | |
4327 | ||
b12915c1 VZ |
4328 | dnl does passwd struct has the pw_gecos field? |
4329 | AC_CACHE_CHECK([for pw_gecos in struct passwd], wx_cv_struct_pw_gecos, | |
4330 | [ | |
4331 | AC_TRY_COMPILE([#include <pwd.h>], | |
4332 | [ | |
4333 | char *p; | |
4334 | struct passwd *pw; | |
4335 | p = pw->pw_gecos; | |
4336 | ], | |
4337 | [ | |
4338 | wx_cv_struct_pw_gecos=yes | |
b12915c1 VZ |
4339 | ], |
4340 | [ | |
4341 | wx_cv_struct_pw_gecos=no | |
4342 | ] | |
4343 | ) | |
4344 | ] | |
4345 | ) | |
4346 | ||
bd3277fe VZ |
4347 | if test "$wx_cv_struct_pw_gecos" = "yes"; then |
4348 | AC_DEFINE(HAVE_PW_GECOS) | |
4349 | fi | |
4350 | ||
9a98a854 | 4351 | dnl --------------------------------------------------------------------------- |
9a98a854 VZ |
4352 | dnl Check for functions |
4353 | dnl --------------------------------------------------------------------------- | |
4354 | ||
d29b553b | 4355 | dnl don't check for wchar_t functions if we haven't got wchar_t itself |
61c213fe | 4356 | if test "$wxUSE_WCHAR_T" = "yes"; then |
d74f4b5a VZ |
4357 | AC_DEFINE(wxUSE_WCHAR_T) |
4358 | ||
4359 | dnl check for wcslen in all possible places | |
4360 | WCSLEN_FOUND=0 | |
d29b553b | 4361 | WCHAR_LINK= |
d74f4b5a | 4362 | AC_CHECK_FUNCS(wcslen, WCSLEN_FOUND=1) |
d29b553b | 4363 | |
d74f4b5a | 4364 | if test "$WCSLEN_FOUND" = 0; then |
7a30264c | 4365 | if test "$TOOLKIT" = "MSW"; then |
d74f4b5a | 4366 | AC_CHECK_LIB(msvcrt, wcslen, WCHAR_OK=1) |
7a30264c VZ |
4367 | else |
4368 | AC_CHECK_LIB(w, wcslen, [ | |
7a30264c | 4369 | WCHAR_LINK=" -lw" |
d74f4b5a | 4370 | WCSLEN_FOUND=1 |
7a30264c VZ |
4371 | ]) |
4372 | fi | |
d29b553b | 4373 | fi |
9a98a854 | 4374 | |
d74f4b5a VZ |
4375 | if test "$WCSLEN_FOUND" = 1; then |
4376 | AC_DEFINE(HAVE_WCSLEN) | |
4377 | fi | |
d29b553b | 4378 | |
f43dc7d3 MW |
4379 | dnl On HP-UX aCC need this define to find mbstrtowcs() &c |
4380 | dnl Can't be used for g++ since the mbstate_t in wchar.h can conflict | |
4381 | dnl with g++'s in <cwchar> (unless -D_INCLUDE__STDC_A1_SOURCE is in the | |
4382 | dnl flags when g++ is configured, it will declare it's own). | |
4383 | if test "$USE_HPUX" = 1 -a "$GCC" != "yes"; then | |
c92ad099 | 4384 | CPPFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CPPFLAGS" |
acaffac9 VZ |
4385 | fi |
4386 | ||
f43dc7d3 MW |
4387 | dnl Try to use wcsrtombs instead of wcstombs which is buggy in old GNU |
4388 | dnl libc versions if possible. AC_CHECK_FUNCS only checks it's in the | |
4389 | dnl library, not the header, so do a header check for mbstate_t first. | |
4390 | AC_CHECK_TYPES([mbstate_t], | |
4391 | [AC_CHECK_FUNCS(wcsrtombs)], | |
4392 | [], | |
4393 | [#include <wchar.h>]) | |
d29b553b | 4394 | else |
d74f4b5a | 4395 | AC_MSG_WARN([Wide character support is unavailable]) |
d29b553b | 4396 | fi |
b3e8d00a | 4397 | |
247f5006 | 4398 | dnl check for vsnprintf() -- a safe version of vsprintf()) |
ec0d6da3 | 4399 | dnl |
b5887a83 | 4400 | dnl the trouble here is that on some systems (e.g HP-UX 10) this function is |
ec0d6da3 VZ |
4401 | dnl present in libc but not in the system headers and so AC_CHECK_FUNCS (which, |
4402 | dnl stupidly, provides a dummy function declaration inside its extension) | |
77ffb593 | 4403 | dnl succeeds, even with C++ compiler, but the compilation of wxWidgets fails |
ec0d6da3 VZ |
4404 | dnl |
4405 | dnl so we first check if the function is in the library | |
fd5199d6 VZ |
4406 | dnl |
4407 | dnl FIXME: replace this mess with WX_CHECK_FUNCS() | |
4a767dd5 | 4408 | AC_CHECK_FUNCS(snprintf vsnprintf) |
9d8deca0 | 4409 | |
ec0d6da3 VZ |
4410 | if test "$ac_cv_func_vsnprintf" = "yes"; then |
4411 | dnl yes it is -- now check if it is in the headers | |
4412 | AC_CACHE_CHECK([for vsnprintf declaration], wx_cv_func_vsnprintf_decl, | |
4413 | [ | |
b5887a83 VZ |
4414 | dnl our troubles are not over: HP-UX 11 prototypes vsnprintf() as |
4415 | dnl taking "char *" and not "const char *" while Metrowerks does | |
4416 | dnl provide a correct vsnprintf declaration but in C++ mode it's | |
4417 | dnl always in std namespace and so we have to bring it in scope | |
ec0d6da3 VZ |
4418 | AC_TRY_COMPILE( |
4419 | [ | |
4420 | #include <stdio.h> | |
4421 | #include <stdarg.h> | |
b5887a83 VZ |
4422 | #ifdef __MSL__ |
4423 | #if __MSL__ >= 0x6000 | |
4424 | namespace std {} | |
4425 | using namespace std; | |
4426 | #endif | |
4427 | #endif | |
ec0d6da3 VZ |
4428 | ], |
4429 | [ | |
4430 | char *buf; | |
4431 | va_list ap; | |
62fa8b3a | 4432 | vsnprintf(buf, 10u, "%s", ap); |
ec0d6da3 VZ |
4433 | ], |
4434 | wx_cv_func_vsnprintf_decl=yes, | |
b5887a83 | 4435 | wx_cv_func_vsnprintf_decl=no |
ec0d6da3 VZ |
4436 | ) |
4437 | ] | |
4438 | ) | |
4439 | ||
4440 | if test "$wx_cv_func_vsnprintf_decl" = "yes"; then | |
4441 | AC_DEFINE(HAVE_VSNPRINTF_DECL) | |
62fa8b3a MW |
4442 | |
4443 | dnl we know there is a vsnprintf declaration, but some old headers | |
4444 | dnl may have one taking a "char *" format instead of "const char *" | |
4445 | AC_CACHE_CHECK([if vsnprintf declaration is broken], wx_cv_func_broken_vsnprintf_decl, | |
4446 | [ | |
4447 | AC_TRY_COMPILE( | |
4448 | [ | |
4449 | #include <stdio.h> | |
4450 | #include <stdarg.h> | |
4451 | #ifdef __MSL__ | |
4452 | #if __MSL__ >= 0x6000 | |
4453 | namespace std {} | |
4454 | using namespace std; | |
4455 | #endif | |
4456 | #endif | |
4457 | ], | |
4458 | [ | |
4459 | char *buf; | |
4460 | va_list ap; | |
4461 | const char *fmt = "%s"; | |
4462 | vsnprintf(buf, 10u, fmt, ap); | |
4463 | ], | |
4464 | wx_cv_func_broken_vsnprintf_decl=no, | |
4465 | wx_cv_func_broken_vsnprintf_decl=yes | |
4466 | ) | |
4467 | ] | |
4468 | ) | |
4469 | ||
4470 | if test "$wx_cv_func_broken_vsnprintf_decl" = "yes"; then | |
4471 | AC_DEFINE(HAVE_BROKEN_VSNPRINTF_DECL) | |
4472 | fi | |
ec0d6da3 VZ |
4473 | fi |
4474 | fi | |
4475 | ||
4a767dd5 VZ |
4476 | dnl the same as above but for snprintf() now: it's not present in at least AIX |
4477 | dnl 4.2 headers | |
4478 | if test "$ac_cv_func_snprintf" = "yes"; then | |
4479 | AC_CACHE_CHECK([for snprintf declaration], wx_cv_func_snprintf_decl, | |
4480 | [ | |
4481 | AC_TRY_COMPILE( | |
4482 | [ | |
4483 | #include <stdio.h> | |
4484 | #include <stdarg.h> | |
4485 | #ifdef __MSL__ | |
4486 | #if __MSL__ >= 0x6000 | |
4487 | namespace std {} | |
4488 | using namespace std; | |
4489 | #endif | |
4490 | #endif | |
4491 | ], | |
4492 | [ | |
4493 | char *buf; | |
62fa8b3a | 4494 | snprintf(buf, 10u, "%s", "wx"); |
4a767dd5 VZ |
4495 | ], |
4496 | wx_cv_func_snprintf_decl=yes, | |
4497 | wx_cv_func_snprintf_decl=no | |
4498 | ) | |
4499 | ] | |
4500 | ) | |
4501 | ||
4502 | if test "$wx_cv_func_snprintf_decl" = "yes"; then | |
4503 | AC_DEFINE(HAVE_SNPRINTF_DECL) | |
62fa8b3a MW |
4504 | |
4505 | dnl we know there is an snprintf declaration, but some old headers | |
4506 | dnl may have one taking a "char *" format instead of "const char *" | |
4507 | AC_CACHE_CHECK([if snprintf declaration is broken], wx_cv_func_broken_snprintf_decl, | |
4508 | [ | |
4509 | AC_TRY_COMPILE( | |
4510 | [ | |
4511 | #include <stdio.h> | |
4512 | #include <stdarg.h> | |
4513 | #ifdef __MSL__ | |
4514 | #if __MSL__ >= 0x6000 | |
4515 | namespace std {} | |
4516 | using namespace std; | |
4517 | #endif | |
4518 | #endif | |
4519 | ], | |
4520 | [ | |
4521 | char *buf; | |
4522 | const char *fmt = "%s"; | |
4523 | snprintf(buf, 10u, fmt, "wx"); | |
4524 | ], | |
4525 | wx_cv_func_broken_snprintf_decl=no, | |
4526 | wx_cv_func_broken_snprintf_decl=yes | |
4527 | ) | |
4528 | ] | |
4529 | ) | |
4530 | ||
4531 | if test "$wx_cv_func_broken_snprintf_decl" = "yes"; then | |
4532 | AC_DEFINE(HAVE_BROKEN_SNPRINTF_DECL) | |
4533 | fi | |
4a767dd5 | 4534 | fi |
7b4eedf6 VZ |
4535 | |
4536 | if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then | |
4537 | ||
4538 | dnl check if snprintf() has support for positional arguments | |
4539 | dnl NB: if snprintf() has positional support we can safely suppose that also | |
4540 | dnl other *printf() functions support them as they all belong to the same | |
4541 | dnl family and they all fallback to the same implementation | |
4542 | AC_CACHE_CHECK([if snprintf supports positional arguments], wx_cv_func_snprintf_pos_params, | |
4543 | [ | |
4544 | AC_TRY_RUN( | |
4545 | [ | |
4546 | #include <stdio.h> | |
4547 | ||
4548 | int main (void) | |
4549 | { | |
4550 | char buffer[128]; | |
4551 | snprintf (buffer, 128, "%2\$d %3\$d %1\$d", 1, 2, 3); | |
4552 | if (strcmp ("2 3 1", buffer) == 0) | |
4553 | exit (0); | |
4554 | exit (1); | |
4555 | } | |
4556 | ], | |
4557 | wx_cv_func_snprintf_pos_params=no, | |
5039a2df VZ |
4558 | wx_cv_func_snprintf_pos_params=yes, |
4559 | dnl be pessimistic when cross-compiling | |
4560 | [ | |
4561 | AC_MSG_WARN([Assuming Unix98 printf() is not available, | |
4562 | define HAVE_UNIX98_PRINTF as 1 in setup.h if it is available.]) | |
4563 | wx_cv_func_snprintf_pos_params=no | |
4564 | ] | |
7b4eedf6 VZ |
4565 | ) |
4566 | ] | |
4567 | ) | |
4568 | ||
4569 | if test "$wx_cv_func_snprintf_pos_params" = "yes"; then | |
4570 | AC_DEFINE(HAVE_UNIX98_PRINTF) | |
4571 | fi | |
4572 | fi | |
4a767dd5 VZ |
4573 | fi |
4574 | ||
d74f4b5a | 4575 | if test "$wxUSE_UNICODE" = yes; then |
6a5c9b3f RR |
4576 | |
4577 | dnl our wxVsnprintf() implementation needs to use the system swprintf() in Unicode | |
4578 | dnl builds so let's check if swprintf() is declared as C99 imposes: | |
4579 | dnl int swprintf(wchar_t *s, size_t n, const wchar_t *format, ...); | |
4580 | dnl or rather as: | |
4581 | dnl int swprintf(wchar_t *s, const wchar_t *format, ...); | |
4582 | AC_CHECK_FUNCS(swprintf) | |
4583 | ||
4584 | if test "$ac_cv_func_swprintf" = "yes"; then | |
4585 | AC_CACHE_CHECK([if swprintf declaration is broken], wx_cv_func_broken_swprintf_decl, | |
4586 | [ | |
4587 | AC_TRY_COMPILE( | |
4588 | [ | |
4589 | #include <stdio.h> | |
4590 | #include <stdarg.h> | |
4591 | #include <wchar.h> | |
4592 | ], | |
4593 | [ | |
4594 | wchar_t *buf; | |
4595 | const wchar_t *fmt = L"test"; | |
4596 | swprintf(buf, 10u, fmt); | |
4597 | ], | |
4598 | wx_cv_func_broken_swprintf_decl=no, | |
4599 | wx_cv_func_broken_swprintf_decl=yes | |
4600 | ) | |
4601 | ] | |
4602 | ) | |
4603 | ||
4604 | if test "$wx_cv_func_broken_swprintf_decl" = "yes"; then | |
4605 | AC_DEFINE(HAVE_BROKEN_SWPRINTF_DECL) | |
4606 | fi | |
4607 | fi | |
4608 | ||
a49ffb32 VZ |
4609 | dnl also look if we have wide char IO functions, notice that [f]putws are |
4610 | dnl declared in special widec.h under Solaris | |
4611 | wchar_headers="#include <stdio.h> | |
4612 | #include <wchar.h>" | |
4613 | case "${host}" in | |
4614 | *-*-solaris2* ) | |
4615 | AC_CHECK_HEADERS(widec.h) | |
4616 | if test "$ac_cv_header_widec_h" = "yes"; then | |
4617 | wchar_headers="$wchar_headers | |
4618 | #include <widec.h>" | |
4619 | fi | |
4620 | esac | |
4621 | ||
4622 | WX_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf,,, | |
4623 | [$wchar_headers]) | |
ec0d6da3 | 4624 | |
79668cae MB |
4625 | dnl MinGW has a vswprintf with a different prototype, and |
4626 | dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS | |
4627 | dnl finds it even if it is not declared in some versions... | |
4628 | AC_MSG_CHECKING([for _vsnwprintf]) | |
4629 | AC_TRY_COMPILE([#include <wchar.h>], | |
4630 | [&_vsnwprintf;], | |
4631 | [AC_MSG_RESULT([yes]) | |
4632 | AC_DEFINE(HAVE__VSNWPRINTF)], | |
4633 | [AC_MSG_RESULT([no])]); | |
d74f4b5a VZ |
4634 | fi |
4635 | ||
6ebeb4c7 | 4636 | if test "x$ac_cv_header_fnmatch_h" = "xyes"; then |
d0dec913 | 4637 | WX_CHECK_FUNCS(fnmatch,,,[#include <fnmatch.h>]) |
6ebeb4c7 VZ |
4638 | fi |
4639 | ||
4640 | if test "$wxUSE_FILE" = "yes"; then | |
fd5199d6 | 4641 | WX_CHECK_FUNCS(fsync) |
b34497d8 PC |
4642 | fi |
4643 | ||
fd5199d6 | 4644 | WX_CHECK_FUNCS(round,,,[#include <math.h>]) |
247f5006 | 4645 | |
f6bcfd97 | 4646 | dnl the following tests are for Unix(like) systems only |
b089607b | 4647 | if test "$TOOLKIT" != "MSW"; then |
a0c79abb | 4648 | |
95c8801c VS |
4649 | dnl check for available version of iconv() |
4650 | ||
b040e242 VS |
4651 | AM_ICONV |
4652 | LIBS="$LIBICONV $LIBS" | |
95c8801c | 4653 | |
eb4efbdc VZ |
4654 | dnl check for POSIX signals if we need them |
4655 | if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then | |
4656 | AC_CHECK_FUNCS(sigaction) | |
4657 | ||
4658 | if test "$ac_cv_func_sigaction" = "no"; then | |
4659 | AC_MSG_WARN([No POSIX signal functions on this system, wxApp::OnFatalException will not be called]) | |
4660 | wxUSE_ON_FATAL_EXCEPTION=no | |
4661 | fi | |
f6bcfd97 BP |
4662 | |
4663 | if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then | |
f6bcfd97 BP |
4664 | AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler, |
4665 | [ | |
224d4f6d VZ |
4666 | dnl C compiler happily compiles the code even if there is type mismatch |
4667 | AC_LANG_PUSH(C++) | |
f6bcfd97 BP |
4668 | AC_TRY_COMPILE([#include <signal.h>], |
4669 | [ | |
4670 | extern void testSigHandler(int); | |
4671 | ||
4672 | struct sigaction sa; | |
4673 | sa.sa_handler = testSigHandler; | |
4674 | ], [ | |
4675 | wx_cv_type_sa_handler=int | |
4676 | ], [ | |
4677 | wx_cv_type_sa_handler=void | |
4678 | ]) | |
224d4f6d | 4679 | AC_LANG_POP() |
f6bcfd97 BP |
4680 | ]) |
4681 | ||
f6bcfd97 BP |
4682 | AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler) |
4683 | fi | |
eb4efbdc VZ |
4684 | fi |
4685 | ||
eaff0f0d VZ |
4686 | dnl backtrace() and backtrace_symbols() for wxStackWalker |
4687 | if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then | |
eaff0f0d VZ |
4688 | AC_CACHE_CHECK([for backtrace() in <execinfo.h>], wx_cv_func_backtrace, |
4689 | [ | |
224d4f6d | 4690 | AC_LANG_PUSH(C++) |
eaff0f0d VZ |
4691 | AC_TRY_COMPILE([#include <execinfo.h>], |
4692 | [ | |
4693 | void *trace[1]; | |
4694 | char **messages; | |
4695 | ||
4696 | backtrace(trace, 1); | |
4697 | messages = backtrace_symbols(trace, 1); | |
4698 | ], | |
4699 | wx_cv_func_backtrace=yes, | |
4700 | wx_cv_func_backtrace=no | |
4701 | ) | |
224d4f6d | 4702 | AC_LANG_POP() |
eaff0f0d VZ |
4703 | ] |
4704 | ) | |
4705 | ||
4706 | ||
4707 | if test "$wx_cv_func_backtrace" = "no"; then | |
4708 | AC_MSG_WARN([backtrace() is not available, wxStackWalker will not be available]) | |
4709 | wxUSE_STACKWALKER=no | |
4710 | else | |
4711 | AC_CACHE_CHECK([for __cxa_demangle() in <cxxabi.h>], wx_cv_func_cxa_demangle, | |
4712 | [ | |
224d4f6d | 4713 | AC_LANG_PUSH(C++) |
dfe0c803 | 4714 | AC_TRY_LINK([#include <cxxabi.h>], |
eaff0f0d VZ |
4715 | [ |
4716 | int rc; | |
4717 | __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc); | |
4718 | ], | |
4719 | wx_cv_func_cxa_demangle=yes, | |
4720 | wx_cv_func_cxa_demangle=no | |
4721 | ) | |
224d4f6d | 4722 | AC_LANG_POP() |
eaff0f0d VZ |
4723 | ] |
4724 | ) | |
4725 | ||
4726 | if test "$wx_cv_func_cxa_demangle" = "yes"; then | |
4727 | AC_DEFINE(HAVE_CXA_DEMANGLE) | |
4728 | fi | |
4729 | fi | |
eaff0f0d VZ |
4730 | fi |
4731 | ||
5ff751d6 | 4732 | if test "$wxUSE_STACKWALKER" = "yes" -a "$USE_WIN32" != "1" -a "$USE_UNIX" != "1"; then |
898beab1 DE |
4733 | AC_MSG_WARN([wxStackWalker is only available on Win32 and UNIX... disabled]) |
4734 | wxUSE_STACKWALKER=no | |
4735 | fi | |
4736 | ||
4737 | ||
ade35f11 VZ |
4738 | dnl check for the function for temp files creation |
4739 | AC_CHECK_FUNCS(mkstemp mktemp, break) | |
4740 | ||
9952adac VZ |
4741 | dnl get the library function to use for wxGetDiskSpace(): it is statfs() under |
4742 | dnl Linux and *BSD and statvfs() under Solaris | |
52e8b690 VZ |
4743 | AC_CACHE_CHECK(for statfs, wx_cv_func_statfs, |
4744 | AC_TRY_COMPILE( | |
4745 | [ | |
9952adac | 4746 | #if defined(__BSD__) |
84ae7ca4 VZ |
4747 | #include <sys/param.h> |
4748 | #include <sys/mount.h> | |
d08b457b | 4749 | #else |
84ae7ca4 | 4750 | #include <sys/vfs.h> |
d08b457b | 4751 | #endif |
52e8b690 VZ |
4752 | ], |
4753 | [ | |
4754 | long l; | |
4755 | struct statfs fs; | |
4756 | statfs("/", &fs); | |
4757 | l = fs.f_bsize; | |
4758 | l += fs.f_blocks; | |
4759 | l += fs.f_bavail; | |
4760 | ], | |
84ae7ca4 VZ |
4761 | wx_cv_func_statfs=yes, |
4762 | wx_cv_func_statfs=no | |
4763 | ) | |
4764 | ) | |
4765 | ||
4766 | if test "$wx_cv_func_statfs" = "yes"; then | |
4767 | dnl check whether we have its dcelaration too: some systems (AIX 4) lack it | |
84ae7ca4 | 4768 | AC_CACHE_CHECK(for statfs declaration, wx_cv_func_statfs_decl, |
224d4f6d | 4769 | AC_LANG_PUSH(C++) |
0683aca6 VZ |
4770 | AC_TRY_COMPILE( |
4771 | [ | |
4772 | #if defined(__BSD__) | |
4773 | #include <sys/param.h> | |
4774 | #include <sys/mount.h> | |
4775 | #else | |
4776 | #include <sys/vfs.h> | |
4777 | #endif | |
4778 | ], | |
4779 | [ | |
4780 | struct statfs fs; | |
4781 | statfs("", &fs); | |
4782 | ], | |
4783 | wx_cv_func_statfs_decl=yes, | |
4784 | wx_cv_func_statfs_decl=no | |
4785 | ) | |
224d4f6d | 4786 | AC_LANG_POP() |
52e8b690 | 4787 | ) |
84ae7ca4 VZ |
4788 | |
4789 | if test "$wx_cv_func_statfs_decl" = "yes"; then | |
4790 | AC_DEFINE(HAVE_STATFS_DECL) | |
4791 | fi | |
52e8b690 | 4792 | |
54ab82b3 | 4793 | wx_cv_type_statvfs_t="struct statfs" |
52e8b690 VZ |
4794 | AC_DEFINE(HAVE_STATFS) |
4795 | else | |
9952adac VZ |
4796 | AC_CACHE_CHECK(for statvfs, wx_cv_func_statvfs, |
4797 | AC_TRY_COMPILE( | |
4798 | [ | |
54ab82b3 VZ |
4799 | #include <stddef.h> |
4800 | #include <sys/statvfs.h> | |
9952adac VZ |
4801 | ], |
4802 | [ | |
54ab82b3 | 4803 | statvfs("/", NULL); |
9952adac | 4804 | ], |
54ab82b3 VZ |
4805 | wx_cv_func_statvfs=yes, |
4806 | wx_cv_func_statvfs=no | |
9952adac | 4807 | ) |
af15babd | 4808 | ) |
9952adac VZ |
4809 | |
4810 | if test "$wx_cv_func_statvfs" = "yes"; then | |
54ab82b3 VZ |
4811 | dnl we also have to check whether we should use statvfs_t (works under |
4812 | dnl Solaris 8, doesn't work under Solaris 7) or "struct statvfs" (vice | |
4813 | dnl versa) as the argument for statvfs in 64 bit off_t mode (in 32 bit | |
4814 | dnl mode both work fine) | |
4815 | dnl | |
4816 | dnl for this check C++ compiler has to be used as passing incompatible | |
4817 | dnl pointers is just a warning and not an error in C | |
54ab82b3 | 4818 | AC_CACHE_CHECK(for statvfs argument type, wx_cv_type_statvfs_t, |
224d4f6d | 4819 | AC_LANG_PUSH(C++) |
54ab82b3 VZ |
4820 | AC_TRY_COMPILE( |
4821 | [ | |
4822 | #include <sys/statvfs.h> | |
4823 | ], | |
4824 | [ | |
4825 | long l; | |
4826 | statvfs_t fs; | |
4827 | statvfs("/", &fs); | |
4828 | l = fs.f_bsize; | |
4829 | l += fs.f_blocks; | |
4830 | l += fs.f_bavail; | |
4831 | ], | |
4832 | wx_cv_type_statvfs_t=statvfs_t, | |
4833 | [ | |
4834 | AC_TRY_COMPILE( | |
4835 | [ | |
4836 | #include <sys/statvfs.h> | |
4837 | ], | |
4838 | [ | |
4839 | long l; | |
e107213f | 4840 | struct statvfs fs; |
54ab82b3 VZ |
4841 | statvfs("/", &fs); |
4842 | l = fs.f_bsize; | |
4843 | l += fs.f_blocks; | |
4844 | l += fs.f_bavail; | |
4845 | ], | |
4846 | wx_cv_type_statvfs_t="struct statvfs", | |
4847 | wx_cv_type_statvfs_t="unknown" | |
4848 | ) | |
4849 | ] | |
4850 | ) | |
224d4f6d | 4851 | AC_LANG_POP() |
54ab82b3 VZ |
4852 | ) |
4853 | ||
54ab82b3 VZ |
4854 | if test "$wx_cv_type_statvfs_t" != "unknown"; then |
4855 | AC_DEFINE(HAVE_STATVFS) | |
4856 | fi | |
9952adac | 4857 | else |
54ab82b3 VZ |
4858 | dnl set it for the test below |
4859 | wx_cv_type_statvfs_t="unknown" | |
9952adac | 4860 | fi |
52e8b690 VZ |
4861 | fi |
4862 | ||
54ab82b3 VZ |
4863 | if test "$wx_cv_type_statvfs_t" != "unknown"; then |
4864 | AC_DEFINE_UNQUOTED(WX_STATFS_T, $wx_cv_type_statvfs_t) | |
4865 | else | |
4866 | AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()]) | |
4867 | fi | |
4868 | ||
4f3c5f06 VZ |
4869 | dnl check for fcntl() or at least flock() needed by Unix implementation of |
4870 | dnl wxSingleInstanceChecker | |
4871 | if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then | |
4872 | AC_CHECK_FUNCS(fcntl flock, break) | |
4873 | ||
4874 | if test "$ac_cv_func_fcntl" != "yes" -a "$ac_cv_func_flock" != "yes"; then | |
4875 | AC_MSG_WARN(wxSingleInstanceChecker not available) | |
4876 | wxUSE_SNGLINST_CHECKER=no | |
4877 | fi | |
4878 | fi | |
4879 | ||
270a909e VZ |
4880 | dnl check for timegm() used by datetime.cpp |
4881 | AC_CHECK_FUNCS(timegm) | |
4882 | ||
4f3c5f06 | 4883 | dnl look for a function to modify the environment |
8fd0d89b VZ |
4884 | AC_CHECK_FUNCS(putenv setenv, break) |
4885 | ||
b12915c1 VZ |
4886 | HAVE_SOME_SLEEP_FUNC=0 |
4887 | if test "$USE_BEOS" = 1; then | |
4888 | dnl BeOS has its own (wonder where did they get it from) sleep() function | |
4889 | dnl in unistd.h | |
4890 | AC_DEFINE(HAVE_SLEEP) | |
4891 | HAVE_SOME_SLEEP_FUNC=1 | |
4892 | fi | |
4893 | ||
f11bdd03 | 4894 | if test "$USE_DARWIN" = 1; then |
b2fee376 | 4895 | dnl Mac OS X/Darwin has both nanosleep and usleep |
b4085ce6 GD |
4896 | dnl but only usleep is defined in unistd.h |
4897 | AC_DEFINE(HAVE_USLEEP) | |
4898 | HAVE_SOME_SLEEP_FUNC=1 | |
4899 | fi | |
4900 | ||
b12915c1 VZ |
4901 | if test "$HAVE_SOME_SLEEP_FUNC" != 1; then |
4902 | dnl try nanosleep() in libc and libposix4, if this fails - usleep() | |
4903 | POSIX4_LINK= | |
4904 | AC_CHECK_FUNCS(nanosleep, | |
4905 | AC_DEFINE(HAVE_NANOSLEEP), | |
4906 | [ | |
4907 | AC_CHECK_LIB(posix4, nanosleep, | |
4908 | [ | |
4909 | AC_DEFINE(HAVE_NANOSLEEP) | |
3d63bc3a | 4910 | POSIX4_LINK=" -lposix4" |
b12915c1 VZ |
4911 | ], |
4912 | [ | |
fd5199d6 VZ |
4913 | WX_CHECK_FUNCS(usleep,, |
4914 | AC_MSG_WARN([wxSleep() function will not work]) | |
4f3c5f06 | 4915 | ) |
b12915c1 VZ |
4916 | ] |
4917 | ) | |
4918 | ] | |
4919 | ) | |
4920 | fi | |
9a98a854 VZ |
4921 | |
4922 | dnl check for uname (POSIX) and gethostname (BSD) | |
d0dec913 VZ |
4923 | WX_CHECK_FUNCS(uname,,,[#include <sys/utsname.h>]) |
4924 | if test "$wx_cv_func_uname" != yes; then | |
4925 | WX_CHECK_FUNCS(gethostname) | |
4926 | fi | |
9a98a854 | 4927 | |
56632e81 | 4928 | WX_CHECK_FUNCS(strtok_r, [], [], [#define _REENTRANT]) |
e90c1d2a | 4929 | |
c63c7106 | 4930 | dnl check for inet_addr and inet_aton (these may live either in libc, or in |
c6712985 | 4931 | dnl libnsl or libresolv or libsocket) |
c63c7106 VZ |
4932 | INET_LINK= |
4933 | AC_CHECK_FUNCS(inet_addr, | |
4934 | AC_DEFINE(HAVE_INET_ADDR), | |
4935 | [ | |
4936 | AC_CHECK_LIB(nsl, inet_addr, | |
270a909e | 4937 | INET_LINK="nsl", |
4c15b7af SN |
4938 | [ |
4939 | AC_CHECK_LIB(resolv, inet_addr, | |
4940 | INET_LINK="resolv", | |
4941 | [ | |
4942 | AC_CHECK_LIB(socket, inet_addr, | |
4943 | INET_LINK="socket" | |
4944 | ) | |
4945 | ] | |
c6712985 | 4946 | ) |
4c15b7af | 4947 | ] |
c63c7106 VZ |
4948 | ) |
4949 | ] | |
4950 | ) | |
4951 | ||
4952 | AC_CHECK_FUNCS(inet_aton, | |
4953 | AC_DEFINE(HAVE_INET_ATON), | |
4954 | [ | |
4955 | dnl only check it in the same lib | |
4956 | AC_CHECK_LIB($INET_LINK, inet_aton, AC_DEFINE(HAVE_INET_ATON)) | |
4957 | ]) | |
4958 | ||
4959 | if test "x$INET_LINK" != "x"; then | |
4960 | AC_DEFINE(HAVE_INET_ADDR) | |
3d63bc3a | 4961 | INET_LINK=" -l$INET_LINK" |
c63c7106 | 4962 | fi |
e96ac54e | 4963 | |
c06469f6 MW |
4964 | WX_CHECK_FUNCS(fdopen) |
4965 | ||
a0c79abb | 4966 | fi |
c06469f6 | 4967 | |
b089607b | 4968 | dnl if !MSW |
a0c79abb | 4969 | |
e6cc62c6 VS |
4970 | |
4971 | dnl ------------------------------------------ | |
4972 | dnl Checks specific to contrib libs (MMedia) | |
4973 | dnl ------------------------------------------ | |
4974 | ||
4975 | dnl Check for ESD: | |
edd891e2 VS |
4976 | EXTRALIBS_ESD= |
4977 | AC_CHECK_LIB(esd, esd_close, [ | |
4978 | AC_CHECK_HEADERS([esd.h], [ | |
4979 | EXTRALIBS_ESD="-lesd" | |
e6cc62c6 VS |
4980 | ]) |
4981 | ]) | |
edd891e2 | 4982 | AC_SUBST(EXTRALIBS_ESD) |
e6cc62c6 | 4983 | |
d19d1899 MB |
4984 | dnl check for known CD-ROM interface |
4985 | AC_MSG_CHECKING([for known CD-ROM interface]) | |
4986 | AC_TRY_COMPILE([#ifdef __linux__ | |
4987 | #include <linux/cdrom.h> | |
4988 | #else | |
4989 | /* For Solaris */ | |
4990 | #include <sys/cdio.h> | |
4991 | #endif | |
4992 | ], | |
4993 | [struct cdrom_tocentry entry, old_entry;], | |
4994 | [AC_MSG_RESULT([yes]) | |
4995 | AC_DEFINE(HAVE_KNOWN_CDROM_INTERFACE)], | |
4996 | [AC_MSG_RESULT([no])]) | |
e6cc62c6 | 4997 | |
9a98a854 VZ |
4998 | dnl =========================================================================== |
4999 | dnl Now we have all the info we need - use it! | |
5000 | dnl =========================================================================== | |
5001 | ||
5002 | dnl flush the cache | |
5003 | AC_CACHE_SAVE | |
5004 | ||
5005 | dnl --------------------------------------------------------------------------- | |
5cc55caf SN |
5006 | dnl thread support for Unix (for Win32 and OS/2 see past |
5007 | dnl the next matching "else") | |
9a98a854 VZ |
5008 | dnl --------------------------------------------------------------------------- |
5009 | ||
a0b9e27f | 5010 | dnl under MSW (except mingw32) we always have thread support |
5cc55caf | 5011 | if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then |
a9b5e89f | 5012 | |
7274f1c7 | 5013 | dnl the code below: |
009fead0 | 5014 | dnl |
d0dec913 | 5015 | dnl defines THREADS_LINK and THREADS_CFLAGS which are the options |
009fead0 VZ |
5016 | dnl necessary to build the MT programs for the linker and compiler |
5017 | dnl respectively | |
5018 | dnl | |
5019 | dnl sets wxUSE_THREADS=1 if thread support is activated | |
7274f1c7 RL |
5020 | |
5021 | THREADS_LINK= | |
d0dec913 | 5022 | THREADS_CFLAGS= |
7274f1c7 RL |
5023 | |
5024 | if test "$wxUSE_THREADS" = "yes" ; then | |
d1188635 | 5025 | if test "$USE_BEOS" = 1; then |
156b2523 | 5026 | AC_MSG_WARN([BeOS threads are not yet supported... disabled]) |
7274f1c7 RL |
5027 | wxUSE_THREADS="no" |
5028 | fi | |
77c85c2b | 5029 | fi |
39c9d5ac | 5030 | |
7274f1c7 RL |
5031 | if test "$wxUSE_THREADS" = "yes" ; then |
5032 | dnl find if POSIX threads are available | |
009fead0 VZ |
5033 | dnl |
5034 | dnl the tests here are based on ACX_PTHREAD macro from autoconf macro | |
5035 | dnl archive from http://ac-archive.sourceforge.net/ | |
5036 | dnl | |
5037 | dnl thanks to Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro | |
5038 | dnl Forero Cuervo <bachue@bachue.com> for the original code | |
5039 | ||
5040 | dnl TODO: cache the result | |
5041 | ||
5042 | dnl define the list of the thread options to try in the loop below | |
5043 | dnl with the convention that anything starting with '-' is a cpp flag | |
5044 | dnl while anything else is a library (i.e. there is an implicit "-l") | |
5045 | THREAD_OPTS="-pthread" | |
5046 | case "${host}" in | |
5047 | *-*-solaris2* | *-*-sunos4* ) | |
5048 | if test "x$GCC" = "xyes"; then | |
126be6b4 VZ |
5049 | dnl Solaris/gcc combination use this one for some reason |
5050 | THREAD_OPTS="-pthreads $THREAD_OPTS" | |
009fead0 VZ |
5051 | else |
5052 | THREAD_OPTS="-mt $THREAD_OPTS" | |
5053 | fi | |
5054 | ;; | |
5055 | *-*-freebsd*) | |
5056 | dnl look, in order, for the kernel threads, then Linux threads | |
5057 | dnl and finally the userland threads | |
5058 | THREAD_OPTS="-kthread lthread $THREAD_OPTS c_r" | |
5059 | ;; | |
17234b26 | 5060 | *-*-darwin* | *-*-cygwin* ) |
4101db81 | 5061 | dnl Darwin / Mac OS X just uses -lpthread tested below |
17234b26 | 5062 | dnl and so does Cygwin |
4101db81 GD |
5063 | THREAD_OPTS="" |
5064 | ;; | |
5065 | *-*-aix*) | |
009fead0 VZ |
5066 | dnl AIX calls the library libpthreads - thanks IBM! |
5067 | THREAD_OPTS="pthreads" | |
5068 | ;; | |
4f5a7f74 | 5069 | *-hp-hpux* ) |
00421666 MW |
5070 | if test "x$GCC" = "xyes"; then |
5071 | dnl g++ versions before 3.3.2 don't support -pthread. | |
5072 | $CXX -dumpspecs | grep 'pthread:' >/dev/null || | |
5ff751d6 | 5073 | THREAD_OPTS="" |
00421666 | 5074 | else |
54770337 VZ |
5075 | dnl HP-UX aCC (tested with version B3910B A.06.05 [Jul 25 |
5076 | dnl 2005]) supports -mt | |
5077 | THREAD_OPTS="-mt" | |
4f5a7f74 | 5078 | fi |
89e3b3e4 | 5079 | ;; |
260d6849 VZ |
5080 | |
5081 | *-*-irix* ) | |
5082 | dnl gcc under IRIX doesn't seem to like -pthread, but it | |
5083 | dnl doesn't give an error for it neither, just a warning | |
5084 | dnl message -- but this is still very annoying | |
5085 | if test "x$GCC" = "xyes"; then | |
5086 | THREAD_OPTS="" | |
5087 | fi | |
5088 | ;; | |
5089 | ||
5090 | *-*-*UnixWare*) | |
5091 | dnl flying by man pages here: Caldera online docs use this | |
5092 | if test "x$GCC" != "xyes"; then | |
5093 | THREAD_OPTS="-Ethread" | |
5094 | fi | |
5095 | ;; | |
009fead0 | 5096 | esac |
c596875e | 5097 | |
595e0e44 VZ |
5098 | dnl simply linking with libpthread should make the test below work but |
5099 | dnl it's far from certain that the threaded programs compiled without | |
5100 | dnl any special switches actually work, so try it after all the others | |
02a1dfba | 5101 | THREAD_OPTS="$THREAD_OPTS pthread none" |
595e0e44 | 5102 | |
009fead0 VZ |
5103 | dnl now test for all possibilities |
5104 | THREADS_OK=no | |
5105 | for flag in $THREAD_OPTS; do | |
5106 | case $flag in | |
5107 | none) | |
5108 | AC_MSG_CHECKING([whether pthreads work without any flags]) | |
5109 | ;; | |
f6bcfd97 | 5110 | |
009fead0 VZ |
5111 | -*) |
5112 | AC_MSG_CHECKING([whether pthreads work with $flag]) | |
d0dec913 | 5113 | THREADS_CFLAGS="$flag" |
009fead0 | 5114 | ;; |
9a98a854 | 5115 | |
009fead0 VZ |
5116 | *) |
5117 | AC_MSG_CHECKING([for the pthreads library -l$flag]) | |
5118 | THREADS_LINK="-l$flag" | |
5119 | ;; | |
5120 | esac | |
5121 | ||
5122 | save_LIBS="$LIBS" | |
d0dec913 | 5123 | save_CFLAGS="$CFLAGS" |
009fead0 | 5124 | LIBS="$THREADS_LINK $LIBS" |
d0dec913 | 5125 | CFLAGS="$THREADS_CFLAGS $CFLAGS" |
009fead0 VZ |
5126 | |
5127 | AC_TRY_LINK([#include <pthread.h>], | |
5128 | [pthread_create(0,0,0,0);], | |
5129 | THREADS_OK=yes) | |
5130 | ||
5131 | LIBS="$save_LIBS" | |
d0dec913 | 5132 | CFLAGS="$save_CFLAGS" |
009fead0 VZ |
5133 | |
5134 | AC_MSG_RESULT($THREADS_OK) | |
5135 | if test "x$THREADS_OK" = "xyes"; then | |
5136 | break; | |
5137 | fi | |
5138 | ||
5139 | THREADS_LINK="" | |
d0dec913 | 5140 | THREADS_CFLAGS="" |
009fead0 VZ |
5141 | done |
5142 | ||
5143 | if test "x$THREADS_OK" != "xyes"; then | |
5144 | wxUSE_THREADS=no | |
5145 | AC_MSG_WARN([No thread support on this system... disabled]) | |
5146 | else | |
fe5a9cab VZ |
5147 | dnl yes, these special compiler flags should be used with the |
5148 | dnl linker as well | |
d0dec913 | 5149 | LDFLAGS="$THREADS_CFLAGS $LDFLAGS" |
db82f09e | 5150 | LIBS="$THREADS_LINK $LIBS" |
fe5a9cab | 5151 | |
009fead0 VZ |
5152 | AC_MSG_CHECKING([if more special flags are required for pthreads]) |
5153 | flag=no | |
5154 | case "${host}" in | |
2b5f62a0 VZ |
5155 | *-aix*) |
5156 | dnl again quoting from | |
5157 | dnl http://www-1.ibm.com/servers/esdd/articles/gnu.html: | |
5158 | dnl | |
5159 | dnl When compiling and linking with -pthread, the library | |
5160 | dnl search path should include -L/usr/lib/threads at the | |
5161 | dnl beginning of the path. | |
5162 | LDFLAGS="-L/usr/lib/threads $LDFLAGS" | |
5163 | flag="-D_THREAD_SAFE" | |
5164 | ;; | |
5165 | *-freebsd*) | |
009fead0 VZ |
5166 | flag="-D_THREAD_SAFE" |
5167 | ;; | |
06313569 GD |
5168 | *-hp-hpux* ) |
5169 | flag="-D_REENTRANT" | |
4f5a7f74 VZ |
5170 | if test "x$GCC" != "xyes"; then |
5171 | dnl see http://docs.hp.com/hpux/onlinedocs/2213/threads.htm | |
5172 | flag="$flag -D_RWSTD_MULTI_THREAD" | |
5173 | fi | |
06313569 | 5174 | ;; |
009fead0 VZ |
5175 | *solaris* | alpha*-osf*) |
5176 | flag="-D_REENTRANT" | |
5177 | ;; | |
5178 | esac | |
5179 | AC_MSG_RESULT(${flag}) | |
5180 | if test "x$flag" != xno; then | |
d0dec913 | 5181 | THREADS_CFLAGS="$THREADS_CFLAGS $flag" |
009fead0 VZ |
5182 | fi |
5183 | ||
5ff751d6 | 5184 | dnl don't add these options to CPPFLAGS as cpp might not know them |
d0dec913 | 5185 | WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS $THREADS_CFLAGS" |
009fead0 | 5186 | fi |
aea02638 | 5187 | fi |
9a98a854 | 5188 | |
7274f1c7 RL |
5189 | dnl do other tests only if we are using threads |
5190 | if test "$wxUSE_THREADS" = "yes" ; then | |
5191 | AC_CHECK_FUNCS(thr_setconcurrency) | |
5192 | ||
6ebeb4c7 VZ |
5193 | dnl can't use AC_CHECK_FUNCS for this one as it's usually a macro and so |
5194 | dnl wouldn't be found by it | |
5195 | AC_CACHE_CHECK([for pthread_cleanup_push/pop], wx_cv_func_pthread_cleanup, | |
5196 | [ | |
5197 | AC_TRY_COMPILE([#include <pthread.h> | |
5198 | void ThreadCleanupFunc(void *p); | |
5199 | ], | |
5200 | [ | |
5201 | void *p; | |
5202 | pthread_cleanup_push(ThreadCleanupFunc, p); | |
5203 | pthread_cleanup_pop(0); | |
5204 | ], [ | |
5205 | wx_cv_func_pthread_cleanup=yes | |
5206 | ], [ | |
5207 | wx_cv_func_pthread_cleanup=no | |
5208 | ] | |
5209 | ) | |
5210 | ]) | |
5211 | if test "x$wx_cv_func_pthread_cleanup" = "xyes"; then | |
5212 | AC_DEFINE(wxHAVE_PTHREAD_CLEANUP) | |
5213 | fi | |
5214 | ||
7274f1c7 | 5215 | AC_CHECK_HEADERS(sched.h) |
009fead0 VZ |
5216 | if test "$ac_cv_header_sched_h" = "yes"; then |
5217 | AC_CHECK_FUNC(sched_yield, | |
5218 | AC_DEFINE(HAVE_SCHED_YIELD), | |
5219 | [ | |
5220 | AC_CHECK_LIB(posix4, | |
5221 | sched_yield, | |
5222 | [AC_DEFINE(HAVE_SCHED_YIELD) POSIX4_LINK=" -lposix4"], | |
5223 | AC_MSG_WARN(wxThread::Yield will not work properly) | |
5224 | ) | |
5225 | ] | |
5226 | ) | |
5227 | fi | |
9a98a854 | 5228 | |
7274f1c7 RL |
5229 | dnl to be able to set the thread priority, we need to have all of the |
5230 | dnl following functions: | |
5231 | dnl 1. pthread_attr_getschedpolicy | |
5232 | dnl 2. sched_get_priority_min and sched_get_priority_max | |
5233 | dnl (this one can be in either libpthread or libposix4 (under Solaris)) | |
5234 | dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam | |
5235 | HAVE_PRIOR_FUNCS=0 | |
009fead0 | 5236 | AC_CHECK_FUNC(pthread_attr_getschedpolicy, |
ef33c576 VZ |
5237 | [AC_CHECK_FUNC(pthread_attr_setschedparam, |
5238 | [AC_CHECK_FUNC(sched_get_priority_max, | |
7274f1c7 | 5239 | HAVE_PRIOR_FUNCS=1, |
ef33c576 | 5240 | [AC_CHECK_LIB([posix4], sched_get_priority_max, |
7274f1c7 RL |
5241 | [ |
5242 | HAVE_PRIOR_FUNCS=1 | |
5243 | POSIX4_LINK=" -lposix4" | |
5244 | ], | |
ef33c576 VZ |
5245 | )] |
5246 | )] | |
5247 | )] | |
7274f1c7 | 5248 | ) |
f6bcfd97 | 5249 | |
7274f1c7 RL |
5250 | if test "$HAVE_PRIOR_FUNCS" = 1; then |
5251 | AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS) | |
5252 | else | |
5253 | AC_MSG_WARN(Setting thread priority will not work) | |
5254 | fi | |
9a98a854 | 5255 | |
009fead0 VZ |
5256 | AC_CHECK_FUNC(pthread_cancel, |
5257 | AC_DEFINE(HAVE_PTHREAD_CANCEL), | |
5258 | AC_MSG_WARN([wxThread::Kill() will not work properly])) | |
9a98a854 | 5259 | |
219577d0 SN |
5260 | AC_CHECK_FUNC(pthread_attr_setstacksize, |
5261 | AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE)) | |
ab252f7b | 5262 | |
7274f1c7 RL |
5263 | dnl mutexattr_t initialization is done in quite different ways on different |
5264 | dnl platforms, so check for a few things: | |
5265 | dnl | |
5266 | dnl HAVE_MUTEX_RECURSIVE means that we can create recursive mutexes | |
5267 | dnl HAVE_MUTEXATTR_SETTYPE means that we do it using | |
5268 | dnl pthread_mutexattr_settype(PTHREAD_MUTEX_RECURSIVE) and if it is not | |
5269 | dnl defined, we do it by directly assigned | |
5270 | dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr | |
5271 | ||
7274f1c7 RL |
5272 | AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t, |
5273 | [ | |
d9b9876f VZ |
5274 | AC_TRY_COMPILE([#include <pthread.h>], |
5275 | [ | |
7274f1c7 RL |
5276 | pthread_mutexattr_t attr; |
5277 | pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); | |
123dca7d VZ |
5278 | ], |
5279 | wx_cv_type_pthread_mutexattr_t=yes, | |
5280 | wx_cv_type_pthread_mutexattr_t=no | |
d9b9876f | 5281 | ) |
7274f1c7 | 5282 | ]) |
d9b9876f | 5283 | |
7274f1c7 RL |
5284 | if test "$wx_cv_type_pthread_mutexattr_t" = "yes"; then |
5285 | AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_T) | |
123dca7d VZ |
5286 | |
5287 | dnl check if we already have the declaration we need, it is not | |
5288 | dnl present in some systems' headers | |
5289 | AC_CACHE_CHECK([for pthread_mutexattr_settype declaration], | |
5290 | wx_cv_func_pthread_mutexattr_settype_decl, [ | |
5291 | AC_TRY_COMPILE([#include <pthread.h>], | |
5292 | [ | |
5293 | pthread_mutexattr_t attr; | |
5294 | pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); | |
5295 | ], | |
5296 | wx_cv_func_pthread_mutexattr_settype_decl=yes, | |
5297 | wx_cv_func_pthread_mutexattr_settype_decl=no | |
5298 | ) | |
5299 | ]) | |
5300 | if test "$wx_cv_func_pthread_mutexattr_settype_decl" = "yes"; then | |
5301 | AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL) | |
5302 | fi | |
7274f1c7 RL |
5303 | else |
5304 | dnl don't despair, there may be another way to do it | |
5305 | AC_CACHE_CHECK([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER], | |
5306 | wx_cv_type_pthread_rec_mutex_init, | |
5307 | [ | |
5308 | AC_TRY_COMPILE([#include <pthread.h>], | |
5309 | [ | |
5310 | pthread_mutex_t attr = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; | |
5311 | ], [ | |
5312 | wx_cv_type_pthread_rec_mutex_init=yes | |
5313 | ], [ | |
5314 | wx_cv_type_pthread_rec_mutex_init=no | |
5315 | ] | |
5316 | ) | |
5317 | ]) | |
5318 | if test "$wx_cv_type_pthread_rec_mutex_init" = "yes"; then | |
5319 | AC_DEFINE(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER) | |
5320 | else | |
5321 | dnl this may break code working elsewhere, so at least warn about it | |
5322 | AC_MSG_WARN([wxMutex won't be recursive on this platform]) | |
5323 | fi | |
5324 | fi | |
7274f1c7 | 5325 | fi |
9a98a854 | 5326 | |
b089607b | 5327 | dnl from if !MSW |
a0b9e27f MB |
5328 | else |
5329 | if test "$wxUSE_THREADS" = "yes" ; then | |
5330 | case "${host}" in | |
5331 | *-*-mingw32* ) | |
ca8e52b3 VZ |
5332 | dnl check if the compiler accepts -mthreads |
5333 | AC_CACHE_CHECK([if compiler supports -mthreads], | |
5334 | wx_cv_cflags_mthread, | |
5335 | [ | |
d0dec913 VZ |
5336 | CFLAGS_OLD="$CFLAGS" |
5337 | CFLAGS="-mthreads $CFLAGS" | |
ca8e52b3 VZ |
5338 | AC_TRY_COMPILE([], [], |
5339 | wx_cv_cflags_mthread=yes, | |
5340 | wx_cv_cflags_mthread=no | |
5341 | ) | |
5342 | ] | |
5343 | ) | |
5344 | ||
5345 | if test "$wx_cv_cflags_mthread" = "yes"; then | |
5346 | dnl it does, use it | |
d0dec913 | 5347 | WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -mthreads" |
ca8e52b3 VZ |
5348 | LDFLAGS="$LDFLAGS -mthreads" |
5349 | else | |
5350 | dnl it doesn't | |
d0dec913 | 5351 | CFLAGS="$CFLAGS_OLD" |
ca8e52b3 | 5352 | fi |
a0b9e27f | 5353 | ;; |
5cc55caf | 5354 | *-pc-os2*emx ) |
5ff751d6 | 5355 | WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -Zmt -D__ST_MT_ERRNO__" |
5cc55caf SN |
5356 | LDFLAGS="$LDFLAGS -Zmt" |
5357 | ;; | |
a0b9e27f MB |
5358 | esac |
5359 | fi | |
a9b5e89f VZ |
5360 | fi |
5361 | ||
bebf40d5 | 5362 | AC_CHECK_FUNC(localtime_r, [ AC_DEFINE(HAVE_LOCALTIME_R) ]) |
bebf40d5 | 5363 | AC_CHECK_FUNC(gmtime_r, [ AC_DEFINE(HAVE_GMTIME_R) ]) |
bebf40d5 | 5364 | AC_CHECK_FUNC(readdir_r, [ AC_DEFINE(HAVE_READDIR_R) ]) |
b41e7f68 SN |
5365 | dnl By preference, we probably should use getaddrinfo which avoids thread |
5366 | dnl safety issues and supports IPv6, however there currently is no code | |
5367 | dnl for it, so testing for it is temporarily disabled and we are restricted | |
5368 | dnl to gethostbyname_r/gethostbyaddr_r and getservbyname_r | |
5369 | ||
5370 | dnl AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), [ | |
bebf40d5 SN |
5371 | dnl no getaddrinfo, so check for gethostbyname_r and |
5372 | dnl related functions (taken from python's configure.in) | |
5373 | dnl sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments | |
b41e7f68 | 5374 | AX_FUNC_WHICH_GETHOSTBYNAME_R |
bebf40d5 | 5375 | if test "x$ac_cv_func_which_gethostbyname_r" = "xno" -o \ |
1e613d22 | 5376 | "x$ac_cv_func_which_gethostbyname_r" = "xunknown" ; then |
bebf40d5 SN |
5377 | AC_CHECK_FUNC(gethostbyname, [ AC_DEFINE(HAVE_GETHOSTBYNAME) ]) |
5378 | fi | |
bebf40d5 SN |
5379 | dnl A similar test for getservbyname_r |
5380 | dnl I'm tempted to just not do this test which is taking much time and | |
5381 | dnl do something similar as for gethostbyaddr_r, but OTOH the macro | |
5382 | dnl doing the test already exists, so using it is easy enough. - SN | |
5383 | AC_raf_FUNC_WHICH_GETSERVBYNAME_R | |
5384 | if test "x$ac_cv_func_which_getservbyname_r" = "xno" -o \ | |
1e613d22 | 5385 | "x$ac_cv_func_which_getservbyname_r" = "xunknown" ; then |
bebf40d5 SN |
5386 | AC_CHECK_FUNCS(getservbyname,[ AC_DEFINE(HAVE_GETSERVBYNAME) ]) |
5387 | fi | |
bebf40d5 SN |
5388 | dnl For gethostbyaddr_r, we currently do no separate test, instead, we |
5389 | dnl silently assume it's available exactly if gethostbyname_r is | |
5390 | dnl available and always requires two more arguments than | |
5391 | dnl gethostbyname_r. | |
5392 | dnl (also, I'm lazy and there no m4 file that's ready for use for this | |
5393 | dnl function, although it should be easy to rewrite the gethostbyname_r | |
5394 | dnl check to fit this case, if it's really needed. - SN ) | |
b41e7f68 SN |
5395 | dnl ] |
5396 | dnl ) | |
bebf40d5 | 5397 | |
a9b5e89f VZ |
5398 | if test "$wxUSE_THREADS" = "yes"; then |
5399 | AC_DEFINE(wxUSE_THREADS) | |
5400 | ||
a9b5e89f | 5401 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread" |
d64af447 | 5402 | else |
b12915c1 | 5403 | dnl on some systems, _REENTRANT should be defined if we want to use any _r() |
d64af447 | 5404 | dnl functions - add tests for other functions here as well |
56632e81 | 5405 | if test "$wx_cv_func_strtok_r" = "yes"; then |
ab9b9eab VZ |
5406 | AC_MSG_CHECKING(if -D_REENTRANT is needed) |
5407 | if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then | |
5ff751d6 | 5408 | WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_REENTRANT" |
ab9b9eab VZ |
5409 | AC_MSG_RESULT(yes) |
5410 | else | |
5411 | AC_MSG_RESULT(no) | |
ee31c269 | 5412 | fi |
d64af447 | 5413 | fi |
a9b5e89f VZ |
5414 | fi |
5415 | ||
6f72b082 OK |
5416 | if test "$WXGTK20" = 1 ; then |
5417 | AC_DEFINE_UNQUOTED(__WXGTK20__,$WXGTK20) | |
13111b2a VZ |
5418 | WXGTK12=1 |
5419 | fi | |
5420 | ||
9a98a854 VZ |
5421 | if test "$WXGTK12" = 1 ; then |
5422 | AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12) | |
5423 | fi | |
5424 | ||
f6bcfd97 BP |
5425 | if test "$WXGTK127" = 1 ; then |
5426 | AC_DEFINE_UNQUOTED(__WXGTK127__,$WXGTK127) | |
5427 | fi | |
5428 | ||
16bd311d RR |
5429 | if test "$WXGPE" = 1 ; then |
5430 | AC_DEFINE_UNQUOTED(__WXGPE__,$WXGPE) | |
5431 | fi | |
5432 | ||
8aeeb05c VZ |
5433 | dnl DEBUG_CFLAGS contains debugging options (supposed to be the same for C and C++ |
5434 | dnl compilers: we'd need a separate DEBUG_CXXFLAGS if this is ever not the case) | |
5435 | DEBUG_CFLAGS= | |
9a98a854 | 5436 | if test "$wxUSE_DEBUG_INFO" = "yes" ; then |
8aeeb05c | 5437 | DEBUG_CFLAGS="-g" |
9a98a854 VZ |
5438 | wxUSE_OPTIMISE=no |
5439 | fi | |
5440 | ||
5586805b RR |
5441 | if test "$wxUSE_DEBUG_GDB" = "yes" ; then |
5442 | wxUSE_DEBUG_INFO=yes | |
ab7704fd | 5443 | if test "$GCC" = yes; then |
8aeeb05c | 5444 | DEBUG_CFLAGS="-ggdb" |
ab7704fd | 5445 | fi |
5586805b RR |
5446 | fi |
5447 | ||
9a98a854 | 5448 | if test "$wxUSE_DEBUG_FLAG" = "yes" ; then |
77c85c2b | 5449 | AC_DEFINE(WXDEBUG) |
5ff751d6 | 5450 | WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D__WXDEBUG__" |
9a98a854 | 5451 | else |
04338f96 | 5452 | if test "$wxUSE_GTK" = 1 ; then |
0c897818 MR |
5453 | if test "x$wxGTK_VERSION" = "x1" ; then |
5454 | CPPFLAGS="-DGTK_NO_CHECK_CASTS $CPPFLAGS" | |
5455 | fi | |
04338f96 | 5456 | fi |
9a98a854 VZ |
5457 | fi |
5458 | ||
5459 | if test "$wxUSE_MEM_TRACING" = "yes" ; then | |
77c85c2b RR |
5460 | AC_DEFINE(wxUSE_MEMORY_TRACING) |
5461 | AC_DEFINE(wxUSE_GLOBAL_MEMORY_OPERATORS) | |
47c13eb7 | 5462 | AC_DEFINE(wxUSE_DEBUG_NEW_ALWAYS) |
77c85c2b | 5463 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS memcheck" |
9a98a854 VZ |
5464 | fi |
5465 | ||
5466 | if test "$wxUSE_DMALLOC" = "yes" ; then | |
4cfa7abe | 5467 | DMALLOC_LIBS="-ldmallocthcxx" |
9a98a854 VZ |
5468 | fi |
5469 | ||
5ff751d6 | 5470 | dnl cc/cxx/ld option for profiling |
8aeeb05c | 5471 | PROFILE_FLAGS= |
9a98a854 | 5472 | if test "$wxUSE_PROFILE" = "yes" ; then |
8aeeb05c | 5473 | PROFILE_FLAGS=" -pg" |
9a98a854 VZ |
5474 | fi |
5475 | ||
88e30f2b | 5476 | if test "$GCC" = "yes" ; then |
f7bdcdd7 | 5477 | if test "$wxUSE_NO_RTTI" = "yes" ; then |
5ff751d6 | 5478 | WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-rtti" |
f7bdcdd7 RR |
5479 | fi |
5480 | if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then | |
5ff751d6 | 5481 | WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-exceptions" |
f7bdcdd7 | 5482 | fi |
5586805b | 5483 | if test "$wxUSE_PERMISSIVE" = "yes" ; then |
5ff751d6 | 5484 | WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -fpermissive" |
5586805b | 5485 | fi |
1d1b75ac VZ |
5486 | |
5487 | dnl Ian Brown <ian.brown@printsoft.de> reports that versions of gcc before | |
5488 | dnl 3.0 overflow the table of contents on rs6000 as they create an entry | |
5489 | dnl for each subroutine by default -- using the switch below only creates | |
5490 | dnl one entry per file instead at the price of minor performance penalty | |
5491 | dnl | |
2b5f62a0 VZ |
5492 | dnl As of wx2.4 a bug in the hppa gcc compiler causes a similar problem |
5493 | dnl without -ffunction-sections. No idea how long we'll need to maintain | |
5494 | dnl this, or even the extent of gcc/wx version combinations affected, but | |
5495 | dnl also as above, this 'fix' does not come without side effects. | |
5496 | dnl | |
1d1b75ac VZ |
5497 | dnl TODO: test for the gcc version here (how?) |
5498 | case "${host}" in | |
5499 | powerpc*-*-aix* ) | |
5ff751d6 | 5500 | WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -mminimal-toc" |
1d1b75ac | 5501 | ;; |
2b5f62a0 | 5502 | *-hppa* ) |
5ff751d6 | 5503 | WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -ffunction-sections" |
2b5f62a0 | 5504 | ;; |
1d1b75ac | 5505 | esac |
c596875e RD |
5506 | fi |
5507 | ||
5ff751d6 | 5508 | dnl C/C++ compiler option for optimization (supposed to be the same for both) |
8aeeb05c | 5509 | OPTIMISE_CFLAGS= |
9a98a854 | 5510 | if test "$wxUSE_OPTIMISE" = "no" ; then |
af7b5345 VZ |
5511 | if test "$GCC" = yes ; then |
5512 | dnl use -O0 because compiling with it is faster than compiling with no | |
5513 | dnl optimization options at all (at least with g++ 3.2) | |
8aeeb05c | 5514 | OPTIMISE_CFLAGS="-O0" |
af7b5345 | 5515 | fi |
9a98a854 | 5516 | else |
77c85c2b | 5517 | if test "$GCC" = yes ; then |
6433b7f4 SN |
5518 | case "${host}" in |
5519 | *-pc-os2_emx | *-pc-os2-emx ) | |
5520 | dnl Not all of the supported gcc versions understand | |
5521 | dnl -fstrict-aliasing and none actually needs it (yet). | |
5522 | OPTIMISE_CFLAGS="-O2" | |
5523 | ;; | |
5524 | *) | |
5525 | dnl Switch on optimisation but keep strict-aliasing off for | |
5526 | dnl now (see -fstrict-aliasing in the gcc manual). When it is | |
5527 | dnl switched back on consider using -Wstrict-aliasing=2. | |
5528 | OPTIMISE_CFLAGS="-O2 -fno-strict-aliasing" | |
5529 | ;; | |
5530 | esac | |
77c85c2b | 5531 | else |
8aeeb05c | 5532 | OPTIMISE_CFLAGS="-O" |
77c85c2b | 5533 | fi |
9a98a854 VZ |
5534 | fi |
5535 | ||
677eb52d VZ |
5536 | dnl --------------------------------------------------------------------------- |
5537 | dnl compatibility level | |
5538 | dnl --------------------------------------------------------------------------- | |
5539 | ||
dee1a63f MB |
5540 | if test "x$WXWIN_COMPATIBILITY_2_4" = "xyes"; then |
5541 | AC_DEFINE(WXWIN_COMPATIBILITY_2_4) | |
677eb52d | 5542 | |
dee1a63f | 5543 | WXWIN_COMPATIBILITY_2_6="yes" |
54276ccf VZ |
5544 | fi |
5545 | ||
dee1a63f MB |
5546 | if test "x$WXWIN_COMPATIBILITY_2_6" != "xno"; then |
5547 | AC_DEFINE(WXWIN_COMPATIBILITY_2_6) | |
65d8ef1e VS |
5548 | fi |
5549 | ||
9a98a854 VZ |
5550 | dnl --------------------------------------------------------------------------- |
5551 | dnl the library may be built without GUI classes at all | |
5552 | dnl --------------------------------------------------------------------------- | |
5553 | ||
5554 | if test "$wxUSE_GUI" = "yes"; then | |
881bfcd6 VZ |
5555 | AC_DEFINE(wxUSE_GUI) |
5556 | ||
5557 | dnl the things we always pull in the GUI version of the library: | |
5558 | dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the | |
5559 | dnl library really can't be built without those) | |
5560 | dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in | |
5561 | dnl almost any program and the first 2 are needed to show a message box | |
5562 | dnl which want to be always able to do) | |
5563 | dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice | |
5564 | dnl to compile without them (if the app doesn't do any drawing, it doesn't | |
5565 | dnl need the dcs, pens, brushes, ...), this just can't be done now | |
5566 | dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem | |
5567 | dnl 5. misc stuff: timers, settings, message box | |
9a98a854 VZ |
5568 | fi |
5569 | ||
5570 | dnl --------------------------------------------------------------------------- | |
5571 | dnl Unix/Windows | |
5572 | dnl --------------------------------------------------------------------------- | |
5573 | ||
5574 | if test "$wxUSE_UNIX" = "yes"; then | |
5575 | AC_DEFINE(wxUSE_UNIX) | |
9a98a854 VZ |
5576 | fi |
5577 | ||
f93ca9fd VS |
5578 | dnl ------------------------------------------------------------------------ |
5579 | dnl DLL support | |
5580 | dnl ------------------------------------------------------------------------ | |
5581 | ||
5582 | dnl under MSW we always have LoadLibrary/GetProcAddress | |
5583 | if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then | |
5584 | ||
5585 | HAVE_DL_FUNCS=0 | |
5586 | HAVE_SHL_FUNCS=0 | |
5587 | if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then | |
5588 | if test "$USE_DARWIN" = 1; then | |
5589 | dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X | |
5590 | HAVE_DL_FUNCS=1 | |
3af30018 MW |
5591 | elif test "$USE_DOS" = 1; then |
5592 | HAVE_DL_FUNCS=0 | |
f93ca9fd VS |
5593 | else |
5594 | dnl the test is a bit complicated because we check for dlopen() both with | |
5595 | dnl and without -ldl and we also try to find shl_load() if there is no | |
5596 | dnl dlopen() on this system | |
5597 | AC_CHECK_FUNCS(dlopen, | |
5598 | [ | |
5599 | AC_DEFINE(HAVE_DLOPEN) | |
5600 | HAVE_DL_FUNCS=1 | |
5601 | ], | |
5602 | [ | |
5603 | AC_CHECK_LIB(dl, dlopen, | |
5604 | [ | |
5605 | AC_DEFINE(HAVE_DLOPEN) | |
5606 | HAVE_DL_FUNCS=1 | |
5607 | DL_LINK=" -ldl$DL_LINK" | |
5608 | ], | |
5609 | [ | |
5610 | AC_CHECK_FUNCS(shl_load, | |
5611 | [ | |
5612 | AC_DEFINE(HAVE_SHL_LOAD) | |
5613 | HAVE_SHL_FUNCS=1 | |
5614 | ], | |
5615 | [ | |
5616 | AC_CHECK_LIB(shl_load, dld, | |
5617 | [ | |
5618 | HAVE_SHL_FUNCS=1 | |
5619 | DL_LINK=" -ldld$DL_LINK" | |
5620 | ]) | |
5621 | ]) | |
5622 | ]) | |
5623 | ]) | |
5624 | ||
5625 | dnl check also for dlerror() | |
5626 | if test "$HAVE_DL_FUNCS" = 1; then | |
5627 | AC_CHECK_FUNCS(dlerror, | |
5628 | AC_DEFINE(HAVE_DLERROR), | |
5629 | [ | |
5630 | AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR)) | |
5631 | ] | |
5632 | ) | |
5633 | fi | |
5634 | fi | |
5635 | ||
5636 | if test "$HAVE_DL_FUNCS" = 0; then | |
5637 | if test "$HAVE_SHL_FUNCS" = 0; then | |
3af30018 | 5638 | if test "$USE_UNIX" = 1 -o "$USE_DOS" = 1; then |
f93ca9fd VS |
5639 | AC_MSG_WARN([Missing dynamic loading support, several features will be disabled]) |
5640 | wxUSE_DYNAMIC_LOADER=no | |
5641 | wxUSE_DYNLIB_CLASS=no | |
5642 | else | |
5643 | AC_MSG_WARN([Assuming wxLibrary class works on this platform]) | |
5644 | fi | |
5645 | fi | |
5646 | fi | |
5647 | fi | |
5648 | fi | |
5649 | ||
5650 | if test "$wxUSE_DYNAMIC_LOADER" = "yes" ; then | |
5651 | AC_DEFINE(wxUSE_DYNAMIC_LOADER) | |
5652 | fi | |
5653 | if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then | |
5654 | AC_DEFINE(wxUSE_DYNLIB_CLASS) | |
5655 | fi | |
5656 | ||
5657 | ||
5658 | dnl --------------------------------------------------------------------------- | |
5659 | dnl Verify consistency of plugins/monolithic/shared settings: | |
5660 | dnl --------------------------------------------------------------------------- | |
5661 | ||
5662 | if test "$wxUSE_PLUGINS" = "yes" ; then | |
5663 | if test "$wxUSE_SHARED" = "no" ; then | |
5664 | AC_MSG_WARN([plugins supported only in shared build, disabling]) | |
5665 | wxUSE_PLUGINS=no | |
5666 | fi | |
5667 | if test "$wxUSE_MONOLITHIC" = "yes" ; then | |
5668 | AC_MSG_WARN([plugins not supported monolithic build, disabling]) | |
5669 | wxUSE_PLUGINS=no | |
5670 | fi | |
5671 | if test "$wxUSE_DYNLIB_CLASS" = "no" ; then | |
5672 | AC_MSG_WARN([plugins require wxDynamicLibrary, disabling]) | |
5673 | wxUSE_PLUGINS=no | |
5674 | fi | |
5675 | if test "$wxUSE_PLUGINS" = "yes" ; then | |
5676 | AC_DEFINE(wxUSE_PLUGINS) | |
5677 | fi | |
5678 | fi | |
5679 | ||
9a98a854 VZ |
5680 | dnl --------------------------------------------------------------------------- |
5681 | dnl Register non-GUI class options for makefiles and setup.h | |
5682 | dnl --------------------------------------------------------------------------- | |
5683 | ||
df5168c4 MB |
5684 | if test "$wxUSE_STL" = "yes"; then |
5685 | AC_DEFINE(wxUSE_STL) | |
5686 | fi | |
5687 | ||
9a98a854 VZ |
5688 | if test "$wxUSE_APPLE_IEEE" = "yes"; then |
5689 | AC_DEFINE(wxUSE_APPLE_IEEE) | |
9a98a854 VZ |
5690 | fi |
5691 | ||
1e6feb95 VZ |
5692 | if test "$wxUSE_TIMER" = "yes"; then |
5693 | AC_DEFINE(wxUSE_TIMER) | |
5694 | fi | |
5695 | ||
9c112555 MW |
5696 | dnl Unix implementation needs additional checks because audio support |
5697 | dnl comes in many favours: | |
5698 | if test "$USE_UNIX" = "1" ; then | |
a1b1cf33 VZ |
5699 | dnl mmedia doesn't compile with wxMGL, remove this if this is ever fixed |
5700 | if test "$wxUSE_MGL" != 1; then | |
5701 | dnl it's not enough to check for just the header because OSS under NetBSD | |
5702 | dnl redefines ioctl as oss_ioctrl inside it and so we also need to test | |
5703 | dnl whether we need -lossaudio at link-time | |
5704 | AC_CACHE_CHECK([for SNDCTL_DSP_SPEED in sys/soundcard.h], ac_cv_header_sys_soundcard, [ | |
5705 | AC_TRY_LINK([ | |
5706 | #include <sys/ioctl.h> | |
5707 | #include <sys/soundcard.h> | |
5708 | ], | |
5709 | [ | |
5710 | ioctl(0, SNDCTL_DSP_SPEED, 0); | |
5711 | ], | |
5712 | ac_cv_header_sys_soundcard=yes, | |
5713 | [ | |
5714 | saveLibs="$LIBS" | |
5715 | LIBS="$saveLibs -lossaudio" | |
5716 | AC_TRY_LINK([ | |
5717 | #include <sys/ioctl.h> | |
5718 | #include <sys/soundcard.h> | |
5719 | ], | |
5720 | [ | |
5721 | ioctl(0, SNDCTL_DSP_SPEED, 0); | |
5722 | ], | |
5723 | ac_cv_header_sys_soundcard=yes, | |
5724 | [ | |
5725 | LIBS="$saveLibs" | |
5726 | ac_cv_header_sys_soundcard=no | |
5727 | ] | |
5728 | ) | |
5729 | ] | |
5730 | ) | |
5731 | ]) | |
5732 | fi | |
aca2d2de VZ |
5733 | |
5734 | if test "$ac_cv_header_sys_soundcard" = "yes"; then | |
5735 | AC_DEFINE(HAVE_SYS_SOUNDCARD_H) | |
5736 | else | |
5737 | DISABLED_CONTRIB="$DISABLED_CONTRIB mmedia" | |
5738 | fi | |
9c112555 | 5739 | fi |
a1b1cf33 | 5740 | |
f93ca9fd | 5741 | WITH_PLUGIN_SDL=0 |
002ed9af | 5742 | if test "$wxUSE_SOUND" = "yes"; then |
f93ca9fd | 5743 | if test "$USE_UNIX" = "1" ; then |
f93ca9fd VS |
5744 | if test "$wxUSE_LIBSDL" != "no"; then |
5745 | AM_PATH_SDL([1.2.0], | |
5746 | [ | |
5747 | EXTRALIBS_SDL="$SDL_LIBS" | |
d0dec913 | 5748 | CFLAGS="$SDL_CFLAGS $CFLAGS" |
c92ad099 | 5749 | CXXFLAGS="$SDL_CFLAGS $CXXFLAGS" |
f93ca9fd VS |
5750 | AC_DEFINE(wxUSE_LIBSDL) |
5751 | ], | |
5752 | [wxUSE_LIBSDL="no"]) | |
5753 | if test "$wxUSE_LIBSDL" = "yes" -a "$wxUSE_PLUGINS" = "yes" ; then | |
5754 | WITH_PLUGIN_SDL=1 | |
5755 | fi | |
5756 | fi | |
480b9f18 VZ |
5757 | else |
5758 | dnl wxMGL doesn't support sound under DOS, only under Unix | |
5759 | if test "$wxUSE_MGL" = 1; then | |
5760 | AC_MSG_WARN([wxSound not supported in MGL under DOS... disabled]) | |
5761 | wxUSE_SOUND="no" | |
5762 | fi | |
f93ca9fd | 5763 | fi |
480b9f18 | 5764 | fi |
5ff751d6 | 5765 | |
480b9f18 | 5766 | if test "$wxUSE_SOUND" = "yes"; then |
002ed9af | 5767 | AC_DEFINE(wxUSE_SOUND) |
f93ca9fd | 5768 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sound" |
2749089a KB |
5769 | fi |
5770 | ||
7c72311f | 5771 | if test "$WXGTK20" = 1; then |
d6fb5527 VZ |
5772 | PKG_PROG_PKG_CONFIG() |
5773 | ||
7c72311f RR |
5774 | if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then |
5775 | if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then | |
5ff751d6 VZ |
5776 | |
5777 | PKG_CHECK_MODULES(LIBGNOMEPRINTUI, | |
ffa762ff | 5778 | [libgnomeprintui-2.2 >= 2.8], |
7c72311f | 5779 | [ |
d0dec913 | 5780 | CFLAGS="$LIBGNOMEPRINTUI_CFLAGS $CFLAGS" |
c92ad099 | 5781 | CXXFLAGS="$LIBGNOMEPRINTUI_CFLAGS $CXXFLAGS" |
45fb81e5 | 5782 | AC_DEFINE(wxUSE_LIBGNOMEPRINT) |
7c72311f RR |
5783 | ], |
5784 | [ | |
5785 | AC_MSG_WARN([libgnomeprintui not found, library will use standard PostScript printing]) | |
5786 | wxUSE_LIBGNOMEPRINT="no" | |
5787 | ] | |
5788 | ) | |
5789 | fi | |
5790 | fi | |
7c72311f | 5791 | |
2b850ae1 RR |
5792 | if test "$wxUSE_MIMETYPE" = "yes" ; then |
5793 | if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then | |
5794 | ||
5795 | PKG_CHECK_MODULES(GNOMEVFS, | |
5796 | [gnome-vfs-2.0 >= 2.0], | |
5797 | [ | |
d0dec913 | 5798 | CFLAGS="$GNOMEVFS_CFLAGS $CFLAGS" |
2b850ae1 RR |
5799 | CXXFLAGS="$GNOMEVFS_CFLAGS $CXXFLAGS" |
5800 | AC_DEFINE(wxUSE_LIBGNOMEVFS) | |
5801 | ], | |
5802 | [ | |
5803 | AC_MSG_WARN([libgnomevfs not found, library won't be able to associate MIME type]) | |
5804 | wxUSE_LIBGNOMEVFS="no" | |
5805 | ] | |
5806 | ) | |
5807 | fi | |
5808 | fi | |
2b850ae1 | 5809 | |
3565d135 | 5810 | if test "$wxUSE_LIBHILDON" = "yes" ; then |
912c3932 | 5811 | PKG_CHECK_MODULES(HILDON, |
3565d135 RR |
5812 | [hildon-lgpl >= 0.9], |
5813 | [ | |
5814 | EXTRALIBS_HILDON="$HILDON_LIBS" | |
d0dec913 | 5815 | CFLAGS="$CFLAGS $HILDON_CFLAGS" |
3565d135 RR |
5816 | CXXFLAGS="$CXXFLAGS $HILDON_CFLAGS" |
5817 | AC_DEFINE(wxUSE_LIBHILDON) | |
5818 | ], | |
5819 | [ | |
5820 | AC_MSG_WARN([libhildon_lgpl not found]) | |
5821 | wxUSE_LIBHILDON="no" | |
5822 | ] | |
5823 | ) | |
5824 | fi | |
5825 | fi | |
7c72311f | 5826 | |
1e6feb95 VZ |
5827 | if test "$wxUSE_CMDLINE_PARSER" = "yes"; then |
5828 | AC_DEFINE(wxUSE_CMDLINE_PARSER) | |
5829 | fi | |
5830 | ||
5831 | if test "$wxUSE_STOPWATCH" = "yes"; then | |
5832 | AC_DEFINE(wxUSE_STOPWATCH) | |
5833 | fi | |
5834 | ||
5835 | if test "$wxUSE_DATETIME" = "yes"; then | |
5836 | AC_DEFINE(wxUSE_DATETIME) | |
5837 | fi | |
5838 | ||
9a98a854 VZ |
5839 | if test "$wxUSE_FILE" = "yes"; then |
5840 | AC_DEFINE(wxUSE_FILE) | |
9a98a854 VZ |
5841 | fi |
5842 | ||
1e6feb95 VZ |
5843 | if test "$wxUSE_FFILE" = "yes"; then |
5844 | AC_DEFINE(wxUSE_FFILE) | |
5845 | fi | |
5846 | ||
9e8e867f | 5847 | if test "$wxUSE_ARCHIVE_STREAMS" = "yes"; then |
26e422a9 MW |
5848 | if test "$wxUSE_STREAMS" != yes; then |
5849 | AC_MSG_WARN(wxArchive requires wxStreams... disabled) | |
916af76f | 5850 | wxUSE_ARCHIVE_STREAMS=no |
26e422a9 MW |
5851 | else |
5852 | AC_DEFINE(wxUSE_ARCHIVE_STREAMS) | |
5853 | fi | |
81f90336 MW |
5854 | fi |
5855 | ||
d78b3d64 | 5856 | if test "$wxUSE_ZIPSTREAM" = "yes"; then |
9e8e867f | 5857 | if test "$wxUSE_ARCHIVE_STREAMS" != "yes"; then |
81f90336 MW |
5858 | AC_MSG_WARN(wxZip requires wxArchive... disabled) |
5859 | elif test "$wxUSE_ZLIB" = "no"; then | |
5860 | AC_MSG_WARN(wxZip requires wxZlib... disabled) | |
5861 | else | |
5862 | AC_DEFINE(wxUSE_ZIPSTREAM) | |
5863 | fi | |
d78b3d64 VS |
5864 | fi |
5865 | ||
26e422a9 MW |
5866 | if test "$wxUSE_TARSTREAM" = "yes"; then |
5867 | if test "$wxUSE_ARCHIVE_STREAMS" != "yes"; then | |
5868 | AC_MSG_WARN(wxTar requires wxArchive... disabled) | |
5869 | else | |
5870 | AC_DEFINE(wxUSE_TARSTREAM) | |
5871 | fi | |
5872 | fi | |
5873 | ||
916af76f | 5874 | if test "$wxUSE_FILESYSTEM" = "yes"; then |
f8f6c91a | 5875 | if test "$wxUSE_STREAMS" != yes -o \( "$wxUSE_FILE" != yes -a "$wxUSE_FFILE" != yes \); then |
916af76f MW |
5876 | AC_MSG_WARN(wxFileSystem requires wxStreams and wxFile or wxFFile... disabled) |
5877 | wxUSE_FILESYSTEM=no | |
f8f6c91a | 5878 | else |
916af76f | 5879 | AC_DEFINE(wxUSE_FILESYSTEM) |
f8f6c91a MW |
5880 | fi |
5881 | fi | |
5882 | ||
26e422a9 | 5883 | if test "$wxUSE_FS_ARCHIVE" = "yes"; then |
916af76f MW |
5884 | if test "$wxUSE_FILESYSTEM" != yes -o "$wxUSE_ARCHIVE_STREAMS" != yes; then |
5885 | AC_MSG_WARN(wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled) | |
26e422a9 MW |
5886 | else |
5887 | AC_DEFINE(wxUSE_FS_ARCHIVE) | |
5888 | fi | |
5889 | fi | |
5890 | ||
916af76f MW |
5891 | if test "$wxUSE_FS_ZIP" = "yes"; then |
5892 | if test "$wxUSE_FS_ARCHIVE" != yes; then | |
5893 | AC_MSG_WARN(wxZipFSHandler requires wxArchiveFSHandler... disabled) | |
5894 | else | |
5895 | AC_DEFINE(wxUSE_FS_ZIP) | |
5896 | fi | |
5897 | fi | |
5898 | ||
eb4efbdc | 5899 | if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then |
18228ab4 MW |
5900 | if test "$USE_UNIX" != 1; then |
5901 | AC_MSG_WARN([Catching fatal exceptions not currently supported on this system, wxApp::OnFatalException will not be called]) | |
5902 | wxUSE_ON_FATAL_EXCEPTION=no | |
5903 | else | |
5904 | AC_DEFINE(wxUSE_ON_FATAL_EXCEPTION) | |
5905 | fi | |
eb4efbdc | 5906 | fi |
eaff0f0d VZ |
5907 | |
5908 | if test "$wxUSE_STACKWALKER" = "yes"; then | |
5909 | AC_DEFINE(wxUSE_STACKWALKER) | |
5910 | fi | |
eb4efbdc | 5911 | |
36b6448c | 5912 | if test "$wxUSE_DEBUGREPORT" = "yes"; then |
18228ab4 MW |
5913 | if test "$USE_UNIX" != "1" -a "$USE_WIN32" != "1"; then |
5914 | AC_MSG_WARN([Creating debug reports not currently supported on this system, disabled]) | |
bec7df87 SN |
5915 | wxUSE_DEBUGREPORT=no |
5916 | else | |
5917 | AC_DEFINE(wxUSE_DEBUGREPORT) | |
21dfc162 MW |
5918 | if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then |
5919 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS debugrpt" | |
5920 | fi | |
bec7df87 | 5921 | fi |
36b6448c VZ |
5922 | fi |
5923 | ||
4f3c5f06 VZ |
5924 | if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then |
5925 | AC_DEFINE(wxUSE_SNGLINST_CHECKER) | |
5926 | fi | |
5927 | ||
d78b3d64 VS |
5928 | if test "$wxUSE_BUSYINFO" = "yes"; then |
5929 | AC_DEFINE(wxUSE_BUSYINFO) | |
5930 | fi | |
5931 | ||
fd15d8f1 RR |
5932 | if test "$wxUSE_STD_IOSTREAM" = "yes"; then |
5933 | AC_DEFINE(wxUSE_STD_IOSTREAM) | |
5934 | fi | |
5935 | ||
668d55c9 RR |
5936 | if test "$wxUSE_STD_STRING" = "yes"; then |
5937 | AC_DEFINE(wxUSE_STD_STRING) | |
5938 | fi | |
5939 | ||
07158944 VZ |
5940 | if test "$wxUSE_STDPATHS" = "yes"; then |
5941 | AC_DEFINE(wxUSE_STDPATHS) | |
5942 | fi | |
5943 | ||
a3a584a7 VZ |
5944 | if test "$wxUSE_TEXTBUFFER" = "yes"; then |
5945 | AC_DEFINE(wxUSE_TEXTBUFFER) | |
5946 | fi | |
5947 | ||
9a98a854 | 5948 | if test "$wxUSE_TEXTFILE" = "yes"; then |
a3a584a7 | 5949 | if test "$wxUSE_FILE" != "yes" -o "$wxUSE_TEXTBUFFER" != "yes" ; then |
156b2523 | 5950 | AC_MSG_WARN(wxTextFile requires wxFile and wxTextBuffer... disabled) |
9a98a854 VZ |
5951 | else |
5952 | AC_DEFINE(wxUSE_TEXTFILE) | |
9a98a854 VZ |
5953 | fi |
5954 | fi | |
5955 | ||
5956 | if test "$wxUSE_CONFIG" = "yes" ; then | |
5957 | if test "$wxUSE_TEXTFILE" != "yes"; then | |
156b2523 | 5958 | AC_MSG_WARN(wxConfig requires wxTextFile... disabled) |
9a98a854 VZ |
5959 | else |
5960 | AC_DEFINE(wxUSE_CONFIG) | |
89be85c2 | 5961 | AC_DEFINE(wxUSE_CONFIG_NATIVE) |
9a98a854 VZ |
5962 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS config" |
5963 | fi | |
5964 | fi | |
5965 | ||
5966 | if test "$wxUSE_INTL" = "yes" ; then | |
5967 | if test "$wxUSE_FILE" != "yes"; then | |
156b2523 | 5968 | AC_MSG_WARN(I18n code requires wxFile... disabled) |
9a98a854 VZ |
5969 | else |
5970 | AC_DEFINE(wxUSE_INTL) | |
9a98a854 | 5971 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS internat" |
f6bcfd97 | 5972 | GUIDIST="$GUIDIST INTL_DIST" |
9a98a854 VZ |
5973 | fi |
5974 | fi | |
5975 | ||
5976 | if test "$wxUSE_LOG" = "yes"; then | |
5977 | AC_DEFINE(wxUSE_LOG) | |
d73be714 VZ |
5978 | |
5979 | if test "$wxUSE_LOGGUI" = "yes"; then | |
5980 | AC_DEFINE(wxUSE_LOGGUI) | |
5981 | fi | |
5982 | ||
5983 | if test "$wxUSE_LOGWINDOW" = "yes"; then | |
5984 | AC_DEFINE(wxUSE_LOGWINDOW) | |
5985 | fi | |
69d27ff7 MB |
5986 | |
5987 | if test "$wxUSE_LOGDIALOG" = "yes"; then | |
5988 | AC_DEFINE(wxUSE_LOG_DIALOG) | |
5989 | fi | |
0b78747f MW |
5990 | |
5991 | dnl the keyboard sample requires wxUSE_LOG | |
5992 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS keyboard" | |
9a98a854 VZ |
5993 | fi |
5994 | ||
5995 | if test "$wxUSE_LONGLONG" = "yes"; then | |
5996 | AC_DEFINE(wxUSE_LONGLONG) | |
9a98a854 VZ |
5997 | fi |
5998 | ||
e8f65ba6 RR |
5999 | if test "$wxUSE_GEOMETRY" = "yes"; then |
6000 | AC_DEFINE(wxUSE_GEOMETRY) | |
6001 | fi | |
6002 | ||
9a98a854 VZ |
6003 | if test "$wxUSE_STREAMS" = "yes" ; then |
6004 | AC_DEFINE(wxUSE_STREAMS) | |
9a98a854 VZ |
6005 | fi |
6006 | ||
7b4eedf6 VZ |
6007 | if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then |
6008 | AC_DEFINE(wxUSE_PRINTF_POS_PARAMS) | |
6009 | fi | |
6010 | ||
6011 | ||
52e8b690 | 6012 | dnl --------------------------------------------------------------------------- |
afc31813 | 6013 | dnl time/date functions |
f536f005 | 6014 | dnl --------------------------------------------------------------------------- |
afc31813 | 6015 | |
1e6feb95 | 6016 | if test "$wxUSE_DATETIME" = "yes"; then |
f536f005 | 6017 | dnl check for strptime and for its declaration as some systems lack it |
224d4f6d | 6018 | dnl FIXME: use WX_CHECK_FUNCS instead |
83307f33 | 6019 | AC_CHECK_FUNCS(strptime) |
f536f005 VZ |
6020 | if test "$ac_cv_func_strptime" = "yes"; then |
6021 | AC_CACHE_CHECK([for strptime declaration], wx_cv_func_strptime_decl, | |
6022 | [ | |
224d4f6d | 6023 | AC_LANG_PUSH(C++) |
f536f005 VZ |
6024 | AC_TRY_COMPILE( |
6025 | [ | |
6026 | #include <time.h> | |
6027 | ], | |
6028 | [ | |
6029 | struct tm t; | |
6030 | strptime("foo", "bar", &t); | |
6031 | ], | |
6032 | wx_cv_func_strptime_decl=yes, | |
6033 | wx_cv_func_strptime_decl=no | |
6034 | ) | |
224d4f6d | 6035 | AC_LANG_POP() |
f536f005 VZ |
6036 | ] |
6037 | ) | |
6038 | fi | |
6039 | if test "$wx_cv_func_strptime_decl" = "yes"; then | |
6040 | AC_DEFINE(HAVE_STRPTIME_DECL) | |
6041 | fi | |
83307f33 | 6042 | |
360d6699 | 6043 | dnl check for timezone variable |
62cc730f | 6044 | dnl doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead |
360d6699 VZ |
6045 | AC_CACHE_CHECK(for timezone variable in <time.h>, |
6046 | wx_cv_var_timezone, | |
6047 | [ | |
715d53e4 | 6048 | AC_LANG_PUSH(C++) |
360d6699 VZ |
6049 | AC_TRY_COMPILE( |
6050 | [ | |
6051 | #include <time.h> | |
6052 | ], | |
6053 | [ | |
6054 | int tz; | |
4f11a343 | 6055 | tz = timezone; |
360d6699 VZ |
6056 | ], |
6057 | [ | |
4f11a343 | 6058 | wx_cv_var_timezone=timezone |
360d6699 VZ |
6059 | ], |
6060 | [ | |
6061 | AC_TRY_COMPILE( | |
6062 | [ | |
6063 | #include <time.h> | |
6064 | ], | |
6065 | [ | |
6066 | int tz; | |
6067 | tz = _timezone; | |
6068 | ], | |
6069 | [ | |
6070 | wx_cv_var_timezone=_timezone | |
6071 | ], | |
5357c8e8 VZ |
6072 | [ |
6073 | AC_TRY_COMPILE( | |
6074 | [ | |
6075 | #include <time.h> | |
6076 | ], | |
6077 | [ | |
6078 | int tz; | |
4f11a343 | 6079 | tz = __timezone; |
5357c8e8 VZ |
6080 | ], |
6081 | [ | |
4f11a343 | 6082 | wx_cv_var_timezone=__timezone |
5357c8e8 | 6083 | ], |
f9bc1684 VS |
6084 | [ |
6085 | if test "$USE_DOS" = 0 ; then | |
62cc730f | 6086 | AC_MSG_WARN(no timezone variable, will use tm_gmtoff instead) |
f9bc1684 VS |
6087 | fi |
6088 | ] | |
5357c8e8 VZ |
6089 | ) |
6090 | ] | |
360d6699 VZ |
6091 | ) |
6092 | ] | |
6093 | ) | |
715d53e4 | 6094 | AC_LANG_POP() |
360d6699 VZ |
6095 | ] |
6096 | ) | |
6097 | ||
6098 | dnl as we want $wx_cv_var_timezone to be expanded, use AC_DEFINE_UNQUOTED | |
f9bc1684 VS |
6099 | if test "x$wx_cv_var_timezone" != x ; then |
6100 | AC_DEFINE_UNQUOTED(WX_TIMEZONE, $wx_cv_var_timezone) | |
6101 | fi | |
360d6699 | 6102 | |
3fcdd07b VZ |
6103 | dnl check for localtime (it's POSIX, but the check can do no harm...) |
6104 | AC_CHECK_FUNCS(localtime) | |
afc31813 | 6105 | |
0470b1e6 VZ |
6106 | if test "$ac_cv_func_localtime" = "yes"; then |
6107 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, | |
6108 | wx_cv_struct_tm_has_gmtoff, | |
6109 | [ | |
6110 | AC_TRY_COMPILE( | |
6111 | [ | |
6112 | #include <time.h> | |
6113 | ], | |
6114 | [ | |
6115 | struct tm tm; | |
6116 | tm.tm_gmtoff++; | |
6117 | ], | |
6118 | [ | |
f03a98d8 | 6119 | wx_cv_struct_tm_has_gmtoff=yes |
0470b1e6 VZ |
6120 | ], |
6121 | wx_cv_struct_tm_has_gmtoff=no | |
6122 | ) | |
6123 | ]) | |
3fcdd07b VZ |
6124 | fi |
6125 | ||
6232543b VS |
6126 | if test "$wx_cv_struct_tm_has_gmtoff" = "yes"; then |
6127 | AC_DEFINE(WX_GMTOFF_IN_TM) | |
6128 | fi | |
6129 | ||
3fcdd07b VZ |
6130 | dnl check for gettimeofday (SVr4, BSD 4.3) and ftime (V7, BSD 4.3) for the |
6131 | dnl function to be used for high resolution timers | |
6132 | AC_CHECK_FUNCS(gettimeofday ftime, break) | |
6133 | ||
6134 | if test "$ac_cv_func_gettimeofday" = "yes"; then | |
afc31813 VZ |
6135 | AC_CACHE_CHECK([whether gettimeofday takes two arguments], |
6136 | wx_cv_func_gettimeofday_has_2_args, | |
6137 | [ | |
6138 | dnl on some _really_ old systems it takes only 1 argument | |
afc31813 VZ |
6139 | AC_TRY_COMPILE( |
6140 | [ | |
6141 | #include <sys/time.h> | |
6142 | #include <unistd.h> | |
6143 | ], | |
6144 | [ | |
6145 | struct timeval tv; | |
776862b4 | 6146 | gettimeofday(&tv, NULL); |
afc31813 VZ |
6147 | ], |
6148 | wx_cv_func_gettimeofday_has_2_args=yes, | |
6149 | AC_TRY_COMPILE( | |
6150 | [ | |
6151 | #include <sys/time.h> | |
6152 | #include <unistd.h> | |
6153 | ], | |
6154 | [ | |
6155 | struct timeval tv; | |
6156 | gettimeofday(&tv); | |
6157 | ], | |
6158 | wx_cv_func_gettimeofday_has_2_args=no, | |
776862b4 VZ |
6159 | [ |
6160 | AC_MSG_WARN([failed to determine number of gettimeofday() arguments]) | |
6161 | wx_cv_func_gettimeofday_has_2_args=unknown | |
6162 | ] | |
afc31813 VZ |
6163 | ) |
6164 | ) | |
afc31813 VZ |
6165 | ]) |
6166 | ||
6167 | if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then | |
6168 | AC_DEFINE(WX_GETTIMEOFDAY_NO_TZ) | |
6169 | fi | |
6170 | fi | |
6171 | ||
afc31813 VZ |
6172 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest" |
6173 | fi | |
6174 | ||
9a98a854 VZ |
6175 | dnl ------------------------------------------------------------------------ |
6176 | dnl wxSocket | |
6177 | dnl ------------------------------------------------------------------------ | |
6178 | ||
3879ecda | 6179 | dnl VZ: the GUI hooks wxSocket needs are not implemented yet in some toolkits |
0feee163 | 6180 | if test "$wxUSE_SOCKETS" = "yes"; then |
6c657b52 VS |
6181 | if test "$wxUSE_MGL" = "1"; then |
6182 | AC_MSG_WARN([wxSocket not yet supported under MGL... disabled]) | |
6183 | wxUSE_SOCKETS="no" | |
6184 | fi | |
0feee163 | 6185 | fi |
b089607b | 6186 | |
0feee163 VZ |
6187 | if test "$wxUSE_SOCKETS" = "yes"; then |
6188 | dnl under MSW we always have sockets | |
6189 | if test "$TOOLKIT" != "MSW"; then | |
590b1a4d | 6190 | dnl under Solaris and OS/2, socket functions live in -lsocket |
3a922bb4 | 6191 | AC_CHECK_FUNC(socket,, |
4c15b7af SN |
6192 | [ |
6193 | AC_CHECK_LIB(socket, socket, | |
6194 | if test "$INET_LINK" != " -lsocket"; then | |
6195 | INET_LINK="$INET_LINK -lsocket" | |
6196 | fi, | |
6197 | [ | |
6198 | AC_MSG_WARN([socket library not found - sockets will be disabled]) | |
6199 | wxUSE_SOCKETS=no | |
6200 | ] | |
6201 | ) | |
6202 | ] | |
afc31813 | 6203 | ) |
3a922bb4 | 6204 | fi |
0feee163 | 6205 | fi |
afc31813 | 6206 | |
0feee163 | 6207 | if test "$wxUSE_SOCKETS" = "yes" ; then |
3a922bb4 RL |
6208 | dnl this test may be appropriate if building under cygwin |
6209 | dnl right now I'm assuming it also uses the winsock stuff | |
6210 | dnl like mingw does.. -- RL | |
0feee163 | 6211 | if test "$TOOLKIT" != "MSW"; then |
3a922bb4 | 6212 | dnl determine the type of third argument for getsockname |
6944b203 SN |
6213 | dnl This test needs to be done in C++ mode since gsocket.cpp now |
6214 | dnl is C++ code and pointer cast that are possible even without | |
6215 | dnl warning in C still fail in C++. | |
3a922bb4 RL |
6216 | AC_CACHE_CHECK([what is the type of the third argument of getsockname], |
6217 | wx_cv_type_getsockname3, | |
6218 | [ | |
224d4f6d | 6219 | AC_LANG_PUSH(C++) |
51a9faba VZ |
6220 | AC_TRY_COMPILE( |
6221 | [ | |
4370c5b2 | 6222 | #include <sys/types.h> |
51a9faba VZ |
6223 | #include <sys/socket.h> |
6224 | ], | |
6225 | [ | |
3a922bb4 | 6226 | socklen_t len; |
51a9faba VZ |
6227 | getsockname(0, 0, &len); |
6228 | ], | |
3a922bb4 | 6229 | wx_cv_type_getsockname3=socklen_t, |
210c92a3 VZ |
6230 | [ |
6231 | dnl the compiler will compile the version with size_t | |
6232 | dnl even if the real type of the last parameter is int | |
6233 | dnl but it should give at least a warning about | |
6234 | dnl converting between incompatible pointer types, so | |
6235 | dnl try to use it to get the correct behaviour at | |
6236 | dnl least with gcc (otherwise we'd always use size_t) | |
d0dec913 | 6237 | CFLAGS_OLD="$CFLAGS" |
210c92a3 | 6238 | if test "$GCC" = yes ; then |
d0dec913 | 6239 | CFLAGS="-Werror $CFLAGS" |
210c92a3 VZ |
6240 | fi |
6241 | ||
3a922bb4 RL |
6242 | AC_TRY_COMPILE( |
6243 | [ | |
6244 | #include <sys/types.h> | |
6245 | #include <sys/socket.h> | |
6246 | ], | |
6247 | [ | |
210c92a3 | 6248 | size_t len; |
3a922bb4 RL |
6249 | getsockname(0, 0, &len); |
6250 | ], | |
210c92a3 VZ |
6251 | wx_cv_type_getsockname3=size_t, |
6252 | AC_TRY_COMPILE( | |
6253 | [ | |
6254 | #include <sys/types.h> | |
6255 | #include <sys/socket.h> | |
6256 | ], | |
6257 | [ | |
6258 | int len; | |
6259 | getsockname(0, 0, &len); | |
6260 | ], | |
6261 | wx_cv_type_getsockname3=int, | |
6262 | wx_cv_type_getsockname3=unknown | |
6263 | ) | |
3a922bb4 | 6264 | ) |
c63c7106 | 6265 | |
d0dec913 | 6266 | CFLAGS="$CFLAGS_OLD" |
210c92a3 VZ |
6267 | ] |
6268 | ) | |
224d4f6d | 6269 | AC_LANG_POP() |
3a922bb4 | 6270 | ]) |
51a9faba | 6271 | |
3a922bb4 RL |
6272 | if test "$wx_cv_type_getsockname3" = "unknown"; then |
6273 | wxUSE_SOCKETS=no | |
6274 | AC_MSG_WARN([Couldn't find socklen_t synonym for this system]) | |
6275 | else | |
9e03e02d | 6276 | AC_DEFINE_UNQUOTED(WX_SOCKLEN_T, $wx_cv_type_getsockname3) |
3a922bb4 | 6277 | fi |
ddc1a35f DE |
6278 | dnl Do this again for getsockopt as it may be different |
6279 | AC_CACHE_CHECK([what is the type of the fifth argument of getsockopt], | |
6280 | wx_cv_type_getsockopt5, | |
6281 | [ | |
6282 | AC_TRY_COMPILE( | |
6283 | [ | |
6284 | #include <sys/types.h> | |
6285 | #include <sys/socket.h> | |
6286 | ], | |
6287 | [ | |
6288 | socklen_t len; | |
6289 | getsockopt(0, 0, 0, 0, &len); | |
6290 | ], | |
6291 | wx_cv_type_getsockopt5=socklen_t, | |
6292 | [ | |
e43101ee SN |
6293 | dnl Note that the rules for compatibility of pointers |
6294 | dnl are somewhat different between C and C++, so code | |
6295 | dnl that fails in C++ may not even give a warning about | |
6296 | dnl converting between incompatible pointer types in C. | |
6297 | dnl So this test needs to be done in C++ mode. | |
6298 | AC_LANG_PUSH(C++) | |
ddc1a35f DE |
6299 | AC_TRY_COMPILE( |
6300 | [ | |
6301 | #include <sys/types.h> | |
6302 | #include <sys/socket.h> | |
6303 | ], | |
6304 | [ | |
6305 | size_t len; | |
6306 | getsockopt(0, 0, 0, 0, &len); | |
6307 | ], | |
6308 | wx_cv_type_getsockopt5=size_t, | |
6309 | AC_TRY_COMPILE( | |
6310 | [ | |
6311 | #include <sys/types.h> | |
6312 | #include <sys/socket.h> | |
6313 | ], | |
6314 | [ | |
6315 | int len; | |
6316 | getsockopt(0, 0, 0, 0, &len); | |
6317 | ], | |
6318 | wx_cv_type_getsockopt5=int, | |
6319 | wx_cv_type_getsockopt5=unknown | |
6320 | ) | |
6321 | ) | |
e43101ee | 6322 | AC_LANG_POP() |
ddc1a35f DE |
6323 | ] |
6324 | ) | |
6325 | ]) | |
6326 | ||
6327 | if test "$wx_cv_type_getsockopt5" = "unknown"; then | |
6328 | wxUSE_SOCKETS=no | |
6329 | AC_MSG_WARN([Couldn't find socklen_t synonym for this system]) | |
6330 | else | |
6331 | AC_DEFINE_UNQUOTED(SOCKOPTLEN_T, $wx_cv_type_getsockopt5) | |
6332 | fi | |
51a9faba VZ |
6333 | fi |
6334 | fi | |
c521c494 | 6335 | |
51a9faba | 6336 | if test "$wxUSE_SOCKETS" = "yes" ; then |
afc31813 | 6337 | AC_DEFINE(wxUSE_SOCKETS) |
70f7a477 | 6338 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets" |
9a98a854 VZ |
6339 | fi |
6340 | ||
3879ecda VZ |
6341 | if test "$wxUSE_PROTOCOL" = "yes"; then |
6342 | if test "$wxUSE_SOCKETS" != "yes"; then | |
6343 | AC_MSG_WARN(Protocol classes require sockets... disabled) | |
6344 | wxUSE_PROTOCOL=no | |
6345 | fi | |
6346 | fi | |
6347 | ||
6348 | if test "$wxUSE_PROTOCOL" = "yes"; then | |
6349 | AC_DEFINE(wxUSE_PROTOCOL) | |
6350 | ||
6351 | if test "$wxUSE_PROTOCOL_HTTP" = "yes"; then | |
6352 | AC_DEFINE(wxUSE_PROTOCOL_HTTP) | |
6353 | fi | |
6354 | if test "$wxUSE_PROTOCOL_FTP" = "yes"; then | |
6355 | AC_DEFINE(wxUSE_PROTOCOL_FTP) | |
6356 | fi | |
6357 | if test "$wxUSE_PROTOCOL_FILE" = "yes"; then | |
6358 | AC_DEFINE(wxUSE_PROTOCOL_FILE) | |
6359 | fi | |
6360 | else | |
6361 | if test "$wxUSE_FS_INET" = "yes"; then | |
5ff751d6 | 6362 | AC_MSG_WARN([HTTP filesystem require protocol classes... disabled]) |
3879ecda VZ |
6363 | wxUSE_FS_INET="no" |
6364 | fi | |
6365 | fi | |
6366 | ||
6367 | if test "$wxUSE_URL" = "yes"; then | |
6368 | if test "$wxUSE_PROTOCOL" != "yes"; then | |
6369 | AC_MSG_WARN(wxURL class requires wxProtocol... disabled) | |
6370 | wxUSE_URL=no | |
6371 | fi | |
6372 | if test "$wxUSE_URL" = "yes"; then | |
6373 | AC_DEFINE(wxUSE_URL) | |
6374 | fi | |
6375 | fi | |
6376 | ||
ca5c6ac3 VZ |
6377 | if test "$wxUSE_VARIANT" = "yes"; then |
6378 | AC_DEFINE(wxUSE_VARIANT) | |
6379 | fi | |
6380 | ||
3879ecda VZ |
6381 | if test "$wxUSE_FS_INET" = "yes"; then |
6382 | AC_DEFINE(wxUSE_FS_INET) | |
6383 | fi | |
6384 | ||
9a98a854 VZ |
6385 | dnl --------------------------------------------------------------------------- |
6386 | dnl Joystick support | |
6387 | dnl --------------------------------------------------------------------------- | |
6388 | ||
ee45c548 MW |
6389 | if test "$wxUSE_GUI" = "yes" -a "$wxUSE_JOYSTICK" = "yes"; then |
6390 | wxUSE_JOYSTICK=no | |
9a98a854 | 6391 | |
ee45c548 MW |
6392 | dnl under MSW we always have joystick support |
6393 | if test "$TOOLKIT" = "MSW"; then | |
6394 | wxUSE_JOYSTICK=yes | |
4cb1d3da | 6395 | |
ee45c548 MW |
6396 | dnl mac only available on darwin |
6397 | elif test "$TOOLKIT" = "MAC" -o "$TOOLKIT" = "COCOA"; then | |
6398 | if test "$USE_DARWIN" = 1; then | |
6399 | dnl check for a bug in the headers, some have bad setEventCallout | |
6400 | AC_MSG_CHECKING([headers have declarations needed for joystick support]) | |
224d4f6d | 6401 | AC_LANG_PUSH(C++) |
ee45c548 MW |
6402 | AC_TRY_COMPILE( [ #include <IOKit/hid/IOHIDLib.h> ], |
6403 | [ IOHIDQueueInterface *qi = NULL; | |
6404 | IOHIDCallbackFunction cb = NULL; | |
6405 | qi->setEventCallout(NULL, cb, NULL, NULL); ], | |
6406 | [ wxUSE_JOYSTICK=yes ] | |
6407 | ) | |
224d4f6d | 6408 | AC_LANG_POP() |
ee45c548 | 6409 | AC_MSG_RESULT($wxUSE_JOYSTICK) |
4cb1d3da | 6410 | fi |
ee45c548 MW |
6411 | |
6412 | dnl joystick support is only for Linux 2.1.x or greater | |
6413 | else | |
b6814e24 VZ |
6414 | dnl wxJoystick not supported by wxMGL at all |
6415 | if test "$wxUSE_MGL" != "1"; then | |
ddbd3cd5 VZ |
6416 | dnl notice the dummy includes argument: without it, AC_CHECK_HEADER |
6417 | dnl checks only whether the header can be preprocessed, not that it | |
6418 | dnl can be compiled and in Linux 2.6.16 joystick.h is present but | |
6419 | dnl can't be compiled because of an error and with the default | |
6420 | dnl AC_CHECK_HEADER semantics we'd still detect it in this case and | |
6421 | dnl build would fail later | |
6422 | AC_CHECK_HEADER(linux/joystick.h, wxUSE_JOYSTICK=yes,,[#include <stdio.h>]) | |
b6814e24 | 6423 | fi |
ee45c548 MW |
6424 | fi |
6425 | ||
6426 | if test "$wxUSE_JOYSTICK" = "yes"; then | |
6427 | AC_DEFINE(wxUSE_JOYSTICK) | |
6428 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" | |
6429 | else | |
5ff751d6 | 6430 | AC_MSG_WARN(Joystick not supported by this system... disabled) |
3a922bb4 | 6431 | fi |
dc3d889d | 6432 | fi |
dc3d889d | 6433 | |
9a98a854 | 6434 | |
9a98a854 | 6435 | dnl --------------------------------------------------------------------------- |
ced859c3 | 6436 | dnl String stuff |
9a98a854 VZ |
6437 | dnl --------------------------------------------------------------------------- |
6438 | ||
1e6feb95 VZ |
6439 | if test "$wxUSE_FONTMAP" = "yes" ; then |
6440 | AC_DEFINE(wxUSE_FONTMAP) | |
6441 | fi | |
6442 | ||
9a98a854 VZ |
6443 | if test "$wxUSE_UNICODE" = "yes" ; then |
6444 | AC_DEFINE(wxUSE_UNICODE) | |
3bd8fb5f | 6445 | |
eb854003 | 6446 | if test "$USE_WIN32" != 1; then |
bbc3925a VS |
6447 | wxUSE_UNICODE_MSLU=no |
6448 | fi | |
a72a4bfa | 6449 | |
eb854003 | 6450 | if test "$USE_WIN32" = 1 -a "$wxUSE_UNICODE_MSLU" = "yes"; then |
a72a4bfa VS |
6451 | AC_CHECK_LIB(unicows,main, |
6452 | [ | |
6453 | AC_DEFINE(wxUSE_UNICODE_MSLU) | |
6454 | ], | |
6455 | [ | |
6456 | AC_MSG_WARN([Compiler doesn't support MSLU (libunicows.a), disabled. | |
6457 | Applications will only run on Windows NT/2000/XP!]) | |
6458 | wxUSE_UNICODE_MSLU=no | |
6459 | ]) | |
6460 | fi | |
9a98a854 VZ |
6461 | fi |
6462 | ||
ced859c3 VZ |
6463 | if test "$wxUSE_wxUSE_EXPERIMENTAL_PRINTF" = "yes"; then |
6464 | AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF) | |
6465 | fi | |
6466 | ||
9a98a854 VZ |
6467 | dnl ---------------------------------------------------------------- |
6468 | dnl Register PostScript options for makefiles and setup.h | |
6469 | dnl ---------------------------------------------------------------- | |
6470 | ||
6471 | if test "$wxUSE_POSTSCRIPT" = "yes" ; then | |
6472 | AC_DEFINE(wxUSE_POSTSCRIPT) | |
9a98a854 VZ |
6473 | fi |
6474 | ||
6475 | AC_DEFINE(wxUSE_AFM_FOR_POSTSCRIPT) | |
6476 | ||
6477 | AC_DEFINE(wxUSE_NORMALIZED_PS_FONTS) | |
6478 | ||
6479 | dnl --------------------------------------------------------------------------- | |
6480 | dnl big GUI components: MDI, doc/view, printing, help, ... | |
6481 | dnl --------------------------------------------------------------------------- | |
6482 | ||
6483 | if test "$wxUSE_CONSTRAINTS" = "yes"; then | |
ce4169a4 RR |
6484 | AC_DEFINE(wxUSE_CONSTRAINTS) |
6485 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS layout" | |
9a98a854 VZ |
6486 | fi |
6487 | ||
efd17a1d VZ |
6488 | if test "$wxUSE_MDI" = "yes"; then |
6489 | AC_DEFINE(wxUSE_MDI) | |
6490 | ||
6491 | if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then | |
6492 | AC_DEFINE(wxUSE_MDI_ARCHITECTURE) | |
6493 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mdi" | |
6494 | fi | |
9a98a854 VZ |
6495 | fi |
6496 | ||
6497 | if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = "yes" ; then | |
ce4169a4 RR |
6498 | AC_DEFINE(wxUSE_DOC_VIEW_ARCHITECTURE) |
6499 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docview" | |
6500 | if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then | |
6501 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docvwmdi" | |
6502 | fi | |
9a98a854 VZ |
6503 | fi |
6504 | ||
6505 | if test "$wxUSE_HELP" = "yes"; then | |
ce4169a4 RR |
6506 | AC_DEFINE(wxUSE_HELP) |
6507 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help" | |
3379ed37 | 6508 | |
77e13408 | 6509 | if test "$wxUSE_MSW" = 1; then |
031d8228 | 6510 | if test "$wxUSE_MS_HTML_HELP" = "yes"; then |
3b7bc64a | 6511 | AC_DEFINE(wxUSE_MS_HTML_HELP) |
29fd3c0c | 6512 | fi |
3379ed37 | 6513 | fi |
031d8228 VS |
6514 | |
6515 | if test "$wxUSE_WXHTML_HELP" = "yes"; then | |
6516 | if test "$wxUSE_HTML" = "yes"; then | |
6517 | AC_DEFINE(wxUSE_WXHTML_HELP) | |
6518 | else | |
6519 | AC_MSG_WARN(Cannot use wxHTML-based help without wxHTML so it won't be compiled) | |
6520 | wxUSE_WXHTML_HELP=no | |
6521 | fi | |
6522 | fi | |
9a98a854 VZ |
6523 | fi |
6524 | ||
6525 | if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then | |
ce4169a4 RR |
6526 | if test "$wxUSE_CONSTRAINTS" != "yes"; then |
6527 | AC_MSG_WARN(Printing support cannot be used without constraints so it won't be compiled without it) | |
6528 | else | |
6529 | AC_DEFINE(wxUSE_PRINTING_ARCHITECTURE) | |
6530 | fi | |
6531 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS printing" | |
9a98a854 VZ |
6532 | fi |
6533 | ||
fd3d7534 | 6534 | if test "$wxUSE_PROLOGIO" = "yes" -o "$wxUSE_RESOURCES" = "yes"; then |
1b86c3ac VZ |
6535 | AC_MSG_ERROR([wxExpr and old-style resources are now available in contrib only]) |
6536 | fi | |
9a98a854 | 6537 | |
f2555abd MW |
6538 | dnl --------------------------------------------------------------------------- |
6539 | dnl wxMetafile availability | |
6540 | dnl --------------------------------------------------------------------------- | |
6541 | ||
6542 | if test "$wxUSE_METAFILE" = "yes"; then | |
6543 | if test "$wxUSE_MSW" != 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_PM" != 1; then | |
6544 | AC_MSG_WARN([wxMetafile is not available on this system... disabled]) | |
6545 | wxUSE_METAFILE=no | |
6546 | fi | |
6547 | fi | |
6548 | ||
9a98a854 | 6549 | dnl --------------------------------------------------------------------------- |
77c85c2b | 6550 | dnl IPC: IPC, Drag'n'Drop, Clipboard, ... |
9a98a854 VZ |
6551 | dnl --------------------------------------------------------------------------- |
6552 | ||
2b9bdf71 VZ |
6553 | dnl check for ole headers and disable a few features requiring it if not |
6554 | dnl present (earlier versions of mingw32 don't have ole2.h) | |
f95e4495 | 6555 | if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ |
77e13408 | 6556 | -o "$wxUSE_CLIPBOARD" = "yes" \ |
3bce6687 | 6557 | -o "$wxUSE_OLE" = "yes" \ |
77e13408 | 6558 | -o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then |
2b9bdf71 VZ |
6559 | AC_CHECK_HEADERS(ole2.h) |
6560 | ||
6561 | if test "$ac_cv_header_ole2_h" = "yes" ; then | |
6562 | if test "$GCC" = yes ; then | |
8284b0c5 MB |
6563 | AC_MSG_CHECKING([if g++ requires -fvtable-thunks]) |
6564 | AC_TRY_COMPILE([#include <windows.h> | |
6565 | #include <ole2.h>], | |
6566 | [], | |
6567 | [AC_MSG_RESULT(no)], | |
6568 | [AC_MSG_RESULT(yes) | |
5ff751d6 | 6569 | WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fvtable-thunks"]) |
3d63bc3a | 6570 | LIBS=" -lrpcrt4 -loleaut32 -lole32 -luuid$LIBS" |
f95e4495 VS |
6571 | if test "$wxUSE_OLE" = "yes" ; then |
6572 | AC_DEFINE(wxUSE_OLE) | |
6f1fb1ac VZ |
6573 | AC_DEFINE(wxUSE_OLE_AUTOMATION) |
6574 | AC_DEFINE(wxUSE_OLE_ACTIVEX) | |
0b78747f | 6575 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto" |
f95e4495 | 6576 | fi |
2b9bdf71 VZ |
6577 | fi |
6578 | ||
6579 | dnl for OLE clipboard and dnd | |
f95e4495 VS |
6580 | if test "$wxUSE_DATAOBJ" = "yes" ; then |
6581 | AC_DEFINE(wxUSE_DATAOBJ) | |
6582 | fi | |
2b9bdf71 VZ |
6583 | else |
6584 | AC_MSG_WARN([Some features disabled because OLE headers not found]) | |
6585 | ||
6586 | wxUSE_CLIPBOARD=no | |
6587 | wxUSE_DRAG_AND_DROP=no | |
6588 | wxUSE_DATAOBJ=no | |
3bce6687 JS |
6589 | wxUSE_OLE=no |
6590 | fi | |
6591 | ||
6592 | if test "$wxUSE_METAFILE" = "yes"; then | |
6593 | AC_DEFINE(wxUSE_METAFILE) | |
6594 | ||
6595 | dnl this one should probably be made separately configurable | |
6596 | AC_DEFINE(wxUSE_ENH_METAFILE) | |
6597 | fi | |
6598 | fi | |
6599 | ||
9a98a854 | 6600 | if test "$wxUSE_IPC" = "yes"; then |
0b78747f | 6601 | if test "$wxUSE_SOCKETS" != "yes" -a "$USE_WIN32" != 1; then |
77ffb593 | 6602 | AC_MSG_WARN(wxWidgets IPC classes require sockets... disabled) |
0b78747f | 6603 | wxUSE_IPC=no |
eb4efbdc VZ |
6604 | fi |
6605 | ||
0b78747f MW |
6606 | if test "$wxUSE_IPC" = "yes"; then |
6607 | AC_DEFINE(wxUSE_IPC) | |
6608 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ipc" | |
6609 | fi | |
9a98a854 VZ |
6610 | fi |
6611 | ||
90cf46d9 | 6612 | if test "$wxUSE_DATAOBJ" = "yes"; then |
b468fab2 MW |
6613 | if test "$wxUSE_MGL" = 1; then |
6614 | AC_MSG_WARN([wxDataObject not yet supported under MGL... disabled]) | |
6615 | wxUSE_DATAOBJ=no | |
6616 | else | |
6617 | AC_DEFINE(wxUSE_DATAOBJ) | |
6618 | fi | |
90cf46d9 VZ |
6619 | else |
6620 | AC_MSG_WARN([Clipboard and drag-and-drop require wxDataObject -- disabled]) | |
6621 | wxUSE_CLIPBOARD=no | |
6622 | wxUSE_DRAG_AND_DROP=no | |
6623 | fi | |
6624 | ||
9a98a854 | 6625 | if test "$wxUSE_CLIPBOARD" = "yes"; then |
6c657b52 VS |
6626 | if test "$wxUSE_MGL" = 1; then |
6627 | AC_MSG_WARN([Clipboard not yet supported under MGL... disabled]) | |
6628 | wxUSE_CLIPBOARD=no | |
6629 | fi | |
178572bb | 6630 | |
6c657b52 VS |
6631 | if test "$wxUSE_CLIPBOARD" = "yes"; then |
6632 | AC_DEFINE(wxUSE_CLIPBOARD) | |
6c657b52 | 6633 | fi |
9a98a854 VZ |
6634 | fi |
6635 | ||
39c9d5ac | 6636 | if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then |
ce4169a4 RR |
6637 | if test "$wxUSE_GTK" = 1; then |
6638 | if test "$WXGTK12" != 1; then | |
156b2523 | 6639 | AC_MSG_WARN([Drag and drop is only supported under GTK+ 1.2... disabled]) |
e90c1d2a | 6640 | wxUSE_DRAG_AND_DROP=no |
ce4169a4 | 6641 | fi |
a9b5e89f | 6642 | fi |
a9b5e89f | 6643 | |
ce4169a4 | 6644 | if test "$wxUSE_MOTIF" = 1; then |
156b2523 | 6645 | AC_MSG_WARN([Drag and drop not yet supported under Motif... disabled]) |
e90c1d2a | 6646 | wxUSE_DRAG_AND_DROP=no |
ce4169a4 | 6647 | fi |
a9b5e89f | 6648 | |
7f5c07ab JS |
6649 | if test "$wxUSE_X11" = 1; then |
6650 | AC_MSG_WARN([Drag and drop not yet supported under X11... disabled]) | |
6651 | wxUSE_DRAG_AND_DROP=no | |
6652 | fi | |
6653 | ||
6c657b52 VS |
6654 | if test "$wxUSE_MGL" = 1; then |
6655 | AC_MSG_WARN([Drag and drop not yet supported under MGL... disabled]) | |
6656 | wxUSE_DRAG_AND_DROP=no | |
6657 | fi | |
6658 | ||
ce4169a4 RR |
6659 | if test "$wxUSE_DRAG_AND_DROP" = "yes"; then |
6660 | AC_DEFINE(wxUSE_DRAG_AND_DROP) | |
ce4169a4 | 6661 | fi |
4882bf1b | 6662 | |
9a98a854 VZ |
6663 | fi |
6664 | ||
08938fe1 MB |
6665 | if test "$wxUSE_DRAG_AND_DROP" = "yes" -o "$wxUSE_CLIPBOARD" = "yes"; then |
6666 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd" | |
6667 | fi | |
6668 | ||
9a98a854 VZ |
6669 | if test "$wxUSE_SPLINES" = "yes" ; then |
6670 | AC_DEFINE(wxUSE_SPLINES) | |
6671 | fi | |
6672 | ||
060e10d9 RR |
6673 | if test "$wxUSE_MOUSEWHEEL" = "yes" ; then |
6674 | AC_DEFINE(wxUSE_MOUSEWHEEL) | |
6675 | fi | |
6676 | ||
9a98a854 VZ |
6677 | dnl --------------------------------------------------------------------------- |
6678 | dnl GUI controls | |
6679 | dnl --------------------------------------------------------------------------- | |
6680 | ||
1e6feb95 VZ |
6681 | USES_CONTROLS=0 |
6682 | if test "$wxUSE_CONTROLS" = "yes"; then | |
6683 | USES_CONTROLS=1 | |
6684 | fi | |
6685 | ||
9a98a854 VZ |
6686 | if test "$wxUSE_ACCEL" = "yes"; then |
6687 | AC_DEFINE(wxUSE_ACCEL) | |
1e6feb95 VZ |
6688 | USES_CONTROLS=1 |
6689 | fi | |
6690 | ||
7067783d | 6691 | if test "$wxUSE_ANIMATIONCTRL" = "yes"; then |
72045d57 VZ |
6692 | AC_DEFINE(wxUSE_ANIMATIONCTRL) |
6693 | USES_CONTROLS=1 | |
6694 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS animate" | |
6695 | fi | |
6696 | ||
1e6feb95 VZ |
6697 | if test "$wxUSE_BUTTON" = "yes"; then |
6698 | AC_DEFINE(wxUSE_BUTTON) | |
6699 | USES_CONTROLS=1 | |
6700 | fi | |
6701 | ||
6702 | if test "$wxUSE_BMPBUTTON" = "yes"; then | |
6703 | AC_DEFINE(wxUSE_BMPBUTTON) | |
6704 | USES_CONTROLS=1 | |
6705 | fi | |
6706 | ||
6707 | if test "$wxUSE_CALCTRL" = "yes"; then | |
6708 | AC_DEFINE(wxUSE_CALENDARCTRL) | |
6709 | USES_CONTROLS=1 | |
6710 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS calendar" | |
9a98a854 VZ |
6711 | fi |
6712 | ||
6713 | if test "$wxUSE_CARET" = "yes"; then | |
6714 | AC_DEFINE(wxUSE_CARET) | |
1e6feb95 | 6715 | USES_CONTROLS=1 |
9a98a854 VZ |
6716 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret" |
6717 | fi | |
6718 | ||
912c3932 VZ |
6719 | if test "$wxUSE_COLLPANE" = "yes"; then |
6720 | AC_DEFINE(wxUSE_COLLPANE) | |
6721 | USES_CONTROLS=1 | |
6722 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS collpane" | |
6723 | fi | |
6724 | ||
9a98a854 VZ |
6725 | if test "$wxUSE_COMBOBOX" = "yes"; then |
6726 | AC_DEFINE(wxUSE_COMBOBOX) | |
1e6feb95 | 6727 | USES_CONTROLS=1 |
9a98a854 VZ |
6728 | fi |
6729 | ||
a57d600f VZ |
6730 | if test "$wxUSE_COMBOCTRL" = "yes"; then |
6731 | AC_DEFINE(wxUSE_COMBOCTRL) | |
642bcba9 VZ |
6732 | USES_CONTROLS=1 |
6733 | fi | |
6734 | ||
ce4169a4 RR |
6735 | if test "$wxUSE_CHOICE" = "yes"; then |
6736 | AC_DEFINE(wxUSE_CHOICE) | |
1e6feb95 | 6737 | USES_CONTROLS=1 |
9a98a854 VZ |
6738 | fi |
6739 | ||
92bbdbcd WS |
6740 | if test "$wxUSE_CHOICEBOOK" = "yes"; then |
6741 | AC_DEFINE(wxUSE_CHOICEBOOK) | |
6742 | USES_CONTROLS=1 | |
6743 | fi | |
6744 | ||
9a98a854 VZ |
6745 | if test "$wxUSE_CHECKBOX" = "yes"; then |
6746 | AC_DEFINE(wxUSE_CHECKBOX) | |
1e6feb95 | 6747 | USES_CONTROLS=1 |
9a98a854 VZ |
6748 | fi |
6749 | ||
6750 | if test "$wxUSE_CHECKLST" = "yes"; then | |
6751 | AC_DEFINE(wxUSE_CHECKLISTBOX) | |
1e6feb95 | 6752 | USES_CONTROLS=1 |
9a98a854 VZ |
6753 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst" |
6754 | fi | |
6755 | ||
ec376c8f VZ |
6756 | if test "$wxUSE_COLOURPICKERCTRL" = "yes"; then |
6757 | AC_DEFINE(wxUSE_COLOURPICKERCTRL) | |
6758 | USES_CONTROLS=1 | |
6759 | fi | |
6760 | ||
da98e9be VZ |
6761 | if test "$wxUSE_DATEPICKCTRL" = "yes"; then |
6762 | AC_DEFINE(wxUSE_DATEPICKCTRL) | |
6763 | USES_CONTROLS=1 | |
6764 | fi | |
6765 | ||
ec376c8f VZ |
6766 | if test "$wxUSE_DIRPICKERCTRL" = "yes"; then |
6767 | AC_DEFINE(wxUSE_DIRPICKERCTRL) | |
6768 | USES_CONTROLS=1 | |
6769 | fi | |
6770 | ||
6771 | if test "$wxUSE_FILEPICKERCTRL" = "yes"; then | |
6772 | AC_DEFINE(wxUSE_FILEPICKERCTRL) | |
6773 | USES_CONTROLS=1 | |
6774 | fi | |
6775 | ||
6776 | if test "$wxUSE_FONTPICKERCTRL" = "yes"; then | |
6777 | AC_DEFINE(wxUSE_FONTPICKERCTRL) | |
6778 | USES_CONTROLS=1 | |
6779 | fi | |
6780 | ||
ddb4769e VZ |
6781 | if test "$wxUSE_DISPLAY" = "yes"; then |
6782 | AC_DEFINE(wxUSE_DISPLAY) | |
0b78747f | 6783 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS display multimon" |
ddb4769e VZ |
6784 | fi |
6785 | ||
88bbc332 RR |
6786 | if test "$wxUSE_DETECT_SM" = "yes"; then |
6787 | AC_DEFINE(wxUSE_DETECT_SM) | |
6788 | fi | |
6789 | ||
9a98a854 VZ |
6790 | if test "$wxUSE_GAUGE" = "yes"; then |
6791 | AC_DEFINE(wxUSE_GAUGE) | |
1e6feb95 | 6792 | USES_CONTROLS=1 |
9a98a854 VZ |
6793 | fi |
6794 | ||
d6a55c4b VZ |
6795 | if test "$wxUSE_GRID" = "yes"; then |
6796 | AC_DEFINE(wxUSE_GRID) | |
1e6feb95 | 6797 | USES_CONTROLS=1 |
d6a55c4b VZ |
6798 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS grid" |
6799 | fi | |
6800 | ||
17e91437 VZ |
6801 | if test "$wxUSE_HYPERLINKCTRL" = "yes"; then |
6802 | AC_DEFINE(wxUSE_HYPERLINKCTRL) | |
6803 | USES_CONTROLS=1 | |
6804 | fi | |
6805 | ||
95a46303 RR |
6806 | if test "$wxUSE_BITMAPCOMBOBOX" = "yes"; then |
6807 | AC_DEFINE(wxUSE_BITMAPCOMBOBOX) | |
6808 | USES_CONTROLS=1 | |
6809 | fi | |
6810 | ||
20e34ecc RR |
6811 | if test "$wxUSE_DATAVIEWCTRL" = "yes"; then |
6812 | AC_DEFINE(wxUSE_DATAVIEWCTRL) | |
6813 | USES_CONTROLS=1 | |
6814 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dataview" | |
6815 | fi | |
6816 | ||
9a98a854 | 6817 | if test "$wxUSE_IMAGLIST" = "yes"; then |
ce4169a4 | 6818 | AC_DEFINE(wxUSE_IMAGLIST) |
9a98a854 VZ |
6819 | fi |
6820 | ||
e9c0df38 VZ |
6821 | if test "$wxUSE_LISTBOOK" = "yes"; then |
6822 | AC_DEFINE(wxUSE_LISTBOOK) | |
6823 | USES_CONTROLS=1 | |
6824 | fi | |
6825 | ||
9a98a854 | 6826 | if test "$wxUSE_LISTBOX" = "yes"; then |
ce4169a4 | 6827 | AC_DEFINE(wxUSE_LISTBOX) |
1e6feb95 | 6828 | USES_CONTROLS=1 |
0b78747f | 6829 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listbox" |
9a98a854 VZ |
6830 | fi |
6831 | ||
6832 | if test "$wxUSE_LISTCTRL" = "yes"; then | |
ce4169a4 RR |
6833 | if test "$wxUSE_IMAGLIST" = "yes"; then |
6834 | AC_DEFINE(wxUSE_LISTCTRL) | |
1e6feb95 | 6835 | USES_CONTROLS=1 |
ce4169a4 RR |
6836 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listctrl" |
6837 | else | |
6838 | AC_MSG_WARN([wxListCtrl requires wxImageList and won't be compiled without it]) | |
6839 | fi | |
9a98a854 VZ |
6840 | fi |
6841 | ||
6842 | if test "$wxUSE_NOTEBOOK" = "yes"; then | |
ce4169a4 | 6843 | AC_DEFINE(wxUSE_NOTEBOOK) |
1e6feb95 | 6844 | USES_CONTROLS=1 |
ce4169a4 | 6845 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" |
9a98a854 VZ |
6846 | fi |
6847 | ||
a57d600f VZ |
6848 | if test "$wxUSE_ODCOMBOBOX" = "yes"; then |
6849 | AC_DEFINE(wxUSE_ODCOMBOBOX) | |
642bcba9 VZ |
6850 | USES_CONTROLS=1 |
6851 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS combo" | |
6852 | fi | |
6853 | ||
2fc9385a JS |
6854 | dnl if test "$wxUSE_PROPSHEET" = "yes"; then |
6855 | dnl AC_DEFINE(wxUSE_PROPSHEET) | |
6856 | dnl USES_CONTROLS=1 | |
6857 | dnl SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS proplist" | |
6858 | dnl fi | |
24176f2c | 6859 | |
9a98a854 | 6860 | if test "$wxUSE_RADIOBOX" = "yes"; then |
ce4169a4 | 6861 | AC_DEFINE(wxUSE_RADIOBOX) |
1e6feb95 | 6862 | USES_CONTROLS=1 |
9a98a854 VZ |
6863 | fi |
6864 | ||
6865 | if test "$wxUSE_RADIOBTN" = "yes"; then | |
ce4169a4 | 6866 | AC_DEFINE(wxUSE_RADIOBTN) |
1e6feb95 | 6867 | USES_CONTROLS=1 |
9a98a854 VZ |
6868 | fi |
6869 | ||
79b00c62 | 6870 | if test "$wxUSE_SASH" = "yes"; then |
ce4169a4 RR |
6871 | AC_DEFINE(wxUSE_SASH) |
6872 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sashtest" | |
9a98a854 VZ |
6873 | fi |
6874 | ||
6875 | if test "$wxUSE_SCROLLBAR" = "yes"; then | |
ce4169a4 | 6876 | AC_DEFINE(wxUSE_SCROLLBAR) |
1e6feb95 | 6877 | USES_CONTROLS=1 |
678b92a9 | 6878 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS scroll scrollsub" |
9a98a854 VZ |
6879 | fi |
6880 | ||
6881 | if test "$wxUSE_SLIDER" = "yes"; then | |
ce4169a4 | 6882 | AC_DEFINE(wxUSE_SLIDER) |
1e6feb95 | 6883 | USES_CONTROLS=1 |
9a98a854 VZ |
6884 | fi |
6885 | ||
6886 | if test "$wxUSE_SPINBTN" = "yes"; then | |
ce4169a4 | 6887 | AC_DEFINE(wxUSE_SPINBTN) |
1e6feb95 | 6888 | USES_CONTROLS=1 |
9a98a854 VZ |
6889 | fi |
6890 | ||
66f38406 RR |
6891 | if test "$wxUSE_SPINCTRL" = "yes"; then |
6892 | AC_DEFINE(wxUSE_SPINCTRL) | |
1e6feb95 | 6893 | USES_CONTROLS=1 |
66f38406 RR |
6894 | fi |
6895 | ||
9a98a854 | 6896 | if test "$wxUSE_SPLITTER" = "yes"; then |
ce4169a4 RR |
6897 | AC_DEFINE(wxUSE_SPLITTER) |
6898 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splitter" | |
9a98a854 VZ |
6899 | fi |
6900 | ||
6901 | if test "$wxUSE_STATBMP" = "yes"; then | |
ce4169a4 | 6902 | AC_DEFINE(wxUSE_STATBMP) |
1e6feb95 | 6903 | USES_CONTROLS=1 |
9a98a854 VZ |
6904 | fi |
6905 | ||
6906 | if test "$wxUSE_STATBOX" = "yes"; then | |
ce4169a4 | 6907 | AC_DEFINE(wxUSE_STATBOX) |
1e6feb95 VZ |
6908 | USES_CONTROLS=1 |
6909 | fi | |
6910 | ||
6911 | if test "$wxUSE_STATTEXT" = "yes"; then | |
6912 | AC_DEFINE(wxUSE_STATTEXT) | |
6913 | USES_CONTROLS=1 | |
9a98a854 VZ |
6914 | fi |
6915 | ||
6916 | if test "$wxUSE_STATLINE" = "yes"; then | |
d1188635 JS |
6917 | AC_DEFINE(wxUSE_STATLINE) |
6918 | USES_CONTROLS=1 | |
9a98a854 VZ |
6919 | fi |
6920 | ||
6921 | if test "$wxUSE_STATUSBAR" = "yes"; then | |
da4486fb VZ |
6922 | dnl this will get undefined in wx/chkconf.h if it's not supported |
6923 | AC_DEFINE(wxUSE_NATIVE_STATUSBAR) | |
ce4169a4 | 6924 | AC_DEFINE(wxUSE_STATUSBAR) |
1e6feb95 | 6925 | USES_CONTROLS=1 |
2286341c VZ |
6926 | |
6927 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar" | |
9a98a854 VZ |
6928 | fi |
6929 | ||
db6d3918 | 6930 | if test "$wxUSE_TAB_DIALOG" = "yes"; then |
ce4169a4 | 6931 | AC_DEFINE(wxUSE_TAB_DIALOG) |
9a98a854 VZ |
6932 | fi |
6933 | ||
1e6feb95 VZ |
6934 | if test "$wxUSE_TEXTCTRL" = "yes"; then |
6935 | AC_DEFINE(wxUSE_TEXTCTRL) | |
6936 | USES_CONTROLS=1 | |
6937 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS text" | |
6938 | fi | |
6939 | ||
1db8dc4a | 6940 | if test "$wxUSE_TOGGLEBTN" = "yes"; then |
c14e9648 | 6941 | if test "$wxUSE_COCOA" = 1 ; then |
156b2523 GD |
6942 | AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled]) |
6943 | wxUSE_TOGGLEBTN=no | |
6944 | fi | |
a45d7ab7 GD |
6945 | |
6946 | if test "$wxUSE_TOGGLEBTN" = "yes"; then | |
6947 | AC_DEFINE(wxUSE_TOGGLEBTN) | |
1e6feb95 | 6948 | USES_CONTROLS=1 |
a45d7ab7 | 6949 | fi |
1db8dc4a VZ |
6950 | fi |
6951 | ||
9a98a854 | 6952 | if test "$wxUSE_TOOLBAR" = "yes"; then |
ce4169a4 | 6953 | AC_DEFINE(wxUSE_TOOLBAR) |
1e6feb95 | 6954 | USES_CONTROLS=1 |
360d6699 | 6955 | |
452b6243 VS |
6956 | if test "$wxUSE_UNIVERSAL" = "yes"; then |
6957 | wxUSE_TOOLBAR_NATIVE="no" | |
6958 | else | |
6959 | wxUSE_TOOLBAR_NATIVE="yes" | |
1e6feb95 | 6960 | AC_DEFINE(wxUSE_TOOLBAR_NATIVE) |
1e6feb95 | 6961 | fi |
9a98a854 | 6962 | |
1e6feb95 | 6963 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS toolbar" |
360d6699 VZ |
6964 | fi |
6965 | ||
39c9d5ac | 6966 | if test "$wxUSE_TOOLTIPS" = "yes"; then |
ced859c3 | 6967 | if test "$wxUSE_MOTIF" = 1; then |
156b2523 | 6968 | AC_MSG_WARN([wxTooltip not supported yet under Motif... disabled]) |
9a98a854 | 6969 | else |
d1188635 JS |
6970 | if test "$wxUSE_UNIVERSAL" = "yes"; then |
6971 | AC_MSG_WARN([wxTooltip not supported yet in wxUniversal... disabled]) | |
ce4169a4 | 6972 | else |
d1188635 | 6973 | AC_DEFINE(wxUSE_TOOLTIPS) |
ce4169a4 | 6974 | fi |
9a98a854 VZ |
6975 | fi |
6976 | fi | |
6977 | ||
eca15c0d VZ |
6978 | if test "$wxUSE_TREEBOOK" = "yes"; then |
6979 | AC_DEFINE(wxUSE_TREEBOOK) | |
6980 | USES_CONTROLS=1 | |
6981 | fi | |
6982 | ||
7dcea26b JS |
6983 | if test "$wxUSE_TOOLBOOK" = "yes"; then |
6984 | AC_DEFINE(wxUSE_TOOLBOOK) | |
6985 | USES_CONTROLS=1 | |
6986 | fi | |
6987 | ||
9a98a854 | 6988 | if test "$wxUSE_TREECTRL" = "yes"; then |
ce4169a4 RR |
6989 | if test "$wxUSE_IMAGLIST" = "yes"; then |
6990 | AC_DEFINE(wxUSE_TREECTRL) | |
1e6feb95 | 6991 | USES_CONTROLS=1 |
ce4169a4 RR |
6992 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treectrl" |
6993 | else | |
6994 | AC_MSG_WARN([wxTreeCtrl requires wxImageList and won't be compiled without it]) | |
6995 | fi | |
9a98a854 VZ |
6996 | fi |
6997 | ||
9f41d601 | 6998 | if test "$wxUSE_POPUPWIN" = "yes"; then |
ac0c4cc3 | 6999 | if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 ; then |
156b2523 | 7000 | AC_MSG_WARN([Popup window not yet supported under Mac OS X... disabled]) |
6abe4b65 | 7001 | else |
833a51f6 MB |
7002 | if test "$wxUSE_PM" = 1; then |
7003 | AC_MSG_WARN([wxPopupWindow not yet supported under PM... disabled]) | |
485cf710 | 7004 | else |
833a51f6 | 7005 | AC_DEFINE(wxUSE_POPUPWIN) |
0b78747f | 7006 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup" |
0b01706f | 7007 | |
833a51f6 | 7008 | USES_CONTROLS=1 |
485cf710 | 7009 | fi |
6abe4b65 | 7010 | fi |
9f41d601 RR |
7011 | fi |
7012 | ||
0dcd06dd | 7013 | if test "$wxUSE_DIALUP_MANAGER" = "yes"; then |
56c6aab7 | 7014 | if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_MGL" = 1; then |
480b9f18 | 7015 | AC_MSG_WARN([Dialup manager not supported on this platform... disabled]) |
b843b628 MB |
7016 | else |
7017 | AC_DEFINE(wxUSE_DIALUP_MANAGER) | |
7018 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dialup" | |
7019 | fi | |
7020 | fi | |
7021 | ||
dd964dcc | 7022 | if test "$wxUSE_TIPWINDOW" = "yes"; then |
c6712985 SN |
7023 | if test "$wxUSE_PM" = 1; then |
7024 | AC_MSG_WARN([wxTipWindow not yet supported under PM... disabled]) | |
3bd8fb5f | 7025 | else |
c6712985 SN |
7026 | AC_DEFINE(wxUSE_TIPWINDOW) |
7027 | fi | |
dd964dcc VZ |
7028 | fi |
7029 | ||
1e6feb95 VZ |
7030 | if test "$USES_CONTROLS" = 1; then |
7031 | AC_DEFINE(wxUSE_CONTROLS) | |
7032 | fi | |
7033 | ||
9a98a854 VZ |
7034 | dnl --------------------------------------------------------------------------- |
7035 | dnl misc options | |
7036 | dnl --------------------------------------------------------------------------- | |
7037 | ||
4199367e VZ |
7038 | dnl please keep the settings below in alphabetical order |
7039 | if test "$wxUSE_ACCESSIBILITY" = "yes"; then | |
7040 | AC_DEFINE(wxUSE_ACCESSIBILITY) | |
7041 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS access" | |
7042 | fi | |
9a98a854 | 7043 | |
38b4a946 VZ |
7044 | if test "$wxUSE_DC_CACHEING" = "yes"; then |
7045 | AC_DEFINE(wxUSE_DC_CACHEING) | |
7046 | fi | |
7047 | ||
24fd6d87 VZ |
7048 | if test "$wxUSE_DRAGIMAGE" = "yes"; then |
7049 | AC_DEFINE(wxUSE_DRAGIMAGE) | |
7050 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dragimag" | |
7051 | fi | |
7052 | ||
4199367e | 7053 | if test "$wxUSE_EXCEPTIONS" = "yes"; then |
2ad50b4f VZ |
7054 | if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then |
7055 | AC_MSG_WARN([--enable-exceptions can't be used with --enable-no_exceptions]) | |
7056 | else | |
7057 | AC_DEFINE(wxUSE_EXCEPTIONS) | |
7058 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS except" | |
7059 | fi | |
4199367e VZ |
7060 | fi |
7061 | ||
7062 | USE_HTML=0 | |
7063 | if test "$wxUSE_HTML" = "yes"; then | |
7064 | AC_DEFINE(wxUSE_HTML) | |
7065 | USE_HTML=1 | |
7066 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox" | |
7866e9c9 KO |
7067 | if test "$wxUSE_MAC" = 1; then |
7068 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl" | |
7069 | fi | |
7bb2947d | 7070 | fi |
ec9f9256 | 7071 | if test "$wxUSE_WEBKIT" = "yes"; then |
031e9160 | 7072 | if test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then |
07bea8f0 | 7073 | old_CPPFLAGS="$CPPFLAGS" |
c92ad099 | 7074 | CPPFLAGS="-x objective-c++ $CPPFLAGS" |
07bea8f0 VS |
7075 | AC_CHECK_HEADER([WebKit/HIWebView.h], |
7076 | [ | |
7077 | AC_DEFINE(wxUSE_WEBKIT) | |
7078 | WEBKIT_LINK="-framework WebKit" | |
7079 | ], | |
7080 | [ | |
7081 | AC_MSG_WARN([WebKit headers not found; disabling wxWebKit]) | |
7082 | wxUSE_WEBKIT=no | |
7083 | ], | |
7084 | [#include <Carbon/Carbon.h>]) | |
7085 | CPPFLAGS="$old_CPPFLAGS" | |
7086 | elif test "$wxUSE_COCOA" = 1; then | |
7087 | AC_DEFINE(wxUSE_WEBKIT) | |
7088 | else | |
7089 | wxUSE_WEBKIT=no | |
7090 | fi | |
ec9f9256 JS |
7091 | fi |
7092 | ||
9a8f0513 VS |
7093 | USE_XRC=0 |
7094 | if test "$wxUSE_XRC" = "yes"; then | |
d2ebf0b7 VS |
7095 | if test "$wxUSE_XML" != "yes"; then |
7096 | AC_MSG_WARN([XML library not built, XRC resources disabled]) | |
7097 | wxUSE_XRC=no | |
7098 | else | |
7099 | AC_DEFINE(wxUSE_XRC) | |
7100 | USE_XRC=1 | |
7101 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS xrc" | |
7102 | fi | |
9a8f0513 | 7103 | fi |
07bea8f0 | 7104 | |
50acee04 JS |
7105 | USE_AUI=0 |
7106 | if test "$wxUSE_AUI" = "yes"; then | |
7107 | AC_DEFINE(wxUSE_AUI) | |
7108 | USE_AUI=1 | |
7109 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS aui" | |
7110 | fi | |
7111 | ||
1e6feb95 VZ |
7112 | if test "$wxUSE_MENUS" = "yes"; then |
7113 | AC_DEFINE(wxUSE_MENUS) | |
7114 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS menu" | |
ce4169a4 | 7115 | fi |
9a98a854 | 7116 | |
1e6feb95 VZ |
7117 | if test "$wxUSE_METAFILE" = "yes"; then |
7118 | AC_DEFINE(wxUSE_METAFILE) | |
c11584af RR |
7119 | fi |
7120 | ||
1e6feb95 VZ |
7121 | if test "$wxUSE_MIMETYPE" = "yes"; then |
7122 | AC_DEFINE(wxUSE_MIMETYPE) | |
9a98a854 VZ |
7123 | fi |
7124 | ||
7125 | if test "$wxUSE_MINIFRAME" = "yes"; then | |
ce4169a4 RR |
7126 | AC_DEFINE(wxUSE_MINIFRAME) |
7127 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS minifram" | |
9a98a854 VZ |
7128 | fi |
7129 | ||
4199367e VZ |
7130 | if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then |
7131 | AC_DEFINE(wxUSE_SYSTEM_OPTIONS) | |
7132 | if test "$TOOLKIT" = "MSW" -o "$TOOLKIT" = "GTK" -o "$TOOLKIT" = "X11" -o \ | |
f1d9e1ec | 7133 | "$TOOLKIT" = "MOTIF" -o "$TOOLKIT" = "COCOA"; then |
4199367e VZ |
7134 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS taskbar" |
7135 | fi | |
5526e819 VS |
7136 | fi |
7137 | ||
4199367e | 7138 | |
9a98a854 | 7139 | if test "$wxUSE_VALIDATORS" = "yes"; then |
ce4169a4 RR |
7140 | AC_DEFINE(wxUSE_VALIDATORS) |
7141 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate" | |
9a98a854 VZ |
7142 | fi |
7143 | ||
d275c7eb VZ |
7144 | if test "$wxUSE_PALETTE" = "yes" ; then |
7145 | AC_DEFINE(wxUSE_PALETTE) | |
7146 | fi | |
7147 | ||
4199367e VZ |
7148 | if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_MSLU" = "yes" ; then |
7149 | dnl Must be done this late because -lunicows must be before all the other libs | |
7150 | LIBS=" -lunicows $LIBS" | |
0046ff7c VS |
7151 | fi |
7152 | ||
5d7836c4 JS |
7153 | USE_RICHTEXT=0 |
7154 | if test "$wxUSE_RICHTEXT" = "yes"; then | |
7155 | AC_DEFINE(wxUSE_RICHTEXT) | |
7156 | USE_RICHTEXT=1 | |
7157 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS richtext" | |
7158 | fi | |
7159 | ||
4199367e VZ |
7160 | dnl --------------------------------------------------------------------------- |
7161 | dnl wxImage options | |
7162 | dnl --------------------------------------------------------------------------- | |
0940bcf7 | 7163 | |
4199367e VZ |
7164 | if test "$wxUSE_IMAGE" = "yes" ; then |
7165 | AC_DEFINE(wxUSE_IMAGE) | |
0940bcf7 | 7166 | |
4199367e VZ |
7167 | if test "$wxUSE_GIF" = "yes" ; then |
7168 | AC_DEFINE(wxUSE_GIF) | |
7169 | fi | |
4b6b4dfc | 7170 | |
4199367e VZ |
7171 | if test "$wxUSE_PCX" = "yes" ; then |
7172 | AC_DEFINE(wxUSE_PCX) | |
7173 | fi | |
0940bcf7 | 7174 | |
bb9e79c0 VZ |
7175 | if test "$wxUSE_TGA" = "yes" ; then |
7176 | AC_DEFINE(wxUSE_TGA) | |
7177 | fi | |
7178 | ||
4199367e VZ |
7179 | if test "$wxUSE_IFF" = "yes" ; then |
7180 | AC_DEFINE(wxUSE_IFF) | |
7181 | fi | |
0046ff7c | 7182 | |
4199367e VZ |
7183 | if test "$wxUSE_PNM" = "yes" ; then |
7184 | AC_DEFINE(wxUSE_PNM) | |
7185 | fi | |
658974ae | 7186 | |
4199367e VZ |
7187 | if test "$wxUSE_XPM" = "yes" ; then |
7188 | AC_DEFINE(wxUSE_XPM) | |
7189 | fi | |
7190 | ||
7191 | if test "$wxUSE_ICO_CUR" = "yes" ; then | |
7192 | AC_DEFINE(wxUSE_ICO_CUR) | |
7193 | fi | |
a72a4bfa VS |
7194 | fi |
7195 | ||
1e6feb95 | 7196 | dnl --------------------------------------------------------------------------- |
4199367e | 7197 | dnl common dialogs |
1e6feb95 VZ |
7198 | dnl --------------------------------------------------------------------------- |
7199 | ||
319c5ed4 VZ |
7200 | if test "$wxUSE_ABOUTDLG" = "yes"; then |
7201 | AC_DEFINE(wxUSE_ABOUTDLG) | |
7202 | fi | |
7203 | ||
1e6feb95 VZ |
7204 | if test "$wxUSE_CHOICEDLG" = "yes"; then |
7205 | AC_DEFINE(wxUSE_CHOICEDLG) | |
7206 | fi | |
7207 | ||
7208 | if test "$wxUSE_COLOURDLG" = "yes"; then | |
7209 | AC_DEFINE(wxUSE_COLOURDLG) | |
7210 | fi | |
7211 | ||
7212 | if test "$wxUSE_FILEDLG" = "yes"; then | |
7213 | AC_DEFINE(wxUSE_FILEDLG) | |
7214 | fi | |
7215 | ||
8db37e06 VZ |
7216 | if test "$wxUSE_FINDREPLDLG" = "yes"; then |
7217 | AC_DEFINE(wxUSE_FINDREPLDLG) | |
7218 | fi | |
7219 | ||
1e6feb95 VZ |
7220 | if test "$wxUSE_FONTDLG" = "yes"; then |
7221 | AC_DEFINE(wxUSE_FONTDLG) | |
7222 | fi | |
7223 | ||
7224 | if test "$wxUSE_DIRDLG" = "yes"; then | |
ae1daed0 JS |
7225 | if test "$wxUSE_TREECTRL" != "yes"; then |
7226 | AC_MSG_WARN(wxDirDialog requires wxTreeCtrl so it won't be compiled without it) | |
1e6feb95 | 7227 | else |
ae1daed0 | 7228 | AC_DEFINE(wxUSE_DIRDLG) |
1e6feb95 VZ |
7229 | fi |
7230 | fi | |
7231 | ||
7232 | if test "$wxUSE_MSGDLG" = "yes"; then | |
7233 | AC_DEFINE(wxUSE_MSGDLG) | |
7234 | fi | |
7235 | ||
7236 | if test "$wxUSE_NUMBERDLG" = "yes"; then | |
7237 | AC_DEFINE(wxUSE_NUMBERDLG) | |
7238 | fi | |
7239 | ||
7240 | if test "$wxUSE_PROGRESSDLG" = "yes"; then | |
7241 | if test "$wxUSE_CONSTRAINTS" != "yes"; then | |
7242 | AC_MSG_WARN(wxProgressDialog requires constraints so it won't be compiled without them) | |
7243 | else | |
7244 | AC_DEFINE(wxUSE_PROGRESSDLG) | |
7245 | fi | |
7246 | fi | |
7247 | ||
cbca9943 VZ |
7248 | if test "$wxUSE_SPLASH" = "yes"; then |
7249 | AC_DEFINE(wxUSE_SPLASH) | |
2057db16 | 7250 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splash" |
cbca9943 VZ |
7251 | fi |
7252 | ||
1e6feb95 VZ |
7253 | if test "$wxUSE_STARTUP_TIPS" = "yes"; then |
7254 | if test "$wxUSE_CONSTRAINTS" != "yes"; then | |
7255 | AC_MSG_WARN(Startup tips requires constraints and won't be compiled without them) | |
7256 | else | |
7257 | AC_DEFINE(wxUSE_STARTUP_TIPS) | |
7258 | fi | |
7259 | fi | |
7260 | ||
7261 | if test "$wxUSE_TEXTDLG" = "yes"; then | |
7262 | AC_DEFINE(wxUSE_TEXTDLG) | |
7263 | fi | |
7264 | ||
b1f5d087 VZ |
7265 | if test "$wxUSE_WIZARDDLG" = "yes"; then |
7266 | AC_DEFINE(wxUSE_WIZARDDLG) | |
7267 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wizard" | |
7268 | fi | |
7269 | ||
64b75e64 RD |
7270 | dnl --------------------------------------------------------------------------- |
7271 | dnl wxGraphicsContext | |
7272 | dnl --------------------------------------------------------------------------- | |
7273 | ||
7274 | if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then | |
7275 | if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = "1"; then | |
7276 | AC_DEFINE(wxUSE_GRAPHICS_CONTEXT) | |
7277 | elif test "$wxUSE_GTK" != 1; then | |
7278 | dnl for other builds we'll just wing it for now... | |
7279 | AC_DEFINE(wxUSE_GRAPHICS_CONTEXT) | |
1e613d22 | 7280 | else |
64b75e64 RD |
7281 | dnl ...but let's check for cairo availability for wxGTK builds |
7282 | PKG_CHECK_MODULES(CAIRO, cairo, | |
ec3edcc9 VZ |
7283 | [AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)], |
7284 | [AC_MSG_WARN([Cairo library not found, unable to set wxUSE_GRAPHICS_CONTEXT])] | |
64b75e64 RD |
7285 | ) |
7286 | fi | |
7287 | fi | |
7288 | ||
ce756cb0 | 7289 | dnl --------------------------------------------------------------------------- |
5ff751d6 | 7290 | dnl wxMediaCtrl |
ce756cb0 RN |
7291 | dnl --------------------------------------------------------------------------- |
7292 | ||
557002cf VZ |
7293 | USE_MEDIA=0 |
7294 | ||
ce756cb0 | 7295 | if test "$wxUSE_MEDIACTRL" = "yes"; then |
2f6c5bb5 VZ |
7296 | USE_MEDIA=1 |
7297 | ||
ce756cb0 | 7298 | dnl ----------------------------------------------------------------------- |
5ff751d6 | 7299 | dnl GStreamer |
ce756cb0 RN |
7300 | dnl ----------------------------------------------------------------------- |
7301 | if test "$wxUSE_GTK" = 1; then | |
122ff921 | 7302 | wxUSE_GSTREAMER="no" |
5ff751d6 | 7303 | |
dae87f93 | 7304 | dnl ------------------------------------------------------------------- |
557002cf VZ |
7305 | dnl Test for at least 0.8 gstreamer module from pkg-config |
7306 | dnl Even totem doesn't accept 0.9 evidently. | |
7307 | dnl | |
7308 | dnl So, we first check to see if 0.10 if available - if not we | |
7309 | dnl try the older 0.8 version | |
dae87f93 | 7310 | dnl ------------------------------------------------------------------- |
557002cf VZ |
7311 | GST_VERSION_MAJOR=0 |
7312 | GST_VERSION_MINOR=10 | |
2f6c5bb5 | 7313 | GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR |
557002cf VZ |
7314 | |
7315 | if test "$wxUSE_GSTREAMER8" = "no"; then | |
2f6c5bb5 VZ |
7316 | PKG_CHECK_MODULES(GST, |
7317 | [gstreamer-$GST_VERSION gstreamer-plugins-base-$GST_VERSION gconf-2.0], | |
7318 | [ | |
7319 | wxUSE_GSTREAMER="yes" | |
7320 | GST_LIBS="$GST_LIBS -lgstinterfaces-$GST_VERSION" | |
7321 | ], | |
7322 | [ | |
7323 | AC_MSG_WARN([GStreamer 0.10 not available, falling back to 0.8]) | |
557002cf | 7324 | GST_VERSION_MINOR=8 |
2f6c5bb5 VZ |
7325 | ] |
7326 | ) | |
7327 | else | |
7328 | dnl check only for 0.8 | |
557002cf | 7329 | GST_VERSION_MINOR=8 |
dae87f93 | 7330 | fi |
5ff751d6 | 7331 | |
2f6c5bb5 VZ |
7332 | if test $GST_VERSION_MINOR = "8"; then |
7333 | GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR | |
7334 | PKG_CHECK_MODULES(GST, | |
7335 | [gstreamer-$GST_VERSION gstreamer-interfaces-$GST_VERSION gstreamer-gconf-$GST_VERSION], | |
7336 | wxUSE_GSTREAMER="yes", | |
557002cf | 7337 | [ |
2f6c5bb5 | 7338 | AC_MSG_WARN([GStreamer 0.8/0.10 not available.]) |
557002cf | 7339 | ]) |
ce756cb0 | 7340 | fi |
5ff751d6 | 7341 | |
557002cf | 7342 | |
ce756cb0 | 7343 | if test "$wxUSE_GSTREAMER" = "yes"; then |
122ff921 VZ |
7344 | dnl system gstreamer package is compiled with Sun CC and outputs |
7345 | dnl CC-specific "-mt" in its flags, remove it for gcc compilation | |
7346 | case "${host}" in | |
7347 | *-*-solaris2* ) | |
7348 | if "$GCC" = yes; then | |
7349 | GST_CFLAGS=`echo $GST_CFLAGS | sed 's/-mt//'` | |
7350 | GST_LIBS=`echo $GST_LIBS | sed 's/-mt//'` | |
7351 | fi | |
7352 | esac | |
7353 | ||
7354 | CPPFLAGS="$GST_CFLAGS $CPPFLAGS" | |
7355 | LIBS="$GST_LIBS $LIBS" | |
7356 | ||
dae87f93 | 7357 | AC_DEFINE(wxUSE_GSTREAMER) |
2f6c5bb5 VZ |
7358 | else |
7359 | USE_MEDIA=0 | |
ce756cb0 RN |
7360 | fi |
7361 | fi | |
2f6c5bb5 VZ |
7362 | |
7363 | if test $USE_MEDIA = 1; then | |
7364 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer" | |
7365 | AC_DEFINE(wxUSE_MEDIACTRL) | |
7366 | fi | |
ce756cb0 RN |
7367 | fi |
7368 | ||
bdc72a22 | 7369 | dnl --------------------------------------------------------------------------- |
db1d0193 | 7370 | dnl get the string with OS info - used by wxGetOsDescription() on MacOS X |
bdc72a22 VZ |
7371 | dnl --------------------------------------------------------------------------- |
7372 | ||
32832908 VZ |
7373 | if test "$cross_compiling" = "yes"; then |
7374 | dnl Use best guess from host as we can't use uname when cross compiling | |
7375 | OSINFO="\"$host\"" | |
7376 | else | |
7377 | dnl attualy work out OS version | |
7378 | OSINFO=`uname -s -r -m` | |
7379 | OSINFO="\"$OSINFO\"" | |
7380 | fi | |
7381 | ||
bdc72a22 VZ |
7382 | AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO) |
7383 | ||
7e67ed0d VZ |
7384 | dnl --------------------------------------------------------------------------- |
7385 | dnl define the variable containing the installation prefix (used in dcpsg.cpp) | |
7386 | dnl --------------------------------------------------------------------------- | |
7387 | ||
06dda230 VZ |
7388 | if test "x$prefix" != "xNONE"; then |
7389 | wxPREFIX=$prefix | |
7390 | else | |
7391 | wxPREFIX=$ac_default_prefix | |
7392 | fi | |
7393 | ||
7394 | AC_DEFINE_UNQUOTED(wxINSTALL_PREFIX, "$wxPREFIX") | |
7e67ed0d | 7395 | |
edd891e2 VS |
7396 | |
7397 | dnl --------------------------------------------------------------------------- | |
7398 | dnl define variables with all built libraries for wx-config | |
7399 | dnl --------------------------------------------------------------------------- | |
7400 | ||
7401 | CORE_BASE_LIBS="net base" | |
7402 | CORE_GUI_LIBS="adv core" | |
7403 | ||
7404 | if test "$wxUSE_XML" = "yes" ; then | |
7405 | CORE_BASE_LIBS="xml $CORE_BASE_LIBS" | |
7406 | fi | |
45293562 VS |
7407 | if test "$wxUSE_ODBC" != "no" ; then |
7408 | CORE_BASE_LIBS="odbc $CORE_BASE_LIBS" | |
7409 | CORE_GUI_LIBS="dbgrid $CORE_GUI_LIBS" | |
edd891e2 VS |
7410 | fi |
7411 | if test "$wxUSE_HTML" = "yes" ; then | |
7412 | CORE_GUI_LIBS="html $CORE_GUI_LIBS" | |
7413 | fi | |
61639efb VZ |
7414 | if test "$wxUSE_DEBUGREPORT" = "yes" ; then |
7415 | CORE_GUI_LIBS="qa $CORE_GUI_LIBS" | |
7416 | fi | |
9a8f0513 VS |
7417 | if test "$wxUSE_XRC" = "yes" ; then |
7418 | CORE_GUI_LIBS="xrc $CORE_GUI_LIBS" | |
7419 | fi | |
50acee04 JS |
7420 | if test "$wxUSE_AUI" = "yes" ; then |
7421 | CORE_GUI_LIBS="aui $CORE_GUI_LIBS" | |
7422 | fi | |
edd891e2 | 7423 | |
57e7d4ac VS |
7424 | if test "$wxUSE_GUI" != "yes"; then |
7425 | CORE_GUI_LIBS="" | |
7426 | fi | |
7427 | ||
edd891e2 VS |
7428 | AC_SUBST(CORE_BASE_LIBS) |
7429 | AC_SUBST(CORE_GUI_LIBS) | |
7430 | ||
9a98a854 VZ |
7431 | dnl --------------------------------------------------------------------------- |
7432 | dnl Output the makefiles and such from the results found above | |
7433 | dnl --------------------------------------------------------------------------- | |
7434 | ||
8006bf3c | 7435 | dnl all additional libraries (except wxWidgets itself) we link with |
3a922bb4 | 7436 | |
f11bdd03 | 7437 | if test "$wxUSE_MAC" = 1 ; then |
a98bf0c0 | 7438 | if test "$wxUSE_SOUND" = "yes" || test "$wxUSE_MEDIACTRL" = "yes"; then |
031e9160 DE |
7439 | if test "$USE_DARWIN" = 1; then |
7440 | LDFLAGS="$LDFLAGS -framework QuickTime" | |
7441 | else | |
7442 | LDFLAGS="$LDFLAGS -lQuickTimeLib" | |
7443 | fi | |
e586e41d | 7444 | fi |
5dcf30a0 | 7445 | if test "$USE_DARWIN" = 1; then |
031e9160 DE |
7446 | LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework System" |
7447 | else | |
7448 | LDFLAGS="$LDFLAGS -lCarbonLib" | |
5dcf30a0 | 7449 | fi |
b4085ce6 | 7450 | fi |
ac0c4cc3 | 7451 | if test "$wxUSE_COCOA" = 1 ; then |
4cb1d3da | 7452 | LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa" |
4fc81cbc RN |
7453 | if test "$wxUSE_MEDIACTRL" = "yes"; then |
7454 | LDFLAGS="$LDFLAGS -framework QuickTime" | |
7455 | fi | |
ac0c4cc3 | 7456 | fi |
19b27e78 MW |
7457 | if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1 ; then |
7458 | LDFLAGS="$LDFLAGS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices" | |
7459 | fi | |
3a922bb4 | 7460 | |
2b5f62a0 VZ |
7461 | LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS" |
7462 | ||
e90c1d2a | 7463 | if test "$wxUSE_GUI" = "yes"; then |
3d63bc3a | 7464 | |
3a922bb4 RL |
7465 | dnl TODO add checks that these samples will really compile (i.e. all the |
7466 | dnl library features they need are present) | |
7467 | ||
8bce5cda MW |
7468 | dnl TODO some samples are never built so far: mfc (requires VC++) |
7469 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs drawing \ | |
7470 | dynamic erase event exec font image minimal mobile \ | |
7471 | mobile/wxedit mobile/styles propsize render \ | |
9e39d889 | 7472 | rotate shaped vscroll widgets" |
b625909c VS |
7473 | |
7474 | if test "$wxUSE_MONOLITHIC" != "yes"; then | |
7475 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS console" | |
7476 | fi | |
0b78747f | 7477 | if test "$TOOLKIT" = "MSW"; then |
8bce5cda MW |
7478 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS regtest" |
7479 | if test "$wxUSE_UNIVERSAL" != "yes"; then | |
7480 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ownerdrw nativdlg" | |
7481 | fi | |
7482 | fi | |
7483 | if test "$TOOLKIT" = "PM" -a "$wxUSE_UNIVERSAL" != "yes"; then | |
7484 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ownerdrw" | |
0b78747f | 7485 | fi |
3a922bb4 RL |
7486 | else |
7487 | SAMPLES_SUBDIRS="console" | |
e90c1d2a | 7488 | fi |
9a98a854 | 7489 | |
8e877c19 | 7490 | |
77ffb593 | 7491 | dnl C/C++ compiler options used to compile wxWidgets |
17a1ebd1 VZ |
7492 | dnl |
7493 | dnl check for icc before gcc as icc is also recognized as gcc | |
48f625bc | 7494 | if test "x$INTELCC" = "xyes" ; then |
17a1ebd1 VZ |
7495 | dnl Warnings which can't be easily suppressed in C code are disabled: |
7496 | dnl | |
7497 | dnl remark #810: conversion from "x" to "y" may lose significant bits | |
7498 | dnl remark #869: parameter "foo" was never referenced | |
7499 | dnl remark #1572: floating-point equality and inequality comparisons | |
7500 | dnl are unreliable | |
7501 | dnl remark #1684: conversion from pointer to same-sized integral type | |
7502 | dnl | |
7503 | dnl (for others see below) | |
7504 | CWARNINGS="-Wall -wd810,869,981,1418,1572,1684" | |
7505 | elif test "$GCC" = yes ; then | |
6ebeb4c7 | 7506 | CWARNINGS="-Wall -Wundef" |
17a1ebd1 VZ |
7507 | fi |
7508 | ||
48f625bc | 7509 | if test "x$INTELCXX" = "xyes" ; then |
17a1ebd1 VZ |
7510 | dnl Intel compiler gives some warnings which simply can't be worked |
7511 | dnl around or of which we have too many (810, 869) so it's impractical to | |
7512 | dnl keep them enabled even if in theory it would be nice and some others | |
7513 | dnl (279) are generated for standard macros and so there is nothing we can | |
7514 | dnl do about them | |
7515 | dnl | |
7516 | dnl remark #279: controlling expression is constant | |
7517 | dnl remark #383: value copied to temporary, reference to temporary used | |
7518 | dnl remark #444: destructor for base class "xxx" is not virtual | |
7519 | dnl remark #810: conversion from "x" to "y" may lose significant bits | |
7520 | dnl remark #869: parameter "foo" was never referenced | |
7521 | dnl remark #981: operands are evaluated in unspecified order | |
7522 | dnl remark #1418: external definition with no prior declaration | |
7523 | dnl remark #1419: external declaration in primary source file | |
7f47faf4 | 7524 | CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419" |
17a1ebd1 VZ |
7525 | elif test "$GXX" = yes ; then |
7526 | dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror" | |
5ff751d6 | 7527 | CXXWARNINGS="-Wall -Wundef -Wno-ctor-dtor-privacy" |
fddeb06b VS |
7528 | fi |
7529 | ||
fddeb06b | 7530 | |
5ff751d6 VZ |
7531 | dnl combine everything together and remove the extra white space while doing it |
7532 | WXCONFIG_CFLAGS=`echo $WXCONFIG_CFLAGS` | |
7533 | WXCONFIG_CXXFLAGS=`echo $WXCONFIG_CFLAGS $WXCONFIG_CXXFLAGS` | |
7534 | ||
7535 | ||
7536 | dnl add -I options we use during library compilation | |
7537 | dnl | |
7538 | dnl note that the order is somewhat important: wxWidgets headers should | |
7539 | dnl come first and the one with setup.h should be before $(top_srcdir)/include | |
7540 | dnl in case the latter contains setup.h used by non-autoconf makefiles (e.g. | |
7541 | dnl CodeWarrior): | |
c92ad099 | 7542 | CPPFLAGS=`echo $WXCONFIG_CPPFLAGS \ |
6589dc98 | 7543 | -I\\${wx_top_builddir}/lib/wx/include/${TOOLCHAIN_FULLNAME} \ |
c92ad099 VZ |
7544 | -I\\${top_srcdir}/include $TOOLKIT_INCLUDE \ |
7545 | $CPPFLAGS ` | |
5ff751d6 | 7546 | |
8aeeb05c | 7547 | C_AND_CXX_FLAGS="$DEBUG_CFLAGS $PROFILE_FLAGS $OPTIMISE_CFLAGS" |
c92ad099 | 7548 | CFLAGS=`echo $WXCONFIG_CFLAGS $CWARNINGS $C_AND_CXX_FLAGS $CFLAGS ` |
9cbac6d1 | 7549 | CXXFLAGS=`echo $WXCONFIG_CXXFLAGS $CXXWARNINGS $C_AND_CXX_FLAGS $CXXFLAGS ` |
5ff751d6 VZ |
7550 | |
7551 | dnl now that we added WXCONFIG_CPPFLAGS to CPPFLAGS we can add the wx-config | |
7552 | dnl only stuff to it | |
7553 | WXCONFIG_CPPFLAGS=`echo $WXCONFIG_CPPFLAGS $WXCONFIG_ONLY_CPPFLAGS` | |
7554 | ||
6ebeb4c7 | 7555 | |
95986553 DE |
7556 | if test "x$MWCC" = "xyes"; then |
7557 | dnl Correct MW 8.3 to be more similar to GCC. In particular we | |
7558 | dnl must use <regex.h> from system not our local copy on OS X, | |
7559 | dnl but must use local not system on OS 9. | |
7560 | dnl The following should make all -I paths usable for <> includes | |
7561 | dnl while first checking in real system paths. With 8.3 using | |
7562 | dnl -gccincludes it will actually check local paths before system | |
7563 | dnl even for <> which is totally wrong. | |
7564 | ||
7565 | dnl Note that because this absolutely needs to be before any -I | |
7566 | dnl that we have to tack it on to the end of the compiler commandline. | |
7567 | CC="$CC -cwd source -I-" | |
7568 | CXX="$CXX -cwd source -I-" | |
7569 | fi | |
7570 | ||
fddeb06b | 7571 | |
0c3c69fc | 7572 | LIBS=`echo $LIBS` |
c74dc163 | 7573 | EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS" |
672abd7a | 7574 | EXTRALIBS_XML="$EXPAT_LINK" |
3527f29c | 7575 | EXTRALIBS_HTML="$MSPACK_LINK" |
bb41dcbe | 7576 | EXTRALIBS_ODBC="$ODBC_LINK" |
c74dc163 | 7577 | if test "$wxUSE_GUI" = "yes"; then |
2b850ae1 | 7578 | EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $WEBKIT_LINK $EXTRALIBS_HILDON $EXTRALIBS_GNOMEVFS $EXTRALIBS_GNOMEPRINT` |
c74dc163 | 7579 | fi |
34b08d2c VS |
7580 | if test "$wxUSE_OPENGL" = "yes"; then |
7581 | EXTRALIBS_OPENGL="$LDFLAGS_GL $OPENGL_LIBS" | |
7582 | fi | |
fddeb06b | 7583 | |
8aeeb05c | 7584 | LDFLAGS="$LDFLAGS $PROFILE_FLAGS" |
f6bcfd97 | 7585 | |
5ff751d6 | 7586 | WXCONFIG_LIBS="$LIBS" |
67c13b6c VS |
7587 | |
7588 | dnl wx-config must output builtin 3rd party libs in --libs in static build: | |
7589 | if test "$wxUSE_REGEX" = "builtin" ; then | |
74802184 | 7590 | wxconfig_3rdparty="regex${lib_unicode_suffix} $wxconfig_3rdparty" |
67c13b6c VS |
7591 | fi |
7592 | if test "$wxUSE_EXPAT" = "builtin" ; then | |
74802184 | 7593 | wxconfig_3rdparty="expat $wxconfig_3rdparty" |
67c13b6c VS |
7594 | fi |
7595 | if test "$wxUSE_ODBC" = "builtin" ; then | |
74802184 | 7596 | wxconfig_3rdparty="odbc $wxconfig_3rdparty" |
67c13b6c VS |
7597 | fi |
7598 | if test "$wxUSE_LIBTIFF" = "builtin" ; then | |
74802184 | 7599 | wxconfig_3rdparty="tiff $wxconfig_3rdparty" |
67c13b6c VS |
7600 | fi |
7601 | if test "$wxUSE_LIBJPEG" = "builtin" ; then | |
74802184 | 7602 | wxconfig_3rdparty="jpeg $wxconfig_3rdparty" |
67c13b6c VS |
7603 | fi |
7604 | if test "$wxUSE_LIBPNG" = "builtin" ; then | |
74802184 | 7605 | wxconfig_3rdparty="png $wxconfig_3rdparty" |
67c13b6c VS |
7606 | fi |
7607 | if test "$wxUSE_ZLIB" = "builtin" ; then | |
74802184 | 7608 | wxconfig_3rdparty="zlib $wxconfig_3rdparty" |
bb41dcbe | 7609 | fi |
67c13b6c VS |
7610 | |
7611 | for i in $wxconfig_3rdparty ; do | |
5ff751d6 | 7612 | WXCONFIG_LIBS="-lwx${i}${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX} $WXCONFIG_LIBS" |
67c13b6c VS |
7613 | done |
7614 | ||
7615 | ||
fe0895cf VS |
7616 | if test "x$wxUSE_UNIVERSAL" = "xyes" ; then |
7617 | WXUNIV=1 | |
4353a8df VZ |
7618 | |
7619 | case "$wxUNIV_THEMES" in | |
7620 | ''|all) | |
7621 | AC_DEFINE(wxUSE_ALL_THEMES) | |
7622 | ;; | |
7623 | ||
7624 | *) | |
7625 | for t in `echo $wxUNIV_THEMES | tr , ' ' | tr a-z A-Z`; do | |
7626 | AC_DEFINE_UNQUOTED(wxUSE_THEME_$t) | |
7627 | done | |
7628 | esac | |
fe0895cf VS |
7629 | else |
7630 | WXUNIV=0 | |
7631 | fi | |
7632 | ||
7633 | AC_SUBST(wxUSE_ZLIB) | |
7634 | AC_SUBST(wxUSE_REGEX) | |
672abd7a | 7635 | AC_SUBST(wxUSE_EXPAT) |
fe0895cf VS |
7636 | AC_SUBST(wxUSE_ODBC) |
7637 | AC_SUBST(wxUSE_LIBJPEG) | |
7638 | AC_SUBST(wxUSE_LIBPNG) | |
7639 | AC_SUBST(wxUSE_LIBTIFF) | |
7640 | ||
08b3ac36 VS |
7641 | if test $wxUSE_MONOLITHIC = "yes" ; then |
7642 | MONOLITHIC=1 | |
7643 | else | |
7644 | MONOLITHIC=0 | |
7645 | fi | |
fe0895cf | 7646 | |
f93ca9fd VS |
7647 | if test $wxUSE_PLUGINS = "yes" ; then |
7648 | USE_PLUGINS=1 | |
7649 | else | |
7650 | USE_PLUGINS=0 | |
7651 | fi | |
7652 | ||
bb41dcbe VS |
7653 | if test $wxUSE_ODBC != "no" ; then |
7654 | USE_ODBC=1 | |
7655 | else | |
7656 | USE_ODBC=0 | |
7657 | fi | |
7658 | ||
16358932 VZ |
7659 | if test "$wxUSE_DEBUGREPORT" = "yes" ; then |
7660 | USE_QA=1 | |
7661 | else | |
7662 | USE_QA=0 | |
7663 | fi | |
7664 | ||
029b47ad VS |
7665 | if test $wxUSE_OFFICIAL_BUILD = "yes" ; then |
7666 | OFFICIAL_BUILD=1 | |
7667 | else | |
7668 | OFFICIAL_BUILD=0 | |
7669 | fi | |
7670 | ||
8ee2dd05 VS |
7671 | AC_SUBST(VENDOR) |
7672 | AC_SUBST(OFFICIAL_BUILD) | |
ceec2216 RL |
7673 | AC_SUBST(WX_FLAVOUR) |
7674 | AC_SUBST(WX_LIB_FLAVOUR) | |
8ee2dd05 | 7675 | |
fe0895cf VS |
7676 | AC_SUBST(WXUNIV) |
7677 | AC_SUBST(MONOLITHIC) | |
f93ca9fd | 7678 | AC_SUBST(USE_PLUGINS) |
cf615ebb | 7679 | AC_SUBST(LIBS) |
fe0895cf | 7680 | AC_SUBST(EXTRALIBS) |
672abd7a | 7681 | AC_SUBST(EXTRALIBS_XML) |
3527f29c | 7682 | AC_SUBST(EXTRALIBS_HTML) |
bb41dcbe | 7683 | AC_SUBST(EXTRALIBS_ODBC) |
c74dc163 | 7684 | AC_SUBST(EXTRALIBS_GUI) |
34b08d2c | 7685 | AC_SUBST(EXTRALIBS_OPENGL) |
f93ca9fd VS |
7686 | AC_SUBST(EXTRALIBS_SDL) |
7687 | AC_SUBST(WITH_PLUGIN_SDL) | |
7c72311f | 7688 | AC_SUBST(EXTRALIBS_GNOMEPRINT) |
2b850ae1 | 7689 | AC_SUBST(EXTRALIBS_GNOMEVFS) |
3565d135 | 7690 | AC_SUBST(EXTRALIBS_HILDON) |
fe0895cf VS |
7691 | AC_SUBST(UNICODE) |
7692 | AC_SUBST(BUILD) | |
6c67131a VS |
7693 | AC_SUBST(DEBUG_INFO) |
7694 | AC_SUBST(DEBUG_FLAG) | |
aa961a51 | 7695 | TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr "[[A-Z]]" "[[a-z]]"` |
fe0895cf VS |
7696 | AC_SUBST(TOOLKIT_LOWERCASE) |
7697 | AC_SUBST(TOOLKIT_VERSION) | |
7698 | AC_SUBST(SAMPLES_RPATH_FLAG) | |
ef0add05 | 7699 | AC_SUBST(SAMPLES_RPATH_POSTLINK) |
ea66c762 | 7700 | AC_SUBST(HOST_SUFFIX) |
670ec357 VS |
7701 | AC_SUBST(CPPUNIT_CFLAGS) |
7702 | AC_SUBST(CPPUNIT_LIBS) | |
fe0895cf | 7703 | |
4d4ff94c VZ |
7704 | case "$TOOLKIT" in |
7705 | GTK) | |
c2e9ada4 | 7706 | TOOLKIT_DESC="GTK+" |
4d4ff94c | 7707 | if test "$WXGTK20" = 1; then |
c2e9ada4 VZ |
7708 | TOOLKIT_DESC="$TOOLKIT_DESC 2" |
7709 | if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then | |
7710 | TOOLKIT_EXTRA="$TOOLKIT_EXTRA gnomeprint"; | |
7711 | fi | |
7712 | if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then | |
7713 | TOOLKIT_EXTRA="$TOOLKIT_EXTRA gnomevfs" | |
7714 | fi | |
7715 | if test "$wxUSE_LIBHILDON" = "yes"; then | |
7716 | TOOLKIT_EXTRA="$TOOLKIT_EXTRA hildon" | |
7717 | fi | |
7718 | ||
7719 | if test "$TOOLKIT_EXTRA" != ""; then | |
7720 | TOOLKIT_DESC="$TOOLKIT_DESC with support for `echo $TOOLKIT_EXTRA | tr -s ' '`" | |
7721 | fi | |
4d4ff94c VZ |
7722 | fi |
7723 | ;; | |
7724 | ||
c2e9ada4 VZ |
7725 | ?*) |
7726 | TOOLKIT_DESC=$TOOLKIT_LOWERCASE | |
7727 | ;; | |
7728 | ||
4d4ff94c | 7729 | *) |
c2e9ada4 | 7730 | TOOLKIT_DESC="base only" |
4d4ff94c VZ |
7731 | ;; |
7732 | esac | |
7733 | ||
fb00f58d JS |
7734 | if test "$wxUSE_WINE" = "yes"; then |
7735 | BAKEFILE_FORCE_PLATFORM=win32 | |
7736 | fi | |
7737 | ||
7afc46ab | 7738 | dnl --------------------------------------------------------------------------- |
912c3932 | 7739 | dnl Add Universal binary support |
7afc46ab KO |
7740 | dnl Note we don't do this earlier because adding these cpp/ld flags could |
7741 | dnl cause configure tests to fail. | |
7742 | dnl --------------------------------------------------------------------------- | |
7743 | if test "$wxUSE_MAC" = 1 ; then | |
95768535 MW |
7744 | if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then |
7745 | dnl --enable-universal_binary uses a default SDK (currently 10.4u) | |
7746 | dnl --enable-universal_binary=SDK names a path to an SDK | |
7747 | if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then | |
7748 | OSX_UNIV_OPTS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" | |
912c3932 | 7749 | else |
95768535 MW |
7750 | dnl '' would mean universal with no SDK, which may be the case if |
7751 | dnl the compiler uses a sysroot by default | |
7752 | OSX_UNIV_OPTS=${wxUSE_UNIVERSAL_BINARY:+"-isysroot '$wxUSE_UNIVERSAL_BINARY'"} | |
7753 | fi | |
7754 | OSX_UNIV_OPTS="$OSX_UNIV_OPTS -arch ppc -arch i386" | |
7755 | CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS" | |
7756 | CFLAGS="$OSX_UNIV_OPTS $CFLAGS" | |
7757 | LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS" | |
7afc46ab KO |
7758 | bk_use_pch=no |
7759 | fi | |
7760 | # TODO: where do we add "-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" for libtool (static builds only)? | |
7761 | # The makefile currently uses AR and RANLIB, which libtool apparently supercedes. | |
7afc46ab KO |
7762 | fi |
7763 | ||
a81d5bb6 MW |
7764 | dnl gcc 3.4 has a pch bug which truncates wide character constants in headers. |
7765 | dnl Hopefully for a non-unicode build there aren't any wide constants in | |
7766 | dnl headers, but for a unicode build it's best to disable pch. | |
7767 | if test "$wxUSE_UNICODE" = yes -a "$GCC" = yes -a "$bk_use_pch" != no | |
7768 | then | |
7769 | AC_CACHE_CHECK( | |
7770 | [for gcc precompiled header bug], | |
7771 | [wx_cv_gcc_pch_bug], | |
7772 | [[ | |
6d952fd7 MW |
7773 | echo '#include <stdio.h> |
7774 | const wchar_t test_var[] = L"awidetest";' > conftest.h | |
7775 | ||
7776 | echo '#include "conftest.h" | |
7777 | int main() | |
7778 | { | |
be49c6ec | 7779 | printf("%ls", test_var); |
6d952fd7 MW |
7780 | return 0; |
7781 | }' > conftest.cpp | |
7782 | ||
7783 | wx_cv_gcc_pch_bug="pch not supported" | |
a81d5bb6 | 7784 | |
b2983f42 | 7785 | if $CXX conftest.h >/dev/null 2>&1 |
a81d5bb6 | 7786 | then |
6d952fd7 | 7787 | wx_cv_gcc_pch_bug= |
a81d5bb6 | 7788 | |
6c7f5e56 | 7789 | if $CXX -o conftest$PROGRAM_EXT conftest.cpp >/dev/null 2>&1 |
a81d5bb6 | 7790 | then |
6c7f5e56 MW |
7791 | if tr -dc '[a-z]' < conftest$PROGRAM_EXT | |
7792 | grep awidetest >/dev/null | |
6d952fd7 MW |
7793 | then |
7794 | wx_cv_gcc_pch_bug=no | |
7795 | else | |
a81d5bb6 | 7796 | wx_cv_gcc_pch_bug=yes |
6d952fd7 | 7797 | fi |
a81d5bb6 MW |
7798 | fi |
7799 | fi | |
7800 | ||
6c7f5e56 | 7801 | rm -f conftest.h conftest.gch conftest.cpp conftest$PROGRAM_EXT |
a81d5bb6 MW |
7802 | ]]) |
7803 | ||
7804 | if test "$wx_cv_gcc_pch_bug" = yes; then | |
7805 | dnl make the default for pch 'no' | |
7806 | dnl further below check whether the user overrode and warn them | |
7807 | bk_use_pch=no | |
7808 | fi | |
7809 | fi | |
7810 | ||
564872cf | 7811 | AC_BAKEFILE([m4_include(autoconf_inc.m4)]) |
fe0895cf | 7812 | |
a81d5bb6 MW |
7813 | dnl find out if the compiler supports PCH |
7814 | dnl | |
7815 | dnl TODO: this should be in bakefile | |
7816 | if test $GCC_PCH = 1 | |
7817 | then | |
7818 | if test "$wx_cv_gcc_pch_bug" = yes; then | |
7819 | AC_MSG_WARN([*** Precompiled header support is broken on this compiler]) | |
7820 | AC_MSG_WARN([*** --enable-precomp-headers is not recommended]) | |
7821 | AC_MSG_WARN([*** see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13361]) | |
7822 | fi | |
7823 | ||
7824 | CPPFLAGS="-DWX_PRECOMP $CPPFLAGS" | |
7825 | fi | |
7826 | ||
912c3932 | 7827 | dnl HACK ALERT!! |
7afc46ab KO |
7828 | dnl For now, we need to alter bk-deps not to generate deps |
7829 | dnl when we've configured a Universal binary build. | |
7830 | dnl The next version of Bakefile will have the correct fix for this | |
7831 | dnl at which time, this hack can be removed. | |
7832 | ||
7833 | if test "$wxUSE_MAC" = 1 ; then | |
95768535 | 7834 | if test "x$wxUSE_UNIVERSAL_BINARY" != "xno" ; then |
7afc46ab KO |
7835 | sed "s/DEPSMODE=gcc/DEPSMODE=none/" < bk-deps > temp |
7836 | mv temp bk-deps | |
7837 | chmod +x bk-deps | |
7838 | fi | |
7839 | fi | |
7840 | ||
ceec2216 RL |
7841 | if test "$wxUSE_SHARED" = "yes"; then |
7842 | ||
7843 | dnl We get the shared build linker from bakefile, since it | |
7844 | dnl moved all the logic for this out of this file and into | |
7845 | dnl its own macro. But it can't decide on whether to return | |
7846 | dnl us $(VAR), ${VAR}, or the present expansion of VAR. | |
7847 | dnl So normalise and expand everything here now, because its | |
7848 | dnl not going to change inside wx-config anyway. | |
7849 | sanitised_bakefile_mess=`echo "$SHARED_LD_CXX" | tr -d '()'` | |
7850 | EXE_LINKER=`eval echo "$sanitised_bakefile_mess"` | |
7851 | ||
73213bc3 SN |
7852 | dnl Need addtional flag on OS/2, so override bakefiles value |
7853 | dnl (there currently is no suitable variable to which the | |
7854 | dnl missing flags could be added, AFAICS. SN, 18.12.2004. ) | |
7855 | case "${host}" in | |
7856 | *-pc-os2_emx | *-pc-os2-emx ) | |
7857 | SHARED_LD_CC="`pwd`/dllar.sh -name-mangler-script ./dllnames.sh -libf INITINSTANCE -libf TERMINSTANCE -o" | |
7858 | SHARED_LD_CXX="`pwd`/dllar.sh -name-mangler-script ./dllnames.sh -libf INITINSTANCE -libf TERMINSTANCE -o" | |
1e613d22 VZ |
7859 | cp -p ${srcdir}/src/os2/dllnames.sh . |
7860 | cp -p ${srcdir}/src/os2/dllar.sh . | |
73213bc3 SN |
7861 | ;; |
7862 | esac | |
ceec2216 RL |
7863 | else |
7864 | ||
7865 | dnl No bakefile support for static builds, but this should be ok for most. | |
7866 | EXE_LINKER="$CXX -o" | |
7867 | ||
7868 | fi | |
f47af52b SN |
7869 | if test "$wxUSE_OMF" = "yes"; then |
7870 | case "${host}" in | |
7871 | *-pc-os2_emx | *-pc-os2-emx ) | |
7872 | LDFLAGS="$LDFLAGS -Zlinker /EXEPACK" | |
7873 | LDFLAGS_GUI="-Zlinker /PMTYPE:PM" | |
7874 | WXCONFIG_LDFLAGS_GUI="-Zlinker /PMTYPE:PM" | |
7875 | ;; | |
7876 | esac | |
7877 | fi | |
88e30f2b | 7878 | |
5ff751d6 VZ |
7879 | dnl TOOLCHAIN_DEFS should be used for both wx and client code |
7880 | WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS $TOOLCHAIN_DEFS" | |
e694c22c | 7881 | |
70d1b3cf VZ |
7882 | dnl for convenience, sort the samples in alphabetical order |
7883 | dnl | |
7884 | dnl FIXME For some mysterious reasons, sometimes the directories are duplicated | |
7885 | dnl in this list - hence uniq. But normally, this shouldn't be needed! | |
d6a55c4b VZ |
7886 | dnl |
7887 | dnl Unfortunately, there is a bug in OS/2's tr, such that | |
d51e8205 SN |
7888 | dnl tr ' ' '\n' introduces DOS-like line breaks, whereas tr '\n' ' ' |
7889 | dnl only removes the Unix-like part of the introduced line break. | |
7890 | SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq | tr '\n' ' '| tr -d '\r'`" | |
7891 | ||
ceec2216 RL |
7892 | dnl subtle bakefile goop. |
7893 | dnl Used in wx-config now too, as its STATIC_FLAG with different makeup. | |
7894 | dnl I wish we would have called it something less likely to clash with | |
7895 | dnl things though. | |
7896 | AC_SUBST(SHARED) | |
70d1b3cf | 7897 | |
9a98a854 | 7898 | dnl global options |
cf615ebb VS |
7899 | AC_SUBST(WX_LIBRARY_BASENAME_NOGUI) |
7900 | AC_SUBST(WX_LIBRARY_BASENAME_GUI) | |
2bffed64 | 7901 | |
9a98a854 | 7902 | dnl toolkit options |
dad6c0ea VZ |
7903 | AC_SUBST(USE_GUI) |
7904 | AC_SUBST(AFMINSTALL) | |
2b5f62a0 | 7905 | AC_SUBST(WIN32INSTALL) |
9a98a854 | 7906 | AC_SUBST(TOOLKIT) |
9a98a854 | 7907 | AC_SUBST(TOOLKIT_DIR) |
3a922bb4 | 7908 | AC_SUBST(TOOLCHAIN_NAME) |
ceec2216 | 7909 | AC_SUBST(TOOLCHAIN_FULLNAME) |
3a922bb4 RL |
7910 | |
7911 | dnl wx-config options | |
77e13408 | 7912 | AC_SUBST(host_alias) |
3a922bb4 | 7913 | AC_SUBST(cross_compiling) |
ceec2216 RL |
7914 | AC_SUBST(WIDGET_SET) |
7915 | AC_SUBST(WX_RELEASE) | |
7916 | AC_SUBST(WX_VERSION) | |
7917 | AC_SUBST(WX_SUBVERSION) | |
7918 | AC_SUBST(WX_CHARTYPE) | |
7919 | AC_SUBST(WX_DEBUGTYPE) | |
5ff751d6 VZ |
7920 | |
7921 | dnl note that in addition to the usual CPP/C/CXXFLAGS which are used for | |
7922 | dnl building the library itself, we also have WXCONFIG_-prefixed variants which | |
7923 | dnl are used when building the libraries using the library | |
7924 | dnl | |
7925 | dnl so put anything which should be used only during the library build in, e.g. | |
7926 | dnl CXXFLAGS, but put everything else (by default) into WXCONFIG_CXXFLAGS | |
7927 | dnl | |
7928 | dnl and, finally, for some things which should be only used by wx-config but | |
7929 | dnl not during the library compilation, use WXCONFIG_ONLY_CPPFLAGS which is | |
7930 | dnl added to WXCONFIG_CPPFLAGS after adding the latter to CPPFLAGS | |
7931 | AC_SUBST(WXCONFIG_CPPFLAGS) | |
7932 | AC_SUBST(WXCONFIG_CFLAGS) | |
7933 | AC_SUBST(WXCONFIG_CXXFLAGS) | |
7934 | ||
7935 | AC_SUBST(WXCONFIG_LIBS) | |
3bd8fb5f | 7936 | AC_SUBST(WXCONFIG_RPATH) |
ffef10f6 | 7937 | AC_SUBST(WXCONFIG_LDFLAGS_GUI) |
004ee6da | 7938 | AC_SUBST(WXCONFIG_RESFLAGS) |
ceec2216 | 7939 | AC_SUBST(EXE_LINKER) |
2224580a VZ |
7940 | |
7941 | dnl distribution vars | |
a4aad961 | 7942 | AC_SUBST(GUIDIST) |
2224580a | 7943 | AC_SUBST(DISTDIR) |
073478b3 | 7944 | |
9a98a854 | 7945 | dnl additional subdirectories where we will build |
9a98a854 | 7946 | AC_SUBST(SAMPLES_SUBDIRS) |
9a98a854 | 7947 | |
e694c22c VZ |
7948 | dnl additional libraries and linker settings |
7949 | AC_SUBST(LDFLAGS) | |
62d0491b | 7950 | AC_SUBST(LDFLAGS_GL) |
f6bcfd97 | 7951 | AC_SUBST(OPENGL_LIBS) |
3d63bc3a | 7952 | AC_SUBST(DMALLOC_LIBS) |
2b5f62a0 | 7953 | AC_SUBST(WX_VERSION_TAG) |
9a98a854 | 7954 | |
32832908 | 7955 | dnl additional resurces settings |
004ee6da | 7956 | AC_SUBST(RESCOMP) |
891ace05 DE |
7957 | AC_SUBST(WINDRES) |
7958 | AC_SUBST(REZ) | |
32832908 | 7959 | AC_SUBST(RESFLAGS) |
3a922bb4 | 7960 | AC_SUBST(RESPROGRAMOBJ) |
e95edd8d GD |
7961 | AC_SUBST(WX_RESOURCES_MACOSX_ASCII) |
7962 | AC_SUBST(WX_RESOURCES_MACOSX_DATA) | |
3a922bb4 | 7963 | |
2f51a9ec | 7964 | dnl additional for Mac OS X |
2f51a9ec | 7965 | AC_SUBST(DEREZ) |
2f51a9ec | 7966 | AC_SUBST(LIBWXMACRES) |
891ace05 | 7967 | AC_SUBST(POSTLINK_COMMAND) |
36825681 | 7968 | AC_SUBST(MACSETFILE) |
32832908 | 7969 | |
2b5f62a0 VZ |
7970 | dnl other tools |
7971 | AC_SUBST(GCC) | |
32832908 | 7972 | AC_SUBST(DLLTOOL) |
885d4bf5 | 7973 | |
e6cc62c6 | 7974 | |
9a98a854 | 7975 | dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE |
156b2523 | 7976 | dnl itself (this macro is required if SUBDIRS variable is used in Makefile.am |
9a98a854 VZ |
7977 | dnl - and we do use it) |
7978 | AC_PROG_MAKE_SET | |
7979 | ||
014e19de | 7980 | |
ceec2216 | 7981 | AC_CONFIG_HEADERS([lib/wx/include/${TOOLCHAIN_FULLNAME}/wx/setup.h:setup.h.in]) |
2aa88730 | 7982 | |
c8d58531 MW |
7983 | if test "$USE_WIN32" = 1; then |
7984 | AC_CONFIG_COMMANDS( | |
7985 | [ | |
7986 | rcdefs.h | |
7987 | ], | |
7988 | [ | |
7989 | mkdir -p $outdir && | |
7990 | $CPP $infile | sed 's/^# *[1-9].*//;s/^ *//;/./,/^$/!d' > $outdir/rcdefs.h | |
7991 | ], | |
7992 | [ | |
7993 | CPP="$CPP" | |
7994 | infile="$srcdir/include/wx/msw/genrcdefs.h" | |
7995 | outdir="lib/wx/include/$TOOLCHAIN_FULLNAME/wx/msw" | |
7996 | ] | |
7997 | ) | |
7998 | fi | |
7999 | ||
ceec2216 RL |
8000 | AC_CONFIG_FILES([ lib/wx/config/${TOOLCHAIN_FULLNAME}:wx-config.in ], |
8001 | [ chmod +x lib/wx/config/${TOOLCHAIN_FULLNAME} ], | |
8002 | [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ]) | |
e6cc62c6 | 8003 | |
ceec2216 RL |
8004 | AC_CONFIG_FILES([ lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace.in ], |
8005 | [ chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ], | |
8006 | [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ]) | |
8007 | ||
2dbd07cb VZ |
8008 | if test "$wx_cv_version_script" = "yes"; then |
8009 | AC_CONFIG_FILES(version-script) | |
8010 | fi | |
8011 | AC_CONFIG_FILES(Makefile) | |
ceec2216 | 8012 | |
f9f75df7 | 8013 | AC_CONFIG_COMMANDS([wx-config], |
ceec2216 RL |
8014 | [ rm -f wx-config |
8015 | ${LN_S} lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} wx-config | |
8016 | ], | |
8017 | [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" | |
8018 | LN_S="${LN_S}" | |
8019 | ]) | |
9a98a854 | 8020 | |
0506bbbf RL |
8021 | dnl This would give us us build dir that in every significant way |
8022 | dnl resembles an installed wx in prefix=$builddir. It is troublesome | |
8023 | dnl though in this form because AC_CONFIG_LINKS will fail for directories | |
8024 | dnl on platforms that do not have symlinks. | |
8025 | dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR:include ]) | |
8026 | dnl AC_CONFIG_LINKS([ contrib/include ]) | |
9103d280 | 8027 | |
1c14217d | 8028 | if test "$wxWITH_SUBDIRS" != "no"; then |
08b3ac36 | 8029 | dnl Configure samples, contrib etc. directories, but only if they are present: |
6c3e36af VZ |
8030 | if test "$wxUSE_GUI" = "yes"; then |
8031 | SUBDIRS="samples demos utils contrib" | |
8032 | else dnl we build wxBase only | |
8033 | dnl there are no wxBase programs in contrib nor demos | |
8034 | SUBDIRS="samples utils" | |
8035 | fi | |
670ec357 | 8036 | dnl Add tests to the list of subdirs if cppunit 1.8.0+ is detected |
c2218763 | 8037 | AM_PATH_CPPUNIT(1.8.0, [SUBDIRS="$SUBDIRS tests"]) |
6c3e36af | 8038 | |
74d92aac VZ |
8039 | if test "$USE_UNIX" != "1" -a "$USE_WIN32" != "1"; then |
8040 | DISABLED_CONTRIB="$DISABLED_CONTRIB net" | |
8041 | fi | |
8042 | ||
166263e6 | 8043 | for subdir in `echo $SUBDIRS`; do |
08b3ac36 | 8044 | if test -d ${srcdir}/${subdir} ; then |
6c3e36af | 8045 | if test "$wxUSE_GUI" = "yes"; then |
166263e6 VZ |
8046 | if test ${subdir} = "samples"; then |
8047 | dnl only take those samples which compile in the current | |
8048 | dnl configuration and which exist | |
8772a1a7 | 8049 | makefiles="samples/Makefile.in $makefiles" |
166263e6 VZ |
8050 | for sample in `echo $SAMPLES_SUBDIRS`; do |
8051 | if test -d $srcdir/samples/$sample; then | |
8052 | makefiles="samples/$sample/Makefile.in $makefiles" | |
8053 | fi | |
8054 | done | |
9c112555 MW |
8055 | else |
8056 | dnl assume that everything compiles for utils &c | |
8057 | dnl any that shouldn't be built can be added to | |
8058 | dnl DISABLED_UTILS, DISABLED_CONTRIB or DISABLED_DEMOS | |
8059 | disabled_var=DISABLED_`echo $subdir | tr [[a-z]] [[A-Z]]`; | |
8060 | eval "disabled=\$$disabled_var" | |
8061 | disabled=/`echo X $disabled | sed 's@ @/|/@g'`/ | |
252a5022 | 8062 | makefiles=`(cd $srcdir ; find $subdir -name Makefile.in) | $EGREP -v "$disabled"` |
166263e6 | 8063 | fi |
6c3e36af VZ |
8064 | else dnl we build wxBase only |
8065 | dnl don't take all samples/utils, just those which build with | |
8066 | dnl wxBase | |
8067 | if test ${subdir} = "samples"; then | |
8772a1a7 | 8068 | makefiles="samples/Makefile.in samples/console/Makefile.in" |
670ec357 | 8069 | elif test ${subdir} = "utils"; then |
6537ccf8 VS |
8070 | makefiles="" |
8071 | for util in HelpGen tex2rtf ; do | |
8072 | if test -d $srcdir/utils/$util ; then | |
8073 | makefiles="utils/$util/Makefile.in \ | |
8074 | utils/$util/src/Makefile.in \ | |
8075 | $makefiles" | |
8076 | fi | |
8077 | done | |
670ec357 VS |
8078 | else dnl assume that everything compiles for tests |
8079 | makefiles=`(cd $srcdir ; find $subdir -name Makefile.in)` | |
6c3e36af VZ |
8080 | fi |
8081 | fi | |
8082 | ||
08b3ac36 VS |
8083 | for mkin in $makefiles ; do |
8084 | mk=`echo $mkin | sed 's/Makefile\.in/Makefile/g'` | |
8085 | AC_CONFIG_FILES([$mk]) | |
8086 | done | |
8087 | fi | |
8088 | done | |
1c14217d | 8089 | fi dnl wxWITH_SUBDIRS |
e6cc62c6 VS |
8090 | |
8091 | AC_OUTPUT | |
8092 | ||
4d4ff94c | 8093 | dnl report how we have been configured |
2b5f62a0 | 8094 | echo |
77ffb593 | 8095 | echo "Configured wxWidgets ${WX_VERSION} for \`${host}'" |
2b5f62a0 | 8096 | echo "" |
c2e9ada4 | 8097 | echo " Which GUI toolkit should wxWidgets use? ${TOOLKIT_DESC}" |
77ffb593 | 8098 | echo " Should wxWidgets be compiled into single library? ${wxUSE_MONOLITHIC:-yes}" |
2b5f62a0 | 8099 | |
77ffb593 JS |
8100 | echo " Should wxWidgets be compiled in debug mode? ${wxUSE_DEBUG:-no}" |
8101 | echo " Should wxWidgets be linked as a shared library? ${wxUSE_SHARED:-no}" | |
8102 | echo " Should wxWidgets be compiled in Unicode mode? ${wxUSE_UNICODE:-no}" | |
2b5f62a0 | 8103 | |
77ffb593 | 8104 | echo " What level of wxWidgets compatibility should be enabled?" |
dee1a63f MB |
8105 | echo " wxWidgets 2.4 ${WXWIN_COMPATIBILITY_2_4:-no}" |
8106 | echo " wxWidgets 2.6 ${WXWIN_COMPATIBILITY_2_6:-yes}" | |
0c98a14e | 8107 | |
77ffb593 | 8108 | echo " Which libraries should wxWidgets use?" |
2b5f62a0 VZ |
8109 | echo " jpeg ${wxUSE_LIBJPEG-none}" |
8110 | echo " png ${wxUSE_LIBPNG-none}" | |
8111 | echo " regex ${wxUSE_REGEX}" | |
8112 | echo " tiff ${wxUSE_LIBTIFF-none}" | |
89fe663f VZ |
8113 | if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then |
8114 | echo " xpm ${wxUSE_LIBXPM-none}" | |
8115 | fi | |
2b5f62a0 | 8116 | echo " zlib ${wxUSE_ZLIB}" |
fd3d7534 | 8117 | echo " odbc ${wxUSE_ODBC}" |
672abd7a | 8118 | echo " expat ${wxUSE_EXPAT}" |
3527f29c | 8119 | echo " libmspack ${wxUSE_LIBMSPACK}" |
f93ca9fd | 8120 | echo " sdl ${wxUSE_LIBSDL}" |
2b5f62a0 VZ |
8121 | |
8122 | echo "" | |
8123 | ||
8124 | dnl vi: set et sts=4 sw=4 com=\:dnl: |