diff options
Diffstat (limited to 'gold/configure.ac')
-rw-r--r-- | gold/configure.ac | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac index 4f432809b3..25fae6b998 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -591,6 +591,32 @@ if test "$threads" = "yes"; then fi AM_CONDITIONAL(THREADS, test "$threads" = "yes") +# 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 + dnl We have to check these in C, not C++, because autoconf generates dnl tests which have no type information, and current glibc provides dnl multiple declarations of functions like basename when compiling |