Merge pull request #22 from ony/master

Allow LIBDIR override and IPv6 opt out
This commit is contained in:
Thomas BERNARD 2012-10-16 02:15:24 -07:00
commit 5c7947cf62
2 changed files with 18 additions and 4 deletions

View File

@ -20,6 +20,9 @@ ifeq ($(OS), Linux)
JARSUFFIX=linux
endif
HAVE_IPV6 ?= yes
export HAVE_IPV6
CC ?= gcc
#AR = gar
#CFLAGS = -O -g -DDEBUG
@ -99,10 +102,11 @@ TESTMINIWGETOBJS := $(TESTMINIWGETOBJS) minissdpc.o
TESTIGDDESCPARSE := $(TESTIGDDESCPARSE) minissdpc.o
endif
LIBDIR ?= lib
# install directories
INSTALLPREFIX ?= $(PREFIX)/usr
INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc
INSTALLDIRLIB = $(INSTALLPREFIX)/lib
INSTALLDIRLIB = $(INSTALLPREFIX)/$(LIBDIR)
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
INSTALLDIRMAN = $(INSTALLPREFIX)/share/man

View File

@ -19,16 +19,26 @@ TMPDIR=`mktemp -d`
HTTPSERVEROUT="${TMPDIR}/httpserverout"
EXPECTEDFILE="${TMPDIR}/expectedfile"
DOWNLOADEDFILE="${TMPDIR}/downloadedfile"
#ADDR=localhost
ADDR="[::1]"
PORT=
RET=0
case "$HAVE_IPV6" in
n|no|0)
ADDR=localhost
SERVERARGS=""
;;
*)
ADDR="[::1]"
SERVERARGS="-6"
;;
esac
#make minihttptestserver
#make testminiwget
# launching the test HTTP server
./minihttptestserver -6 -e $EXPECTEDFILE > $HTTPSERVEROUT &
./minihttptestserver $SERVERARGS -e $EXPECTEDFILE > $HTTPSERVEROUT &
while [ -z "$PORT" ]; do
sleep 1
PORT=`cat $HTTPSERVEROUT | sed 's/Listening on port \([0-9]*\)/\1/' `