[ulogd2 PATCH v2 06/10] build: if `--enable-dbi` is `yes`, abort if libdbi is not found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If DBI support has been explicitly requested, abort if it is not
available.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 configure.ac | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 75764db8aec9..bd1059a9633b 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"])
 
-- 
2.34.1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux