1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
--- a/configure.in
+++ b/configure.in
@@ -18,6 +18,7 @@
AC_PROG_CXX
AC_PROG_LIBTOOL
+PKG_PROG_PKG_CONFIG
AC_LANG(C++)
ACX_PTHREAD
@@ -40,6 +41,12 @@
AC_CHECK_FUNCS([fopen64], ,[AM_CFLAGS=-DUSE_FILE32API])
AC_SUBST(AM_CFLAGS)
+PKG_CHECK_MODULES([MINIZIP], [minizip],
+ [HAVE_MINIZIP=true], [HAVE_MINIZIP=false])
+AC_SUBST([MINIZIP_CFLAGS])
+AC_SUBST([MINIZIP_LIBS])
+AM_CONDITIONAL([HAVE_MINIZIP], [test $HAVE_MINIZIP = true])
+
AC_ARG_WITH([epoll],
AS_HELP_STRING([--with-epoll=yes|no|probe], [use epoll]),
[epoll_option=$withval],
--- a/framework/common/Makefile.am
+++ b/framework/common/Makefile.am
@@ -23,7 +23,6 @@
httpparser.cpp \
httprequest.cpp \
httpreply.cpp \
- ioapi.c \
job.cpp \
langlib.cpp \
listener.cpp \
@@ -40,16 +39,13 @@
stringlessignorecase.cpp \
tntconfig.cpp \
tntnet.cpp \
- unzip.c \
unzipfile.cpp \
urlescostream.cpp \
urlmapper.cpp \
util.cpp \
worker.cpp \
zdata.cpp \
- crypt.h \
- ioapi.h \
- unzip.h
+ crypt.h
nobase_include_HEADERS = \
tnt/applicationunlocker.h \
@@ -144,3 +140,13 @@
tnt/stressjob.h
endif
+if HAVE_MINIZIP
+libtntnet_la_CXXFLAGS += $(MINIZIP_CFLAGS)
+libtntnet_la_LDFLAGS += $(MINIZIP_LIBS)
+else
+libtntnet_la_SOURCES += \
+ ioapi.c \
+ ioapi.h \
+ unzip.c \
+ unzip.h
+endif
|