Allow using debug help API with non-MSVC compilers
MinGW64 and TDM-GCC come with imagehlp.h and can compile the code using debug help API too, so enable wxUSE_DBGHELP when using these compilers by default and also allow enabling it via a configure option.
This commit is contained in:
29
configure.in
29
configure.in
@@ -744,6 +744,7 @@ WX_ARG_FEATURE(protocol_file, [ --enable-protocol-file FILE support in wxProto
|
||||
WX_ARG_FEATURE(threads, [ --enable-threads use threads], wxUSE_THREADS)
|
||||
|
||||
if test "$wxUSE_MSW" = 1 ; then
|
||||
WX_ARG_DISABLE(dbghelp, [ --enable-dbghelp use dbghelp.dll API (Win32 only)], wxUSE_DBGHELP)
|
||||
WX_ARG_ENABLE(iniconf, [ --enable-iniconf use wxIniConfig (Win32 only)], wxUSE_INICONF)
|
||||
WX_ARG_FEATURE(regkey, [ --enable-regkey use wxRegKey class (Win32 only)], wxUSE_REGKEY)
|
||||
fi
|
||||
@@ -7159,6 +7160,34 @@ if test "$wxUSE_AUTOID_MANAGEMENT" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$USE_WIN32" = 1 ; then
|
||||
if test "$wxUSE_DBGHELP" = "yes"; then
|
||||
AC_CACHE_CHECK([if debug help API is available], wx_cv_lib_debughlp,
|
||||
[
|
||||
dnl we need just the header, not the library, as we load the
|
||||
dnl DLL dynamically anyhow during run-time
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_COMPILE(
|
||||
[#include <windows.h>
|
||||
#include <imagehlp.h>],
|
||||
[
|
||||
#ifndef API_VERSION_NUMBER
|
||||
#error API_VERSION_NUMBER not defined!
|
||||
#endif
|
||||
],
|
||||
wx_cv_lib_debughlp=yes,
|
||||
wx_cv_lib_debughlp=no
|
||||
)
|
||||
AC_LANG_POP()
|
||||
]
|
||||
)
|
||||
|
||||
if test "$wx_cv_lib_debughlp" = yes; then
|
||||
AC_DEFINE(wxUSE_DBGHELP)
|
||||
else
|
||||
AC_MSG_WARN([Debug help API and wxStackWalker won't be available])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_INICONF" = "yes"; then
|
||||
AC_DEFINE(wxUSE_INICONF)
|
||||
fi
|
||||
|
Reference in New Issue
Block a user