diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2022-01-09 11:57:49 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-01-11 22:15:33 +0100 |
commit | c7280c85d29c960b90488eab0005b0c1f0e4d9e7 (patch) | |
tree | 7274bb09d7bce7207775eba3bcaa3739ef0ea762 | |
parent | 20727ab8b9fcadb9d5fa514979b48c42c9be989f (diff) |
build: if `--enable-dbi` is `yes`, abort if libdbi is not found
If DBI support has been explicitly requested, abort if it is not
available.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | configure.ac | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 75764db..bd1059a 100644 --- a/configure.ac +++ b/configure.ac @@ -171,8 +171,13 @@ AM_CONDITIONAL([HAVE_SQLITE3], [test "x$libsqlite3_LIBS" != "x"]) AC_ARG_ENABLE([dbi], [AS_HELP_STRING([--enable-dbi], [Enable DBI output plugin [default=test]])]) -AS_IF([test "x$enable_dbi" != "xno"], - [PKG_CHECK_MODULES([libdbi], [dbi], [], [:])]) +AS_IF([test "x$enable_dbi" != "xno"], [ + PKG_CHECK_MODULES([libdbi], [dbi], [], [ + AS_IF([test "x$enable_dbi" = "xyes"], [ + AC_MSG_ERROR([$libdbi_PKG_ERRORS]) + ]) + ]) +]) AS_IF([test "x$libdbi_LIBS" != "x"], [enable_dbi=yes], [enable_dbi=no]) AM_CONDITIONAL([HAVE_DBI], [test "x$libdbi_LIBS" != "x"]) |