From: Dmitry F. <dm...@da...> - 2015-03-02 18:26:37
|
Signed-off-by: Dmitry Fleytman <dfl...@re...> --- configure.ac | 9 +++++++++ libusb/Makefile.am | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index aeafcdc..79c7c5b 100644 --- a/configure.ac +++ b/configure.ac @@ -172,6 +172,14 @@ windows) LTLDFLAGS="${LTLDFLAGS} -avoid-version -Wl,--add-stdcall-alias" AC_DEFINE([POLL_NFDS_TYPE],[unsigned int],[type of second poll() argument]) AC_DEFINE([WINVER], 0x0501, [Oldest Windows version supported]) + + AC_ARG_ENABLE([usbdk], + [AC_HELP_STRING([--enable-usbdk], [use UsbDk Windows backend [default=no]])], + [], [enable_usbdk="no"]) + if test "x$enable_usbdk" = "xyes" ; then + AC_DEFINE(USE_USBDK, 1, [Use UsbDk Windows backend]) + fi + AC_SUBST(USE_USBDK) ;; haiku) AC_DEFINE(OS_HAIKU, 1, [Haiku backend]) @@ -193,6 +201,7 @@ AM_CONDITIONAL(OS_HAIKU, test "x$backend" = xhaiku) AM_CONDITIONAL(THREADS_POSIX, test "x$threads" = xposix) AM_CONDITIONAL(CREATE_IMPORT_LIB, test "x$create_import_lib" = "xyes") AM_CONDITIONAL(USE_UDEV, test "x$enable_udev" = xyes) +AM_CONDITIONAL(USE_USBDK, test "x$enable_usbdk" = xyes) if test "$threads" = posix; then AC_DEFINE(THREADS_POSIX, 1, [Use POSIX Threads]) fi diff --git a/libusb/Makefile.am b/libusb/Makefile.am index fe9f649..4a1fd9a 100644 --- a/libusb/Makefile.am +++ b/libusb/Makefile.am @@ -11,12 +11,13 @@ OPENBSD_USB_SRC = os/openbsd_usb.c NETBSD_USB_SRC = os/netbsd_usb.c COMMON_WINDOWS_SRC = os/poll_windows.c os/windows_nt_common.c libusb-1.0.rc libusb-1.0.def WINDOWS_USB_SRC = os/windows_usb.c $(COMMON_WINDOWS_SRC) +WINDOWS_USBDK_SRC = os/windows_usbdk.c $(COMMON_WINDOWS_SRC) WINCE_USB_SRC = os/wince_usb.c os/wince_usb.h DIST_SUBDIRS = EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \ - $(NETBSD_USB_SRC) $(WINDOWS_USB_SRC) $(WINCE_USB_SRC) \ + $(NETBSD_USB_SRC) $(WINDOWS_USB_SRC) $(WINDOWS_USBDK_SRC) $(WINCE_USB_SRC) \ $(POSIX_POLL_SRC) \ os/threads_posix.c os/threads_windows.c \ os/linux_udev.c os/linux_netlink.c @@ -55,7 +56,12 @@ SUBDIRS = os/haiku endif if OS_WINDOWS + +if USE_USBDK +OS_SRC = $(WINDOWS_USBDK_SRC) +else OS_SRC = $(WINDOWS_USB_SRC) +endif .rc.lo: $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@ @@ -79,7 +85,7 @@ libusb_1_0_la_CFLAGS = $(AM_CFLAGS) libusb_1_0_la_LDFLAGS = $(LTLDFLAGS) libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c strerror.c sync.c \ os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h os/windows_common.h \ - os/windows_nt_common.h hotplug.h hotplug.c \ + os/windows_nt_common.h os/windows_usbdk.h hotplug.h hotplug.c \ $(THREADS_SRC) $(OS_SRC) \ os/poll_posix.h os/poll_windows.h -- 2.1.0 |