freebsd-dev/contrib/ldns/freebsd-configure.sh
Dag-Erling Smørgrav b319ead8be Try harder to sanitize the environment before running configure.
Remove a workaround for older Unbound versions that used sbrk.

Approved by:	re (gjb)
2018-10-10 22:29:06 +00:00

31 lines
705 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
set -e
error() {
echo "$@" >&2
exit 1
}
ldns=$(dirname $(realpath $0))
cd $ldns
# Run autotools before we drop LOCALBASE out of PATH
(cd $ldns && libtoolize --copy && autoheader && autoconf)
(cd $ldns/drill && aclocal && autoheader && autoconf)
# 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
cd $ldns
./configure --prefix= --exec-prefix=/usr --disable-dane-ta-usage
cd $ldns/drill
./configure --prefix= --exec-prefix=/usr