Commit 7b24dccf authored by Niels Möller's avatar Niels Möller
Browse files

Always use the installed nettle library,

don't look for it in the build tree.
parent e0c60792
#! /bin/sh
# Build all automatically generated files that are not present in the
# CVS repository.
# repository.
# This script is for use in the source directory, before you run
# configure. To get started from a fresh CVS checkout, you also need
# configure. To get started from a fresh checkout, you also need
# to run configure and make bootstrap from your build directory.
set -e
......@@ -27,36 +27,32 @@ relative_symlink() {
relative_symlink misc/run-tests \
argp/testsuite nettle/testsuite nettle/examples \
spki/testsuite sftp/testsuite src/testsuite
argp/testsuite spki/testsuite sftp/testsuite src/testsuite
relative_symlink aclocal.m4 \
argp nettle spki sftp
argp spki sftp
relative_symlink misc/vsnprintf.c \
argp sftp
relative_symlink misc/getopt.c \
src/testsuite nettle/examples nettle/tools spki/tools
relative_symlink misc/getopt1.c \
src/testsuite nettle/examples nettle/tools spki/tools
relative_symlink misc/getopt.h \
src/testsuite nettle/examples nettle/tools spki/tools
relative_symlink misc/getopt.c src/testsuite spki/tools
relative_symlink misc/getopt1.c src/testsuite spki/tools
relative_symlink misc/getopt.h src/testsuite spki/tools
relative_symlink config.guess nettle spki
relative_symlink config.sub nettle spki
relative_symlink config.guess spki
relative_symlink config.sub spki
relative_symlink install-sh argp nettle spki sftp
relative_symlink texinfo.tex nettle
relative_symlink install-sh argp spki sftp
relative_symlink texinfo.tex
relative_symlink INSTALL nettle spki
relative_symlink INSTALL spki
if [ "$1" = "links" ] ; then
# Skip the time consuming autoconf stuff
exit 0;
for subdir in argp nettle spki sftp; do
for subdir in argp spki sftp; do
(cd $subdir && ./.bootstrap)
2012-07-13 Niels Möller <>
Always use the installed nettle library, don't look for it in the
build tree.
* .bootstrap: Deleted all references to the nettle subdirectory.
* Deleted --with-system-nettle option, and all setup
for using a bundled nettle library. Use a regular AC_CHECK_LIB to
check for libhogweed (nettle's public key library).
* src/ (LOCAL_NETTLE_DEP): Deleted variable, and all
(PRE_CPPFLAGS): Deleted nettle_builddir.
(PRE_LDFLAGS): Likewise.
* (SUBDIRS): Deleted nettle.
* src/testsuite/ (need_tcputils): Deleted function.
* src/testsuite/lshd-random-input-test: Use ./tcpconnect, rather
than the possibly installed version from tcputils. Don't use
......@@ -13,7 +13,7 @@ AUTOCONF = autoconf
# The directories that make all should recurse into
SUBDIRS = argp nettle spki src sftp doc contrib misc
SUBDIRS = argp spki src sftp doc contrib misc
all check:
set -e; for d in $(BUILD_SUBDIRS); do \
......@@ -145,10 +145,6 @@ AC_ARG_WITH(system-argp,
AC_HELP_STRING([--with-system-argp], [Use the argp parser in libc]),,
AC_HELP_STRING([--with-system-nettle], [Use the installed nettle library]),,
AC_HELP_STRING([--with-system-libspki], [Use the installed spki library]),,
......@@ -416,12 +412,22 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(inet_ntop, nsl)
AC_CHECK_LIB(socket, setsockopt)
# FIXME: Don't add any of gmp, nettle or hogweed to LIBS, since not
# all programs need them. But maybe need them in LIBS temporarily, for
# LSH_RPATH_FIX to work.
AC_CHECK_LIB(gmp, __gmpz_getlimbn,,
[GNU MP not found, or not 3.1 or up, see])])
AC_CHECK_LIB(hogweed, nettle_dsa_sha1_sign, [true],
[Nettle library not found; needs version 2.2 or later. See])], [-lnettle -lgmp])
AC_CHECK_LIB([oop], [oop_sys_new],,
[AC_MSG_ERROR([liboop is missing. Get liboop from])])
......@@ -619,20 +625,6 @@ if test x$with_system_argp = xno ; then
if test x$with_system_nettle = xno ; then
[nettle_srcdir="`cd "$srcdir/nettle" && pwd`"
for d in spki src ; do
(mkdir $d 2>/dev/null; cd $d && rm -f nettle nettle_builddir && ln -s ../nettle nettle_builddir && ln -s $nettle_srcdir nettle)
LOCAL_NETTLE_DEP="nettle_builddir/libnettle.a nettle_builddir/libhogweed.a"
if test x$with_system_libspki = xno ; then
[spki_srcdir="`cd "$srcdir/spki" && pwd`"
......@@ -1165,8 +1157,7 @@ if test x$enable_ipv6 = xyes ; then
# Unconditionally configure nettle; otherwise make dist won't work
AC_CONFIG_SUBDIRS(argp nettle spki sftp)
AC_CONFIG_SUBDIRS(argp spki sftp)
# Set these flags *last*, or else the test programs won't compile
if test x$GCC = xyes ; then
......@@ -18,8 +18,6 @@ MKDIR_P = @MKDIR_P@
AUTOHEADER = autoheader
SUBDIRS = testsuite
include config.make
......@@ -29,8 +27,8 @@ include $(srcdir)/.dist_headers
# The *_builddir directories, if they exist at all, are symlinks
# created by the configure script.
PRE_CPPFLAGS = -I. -Iargp_builddir -Inettle_builddir -Ispki_builddir
PRE_LDFLAGS = -Largp_builddir -Lnettle_builddir -Lspki_builddir
PRE_CPPFLAGS = -I. -Iargp_builddir -Ispki_builddir
PRE_LDFLAGS = -Largp_builddir -Lspki_builddir
SCHEME = $(SCHEME_PROGRAM) -l $(srcdir)/scm/$(SCHEME_NAME)-compat.scm
......@@ -304,28 +302,28 @@ packet_types.h: ssh.h invert-defs
lsh$(EXEEXT): $(lsh_OBJS)
$(LINK) $(lsh_OBJS) $(LIBS) -o $@
lsh-transport$(EXEEXT): $(lsh_transport_OBJS) $(LOCAL_NETTLE_DEP)
lsh-transport$(EXEEXT): $(lsh_transport_OBJS)
$(LINK) $(lsh_transport_OBJS) -lspki -lhogweed -lnettle $(LIBS) -o $@
lsh-keygen$(EXEEXT): $(lsh_keygen_OBJS) $(LOCAL_NETTLE_DEP)
lsh-keygen$(EXEEXT): $(lsh_keygen_OBJS)
$(LINK) $(lsh_keygen_OBJS) -lspki -lhogweed -lnettle $(LIBS) -o $@
lsh-decrypt-key$(EXEEXT): $(lsh_decrypt_key_OBJS) $(LOCAL_NETTLE_DEP)
lsh-decrypt-key$(EXEEXT): $(lsh_decrypt_key_OBJS)
$(LINK) $(lsh_decrypt_key_OBJS) -lspki -lhogweed -lnettle $(LIBS) -o $@
lsh-decode-key$(EXEEXT): $(lsh_decode_key_OBJS) $(LOCAL_NETTLE_DEP)
lsh-decode-key$(EXEEXT): $(lsh_decode_key_OBJS)
$(LINK) $(lsh_decode_key_OBJS) -lspki -lhogweed -lnettle $(LIBS) -o $@
lsh-export-key$(EXEEXT): $(lsh_export_key_OBJS) $(LOCAL_NETTLE_DEP)
lsh-export-key$(EXEEXT): $(lsh_export_key_OBJS)
$(LINK) $(lsh_export_key_OBJS) -lspki -lhogweed -lnettle $(LIBS) -o $@
lsh-make-seed$(EXEEXT): $(lsh_make_seed_OBJS) $(LOCAL_NETTLE_DEP)
lsh-make-seed$(EXEEXT): $(lsh_make_seed_OBJS)
$(LINK) $(lsh_make_seed_OBJS) -lspki -lhogweed -lnettle $(LIBS) -o $@
lshd$(EXEEXT): $(lshd_OBJS)
$(LINK) $(lshd_OBJS) -lspki -lhogweed -lnettle $(LIBS) -o $@
lshd-userauth$(EXEEXT): $(lshd_userauth_OBJS) $(LOCAL_NETTLE_DEP)
lshd-userauth$(EXEEXT): $(lshd_userauth_OBJS)
$(LINK) $(lshd_userauth_OBJS) -lspki -lhogweed -lnettle $(LIBS) -o $@
lshd-connection$(EXEEXT): $(lshd_connection_OBJS)
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