+dnl See if we have libusb...
+AC_ARG_ENABLE(libusb, [ --enable-libusb use libusb for USB printing])
+
+LIBUSB=""
+AC_SUBST(LIBUSB)
+
+if test x$enable_libusb = xyes; then
+ check_libusb=yes
+elif test x$enable_libusb != xno -a $uname != Darwin; then
+ check_libusb=yes
+else
+ check_libusb=no
+fi
+
+if test $check_libusb = yes; then
+ AC_CHECK_LIB(usb, usb_init,[
+ AC_CHECK_HEADER(usb.h,
+ AC_DEFINE(HAVE_USB_H)
+ LIBUSB="-lusb")])
+fi
+
+dnl See if we have libwrap for TCP wrappers support...
+AC_ARG_ENABLE(tcp_wrappers, [ --enable-tcp-wrappers use libwrap for TCP wrappers support])
+
+LIBWRAP=""
+AC_SUBST(LIBWRAP)
+
+if test x$enable_tcp_wrappers = xyes; then
+ AC_CHECK_LIB(wrap, hosts_access,[
+ AC_CHECK_HEADER(tcpd.h,
+ AC_DEFINE(HAVE_TCPD_H)
+ LIBWRAP="-lwrap")])
+fi
+