Skip to content
Snippets Groups Projects
Commit 27cecbfa authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

configure: optional LMDB

parent 0cc07c15
Branches
Tags
No related merge requests found
......@@ -312,23 +312,9 @@ dt_DNSTAP([
])
AM_CONDITIONAL([HAVE_DNSTAP], test "$opt_dnstap" != "no")
dnl Check for lmdb.
AC_ARG_WITH(lmdb,
AC_HELP_STRING([--with-lmdb=[DIR]], [Support for LMDB.]),
with_lmdb=$withval,
with_lmdb=yes
)
if test "$with_lmdb" != "no" ; then
AC_SEARCH_LIBS([mdb_env_open], [lmdb], [with_lmdb=yes], [with_lmdb=no])
if test "$with_lmdb" != "yes" ; then
with_lmdb=no
AC_MSG_WARN([LMDB not found])
else
with_lmdb=yes
AC_DEFINE([HAVE_LMDB], [1], [Define to 1 to enable LMDB.])
fi
fi
AM_CONDITIONAL([HAVE_LMDB], test "$with_lmdb" != "no")
dnl Check for LMDB
KNOT_CHECK_HEADER([lmdb], [LMDB], [auto], [lmdb.h], [], [-llmdb])
AM_CONDITIONAL([HAVE_LMDB], [test "$enable_lmdb" = yes])
AC_SEARCH_LIBS([pow], [m])
AC_SEARCH_LIBS([pthread_create], [pthread], [], [AC_MSG_ERROR([pthreads not found])])
......@@ -425,6 +411,7 @@ AC_MSG_RESULT([
Systemd integration: ${enable_systemd}
Dnstap support: ${opt_dnstap}
Code coverage: ${enable_code_coverage}
LMDB support: ${enable_lmdb}
Continue with 'make' command
])
......@@ -339,7 +339,7 @@ libknotcs_la_CPPFLAGS = $(AM_CPPFLAGS) $(systemd_CFLAGS)
libknotcs_la_LDFLAGS = $(AM_LDFLAGS) $(systemd_LIBS)
# sbin programs
knotd_LDADD = libknot.la libknotd.la $(systemd_LIBS)
knotd_LDADD = libknot.la libknotd.la $(systemd_LIBS) $(lmdb_LIBS)
knotc_LDADD = libknot.la libknotd.la
# bin programs
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment