From 260123716172d33f44bdc0e4e5422554d139215c Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Wed, 9 May 2012 00:47:30 +0100 Subject: Imported Upstream version 2.1.8.20120507 --- configure.ac | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'configure.ac') 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]) -- cgit v1.2.3