build: pass win32-dll to LT_INIT()

This is the recommended way to support building PE DLLs with modern mingw 
toolchains and libtool. I made a similar change upstream in the secp256k1 
repo: https://github.com/bitcoin-core/secp256k1/pull/1022. Note that we already
pass `-no-undefined` to our libtool LDFLAGS.

> This option should be used if the package has been ported to build clean
> dlls on win32 platforms.
> If this macro is not used, libtool will assume that the package libraries
> are not dll clean and will build only static libraries on win32 hosts.

See:
https://www.gnu.org/software/libtool/manual/libtool.html#LT_005fINIT
https://www.gnu.org/software/gnulib/manual/html_node/Libtool-and-Windows.html
https://autotools.io/libtool/windows.html
https://github.com/bitcoin-core/secp256k1/issues/923
pull/24112/head
fanquake 3 years ago
parent c44e734dca
commit 80e78b6a04
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -100,7 +100,7 @@ dnl sets RPATH for any directories in the dynamic linker search path.
dnl See more: https://wiki.debian.org/RpathIssue
LT_PREREQ([1.5.2])
dnl Libtool init checks.
LT_INIT([pic-only])
LT_INIT([pic-only win32-dll])
dnl Check/return PATH for base programs.
AC_PATH_TOOL([AR], [ar])

Loading…
Cancel
Save