Skip to content

Commit f62dbf2

Browse files
authored
Add SQLITE_ENABLE_DBSTAT_VTAB to compilation (#232)
1 parent bd7d4ca commit f62dbf2

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

33
## Unlreleased
4+
- added: `SQLITE_ENABLE_DBSTAT_VTAB=1`.
5+
- changed: Allow `EXQLITE_SYSTEM_CFLAGS` to be appended to the `CFLAGS` regardless.
46

57
## v0.13.0 - 2023-01-11
68
- removed: Remove support for Elixir 1.11

Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ ifeq ($(EXQLITE_USE_SYSTEM),)
2626
HEADERS += c_src/sqlite3.h c_src/sqlite3ext.h
2727
CFLAGS += -Ic_src
2828
else
29-
ifneq ($(EXQLITE_SYSTEM_CFLAGS),)
30-
CFLAGS += $(EXQLITE_SYSTEM_CFLAGS)
31-
endif
32-
3329
ifneq ($(EXQLITE_SYSTEM_LDFLAGS),)
3430
LDFLAGS += $(EXQLITE_SYSTEM_LDFLAGS)
3531
else
@@ -113,6 +109,12 @@ CFLAGS += -DSQLITE_ENABLE_MATH_FUNCTIONS=1
113109
CFLAGS += -DSQLITE_ENABLE_RBU=1
114110
CFLAGS += -DSQLITE_ENABLE_RTREE=1
115111
CFLAGS += -DSQLITE_OMIT_DEPRECATED=1
112+
CFLAGS += -DSQLITE_ENABLE_DBSTAT_VTAB=1
113+
114+
# Add any extra flags set in the environment
115+
ifneq ($(EXQLITE_SYSTEM_CFLAGS),)
116+
CFLAGS += $(EXQLITE_SYSTEM_CFLAGS)
117+
endif
116118

117119
# Set Erlang-specific compile flags
118120
ERL_CFLAGS ?= -I$(ERL_EI_INCLUDE_DIR)

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ config :exqlite, default_chunk_size: 100
5252

5353
## Advanced Configuration
5454

55+
### Defining Extra Compile Flags
56+
57+
You can enable certain features by doing the following:
58+
59+
```bash
60+
export EXQLITE_SYSTEM_CFLAGS=-DSQLITE_ENABLE_DBSTAT_VTAB=1
61+
```
62+
63+
### Listing Flags Used For Compilation
64+
65+
If you `export V=1` the flags used for compilation will be output to stdout.
66+
5567
### Using System Installed Libraries
5668

5769
This will vary depending on the operating system.

0 commit comments

Comments
 (0)