From 5f9628c9273815b6e560603427fe86118e7cb5bb Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Sun, 9 Jan 2022 11:57:53 +0000 Subject: build: if `--enable-sqlite3` is `yes`, abort if libsqlite3 is not found If SQLITE3 support has been explicitly requested, abort if it is not available. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- configure.ac | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 62c43d6..5e90bb6 100644 --- a/configure.ac +++ b/configure.ac @@ -176,8 +176,13 @@ AM_CONDITIONAL([HAVE_MYSQL], [test "x$libmysqlclient_LIBS" != "x"]) AC_ARG_ENABLE([sqlite3], [AS_HELP_STRING([--enable-sqlite3], [Enable SQLITE3 output plugin [default=test]])]) -AS_IF([test "x$enable_sqlite3" != "xno"], - [PKG_CHECK_MODULES([libsqlite3], [sqlite3], [], [:])]) +AS_IF([test "x$enable_sqlite3" != "xno"], [ + PKG_CHECK_MODULES([libsqlite3], [sqlite3], [], [ + AS_IF([test "x$enable_sqlite3" = "xyes"], [ + AC_MSG_ERROR([$libsqlite3_PKG_ERRORS]) + ]) + ]) +]) AS_IF([test "x$libsqlite3_LIBS" != "x"], [enable_sqlite3=yes], [enable_sqlite3=no]) AM_CONDITIONAL([HAVE_SQLITE3], [test "x$libsqlite3_LIBS" != "x"]) -- cgit v1.2.3