diff options
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | Makefile.in | 26 | ||||
-rw-r--r-- | config.make.in | 2 | ||||
-rw-r--r-- | configure.ac | 14 |
4 files changed, 53 insertions, 7 deletions
@@ -1,6 +1,22 @@ 2011-11-19 Niels Möller <nisse@lysator.liu.se> - From Martin Storsjö: + Cygwin/mingw32 improvements contributed by Martin Storsjö: + * configure.ac: Setup installation of dll files in $bindir. + (IF_DLL, LIBNETTLE_FILE_SRC, LIBHOGWEED_FILE_SRC): New + substitutions. + + * config.make.in (LIBNETTLE_FILE_SRC): Substitute new autoconf + variable. + (LIBHOGWEED_FILE_SRC): Likewise. + + * Makefile.in (install-dll-nettle, uninstall-dll-nettle): New + target for installing the dll file in $bindir. + (install-shared-nettle): Conditionally + depend on install-dll-nettle. Use LIBNETTLE_FILE_SRC. + (uninstall-shared-nettle): Conditionally depend on + install-dll-nettle. + (various hogweed targets): Analogous changes. + * configure.ac: Unify shared lib setup for cygwin and mingw. 2011-10-31 Niels Möller <nisse@lysator.liu.se> diff --git a/Makefile.in b/Makefile.in index 27f076a7..a954f7fe 100644 --- a/Makefile.in +++ b/Makefile.in @@ -285,17 +285,25 @@ install-static: $(LIBTARGETS) $(INSTALL_DATA) $$f $(DESTDIR)$(libdir) ; \ done -install-shared-nettle: $(LIBNETTLE_FORLINK) +install-dll-nettle: + $(MKDIR_P) $(DESTDIR)$(bindir) + $(INSTALL_DATA) $(LIBNETTLE_FORLINK) $(DESTDIR)$(bindir)/$(LIBNETTLE_FORLINK) + +install-shared-nettle: $(LIBNETTLE_FORLINK) @IF_DLL@ install-dll-nettle $(MKDIR_P) $(DESTDIR)$(libdir) - $(INSTALL_DATA) $(LIBNETTLE_FORLINK) $(DESTDIR)$(libdir)/$(LIBNETTLE_FILE) + $(INSTALL_DATA) $(LIBNETTLE_FILE_SRC) $(DESTDIR)$(libdir)/$(LIBNETTLE_FILE) [ -z "$(LIBNETTLE_SONAME)" ] \ || (cd $(DESTDIR)$(libdir) \ && ln -sf $(LIBNETTLE_FILE) $(LIBNETTLE_SONAME) \ && ln -sf $(LIBNETTLE_FILE) $(LIBNETTLE_FORLINK)) -install-shared-hogweed: $(LIBHOGWEED_FORLINK) +install-dll-hogweed: + $(MKDIR_P) $(DESTDIR)$(bindir) + $(INSTALL_DATA) $(LIBHOGWEED_FORLINK) $(DESTDIR)$(bindir)/$(LIBHOGWEED_FORLINK) + +install-shared-hogweed: $(LIBHOGWEED_FORLINK) @IF_DLL@ install-dll-hogweed $(MKDIR_P) $(DESTDIR)$(libdir) - $(INSTALL_DATA) $(LIBHOGWEED_FORLINK) $(DESTDIR)$(libdir)/$(LIBHOGWEED_FILE) + $(INSTALL_DATA) $(LIBHOGWEED_FILE_SRC) $(DESTDIR)$(libdir)/$(LIBHOGWEED_FILE) [ -z "$(LIBHOGWEED_SONAME)" ] \ || (cd $(DESTDIR)$(libdir) \ && ln -sf $(LIBHOGWEED_FILE) $(LIBHOGWEED_SONAME) \ @@ -356,12 +364,18 @@ uninstall-info: # FIXME: Leaves the links around uninstall-shared: uninstall-shared-nettle @IF_HOGWEED@ uninstall-shared-hogweed -uninstall-shared-nettle: +uninstall-dll-nettle: + rm -f $(DESTDIR)$(bindir)/$(LIBNETTLE_FORLINK) + +uninstall-shared-nettle: @IF_DLL@ uninstall-dll-nettle rm -f $(DESTDIR)$(libdir)/$(LIBNETTLE_FILE) [ -z "$(LIBNETTLE_SONAME)" ] \ || rm -f $(LIBNETTLE_SONAME) $(LIBNETTLE_FORLINK) -uninstall-shared-hogweed: +uninstall-dll-hogweed: + rm -f $(DESTDIR)$(bindir)/$(LIBHOGWEED_FORLINK) + +uninstall-shared-hogweed: @IF_DLL@ uninstall-dll-hogweed rm -f $(DESTDIR)$(libdir)/$(LIBHOGWEED_FILE) [ -z "$(LIBHOGWEED_SONAME)" ] \ || rm -f $(LIBHOGWEED_SONAME) $(LIBHOGWEED_FORLINK) diff --git a/config.make.in b/config.make.in index 152b42e5..3caa460b 100644 --- a/config.make.in +++ b/config.make.in @@ -30,6 +30,7 @@ LIBNETTLE_MAJOR = @LIBNETTLE_MAJOR@ LIBNETTLE_MINOR = @LIBNETTLE_MINOR@ LIBNETTLE_SONAME = @LIBNETTLE_SONAME@ LIBNETTLE_FILE = @LIBNETTLE_FILE@ +LIBNETTLE_FILE_SRC = @LIBNETTLE_FILE_SRC@ LIBNETTLE_FORLINK = @LIBNETTLE_FORLINK@ LIBNETTLE_LIBS = @LIBNETTLE_LIBS@ LIBNETTLE_LINK = @LIBNETTLE_LINK@ @@ -38,6 +39,7 @@ LIBHOGWEED_MAJOR = @LIBHOGWEED_MAJOR@ LIBHOGWEED_MINOR = @LIBHOGWEED_MINOR@ LIBHOGWEED_SONAME = @LIBHOGWEED_SONAME@ LIBHOGWEED_FILE = @LIBHOGWEED_FILE@ +LIBHOGWEED_FILE_SRC = @LIBHOGWEED_FILE_SRC@ LIBHOGWEED_FORLINK = @LIBHOGWEED_FORLINK@ LIBHOGWEED_LIBS = @LIBHOGWEED_LIBS@ LIBHOGWEED_LINK = @LIBHOGWEED_LINK@ diff --git a/configure.ac b/configure.ac index 4510c819..5f2ab76e 100644 --- a/configure.ac +++ b/configure.ac @@ -252,8 +252,16 @@ LSH_CCPIC SHLIBCFLAGS="$CCPIC" +IF_DLL='#' +LIBNETTLE_FILE_SRC='$(LIBNETTLE_FORLINK)' +LIBHOGWEED_FILE_SRC='$(LIBHOGWEED_FORLINK)' + case "$host_os" in mingw32*|cygwin*) + # The actual DLLs, e.g. libnettle-$major-$minor.dll, are normally + # installed into the bin dir (or more exactly $libdir/../bin, for + # automake), while libnettle.dll.a, which is a stub file for + # linking to the DLL, is installed into the lib dir. case "$host_os" in mingw32*) LIBNETTLE_FORLINK='libnettle-$(LIBNETTLE_MAJOR)-$(LIBNETTLE_MINOR).dll' @@ -266,13 +274,16 @@ case "$host_os" in esac LIBNETTLE_SONAME='' LIBNETTLE_FILE='libnettle.dll.a' + LIBNETTLE_FILE_SRC='$(LIBNETTLE_FILE)' 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_SONAME='' LIBHOGWEED_FILE='libhogweed.dll.a' + LIBHOGWEED_FILE_SRC='$(LIBHOGWEED_FILE)' 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' + IF_DLL='' ;; darwin*) LIBNETTLE_FORLINK=libnettle.dylib @@ -442,6 +453,7 @@ AC_SUBST(LIBNETTLE_MINOR) AC_SUBST(LIBNETTLE_FORLINK) AC_SUBST(LIBNETTLE_SONAME) AC_SUBST(LIBNETTLE_FILE) +AC_SUBST(LIBNETTLE_FILE_SRC) AC_SUBST(LIBNETTLE_LINK) AC_SUBST(LIBNETTLE_LIBS) @@ -450,6 +462,7 @@ AC_SUBST(LIBHOGWEED_MINOR) AC_SUBST(LIBHOGWEED_FORLINK) AC_SUBST(LIBHOGWEED_SONAME) AC_SUBST(LIBHOGWEED_FILE) +AC_SUBST(LIBHOGWEED_FILE_SRC) AC_SUBST(LIBHOGWEED_LINK) AC_SUBST(LIBHOGWEED_LIBS) @@ -538,6 +551,7 @@ fi AC_SUBST(IF_HOGWEED) AC_SUBST(IF_SHARED) +AC_SUBST(IF_DLL) OPENSSL_LIBFLAGS='' |