aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-06-16 23:01:52 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-06-16 23:01:52 +0200
commitc17b1b06c00f23339ea3c5e17d19fac38115520f (patch)
tree9eefa8328542327512c9175ab5421d2a0debc2fa
parent729e241bf89a4c654594c10f193741c62c8a7f82 (diff)
parentce33665c36e0f51c9f9a917bf0d3ee6955c6e034 (diff)
downloadsparse-c17b1b06c00f23339ea3c5e17d19fac38115520f.tar.gz
Merge branch 'sindex-build'
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f46654e7..4bf96f40 100644
--- a/Makefile
+++ b/Makefile
@@ -145,11 +145,18 @@ endif
HAVE_SQLITE := $(shell $(PKG_CONFIG) --exists sqlite3 2>/dev/null && echo 'yes')
ifeq ($(HAVE_SQLITE),yes)
+SQLITE_VERSION:=$(shell $(PKG_CONFIG) --modversion sqlite3)
+SQLITE_VNUMBER:=$(shell printf '%d%02d%02d' $(subst ., ,$(SQLITE_VERSION)))
+ifeq ($(shell expr "$(SQLITE_VNUMBER)" '>=' 32400),1)
PROGRAMS += sindex
INST_PROGRAMS += sindex
INST_MAN1 += sindex.1
sindex-ldlibs := $(shell $(PKG_CONFIG) --libs sqlite3)
sindex-cflags := $(shell $(PKG_CONFIG) --cflags sqlite3)
+sindex-cflags += -std=gnu99
+else
+$(warning Your SQLite3 version ($(SQLITE_VERSION)) is too old, 3.24.0 or later is required.)
+endif
else
$(warning Your system does not have sqlite3, disabling sindex)
endif