libosmocore libusb integration

Osmocom applications typically use libosmocore select.[ch] event loop
code as their main event dispatch mechanism.  When they want to deal
with libusb in a non-blocking/asynchronous way, they need to integrate
libusb into that select().

The new libosmousb is doing exactly that: Providing a shared utility
library for Osmocom programs that wish to use libusb.  This is useful
for example in simtrace2 host utilitie as well as osmo-e1d.

Change-Id: I656a1a38cbb5b1f3a9145d2869d3b4d0adefcae3
Closes: OS#4299
diff --git a/include/Makefile.am b/include/Makefile.am
index d76addd..dc6eaa7 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -164,6 +164,11 @@
                           osmocom/ctrl/control_vty.h
 endif
 
+if ENABLE_LIBUSB
+nobase_include_HEADERS += \
+			  osmocom/usb/libusb.h
+endif
+
 noinst_HEADERS = \
 	osmocom/gsm/kasumi.h \
 	osmocom/gsm/gea.h \
diff --git a/include/osmocom/usb/libusb.h b/include/osmocom/usb/libusb.h
new file mode 100644
index 0000000..7f10f74
--- /dev/null
+++ b/include/osmocom/usb/libusb.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#include <libusb.h>
+
+int osmo_libusb_init(libusb_context **luctx);
+void osmo_libusb_exit(libusb_context *luctx);