summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés M <andmarti1424@users.noreply.github.com>2017-02-12 08:16:12 -0300
committerGitHub <noreply@github.com>2017-02-12 08:16:12 -0300
commit3dd6a1b2bbaa78ce9bf2bba18925fcd9fbb510af (patch)
tree4557207c5ec2ef3635cd4c2194c22dfff4f13b41
parenta25110b16c1f1bdf55e96c2ad4501f602bb47855 (diff)
parentb0bd0da696481fa7f6a97e1236e219e29b51b9e4 (diff)
Merge pull request #136 from melak/fix/xlsx_support
Autodetect XLSX support
-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