]> err.no Git - yubikey-personalization.old/commitdiff
Check that yubikey-core/ykcore.h declares yk_usb_strerror
authorRichard Levitte <levitte@lp.se>
Mon, 9 Mar 2009 18:20:41 +0000 (18:20 +0000)
committerRichard Levitte <levitte@lp.se>
Mon, 9 Mar 2009 18:20:41 +0000 (18:20 +0000)
configure.ac

index 081388bfbfac3c045ff9208909b0f83b7da036f6..8aa3ec951952e6cd45d968ce2d6dc56ad658f179 100644 (file)
@@ -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"