aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 31 insertions, 1 deletions
diff --git a/configure b/configure
index 0c5a7b3..3328319 100755
--- a/configure
+++ b/configure
@@ -71,6 +71,18 @@ else
LDFLAGS="$LDFLAGS -Llibweb -lweb"
fi
+if pkg-config fdzipstream
+then
+ in_tree_fdzipstream=0
+ CFLAGS="$CFLAGS $(pkg-config --cflags fdzipstream)"
+ LDFLAGS="$LDFLAGS $(pkg-config --libs fdzipstream)"
+else
+ echo "Info: fdzipstream not found. Using in-tree copy" >&2
+ in_tree_fdzipstream=1
+ CFLAGS="$CFLAGS -Ifdzipstream/fdzipstream"
+ LDFLAGS="$LDFLAGS -Lfdzipstream -lfdzipstream -lz"
+fi
+
cleanup()
{
rm -f $F
@@ -101,7 +113,8 @@ OBJECTS = \
jwt.o \
main.o \
page.o \
- style.o
+ style.o \
+ zip.o
all: $(PROJECT)
@@ -138,6 +151,16 @@ $(LIBWEB): FORCE
EOF
fi
+if [ $in_tree_fdzipstream -ne 0 ]
+then
+cat <<"EOF" >> $F
+FDZIPSTREAM = fdzipstream/libfdzipstream.a
+$(PROJECT): $(FDZIPSTREAM)
+$(FDZIPSTREAM): FORCE
+ +cd fdzipstream && $(MAKE) CC=$(CC)
+EOF
+fi
+
cat <<"EOF" >> $F
clean:
rm -f $(OBJECTS) $(DEPS)
@@ -157,6 +180,13 @@ cat <<"EOF" >> $F
EOF
fi
+if [ $in_tree_fdzipstream -ne 0 ]
+then
+cat <<"EOF" >> $F
+ +cd fdzipstream && $(MAKE) clean
+EOF
+fi
+
cat <<"EOF" >> $F
distclean: clean
rm -f slcl