mirror of https://github.com/encounter/SDL.git
autotools: improved detection of windows.gaming.input.h
similar to cmake commit 83583dc49d
This commit is contained in:
parent
83583dc49d
commit
0673e448f0
|
@ -24861,11 +24861,31 @@ $as_echo "#define HAVE_XINPUT_STATE_EX 1" >>confdefs.h
|
|||
fi
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "windows.gaming.input.h" "ac_cv_header_windows_gaming_input_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_windows_gaming_input_h" = xyes; then :
|
||||
have_wgi=yes
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.gaming.input.h" >&5
|
||||
$as_echo_n "checking for windows.gaming.input.h... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#define COBJMACROS
|
||||
#include <windows.gaming.input.h>
|
||||
__x_ABI_CWindows_CGaming_CInput_CIGamepadStatics2 *s2;
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
have_wgi=yes
|
||||
else
|
||||
have_wgi=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_wgi" >&5
|
||||
$as_echo "$have_wgi" >&6; }
|
||||
|
||||
if test x$have_wgi = xyes; then
|
||||
|
||||
|
|
|
@ -3271,7 +3271,14 @@ XINPUT_STATE_EX s1;
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(windows.gaming.input.h, have_wgi=yes)
|
||||
AC_MSG_CHECKING(for windows.gaming.input.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#define COBJMACROS
|
||||
#include <windows.gaming.input.h>
|
||||
__x_ABI_CWindows_CGaming_CInput_CIGamepadStatics2 *s2;
|
||||
]],[])], [have_wgi=yes],[have_wgi=no])
|
||||
AC_MSG_RESULT($have_wgi)
|
||||
|
||||
if test x$have_wgi = xyes; then
|
||||
AC_DEFINE(HAVE_WINDOWS_GAMING_INPUT_H, 1, [ ])
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue