From b46a86284d47219e6e915783c09e1f520c8350ce Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Fri, 17 Jan 2014 08:27:48 +0000 Subject: [PATCH] * configure.ac (libhid): Turn from AC_TRY_RUN into AC_TRY_COMPILE, so it also works for cross-compilation setups. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1267 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 6 ++++++ configure.ac | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 139758ac..79f4b335 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-01-17 Joerg Wunsch + + * configure.ac (libhid): Turn from AC_TRY_RUN into + AC_TRY_COMPILE, so it also works for cross-compilation + setups. + 2014-01-16 Joerg Wunsch * dfu.c (dfu_init): Move the descriptor checks up into the diff --git a/configure.ac b/configure.ac index a3a3739c..283d7efb 100644 --- a/configure.ac +++ b/configure.ac @@ -215,11 +215,10 @@ LIBS="${LIBS} ${LIBHID}" AH_TEMPLATE([HAVE_LIBHID], [Define if HID support is enabled via the Win32 DDK]) -AC_TRY_RUN([#include +AC_TRY_LINK([#include #include -$HIDINCLUDE - -int +$HIDINCLUDE], +[int main(void) { GUID hidGuid; @@ -227,7 +226,7 @@ main(void) return 0; } -], [have_libhid=yes], [have_libhid=no], [have_libhid=no]) +], [have_libhid=yes], [have_libhid=no]) AC_MSG_RESULT([$have_libhid]) if test x$have_libhid = xyes; then AC_DEFINE([HAVE_LIBHID])