Commit cb943f55 authored by Martin Storsjö's avatar Martin Storsjö Committed by Niels Möller

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.

Rev: nettle/ChangeLog:1.230
Rev: nettle/Makefile.in:1.41
Rev: nettle/config.make.in:1.4
Rev: nettle/configure.ac:1.47
parent 198e1fcb
2011-11-19 Niels Mller <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 Mller <nisse@lysator.liu.se>
......
......@@ -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)
......
......@@ -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@
......
......@@ -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=''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment