AC_DEFINE(__NETBSD__)
AC_DEFINE(__BSD__)
DEFAULT_DEFAULT_wxUSE_GTK=1
+ NEEDS_D_REENTRANT_FOR_R_FUNCS=1
+
+ dnl some standard declarations in NetBSD headers are only included if
+ dnl _NETBSD_SOURCE and _LIBC are defined, e.g. getservbyname_r in netdb.h
+ CPPFLAGS="-D_NETBSD_SOURCE -D_LIBC $CPPFLAGS"
;;
*-*-osf* )
USE_ALPHA=1
DEFAULT_wxUSE_NO_DEPS=no
DEFAULT_wxUSE_NO_RTTI=no
DEFAULT_wxUSE_NO_EXCEPTIONS=no
+ DEFAULT_wxUSE_UNIVERSAL_BINARY=no
DEFAULT_wxUSE_RPATH=yes
DEFAULT_wxUSE_PERMISSIVE=no
DEFAULT_wxUSE_DEBUG_FLAG=yes
DEFAULT_wxUSE_STATLINE=no
DEFAULT_wxUSE_STATTEXT=no
DEFAULT_wxUSE_STATUSBAR=yes
- DEFAULT_wxUSE_TABDIALOG=no
+ DEFAULT_wxUSE_TAB_DIALOG=no
DEFAULT_wxUSE_TEXTCTRL=no
DEFAULT_wxUSE_TOGGLEBTN=no
DEFAULT_wxUSE_TOOLBAR=no
DEFAULT_wxUSE_TOOLBAR_NATIVE=no
DEFAULT_wxUSE_TOOLBAR_SIMPLE=no
DEFAULT_wxUSE_TREEBOOK=no
+ DEFAULT_wxUSE_TOOLBOOK=no
DEFAULT_wxUSE_TREECTRL=no
DEFAULT_wxUSE_POPUPWIN=no
DEFAULT_wxUSE_TIPWINDOW=no
DEFAULT_wxUSE_NO_DEPS=no
DEFAULT_wxUSE_NO_RTTI=no
DEFAULT_wxUSE_NO_EXCEPTIONS=no
+ DEFAULT_wxUSE_UNIVERSAL_BINARY=no
DEFAULT_wxUSE_RPATH=yes
DEFAULT_wxUSE_PERMISSIVE=no
DEFAULT_wxUSE_DEBUG_FLAG=no
DEFAULT_wxUSE_STATLINE=yes
DEFAULT_wxUSE_STATTEXT=yes
DEFAULT_wxUSE_STATUSBAR=yes
- DEFAULT_wxUSE_TABDIALOG=no
+ DEFAULT_wxUSE_TAB_DIALOG=no
DEFAULT_wxUSE_TEXTCTRL=yes
DEFAULT_wxUSE_TOGGLEBTN=yes
DEFAULT_wxUSE_TOOLBAR=yes
DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes
DEFAULT_wxUSE_TREEBOOK=yes
+ DEFAULT_wxUSE_TOOLBOOK=yes
DEFAULT_wxUSE_TREECTRL=yes
DEFAULT_wxUSE_POPUPWIN=yes
DEFAULT_wxUSE_TIPWINDOW=yes
WX_ARG_ENABLE(no_exceptions, [ --enable-no_exceptions create code without C++ exceptions handling], wxUSE_NO_EXCEPTIONS)
WX_ARG_ENABLE(permissive, [ --enable-permissive compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without dependency information], wxUSE_NO_DEPS)
+WX_ARG_ENABLE(universal_binary, [ --enable-universal_binary create Mac PowerPC and Intel Universal binary (not yet working)], wxUSE_UNIVERSAL_BINARY)
WX_ARG_ENABLE(compat24, [ --enable-compat24 enable wxWidgets 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, enable)
WX_ARG_ENABLE(compat26, [ --disable-compat26 disable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6, disable)
DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes
DEFAULT_wxUSE_TOOLTIPS=yes
DEFAULT_wxUSE_TREEBOOK=yes
+ DEFAULT_wxUSE_TOOLBOOK=yes
DEFAULT_wxUSE_TREECTRL=yes
DEFAULT_wxUSE_POPUPWIN=yes
DEFAULT_wxUSE_TIPWINDOW=yes
DEFAULT_wxUSE_TOOLBAR_SIMPLE=no
DEFAULT_wxUSE_TOOLTIPS=no
DEFAULT_wxUSE_TREEBOOK=no
+ DEFAULT_wxUSE_TOOLBOOK=no
DEFAULT_wxUSE_TREECTRL=no
DEFAULT_wxUSE_POPUPWIN=no
DEFAULT_wxUSE_TIPWINDOW=no
WX_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE)
WX_ARG_ENABLE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT)
WX_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
-WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TABDIALOG)
+WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TAB_DIALOG)
WX_ARG_ENABLE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
WX_ARG_ENABLE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN)
WX_ARG_ENABLE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR)
WX_ARG_ENABLE(tbarnative, [ --enable-tbarnative use native wxToolBar class], wxUSE_TOOLBAR_NATIVE)
WX_ARG_ENABLE(tbarsmpl, [ --enable-tbarsmpl use wxToolBarSimple class], wxUSE_TOOLBAR_SIMPLE)
WX_ARG_ENABLE(treebook, [ --enable-treebook use wxTreebook class], wxUSE_TREEBOOK)
+WX_ARG_ENABLE(toolbook, [ --enable-toolbook use wxToolbook class], wxUSE_TOOLBOOK)
WX_ARG_ENABLE(treectrl, [ --enable-treectrl use wxTreeCtrl class], wxUSE_TREECTRL)
WX_ARG_ENABLE(tipwindow, [ --enable-tipwindow use wxTipWindow class], wxUSE_TIPWINDOW)
WX_ARG_ENABLE(popupwin, [ --enable-popupwin use wxPopUpWindow class], wxUSE_POPUPWIN)
dnl adds -traditional for gcc if needed
AC_PROG_GCC_TRADITIONAL
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
dnl C++-compiler checks
dnl defines CXX with the compiler to use
CXXFLAGS=${CXXFLAGS:=}
AC_BAKEFILE_PROG_CXX
-AC_LANG_RESTORE
+AC_LANG_POP
dnl ranlib command
dnl defines RANLIB with the appropriate command
dnl needed for making link to setup.h
AC_PROG_LN_S
-dnl lndir can be used by "make dist" to save copying files
-AC_CHECK_PROGS(LNDIR, lndir, [cp -pR])
-
dnl ------------------------------------------------------------------------
dnl Platform specific tests
dnl ---------------------------------------------------------------------
dnl (non-OS/2-only piece)
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
AC_TRY_LINK([
fi
fi
- AC_LANG_RESTORE
+ AC_LANG_POP
dnl (end of non-OS/2-only piece)
;;
esac
[if -D__STDC_EXT__ is required],
wx_cv_STDC_EXT_required,
[
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_TRY_COMPILE(
[],
[
wx_cv_STDC_EXT_required=no,
wx_cv_STDC_EXT_required=yes
)
- AC_LANG_RESTORE
+ AC_LANG_POP
]
)
if test "x$wx_cv_STDC_EXT_required" = "xyes"; then
AC_CACHE_CHECK([if expat.h is valid C++ header],
wx_cv_expat_is_not_broken,
[
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_TRY_COMPILE([#include <expat.h>],[],
wx_cv_expat_is_not_broken=yes,
wx_cv_expat_is_not_broken=no
)
- AC_LANG_RESTORE
+ AC_LANG_POP
]
)
if test "$wx_cv_expat_is_not_broken" = "yes" ; then
dnl check what exactly size_t is on this machine - this is necessary to avoid
dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
AC_CACHE_CHECK([if size_t is unsigned int],
wx_cv_size_t_is_uint,
[
fi
fi
-AC_LANG_RESTORE
+AC_LANG_POP
dnl ---------------------------------------------------------------------------
dnl Checks for structures
dnl *printf() functions sometimes are available in the library but not
dnl prototyped -- if this is the case, we can't use them from C++ code, but to
dnl detect this we have to use C++ compiler for testing
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
dnl check for vsnprintf() -- a safe version of vsprintf())
dnl
[AC_MSG_RESULT([no])]);
fi
-AC_LANG_RESTORE
+AC_LANG_POP
if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
AC_CHECK_FUNCS(fnmatch)
dnl check for available version of iconv()
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
AM_ICONV
LIBS="$LIBICONV $LIBS"
-AC_LANG_RESTORE
+AC_LANG_POP
dnl check for POSIX signals if we need them
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
fi
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler,
[
])
])
- AC_LANG_RESTORE
+ AC_LANG_POP
AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler)
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_LANG_PUSH(C++)
AC_CACHE_CHECK([for backtrace() in <execinfo.h>], wx_cv_func_backtrace,
[
fi
fi
- AC_LANG_RESTORE
+ AC_LANG_POP
fi
if test "$wxUSE_STACKWALKER" = "yes" -a "$USE_WIN32" != "1" -a "$USE_UNIX" != "1"; then
if test "$wx_cv_func_statfs" = "yes"; then
dnl check whether we have its dcelaration too: some systems (AIX 4) lack it
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK(for statfs declaration, wx_cv_func_statfs_decl,
AC_TRY_COMPILE(
[
wx_cv_func_statfs_decl=no
)
)
- AC_LANG_RESTORE
+ AC_LANG_POP
if test "$wx_cv_func_statfs_decl" = "yes"; then
AC_DEFINE(HAVE_STATFS_DECL)
dnl
dnl for this check C++ compiler has to be used as passing incompatible
dnl pointers is just a warning and not an error in C
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_CACHE_CHECK(for statvfs argument type, wx_cv_type_statvfs_t,
AC_TRY_COMPILE(
)
)
- AC_LANG_RESTORE
+ AC_LANG_POP
if test "$wx_cv_type_statvfs_t" != "unknown"; then
AC_DEFINE(HAVE_STATVFS)
dnl check for MT-safe version of strtok (on DEC Alpha, it's ok for C compiler
dnl but not for C++ one - hence change language)
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
AC_CHECK_FUNCS(strtok_r)
-AC_LANG_RESTORE
+AC_LANG_POP
dnl check for inet_addr and inet_aton (these may live either in libc, or in
dnl libnsl or libresolv or libsocket)
dnl for it, so testing for it is temporarily disabled and we are restricted
dnl to gethostbyname_r/gethostbyaddr_r and getservbyname_r
+AC_LANG_PUSH(C++)
dnl AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO), [
dnl no getaddrinfo, so check for gethostbyname_r and
dnl related functions (taken from python's configure.in)
dnl check to fit this case, if it's really needed. - SN )
dnl ]
dnl )
+AC_LANG_POP
if test "$wxUSE_THREADS" = "yes"; then
AC_DEFINE(wxUSE_THREADS)
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D__WXDEBUG__"
else
if test "$wxUSE_GTK" = 1 ; then
- CPPFLAGS="-DGTK_NO_CHECK_CASTS $CPPFLAGS"
+ if test "x$wxGTK_VERSION" = "x1" ; then
+ CPPFLAGS="-DGTK_NO_CHECK_CASTS $CPPFLAGS"
+ fi
fi
fi
if test "$ac_cv_func_strptime" = "yes"; then
AC_CACHE_CHECK([for strptime declaration], wx_cv_func_strptime_decl,
[
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_TRY_COMPILE(
[
#include <time.h>
wx_cv_func_strptime_decl=yes,
wx_cv_func_strptime_decl=no
)
- AC_LANG_RESTORE
+ AC_LANG_POP
]
)
fi
wx_cv_func_gettimeofday_has_2_args,
[
dnl on some _really_ old systems it takes only 1 argument
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_TRY_COMPILE(
[
]
)
)
- AC_LANG_RESTORE
+ AC_LANG_POP
])
if test "$wx_cv_func_gettimeofday_has_2_args" != "yes"; then
if test "$ac_cv_header_ole2_h" = "yes" ; then
if test "$GCC" = yes ; then
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
+ AC_LANG_PUSH(C++)
AC_MSG_CHECKING([if g++ requires -fvtable-thunks])
AC_TRY_COMPILE([#include <windows.h>
[AC_MSG_RESULT(no)],
[AC_MSG_RESULT(yes)
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fvtable-thunks"])
- AC_LANG_RESTORE
+ AC_LANG_POP
LIBS=" -lrpcrt4 -loleaut32 -lole32 -luuid$LIBS"
if test "$wxUSE_OLE" = "yes" ; then
AC_DEFINE(wxUSE_OLE)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar"
fi
-if test "$wxUSE_TABDIALOG" = "yes"; then
+if test "$wxUSE_TAB_DIALOG" = "yes"; then
AC_DEFINE(wxUSE_TAB_DIALOG)
fi
USES_CONTROLS=1
fi
+if test "$wxUSE_TOOLBOOK" = "yes"; then
+ AC_DEFINE(wxUSE_TOOLBOOK)
+ USES_CONTROLS=1
+fi
+
if test "$wxUSE_TREECTRL" = "yes"; then
if test "$wxUSE_IMAGLIST" = "yes"; then
AC_DEFINE(wxUSE_TREECTRL)
AC_SUBST(CORE_BASE_LIBS)
AC_SUBST(CORE_GUI_LIBS)
-
dnl ---------------------------------------------------------------------------
dnl Output the makefiles and such from the results found above
dnl ---------------------------------------------------------------------------
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs drawing \
dynamic erase event exec font image minimal mobile \
mobile/wxedit mobile/styles propsize render \
- richedit rotate shaped vscroll widgets"
+ rotate shaped vscroll widgets"
if test "$wxUSE_MONOLITHIC" != "yes"; then
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS console"
BAKEFILE_FORCE_PLATFORM=win32
fi
+dnl ---------------------------------------------------------------------------
+dnl Add Universal binary support
+dnl Note we don't do this earlier because adding these cpp/ld flags could
+dnl cause configure tests to fail.
+dnl ---------------------------------------------------------------------------
+if test "$wxUSE_MAC" = 1 ; then
+ if test "$wxUSE_UNIVERSAL_BINARY" = "yes" ; then
+ CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $CXXFLAGS"
+ CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $CFLAGS"
+ LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 $LDFLAGS"
+ bk_use_pch=no
+ fi
+ # TODO: where do we add "-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" for libtool (static builds only)?
+ # The makefile currently uses AR and RANLIB, which libtool apparently supercedes.
+ # TODO: how can we avoid a hardwired reference to the SDK, above? (Someone used -lSystemStubs to avoid it)
+fi
+
AC_BAKEFILE([m4_include(autoconf_inc.m4)])
+dnl HACK ALERT!!
+dnl For now, we need to alter bk-deps not to generate deps
+dnl when we've configured a Universal binary build.
+dnl The next version of Bakefile will have the correct fix for this
+dnl at which time, this hack can be removed.
+
+if test "$wxUSE_MAC" = 1 ; then
+ if test "$wxUSE_UNIVERSAL_BINARY" = "yes" ; then
+ sed "s/DEPSMODE=gcc/DEPSMODE=none/" < bk-deps > temp
+ mv temp bk-deps
+ chmod +x bk-deps
+ fi
+fi
+
if test "$wxUSE_SHARED" = "yes"; then
dnl We get the shared build linker from bakefile, since it