summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac70
1 files changed, 59 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index f38c32c3..b7e76504 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([elfutils],[0.180],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
+AC_INIT([elfutils],[0.182],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
dnl Workaround for older autoconf < 2.64
m4_ifndef([AC_PACKAGE_URL],
@@ -206,7 +206,7 @@ fi
# We really want build-ids. Warn and force generating them if gcc was
# configure without --enable-linker-build-id
AC_CACHE_CHECK([whether the compiler generates build-ids], ac_cv_buildid, [dnl
-AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; readelf -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))])
+AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))])
if test "$ac_cv_buildid" = "no"; then
AC_MSG_WARN([compiler doesn't generate build-id by default])
LDFLAGS="$LDFLAGS -Wl,--build-id"
@@ -267,7 +267,8 @@ dnl check it before including config.h (which might define _FILE_OFFSET_BITS).
AC_CACHE_CHECK([whether fts.h is bad when included (with LFS)], ac_cv_bad_fts,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <fts.h>]])],
ac_cv_bad_fts=no, ac_cv_bad_fts=yes)])
-AS_IF([test "x$ac_cv_bad_fts" = "xyes"], [CFLAGS="$CFLAGS -DBAD_FTS=1"])
+AS_IF([test "x$ac_cv_bad_fts" = "xyes"],
+ [CFLAGS="$CFLAGS -DBAD_FTS=1" CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
# See if we can add -D_FORTIFY_SOURCE=2. Don't do it if it is already
# (differently) defined or if it generates warnings/errors because we
@@ -402,8 +403,8 @@ eu_ZIPLIB(zlib,ZLIB,z,gzdirect,gzip)
AS_IF([test "x$with_zlib" = xno], [AC_MSG_ERROR([zlib not found but is required])])
LIBS="$save_LIBS"
-dnl Test for bzlib and xz/lzma, gives BZLIB/LZMALIB .am
-dnl conditional and config.h USE_BZLIB/USE_LZMALIB #define.
+dnl Test for bzlib and xz/lzma/zstd, gives BZLIB/LZMALIB/ZSTD .am
+dnl conditional and config.h USE_BZLIB/USE_LZMALIB/USE_ZSTD #define.
save_LIBS="$LIBS"
LIBS=
eu_ZIPLIB(bzlib,BZLIB,bz2,BZ2_bzdopen,bzip2)
@@ -413,6 +414,9 @@ AC_SUBST([BZ2_LIB])
eu_ZIPLIB(lzma,LZMA,lzma,lzma_auto_decoder,[LZMA (xz)])
AS_IF([test "x$with_lzma" = xyes], [LIBLZMA="liblzma"], [LIBLZMA=""])
AC_SUBST([LIBLZMA])
+eu_ZIPLIB(zstd,ZSTD,zstd,ZSTD_decompress,[ZSTD (zst)])
+AS_IF([test "x$with_zstd" = xyes], [LIBZSTD="libzstd"], [LIBLZSTD=""])
+AC_SUBST([LIBZSTD])
zip_LIBS="$LIBS"
LIBS="$save_LIBS"
AC_SUBST([zip_LIBS])
@@ -682,19 +686,47 @@ if test "$HAVE_BUNZIP2" = "no"; then
AC_MSG_WARN([No bunzip2, needed to run make check])
fi
-# Look for libmicrohttpd, libcurl, libarchive, sqlite for debuginfo server
-# minimum versions as per rhel7. Single --enable-* option arranges to build
-# both client and server.
-AC_ARG_ENABLE([debuginfod],AC_HELP_STRING([--enable-debuginfod], [Build debuginfod server and client]))
+# For tests that need to use zstd compression
+AC_CHECK_PROG(HAVE_ZSTD, zstd, yes, no)
+AM_CONDITIONAL([HAVE_ZSTD],[test "x$HAVE_ZSTD" = "xyes"])
+
+# Look for libcurl for libdebuginfod minimum version as per rhel7.
+AC_ARG_ENABLE([libdebuginfod],AC_HELP_STRING([--enable-libdebuginfod], [Build debuginfod client library (can be =dummy)]))
+AS_IF([test "x$enable_libdebuginfod" != "xno"], [
+ if test "x$enable_libdebuginfod" != "xdummy"; then
+ AC_MSG_NOTICE([checking libdebuginfod dependencies, --disable-libdebuginfod or --enable-libdebuginfo=dummy to skip])
+ enable_libdebuginfod=yes # presume success
+ PKG_PROG_PKG_CONFIG
+ PKG_CHECK_MODULES([libcurl],[libcurl >= 7.29.0],[],[enable_libdebuginfod=no])
+ if test "x$enable_libdebuginfod" = "xno"; then
+ AC_MSG_ERROR([dependencies not found, use --disable-libdebuginfod to disable or --enable-libdebuginfod=dummy to build a (bootstrap) dummy library.])
+ fi
+ else
+ AC_MSG_NOTICE([building (bootstrap) dummy libdebuginfo library])
+ fi
+])
+
+AS_IF([test "x$enable_libdebuginfod" = "xyes" || test "x$enable_libdebuginfod" = "xdummy"],
+ [AC_DEFINE([ENABLE_LIBDEBUGINFOD], [1], [Enable libdebuginfod])])
+AS_IF([test "x$enable_libdebuginfod" = "xdummy"],
+ [AC_DEFINE([DUMMY_LIBDEBUGINFOD], [1], [Build dummy libdebuginfod])])
+AM_CONDITIONAL([LIBDEBUGINFOD],[test "x$enable_libdebuginfod" = "xyes" || test "x$enable_libdebuginfod" = "xdummy"])
+AM_CONDITIONAL([DUMMY_LIBDEBUGINFOD],[test "x$enable_libdebuginfod" = "xdummy"])
+
+# Look for libmicrohttpd, libarchive, sqlite for debuginfo server
+# minimum versions as per rhel7.
+AC_ARG_ENABLE([debuginfod],AC_HELP_STRING([--enable-debuginfod], [Build debuginfod server]))
AC_PROG_CXX
AS_IF([test "x$enable_debuginfod" != "xno"], [
AC_MSG_NOTICE([checking debuginfod C++11 support, --disable-debuginfod to skip])
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
AC_MSG_NOTICE([checking debuginfod dependencies, --disable-debuginfod to skip])
+ if test "x$enable_libdebuginfod" = "xno"; then
+ AC_MSG_ERROR([need libdebuginfod (or dummy), use --disable-debuginfod to disable.])
+ fi
enable_debuginfod=yes # presume success
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= 0.9.33],[],[enable_debuginfod=no])
- PKG_CHECK_MODULES([libcurl],[libcurl >= 7.29.0],[],[enable_debuginfod=no])
PKG_CHECK_MODULES([sqlite3],[sqlite3 >= 3.7.17],[],[enable_debuginfod=no])
PKG_CHECK_MODULES([libarchive],[libarchive >= 3.1.2],[],[enable_debuginfod=no])
if test "x$enable_debuginfod" = "xno"; then
@@ -705,6 +737,18 @@ AS_IF([test "x$enable_debuginfod" != "xno"], [
AS_IF([test "x$enable_debuginfod" != "xno"],AC_DEFINE([ENABLE_DEBUGINFOD],[1],[Build debuginfod]))
AM_CONDITIONAL([DEBUGINFOD],[test "x$enable_debuginfod" = "xyes"])
+dnl for /etc/profile.d/elfutils.{csh,sh}
+default_debuginfod_urls=""
+AC_ARG_ENABLE(debuginfod-urls,
+ [AS_HELP_STRING([--enable-debuginfod-urls@<:@=URLS@:>@],[add URLS to profile.d DEBUGINFOD_URLS])],
+ [if test "x${enableval}" = "xyes";
+ then default_debuginfod_urls="https://debuginfod.elfutils.org/";
+ elif test "x${enableval}" != "xno"; then
+ default_debuginfod_urls="${enableval}";
+ fi],
+ [default_debuginfod_urls=""])
+AC_SUBST(DEBUGINFOD_URLS, $default_debuginfod_urls)
+AC_CONFIG_FILES([config/profile.sh config/profile.csh])
AC_OUTPUT
@@ -723,6 +767,7 @@ AC_MSG_NOTICE([
gzip support : ${with_zlib}
bzip2 support : ${with_bzlib}
lzma/xz support : ${with_lzma}
+ zstd support : ${with_zstd}
libstdc++ demangle support : ${enable_demangler}
File textrel check : ${enable_textrelcheck}
Symbol versioning : ${enable_symbol_versioning}
@@ -735,10 +780,13 @@ AC_MSG_NOTICE([
Deterministic archives by default : ${default_ar_deterministic}
Native language support : ${USE_NLS}
Extra Valgrind annotations : ${use_vg_annotations}
- Debuginfod client/server support : ${enable_debuginfod}
+ libdebuginfod client support : ${enable_libdebuginfod}
+ Debuginfod server support : ${enable_debuginfod}
+ Default DEBUGINFOD_URLS : ${default_debuginfod_urls}
EXTRA TEST FEATURES (used with make check)
have bunzip2 installed (required) : ${HAVE_BUNZIP2}
+ have zstd installed : ${HAVE_ZSTD}
debug branch prediction : ${use_debugpred}
gprof support : ${use_gprof}
gcov support : ${use_gcov}