dnl initialization
dnl ---------------------------------------------------------------------------
-AC_INIT([wxWidgets], [2.5.2], [wx-dev@lists.wxwidgets.org])
+AC_INIT([wxWidgets], [2.5.3], [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])
wx_major_version_number=2
wx_minor_version_number=5
-wx_release_number=2
-wx_subrelease_number=9
+wx_release_number=3
+wx_subrelease_number=0
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
WX_VERSION=$WX_RELEASE.$wx_release_number
WX_MSW_VERSION=$wx_major_version_number$wx_minor_version_number$wx_release_number
-WX_CURRENT=2
+WX_CURRENT=3
WX_REVISION=0
WX_AGE=0
WX_ARG_ENABLE(universal, [ --enable-universal use wxWidgets GUI controls instead of native ones], wxUSE_UNIVERSAL)
AC_ARG_WITH(gtk, [ --with-gtk use GTK+], [wxUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [wxUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT_GIVEN=1])
-AC_ARG_WITH(mac, [ --with-mac use Mac OS X], [wxUSE_MAC="$withval" TOOLKIT_GIVEN=1])
-AC_ARG_WITH(cocoa, [ --with-cocoa use Cocoa], [wxUSE_COCOA="$withval" TOOLKIT_GIVEN=1])
+AC_ARG_WITH(mac, [ --with-mac use Mac OS X], [wxUSE_MAC="$withval" CACHE_MAC=1 TOOLKIT_GIVEN=1])
+AC_ARG_WITH(cocoa, [ --with-cocoa use Cocoa], [wxUSE_COCOA="$withval" CACHE_COCOA=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(wine, [ --with-wine use Wine], [wxUSE_WINE="$withval" CACHE_WINE=1])
AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(pm, [ --with-pm use OS/2 Presentation Manager], [wxUSE_PM="$withval" CACHE_PM=1 TOOLKIT_GIVEN=1])
DEFAULT_wxUSE_TIPWINDOW=no
fi
-## FIXME: This is a blatant hack
-if test "x$wxUSE_COCOA" != "x" -a "$wxUSE_COCOA" != "0" ; then
- wxUSE_PRINTING_ARCHITECTURE=no
- wxUSE_DRAG_AND_DROP=no
- DEFAULT_wxUSE_TOOLTIPS=no
- DEFAULT_wxUSE_DRAGIMAGE=no
-fi
-
WX_ARG_ENABLE(accel, [ --enable-accel use accelerators], wxUSE_ACCEL)
WX_ARG_ENABLE(button, [ --enable-button use wxButton class], wxUSE_BUTTON)
WX_ARG_ENABLE(bmpbutton, [ --enable-bmpbutton use wxBitmapButton class], wxUSE_BMPBUTTON)
AC_DEFINE_UNQUOTED(SIZEOF_WCHAR_T, $wx_cv_sizeof_wchar_t)
+dnl checks needed to define wxVaCopy
+AC_CACHE_CHECK([for va_copy],
+ wx_cv_func_va_copy,
+ [
+ AC_LINK_IFELSE([
+ #include <stdarg.h>
+ void foo(char *f, ...)
+ {
+ va_list ap1, ap2;
+ va_start(ap1, f);
+ va_copy(ap2, ap1);
+ va_end(ap2);
+ va_end(ap1);
+ }],
+ wx_cv_func_va_copy=yes,
+ wx_cv_func_va_copy=no
+ )
+ ]
+)
+
+if test $wx_cv_func_va_copy = "yes"; then
+ AC_DEFINE(HAVE_VA_COPY)
+else
+ dnl try to understand how can we copy va_lists
+ AC_CACHE_CHECK([if va_list can be copied by value],
+ wx_cv_type_va_list_lvalue,
+ [
+ AC_RUN_IFELSE([
+ #include <stdarg.h>
+ int foo(char *f, ...)
+ {
+ va_list ap1, ap2;
+ va_start(ap1, f);
+ ap2 = ap1;
+ if ( va_arg(ap1, int) != 17 || va_arg(ap2, int) != 17 )
+ return 1;
+ va_end(ap2);
+ va_end(ap1);
+ return 0;
+ }
+ int main()
+ {
+ return foo("hi", 17);
+ }],
+ wx_cv_type_va_list_lvalue=yes,
+ wx_cv_type_va_list_lvalue=no,
+ dnl assume most common case for cross-compiling...
+ wx_cv_type_va_list_lvalue=yes
+ )
+ ]
+ )
+
+ if test $wx_cv_type_va_list_lvalue != "yes"; then
+ dnl we suppose that the only thing which can't be copied like this
+ dnl are arrays... only experience will show whether this is really true
+ AC_DEFINE(VA_LIST_IS_ARRAY)
+ fi
+fi
+
dnl check for large file support
AC_SYS_LARGEFILE
dnl check whether C++ compiler supports C++ casts
AC_CXX_CONST_CAST
+AC_CXX_REINTERPRET_CAST
AC_CXX_STATIC_CAST
dnl check various STL features
WXGTK20=
WXGPE=
+ if test "$wxUSE_COCOA" = 1 ; then
+ if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes"; then
+ AC_MSG_WARN([Printing not supported under wxCocoa yet, disabled])
+ wxUSE_PRINTING_ARCHITECTURE=no
+ fi
+ if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
+ AC_MSG_WARN([Drag and Drop not supported under wxCocoa yet, disabled])
+ wxUSE_DRAG_AND_DROP=no
+ fi
+ if test "$wxUSE_DRAGIMAGE" = "yes"; then
+ AC_MSG_WARN([Drag Image and DandD not supported under wxCocoa yet, disabled])
+ wxUSE_DRAGIMAGE=no
+ fi
+ fi
+
if test "$wxUSE_MSW" = 1 ; then
TOOLKIT=MSW
GUIDIST=MSW_DIST
GUIDIST=MACX_DIST
dnl wxMac version of wxBase and wxCocoa or wxBase-only built on Darwin
dnl are different, so they need different names:
- dnl FIXME: If we can do it like this, please do, and we can remove
- dnl BASEPORT from bakefiles and elsewhere
- WX_FLAVOUR="carbon${WX_FLAVOUR:+_$WX_FLAVOUR}"
+ WXBASEPORT="_carbon"
fi
if test "$wxUSE_COCOA" = 1; then
dnl library link name
dnl These just save us from exporting lib_{unicode,debug,flavour}_suffix.
dnl If we ever need to do that, we won't need to keep these.
-WX_LIBRARY_BASENAME_NOGUI="wx_base${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
+WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
WX_LIBRARY_BASENAME_GUI="wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
USE_XRC=0
if test "$wxUSE_XRC" = "yes"; then
- AC_DEFINE(wxUSE_XRC)
- USE_XRC=1
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS xrc"
+ if test "$wxUSE_XML" != "yes"; then
+ AC_MSG_WARN([XML library not built, XRC resources disabled])
+ wxUSE_XRC=no
+ else
+ AC_DEFINE(wxUSE_XRC)
+ USE_XRC=1
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS xrc"
+ fi
fi
if test "$wxUSE_MENUS" = "yes"; then
if test "$wxUSE_SOUND" = "yes"; then
LDFLAGS="$LDFLAGS -framework QuickTime"
fi
+ if test "$USE_DARWIN" = 1; then
+ LDFLAGS="$LDFLAGS -framework IOKit"
+ fi
LDFLAGS="$LDFLAGS -framework Carbon -framework Cocoa -framework System"
fi
if test "$wxUSE_COCOA" = 1 ; then
- LDFLAGS="$LDFLAGS -framework Cocoa -framework System"
+ LDFLAGS="$LDFLAGS -framework Cocoa"
fi
dnl FIXME: should this be covered by the conditional above
LN_S="${LN_S}"
])
-dnl When contrib is gone, this is all we will need:
-dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR/wx:include/wx ])
-
-dnl Until then, we need to be a little more extravagent to create
-dnl a 'real' working $prefix subtree in each build dir. Doing this
-dnl really does make them otherwise identical to an installed set.
-for c in `ls $srcdir/contrib/include/wx 2> /dev/null`; do
- AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$c:contrib/include/wx/$c ])
-done
-for f in `ls $srcdir/include/wx 2> /dev/null`; do
- AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$f:include/wx/$f ])
-done
+dnl This would give us us build dir that in every significant way
+dnl resembles an installed wx in prefix=$builddir. It is troublesome
+dnl though in this form because AC_CONFIG_LINKS will fail for directories
+dnl on platforms that do not have symlinks.
+dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR:include ])
+dnl AC_CONFIG_LINKS([ contrib/include ])
dnl Configure samples, contrib etc. directories, but only if they are present: