diff options
author | Pete Batard <pete@akeo.ie> | 2012-06-08 23:31:56 +0100 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2012-06-08 23:31:56 +0100 |
commit | 6b33cd458921a6023e6e54f3715ead7ed441c648 (patch) | |
tree | e51e8cc74d5160241a36e182fd9c0cd62ea6d34d /configure.ac | |
parent | a983fad006fe39a48517e061bf9f66501ff900be (diff) | |
download | libusb-6b33cd458921a6023e6e54f3715ead7ed441c648.tar.gz |
Windows: Enable MinGW and MSVC DLL interchangeability
* Because we use the WINAPI calling convention, the def file MUST have the @n
aliases. There is no way around this as MinGW's .o use decoration always
for __stdcall, which can't be turned off.
* dlltool must therefore be invoked to create a proper import lib from the .def,
using the --kill-at option.
* To do that, a CREATE_IMPORT_LIB autotools variable is introduced.
* Note: the .def file is currently maintained manually.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b29b2bb..b51555c 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,7 @@ case $host in AC_MSG_RESULT([Windows]) backend="windows" threads="windows" + create_import_lib="yes" AM_CFLAGS="${AM_CFLAGS} -fno-omit-frame-pointer" ;; *-cygwin*) @@ -129,6 +130,7 @@ AM_CONDITIONAL(OS_DARWIN, test "x$backend" = xdarwin) AM_CONDITIONAL(OS_OPENBSD, test "x$backend" = xbsd) AM_CONDITIONAL(OS_WINDOWS, test "x$backend" = xwindows) AM_CONDITIONAL(THREADS_POSIX, test "x$threads" = xposix) +AM_CONDITIONAL(CREATE_IMPORT_LIB, test "x$create_import_lib" = "xyes") if test "$threads" = posix; then AC_DEFINE(THREADS_POSIX, 1, [Use POSIX Threads]) fi |