diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2018-10-10 22:29:06 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2018-10-10 22:29:06 +0000 |
commit | b319ead8be0b6d52238452863e61411fb0d00d0d (patch) | |
tree | 45f74b919f23393bc35efbfed36ec715fef53ef6 /crypto | |
parent | dbffe0f105d4b87bd45591f6a718eb5dfdf91826 (diff) | |
download | src-b319ead8be0b6d52238452863e61411fb0d00d0d.tar.gz src-b319ead8be0b6d52238452863e61411fb0d00d0d.zip |
Try harder to sanitize the environment before running configure.
Remove a workaround for older Unbound versions that used sbrk.
Approved by: re (gjb)
Notes
Notes:
svn path=/head/; revision=339294
Diffstat (limited to 'crypto')
-rwxr-xr-x | crypto/openssh/freebsd-configure.sh | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/crypto/openssh/freebsd-configure.sh b/crypto/openssh/freebsd-configure.sh index d2c63e170ffe..fbc0f5139c88 100755 --- a/crypto/openssh/freebsd-configure.sh +++ b/crypto/openssh/freebsd-configure.sh @@ -16,28 +16,27 @@ configure_args=" set -e -# make sure configure uses the correct compiler -export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC) -export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP) -unset CFLAGS CPPFLAGS LDFLAGS LIBS +openssh=$(dirname $(realpath $0)) +cd $openssh -# regenerate configure and config.h.in -autoheader -autoconf +# Run autotools before we drop LOCALBASE out of PATH +(cd $openssh && libtoolize --copy && autoheader && autoconf) -# reset PATH to avoid picking up the wrong libraries +# Ensure we use the correct toolchain and clean our environment +export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC) +export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP) +unset CFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH LIBS export PATH=/bin:/sbin:/usr/bin:/usr/sbin -unset LD_LIBRARY_PATH -# generate config.h with krb5 and stash it +# Generate config.h with krb5 and stash it sh configure $configure_args --with-kerberos5=/usr mv config.log config.log.orig mv config.h config.h.orig -# generate config.h without krb5 +# Generate config.h without krb5 sh configure $configure_args --without-kerberos5 -# extract the difference +# Extract the difference echo '/* $Free''BSD$ */' > krb5_config.h diff -u config.h.orig config.h | sed -n '/^-#define/s/^-//p' | |