windows compile without ldns.

git-svn-id: file:///svn/unbound/trunk@3029 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2013-12-03 14:14:27 +00:00
parent 419a074315
commit e5059e7406
2 changed files with 3 additions and 51 deletions

View file

@ -42,7 +42,7 @@ cwd=`pwd`
# Utility functions. # Utility functions.
usage () { usage () {
cat >&2 <<EOF cat >&2 <<EOF
Usage $0: [-h] [-s] [-d SVN_root] [-l ldns_path] [-w ...args...] Usage $0: [-h] [-s] [-d SVN_root] [-w ...args...]
Generate a distribution tar file for unbound. Generate a distribution tar file for unbound.
-h This usage information. -h This usage information.
@ -53,10 +53,8 @@ Generate a distribution tar file for unbound.
(which will then be unbound-<version>rc<number>) (which will then be unbound-<version>rc<number>)
-d SVN_root Retrieve the unbound source from the specified repository. -d SVN_root Retrieve the unbound source from the specified repository.
Detected from svn working copy if not specified. Detected from svn working copy if not specified.
-l ldnsdir Directory where ldns resides. Detected from Makefile.
-wssl openssl.xx.tar.gz Also build openssl from tarball for windows dist. -wssl openssl.xx.tar.gz Also build openssl from tarball for windows dist.
-wxp expat.xx.tar.gz Also build expat from tarball for windows dist. -wxp expat.xx.tar.gz Also build expat from tarball for windows dist.
-wldns ldns.xx.tar.gz Also build libldns from tarball for windows dist.
-w ... Build windows binary dist. last args passed to configure. -w ... Build windows binary dist. last args passed to configure.
EOF EOF
exit 1 exit 1
@ -141,11 +139,9 @@ create_temp_dir () {
SNAPSHOT="no" SNAPSHOT="no"
RC="no" RC="no"
LDNSDIR=""
DOWIN="no" DOWIN="no"
WINSSL="" WINSSL=""
WINEXPAT="" WINEXPAT=""
WINLDNS=""
# Parse the command line arguments. # Parse the command line arguments.
while [ "$1" ]; do while [ "$1" ]; do
@ -160,10 +156,6 @@ while [ "$1" ]; do
"-s") "-s")
SNAPSHOT="yes" SNAPSHOT="yes"
;; ;;
"-wldns")
WINLDNS="$2"
shift
;;
"-wssl") "-wssl")
WINSSL="$2" WINSSL="$2"
shift shift
@ -177,10 +169,6 @@ while [ "$1" ]; do
shift shift
break break
;; ;;
"-l")
LDNSDIR="$2"
shift
;;
"-rc") "-rc")
RC="$2" RC="$2"
shift shift
@ -227,21 +215,6 @@ if [ "$DOWIN" = "yes" ]; then
cd .. cd ..
fi fi
if test -n "$WINLDNS"; then
info "Cross compile $WINLDNS"
info "ldns tar unpack"
(cd ..; gzip -cd $WINLDNS) | tar xf - || error_cleanup "tar unpack of $WINLDNS failed"
cd ldns-* || error_cleanup "no ldns-X dir in tarball"
# we can use the cross_flag with openssl in it
info "ldns: Configure $cross_flag"
mingw32-configure $cross_flag || error_cleanup "ldns configure failed"
info "ldns: make"
make || error_cleanup "ldns crosscompile failed"
# use from the build directory.
cross_flag="$cross_flag --with-ldns=`pwd`"
cd ..
fi
if test -n "$WINEXPAT"; then if test -n "$WINEXPAT"; then
info "Cross compile $WINEXPAT" info "Cross compile $WINEXPAT"
info "wxp: tar unpack" info "wxp: tar unpack"
@ -343,16 +316,6 @@ if [ "$DOWIN" = "yes" ]; then
fi fi
check_svn_root check_svn_root
# Check if LDNSDIR is specified.
if test -z "$LDNSDIR"; then
# try to autodetect from Makefile (if present)
if test -f Makefile; then
eval `grep 'ldnsdir=' Makefile`
if echo "$ldnsdir" | grep -v ldns-src/ >/dev/null 2>&1; then
LDNSDIR="$ldnsdir"
fi
fi
fi
# Start the packaging process. # Start the packaging process.
info "SVNROOT is $SVNROOT" info "SVNROOT is $SVNROOT"
@ -382,18 +345,6 @@ flex -i -t util/configlexer.lex >> util/configlexer.c || error_cleanup "Failed
if test -x `which bison` 2>&1; then YACC=bison; else YACC=yacc; fi if test -x `which bison` 2>&1; then YACC=bison; else YACC=yacc; fi
$YACC -y -d -o util/configparser.c util/configparser.y || error_cleanup "Failed to create configparser" $YACC -y -d -o util/configparser.c util/configparser.y || error_cleanup "Failed to create configparser"
# check shared code, ldns-testpkts from ldns examples, if possible.
cd ../..
if test ! -z "$LDNSDIR"; then
if diff -q $LDNSDIR/examples/ldns-testpkts.c testcode/ldns-testpkts.c &&
diff -q $LDNSDIR/examples/ldns-testpkts.h testcode/ldns-testpkts.h; then
info "ldns-testpkts.c and ldns-testpkts.h are OK"
else
info "ldns-testpkts is different in ldns and unbound"
fi
fi
cd $temp_dir/unbound
find . -name .c-mode-rc.el -exec rm {} \; find . -name .c-mode-rc.el -exec rm {} \;
find . -name .cvsignore -exec rm {} \; find . -name .cvsignore -exec rm {} \;
rm makedist.sh || error_cleanup "Failed to remove makedist.sh." rm makedist.sh || error_cleanup "Failed to remove makedist.sh."

View file

@ -92,6 +92,7 @@ do_print(struct ub_result* result, char* file)
fatal("fopen failed"); fatal("fopen failed");
} }
i = 0; i = 0;
if(result->havedata)
while(result->data[i]) { while(result->data[i]) {
sldns_wire2str_rdata_buf((uint8_t*)result->data[i], sldns_wire2str_rdata_buf((uint8_t*)result->data[i],
(size_t)result->len[i], s, sizeof(s), (size_t)result->len[i], s, sizeof(s),