summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--libusb/Makefile.am4
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f58ef81..ac08e0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,7 @@ case $host in
LIBS="-lsetupapi -lole32"
AM_CFLAGS="-Wshadow"
AM_LDFLAGS="-no-undefined -avoid-version"
+ AC_CHECK_TOOL(RC, windres, no)
;;
*-cygwin*)
AC_DEFINE(OS_WINDOWS, [], [Windows backend])
@@ -54,6 +55,7 @@ case $host in
LIBS="-lpthread -lsetupapi -lole32"
AM_CFLAGS=""
AM_LDFLAGS="-no-undefined -avoid-version"
+ AC_CHECK_TOOL(RC, windres, no)
;;
*)
AC_MSG_ERROR([unsupported operating system])
diff --git a/libusb/Makefile.am b/libusb/Makefile.am
index c252b3d..6152daa 100644
--- a/libusb/Makefile.am
+++ b/libusb/Makefile.am
@@ -8,7 +8,7 @@ endif
LINUX_USBFS_SRC = $(THREADS_SRC) os/poll_posix.h os/linux_usbfs.h os/linux_usbfs.c
DARWIN_USB_SRC = $(THREADS_SRC) os/poll_posix.h os/darwin_usb.h os/darwin_usb.c
-WINDOWS_USB_SRC = $(THREADS_SRC) os/poll_windows.h os/poll_windows.c os/windows_usb.h os/windows_usb.c
+WINDOWS_USB_SRC = $(THREADS_SRC) os/poll_windows.h os/poll_windows.c os/windows_usb.h os/windows_usb.c ../msvc/libusb-1.0.rc
EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(WINDOWS_USB_SRC)
@@ -23,6 +23,8 @@ endif
if OS_WINDOWS
OS_SRC = $(WINDOWS_USB_SRC)
+.rc.lo:
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
endif
libusb_1_0_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS)