AC_DEFINE(__EMX__)
PROGRAM_EXT=".exe"
DEFAULT_DEFAULT_wxUSE_PM=1
- LIBS="$LIBS -lstdcpp"
;;
powerpc-*-darwin* )
DEFAULT_wxUSE_FONTMAP=no
DEFAULT_wxUSE_STREAMS=no
DEFAULT_wxUSE_SOCKETS=no
+ DEFAULT_wxUSE_OLE=no
+ DEFAULT_wxUSE_DATAOBJ=no
DEFAULT_wxUSE_DIALUP_MANAGER=no
DEFAULT_wxUSE_JOYSTICK=no
DEFAULT_wxUSE_DYNLIB_CLASS=no
DEFAULT_wxUSE_FONTMAP=yes
DEFAULT_wxUSE_STREAMS=yes
DEFAULT_wxUSE_SOCKETS=yes
+ DEFAULT_wxUSE_OLE=yes
+ DEFAULT_wxUSE_DATAOBJ=yes
DEFAULT_wxUSE_DIALUP_MANAGER=yes
DEFAULT_wxUSE_JOYSTICK=yes
DEFAULT_wxUSE_DYNLIB_CLASS=yes
WX_ARG_ENABLE(http, [ --enable-http use wxHTTP (requires wxProtocol], wxUSE_PROTOCOL_HTTP)
WX_ARG_ENABLE(fileproto, [ --enable-fileproto use wxFileProto class (requires wxProtocol], wxUSE_PROTOCOL_FILE)
WX_ARG_ENABLE(sockets, [ --enable-sockets use socket/network classes], wxUSE_SOCKETS)
+WX_ARG_ENABLE(ole, [ --enable-ole use OLE classes], wxUSE_OLE)
+WX_ARG_ENABLE(dataobj, [ --enable-dataobj use data object classes], wxUSE_DATAOBJ)
WX_ARG_ENABLE(ipc, [ --enable-ipc use interprocess communication (wxSocket etc.)], wxUSE_IPC)
dnl Stem for flex output; lexyy for OS/2, lex.yy otherwise
case "${host}" in
*-pc-os2_emx | *-pc-os2-emx )
- dnl PATH_IFS is autodetected by OS/2's configure (usually ';')
+ PATH_IFS=';'
+dnl Really ought to text for this as meanwhile there are flex versions using
+dnl lex.yy as well due to FAT support being more and more dropped...
LEX_STEM="lexyy"
;;
*)
AC_MSG_RESULT(base ($host_alias hosted) only)
fi
+dnl ---------------------------------------------------------------------------
+dnl When we are using gcc on OS/2, we want to be either using resources (PM)
+dnl or a more complete POSIX emulation for Motif/GTK+/X11
+dnl ---------------------------------------------------------------------------
+dnl (OS/2-only piece)
+case "${host}" in
+ *-pc-os2_emx | *-pc-os2-emx )
+ dnl Explicitly link -lstdcpp, since we are using "gcc" not "g++"/"c++".
+ LIBS="$LIBS -lstdcpp"
+ if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
+ dnl More complete Unix emulation for unix-like ports
+ dnl by linking in POSIX/2's cExt (if available).
+ AC_CHECK_LIB(cExt, drand48, LIBS="$LIBS -lcExt")
+ else
+ dnl Include resources for the "native" port (wxPM).
+ RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res"
+ fi
+ ;;
+esac
+dnl (end of OS/2-only piece)
+
dnl ---------------------------------------------------------------------------
dnl When we are using Cygwin with Motif/GTK+, we want it to appear like
dnl 'just' a POSIX platform, so the Win32 API must not be available
dnl ---------------------------------------------------------------------------
-
dnl (Windows-only piece)
wants_win32=0
doesnt_want_win32=0
mesa_link=" -lMesaGL"
AC_MSG_RESULT(found at $ac_find_libraries)
else
- AC_MSG_ERROR(no)
+ mesa_link=""
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(library will be compiled without Mesa support)
fi
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwine$mesa_link$xpm_link -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses"
AC_MSG_WARN([Wide character support is unavailable])
fi
-dnl check for vprintf/vsprintf() which are GNU extensions
-AC_FUNC_VPRINTF
-
-dnl check for vsscanf() and vsnprintf() - on some platforms (Linux, glibc
-dnl 2.1.1 for the first one, HP-UX for the second) it's available in the
-dnl library but the prototype is missing, so we can't use AC_CHECK_FUNCS() here,
-dnl do it manually. We can't use AC_TRY_COMPILE(), either, because it doesn't
-dnl check if the symbol is available at linking time
-
-dnl we use AC_TRY_LINK() here instead of AC_TRY_RUN() to make the checks
-dnl work for cross-compilation, but AC_TRY_LINK() normally only compiles
-dnl one function while we need at least 2 - hence the ugly hack below. To
-dnl understand why it works, remember that AC_TRY_LINK() just prepends
-dnl "int main() {" in the beginning of the code and "; return 0; }" at the
-dnl end...
-
-dnl if we fail to find vsnprintf, also try for _vsnprintf as that is what
-dnl we'll find under MSW if it exists.
-
-dnl final note: AC_TRY_LINK will only be executed if there is nothing in
-dnl the cache so we have to do AC_DEFINE(HAVE_VSNPRINTF) below and not inside
-dnl it or the symbol wouldn't be defined for the 2nd and subsequent configure
-dnl runs
+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
-dnl check for vsnprintf() - a safe version of vsprintf()
-AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
-[
- AC_TRY_LINK([
- #include <stdio.h>
- #include <stdarg.h>
- ], [
- int wx_test_vsnprintf(const char *, ...);
-
- wx_test_vsnprintf("%s");
- return 0;
- }
-
- int wx_test_vsnprintf(const char *fmt, ...)
- {
- char *s;
-
- va_list argp;
- va_start(argp, fmt);
- vsnprintf(s, 42, fmt, argp);
- va_end(argp);
- ], [
- wx_cv_func_vsnprintf=yes
- ], [
- AC_TRY_LINK([
- #include <stdio.h>
- #include <stdarg.h>
- ], [
- int wx_test_vsnprintf(const char *, ...);
-
- wx_test_vsnprintf("%s");
- return 0;
- }
-
- int wx_test_vsnprintf(const char *fmt, ...)
- {
- char *s;
-
- va_list argp;
- va_start(argp, fmt);
- _vsnprintf(s, 42, fmt, argp);
- va_end(argp);
- ], [
- wx_cv_func_vsnprintf=yes
- ], [
- wx_cv_func_vsnprintf=no
- ])
- ])
-])
+dnl check for vsnprintf() -- a safe version of vsprintf())
+AC_CHECK_FUNCS(vsnprintf)
-if test "$wx_cv_func_vsnprintf" = yes; then
- AC_DEFINE(HAVE_VSNPRINTF)
-else
- AC_MSG_WARN(unsafe function vsprintf will be used instead of vsnprintf)
+if test "$wxUSE_UNICODE" = yes; then
+ dnl also look if we have wide char IO functions
+ AC_CHECK_FUNCS(fputwc wprintf vswprintf)
fi
-dnl check for vsscanf()
-AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
-[
- AC_TRY_COMPILE([
- #include <stdio.h>
- #include <stdarg.h>
- ], [
- int wx_test_vsscanf(const char *, ...);
-
- wx_test_vsscanf("%d");
- return 0;
- }
-
- int wx_test_vsscanf(const char *fmt, ...)
- {
- va_list argp;
- va_start(argp, fmt);
- vsscanf("42", fmt, argp);
- va_end(argp);
- ], [
- wx_cv_func_vsscanf=yes
- ], [
- wx_cv_func_vsscanf=no
- ])
-])
+AC_LANG_RESTORE
-if test "$wx_cv_func_vsscanf" = yes; then
- AC_DEFINE(HAVE_VSSCANF)
-fi
-if test "$wxUSE_UNICODE" = yes; then
- dnl look if we have wide char IO functions
- AC_CHECK_FUNCS(fputwc wprintf)
-fi
dnl the following tests are for Unix(like) systems only
if test "$TOOLKIT" != "MSW"; then
fi
fi
-dnl check for vfork() (even if it's the same as fork() in modern Unices)
-AC_CHECK_FUNCS(vfork)
-
dnl check for the function for temp files creation
AC_CHECK_FUNCS(mkstemp mktemp, break)
AC_CACHE_SAVE
dnl ---------------------------------------------------------------------------
-dnl thread support for Unix (always available under Win32)
+dnl thread support for Unix (for Win32 see past the next matching "else")
dnl ---------------------------------------------------------------------------
-dnl under MSW we always have thread support
+dnl under MSW (except mingw32) we always have thread support
CPP_MT_FLAG=
+COMMON_THREADCPPFLAGS=
if test "$TOOLKIT" != "MSW"; then
dnl the code below:
fi
dnl from if !MSW
+else
+ if test "$wxUSE_THREADS" = "yes" ; then
+ case "${host}" in
+ *-*-mingw32* )
+ CFLAGS="$CFLAGS -mthreads"
+ CXXFLAGS="$CXXFLAGS -mthreads"
+ COMMON_THREADCPPFLAGS="-mthreads"
+ LDFLAGS="$LDFLAGS -mthreads"
+ ;;
+ esac
+ fi
fi
if test "$wxUSE_THREADS" = "yes"; then
dnl wxSocket
dnl ------------------------------------------------------------------------
-dnl VZ: the GUI hooks wxSocket needs are not implemented yet in wxX11
+dnl VZ: the GUI hooks wxSocket needs are not implemented yet in wxMGL
if test "$wxUSE_SOCKETS" = "yes"; then
if test "$wxUSE_MGL" = "1"; then
AC_MSG_WARN([wxSocket not yet supported under MGL... disabled])
dnl present (earlier versions of mingw32 don't have ole2.h)
if test "$wxUSE_MSW" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
-o "$wxUSE_CLIPBOARD" = "yes" \
+ -o "$wxUSE_OLE" = "yes" \
-o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
AC_CHECK_HEADERS(ole2.h)
if test "$ac_cv_header_ole2_h" = "yes" ; then
if test "$GCC" = yes ; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ AC_MSG_CHECKING([if g++ requires -fvtable-thunks])
+ AC_TRY_COMPILE([#include <windows.h>
+ #include <ole2.h>],
+ [],
+ [AC_MSG_RESULT(no)],
+ [AC_MSG_RESULT(yes)
+ CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"])
+ AC_LANG_RESTORE
ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
- CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"
LIBS=" -lrpcrt4 -loleaut32 -lole32 -luuid$LIBS"
AC_DEFINE(wxUSE_OLE)
wxUSE_CLIPBOARD=no
wxUSE_DRAG_AND_DROP=no
wxUSE_DATAOBJ=no
+ wxUSE_OLE=no
+ fi
+
+ if test "$wxUSE_METAFILE" = "yes"; then
+ AC_DEFINE(wxUSE_METAFILE)
+
+ dnl this one should probably be made separately configurable
+ AC_DEFINE(wxUSE_ENH_METAFILE)
+ fi
+fi
+
+if test "$wxUSE_WINE" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
+ -o "$wxUSE_CLIPBOARD" = "yes" \
+ -o "$wxUSE_OLE" = "yes" \
+ -o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
+ AC_CHECK_HEADERS(ole2.h)
+
+ if test "$ac_cv_header_ole2_h" = "yes" ; then
+ if test "$GCC" = yes ; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ AC_MSG_CHECKING([if g++ requires -fvtable-thunks])
+ AC_TRY_COMPILE([#include <windows.h>
+ #include <ole2.h>],
+ [],
+ [AC_MSG_RESULT(no)],
+ [AC_MSG_RESULT(yes)
+ CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"])
+ AC_LANG_RESTORE
+ ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
+ LIBS=" -lwine_uuid$LIBS"
+ AC_DEFINE(wxUSE_OLE)
+
+ fi
+
+ dnl for OLE clipboard and dnd
+ AC_DEFINE(wxUSE_DATAOBJ)
+ else
+ AC_MSG_WARN([Some features disabled because OLE headers not found])
+
+ wxUSE_CLIPBOARD=no
+ wxUSE_DRAG_AND_DROP=no
+ wxUSE_DATAOBJ=no
+ wxUSE_OLE=no
fi
if test "$wxUSE_METAFILE" = "yes"; then
AC_SUBST(PORT_FILES)
AC_SUBST(DISTDIR)
+AC_SUBST(COMMON_THREADCPPFLAGS)
dnl additional subdirectories where we will build
AC_SUBST(SAMPLES_SUBDIRS)