]>
Commit | Line | Data |
---|---|---|
9a98a854 VZ |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | AC_REVISION($Id$)dnl | |
3 | ||
4 | dnl --------------------------------------------------------------------------- | |
5 | dnl | |
6 | dnl Top-level configure.in for wxWindows by Robert Roebling, Phil Blecker and | |
7 | dnl Vadim Zeitlin | |
8 | dnl | |
9 | dnl This script is under the wxWindows licence. | |
10 | dnl | |
11 | dnl Version: $Id$ | |
bcd2b961 | 12 | dnl --------------------------------------------------------------------------- |
9a98a854 VZ |
13 | |
14 | dnl --------------------------------------------------------------------------- | |
15 | dnl initialization | |
16 | dnl --------------------------------------------------------------------------- | |
17 | ||
18 | dnl the file passed to AC_INIT should be speicific to our package | |
19 | AC_INIT(wx-config.in) | |
20 | ||
21 | AC_CANONICAL_HOST | |
2b6f061f RR |
22 | |
23 | dnl When making releases do: | |
24 | dnl | |
25 | dnl WX_RELEASE_NUMBER += 1 | |
26 | dnl WX_INTERFACE_AGE += 1 | |
27 | dnl WX_BINARY_AGE += 1 | |
28 | dnl | |
29 | dnl if any functions have been added, do: | |
30 | dnl | |
31 | dnl WX_INTERFACE_AGE = 1 | |
9a98a854 VZ |
32 | |
33 | WX_MAJOR_VERSION_NUMBER=2 | |
34 | WX_MINOR_VERSION_NUMBER=1 | |
35 | WX_RELEASE_NUMBER=0 | |
36 | ||
2b6f061f RR |
37 | WX_INTERFACE_AGE=0 |
38 | WX_BINARY_AGE=0 | |
39 | ||
40 | WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER | |
41 | ||
42 | AM_INIT_AUTOMAKE(wxWindows, $WX_VERSION) | |
43 | ||
44 | dnl libtool versioning | |
45 | LT_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER | |
46 | LT_CURRENT=`expr $WX_RELEASE_NUMBER - $WX_INTERFACE_AGE` | |
47 | LT_REVISION=$WX_INTERFACE_AGE | |
48 | LT_AGE=`expr $WX_BINARY_AGE - $WX_INTERFACE_AGE` | |
49 | AC_SUBST(LT_RELEASE) | |
50 | AC_SUBST(LT_CURRENT) | |
51 | AC_SUBST(LT_REVISION) | |
52 | AC_SUBST(LT_AGE) | |
53 | ||
9a98a854 VZ |
54 | dnl FIXME this hack suppresses automake 1.4 warning about @LTLIBOBJS@ being |
55 | dnl never defined in configure.in (remove these lines to see what I'm | |
56 | dnl speaking about) - Tom Tromey <tromey@cygnus.com> told me that it will | |
57 | dnl be fixed in the next release. | |
58 | LIBOBJS= | |
bcd2b961 | 59 | LIBOBJS="$LIBOBJS ../common/extended.o" |
9a98a854 VZ |
60 | |
61 | dnl ------------------------------------------------------------------------ | |
62 | dnl Check platform (host system) | |
63 | dnl ------------------------------------------------------------------------ | |
64 | ||
65 | dnl assume Unix | |
66 | USE_UNIX=1 | |
67 | USE_LINUX= | |
68 | USE_SGI= | |
69 | USE_HPUX= | |
70 | USE_SYSV= | |
71 | USE_SVR4= | |
72 | USE_AIX= | |
73 | USE_SUN= | |
74 | USE_SOLARIS= | |
75 | USE_SUNOS= | |
76 | USE_ALPHA= | |
77 | USE_OSF= | |
78 | USE_BSD= | |
79 | USE_FREEBSD= | |
80 | USE_VMS= | |
81 | USE_ULTRIX= | |
82 | USE_CYGWIN= | |
83 | USE_MINGW32= | |
84 | USE_DATA_GENERAL= | |
85 | ||
86 | dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones | |
87 | dnl which are either yes or no | |
88 | DEFAULT_wxUSE_GTK=0 | |
89 | DEFAULT_wxUSE_MOTIF=0 | |
90 | DEFAULT_wxUSE_MSW=0 | |
91 | ||
92 | case "${host}" in | |
93 | *-hp-hpux* ) | |
94 | USE_HPUX=1 | |
95 | DEFAULT_wxUSE_MOTIF=1 | |
96 | AC_DEFINE(__HPUX__) | |
97 | ;; | |
98 | *-*-linux* ) | |
99 | USE_LINUX=1 | |
100 | AC_DEFINE(__LINUX__) | |
101 | TMP=`uname -m` | |
102 | if test "x$TMP" = "xalpha"; then | |
103 | USE_ALPHA=1 | |
104 | AC_DEFINE(__ALPHA__) | |
105 | fi | |
106 | DEFAULT_wxUSE_GTK=1 | |
107 | ;; | |
108 | *-*-irix5* | *-*-irix6* ) | |
109 | USE_SGI=1 | |
110 | USE_SVR4=1 | |
111 | AC_DEFINE(__SGI__) | |
112 | AC_DEFINE(__SVR4__) | |
113 | DEFAULT_wxUSE_MOTIF=1 | |
114 | ;; | |
115 | *-*-solaris2* ) | |
116 | USE_SUN=1 | |
117 | USE_SOLARIS=1 | |
118 | USE_SVR4=1 | |
119 | AC_DEFINE(__SUN__) | |
120 | AC_DEFINE(__SOLARIS__) | |
121 | AC_DEFINE(__SVR4__) | |
122 | DEFAULT_wxUSE_MOTIF=1 | |
123 | ;; | |
124 | *-*-sunos4* ) | |
125 | USE_SUN=1 | |
126 | USE_SUNOS=1 | |
127 | USE_BSD=1 | |
128 | AC_DEFINE(__SUN__) | |
129 | AC_DEFINE(__SUNOS__) | |
130 | AC_DEFINE(__BSD__) | |
131 | DEFAULT_wxUSE_MOTIF=1 | |
132 | ;; | |
133 | *-*-freebsd* | *-*-netbsd*) | |
134 | USE_BSD=1 | |
135 | USE_FREEBSD=1 | |
136 | AC_DEFINE(__FREEBSD__) | |
137 | AC_DEFINE(__BSD__) | |
138 | DEFAULT_wxUSE_GTK=1 | |
139 | ;; | |
140 | *-*-osf* ) | |
141 | USE_ALPHA=1 | |
142 | USE_OSF=1 | |
143 | AC_DEFINE(__ALPHA__) | |
144 | AC_DEFINE(__OSF__) | |
145 | DEFAULT_wxUSE_MOTIF=1 | |
146 | ;; | |
147 | *-*-dgux5* ) | |
148 | USE_ALPHA=1 | |
149 | USE_SVR4=1 | |
150 | AC_DEFINE(__ALPHA__) | |
151 | AC_DEFINE(__SVR4__) | |
152 | DEFAULT_wxUSE_MOTIF=1 | |
153 | ;; | |
154 | *-*-sysv5* ) | |
155 | USE_SYSV=1 | |
156 | USE_SVR4=1 | |
157 | AC_DEFINE(__SYSV__) | |
158 | AC_DEFINE(__SVR4__) | |
159 | DEFAULT_wxUSE_MOTIF=1 | |
160 | ;; | |
161 | *-*-aix* ) | |
162 | USE_AIX=1 | |
163 | USE_SYSV=1 | |
164 | USE_SVR4=1 | |
165 | AC_DEFINE(__AIX__) | |
166 | AC_DEFINE(__SYSV__) | |
167 | AC_DEFINE(__SVR4__) | |
168 | DEFAULT_wxUSE_MOTIF=1 | |
169 | ;; | |
170 | *) | |
171 | AC_MSG_ERROR(unknown system type $(host).) | |
172 | esac | |
173 | ||
174 | if test "$USE_UNIX" = 1 ; then | |
175 | wxUSE_UNIX=yes | |
176 | AC_DEFINE(__UNIX__) | |
09fbacf7 | 177 | EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../unix" |
bcd2b961 | 178 | SRC_SUBDIRS="$SRC_SUBDIRS unix" |
ff684c98 | 179 | INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS unix" |
9a98a854 VZ |
180 | fi |
181 | ||
182 | dnl Linux: test for libc5/glibc2: glibc2 has gettext() included | |
183 | if test "$USE_LINUX" = 1; then | |
184 | AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2)) | |
185 | fi | |
186 | ||
187 | dnl TODO cross-compiling for Windows not yet supported | |
188 | AC_DEFINE(__UNIX__) | |
189 | ||
190 | dnl if eval "test $USE_CYGWIN != 1 -a $USE_MINGW32 != 1"; then | |
191 | dnl AC_DEFINE(__UNIX__) | |
192 | dnl else | |
193 | dnl AC_DEFINE(__WINDOWS__) | |
194 | dnl DEFAULT_wxUSE_MSW=1 | |
195 | dnl fi | |
196 | ||
197 | dnl --------------------------------------------------------------------------- | |
198 | dnl command line options for configure | |
199 | dnl --------------------------------------------------------------------------- | |
200 | ||
201 | dnl the default values for all options - we collect them all here to simplify | |
202 | dnl modification of the default values (for example, if the defaults for some | |
203 | dnl platform should be changed, it can be done here too) | |
204 | dnl | |
205 | dnl NB: see also DEFAULT_wxUSE<toolkit> variables defined above | |
206 | ||
207 | dnl useful to test the compilation with minimum options, define as 0 for normal | |
208 | dnl usage | |
209 | DEBUG_CONFIGURE=0 | |
210 | if test $DEBUG_CONFIGURE = 1; then | |
211 | DEFAULT_wxUSE_THREADS=yes | |
212 | ||
213 | DEFAULT_wxUSE_OPTIMISE=no | |
214 | DEFAULT_wxUSE_PROFILE=no | |
215 | DEFAULT_wxUSE_DEBUG_FLAG=yes | |
216 | DEFAULT_wxUSE_DEBUG_INFO=yes | |
217 | DEFAULT_wxUSE_DEBUG_GDB=yes | |
218 | DEFAULT_wxUSE_MEM_TRACING=no | |
219 | DEFAULT_wxUSE_DMALLOC=no | |
220 | DEFAULT_wxUSE_APPLE_IEEE=no | |
221 | ||
222 | DEFAULT_wxUSE_LOG=yes | |
223 | ||
224 | DEFAULT_wxUSE_GUI=yes | |
225 | ||
226 | DEFAULT_wxUSE_ZLIB=no | |
227 | DEFAULT_wxUSE_LIBPNG=no | |
228 | DEFAULT_wxUSE_LIBGIF=no | |
229 | DEFAULT_wxUSE_LIBJPEG=no | |
230 | DEFAULT_wxUSE_ODBC=no | |
231 | ||
232 | DEFAULT_wxUSE_FILE=no | |
233 | DEFAULT_wxUSE_TEXTFILE=no | |
234 | DEFAULT_wxUSE_TIMEDATE=no | |
235 | DEFAULT_wxUSE_INTL=no | |
236 | DEFAULT_wxUSE_CONFIG=no | |
237 | DEFAULT_wxUSE_STREAMS=no | |
238 | DEFAULT_wxUSE_SOCKETS=no | |
239 | DEFAULT_wxUSE_SERIAL=no | |
240 | DEFAULT_wxUSE_JOYSTICK=no | |
241 | DEFAULT_wxUSE_DYNLIB_CLASS=no | |
242 | DEFAULT_wxUSE_LONGLONG=no | |
243 | ||
244 | DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=no | |
245 | DEFAULT_wxUSE_NORMALIZED_PS_FONTS=no | |
246 | DEFAULT_wxUSE_POSTSCRIPT=no | |
247 | ||
248 | DEFAULT_wxUSE_X_RESOURCES=no | |
249 | DEFAULT_wxUSE_CLIPBOARD=no | |
250 | DEFAULT_wxUSE_TOOLTIPS=no | |
251 | DEFAULT_wxUSE_DRAG_AND_DROP=no | |
252 | DEFAULT_wxUSE_SPLINES=no | |
253 | ||
254 | DEFAULT_wxUSE_MDI_ARCHITECTURE=no | |
255 | DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=no | |
256 | DEFAULT_wxUSE_PRINTING_ARCHITECTURE=no | |
257 | ||
258 | DEFAULT_wxUSE_PROLOGIO=no | |
259 | DEFAULT_wxUSE_RESOURCES=no | |
260 | DEFAULT_wxUSE_CONSTRAINTS=no | |
261 | DEFAULT_wxUSE_IPC=no | |
262 | DEFAULT_wxUSE_HELP=no | |
263 | DEFAULT_wxUSE_WXTREE=no | |
264 | DEFAULT_wxUSE_METAFILE=no | |
265 | ||
266 | DEFAULT_wxUSE_COMMONDLGS=no | |
267 | DEFAULT_wxUSE_MINIFRAME=no | |
268 | DEFAULT_wxUSE_VALIDATORS=yes | |
269 | ||
270 | DEFAULT_wxUSE_ACCEL=no | |
271 | DEFAULT_wxUSE_CARET=no | |
272 | DEFAULT_wxUSE_BMPBUTTON=no | |
273 | DEFAULT_wxUSE_CHECKBOX=no | |
274 | DEFAULT_wxUSE_CHECKLST=no | |
275 | DEFAULT_wxUSE_COMBOBOX=no | |
276 | DEFAULT_wxUSE_GAUGE=no | |
277 | DEFAULT_wxUSE_GRID=no | |
278 | DEFAULT_wxUSE_IMAGLIST=no | |
279 | DEFAULT_wxUSE_LISTBOX=no | |
280 | DEFAULT_wxUSE_LISTCTRL=no | |
281 | DEFAULT_wxUSE_NOTEBOOK=no | |
282 | DEFAULT_wxUSE_RADIOBOX=no | |
283 | DEFAULT_wxUSE_RADIOBTN=no | |
e602002e | 284 | DEFAULT_wxUSE_SASH=no |
9a98a854 VZ |
285 | DEFAULT_wxUSE_SCROLLBAR=no |
286 | DEFAULT_wxUSE_SLIDER=no | |
287 | DEFAULT_wxUSE_SPINBTN=no | |
288 | DEFAULT_wxUSE_SPLITTER=no | |
289 | DEFAULT_wxUSE_STATBMP=no | |
290 | DEFAULT_wxUSE_STATBOX=no | |
291 | DEFAULT_wxUSE_STATLINE=no | |
292 | DEFAULT_wxUSE_STATUSBAR=yes | |
293 | DEFAULT_wxUSE_TABDIALOG=no | |
294 | DEFAULT_wxUSE_TOOLBAR=no | |
295 | DEFAULT_wxUSE_TREECTRL=no | |
296 | ||
297 | DEFAULT_wxUSE_UNICODE=no | |
298 | DEFAULT_wxUSE_WCSRTOMBS=no | |
299 | else | |
300 | DEFAULT_wxUSE_THREADS=yes | |
301 | ||
302 | DEFAULT_wxUSE_OPTIMISE=yes | |
303 | DEFAULT_wxUSE_PROFILE=no | |
304 | DEFAULT_wxUSE_DEBUG_FLAG=no | |
305 | DEFAULT_wxUSE_DEBUG_INFO=no | |
306 | DEFAULT_wxUSE_DEBUG_GDB=no | |
307 | DEFAULT_wxUSE_MEM_TRACING=no | |
308 | DEFAULT_wxUSE_DMALLOC=no | |
309 | DEFAULT_wxUSE_APPLE_IEEE=yes | |
310 | ||
311 | DEFAULT_wxUSE_LOG=yes | |
312 | ||
313 | DEFAULT_wxUSE_GUI=yes | |
314 | ||
315 | DEFAULT_wxUSE_ZLIB=yes | |
316 | DEFAULT_wxUSE_LIBPNG=yes | |
317 | DEFAULT_wxUSE_LIBGIF=yes | |
318 | DEFAULT_wxUSE_LIBJPEG=yes | |
319 | DEFAULT_wxUSE_ODBC=no | |
320 | ||
321 | DEFAULT_wxUSE_FILE=yes | |
322 | DEFAULT_wxUSE_TEXTFILE=yes | |
323 | DEFAULT_wxUSE_TIMEDATE=yes | |
324 | DEFAULT_wxUSE_INTL=yes | |
325 | DEFAULT_wxUSE_CONFIG=yes | |
326 | DEFAULT_wxUSE_STREAMS=yes | |
327 | DEFAULT_wxUSE_SOCKETS=yes | |
328 | DEFAULT_wxUSE_SERIAL=yes | |
329 | DEFAULT_wxUSE_JOYSTICK=yes | |
330 | DEFAULT_wxUSE_DYNLIB_CLASS=yes | |
331 | DEFAULT_wxUSE_LONGLONG=no | |
332 | ||
333 | DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=yes | |
334 | DEFAULT_wxUSE_NORMALIZED_PS_FONTS=yes | |
335 | DEFAULT_wxUSE_POSTSCRIPT=yes | |
336 | ||
337 | DEFAULT_wxUSE_X_RESOURCES=no | |
338 | DEFAULT_wxUSE_CLIPBOARD=yes | |
339 | DEFAULT_wxUSE_TOOLTIPS=yes | |
340 | DEFAULT_wxUSE_DRAG_AND_DROP=yes | |
341 | DEFAULT_wxUSE_SPLINES=yes | |
342 | ||
343 | DEFAULT_wxUSE_MDI_ARCHITECTURE=yes | |
344 | DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=yes | |
345 | DEFAULT_wxUSE_PRINTING_ARCHITECTURE=yes | |
346 | ||
347 | DEFAULT_wxUSE_PROLOGIO=yes | |
348 | DEFAULT_wxUSE_RESOURCES=yes | |
349 | DEFAULT_wxUSE_CONSTRAINTS=yes | |
350 | DEFAULT_wxUSE_IPC=yes | |
351 | DEFAULT_wxUSE_HELP=yes | |
352 | DEFAULT_wxUSE_WXTREE=yes | |
353 | DEFAULT_wxUSE_METAFILE=yes | |
354 | ||
355 | DEFAULT_wxUSE_COMMONDLGS=yes | |
356 | DEFAULT_wxUSE_MINIFRAME=yes | |
357 | DEFAULT_wxUSE_VALIDATORS=yes | |
358 | ||
359 | DEFAULT_wxUSE_ACCEL=yes | |
360 | DEFAULT_wxUSE_CARET=yes | |
361 | DEFAULT_wxUSE_BMPBUTTON=yes | |
362 | DEFAULT_wxUSE_CHECKBOX=yes | |
363 | DEFAULT_wxUSE_CHECKLST=yes | |
364 | DEFAULT_wxUSE_COMBOBOX=yes | |
365 | DEFAULT_wxUSE_GAUGE=yes | |
366 | DEFAULT_wxUSE_GRID=yes | |
367 | DEFAULT_wxUSE_IMAGLIST=yes | |
368 | DEFAULT_wxUSE_LISTBOX=yes | |
369 | DEFAULT_wxUSE_LISTCTRL=yes | |
370 | DEFAULT_wxUSE_NOTEBOOK=yes | |
371 | DEFAULT_wxUSE_RADIOBOX=yes | |
372 | DEFAULT_wxUSE_RADIOBTN=yes | |
e602002e | 373 | DEFAULT_wxUSE_SASH=yes |
9a98a854 VZ |
374 | DEFAULT_wxUSE_SCROLLBAR=yes |
375 | DEFAULT_wxUSE_SLIDER=yes | |
376 | DEFAULT_wxUSE_SPINBTN=yes | |
377 | DEFAULT_wxUSE_SPLITTER=yes | |
378 | DEFAULT_wxUSE_STATBMP=yes | |
379 | DEFAULT_wxUSE_STATBOX=yes | |
380 | DEFAULT_wxUSE_STATLINE=yes | |
381 | DEFAULT_wxUSE_STATUSBAR=yes | |
382 | DEFAULT_wxUSE_TABDIALOG=no | |
383 | DEFAULT_wxUSE_TOOLBAR=yes | |
384 | DEFAULT_wxUSE_TREECTRL=yes | |
385 | ||
386 | DEFAULT_wxUSE_UNICODE=no | |
387 | DEFAULT_wxUSE_WCSRTOMBS=no | |
388 | fi | |
389 | ||
390 | dnl AC_ARG_WITH should be used to select whether an external package will be | |
391 | dnl used or not, to configure compile-time features of this package itself, | |
392 | dnl use AC_ARG_ENABLE instead | |
393 | ||
394 | dnl ============================ | |
395 | dnl external package dependecies | |
396 | dnl ============================ | |
397 | ||
398 | AC_ARG_WITH(gtk-prefix, [ --with-gtk-prefix=PFX prefix where GTK is installed], | |
399 | gtk_config_prefix="$withval", gtk_config_prefix="") | |
400 | AC_ARG_WITH(gtk-exec-prefix, [ --with-gtk-exec-prefix=PFX exec prefix where GTK is installed], | |
401 | gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") | |
402 | AC_ARG_WITH(gtk, [ --with-gtk use GTK+], | |
70d1b3cf | 403 | [wxUSE_GTK="$withval" TOOLKIT_GIVEN=1]) |
9a98a854 | 404 | AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], |
70d1b3cf | 405 | [wxUSE_MOTIF="$withval" TOOLKIT_GIVEN=1]) |
9a98a854 | 406 | AC_ARG_WITH(cygwin, [ --with-cygwin use Cygwin for MS-Windows], |
70d1b3cf | 407 | [wxUSE_CYGWIN="$withval" TOOLKIT_GIVEN=1]) |
9a98a854 | 408 | AC_ARG_WITH(mingw, [ --with-mingw use GCC Minimal MS-Windows], |
70d1b3cf | 409 | [wxUSE_MINGW="$withval" TOOLKIT_GIVEN=1]) |
9a98a854 VZ |
410 | |
411 | AC_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (www.letters.com/dmalloc)], | |
412 | wxUSE_DMALLOC="$withval",wxUSE_DMALLOC=$DEFAULT_wxUSE_DMALLOC) | |
413 | AC_ARG_WITH(zlib, [ --with-zlib use zlib for LZW compression], | |
414 | wxUSE_ZLIB="$withval",wxUSE_ZLIB=$DEFAULT_wxUSE_ZLIB) | |
415 | AC_ARG_WITH(libpng, [ --with-libpng use libpng (PNG image format)], | |
416 | wxUSE_LIBPNG="$withval",wxUSE_LIBPNG=$DEFAULT_wxUSE_LIBPNG) | |
417 | AC_ARG_WITH(libgif, [ --with-libgif use libgif (GIF file format)], | |
418 | wxUSE_LIBGIF="${withval}",wxUSE_LIBGIF=$DEFAULT_wxUSE_LIBGIF) | |
419 | AC_ARG_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], | |
420 | wxUSE_LIBJPEG="${withval}",wxUSE_LIBJPEG=$DEFAULT_wxUSE_LIBJPEG) | |
421 | AC_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], | |
422 | wxUSE_OPENGL="$withval",wxUSE_OPENGL=$DEFAULT_wxUSE_OPENGL) | |
423 | AC_ARG_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], | |
424 | wxUSE_ODBC="$withval",wxUSE_ODBC=$DEFAULT_wxUSE_ODBC) | |
425 | ||
426 | dnl ==================== | |
427 | dnl compile-time options | |
428 | dnl ==================== | |
429 | ||
430 | dnl --------------------------------------------------------------------------- | |
431 | dnl compile options | |
432 | dnl --------------------------------------------------------------------------- | |
433 | ||
434 | AC_ARG_ENABLE(optimise, [ --enable-optimise create optimised code], | |
435 | wxUSE_OPTIMISE="$enableval",wxUSE_OPTIMISE=$DEFAULT_wxUSE_OPTIMISE) | |
436 | AC_ARG_ENABLE(optimize, [ --enable-optimize create optimized code], | |
437 | wxUSE_OPTIMISE="$enableval",wxUSE_OPTIMISE=$DEFAULT_wxUSE_OPTIMISE) | |
70d1b3cf VZ |
438 | AC_ARG_ENABLE(debug, [ --enable-debug same as debug_flag and debug_info], |
439 | wxUSE_DEBUG="${enableval}",wxUSE_DEBUG=$DEFAULT_wxUSE_DEBUG) | |
440 | ||
441 | if test "$wxUSE_DEBUG" = "yes"; then | |
442 | DEFAULT_wxUSE_DEBUG_FLAG=yes | |
443 | DEFAULT_wxUSE_DEBUG_INFO=yes | |
444 | elif test "$wxUSE_DEBUG" = "no"; then | |
445 | DEFAULT_wxUSE_DEBUG_FLAG=no | |
446 | DEFAULT_wxUSE_DEBUG_INFO=no | |
447 | fi | |
448 | ||
9a98a854 VZ |
449 | AC_ARG_ENABLE(debug_flag, [ --enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)], |
450 | wxUSE_DEBUG_FLAG="$enableval",wxUSE_DEBUG_FLAG=$DEFAULT_wxUSE_DEBUG_FLAG) | |
451 | AC_ARG_ENABLE(debug_info, [ --enable-debug_info create code with debugging information], | |
452 | wxUSE_DEBUG_INFO="$enableval",wxUSE_DEBUG_INFO=$DEFAULT_wxUSE_DEBUG_INFO) | |
453 | AC_ARG_ENABLE(debug_gdb, [ --enable-debug_gdb create code with extra GDB debugging information], | |
454 | wxUSE_DEBUG_GDB="$enableval",wxUSE_DEBUG_GDB=$DEFAULT_wxUSE_DEBUG_GDB) | |
455 | AC_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt use wxDebugContext], | |
456 | AC_DEFINE(wxUSE_DEBUG_CONTEXT)) | |
457 | AC_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing create code with memory tracing], | |
458 | wxUSE_MEM_TRACING="$enableval", wxUSE_MEM_TRACING=$DEFAULT_wxUSE_MEM_TRACING) | |
459 | AC_ARG_ENABLE(profile, [ --enable-profile create code with profiling information], | |
460 | wxUSE_PROFILE="$enableval",wxUSE_PROFILE=$DEFAULT_wxUSE_PROFILE) | |
461 | ||
462 | dnl --------------------------------------------------------------------------- | |
463 | dnl --disable-gui will build only non-GUI part of wxWindows | |
464 | dnl | |
465 | dnl NB: this is still in testing stage, don't use if you don't know what you're | |
466 | dnl doing | |
467 | dnl --------------------------------------------------------------------------- | |
468 | ||
469 | AC_ARG_ENABLE(gui, [ --enable-gui use GUI classes], | |
470 | wxUSE_GUI="$enableval",wxUSE_GUI=$DEFAULT_wxUSE_GUI) | |
471 | ||
472 | dnl --------------------------------------------------------------------------- | |
473 | dnl (small) optional non GUI classes | |
474 | dnl --------------------------------------------------------------------------- | |
475 | ||
476 | AC_ARG_ENABLE(intl, [ --enable-intl use internationalization system], | |
477 | wxUSE_INTL="$enableval",wxUSE_INTL=$DEFAULT_wxUSE_INTL) | |
478 | AC_ARG_ENABLE(config, [ --enable-config use wxConfig (and derived) classes], | |
479 | wxUSE_CONFIG="$enableval",wxUSE_CONFIG=$DEFAULT_wxUSE_CONFIG) | |
480 | AC_ARG_ENABLE(sockets, [ --enable-sockets use socket/network classes], | |
481 | wxUSE_SOCKETS="$enableval",wxUSE_SOCKETS=$DEFAULT_wxUSE_SOCKETS) | |
482 | AC_ARG_ENABLE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], | |
483 | wxUSE_IPC="$enableval",wxUSE_IPC=$DEFAULT_wxUSE_IPC) | |
484 | AC_ARG_ENABLE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], | |
485 | wxUSE_APPLE_IEEE="$enableval",wxUSE_APPLE_IEEE=$DEFAULT_wxUSE_APPLE_IEEE) | |
486 | AC_ARG_ENABLE(timedate, [ --enable-timedate use date/time classes], | |
487 | wxUSE_TIMEDATE="$enableval",wxUSE_TIMEDATE=$DEFAULT_wxUSE_TIMEDATE) | |
488 | AC_ARG_ENABLE(fraction, [ --enable-fraction use wxFraction class], | |
489 | wxUSE_FRACTION="$enableval",wxUSE_FRACTION=$DEFAULT_wxUSE_FRACTION) | |
490 | AC_ARG_ENABLE(dynlib, [ --enable-dynlib use wxLibrary class for DLL loading], | |
491 | wxUSE_DYNLIB_CLASS="$enableval",wxUSE_DYNLIB_CLASS=$DEFAULT_wxUSE_DYNLIB_CLASS) | |
492 | AC_ARG_ENABLE(longlong, [ --enable-longlong use wxLongLong class], | |
493 | wxUSE_LONGLONG="${enableval}",wxUSE_LONGLONG=$DEFAULT_wxUSE_LONGLONG) | |
494 | AC_ARG_ENABLE(log, [ --enable-log use logging system], | |
495 | wxUSE_LOG="$enableval",wxUSE_LOG=$DEFAULT_wxUSE_LOG) | |
496 | AC_ARG_ENABLE(streams, [ --enable-streams use wxStream etc classes], | |
497 | wxUSE_STREAMS="$enableval",wxUSE_STREAMS=$DEFAULT_wxUSE_STREAMS) | |
498 | AC_ARG_ENABLE(file, [ --enable-file use wxFile classes], | |
499 | wxUSE_FILE="$enableval",wxUSE_FILE=$DEFAULT_wxUSE_FILE) | |
500 | AC_ARG_ENABLE(textfile, [ --enable-textfile use wxTextFile classes], | |
501 | wxUSE_TEXTFILE="$enableval",wxUSE_TEXTFILE=$DEFAULT_wxUSE_TEXTFILE) | |
502 | AC_ARG_ENABLE(unicode, [ --enable-unicode compile wxString with Unicode support], | |
503 | wxUSE_UNICODE="$enableval",wxUSE_UNICODE=$DEFAULT_wxUSE_UNICODE) | |
504 | AC_ARG_ENABLE(wcsrtombs, [ --enable-wcsrtombs use wcsrtombs instead of buggy (GNU libc1/Linux libc5) wcstombs], | |
505 | wxUSE_WCSRTOMBS="$enableval",wxUSE_WCSRTOMBS=$DEFAULT_wxUSE_WCSRTOMBS) | |
506 | AC_ARG_ENABLE(joystick, [ --enable-joystick compile in joystick support (Linux only)], | |
507 | wxUSE_JOYSTICK="$enableval", wxUSE_JOYSTICK=$DEFAULT_wxUSE_JOYSTICK) | |
508 | ||
509 | dnl --------------------------------------------------------------------------- | |
510 | dnl "big" options (i.e. those which change a lot of things throughout the library) | |
511 | dnl --------------------------------------------------------------------------- | |
512 | ||
513 | AC_ARG_ENABLE(threads, [ --enable-threads use threads], | |
514 | wxUSE_THREADS="${enableval}",wxUSE_THREADS=$DEFAULT_wxUSE_THREADS) | |
515 | AC_ARG_ENABLE(serial, [ --enable-serial use class serialization], | |
516 | wxUSE_SERIAL="${enableval}",wxUSE_SERIAL=$DEFAULT_wxUSE_SERIAL) | |
517 | ||
518 | dnl --------------------------------------------------------------------------- | |
519 | dnl "big" GUI options | |
520 | dnl --------------------------------------------------------------------------- | |
521 | ||
522 | AC_ARG_ENABLE(docview, [ --enable-docview use document view architecture], | |
523 | wxUSE_DOC_VIEW_ARCHITECTURE="$enableval",wxUSE_DOC_VIEW_ARCHITECTURE=$DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE) | |
524 | AC_ARG_ENABLE(help, [ --enable-help use help (using external browser at present)], | |
525 | wxUSE_HELP="$enableval",wxUSE_HELP=$DEFAULT_wxUSE_HELP) | |
526 | AC_ARG_ENABLE(constraints, [ --enable-constraints use layout-constraints system], | |
527 | wxUSE_CONSTRAINTS="$enableval",wxUSE_CONSTRAINTS=$DEFAULT_wxUSE_CONSTRAINTS) | |
528 | AC_ARG_ENABLE(printarch, [ --enable-printarch use printing architecture], | |
529 | wxUSE_PRINTING_ARCHITECTURE="${enableval}",wxUSE_PRINTING_ARCHITECTURE=$DEFAULT_wxUSE_PRINTING_ARCHITECTURE) | |
530 | AC_ARG_ENABLE(mdi, [ --enable-mdi use multiple document interface architecture], | |
531 | wxUSE_MDI_ARCHITECTURE="${enableval}",wxUSE_MDI_ARCHITECTURE=$DEFAULT_wxUSE_MDI_ARCHITECTURE) | |
532 | ||
533 | dnl --------------------------------------------------------------------------- | |
534 | dnl PostScript options | |
535 | dnl --------------------------------------------------------------------------- | |
536 | AC_ARG_ENABLE(postscript, [ --enable-postscript use wxPostscriptDC device context (default for gtk+)], | |
537 | wxUSE_POSTSCRIPT="$enableval",wxUSE_POSTSCRIPT=$DEFAULT_wxUSE_POSTSCRIPT) | |
538 | ||
539 | dnl VZ: these options seem to be always on, if someone wants to change it please do | |
540 | dnl AC_ARG_ENABLE(PS-normalized, [ --enable-PS-normalized use normalized PS fonts], | |
541 | dnl wxUSE_NORMALIZED_PS_FONTS="${enableval}",wxUSE_NORMALIZED_PS_FONTS=$DEFAULT_wxUSE_NORMALIZED_PS_FONTS) | |
542 | dnl AC_ARG_ENABLE(afmfonts, [ --enable-afmfonts use Adobe Font Metric Font table], | |
543 | dnl wxUSE_AFM_FOR_POSTSCRIPT="${enableval}",wxUSE_AFM_FOR_POSTSCRIPT=$DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT) | |
544 | ||
545 | dnl --------------------------------------------------------------------------- | |
546 | dnl resources | |
547 | dnl --------------------------------------------------------------------------- | |
548 | AC_ARG_ENABLE(prologio, [ --enable-prologio use Prolog IO library], | |
549 | wxUSE_PROLOGIO="${enableval}",wxUSE_PROLOGIO=$DEFAULT_wxUSE_PROLOGIO) | |
550 | AC_ARG_ENABLE(resources, [ --enable-resources use wxWindows resources], | |
551 | wxUSE_RESOURCES="${enableval}",wxUSE_RESOURCES=$DEFAULT_wxUSE_RESOURCES) | |
552 | ||
553 | AC_ARG_ENABLE(xresources, [ --enable-xresources use X resources for save (default for gtk+)], | |
554 | wxUSE_X_RESOURCES="${enableval}",wxUSE_X_RESOURCES=$DEFAULT_wxUSE_X_RESOURCES) | |
555 | dnl --------------------------------------------------------------------------- | |
556 | dnl IPC &c | |
557 | dnl --------------------------------------------------------------------------- | |
558 | AC_ARG_ENABLE(clipboard, [ --enable-clipboard use wxClipboard classes], | |
559 | wxUSE_CLIPBOARD="${enableval}",wxUSE_CLIPBOARD=$DEFAULT_wxUSE_CLIPBOARD) | |
560 | AC_ARG_ENABLE(dnd, [ --enable-dnd use Drag'n'Drop classes], | |
561 | wxUSE_DRAG_AND_DROP="${enableval}",wxUSE_DRAG_AND_DROP=$DEFAULT_wxUSE_DRAG_AND_DROP) | |
562 | ||
563 | dnl --------------------------------------------------------------------------- | |
564 | dnl options which don't work yet | |
565 | dnl --------------------------------------------------------------------------- | |
566 | AC_ARG_ENABLE(wxtree, [ --enable-wxtree make wxTree library], | |
567 | wxUSE_WXTREE="${enableval}",wxUSE_WXTREE=$DEFAULT_wxUSE_WXTREE) | |
568 | ||
569 | dnl --------------------------------------------------------------------------- | |
570 | dnl optional GUI controls (in alphabetical order except the first one) | |
571 | dnl --------------------------------------------------------------------------- | |
572 | ||
573 | AC_ARG_ENABLE(controls, [ --enable-controls use all usual controls], | |
574 | wxUSE_CONTROLS="${enableval}") | |
575 | ||
576 | dnl even with --enable-controls, some may be disabled by giving | |
577 | dnl --disable-<control> later on the command line - but by default all will be | |
578 | dnl used (and vice versa) | |
579 | if test "$wxUSE_CONTROLS" = "yes"; then | |
580 | DEFAULT_wxUSE_ACCEL=yes | |
581 | DEFAULT_wxUSE_CARET=yes | |
582 | DEFAULT_wxUSE_COMBOBOX=yes | |
583 | DEFAULT_wxUSE_BMPBUTTON=yes | |
584 | DEFAULT_wxUSE_CHECKBOX=yes | |
585 | DEFAULT_wxUSE_CHECKLISTBOX=yes | |
586 | DEFAULT_wxUSE_GAUGE=yes | |
587 | DEFAULT_wxUSE_GRID=yes | |
588 | DEFAULT_wxUSE_IMAGLIST=yes | |
589 | DEFAULT_wxUSE_LISTBOX=yes | |
590 | DEFAULT_wxUSE_LISTCTRL=yes | |
591 | DEFAULT_wxUSE_NOTEBOOK=yes | |
592 | DEFAULT_wxUSE_RADIOBOX=yes | |
593 | DEFAULT_wxUSE_RADIOBTN=yes | |
594 | DEFAULT_wxUSE_SASH=yes | |
595 | DEFAULT_wxUSE_SCROLLBAR=yes | |
596 | DEFAULT_wxUSE_SLIDER=yes | |
597 | DEFAULT_wxUSE_SPINBTN=yes | |
598 | DEFAULT_wxUSE_SPLITTER=yes | |
599 | DEFAULT_wxUSE_STATBMP=yes | |
600 | DEFAULT_wxUSE_STATBOX=yes | |
601 | DEFAULT_wxUSE_STATLINE=yes | |
602 | DEFAULT_wxUSE_STATUSBAR=yes | |
603 | DEFAULT_wxUSE_TAB_DIALOG=yes | |
604 | DEFAULT_wxUSE_TOOLBAR=yes | |
605 | DEFAULT_wxUSE_TOOLTIPS=yes | |
606 | DEFAULT_wxUSE_TREECTRL=yes | |
607 | elif test "$wxUSE_CONTROLS" = "no"; then | |
608 | DEFAULT_wxUSE_ACCEL=no | |
609 | DEFAULT_wxUSE_CARET=no | |
610 | DEFAULT_wxUSE_COMBOBOX=no | |
611 | DEFAULT_wxUSE_BMPBUTTON=no | |
612 | DEFAULT_wxUSE_CHECKBOX=no | |
613 | DEFAULT_wxUSE_CHECKLISTBOX=no | |
614 | DEFAULT_wxUSE_GAUGE=no | |
615 | DEFAULT_wxUSE_GRID=no | |
616 | DEFAULT_wxUSE_IMAGLIST=no | |
617 | DEFAULT_wxUSE_LISTBOX=no | |
618 | DEFAULT_wxUSE_LISTCTRL=no | |
619 | DEFAULT_wxUSE_NOTEBOOK=no | |
620 | DEFAULT_wxUSE_RADIOBOX=no | |
621 | DEFAULT_wxUSE_RADIOBTN=no | |
622 | DEFAULT_wxUSE_SASH=no | |
623 | DEFAULT_wxUSE_SCROLLBAR=no | |
624 | DEFAULT_wxUSE_SLIDER=no | |
625 | DEFAULT_wxUSE_SPINBTN=no | |
626 | DEFAULT_wxUSE_SPLITTER=no | |
627 | DEFAULT_wxUSE_STATBMP=no | |
628 | DEFAULT_wxUSE_STATBOX=no | |
629 | DEFAULT_wxUSE_STATLINE=no | |
630 | DEFAULT_wxUSE_STATUSBAR=no | |
631 | DEFAULT_wxUSE_TAB_DIALOG=no | |
632 | DEFAULT_wxUSE_TOOLBAR=no | |
633 | DEFAULT_wxUSE_TOOLTIPS=no | |
634 | DEFAULT_wxUSE_TREECTRL=no | |
635 | fi | |
636 | ||
637 | AC_ARG_ENABLE(accel, [ --enable-accel use accelerators], | |
638 | wxUSE_ACCEL="${enableval}",wxUSE_ACCEL=$DEFAULT_wxUSE_ACCEL) | |
639 | AC_ARG_ENABLE(caret, [ --enable-caret use wxCaret class], | |
640 | wxUSE_CARET="${enableval}",wxUSE_CARET=$DEFAULT_wxUSE_CARET) | |
641 | AC_ARG_ENABLE(bmpbutton, [ --enable-bmpbutton use wxBitmapButton class], | |
642 | wxUSE_BMPBUTTON="${enableval}",wxUSE_BMPBUTTON=$DEFAULT_wxUSE_BMPBUTTON) | |
643 | AC_ARG_ENABLE(checkbox, [ --enable-checkbox use wxCheckBox class], | |
644 | wxUSE_CHECKBOX="${enableval}",wxUSE_CHECKBOX=$DEFAULT_wxUSE_CHECKBOX) | |
645 | AC_ARG_ENABLE(checklst, [ --enable-checklst use wxCheckListBox (listbox with checkboxes) class], | |
646 | wxUSE_CHECKLST="${enableval}",wxUSE_CHECKLST=$DEFAULT_wxUSE_CHECKLST) | |
647 | AC_ARG_ENABLE(combobox, [ --enable-combobox use wxChoice and wxComboBox classes], | |
648 | wxUSE_COMBOBOX="${enableval}",wxUSE_COMBOBOX=$DEFAULT_wxUSE_COMBOBOX) | |
649 | AC_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], | |
650 | wxUSE_GAUGE="${enableval}",wxUSE_GAUGE=$DEFAULT_wxUSE_GAUGE) | |
651 | AC_ARG_ENABLE(grid, [ --enable-grid use wxGrid class], | |
652 | wxUSE_GRID="${enableval}",wxUSE_GRID=$DEFAULT_wxUSE_GRID) | |
653 | AC_ARG_ENABLE(imaglist, [ --enable-imaglist use wxImageList class], | |
654 | wxUSE_IMAGLIST="${enableval}",wxUSE_IMAGLIST=$DEFAULT_wxUSE_IMAGLIST) | |
655 | AC_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], | |
656 | wxUSE_LISTBOX="${enableval}",wxUSE_LISTBOX=$DEFAULT_wxUSE_LISTBOX) | |
657 | AC_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], | |
658 | wxUSE_LISTCTRL="${enableval}",wxUSE_LISTCTRL=$DEFAULT_wxUSE_LISTCTRL) | |
659 | AC_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], | |
660 | wxUSE_NOTEBOOK="${enableval}",wxUSE_NOTEBOOK=$DEFAULT_wxUSE_NOTEBOOK) | |
661 | AC_ARG_ENABLE(radiobox, [ --enable-radiobox use wxRadioBox class], | |
662 | wxUSE_RADIOBOX="${enableval}",wxUSE_RADIOBOX=$DEFAULT_wxUSE_RADIOBOX) | |
663 | AC_ARG_ENABLE(radiobtn, [ --enable-radiobtn use wxRadioButton class], | |
664 | wxUSE_RADIOBTN="${enableval}",wxUSE_RADIOBTN=$DEFAULT_wxUSE_RADIOBTN) | |
665 | AC_ARG_ENABLE(sash, [ --enable-sash use wxSashWindow class], | |
666 | wxUSE_SASH="${enableval}",wxUSE_SASH=$DEFAULT_wxUSE_SASH) | |
667 | AC_ARG_ENABLE(scrollbar, [ --enable-scrollbar use wxScrollBar class and scrollable windows], | |
668 | wxUSE_SCROLLBAR="${enableval}",wxUSE_SCROLLBAR=$DEFAULT_wxUSE_SCROLLBAR) | |
669 | AC_ARG_ENABLE(slider, [ --enable-slider use wxSlider class], | |
670 | wxUSE_SLIDER="${enableval}",wxUSE_SLIDER=$DEFAULT_wxUSE_SLIDER) | |
671 | AC_ARG_ENABLE(spinbtn, [ --enable-spinbtn use wxSpinButton class], | |
672 | wxUSE_SPINBTN="${enableval}",wxUSE_SPINBTN=$DEFAULT_wxUSE_SPINBTN) | |
673 | AC_ARG_ENABLE(splitter, [ --enable-splitter use wxSplitterWindow class], | |
674 | wxUSE_SPLITTER="${enableval}",wxUSE_SPLITTER=$DEFAULT_wxUSE_SPLITTER) | |
675 | AC_ARG_ENABLE(statbmp, [ --enable-statbmp use wxStaticBitmap class], | |
676 | wxUSE_STATBMP="${enableval}",wxUSE_STATBMP=$DEFAULT_wxUSE_STATBMP) | |
677 | AC_ARG_ENABLE(statbox, [ --enable-statbox use wxStaticBox class], | |
678 | wxUSE_STATBOX="${enableval}",wxUSE_STATBOX=$DEFAULT_wxUSE_STATBOX) | |
679 | AC_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], | |
680 | wxUSE_STATLINE="${enableval}",wxUSE_STATLINE=$DEFAULT_wxUSE_STATLINE) | |
681 | AC_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], | |
682 | wxUSE_STATUSBAR="${enableval}",wxUSE_STATUSBAR=$DEFAULT_wxUSE_STATUSBAR) | |
683 | AC_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], | |
684 | wxUSE_TABDIALOG="${enableval}",wxUSE_TABDIALOG=$DEFAULT_wxUSE_TABDIALOG) | |
685 | AC_ARG_ENABLE(toolbar, [ --enable-toolbar use wxToolBar class], | |
686 | wxUSE_TOOLBAR="${enableval}",wxUSE_TOOLBAR=$DEFAULT_wxUSE_TOOLBAR) | |
687 | AC_ARG_ENABLE(treectrl, [ --enable-treectrl use wxTreeCtrl class], | |
688 | wxUSE_TREECTRL="${enableval}",wxUSE_TREECTRL=$DEFAULT_wxUSE_TREECTRL) | |
689 | ||
690 | dnl --------------------------------------------------------------------------- | |
691 | dnl misc GUI options | |
692 | dnl --------------------------------------------------------------------------- | |
693 | ||
694 | AC_ARG_ENABLE(commondlg, [ --enable-commondlg use common dialogs (wxDirDialog, wxProgressDialog, wxTextDialog, ...)], | |
695 | wxUSE_COMMONDLGS="${enableval}",wxUSE_COMMONDLGS=$DEFAULT_wxUSE_COMMONDLGS) | |
696 | AC_ARG_ENABLE(miniframe, [ --enable-miniframe use wxMiniFrame class], | |
697 | wxUSE_MINIFRAME="${enableval}",wxUSE_MINIFRAME=$DEFAULT_wxUSE_MINIFRAME) | |
698 | AC_ARG_ENABLE(tooltips, [ --enable-tooltips use wxToolTip class], | |
699 | wxUSE_TOOLTIPS="${enableval}",wxUSE_TOOLTIPS=$DEFAULT_wxUSE_TOOLTIPS) | |
700 | AC_ARG_ENABLE(splines, [ --enable-splines use spline drawing code], | |
701 | wxUSE_SPLINES="${enableval}",wxUSE_SPLINES=$DEFAULT_wxUSE_SPLINES) | |
702 | AC_ARG_ENABLE(validators, [ --enable-validators use wxValidator and derived classes], | |
703 | wxUSE_VALIDATORS="${enableval}",wxUSE_VALIDATORS=$DEFAULT_wxUSE_VALIDATORS) | |
704 | ||
705 | dnl check that no more than one toolkit is given and that if none are given that | |
706 | dnl we have a default one | |
efeb0365 | 707 | |
70d1b3cf VZ |
708 | if test "$TOOLKIT_GIVEN" = 1; then |
709 | dnl convert "yes" to 1 and "no" to 0 | |
710 | wxUSE_GTK=`echo $wxUSE_GTK | sed -e 's/yes/1/' -e 's/no/0/'` | |
711 | wxUSE_MOTIF=`echo $wxUSE_MOTIF | sed -e 's/yes/1/' -e 's/no/0/'` | |
712 | wxUSE_MSW=`echo $wxUSE_MSW | sed -e 's/yes/1/' -e 's/no/0/'` | |
713 | else | |
714 | dnl try to guess the most apropriate toolkit for this platform | |
715 | wxUSE_GTK=$DEFAULT_wxUSE_GTK | |
716 | wxUSE_MOTIF=$DEFAULT_wxUSE_MOTIF | |
717 | wxUSE_MSW=$DEFAULT_wxUSE_MSW | |
718 | fi | |
efeb0365 | 719 | |
9a98a854 VZ |
720 | dnl NB: this supposes that the shell is able to handle arithmetic expansion and |
721 | dnl the ${VAR:-VALUE} construction. It does simplify our life though... | |
722 | NUM_TOOLKITS="$((${wxUSE_GTK:-0}+${wxUSE_MOTIF:-0}+${wxUSE_MSW:-0}))" | |
723 | ||
724 | case "$NUM_TOOLKITS" in | |
725 | 1) | |
726 | ;; | |
727 | 0) | |
efeb0365 | 728 | AC_MSG_ERROR(Please specify a toolkit) |
9a98a854 VZ |
729 | ;; |
730 | *) | |
731 | AC_MSG_ERROR(Please specify at most one toolkit) | |
732 | esac | |
733 | ||
734 | dnl --------------------------------------------------------------------------- | |
735 | dnl Checks for programs | |
736 | dnl --------------------------------------------------------------------------- | |
737 | ||
738 | dnl flush the cache because checking for programs might abort | |
739 | AC_CACHE_SAVE | |
740 | ||
741 | dnl cross-compiling support: we're cross compiling if the build system is | |
742 | dnl different from the target one (assume host and target be always the same) | |
743 | if eval "test $host != $build"; then | |
744 | if eval "test $build != NONE"; then | |
745 | CC="$build-gcc" | |
746 | CXX="$build-g++" | |
747 | RANLIB="$build-ranlib" | |
748 | NM="$build-nm" | |
749 | fi | |
750 | fi | |
751 | ||
752 | dnl C-compiler checks | |
753 | dnl defines CC with the compiler to use | |
754 | dnl defines GCC with yes if using gcc | |
755 | dnl defines GCC empty if not using gcc | |
756 | dnl defines CFLAGS | |
757 | AC_PROG_CC | |
758 | ||
759 | CFLAGS=`echo "$CFLAGS" | sed 's/-g//g'` | |
760 | ||
761 | dnl what is the c-preprocessor | |
762 | dnl defines CPP with the c-preprocessor | |
763 | AC_PROG_CPP | |
764 | ||
765 | dnl is -traditional needed for correct compilations | |
766 | dnl adds -traditional for gcc if needed | |
767 | AC_PROG_GCC_TRADITIONAL | |
768 | ||
769 | AC_LANG_SAVE | |
770 | AC_LANG_CPLUSPLUS | |
771 | ||
772 | dnl C++-compiler checks | |
773 | dnl defines CXX with the compiler to use | |
774 | dnl defines GXX with yes if using gxx | |
775 | dnl defines GXX empty if not using gxx | |
776 | dnl defines CXXFLAGS | |
777 | AC_PROG_CXX | |
778 | ||
779 | dnl what is the C++-preprocessor | |
780 | dnl defines CXXCPP with the C++-preprocessor | |
781 | AC_PROG_CXXCPP | |
782 | ||
783 | CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g//g'` | |
784 | ||
785 | AC_LANG_RESTORE | |
786 | ||
787 | dnl ranlib command | |
788 | dnl defines RANLIB with the appropriate command | |
789 | AC_PROG_RANLIB | |
790 | ||
791 | dnl ar command | |
792 | dnl defines AR with the appropriate command | |
793 | AC_CHECK_PROG(AR, ar, ar, ar) | |
794 | ||
795 | dnl install checks | |
796 | dnl defines INSTALL with the appropriate command | |
797 | AC_PROG_INSTALL | |
798 | ||
9a98a854 VZ |
799 | dnl strip command |
800 | dnl defines STRIP as strip or nothing if not found | |
801 | AC_CHECK_PROG(STRIP, strip, strip, true) | |
802 | ||
803 | dnl check if VPATH works | |
804 | AC_MSG_CHECKING("make for VPATH support") | |
805 | dnl create Makefile | |
806 | cat - << EOF > confMake | |
807 | check : file | |
808 | cp \$? \$@ | |
809 | cp \$? final_file | |
810 | EOF | |
811 | ||
812 | if test ! -d sub ; then | |
813 | mkdir sub | |
814 | fi | |
815 | echo dummy > sub/file | |
816 | ${MAKE-make} -f confMake VPATH=sub 2> config.log > /dev/null | |
817 | RESULT=$? | |
818 | rm -f sub/file check final_file confMake | |
819 | rmdir sub | |
820 | if test "$RESULT" = 0; then | |
821 | AC_MSG_RESULT(yes) | |
822 | else | |
823 | AC_MSG_RESULT(no) | |
824 | AC_MSG_ERROR( | |
825 | You need a make-utility that is able to use the variable | |
826 | VPATH correctly. | |
827 | If your version of make does not support VPATH correctly, | |
828 | please install GNU-make (possibly as gmake), and start | |
829 | configure with the following command: | |
830 | export MAKE=gmake; ./configure for sh-type shells | |
831 | setenv MAKE gmake; ./configure for csh-type shells | |
832 | Also please do remember to use gmake in this case every time | |
833 | you are trying to compile. | |
834 | ) | |
835 | fi | |
836 | ||
837 | dnl YACC checks | |
838 | dnl defines YACC with the appropriate command | |
839 | AC_PROG_YACC | |
840 | ||
841 | dnl LEX checks | |
842 | dnl defines LEX with the appropriate command | |
843 | dnl defines LEXLIB with the appropriate library | |
844 | dnl this AM version (don't use AC_PROG_LEX!) also | |
845 | dnl defines YYTEXT_POINTER if yytext is char* | |
846 | dnl defines LEX_OUTPUT_ROOT as to the base of the | |
847 | dnl filename output by the lexer | |
848 | AM_PROG_LEX | |
849 | ||
c7114f59 VZ |
850 | dnl needed for making link to setup.h |
851 | AC_PROG_LN_S | |
852 | ||
9a98a854 VZ |
853 | dnl libtool checks (disable static libs by default, this takes too much time...) |
854 | AM_DISABLE_STATIC | |
855 | AM_PROG_LIBTOOL | |
856 | ||
857 | dnl --------------------------------------------------------------------------- | |
858 | dnl Define search path for includes and libraries: all headers and libs will be | |
859 | dnl looked for in all directories of this path | |
860 | dnl --------------------------------------------------------------------------- | |
861 | ||
862 | SEARCH_INCLUDE="\ | |
863 | /usr/Motif-1.2/include \ | |
864 | /usr/Motif-2.1/include \ | |
865 | \ | |
866 | /usr/include/Motif1.2 \ | |
867 | /opt/xpm/include/X11 \ | |
868 | \ | |
869 | /usr/Motif1.2/include \ | |
870 | /usr/dt/include \ | |
871 | /usr/include/Xm \ | |
872 | \ | |
873 | /usr/X11R6/include \ | |
874 | /usr/X11R5/include \ | |
875 | /usr/X11R4/include \ | |
876 | \ | |
877 | /usr/X11R6/lib \ | |
878 | /usr/X11R5/lib \ | |
879 | /usr/X11R4/lib \ | |
880 | \ | |
881 | /usr/include/X11R6 \ | |
882 | /usr/include/X11R5 \ | |
883 | /usr/include/X11R4 \ | |
884 | \ | |
885 | /usr/local/X11R6/include \ | |
886 | /usr/local/X11R5/include \ | |
887 | /usr/local/X11R4/include \ | |
888 | \ | |
889 | /usr/local/include/X11R6 \ | |
890 | /usr/local/include/X11R5 \ | |
891 | /usr/local/include/X11R4 \ | |
892 | \ | |
893 | /usr/X11/include \ | |
894 | /usr/include/X11 \ | |
895 | /usr/local/X11/include \ | |
896 | /usr/local/include/X11 \ | |
897 | \ | |
898 | /usr/X386/include \ | |
899 | /usr/x386/include \ | |
900 | /usr/XFree86/include/X11 \ | |
901 | \ | |
902 | /usr/include \ | |
903 | /usr/include/gtk \ | |
904 | /usr/include/gdk \ | |
905 | /usr/include/glib \ | |
906 | /usr/local/include \ | |
907 | /usr/unsupported/include \ | |
908 | /usr/athena/include \ | |
909 | /usr/local/x11r5/include \ | |
910 | /usr/lpp/Xamples/include \ | |
911 | \ | |
912 | /usr/local/include/gtk \ | |
913 | /usr/local/include/qt \ | |
914 | /usr/include/qt \ | |
915 | \ | |
916 | /usr/openwin/include \ | |
917 | /usr/openwin/share/include \ | |
918 | " | |
919 | ||
920 | SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` " | |
921 | ||
922 | dnl ------------------------------------------------------------------------ | |
923 | dnl Check for libraries | |
924 | dnl ------------------------------------------------------------------------ | |
925 | ||
926 | dnl flush the cache because checking for libraries might abort | |
927 | AC_CACHE_SAVE | |
928 | ||
929 | dnl find the X11 include and library files | |
930 | dnl defines x_includes and x_libraries | |
931 | AC_PATH_XTRA | |
932 | ||
933 | if test "$no_x" = "yes"; then | |
934 | AC_MSG_ERROR(X11 libraries not found, aborting) | |
935 | fi | |
936 | ||
937 | CHECK_INCLUDE="-I/usr/include $X_CFLAGS" | |
938 | CHECK_LIB="-L/lib -L/usr/lib $X_LIBS" | |
939 | ||
940 | dnl ---------------------------------------------------------------- | |
941 | dnl search for toolkit (widget sets) | |
942 | dnl ---------------------------------------------------------------- | |
943 | ||
944 | TOOLKIT= | |
945 | TOOLKIT_DEF= | |
946 | TOOLKIT_DIR= | |
947 | TOOLKIT_INCLUDE= | |
948 | ||
949 | GUI_TK_LIBRARY= | |
950 | GUI_TK_LINK= | |
951 | ||
952 | WXGTK12= | |
953 | ||
954 | if test "$wxUSE_GTK" = 1; then | |
955 | dnl avoid calling AM_PATH_GTK twice, so check first for the newer version and | |
956 | dnl only then, if it wasn't found, for an older one | |
957 | AM_PATH_GTK(1.2.0, WXGTK12=1) | |
958 | if test "$WXGTK12" != 1; then | |
959 | AM_PATH_GTK(1.0.0, , AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.X or 1.0.X?)) | |
960 | fi | |
961 | ||
962 | TOOLKIT_INCLUDE="$GTK_CFLAGS" | |
963 | GUI_TK_LIBRARY="$GTK_LIBS" | |
9a98a854 | 964 | TOOLKIT=GTK |
9a98a854 VZ |
965 | fi |
966 | ||
967 | if test "$wxUSE_MOTIF" = 1; then | |
968 | AC_MSG_CHECKING(for Motif/Lesstif includes) | |
969 | AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h) | |
970 | if test "$ac_find_includes" != "" ; then | |
971 | AC_MSG_RESULT(found $ac_find_includes) | |
972 | else | |
973 | AC_MSG_RESULT(no) | |
974 | AC_MSG_ERROR(please set CFLAGS to contain the location of Xm/Xm.h) | |
975 | fi | |
976 | ||
977 | AC_MSG_CHECKING(for Motif/Lesstif library) | |
978 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm) | |
979 | if test "$ac_find_libraries" != "" ; then | |
980 | AC_INCLUDE_PATH_EXIST($ac_find_includes, $CHECK_INCLUDE) | |
981 | AC_LINK_PATH_EXIST($ac_find_libraries, $CHECK_LIB) | |
982 | ||
983 | CHECK_LINK="$CHECK_LIB $ac_path_to_link" | |
984 | CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" | |
985 | AC_MSG_RESULT(found at $ac_find_libraries) | |
986 | else | |
987 | AC_MSG_RESULT(no) | |
988 | AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm) | |
989 | fi | |
990 | ||
991 | AC_MSG_CHECKING(for Xt library) | |
992 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xt) | |
993 | if test "$ac_find_libraries" != "" ; then | |
994 | AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) | |
995 | CHECK_LINK="$CHECK_LIB $ac_path_to_link" | |
996 | AC_MSG_RESULT(found at $ac_find_libraries) | |
997 | else | |
998 | AC_MSG_RESULT(no) | |
999 | AC_MSG_ERROR(please set LDFLAGS to contain the location of libXt) | |
1000 | fi | |
1001 | ||
1002 | XPM_LINK="" | |
1003 | AC_MSG_CHECKING(for Xpm library) | |
1004 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) | |
1005 | if test "$ac_find_libraries" != "" ; then | |
1006 | AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) | |
1007 | CHECK_LINK="$CHECK_LIB $ac_path_to_link" | |
1008 | XPM_LINK="-lXpm " | |
1009 | AC_DEFINE(wxHAVE_LIB_XPM) | |
1010 | AC_MSG_RESULT(found at $ac_find_libraries) | |
1011 | else | |
1012 | AC_MSG_RESULT(no) | |
1013 | AC_MSG_WARN(library will be compiled without support for images in XPM format) | |
1014 | fi | |
1015 | ||
70d1b3cf | 1016 | GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXt -lX11 -lm" |
9a98a854 VZ |
1017 | GUI_TK_LIBRARY="$CHECK_LIB $GUI_TK_LINK" |
1018 | TOOLKIT=MOTIF | |
1019 | fi | |
1020 | ||
1021 | dnl the name of the directory where the files for this toolkit live | |
1022 | TOOLKIT_DIR=`echo ${TOOLKIT} | tr "A-Z" "a-z"` | |
1023 | ||
1024 | dnl the symbol which allows conditional compilation for the given toolkit | |
1025 | TOOLKIT_DEF=-D__WX${TOOLKIT}__ | |
1026 | ||
70d1b3cf | 1027 | dnl the name of the (libtool) library |
2b6f061f RR |
1028 | WX_LIBRARY_NAME="libwx_${TOOLKIT_DIR}.la" |
1029 | ||
1030 | dnl the name of the library to be linked reported by wx-config | |
1031 | WX_LIBRARY="wx_${TOOLKIT_DIR}" | |
9a98a854 VZ |
1032 | |
1033 | dnl ------------------------------------------------------------------------ | |
1034 | dnl Check for headers | |
1035 | dnl ------------------------------------------------------------------------ | |
1036 | ||
1037 | dnl defines HAVE_STRINGS_H (where some string functions live on AIX for example) | |
1038 | AC_CHECK_HEADERS(strings.h) | |
1039 | dnl defines HAVE_UNISTD_H | |
1040 | AC_CHECK_HEADERS(unistd.h) | |
1041 | dnl defines HAVE_WCHAR_H | |
1042 | AC_CHECK_HEADERS(wchar.h) | |
1043 | dnl defines HAVE_WCSTR_H | |
1044 | AC_CHECK_HEADERS(wcstr.h) | |
1045 | dnl defines HAVE_FNMATCH_H | |
1046 | AC_CHECK_HEADERS(fnmatch.h) | |
2b6f061f | 1047 | dnl defines HAVE_X11_XKBLIB_H |
27933891 | 1048 | AC_CHECK_HEADERS(X11/XKBlib.h) |
9a98a854 VZ |
1049 | |
1050 | dnl --------------------------------------------------------------------------- | |
1051 | dnl Checks for typedefs | |
1052 | dnl --------------------------------------------------------------------------- | |
1053 | ||
1054 | dnl defines mode_t if not already defined | |
1055 | AC_TYPE_MODE_T | |
1056 | dnl defines off_t if not already defined | |
1057 | AC_TYPE_OFF_T | |
1058 | dnl defines pid_t if not already defined | |
1059 | AC_TYPE_PID_T | |
1060 | dnl defines size_t if not already defined | |
1061 | AC_TYPE_SIZE_T | |
1062 | dnl defines uid_t and gid_t if not already defined | |
1063 | AC_TYPE_UID_T | |
1064 | ||
1065 | dnl --------------------------------------------------------------------------- | |
1066 | dnl Checks for structures | |
1067 | dnl --------------------------------------------------------------------------- | |
1068 | ||
1069 | dnl --------------------------------------------------------------------------- | |
1070 | dnl Checks for compiler characteristics | |
1071 | dnl --------------------------------------------------------------------------- | |
1072 | ||
1073 | dnl defines const to be empty if c-compiler does not support const fully | |
1074 | AC_C_CONST | |
1075 | dnl defines inline to a sensible value for the c-compiler | |
1076 | AC_C_INLINE | |
1077 | ||
1078 | dnl check the sizes of integral types (give some reasonable default values for | |
1079 | dnl cross-compiling) | |
1080 | dnl defines the size of certain types of variables in SIZEOF_<TYPE> | |
d716d967 RR |
1081 | AC_CHECK_SIZEOF(char, 1) |
1082 | AC_CHECK_SIZEOF(short, 2) | |
9a98a854 VZ |
1083 | AC_CHECK_SIZEOF(int *, 4) |
1084 | AC_CHECK_SIZEOF(int, 4) | |
1085 | AC_CHECK_SIZEOF(long, 4) | |
1086 | AC_CHECK_SIZEOF(long long, 0) | |
1087 | ||
bcd2b961 VZ |
1088 | dnl for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling) |
1089 | WX_C_BIGENDIAN | |
239bca2e | 1090 | |
9a98a854 VZ |
1091 | dnl check for iostream (as opposed to iostream.h) standard header |
1092 | WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH)) | |
1093 | ||
1094 | dnl check whether C++ compiler supports bool built-in type | |
1095 | WX_CPP_BOOL | |
1096 | ||
1097 | dnl check whether overloading on size_t/int parameter works | |
1098 | WX_CPP_SIZE_T_IS_NOT_INT | |
1099 | ||
1100 | dnl --------------------------------------------------------------------------- | |
1101 | dnl Check for functions | |
1102 | dnl --------------------------------------------------------------------------- | |
1103 | ||
1104 | dnl check for wcslen | |
1105 | AC_CHECK_LIB(c, wcslen, [ | |
1106 | AC_DEFINE(HAVE_WCSLEN) | |
1107 | WCHAR_LINK="" | |
1108 | ], [ | |
1109 | AC_CHECK_LIB(w, wcslen, [ | |
1110 | AC_DEFINE(HAVE_WCSLEN) | |
1111 | WCHAR_LINK="-lw" | |
1112 | ]) | |
1113 | ]) | |
1114 | ||
1115 | dnl check for vprintf/vsprintf() which are GNU extensions | |
1116 | AC_FUNC_VPRINTF | |
1117 | ||
1118 | dnl check for vsnprintf() - a safe version of vsprintf() | |
1119 | AC_CHECK_FUNCS(vsnprintf, | |
1120 | AC_DEFINE(HAVE_VSNPRINTF), | |
1121 | AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf) | |
1122 | ) | |
1123 | ||
1124 | dnl check for vfork() (even if it's the same as fork() in modern Unices) | |
1125 | AC_CHECK_FUNCS(vfork) | |
1126 | ||
1127 | POSIX4_LINK= | |
1128 | AC_CHECK_FUNCS(nanosleep, AC_DEFINE(HAVE_NANOSLEEP), [ | |
1129 | AC_CHECK_LIB(posix4, nanosleep, [ | |
1130 | AC_DEFINE(HAVE_NANOSLEEP) | |
1131 | POSIX4_LINK="-lposix4" | |
1132 | ], [ | |
1133 | AC_CHECK_FUNCS(usleep, | |
1134 | AC_DEFINE(HAVE_USLEEP), | |
1135 | AC_MSG_WARN([wxSleep() function will not work])) | |
1136 | ]) | |
1137 | ]) | |
1138 | ||
1139 | dnl check for uname (POSIX) and gethostname (BSD) | |
1140 | AC_CHECK_FUNCS(uname gethostname, break) | |
1141 | ||
1142 | dnl =========================================================================== | |
1143 | dnl Now we have all the info we need - use it! | |
1144 | dnl =========================================================================== | |
1145 | ||
1146 | dnl flush the cache | |
1147 | AC_CACHE_SAVE | |
1148 | ||
1149 | dnl --------------------------------------------------------------------------- | |
1150 | dnl thread support | |
1151 | dnl --------------------------------------------------------------------------- | |
1152 | ||
1153 | dnl the code below: | |
1154 | dnl defines THREADS_OBJ which contains the object files to build | |
1155 | dnl defines THREADS_LINK which contains the thread library to link with | |
1156 | dnl defines wxUSE_THREADS=1 if thread support is activated | |
1157 | ||
1158 | THREADS_LINK="" | |
1159 | THREADS_OBJ="" | |
1160 | ||
1161 | if test "$wxUSE_THREADS" = "yes"; then | |
1162 | dnl find if POSIX threads are available | |
1163 | ||
1164 | dnl standard lib name is pthread | |
1165 | dnl We no longer test for pthread-0.7 as it breaks compilation on some | |
1166 | dnl glibc2 systems, especially for static linkage. | |
1167 | AC_CHECK_LIB(pthread, pthread_create, [ | |
1168 | THREADS_OBJ="threadpsx.lo" | |
1169 | THREADS_LINK="pthread" | |
1170 | ], [ | |
1171 | dnl thread functions are in libc_r under FreeBSD | |
1172 | AC_CHECK_LIB(c_r, pthread_create, [ | |
1173 | THREADS_OBJ="threadpsx.lo" | |
1174 | THREADS_LINK="c_r" | |
1175 | ], [ | |
1176 | dnl VZ: SGI threads are not supported currently | |
1177 | AC_CHECK_HEADER(sys/prctl.h, [ | |
1178 | THREADS_OBJ="threadsgi.lo" | |
1179 | ]) | |
1180 | ]) | |
1181 | ]) | |
1182 | if test "$THREADS_LINK" != ""; then | |
1183 | AC_DEFINE(wxUSE_THREADS) | |
1184 | else | |
1185 | AC_MSG_WARN(No thread support on this system) | |
1186 | fi | |
1187 | fi | |
1188 | ||
1189 | if test -z "$THREADS_OBJ"; then | |
1190 | wxUSE_THREADS=no | |
1191 | fi | |
1192 | ||
1193 | dnl do other tests only if we are using threads | |
1194 | if test "$wxUSE_THREADS" = "yes"; then | |
1195 | dnl must define _REENTRANT for multithreaded code | |
1196 | CFLAGS="${CFLAGS} -D_REENTRANT" | |
1197 | CXXFLAGS="${CXXFLAGS} -D_REENTRANT" | |
1198 | ||
1199 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread" | |
239bca2e | 1200 | dnl LTLIBOBJS="$LTLIBOBJS $THREADS_OBJ" |
9a98a854 VZ |
1201 | |
1202 | dnl define autoconf macro to check for given function in both pthread and | |
1203 | dnl posix4 libraries | |
1204 | dnl usage: AC_FUNC_THREAD(FUNCTION_NAME) | |
1205 | dnl VZ: TODO | |
1206 | dnl AC_DEFUN(AC_FUNC_THREAD, | |
1207 | dnl [ | |
1208 | dnl AC_CHECK_LIB($THREADS_LINK, $1, | |
1209 | dnl AC_DEFINE(HAVE_`'translit($1, `A-Z', 'a-z'), | |
1210 | dnl [AC_CHECK_LIB("posix4", $1, | |
1211 | dnl [AC_DEFINE(HAVE_`'translit($1, `A-Z', 'a-z')) | |
1212 | dnl POSIX4_LINK="-lposix4" | |
1213 | dnl ]) | |
1214 | dnl ]) | |
1215 | dnl ]) | |
1216 | ||
1217 | AC_CHECK_HEADERS(sched.h) | |
1218 | ||
1219 | AC_CHECK_LIB($THREADS_LINK, sched_yield, | |
1220 | AC_DEFINE(HAVE_SCHED_YIELD), | |
1221 | [AC_CHECK_LIB("posix4", sched_yield, | |
1222 | [AC_DEFINE(HAVE_SCHED_YIELD) POSIX4_LINK="-lposix4"], | |
1223 | AC_MSG_WARN(wxThread::Yield will not work properly) | |
1224 | )] | |
1225 | ) | |
1226 | ||
1227 | dnl VZ: we should be checking for all of the following functions instead: | |
1228 | dnl 1. pthread_attr_getschedpolicy | |
1229 | dnl 2. sched_get_priority_min and sched_get_priority_max | |
1230 | dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam | |
1231 | dnl but it seems that if the first one is there, the other ones are too (of | |
1232 | dnl course the proper solution would be to implement AC_FUNC_THREAD above | |
1233 | dnl and do test for them all - anyone?) | |
1234 | AC_CHECK_LIB($THREADS_LINK, pthread_attr_getschedpolicy, | |
1235 | AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS), | |
1236 | [AC_CHECK_LIB("posix4", pthread_attr_getschedpolicy, | |
1237 | [AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS) POSIX4_LINK="-lposix4"], | |
1238 | AC_MSG_WARN(Setting thread priority will not work) | |
1239 | )] | |
1240 | ) | |
1241 | ||
1242 | AC_CHECK_LIB($THREADS_LINK, pthread_cancel, | |
1243 | AC_DEFINE(HAVE_PTHREAD_CANCEL), | |
1244 | AC_MSG_WARN([wxThread::Kill() will not work properly])) | |
1245 | ||
1246 | AC_CACHE_CHECK([for pthread_cleanup_push/pop], wx_cv_func_pthread_cleanup_push, | |
1247 | [ | |
1248 | AC_TRY_COMPILE([#include <pthread.h>], | |
1249 | [ | |
1250 | pthread_cleanup_push(NULL, NULL); | |
1251 | pthread_cleanup_pop(0); | |
1252 | ], [ | |
1253 | wx_cv_func_pthread_cleanup_push=yes | |
1254 | AC_DEFINE(HAVE_THREAD_CLEANUP_FUNCTIONS) | |
1255 | ], [ | |
1256 | wx_cv_func_pthread_cleanup_push=no | |
1257 | ]) | |
1258 | ]) | |
1259 | ||
1260 | THREADS_LINK="-l$THREADS_LINK" | |
1261 | fi | |
1262 | ||
1263 | if test "$WXGTK12" = 1 ; then | |
1264 | AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12) | |
1265 | fi | |
1266 | ||
1267 | WXDEBUG= | |
1268 | if test "$wxUSE_DEBUG_GDB" = "yes" ; then | |
1269 | wxUSE_DEBUG_INFO=yes | |
1270 | WXDEBUG="-ggdb" | |
1271 | fi | |
1272 | ||
1273 | if test "$wxUSE_DEBUG_INFO" = "yes" ; then | |
1274 | WXDEBUG="-g" | |
1275 | wxUSE_OPTIMISE=no | |
1276 | fi | |
1277 | ||
1278 | if test "$wxUSE_DEBUG_FLAG" = "yes" ; then | |
1279 | AC_DEFINE(WXDEBUG) | |
1280 | WXDEBUG_DEFINE="-D__WXDEBUG__" | |
1281 | else | |
1282 | WXDEBUG_DEFINE="-DGTK_NO_CHECK_CASTS" | |
1283 | fi | |
1284 | ||
1285 | if test "$wxUSE_MEM_TRACING" = "yes" ; then | |
1286 | AC_DEFINE(wxUSE_MEMORY_TRACING) | |
1287 | AC_DEFINE(wxUSE_GLOBAL_MEMORY_OPERATORS) | |
1288 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS memcheck" | |
1289 | fi | |
1290 | ||
1291 | if test "$wxUSE_DMALLOC" = "yes" ; then | |
1292 | DMALLOC_LINK="-ldmalloc" | |
1293 | fi | |
1294 | ||
1295 | PROFILE= | |
1296 | if test "$wxUSE_PROFILE" = "yes" ; then | |
1297 | PROFILE="-pg" | |
1298 | fi | |
1299 | ||
1300 | CXXFLAGS=`echo "${CXXFLAGS}" | sed "s/\-O.//g" ` | |
1301 | CFLAGS=`echo "${CFLAGS}" | sed "s/\-O.//g" ` | |
1302 | if test "$wxUSE_OPTIMISE" = "no" ; then | |
1303 | OPTIMISE= | |
1304 | else | |
1305 | if test "$GCC" = yes ; then | |
1306 | OPTIMISE="-O2" | |
1307 | case "${host}" in | |
1308 | i586-*-*|i686-*-* ) | |
1309 | OPTIMISE="${OPTIMISE} " | |
1310 | ;; | |
1311 | esac | |
1312 | else | |
1313 | OPTIMISE="-O" | |
1314 | fi | |
1315 | fi | |
1316 | ||
1317 | dnl --------------------------------------------------------------------------- | |
1318 | dnl Optional libraries | |
1319 | dnl --------------------------------------------------------------------------- | |
1320 | ||
1321 | if test "$wxUSE_ZLIB" = "yes" ; then | |
1322 | AC_DEFINE(wxUSE_ZLIB) | |
09fbacf7 | 1323 | EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../zlib" |
9a98a854 | 1324 | LTLIBOBJS="$LTLIBOBJS adler32.lo compress.lo crc32.lo gzio.lo uncompr.lo deflate.lo trees.lo zutil.lo inflate.lo infblock.lo inftrees.lo infcodes.lo infutil.lo inffast.lo" |
9a98a854 VZ |
1325 | fi |
1326 | ||
1327 | if test "$wxUSE_LIBPNG" = "yes" ; then | |
1328 | AC_DEFINE(wxUSE_LIBPNG) | |
09fbacf7 RR |
1329 | LTLIBOBJS="$LTLIBOBJS png.lo pngset.lo pngget.lo pngrutil.lo pngtrans.lo pngwutil.lo pngread.lo pngrio.lo pngwio.lo pngwrite.lo pngrtran.lo pngwtran.lo pngmem.lo pngerror.lo pngpread.lo" |
1330 | EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../png" | |
9a98a854 VZ |
1331 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png" |
1332 | fi | |
1333 | ||
1334 | if test "$wxUSE_LIBGIF" = "yes" ; then | |
1335 | AC_DEFINE(wxUSE_LIBGIF) | |
9a98a854 VZ |
1336 | fi |
1337 | ||
1338 | if test "$wxUSE_LIBJPEG" = "yes" ; then | |
1339 | AC_DEFINE(wxUSE_LIBJPEG) | |
09fbacf7 RR |
1340 | EXTRA_VPATH="$EXTRA_VPATH:\${srcdir}/../jpeg" |
1341 | LTLIBOBJS="$LTLIBOBJS \ | |
9a98a854 VZ |
1342 | jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo \ |
1343 | jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo \ | |
1344 | jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo \ | |
1345 | jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo \ | |
1346 | jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo \ | |
1347 | jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo \ | |
1348 | jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo \ | |
1349 | jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo \ | |
1350 | jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo \ | |
1351 | jquant1.lo jquant2.lo jdmerge.lo" | |
1352 | fi | |
1353 | ||
1354 | if test "$wxUSE_OPENGL" = "yes"; then | |
1355 | AC_CHECK_HEADER(GL/gl.h, [ | |
1356 | AC_CHECK_LIB(GL, glInitNames, [ | |
1357 | OPENGL_LINK="-lGL" | |
1358 | AC_DEFINE(wxUSE_OPENGL) | |
1359 | UTILS_SUBDIRS="$UTILS_SUBDIRS glcanvas/src" | |
1360 | ],[ | |
1361 | AC_CHECK_LIB(MesaGL, glInitNames, [ | |
1362 | OPENGL_LINK="-lMesaGL" | |
1363 | AC_DEFINE(wxUSE_OPENGL) | |
1364 | UTILS_SUBDIRS="$UTILS_SUBDIRS glcanvas/src" | |
1365 | ],wxUSE_OPENGL=0) | |
1366 | ],wxUSE_OPENGL=0) | |
1367 | ],wxUSE_OPENGL=0) | |
1368 | fi | |
1369 | ||
1370 | dnl --------------------------------------------------------------------------- | |
1371 | dnl the library may be built without GUI classes at all | |
1372 | dnl --------------------------------------------------------------------------- | |
1373 | ||
1374 | if test "$wxUSE_GUI" = "yes"; then | |
1375 | AC_DEFINE(wxUSE_GUI) | |
1376 | ||
1377 | dnl the things we always pull in the GUI version of the library: | |
1378 | dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the | |
1379 | dnl library really can't be built without those) | |
1380 | dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in | |
1381 | dnl almost any program and the first 2 are needed to show a message box | |
1382 | dnl which want to be always able to do) | |
1383 | dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice | |
1384 | dnl to compile without them (if the app doesn't do any drawing, it doesn't | |
1385 | dnl need the dcs, pens, brushes, ...), this just can't be done now | |
1386 | dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem | |
1387 | dnl 5. misc stuff: timers, settings, message box | |
09fbacf7 RR |
1388 | dnl LTLIBOBJS="$LTLIBOBJS \ |
1389 | dnl main.lo app.lo event.lo wincmn.lo window.lo control.lo framecmn.lo frame.lo dialog.lo panelg.lo \ | |
1390 | dnl button.lo stattext.lo textctrl.lo \ | |
1391 | dnl bitmap.lo brush.lo colour.lo cursor.lo data.lo dc.lo dcbase.lo dcclient.lo \ | |
1392 | dnl dcmemory.lo dcscreen.lo font.lo gdicmn.lo gdiobj.lo icon.lo palette.lo pen.lo region.lo \ | |
1393 | dnl menu.lo \ | |
1394 | dnl settings.lo timer.lo msgdlgg.lo" | |
9a98a854 VZ |
1395 | else |
1396 | AC_DEFINE(wxUSE_NOGUI) | |
1397 | fi | |
1398 | ||
1399 | dnl --------------------------------------------------------------------------- | |
1400 | dnl Unix/Windows | |
1401 | dnl --------------------------------------------------------------------------- | |
1402 | ||
1403 | if test "$wxUSE_UNIX" = "yes"; then | |
1404 | AC_DEFINE(wxUSE_UNIX) | |
9a98a854 VZ |
1405 | fi |
1406 | ||
1407 | dnl --------------------------------------------------------------------------- | |
1408 | dnl Register non-GUI class options for makefiles and setup.h | |
1409 | dnl --------------------------------------------------------------------------- | |
1410 | ||
1411 | if test "$wxUSE_APPLE_IEEE" = "yes"; then | |
1412 | AC_DEFINE(wxUSE_APPLE_IEEE) | |
9a98a854 VZ |
1413 | fi |
1414 | ||
1415 | if test "$wxUSE_TIMEDATE" = "yes"; then | |
1416 | AC_DEFINE(wxUSE_TIMEDATE) | |
9a98a854 VZ |
1417 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest" |
1418 | fi | |
1419 | ||
1420 | if test "$wxUSE_FILE" = "yes"; then | |
1421 | AC_DEFINE(wxUSE_FILE) | |
9a98a854 VZ |
1422 | fi |
1423 | ||
1424 | if test "$wxUSE_TEXTFILE" = "yes"; then | |
1425 | if test "$wxUSE_FILE" != "yes"; then | |
1426 | AC_MSG_WARN(wxTextFile requires wxFile and it won't be compiled without it) | |
1427 | else | |
1428 | AC_DEFINE(wxUSE_TEXTFILE) | |
9a98a854 VZ |
1429 | fi |
1430 | fi | |
1431 | ||
1432 | if test "$wxUSE_CONFIG" = "yes" ; then | |
1433 | if test "$wxUSE_TEXTFILE" != "yes"; then | |
1434 | AC_MSG_WARN(wxConfig requires wxTextFile and it won't be compiled without it) | |
1435 | else | |
1436 | AC_DEFINE(wxUSE_CONFIG) | |
9a98a854 VZ |
1437 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS config" |
1438 | fi | |
1439 | fi | |
1440 | ||
1441 | if test "$wxUSE_INTL" = "yes" ; then | |
1442 | if test "$wxUSE_FILE" != "yes"; then | |
1443 | AC_MSG_WARN(I18n code requires wxFile and it won't be compiled without it) | |
1444 | else | |
1445 | AC_DEFINE(wxUSE_INTL) | |
9a98a854 VZ |
1446 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS internat" |
1447 | fi | |
1448 | fi | |
1449 | ||
1450 | if test "$wxUSE_LOG" = "yes"; then | |
1451 | AC_DEFINE(wxUSE_LOG) | |
9a98a854 VZ |
1452 | fi |
1453 | ||
1454 | if test "$wxUSE_LONGLONG" = "yes"; then | |
1455 | AC_DEFINE(wxUSE_LONGLONG) | |
9a98a854 VZ |
1456 | fi |
1457 | ||
1458 | if test "$wxUSE_SOCKETS" = "yes" ; then | |
1459 | if test "$wxUSE_THREADS" = "yes" ; then | |
1460 | AC_DEFINE(wxUSE_SOCKETS) | |
9a98a854 | 1461 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wxsocket" |
ff684c98 | 1462 | INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS protocol" |
9a98a854 VZ |
1463 | else |
1464 | AC_MSG_WARN(socket classes require --with-threads and won't be compiled without it) | |
1465 | wxUSE_SOCKETS=0 | |
1466 | fi | |
1467 | fi | |
1468 | ||
1469 | if test "$wxUSE_STREAMS" = "yes" ; then | |
1470 | AC_DEFINE(wxUSE_STREAMS) | |
9a98a854 VZ |
1471 | fi |
1472 | ||
1473 | if test "$wxUSE_SERIAL" = "yes" ; then | |
1474 | AC_DEFINE(wxUSE_SERIAL) | |
1475 | fi | |
1476 | ||
1477 | dnl ------------------------------------------------------------------------ | |
1478 | dnl wxSocket | |
1479 | dnl ------------------------------------------------------------------------ | |
1480 | ||
1481 | if test "$wxUSE_SOCKETS" = "yes"; then | |
1482 | AC_LANG_SAVE | |
1483 | AC_LANG_CPLUSPLUS | |
1484 | dnl determine the type of third argument for getsockname | |
1485 | AC_MSG_CHECKING(the type of the third argument of getsockname) | |
1486 | AC_TRY_COMPILE( | |
1487 | [#include <sys/socket.h>], | |
1488 | [socklen_t len; getsockname(0, NULL, &len);], | |
1489 | AC_DEFINE(SOCKLEN_T, socklen_t) AC_MSG_RESULT(socklen_t), | |
1490 | AC_TRY_COMPILE( | |
1491 | [#include <sys/socket.h>], | |
1492 | [size_t len; getsockname(0, NULL, &len);], | |
1493 | AC_DEFINE(SOCKLEN_T, size_t) AC_MSG_RESULT(size_t), | |
1494 | AC_TRY_COMPILE( | |
1495 | [#include <sys/socket.h>], | |
1496 | [int len; getsockname(0, NULL, &len);], | |
1497 | AC_DEFINE(SOCKLEN_T, int) AC_MSG_RESULT(int), | |
1498 | AC_MSG_RESULT(unknown) | |
1499 | ) | |
1500 | ) | |
1501 | ) | |
1502 | AC_LANG_RESTORE | |
1503 | fi | |
1504 | ||
1505 | dnl --------------------------------------------------------------------------- | |
1506 | dnl Joystick support | |
1507 | dnl --------------------------------------------------------------------------- | |
1508 | ||
1509 | if test "$wxUSE_JOYSTICK" = 1; then | |
1510 | dnl joystick support is only for Linux 2.1.x or greater | |
1511 | AC_CHECK_HEADERS(linux/joystick.h) | |
1512 | if test "$ac_cv_header_linux_joystick_h" = "yes"; then | |
1513 | AC_DEFINE(wxUSE_JOYSTICK) | |
9a98a854 VZ |
1514 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" |
1515 | fi | |
1516 | fi | |
1517 | ||
1518 | dnl ------------------------------------------------------------------------ | |
1519 | dnl DLL support | |
1520 | dnl ------------------------------------------------------------------------ | |
1521 | ||
1522 | HAVE_DL_FUNCS=0 | |
1523 | HAVE_SHL_FUNCS=0 | |
1524 | if test "$wxUSE_DYNLIB_CLASS" = "yes"; then | |
1525 | dnl the test is a bit complicated because we check for dlopen() both with | |
1526 | dnl and without -ldl | |
1527 | AC_CHECK_FUNCS(dlopen, | |
1528 | [AC_DEFINE(HAVE_DLOPEN) HAVE_DL_FUNCS=1], | |
1529 | [AC_CHECK_LIB(dl, dlopen, | |
1530 | [AC_DEFINE(HAVE_DLOPEN) HAVE_DL_FUNCS=1])]) | |
1531 | AC_CHECK_FUNCS( shl_load, | |
1532 | [AC_DEFINE(HAVE_SHL_LOAD) HAVE_DL_FUNCS=1 HAVE_SHL_FUNCS=1]) | |
1533 | ||
1534 | if test "$HAVE_DL_FUNCS" = 0; then | |
1535 | AC_MSG_WARN("--with-dynlib and --with-odbc will be disabled due to missing shared library support") | |
1536 | wxUSE_ODBC=no | |
1537 | wxUSE_DYNLIB_CLASS=no | |
1538 | fi | |
1539 | fi | |
1540 | ||
1541 | if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then | |
1542 | AC_DEFINE(wxUSE_DYNLIB_CLASS) | |
9a98a854 VZ |
1543 | fi |
1544 | ||
1545 | dnl --------------------------------------------------------------------------- | |
1546 | dnl Unicode | |
1547 | dnl --------------------------------------------------------------------------- | |
1548 | ||
1549 | if test "$wxUSE_UNICODE" = "yes" ; then | |
1550 | AC_DEFINE(wxUSE_UNICODE) | |
1551 | fi | |
1552 | ||
1553 | if test "$wxUSE_WCSRTOMBS" = "yes" ; then | |
1554 | AC_DEFINE(wxUSE_WCSRTOMBS) | |
1555 | fi | |
1556 | ||
1557 | dnl ---------------------------------------------------------------- | |
1558 | dnl iODBC support | |
1559 | dnl ---------------------------------------------------------------- | |
1560 | ||
1561 | IODBC_C_SRC="" | |
1562 | if test "$wxUSE_ODBC" = "yes" ; then | |
1563 | AC_DEFINE(wxUSE_ODBC) | |
09fbacf7 | 1564 | EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../iodbc" |
9a98a854 VZ |
1565 | LTLIBOBJS="$LTLIBOBJS catalog.lo connect.lo dlf.lo dlproc.lo execute.lo fetch.lo hdbc.lo henv.lo herr.lo hstmt.lo info.lo itrace.lo misc.lo prepare.lo result.lo" |
1566 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db" | |
1567 | fi | |
1568 | ||
1569 | dnl ---------------------------------------------------------------- | |
1570 | dnl Register PostScript options for makefiles and setup.h | |
1571 | dnl ---------------------------------------------------------------- | |
1572 | ||
1573 | if test "$wxUSE_POSTSCRIPT" = "yes" ; then | |
1574 | AC_DEFINE(wxUSE_POSTSCRIPT) | |
9a98a854 VZ |
1575 | fi |
1576 | ||
1577 | AC_DEFINE(wxUSE_AFM_FOR_POSTSCRIPT) | |
1578 | ||
1579 | AC_DEFINE(wxUSE_NORMALIZED_PS_FONTS) | |
1580 | ||
1581 | dnl --------------------------------------------------------------------------- | |
1582 | dnl big GUI components: MDI, doc/view, printing, help, ... | |
1583 | dnl --------------------------------------------------------------------------- | |
1584 | ||
1585 | if test "$wxUSE_CONSTRAINTS" = "yes"; then | |
1586 | AC_DEFINE(wxUSE_CONSTRAINTS) | |
9a98a854 VZ |
1587 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS layout" |
1588 | fi | |
1589 | ||
1590 | if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then | |
1591 | AC_DEFINE(wxUSE_MDI_ARCHITECTURE) | |
9a98a854 VZ |
1592 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mdi" |
1593 | fi | |
1594 | ||
1595 | if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = "yes" ; then | |
1596 | AC_DEFINE(wxUSE_DOC_VIEW_ARCHITECTURE) | |
9a98a854 VZ |
1597 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docview" |
1598 | if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then | |
9a98a854 VZ |
1599 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docvwmdi" |
1600 | fi | |
1601 | fi | |
1602 | ||
1603 | if test "$wxUSE_HELP" = "yes"; then | |
1604 | AC_DEFINE(wxUSE_HELP) | |
9a98a854 VZ |
1605 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help" |
1606 | fi | |
1607 | ||
1608 | if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then | |
1609 | AC_DEFINE(wxUSE_PRINTING_ARCHITECTURE) | |
9a98a854 VZ |
1610 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS printing" |
1611 | fi | |
1612 | ||
1613 | if test "$wxUSE_PROLOGIO" = "yes" ; then | |
1614 | AC_DEFINE(wxUSE_PROLOGIO) | |
9a98a854 VZ |
1615 | fi |
1616 | ||
1617 | if test "$wxUSE_RESOURCES" = "yes" ; then | |
1618 | if test "$wxUSE_PROLOGIO" = "yes" ; then | |
1619 | AC_DEFINE(wxUSE_RESOURCES) | |
9a98a854 VZ |
1620 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" |
1621 | else | |
1622 | AC_MSG_WARN([wxWindows ressource system requires PrologIO and can't be compiled without it.]) | |
1623 | fi | |
1624 | fi | |
1625 | ||
1626 | if test "$wxUSE_X_RESOURCES" = "yes"; then | |
1627 | AC_DEFINE(wxUSE_X_RESOURCES) | |
1628 | fi | |
1629 | ||
1630 | dnl --------------------------------------------------------------------------- | |
1631 | dnl IPC: IPC, d-n-d, clipboard, ... | |
1632 | dnl --------------------------------------------------------------------------- | |
1633 | ||
1634 | if test "$wxUSE_IPC" = "yes"; then | |
1635 | AC_DEFINE(wxUSE_IPC) | |
9a98a854 VZ |
1636 | fi |
1637 | ||
1638 | if test "$wxUSE_CLIPBOARD" = "yes"; then | |
1639 | AC_DEFINE(wxUSE_CLIPBOARD) | |
9a98a854 VZ |
1640 | fi |
1641 | ||
1642 | if test "$wxUSE_DRAG_AND_DROP" = "yes"; then | |
1643 | if test "$WXGTK12" = 1 ; then | |
1644 | AC_DEFINE(wxUSE_DRAG_AND_DROP) | |
9a98a854 | 1645 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd" |
9a98a854 VZ |
1646 | else |
1647 | AC_MSG_WARN(drag and drop is only supported under GTK 1.2) | |
1648 | fi | |
1649 | fi | |
1650 | ||
1651 | if test "$wxUSE_SPLINES" = "yes" ; then | |
1652 | AC_DEFINE(wxUSE_SPLINES) | |
1653 | fi | |
1654 | ||
1655 | dnl --------------------------------------------------------------------------- | |
1656 | dnl GUI controls | |
1657 | dnl --------------------------------------------------------------------------- | |
1658 | ||
1659 | if test "$wxUSE_ACCEL" = "yes"; then | |
1660 | AC_DEFINE(wxUSE_ACCEL) | |
9a98a854 VZ |
1661 | fi |
1662 | ||
1663 | if test "$wxUSE_CARET" = "yes"; then | |
1664 | AC_DEFINE(wxUSE_CARET) | |
9a98a854 VZ |
1665 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret" |
1666 | fi | |
1667 | ||
1668 | if test "$wxUSE_COMBOBOX" = "yes"; then | |
1669 | AC_DEFINE(wxUSE_COMBOBOX) | |
9a98a854 VZ |
1670 | fi |
1671 | ||
1672 | if test "$wxUSE_BMPBUTTON" = "yes"; then | |
1673 | AC_DEFINE(wxUSE_BMPBUTTON) | |
9a98a854 VZ |
1674 | fi |
1675 | ||
1676 | if test "$wxUSE_CHECKBOX" = "yes"; then | |
1677 | AC_DEFINE(wxUSE_CHECKBOX) | |
9a98a854 VZ |
1678 | fi |
1679 | ||
1680 | if test "$wxUSE_CHECKLST" = "yes"; then | |
1681 | AC_DEFINE(wxUSE_CHECKLISTBOX) | |
9a98a854 VZ |
1682 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst" |
1683 | fi | |
1684 | ||
1685 | if test "$wxUSE_GAUGE" = "yes"; then | |
1686 | AC_DEFINE(wxUSE_GAUGE) | |
9a98a854 VZ |
1687 | fi |
1688 | ||
1689 | if test "$wxUSE_GRID" = "yes"; then | |
1690 | AC_DEFINE(wxUSE_GRID) | |
9a98a854 VZ |
1691 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS grid" |
1692 | fi | |
1693 | ||
1694 | if test "$wxUSE_IMAGLIST" = "yes"; then | |
1695 | AC_DEFINE(wxUSE_IMAGLIST) | |
9a98a854 VZ |
1696 | fi |
1697 | ||
1698 | if test "$wxUSE_LISTBOX" = "yes"; then | |
1699 | AC_DEFINE(wxUSE_LISTBOX) | |
9a98a854 VZ |
1700 | fi |
1701 | ||
1702 | if test "$wxUSE_LISTCTRL" = "yes"; then | |
1703 | if test "$wxUSE_IMAGLIST" = "yes"; then | |
1704 | AC_DEFINE(wxUSE_LISTCTRL) | |
9a98a854 VZ |
1705 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listctrl" |
1706 | else | |
1707 | AC_MSG_WARN([wxListCtrl requires wxImageList and won't be compiled without it]) | |
1708 | fi | |
1709 | fi | |
1710 | ||
1711 | if test "$wxUSE_NOTEBOOK" = "yes"; then | |
1712 | AC_DEFINE(wxUSE_NOTEBOOK) | |
9a98a854 VZ |
1713 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" |
1714 | fi | |
1715 | ||
1716 | if test "$wxUSE_RADIOBOX" = "yes"; then | |
1717 | AC_DEFINE(wxUSE_RADIOBOX) | |
9a98a854 VZ |
1718 | fi |
1719 | ||
1720 | if test "$wxUSE_RADIOBTN" = "yes"; then | |
1721 | AC_DEFINE(wxUSE_RADIOBTN) | |
9a98a854 VZ |
1722 | fi |
1723 | ||
79b00c62 | 1724 | if test "$wxUSE_SASH" = "yes"; then |
9a98a854 | 1725 | AC_DEFINE(wxUSE_SASH) |
9a98a854 VZ |
1726 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sashtest" |
1727 | fi | |
1728 | ||
1729 | if test "$wxUSE_SCROLLBAR" = "yes"; then | |
1730 | AC_DEFINE(wxUSE_SCROLLBAR) | |
9a98a854 VZ |
1731 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS scroll" |
1732 | fi | |
1733 | ||
1734 | if test "$wxUSE_SLIDER" = "yes"; then | |
1735 | AC_DEFINE(wxUSE_SLIDER) | |
9a98a854 VZ |
1736 | fi |
1737 | ||
1738 | if test "$wxUSE_SPINBTN" = "yes"; then | |
1739 | AC_DEFINE(wxUSE_SPINBTN) | |
9a98a854 VZ |
1740 | fi |
1741 | ||
1742 | if test "$wxUSE_SPLITTER" = "yes"; then | |
1743 | AC_DEFINE(wxUSE_SPLITTER) | |
9a98a854 VZ |
1744 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splitter" |
1745 | fi | |
1746 | ||
1747 | if test "$wxUSE_STATBMP" = "yes"; then | |
1748 | AC_DEFINE(wxUSE_STATBMP) | |
9a98a854 VZ |
1749 | fi |
1750 | ||
1751 | if test "$wxUSE_STATBOX" = "yes"; then | |
1752 | AC_DEFINE(wxUSE_STATBOX) | |
9a98a854 VZ |
1753 | fi |
1754 | ||
1755 | if test "$wxUSE_STATLINE" = "yes"; then | |
1756 | AC_DEFINE(wxUSE_STATLINE) | |
9a98a854 VZ |
1757 | fi |
1758 | ||
1759 | if test "$wxUSE_STATUSBAR" = "yes"; then | |
1760 | AC_DEFINE(wxUSE_STATUSBAR) | |
9a98a854 VZ |
1761 | fi |
1762 | ||
1763 | if test "$wxUSE_TABDIALOG" = "yes"; then | |
1764 | AC_DEFINE(wxUSE_TAB_DIALOG) | |
9a98a854 VZ |
1765 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS tab" |
1766 | fi | |
1767 | ||
1768 | if test "$wxUSE_TOOLBAR" = "yes"; then | |
1769 | AC_DEFINE(wxUSE_TOOLBAR) | |
9a98a854 VZ |
1770 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS toolbar" |
1771 | fi | |
1772 | ||
1773 | if test "$wxUSE_TOOLTIPS" = "yes" ; then | |
1774 | if test "$wxUSE_MOTIF" = "yes"; then | |
1775 | AC_MSG_WARN(tooltips are not supported yet under Motif) | |
1776 | else | |
1777 | AC_DEFINE(wxUSE_TOOLTIPS) | |
9a98a854 VZ |
1778 | fi |
1779 | fi | |
1780 | ||
1781 | if test "$wxUSE_TREECTRL" = "yes"; then | |
1782 | if test "$wxUSE_IMAGLIST" = "yes"; then | |
1783 | AC_DEFINE(wxUSE_TREECTRL) | |
9a98a854 VZ |
1784 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treectrl" |
1785 | else | |
1786 | AC_MSG_WARN([wxTreeCtrl requires wxImageList and won't be compiled without it]) | |
1787 | fi | |
1788 | fi | |
1789 | ||
1790 | dnl --------------------------------------------------------------------------- | |
1791 | dnl misc options | |
1792 | dnl --------------------------------------------------------------------------- | |
1793 | ||
ff684c98 VZ |
1794 | dnl TODO this is unused for now... |
1795 | dnl if test "$wxUSE_WXTREE" = "yes"; then | |
1796 | dnl AC_DEFINE(wxUSE_WXTREE) | |
1797 | dnl fi | |
9a98a854 VZ |
1798 | |
1799 | if test "$wxUSE_METAFILE" = "yes"; then | |
1800 | AC_DEFINE(wxUSE_METAFILE) | |
9a98a854 VZ |
1801 | fi |
1802 | ||
1803 | if test "$wxUSE_COMMONDLGS" = "yes"; then | |
1804 | dnl these classes don't depend on anything at all | |
9a98a854 VZ |
1805 | |
1806 | if test "$wxUSE_CONSTRAINTS" != "yes"; then | |
1807 | AC_MSG_WARN(many common dialogs cannot be used without constraints so they won't be compiled without them) | |
1808 | else | |
1809 | AC_DEFINE(wxUSE_CONSTRAINTS) | |
1810 | AC_DEFINE(wxUSE_TEXTDLG) | |
9a98a854 VZ |
1811 | |
1812 | if test "$wxUSE_TREECTRL" != "yes"; then | |
1813 | AC_MSG_WARN(wxDirDialog cannot be used without wxTreeCtrl and it won't be compiled without it) | |
1814 | else | |
1815 | AC_DEFINE(wxUSE_DIRDLG) | |
9a98a854 VZ |
1816 | fi |
1817 | fi | |
1818 | ||
09fbacf7 | 1819 | if test "$wxUSE_PRINTING_ARCHITECTURE" = "no"; then |
9a98a854 VZ |
1820 | AC_MSG_WARN([wxPrintDialog class won't be compiled without printing support]) |
1821 | fi | |
1822 | fi | |
1823 | ||
1824 | if test "$wxUSE_MINIFRAME" = "yes"; then | |
1825 | AC_DEFINE(wxUSE_MINIFRAME) | |
9a98a854 VZ |
1826 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS minifram" |
1827 | fi | |
1828 | ||
1829 | if test "$wxUSE_VALIDATORS" = "yes"; then | |
1830 | AC_DEFINE(wxUSE_VALIDATORS) | |
9a98a854 VZ |
1831 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate" |
1832 | fi | |
1833 | ||
1834 | dnl --------------------------------------------------------------------------- | |
1835 | dnl Output the makefiles and such from the results found above | |
1836 | dnl --------------------------------------------------------------------------- | |
1837 | ||
1838 | dnl if we add wxUSE_GUI in the future, it might be handy to separate the libs | |
1839 | dnl into GUI and non-GUI parts | |
1840 | GUILIBS="$GUI_TK_LIBRARY $OPENGL_LINK $LIBPNG_LINK $ZLIB_LINK $TOOLKIT_LINK" | |
1841 | ||
1842 | dnl all additional libraries (except wxWindows itself) we link with | |
1843 | EXTRA_LIBS="$LIBS $POSIX4_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $GUILIBS" | |
1844 | ||
1845 | dnl all the libraries needed to link wxWindows programs (when the library is not | |
1846 | dnl yet installed) | |
47b61a78 | 1847 | LIBS="\${top_builddir}/src/${TOOLKIT_DIR}/${WX_LIBRARY_NAME} $EXTRA_LIBS" |
9a98a854 VZ |
1848 | |
1849 | dnl all -I options we must pass to the compiler | |
f61757b1 | 1850 | INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include $TOOLKIT_INCLUDE $ZLIB_INCLUDE $LIBPNG_INCLUDE" |
9a98a854 VZ |
1851 | |
1852 | dnl C/C++ compiler options used to compile wxWindows | |
1853 | if test "$ac_cv_prog_gcc" = "yes"; then | |
1854 | dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror" | |
1855 | CXXWARNINGS="-Wall" | |
1856 | dnl there is one weird warning in docview.h:71 which prevents me from doing | |
1857 | dnl this... | |
1858 | dnl CXXWARNINGS="-Wall -Werror" | |
1859 | fi | |
1860 | EXTRA_CFLAGS="$WXDEBUG $PROFILE $OPTIMISE $INCLUDES" | |
1861 | ||
1862 | CFLAGS="$CFLAGS $EXTRA_CFLAGS" | |
1863 | CXXFLAGS="$CXXFLAGS $EXTRA_CFLAGS $CXXWARNINGS" | |
1864 | ||
1865 | if test "$wxUSE_GUI" = "yes"; then | |
1866 | dnl TODO add checks that these samples will really compile (i.e. all the | |
1867 | dnl library features they need are present) | |
1868 | ||
1869 | dnl TODO some samples are never built so far: | |
1870 | dnl mfc, nativdlg, oleauto, ownerdrw, proplist | |
1871 | SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS bombs controls dialogs drawing dynamic \ | |
1872 | forty fractal image wxpoem" | |
1873 | fi | |
1874 | ||
70d1b3cf VZ |
1875 | dnl for convenience, sort the files to build in alphabetical order |
1876 | dnl | |
1877 | dnl another shell command to do it which might be faster but is less clear: | |
1878 | dnl LTLIBOBJS="`for obj in $LTLIBOBJS; do echo $obj; done | sort | sed 's@^@ @'`" | |
1879 | LTLIBOBJS="`echo $LTLIBOBJS | tr -s ' ' | tr ' ' '\n' | sort | tr '\n' ' '`" | |
1880 | ||
1881 | dnl for convenience, sort the samples in alphabetical order | |
1882 | dnl | |
1883 | dnl FIXME For some mysterious reasons, sometimes the directories are duplicated | |
1884 | dnl in this list - hence uniq. But normally, this shouldn't be needed! | |
1885 | SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq | tr '\n' ' '`" | |
1886 | ||
9a98a854 VZ |
1887 | dnl global options |
1888 | AC_SUBST(WX_MAJOR_VERSION_NUMBER) | |
1889 | AC_SUBST(WX_MINOR_VERSION_NUMBER) | |
1890 | AC_SUBST(WX_RELEASE_NUMBER) | |
70d1b3cf | 1891 | AC_SUBST(WX_LIBRARY_NAME) |
2b6f061f | 1892 | AC_SUBST(WX_LIBRARY) |
9a98a854 VZ |
1893 | |
1894 | dnl suppress libtool's informational messages - they duplicate its command line | |
1895 | LIBTOOL="$LIBTOOL --silent" | |
1896 | AC_SUBST(LIBTOOL) | |
1897 | ||
1898 | dnl debugging options | |
1899 | AC_SUBST(WXDEBUG_DEFINE) | |
1900 | ||
1901 | dnl toolkit options | |
1902 | AC_SUBST(TOOLKIT) | |
1903 | AC_SUBST(TOOLKIT_DEF) | |
1904 | AC_SUBST(TOOLKIT_DIR) | |
1905 | AC_SUBST(TOOLKIT_INCLUDE) | |
1906 | ||
1907 | dnl additional sources | |
1908 | AC_SUBST(EXTRA_VPATH) | |
1909 | AC_SUBST(LTLIBOBJS) | |
1910 | ||
1911 | dnl additional subdirectories where we will build | |
bcd2b961 | 1912 | AC_SUBST(SRC_SUBDIRS) |
ff684c98 | 1913 | AC_SUBST(INCLUDE_SUBDIRS) |
9a98a854 VZ |
1914 | AC_SUBST(UTILS_SUBDIRS) |
1915 | AC_SUBST(DOCS_SUBDIRS) | |
1916 | AC_SUBST(SAMPLES_SUBDIRS) | |
1917 | AC_SUBST(USER_SUBDIRS) | |
1918 | ||
1919 | dnl additional libraries | |
1920 | AC_SUBST(EXTRA_LIBS) | |
1921 | AC_SUBST(LIBS) | |
1922 | ||
1923 | dnl create the configuration header file from the template | |
c7114f59 VZ |
1924 | dnl |
1925 | dnl NB: automake can't work correctly if our header lives in a directory which | |
1926 | dnl is only determined at configure time, so we create it on the top-level | |
1927 | dnl and make a link to allow '#include "wx/setup.h"' to still work | |
efeb0365 | 1928 | AM_CONFIG_HEADER(setup.h) |
9a98a854 VZ |
1929 | |
1930 | dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE | |
1931 | dnl itself (this is macro is required if SUBDIRS variable is used in Makefile.am | |
1932 | dnl - and we do use it) | |
1933 | AC_PROG_MAKE_SET | |
1934 | ||
1935 | dnl create each of the files in the space separated list from the file.in | |
1936 | dnl (the original file name may be overriden by appending another name after a | |
1937 | dnl colon) | |
1938 | AC_OUTPUT([ | |
ff684c98 | 1939 | wx-config |
bcd2b961 VZ |
1940 | Makefile |
1941 | src/Makefile | |
bcd2b961 | 1942 | src/gtk/Makefile |
ff684c98 VZ |
1943 | include/Makefile |
1944 | include/wx/Makefile | |
1945 | include/wx/generic/Makefile | |
1946 | include/wx/gtk/Makefile | |
1947 | include/wx/motif/Makefile | |
1948 | include/wx/msw/Makefile | |
1949 | include/wx/protocol/Makefile | |
1950 | include/wx/unix/Makefile | |
385bcb35 RR |
1951 | misc/Makefile |
1952 | misc/afm/Makefile | |
1953 | misc/gs_afm/Makefile | |
9a98a854 VZ |
1954 | samples/Makefile |
1955 | samples/bombs/Makefile | |
1956 | samples/caret/Makefile | |
1957 | samples/checklst/Makefile | |
1958 | samples/config/Makefile | |
1959 | samples/controls/Makefile | |
1960 | samples/db/Makefile | |
1961 | samples/dialogs/Makefile | |
1962 | samples/dnd/Makefile | |
1963 | samples/docview/Makefile | |
1964 | samples/docvwmdi/Makefile | |
1965 | samples/drawing/Makefile | |
1966 | samples/dynamic/Makefile | |
1967 | samples/forty/Makefile | |
1968 | samples/fractal/Makefile | |
1969 | samples/grid/Makefile | |
1970 | samples/help/Makefile | |
1971 | samples/image/Makefile | |
1972 | samples/internat/Makefile | |
1973 | samples/joytest/Makefile | |
1974 | samples/layout/Makefile | |
1975 | samples/listctrl/Makefile | |
1976 | samples/mdi/Makefile | |
1977 | samples/memcheck/Makefile | |
1978 | samples/mfc/Makefile | |
1979 | samples/minifram/Makefile | |
1980 | samples/minimal/Makefile | |
1981 | samples/nativdlg/Makefile | |
1982 | samples/notebook/Makefile | |
1983 | samples/oleauto/Makefile | |
1984 | samples/ownerdrw/Makefile | |
1985 | samples/png/Makefile | |
1986 | samples/printing/Makefile | |
1987 | samples/proplist/Makefile | |
1988 | samples/regtest/Makefile | |
1989 | samples/resource/Makefile | |
1990 | samples/sashtest/Makefile | |
1991 | samples/scroll/Makefile | |
1992 | samples/splitter/Makefile | |
1993 | samples/tab/Makefile | |
1994 | samples/taskbar/Makefile | |
27933891 | 1995 | samples/text/Makefile |
9a98a854 VZ |
1996 | samples/thread/Makefile |
1997 | samples/toolbar/Makefile | |
1998 | samples/treectrl/Makefile | |
1999 | samples/typetest/Makefile | |
2000 | samples/validate/Makefile | |
2001 | samples/wxpoem/Makefile | |
2002 | samples/wxsocket/Makefile | |
2003 | ], | |
a2cddd63 VZ |
2004 | [ |
2005 | chmod +x wx-config | |
c7114f59 VZ |
2006 | if test ! -e include/wx/${TOOLKIT_DIR}/setup.h; then |
2007 | ${LN_S} `pwd`/setup.h include/wx/${TOOLKIT_DIR}/setup.h | |
2008 | fi | |
a2cddd63 VZ |
2009 | ], |
2010 | [ | |
c7114f59 VZ |
2011 | LN_S="${ac_cv_prog_LN_S}" |
2012 | TOOLKIT_DIR="${TOOLKIT_DIR}" | |
a2cddd63 VZ |
2013 | ] |
2014 | ) | |
9a98a854 | 2015 |