arm64 libc: hide .cerror, .curbrk, .minbrk for WITHOUT_SYMVER
[freebsd-src.git] / contrib / unbound / freebsd-configure.sh
blob5d930a60317debe86574c9b7e7d0d2720a759356
1 #!/bin/sh
3 # $FreeBSD$
6 set -e
8 error() {
9 echo "$@" >&2
10 exit 1
13 unbound=$(dirname $(realpath $0))
14 cd $unbound
16 ldnssrc=$(realpath $unbound/../ldns)
17 [ -f $ldnssrc/ldns/ldns.h ] || error "can't find LDNS sources"
18 export CFLAGS="-I$ldnssrc"
20 ldnsbld=$(realpath $unbound/../../lib/libldns)
21 [ -f $ldnsbld/Makefile ] || error "can't find LDNS build directory"
23 ldnsobj=$(realpath $(make -C$ldnsbld -V.OBJDIR))
24 [ -f $ldnsobj/libprivateldns.a ] || error "can't find LDNS object directory"
25 export LDFLAGS="-L$ldnsobj"
27 export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC)
28 export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP)
30 autoconf
31 autoheader
32 ./configure \
33 --prefix= --exec-prefix=/usr \
34 --with-conf-file=/var/unbound/unbound.conf \
35 --with-run-dir=/var/unbound \
36 --with-username=unbound
38 # Don't try to provide bogus memory usage statistics based on sbrk(2).
39 sed -n -i.orig -e '/HAVE_SBRK/!p' config.status
40 ./config.status config.h