aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-05-09 00:47:30 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-05-09 00:47:30 +0100
commit3d928d8dfe2d9af8b3d3ad2eb1d4b878d68704c4 (patch)
treeafd9aac45d87ca26cd83e5b176069195250a3d7f /configure.ac
parentd070ed533fe8afdc672c6f04875f2c73f478c196 (diff)
parent260123716172d33f44bdc0e4e5422554d139215c (diff)
downloadlibphidget21-3d928d8dfe2d9af8b3d3ad2eb1d4b878d68704c4.tar.gz
Merge tag 'upstream/2.1.8.20120507'
Upstream version 2.1.8.20120507
Diffstat (limited to '')
-rw-r--r--configure.ac25
1 files changed, 22 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 559e4da..f49f25e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,8 +25,7 @@ AC_SEARCH_LIBS([sqrt], [m], [],
AC_MSG_ERROR([Missing libm!]))
AC_SEARCH_LIBS([pthread_join], [pthread], [],
AC_MSG_ERROR([Missing libpthread!]))
-AC_SEARCH_LIBS([usb_find_busses], [usb], [],
- AC_MSG_ERROR([Missing libusb!]))
+
# we need iconv - if it's not available in libc, look for the 'libiconv' function from libiconv.so
AC_SEARCH_LIBS([iconv], [iconv], [],
AC_SEARCH_LIBS([libiconv], [iconv], [],
@@ -81,6 +80,25 @@ AC_ARG_ENABLE([labview],
esac],[labview=false])
AM_CONDITIONAL([LABVIEW], [test x$labview = xtrue])
+AC_ARG_ENABLE([oldlibusb],
+[ --enable-oldlibusb Use libusb-0.1 instead of 1.0],
+[case "${enableval}" in
+ yes) newlibusb=false ;;
+ no) newlibusb=true ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-oldlibusb]) ;;
+esac],[newlibusb=true])
+
+if test "$newlibusb" = "true"; then
+AC_SEARCH_LIBS([libusb_init], [usb-1.0], [newlibusb=true],
+ AC_SEARCH_LIBS([usb_find_busses], [usb], [newlibusb=false],
+ AC_MSG_ERROR([Missing libusb!])))
+else
+AC_SEARCH_LIBS([usb_find_busses], [usb], [newlibusb=false],
+ AC_MSG_ERROR([Missing libusb!]))
+fi
+
+AM_CONDITIONAL([NEW_LIBUSB], [test x$newlibusb = xtrue])
+
AC_ARG_ENABLE([ldconfig],
[AS_HELP_STRING([--disable-ldconfig],[do not update dynamic linker cache using ldconfig])],
,
@@ -89,6 +107,7 @@ AM_CONDITIONAL([RUN_LDCONFIG], [test "${enable_ldconfig}" = "yes"])
AM_CONDITIONAL([INTERNAL_UNICONV], [test x$internaluniconv = xtrue])
+
AC_CONFIG_FILES([Makefile
examples/Makefile])
-AC_OUTPUT
+AC_OUTPUT([libphidget21.pc])