Remove test for ole2.h from configure

This is unnecessary, this header should always be available, so it was a
waste of time to check for it at best and, actually, this broke the
Cygwin build under AppVeyor as configure didn't find the header somehow,
even if compiling the code using it works perfectly well.
This commit is contained in:
Vadim Zeitlin
2019-11-15 02:07:31 +01:00
parent 428d47f534
commit 37d8b6018c
2 changed files with 14 additions and 85 deletions

60
configure vendored
View File

@@ -35438,67 +35438,21 @@ if test "$wxUSE_METAFILE" = "yes"; then
fi fi
if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ if test "$USE_WIN32" = 1 ; then
-o "$wxUSE_CLIPBOARD" = "yes" \ if test "$wxUSE_OLE" = "yes" ; then
-o "$wxUSE_OLE" = "yes" \ LIBS="-lrpcrt4 -loleaut32 -lole32 -luuid $LIBS"
-o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
ac_fn_c_check_header_compile "$LINENO" "ole2.h" "ac_cv_header_ole2_h" "
"
if test "x$ac_cv_header_ole2_h" = xyes; then :
fi $as_echo "#define wxUSE_OLE 1" >>confdefs.h
$as_echo "#define wxUSE_OLE_AUTOMATION 1" >>confdefs.h
$as_echo "#define wxUSE_ACTIVEX 1" >>confdefs.h
if test "$ac_cv_header_ole2_h" = "yes" ; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto"
if test "$GCC" = yes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ requires -fvtable-thunks" >&5
$as_echo_n "checking if g++ requires -fvtable-thunks... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <windows.h>
#include <ole2.h>
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fvtable-thunks"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
LIBS="-lrpcrt4 -loleaut32 -lole32 -luuid $LIBS"
if test "$wxUSE_OLE" = "yes" ; then
$as_echo "#define wxUSE_OLE 1" >>confdefs.h
$as_echo "#define wxUSE_OLE_AUTOMATION 1" >>confdefs.h
$as_echo "#define wxUSE_ACTIVEX 1" >>confdefs.h
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto"
fi
fi
if test "$wxUSE_DATAOBJ" = "yes" ; then
$as_echo "#define wxUSE_DATAOBJ 1" >>confdefs.h
fi
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Some features disabled because OLE headers not found" >&5
$as_echo "$as_me: WARNING: Some features disabled because OLE headers not found" >&2;}
wxUSE_CLIPBOARD=no wxUSE_CLIPBOARD=no
wxUSE_DRAG_AND_DROP=no wxUSE_DRAG_AND_DROP=no
wxUSE_DATAOBJ=no wxUSE_DATAOBJ=no
wxUSE_OLE=no
fi fi
fi fi

View File

@@ -6517,43 +6517,18 @@ dnl ---------------------------------------------------------------------------
dnl IPC: IPC, Drag'n'Drop, Clipboard, ... dnl IPC: IPC, Drag'n'Drop, Clipboard, ...
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl check for ole headers and disable a few features requiring it if not if test "$USE_WIN32" = 1 ; then
dnl present (earlier versions of mingw32 don't have ole2.h) if test "$wxUSE_OLE" = "yes" ; then
if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ LIBS="-lrpcrt4 -loleaut32 -lole32 -luuid $LIBS"
-o "$wxUSE_CLIPBOARD" = "yes" \
-o "$wxUSE_OLE" = "yes" \
-o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
AC_CHECK_HEADER(ole2.h,,, [ ])
if test "$ac_cv_header_ole2_h" = "yes" ; then AC_DEFINE(wxUSE_OLE)
if test "$GCC" = yes ; then AC_DEFINE(wxUSE_OLE_AUTOMATION)
AC_MSG_CHECKING([if g++ requires -fvtable-thunks]) AC_DEFINE(wxUSE_ACTIVEX)
AC_TRY_COMPILE([#include <windows.h> SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto"
#include <ole2.h>],
[],
[AC_MSG_RESULT(no)],
[AC_MSG_RESULT(yes)
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fvtable-thunks"])
LIBS="-lrpcrt4 -loleaut32 -lole32 -luuid $LIBS"
if test "$wxUSE_OLE" = "yes" ; then
AC_DEFINE(wxUSE_OLE)
AC_DEFINE(wxUSE_OLE_AUTOMATION)
AC_DEFINE(wxUSE_ACTIVEX)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto"
fi
fi
dnl for OLE clipboard and dnd
if test "$wxUSE_DATAOBJ" = "yes" ; then
AC_DEFINE(wxUSE_DATAOBJ)
fi
else else
AC_MSG_WARN([Some features disabled because OLE headers not found])
wxUSE_CLIPBOARD=no wxUSE_CLIPBOARD=no
wxUSE_DRAG_AND_DROP=no wxUSE_DRAG_AND_DROP=no
wxUSE_DATAOBJ=no wxUSE_DATAOBJ=no
wxUSE_OLE=no
fi fi
fi fi