fix AC_CHECK_HEADER for libusb.h
parent
4fbb9f31ab
commit
282558379e
|
@ -24574,15 +24574,17 @@ else
|
|||
$as_echo "yes" >&6; }
|
||||
have_libusb=yes
|
||||
fi
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$save_CPPFLAGS $LIBUSB_CFLAGS"
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_libusb_h" = xyes; then :
|
||||
have_libusb_h=yes
|
||||
else
|
||||
have_libusb_h=no
|
||||
fi
|
||||
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
if test x$have_libusb_h = xno && test x$require_hidapi_libusb = xyes; then
|
||||
hidapi_support=no
|
||||
fi
|
||||
|
|
|
@ -3415,10 +3415,10 @@ AS_HELP_STRING([--enable-hidapi-libusb], [use libusb for low level joystick driv
|
|||
hidapi_support=yes
|
||||
if test x$enable_hidapi_libusb = xyes; then
|
||||
PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], have_libusb=yes, have_libusb=no)
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
|
||||
AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$save_CPPFLAGS $LIBUSB_CFLAGS"
|
||||
AC_CHECK_HEADER(libusb.h, have_libusb_h=yes, have_libusb_h=no)
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
if test x$have_libusb_h = xno && test x$require_hidapi_libusb = xyes; then
|
||||
hidapi_support=no
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue