aboutsummaryrefslogtreecommitdiff
path: root/ld/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'ld/configure.ac')
-rw-r--r--ld/configure.ac26
1 files changed, 26 insertions, 0 deletions
diff --git a/ld/configure.ac b/ld/configure.ac
index 0112148..4331d6b 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -289,6 +289,32 @@ fi
AM_CONDITIONAL(ENABLE_LIBCTF, test "${enable_libctf}" = yes)
AC_SUBST(enable_libctf)
+# Used to validate --package-metadata= input. Disabled by default.
+AC_ARG_ENABLE([jansson],
+ [AS_HELP_STRING([--enable-jansson],
+ [enable jansson [default=no]])],
+ [enable_jansson=$enableval],
+ [enable_jansson="no"])
+
+if test "x$enable_jansson" != "xno"; then
+ PKG_PROG_PKG_CONFIG
+ AS_IF([test -n "$PKG_CONFIG"],
+ [
+ PKG_CHECK_MODULES(JANSSON, [jansson],
+ [
+ AC_DEFINE(HAVE_JANSSON, 1, [The jansson library is to be used])
+ AC_SUBST([JANSSON_CFLAGS])
+ AC_SUBST([JANSSON_LIBS])
+ ],
+ [
+ AC_MSG_ERROR([Cannot find jansson library])
+ ])
+ ],
+ [
+ AC_MSG_ERROR([Cannot find pkg-config])
+ ])
+fi
+
AM_BINUTILS_WARNINGS
AM_LC_MESSAGES