diff options
author | Pete Batard <pbatard@gmail.com> | 2010-08-05 01:33:49 +0100 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-08-05 01:33:49 +0100 |
commit | 30b42bc6544e2c6a8e1809cb6819f670dc206904 (patch) | |
tree | c16471c7570a5116d8b8de1f39d63dfbc9e9662b /configure.ac | |
parent | d91b872c4c87297d4df0f4e0220be04c223b2fdb (diff) | |
download | libusb-30b42bc6544e2c6a8e1809cb6819f670dc206904.tar.gz |
creates MinGW and MS DLLs that are fully interchangeablepbr293
1. because we use WINAPI, the def file MUST have the @n aliases - there's no way around as MinGW's .o use decoration always for __stdcall, and this can't be turned off
2. our "dumb" autogen create_def() script simply creates the whole range of aliases (we might improve on this in the future)
3. dlltool must be called manually to create the import lib from the def, *with the --kill-at option*
4. a CREATE_IMPORT_LIB autotools variable is introduced to selectively run dlltool or not
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 634a7d7..b4f90b3 100644 --- a/configure.ac +++ b/configure.ac @@ -55,11 +55,13 @@ case $host in AC_MSG_RESULT([Windows]) backend="windows" threads="windows" + create_import_lib="yes" LIBS="-lsetupapi -lole32 -ladvapi32" # -avoid-version to avoid a naming scheme such as libusb-0.dll AM_LDFLAGS="-no-undefined -avoid-version -Wl,--add-stdcall-alias" AM_CFLAGS="-std=c99" AC_CHECK_TOOL(RC, windres, no) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) ;; *-cygwin*) AC_DEFINE(OS_WINDOWS, [], [Windows backend]) @@ -70,7 +72,7 @@ case $host in threads="posix" LIBS="-lsetupapi -lole32 -ladvapi32" AM_CFLAGS="-std=c99" - AM_LDFLAGS="-no-undefined -avoid-version -Wl,--add-stdcall-alias" + AM_LDFLAGS="-no-undefined -avoid-version" AC_CHECK_TOOL(RC, windres, no) ;; *) @@ -81,6 +83,7 @@ AM_CONDITIONAL([OS_LINUX], [test "x$backend" = "xlinux"]) AM_CONDITIONAL([OS_DARWIN], [test "x$backend" = "xdarwin"]) 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"]) # Library versioning lt_major="0" |