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
commit260123716172d33f44bdc0e4e5422554d139215c (patch)
tree840e8e6387b96bd6f9afe3ffebc19c781a112f1b /configure.ac
parent0b624384cd52be20e61284551d832b499d7b7707 (diff)
downloadlibphidget21-260123716172d33f44bdc0e4e5422554d139215c.tar.gz
Imported Upstream version 2.1.8.20120507upstream/2.1.8.20120507
Diffstat (limited to 'configure.ac')
-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])