mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
scd: Fix detection of libusb.
* configure.ac (HAVE_LIBUSB): Clear if no header file was found. (LIBUSB_LIBS): Ditto. -- This allows to use commit d0d9708 when libusb is installed without the header files. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
ab7d41b69c
commit
1b90b52a56
14
configure.ac
14
configure.ac
@ -797,10 +797,7 @@ if test "$use_ccid_driver" = yes ; then
|
|||||||
esac
|
esac
|
||||||
AC_CHECK_LIB(usb-1.0, libusb_init,
|
AC_CHECK_LIB(usb-1.0, libusb_init,
|
||||||
[ LIBUSB_LIBS="$LIBUSB_LIBS"
|
[ LIBUSB_LIBS="$LIBUSB_LIBS"
|
||||||
AC_DEFINE(HAVE_LIBUSB,1, [defined if libusb is available])
|
have_libusb=yes ])
|
||||||
have_libusb=yes
|
|
||||||
])
|
|
||||||
AC_DEFINE([HAVE_LIBUSB])
|
|
||||||
AC_MSG_CHECKING([libusb include dir])
|
AC_MSG_CHECKING([libusb include dir])
|
||||||
usb_incdir_found="no"
|
usb_incdir_found="no"
|
||||||
for _incdir in "" "/usr/include/libusb-1.0" "/usr/local/include/libusb-1.0"; do
|
for _incdir in "" "/usr/include/libusb-1.0" "/usr/local/include/libusb-1.0"; do
|
||||||
@ -819,9 +816,16 @@ if test "$use_ccid_driver" = yes ; then
|
|||||||
AC_MSG_RESULT([${usb_incdir}])
|
AC_MSG_RESULT([${usb_incdir}])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([not found])
|
AC_MSG_RESULT([not found])
|
||||||
|
usb_incdir=""
|
||||||
|
have_libusb=no
|
||||||
use_ccid_driver=no
|
use_ccid_driver=no
|
||||||
|
LIBUSB_LIBS=""
|
||||||
fi
|
fi
|
||||||
if test "$usb_incdir" = ""; then
|
|
||||||
|
if test "$have_libusb" = yes; then
|
||||||
|
AC_DEFINE(HAVE_LIBUSB,1, [defined if libusb is available])
|
||||||
|
fi
|
||||||
|
if test x"$usb_incdir" = x; then
|
||||||
LIBUSB_CPPFLAGS=""
|
LIBUSB_CPPFLAGS=""
|
||||||
else
|
else
|
||||||
LIBUSB_CPPFLAGS="-I${usb_incdir}"
|
LIBUSB_CPPFLAGS="-I${usb_incdir}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user