I tried to send the following w/ an attachment, but it got bounced. So here it is w/ the attachment inlined:
The attached patch for configure.ac allowed for a normal compile w/ mingw-w64 w/ --enabled-shared. It's really only a stopgap since you would need to do something more intelligent when you detect --enable-shared and then dynamically adjust hogweed's link options.
Do you think it would be possible to add libtool and pkg-config support?
Thanks,
- David Hoyt
--- configure.ac Sun Jul 25 12:30:13 2010
+++ configure.ac Thu Sep 16 12:48:51 2010
@@ -233,6 +233,19 @@
SHLIBCFLAGS="$CCPIC"
case "$host_os" in
+ mingw32*)
+ LIBNETTLE_FORLINK='libnettle-$(LIBNETTLE_MAJOR)-$(LIBNETTLE_MINOR).dll'
+ LIBNETTLE_SONAME=''
+ LIBNETTLE_FILE='libnettle.dll.a'
+ LIBNETTLE_LINK='$(CC) $(LDFLAGS) -shared -Wl,--out-implib=$(LIBNETTLE_FILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
+ LIBNETTLE_LIBS='-Wl,--no-whole-archive $(LIBS)'
+
+ LIBHOGWEED_FORLINK='libhogweed-$(LIBHOGWEED_MAJOR)-$(LIBHOGWEED_MINOR).dll'
+ LIBHOGWEED_SONAME=''
+ LIBHOGWEED_FILE='libhogweed.dll.a'
+ LIBHOGWEED_LINK='$(CC) $(LDFLAGS) -shared -Wl,--out-implib=$(LIBHOGWEED_FILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
+ LIBHOGWEED_LIBS='-Wl,--no-whole-archive $(LIBS) libnettle.dll.a'
+ ;;
cygwin*)
LIBNETTLE_FORLINK='cygnettle-$(LIBNETTLE_MAJOR)-$(LIBNETTLE_MINOR).dll'
LIBNETTLE_SONAME=''