diff options
Diffstat (limited to 'kcontrol/input/configure.in.in')
-rw-r--r-- | kcontrol/input/configure.in.in | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/kcontrol/input/configure.in.in b/kcontrol/input/configure.in.in new file mode 100644 index 000000000..0d656e2dc --- /dev/null +++ b/kcontrol/input/configure.in.in @@ -0,0 +1,26 @@ +AC_ARG_WITH(libusb, + [AC_HELP_STRING(--with-libusb, + [enable control of some mouse models through libusb @<:@default=check@:>@])], + [], with_libusb=check) + +USB_LIBS= +USB_CFLAGS= +have_libusb=no +if test "x$with_libusb" != xno; then + AC_PATH_PROG(LIBUSBCONFIG,libusb-config,no) + if test $LIBUSBCONFIG != "no"; then + USB_LIBS="$($LIBUSBCONFIG --libs)" + USB_CFLAGS="$($LIBUSBCONFIG --cflags)" + + AC_CHECK_LIB(usb,main, + [have_libusb=yes + AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb])], + [], [$USB_LIBS] + ) + fi + if test "x$with_libusb" != xcheck && test "x$have_libusb" = xno; then + AC_MSG_ERROR([--with-libusb was given, but test for libusb failed]) + fi +fi +AC_SUBST(USB_LIBS) +AC_SUBST(USB_CFLAGS) |