Commit c40f0aa2 authored by Niels Möller's avatar Niels Möller

Bumped nettle so-versions to 3.0. Set hogweed

so-versions to 1.0. New makefile conditionals IF_SHARED and
IF_HOGWEED. Renamed WITH_PUBLIC_KEY to WITH_HOGWEED. Deleted
SHLIBTARGET, SHLIBINSTALL, RSA_EXAMPLES and RSA_TOOLS.

Rev: nettle/configure.ac:1.2
parent 0b2b1fb8
...@@ -10,8 +10,11 @@ AC_CONFIG_AUX_DIR([.]) ...@@ -10,8 +10,11 @@ AC_CONFIG_AUX_DIR([.])
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])
SHLIBMAJOR=2 LIBNETTLE_MAJOR=3
SHLIBMINOR=6 LIBNETTLE_MINOR=0
LIBHOGWEED_MAJOR=1
LIBHOGWEED_MINOR=0
AC_CANONICAL_HOST AC_CANONICAL_HOST
...@@ -163,37 +166,48 @@ SHLIBCFLAGS="$CCPIC" ...@@ -163,37 +166,48 @@ SHLIBCFLAGS="$CCPIC"
case "$host_os" in case "$host_os" in
cygwin*) cygwin*)
SHLIBFORLINK='cygnettle-$(SHLIBMAJOR)-$(SHLIBMINOR).dll' LIBNETTLE_FORLINK='cygnettle-$(SHLIBMAJOR)-$(SHLIBMINOR).dll'
SHLIBSONAME='' LIBNETTLE_SONAME=''
SHLIBFILE='libnettle.dll.a' LIBNETTLE_FILE='libnettle.dll.a'
SHLIBLINK='$(CC) $(LDFLAGS) -shared -Wl,--out-implib=$(SHLIBFILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive' LIBNETTLE_LINK='$(CC) $(LDFLAGS) -shared -Wl,--out-implib=$(LIBNETTLE_LIBFILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
SHLIBLIBS='-Wl,--no-whole-archive $(LIBS)' LIBNETTLE_LIBS='-Wl,--no-whole-archive $(LIBS)'
LIBHOGWEED_FORLINK='cygnettle-$(SHLIBMAJOR)-$(SHLIBMINOR).dll'
LIBHOGWEED_SONAME=''
LIBHOGWEED_FILE='libnettle.dll.a'
LIBHOGWEED_LINK='$(CC) $(LDFLAGS) -shared -Wl,--out-implib=$(LIBHOGWEED_LIBFILE) -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive'
LIBHOGWEED_LIBS='-Wl,--no-whole-archive $(LIBS)'
;; ;;
darwin*) darwin*)
SHLIBFORLINK=libnettle.dylib LIBNETTLE_FORLINK=libnettle.dylib
SHLIBSONAME='$(SHLIBFORLINK).$(SHLIBMAJOR)' LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK).$(LIBNETTLE_MAJOR)'
SHLIBFILE='$(SHLIBSONAME).$(SHLIBMINOR)' LIBNETTLE_FILE='$(LIBNETTLE_SONAME).$(LIBNETTLE_MINOR)'
SHLIBLINK='$(CC) -dynamiclib $(LDFLAGS)' LIBNETTLE_LINK='$(CC) -dynamiclib $(LDFLAGS)'
# SHLIBLIBS=' -lgmp' LIBNETTLE_LIBS=''
LIBHOGWEED_FORLINK=libnettle.dylib
LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK).$(LIBHOGWEED_MAJOR)'
LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME).$(LIBHOGWEED_MINOR)'
LIBHOGWEED_LINK='$(CC) -dynamiclib $(LDFLAGS)'
LIBHOGWEED_LIBS=''
;; ;;
*) *)
SHLIBFORLINK=libnettle.so LIBNETTLE_FORLINK=libnettle.so
SHLIBSONAME='$(SHLIBFORLINK).$(SHLIBMAJOR)' LIBNETTLE_SONAME='$(LIBNETTLE_FORLINK).$(LIBNETTLE_MAJOR)'
SHLIBFILE='$(SHLIBSONAME).$(SHLIBMINOR)' LIBNETTLE_FILE='$(LIBNETTLE_SONAME).$(LIBNETTLE_MINOR)'
SHLIBLINK='$(CC) $(LDFLAGS) -shared -Wl,-soname=$(SHLIBSONAME)' LIBNETTLE_LINK='$(CC) $(LDFLAGS) -shared -Wl,-soname=$(LIBNETTLE_SONAME)'
# FIXME: It might make some sense to link with -lgmp
LIBNETTLE_LIBS=''
LIBHOGWEED_FORLINK=libnettle.so
LIBHOGWEED_SONAME='$(LIBHOGWEED_FORLINK).$(LIBHOGWEED_MAJOR)'
LIBHOGWEED_FILE='$(LIBHOGWEED_SONAME).$(LIBHOGWEED_MINOR)'
LIBHOGWEED_LINK='$(CC) $(LDFLAGS) -shared -Wl,-soname=$(LIBHOGWEED_SONAME)'
# FIXME: It might make some sense to link with -lgmp # FIXME: It might make some sense to link with -lgmp
SHLIBLIBS='' LIBHOGWEED_LIBS=''
;; ;;
esac esac
if test "x$enable_shared" = xyes ; then
SHLIBTARGET='$(SHLIBFORLINK)'
SHLIBINSTALL=install-shared
else
SHLIBTARGET=''
SHLIBINSTALL=''
fi
if test "x$enable_pic" = xyes; then if test "x$enable_pic" = xyes; then
CCPIC_MAYBE="$CCPIC" CCPIC_MAYBE="$CCPIC"
else else
...@@ -307,15 +321,22 @@ AC_SUBST(ASM_MARK_NOEXEC_STACK) ...@@ -307,15 +321,22 @@ AC_SUBST(ASM_MARK_NOEXEC_STACK)
AC_SUBST(ASM_ALIGN_LOG) AC_SUBST(ASM_ALIGN_LOG)
AC_SUBST(SHLIBCFLAGS) AC_SUBST(SHLIBCFLAGS)
AC_SUBST(SHLIBMAJOR)
AC_SUBST(SHLIBMINOR) AC_SUBST(LIBNETTLE_MAJOR)
AC_SUBST(SHLIBFORLINK) AC_SUBST(LIBNETTLE_MINOR)
AC_SUBST(SHLIBSONAME) AC_SUBST(LIBNETTLE_FORLINK)
AC_SUBST(SHLIBFILE) AC_SUBST(LIBNETTLE_SONAME)
AC_SUBST(SHLIBLINK) AC_SUBST(LIBNETTLE_FILE)
AC_SUBST(SHLIBTARGET) AC_SUBST(LIBNETTLE_LINK)
AC_SUBST(SHLIBINSTALL) AC_SUBST(LIBNETTLE_LIBS)
AC_SUBST(SHLIBLIBS)
AC_SUBST(HOGWEED_MAJOR)
AC_SUBST(HOGWEED_MINOR)
AC_SUBST(HOGWEED_FORLINK)
AC_SUBST(HOGWEED_SONAME)
AC_SUBST(HOGWEED_FILE)
AC_SUBST(HOGWEED_LINK)
AC_SUBST(HOGWEED_LIBS)
AC_PATH_PROG(M4, m4, m4) AC_PATH_PROG(M4, m4, m4)
...@@ -349,18 +370,23 @@ AC_CHECK_LIB(gmp, __gmpz_getlimbn,, ...@@ -349,18 +370,23 @@ AC_CHECK_LIB(gmp, __gmpz_getlimbn,,
Support for public key algorithms will be unavailable.])] Support for public key algorithms will be unavailable.])]
enable_public_key=no) enable_public_key=no)
AH_TEMPLATE([WITH_HOGWEED], [Defined if public key features are enabled])
if test "x$enable_public_key" = xyes ; then if test "x$enable_public_key" = xyes ; then
AC_DEFINE(WITH_PUBLIC_KEY) AC_DEFINE(WITH_HOGWEED)
RSA_EXAMPLES='rsa-keygen$(EXEEXT) rsa-sign$(EXEEXT) rsa-verify$(EXEEXT) rsa-encrypt$(EXEEXT) rsa-decrypt$(EXEEXT)' IF_HOGWEED=''
RSA_TOOLS='pkcs1-conv$(EXEEXT)' else
IF_HOGWEED='#'
fi
if test "x$enable_shared" = xyes ; then
IF_SHARED=''
else else
RSA_EXAMPLES='' IF_SHARED='#'
RSA_TOOLS=''
fi fi
AH_TEMPLATE([WITH_PUBLIC_KEY], [Define to enable public key features]) AC_SUBST(IF_HOGWEED)
AC_SUBST(RSA_EXAMPLES) AC_SUBST(IF_SHARED)
AC_SUBST(RSA_TOOLS)
# Add -R flags needed to run programs linked with gmp # Add -R flags needed to run programs linked with gmp
LSH_RPATH_FIX LSH_RPATH_FIX
......
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