freebsd-configure.sh revision 269257
1255577Sdes#!/bin/sh 2255779Sdes# 3255779Sdes# $FreeBSD: stable/10/contrib/unbound/freebsd-configure.sh 269257 2014-07-29 20:57:38Z des $ 4255779Sdes# 5255577Sdes 6255577Sdesset -e 7255577Sdes 8255577Sdeserror() { 9255577Sdes echo "$@" >&2 10255577Sdes exit 1 11255577Sdes} 12255577Sdes 13255577Sdesunbound=$(dirname $(realpath $0)) 14255577Sdescd $unbound 15255577Sdes 16255577Sdesldnssrc=$(realpath $unbound/../ldns) 17255577Sdes[ -f $ldnssrc/ldns/ldns.h ] || error "can't find LDNS sources" 18255577Sdesexport CFLAGS="-I$ldnssrc" 19255577Sdes 20255577Sdesldnsbld=$(realpath $unbound/../../lib/libldns) 21255577Sdes[ -f $ldnsbld/Makefile ] || error "can't find LDNS build directory" 22255577Sdes 23255577Sdesldnsobj=$(realpath $(make -C$ldnsbld -V.OBJDIR)) 24255577Sdes[ -f $ldnsobj/libldns.a ] || error "can't find LDNS object directory" 25255577Sdesexport LDFLAGS="-L$ldnsobj" 26255577Sdes 27255839Sdesautoconf 28255839Sdesautoheader 29255577Sdes./configure \ 30255594Sdes --prefix= --exec-prefix=/usr \ 31255839Sdes --with-conf-file=/var/unbound/unbound.conf \ 32255577Sdes --with-run-dir=/var/unbound \ 33255577Sdes --with-username=unbound 34255577Sdes 35269257Sdes# Don't try to provide bogus memory usage statistics based on sbrk(2). 36269257Sdessed -n -i.orig -e '/HAVE_SBRK/!p' config.status 37269257Sdes./config.status config.h 38