Index: kcontrol/input/configure.in.bot =================================================================== --- kcontrol/input/configure.in.bot (revision 420060) +++ kcontrol/input/configure.in.bot (working copy) @@ -1,10 +1,4 @@ -if test "$LUSBLIB" = "no"; then - echo - echo " Problem! libusb library not found, get it from" - echo " http://libusb.sourceforge.net" -fi - -if (test x"$USB_LIBS" = x""); then +if test "x$with_libusb" = xcheck && test "x$have_libusb" = xno; then echo "" echo "Logitech mouse support is disabled. Provide libusb to enable it." echo "" Index: kcontrol/input/configure.in.in =================================================================== --- kcontrol/input/configure.in.in (revision 420060) +++ kcontrol/input/configure.in.in (working copy) @@ -1,19 +1,26 @@ -LIBUSBCONFIG="" -AC_PATH_PROG(LIBUSBCONFIG,libusb-config,no) -if test $LIBUSBCONFIG = "no" ; then - AC_MSG_WARN(Can't find libusb-config) - AC_MSG_WARN(Check your libusb installation) - USB_LIBS="" - USB_CFLAGS="" -else - USB_LIBS="$($LIBUSBCONFIG --libs)" - USB_CFLAGS="$($LIBUSBCONFIG --cflags)" -AC_CHECK_LIB(usb,main, - AC_DEFINE(HAVE_LIBUSB, 1, [Defined if you have libusb]), - [], - $USB_LIBS -) +AC_ARG_WITH(libusb, + [AS_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_FAILURE([--with-libusb was given, but test for libusb failed]) + fi fi AC_SUBST(USB_LIBS) AC_SUBST(USB_CFLAGS) - Index: kcontrol/view1394/configure.in.in =================================================================== --- kcontrol/view1394/configure.in.in (revision 420060) +++ kcontrol/view1394/configure.in.in (working copy) @@ -1,3 +1,15 @@ +AC_ARG_WITH(libraw1394, + [AS_HELP_STRING(--with-libraw1394, + [enable visualization of ieee1394 devices through libraw1394 @<:@default=check@:>@])], + [], with_libraw1394=check) + VIEW1394_SUBDIR= -KDE_CHECK_HEADER(libraw1394/raw1394.h, VIEW1394_SUBDIR=view1394) +if test "x$with_libraw1394" != xno; then + KDE_CHECK_HEADER(libraw1394/raw1394.h, VIEW1394_SUBDIR=view1394) + + if test "x$with_libraw1394" != xcheck && test -z "$VIEW1394_SUBDIR"; then + AC_MSG_FAILURE([--with-libraw1394 was given, but test for libraw1394 failed]) + fi +fi + AM_CONDITIONAL(include_kcontrol_view1394, test -n "$VIEW1394_SUBDIR")