miniupnpc: added HAVE_IPV6 and LIBDIR
This commit is contained in:
parent
7129fcb9f2
commit
ea7b76b46c
|
@ -20,6 +20,9 @@ ifeq ($(OS), Linux)
|
||||||
JARSUFFIX=linux
|
JARSUFFIX=linux
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
HAVE_IPV6 ?= yes
|
||||||
|
export HAVE_IPV6
|
||||||
|
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
#AR = gar
|
#AR = gar
|
||||||
#CFLAGS = -O -g -DDEBUG
|
#CFLAGS = -O -g -DDEBUG
|
||||||
|
@ -99,10 +102,11 @@ TESTMINIWGETOBJS := $(TESTMINIWGETOBJS) minissdpc.o
|
||||||
TESTIGDDESCPARSE := $(TESTIGDDESCPARSE) minissdpc.o
|
TESTIGDDESCPARSE := $(TESTIGDDESCPARSE) minissdpc.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LIBDIR ?= lib
|
||||||
# install directories
|
# install directories
|
||||||
INSTALLPREFIX ?= $(PREFIX)/usr
|
INSTALLPREFIX ?= $(PREFIX)/usr
|
||||||
INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc
|
INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc
|
||||||
INSTALLDIRLIB = $(INSTALLPREFIX)/lib
|
INSTALLDIRLIB = $(INSTALLPREFIX)/$(LIBDIR)
|
||||||
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
|
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
|
||||||
INSTALLDIRMAN = $(INSTALLPREFIX)/share/man
|
INSTALLDIRMAN = $(INSTALLPREFIX)/share/man
|
||||||
|
|
||||||
|
|
|
@ -19,16 +19,26 @@ TMPDIR=`mktemp -d`
|
||||||
HTTPSERVEROUT="${TMPDIR}/httpserverout"
|
HTTPSERVEROUT="${TMPDIR}/httpserverout"
|
||||||
EXPECTEDFILE="${TMPDIR}/expectedfile"
|
EXPECTEDFILE="${TMPDIR}/expectedfile"
|
||||||
DOWNLOADEDFILE="${TMPDIR}/downloadedfile"
|
DOWNLOADEDFILE="${TMPDIR}/downloadedfile"
|
||||||
#ADDR=localhost
|
|
||||||
ADDR="[::1]"
|
|
||||||
PORT=
|
PORT=
|
||||||
RET=0
|
RET=0
|
||||||
|
|
||||||
|
case "$HAVE_IPV6" in
|
||||||
|
n|no|0)
|
||||||
|
ADDR=localhost
|
||||||
|
SERVERARGS=""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ADDR="[::1]"
|
||||||
|
SERVERARGS="-6"
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
#make minihttptestserver
|
#make minihttptestserver
|
||||||
#make testminiwget
|
#make testminiwget
|
||||||
|
|
||||||
# launching the test HTTP server
|
# launching the test HTTP server
|
||||||
./minihttptestserver -6 -e $EXPECTEDFILE > $HTTPSERVEROUT &
|
./minihttptestserver $SERVERARGS -e $EXPECTEDFILE > $HTTPSERVEROUT &
|
||||||
while [ -z "$PORT" ]; do
|
while [ -z "$PORT" ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
PORT=`cat $HTTPSERVEROUT | sed 's/Listening on port \([0-9]*\)/\1/' `
|
PORT=`cat $HTTPSERVEROUT | sed 's/Listening on port \([0-9]*\)/\1/' `
|
||||||
|
|
Loading…
Reference in New Issue