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