X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gold%2Fconfigure.ac;h=44e858e2667d2bd71208f435f21c4df810b8bdcf;hb=d5b4c0ddb9afaac5d5f741da4a863a4a71992969;hp=042b9f06437cc36e9151f172d9d6138fd530ce3c;hpb=360ef3b94a9120729ae36f1ca9e7e1935d5788eb;p=binutils-gdb.git diff --git a/gold/configure.ac b/gold/configure.ac index 042b9f06437..44e858e2667 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl dnl This file is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -566,8 +566,10 @@ else AC_LIBOBJ(mremap) fi -# Link in zlib if we can. This allows us to write compressed sections. +# Link in zlib/zstd if we can. This allows us to write compressed sections. AM_ZLIB +AC_ZSTD +AM_CONDITIONAL(HAVE_ZSTD, test "$pkg_cv_ZSTD_LIBS" != "") AC_ARG_ENABLE([threads], [[ --enable-threads[=ARG] multi-threaded linking [ARG={auto,yes,no}]]], @@ -591,6 +593,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