dnl initialization
dnl ---------------------------------------------------------------------------
-AC_INIT([wxWidgets], [2.5.3], [wx-dev@lists.wxwidgets.org])
+AC_INIT([wxWidgets], [2.5.4], [wx-dev@lists.wxwidgets.org])
dnl the file passed to AC_CONFIG_SRCDIR should be specific to our package
AC_CONFIG_SRCDIR([wx-config.in])
DEFAULT_wxUSE_OPENGL=no
DEFAULT_wxUSE_ON_FATAL_EXCEPTION=no
+ DEFAULT_wxUSE_STACKWALKER=no
DEFAULT_wxUSE_SNGLINST_CHECKER=no
DEFAULT_wxUSE_STD_IOSTREAM=no
DEFAULT_wxUSE_CMDLINE_PARSER=no
DEFAULT_wxUSE_FS_INET=no
DEFAULT_wxUSE_FS_ZIP=no
DEFAULT_wxUSE_BUSYINFO=no
+ DEFAULT_wxUSE_ARCSTREAM=no
DEFAULT_wxUSE_ZIPSTREAM=no
DEFAULT_wxUSE_VALIDATORS=no
DEFAULT_wxUSE_CHOICE=no
DEFAULT_wxUSE_CHOICEBOOK=no
DEFAULT_wxUSE_COMBOBOX=no
+ DEFAULT_wxUSE_DATEPICKCTRL=no
DEFAULT_wxUSE_DISPLAY=no
DEFAULT_wxUSE_GAUGE=no
DEFAULT_wxUSE_GRID=no
DEFAULT_wxUSE_OPENGL=no
DEFAULT_wxUSE_ON_FATAL_EXCEPTION=yes
+ DEFAULT_wxUSE_STACKWALKER=yes
DEFAULT_wxUSE_SNGLINST_CHECKER=yes
DEFAULT_wxUSE_STD_IOSTREAM=no
DEFAULT_wxUSE_CMDLINE_PARSER=yes
DEFAULT_wxUSE_FS_INET=yes
DEFAULT_wxUSE_FS_ZIP=yes
DEFAULT_wxUSE_BUSYINFO=yes
+ DEFAULT_wxUSE_ARCSTREAM=yes
DEFAULT_wxUSE_ZIPSTREAM=yes
DEFAULT_wxUSE_VALIDATORS=yes
DEFAULT_wxUSE_CHOICE=yes
DEFAULT_wxUSE_CHOICEBOOK=yes
DEFAULT_wxUSE_COMBOBOX=yes
+ DEFAULT_wxUSE_DATEPICKCTRL=yes
DEFAULT_wxUSE_DISPLAY=yes
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_GRID=yes
dnl please keep the settings below in alphabetical order
WX_ARG_ENABLE(apple_ieee, [ --enable-apple_ieee use the Apple IEEE codec], wxUSE_APPLE_IEEE)
+WX_ARG_ENABLE(arcstream, [ --enable-arcstream use wxArchive streams], wxUSE_ARCSTREAM)
WX_ARG_ENABLE(catch_segvs, [ --enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only)], wxUSE_ON_FATAL_EXCEPTION)
+WX_ARG_ENABLE(backtrace, [ --enable-backtrace use wxStackWalker class for getting backtraces], wxUSE_STACKWALKER)
WX_ARG_ENABLE(cmdline, [ --enable-cmdline use wxCmdLineParser class], wxUSE_CMDLINE_PARSER)
WX_ARG_ENABLE(datetime, [ --enable-datetime use wxDateTime class], wxUSE_DATETIME)
WX_ARG_ENABLE(dialupman, [ --enable-dialupman use dialup network classes], wxUSE_DIALUP_MANAGER)
WX_ARG_ENABLE(sound, [ --enable-sound use wxSound class], wxUSE_SOUND)
WX_ARG_ENABLE(mediactrl, [ --enable-mediactrl use wxMediaCtrl class], wxUSE_MEDIACTRL)
WX_ARG_ENABLE(wxprintfv, [ --enable-wxprintfv use wxWidgets implementation of vprintf()], wxUSE_EXPERIMENTAL_PRINTF)
-WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZipInputStream], wxUSE_ZIPSTREAM)
+WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
WX_ARG_ENABLE(url, [ --enable-url use wxURL class], wxUSE_URL)
WX_ARG_ENABLE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL)
DEFAULT_wxUSE_ACCEL=yes
DEFAULT_wxUSE_BMPBUTTON=yes
DEFAULT_wxUSE_BUTTON=yes
- DEFAULT_wxUSE_CALCTRL=no
+ DEFAULT_wxUSE_CALCTRL=yes
DEFAULT_wxUSE_CARET=yes
DEFAULT_wxUSE_COMBOBOX=yes
DEFAULT_wxUSE_CHECKBOX=yes
DEFAULT_wxUSE_CHECKLISTBOX=yes
DEFAULT_wxUSE_CHOICE=yes
DEFAULT_wxUSE_CHOICEBOOK=yes
+ DEFAULT_wxUSE_DATEPICKCTRL=yes
DEFAULT_wxUSE_GAUGE=yes
DEFAULT_wxUSE_GRID=yes
DEFAULT_wxUSE_IMAGLIST=yes
DEFAULT_wxUSE_CHECKLISTBOX=no
DEFAULT_wxUSE_CHOICE=no
DEFAULT_wxUSE_CHOICEBOOK=no
+ DEFAULT_wxUSE_DATEPICKCTRL=no
DEFAULT_wxUSE_GAUGE=no
DEFAULT_wxUSE_GRID=no
DEFAULT_wxUSE_IMAGLIST=no
WX_ARG_ENABLE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE)
WX_ARG_ENABLE(choicebook, [ --enable-choicebook use wxChoicebook class], wxUSE_CHOICEBOOK)
WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox class], wxUSE_COMBOBOX)
+WX_ARG_ENABLE(datepick, [ --enable-datepick use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL)
WX_ARG_ENABLE(display, [ --enable-display use wxDisplay class], wxUSE_DISPLAY)
WX_ARG_ENABLE(gauge, [ --enable-gauge use wxGauge class], wxUSE_GAUGE)
WX_ARG_ENABLE(grid, [ --enable-grid use wxGrid class], wxUSE_GRID)
dnl -g and -O flags ourselves below
CFLAGS=${CFLAGS:=}
AC_PROG_CC
+AC_BAKEFILE_PROG_MWCC
dnl is -traditional needed for correct compilations
dnl adds -traditional for gcc if needed
dnl see CFLAGS line above
CXXFLAGS=${CXXFLAGS:=}
AC_PROG_CXX
+AC_BAKEFILE_PROG_MWCXX
AC_LANG_RESTORE
dnl ------------------------------------------------------------------------
if test "$wxUSE_LIBMSPACK" != "no"; then
-
AC_CHECK_HEADER([mspack.h], [found_mspack_h=1])
if test "x$found_mspack_h" = "x1"; then
AC_CHECK_LIB(mspack, mspack_create_chm_decompressor,
fi
if test "x$MSPACK_LINK" = "x" ; then
wxUSE_LIBMSPACK=no
- else
- AC_DEFINE(wxUSE_LIBMSPACK)
fi
fi
+if test "$wxUSE_LIBMSPACK" != "no"; then
+ AC_DEFINE(wxUSE_LIBMSPACK)
+fi
+
dnl ----------------------------------------------------------------
dnl search for toolkit (widget sets)
TOOLCHAIN_DLL_DEFS="${TOOLCHAIN_DLL_DEFS} -DWXUSINGDLL=1"
;;
+ *-*-hpux* )
+ SAMPLES_RPATH_FLAG="-Wl,+b,\$(top_builddir)lib"
+ WXCONFIG_RPATH="-Wl,+b,\$libdir"
+ ;;
+
esac
if test $wxUSE_RPATH = "no"; then
AC_DEFINE(HAVE_WCSLEN)
fi
- dnl HP-UX aCC needs this define to find mbstrtowcs() &c
- if test "$USE_HPUX" = 1 -a "x$GCC" != "xyes"; then
+ dnl on HP-UX aCC and g++ need this define to find mbstrtowcs() &c
+ if test "$USE_HPUX" = 1; then
CPPFLAGS="$CPPFLAGS -D_INCLUDE__STDC_A1_SOURCE "
fi
vsnprintf(buf, 10u, "%s", ap);
],
wx_cv_func_vsnprintf_decl=yes,
- wx_cv_func_vsnprintf_decl=no
+ [
+ dnl Metrowerks does provide a vsnprintf declaration
+ dnl but in C++ mode it's always in std namespace.
+ dnl FIXME: Do we have any UNIX C++ compilers that would
+ dnl fail this test if using namespace std; was
+ dnl simply always included?
+ AC_TRY_COMPILE(
+ [
+ #include <stdio.h>
+ #include <stdarg.h>
+ using namespace std;
+ ],
+ [
+ char *buf;
+ va_list ap;
+ vsnprintf(buf, 10u, "%s", ap);
+ ],
+ wx_cv_func_vsnprintf_decl=yes,
+ wx_cv_func_vsnprintf_decl=no
+ )
+ ]
)
]
)
fi
fi
+dnl backtrace() and backtrace_symbols() for wxStackWalker
+if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ AC_CACHE_CHECK([for backtrace() in <execinfo.h>], wx_cv_func_backtrace,
+ [
+ AC_TRY_COMPILE([#include <execinfo.h>],
+ [
+ void *trace[1];
+ char **messages;
+
+ backtrace(trace, 1);
+ messages = backtrace_symbols(trace, 1);
+ ],
+ wx_cv_func_backtrace=yes,
+ wx_cv_func_backtrace=no
+ )
+ ]
+ )
+
+
+ if test "$wx_cv_func_backtrace" = "no"; then
+ AC_MSG_WARN([backtrace() is not available, wxStackWalker will not be available])
+ wxUSE_STACKWALKER=no
+ else
+ AC_CACHE_CHECK([for __cxa_demangle() in <cxxabi.h>], wx_cv_func_cxa_demangle,
+ [
+ AC_TRY_COMPILE([#include <cxxabi.h>],
+ [
+ int rc;
+ __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc);
+ ],
+ wx_cv_func_cxa_demangle=yes,
+ wx_cv_func_cxa_demangle=no
+ )
+ ]
+ )
+
+ if test "$wx_cv_func_cxa_demangle" = "yes"; then
+ AC_DEFINE(HAVE_CXA_DEMANGLE)
+ fi
+ fi
+
+ AC_LANG_RESTORE
+fi
+
dnl check for the function for temp files creation
AC_CHECK_FUNCS(mkstemp mktemp, break)
dnl ---------------------------------------------------------------------------
if test "$wxUSE_GUI" = "yes"; then
- AC_DEFINE(wxUSE_GUI)
-
- dnl the things we always pull in the GUI version of the library:
- dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
- dnl library really can't be built without those)
- dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
- dnl almost any program and the first 2 are needed to show a message box
- dnl which want to be always able to do)
- dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
- dnl to compile without them (if the app doesn't do any drawing, it doesn't
- dnl need the dcs, pens, brushes, ...), this just can't be done now
- dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
- dnl 5. misc stuff: timers, settings, message box
-else
- AC_DEFINE(wxUSE_NOGUI)
+ AC_DEFINE(wxUSE_GUI)
+
+ dnl the things we always pull in the GUI version of the library:
+ dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
+ dnl library really can't be built without those)
+ dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
+ dnl almost any program and the first 2 are needed to show a message box
+ dnl which want to be always able to do)
+ dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
+ dnl to compile without them (if the app doesn't do any drawing, it doesn't
+ dnl need the dcs, pens, brushes, ...), this just can't be done now
+ dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
+ dnl 5. misc stuff: timers, settings, message box
fi
dnl ---------------------------------------------------------------------------
AC_DEFINE(wxUSE_FS_ZIP)
fi
+if test "$wxUSE_ARCSTREAM" = "yes"; then
+ AC_DEFINE(wxUSE_ARCSTREAM)
+fi
+
if test "$wxUSE_ZIPSTREAM" = "yes"; then
- AC_DEFINE(wxUSE_ZIPSTREAM)
+ if test "$wxUSE_ARCSTREAM" != "yes"; then
+ AC_MSG_WARN(wxZip requires wxArchive... disabled)
+ elif test "$wxUSE_ZLIB" = "no"; then
+ AC_MSG_WARN(wxZip requires wxZlib... disabled)
+ else
+ AC_DEFINE(wxUSE_ZIPSTREAM)
+ fi
fi
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
AC_DEFINE(wxUSE_ON_FATAL_EXCEPTION)
fi
+if test "$wxUSE_STACKWALKER" = "yes"; then
+ AC_DEFINE(wxUSE_STACKWALKER)
+fi
+
if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
AC_DEFINE(wxUSE_SNGLINST_CHECKER)
fi
AC_MSG_WARN(wxConfig requires wxTextFile... disabled)
else
AC_DEFINE(wxUSE_CONFIG)
+ AC_DEFINE(wxUSE_CONFIG_NATIVE)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS config"
fi
fi
AC_DEFINE(wxUSE_GEOMETRY)
fi
-if test "$wxUSE_DIALUP_MANAGER" = "yes" ; then
- AC_DEFINE(wxUSE_DIALUP_MANAGER)
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dialup"
-fi
-
if test "$wxUSE_STREAMS" = "yes" ; then
AC_DEFINE(wxUSE_STREAMS)
fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst"
fi
+if test "$wxUSE_DATEPICKCTRL" = "yes"; then
+ AC_DEFINE(wxUSE_DATEPICKCTRL)
+ USES_CONTROLS=1
+fi
+
if test "$wxUSE_DISPLAY" = "yes"; then
AC_DEFINE(wxUSE_DISPLAY)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS display"
fi
if test "$wxUSE_STATUSBAR" = "yes"; then
+ dnl this will get undefined in wx/chkconf.h if it's not supported
+ AC_DEFINE(wxUSE_NATIVE_STATUSBAR)
AC_DEFINE(wxUSE_STATUSBAR)
USES_CONTROLS=1
if test "$wxUSE_TABDIALOG" = "yes"; then
AC_DEFINE(wxUSE_TAB_DIALOG)
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS tab"
fi
if test "$wxUSE_TEXTCTRL" = "yes"; then
fi
fi
+if test "$wxUSE_DIALUP_MANAGER" = "yes"; then
+ if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 ; then
+ AC_MSG_WARN([Dialup manager not yet supported under Mac OS X... disabled])
+ else
+ AC_DEFINE(wxUSE_DIALUP_MANAGER)
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dialup"
+ fi
+fi
+
if test "$wxUSE_TIPWINDOW" = "yes"; then
if test "$wxUSE_PM" = 1; then
AC_MSG_WARN([wxTipWindow not yet supported under PM... disabled])
fi
if test "$wxUSE_COCOA" = 1 ; then
LDFLAGS="$LDFLAGS -framework Cocoa"
+ if test "$wxUSE_MEDIACTRL" = "yes"; then
+ LDFLAGS="$LDFLAGS -framework QuickTime"
+ fi
fi
dnl FIXME: should this be covered by the conditional above
CFLAGS=`echo $CODE_GEN_FLAGS $EXTRA_CFLAGS $CFLAGS $CWARNINGS`
CXXFLAGS=`echo $CODE_GEN_FLAGS $CODE_GEN_FLAGS_CXX $EXTRA_CFLAGS $CXXFLAGS $CXXWARNINGS`
+if test "x$MWCC" = "xyes"; then
+ dnl Correct MW 8.3 to be more similar to GCC. In particular we
+ dnl must use <regex.h> from system not our local copy on OS X,
+ dnl but must use local not system on OS 9.
+ dnl The following should make all -I paths usable for <> includes
+ dnl while first checking in real system paths. With 8.3 using
+ dnl -gccincludes it will actually check local paths before system
+ dnl even for <> which is totally wrong.
+
+ dnl Note that because this absolutely needs to be before any -I
+ dnl that we have to tack it on to the end of the compiler commandline.
+ CC="$CC -cwd source -I-"
+ CXX="$CXX -cwd source -I-"
+fi
+
LIBS=`echo $LIBS`
EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
;;
esac
-AC_BAKEFILE
+AC_BAKEFILE([m4_include(autoconf_inc.m4)])
if test "$wxUSE_SHARED" = "yes"; then
fi
+dnl According to Vaclav, if NO_GCC_PRAGMA is used for any reason it needs to
+dnl be in wx-config output. Not doing so could result in link problems.
GCC_PRAGMA_FLAGS=""
+PCH_FLAGS=""
dnl Find out if we have to define NO_GCC_PRAGMA and WX_PRECOMP:
if test $GCC_PCH = 1 ; then
- GCC_PRAGMA_FLAGS="-DWX_PRECOMP -DNO_GCC_PRAGMA"
+ GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
+ PCH_FLAGS="-DWX_PRECOMP"
else
case "${host}" in
powerpc-*-darwin* )
;;
esac
fi
-CPPFLAGS="$GCC_PRAGMA_FLAGS $CPPFLAGS"
+CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
dnl for convenience, sort the samples in alphabetical order