[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.
|
# Set SSL flags depending on the platform.
|
||||||
case "$(uname)" in
|
case "$(uname)" in
|
||||||
OpenBSD)
|
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
|
esac
|
||||||
|
|
||||||
|
@ -80,6 +80,14 @@ for arg in $SCRIPT_ARGS; do
|
||||||
TLS_IMPL=""
|
TLS_IMPL=""
|
||||||
TLS_LIBS=""
|
TLS_LIBS=""
|
||||||
;;
|
;;
|
||||||
|
--with-lmdb)
|
||||||
|
EDB_IMPL="EDB_LMDB"
|
||||||
|
EDB_LIBS="-llmdb"
|
||||||
|
;;
|
||||||
|
--disable-lmdb)
|
||||||
|
EDB_IMPL=""
|
||||||
|
EDB_LIBS=""
|
||||||
|
;;
|
||||||
--prefix=*)
|
--prefix=*)
|
||||||
PREFIX=$(echo "$arg" | cut -d '=' -f 2-)
|
PREFIX=$(echo "$arg" | cut -d '=' -f 2-)
|
||||||
;;
|
;;
|
||||||
|
@ -104,6 +112,11 @@ if [ -n "$TLS_IMPL" ]; then
|
||||||
LIBS="${LIBS} ${TLS_LIBS}"
|
LIBS="${LIBS} ${TLS_LIBS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$EDB_IMPL" ]; then
|
||||||
|
CFLAGS="${CFLAGS} -DEDB_IMPL=${EDB_IMPL}"
|
||||||
|
LIBS="${LIBS} ${EDB_LIBS}"
|
||||||
|
fi
|
||||||
|
|
||||||
CFLAGS="${CFLAGS} '-DLIB_NAME=\"${LIB_NAME}\"' ${DEBUG}"
|
CFLAGS="${CFLAGS} '-DLIB_NAME=\"${LIB_NAME}\"' ${DEBUG}"
|
||||||
LDFLAGS="${LIBS} ${LDFLAGS}"
|
LDFLAGS="${LIBS} ${LDFLAGS}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue