2 configure.in | 35 +++++++++++------------------------
3 1 file changed, 11 insertions(+), 24 deletions(-)
11 -dnl check for libusb-config
12 -AC_CHECK_TOOL(HAVELIBUSB, libusb-config)
14 -if test ! -z "$HAVELIBUSB"; then
15 - LIBUSB_CFLAGS=`$HAVELIBUSB --cflags`
16 - LIBUSB_LIBS=`$HAVELIBUSB --libs`
18 - CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
19 - LIBS="$LIBS $LIBUSB_LIBS"
21 - AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation.])
24 -dnl check for version of libusb
25 -AC_MSG_CHECKING([if libusb version is >= 0.1.7])
26 -libusb_version_needed="1007"
27 -libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'`
29 +PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11)
30 +CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
31 +LIBS="$LIBS $LIBUSB_LIBS"
33 -if test $libusb_version -lt $libusb_version_needed; then
35 - AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.7.])
39 +dnl Check for recent pkg-config which supports Requires.private
40 +case `$PKG_CONFIG --version` in
41 +0.?|0.1[0-7]) PKGCONFIG_REQUIRES="Requires"; ;;
42 +*) PKGCONFIG_REQUIRES="Requires.private"; ;;
44 +AC_SUBST(PKGCONFIG_REQUIRES)
47 AC_ARG_WITH(async-mode,