mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2024-10-30 09:10:47 +03:00
[ADD/WIP] Start adding a lmdb flag to configure
Start of my work to get out LMDB support. I want to make it optional, as some environments just can't use LMDB(due to mapped RAM limits, or places where mmap is unavailable (a rather cursed platform!)). Next up: Start separating Db to allow multiple subimplementations instead of being expressly for nested-dir JSON ops.
This commit is contained in:
parent
c3646294f5
commit
87d9421f11
1 changed files with 15 additions and 2 deletions
17
configure
vendored
17
configure
vendored
|
@ -24,10 +24,10 @@ SCRIPT_ARGS="--prefix=/usr/local --lib-name=Cytoplasm"
|
|||
# Set SSL flags depending on the platform.
|
||||
case "$(uname)" in
|
||||
OpenBSD)
|
||||
SCRIPT_ARGS="${SCRIPT_ARGS} --with-libressl"
|
||||
SCRIPT_ARGS="${SCRIPT_ARGS} --with-libressl --disable-lmdb"
|
||||
;;
|
||||
*)
|
||||
SCRIPT_ARGS="${SCRIPT_ARGS} --with-openssl"
|
||||
SCRIPT_ARGS="${SCRIPT_ARGS} --with-openssl --disable-lmdb"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -80,6 +80,14 @@ for arg in $SCRIPT_ARGS; do
|
|||
TLS_IMPL=""
|
||||
TLS_LIBS=""
|
||||
;;
|
||||
--with-lmdb)
|
||||
EDB_IMPL="EDB_LMDB"
|
||||
EDB_LIBS="-llmdb"
|
||||
;;
|
||||
--disable-lmdb)
|
||||
EDB_IMPL=""
|
||||
EDB_LIBS=""
|
||||
;;
|
||||
--prefix=*)
|
||||
PREFIX=$(echo "$arg" | cut -d '=' -f 2-)
|
||||
;;
|
||||
|
@ -104,6 +112,11 @@ if [ -n "$TLS_IMPL" ]; then
|
|||
LIBS="${LIBS} ${TLS_LIBS}"
|
||||
fi
|
||||
|
||||
if [ -n "$EDB_IMPL" ]; then
|
||||
CFLAGS="${CFLAGS} -DEDB_IMPL=${EDB_IMPL}"
|
||||
LIBS="${LIBS} ${EDB_LIBS}"
|
||||
fi
|
||||
|
||||
CFLAGS="${CFLAGS} '-DLIB_NAME=\"${LIB_NAME}\"' ${DEBUG}"
|
||||
LDFLAGS="${LIBS} ${LDFLAGS}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue