+dnl check for ole headers and disable a few features requiring it if not
+dnl present (earlier versions of mingw32 don't have ole2.h)
+if test "$USE_WIN32" = 1; then
+ AC_CHECK_HEADERS(ole2.h)
+
+ if test "$ac_cv_header_ole2_h" = "yes" ; then
+ if test "$GCC" = yes ; then
+ ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
+ ALL_DEPFILES="$ALL_DEPFILES \$(OLEDEPS)"
+ CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"
+ LIBS="$LIBS -lrpcrt4 -loleaut32 -lole32 -luuid"
+ 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
+ fi
+
+ dnl this is for MSW only, so we test for it inside "if USE_WIN32"
+ 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
+