miniupnpc: added HAVE_IPV6 and LIBDIR
This commit is contained in:
parent
7129fcb9f2
commit
ea7b76b46c
|
@ -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
|
||||
|
||||
|
|
|
@ -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/' `
|
||||
|
|
Loading…
Reference in New Issue