1
dnl Process this file with autoconf to produce a configure script.
2
AC_REVISION($Id: configure.in 63392 2010-02-05 00:27:19Z RD $)dnl
6
dnl ---------------------------------------------------------------------------
8
dnl Top-level configure.in for wxWidgets by Robert Roebling, Phil Blecker,
9
dnl Vadim Zeitlin and Ron Lee
11
dnl This script is under the wxWidgets licence.
13
dnl Version: $Id: configure.in 63392 2010-02-05 00:27:19Z RD $
14
dnl ---------------------------------------------------------------------------
16
dnl ---------------------------------------------------------------------------
18
dnl ---------------------------------------------------------------------------
20
AC_INIT([wxWidgets], [2.8.11], [wx-dev@lists.wxwidgets.org])
22
dnl the file passed to AC_CONFIG_SRCDIR should be specific to our package
23
AC_CONFIG_SRCDIR([wx-config.in])
25
dnl sets build, host, target variables and the same with _alias
31
dnl When making releases do:
33
dnl wx_release_number += 1
35
wx_major_version_number=2
36
wx_minor_version_number=8
38
wx_subrelease_number=0
40
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
41
WX_VERSION=$WX_RELEASE.$wx_release_number
42
WX_SUBVERSION=$WX_VERSION.$wx_subrelease_number
44
WX_MSW_VERSION=$wx_major_version_number$wx_minor_version_number$wx_release_number
47
dnl Autoconf-2.60 changed the meaning of top_builddir variable, so we have
48
dnl to use our own replacement that will work with both 2.5x and 2.60+:
49
wx_top_builddir="`pwd`"
50
AC_SUBST(wx_top_builddir)
53
dnl ------------------------------------------------------------------------
54
dnl Check platform (host system)
55
dnl ------------------------------------------------------------------------
68
USE_DARWIN= dnl a.k.a. Mac OS X
75
USE_OSF= dnl OSF/1 (obsolete?)
77
USE_SOLARIS= dnl Solaris ("SunOS" >= 5)
78
USE_SUN= dnl SunOS or Solaris
79
USE_SUNOS= dnl old/real SunOS (obsolete)
81
USE_SYSV= dnl any System V
89
dnl on some platforms xxx_r() functions are declared inside "#ifdef
90
dnl _REENTRANT" and it's easier to just define this symbol for these platforms
91
dnl than checking it during run-time
92
NEEDS_D_REENTRANT_FOR_R_FUNCS=0
94
dnl the list of all available toolkits
96
dnl update NUM_TOOLKITS calculation below when adding a new toolkit here!
97
ALL_TOOLKITS="COCOA GTK MAC MGL MICROWIN MOTIF MSW PM X11 DFB"
99
dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones
100
dnl which are either yes or no
101
DEFAULT_wxUSE_COCOA=0
105
DEFAULT_wxUSE_MICROWIN=0
106
DEFAULT_wxUSE_MOTIF=0
112
dnl these are the values which are really default for the given platform -
113
dnl they're not cached and are only used if no --with-toolkit was given *and*
114
dnl nothing was found in the cache
115
DEFAULT_DEFAULT_wxUSE_COCOA=0
116
DEFAULT_DEFAULT_wxUSE_GTK=0
117
DEFAULT_DEFAULT_wxUSE_MAC=0
118
DEFAULT_DEFAULT_wxUSE_MGL=0
119
DEFAULT_DEFAULT_wxUSE_MICROWIN=0
120
DEFAULT_DEFAULT_wxUSE_MOTIF=0
121
DEFAULT_DEFAULT_wxUSE_MSW=0
122
DEFAULT_DEFAULT_wxUSE_PM=0
123
DEFAULT_DEFAULT_wxUSE_X11=0
124
DEFAULT_DEFAULT_wxUSE_DFB=0
129
SAMPLES_RPATH_POSTLINK=
133
dnl to support a new system, you need to add its canonical name (as determined
134
dnl by config.sub or specified by the configure command line) to this "case"
135
dnl and also define the shared library flags below - search for
136
dnl SHARED_LIB_SETUP to find the exact place
140
DEFAULT_DEFAULT_wxUSE_MOTIF=1
141
NEEDS_D_REENTRANT_FOR_R_FUNCS=1
145
dnl many standard declarations in HP-UX headers are only included if either
146
dnl _HPUX_SOURCE is defined, see stdsyms(5)
147
CPPFLAGS="-D_HPUX_SOURCE $CPPFLAGS"
153
if test "x$TMP" = "xalpha"; then
157
DEFAULT_DEFAULT_wxUSE_GTK=1
159
*-*-gnu* | *-*-k*bsd*-gnu )
162
if test "x$TMP" = "xalpha"; then
166
DEFAULT_DEFAULT_wxUSE_GTK=1
168
*-*-irix5* | *-*-irix6* )
173
DEFAULT_DEFAULT_wxUSE_MOTIF=1
180
AC_DEFINE(__SOLARIS__)
182
DEFAULT_DEFAULT_wxUSE_MOTIF=1
183
NEEDS_D_REENTRANT_FOR_R_FUNCS=1
192
DEFAULT_DEFAULT_wxUSE_MOTIF=1
197
AC_DEFINE(__FREEBSD__)
199
DEFAULT_DEFAULT_wxUSE_GTK=1
201
*-*-openbsd*|*-*-mirbsd*)
204
AC_DEFINE(__OPENBSD__)
206
DEFAULT_DEFAULT_wxUSE_GTK=1
211
AC_DEFINE(__NETBSD__)
213
DEFAULT_DEFAULT_wxUSE_GTK=1
214
NEEDS_D_REENTRANT_FOR_R_FUNCS=1
216
dnl some standard declarations in NetBSD headers are only included if
217
dnl _NETBSD_SOURCE and _LIBC are defined, e.g. getservbyname_r in netdb.h
218
CPPFLAGS="-D_NETBSD_SOURCE -D_LIBC $CPPFLAGS"
225
DEFAULT_DEFAULT_wxUSE_MOTIF=1
226
NEEDS_D_REENTRANT_FOR_R_FUNCS=1
233
DEFAULT_DEFAULT_wxUSE_MOTIF=1
240
DEFAULT_DEFAULT_wxUSE_MOTIF=1
246
dnl quoting from http://www-1.ibm.com/servers/esdd/articles/gnu.html:
248
dnl Both archive libraries and shared libraries on AIX have an .a
249
dnl extension. This will explain why you can't link with an .so and
250
dnl why it works with the name changed to .a.
255
DEFAULT_DEFAULT_wxUSE_MOTIF=1
262
AC_DEFINE(__UNIXWARE__)
265
*-*-cygwin* | *-*-mingw32* )
266
dnl MBN: some of the defines have been moved after toolkit detection
267
dnl because for wxMotif/wxGTK/wxX11 to build on Cygwin
268
dnl USE_UNIX must be set and not USE_WIN32
271
DEFAULT_DEFAULT_wxUSE_MSW=1
279
DEFAULT_DEFAULT_wxUSE_MGL=1
282
*-pc-os2_emx | *-pc-os2-emx )
287
DEFAULT_DEFAULT_wxUSE_PM=1
288
dnl "c++" wrapper is not always available, so always use plain gcc.
290
LDFLAGS="$LDFLAGS -Zcrtdll"
292
dnl Some special code that's automatically added by autoconf-2.57 for OS/2
293
dnl and hopefully also by autoconf-2.58 and newer on all other platforms.
294
dnl For now however, we still need it to make sure the configure script
295
dnl works on OS/2 no matter what platform it is generated on.
296
ac_executable_extensions=".exe"
297
export ac_executable_extensions
298
dnl This strange code is necessary to deal with handling of
299
dnl backslashes by ksh and pdksh's sh variant.
303
for ac_dir in $PATH; do
305
if test -z "$ac_TEMP_PATH"; then
306
ac_TEMP_PATH="$ac_dir"
308
ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir"
311
export PATH="$ac_TEMP_PATH"
317
dnl Darwin based distributions (including Mac OS X)
322
AC_DEFINE(__DARWIN__)
323
AC_DEFINE(TARGET_CARBON)
324
DEFAULT_DEFAULT_wxUSE_MAC=1
327
powerpc-apple-macos* )
328
dnl Classic Mac OS (< X)
330
dnl For some reason the test that should be cross-compiler capable fails
331
dnl However, there is no doubt that MacOS PowerPC is big endian.
332
ac_cv_c_bigendian=yes
334
dnl AC_DEFINE(TARGET_CARBON)
335
dnl platform.h needs TARGET_CARBON before setup.h, we'll add it to CPPFLAGS
336
DEFAULT_DEFAULT_wxUSE_MAC=1
341
dnl leave USE_UNIX on - BeOS is sufficiently Unix-like for this
347
AC_MSG_WARN([*** System type ${host} is unknown, assuming generic Unix and continuing nevertheless.])
348
AC_MSG_WARN([*** Please report the build results to wx-dev@lists.wxwidgets.org.])
350
DEFAULT_DEFAULT_wxUSE_X11=1
351
DEFAULT_wxUSE_SHARED=no
354
dnl ---------------------------------------------------------------------------
355
dnl command line options for configure
356
dnl ---------------------------------------------------------------------------
358
dnl the default values for all options - we collect them all here to simplify
359
dnl modification of the default values (for example, if the defaults for some
360
dnl platform should be changed, it can be done here too)
362
dnl NB: see also DEFAULT_wxUSE<toolkit> variables defined above
366
dnl useful to test the compilation with minimum options, define as 0 for normal
369
if test $DEBUG_CONFIGURE = 1; then
370
DEFAULT_wxUSE_UNIVERSAL=no
373
DEFAULT_wxUSE_NANOX=no
375
DEFAULT_wxUSE_THREADS=yes
377
DEFAULT_wxUSE_SHARED=${DEFAULT_wxUSE_SHARED:-yes}
378
DEFAULT_wxUSE_OPTIMISE=no
379
DEFAULT_wxUSE_PROFILE=no
380
DEFAULT_wxUSE_NO_DEPS=no
381
DEFAULT_wxUSE_VARARG_MACROS=no
382
DEFAULT_wxUSE_NO_RTTI=no
383
DEFAULT_wxUSE_NO_EXCEPTIONS=no
384
DEFAULT_wxUSE_UNIVERSAL_BINARY=no
385
DEFAULT_wxUSE_RPATH=yes
386
DEFAULT_wxUSE_PERMISSIVE=no
387
DEFAULT_wxUSE_DEBUG_FLAG=yes
388
DEFAULT_wxUSE_DEBUG_INFO=yes
389
DEFAULT_wxUSE_DEBUG_GDB=yes
390
DEFAULT_wxUSE_MEM_TRACING=no
391
DEFAULT_wxUSE_DEBUG_CONTEXT=no
392
DEFAULT_wxUSE_DMALLOC=no
393
DEFAULT_wxUSE_APPLE_IEEE=no
395
DEFAULT_wxUSE_EXCEPTIONS=no
396
DEFAULT_wxUSE_LOG=yes
397
DEFAULT_wxUSE_LOGWINDOW=no
398
DEFAULT_wxUSE_LOGGUI=no
399
DEFAULT_wxUSE_LOGDIALOG=no
401
DEFAULT_wxUSE_GUI=yes
402
DEFAULT_wxUSE_CONTROLS=no
404
DEFAULT_wxUSE_REGEX=no
406
DEFAULT_wxUSE_EXPAT=no
407
DEFAULT_wxUSE_ZLIB=no
408
DEFAULT_wxUSE_LIBPNG=no
409
DEFAULT_wxUSE_LIBJPEG=no
410
DEFAULT_wxUSE_LIBTIFF=no
411
DEFAULT_wxUSE_LIBXPM=no
412
DEFAULT_wxUSE_LIBMSPACK=no
413
DEFAULT_wxUSE_LIBSDL=no
414
DEFAULT_wxUSE_LIBGNOMEPRINT=no
415
DEFAULT_wxUSE_LIBGNOMEVFS=no
416
DEFAULT_wxUSE_LIBHILDON=no
417
DEFAULT_wxUSE_ODBC=no
418
DEFAULT_wxUSE_OPENGL=no
420
DEFAULT_wxUSE_ON_FATAL_EXCEPTION=no
421
DEFAULT_wxUSE_STACKWALKER=no
422
DEFAULT_wxUSE_DEBUGREPORT=no
423
DEFAULT_wxUSE_SNGLINST_CHECKER=no
424
DEFAULT_wxUSE_STD_IOSTREAM=no
425
DEFAULT_wxUSE_STD_STRING=no
426
DEFAULT_wxUSE_CMDLINE_PARSER=no
427
DEFAULT_wxUSE_DATETIME=no
428
DEFAULT_wxUSE_TIMER=no
429
DEFAULT_wxUSE_STOPWATCH=no
430
DEFAULT_wxUSE_FILE=no
431
DEFAULT_wxUSE_FFILE=no
432
DEFAULT_wxUSE_STDPATHS=no
433
DEFAULT_wxUSE_TEXTBUFFER=no
434
DEFAULT_wxUSE_TEXTFILE=no
435
DEFAULT_wxUSE_SOUND=no
436
DEFAULT_wxUSE_MEDIACTRL=no
437
DEFAULT_wxUSE_GSTREAMER8=no
438
DEFAULT_wxUSE_PRINTF_POS_PARAMS=no
439
DEFAULT_wxUSE_INTL=no
440
DEFAULT_wxUSE_CONFIG=no
441
DEFAULT_wxUSE_FONTMAP=no
442
DEFAULT_wxUSE_STREAMS=no
443
DEFAULT_wxUSE_SOCKETS=no
445
DEFAULT_wxUSE_DATAOBJ=no
446
DEFAULT_wxUSE_DIALUP_MANAGER=no
447
DEFAULT_wxUSE_JOYSTICK=no
448
DEFAULT_wxUSE_DYNLIB_CLASS=no
449
DEFAULT_wxUSE_DYNAMIC_LOADER=no
450
DEFAULT_wxUSE_LONGLONG=no
451
DEFAULT_wxUSE_GEOMETRY=no
453
DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=no
454
DEFAULT_wxUSE_NORMALIZED_PS_FONTS=no
455
DEFAULT_wxUSE_POSTSCRIPT=no
457
DEFAULT_wxUSE_CLIPBOARD=no
458
DEFAULT_wxUSE_TOOLTIPS=no
459
DEFAULT_wxUSE_DRAG_AND_DROP=no
460
DEFAULT_wxUSE_DRAGIMAGE=no
461
DEFAULT_wxUSE_SPLINES=no
462
DEFAULT_wxUSE_MOUSEWHEEL=no
465
DEFAULT_wxUSE_MDI_ARCHITECTURE=no
466
DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=no
467
DEFAULT_wxUSE_PRINTING_ARCHITECTURE=no
469
DEFAULT_wxUSE_RESOURCES=no
470
DEFAULT_wxUSE_CONSTRAINTS=no
472
DEFAULT_wxUSE_HELP=no
473
DEFAULT_wxUSE_MS_HTML_HELP=no
474
DEFAULT_wxUSE_WXHTML_HELP=no
475
DEFAULT_wxUSE_TREELAYOUT=no
476
DEFAULT_wxUSE_METAFILE=no
477
DEFAULT_wxUSE_MIMETYPE=no
478
DEFAULT_wxUSE_SYSTEM_OPTIONS=no
479
DEFAULT_wxUSE_PROTOCOL=no
480
DEFAULT_wxUSE_PROTOCOL_HTTP=no
481
DEFAULT_wxUSE_PROTOCOL_FTP=no
482
DEFAULT_wxUSE_PROTOCOL_FILE=no
484
DEFAULT_wxUSE_VARIANT=no
486
DEFAULT_wxUSE_ABOUTDLG=no
487
DEFAULT_wxUSE_COMMONDLGS=no
488
DEFAULT_wxUSE_CHOICEDLG=no
489
DEFAULT_wxUSE_COLOURDLG=no
490
DEFAULT_wxUSE_DIRDLG=no
491
DEFAULT_wxUSE_FILEDLG=no
492
DEFAULT_wxUSE_FINDREPLDLG=no
493
DEFAULT_wxUSE_FONTDLG=no
494
DEFAULT_wxUSE_MSGDLG=no
495
DEFAULT_wxUSE_NUMBERDLG=no
496
DEFAULT_wxUSE_TEXTDLG=no
497
DEFAULT_wxUSE_SPLASH=no
498
DEFAULT_wxUSE_STARTUP_TIPS=no
499
DEFAULT_wxUSE_PROGRESSDLG=no
500
DEFAULT_wxUSE_WIZARDDLG=no
502
DEFAULT_wxUSE_MENUS=no
503
DEFAULT_wxUSE_MINIFRAME=no
504
DEFAULT_wxUSE_HTML=no
505
DEFAULT_wxUSE_RICHTEXT=no
508
DEFAULT_wxUSE_WEBKIT=no
509
DEFAULT_wxUSE_FILESYSTEM=no
510
DEFAULT_wxUSE_FS_INET=no
511
DEFAULT_wxUSE_FS_ZIP=no
512
DEFAULT_wxUSE_FS_ARCHIVE=no
513
DEFAULT_wxUSE_BUSYINFO=no
514
DEFAULT_wxUSE_ARCHIVE_STREAMS=no
515
DEFAULT_wxUSE_ZIPSTREAM=no
516
DEFAULT_wxUSE_TARSTREAM=no
517
DEFAULT_wxUSE_VALIDATORS=no
519
DEFAULT_wxUSE_ACCEL=no
520
DEFAULT_wxUSE_ANIMATIONCTRL=no
521
DEFAULT_wxUSE_BUTTON=no
522
DEFAULT_wxUSE_BMPBUTTON=no
523
DEFAULT_wxUSE_BITMAPCOMBOBOX=no
524
DEFAULT_wxUSE_CALCTRL=no
525
DEFAULT_wxUSE_CARET=no
526
DEFAULT_wxUSE_CHECKBOX=no
527
DEFAULT_wxUSE_CHECKLST=no
528
DEFAULT_wxUSE_CHOICE=no
529
DEFAULT_wxUSE_CHOICEBOOK=no
530
DEFAULT_wxUSE_COLLPANE=no
531
DEFAULT_wxUSE_COLOURPICKERCTRL=no
532
DEFAULT_wxUSE_COMBOBOX=no
533
DEFAULT_wxUSE_COMBOCTRL=no
534
DEFAULT_wxUSE_DATEPICKCTRL=no
535
DEFAULT_wxUSE_DISPLAY=no
536
DEFAULT_wxUSE_DETECT_SM=no
537
DEFAULT_wxUSE_DIRPICKERCTRL=no
538
DEFAULT_wxUSE_FILEPICKERCTRL=no
539
DEFAULT_wxUSE_FONTPICKERCTRL=no
540
DEFAULT_wxUSE_GAUGE=no
541
DEFAULT_wxUSE_GRAPHICS_CONTEXT=no
542
DEFAULT_wxUSE_GRID=no
543
DEFAULT_wxUSE_HYPERLINKCTRL=no
544
DEFAULT_wxUSE_DATAVIEWCTRL=no
545
DEFAULT_wxUSE_IMAGLIST=no
546
DEFAULT_wxUSE_LISTBOOK=no
547
DEFAULT_wxUSE_LISTBOX=no
548
DEFAULT_wxUSE_LISTCTRL=no
549
DEFAULT_wxUSE_NOTEBOOK=no
550
DEFAULT_wxUSE_ODCOMBOBOX=no
551
DEFAULT_wxUSE_RADIOBOX=no
552
DEFAULT_wxUSE_RADIOBTN=no
553
DEFAULT_wxUSE_SASH=no
554
DEFAULT_wxUSE_SCROLLBAR=no
555
DEFAULT_wxUSE_SEARCHCTRL=no
556
DEFAULT_wxUSE_SLIDER=no
557
DEFAULT_wxUSE_SPINBTN=no
558
DEFAULT_wxUSE_SPINCTRL=no
559
DEFAULT_wxUSE_SPLITTER=no
560
DEFAULT_wxUSE_STATBMP=no
561
DEFAULT_wxUSE_STATBOX=no
562
DEFAULT_wxUSE_STATLINE=no
563
DEFAULT_wxUSE_STATTEXT=no
564
DEFAULT_wxUSE_STATUSBAR=yes
565
DEFAULT_wxUSE_TAB_DIALOG=no
566
DEFAULT_wxUSE_TEXTCTRL=no
567
DEFAULT_wxUSE_TOGGLEBTN=no
568
DEFAULT_wxUSE_TOOLBAR=no
569
DEFAULT_wxUSE_TOOLBAR_NATIVE=no
570
DEFAULT_wxUSE_TREEBOOK=no
571
DEFAULT_wxUSE_TOOLBOOK=no
572
DEFAULT_wxUSE_TREECTRL=no
573
DEFAULT_wxUSE_POPUPWIN=no
574
DEFAULT_wxUSE_TIPWINDOW=no
576
DEFAULT_wxUSE_UNICODE=no
577
DEFAULT_wxUSE_UNICODE_MSLU=no
578
DEFAULT_wxUSE_WCSRTOMBS=no
580
DEFAULT_wxUSE_PALETTE=no
581
DEFAULT_wxUSE_IMAGE=no
588
DEFAULT_wxUSE_ICO_CUR=no
589
DEFAULT_wxUSE_ACCESSIBILITY=no
591
DEFAULT_wxUSE_MONOLITHIC=no
592
DEFAULT_wxUSE_PLUGINS=no
593
DEFAULT_wxUSE_OFFICIAL_BUILD=no
595
DEFAULT_wxUSE_UNIVERSAL=no
598
DEFAULT_wxUSE_NANOX=no
600
DEFAULT_wxUSE_THREADS=yes
602
DEFAULT_wxUSE_SHARED=${DEFAULT_wxUSE_SHARED:-yes}
603
DEFAULT_wxUSE_OPTIMISE=yes
604
DEFAULT_wxUSE_PROFILE=no
605
DEFAULT_wxUSE_NO_DEPS=no
606
DEFAULT_wxUSE_VARARG_MACROS=yes
607
DEFAULT_wxUSE_NO_RTTI=no
608
DEFAULT_wxUSE_NO_EXCEPTIONS=no
609
DEFAULT_wxUSE_UNIVERSAL_BINARY=no
610
DEFAULT_wxUSE_RPATH=yes
611
DEFAULT_wxUSE_PERMISSIVE=no
612
DEFAULT_wxUSE_DEBUG_FLAG=no
613
DEFAULT_wxUSE_DEBUG_INFO=no
614
DEFAULT_wxUSE_DEBUG_GDB=no
615
DEFAULT_wxUSE_MEM_TRACING=no
616
DEFAULT_wxUSE_DEBUG_CONTEXT=no
617
DEFAULT_wxUSE_DMALLOC=no
618
DEFAULT_wxUSE_APPLE_IEEE=yes
620
DEFAULT_wxUSE_EXCEPTIONS=yes
621
DEFAULT_wxUSE_LOG=yes
622
DEFAULT_wxUSE_LOGWINDOW=yes
623
DEFAULT_wxUSE_LOGGUI=yes
624
DEFAULT_wxUSE_LOGDIALOG=yes
626
DEFAULT_wxUSE_GUI=yes
628
DEFAULT_wxUSE_REGEX=yes
629
DEFAULT_wxUSE_XML=yes
630
DEFAULT_wxUSE_EXPAT=yes
631
DEFAULT_wxUSE_ZLIB=yes
632
DEFAULT_wxUSE_LIBPNG=yes
633
DEFAULT_wxUSE_LIBJPEG=yes
634
DEFAULT_wxUSE_LIBTIFF=yes
635
DEFAULT_wxUSE_LIBXPM=yes
636
DEFAULT_wxUSE_LIBMSPACK=yes
637
DEFAULT_wxUSE_LIBSDL=no
638
DEFAULT_wxUSE_LIBGNOMEPRINT=yes
639
DEFAULT_wxUSE_LIBGNOMEVFS=no
640
DEFAULT_wxUSE_LIBHILDON=no
641
DEFAULT_wxUSE_ODBC=no
642
DEFAULT_wxUSE_OPENGL=no
644
DEFAULT_wxUSE_ON_FATAL_EXCEPTION=yes
645
DEFAULT_wxUSE_STACKWALKER=yes
646
DEFAULT_wxUSE_DEBUGREPORT=yes
647
DEFAULT_wxUSE_SNGLINST_CHECKER=yes
648
DEFAULT_wxUSE_STD_IOSTREAM=$DEFAULT_STD_FLAG
649
DEFAULT_wxUSE_STD_STRING=$DEFAULT_STD_FLAG
650
DEFAULT_wxUSE_CMDLINE_PARSER=yes
651
DEFAULT_wxUSE_DATETIME=yes
652
DEFAULT_wxUSE_TIMER=yes
653
DEFAULT_wxUSE_STOPWATCH=yes
654
DEFAULT_wxUSE_FILE=yes
655
DEFAULT_wxUSE_FFILE=yes
656
DEFAULT_wxUSE_STDPATHS=yes
657
DEFAULT_wxUSE_TEXTBUFFER=yes
658
DEFAULT_wxUSE_TEXTFILE=yes
659
DEFAULT_wxUSE_SOUND=yes
660
DEFAULT_wxUSE_MEDIACTRL=no
661
DEFAULT_wxUSE_GSTREAMER8=no
662
DEFAULT_wxUSE_PRINTF_POS_PARAMS=yes
663
DEFAULT_wxUSE_INTL=yes
664
DEFAULT_wxUSE_CONFIG=yes
665
DEFAULT_wxUSE_FONTMAP=yes
666
DEFAULT_wxUSE_STREAMS=yes
667
DEFAULT_wxUSE_SOCKETS=yes
668
DEFAULT_wxUSE_OLE=yes
669
DEFAULT_wxUSE_DATAOBJ=yes
670
DEFAULT_wxUSE_DIALUP_MANAGER=yes
671
DEFAULT_wxUSE_JOYSTICK=yes
672
DEFAULT_wxUSE_DYNLIB_CLASS=yes
673
DEFAULT_wxUSE_DYNAMIC_LOADER=yes
674
DEFAULT_wxUSE_LONGLONG=yes
675
DEFAULT_wxUSE_GEOMETRY=yes
677
DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=yes
678
DEFAULT_wxUSE_NORMALIZED_PS_FONTS=yes
679
DEFAULT_wxUSE_POSTSCRIPT=yes
681
DEFAULT_wxUSE_CLIPBOARD=yes
682
DEFAULT_wxUSE_TOOLTIPS=yes
683
DEFAULT_wxUSE_DRAG_AND_DROP=yes
684
DEFAULT_wxUSE_DRAGIMAGE=yes
685
DEFAULT_wxUSE_SPLINES=yes
686
DEFAULT_wxUSE_MOUSEWHEEL=yes
688
DEFAULT_wxUSE_MDI=yes
689
DEFAULT_wxUSE_MDI_ARCHITECTURE=yes
690
DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=yes
691
DEFAULT_wxUSE_PRINTING_ARCHITECTURE=yes
693
DEFAULT_wxUSE_RESOURCES=no
694
DEFAULT_wxUSE_CONSTRAINTS=yes
695
DEFAULT_wxUSE_IPC=yes
696
DEFAULT_wxUSE_HELP=yes
697
DEFAULT_wxUSE_MS_HTML_HELP=yes
698
DEFAULT_wxUSE_WXHTML_HELP=yes
699
DEFAULT_wxUSE_TREELAYOUT=yes
700
DEFAULT_wxUSE_METAFILE=yes
701
DEFAULT_wxUSE_MIMETYPE=yes
702
DEFAULT_wxUSE_SYSTEM_OPTIONS=yes
703
DEFAULT_wxUSE_PROTOCOL=yes
704
DEFAULT_wxUSE_PROTOCOL_HTTP=yes
705
DEFAULT_wxUSE_PROTOCOL_FTP=yes
706
DEFAULT_wxUSE_PROTOCOL_FILE=yes
707
DEFAULT_wxUSE_URL=yes
708
DEFAULT_wxUSE_VARIANT=yes
710
DEFAULT_wxUSE_ABOUTDLG=yes
711
DEFAULT_wxUSE_COMMONDLGS=yes
712
DEFAULT_wxUSE_CHOICEDLG=yes
713
DEFAULT_wxUSE_COLOURDLG=yes
714
DEFAULT_wxUSE_DIRDLG=yes
715
DEFAULT_wxUSE_FILEDLG=yes
716
DEFAULT_wxUSE_FINDREPLDLG=yes
717
DEFAULT_wxUSE_FONTDLG=yes
718
DEFAULT_wxUSE_MSGDLG=yes
719
DEFAULT_wxUSE_NUMBERDLG=yes
720
DEFAULT_wxUSE_TEXTDLG=yes
721
DEFAULT_wxUSE_SPLASH=yes
722
DEFAULT_wxUSE_STARTUP_TIPS=yes
723
DEFAULT_wxUSE_PROGRESSDLG=yes
724
DEFAULT_wxUSE_WIZARDDLG=yes
726
DEFAULT_wxUSE_MENUS=yes
727
DEFAULT_wxUSE_MINIFRAME=yes
728
DEFAULT_wxUSE_HTML=yes
729
DEFAULT_wxUSE_RICHTEXT=yes
730
DEFAULT_wxUSE_XRC=yes
731
DEFAULT_wxUSE_AUI=yes
732
DEFAULT_wxUSE_WEBKIT=yes
733
DEFAULT_wxUSE_FILESYSTEM=yes
734
DEFAULT_wxUSE_FS_INET=yes
735
DEFAULT_wxUSE_FS_ZIP=yes
736
DEFAULT_wxUSE_FS_ARCHIVE=yes
737
DEFAULT_wxUSE_BUSYINFO=yes
738
DEFAULT_wxUSE_ARCHIVE_STREAMS=yes
739
DEFAULT_wxUSE_ZIPSTREAM=yes
740
DEFAULT_wxUSE_TARSTREAM=yes
741
DEFAULT_wxUSE_VALIDATORS=yes
743
DEFAULT_wxUSE_ACCEL=yes
744
DEFAULT_wxUSE_ANIMATIONCTRL=yes
745
DEFAULT_wxUSE_BUTTON=yes
746
DEFAULT_wxUSE_BMPBUTTON=yes
747
DEFAULT_wxUSE_BITMAPCOMBOBOX=yes
748
DEFAULT_wxUSE_CALCTRL=yes
749
DEFAULT_wxUSE_CARET=yes
750
DEFAULT_wxUSE_CHECKBOX=yes
751
DEFAULT_wxUSE_CHECKLST=yes
752
DEFAULT_wxUSE_CHOICE=yes
753
DEFAULT_wxUSE_CHOICEBOOK=yes
754
DEFAULT_wxUSE_COLLPANE=yes
755
DEFAULT_wxUSE_COLOURPICKERCTRL=yes
756
DEFAULT_wxUSE_COMBOBOX=yes
757
DEFAULT_wxUSE_COMBOCTRL=yes
758
DEFAULT_wxUSE_DATEPICKCTRL=yes
759
DEFAULT_wxUSE_DISPLAY=yes
760
DEFAULT_wxUSE_DETECT_SM=yes
761
DEFAULT_wxUSE_DIRPICKERCTRL=yes
762
DEFAULT_wxUSE_FILEPICKERCTRL=yes
763
DEFAULT_wxUSE_FONTPICKERCTRL=yes
764
DEFAULT_wxUSE_GAUGE=yes
765
DEFAULT_wxUSE_GRID=yes
766
DEFAULT_wxUSE_GRAPHICS_CONTEXT=no
767
DEFAULT_wxUSE_HYPERLINKCTRL=yes
768
DEFAULT_wxUSE_DATAVIEWCTRL=no
769
DEFAULT_wxUSE_IMAGLIST=yes
770
DEFAULT_wxUSE_LISTBOOK=yes
771
DEFAULT_wxUSE_LISTBOX=yes
772
DEFAULT_wxUSE_LISTCTRL=yes
773
DEFAULT_wxUSE_NOTEBOOK=yes
774
DEFAULT_wxUSE_ODCOMBOBOX=yes
775
DEFAULT_wxUSE_RADIOBOX=yes
776
DEFAULT_wxUSE_RADIOBTN=yes
777
DEFAULT_wxUSE_SASH=yes
778
DEFAULT_wxUSE_SCROLLBAR=yes
779
DEFAULT_wxUSE_SEARCHCTRL=yes
780
DEFAULT_wxUSE_SLIDER=yes
781
DEFAULT_wxUSE_SPINBTN=yes
782
DEFAULT_wxUSE_SPINCTRL=yes
783
DEFAULT_wxUSE_SPLITTER=yes
784
DEFAULT_wxUSE_STATBMP=yes
785
DEFAULT_wxUSE_STATBOX=yes
786
DEFAULT_wxUSE_STATLINE=yes
787
DEFAULT_wxUSE_STATTEXT=yes
788
DEFAULT_wxUSE_STATUSBAR=yes
789
DEFAULT_wxUSE_TAB_DIALOG=no
790
DEFAULT_wxUSE_TEXTCTRL=yes
791
DEFAULT_wxUSE_TOGGLEBTN=yes
792
DEFAULT_wxUSE_TOOLBAR=yes
793
DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
794
DEFAULT_wxUSE_TREEBOOK=yes
795
DEFAULT_wxUSE_TOOLBOOK=yes
796
DEFAULT_wxUSE_TREECTRL=yes
797
DEFAULT_wxUSE_POPUPWIN=yes
798
DEFAULT_wxUSE_TIPWINDOW=yes
800
DEFAULT_wxUSE_UNICODE=no
801
DEFAULT_wxUSE_UNICODE_MSLU=yes
802
DEFAULT_wxUSE_WCSRTOMBS=no
804
DEFAULT_wxUSE_PALETTE=yes
805
DEFAULT_wxUSE_IMAGE=yes
806
DEFAULT_wxUSE_GIF=yes
807
DEFAULT_wxUSE_PCX=yes
808
DEFAULT_wxUSE_TGA=yes
809
DEFAULT_wxUSE_IFF=no dnl why is this set to "no"?
810
DEFAULT_wxUSE_PNM=yes
811
DEFAULT_wxUSE_XPM=yes
812
DEFAULT_wxUSE_ICO_CUR=yes
813
DEFAULT_wxUSE_ACCESSIBILITY=no
815
DEFAULT_wxUSE_MONOLITHIC=no
816
DEFAULT_wxUSE_PLUGINS=no
817
DEFAULT_wxUSE_OFFICIAL_BUILD=no
819
dnl Applicable only when --with-gtk was used:
820
DEFAULT_wxUSE_GTK2=yes
823
dnl Always default to no. Only special cases require this.
824
DEFAULT_wxUSE_OBJC_UNIQUIFYING=no
827
dnl WX_ARG_WITH should be used to select whether an external package will be
828
dnl used or not, to configure compile-time features of this package itself,
829
dnl use WX_ARG_ENABLE instead
831
dnl ============================
832
dnl external package dependecies
833
dnl ============================
835
dnl these options use AC_ARG_WITH and not WX_ARG_WITH on purpose - we cache
836
dnl these values manually
837
for toolkit in `echo $ALL_TOOLKITS`; do
838
LINE=`grep "wxUSE_$toolkit=" ${wx_arg_cache_file}`
839
if test "x$LINE" != "x" ; then
840
has_toolkit_in_cache=1
842
eval "CACHE_$toolkit=1"
844
LINE=`grep "wx${toolkit}_VERSION=" ${wx_arg_cache_file}`
845
if test "x$LINE" != "x" ; then
851
dnl ---------------------------------------------------------------------------
852
dnl --disable-gui will build only non-GUI part of wxWidgets: check for this
853
dnl first to disable many other switches if it's given
855
dnl NB: this is still in testing stage, don't use if you don't know what you're
857
dnl ---------------------------------------------------------------------------
859
WX_ARG_ENABLE(gui, [ --enable-gui use GUI classes], wxUSE_GUI)
860
WX_ARG_ENABLE(monolithic, [ --enable-monolithic build wxWidgets as single library], wxUSE_MONOLITHIC)
861
WX_ARG_ENABLE(plugins, [ --enable-plugins build parts of wxWidgets as loadable components], wxUSE_PLUGINS)
862
WX_ARG_WITH(subdirs, [ --without-subdirs don't generate makefiles for samples/demos/...], wxWITH_SUBDIRS, without)
864
if test "$wxUSE_GUI" = "yes"; then
866
WX_ARG_ENABLE(universal, [ --enable-universal use wxWidgets GUI controls instead of native ones], wxUSE_UNIVERSAL)
867
AC_ARG_WITH(gtk, [[ --with-gtk[=VERSION] use GTK+, VERSION can be 2 (default), 1 or "any"]], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1])
868
AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1])
869
AC_ARG_WITH(mac, [ --with-mac use Mac OS X], [wxUSE_MAC="$withval" CACHE_MAC=1 TOOLKIT_GIVEN=1])
870
AC_ARG_WITH(cocoa, [ --with-cocoa use Cocoa], [wxUSE_COCOA="$withval" CACHE_COCOA=1 TOOLKIT_GIVEN=1])
871
AC_ARG_WITH(wine, [ --with-wine use Wine], [wxUSE_WINE="$withval" CACHE_WINE=1])
872
AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1])
873
AC_ARG_WITH(pm, [ --with-pm use OS/2 Presentation Manager], [wxUSE_PM="$withval" CACHE_PM=1 TOOLKIT_GIVEN=1])
874
AC_ARG_WITH(mgl, [ --with-mgl use SciTech MGL], [wxUSE_MGL="$withval" wxUSE_UNIVERSAL="yes" CACHE_MGL=1 TOOLKIT_GIVEN=1])
875
AC_ARG_WITH(directfb, [ --with-directfb use DirectFB], [wxUSE_DFB="$withval" wxUSE_UNIVERSAL="yes" CACHE_DFB=1 TOOLKIT_GIVEN=1])
876
AC_ARG_WITH(microwin, [ --with-microwin use MicroWindows], [wxUSE_MICROWIN="$withval" CACHE_MICROWIN=1 TOOLKIT_GIVEN=1])
877
AC_ARG_WITH(x11, [ --with-x11 use X11], [wxUSE_X11="$withval" wxUSE_UNIVERSAL="yes" CACHE_X11=1 TOOLKIT_GIVEN=1])
878
WX_ARG_ENABLE(nanox, [ --enable-nanox use NanoX], wxUSE_NANOX)
880
AC_ARG_ENABLE(gtk2, [ --disable-gtk2 use GTK+ 1.2 instead of 2.0], [wxUSE_GTK2="$enableval"])
881
WX_ARG_ENABLE(gpe, [ --enable-gpe use GNOME PDA Environment features if possible], wxUSE_GPE)
883
WX_ARG_SYS_WITH(libpng, [ --with-libpng use libpng (PNG image format)], wxUSE_LIBPNG)
884
WX_ARG_SYS_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], wxUSE_LIBJPEG)
885
WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF)
886
WX_ARG_SYS_WITH(libxpm, [ --with-libxpm use libxpm (XPM file format)], wxUSE_LIBXPM)
887
WX_ARG_WITH(libmspack, [ --with-libmspack use libmspack (CHM help files loading)], wxUSE_LIBMSPACK)
888
WX_ARG_WITH(sdl, [ --with-sdl use SDL for audio on Unix], wxUSE_LIBSDL)
889
WX_ARG_WITH(gnomeprint, [ --with-gnomeprint use GNOME print for printing under GNOME], wxUSE_LIBGNOMEPRINT)
890
WX_ARG_WITH(gnomevfs, [ --with-gnomevfs use GNOME VFS for associating MIME types], wxUSE_LIBGNOMEVFS)
891
WX_ARG_WITH(hildon, [ --with-hildon use Hildon framework for Nokia 770], wxUSE_LIBHILDON)
892
WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL)
894
if test "$wxUSE_UNIVERSAL" = "yes"; then
895
AC_ARG_WITH(themes, [ --with-themes=all|list use only the specified comma-separated list of wxUniversal themes], [wxUNIV_THEMES="$withval"])
901
WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (http://dmalloc.com/)], wxUSE_DMALLOC)
902
WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx class], wxUSE_REGEX)
903
WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
904
WX_ARG_SYS_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], wxUSE_ODBC)
905
WX_ARG_SYS_WITH(expat, [ --with-expat enable XML support using expat parser], wxUSE_EXPAT)
907
AC_MSG_CHECKING([for --with-macosx-sdk])
908
AC_ARG_WITH(macosx-sdk, [ --with-macosx-sdk=PATH use an OS X SDK at PATH], [
909
wxUSE_MACOSX_SDK=$withval
910
wx_cv_use_macosx_sdk="wxUSE_MACOSX_SDK=$withval"
911
echo "wxUSE_MACOSX_SDK=$wxUSE_MACOSX_SDK" >> ${wx_arg_cache_file}.tmp
913
# NOTE: Empty string on purpose so that --without-macosx-sdk (thus no)
914
# will override --enable-universal_binary's automatic SDK usage.
916
LINE=`grep "^wxUSE_MACOSX_SDK=" ${wx_arg_cache_file}`
917
if test "x$LINE" != x ; then
919
echo "$LINE" >> ${wx_arg_cache_file}.tmp
922
AC_MSG_RESULT([$wxUSE_MACOSX_SDK])
924
AC_MSG_CHECKING([for --with-macosx-version-min])
925
AC_ARG_WITH(macosx-version-min, [ --with-macosx-version-min=VER build binaries which require at least this OS X version], [
926
wxUSE_MACOSX_VERSION_MIN=$withval
927
wx_cv_use_macosx_version_min="wxUSE_MACOSX_VERSION_MIN=$withval"
928
echo "wxUSE_MACOSX_VERSION_MIN=$wxUSE_MACOSX_VERSION_MIN" >> ${wx_arg_cache_file}.tmp
930
# default "yes" because when not using an SDK it means the same as no
931
# but when using an SDK it means to use the SDK version
932
wxUSE_MACOSX_VERSION_MIN=yes
933
# See if there is a value in the cache
934
LINE=`grep "^wxUSE_MACOSX_VERSION_MIN=" ${wx_arg_cache_file}`
935
if test "x$LINE" != x ; then
937
echo "$LINE" >> ${wx_arg_cache_file}.tmp
940
AC_MSG_RESULT([$wxUSE_MACOSX_VERSION_MIN])
942
dnl ---------------------------------------------------------------------------
944
dnl ---------------------------------------------------------------------------
946
WX_ARG_ENABLE(shared, [ --enable-shared create shared library code], wxUSE_SHARED)
947
WX_ARG_ENABLE(optimise, [ --enable-optimise compile without optimisations], wxUSE_OPTIMISE)
948
WX_ARG_ENABLE(debug, [ --enable-debug same as debug_flag and debug_info], wxUSE_DEBUG)
949
WX_ARG_ENABLE(stl, [ --enable-stl use STL for containers], wxUSE_STL)
950
if test "$USE_OS2" = "1"; then
952
WX_ARG_ENABLE(omf, [ --enable-omf use OMF object format], wxUSE_OMF)
955
if test "$wxUSE_DEBUG" = "yes"; then
956
DEFAULT_wxUSE_DEBUG_FLAG=yes
957
DEFAULT_wxUSE_DEBUG_INFO=yes
959
elif test "$wxUSE_DEBUG" = "no"; then
960
DEFAULT_wxUSE_DEBUG_FLAG=no
961
DEFAULT_wxUSE_DEBUG_INFO=no
965
WX_ARG_ENABLE(debug_flag, [ --enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)], wxUSE_DEBUG_FLAG)
966
WX_ARG_ENABLE(debug_info, [ --enable-debug_info create code with debugging information], wxUSE_DEBUG_INFO)
967
WX_ARG_ENABLE(debug_gdb, [ --enable-debug_gdb create code with extra GDB debugging information], wxUSE_DEBUG_GDB)
968
WX_ARG_ENABLE(debug_cntxt, [ --enable-debug_cntxt use wxDebugContext], wxUSE_DEBUG_CONTEXT)
969
WX_ARG_ENABLE(mem_tracing, [ --enable-mem_tracing create code with memory tracing], wxUSE_MEM_TRACING)
970
WX_ARG_ENABLE(profile, [ --enable-profile create code with profiling information], wxUSE_PROFILE)
971
WX_ARG_ENABLE(no_rtti, [ --enable-no_rtti create code without RTTI information], wxUSE_NO_RTTI)
972
WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++ exceptions handling], wxUSE_NO_EXCEPTIONS)
973
WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
974
WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
975
WX_ARG_ENABLE(vararg_macros, [ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS)
976
WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary create Mac PowerPC and Intel Universal binary]], wxUSE_UNIVERSAL_BINARY)
978
WX_ARG_ENABLE(compat24, [ --enable-compat24 enable wxWidgets 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, enable)
979
WX_ARG_ENABLE(compat26, [ --disable-compat26 disable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6, disable)
981
WX_ARG_ENABLE(rpath, [ --disable-rpath disable use of rpath for uninstalled builds], wxUSE_RPATH)
983
WX_ARG_ENABLE(objc_uniquifying,[ --enable-objc_uniquifying enable Objective-C class name uniquifying], wxUSE_OBJC_UNIQUIFYING)
985
dnl If user didn't specify --enable/disable-abi-incompatible-features then set it based on wxUSE_SHARED
986
if test "x$wxUSE_SHARED" = "xno"; then
987
DEFAULT_wxUSE_ABI_INCOMPATIBLE_FEATURES=yes
989
DEFAULT_wxUSE_ABI_INCOMPATIBLE_FEATURES=no
991
WX_ARG_ENABLE(abi-incompatible-features,[ --enable-abi-incompatible-features Enables features that break ABI compatibility], wxUSE_ABI_INCOMPATIBLE_FEATURES)
993
dnl ---------------------------------------------------------------------------
994
dnl (small) optional non GUI classes
995
dnl ---------------------------------------------------------------------------
997
WX_ARG_ENABLE(intl, [ --enable-intl use internationalization system], wxUSE_INTL)
998
WX_ARG_ENABLE(config, [ --enable-config use wxConfig (and derived) classes], wxUSE_CONFIG)
1000
WX_ARG_ENABLE(protocols, [ --enable-protocols use wxProtocol and derived classes], wxUSE_PROTOCOL)
1001
WX_ARG_ENABLE(ftp, [ --enable-ftp use wxFTP (requires wxProtocol], wxUSE_PROTOCOL_FTP)
1002
WX_ARG_ENABLE(http, [ --enable-http use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP)
1003
WX_ARG_ENABLE(fileproto, [ --enable-fileproto use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE)
1004
WX_ARG_ENABLE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS)
1005
WX_ARG_ENABLE(ole, [ --enable-ole use OLE classes (Win32 only)], wxUSE_OLE)
1006
WX_ARG_ENABLE(dataobj, [ --enable-dataobj use data object classes], wxUSE_DATAOBJ)
1008
WX_ARG_ENABLE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], wxUSE_IPC)
1010
dnl please keep the settings below in alphabetical order
1011
WX_ARG_ENABLE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE)
1012
WX_ARG_ENABLE(arcstream, [ --enable-arcstream use wxArchive streams], wxUSE_ARCHIVE_STREAMS)
1013
WX_ARG_ENABLE(backtrace, [ --enable-backtrace use wxStackWalker class for getting backtraces], wxUSE_STACKWALKER)
1014
WX_ARG_ENABLE(catch_segvs, [ --enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only)], wxUSE_ON_FATAL_EXCEPTION)
1015
WX_ARG_ENABLE(cmdline, [ --enable-cmdline use wxCmdLineParser class], wxUSE_CMDLINE_PARSER)
1016
WX_ARG_ENABLE(datetime, [ --enable-datetime use wxDateTime class], wxUSE_DATETIME)
1017
WX_ARG_ENABLE(debugreport, [ --enable-debugreport use wxDebugReport class], wxUSE_DEBUGREPORT)
1018
WX_ARG_ENABLE(dialupman, [ --enable-dialupman use dialup network classes], wxUSE_DIALUP_MANAGER)
1019
WX_ARG_ENABLE(dynlib, [ --enable-dynlib use wxLibrary class for DLL loading], wxUSE_DYNLIB_CLASS)
1020
WX_ARG_ENABLE(dynamicloader, [ --enable-dynamicloader use (new) wxDynamicLibrary class], wxUSE_DYNAMIC_LOADER)
1021
WX_ARG_ENABLE(exceptions, [ --enable-exceptions build exception-safe library], wxUSE_EXCEPTIONS)
1022
WX_ARG_ENABLE(ffile, [ --enable-ffile use wxFFile class], wxUSE_FFILE)
1023
WX_ARG_ENABLE(file, [ --enable-file use wxFile class], wxUSE_FILE)
1024
WX_ARG_ENABLE(filesystem, [ --enable-filesystem use virtual file systems classes], wxUSE_FILESYSTEM)
1025
WX_ARG_ENABLE(fontmap, [ --enable-fontmap use font encodings conversion classes], wxUSE_FONTMAP)
1026
WX_ARG_ENABLE(fs_archive, [ --enable-fs_archive use virtual archive filesystems], wxUSE_FS_ARCHIVE)
1027
WX_ARG_ENABLE(fs_inet, [ --enable-fs_inet use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
1028
WX_ARG_ENABLE(fs_zip, [ --enable-fs_zip now replaced by fs_archive], wxUSE_FS_ZIP)
1029
WX_ARG_ENABLE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY)
1030
WX_ARG_ENABLE(log, [ --enable-log use logging system], wxUSE_LOG)
1031
WX_ARG_ENABLE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG)
1032
WX_ARG_ENABLE(mimetype, [ --enable-mimetype use wxMimeTypesManager], wxUSE_MIMETYPE)
1033
WX_ARG_ENABLE(mslu, [ --enable-mslu use MS Layer for Unicode on Windows 9x (Win32 only)], wxUSE_UNICODE_MSLU)
1034
WX_ARG_ENABLE(snglinst, [ --enable-snglinst use wxSingleInstanceChecker class], wxUSE_SNGLINST_CHECKER)
1035
WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM)
1036
WX_ARG_ENABLE(std_string, [ --enable-std_string use standard C++ string classes], wxUSE_STD_STRING)
1037
WX_ARG_ENABLE(stdpaths, [ --enable-stdpaths use wxStandardPaths class], wxUSE_STDPATHS)
1038
WX_ARG_ENABLE(stopwatch, [ --enable-stopwatch use wxStopWatch class], wxUSE_STOPWATCH)
1039
WX_ARG_ENABLE(streams, [ --enable-streams use wxStream etc classes], wxUSE_STREAMS)
1040
WX_ARG_ENABLE(sysoptions, [ --enable-sysoptions use wxSystemOptions], wxUSE_SYSTEM_OPTIONS)
1041
WX_ARG_ENABLE(tarstream, [ --enable-tarstream use wxTar streams], wxUSE_TARSTREAM)
1042
WX_ARG_ENABLE(textbuf, [ --enable-textbuf use wxTextBuffer class], wxUSE_TEXTBUFFER)
1043
WX_ARG_ENABLE(textfile, [ --enable-textfile use wxTextFile class], wxUSE_TEXTFILE)
1044
WX_ARG_ENABLE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER)
1045
WX_ARG_ENABLE(unicode, [ --enable-unicode compile wxString with Unicode support], wxUSE_UNICODE)
1046
WX_ARG_ENABLE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND)
1047
WX_ARG_ENABLE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL)
1048
WX_ARG_ENABLE(gstreamer8, [ --enable-gstreamer8 force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix], wxUSE_GSTREAMER8)
1049
WX_ARG_ENABLE(printfposparam,[ --enable-printfposparam use wxVsnprintf() which supports positional parameters], wxUSE_PRINTF_POS_PARAMS)
1050
WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
1052
WX_ARG_ENABLE(url, [ --enable-url use wxURL class], wxUSE_URL)
1053
WX_ARG_ENABLE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT)
1054
WX_ARG_ENABLE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL)
1055
WX_ARG_ENABLE(protocol_http, [ --enable-protocol-http HTTP support in wxProtocol], wxUSE_PROTOCOL_HTTP)
1056
WX_ARG_ENABLE(protocol_ftp, [ --enable-protocol-ftp FTP support in wxProtocol], wxUSE_PROTOCOL_FTP)
1057
WX_ARG_ENABLE(protocol_file, [ --enable-protocol-file FILE support in wxProtocol], wxUSE_PROTOCOL_FILE)
1060
dnl ---------------------------------------------------------------------------
1061
dnl "big" options (i.e. those which change a lot of things throughout the library)
1062
dnl ---------------------------------------------------------------------------
1064
WX_ARG_ENABLE(threads, [ --enable-threads use threads], wxUSE_THREADS)
1066
if test "$wxUSE_GUI" = "yes"; then
1068
dnl ---------------------------------------------------------------------------
1069
dnl "big" GUI options
1070
dnl ---------------------------------------------------------------------------
1072
WX_ARG_ENABLE(docview, [ --enable-docview use document view architecture], wxUSE_DOC_VIEW_ARCHITECTURE)
1073
WX_ARG_ENABLE(help, [ --enable-help use help subsystem], wxUSE_HELP)
1074
WX_ARG_ENABLE(mshtmlhelp, [ --enable-mshtmlhelp use MS HTML Help (win32)], wxUSE_MS_HTML_HELP)
1075
WX_ARG_ENABLE(html, [ --enable-html use wxHTML sub-library], wxUSE_HTML)
1076
WX_ARG_ENABLE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP)
1077
WX_ARG_ENABLE(xrc, [ --enable-xrc use XRC resources sub-library], wxUSE_XRC)
1078
WX_ARG_ENABLE(aui, [ --enable-aui use AUI docking library], wxUSE_AUI)
1079
WX_ARG_ENABLE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS)
1080
WX_ARG_ENABLE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE)
1081
WX_ARG_ENABLE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI)
1082
WX_ARG_ENABLE(mdidoc, [ --enable-mdidoc use docview architecture with MDI], wxUSE_MDI_ARCHITECTURE)
1083
WX_ARG_ENABLE(loggui, [ --enable-loggui use standard GUI logger], wxUSE_LOGGUI)
1084
WX_ARG_ENABLE(logwin, [ --enable-logwin use wxLogWindow], wxUSE_LOGWINDOW)
1085
WX_ARG_ENABLE(logdialog, [ --enable-logdialog use wxLogDialog], wxUSE_LOGDIALOG)
1086
WX_ARG_ENABLE(webkit, [ --enable-webkit use wxWebKitCtrl (Mac)], wxUSE_WEBKIT)
1087
WX_ARG_ENABLE(richtext, [ --enable-richtext use wxRichTextCtrl], wxUSE_RICHTEXT)
1088
WX_ARG_ENABLE(graphics_ctx, [ --enable-graphics_ctx use graphics context 2D drawing API], wxUSE_GRAPHICS_CONTEXT)
1090
dnl ---------------------------------------------------------------------------
1091
dnl PostScript options
1092
dnl ---------------------------------------------------------------------------
1093
WX_ARG_ENABLE(postscript, [ --enable-postscript use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT)
1095
dnl VZ: these options seem to be always on, if someone wants to change it please do
1096
dnl WX_ARG_ENABLE(PS-normalized, [ --enable-PS-normalized use normalized PS fonts], dnl wxUSE_NORMALIZED_PS_FONTS)
1097
dnl WX_ARG_ENABLE(afmfonts, [ --enable-afmfonts use Adobe Font Metric Font table], dnl wxUSE_AFM_FOR_POSTSCRIPT)
1099
dnl ---------------------------------------------------------------------------
1101
dnl ---------------------------------------------------------------------------
1103
WX_ARG_ENABLE(prologio, [ --enable-prologio not available; see contrib], wxUSE_PROLOGIO)
1104
WX_ARG_ENABLE(resources, [ --enable-resources not available; see contrib], wxUSE_RESOURCES)
1106
dnl ---------------------------------------------------------------------------
1108
dnl ---------------------------------------------------------------------------
1110
WX_ARG_ENABLE(clipboard, [ --enable-clipboard use wxClipboard class], wxUSE_CLIPBOARD)
1111
WX_ARG_ENABLE(dnd, [ --enable-dnd use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP)
1112
WX_ARG_ENABLE(metafile, [ --enable-metafile use win32 metafiles], wxUSE_METAFILE)
1114
dnl WX_ARG_ENABLE(treelayout, [ --enable-treelayout use wxTreeLayout class], wxUSE_TREELAYOUT)
1116
dnl ---------------------------------------------------------------------------
1117
dnl optional GUI controls (in alphabetical order except the first one)
1118
dnl ---------------------------------------------------------------------------
1120
WX_ARG_ENABLE(controls, [ --enable-controls use all usual controls], wxUSE_CONTROLS)
1122
dnl even with --enable-controls, some may be disabled by giving
1123
dnl --disable-<control> later on the command line - but by default all will be
1124
dnl used (and vice versa)
1125
if test "$wxUSE_CONTROLS" = "yes"; then
1126
DEFAULT_wxUSE_ACCEL=yes
1127
DEFAULT_wxUSE_ANIMATIONCTRL=yes
1128
DEFAULT_wxUSE_BMPBUTTON=yes
1129
DEFAULT_wxUSE_BUTTON=yes
1130
DEFAULT_wxUSE_CALCTRL=yes
1131
DEFAULT_wxUSE_CARET=yes
1132
DEFAULT_wxUSE_COMBOBOX=yes
1133
DEFAULT_wxUSE_CHECKBOX=yes
1134
DEFAULT_wxUSE_CHECKLISTBOX=yes
1135
DEFAULT_wxUSE_CHOICE=yes
1136
DEFAULT_wxUSE_CHOICEBOOK=yes
1137
DEFAULT_wxUSE_COLLPANE=yes
1138
DEFAULT_wxUSE_COLOURPICKERCTRL=yes
1139
DEFAULT_wxUSE_COMBOBOX=yes
1140
DEFAULT_wxUSE_DATEPICKCTRL=yes
1141
DEFAULT_wxUSE_DISPLAY=yes
1142
DEFAULT_wxUSE_DETECT_SM=yes
1143
DEFAULT_wxUSE_DIRPICKERCTRL=yes
1144
DEFAULT_wxUSE_FILEPICKERCTRL=yes
1145
DEFAULT_wxUSE_FONTPICKERCTRL=yes
1146
DEFAULT_wxUSE_GAUGE=yes
1147
DEFAULT_wxUSE_GRID=yes
1148
DEFAULT_wxUSE_HYPERLINKCTRL=yes
1149
DEFAULT_wxUSE_DATAVIEWCTRL=no
1150
DEFAULT_wxUSE_IMAGLIST=yes
1151
DEFAULT_wxUSE_LISTBOOK=yes
1152
DEFAULT_wxUSE_LISTBOX=yes
1153
DEFAULT_wxUSE_LISTCTRL=yes
1154
DEFAULT_wxUSE_NOTEBOOK=yes
1155
DEFAULT_wxUSE_RADIOBOX=yes
1156
DEFAULT_wxUSE_RADIOBTN=yes
1157
DEFAULT_wxUSE_SASH=yes
1158
DEFAULT_wxUSE_SCROLLBAR=yes
1159
DEFAULT_wxUSE_SEARCHCTRL=yes
1160
DEFAULT_wxUSE_SLIDER=yes
1161
DEFAULT_wxUSE_SPINBTN=yes
1162
DEFAULT_wxUSE_SPINCTRL=yes
1163
DEFAULT_wxUSE_SPLITTER=yes
1164
DEFAULT_wxUSE_STATBMP=yes
1165
DEFAULT_wxUSE_STATBOX=yes
1166
DEFAULT_wxUSE_STATLINE=yes
1167
DEFAULT_wxUSE_STATUSBAR=yes
1168
DEFAULT_wxUSE_TAB_DIALOG=yes
1169
DEFAULT_wxUSE_TOGGLEBTN=yes
1170
DEFAULT_wxUSE_TOOLBAR=yes
1171
DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
1172
DEFAULT_wxUSE_TOOLTIPS=yes
1173
DEFAULT_wxUSE_TREEBOOK=yes
1174
DEFAULT_wxUSE_TOOLBOOK=yes
1175
DEFAULT_wxUSE_TREECTRL=yes
1176
DEFAULT_wxUSE_POPUPWIN=yes
1177
DEFAULT_wxUSE_TIPWINDOW=yes
1178
elif test "$wxUSE_CONTROLS" = "no"; then
1179
DEFAULT_wxUSE_ACCEL=no
1180
DEFAULT_wxUSE_ANIMATIONCTRL=no
1181
DEFAULT_wxUSE_BMPBUTTON=no
1182
DEFAULT_wxUSE_BUTTON=no
1183
DEFAULT_wxUSE_CALCTRL=no
1184
DEFAULT_wxUSE_CARET=no
1185
DEFAULT_wxUSE_COLLPANE=no
1186
DEFAULT_wxUSE_COMBOBOX=no
1187
DEFAULT_wxUSE_CHECKBOX=no
1188
DEFAULT_wxUSE_CHECKLISTBOX=no
1189
DEFAULT_wxUSE_CHOICE=no
1190
DEFAULT_wxUSE_CHOICEBOOK=no
1191
DEFAULT_wxUSE_COLOURPICKERCTRL=no
1192
DEFAULT_wxUSE_COMBOBOX=no
1193
DEFAULT_wxUSE_DATEPICKCTRL=no
1194
DEFAULT_wxUSE_DISPLAY=no
1195
DEFAULT_wxUSE_DETECT_SM=no
1196
DEFAULT_wxUSE_DIRPICKERCTRL=no
1197
DEFAULT_wxUSE_FILEPICKERCTRL=no
1198
DEFAULT_wxUSE_FONTPICKERCTRL=no
1199
DEFAULT_wxUSE_GAUGE=no
1200
DEFAULT_wxUSE_GRID=no
1201
DEFAULT_wxUSE_HYPERLINKCTRL=no
1202
DEFAULT_wxUSE_DATAVIEWCTRL=no
1203
DEFAULT_wxUSE_IMAGLIST=no
1204
DEFAULT_wxUSE_LISTBOOK=no
1205
DEFAULT_wxUSE_LISTBOX=no
1206
DEFAULT_wxUSE_LISTCTRL=no
1207
DEFAULT_wxUSE_NOTEBOOK=no
1208
DEFAULT_wxUSE_RADIOBOX=no
1209
DEFAULT_wxUSE_RADIOBTN=no
1210
DEFAULT_wxUSE_SASH=no
1211
DEFAULT_wxUSE_SCROLLBAR=no
1212
DEFAULT_wxUSE_SEARCHCTRL=no
1213
DEFAULT_wxUSE_SLIDER=no
1214
DEFAULT_wxUSE_SPINBTN=no
1215
DEFAULT_wxUSE_SPINCTRL=no
1216
DEFAULT_wxUSE_SPLITTER=no
1217
DEFAULT_wxUSE_STATBMP=no
1218
DEFAULT_wxUSE_STATBOX=no
1219
DEFAULT_wxUSE_STATLINE=no
1220
DEFAULT_wxUSE_STATUSBAR=no
1221
DEFAULT_wxUSE_TAB_DIALOG=no
1222
DEFAULT_wxUSE_TOGGLEBTN=no
1223
DEFAULT_wxUSE_TOOLBAR=no
1224
DEFAULT_wxUSE_TOOLBAR_NATIVE=no
1225
DEFAULT_wxUSE_TOOLTIPS=no
1226
DEFAULT_wxUSE_TREEBOOK=no
1227
DEFAULT_wxUSE_TOOLBOOK=no
1228
DEFAULT_wxUSE_TREECTRL=no
1229
DEFAULT_wxUSE_POPUPWIN=no
1230
DEFAULT_wxUSE_TIPWINDOW=no
1233
WX_ARG_ENABLE(accel, [ --enable-accel use accelerators], wxUSE_ACCEL)
1234
WX_ARG_ENABLE(animatectrl, [ --enable-animatectrl use wxAnimationCtrl class], wxUSE_ANIMATIONCTRL)
1235
WX_ARG_ENABLE(button, [ --enable-button use wxButton class], wxUSE_BUTTON)
1236
WX_ARG_ENABLE(bmpbutton, [ --enable-bmpbutton use wxBitmapButton class], wxUSE_BMPBUTTON)
1237
WX_ARG_ENABLE(bmpcombobox, [ --enable-bmpcombobox use wxBitmapComboBox class], wxUSE_BITMAPCOMBOBOX)
1238
WX_ARG_ENABLE(calendar, [ --enable-calendar use wxCalendarCtrl class], wxUSE_CALCTRL)
1239
WX_ARG_ENABLE(caret, [ --enable-caret use wxCaret class], wxUSE_CARET)
1240
WX_ARG_ENABLE(checkbox, [ --enable-checkbox use wxCheckBox class], wxUSE_CHECKBOX)
1241
WX_ARG_ENABLE(checklst, [ --enable-checklst use wxCheckListBox (listbox with checkboxes) class], wxUSE_CHECKLST)
1242
WX_ARG_ENABLE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE)
1243
WX_ARG_ENABLE(choicebook, [ --enable-choicebook use wxChoicebook class], wxUSE_CHOICEBOOK)
1244
WX_ARG_ENABLE(collpane, [ --enable-collpane use wxCollapsiblePane class], wxUSE_COLLPANE)
1245
WX_ARG_ENABLE(colourpicker,[ --enable-colourpicker use wxColourPickerCtrl class], wxUSE_COLOURPICKERCTRL)
1246
WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox class], wxUSE_COMBOBOX)
1247
WX_ARG_ENABLE(comboctrl, [ --enable-comboctrl use wxComboCtrl class], wxUSE_COMBOCTRL)
1248
WX_ARG_ENABLE(datepick, [ --enable-datepick use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL)
1249
WX_ARG_ENABLE(dirpicker, [ --enable-dirpicker use wxDirPickerCtrl class], wxUSE_DIRPICKERCTRL)
1250
WX_ARG_ENABLE(display, [ --enable-display use wxDisplay class], wxUSE_DISPLAY)
1251
WX_ARG_ENABLE(detect_sm, [ --enable-detect_sm use code to detect X11 session manager], wxUSE_DETECT_SM)
1252
WX_ARG_ENABLE(filepicker, [ --enable-filepicker use wxFilePickerCtrl class], wxUSE_FILEPICKERCTRL)
1253
WX_ARG_ENABLE(fontpicker, [ --enable-fontpicker use wxFontPickerCtrl class], wxUSE_FONTPICKERCTRL)
1254
WX_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
1255
WX_ARG_ENABLE(grid, [ --enable-grid use wxGrid class], wxUSE_GRID)
1256
WX_ARG_ENABLE(dataviewctrl,[ --enable-dataviewctrl use wxDataViewCtrl class], wxUSE_DATAVIEWCTRL)
1257
WX_ARG_ENABLE(hyperlink, [ --enable-hyperlink use wxHyperlinkCtrl class], wxUSE_HYPERLINKCTRL)
1258
WX_ARG_ENABLE(imaglist, [ --enable-imaglist use wxImageList class], wxUSE_IMAGLIST)
1259
WX_ARG_ENABLE(listbook, [ --enable-listbook use wxListbook class], wxUSE_LISTBOOK)
1260
WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX)
1261
WX_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL)
1262
WX_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK)
1263
WX_ARG_ENABLE(odcombobox, [ --enable-odcombobox use wxOwnerDrawnComboBox class], wxUSE_ODCOMBOBOX)
1264
WX_ARG_ENABLE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX)
1265
WX_ARG_ENABLE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN)
1266
WX_ARG_ENABLE(sash, [ --enable-sash use wxSashWindow class], wxUSE_SASH)
1267
WX_ARG_ENABLE(scrollbar, [ --enable-scrollbar use wxScrollBar class and scrollable windows], wxUSE_SCROLLBAR)
1268
WX_ARG_ENABLE(searchctrl, [ --enable-searchctrl use wxSearchCtrl class], wxUSE_SEARCHCTRL)
1269
WX_ARG_ENABLE(slider, [ --enable-slider use wxSlider class], wxUSE_SLIDER)
1270
WX_ARG_ENABLE(spinbtn, [ --enable-spinbtn use wxSpinButton class], wxUSE_SPINBTN)
1271
WX_ARG_ENABLE(spinctrl, [ --enable-spinctrl use wxSpinCtrl class], wxUSE_SPINCTRL)
1272
WX_ARG_ENABLE(splitter, [ --enable-splitter use wxSplitterWindow class], wxUSE_SPLITTER)
1273
WX_ARG_ENABLE(statbmp, [ --enable-statbmp use wxStaticBitmap class], wxUSE_STATBMP)
1274
WX_ARG_ENABLE(statbox, [ --enable-statbox use wxStaticBox class], wxUSE_STATBOX)
1275
WX_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE)
1276
WX_ARG_ENABLE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT)
1277
WX_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
1278
WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TAB_DIALOG)
1279
WX_ARG_ENABLE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
1280
WX_ARG_ENABLE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN)
1281
WX_ARG_ENABLE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR)
1282
WX_ARG_ENABLE(tbarnative, [ --enable-tbarnative use native wxToolBar class], wxUSE_TOOLBAR_NATIVE)
1283
WX_ARG_ENABLE(treebook, [ --enable-treebook use wxTreebook class], wxUSE_TREEBOOK)
1284
WX_ARG_ENABLE(toolbook, [ --enable-toolbook use wxToolbook class], wxUSE_TOOLBOOK)
1285
WX_ARG_ENABLE(treectrl, [ --enable-treectrl use wxTreeCtrl class], wxUSE_TREECTRL)
1286
WX_ARG_ENABLE(tipwindow, [ --enable-tipwindow use wxTipWindow class], wxUSE_TIPWINDOW)
1287
WX_ARG_ENABLE(popupwin, [ --enable-popupwin use wxPopUpWindow class], wxUSE_POPUPWIN)
1289
dnl ---------------------------------------------------------------------------
1291
dnl ---------------------------------------------------------------------------
1293
WX_ARG_ENABLE(commondlg, [ --enable-commondlg use all common dialogs], wxUSE_COMMONDLGS)
1294
WX_ARG_ENABLE(aboutdlg, [ --enable-aboutdlg use wxAboutBox], wxUSE_ABOUTDLG)
1295
WX_ARG_ENABLE(choicedlg, [ --enable-choicedlg use wxChoiceDialog], wxUSE_CHOICEDLG)
1296
WX_ARG_ENABLE(coldlg, [ --enable-coldlg use wxColourDialog], wxUSE_COLOURDLG)
1297
WX_ARG_ENABLE(filedlg, [ --enable-filedlg use wxFileDialog], wxUSE_FILEDLG)
1298
WX_ARG_ENABLE(finddlg, [ --enable-finddlg use wxFindReplaceDialog], wxUSE_FINDREPLDLG)
1299
WX_ARG_ENABLE(fontdlg, [ --enable-fontdlg use wxFontDialog], wxUSE_FONTDLG)
1300
WX_ARG_ENABLE(dirdlg, [ --enable-dirdlg use wxDirDialog], wxUSE_DIRDLG)
1301
WX_ARG_ENABLE(msgdlg, [ --enable-msgdlg use wxMessageDialog], wxUSE_MSGDLG)
1302
WX_ARG_ENABLE(numberdlg, [ --enable-numberdlg use wxNumberEntryDialog], wxUSE_NUMBERDLG)
1303
WX_ARG_ENABLE(splash, [ --enable-splash use wxSplashScreen], wxUSE_SPLASH)
1304
WX_ARG_ENABLE(textdlg, [ --enable-textdlg use wxTextDialog], wxUSE_TEXTDLG)
1305
WX_ARG_ENABLE(tipdlg, [ --enable-tipdlg use startup tips], wxUSE_STARTUP_TIPS)
1306
WX_ARG_ENABLE(progressdlg, [ --enable-progressdlg use wxProgressDialog], wxUSE_PROGRESSDLG)
1307
WX_ARG_ENABLE(wizarddlg, [ --enable-wizarddlg use wxWizard], wxUSE_WIZARDDLG)
1309
dnl ---------------------------------------------------------------------------
1310
dnl misc GUI options
1311
dnl ---------------------------------------------------------------------------
1313
WX_ARG_ENABLE(menus, [ --enable-menus use wxMenu/wxMenuBar/wxMenuItem classes], wxUSE_MENUS)
1314
WX_ARG_ENABLE(miniframe, [ --enable-miniframe use wxMiniFrame class], wxUSE_MINIFRAME)
1315
WX_ARG_ENABLE(tooltips, [ --enable-tooltips use wxToolTip class], wxUSE_TOOLTIPS)
1316
WX_ARG_ENABLE(splines, [ --enable-splines use spline drawing code], wxUSE_SPLINES)
1317
WX_ARG_ENABLE(mousewheel, [ --enable-mousewheel use mousewheel], wxUSE_MOUSEWHEEL)
1318
WX_ARG_ENABLE(validators, [ --enable-validators use wxValidator and derived classes], wxUSE_VALIDATORS)
1319
WX_ARG_ENABLE(busyinfo, [ --enable-busyinfo use wxBusyInfo], wxUSE_BUSYINFO)
1320
WX_ARG_ENABLE(joystick, [ --enable-joystick use wxJoystick], wxUSE_JOYSTICK)
1321
WX_ARG_ENABLE(metafile, [ --enable-metafiles use wxMetaFile (Win32 only)], wxUSE_METAFILE)
1322
WX_ARG_ENABLE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE)
1323
WX_ARG_ENABLE(accessibility,[ --enable-accessibility enable accessibility support], wxUSE_ACCESSIBILITY)
1325
if test "$wxUSE_MSW" = "1"; then
1326
WX_ARG_ENABLE(dccache, [ --enable-dccache cache temporary wxDC objects (Win32 only)], wxUSE_DC_CACHEING)
1329
dnl ---------------------------------------------------------------------------
1330
dnl support for image formats that do not rely on external library
1331
dnl ---------------------------------------------------------------------------
1333
WX_ARG_ENABLE(palette, [ --enable-palette use wxPalette class], wxUSE_PALETTE)
1334
WX_ARG_ENABLE(image, [ --enable-image use wxImage class], wxUSE_IMAGE)
1335
WX_ARG_ENABLE(gif, [ --enable-gif use gif images (GIF file format)], wxUSE_GIF)
1336
WX_ARG_ENABLE(pcx, [ --enable-pcx use pcx images (PCX file format)], wxUSE_PCX)
1337
WX_ARG_ENABLE(tga, [ --enable-tga use tga images (TGA file format)], wxUSE_TGA)
1338
WX_ARG_ENABLE(iff, [ --enable-iff use iff images (IFF file format)], wxUSE_IFF)
1339
WX_ARG_ENABLE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM)
1340
WX_ARG_ENABLE(xpm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM)
1341
WX_ARG_ENABLE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR)
1345
dnl ---------------------------------------------------------------------------
1347
dnl ---------------------------------------------------------------------------
1349
dnl Should this be --enable? I flip-flopped a couple of times and this seems
1350
dnl in the spirit if not the letter, we have gtk-prefix and the like in this group.
1351
dnl It doesn't actually change anything but the output file names.
1352
AC_ARG_WITH(flavour, [ --with-flavour=NAME specify a name to identify this build], [WX_FLAVOUR="$withval"])
1354
dnl ---------------------------------------------------------------------------
1355
dnl some win32 settings
1356
dnl ---------------------------------------------------------------------------
1358
WX_ARG_ENABLE(official_build, [ --enable-official_build official build of wxWidgets (win32 DLL only)], wxUSE_OFFICIAL_BUILD)
1359
AC_ARG_ENABLE(vendor, [ --enable-vendor=VENDOR vendor name (win32 DLL only)], [VENDOR="$enableval"])
1360
if test "x$VENDOR" = "x"; then
1367
dnl cache the options values before (may be) aborting below
1370
dnl check that no more than one toolkit is given and that if none are given that
1371
dnl we have a default one
1373
AC_MSG_CHECKING(for toolkit)
1375
# In Wine, we need to default to MSW, not GTK or MOTIF
1376
if test "$wxUSE_WINE" = "yes"; then
1377
DEFAULT_DEFAULT_wxUSE_GTK=0
1378
DEFAULT_DEFAULT_wxUSE_MOTIF=0
1379
DEFAULT_DEFAULT_wxUSE_MSW=1
1386
if test "$wxUSE_GUI" = "yes"; then
1388
if test "$USE_BEOS" = 1; then
1389
AC_MSG_ERROR([BeOS GUI is not supported yet, use --disable-gui])
1392
if test "$TOOLKIT_GIVEN" = 1; then
1393
dnl convert "yes", "any" or a number to 1 and "no" to 0
1394
for toolkit in `echo $ALL_TOOLKITS`; do
1396
eval "value=\$${var}"
1397
if test "x$value" = "xno"; then
1399
elif test "x$value" != "x"; then
1403
if test "x$value" != "x" -a "x$value" != "xyes" -a "x$value" != "xno"; then
1404
eval "wx${toolkit}_VERSION=$value"
1408
dnl try to guess the most apropriate toolkit for this platform
1409
for toolkit in `echo $ALL_TOOLKITS`; do
1410
if test "$has_toolkit_in_cache" != 1; then
1411
var=DEFAULT_DEFAULT_wxUSE_$toolkit
1413
var=DEFAULT_wxUSE_$toolkit
1415
eval "version=\$DEFAULT_wx${toolkit}_VERSION"
1416
if test "x$version" != "x"; then
1417
eval "wx${toolkit}_VERSION=$version"
1420
eval "wxUSE_$toolkit=\$${var}"
1424
dnl we suppose that expr is available (maybe there is a better way to do
1425
dnl this? what about using ALL_TOOLKITS? TODO)
1426
NUM_TOOLKITS=`expr ${wxUSE_COCOA:-0} + ${wxUSE_GTK:-0} + ${wxUSE_MAC:-0} \
1427
+ ${wxUSE_MGL:-0} + ${wxUSE_DFB:-0} + ${wxUSE_MICROWIN:-0} \
1428
+ ${wxUSE_MOTIF:-0} + ${wxUSE_MSW:-0} + ${wxUSE_X11:-0}`
1430
dnl Allow wxUSE_PM only for OS/2 with EMX.
1432
*-pc-os2_emx | *-pc-os2-emx )
1433
NUM_TOOLKITS=`expr ${NUM_TOOLKITS} + ${wxUSE_PM:-0}`
1436
case "$NUM_TOOLKITS" in
1440
AC_MSG_ERROR(Please specify a toolkit -- cannot determine the default for ${host})
1443
AC_MSG_ERROR(Please specify at most one toolkit (maybe some are cached in configarg.cache?))
1446
# to be removed when --disable-gtk2 isn't needed
1447
if test "x$wxUSE_GTK2" = "xyes"; then
1449
elif test "x$wxUSE_GTK2" = "xno"; then
1453
dnl cache the wxUSE_<TOOLKIT> values too
1454
for toolkit in `echo $ALL_TOOLKITS`; do
1456
eval "value=\$${var}"
1457
if test "x$value" != x; then
1458
cache_var=CACHE_$toolkit
1459
eval "cache=\$${cache_var}"
1460
if test "$cache" = 1; then
1461
echo "$var=$value" >> ${wx_arg_cache_file}
1462
eval "version=\$wx${toolkit}_VERSION"
1463
if test "x$version" != "x"; then
1464
echo "wx${toolkit}_VERSION=$version" >> ${wx_arg_cache_file}
1467
if test "$value" = 1; then
1468
toolkit_echo=`echo $toolkit | tr '[[A-Z]]' '[[a-z]]'`
1469
AC_MSG_RESULT($toolkit_echo)
1474
if test "x$host_alias" != "x"; then
1475
AC_MSG_RESULT(base ($host_alias hosted) only)
1477
AC_MSG_RESULT(base only)
1481
dnl ---------------------------------------------------------------------------
1482
dnl Checks for programs
1483
dnl ---------------------------------------------------------------------------
1485
dnl flush the cache because checking for programs might abort
1488
dnl C-compiler checks
1489
dnl defines CC with the compiler to use
1490
dnl defines GCC with yes if using gcc
1491
dnl defines GCC empty if not using gcc
1494
dnl this magic incantation is needed to prevent AC_PROG_CC from setting the
1495
dnl default CFLAGS (something like "-g -O2") -- we don't need this as we add
1496
dnl -g and -O flags ourselves below
1500
dnl is -traditional needed for correct compilations
1501
dnl adds -traditional for gcc if needed
1502
AC_PROG_GCC_TRADITIONAL
1504
dnl C++-compiler checks
1505
dnl defines CXX with the compiler to use
1506
dnl defines GXX with yes if using gxx
1507
dnl defines GXX empty if not using gxx
1508
dnl defines CXXFLAGS
1510
dnl see CFLAGS line above
1511
CXXFLAGS=${CXXFLAGS:=}
1512
AC_BAKEFILE_PROG_CXX
1515
dnl defines RANLIB with the appropriate command
1519
dnl defines AR with the appropriate command
1521
dnl For Sun CC AC_BAKEFILE below sets AR to the compiler itself.
1522
if test "x$SUNCXX" != xyes; then
1523
AC_CHECK_TOOL(AR, ar)
1524
if test "x$AR" = "x" ; then
1525
AC_MSG_ERROR([ar is needed to build wxWidgets])
1530
dnl defines INSTALL with the appropriate command
1533
dnl make install path absolute (if not already);
1534
dnl will fail with (some) MSDOS paths
1538
?:* ) # Drive letter, considered as absolute.
1541
INSTALL=`pwd`/${INSTALL} ;;
1544
retest_macosx_linking=no
1546
dnl Support the old --enable-universal_binary in case anyone was using it.
1547
#if test "$wxUSE_MAC" = 1; then
1548
if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
1549
dnl --enable-universal_binary uses a default SDK (currently 10.4u)
1550
dnl --enable-universal_binary=SDK names a path to an SDK
1551
if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
1552
# Implicitly turn on the new --with-macosx-sdk using the default
1553
# SDK which provides the behavior this option has always had.
1554
if test "x$wxUSE_MACOSX_SDK" = "x"; then
1555
AC_MSG_WARN([Enabling default SDK due to --enable-universal_binary.])
1556
AC_MSG_WARN([If you don't want this, specify --without-macosx-sdk])
1557
wxUSE_MACOSX_SDK=yes
1560
# Complain to user if he specified an argument to --enable-universal_binary
1561
# and also 1) specified --with-macosx-sdk using the default (yes) or
1562
# 2) specified --with-macosx-sdk using a path or 3) specified
1563
# --without-macosx-sdk (no).
1564
if test "x$wxUSE_MACOSX_SDK" != "x" ; then
1565
AC_MSG_FAILURE([Please specify the new --with-macosx-sdk=PATH and do not specify an arg to --enable-universal_binary])
1567
# Put the SDK path into the wxUSE_MACOSX_SDK. We don't have to
1568
# special-case the empty string because the below test simply
1569
# converts "no" to the empty string anyway.
1570
wxUSE_MACOSX_SDK="$wxUSE_UNIVERSAL_BINARY"
1571
dnl Warn about deprecated usage.
1572
AC_MSG_WARN([Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument])
1575
dnl FIXME: I think it would be better to put this into CC, CXX, and LD rather than the flags.
1576
OSX_UNIV_OPTS="-arch ppc -arch i386"
1577
CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
1578
CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
1579
OBJCXXFLAGS="$OSX_UNIV_OPTS $OBJCXXFLAGS"
1580
OBJCFLAGS="$OSX_UNIV_OPTS $OBJCFLAGS"
1581
LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
1582
dnl NOTE: Only the compiler driver needs arch flags. The link editor
1583
dnl is incapable of using them but the compiler driver (which we use
1584
dnl as LD when building dynamic libraries) uses them to invoke the
1585
dnl real ld multiple times. If we moved to libtool -dynamic we would
1586
dnl need no arch flags because libtool automatically invokes ld for
1587
dnl every architecture found in the fat input files.
1589
dnl For static library builds, AR/RANLIB automatically create proper
1590
dnl fat archives although AR is unable to update them once RANLIB has
1591
dnl made them into proper fat archives. Fortunately, our link process
1592
dnl simply removes the .a file before using ar to create a new one.
1593
dnl If we did move to libtool -static we still wouldn't need arch flags
1594
dnl because libtool automatically figures it out based on input.
1595
retest_macosx_linking=yes
1597
dnl HACK: PCH could be made to work by precompiling for each architecture into separate directories
1598
dnl and including all architecture directories with each compiler invocation.
1599
dnl That would require a major rework of Bakefile and at the same time it would be nice to have
1600
dnl Objective-C++ precompiled headers.
1601
AC_MSG_WARN([Disabling precompiled headers due to universal binary build.])
1606
dnl Set up the Mac OS X SDK. We do this early so configure tests will occur
1607
dnl with the SDK in place.
1608
dnl NOTE: We clobber wxUSE_MACOSX_SDK with the SDK path
1609
if test "x$wxUSE_MACOSX_SDK" = "xno"; then
1611
elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
1612
# TODO: Search for most recent SDK and use it.
1613
wxUSE_MACOSX_SDK="/Developer/SDKs/MacOSX10.4u.sdk"
1617
if test "x$wxUSE_MACOSX_SDK" != "x"; then
1618
AC_MSG_CHECKING([for SDK directory $wxUSE_MACOSX_SDK])
1619
if ! test -d "$wxUSE_MACOSX_SDK"; then
1620
AC_MSG_FAILURE([not found])
1622
AC_MSG_RESULT([exists])
1624
MACOSX_SDK_OPTS="-isysroot $wxUSE_MACOSX_SDK"
1625
eval "CC=\"$CC $MACOSX_SDK_OPTS\""
1626
eval "CXX=\"$CXX $MACOSX_SDK_OPTS\""
1627
eval "LD=\"$LD $MACOSX_SDK_OPTS\""
1628
retest_macosx_linking=yes
1629
dnl NOTE: When libtool is used in lieu of AR/RANLIB (i.e. in static mode)
1630
dnl the syslibroot makes no difference. We aren't using libtool now but
1631
dnl if we ever did, be aware that you don't need to worry about it.
1634
dnl Set up the deployment target
1635
dnl No : Don't specify a min version even if using an SDK
1636
dnl Yes : Use the version from the SDK if used, otherwise same as no
1637
dnl Param: Use the specified version
1638
if test "x$wxUSE_MACOSX_VERSION_MIN" = "xno"; then
1639
wxUSE_MACOSX_VERSION_MIN=
1640
elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then
1641
if test "x$wxUSE_MACOSX_SDK" != "x"; then
1642
AC_MSG_CHECKING([SDK deployment version])
1643
dnl We need to quote the next line where we don't need macros and do need [] in the regex
1645
MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
1647
# If that failed, try again with the new key
1648
if test "x$MACOSX_SDK_PLIST_VERSION_MIN" == "x"; then
1650
MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
1654
if test "x$MACOSX_SDK_PLIST_VERSION_MIN" != "x"; then
1655
wxUSE_MACOSX_VERSION_MIN=$MACOSX_SDK_PLIST_VERSION_MIN
1656
AC_MSG_RESULT([$wxUSE_MACOSX_VERSION_MIN])
1658
AC_MSG_WARN([Could not determine deployment target from SDKSettings.plist])
1659
wxUSE_MACOSX_VERSION_MIN=
1662
wxUSE_MACOSX_VERSION_MIN=
1666
if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then
1667
MACOSX_VERSION_MIN_OPTS="-mmacosx-version-min=$wxUSE_MACOSX_VERSION_MIN"
1668
eval "CC=\"$CC $MACOSX_VERSION_MIN_OPTS\""
1669
eval "CXX=\"$CXX $MACOSX_VERSION_MIN_OPTS\""
1670
eval "LD=\"$LD $MACOSX_VERSION_MIN_OPTS\""
1671
retest_macosx_linking=yes
1674
dnl If either an SDK or a version option was added, make sure that we can
1675
dnl still compile and link both C and C++. If we didn't do this, then most
1676
dnl of the remaining tests would fail.
1677
if test "x$retest_macosx_linking" = "xyes"; then
1679
AC_MSG_CHECKING([if C compiler works with SDK/version options])
1680
AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1])
1684
AC_MSG_CHECKING([if C++ compiler works with SDK/version options])
1685
AC_TRY_LINK([],[],[AC_MSG_RESULT([yes])],[AC_MSG_FAILURE([no. Try a different SDK]); exit 1])
1692
dnl The other BSD's should probably go in here too, since this is
1693
dnl to workaround a strange static lib BSDism.
1694
dnl Mac OS X install seems to ignore -p option...
1696
INSTALL_PROGRAM="cp -fp"
1697
INSTALL_DATA="cp -fp"
1704
dnl defines STRIP as strip or nothing (true) if not found
1705
AC_CHECK_TOOL(STRIP, strip, true)
1708
if test "$wxUSE_WINE" = "yes"; then
1709
AC_CHECK_TOOL(WINDRES, wrc)
1713
*-*-cygwin* | *-*-mingw32* )
1714
dnl Bakefile CVS (as of 2005-11-24) now detects windres properly
1715
dnl ... maybe it does, but it does not make it available here
1716
dnl anymore, so do it ourselves still.
1717
AC_CHECK_TOOL(WINDRES, windres)
1719
AC_CHECK_TOOL(DLLTOOL, dlltool)
1724
dnl does make support "-include" (only GNU make does AFAIK)?
1725
AC_CACHE_CHECK([if make is GNU make], wx_cv_prog_makeisgnu,
1727
if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null |
1728
$EGREP -s GNU > /dev/null); then
1729
wx_cv_prog_makeisgnu="yes"
1731
wx_cv_prog_makeisgnu="no"
1735
if test "x$wx_cv_prog_makeisgnu" = "xyes"; then
1741
AC_SUBST(IF_GNU_MAKE)
1743
dnl we don't need to check for VPATH support in GNU make - it does have it
1744
if test "x$wx_cv_prog_makeisgnu" != "xyes"; then
1745
dnl check if VPATH works
1746
AC_CACHE_CHECK([if make supports VPATH], wx_cv_prog_makevpath, [
1748
cat - << EOF > confMake
1754
if test ! -d sub ; then
1757
echo dummy > sub/file
1758
${MAKE-make} -f confMake VPATH=sub 2>&5 > /dev/null
1760
rm -f sub/file check final_file confMake
1762
if test "$RESULT" = 0; then
1763
wx_cv_prog_makevpath="yes"
1765
wx_cv_prog_makevpath="no"
1769
if test "x$wx_cv_prog_makevpath" != "xyes"; then
1771
You need a make-utility that is able to use the variable
1773
If your version of make does not support VPATH correctly,
1774
please install GNU-make (possibly as gmake), and start
1775
configure with the following command:
1776
export MAKE=gmake; ./configure for sh-type shells
1777
setenv MAKE gmake; ./configure for csh-type shells
1778
Also please do remember to use gmake in this case every time
1779
you are trying to compile.
1781
fi dnl make without VPATH
1784
dnl needed for making link to setup.h
1788
dnl ------------------------------------------------------------------------
1789
dnl Platform specific tests
1790
dnl ------------------------------------------------------------------------
1792
dnl xlC needs -qunique under AIX so that one source file can be
1793
dnl compiled to multiple object files and safely linked together.
1794
if test "x$XLCXX" = "xyes" -a "x$USE_AIX" = "x1"; then
1795
CXXFLAGS="-qunique $CXXFLAGS"
1798
dnl This case is for PowerPC OS X vs. everything else
1801
AC_MSG_CHECKING([if __POWERPC__ is already defined])
1802
AC_TRY_COMPILE([],[#ifndef __POWERPC__
1803
choke me for lack of PowerPC
1806
[AC_MSG_RESULT([yes])],
1807
[AC_MSG_RESULT([no])
1808
AC_DEFINE(__POWERPC__)
1813
dnl This case is for OS X vs. everything else
1816
AC_MSG_CHECKING([if CoreFoundation/CFBase.h is usable])
1817
AC_TRY_COMPILE([#include <CoreFoundation/CFBase.h>
1819
[AC_MSG_RESULT([yes])],
1820
[AC_MSG_RESULT([no])
1821
AC_MSG_CHECKING([if __CF_USE_FRAMEWORK_INCLUDES__ is required])
1822
AC_TRY_COMPILE([#define __CF_USE_FRAMEWORK_INCLUDES__
1823
#include <CoreFoundation/CFBase.h>
1825
[AC_MSG_RESULT([yes])
1826
dnl We must use -D so source files that don't include wx/setup.h
1827
dnl but do include CFBase will work.
1828
CPPFLAGS="-D__CF_USE_FRAMEWORK_INCLUDES__ $CPPFLAGS"],
1829
[AC_MSG_FAILURE([no. CoreFoundation not available.])]
1836
dnl Determine whether we want to use Cygwin as Windows or POSIX platform: the
1837
dnl latter makes more sense for wxGTK/Motif/X11 ports
1842
if test "$wxUSE_MSW" = 1 ; then
1845
dnl when we use cygwin compiler with -mno-cygwin option it uses mingw32
1846
dnl headers and libraries, so it's Windows-like in this case
1847
AC_CACHE_CHECK([if -mno-cygwin is in effect], wx_cv_nocygwin,
1862
if test "$wx_cv_nocygwin" = "yes"; then
1868
if test "$wants_win32" = 1 ; then
1869
BAKEFILE_FORCE_PLATFORM=win32
1877
if test "$wxUSE_WINE" = "yes"; then
1879
LDFLAGS_GUI="-mwindows"
1882
dnl NB: The two tests bellow are *NOT* mutually exclusive! They should only
1883
dnl take effect on Cygwin/Mingw and not other platforms.
1884
if test "$wants_win32" = 1 ; then
1887
AC_DEFINE(__WIN32__)
1888
AC_DEFINE(__WIN95__)
1889
AC_DEFINE(__WINDOWS__)
1890
AC_DEFINE(__GNUWIN32__)
1893
if test "$doesnt_want_win32" = 1 ; then
1897
dnl (end of Windows-only piece)
1899
if test "$USE_UNIX" = 1 ; then
1904
dnl This case is for OS/2 vs. everything else
1906
*-pc-os2_emx | *-pc-os2-emx )
1907
dnl ---------------------------------------------------------------------
1908
dnl When we are using gcc on OS/2, we want to be either using resources
1909
dnl (PM) or a more complete POSIX emulation for Motif/GTK+/X11.
1910
dnl Moreover we need to link explicitly against either stdcpp.a or
1911
dnl stdcxx.a (depending on compiler version), since we are using "gcc",
1913
dnl ---------------------------------------------------------------------
1914
dnl (OS/2-only piece)
1915
if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
1916
dnl More complete Unix emulation for unix-like ports
1917
dnl by linking in POSIX/2's cExt (if available).
1918
AC_CHECK_LIB(cExt, drand48, LIBS="$LIBS -lcExt")
1920
dnl Include resources for the "native" port (wxPM).
1921
RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res"
1923
dnl Check for the gcc version (and thereby for the C runtime library).
1924
dnl wx_cv_gccversion = EMX2 -> Standard EMX environment
1925
dnl wx_cv_gccversion = EMX3 -> EMX with gcc-3.0.3 or gcc-3.2.1
1926
dnl wx_cv_gccversion = Innotek5 -> gcc-3.2.2 with Innotek libc5
1927
dnl wx_cv_gccversion = Innotek6 -> gcc-3.3.5 with Innotek libc6.
1928
AC_CACHE_CHECK([for gcc/libc version], wx_cv_gccversion,[
1930
dnl Check the gcc version macro.
1936
FILE *f=fopen("conftestval", "w");
1941
#elif (__GNUC__==3) && ((__GNUC_MINOR__ < 2) || ((__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__<2)))
1943
#elif (__GNUC__==3) && (__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__==2)
1952
wx_cv_gccversion=`cat conftestval`,
1953
wx_cv_gccversion="EMX2",
1954
dnl Compilation error: Assuming standard EMX environment
1955
wx_cv_gccversion="EMX2"
1958
if test "$wx_cv_gccversion" = "EMX2"; then
1959
LIBS="$LIBS -lstdcpp"
1960
LDFLAGS="$LDFLAGS -Zsysv-signals"
1962
if test "$wx_cv_gccversion" = "EMX3"; then
1963
LIBS="$LIBS -lstdcxx -lgcc"
1964
LDFLAGS="$LDFLAGS -Zsysv-signals"
1966
LIBS="$LIBS -lstdc++"
1969
if test "$wxUSE_SHARED" = "yes" -a "$wxUSE_OMF" = "no"; then
1970
AC_MSG_WARN([Building DLLs requires OMF mode, enabled])
1974
dnl (end of OS/2-only piece)
1977
dnl ---------------------------------------------------------------------
1978
dnl look for strcasecmp() in string.h and then strings.h if it's not
1979
dnl there. Don't do this on OS/2, where "stricmp" is the function to be
1981
dnl ---------------------------------------------------------------------
1982
dnl (non-OS/2-only piece)
1984
AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
1989
strcasecmp("foo", "bar");
1991
ac_cv_string_strcasecmp=yes,
1992
ac_cv_string_strcasecmp=no
1996
if test x"$ac_cv_string_strcasecmp" = "xyes"; then
1997
AC_DEFINE(HAVE_STRCASECMP_IN_STRING_H)
1999
AC_CACHE_CHECK([for strcasecmp() in strings.h], ac_cv_strings_strcasecmp, [
2001
#include <strings.h>
2004
strcasecmp("foo", "bar");
2006
ac_cv_strings_strcasecmp=yes,
2007
ac_cv_strings_strcasecmp=no
2011
if test x"$ac_cv_strings_strcasecmp" = "xyes"; then
2012
AC_DEFINE(HAVE_STRCASECMP_IN_STRINGS_H)
2014
AC_MSG_ERROR([No case-insensitive string comparison function found.])
2018
dnl (end of non-OS/2-only piece)
2022
dnl ------------------------------------------------------------------------
2023
dnl Check for headers
2024
dnl ------------------------------------------------------------------------
2026
dnl Note: non-empty last parameter makes check compile-only,
2027
dnl skipping worthless preprocessing check
2028
AC_CHECK_HEADERS(stdlib.h fnmatch.h langinfo.h malloc.h unistd.h wchar.h,,, [AC_INCLUDES_DEFAULT()])
2030
dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
2031
if test "$ac_cv_header_wchar_h" != "yes"; then
2032
AC_CHECK_HEADERS(wcstr.h,,, [AC_INCLUDES_DEFAULT()])
2036
*-pc-os2_emx | *-pc-os2-emx )
2037
dnl Explicitly link -lintl if langinfo.h is available
2038
dnl and intl not yet included in libc
2039
if test $ac_cv_header_langinfo_h = "yes" \
2040
-a \( "$wx_cv_gccversion" = "EMX2" \
2041
-o "$wx_cv_gccversion" = "EMX3" \
2042
-o "$wx_cv_gccversion" = "Innotek5" \); then
2048
dnl POSIX needs this for select(), but old systems don't have it
2049
if test "$USE_UNIX" = 1 ; then
2050
AC_CHECK_HEADERS([sys/select.h],,, [AC_INCLUDES_DEFAULT()])
2053
dnl ---------------------------------------------------------------------------
2054
dnl Checks for compiler characteristics
2055
dnl ---------------------------------------------------------------------------
2057
dnl defines const to be empty if c-compiler does not support const fully
2059
dnl defines inline to a sensible value for the c-compiler
2062
dnl check the sizes of integral types (give some reasonable default values for
2063
dnl cross-compiling)
2064
dnl defines the size of certain types of variables in SIZEOF_<TYPE>
2065
AC_CHECK_SIZEOF(char, 1)
2066
AC_CHECK_SIZEOF(short, 2)
2067
AC_CHECK_SIZEOF(void *, 4)
2068
AC_CHECK_SIZEOF(int, 4)
2069
AC_CHECK_SIZEOF(long, 4)
2070
AC_CHECK_SIZEOF(size_t, 4)
2074
AC_CHECK_SIZEOF(long long, 8)
2077
AC_CHECK_SIZEOF(long long, 0)
2078
if test "$ac_cv_sizeof_long_long" != "0"; then
2079
dnl HPUX 10.20 headers need this define in order to use long long definitions
2080
CPPFLAGS="-D_INCLUDE_LONGLONG $CPPFLAGS"
2084
AC_CHECK_SIZEOF(long long, 0)
2087
dnl SGI/Irix's stdio.h does not include wchar_t. Mac OS X does not provide
2088
dnl wchar.h and wchar_t is defined by stdlib.h (GD)
2089
AC_CHECK_SIZEOF(wchar_t, 0,
2091
/* DJGPP's wchar_t is now a keyword in C++ (still not C though) */
2092
#if defined(__DJGPP__) && !( (__GNUC_MINOR__ >= 8 && __GNUC__ == 2 ) || __GNUC__ >= 3 )
2093
# error "fake wchar_t"
2097
# include <stddef.h>
2101
#ifdef HAVE_STDLIB_H
2102
# include <stdlib.h>
2107
if test "$ac_cv_sizeof_wchar_t" != "0"; then
2113
dnl checks needed to define wxVaCopy
2114
AC_CACHE_CHECK([for va_copy],
2120
void foo(char *f, ...)
2133
wx_cv_func_va_copy=yes,
2134
wx_cv_func_va_copy=no
2140
if test $wx_cv_func_va_copy = "yes"; then
2141
AC_DEFINE(HAVE_VA_COPY)
2143
dnl try to understand how can we copy va_lists
2144
AC_CACHE_CHECK([if va_list can be copied by value],
2145
wx_cv_type_va_list_lvalue,
2149
int foo(char *f, ...)
2154
if ( va_arg(ap1, int) != 17 || va_arg(ap2, int) != 17 )
2162
return foo("hi", 17);
2164
wx_cv_type_va_list_lvalue=yes,
2165
wx_cv_type_va_list_lvalue=no,
2166
dnl assume most common case for cross-compiling...
2167
wx_cv_type_va_list_lvalue=yes
2172
if test $wx_cv_type_va_list_lvalue != "yes"; then
2173
dnl we suppose that the only thing which can't be copied like this
2174
dnl are arrays... only experience will show whether this is really true
2175
AC_DEFINE(VA_LIST_IS_ARRAY)
2179
dnl don't check for vararg macros if they're explicitly disabled: this is
2180
dnl useful if the user code using the library wants to limit itself to standard
2181
dnl C++ only (e.g. is compiled with g++ -std=c++98)
2182
if test "$wxUSE_VARARG_MACROS" = "yes"; then
2184
dnl Check if variadic macros (C99 feature) are supported:
2186
[whether the compiler supports variadic macros],
2187
[wx_cv_have_variadic_macros],
2189
dnl C compiler might support variadic macros when C++ one doesn't
2190
dnl (happens with gcc/g++ 2.95.4), so must use C++ one explicitly
2196
#define test(fmt, ...) printf(fmt, __VA_ARGS__)
2199
test("%s %d %p", "test", 1, 0);
2202
[wx_cv_have_variadic_macros=yes],
2203
[wx_cv_have_variadic_macros=no]
2209
if test $wx_cv_have_variadic_macros = "yes"; then
2210
AC_DEFINE(HAVE_VARIADIC_MACROS)
2213
fi dnl wxUSE_VARARG_MACROS == yes
2215
dnl check for large file support
2218
dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command
2219
dnl line because otherwise the system headers risk being included before
2220
dnl wx/defs.h which defines these constants leading to inconsistent
2221
dnl sizeof(off_t) in different source files of the same program and linking
2223
if test "x$wx_largefile" = "xyes"; then
2224
if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
2225
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
2227
dnl We get "Large Files (ILP32) not supported in strict ANSI mode."
2228
dnl #error from HP standard headers unless __STDC_EXT__ is defined.
2229
dnl The compiler should define it automatically, but some old g++
2230
dnl versions don't define it, so test and add it if necessary. AFAIK
2231
dnl the problem only affects the C++ compiler so it is added to
2233
if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then
2235
[if -D__STDC_EXT__ is required],
2236
wx_cv_STDC_EXT_required,
2242
#ifndef __STDC_EXT__
2246
wx_cv_STDC_EXT_required=no,
2247
wx_cv_STDC_EXT_required=yes
2252
if test "x$wx_cv_STDC_EXT_required" = "xyes"; then
2253
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__"
2257
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGE_FILES"
2259
dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source
2261
if test "$ac_cv_sys_largefile_source" != no; then
2262
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
2266
dnl check for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
2269
dnl check for iostream (as opposed to iostream.h) standard header
2270
WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
2272
dnl check whether C++ compiler supports bool built-in type
2275
dnl check whether C++ compiler supports explicit keyword
2278
dnl check whether C++ compiler supports C++ casts
2280
AC_CXX_REINTERPRET_CAST
2282
dnl we don't use HAVE_DYNAMIC_CAST anywhere right now...
2283
dnl AC_CXX_DYNAMIC_CAST
2285
dnl With Sun CC, temporaries have block scope by default. This flag is needed
2286
dnl to get the expression scope behaviour that conforms to the standard.
2287
if test "x$SUNCXX" = xyes; then
2288
CXXFLAGS="-features=tmplife $CXXFLAGS"
2291
dnl Sun X11 headers are (still, in 2005!) non-ANSI and the best they could do
2292
dnl was to hack their C++ compiler to accept them silently -- but C compiler
2293
dnl still spits out dozens of warnings for each X include file, so suppress
2295
if test "x$SUNCC" = xyes; then
2296
CFLAGS="-erroff=E_NO_EXPLICIT_TYPE_GIVEN $CFLAGS"
2299
dnl SGI mipsPro compiler version 7.4.4 and later (and maybe some earlier
2300
dnl versions too but it's known that 7.4 doesn't give this warning) gives this
2301
dnl warning for "conversion from pointer to same-sized integral type" even when
2302
dnl there is an explicit cast and as there is no way to turn it off and there
2303
dnl are hundreds of these warnings in wx sources, just turn it off for now
2305
dnl a better long term solution would be to use #pragma set/reset woff in
2306
dnl wxPtrToUInt() and use it instead of casts elsewhere
2307
if test "x$SGICC" = "xyes"; then
2308
AC_CACHE_CHECK([if cc version is 7.4.4 or greater],
2309
wx_cv_prog_sgicc744,
2313
#if _SGI_COMPILER_VERSION >= 744
2314
chock me: mipsPro is 7.4.4 or later
2317
wx_cv_prog_sgicc744=no,
2318
wx_cv_prog_sgicc744=yes
2323
if test "x$wx_cv_prog_sgicc744" = "xyes"; then
2324
CFLAGS="-woff 3970 $CFLAGS"
2327
if test "x$SGICXX" = "xyes"; then
2328
AC_CACHE_CHECK([if CC version is 7.4.4 or greater],
2329
wx_cv_prog_sgicxx744,
2334
#if _SGI_COMPILER_VERSION >= 744
2335
chock me: mipsPro is 7.4.4 or later
2338
wx_cv_prog_sgicxx744=no,
2339
wx_cv_prog_sgicxx744=yes
2345
if test "x$wx_cv_prog_sgicxx744" = "xyes"; then
2346
CXXFLAGS="-woff 3970 $CXXFLAGS"
2350
dnl HP-UX c89/aCC compiler warnings
2351
if test "x$HPCC" = "xyes"; then
2352
dnl 2011: "unrecognized preprocessor directive": nice warning but it's given
2353
dnl even for directives inside #if which is not true (i.e. which are
2354
dnl used for other compilers/OS) and so we have no way to get rid of it
2355
dnl 2450: "long long is non standard" -- yes, we know
2356
CFLAGS="+W 2011,2450 $CFLAGS"
2358
if test "x$HPCXX" = "xyes"; then
2359
dnl 2340: "value copied to temporary, reference to temporary used": very
2360
dnl painful as triggered by any occurrence of user-defined conversion
2361
CXXFLAGS="+W 2340 $CXXFLAGS"
2364
dnl DEC/Compaq/HP cxx warnings
2365
if test "x$COMPAQCXX" = "xyes"; then
2366
dnl -w0 enables all warnings, then we disable some of them:
2367
dnl basclsnondto: base class dtor non virtual (sometimes we do want this)
2368
dnl unrimpret: "end of routine block may be unreachable" is given for
2369
dnl every "if ( ) return ...; else return ...;"
2370
dnl intconlosbit: "conversion to integral type of smaller size could lose
2371
dnl data" this is a useful warning but there are too many of
2373
CXXFLAGS="-w0 -msg_disable basclsnondto,unrimpret,intconlosbit $CXXFLAGS"
2376
dnl the next few tests are all for C++ features and so need to be done using
2380
dnl check for std::string or std::wstring
2381
if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then
2382
if test "$wxUSE_UNICODE" = "yes"; then
2383
std_string="std::wstring"
2386
std_string="std::string"
2390
dnl check if <string> declares std::[w]string
2391
AC_CACHE_CHECK([for $std_string in <string>],
2392
wx_cv_class_stdstring,
2394
AC_TRY_COMPILE([#include <string>],
2396
wx_cv_class_stdstring=yes,
2397
wx_cv_class_stdstring=no
2402
if test "$wx_cv_class_stdstring" = yes; then
2403
if test "$wxUSE_UNICODE" = "yes"; then
2404
AC_DEFINE(HAVE_STD_WSTRING)
2406
dnl we don't need HAVE_STD_STRING, we just suppose it's available if
2407
dnl wxUSE_STD_STRING==yes
2409
AC_CACHE_CHECK([if std::basic_string<$char_type> works],
2410
wx_cv_class_stdbasicstring,
2415
# include <stddef.h>
2419
#ifdef HAVE_STDLIB_H
2420
# include <stdlib.h>
2425
[std::basic_string<$char_type> foo;
2426
const $char_type* dummy = foo.c_str();],
2427
wx_cv_class_stdbasicstring=yes,
2428
wx_cv_class_stdbasicstring=no
2433
if test "$wx_cv_class_stdbasicstring" != yes; then
2434
if test "$wxUSE_STL" = "yes"; then
2435
AC_MSG_ERROR([Can't use --enable-stl without $std_string or std::basic_string<$char_type>])
2436
elif grep wxUSE_STD_STRING $wx_arg_cache_file >/dev/null; then
2437
AC_MSG_ERROR([Can't use --enable-std_string without $std_string or std::basic_string<$char_type>])
2439
AC_MSG_WARN([No $std_string or std::basic_string<$char_type>, switching to --disable-std_string])
2446
if test "$wxUSE_STD_IOSTREAM" = "yes"; then
2447
AC_CHECK_TYPES([std::istream, std::ostream],,
2448
[wxUSE_STD_IOSTREAM=no],
2449
[#include <iostream>])
2451
if test "$wxUSE_STD_IOSTREAM" != "yes"; then
2452
if grep wxUSE_STD_IOSTREAM $wx_arg_cache_file >/dev/null; then
2453
AC_MSG_ERROR([Can't use --enable-std_iostreams without std::istream and std::ostream])
2455
AC_MSG_WARN([No std::iostreams, switching to --disable-std_iostreams])
2460
if test "$wxUSE_STL" = "yes"; then
2461
dnl check for basic STL functionality
2462
AC_CACHE_CHECK([for basic STL functionality],
2464
[AC_TRY_COMPILE([#include <string>
2465
#include <functional>
2466
#include <algorithm>
2469
[std::vector<int> moo;
2471
std::vector<int>::iterator it =
2472
std::find_if(moo.begin(), moo.end(),
2473
std::bind2nd(std::less<int>(), 3));],
2479
if test "$wx_cv_lib_stl" != yes; then
2480
AC_MSG_ERROR([Can't use --enable-stl as basic STL functionality is missing])
2483
dnl check for compliant std::string::compare
2484
AC_CACHE_CHECK([for compliant std::string::compare],
2485
wx_cv_func_stdstring_compare,
2486
[AC_TRY_COMPILE([#include <string>],
2487
[std::string foo, bar;
2489
foo.compare(1, 1, bar);
2490
foo.compare(1, 1, bar, 1, 1);
2492
foo.compare(1, 1, "");
2493
foo.compare(1, 1, "", 2);],
2494
wx_cv_func_stdstring_compare=yes,
2495
wx_cv_func_stdstring_compare=no
2499
if test "$wx_cv_func_stdstring_compare" = yes; then
2500
AC_DEFINE(HAVE_STD_STRING_COMPARE)
2503
dnl check for hash_map and hash_set headers
2504
AC_CHECK_HEADER([hash_map],
2505
[AC_CACHE_CHECK([for standard hash_map and hash_set],
2506
wx_cv_class_stdhashmapset,
2507
[AC_TRY_COMPILE([#include <hash_map>
2508
#include <hash_set>],
2509
[std::hash_map<double*, char*, std::hash<double*>, std::equal_to<double*> > test1;
2510
std::hash_set<char*, std::hash<char*>, std::equal_to<char*> > test2;],
2511
wx_cv_class_stdhashmapset=yes,
2512
wx_cv_class_stdhashmapset=no)
2519
if test "$wx_cv_class_stdhashmapset" = yes; then
2520
AC_DEFINE(HAVE_HASH_MAP)
2521
AC_DEFINE(HAVE_STD_HASH_MAP)
2524
AC_CHECK_HEADER([ext/hash_map],
2525
[AC_CACHE_CHECK([for GNU hash_map and hash_set],
2526
wx_cv_class_gnuhashmapset,
2527
[AC_TRY_COMPILE([#include <ext/hash_map>
2528
#include <ext/hash_set>],
2529
[__gnu_cxx::hash_map<double*, char*, __gnu_cxx::hash<double*>, std::equal_to<double*> > test1;
2530
__gnu_cxx::hash_set<char*, __gnu_cxx::hash<char*>, std::equal_to<char*> > test2;],
2531
wx_cv_class_gnuhashmapset=yes,
2532
wx_cv_class_gnuhashmapset=no)
2539
if test "$wx_cv_class_gnuhashmapset" = yes; then
2540
AC_DEFINE(HAVE_EXT_HASH_MAP)
2541
AC_DEFINE(HAVE_GNU_CXX_HASH_MAP)
2544
AC_CHECK_HEADER([unordered_map],
2545
[AC_CACHE_CHECK([for unordered_map and unordered_set in std],
2546
wx_cv_class_stdunorderedmapset,
2547
[AC_TRY_COMPILE([#include <unordered_map>
2548
#include <unordered_set>],
2549
[std::unordered_map<double*, char*> test1;
2550
std::unordered_set<char*> test2;],
2551
wx_cv_class_stdunorderedmapset=yes,
2552
wx_cv_class_stdunorderedmapset=no)
2559
if test "$wx_cv_class_stdunorderedmapset" = yes; then
2560
AC_DEFINE(HAVE_STD_UNORDERED_MAP)
2561
AC_DEFINE(HAVE_STD_UNORDERED_SET)
2563
AC_CHECK_HEADER([tr1/unordered_map],
2564
[AC_CACHE_CHECK([for unordered_map and unordered_set in std::tr1],
2565
wx_cv_class_tr1unorderedmapset,
2566
[AC_TRY_COMPILE([#include <tr1/unordered_map>
2567
#include <tr1/unordered_set>],
2568
[std::tr1::unordered_map<double*, char*> test1;
2569
std::tr1::unordered_set<char*> test2;
2570
#if defined(__GNUC__) && (__GNUC__==4) && (__GNUC_MINOR__<2)
2571
#error can't use unordered_{map,set} with gcc-4.[01]: http://gcc.gnu.org/PR24389
2573
wx_cv_class_tr1unorderedmapset=yes,
2574
wx_cv_class_tr1unorderedmapset=no)
2581
if test "$wx_cv_class_tr1unorderedmapset" = yes; then
2582
AC_DEFINE(HAVE_TR1_UNORDERED_MAP)
2583
AC_DEFINE(HAVE_TR1_UNORDERED_SET)
2585
dnl check for hash_map and hash_set headers
2586
AC_CHECK_HEADER([hash_map],
2587
[AC_CACHE_CHECK([for std::hash_map and hash_set],
2588
wx_cv_class_stdhashmapset,
2589
[AC_TRY_COMPILE([#include <hash_map>
2590
#include <hash_set>],
2591
[std::hash_map<double*, char*, std::hash<double*>, std::equal_to<double*> > test1;
2592
std::hash_set<char*, std::hash<char*>, std::equal_to<char*> > test2;],
2593
wx_cv_class_stdhashmapset=yes,
2594
wx_cv_class_stdhashmapset=no)
2601
if test "$wx_cv_class_stdhashmapset" = yes; then
2602
AC_DEFINE(HAVE_HASH_MAP)
2603
AC_DEFINE(HAVE_STD_HASH_MAP)
2606
AC_CHECK_HEADER([ext/hash_map],
2607
[AC_CACHE_CHECK([for GNU hash_map and hash_set],
2608
wx_cv_class_gnuhashmapset,
2609
[AC_TRY_COMPILE([#include <ext/hash_map>
2610
#include <ext/hash_set>],
2611
[__gnu_cxx::hash_map<double*, char*, __gnu_cxx::hash<double*>, std::equal_to<double*> > test1;
2612
__gnu_cxx::hash_set<char*, __gnu_cxx::hash<char*>, std::equal_to<char*> > test2;],
2613
wx_cv_class_gnuhashmapset=yes,
2614
wx_cv_class_gnuhashmapset=no)
2628
dnl ---------------------------------------------------------------------------
2629
dnl Define search path for includes and libraries: all headers and libs will be
2630
dnl looked for in all directories of this path
2631
dnl ---------------------------------------------------------------------------
2633
dnl Notice that /usr/include should *not* be in this list, otherwise it breaks
2634
dnl compilation on Solaris/AIX/... with gcc because standard (non ANSI C)
2635
dnl headers are included instead of the "fixed" (ANSI-fied) gcc ones.
2637
dnl Also try to put all directories which may contain X11R6 before those which
2638
dnl may contain X11R5/4 - we want to use R6 on machines which have both!
2640
dnl In the same vein. Motif 2.1 should be tried before Motif 1.2 for the
2641
dnl systems which have both (AIX 4.x does)
2643
/usr/local/include \
2644
/usr/local/X11/include \
2645
/usr/local/include/X11 \
2646
/usr/local/X11R6/include \
2647
/usr/local/include/X11R6 \
2649
/usr/Motif-2.1/include \
2650
/usr/Motif-1.2/include \
2651
/usr/include/Motif1.2 \
2654
/usr/openwin/include \
2658
/usr/X11R6/include \
2659
/usr/X11R6.4/include \
2661
/usr/include/X11R6 \
2666
/usr/XFree86/include/X11 \
2669
/usr/local/X1R5/include \
2670
/usr/local/include/X11R5 \
2671
/usr/X11R5/include \
2672
/usr/include/X11R5 \
2674
/usr/local/X11R4/include \
2675
/usr/local/include/X11R4 \
2676
/usr/X11R4/include \
2677
/usr/include/X11R4 \
2679
/usr/openwin/share/include"
2681
dnl try to find out the standard lib locations for the systems with multiple
2683
AC_MSG_CHECKING([for libraries directory])
2690
for d in WX_STD_LIBPATH(); do
2691
for e in a so sl dylib dll.a; do
2693
if test -f $libc; then
2696
AC_LINK_IFELSE([int main() { return 0; }],
2697
wx_cv_std_libpath=`echo $d | sed s@/usr/@@`)
2699
if test "x$wx_cv_std_libpath" != "x"; then
2705
if test "x$wx_cv_std_libpath" = "x"; then
2706
wx_cv_std_libpath="lib"
2713
dnl use ../lib or ../lib/64 depending on the size of void*
2714
if test "$ac_cv_sizeof_void_p" = 8 -a -d "/usr/lib/64"; then
2715
wx_cv_std_libpath="lib/64"
2717
wx_cv_std_libpath="lib"
2722
dnl use ../lib or ../lib64 depending on the size of void*
2723
if test "$ac_cv_sizeof_void_p" = 8 -a \
2724
-d "/usr/lib64" -a ! -h "/usr/lib64"; then
2725
wx_cv_std_libpath="lib64"
2727
wx_cv_std_libpath="lib"
2732
wx_cv_std_libpath="lib";
2736
AC_MSG_RESULT($wx_cv_std_libpath)
2738
SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` /usr/$wx_cv_std_libpath"
2740
dnl Cross compiling with gcc?
2741
if test "$build" != "$host" -a "$GCC" = yes; then
2742
dnl for gcc cross-compilers "$CC -print-prog-name=ld" prints the path to
2743
dnl the linker. Stripping off the trailing '/bin/ld' gives us a candiate
2744
dnl for a 'root' below which libraries and headers for the target system
2745
dnl might be installed.
2746
if cross_root=`$CC -print-prog-name=ld 2>/dev/null`; then
2747
cross_root=`dirname $cross_root`
2748
cross_root=`dirname $cross_root`
2750
dnl substitute this candiate root for '^/usr' in the search lists,
2751
dnl strip out any that don't start '^/usr'.
2752
SEARCH_LIB=`for x in $SEARCH_LIB; do echo $x; done | sed -ne "s|^/usr|$cross_root|p"`
2753
SEARCH_INCLUDE=`for x in $SEARCH_INCLUDE; do echo $x; done | sed -ne "s|^/usr|$cross_root|p"`
2754
SEARCH_INCLUDE="$SEARCH_INCLUDE $cross_root/include"
2756
dnl also have pkg-config search for *.pc files under this 'root'
2757
if test -z "$PKG_CONFIG_PATH"; then
2758
PKG_CONFIG_PATH="$cross_root/local/lib/pkgconfig:$cross_root/lib/pkgconfig"
2759
export PKG_CONFIG_PATH
2762
dnl AC_PATH_XTRA doesn't work currently unless -x-includes and
2763
dnl -x-libraries are given on the command line. So if they are not
2764
dnl set then set them here to plausible defaults.
2765
if test -z "$x_includes" -o "$x_includes" = NONE; then
2766
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, X11/Intrinsic.h)
2767
x_includes=$ac_find_includes
2769
if test -z "$x_libraries" -o "$x_libraries" = NONE; then
2770
WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xt)
2771
x_libraries=$ac_find_libraries
2776
dnl ------------------------------------------------------------------------
2777
dnl Check for libraries
2778
dnl ------------------------------------------------------------------------
2780
dnl flush the cache because checking for libraries below might abort
2783
dnl check for glibc version
2785
dnl VZ: I have no idea why had this check been there originally, but now
2786
dnl we could probably do without it by just always adding _GNU_SOURCE
2787
if test "$USE_LINUX" = 1 -o "$USE_GNU" = 1; then
2788
AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[
2789
AC_TRY_COMPILE([#include <features.h>],
2791
#if (__GLIBC__ < 2) || (__GLIBC_MINOR__ < 1)
2796
wx_cv_lib_glibc21=yes
2799
wx_cv_lib_glibc21=no
2803
if test "$wx_cv_lib_glibc21" = "yes"; then
2804
AC_DEFINE(wxHAVE_GLIBC2)
2808
dnl we may need _GNU_SOURCE for 2 things:
2810
dnl 1. to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+ (strictly speaking we
2811
dnl only need _XOPEN_SOURCE=500 but just defining this disables _BSD_SOURCE
2812
dnl which breaks libtiff compilation, so it is simpler to just define
2813
dnl _GNU_SOURCE to get everything)
2815
dnl 2. for Unicode functions
2816
if test "x$wx_cv_lib_glibc21" = "xyes"; then
2817
if test "$wxUSE_UNICODE" = "yes" -o "$wxUSE_THREADS" = "yes"; then
2818
AC_DEFINE(_GNU_SOURCE)
2822
dnl Only add the -lm library if floating point functions cannot be used
2823
dnl without it. This check is important on cygwin because of the bizarre
2824
dnl way that they have organized functions into libraries. On cygwin, both
2825
dnl libc.a and libm.a are symbolic links to a single lib libcygwin.a. This
2827
dnl 1) linking with -lm is not necessary, and
2828
dnl 2) linking with -lm is dangerous if the order of libraries is wrong
2829
dnl In particular, if you compile any program with -mno-cygwin and link with
2830
dnl -lm, it will crash instantly when it is run. This happens because the
2831
dnl linker incorrectly links the Cygwin libm.a (==libcygwin.a), which replaces
2832
dnl the ___main function instead of allowing it to be defined by
2833
dnl /usr/lib/mingw/libmingw32.a as it should be.
2835
dnl On MacOS X, this test will find that -lm is unnecessary and leave it out.
2837
dnl Just check a few floating point functions. If they are all found without
2838
dnl -lm, then we must not need -lm.
2841
AC_CHECK_FUNCS(cos, have_cos=1)
2842
AC_CHECK_FUNCS(floor, have_floor=1)
2843
AC_MSG_CHECKING(if floating point functions link without -lm)
2844
if test "$have_cos" = 1 -a "$have_floor" = 1; then
2849
# use different functions to avoid configure caching
2852
AC_CHECK_FUNCS(sin, have_sin=1)
2853
AC_CHECK_FUNCS(ceil, have_ceil=1)
2854
AC_MSG_CHECKING(if floating point functions link with -lm)
2855
if test "$have_sin" = 1 -a "$have_ceil" = 1; then
2859
# not sure we should warn the user, crash, etc.
2863
dnl check for C99 string to long long conversion functions, assume that if we
2864
dnl have the unsigned variants, then we have the signed ones as well
2866
dnl at least under SGI these functions are only available in C99 code and not
2867
dnl in C++ so do these tests using C++ compiler
2869
if test "$wxUSE_UNICODE" = "yes"; then
2870
WX_CHECK_FUNCS(wcstoull,,,[#include <wchar.h>])
2872
WX_CHECK_FUNCS(strtoull)
2876
dnl ---------------------------------------------------------------------------
2877
dnl Optional libraries
2879
dnl --with-<lib>=sys
2880
dnl looks for system library and fails if not found
2883
dnl --with-<lib>=yes
2884
dnl looks for system library and, if not found, prints a warning,
2885
dnl falls back to the builtin wx version, and continues configuration
2887
dnl --with-<lib>=builtin
2888
dnl uses builtin wx version without searching for system library
2892
dnl do not use library (neither system nor builtin wx version)
2894
dnl ---------------------------------------------------------------------------
2896
dnl ------------------------------------------------------------------------
2897
dnl Check for regex libraries
2898
dnl ------------------------------------------------------------------------
2900
if test "$wxUSE_REGEX" != "no"; then
2901
AC_DEFINE(wxUSE_REGEX)
2903
if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_REGEX" = "yes"; then
2904
AC_MSG_WARN([Defaulting to the the builtin regex library for Unicode build.])
2908
if test "$wxUSE_REGEX" = "sys" -o "$wxUSE_REGEX" = "yes" ; then
2909
dnl according to Unix 98 specs, regcomp() is in libc but I believe that
2910
dnl on some old systems it may be in libregex - check for it too?
2911
AC_CHECK_HEADER(regex.h, [AC_CHECK_FUNCS(regcomp re_search)],, [ ])
2913
if test "x$ac_cv_func_regcomp" != "xyes"; then
2914
if test "$wxUSE_REGEX" = "sys" ; then
2915
AC_MSG_ERROR([system regex library not found! Use --with-regex to use built-in version])
2917
AC_MSG_WARN([system regex library not found, will use built-in instead])
2921
dnl we are using the system library
2923
dnl only the built-in supports advanced REs
2924
AC_DEFINE(WX_NO_REGEX_ADVANCED)
2929
dnl ------------------------------------------------------------------------
2930
dnl Check for zlib compression library
2931
dnl ------------------------------------------------------------------------
2934
if test "$wxUSE_ZLIB" != "no" ; then
2935
AC_DEFINE(wxUSE_ZLIB)
2937
if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then
2938
dnl don't test for zlib under Mac -- its verson there is 1.1.3 but we
2939
dnl should still use it because hopefully (can someone confirm this?)
2940
dnl Apple did fix the security problem in it and not using the system
2941
dnl library results in a whole bunch of warnings when linking with
2942
dnl Carbon framework
2943
if test "$USE_DARWIN" = 1; then
2944
system_zlib_h_ok="yes"
2946
dnl we have troubles with ancient zlib versions (e.g. 1.0.4 is
2947
dnl known to not work) and although I don't know which is
2948
dnl the minimal required version it's safer to test for 1.1.4 as
2949
dnl it fixes a security problem in 1.1.3 -- and hopefully nobody
2950
dnl has anything more ancient (1.1.3 was released in July 1998)
2952
AC_CACHE_CHECK([for zlib.h >= 1.1.4], ac_cv_header_zlib_h,
2954
dnl zlib.h defines ZLIB_VERSION="x.y.z"
2961
FILE *f=fopen("conftestval", "w");
2964
ZLIB_VERSION[0] == '1' &&
2965
(ZLIB_VERSION[2] > '1' ||
2966
(ZLIB_VERSION[2] == '1' &&
2967
ZLIB_VERSION[4] >= '4')) ? "yes" : "no");
2971
ac_cv_header_zlib_h=`cat conftestval`,
2972
ac_cv_header_zlib_h=no,
2973
dnl cross-compiling: don't have an answer, try later
2974
unset ac_cv_header_zlib_h
2977
dnl If the test above did not come up with a value (e.g. cross
2978
dnl compiling) then this should give a definitive answer
2979
AC_CHECK_HEADER(zlib.h,,, [ ])
2981
system_zlib_h_ok=$ac_cv_header_zlib_h
2984
if test "$system_zlib_h_ok" = "yes"; then
2985
AC_CHECK_LIB(z, deflate, ZLIB_LINK=" -lz")
2988
if test "x$ZLIB_LINK" = "x" ; then
2989
if test "$wxUSE_ZLIB" = "sys" ; then
2990
AC_MSG_ERROR([zlib library not found or too old! Use --with-zlib=builtin to use built-in version])
2992
AC_MSG_WARN([zlib library not found or too old, will use built-in instead])
2996
dnl we are using the system library
3002
dnl ------------------------------------------------------------------------
3003
dnl Check for png library
3004
dnl ------------------------------------------------------------------------
3007
if test "$wxUSE_LIBPNG" != "no" ; then
3008
AC_DEFINE(wxUSE_LIBPNG)
3010
if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBPNG" = "builtin" ; then
3011
AC_MSG_WARN([wxMGL doesn't work with builtin png library, will use MGL one instead])
3015
dnl for the check below to have a chance to succeed, we must already have
3016
dnl libz somewhere (don't do this when bulding wxMGL since its libpng
3017
dnl doesn't depend on zlib)
3018
if test "$wxUSE_MGL" != 1 -a "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then
3019
AC_MSG_WARN([system png library doesn't work without system zlib, will use built-in instead])
3020
wxUSE_LIBPNG=builtin
3023
if test "$wxUSE_MGL" != 1 ; then
3024
dnl Don't check for libpng when building wxMGL, libmgl contains it
3025
if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then
3026
dnl libpng version 0.9 is known to not work, if an even newer
3027
dnl version is required, just bump it up in the test below
3028
AC_CACHE_CHECK([for png.h > 0.90], ac_cv_header_png_h,
3030
dnl png.h defines PNG_LIBPNG_VER=number
3037
FILE *f=fopen("conftestval", "w");
3040
PNG_LIBPNG_VER > 90 ? "yes" : "no");
3044
ac_cv_header_png_h=`cat conftestval`,
3045
ac_cv_header_png_h=no,
3046
dnl cross-compiling: test (later) if we have any png.h
3047
unset ac_cv_header_png_h
3050
AC_CHECK_HEADER(png.h,,, [ ])
3052
if test "$ac_cv_header_png_h" = "yes"; then
3053
AC_CHECK_LIB(png, png_sig_cmp, PNG_LINK=" -lpng -lz", , [-lz -lm])
3056
if test "x$PNG_LINK" = "x" ; then
3057
if test "$wxUSE_LIBPNG" = "sys" ; then
3058
AC_MSG_ERROR([system png library not found or too old! Use --with-libpng=builtin to use built-in version])
3060
AC_MSG_WARN([system png library not found or too old, will use built-in instead])
3061
wxUSE_LIBPNG=builtin
3064
dnl we are using the system library
3070
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png"
3073
dnl ------------------------------------------------------------------------
3074
dnl Check for jpeg library
3075
dnl ------------------------------------------------------------------------
3078
if test "$wxUSE_LIBJPEG" != "no" ; then
3079
AC_DEFINE(wxUSE_LIBJPEG)
3081
if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBJPEG" = "builtin" ; then
3082
AC_MSG_WARN([wxMGL doesn't work with builtin jpeg library, will use MGL one instead])
3086
if test "$wxUSE_MGL" != 1 ; then
3087
dnl Don't check for libjpeg when building wxMGL, libmgl contains it
3088
if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then
3089
dnl can't use AC_CHECK_HEADER as jconfig.h defines things like
3090
dnl HAVE_STDLIB_H which are already defined and this provokes
3091
dnl a compiler warning which configure considers as an error...
3092
AC_MSG_CHECKING(for jpeglib.h)
3093
AC_CACHE_VAL(ac_cv_header_jpeglib_h,
3096
#undef HAVE_STDLIB_H
3098
#include <jpeglib.h>
3102
ac_cv_header_jpeglib_h=yes,
3103
ac_cv_header_jpeglib_h=no
3106
AC_MSG_RESULT($ac_cv_header_jpeglib_h)
3108
if test "$ac_cv_header_jpeglib_h" = "yes"; then
3109
AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK=" -ljpeg")
3112
if test "x$JPEG_LINK" = "x" ; then
3113
if test "$wxUSE_LIBJPEG" = "sys" ; then
3114
AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version])
3116
AC_MSG_WARN([system jpeg library not found, will use built-in instead])
3117
wxUSE_LIBJPEG=builtin
3120
dnl we are using the system library
3123
if test "$wxUSE_MSW" = 1; then
3124
dnl boolean is defined by the jpeg headers and also by the
3125
dnl Windows headers of some compilers. This type has been
3126
dnl renamed in the builtin, so it is only an issue when
3127
dnl using an external jpeg lib on Windows.
3137
#include <jpeglib.h>
3141
[wxInt`expr 8 \* $ac_cv_sizeof_boolean`])
3144
[#include <windows.h>])
3151
dnl ------------------------------------------------------------------------
3152
dnl Check for tiff library
3153
dnl ------------------------------------------------------------------------
3156
TIFF_PREREQ_LINKS=-lm
3157
if test "$wxUSE_LIBTIFF" != "no" ; then
3158
AC_DEFINE(wxUSE_LIBTIFF)
3160
if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then
3161
dnl libtiff may depend on libjpeg and libz so use them in the test
3162
dnl below or it would fail
3163
if test "$wxUSE_LIBJPEG" = "sys"; then
3164
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK"
3166
if test "$wxUSE_ZLIB" = "sys"; then
3167
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK"
3169
AC_CHECK_HEADER(tiffio.h,
3171
AC_CHECK_LIB(tiff, TIFFError,
3172
TIFF_LINK=" -ltiff",
3180
if test "x$TIFF_LINK" = "x" ; then
3181
if test "$wxUSE_LIBTIFF" = "sys" ; then
3182
AC_MSG_ERROR([system tiff library not found! Use --with-libtiff=builtin to use built-in version])
3184
AC_MSG_WARN([system tiff library not found, will use built-in instead])
3185
wxUSE_LIBTIFF=builtin
3188
dnl we are using the system library
3194
dnl ------------------------------------------------------------------------
3195
dnl Check for expat libraries
3196
dnl ------------------------------------------------------------------------
3198
if test "$wxUSE_WCHAR_T" != "yes"; then
3199
if test "$wxUSE_EXPAT" != "no"; then
3200
AC_MSG_WARN([wxWidgets requires wchar_t to use expat, disabling])
3203
if test "$wxUSE_XML" != "no"; then
3204
AC_MSG_WARN([wxWidgets requires wchar_t to use xml, disabling])
3209
if test "$wxUSE_EXPAT" != "no"; then
3211
AC_DEFINE(wxUSE_EXPAT)
3212
AC_DEFINE(wxUSE_XML)
3214
if test "$wxUSE_EXPAT" = "sys" -o "$wxUSE_EXPAT" = "yes" ; then
3215
AC_CHECK_HEADER([expat.h], [found_expat_h=1],, [ ])
3216
if test "x$found_expat_h" = "x1"; then
3217
dnl Expat 1.95.6 comes with broken expat.h:
3218
AC_CACHE_CHECK([if expat.h is valid C++ header],
3219
wx_cv_expat_is_not_broken,
3222
AC_TRY_COMPILE([#include <expat.h>],[],
3223
wx_cv_expat_is_not_broken=yes,
3224
wx_cv_expat_is_not_broken=no
3229
if test "$wx_cv_expat_is_not_broken" = "yes" ; then
3230
AC_CHECK_LIB(expat, XML_ParserCreate, EXPAT_LINK=" -lexpat")
3233
if test "x$EXPAT_LINK" = "x" ; then
3234
if test "$wxUSE_EXPAT" = "sys" ; then
3235
AC_MSG_ERROR([system expat library not found! Use --with-expat=builtin to use built-in version])
3237
AC_MSG_WARN([system expat library not found, will use built-in instead])
3241
dnl we are using the system library
3245
if test "$wxUSE_EXPAT" = "builtin" ; then
3246
dnl Expat needs this:
3247
AC_CONFIG_SUBDIRS([src/expat])
3252
dnl ------------------------------------------------------------------------
3253
dnl Check for libmspack
3254
dnl ------------------------------------------------------------------------
3256
if test "$wxUSE_LIBMSPACK" != "no"; then
3257
AC_CHECK_HEADER([mspack.h], [found_mspack_h=1],, [ ])
3258
if test "x$found_mspack_h" = "x1"; then
3259
AC_CHECK_LIB(mspack, mspack_create_chm_decompressor,
3260
MSPACK_LINK=" -lmspack")
3262
if test "x$MSPACK_LINK" = "x" ; then
3267
if test "$wxUSE_LIBMSPACK" != "no"; then
3268
AC_DEFINE(wxUSE_LIBMSPACK)
3272
dnl ----------------------------------------------------------------
3273
dnl search for toolkit (widget sets)
3274
dnl ----------------------------------------------------------------
3283
dnl are we building for a win32 target environment?
3284
dnl If so, setup common stuff needed for both GUI and Base libs.
3285
if test "$USE_WIN32" = 1 ; then
3286
AC_CHECK_HEADERS(w32api.h,,, [ ])
3287
AC_CHECK_HEADER(windows.h,,
3289
AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
3293
dnl --- FIXME: This is still a somewhat random list of libs,
3294
dnl --- some of them should probably be included conditionally.
3297
dnl --- For mingw-w64 lctl3d32's name has changed
3298
LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lwctl3d32 -ladvapi32 -lwsock32 -lgdi32"
3301
LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32"
3304
if test "$wxUSE_ACCESSIBILITY" = "yes" ; then
3305
LIBS="$LIBS -loleacc"
3310
dnl Cygwin doesn't include these by default
3311
LIBS="$LIBS -lkernel32 -luser32"
3314
dnl add extra odbc libs if we have compiled in odbc
3315
if test "$wxUSE_ODBC" = "sys" ; then
3318
if test "$wxUSE_ODBC" = "yes" ; then
3319
LIBS=" -lodbc32 -lole32 -loleaut32 $LIBS"
3320
AC_DEFINE(wxUSE_ODBC)
3322
dnl We might want to abort here if wxUSE_ODBC="builtin" isn't supported on msw.
3324
dnl This one is still used by some sample makefiles.
3325
RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
3326
RESPROGRAMOBJ="\$(PROGRAM)_resources.o"
3328
dnl This lot we export to wx-config. It must add the relevant
3329
dnl include directories at the point when they can be known.
3330
dnl (but are these (still) required anyway?)
3331
WXCONFIG_RESFLAGS="--define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
3333
dnl install Win32-specific files in "make install"
3334
WIN32INSTALL=win32install
3336
dnl pbt.h is missing on Wine at least
3337
AC_CHECK_HEADER(pbt.h,, [AC_DEFINE(NEED_PBT_H)], [ ])
3340
if test "$wxUSE_GUI" = "yes"; then
3350
if test "$wxUSE_COCOA" = 1 ; then
3351
if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes"; then
3352
AC_MSG_WARN([Printing not supported under wxCocoa yet, disabled])
3353
wxUSE_PRINTING_ARCHITECTURE=no
3355
if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
3356
AC_MSG_WARN([Drag and Drop not supported under wxCocoa yet, disabled])
3357
wxUSE_DRAG_AND_DROP=no
3359
if test "$wxUSE_DRAGIMAGE" = "yes"; then
3360
AC_MSG_WARN([Drag Image and DandD not supported under wxCocoa yet, disabled])
3365
if test "$wxUSE_MSW" = 1 ; then
3369
dnl -mwindows causes a heap of other default gui libs to be linked in.
3372
WXCONFIG_LDFLAGS_GUI="$LDFLAGS -Wl,--subsystem,windows -mwindows"
3376
if test "$wxUSE_GTK" = 1; then
3377
dnl GTK+ test program must be compiled with C compiler
3378
AC_MSG_CHECKING([for GTK+ version])
3380
gtk_version_cached=1
3381
AC_CACHE_VAL(wx_cv_lib_gtk,
3383
dnl stupid GTK+ AM macros produce their own messages, so we
3384
dnl have to pass to the next line
3385
gtk_version_cached=0
3388
dnl we must link against lgthread unless the user
3389
dnl used --disable-threads
3391
if test "$wxUSE_THREADS" = "yes"; then
3397
if test "x$wxGTK_VERSION" != "x1"
3399
dnl The gthread.pc that ships with solaris returns '-mt',
3400
dnl it's correct for Sun CC, but gcc requires '-pthreads'.
3401
dnl So disable the compile check and remove the -mt below.
3404
if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then
3409
AM_PATH_GTK_2_0(2.0.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
3411
dnl Remove the '-mt' for gcc on solaris
3414
if test "$wxUSE_THREADS" = "yes" -a "$GCC" = yes; then
3415
GTK_CFLAGS=`echo $GTK_CFLAGS | sed 's/-mt//'`
3416
GTK_LIBS=`echo $GTK_LIBS | sed 's/-mt//'`
3418
dnl solaris also requires -lX11 for static lib
3419
if test "$wxUSE_SHARED" != "yes"; then
3420
GTK_LIBS="$GTK_LIBS -lX11"
3426
if test -z "$wx_cv_lib_gtk"; then
3427
if test "x$wxGTK_VERSION" = "x1" -o "x$wxGTK_VERSION" = "xany" ; then
3428
AM_PATH_GTK(1.2.7, wx_cv_lib_gtk=1.2.7, , $GTK_MODULES)
3430
if test -z "$wx_cv_lib_gtk"; then
3431
AM_PATH_GTK(1.2.3, wx_cv_lib_gtk=1.2.3, , $GTK_MODULES)
3436
if test -z "$wx_cv_lib_gtk"; then
3437
dnl looks better in AC_MSG_RESULT
3440
dnl we need to cache GTK_CFLAGS and GTK_LIBS for the
3442
wx_cv_cflags_gtk=$GTK_CFLAGS
3443
wx_cv_libs_gtk=`echo $GTK_LIBS | sed -e 's/ -l[[^ ]]*cairo[[^ ]]*//g'`
3448
dnl if it wasn't cached, the messages from AM_PATH_GTK() above are
3450
if test "$gtk_version_cached" = 1; then
3451
AC_MSG_RESULT($wx_cv_lib_gtk)
3454
case "$wx_cv_lib_gtk" in
3464
The development files for GTK+ were not found. For GTK+ 2, please
3465
ensure that pkg-config is in the path and that gtk+-2.0.pc is
3466
installed. For GTK+ 1.2 please check that gtk-config is in the path,
3467
and that the version is 1.2.3 or above. Also check that the
3468
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
3469
--libs' are in the LD_LIBRARY_PATH or equivalent.
3474
if test "$WXGTK20" = 1; then
3475
save_CFLAGS="$CFLAGS"
3477
CFLAGS="$wx_cv_cflags_gtk $CFLAGS"
3478
LIBS="$LIBS $wx_cv_libs_gtk"
3480
dnl gtk_icon_size_lookup is not available in the GTK+ headers
3481
dnl that have shipped with some versions of Sun's JDS. Not using
3482
dnl AC_CHECK_FUNCS here since it only checks the function exists
3483
dnl in the lib (not the header).
3484
AC_CHECK_DECLS([gtk_icon_size_lookup], [],
3485
[AC_DEFINE(NEED_GTK_ICON_SIZE_LOOKUP)],
3486
[#include <gtk/gtk.h>])
3488
dnl test if we have at least GTK+ 2.6:
3489
AC_MSG_CHECKING([if GTK+ is version >= 2.6])
3491
#include <gtk/gtk.h>
3494
#if !GTK_CHECK_VERSION(2,6,0)
3499
AC_DEFINE(__WXGTK26__)
3500
AC_DEFINE(__WXGTK24__)
3501
AC_MSG_RESULT([yes])
3509
if test "$ac_wxgtk26" = 0; then
3510
dnl test if we have at least GTK+ 2.4:
3511
AC_MSG_CHECKING([if GTK+ is version >= 2.4])
3513
#include <gtk/gtk.h>
3516
#if !GTK_CHECK_VERSION(2,4,0)
3521
AC_DEFINE(__WXGTK24__)
3522
AC_MSG_RESULT([yes])
3529
CFLAGS="$save_CFLAGS"
3532
if test "$wxUSE_UNICODE" = "yes"; then
3533
AC_MSG_WARN([Unicode configuration not supported with GTK+ 1.x])
3537
dnl test for XIM support in libgdk
3538
AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
3540
dnl we need poll() in src/gtk1/app.cpp (we know that Darwin doesn't
3541
dnl have it but we do the check for the others)
3542
if test "$USE_DARWIN" != 1; then
3543
AC_CHECK_FUNCS(poll)
3547
TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
3548
GUI_TK_LIBRARY="$wx_cv_libs_gtk $GUI_TK_LIBRARY"
3550
AFMINSTALL=afminstall
3554
dnl test for external libxpm if we're configured to use it
3555
if test "$wxUSE_GPE" = "yes"; then
3556
AC_MSG_CHECKING(for gpewidget library)
3557
WX_PATH_FIND_LIBRARIES($SEARCH_LIB,gpewidget)
3558
if test "$ac_find_libraries" != "" ; then
3559
WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
3560
dnl -lgpewidget must be before all GTK libs and
3561
dnl we guess its path from the prefix
3562
GUI_TK_LIBRARY="-L${prefix}/lib -lgpewidget $GUI_TK_LIBRARY"
3564
AC_MSG_RESULT([found in $ac_find_libraries])
3566
AC_MSG_RESULT(not found)
3569
dnl AC_MSG_CHECKING(for gpe library)
3570
dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB,gpe)
3571
dnl if test "$ac_find_libraries" != "" ; then
3572
dnl WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
3573
dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lgpe"
3574
dnl AC_MSG_RESULT(found in $ac_find_libraries)
3576
dnl AC_MSG_RESULT(not found)
3581
if test "$wxUSE_MGL" = 1; then
3582
AC_MSG_CHECKING(for SciTech MGL library)
3583
if test "x$MGL_ROOT" = x ; then
3584
AC_MSG_RESULT(not found)
3585
AC_MSG_ERROR([Cannot find MGL library. Make sure MGL_ROOT is set.])
3587
AC_MSG_RESULT($MGL_ROOT)
3590
AC_MSG_CHECKING(for libmgl location)
3591
dnl Find MGL library that we want
3592
dnl FIXME_MGL - test for MGL variants for freebsd etc.;
3593
dnl and for non-x86 versions
3596
dnl glibc.so, glibc are for older versions of MGL,
3597
dnl x86/a, x86/so are used by >= 5.0 R11
3598
if test "x$wxUSE_SHARED" = xyes ; then
3599
mgl_os_candidates="linux/gcc/x86/so linux/gcc/x86/a linux/gcc/glibc.so linux/gcc/glibc"
3601
mgl_os_candidates="linux/gcc/x86/a linux/gcc/x86/so linux/gcc/glibc linux/gcc/glibc.so"
3605
mgl_os_candidates="dos32/dj2"
3608
AC_MSG_ERROR(This system type ${host} is not yet supported by wxMGL.)
3614
for mgl_os_i in $mgl_os_candidates ; do
3615
if test "x$mgl_os" = x ; then
3616
if test "$wxUSE_DEBUG_FLAG" = yes ; then
3617
if test -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.a -o \
3618
-f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.so; then
3623
if test "x$mgl_lib_type" = x ; then
3624
if test -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.a -o \
3625
-f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.so; then
3626
mgl_lib_type=release
3633
if test "x$mgl_os" = x ; then
3634
AC_MSG_RESULT(not found)
3635
AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.])
3637
AC_MSG_RESULT("$MGL_ROOT/lib/$mgl_lib_type/$mgl_os")
3639
wxUSE_UNIVERSAL="yes"
3641
TOOLKIT_INCLUDE="-I$MGL_ROOT/include"
3642
GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$mgl_lib_type/$mgl_os -lmgl -lmglcpp -lpm"
3644
AFMINSTALL=afminstall
3649
if test "$wxUSE_DFB" = 1; then
3650
PKG_PROG_PKG_CONFIG()
3652
PKG_CHECK_MODULES(DIRECTFB,
3653
[directfb >= 0.9.23],
3655
wxUSE_UNIVERSAL="yes"
3656
TOOLKIT_INCLUDE="$DIRECTFB_CFLAGS"
3657
GUI_TK_LIBRARY="$DIRECTFB_LIBS"
3662
AC_MSG_ERROR([DirectFB not found.])
3667
if test "$wxUSE_MICROWIN" = 1; then
3668
AC_MSG_CHECKING(for MicroWindows)
3669
if test "x$MICROWINDOWS" = x ; then
3670
AC_MSG_RESULT(not found)
3671
AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWINDOWS is set.])
3673
AC_MSG_RESULT($MICROWINDOWS)
3676
if test -f $MICROWINDOWS/lib/libmwin.a; then
3677
AC_MSG_RESULT(MicroWindows' libraries found.)
3679
AC_MSG_ERROR([Cannot find MicroWindows libraries, make sure they are compiled.])
3682
TOOLKIT_INCLUDE="-I$MICROWINDOWS/include"
3683
GUI_TK_LIBRARY="-L$MICROWINDOWS/lib -lmwin -lmwengine -mwfonts -mwdrivers -mwinlib"
3685
wxUSE_UNIVERSAL="yes"
3687
AFMINSTALL=afminstall
3689
GUIDIST=MICROWIN_DIST
3691
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXMSW__ -D__WIN95__ -D__WIN32__ -DMWIN -DMICROWIN_NOCONTROLS -DMICROWIN_TODO=1"
3694
dnl common part of X11 and Motif port checks
3695
if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then
3696
dnl use standard macros to check for X headers/libs, this brings
3697
dnl support for the standard configure options --x-includes,
3698
dnl --x-libraries and --no-x
3701
if test "$no_x" = "yes"; then
3702
AC_MSG_ERROR([X11 not found, please use --x-includes and/or --x-libraries options (see config.log for details)])
3705
dnl for some reason AC_PATH_XTRA seems to add -INONE and -LNONE (and
3706
dnl also sometimes -RNONE) to X_CFLAGS and X_LIBS respectively, filter
3708
GUI_TK_LIBRARY=`echo $X_LIBS | sed 's/ -LNONE//' | sed 's/ -RNONE//'`
3709
TOOLKIT_INCLUDE=`echo $X_CFLAGS | sed 's/ -INONE//'`
3710
AFMINSTALL=afminstall
3711
COMPILED_X_PROGRAM=0
3715
if test "$wxUSE_X11" = 1; then
3716
if test "$wxUSE_NANOX" = "yes"; then
3717
AC_MSG_CHECKING(for MicroWindows/NanoX distribution)
3718
if test "x$MICROWIN" = x ; then
3719
AC_MSG_RESULT(not found)
3720
AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWIN is set.])
3722
AC_MSG_RESULT($MICROWIN)
3723
AC_DEFINE(wxUSE_NANOX)
3727
if test "$wxUSE_UNICODE" = "yes"; then
3728
PKG_PROG_PKG_CONFIG()
3730
PKG_CHECK_MODULES(PANGOX, pangox,
3732
CFLAGS="$PANGOX_CFLAGS $CFLAGS"
3733
CXXFLAGS="$PANGOX_CFLAGS $CXXFLAGS"
3734
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOX_LIBS"
3737
AC_MSG_ERROR([pangox library not found, library cannot be compiled in Unicode mode])
3740
PKG_CHECK_MODULES(PANGOFT2, pangoft2,
3742
CFLAGS="$PANGOFT2_CFLAGS $CFLAGS"
3743
CXXFLAGS="$PANGOFT2_CFLAGS $CXXFLAGS"
3744
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS"
3747
AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support])
3748
wxUSE_PRINTING_ARCHITECTURE="no"
3751
PKG_CHECK_MODULES(PANGOXFT, pangoxft,
3753
AC_DEFINE(HAVE_PANGO_XFT)
3754
CFLAGS="$PANGOXFT_CFLAGS $CFLAGS"
3755
CXXFLAGS="$PANGOXFT_CFLAGS $CXXFLAGS"
3756
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
3759
AC_MSG_WARN([pangoxft library not found, library will be compiled without anti-aliasing support])
3763
LIBS="$LIBS $PANGOX_LIBS"
3764
AC_CHECK_FUNCS([pango_font_family_is_monospace])
3768
wxUSE_UNIVERSAL="yes"
3770
if test "$wxUSE_NANOX" = "yes"; then
3771
TOOLKIT_INCLUDE="-I\$(top_srcdir)/include/wx/x11/nanox -I\$(MICROWIN)/src/include $TOOLKIT_INCLUDE"
3772
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__ -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1"
3773
GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$(MICROWIN)/src/lib/libnano-X.a"
3775
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11"
3782
if test "$wxUSE_MOTIF" = 1; then
3783
if test "$wxUSE_UNICODE" = "yes"; then
3784
AC_MSG_ERROR([Unicode configuration not supported with Motif])
3787
AC_MSG_CHECKING(for Motif/Lesstif headers)
3788
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h)
3789
if test "$ac_find_includes" != "" ; then
3790
AC_MSG_RESULT(found in $ac_find_includes)
3791
WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
3792
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
3795
CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3803
version = xmUseVersion;
3806
AC_MSG_RESULT(found in default search path)
3807
COMPILED_X_PROGRAM=1
3811
AC_MSG_ERROR(please set CPPFLAGS to contain the location of Xm/Xm.h)
3819
AC_MSG_CHECKING(for Motif/Lesstif library)
3820
WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm)
3822
if test "x$ac_find_libraries" != "x" ; then
3823
AC_MSG_RESULT(found in $ac_find_libraries)
3825
WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
3826
GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
3828
dnl it might happen that we found headers in one of the standard
3829
dnl paths but the libs are elsewhere but still in default (linker)
3830
dnl path -- try to compile a test program to check for this
3832
CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3834
LIBS="$GUI_TK_LIBRARY -lXm -lXmu -lXext -lX11"
3842
version = xmUseVersion;
3845
AC_MSG_RESULT(found in default search path)
3846
COMPILED_X_PROGRAM=1
3850
AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm)
3858
AC_MSG_CHECKING([if we need -lXp and/or -lSM -lICE])
3862
for libp in "" " -lXp"; do
3863
if test "$libs_found" = "0"; then
3864
for libsm_ice in "" " -lSM -lICE"; do
3865
if test "$libs_found" = "0"; then
3867
LIBS="$GUI_TK_LIBRARY -lXm ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11"
3869
CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3874
#include <Xm/List.h>
3877
XmString string = NULL;
3880
XmListAddItem(w, string, position);
3884
libsm_ice_link="$libsm_ice"
3886
[need${libp_link}${libsm_ice_link}])
3898
if test "$libs_found" = "0"; then
3899
AC_MSG_RESULT([can't find the right libraries])
3900
AC_MSG_ERROR([can't link a simple motif program])
3903
dnl this seems to be needed under IRIX and shouldn't do any harm
3905
AC_CHECK_LIB(Sgm, [SgCreateList], [libsgm_link=" -lSgm"])
3908
CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3910
AC_CACHE_CHECK([for Motif 2],
3916
#if XmVersion < 2000
3920
wx_cv_lib_motif2="yes",
3921
wx_cv_lib_motif2="no"))
3922
if test "$wx_cv_lib_motif2" = "yes"; then
3923
AC_DEFINE(__WXMOTIF20__,1)
3925
AC_DEFINE(__WXMOTIF20__,0)
3928
AC_CACHE_CHECK([whether Motif is Lesstif],
3934
#if !defined(LesstifVersion) || LesstifVersion <= 0
3938
wx_cv_lib_lesstif="yes",
3939
wx_cv_lib_lesstif="no")
3941
if test "$wx_cv_lib_lesstif" = "yes"; then
3942
AC_DEFINE(__WXLESSTIF__,1)
3944
AC_DEFINE(__WXLESSTIF__,0)
3949
GUI_TK_LIBRARY="$GUI_TK_LIBRARY${libsgm_link} -lXm${libp_link} -lXmu -lXext -lXt${libsm_ice_link} -lX11"
3954
dnl more tests common to X11 and Motif:
3955
if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then
3956
dnl test for external libxpm if we're configured to use it
3957
if test "$wxUSE_LIBXPM" = "sys"; then
3958
AC_MSG_CHECKING(for Xpm library)
3959
WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
3960
if test "$ac_find_libraries" != "" ; then
3961
WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
3962
GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
3963
AC_MSG_RESULT(found in $ac_find_libraries)
3965
AC_CACHE_CHECK([for X11/xpm.h],
3969
CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
3973
#include <X11/xpm.h>
3977
version = XpmLibraryVersion();
3979
wx_cv_x11_xpm_h=yes,
3987
if test $wx_cv_x11_xpm_h = "yes"; then
3988
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXpm"
3989
AC_DEFINE(wxHAVE_LIB_XPM)
3991
AC_MSG_WARN([built-in less efficient XPM decoder will be used])
3997
dnl XShapeQueryExtension checks: first the library, then prototype
3998
AC_CHECK_LIB([Xext], [XShapeQueryExtension],
4000
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXext"
4003
[], [$GUI_TK_LIBRARY -lX11])
4005
if test "$wxHAVE_XEXT_LIB" = 1; then
4006
save_CFLAGS="$CFLAGS"
4007
CFLAGS="$TOOLKIT_INCLUDE $CFLAGS"
4009
AC_MSG_CHECKING([for X11/extensions/shape.h])
4011
#include <X11/Xlib.h>
4012
#include <X11/extensions/shape.h>
4016
XShapeQueryExtension((Display*)NULL,
4017
(int*)NULL, (int*)NULL);
4020
AC_DEFINE(HAVE_XSHAPE)
4021
AC_MSG_RESULT([found])
4024
AC_MSG_RESULT([not found])
4026
CFLAGS="$save_CFLAGS"
4031
if test "$wxUSE_MAC" = 1; then
4032
AC_MSG_CHECKING([for compiler syntax to enable Pascal strings])
4033
if test "$GCC" = yes; then
4034
AC_MSG_RESULT([gcc])
4035
CPPFLAGS_PASCAL="-fpascal-strings"
4036
elif test "`echo $CXX | sed -e 's@.*/@@'`" = "xlC"; then
4037
AC_MSG_RESULT([xlc])
4038
CPPFLAGS_PASCAL="-qmacpstr"
4040
AC_MSG_RESULT([none])
4043
if test "x$wxUSE_UNIX" = "xyes"; then
4044
CPPFLAGS="$CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon $CPPFLAGS"
4046
dnl platform.h needs TARGET_CARBON before setup.h
4047
CPPFLAGS="$CPPFLAGS_PASCAL -I\${top_srcdir}/src/mac/carbon/morefilex -DTARGET_CARBON $CPPFLAGS"
4051
dnl we can't call this MAC_DIST or autoconf thinks its a macro
4053
dnl wxMac version of wxBase and wxCocoa or wxBase-only built on Darwin
4054
dnl are different, so they need different names:
4055
WXBASEPORT="_carbon"
4058
if test "$wxUSE_COCOA" = 1; then
4063
if test "$wxUSE_PM" = 1; then
4066
AC_CACHE_CHECK([for type SPBCDATA],
4083
if test $wx_cv_spbcdata = "yes"; then
4084
AC_DEFINE(HAVE_SPBCDATA)
4088
dnl the name of the directory where the files for this toolkit live
4089
if test "$TOOLKIT" = "PM" ; then
4092
TOOLKIT_DIR=`echo ${TOOLKIT} | tr '[[A-Z]]' '[[a-z]]'`
4095
if test "$wxUSE_UNIVERSAL" = "yes"; then
4096
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__"
4100
dnl distribute samples/demos/utils with GUI versions
4101
GUIDIST="${GUIDIST} SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST"
4102
DISTDIR="wx\$(TOOLKIT)"
4106
dnl this doesn't quite work right for wxBase, but the places
4107
dnl where it is wrong aren't fatal (yet) though.
4110
dnl the sources, their dependenices and the headers
4111
if test "$USE_WIN32" = 1 ; then
4112
dnl yes, the toolkit for wxBase on win32 is actually MSW
4113
dnl wxBase on unix does not need a 'TOOLKIT' defined.
4117
dnl distribute only wxBase sources/headers
4122
dnl ---------------------------------------------------------------------------
4123
dnl Optional libraries included when system library is not used
4124
dnl ---------------------------------------------------------------------------
4126
dnl do this after test for X11 above so that we have a chance of finding Xlib.h
4127
if test "$wxUSE_GUI" = "yes"; then
4128
if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then
4129
dnl defines HAVE_X11_XKBLIB_H
4130
AC_CHECK_HEADERS(X11/Xlib.h,,, [ ])
4131
AC_CHECK_HEADERS([X11/XKBlib.h],,,
4134
#include <X11/Xlib.h>
4141
dnl ----------------------------------------------------------------
4143
dnl ----------------------------------------------------------------
4148
dnl ODBC is handled separately for MSW
4149
if test "$TOOLKIT" != "MSW" ; then
4151
if test "$wxUSE_ODBC" = "sys" -o "$wxUSE_ODBC" = "yes" ; then
4152
dnl This is not ideal we really ough to use the unixodbc-config
4153
dnl or iodbc-config if they exist.
4155
AC_CHECK_HEADER([sql.h], [found_sql_h=1],, [ ])
4156
if test "x$found_sql_h" = "x1" ; then
4157
AC_CHECK_LIB(iodbc, SQLAllocEnv, ODBC_LINK=" -liodbc",
4159
AC_CHECK_LIB(unixodbc, SQLAllocEnv, ODBC_LINK=" -lunixodbc",
4161
AC_CHECK_LIB(odbc, SQLAllocEnv, ODBC_LINK=" -lodbc")
4165
if test "x$ODBC_LINK" = "x" ; then
4166
if test "$wxUSE_ODBC" = "sys" ; then
4167
AC_MSG_ERROR([system ODBC library not found! Use --with-odbc=builtin to use built-in version])
4169
AC_MSG_WARN([system ODBC library not found, will use built-in instead])
4173
dnl we are using the system library
4178
if test "$wxUSE_ODBC" = "builtin" ; then
4179
AC_DEFINE(wxUSE_BUILTIN_IODBC)
4183
if test "$wxUSE_ODBC" != "no" ; then
4184
AC_DEFINE(wxUSE_ODBC)
4185
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db"
4187
dnl is this still necessary?
4188
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_IODBC_"
4191
dnl ---------------------------------------------------------------------------
4192
dnl wxDisplay Sanity checks
4193
dnl ---------------------------------------------------------------------------
4195
if test "$wxUSE_DISPLAY" = "yes"; then
4196
dnl ---------------------------------------------------------------------------
4197
dnl Xinerama (for unix ) - Brian Victor
4198
dnl ---------------------------------------------------------------------------
4199
if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1; then
4200
AC_MSG_CHECKING([for Xinerama])
4201
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xinerama)
4202
if test "$ac_find_libraries" != "" ; then
4203
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
4204
if test "$ac_path_to_link" != " -L/usr/lib" ; then
4205
LDFLAGS="$LDFLAGS $ac_path_to_link"
4207
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXinerama"
4208
AC_MSG_RESULT([yes])
4210
AC_MSG_CHECKING([for Xxf86vm extension])
4211
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xxf86vm)
4212
if test "$ac_find_libraries" != "" ; then
4213
AC_MSG_RESULT([yes])
4214
AC_CHECK_HEADERS([X11/extensions/xf86vmode.h],
4216
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXxf86vm"
4221
#include <X11/Xlib.h>
4230
AC_MSG_WARN([Xinerama not found; disabling wxDisplay])
4233
elif test "$wxUSE_MSW" = 1; then
4234
dnl ---------------------------------------------------------------------------
4235
dnl DirectDraw for MSW - optionally used by WxDisplay.
4236
dnl ---------------------------------------------------------------------------
4237
AC_CHECK_HEADER([ddraw.h], [], [], [#include <windows.h>])
4241
dnl ---------------------------------------------------------------------------
4242
dnl X11 session management
4243
dnl ---------------------------------------------------------------------------
4244
if test "$wxUSE_DETECT_SM" = "yes"; then
4245
if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1; then
4246
AC_MSG_CHECKING([for -lSM - X11 session management])
4247
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],SM)
4248
if test "$ac_find_libraries" != "" ; then
4249
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
4250
if test "$ac_path_to_link" != " -L/usr/lib" ; then
4251
LDFLAGS="$LDFLAGS $ac_path_to_link"
4253
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lSM"
4254
AC_MSG_RESULT([yes])
4257
AC_MSG_WARN([libSM not found; disabling session management detection])
4258
wxUSE_DETECT_SM="no"
4261
wxUSE_DETECT_SM="no"
4266
dnl ---------------------------------------------------------------------------
4267
dnl OpenGL libraries
4268
dnl ---------------------------------------------------------------------------
4271
if test "$wxUSE_OPENGL" = "yes"; then
4272
if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = "1"; then
4273
AC_MSG_WARN([wxGLCanvas not implemented for this port, library will be compiled without it.])
4275
elif test "$wxUSE_COCOA" = "1"; then
4276
OPENGL_LIBS="-framework OpenGL -framework AGL"
4277
elif test "$wxUSE_MSW" = 1; then
4278
OPENGL_LIBS="-lopengl32 -lglu32"
4279
elif test "$USE_DARWIN" = 1; then
4282
dnl adjust CPPFLAGS to include GL/gl.h location if necessary
4283
dnl (/opt/graphics/OpenGL is for HP-UX systems, bug 925307)
4284
AC_MSG_CHECKING([for OpenGL headers])
4285
WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /opt/graphics/OpenGL/include], GL/gl.h)
4286
if test "$ac_find_includes" != "" ; then
4287
AC_MSG_RESULT(found in $ac_find_includes)
4288
WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS)
4289
CPPFLAGS="$ac_path_to_include $CPPFLAGS"
4291
AC_MSG_RESULT([not found])
4294
AC_CHECK_HEADER(GL/gl.h, [
4295
AC_CHECK_HEADER(GL/glu.h, [
4298
AC_MSG_CHECKING([for -lGL])
4299
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB /opt/graphics/OpenGL/lib],GL)
4300
if test "$ac_find_libraries" != "" ; then
4301
AC_MSG_RESULT([found in $ac_find_libraries])
4303
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
4304
if test "$ac_path_to_link" != " -L/usr/lib" ; then
4305
LDFLAGS_GL="$ac_path_to_link"
4308
dnl don't suppose that libGL and libGLU are always in the
4309
dnl same directory -- this is not true for some common
4311
AC_MSG_CHECKING([for -lGLU])
4312
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],GLU)
4313
if test "$ac_find_libraries" != "" ; then
4314
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
4315
if test "$ac_path_to_link" != " -L/usr/lib" -a \
4316
"$ac_path_to_link" != "$LDFLAGS_GL"; then
4317
LDFLAGS_GL="$LDFLAGS_GL$ac_path_to_link"
4321
OPENGL_LIBS="-lGL -lGLU"
4322
AC_MSG_RESULT([yes])
4330
if test "$found_gl" != 1; then
4331
AC_MSG_CHECKING([for -lMesaGL])
4332
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],MesaGL)
4333
if test "$ac_find_libraries" != "" ; then
4334
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
4335
LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
4336
OPENGL_LIBS="-lMesaGL -lMesaGLU"
4337
AC_MSG_RESULT([yes])
4347
if test "x$OPENGL_LIBS" = "x"; then
4348
dnl it should be an error and not a warning because OpenGL is not on
4349
dnl by default and so if it had been explicitly requested, we
4350
dnl shouldn't just fall back to compiling the library without it
4351
AC_MSG_ERROR(OpenGL libraries not available)
4355
if test "$wxUSE_OPENGL" = "yes"; then
4357
AC_DEFINE(wxUSE_OPENGL)
4358
AC_DEFINE(wxUSE_GLCANVAS)
4359
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl opengl/cube opengl/penguin opengl/isosurf"
4364
dnl the symbol which allows conditional compilation for the given toolkit
4365
if test -n "$TOOLKIT" ; then
4366
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WX${TOOLKIT}__"
4370
dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP ---
4372
if test "$wxUSE_SHARED" = "yes"; then
4375
dnl only static for now
4377
AC_MSG_WARN([Host system doesn't support shared libraries, disabling])
4382
if test "$wxUSE_SHARED" = "yes"; then
4384
dnl use versioned symbols if available on the platform
4385
WX_VERSIONED_SYMBOLS([\$(wx_top_builddir)/version-script])
4388
*-*-linux* | *-*-gnu* )
4389
SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib"
4390
WXCONFIG_RPATH="-Wl,-rpath,\$libdir"
4394
if test "$GCC" = yes ; then
4395
dnl newer versions of gcc need -isystem to compile X headers on
4396
dnl Solaris (which use old style C syntax)
4397
CPPFLAGS="-isystem /usr/openwin/include $CPPFLAGS"
4399
dnl gcc may use Sun's ld, in which case -rpath gives a confusing
4400
dnl error message. We have to try both -Wl,-rpath and -Wl,-R:
4401
saveLdflags="$LDFLAGS"
4402
LDFLAGS="$saveLdflags -Wl,-rpath,/"
4403
AC_MSG_CHECKING([if the linker accepts -rpath])
4407
AC_MSG_RESULT([yes])
4408
SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib"
4409
WXCONFIG_RPATH="-Wl,-rpath,\$libdir"
4412
AC_MSG_CHECKING([if the linker accepts -R])
4413
LDFLAGS="$saveLdflags -Wl,-R,/"
4417
AC_MSG_RESULT([yes])
4418
SAMPLES_RPATH_FLAG="-Wl,-R,\$(wx_top_builddir)/lib"
4419
WXCONFIG_RPATH="-Wl,-R,\$libdir"
4424
LDFLAGS="$saveLdflags"
4426
SAMPLES_RPATH_FLAG="-R\$(wx_top_builddir)/lib"
4427
WXCONFIG_RPATH="-R\$libdir"
4432
install_name_tool=`which install_name_tool`
4433
if test "$install_name_tool" -a -x "$install_name_tool"; then
4434
SAMPLES_RPATH_POSTLINK="\$(wx_top_builddir)/change-install-names \$(LIBDIRNAME) \$(prefix) \$@"
4435
cat <<EOF >change-install-names
4437
libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\`
4438
inst_cmd="install_name_tool "
4439
for i in \${libnames} ; do
4440
inst_cmd="\${inst_cmd} -change \${2}/lib/\${i} \${1}/\${i}"
4444
chmod +x change-install-names
4448
*-*-cygwin* | *-*-mingw32* )
4449
dnl this one shouldn't be used for the library build so put it in a
4450
dnl separate variable from WXCONFIG_CPPFLAGS
4451
WXCONFIG_ONLY_CPPFLAGS="$WXCONFIG_ONLY_CPPFLAGS -DWXUSINGDLL"
4455
SAMPLES_RPATH_FLAG="-Wl,+b,\$(wx_top_builddir)/lib"
4456
WXCONFIG_RPATH="-Wl,+b,\$libdir"
4461
if test $wxUSE_RPATH = "no"; then
4462
SAMPLES_RPATH_FLAG=''
4463
SAMPLES_RPATH_POSTLINK=''
4471
config_linkage_component="-static"
4480
if test "$wxUSE_UNICODE" = "yes"; then
4481
lib_unicode_suffix=u
4482
WX_CHARTYPE="unicode"
4487
WX_DEBUGTYPE="release"
4489
if test "$wxUSE_DEBUG_FLAG" = "yes"; then
4491
WX_DEBUGTYPE="debug"
4495
WX_FLAVOUR=${WX_FLAVOUR:+-$WX_FLAVOUR}
4496
WX_LIB_FLAVOUR=`echo $WX_FLAVOUR | tr '-' '_'`
4499
if test "$wxUSE_DEBUG_INFO" = "yes"; then
4503
WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}_${WX_RELEASE} | tr '[[a-z]]' '[[A-Z]]'`
4505
TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}"
4507
TOOLCHAIN_FULLNAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}-${WX_CHARTYPE}-${WX_DEBUGTYPE}${config_linkage_component}-${WX_RELEASE}${WX_FLAVOUR}"
4509
if test "$cross_compiling" = "yes"; then
4510
HOST_SUFFIX="-$host_alias"
4511
TOOLCHAIN_NAME="$TOOLCHAIN_NAME$HOST_SUFFIX"
4512
TOOLCHAIN_FULLNAME="${host_alias}-$TOOLCHAIN_FULLNAME"
4515
dnl library link name
4516
dnl These just save us from exporting lib_{unicode,debug,flavour}_suffix.
4517
dnl If we ever need to do that, we won't need to keep these.
4518
WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
4519
if test "${TOOLKIT_DIR}" = "os2"; then
4520
WX_LIBRARY_BASENAME_GUI="wx_pm${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
4522
WX_LIBRARY_BASENAME_GUI="wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
4527
if test "$wxUSE_COCOA" = 1; then
4529
AC_WX_LANG_OBJECTIVEC
4530
dnl Recent AppKit/NSEvent.h include parts of IOKit which eventually
4531
dnl gets IOKit/graphics/IOGraphicsTypes.h included which typedefs
4532
dnl Point but only if MacTypes.h was not included first. Of course,
4533
dnl if MacTypes.h is included later then you're screwed when it
4534
dnl tries to typedef Point. Defining __Point__ will cause IOGraphicsTypes.h
4535
dnl to not typedef Point and thus fix the problem.
4536
AC_MSG_CHECKING([if AppKit/NSEvent.h conflicts with CoreFoundation])
4537
AC_TRY_COMPILE([#include <AppKit/NSEvent.h>
4538
#include <CoreFoundation/CoreFoundation.h>
4540
[AC_MSG_RESULT([no])],
4541
[AC_MSG_RESULT([yes])
4542
AC_MSG_CHECKING([if defining __Point__ will fix it])
4543
AC_TRY_COMPILE([#define __Point__ 1
4544
#include <AppKit/NSEvent.h>
4545
#include <CoreFoundation/CoreFoundation.h>
4547
[AC_MSG_RESULT([yes])
4548
AC_DEFINE(__Point__)
4550
[AC_MSG_FAILURE([no])]
4556
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
4557
dnl base name of the resource file for wxMac must be the same
4558
dnl as library installation base name (-install_name)
4559
WX_RESOURCES_MACOSX_ASCII="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.r"
4560
WX_RESOURCES_MACOSX_DATA="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.rsrc"
4562
dnl add the resources target for wxMac
4563
LIBWXMACRES="\$(wx_top_builddir)/lib/${WX_RESOURCES_MACOSX_ASCII}"
4565
AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez)
4566
AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez)
4567
AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile)
4569
MACSETFILE="\$(SETFILE)"
4571
dnl resources are bundled both with shared library and applications
4572
dnl since the carb resource *must* be included in the application
4573
if test "$wxUSE_MAC" = 1; then
4574
POSTLINK_COMMAND="\$(REZ) -d __DARWIN__ -t APPL Carbon.r -o"
4576
WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL Carbon.r -o"
4578
POSTLINK_COMMAND="echo -n | \$(REZ) -d __DARWIN__ -t APPL ${LIBWXMACRES}"
4579
RESCOMP="echo -n \| $REZ"
4580
WXCONFIG_RESFLAGS="-d __DARWIN__ -t APPL \$libdir/$WX_RESOURCES_MACOSX_ASCII"
4584
dnl default value is to (silently) do nothing in the makefile
4587
if test "$wxUSE_PM" = 1; then
4589
WXCONFIG_RESFLAGS="-ep"
4591
dnl Is this one really used anywhere for pm?
4592
POSTLINK_COMMAND="$RESCOMP $WXCONFIG_RESFLAGS"
4594
POSTLINK_COMMAND="@true"
4600
dnl ---------------------------------------------------------------------------
4601
dnl Checks for typedefs
4602
dnl ---------------------------------------------------------------------------
4604
dnl defines mode_t if not already defined
4606
dnl defines off_t if not already defined
4608
dnl defines pid_t if not already defined
4610
dnl defines size_t if not already defined
4612
dnl defines uid_t and gid_t if not already defined
4615
dnl sets HAVE_SSIZE_T if ssize_t is defined
4616
AC_CHECK_TYPES(ssize_t)
4618
dnl check what exactly size_t is on this machine - this is necessary to avoid
4619
dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h
4620
AC_LANG_PUSH(C++) dnl tests below use overloaded functions and so need C++
4621
AC_CACHE_CHECK([if size_t is unsigned int],
4622
wx_cv_size_t_is_uint,
4624
dnl an obvious check like AC_TRY_COMPILE[struct Foo { ... };] doesn't work
4625
dnl with egcs (at least) up to 1.1.1 as it allows you to compile duplicate
4626
dnl methods in a local class (i.e. class inside a function) declaration
4627
dnl without any objections!!
4629
dnl hence the hack below: we must have Foo at global scope!
4630
AC_TRY_COMPILE([#include <stddef.h>],
4634
struct Foo { void foo(size_t); void foo(unsigned int); };
4638
wx_cv_size_t_is_uint=no,
4639
wx_cv_size_t_is_uint=yes
4644
if test "$wx_cv_size_t_is_uint" = "yes"; then
4645
AC_DEFINE(wxSIZE_T_IS_UINT)
4647
AC_CACHE_CHECK([if size_t is unsigned long],
4648
wx_cv_size_t_is_ulong,
4649
AC_TRY_COMPILE([#include <stddef.h>],
4653
struct Foo { void foo(size_t); void foo(unsigned long); };
4657
wx_cv_size_t_is_ulong=no,
4658
wx_cv_size_t_is_ulong=yes
4662
if test "$wx_cv_size_t_is_ulong" = "yes"; then
4663
AC_DEFINE(wxSIZE_T_IS_ULONG)
4667
AC_LANG_POP() dnl C++
4669
dnl ---------------------------------------------------------------------------
4670
dnl Checks for structures
4671
dnl ---------------------------------------------------------------------------
4673
dnl does passwd struct has the pw_gecos field?
4674
AC_CACHE_CHECK([for pw_gecos in struct passwd], wx_cv_struct_pw_gecos,
4676
AC_TRY_COMPILE([#include <pwd.h>],
4683
wx_cv_struct_pw_gecos=yes
4686
wx_cv_struct_pw_gecos=no
4692
if test "$wx_cv_struct_pw_gecos" = "yes"; then
4693
AC_DEFINE(HAVE_PW_GECOS)
4696
dnl ---------------------------------------------------------------------------
4697
dnl Check for functions
4698
dnl ---------------------------------------------------------------------------
4700
dnl don't check for wchar_t functions if we haven't got wchar_t itself
4701
if test "$wxUSE_WCHAR_T" = "yes"; then
4702
AC_DEFINE(wxUSE_WCHAR_T)
4704
dnl check for wcslen in all possible places
4707
AC_CHECK_FUNCS(wcslen, WCSLEN_FOUND=1)
4709
if test "$WCSLEN_FOUND" = 0; then
4710
if test "$TOOLKIT" = "MSW"; then
4711
AC_CHECK_LIB(msvcrt, wcslen, WCHAR_OK=1)
4713
AC_CHECK_LIB(w, wcslen, [
4720
if test "$WCSLEN_FOUND" = 1; then
4721
AC_DEFINE(HAVE_WCSLEN)
4724
dnl On HP-UX aCC need this define to find mbstrtowcs() &c
4725
dnl Can't be used for g++ since the mbstate_t in wchar.h can conflict
4726
dnl with g++'s in <cwchar> (unless -D_INCLUDE__STDC_A1_SOURCE is in the
4727
dnl flags when g++ is configured, it will declare it's own).
4728
if test "$USE_HPUX" = 1 -a "$GCC" != "yes"; then
4729
CPPFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CPPFLAGS"
4732
dnl Try to use wcsrtombs instead of wcstombs which is buggy in old GNU
4733
dnl libc versions if possible. AC_CHECK_FUNCS only checks it's in the
4734
dnl library, not the header, so do a header check for mbstate_t first.
4735
AC_CHECK_TYPES([mbstate_t],
4736
[AC_CHECK_FUNCS(wcsrtombs)],
4738
[#include <wchar.h>])
4740
AC_MSG_WARN([Wide character support is unavailable])
4743
dnl check for vsnprintf() -- a safe version of vsprintf())
4745
dnl the trouble here is that on some systems (e.g HP-UX 10) this function is
4746
dnl present in libc but not in the system headers and so AC_CHECK_FUNCS (which,
4747
dnl stupidly, provides a dummy function declaration inside its extension)
4748
dnl succeeds, even with C++ compiler, but the compilation of wxWidgets fails
4750
dnl so we first check if the function is in the library
4752
dnl FIXME: replace this mess with WX_CHECK_FUNCS()
4753
AC_CHECK_FUNCS(snprintf vsnprintf)
4755
if test "$ac_cv_func_vsnprintf" = "yes"; then
4756
dnl yes it is -- now check if it is in the headers
4757
AC_CACHE_CHECK([for vsnprintf declaration], wx_cv_func_vsnprintf_decl,
4759
dnl our troubles are not over: HP-UX 11 prototypes vsnprintf() as
4760
dnl taking "char *" and not "const char *" while Metrowerks does
4761
dnl provide a correct vsnprintf declaration but in C++ mode it's
4762
dnl always in std namespace and so we have to bring it in scope
4768
#if __MSL__ >= 0x6000
4770
using namespace std;
4777
vsnprintf(buf, 10u, "%s", ap);
4779
wx_cv_func_vsnprintf_decl=yes,
4780
wx_cv_func_vsnprintf_decl=no
4785
if test "$wx_cv_func_vsnprintf_decl" = "yes"; then
4786
AC_DEFINE(HAVE_VSNPRINTF_DECL)
4788
dnl we know there is a vsnprintf declaration, but some old headers
4789
dnl may have one taking a "char *" format instead of "const char *"
4790
AC_CACHE_CHECK([if vsnprintf declaration is broken], wx_cv_func_broken_vsnprintf_decl,
4797
#if __MSL__ >= 0x6000
4799
using namespace std;
4806
const char *fmt = "%s";
4807
vsnprintf(buf, 10u, fmt, ap);
4809
wx_cv_func_broken_vsnprintf_decl=no,
4810
wx_cv_func_broken_vsnprintf_decl=yes
4815
if test "$wx_cv_func_broken_vsnprintf_decl" = "yes"; then
4816
AC_DEFINE(HAVE_BROKEN_VSNPRINTF_DECL)
4821
dnl the same as above but for snprintf() now: it's not present in at least AIX
4823
if test "$ac_cv_func_snprintf" = "yes"; then
4824
AC_CACHE_CHECK([for snprintf declaration], wx_cv_func_snprintf_decl,
4831
#if __MSL__ >= 0x6000
4833
using namespace std;
4839
snprintf(buf, 10u, "%s", "wx");
4841
wx_cv_func_snprintf_decl=yes,
4842
wx_cv_func_snprintf_decl=no
4847
if test "$wx_cv_func_snprintf_decl" = "yes"; then
4848
AC_DEFINE(HAVE_SNPRINTF_DECL)
4850
dnl we know there is an snprintf declaration, but some old headers
4851
dnl may have one taking a "char *" format instead of "const char *"
4852
AC_CACHE_CHECK([if snprintf declaration is broken], wx_cv_func_broken_snprintf_decl,
4859
#if __MSL__ >= 0x6000
4861
using namespace std;
4867
const char *fmt = "%s";
4868
snprintf(buf, 10u, fmt, "wx");
4870
wx_cv_func_broken_snprintf_decl=no,
4871
wx_cv_func_broken_snprintf_decl=yes
4876
if test "$wx_cv_func_broken_snprintf_decl" = "yes"; then
4877
AC_DEFINE(HAVE_BROKEN_SNPRINTF_DECL)
4881
if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then
4883
dnl check if snprintf() has support for positional arguments
4884
dnl NB: if snprintf() has positional support we can safely suppose that also
4885
dnl other *printf() functions support them as they all belong to the same
4886
dnl family and they all fallback to the same implementation
4887
AC_CACHE_CHECK([if snprintf supports positional arguments], wx_cv_func_snprintf_pos_params,
4896
snprintf (buffer, 128, "%2$d %3$d %1$d", 1, 2, 3);
4897
if (strcmp ("2 3 1", buffer) == 0)
4902
wx_cv_func_snprintf_pos_params=no,
4903
wx_cv_func_snprintf_pos_params=yes,
4904
dnl be pessimistic when cross-compiling
4906
AC_MSG_WARN([Assuming Unix98 printf() is not available,
4907
define HAVE_UNIX98_PRINTF as 1 in setup.h if it is available.])
4908
wx_cv_func_snprintf_pos_params=no
4914
if test "$wx_cv_func_snprintf_pos_params" = "yes"; then
4915
AC_DEFINE(HAVE_UNIX98_PRINTF)
4920
if test "$wxUSE_UNICODE" = yes; then
4922
dnl our wxVsnprintf() implementation needs to use the system swprintf() in Unicode
4923
dnl builds so let's check if swprintf() is declared as C99 imposes:
4924
dnl int swprintf(wchar_t *s, size_t n, const wchar_t *format, ...);
4926
dnl int swprintf(wchar_t *s, const wchar_t *format, ...);
4927
AC_CHECK_FUNCS(swprintf)
4929
if test "$ac_cv_func_swprintf" = "yes"; then
4930
AC_CACHE_CHECK([if swprintf declaration is broken], wx_cv_func_broken_swprintf_decl,
4940
const wchar_t *fmt = L"test";
4941
swprintf(buf, 10u, fmt);
4943
wx_cv_func_broken_swprintf_decl=no,
4944
wx_cv_func_broken_swprintf_decl=yes
4949
if test "$wx_cv_func_broken_swprintf_decl" = "yes"; then
4950
AC_DEFINE(HAVE_BROKEN_SWPRINTF_DECL)
4954
dnl also look if we have wide char IO functions, notice that [f]putws are
4955
dnl declared in special widec.h under Solaris
4956
wchar_headers="#include <stdio.h>
4960
AC_CHECK_HEADERS(widec.h,,, [AC_INCLUDES_DEFAULT()])
4961
if test "$ac_cv_header_widec_h" = "yes"; then
4962
wchar_headers="$wchar_headers
4967
WX_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf,,,
4970
dnl MinGW has a vswprintf with a different prototype, and
4971
dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS
4972
dnl finds it even if it is not declared in some versions...
4973
AC_MSG_CHECKING([for _vsnwprintf])
4974
AC_TRY_COMPILE([#include <wchar.h>],
4976
[AC_MSG_RESULT([yes])
4977
AC_DEFINE(HAVE__VSNWPRINTF)],
4978
[AC_MSG_RESULT([no])]);
4981
if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
4982
WX_CHECK_FUNCS(fnmatch,,,[#include <fnmatch.h>])
4985
if test "$wxUSE_FILE" = "yes"; then
4986
WX_CHECK_FUNCS(fsync)
4989
dnl at least under IRIX with mipsPro the C99 round() function is available when
4990
dnl building using the C compiler but not when using C++ one
4992
WX_CHECK_FUNCS(round,,,[#include <math.h>])
4995
dnl the following tests are for Unix(like) systems only
4996
if test "$TOOLKIT" != "MSW"; then
4998
dnl check for available version of iconv()
5001
LIBS="$LIBICONV $LIBS"
5003
dnl check for POSIX signals if we need them
5004
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
5005
AC_CHECK_FUNCS(sigaction)
5007
if test "$ac_cv_func_sigaction" = "no"; then
5008
AC_MSG_WARN([No POSIX signal functions on this system, wxApp::OnFatalException will not be called])
5009
wxUSE_ON_FATAL_EXCEPTION=no
5012
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
5013
AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler,
5015
dnl C compiler happily compiles the code even if there is type mismatch
5017
AC_TRY_COMPILE([#include <signal.h>],
5019
extern void testSigHandler(int);
5021
struct sigaction sa;
5022
sa.sa_handler = testSigHandler;
5024
wx_cv_type_sa_handler=int
5026
wx_cv_type_sa_handler=void
5031
AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler)
5035
dnl backtrace() and backtrace_symbols() for wxStackWalker
5036
if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then
5038
AC_SEARCH_LIBS(backtrace, execinfo,
5039
[AC_CACHE_CHECK([for backtrace() in <execinfo.h>], wx_cv_func_backtrace,
5040
[AC_TRY_LINK([#include <execinfo.h>],
5044
backtrace(trace, 1);
5045
messages = backtrace_symbols(trace, 1);
5047
wx_cv_func_backtrace=yes,
5048
wx_cv_func_backtrace=no
5051
wx_cv_func_backtrace=no)
5053
if test "$wx_cv_func_backtrace" = "no"; then
5054
AC_MSG_WARN([backtrace() is not available, wxStackWalker will not be available])
5055
wxUSE_STACKWALKER=no
5057
AC_CACHE_CHECK([for __cxa_demangle() in <cxxabi.h>], wx_cv_func_cxa_demangle,
5059
AC_TRY_LINK([#include <cxxabi.h>],
5062
__cxxabiv1::__cxa_demangle("foo", 0, 0, &rc);
5064
wx_cv_func_cxa_demangle=yes,
5065
wx_cv_func_cxa_demangle=no
5070
if test "$wx_cv_func_cxa_demangle" = "yes"; then
5071
AC_DEFINE(HAVE_CXA_DEMANGLE)
5077
if test "$wxUSE_STACKWALKER" = "yes" -a "$USE_WIN32" != "1" -a "$USE_UNIX" != "1"; then
5078
AC_MSG_WARN([wxStackWalker is only available on Win32 and UNIX... disabled])
5079
wxUSE_STACKWALKER=no
5083
dnl check for the function for temp files creation
5084
AC_CHECK_FUNCS(mkstemp mktemp, break)
5086
dnl get the library function to use for wxGetDiskSpace(): it is statfs() under
5087
dnl Linux and *BSD and statvfs() under Solaris
5088
AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
5091
#if defined(__BSD__)
5092
#include <sys/param.h>
5093
#include <sys/mount.h>
5095
#include <sys/vfs.h>
5106
wx_cv_func_statfs=yes,
5107
wx_cv_func_statfs=no
5111
if test "$wx_cv_func_statfs" = "yes"; then
5112
dnl check whether we have its dcelaration too: some systems (AIX 4) lack it
5113
AC_CACHE_CHECK(for statfs declaration, wx_cv_func_statfs_decl,
5117
#if defined(__BSD__)
5118
#include <sys/param.h>
5119
#include <sys/mount.h>
5121
#include <sys/vfs.h>
5128
wx_cv_func_statfs_decl=yes,
5129
wx_cv_func_statfs_decl=no
5134
if test "$wx_cv_func_statfs_decl" = "yes"; then
5135
AC_DEFINE(HAVE_STATFS_DECL)
5138
wx_cv_type_statvfs_t="struct statfs"
5139
AC_DEFINE(HAVE_STATFS)
5141
AC_CACHE_CHECK(for statvfs, wx_cv_func_statvfs,
5145
#include <sys/statvfs.h>
5150
wx_cv_func_statvfs=yes,
5151
wx_cv_func_statvfs=no
5155
if test "$wx_cv_func_statvfs" = "yes"; then
5156
dnl we also have to check whether we should use statvfs_t (works under
5157
dnl Solaris 8, doesn't work under Solaris 7) or "struct statvfs" (vice
5158
dnl versa) as the argument for statvfs in 64 bit off_t mode (in 32 bit
5159
dnl mode both work fine)
5161
dnl for this check C++ compiler has to be used as passing incompatible
5162
dnl pointers is just a warning and not an error in C
5163
AC_CACHE_CHECK(for statvfs argument type, wx_cv_type_statvfs_t,
5167
#include <sys/statvfs.h>
5177
wx_cv_type_statvfs_t=statvfs_t,
5181
#include <sys/statvfs.h>
5191
wx_cv_type_statvfs_t="struct statvfs",
5192
wx_cv_type_statvfs_t="unknown"
5199
if test "$wx_cv_type_statvfs_t" != "unknown"; then
5200
AC_DEFINE(HAVE_STATVFS)
5203
dnl set it for the test below
5204
wx_cv_type_statvfs_t="unknown"
5208
if test "$wx_cv_type_statvfs_t" != "unknown"; then
5209
AC_DEFINE_UNQUOTED(WX_STATFS_T, $wx_cv_type_statvfs_t)
5211
AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()])
5214
dnl check for fcntl() or at least flock() needed by Unix implementation of
5215
dnl wxSingleInstanceChecker
5216
if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
5217
AC_CHECK_FUNCS(fcntl flock, break)
5219
if test "$ac_cv_func_fcntl" != "yes" -a "$ac_cv_func_flock" != "yes"; then
5220
AC_MSG_WARN(wxSingleInstanceChecker not available)
5221
wxUSE_SNGLINST_CHECKER=no
5225
dnl check for timegm() used by datetime.cpp
5226
AC_CHECK_FUNCS(timegm)
5228
dnl look for a function to modify the environment
5229
AC_CHECK_FUNCS(setenv putenv, break)
5230
if test "$ac_cv_func_setenv" = "yes"; then
5231
AC_CHECK_FUNCS(unsetenv)
5234
HAVE_SOME_SLEEP_FUNC=0
5235
if test "$USE_BEOS" = 1; then
5236
dnl BeOS has its own (wonder where did they get it from) sleep() function
5238
AC_DEFINE(HAVE_SLEEP)
5239
HAVE_SOME_SLEEP_FUNC=1
5242
if test "$USE_DARWIN" = 1; then
5243
dnl Mac OS X/Darwin has both nanosleep and usleep
5244
dnl but only usleep is defined in unistd.h
5245
AC_DEFINE(HAVE_USLEEP)
5246
HAVE_SOME_SLEEP_FUNC=1
5249
if test "$HAVE_SOME_SLEEP_FUNC" != 1; then
5250
dnl try nanosleep() in libc and libposix4, if this fails - usleep()
5252
AC_CHECK_FUNCS(nanosleep,
5253
AC_DEFINE(HAVE_NANOSLEEP),
5255
AC_CHECK_LIB(posix4, nanosleep,
5257
AC_DEFINE(HAVE_NANOSLEEP)
5258
POSIX4_LINK=" -lposix4"
5261
WX_CHECK_FUNCS(usleep,,
5262
AC_MSG_WARN([wxSleep() function will not work])
5270
dnl check for uname (POSIX) and gethostname (BSD)
5271
WX_CHECK_FUNCS(uname,,,[#include <sys/utsname.h>])
5272
if test "$wx_cv_func_uname" != yes; then
5273
WX_CHECK_FUNCS(gethostname)
5276
WX_CHECK_FUNCS(strtok_r, [], [], [#define _REENTRANT])
5278
dnl check for inet_addr and inet_aton (these may live either in libc, or in
5279
dnl libnsl or libresolv or libsocket)
5281
AC_CHECK_FUNCS(inet_addr,
5282
AC_DEFINE(HAVE_INET_ADDR),
5284
AC_CHECK_LIB(nsl, inet_addr,
5287
AC_CHECK_LIB(resolv, inet_addr,
5290
AC_CHECK_LIB(socket, inet_addr,
5300
AC_CHECK_FUNCS(inet_aton,
5301
AC_DEFINE(HAVE_INET_ATON),
5303
dnl only check it in the same lib
5304
AC_CHECK_LIB($INET_LINK, inet_aton, AC_DEFINE(HAVE_INET_ATON))
5307
if test "x$INET_LINK" != "x"; then
5308
AC_DEFINE(HAVE_INET_ADDR)
5309
INET_LINK=" -l$INET_LINK"
5312
WX_CHECK_FUNCS(fdopen)
5314
if test "$wxUSE_TARSTREAM" = "yes"; then
5315
WX_CHECK_FUNCS(sysconf)
5317
WX_CHECK_FUNCS(getpwuid_r, [], [],
5323
struct passwd pw, *ppw;
5325
getpwuid_r(0, &pw, buf, sizeof(buf), &ppw)
5328
WX_CHECK_FUNCS(getgrgid_r, [], [],
5334
struct group grp, *pgrp;
5336
getgrgid_r(0, &grp, buf, sizeof(buf), &pgrp)
5345
dnl ------------------------------------------
5346
dnl Checks specific to contrib libs (MMedia)
5347
dnl ------------------------------------------
5351
AC_CHECK_LIB(esd, esd_close, [
5352
AC_CHECK_HEADERS([esd.h], [
5353
EXTRALIBS_ESD="-lesd"
5358
AC_SUBST(EXTRALIBS_ESD)
5360
dnl check for known CD-ROM interface
5361
AC_MSG_CHECKING([for known CD-ROM interface])
5362
AC_TRY_COMPILE([#ifdef __linux__
5363
#include <linux/cdrom.h>
5366
#include <sys/cdio.h>
5369
[struct cdrom_tocentry entry, old_entry;],
5370
[AC_MSG_RESULT([yes])
5371
AC_DEFINE(HAVE_KNOWN_CDROM_INTERFACE)],
5372
[AC_MSG_RESULT([no])])
5374
dnl ===========================================================================
5375
dnl Now we have all the info we need - use it!
5376
dnl ===========================================================================
5381
dnl ---------------------------------------------------------------------------
5382
dnl thread support for Unix (for Win32 and OS/2 see past
5383
dnl the next matching "else")
5384
dnl ---------------------------------------------------------------------------
5386
dnl under MSW (except mingw32) we always have thread support
5387
if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
5391
dnl defines THREADS_LINK and THREADS_CFLAGS which are the options
5392
dnl necessary to build the MT programs for the linker and compiler
5395
dnl sets wxUSE_THREADS=1 if thread support is activated
5400
if test "$wxUSE_THREADS" = "yes" ; then
5401
if test "$USE_BEOS" = 1; then
5402
AC_MSG_WARN([BeOS threads are not yet supported... disabled])
5407
if test "$wxUSE_THREADS" = "yes" ; then
5408
dnl find if POSIX threads are available
5410
dnl the tests here are based on ACX_PTHREAD macro from autoconf macro
5411
dnl archive from http://ac-archive.sourceforge.net/
5413
dnl thanks to Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro
5414
dnl Forero Cuervo <bachue@bachue.com> for the original code
5416
dnl TODO: cache the result
5418
dnl define the list of the thread options to try in the loop below
5419
dnl with the convention that anything starting with '-' is a cpp flag
5420
dnl while anything else is a library (i.e. there is an implicit "-l")
5421
THREAD_OPTS="-pthread"
5423
*-*-solaris2* | *-*-sunos4* )
5424
if test "x$GCC" = "xyes"; then
5425
dnl Solaris/gcc combination use this one for some reason
5426
THREAD_OPTS="-pthreads $THREAD_OPTS"
5428
THREAD_OPTS="-mt $THREAD_OPTS"
5432
dnl look, in order, for the kernel threads, then Linux threads
5433
dnl and finally the userland threads
5434
THREAD_OPTS="-kthread lthread $THREAD_OPTS c_r"
5436
*-*-darwin* | *-*-cygwin* )
5437
dnl Darwin / Mac OS X just uses -lpthread tested below
5438
dnl and so does Cygwin
5442
dnl AIX calls the library libpthreads - thanks IBM!
5443
THREAD_OPTS="pthreads"
5446
if test "x$GCC" = "xyes"; then
5447
dnl g++ versions before 3.3.2 don't support -pthread.
5448
$CXX -dumpspecs | grep 'pthread:' >/dev/null ||
5451
dnl HP-UX aCC (tested with version B3910B A.06.05 [Jul 25
5452
dnl 2005]) supports -mt
5458
dnl gcc under IRIX doesn't seem to like -pthread, but it
5459
dnl doesn't give an error for it neither, just a warning
5460
dnl message -- but this is still very annoying
5461
if test "x$GCC" = "xyes"; then
5467
dnl flying by man pages here: Caldera online docs use this
5468
if test "x$GCC" != "xyes"; then
5469
THREAD_OPTS="-Ethread"
5474
dnl simply linking with libpthread should make the test below work but
5475
dnl it's far from certain that the threaded programs compiled without
5476
dnl any special switches actually work, so try it after all the others
5477
THREAD_OPTS="$THREAD_OPTS pthread none"
5479
dnl now test for all possibilities
5481
for flag in $THREAD_OPTS; do
5484
AC_MSG_CHECKING([whether pthreads work without any flags])
5488
AC_MSG_CHECKING([whether pthreads work with $flag])
5489
THREADS_CFLAGS="$flag"
5493
AC_MSG_CHECKING([for the pthreads library -l$flag])
5494
THREADS_LINK="-l$flag"
5499
save_CFLAGS="$CFLAGS"
5500
LIBS="$THREADS_LINK $LIBS"
5501
CFLAGS="$THREADS_CFLAGS $CFLAGS"
5503
AC_TRY_LINK([#include <pthread.h>],
5504
[pthread_create(0,0,0,0);],
5508
CFLAGS="$save_CFLAGS"
5510
AC_MSG_RESULT($THREADS_OK)
5511
if test "x$THREADS_OK" = "xyes"; then
5519
if test "x$THREADS_OK" != "xyes"; then
5521
AC_MSG_WARN([No thread support on this system... disabled])
5523
dnl yes, these special compiler flags should be used with the
5525
LDFLAGS="$THREADS_CFLAGS $LDFLAGS"
5526
LIBS="$THREADS_LINK $LIBS"
5528
AC_MSG_CHECKING([if more special flags are required for pthreads])
5532
dnl again quoting from
5533
dnl http://www-1.ibm.com/servers/esdd/articles/gnu.html:
5535
dnl When compiling and linking with -pthread, the library
5536
dnl search path should include -L/usr/lib/threads at the
5537
dnl beginning of the path.
5538
LDFLAGS="-L/usr/lib/threads $LDFLAGS"
5539
flag="-D_THREAD_SAFE"
5542
flag="-D_THREAD_SAFE"
5546
if test "x$GCC" != "xyes"; then
5547
dnl see http://docs.hp.com/hpux/onlinedocs/2213/threads.htm
5548
flag="$flag -D_RWSTD_MULTI_THREAD"
5551
*solaris* | alpha*-osf*)
5555
AC_MSG_RESULT(${flag})
5556
if test "x$flag" != xno; then
5557
THREADS_CFLAGS="$THREADS_CFLAGS $flag"
5560
dnl don't add these options to CPPFLAGS as cpp might not know them
5561
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS $THREADS_CFLAGS"
5565
dnl do other tests only if we are using threads
5566
if test "$wxUSE_THREADS" = "yes" ; then
5567
AC_CHECK_FUNCS(thr_setconcurrency)
5569
dnl can't use AC_CHECK_FUNCS for this one as it's usually a macro and so
5570
dnl wouldn't be found by it
5571
AC_CACHE_CHECK([for pthread_cleanup_push/pop], wx_cv_func_pthread_cleanup,
5573
AC_TRY_COMPILE([#include <pthread.h>
5574
void ThreadCleanupFunc(void *p);
5578
pthread_cleanup_push(ThreadCleanupFunc, p);
5579
pthread_cleanup_pop(0);
5581
wx_cv_func_pthread_cleanup=yes
5583
wx_cv_func_pthread_cleanup=no
5587
if test "x$wx_cv_func_pthread_cleanup" = "xyes"; then
5588
AC_DEFINE(wxHAVE_PTHREAD_CLEANUP)
5591
AC_CHECK_HEADERS(sched.h,,, [AC_INCLUDES_DEFAULT()])
5592
if test "$ac_cv_header_sched_h" = "yes"; then
5593
AC_CHECK_FUNC(sched_yield,
5594
AC_DEFINE(HAVE_SCHED_YIELD),
5596
AC_CHECK_LIB(posix4,
5598
[AC_DEFINE(HAVE_SCHED_YIELD) POSIX4_LINK=" -lposix4"],
5599
AC_MSG_WARN(wxThread::Yield will not work properly)
5605
dnl to be able to set the thread priority, we need to have all of the
5606
dnl following functions:
5607
dnl 1. pthread_attr_getschedpolicy
5608
dnl 2. sched_get_priority_min and sched_get_priority_max
5609
dnl (this one can be in either libpthread or libposix4 (under Solaris))
5610
dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam
5612
AC_CHECK_FUNC(pthread_attr_getschedpolicy,
5613
[AC_CHECK_FUNC(pthread_attr_setschedparam,
5614
[AC_CHECK_FUNC(sched_get_priority_max,
5616
[AC_CHECK_LIB([posix4], sched_get_priority_max,
5619
POSIX4_LINK=" -lposix4"
5626
if test "$HAVE_PRIOR_FUNCS" = 1; then
5627
AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS)
5629
AC_MSG_WARN(Setting thread priority will not work)
5632
AC_CHECK_FUNC(pthread_cancel,
5633
AC_DEFINE(HAVE_PTHREAD_CANCEL),
5634
AC_MSG_WARN([wxThread::Kill() will not work properly]))
5636
AC_CHECK_FUNC(pthread_attr_setstacksize,
5637
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE))
5639
dnl mutexattr_t initialization is done in quite different ways on different
5640
dnl platforms, so check for a few things:
5642
dnl HAVE_MUTEX_RECURSIVE means that we can create recursive mutexes
5643
dnl HAVE_MUTEXATTR_SETTYPE means that we do it using
5644
dnl pthread_mutexattr_settype(PTHREAD_MUTEX_RECURSIVE) and if it is not
5645
dnl defined, we do it by directly assigned
5646
dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
5648
AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
5650
AC_TRY_COMPILE([#include <pthread.h>],
5652
pthread_mutexattr_t attr;
5653
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
5655
wx_cv_type_pthread_mutexattr_t=yes,
5656
wx_cv_type_pthread_mutexattr_t=no
5660
if test "$wx_cv_type_pthread_mutexattr_t" = "yes"; then
5661
AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_T)
5663
dnl check if we already have the declaration we need, it is not
5664
dnl present in some systems' headers
5665
AC_CACHE_CHECK([for pthread_mutexattr_settype declaration],
5666
wx_cv_func_pthread_mutexattr_settype_decl, [
5667
AC_TRY_COMPILE([#include <pthread.h>],
5669
pthread_mutexattr_t attr;
5670
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
5672
wx_cv_func_pthread_mutexattr_settype_decl=yes,
5673
wx_cv_func_pthread_mutexattr_settype_decl=no
5676
if test "$wx_cv_func_pthread_mutexattr_settype_decl" = "yes"; then
5677
AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL)
5680
dnl don't despair, there may be another way to do it
5681
AC_CACHE_CHECK([for PTHREAD_RECURSIVE_MUTEX_INITIALIZER],
5682
wx_cv_type_pthread_rec_mutex_init,
5684
AC_TRY_COMPILE([#include <pthread.h>],
5686
pthread_mutex_t attr = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
5688
wx_cv_type_pthread_rec_mutex_init=yes
5690
wx_cv_type_pthread_rec_mutex_init=no
5694
if test "$wx_cv_type_pthread_rec_mutex_init" = "yes"; then
5695
AC_DEFINE(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
5697
dnl this may break code working elsewhere, so at least warn about it
5698
AC_MSG_WARN([wxMutex won't be recursive on this platform])
5705
if test "$wxUSE_THREADS" = "yes" ; then
5710
dnl check if the compiler accepts -mthreads
5711
AC_CACHE_CHECK([if compiler supports -mthreads],
5712
wx_cv_cflags_mthread,
5714
CFLAGS_OLD="$CFLAGS"
5715
CFLAGS="-mthreads $CFLAGS"
5716
AC_TRY_COMPILE([], [],
5717
wx_cv_cflags_mthread=yes,
5718
wx_cv_cflags_mthread=no
5723
if test "$wx_cv_cflags_mthread" = "yes"; then
5725
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -mthreads"
5726
LDFLAGS="$LDFLAGS -mthreads"
5729
CFLAGS="$CFLAGS_OLD"
5733
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -Zmt -D__ST_MT_ERRNO__"
5734
LDFLAGS="$LDFLAGS -Zmt"
5740
AC_CHECK_FUNC(localtime_r, [ AC_DEFINE(HAVE_LOCALTIME_R) ])
5741
AC_CHECK_FUNC(gmtime_r, [ AC_DEFINE(HAVE_GMTIME_R) ])
5742
AC_CHECK_FUNC(readdir_r, [ AC_DEFINE(HAVE_READDIR_R) ])
5743
dnl By preference, we probably should use getaddrinfo which avoids thread
5744
dnl safety issues and supports IPv6, however there currently is no code
5745
dnl for it, so testing for it is temporarily disabled and we are restricted
5746
dnl to gethostbyname_r/gethostbyaddr_r and getservbyname_r
5748
dnl AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), [
5749
dnl no getaddrinfo, so check for gethostbyname_r and
5750
dnl related functions (taken from python's configure.in)
5751
dnl sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments
5752
AX_FUNC_WHICH_GETHOSTBYNAME_R
5753
if test "x$ac_cv_func_which_gethostbyname_r" = "xno" -o \
5754
"x$ac_cv_func_which_gethostbyname_r" = "xunknown" ; then
5755
AC_CHECK_FUNC(gethostbyname, [ AC_DEFINE(HAVE_GETHOSTBYNAME) ])
5757
dnl A similar test for getservbyname_r
5758
dnl I'm tempted to just not do this test which is taking much time and
5759
dnl do something similar as for gethostbyaddr_r, but OTOH the macro
5760
dnl doing the test already exists, so using it is easy enough. - SN
5761
AC_raf_FUNC_WHICH_GETSERVBYNAME_R
5762
if test "x$ac_cv_func_which_getservbyname_r" = "xno" -o \
5763
"x$ac_cv_func_which_getservbyname_r" = "xunknown" ; then
5764
AC_CHECK_FUNCS(getservbyname,[ AC_DEFINE(HAVE_GETSERVBYNAME) ])
5766
dnl For gethostbyaddr_r, we currently do no separate test, instead, we
5767
dnl silently assume it's available exactly if gethostbyname_r is
5768
dnl available and always requires two more arguments than
5769
dnl gethostbyname_r.
5770
dnl (also, I'm lazy and there no m4 file that's ready for use for this
5771
dnl function, although it should be easy to rewrite the gethostbyname_r
5772
dnl check to fit this case, if it's really needed. - SN )
5776
if test "$wxUSE_THREADS" = "yes"; then
5777
AC_DEFINE(wxUSE_THREADS)
5779
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
5781
dnl on some systems, _REENTRANT should be defined if we want to use any _r()
5782
dnl functions - add tests for other functions here as well
5783
if test "$wx_cv_func_strtok_r" = "yes"; then
5784
AC_MSG_CHECKING(if -D_REENTRANT is needed)
5785
if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
5786
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_REENTRANT"
5794
if test "$WXGTK20" = 1 ; then
5795
AC_DEFINE_UNQUOTED(__WXGTK20__,$WXGTK20)
5799
if test "$WXGTK12" = 1 ; then
5800
AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12)
5803
if test "$WXGTK127" = 1 ; then
5804
AC_DEFINE_UNQUOTED(__WXGTK127__,$WXGTK127)
5807
if test "$WXGPE" = 1 ; then
5808
AC_DEFINE_UNQUOTED(__WXGPE__,$WXGPE)
5811
dnl DEBUG_CFLAGS contains debugging options (supposed to be the same for C and C++
5812
dnl compilers: we'd need a separate DEBUG_CXXFLAGS if this is ever not the case)
5814
if test "$wxUSE_DEBUG_INFO" = "yes" ; then
5819
if test "$wxUSE_DEBUG_GDB" = "yes" ; then
5820
wxUSE_DEBUG_INFO=yes
5821
if test "$GCC" = yes; then
5822
DEBUG_CFLAGS="-ggdb"
5826
if test "$wxUSE_DEBUG_FLAG" = "yes" ; then
5828
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D__WXDEBUG__"
5830
if test "$wxUSE_GTK" = 1 ; then
5831
if test "x$wxGTK_VERSION" = "x1" ; then
5832
CPPFLAGS="-DGTK_NO_CHECK_CASTS $CPPFLAGS"
5837
if test "$wxUSE_MEM_TRACING" = "yes" ; then
5838
AC_DEFINE(wxUSE_MEMORY_TRACING)
5839
AC_DEFINE(wxUSE_GLOBAL_MEMORY_OPERATORS)
5840
AC_DEFINE(wxUSE_DEBUG_NEW_ALWAYS)
5841
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS memcheck"
5844
if test "$wxUSE_DMALLOC" = "yes" ; then
5845
DMALLOC_LIBS="-ldmallocthcxx"
5848
dnl cc/cxx/ld option for profiling
5850
if test "$wxUSE_PROFILE" = "yes" ; then
5851
PROFILE_FLAGS=" -pg"
5854
if test "$GCC" = "yes" ; then
5855
if test "$wxUSE_NO_RTTI" = "yes" ; then
5856
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-rtti"
5858
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
5859
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-exceptions"
5861
if test "$wxUSE_PERMISSIVE" = "yes" ; then
5862
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -fpermissive"
5865
dnl Ian Brown <ian.brown@printsoft.de> reports that versions of gcc before
5866
dnl 3.0 overflow the table of contents on rs6000 as they create an entry
5867
dnl for each subroutine by default -- using the switch below only creates
5868
dnl one entry per file instead at the price of minor performance penalty
5870
dnl As of wx2.4 a bug in the hppa gcc compiler causes a similar problem
5871
dnl without -ffunction-sections. No idea how long we'll need to maintain
5872
dnl this, or even the extent of gcc/wx version combinations affected, but
5873
dnl also as above, this 'fix' does not come without side effects.
5875
dnl TODO: test for the gcc version here (how?)
5878
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -mminimal-toc"
5881
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -ffunction-sections"
5886
dnl C/C++ compiler option for optimization (supposed to be the same for both)
5888
if test "$wxUSE_OPTIMISE" = "no" ; then
5889
if test "$GCC" = yes ; then
5890
dnl use -O0 because compiling with it is faster than compiling with no
5891
dnl optimization options at all (at least with g++ 3.2)
5892
OPTIMISE_CFLAGS="-O0"
5895
if test "$GCC" = yes ; then
5897
*-pc-os2_emx | *-pc-os2-emx )
5898
dnl Not all of the supported gcc versions understand
5899
dnl -fstrict-aliasing and none actually needs it (yet).
5900
OPTIMISE_CFLAGS="-O2"
5903
dnl Switch on optimisation but keep strict-aliasing off for
5904
dnl now (see -fstrict-aliasing in the gcc manual). When it is
5905
dnl switched back on consider using -Wstrict-aliasing=2.
5906
OPTIMISE_CFLAGS="-O2 -fno-strict-aliasing"
5910
OPTIMISE_CFLAGS="-O"
5914
dnl ---------------------------------------------------------------------------
5915
dnl compatibility level
5916
dnl ---------------------------------------------------------------------------
5918
if test "x$WXWIN_COMPATIBILITY_2_4" = "xyes"; then
5919
AC_DEFINE(WXWIN_COMPATIBILITY_2_4)
5921
WXWIN_COMPATIBILITY_2_6="yes"
5924
if test "x$WXWIN_COMPATIBILITY_2_6" != "xno"; then
5925
AC_DEFINE(WXWIN_COMPATIBILITY_2_6)
5928
dnl ---------------------------------------------------------------------------
5929
dnl the library may be built without GUI classes at all
5930
dnl ---------------------------------------------------------------------------
5932
if test "$wxUSE_GUI" = "yes"; then
5933
AC_DEFINE(wxUSE_GUI)
5935
dnl the things we always pull in the GUI version of the library:
5936
dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
5937
dnl library really can't be built without those)
5938
dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
5939
dnl almost any program and the first 2 are needed to show a message box
5940
dnl which want to be always able to do)
5941
dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
5942
dnl to compile without them (if the app doesn't do any drawing, it doesn't
5943
dnl need the dcs, pens, brushes, ...), this just can't be done now
5944
dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
5945
dnl 5. misc stuff: timers, settings, message box
5948
dnl ---------------------------------------------------------------------------
5950
dnl ---------------------------------------------------------------------------
5952
if test "$wxUSE_UNIX" = "yes"; then
5953
AC_DEFINE(wxUSE_UNIX)
5956
dnl ------------------------------------------------------------------------
5958
dnl ------------------------------------------------------------------------
5960
dnl under MSW we always have LoadLibrary/GetProcAddress
5961
if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
5965
if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then
5966
if test "$USE_DOS" = 1; then
5969
dnl the test is a bit complicated because we check for dlopen() both with
5970
dnl and without -ldl and we also try to find shl_load() if there is no
5971
dnl dlopen() on this system
5972
AC_CHECK_FUNCS(dlopen,
5974
AC_DEFINE(HAVE_DLOPEN)
5978
AC_CHECK_LIB(dl, dlopen,
5980
AC_DEFINE(HAVE_DLOPEN)
5982
DL_LINK=" -ldl$DL_LINK"
5985
AC_CHECK_FUNCS(shl_load,
5987
AC_DEFINE(HAVE_SHL_LOAD)
5991
AC_CHECK_LIB(shl_load, dld,
5994
DL_LINK=" -ldld$DL_LINK"
6000
dnl check also for dlerror()
6001
if test "$HAVE_DL_FUNCS" = 1; then
6002
AC_CHECK_FUNCS(dlerror,
6003
AC_DEFINE(HAVE_DLERROR),
6005
AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))
6011
dnl Force HAVE_DL_FUNCS on for Darwin, even if the tests failed (e.g. pre-10.3)
6012
if test "$USE_DARWIN" = 1; then
6013
dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
6017
if test "$HAVE_DL_FUNCS" = 0; then
6018
if test "$HAVE_SHL_FUNCS" = 0; then
6019
if test "$USE_UNIX" = 1 -o "$USE_DOS" = 1; then
6020
AC_MSG_WARN([Missing dynamic loading support, several features will be disabled])
6021
wxUSE_DYNAMIC_LOADER=no
6022
wxUSE_DYNLIB_CLASS=no
6024
AC_MSG_WARN([Assuming wxLibrary class works on this platform])
6031
if test "$wxUSE_DYNAMIC_LOADER" = "yes" ; then
6032
AC_DEFINE(wxUSE_DYNAMIC_LOADER)
6034
if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then
6035
AC_DEFINE(wxUSE_DYNLIB_CLASS)
6039
dnl ---------------------------------------------------------------------------
6040
dnl Verify consistency of plugins/monolithic/shared settings:
6041
dnl ---------------------------------------------------------------------------
6043
if test "$wxUSE_PLUGINS" = "yes" ; then
6044
if test "$wxUSE_SHARED" = "no" ; then
6045
AC_MSG_WARN([plugins supported only in shared build, disabling])
6048
if test "$wxUSE_MONOLITHIC" = "yes" ; then
6049
AC_MSG_WARN([plugins not supported monolithic build, disabling])
6052
if test "$wxUSE_DYNLIB_CLASS" = "no" ; then
6053
AC_MSG_WARN([plugins require wxDynamicLibrary, disabling])
6056
if test "$wxUSE_PLUGINS" = "yes" ; then
6057
AC_DEFINE(wxUSE_PLUGINS)
6061
dnl ---------------------------------------------------------------------------
6062
dnl Register non-GUI class options for makefiles and setup.h
6063
dnl ---------------------------------------------------------------------------
6065
if test "$wxUSE_STL" = "yes"; then
6066
AC_DEFINE(wxUSE_STL)
6069
if test "$wxUSE_APPLE_IEEE" = "yes"; then
6070
AC_DEFINE(wxUSE_APPLE_IEEE)
6073
if test "$wxUSE_TIMER" = "yes"; then
6074
AC_DEFINE(wxUSE_TIMER)
6077
dnl Unix implementation needs additional checks because audio support
6078
dnl comes in many favours:
6079
if test "$USE_UNIX" = "1" ; then
6080
dnl mmedia doesn't compile with wxMGL, remove this if this is ever fixed
6081
if test "$wxUSE_MGL" != 1; then
6082
dnl it's not enough to check for just the header because OSS under NetBSD
6083
dnl redefines ioctl as oss_ioctrl inside it and so we also need to test
6084
dnl whether we need -lossaudio at link-time
6085
AC_CACHE_CHECK([for SNDCTL_DSP_SPEED in sys/soundcard.h], ac_cv_header_sys_soundcard, [
6087
#include <sys/ioctl.h>
6088
#include <sys/soundcard.h>
6091
ioctl(0, SNDCTL_DSP_SPEED, 0);
6093
ac_cv_header_sys_soundcard=yes,
6096
LIBS="$saveLibs -lossaudio"
6098
#include <sys/ioctl.h>
6099
#include <sys/soundcard.h>
6102
ioctl(0, SNDCTL_DSP_SPEED, 0);
6104
ac_cv_header_sys_soundcard=yes,
6107
ac_cv_header_sys_soundcard=no
6115
if test "$ac_cv_header_sys_soundcard" = "yes"; then
6116
AC_DEFINE(HAVE_SYS_SOUNDCARD_H)
6118
DISABLED_CONTRIB="$DISABLED_CONTRIB mmedia"
6123
if test "$wxUSE_SOUND" = "yes"; then
6124
if test "$USE_UNIX" = "1" ; then
6125
if test "$wxUSE_LIBSDL" != "no"; then
6126
AM_PATH_SDL([1.2.0],
6128
EXTRALIBS_SDL="$SDL_LIBS"
6129
CFLAGS="$SDL_CFLAGS $CFLAGS"
6130
CXXFLAGS="$SDL_CFLAGS $CXXFLAGS"
6131
AC_DEFINE(wxUSE_LIBSDL)
6133
[wxUSE_LIBSDL="no"])
6134
if test "$wxUSE_LIBSDL" = "yes" -a "$wxUSE_PLUGINS" = "yes" ; then
6139
dnl wxMGL doesn't support sound under DOS, only under Unix
6140
if test "$wxUSE_MGL" = 1; then
6141
AC_MSG_WARN([wxSound not supported in MGL under DOS... disabled])
6147
if test "$wxUSE_SOUND" = "yes"; then
6148
AC_DEFINE(wxUSE_SOUND)
6149
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sound"
6152
if test "$WXGTK20" = 1; then
6153
PKG_PROG_PKG_CONFIG()
6155
if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
6156
if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then
6158
PKG_CHECK_MODULES(LIBGNOMEPRINTUI,
6159
[libgnomeprintui-2.2 >= 2.8],
6161
CFLAGS="$LIBGNOMEPRINTUI_CFLAGS $CFLAGS"
6162
CXXFLAGS="$LIBGNOMEPRINTUI_CFLAGS $CXXFLAGS"
6163
AC_DEFINE(wxUSE_LIBGNOMEPRINT)
6166
AC_MSG_WARN([libgnomeprintui not found, library will use standard PostScript printing])
6167
wxUSE_LIBGNOMEPRINT="no"
6173
if test "$wxUSE_MIMETYPE" = "yes" ; then
6174
if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then
6176
PKG_CHECK_MODULES(GNOMEVFS,
6177
[gnome-vfs-2.0 >= 2.0],
6179
CFLAGS="$GNOMEVFS_CFLAGS $CFLAGS"
6180
CXXFLAGS="$GNOMEVFS_CFLAGS $CXXFLAGS"
6181
AC_DEFINE(wxUSE_LIBGNOMEVFS)
6184
AC_MSG_WARN([libgnomevfs not found, library won't be able to associate MIME type])
6185
wxUSE_LIBGNOMEVFS="no"
6191
if test "$wxUSE_LIBHILDON" = "yes" ; then
6192
PKG_CHECK_MODULES(HILDON,
6193
[hildon-lgpl >= 0.9],
6195
EXTRALIBS_HILDON="$HILDON_LIBS"
6196
CFLAGS="$CFLAGS $HILDON_CFLAGS"
6197
CXXFLAGS="$CXXFLAGS $HILDON_CFLAGS"
6198
AC_DEFINE(wxUSE_LIBHILDON)
6201
AC_MSG_WARN([libhildon_lgpl not found])
6202
wxUSE_LIBHILDON="no"
6208
if test "$wxUSE_CMDLINE_PARSER" = "yes"; then
6209
AC_DEFINE(wxUSE_CMDLINE_PARSER)
6212
if test "$wxUSE_STOPWATCH" = "yes"; then
6213
AC_DEFINE(wxUSE_STOPWATCH)
6216
if test "$wxUSE_DATETIME" = "yes"; then
6217
AC_DEFINE(wxUSE_DATETIME)
6220
if test "$wxUSE_FILE" = "yes"; then
6221
AC_DEFINE(wxUSE_FILE)
6224
if test "$wxUSE_FFILE" = "yes"; then
6225
AC_DEFINE(wxUSE_FFILE)
6228
if test "$wxUSE_ARCHIVE_STREAMS" = "yes"; then
6229
if test "$wxUSE_STREAMS" != yes; then
6230
AC_MSG_WARN(wxArchive requires wxStreams... disabled)
6231
wxUSE_ARCHIVE_STREAMS=no
6233
AC_DEFINE(wxUSE_ARCHIVE_STREAMS)
6237
if test "$wxUSE_ZIPSTREAM" = "yes"; then
6238
if test "$wxUSE_ARCHIVE_STREAMS" != "yes"; then
6239
AC_MSG_WARN(wxZip requires wxArchive... disabled)
6240
elif test "$wxUSE_ZLIB" = "no"; then
6241
AC_MSG_WARN(wxZip requires wxZlib... disabled)
6243
AC_DEFINE(wxUSE_ZIPSTREAM)
6247
if test "$wxUSE_TARSTREAM" = "yes"; then
6248
if test "$wxUSE_ARCHIVE_STREAMS" != "yes"; then
6249
AC_MSG_WARN(wxTar requires wxArchive... disabled)
6251
AC_DEFINE(wxUSE_TARSTREAM)
6255
if test "$wxUSE_FILESYSTEM" = "yes"; then
6256
if test "$wxUSE_STREAMS" != yes -o \( "$wxUSE_FILE" != yes -a "$wxUSE_FFILE" != yes \); then
6257
AC_MSG_WARN(wxFileSystem requires wxStreams and wxFile or wxFFile... disabled)
6260
AC_DEFINE(wxUSE_FILESYSTEM)
6264
if test "$wxUSE_FS_ARCHIVE" = "yes"; then
6265
if test "$wxUSE_FILESYSTEM" != yes -o "$wxUSE_ARCHIVE_STREAMS" != yes; then
6266
AC_MSG_WARN(wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled)
6268
AC_DEFINE(wxUSE_FS_ARCHIVE)
6272
if test "$wxUSE_FS_ZIP" = "yes"; then
6273
if test "$wxUSE_FS_ARCHIVE" != yes; then
6274
AC_MSG_WARN(wxZipFSHandler requires wxArchiveFSHandler... disabled)
6276
AC_DEFINE(wxUSE_FS_ZIP)
6280
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
6281
if test "$USE_UNIX" != 1; then
6282
AC_MSG_WARN([Catching fatal exceptions not currently supported on this system, wxApp::OnFatalException will not be called])
6283
wxUSE_ON_FATAL_EXCEPTION=no
6285
AC_DEFINE(wxUSE_ON_FATAL_EXCEPTION)
6289
if test "$wxUSE_STACKWALKER" = "yes"; then
6290
AC_DEFINE(wxUSE_STACKWALKER)
6293
if test "$wxUSE_DEBUGREPORT" = "yes"; then
6294
if test "$USE_UNIX" != "1" -a "$USE_WIN32" != "1"; then
6295
AC_MSG_WARN([Creating debug reports not currently supported on this system, disabled])
6296
wxUSE_DEBUGREPORT=no
6298
AC_DEFINE(wxUSE_DEBUGREPORT)
6299
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
6300
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS debugrpt"
6305
if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
6306
AC_DEFINE(wxUSE_SNGLINST_CHECKER)
6309
if test "$wxUSE_BUSYINFO" = "yes"; then
6310
AC_DEFINE(wxUSE_BUSYINFO)
6313
if test "$wxUSE_STD_IOSTREAM" = "yes"; then
6314
AC_DEFINE(wxUSE_STD_IOSTREAM)
6317
if test "$wxUSE_STD_STRING" = "yes"; then
6318
AC_DEFINE(wxUSE_STD_STRING)
6321
if test "$wxUSE_STDPATHS" = "yes"; then
6322
AC_DEFINE(wxUSE_STDPATHS)
6325
if test "$wxUSE_TEXTBUFFER" = "yes"; then
6326
AC_DEFINE(wxUSE_TEXTBUFFER)
6329
if test "$wxUSE_TEXTFILE" = "yes"; then
6330
if test "$wxUSE_FILE" != "yes" -o "$wxUSE_TEXTBUFFER" != "yes" ; then
6331
AC_MSG_WARN(wxTextFile requires wxFile and wxTextBuffer... disabled)
6333
AC_DEFINE(wxUSE_TEXTFILE)
6337
if test "$wxUSE_CONFIG" = "yes" ; then
6338
if test "$wxUSE_TEXTFILE" != "yes"; then
6339
AC_MSG_WARN(wxConfig requires wxTextFile... disabled)
6341
AC_DEFINE(wxUSE_CONFIG)
6342
AC_DEFINE(wxUSE_CONFIG_NATIVE)
6343
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS config"
6347
if test "$wxUSE_INTL" = "yes" ; then
6348
if test "$wxUSE_FILE" != "yes"; then
6349
AC_MSG_WARN(I18n code requires wxFile... disabled)
6351
AC_DEFINE(wxUSE_INTL)
6352
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS internat"
6353
GUIDIST="$GUIDIST INTL_DIST"
6357
if test "$wxUSE_LOG" = "yes"; then
6358
AC_DEFINE(wxUSE_LOG)
6360
if test "$wxUSE_LOGGUI" = "yes"; then
6361
AC_DEFINE(wxUSE_LOGGUI)
6364
if test "$wxUSE_LOGWINDOW" = "yes"; then
6365
AC_DEFINE(wxUSE_LOGWINDOW)
6368
if test "$wxUSE_LOGDIALOG" = "yes"; then
6369
AC_DEFINE(wxUSE_LOG_DIALOG)
6372
dnl the keyboard sample requires wxUSE_LOG
6373
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS keyboard"
6376
if test "$wxUSE_LONGLONG" = "yes"; then
6377
AC_DEFINE(wxUSE_LONGLONG)
6380
if test "$wxUSE_GEOMETRY" = "yes"; then
6381
AC_DEFINE(wxUSE_GEOMETRY)
6384
if test "$wxUSE_STREAMS" = "yes" ; then
6385
AC_DEFINE(wxUSE_STREAMS)
6388
if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then
6389
AC_DEFINE(wxUSE_PRINTF_POS_PARAMS)
6392
if test "$wxUSE_OBJC_UNIQUIFYING" = "yes"; then
6393
AC_DEFINE(wxUSE_OBJC_UNIQUIFYING)
6396
if test "$wxUSE_ABI_INCOMPATIBLE_FEATURES" = "yes"; then
6397
AC_DEFINE(wxUSE_ABI_INCOMPATIBLE_FEATURES)
6400
dnl ---------------------------------------------------------------------------
6401
dnl time/date functions
6402
dnl ---------------------------------------------------------------------------
6404
if test "$wxUSE_DATETIME" = "yes"; then
6405
dnl check for strptime and for its declaration as some systems lack it
6406
AC_CHECK_FUNC(strptime)
6407
if test "$ac_cv_func_strptime" = "yes"; then
6408
AC_CACHE_CHECK([for strptime declaration], wx_cv_func_strptime_decl,
6417
strptime("foo", "bar", &t);
6419
wx_cv_func_strptime_decl=yes,
6420
wx_cv_func_strptime_decl=no
6426
if test "$wx_cv_func_strptime_decl" = "yes"; then
6427
AC_DEFINE(HAVE_STRPTIME_DECL)
6429
wx_strptime_decl="extern char *strptime(const char *, const char *, struct tm *);"
6431
if test "$ac_cv_func_strptime" = "yes"; then
6432
dnl strptime() behaviour doesn't conform to POSIX under Mac OS X <
6433
dnl 10.5 and possibly other BSD variants, check that strptime() we
6434
dnl have fails to parse format when the string doesn't match it instea
6435
dnl of just stopping immediately and returning non-NULL
6436
AC_CACHE_CHECK([whether strptime() fails on invalid strings],
6437
wx_cv_func_strptime_ok,
6442
#include "confdefs.h"
6449
return !!strptime("", "%x", &t);
6452
wx_cv_func_strptime_ok=yes,
6453
wx_cv_func_strptime_ok=no,
6454
dnl be pessimistic when cross-compiling
6455
wx_cv_func_strptime_ok=no
6459
if test "$wx_cv_func_strptime_ok" = "yes"; then
6460
AC_DEFINE(HAVE_STRPTIME)
6464
dnl check for timezone variable
6465
dnl doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead
6466
AC_CACHE_CHECK(for timezone variable in <time.h>,
6479
wx_cv_var_timezone=timezone
6491
wx_cv_var_timezone=_timezone
6503
wx_cv_var_timezone=__timezone
6506
if test "$USE_DOS" = 0 ; then
6507
AC_MSG_WARN(no timezone variable, will use tm_gmtoff instead)
6519
dnl as we want $wx_cv_var_timezone to be expanded, use AC_DEFINE_UNQUOTED
6520
if test "x$wx_cv_var_timezone" != x ; then
6521
AC_DEFINE_UNQUOTED(WX_TIMEZONE, $wx_cv_var_timezone)
6524
dnl check for localtime (it's POSIX, but the check can do no harm...)
6525
AC_CHECK_FUNCS(localtime)
6527
if test "$ac_cv_func_localtime" = "yes"; then
6528
AC_CACHE_CHECK(for tm_gmtoff in struct tm,
6529
wx_cv_struct_tm_has_gmtoff,
6540
wx_cv_struct_tm_has_gmtoff=yes
6542
wx_cv_struct_tm_has_gmtoff=no
6547
if test "$wx_cv_struct_tm_has_gmtoff" = "yes"; then
6548
AC_DEFINE(WX_GMTOFF_IN_TM)
6551
dnl check for gettimeofday (SVr4, BSD 4.3) and ftime (V7, BSD 4.3) for the
6552
dnl function to be used for high resolution timers
6553
AC_CHECK_FUNCS(gettimeofday ftime, break)
6555
if test "$ac_cv_func_gettimeofday" = "yes"; then
6556
AC_CACHE_CHECK([whether gettimeofday takes two arguments],
6557
wx_cv_func_gettimeofday_has_2_args,
6559
dnl on some _really_ old systems it takes only 1 argument
6562
#include <sys/time.h>
6567
gettimeofday(&tv, NULL);
6569
wx_cv_func_gettimeofday_has_2_args=yes,
6572
#include <sys/time.h>
6579
wx_cv_func_gettimeofday_has_2_args=no,
6581
AC_MSG_WARN([failed to determine number of gettimeofday() arguments])
6582
wx_cv_func_gettimeofday_has_2_args=unknown
6588
if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then
6589
AC_DEFINE(WX_GETTIMEOFDAY_NO_TZ)
6593
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest"
6596
dnl ------------------------------------------------------------------------
6598
dnl ------------------------------------------------------------------------
6600
dnl VZ: the GUI hooks wxSocket needs are not implemented yet in some toolkits
6601
if test "$wxUSE_SOCKETS" = "yes"; then
6602
if test "$wxUSE_MGL" = "1"; then
6603
AC_MSG_WARN([wxSocket not yet supported under MGL... disabled])
6608
if test "$wxUSE_SOCKETS" = "yes"; then
6609
dnl under MSW we always have sockets
6610
if test "$TOOLKIT" != "MSW"; then
6611
dnl under Solaris and OS/2, socket functions live in -lsocket
6612
AC_CHECK_FUNC(socket,,
6614
AC_CHECK_LIB(socket, socket,
6615
if test "$INET_LINK" != " -lsocket"; then
6616
INET_LINK="$INET_LINK -lsocket"
6619
AC_MSG_WARN([socket library not found - sockets will be disabled])
6628
if test "$wxUSE_SOCKETS" = "yes" ; then
6629
dnl this test may be appropriate if building under cygwin
6630
dnl right now I'm assuming it also uses the winsock stuff
6631
dnl like mingw does.. -- RL
6632
if test "$TOOLKIT" != "MSW"; then
6633
dnl determine the type of third argument for getsockname
6634
dnl This test needs to be done in C++ mode since gsocket.cpp now
6635
dnl is C++ code and pointer cast that are possible even without
6636
dnl warning in C still fail in C++.
6637
AC_CACHE_CHECK([what is the type of the third argument of getsockname],
6638
wx_cv_type_getsockname3,
6643
#include <sys/types.h>
6644
#include <sys/socket.h>
6648
getsockname(0, 0, &len);
6650
wx_cv_type_getsockname3=socklen_t,
6652
dnl the compiler will compile the version with size_t
6653
dnl even if the real type of the last parameter is int
6654
dnl but it should give at least a warning about
6655
dnl converting between incompatible pointer types, so
6656
dnl try to use it to get the correct behaviour at
6657
dnl least with gcc (otherwise we'd always use size_t)
6658
CFLAGS_OLD="$CFLAGS"
6659
if test "$GCC" = yes ; then
6660
CFLAGS="-Werror $CFLAGS"
6665
#include <sys/types.h>
6666
#include <sys/socket.h>
6670
getsockname(0, 0, &len);
6672
wx_cv_type_getsockname3=size_t,
6675
#include <sys/types.h>
6676
#include <sys/socket.h>
6680
getsockname(0, 0, &len);
6682
wx_cv_type_getsockname3=int,
6683
wx_cv_type_getsockname3=unknown
6687
CFLAGS="$CFLAGS_OLD"
6693
if test "$wx_cv_type_getsockname3" = "unknown"; then
6695
AC_MSG_WARN([Couldn't find socklen_t synonym for this system])
6697
AC_DEFINE_UNQUOTED(WX_SOCKLEN_T, $wx_cv_type_getsockname3)
6699
dnl Do this again for getsockopt as it may be different
6700
AC_CACHE_CHECK([what is the type of the fifth argument of getsockopt],
6701
wx_cv_type_getsockopt5,
6706
#include <sys/types.h>
6707
#include <sys/socket.h>
6711
getsockopt(0, 0, 0, 0, &len);
6713
wx_cv_type_getsockopt5=socklen_t,
6715
dnl Note that the rules for compatibility of pointers
6716
dnl are somewhat different between C and C++, so code
6717
dnl that fails in C++ may not even give a warning about
6718
dnl converting between incompatible pointer types in C.
6719
dnl So this test needs to be done in C++ mode.
6723
#include <sys/types.h>
6724
#include <sys/socket.h>
6728
getsockopt(0, 0, 0, 0, &len);
6730
wx_cv_type_getsockopt5=size_t,
6733
#include <sys/types.h>
6734
#include <sys/socket.h>
6738
getsockopt(0, 0, 0, 0, &len);
6740
wx_cv_type_getsockopt5=int,
6741
wx_cv_type_getsockopt5=unknown
6750
if test "$wx_cv_type_getsockopt5" = "unknown"; then
6752
AC_MSG_WARN([Couldn't find socklen_t synonym for this system])
6754
AC_DEFINE_UNQUOTED(SOCKOPTLEN_T, $wx_cv_type_getsockopt5)
6759
if test "$wxUSE_SOCKETS" = "yes" ; then
6760
AC_DEFINE(wxUSE_SOCKETS)
6761
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets"
6764
if test "$wxUSE_PROTOCOL" = "yes"; then
6765
if test "$wxUSE_SOCKETS" != "yes"; then
6766
AC_MSG_WARN(Protocol classes require sockets... disabled)
6771
if test "$wxUSE_PROTOCOL" = "yes"; then
6772
AC_DEFINE(wxUSE_PROTOCOL)
6774
if test "$wxUSE_PROTOCOL_HTTP" = "yes"; then
6775
AC_DEFINE(wxUSE_PROTOCOL_HTTP)
6777
if test "$wxUSE_PROTOCOL_FTP" = "yes"; then
6778
AC_DEFINE(wxUSE_PROTOCOL_FTP)
6780
if test "$wxUSE_PROTOCOL_FILE" = "yes"; then
6781
AC_DEFINE(wxUSE_PROTOCOL_FILE)
6784
if test "$wxUSE_FS_INET" = "yes"; then
6785
AC_MSG_WARN([HTTP filesystem require protocol classes... disabled])
6790
if test "$wxUSE_URL" = "yes"; then
6791
if test "$wxUSE_PROTOCOL" != "yes"; then
6792
AC_MSG_WARN(wxURL class requires wxProtocol... disabled)
6795
if test "$wxUSE_URL" = "yes"; then
6796
AC_DEFINE(wxUSE_URL)
6800
if test "$wxUSE_VARIANT" = "yes"; then
6801
AC_DEFINE(wxUSE_VARIANT)
6804
if test "$wxUSE_FS_INET" = "yes"; then
6805
AC_DEFINE(wxUSE_FS_INET)
6808
dnl ---------------------------------------------------------------------------
6809
dnl Joystick support
6810
dnl ---------------------------------------------------------------------------
6812
if test "$wxUSE_GUI" = "yes" -a "$wxUSE_JOYSTICK" = "yes"; then
6815
dnl under MSW we always have joystick support
6816
if test "$TOOLKIT" = "MSW"; then
6819
dnl mac only available on darwin
6820
elif test "$TOOLKIT" = "MAC" -o "$TOOLKIT" = "COCOA"; then
6821
if test "$USE_DARWIN" = 1; then
6822
dnl check for a bug in the headers, some have bad setEventCallout
6823
AC_MSG_CHECKING([headers have declarations needed for joystick support])
6825
AC_TRY_COMPILE( [ #include <IOKit/hid/IOHIDLib.h> ],
6826
[ IOHIDQueueInterface *qi = NULL;
6827
IOHIDCallbackFunction cb = NULL;
6828
qi->setEventCallout(NULL, cb, NULL, NULL); ],
6829
[ wxUSE_JOYSTICK=yes ]
6832
AC_MSG_RESULT($wxUSE_JOYSTICK)
6835
dnl joystick support is only for Linux 2.1.x or greater
6837
dnl wxJoystick not supported by wxMGL at all
6838
if test "$wxUSE_MGL" != "1"; then
6839
dnl notice the dummy includes argument: without it, AC_CHECK_HEADER
6840
dnl checks only whether the header can be preprocessed, not that it
6841
dnl can be compiled and in Linux 2.6.16 joystick.h is present but
6842
dnl can't be compiled because of an error and with the default
6843
dnl AC_CHECK_HEADER semantics we'd still detect it in this case and
6844
dnl build would fail later
6845
AC_CHECK_HEADERS(linux/joystick.h, [wxUSE_JOYSTICK=yes],, [AC_INCLUDES_DEFAULT()])
6849
if test "$wxUSE_JOYSTICK" = "yes"; then
6850
AC_DEFINE(wxUSE_JOYSTICK)
6851
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest"
6853
AC_MSG_WARN(Joystick not supported by this system... disabled)
6858
dnl ---------------------------------------------------------------------------
6860
dnl ---------------------------------------------------------------------------
6862
if test "$wxUSE_FONTMAP" = "yes" ; then
6863
AC_DEFINE(wxUSE_FONTMAP)
6866
if test "$wxUSE_UNICODE" = "yes" ; then
6867
AC_DEFINE(wxUSE_UNICODE)
6869
if test "$USE_WIN32" != 1; then
6870
wxUSE_UNICODE_MSLU=no
6873
if test "$USE_WIN32" = 1 -a "$wxUSE_UNICODE_MSLU" = "yes"; then
6874
AC_CHECK_LIB(unicows,main,
6876
AC_DEFINE(wxUSE_UNICODE_MSLU)
6879
AC_MSG_WARN([Compiler doesn't support MSLU (libunicows.a), disabled.
6880
Applications will only run on Windows NT/2000/XP!])
6881
wxUSE_UNICODE_MSLU=no
6886
if test "$wxUSE_wxUSE_EXPERIMENTAL_PRINTF" = "yes"; then
6887
AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF)
6890
dnl ----------------------------------------------------------------
6891
dnl Register PostScript options for makefiles and setup.h
6892
dnl ----------------------------------------------------------------
6894
if test "$wxUSE_POSTSCRIPT" = "yes" ; then
6895
AC_DEFINE(wxUSE_POSTSCRIPT)
6898
AC_DEFINE(wxUSE_AFM_FOR_POSTSCRIPT)
6900
AC_DEFINE(wxUSE_NORMALIZED_PS_FONTS)
6902
dnl ---------------------------------------------------------------------------
6903
dnl big GUI components: MDI, doc/view, printing, help, ...
6904
dnl ---------------------------------------------------------------------------
6906
if test "$wxUSE_CONSTRAINTS" = "yes"; then
6907
AC_DEFINE(wxUSE_CONSTRAINTS)
6908
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS layout"
6911
if test "$wxUSE_MDI" = "yes"; then
6912
AC_DEFINE(wxUSE_MDI)
6914
if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then
6915
AC_DEFINE(wxUSE_MDI_ARCHITECTURE)
6916
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mdi"
6920
if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = "yes" ; then
6921
AC_DEFINE(wxUSE_DOC_VIEW_ARCHITECTURE)
6922
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docview"
6923
if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then
6924
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docvwmdi"
6928
if test "$wxUSE_HELP" = "yes"; then
6929
AC_DEFINE(wxUSE_HELP)
6930
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help"
6932
if test "$wxUSE_MSW" = 1; then
6933
if test "$wxUSE_MS_HTML_HELP" = "yes"; then
6934
AC_DEFINE(wxUSE_MS_HTML_HELP)
6938
if test "$wxUSE_WXHTML_HELP" = "yes"; then
6939
if test "$wxUSE_HTML" = "yes"; then
6940
AC_DEFINE(wxUSE_WXHTML_HELP)
6942
AC_MSG_WARN(Cannot use wxHTML-based help without wxHTML so it won't be compiled)
6943
wxUSE_WXHTML_HELP=no
6948
if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
6949
if test "$wxUSE_CONSTRAINTS" != "yes"; then
6950
AC_MSG_WARN(Printing support cannot be used without constraints so it won't be compiled without it)
6952
AC_DEFINE(wxUSE_PRINTING_ARCHITECTURE)
6954
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS printing"
6957
if test "$wxUSE_PROLOGIO" = "yes" -o "$wxUSE_RESOURCES" = "yes"; then
6958
AC_MSG_ERROR([wxExpr and old-style resources are now available in contrib only])
6961
dnl ---------------------------------------------------------------------------
6962
dnl wxMetafile availability
6963
dnl ---------------------------------------------------------------------------
6965
if test "$wxUSE_METAFILE" = "yes"; then
6966
if test "$wxUSE_MSW" != 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_PM" != 1; then
6967
AC_MSG_WARN([wxMetafile is not available on this system... disabled])
6972
dnl ---------------------------------------------------------------------------
6973
dnl IPC: IPC, Drag'n'Drop, Clipboard, ...
6974
dnl ---------------------------------------------------------------------------
6976
dnl check for ole headers and disable a few features requiring it if not
6977
dnl present (earlier versions of mingw32 don't have ole2.h)
6978
if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
6979
-o "$wxUSE_CLIPBOARD" = "yes" \
6980
-o "$wxUSE_OLE" = "yes" \
6981
-o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
6982
AC_CHECK_HEADERS(ole2.h,,, [ ])
6984
if test "$ac_cv_header_ole2_h" = "yes" ; then
6985
if test "$GCC" = yes ; then
6986
AC_MSG_CHECKING([if g++ requires -fvtable-thunks])
6987
AC_TRY_COMPILE([#include <windows.h>
6990
[AC_MSG_RESULT(no)],
6992
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fvtable-thunks"])
6993
LIBS=" -lrpcrt4 -loleaut32 -lole32 -luuid$LIBS"
6994
if test "$wxUSE_OLE" = "yes" ; then
6995
AC_DEFINE(wxUSE_OLE)
6996
AC_DEFINE(wxUSE_OLE_AUTOMATION)
6997
AC_DEFINE(wxUSE_ACTIVEX)
6998
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto"
7002
dnl for OLE clipboard and dnd
7003
if test "$wxUSE_DATAOBJ" = "yes" ; then
7004
AC_DEFINE(wxUSE_DATAOBJ)
7007
AC_MSG_WARN([Some features disabled because OLE headers not found])
7010
wxUSE_DRAG_AND_DROP=no
7015
if test "$wxUSE_METAFILE" = "yes"; then
7016
AC_DEFINE(wxUSE_METAFILE)
7018
dnl this one should probably be made separately configurable
7019
AC_DEFINE(wxUSE_ENH_METAFILE)
7023
if test "$wxUSE_IPC" = "yes"; then
7024
if test "$wxUSE_SOCKETS" != "yes" -a "$USE_WIN32" != 1; then
7025
AC_MSG_WARN(wxWidgets IPC classes require sockets... disabled)
7029
if test "$wxUSE_IPC" = "yes"; then
7030
AC_DEFINE(wxUSE_IPC)
7031
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ipc"
7035
if test "$wxUSE_DATAOBJ" = "yes"; then
7036
if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then
7037
AC_MSG_WARN([wxDataObject not yet supported under $TOOLKIT... disabled])
7040
AC_DEFINE(wxUSE_DATAOBJ)
7043
AC_MSG_WARN([Clipboard and drag-and-drop require wxDataObject -- disabled])
7045
wxUSE_DRAG_AND_DROP=no
7048
if test "$wxUSE_CLIPBOARD" = "yes"; then
7049
if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then
7050
AC_MSG_WARN([Clipboard not yet supported under $TOOLKIT... disabled])
7054
if test "$wxUSE_CLIPBOARD" = "yes"; then
7055
AC_DEFINE(wxUSE_CLIPBOARD)
7059
if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
7060
if test "$wxUSE_GTK" = 1; then
7061
if test "$WXGTK12" != 1; then
7062
AC_MSG_WARN([Drag and drop is only supported under GTK+ 1.2... disabled])
7063
wxUSE_DRAG_AND_DROP=no
7067
if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1 -o "$wxUSE_MGL" = 1 -o \
7068
"$wxUSE_DFB" = 1; then
7069
AC_MSG_WARN([Drag and drop not yet supported under $TOOLKIT... disabled])
7070
wxUSE_DRAG_AND_DROP=no
7073
if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
7074
AC_DEFINE(wxUSE_DRAG_AND_DROP)
7079
if test "$wxUSE_DRAG_AND_DROP" = "yes" -o "$wxUSE_CLIPBOARD" = "yes"; then
7080
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd"
7083
if test "$wxUSE_SPLINES" = "yes" ; then
7084
AC_DEFINE(wxUSE_SPLINES)
7087
if test "$wxUSE_MOUSEWHEEL" = "yes" ; then
7088
AC_DEFINE(wxUSE_MOUSEWHEEL)
7091
dnl ---------------------------------------------------------------------------
7093
dnl ---------------------------------------------------------------------------
7096
if test "$wxUSE_CONTROLS" = "yes"; then
7100
if test "$wxUSE_ACCEL" = "yes"; then
7101
AC_DEFINE(wxUSE_ACCEL)
7105
if test "$wxUSE_ANIMATIONCTRL" = "yes"; then
7106
AC_DEFINE(wxUSE_ANIMATIONCTRL)
7108
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS animate"
7111
if test "$wxUSE_BUTTON" = "yes"; then
7112
AC_DEFINE(wxUSE_BUTTON)
7116
if test "$wxUSE_BMPBUTTON" = "yes"; then
7117
AC_DEFINE(wxUSE_BMPBUTTON)
7121
if test "$wxUSE_CALCTRL" = "yes"; then
7122
AC_DEFINE(wxUSE_CALENDARCTRL)
7124
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS calendar"
7127
if test "$wxUSE_CARET" = "yes"; then
7128
AC_DEFINE(wxUSE_CARET)
7130
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret"
7133
if test "$wxUSE_COLLPANE" = "yes"; then
7134
AC_DEFINE(wxUSE_COLLPANE)
7136
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS collpane"
7139
if test "$wxUSE_COMBOBOX" = "yes"; then
7140
AC_DEFINE(wxUSE_COMBOBOX)
7144
if test "$wxUSE_COMBOCTRL" = "yes"; then
7145
AC_DEFINE(wxUSE_COMBOCTRL)
7149
if test "$wxUSE_CHOICE" = "yes"; then
7150
AC_DEFINE(wxUSE_CHOICE)
7154
if test "$wxUSE_CHOICEBOOK" = "yes"; then
7155
AC_DEFINE(wxUSE_CHOICEBOOK)
7159
if test "$wxUSE_CHECKBOX" = "yes"; then
7160
AC_DEFINE(wxUSE_CHECKBOX)
7164
if test "$wxUSE_CHECKLST" = "yes"; then
7165
AC_DEFINE(wxUSE_CHECKLISTBOX)
7167
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst"
7170
if test "$wxUSE_COLOURPICKERCTRL" = "yes"; then
7171
AC_DEFINE(wxUSE_COLOURPICKERCTRL)
7175
if test "$wxUSE_DATEPICKCTRL" = "yes"; then
7176
AC_DEFINE(wxUSE_DATEPICKCTRL)
7180
if test "$wxUSE_DIRPICKERCTRL" = "yes"; then
7181
AC_DEFINE(wxUSE_DIRPICKERCTRL)
7185
if test "$wxUSE_FILEPICKERCTRL" = "yes"; then
7186
AC_DEFINE(wxUSE_FILEPICKERCTRL)
7190
if test "$wxUSE_FONTPICKERCTRL" = "yes"; then
7191
AC_DEFINE(wxUSE_FONTPICKERCTRL)
7195
if test "$wxUSE_DISPLAY" = "yes"; then
7196
if test "$wxUSE_DFB" = 1 -o "$wxUSE_MGL" = 1; then
7197
AC_MSG_WARN([wxDisplay not yet supported under $TOOLKIT... disabled])
7200
AC_DEFINE(wxUSE_DISPLAY)
7201
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS display multimon"
7205
if test "$wxUSE_DETECT_SM" = "yes"; then
7206
AC_DEFINE(wxUSE_DETECT_SM)
7209
if test "$wxUSE_GAUGE" = "yes"; then
7210
AC_DEFINE(wxUSE_GAUGE)
7214
if test "$wxUSE_GRID" = "yes"; then
7215
AC_DEFINE(wxUSE_GRID)
7217
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS grid"
7220
if test "$wxUSE_HYPERLINKCTRL" = "yes"; then
7221
AC_DEFINE(wxUSE_HYPERLINKCTRL)
7225
if test "$wxUSE_BITMAPCOMBOBOX" = "yes"; then
7226
AC_DEFINE(wxUSE_BITMAPCOMBOBOX)
7230
if test "$wxUSE_DATAVIEWCTRL" = "yes"; then
7231
AC_DEFINE(wxUSE_DATAVIEWCTRL)
7233
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dataview"
7236
if test "$wxUSE_IMAGLIST" = "yes"; then
7237
AC_DEFINE(wxUSE_IMAGLIST)
7240
if test "$wxUSE_LISTBOOK" = "yes"; then
7241
AC_DEFINE(wxUSE_LISTBOOK)
7245
if test "$wxUSE_LISTBOX" = "yes"; then
7246
AC_DEFINE(wxUSE_LISTBOX)
7248
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listbox"
7251
if test "$wxUSE_LISTCTRL" = "yes"; then
7252
if test "$wxUSE_IMAGLIST" = "yes"; then
7253
AC_DEFINE(wxUSE_LISTCTRL)
7255
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listctrl"
7257
AC_MSG_WARN([wxListCtrl requires wxImageList and won't be compiled without it])
7261
if test "$wxUSE_NOTEBOOK" = "yes"; then
7262
AC_DEFINE(wxUSE_NOTEBOOK)
7264
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
7267
if test "$wxUSE_ODCOMBOBOX" = "yes"; then
7268
AC_DEFINE(wxUSE_ODCOMBOBOX)
7270
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS combo"
7273
dnl if test "$wxUSE_PROPSHEET" = "yes"; then
7274
dnl AC_DEFINE(wxUSE_PROPSHEET)
7276
dnl SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS proplist"
7279
if test "$wxUSE_RADIOBOX" = "yes"; then
7280
AC_DEFINE(wxUSE_RADIOBOX)
7284
if test "$wxUSE_RADIOBTN" = "yes"; then
7285
AC_DEFINE(wxUSE_RADIOBTN)
7289
if test "$wxUSE_SASH" = "yes"; then
7290
AC_DEFINE(wxUSE_SASH)
7291
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sashtest"
7294
if test "$wxUSE_SCROLLBAR" = "yes"; then
7295
AC_DEFINE(wxUSE_SCROLLBAR)
7297
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS scroll scrollsub"
7300
if test "$wxUSE_SEARCHCTRL" = "yes"; then
7301
AC_DEFINE(wxUSE_SEARCHCTRL)
7305
if test "$wxUSE_SLIDER" = "yes"; then
7306
AC_DEFINE(wxUSE_SLIDER)
7310
if test "$wxUSE_SPINBTN" = "yes"; then
7311
AC_DEFINE(wxUSE_SPINBTN)
7315
if test "$wxUSE_SPINCTRL" = "yes"; then
7316
AC_DEFINE(wxUSE_SPINCTRL)
7320
if test "$wxUSE_SPLITTER" = "yes"; then
7321
AC_DEFINE(wxUSE_SPLITTER)
7322
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splitter"
7325
if test "$wxUSE_STATBMP" = "yes"; then
7326
AC_DEFINE(wxUSE_STATBMP)
7330
if test "$wxUSE_STATBOX" = "yes"; then
7331
AC_DEFINE(wxUSE_STATBOX)
7335
if test "$wxUSE_STATTEXT" = "yes"; then
7336
AC_DEFINE(wxUSE_STATTEXT)
7340
if test "$wxUSE_STATLINE" = "yes"; then
7341
AC_DEFINE(wxUSE_STATLINE)
7345
if test "$wxUSE_STATUSBAR" = "yes"; then
7346
dnl this will get undefined in wx/chkconf.h if it's not supported
7347
AC_DEFINE(wxUSE_NATIVE_STATUSBAR)
7348
AC_DEFINE(wxUSE_STATUSBAR)
7351
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar"
7354
if test "$wxUSE_TAB_DIALOG" = "yes"; then
7355
AC_DEFINE(wxUSE_TAB_DIALOG)
7358
if test "$wxUSE_TEXTCTRL" = "yes"; then
7359
AC_DEFINE(wxUSE_TEXTCTRL)
7361
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS text"
7363
dnl we don't have special switches to disable wxUSE_RICHEDIT[2], it doesn't
7364
dnl seem useful to allow disabling them
7365
AC_DEFINE(wxUSE_RICHEDIT)
7366
AC_DEFINE(wxUSE_RICHEDIT2)
7369
if test "$wxUSE_TOGGLEBTN" = "yes"; then
7370
if test "$wxUSE_COCOA" = 1 ; then
7371
AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled])
7375
if test "$wxUSE_TOGGLEBTN" = "yes"; then
7376
AC_DEFINE(wxUSE_TOGGLEBTN)
7381
if test "$wxUSE_TOOLBAR" = "yes"; then
7382
AC_DEFINE(wxUSE_TOOLBAR)
7385
if test "$wxUSE_UNIVERSAL" = "yes"; then
7386
wxUSE_TOOLBAR_NATIVE="no"
7388
wxUSE_TOOLBAR_NATIVE="yes"
7389
AC_DEFINE(wxUSE_TOOLBAR_NATIVE)
7392
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS toolbar"
7395
if test "$wxUSE_TOOLTIPS" = "yes"; then
7396
if test "$wxUSE_MOTIF" = 1; then
7397
AC_MSG_WARN([wxTooltip not supported yet under Motif... disabled])
7399
if test "$wxUSE_UNIVERSAL" = "yes"; then
7400
AC_MSG_WARN([wxTooltip not supported yet in wxUniversal... disabled])
7402
AC_DEFINE(wxUSE_TOOLTIPS)
7407
if test "$wxUSE_TREEBOOK" = "yes"; then
7408
AC_DEFINE(wxUSE_TREEBOOK)
7412
if test "$wxUSE_TOOLBOOK" = "yes"; then
7413
AC_DEFINE(wxUSE_TOOLBOOK)
7417
if test "$wxUSE_TREECTRL" = "yes"; then
7418
if test "$wxUSE_IMAGLIST" = "yes"; then
7419
AC_DEFINE(wxUSE_TREECTRL)
7421
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treectrl"
7423
AC_MSG_WARN([wxTreeCtrl requires wxImageList and won't be compiled without it])
7427
if test "$wxUSE_POPUPWIN" = "yes"; then
7428
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_PM" = 1 \
7429
-o "$wxUSE_DFB" = 1; then
7430
AC_MSG_WARN([Popup window not yet supported on this platform... disabled])
7432
AC_DEFINE(wxUSE_POPUPWIN)
7433
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS popup"
7439
if test "$wxUSE_DIALUP_MANAGER" = "yes"; then
7440
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_MGL" = 1; then
7441
AC_MSG_WARN([Dialup manager not supported on this platform... disabled])
7443
AC_DEFINE(wxUSE_DIALUP_MANAGER)
7444
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dialup"
7448
if test "$wxUSE_TIPWINDOW" = "yes"; then
7449
if test "$wxUSE_PM" = 1; then
7450
AC_MSG_WARN([wxTipWindow not yet supported under PM... disabled])
7452
AC_DEFINE(wxUSE_TIPWINDOW)
7456
if test "$USES_CONTROLS" = 1; then
7457
AC_DEFINE(wxUSE_CONTROLS)
7460
dnl ---------------------------------------------------------------------------
7462
dnl ---------------------------------------------------------------------------
7464
dnl please keep the settings below in alphabetical order
7465
if test "$wxUSE_ACCESSIBILITY" = "yes"; then
7466
AC_DEFINE(wxUSE_ACCESSIBILITY)
7467
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS access"
7470
if test "$wxUSE_DC_CACHEING" = "yes"; then
7471
AC_DEFINE(wxUSE_DC_CACHEING)
7474
if test "$wxUSE_DRAGIMAGE" = "yes"; then
7475
AC_DEFINE(wxUSE_DRAGIMAGE)
7476
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dragimag"
7479
if test "$wxUSE_EXCEPTIONS" = "yes"; then
7480
if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then
7481
AC_MSG_WARN([--enable-exceptions can't be used with --enable-no_exceptions])
7483
AC_DEFINE(wxUSE_EXCEPTIONS)
7484
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS except"
7489
if test "$wxUSE_HTML" = "yes"; then
7490
AC_DEFINE(wxUSE_HTML)
7492
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox"
7493
if test "$wxUSE_MAC" = 1; then
7494
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/htmlctrl"
7497
if test "$wxUSE_WEBKIT" = "yes"; then
7498
if test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then
7499
old_CPPFLAGS="$CPPFLAGS"
7500
CPPFLAGS="-x objective-c++ $CPPFLAGS"
7501
AC_CHECK_HEADER([WebKit/HIWebView.h],
7503
AC_DEFINE(wxUSE_WEBKIT)
7504
WEBKIT_LINK="-framework WebKit"
7507
AC_MSG_WARN([WebKit headers not found; disabling wxWebKit])
7511
#include <Carbon/Carbon.h>
7512
#include <WebKit/WebKit.h>
7514
CPPFLAGS="$old_CPPFLAGS"
7515
elif test "$wxUSE_COCOA" = 1; then
7516
AC_DEFINE(wxUSE_WEBKIT)
7523
if test "$wxUSE_XRC" = "yes"; then
7524
if test "$wxUSE_XML" != "yes"; then
7525
AC_MSG_WARN([XML library not built, XRC resources disabled])
7528
AC_DEFINE(wxUSE_XRC)
7530
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS xrc"
7535
if test "$wxUSE_AUI" = "yes"; then
7536
AC_DEFINE(wxUSE_AUI)
7538
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS aui"
7541
if test "$wxUSE_MENUS" = "yes"; then
7542
AC_DEFINE(wxUSE_MENUS)
7543
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS menu"
7546
if test "$wxUSE_METAFILE" = "yes"; then
7547
AC_DEFINE(wxUSE_METAFILE)
7550
if test "$wxUSE_MIMETYPE" = "yes"; then
7551
AC_DEFINE(wxUSE_MIMETYPE)
7554
if test "$wxUSE_MINIFRAME" = "yes"; then
7555
AC_DEFINE(wxUSE_MINIFRAME)
7556
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS minifram"
7559
if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then
7560
AC_DEFINE(wxUSE_SYSTEM_OPTIONS)
7563
if test "$wxUSE_VALIDATORS" = "yes"; then
7564
AC_DEFINE(wxUSE_VALIDATORS)
7565
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate"
7568
if test "$wxUSE_PALETTE" = "yes" ; then
7569
if test "$wxUSE_DFB" = 1; then
7570
AC_MSG_WARN([wxPalette not yet supported under DFB... disabled])
7573
AC_DEFINE(wxUSE_PALETTE)
7577
if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_MSLU" = "yes" ; then
7578
dnl Must be done this late because -lunicows must be before all the other libs
7579
LIBS=" -lunicows $LIBS"
7583
if test "$wxUSE_RICHTEXT" = "yes"; then
7584
AC_DEFINE(wxUSE_RICHTEXT)
7586
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS richtext"
7589
dnl ---------------------------------------------------------------------------
7591
dnl ---------------------------------------------------------------------------
7593
if test "$wxUSE_IMAGE" = "yes" ; then
7594
AC_DEFINE(wxUSE_IMAGE)
7596
if test "$wxUSE_GIF" = "yes" ; then
7597
AC_DEFINE(wxUSE_GIF)
7600
if test "$wxUSE_PCX" = "yes" ; then
7601
AC_DEFINE(wxUSE_PCX)
7604
if test "$wxUSE_TGA" = "yes" ; then
7605
AC_DEFINE(wxUSE_TGA)
7608
if test "$wxUSE_IFF" = "yes" ; then
7609
AC_DEFINE(wxUSE_IFF)
7612
if test "$wxUSE_PNM" = "yes" ; then
7613
AC_DEFINE(wxUSE_PNM)
7616
if test "$wxUSE_XPM" = "yes" ; then
7617
AC_DEFINE(wxUSE_XPM)
7620
if test "$wxUSE_ICO_CUR" = "yes" ; then
7621
AC_DEFINE(wxUSE_ICO_CUR)
7625
dnl ---------------------------------------------------------------------------
7627
dnl ---------------------------------------------------------------------------
7629
if test "$wxUSE_ABOUTDLG" = "yes"; then
7630
AC_DEFINE(wxUSE_ABOUTDLG)
7633
if test "$wxUSE_CHOICEDLG" = "yes"; then
7634
AC_DEFINE(wxUSE_CHOICEDLG)
7637
if test "$wxUSE_COLOURDLG" = "yes"; then
7638
AC_DEFINE(wxUSE_COLOURDLG)
7641
if test "$wxUSE_FILEDLG" = "yes"; then
7642
AC_DEFINE(wxUSE_FILEDLG)
7645
if test "$wxUSE_FINDREPLDLG" = "yes"; then
7646
AC_DEFINE(wxUSE_FINDREPLDLG)
7649
if test "$wxUSE_FONTDLG" = "yes"; then
7650
AC_DEFINE(wxUSE_FONTDLG)
7653
if test "$wxUSE_DIRDLG" = "yes"; then
7654
if test "$wxUSE_TREECTRL" != "yes"; then
7655
AC_MSG_WARN(wxDirDialog requires wxTreeCtrl so it won't be compiled without it)
7657
AC_DEFINE(wxUSE_DIRDLG)
7661
if test "$wxUSE_MSGDLG" = "yes"; then
7662
AC_DEFINE(wxUSE_MSGDLG)
7665
if test "$wxUSE_NUMBERDLG" = "yes"; then
7666
AC_DEFINE(wxUSE_NUMBERDLG)
7669
if test "$wxUSE_PROGRESSDLG" = "yes"; then
7670
if test "$wxUSE_CONSTRAINTS" != "yes"; then
7671
AC_MSG_WARN(wxProgressDialog requires constraints so it won't be compiled without them)
7673
AC_DEFINE(wxUSE_PROGRESSDLG)
7677
if test "$wxUSE_SPLASH" = "yes"; then
7678
AC_DEFINE(wxUSE_SPLASH)
7679
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splash"
7682
if test "$wxUSE_STARTUP_TIPS" = "yes"; then
7683
if test "$wxUSE_CONSTRAINTS" != "yes"; then
7684
AC_MSG_WARN(Startup tips requires constraints and won't be compiled without them)
7686
AC_DEFINE(wxUSE_STARTUP_TIPS)
7690
if test "$wxUSE_TEXTDLG" = "yes"; then
7691
AC_DEFINE(wxUSE_TEXTDLG)
7694
if test "$wxUSE_WIZARDDLG" = "yes"; then
7695
AC_DEFINE(wxUSE_WIZARDDLG)
7696
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wizard"
7699
dnl ---------------------------------------------------------------------------
7700
dnl wxGraphicsContext
7701
dnl ---------------------------------------------------------------------------
7703
if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then
7704
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = "1"; then
7705
AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
7706
elif test "$wxUSE_GTK" != 1; then
7707
dnl for other builds we'll just wing it for now...
7708
AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
7710
dnl ...but let's check for cairo availability for wxGTK builds
7711
PKG_CHECK_MODULES(CAIRO, cairo,
7712
[AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)],
7713
[AC_MSG_WARN([Cairo library not found, unable to set wxUSE_GRAPHICS_CONTEXT])]
7718
dnl ---------------------------------------------------------------------------
7720
dnl ---------------------------------------------------------------------------
7724
if test "$wxUSE_MEDIACTRL" = "yes"; then
7727
dnl -----------------------------------------------------------------------
7729
dnl -----------------------------------------------------------------------
7730
if test "$wxUSE_GTK" = 1; then
7731
wxUSE_GSTREAMER="no"
7733
dnl -------------------------------------------------------------------
7734
dnl Test for at least 0.8 gstreamer module from pkg-config
7735
dnl Even totem doesn't accept 0.9 evidently.
7737
dnl So, we first check to see if 0.10 if available - if not we
7738
dnl try the older 0.8 version
7739
dnl -------------------------------------------------------------------
7741
GST_VERSION_MINOR=10
7742
GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR
7744
if test "$wxUSE_GSTREAMER8" = "no"; then
7745
PKG_CHECK_MODULES(GST,
7746
[gstreamer-$GST_VERSION gstreamer-plugins-base-$GST_VERSION gconf-2.0],
7748
wxUSE_GSTREAMER="yes"
7749
GST_LIBS="$GST_LIBS -lgstinterfaces-$GST_VERSION"
7752
AC_MSG_WARN([GStreamer 0.10 not available, falling back to 0.8])
7757
dnl check only for 0.8
7761
if test $GST_VERSION_MINOR = "8"; then
7762
GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR
7763
PKG_CHECK_MODULES(GST,
7764
[gstreamer-$GST_VERSION gstreamer-interfaces-$GST_VERSION gstreamer-gconf-$GST_VERSION],
7765
wxUSE_GSTREAMER="yes",
7767
AC_MSG_WARN([GStreamer 0.8/0.10 not available.])
7772
if test "$wxUSE_GSTREAMER" = "yes"; then
7773
dnl system gstreamer package is compiled with Sun CC and outputs
7774
dnl CC-specific "-mt" in its flags, remove it for gcc compilation
7777
if test "$GCC" = yes; then
7778
GST_CFLAGS=`echo $GST_CFLAGS | sed 's/-mt//'`
7779
GST_LIBS=`echo $GST_LIBS | sed 's/-mt//'`
7783
CPPFLAGS="$GST_CFLAGS $CPPFLAGS"
7784
EXTRALIBS_MEDIA="$GST_LIBS"
7786
AC_DEFINE(wxUSE_GSTREAMER)
7792
if test $USE_MEDIA = 1; then
7793
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer"
7794
AC_DEFINE(wxUSE_MEDIACTRL)
7798
dnl ---------------------------------------------------------------------------
7799
dnl get the string with OS info - used by wxGetOsDescription() on MacOS X
7800
dnl ---------------------------------------------------------------------------
7802
if test "$cross_compiling" = "yes"; then
7803
dnl Use best guess from host as we can't use uname when cross compiling
7806
dnl attualy work out OS version
7807
OSINFO=`uname -s -r -m`
7808
OSINFO="\"$OSINFO\""
7811
AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO)
7813
dnl ---------------------------------------------------------------------------
7814
dnl define the variable containing the installation prefix (used in dcpsg.cpp)
7815
dnl ---------------------------------------------------------------------------
7817
if test "x$prefix" != "xNONE"; then
7820
wxPREFIX=$ac_default_prefix
7823
AC_DEFINE_UNQUOTED(wxINSTALL_PREFIX, "$wxPREFIX")
7826
dnl ---------------------------------------------------------------------------
7827
dnl define variables with all built libraries for wx-config
7828
dnl ---------------------------------------------------------------------------
7830
CORE_BASE_LIBS="net base"
7831
CORE_GUI_LIBS="adv core"
7833
if test "$wxUSE_XML" = "yes" ; then
7834
CORE_BASE_LIBS="xml $CORE_BASE_LIBS"
7836
if test "$wxUSE_ODBC" != "no" ; then
7837
CORE_BASE_LIBS="odbc $CORE_BASE_LIBS"
7838
CORE_GUI_LIBS="dbgrid $CORE_GUI_LIBS"
7840
if test "$wxUSE_HTML" = "yes" ; then
7841
CORE_GUI_LIBS="html $CORE_GUI_LIBS"
7843
if test "$wxUSE_DEBUGREPORT" = "yes" ; then
7844
CORE_GUI_LIBS="qa $CORE_GUI_LIBS"
7846
if test "$wxUSE_XRC" = "yes" ; then
7847
CORE_GUI_LIBS="xrc $CORE_GUI_LIBS"
7849
if test "$wxUSE_AUI" = "yes" ; then
7850
CORE_GUI_LIBS="aui $CORE_GUI_LIBS"
7852
if test "$wxUSE_RICHTEXT" = "yes" ; then
7853
CORE_GUI_LIBS="richtext $CORE_GUI_LIBS"
7856
if test "$wxUSE_GUI" != "yes"; then
7860
AC_SUBST(CORE_BASE_LIBS)
7861
AC_SUBST(CORE_GUI_LIBS)
7863
dnl ---------------------------------------------------------------------------
7864
dnl Output the makefiles and such from the results found above
7865
dnl ---------------------------------------------------------------------------
7867
dnl all additional libraries (except wxWidgets itself) we link with
7869
if test "$wxUSE_MAC" = 1 ; then
7870
if test "$wxUSE_SOUND" = "yes" || test "$wxUSE_MEDIACTRL" = "yes"; then
7871
if test "$USE_DARWIN" != 1; then
7872
LDFLAGS="$LDFLAGS -lQuickTimeLib"
7875
if test "$USE_DARWIN" = 1; then
7876
LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime -framework OpenGL -framework AGL"
7878
LDFLAGS="$LDFLAGS -lCarbonLib"
7881
if test "$wxUSE_COCOA" = 1 ; then
7882
LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa"
7883
if test "$wxUSE_MEDIACTRL" = "yes"; then
7884
LDFLAGS="$LDFLAGS -framework QuickTime"
7887
if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1 ; then
7888
LDFLAGS="$LDFLAGS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
7891
LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS"
7893
if test "$wxUSE_GUI" = "yes"; then
7895
dnl TODO add checks that these samples will really compile (i.e. all the
7896
dnl library features they need are present)
7898
dnl TODO some samples are never built so far: mfc (requires VC++)
7899
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs drawing \
7900
dynamic erase event exec font image minimal mobile \
7901
mobile/wxedit mobile/styles propsize render \
7902
rotate shaped taskbar vscroll widgets"
7904
if test "$wxUSE_MONOLITHIC" != "yes"; then
7905
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS console"
7907
if test "$TOOLKIT" = "MSW"; then
7908
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS regtest"
7909
if test "$wxUSE_UNIVERSAL" != "yes"; then
7910
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ownerdrw nativdlg"
7913
if test "$TOOLKIT" = "PM" -a "$wxUSE_UNIVERSAL" != "yes"; then
7914
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ownerdrw"
7917
SAMPLES_SUBDIRS="console"
7921
dnl C/C++ compiler options used to compile wxWidgets
7923
dnl check for icc before gcc as icc is also recognized as gcc
7924
if test "x$INTELCC" = "xyes" ; then
7925
dnl Warnings which can't be easily suppressed in C code are disabled:
7927
dnl remark #810: conversion from "x" to "y" may lose significant bits
7928
dnl remark #869: parameter "foo" was never referenced
7929
dnl remark #1572: floating-point equality and inequality comparisons
7931
dnl remark #1684: conversion from pointer to same-sized integral type
7933
dnl (for others see below)
7934
CWARNINGS="-Wall -wd810,869,981,1418,1572,1684"
7935
elif test "$GCC" = yes ; then
7936
CWARNINGS="-Wall -Wundef"
7939
if test "x$INTELCXX" = "xyes" ; then
7940
dnl Intel compiler gives some warnings which simply can't be worked
7941
dnl around or of which we have too many (810, 869) so it's impractical to
7942
dnl keep them enabled even if in theory it would be nice and some others
7943
dnl (279) are generated for standard macros and so there is nothing we can
7946
dnl remark #279: controlling expression is constant
7947
dnl remark #383: value copied to temporary, reference to temporary used
7948
dnl remark #444: destructor for base class "xxx" is not virtual
7949
dnl remark #810: conversion from "x" to "y" may lose significant bits
7950
dnl remark #869: parameter "foo" was never referenced
7951
dnl remark #981: operands are evaluated in unspecified order
7952
dnl remark #1418: external definition with no prior declaration
7953
dnl remark #1419: external declaration in primary source file
7954
CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419"
7955
elif test "$GXX" = yes ; then
7956
dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror"
7957
CXXWARNINGS="-Wall -Wundef -Wno-ctor-dtor-privacy"
7961
dnl combine everything together and remove the extra white space while doing it
7962
WXCONFIG_CFLAGS=`echo $WXCONFIG_CFLAGS`
7963
WXCONFIG_CXXFLAGS=`echo $WXCONFIG_CFLAGS $WXCONFIG_CXXFLAGS`
7966
dnl add -I options we use during library compilation
7968
dnl note that the order is somewhat important: wxWidgets headers should
7969
dnl come first and the one with setup.h should be before $(top_srcdir)/include
7970
dnl in case the latter contains setup.h used by non-autoconf makefiles (e.g.
7972
CPPFLAGS=`echo $WXCONFIG_CPPFLAGS \
7973
-I\\${wx_top_builddir}/lib/wx/include/${TOOLCHAIN_FULLNAME} \
7974
-I\\${top_srcdir}/include $TOOLKIT_INCLUDE \
7977
C_AND_CXX_FLAGS="$DEBUG_CFLAGS $PROFILE_FLAGS $OPTIMISE_CFLAGS"
7978
CFLAGS=`echo $WXCONFIG_CFLAGS $CWARNINGS $C_AND_CXX_FLAGS $CFLAGS `
7979
CXXFLAGS=`echo $WXCONFIG_CXXFLAGS $CXXWARNINGS $C_AND_CXX_FLAGS $CXXFLAGS `
7980
OBJCFLAGS=`echo $WXCONFIG_CFLAGS $CWARNINGS $C_AND_CXX_FLAGS $OBJCFLAGS `
7981
OBJCXXFLAGS=`echo $WXCONFIG_CXXFLAGS $CXXWARNINGS $C_AND_CXX_FLAGS $OBJCXXFLAGS `
7983
dnl now that we added WXCONFIG_CPPFLAGS to CPPFLAGS we can add the wx-config
7984
dnl only stuff to it
7985
WXCONFIG_CPPFLAGS=`echo $WXCONFIG_CPPFLAGS $WXCONFIG_ONLY_CPPFLAGS`
7988
if test "x$MWCC" = "xyes"; then
7989
dnl Correct MW 8.3 to be more similar to GCC. In particular we
7990
dnl must use <regex.h> from system not our local copy on OS X,
7991
dnl but must use local not system on OS 9.
7992
dnl The following should make all -I paths usable for <> includes
7993
dnl while first checking in real system paths. With 8.3 using
7994
dnl -gccincludes it will actually check local paths before system
7995
dnl even for <> which is totally wrong.
7997
dnl Note that because this absolutely needs to be before any -I
7998
dnl that we have to tack it on to the end of the compiler commandline.
7999
CC="$CC -cwd source -I-"
8000
CXX="$CXX -cwd source -I-"
8005
EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
8006
EXTRALIBS_XML="$EXPAT_LINK"
8007
EXTRALIBS_HTML="$MSPACK_LINK"
8008
EXTRALIBS_MEDIA="$GST_LIBS"
8009
EXTRALIBS_ODBC="$ODBC_LINK"
8010
if test "$wxUSE_GUI" = "yes"; then
8011
EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $WEBKIT_LINK $EXTRALIBS_HILDON $EXTRALIBS_GNOMEVFS $EXTRALIBS_GNOMEPRINT`
8013
if test "$wxUSE_OPENGL" = "yes"; then
8014
EXTRALIBS_OPENGL="$LDFLAGS_GL $OPENGL_LIBS"
8017
LDFLAGS="$LDFLAGS $PROFILE_FLAGS"
8019
WXCONFIG_LIBS="$LIBS"
8021
dnl wx-config must output builtin 3rd party libs in --libs in static build:
8022
if test "$wxUSE_REGEX" = "builtin" ; then
8023
wxconfig_3rdparty="regex${lib_unicode_suffix} $wxconfig_3rdparty"
8025
if test "$wxUSE_EXPAT" = "builtin" ; then
8026
wxconfig_3rdparty="expat $wxconfig_3rdparty"
8028
if test "$wxUSE_ODBC" = "builtin" ; then
8029
wxconfig_3rdparty="odbc $wxconfig_3rdparty"
8031
if test "$wxUSE_LIBTIFF" = "builtin" ; then
8032
wxconfig_3rdparty="tiff $wxconfig_3rdparty"
8034
if test "$wxUSE_LIBJPEG" = "builtin" ; then
8035
wxconfig_3rdparty="jpeg $wxconfig_3rdparty"
8037
if test "$wxUSE_LIBPNG" = "builtin" ; then
8038
wxconfig_3rdparty="png $wxconfig_3rdparty"
8040
if test "$wxUSE_ZLIB" = "builtin" ; then
8041
wxconfig_3rdparty="zlib $wxconfig_3rdparty"
8044
for i in $wxconfig_3rdparty ; do
8045
WXCONFIG_LIBS="-lwx${i}${lib_debug_suffix}${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX} $WXCONFIG_LIBS"
8049
if test "x$wxUSE_UNIVERSAL" = "xyes" ; then
8052
case "$wxUNIV_THEMES" in
8054
AC_DEFINE(wxUSE_ALL_THEMES)
8058
for t in `echo $wxUNIV_THEMES | tr , ' ' | tr '[[a-z]]' '[[A-Z]]'`; do
8059
AC_DEFINE_UNQUOTED(wxUSE_THEME_$t)
8066
AC_SUBST(wxUSE_ZLIB)
8067
AC_SUBST(wxUSE_REGEX)
8068
AC_SUBST(wxUSE_EXPAT)
8069
AC_SUBST(wxUSE_ODBC)
8070
AC_SUBST(wxUSE_LIBJPEG)
8071
AC_SUBST(wxUSE_LIBPNG)
8072
AC_SUBST(wxUSE_LIBTIFF)
8074
if test $wxUSE_MONOLITHIC = "yes" ; then
8080
if test $wxUSE_PLUGINS = "yes" ; then
8086
if test $wxUSE_ODBC != "no" ; then
8092
if test "$wxUSE_DEBUGREPORT" = "yes" ; then
8098
if test $wxUSE_OFFICIAL_BUILD = "yes" ; then
8105
AC_SUBST(OFFICIAL_BUILD)
8106
AC_SUBST(WX_FLAVOUR)
8107
AC_SUBST(WX_LIB_FLAVOUR)
8110
AC_SUBST(MONOLITHIC)
8111
AC_SUBST(USE_PLUGINS)
8114
AC_SUBST(EXTRALIBS_XML)
8115
AC_SUBST(EXTRALIBS_HTML)
8116
AC_SUBST(EXTRALIBS_MEDIA)
8117
AC_SUBST(EXTRALIBS_ODBC)
8118
AC_SUBST(EXTRALIBS_GUI)
8119
AC_SUBST(EXTRALIBS_OPENGL)
8120
AC_SUBST(EXTRALIBS_SDL)
8121
AC_SUBST(WITH_PLUGIN_SDL)
8122
AC_SUBST(EXTRALIBS_GNOMEPRINT)
8123
AC_SUBST(EXTRALIBS_GNOMEVFS)
8124
AC_SUBST(EXTRALIBS_HILDON)
8127
AC_SUBST(DEBUG_INFO)
8128
AC_SUBST(DEBUG_FLAG)
8129
TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'`
8130
AC_SUBST(TOOLKIT_LOWERCASE)
8131
AC_SUBST(TOOLKIT_VERSION)
8132
AC_SUBST(SAMPLES_RPATH_FLAG)
8133
AC_SUBST(SAMPLES_RPATH_POSTLINK)
8134
AC_SUBST(HOST_SUFFIX)
8135
AC_SUBST(CPPUNIT_CFLAGS)
8136
AC_SUBST(CPPUNIT_LIBS)
8138
dnl Cocoa sets this, but no other port does. As a result, we run into problems when compiling
8139
dnl webkit.mm, or other Objective-C sources. This line can be removed when we move to Bakefile 0.2.4
8140
dnl which adds this call to bakefile.m4.
8141
AC_SUBST(OBJCXXFLAGS)
8146
if test "$WXGTK20" = 1; then
8147
TOOLKIT_DESC="$TOOLKIT_DESC 2"
8148
if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then
8149
TOOLKIT_EXTRA="$TOOLKIT_EXTRA gnomeprint";
8151
if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then
8152
TOOLKIT_EXTRA="$TOOLKIT_EXTRA gnomevfs"
8154
if test "$wxUSE_LIBHILDON" = "yes"; then
8155
TOOLKIT_EXTRA="$TOOLKIT_EXTRA hildon"
8158
if test "$TOOLKIT_EXTRA" != ""; then
8159
TOOLKIT_DESC="$TOOLKIT_DESC with support for `echo $TOOLKIT_EXTRA | tr -s ' '`"
8165
TOOLKIT_DESC=$TOOLKIT_LOWERCASE
8169
TOOLKIT_DESC="base only"
8173
if test "$wxUSE_WINE" = "yes"; then
8174
BAKEFILE_FORCE_PLATFORM=win32
8177
dnl gcc 3.4 has a pch bug which truncates wide character constants in headers.
8178
dnl Hopefully for a non-unicode build there aren't any wide constants in
8179
dnl headers, but for a unicode build it's best to disable pch.
8180
if test "$wxUSE_UNICODE" = yes -a "$GCC" = yes -a "$bk_use_pch" != no
8183
[for gcc precompiled header bug],
8184
[wx_cv_gcc_pch_bug],
8186
echo '#include <stdio.h>
8187
const wchar_t test_var[] = L"awidetest";' > conftest.h
8189
echo '#include "conftest.h"
8192
printf("%ls", test_var);
8196
wx_cv_gcc_pch_bug="pch not supported"
8198
if $CXX conftest.h >/dev/null 2>&1
8202
if $CXX -o conftest$PROGRAM_EXT conftest.cpp >/dev/null 2>&1
8204
if tr -dc '[a-z]' < conftest$PROGRAM_EXT |
8205
grep awidetest >/dev/null
8207
wx_cv_gcc_pch_bug=no
8209
wx_cv_gcc_pch_bug=yes
8214
rm -f conftest.h conftest.gch conftest.cpp conftest$PROGRAM_EXT
8217
if test "$wx_cv_gcc_pch_bug" = yes; then
8218
dnl make the default for pch 'no'
8219
dnl further below check whether the user overrode and warn them
8224
AC_BAKEFILE([m4_include(autoconf_inc.m4)])
8226
dnl find out if the compiler supports PCH
8228
dnl TODO: this should be in bakefile
8229
if test $GCC_PCH = 1
8231
if test "$wx_cv_gcc_pch_bug" = yes; then
8232
AC_MSG_WARN([*** Precompiled header support is broken on this compiler])
8233
AC_MSG_WARN([*** --enable-precomp-headers is not recommended])
8234
AC_MSG_WARN([*** see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13361])
8237
# Our WX_PRECOMP flag does not make sense for any language except C++ because
8238
# the headers that benefit from precompilation are mostly C++ headers.
8239
CXXFLAGS="-DWX_PRECOMP $CXXFLAGS"
8240
# When Bakefile can do multi-language PCH (e.g. C++ and Objective-C++) enable this:
8241
#OBJCXXFLAGS="-DWX_PRECOMP $CXXFLAGS"
8245
dnl For now, we need to alter bk-deps not to generate deps
8246
dnl when we've configured a Universal binary build.
8247
dnl The next version of Bakefile will have the correct fix for this
8248
dnl at which time, this hack can be removed.
8250
if test "$wxUSE_MAC" = 1 ; then
8251
if test "x$wxUSE_UNIVERSAL_BINARY" != "xno" ; then
8252
sed "s/DEPSMODE=gcc/DEPSMODE=none/" < bk-deps > temp
8258
if test "$wxUSE_SHARED" = "yes"; then
8260
dnl We get the shared build linker from bakefile, since it
8261
dnl moved all the logic for this out of this file and into
8262
dnl its own macro. But it can't decide on whether to return
8263
dnl us $(VAR), ${VAR}, or the present expansion of VAR.
8264
dnl So normalise and expand everything here now, because its
8265
dnl not going to change inside wx-config anyway.
8266
sanitised_bakefile_mess=`echo "$SHARED_LD_CXX" | tr -d '()'`
8267
EXE_LINKER=`eval echo "$sanitised_bakefile_mess"`
8269
dnl Need addtional flag on OS/2, so override bakefiles value
8270
dnl (there currently is no suitable variable to which the
8271
dnl missing flags could be added, AFAICS. SN, 18.12.2004. )
8273
*-pc-os2_emx | *-pc-os2-emx )
8274
SHARED_LD_CC="`pwd`/dllar.sh -name-mangler-script ./dllnames.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
8275
SHARED_LD_CXX="`pwd`/dllar.sh -name-mangler-script ./dllnames.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
8276
cp -p ${srcdir}/src/os2/dllnames.sh .
8277
cp -p ${srcdir}/src/os2/dllar.sh .
8282
dnl No bakefile support for static builds, but this should be ok for most.
8283
EXE_LINKER="$CXX -o"
8286
if test "$wxUSE_OMF" = "yes"; then
8288
*-pc-os2_emx | *-pc-os2-emx )
8289
LDFLAGS="$LDFLAGS -Zlinker /EXEPACK"
8290
LDFLAGS_GUI="-Zlinker /PMTYPE:PM"
8291
WXCONFIG_LDFLAGS_GUI="-Zlinker /PMTYPE:PM"
8296
dnl TOOLCHAIN_DEFS should be used for both wx and client code
8297
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS $TOOLCHAIN_DEFS"
8299
dnl for convenience, sort the samples in alphabetical order
8301
dnl FIXME For some mysterious reasons, sometimes the directories are duplicated
8302
dnl in this list - hence uniq. But normally, this shouldn't be needed!
8304
dnl Unfortunately, there is a bug in OS/2's tr, such that
8305
dnl tr ' ' '\n' introduces DOS-like line breaks, whereas tr '\n' ' '
8306
dnl only removes the Unix-like part of the introduced line break.
8307
SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq | tr '\n' ' '| tr -d '\r'`"
8309
dnl subtle bakefile goop.
8310
dnl Used in wx-config now too, as its STATIC_FLAG with different makeup.
8311
dnl I wish we would have called it something less likely to clash with
8316
AC_SUBST(WX_LIBRARY_BASENAME_NOGUI)
8317
AC_SUBST(WX_LIBRARY_BASENAME_GUI)
8321
AC_SUBST(AFMINSTALL)
8322
AC_SUBST(WIN32INSTALL)
8324
AC_SUBST(TOOLKIT_DIR)
8325
AC_SUBST(TOOLCHAIN_NAME)
8326
AC_SUBST(TOOLCHAIN_FULLNAME)
8328
dnl wx-config options
8329
AC_SUBST(host_alias)
8330
AC_SUBST(cross_compiling)
8331
AC_SUBST(WIDGET_SET)
8332
AC_SUBST(WX_RELEASE)
8333
AC_SUBST(WX_VERSION)
8334
AC_SUBST(WX_SUBVERSION)
8335
AC_SUBST(WX_CHARTYPE)
8336
AC_SUBST(WX_DEBUGTYPE)
8338
dnl note that in addition to the usual CPP/C/CXXFLAGS which are used for
8339
dnl building the library itself, we also have WXCONFIG_-prefixed variants which
8340
dnl are used when building the libraries using the library
8342
dnl so put anything which should be used only during the library build in, e.g.
8343
dnl CXXFLAGS, but put everything else (by default) into WXCONFIG_CXXFLAGS
8345
dnl and, finally, for some things which should be only used by wx-config but
8346
dnl not during the library compilation, use WXCONFIG_ONLY_CPPFLAGS which is
8347
dnl added to WXCONFIG_CPPFLAGS after adding the latter to CPPFLAGS
8348
AC_SUBST(WXCONFIG_CPPFLAGS)
8349
AC_SUBST(WXCONFIG_CFLAGS)
8350
AC_SUBST(WXCONFIG_CXXFLAGS)
8352
AC_SUBST(WXCONFIG_LIBS)
8353
AC_SUBST(WXCONFIG_RPATH)
8354
AC_SUBST(WXCONFIG_LDFLAGS_GUI)
8355
AC_SUBST(WXCONFIG_RESFLAGS)
8356
AC_SUBST(EXE_LINKER)
8358
dnl distribution vars
8362
dnl additional subdirectories where we will build
8363
AC_SUBST(SAMPLES_SUBDIRS)
8365
dnl additional libraries and linker settings
8367
AC_SUBST(LDFLAGS_GL)
8368
AC_SUBST(OPENGL_LIBS)
8369
AC_SUBST(DMALLOC_LIBS)
8370
AC_SUBST(WX_VERSION_TAG)
8372
dnl additional resurces settings
8377
AC_SUBST(RESPROGRAMOBJ)
8378
AC_SUBST(WX_RESOURCES_MACOSX_ASCII)
8379
AC_SUBST(WX_RESOURCES_MACOSX_DATA)
8381
dnl additional for Mac OS X
8383
AC_SUBST(LIBWXMACRES)
8384
AC_SUBST(POSTLINK_COMMAND)
8385
AC_SUBST(MACSETFILE)
8392
dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE
8393
dnl itself (this macro is required if SUBDIRS variable is used in Makefile.am
8394
dnl - and we do use it)
8398
AC_CONFIG_HEADERS([lib/wx/include/${TOOLCHAIN_FULLNAME}/wx/setup.h:setup.h.in])
8400
if test "$USE_WIN32" = 1; then
8407
$CPP $infile | sed 's/^# *[1-9].*//;s/^ *//;/./,/^$/!d' > $outdir/rcdefs.h
8411
infile="$srcdir/include/wx/msw/genrcdefs.h"
8412
outdir="lib/wx/include/$TOOLCHAIN_FULLNAME/wx/msw"
8417
AC_CONFIG_FILES([ lib/wx/config/${TOOLCHAIN_FULLNAME}:wx-config.in ],
8418
[ chmod +x lib/wx/config/${TOOLCHAIN_FULLNAME} ],
8419
[ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ])
8421
AC_CONFIG_FILES([ lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace.in ],
8422
[ chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ],
8423
[ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ])
8425
if test "$wx_cv_version_script" = "yes"; then
8426
AC_CONFIG_FILES(version-script)
8428
AC_CONFIG_FILES(Makefile)
8430
AC_CONFIG_COMMANDS([wx-config],
8432
${LN_S} lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} wx-config
8434
[ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}"
8438
dnl This would give us us build dir that in every significant way
8439
dnl resembles an installed wx in prefix=$builddir. It is troublesome
8440
dnl though in this form because AC_CONFIG_LINKS will fail for directories
8441
dnl on platforms that do not have symlinks.
8442
dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR:include ])
8443
dnl AC_CONFIG_LINKS([ contrib/include ])
8445
if test "$wxWITH_SUBDIRS" != "no"; then
8446
dnl Configure samples, contrib etc. directories, but only if they are present:
8447
if test "$wxUSE_GUI" = "yes"; then
8448
SUBDIRS="samples demos utils contrib"
8449
else dnl we build wxBase only
8450
dnl there are no wxBase programs in contrib nor demos
8451
SUBDIRS="samples utils"
8453
dnl Add tests to the list of subdirs if cppunit 1.8.0+ is detected
8454
AM_PATH_CPPUNIT(1.8.0, [SUBDIRS="$SUBDIRS tests"])
8456
if test "$USE_UNIX" != "1" -a "$USE_WIN32" != "1"; then
8457
DISABLED_CONTRIB="$DISABLED_CONTRIB net"
8460
for subdir in `echo $SUBDIRS`; do
8461
if test -d ${srcdir}/${subdir} ; then
8462
if test "$wxUSE_GUI" = "yes"; then
8463
if test ${subdir} = "samples"; then
8464
dnl only take those samples which compile in the current
8465
dnl configuration and which exist
8466
makefiles="samples/Makefile.in $makefiles"
8467
for sample in `echo $SAMPLES_SUBDIRS`; do
8468
if test -d $srcdir/samples/$sample; then
8469
makefiles="samples/$sample/Makefile.in $makefiles"
8473
dnl assume that everything compiles for utils &c
8474
dnl any that shouldn't be built can be added to
8475
dnl DISABLED_UTILS, DISABLED_CONTRIB or DISABLED_DEMOS
8476
disabled_var=DISABLED_`echo $subdir | tr '[[a-z]]' '[[A-Z]]'`
8477
eval "disabled=\$$disabled_var"
8478
disabled=/`echo X $disabled | sed 's@ @/|/@g'`/
8479
makefiles=`(cd $srcdir ; find $subdir -name Makefile.in) | $EGREP -v "$disabled"`
8481
else dnl we build wxBase only
8482
dnl don't take all samples/utils, just those which build with
8484
if test ${subdir} = "samples"; then
8485
makefiles="samples/Makefile.in samples/console/Makefile.in"
8486
elif test ${subdir} = "utils"; then
8488
for util in HelpGen tex2rtf ; do
8489
if test -d $srcdir/utils/$util ; then
8490
makefiles="utils/$util/Makefile.in \
8491
utils/$util/src/Makefile.in \
8495
else dnl assume that everything compiles for tests
8496
makefiles=`(cd $srcdir ; find $subdir -name Makefile.in)`
8500
for mkin in $makefiles ; do
8501
mk=`echo $mkin | sed 's/Makefile\.in/Makefile/g'`
8502
AC_CONFIG_FILES([$mk])
8506
fi dnl wxWITH_SUBDIRS
8510
dnl report how we have been configured
8512
echo "Configured wxWidgets ${WX_VERSION} for \`${host}'"
8514
echo " Which GUI toolkit should wxWidgets use? ${TOOLKIT_DESC}"
8515
echo " Should wxWidgets be compiled into single library? ${wxUSE_MONOLITHIC:-yes}"
8517
echo " Should wxWidgets be compiled in debug mode? ${wxUSE_DEBUG:-no}"
8518
echo " Should wxWidgets be linked as a shared library? ${wxUSE_SHARED:-no}"
8519
echo " Should wxWidgets be compiled in Unicode mode? ${wxUSE_UNICODE:-no}"
8521
echo " What level of wxWidgets compatibility should be enabled?"
8522
echo " wxWidgets 2.4 ${WXWIN_COMPATIBILITY_2_4:-no}"
8523
echo " wxWidgets 2.6 ${WXWIN_COMPATIBILITY_2_6:-yes}"
8525
echo " Which libraries should wxWidgets use?"
8526
echo " jpeg ${wxUSE_LIBJPEG-none}"
8527
echo " png ${wxUSE_LIBPNG-none}"
8528
echo " regex ${wxUSE_REGEX}"
8529
echo " tiff ${wxUSE_LIBTIFF-none}"
8530
if test "$wxUSE_X11" = 1 -o "$wxUSE_MOTIF" = 1; then
8531
echo " xpm ${wxUSE_LIBXPM-none}"
8533
echo " zlib ${wxUSE_ZLIB}"
8534
echo " odbc ${wxUSE_ODBC}"
8535
echo " expat ${wxUSE_EXPAT}"
8536
echo " libmspack ${wxUSE_LIBMSPACK}"
8537
echo " sdl ${wxUSE_LIBSDL}"
8541
dnl vi: set et sts=4 sw=4 com=\:dnl: