mainly fixes for cross compiling..
- fixed vsnprintf detection for MSW - don't do getsockname test for mingw (and presumably for cygwin) as they use winsock - fixed broken ole2.h test, add -fvtable-thunks for gcc if we find it. changed MAC_DIST to MACX_DIST since autoconf thinks MAC_ is a macro.. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -691,7 +691,7 @@ MOTIF_DIST: ALL_GUI_DIST
|
|||||||
cp $(MOTIFDIR)/xmcombo/*.h $(DISTDIR)/src/motif/xmcombo
|
cp $(MOTIFDIR)/xmcombo/*.h $(DISTDIR)/src/motif/xmcombo
|
||||||
cp $(MOTIFDIR)/xmcombo/copying.txt $(DISTDIR)/src/motif/xmcombo
|
cp $(MOTIFDIR)/xmcombo/copying.txt $(DISTDIR)/src/motif/xmcombo
|
||||||
|
|
||||||
MAC_DIST: ALL_GUI_DIST
|
MACX_DIST: ALL_GUI_DIST
|
||||||
echo "Apple Mac OS X specific distribution not complete"
|
echo "Apple Mac OS X specific distribution not complete"
|
||||||
|
|
||||||
MSW_DIST: ALL_GUI_DIST
|
MSW_DIST: ALL_GUI_DIST
|
||||||
|
48
configure.in
48
configure.in
@@ -1906,7 +1906,8 @@ if test "$wxUSE_MAC" = 1; then
|
|||||||
TOOLKIT=MAC
|
TOOLKIT=MAC
|
||||||
UNIXOBJS="\$(UNIX_OBJS)"
|
UNIXOBJS="\$(UNIX_OBJS)"
|
||||||
UNIXDEPS="\$(UNIX_DEPS)"
|
UNIXDEPS="\$(UNIX_DEPS)"
|
||||||
GUIDIST=MAC_DIST
|
dnl we can't call this MAC_DIST or autoconf thinks its a macro
|
||||||
|
GUIDIST=MACX_DIST
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_PM" = 1; then
|
if test "$wxUSE_PM" = 1; then
|
||||||
@@ -2377,6 +2378,9 @@ dnl understand why it works, remember that AC_TRY_COMPILE() just prepends
|
|||||||
dnl "int main() {" in the beginning of the code and "; return 0; }" at the
|
dnl "int main() {" in the beginning of the code and "; return 0; }" at the
|
||||||
dnl end...
|
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 check for vsnprintf() - a safe version of vsprintf()
|
dnl check for vsnprintf() - a safe version of vsprintf()
|
||||||
AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
|
AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
|
||||||
[
|
[
|
||||||
@@ -2401,11 +2405,34 @@ AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
|
|||||||
], [
|
], [
|
||||||
AC_DEFINE(HAVE_VSNPRINTF)
|
AC_DEFINE(HAVE_VSNPRINTF)
|
||||||
wx_cv_func_vsnprintf=yes
|
wx_cv_func_vsnprintf=yes
|
||||||
|
], [
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#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);
|
||||||
|
], [
|
||||||
|
AC_DEFINE(HAVE_VSNPRINTF)
|
||||||
|
wx_cv_func_vsnprintf=yes
|
||||||
], [
|
], [
|
||||||
AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
|
AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
|
||||||
wx_cv_func_vsnprintf=no
|
wx_cv_func_vsnprintf=no
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl check for vsscanf()
|
dnl check for vsscanf()
|
||||||
AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
|
AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
|
||||||
@@ -3226,8 +3253,9 @@ if test "$wxUSE_SOCKETS" = "yes"; then
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
dnl this test may be appropriate if building under cygwin
|
||||||
dnl if !MSW
|
dnl right now I'm assuming it also uses the winsock stuff
|
||||||
|
dnl like mingw does.. -- RL
|
||||||
|
|
||||||
if test "$wxUSE_SOCKETS" = "yes" ; then
|
if test "$wxUSE_SOCKETS" = "yes" ; then
|
||||||
dnl determine the type of third argument for getsockname
|
dnl determine the type of third argument for getsockname
|
||||||
@@ -3283,6 +3311,9 @@ if test "$wxUSE_SOCKETS" = "yes" ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
dnl if !MSW
|
||||||
|
|
||||||
if test "$wxUSE_SOCKETS" = "yes" ; then
|
if test "$wxUSE_SOCKETS" = "yes" ; then
|
||||||
AC_DEFINE(wxUSE_SOCKETS)
|
AC_DEFINE(wxUSE_SOCKETS)
|
||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets"
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets"
|
||||||
@@ -3528,8 +3559,17 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
|
|||||||
if test "$USE_WIN32" = 1; then
|
if test "$USE_WIN32" = 1; then
|
||||||
dnl check for ole headers and disable DnD if not present (earlier
|
dnl check for ole headers and disable DnD if not present (earlier
|
||||||
dnl versions of mingw32 don't have them)
|
dnl versions of mingw32 don't have them)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(ole2.h)
|
AC_CHECK_HEADERS(ole2.h)
|
||||||
if test "x$HAVE_OLE2_H" = x ; then
|
|
||||||
|
dnl for some reason this test always fails here??
|
||||||
|
dnl if test "x$HAVE_OLE2_H" != x ; then
|
||||||
|
dnl this one does the right thing though
|
||||||
|
if test "$ac_cv_header_ole2_h" = "yes" ; then
|
||||||
|
if test "$GCC" = yes ; then
|
||||||
|
CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"
|
||||||
|
fi
|
||||||
|
else
|
||||||
AC_MSG_WARN(Drag and drop disabled because OLE headers not found)
|
AC_MSG_WARN(Drag and drop disabled because OLE headers not found)
|
||||||
wxUSE_DRAG_AND_DROP=no
|
wxUSE_DRAG_AND_DROP=no
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user