2013-09-15 00:05:16 +00:00
|
|
|
#!/bin/sh
|
2013-09-21 23:29:02 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
2013-09-15 00:05:16 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
error() {
|
|
|
|
echo "$@" >&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
unbound=$(dirname $(realpath $0))
|
|
|
|
cd $unbound
|
|
|
|
|
|
|
|
ldnssrc=$(realpath $unbound/../ldns)
|
|
|
|
[ -f $ldnssrc/ldns/ldns.h ] || error "can't find LDNS sources"
|
|
|
|
export CFLAGS="-I$ldnssrc"
|
|
|
|
|
|
|
|
ldnsbld=$(realpath $unbound/../../lib/libldns)
|
|
|
|
[ -f $ldnsbld/Makefile ] || error "can't find LDNS build directory"
|
|
|
|
|
|
|
|
ldnsobj=$(realpath $(make -C$ldnsbld -V.OBJDIR))
|
2015-09-17 16:10:11 +00:00
|
|
|
[ -f $ldnsobj/libprivateldns.a ] || error "can't find LDNS object directory"
|
2013-09-15 00:05:16 +00:00
|
|
|
export LDFLAGS="-L$ldnsobj"
|
|
|
|
|
2015-12-12 22:54:12 +00:00
|
|
|
export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC)
|
|
|
|
export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP)
|
|
|
|
|
2013-09-24 09:56:10 +00:00
|
|
|
autoconf
|
|
|
|
autoheader
|
2013-09-15 00:05:16 +00:00
|
|
|
./configure \
|
2013-09-15 13:49:43 +00:00
|
|
|
--prefix= --exec-prefix=/usr \
|
2013-09-24 09:56:10 +00:00
|
|
|
--with-conf-file=/var/unbound/unbound.conf \
|
2013-09-15 00:05:16 +00:00
|
|
|
--with-run-dir=/var/unbound \
|
|
|
|
--with-username=unbound
|
|
|
|
|
2014-07-19 18:38:48 +00:00
|
|
|
# Don't try to provide bogus memory usage statistics based on sbrk(2).
|
|
|
|
sed -n -i.orig -e '/HAVE_SBRK/!p' config.status
|
|
|
|
./config.status config.h
|