From cacb4a6da6d84187b59fcfd9f9c8d33d37e44957 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 9 Mar 2009 18:20:41 +0000 Subject: [PATCH] Check that yubikey-core/ykcore.h declares yk_usb_strerror --- configure.ac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 081388b..8aa3ec9 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,7 @@ AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL # This really checks a directory -AC_CHECK_FILE(yubikey-core/configure.ac,,AC_MSG_FAILURE(yubikey-core directory not found. +AC_CHECK_FILES([yubikey-core/configure.ac yubikey-core/ykcore.h],,AC_MSG_FAILURE(yubikey-core directory not found. ************************************ Please provide by checking out http://yubikey-core.googlecode.com/svn/trunk @@ -53,6 +53,15 @@ with svn and creating a symbolic link `yubikey-core' to that checkout )) #AC_SEARCH_LIBS([yubikey_parse],[yubikey],,AC_MSG_FAILURE(libyubikey not found)) +# Check that the yubikey-core we try to use is modern enough +AC_MSG_CHECKING(if yubikey-core/ykcore.h declares yk_usb_strerror) +AC_EGREP_CPP([yk_usb_strerror], + [#include "yubikey-core/ykcore.h"], + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + AC_MSG_FAILURE(yubikey-core/ykcore.h does not declare yk_usb_strerror. +You probably need to update yubikey-core)) + if test "$with_usb" != "yes"; then if test "$with_usb" != ""; then CFLAGS="$CFLAGS -I$with_usb/include" -- 2.39.5