From: levitte Date: Wed, 8 Oct 2008 19:26:25 +0000 (+0000) Subject: Allow for a different location for a proper libusb implementation X-Git-Tag: yubikey-personalisation_0.97-1~128 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e702d63bc9af59ddd96167456913333546d45278;p=yubikey-personalization.old Allow for a different location for a proper libusb implementation git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@33 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- diff --git a/configure.ac b/configure.ac index ea6fe2a..e7c9e14 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,8 @@ AC_SUBST(LT_CURRENT, 0) AC_SUBST(LT_REVISION, 0) AC_SUBST(LT_AGE, 0) +AC_ARG_WITH([usb], [ AS_HELP_STRING([--with-usb], [set libusb root path])]) + AM_INIT_AUTOMAKE([-Wall -Werror]) AC_PROG_CC AC_LIBTOOL_WIN32_DLL @@ -51,6 +53,22 @@ with svn and creating a symbolic link `yubikey-core' to that checkout )) #AC_SEARCH_LIBS([yubikey_parse],[yubikey],,AC_MSG_FAILURE(libyubikey not found)) +if test "$with_usb" != "yes"; then + if test "$with_usb" != ""; then + CFLAGS="$CFLAGS -I$with_usb/include" + CXXFLAGS="$CXXFLAGS -I$with_usb/include" + CPPFLAGS="$CPPFLAGS -I$with_usb/include" + LIBS="$LIBS -L$with_usb/lib" + fi +fi + +AC_CHECK_HEADER([usb.h]) +AC_CHECK_LIB([usb], [usb_init]) + +if test "$ac_cv_header_usb_h" == no; then + AC_MSG_WARN([Missing libusb]) +fi + AC_CONFIG_SUBDIRS(yubikey-core) AC_CONFIG_FILES(Makefile) AC_OUTPUT