summaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 512b81c..5e98400 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -55,9 +55,10 @@ CFLAGS += -DUSELOCALE
#CFLAGS += -DXLS
#LDLIBS += -lxlsreader
-# Uncomment for basic XLSX support. Requires libzip and libxml2
-#CFLAGS += -DXLSX -I/usr/include/libxml2
-#LDLIBS += -lzip -lxml2
+ifneq ($(shell pkg-config --exists libzip libxml-2.0 || echo 'no'),no)
+CFLAGS += -DXLSX $(shell pkg-config --cflags libxml-2.0 libzip)
+LDLIBS += $(shell pkg-config --libs libxml-2.0 libzip)
+endif
OBJS = $(patsubst %.c, %.o, $(wildcard *.c) $(wildcard utils/*.c)) gram.o