mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
* Makefile.am, libusb.m4: New libusb check macro.
This commit is contained in:
parent
14ce45565d
commit
8d3e8193bd
@ -1,3 +1,7 @@
|
|||||||
|
2005-01-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* Makefile.am, libusb.m4: New libusb check macro.
|
||||||
|
|
||||||
2004-12-24 David Shaw <dshaw@jabberwocky.com>
|
2004-12-24 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* libcurl.m4: Rewrite this to use the new --protocols flag I gave
|
* libcurl.m4: Rewrite this to use the new --protocols flag I gave
|
||||||
|
@ -1 +1 @@
|
|||||||
EXTRA_DIST = intmax.m4 longdouble.m4 longlong.m4 printf-posix.m4 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 readline.m4 libcurl.m4
|
EXTRA_DIST = intmax.m4 longdouble.m4 longlong.m4 printf-posix.m4 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 readline.m4 libcurl.m4 libusb.m4
|
||||||
|
50
m4/libusb.m4
Normal file
50
m4/libusb.m4
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
dnl Check for libusb
|
||||||
|
dnl Copyright (C) 2004 Free Software Foundation, Inc.
|
||||||
|
dnl
|
||||||
|
dnl This file is free software, distributed under the terms of the GNU
|
||||||
|
dnl General Public License. As a special exception to the GNU General
|
||||||
|
dnl Public License, this file may be distributed as part of a program
|
||||||
|
dnl that contains a configuration script generated by Autoconf, under
|
||||||
|
dnl the same distribution terms as the rest of that program.
|
||||||
|
dnl
|
||||||
|
dnl Defines HAVE_LIBUSB to 1 if a working libusb setup is found, and sets
|
||||||
|
dnl @LIBUSB@ to the necessary libraries. HAVE_USB_GET_BUSSES is set if
|
||||||
|
dnl usb_get_busses() exists.
|
||||||
|
|
||||||
|
AC_DEFUN([GNUPG_CHECK_LIBUSB],
|
||||||
|
[
|
||||||
|
AC_ARG_WITH(libusb,
|
||||||
|
AC_HELP_STRING([--with-libusb=DIR],
|
||||||
|
[look for the libusb library in DIR]),
|
||||||
|
[_do_libusb=$withval],[_do_libusb=yes])
|
||||||
|
|
||||||
|
if test "$_do_libusb" != "no" ; then
|
||||||
|
if test -d "$withval" ; then
|
||||||
|
CPPFLAGS="${CPPFLAGS} -I$withval/include"
|
||||||
|
LDFLAGS="${LDFLAGS} -L$withval/lib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
_libusb_save_libs=$LIBS
|
||||||
|
LIBS="$LIBS -lusb"
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether libusb is present and sane])
|
||||||
|
|
||||||
|
AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <usb.h>],[
|
||||||
|
usb_bulk_write(NULL,0,NULL,0,0);
|
||||||
|
]),_found_libusb=yes,_found_libusb=no)
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$_found_libusb])
|
||||||
|
|
||||||
|
if test $_found_libusb = yes ; then
|
||||||
|
AC_DEFINE(HAVE_LIBUSB,1,
|
||||||
|
[Define to 1 if you have a fully functional libusb library.])
|
||||||
|
AC_SUBST(LIBUSB,"-lusb")
|
||||||
|
AC_CHECK_FUNCS(usb_get_busses)
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIBS=$_libusb_save_libs
|
||||||
|
|
||||||
|
unset _libusb_save_libs
|
||||||
|
unset _found_libusb
|
||||||
|
fi
|
||||||
|
])dnl
|
Loading…
x
Reference in New Issue
Block a user