From 2e67b053e3796ee7cf29a39f9698729b52078406 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 17 Oct 2023 14:24:59 -0400 Subject: [PATCH] configury: rework debuginfod searches Support --with-debuginfod=/PATH mode invocation to point at an elfutils $prefix (install tree base). This is necessary to build metadata query support, which is not yet in system elfutils libraries. --- Makefile.am | 4 +- Makefile.in | 9 +- configure | 313 +++++++++++---------- configure.ac | 31 +- doc/Makefile.in | 1 + doc/SystemTap_Tapset_Reference/Makefile.in | 1 + doc/beginners/Makefile.in | 1 + httpd/Makefile.in | 1 + httpd/docker/Makefile.in | 1 + interactive-notebook/Makefile.in | 1 + java/Makefile.in | 1 + man/Makefile.in | 1 + man/cs/Makefile.in | 1 + python/Makefile.in | 1 + stap-exporter/Makefile.in | 1 + stapbpf/Makefile.in | 1 + stapdyn/Makefile.in | 1 + staprun/Makefile.in | 1 + 18 files changed, 209 insertions(+), 162 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4beb73e9f..5737c6b20 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,7 +55,7 @@ stap_SOURCES = main.cxx session.cxx \ stapregex-dfa.cxx stringtable.cxx tapset-python.cxx \ tapset-debuginfod.cxx analysis.cxx noinst_HEADERS = sdt_types.h -stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ @LIBINTL@ -lpthread @debuginfod_LIBS@ @DYNINST_LDFLAGS@ @DYNINST_LIBS@ +stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ @LIBINTL@ -lpthread @debuginfod_LDFLAGS@ @debuginfod_LIBS@ @DYNINST_LDFLAGS@ @DYNINST_LIBS@ stap_DEPENDENCIES = if HAVE_LANGUAGE_SERVER_SUPPORT @@ -137,7 +137,7 @@ cscope: PHONIES = if BUILD_TRANSLATOR stap_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ -stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ @ALIGNEDNEW@ +stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ @ALIGNEDNEW@ @debuginfod_CFLAGS@ stap_CPPFLAGS = $(AM_CPPFLAGS) -DSTAP_SDT_V2 stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BOOST_SYSTEM_LIB@ diff --git a/Makefile.in b/Makefile.in index 212b89c33..5126dc416 100644 --- a/Makefile.in +++ b/Makefile.in @@ -591,6 +591,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ @@ -714,7 +715,8 @@ oldinclude_HEADERS = includes/sys/sdt.h includes/sys/sdt-config.h @BUILD_TRANSLATOR_TRUE@ $(am__append_24) @BUILD_TRANSLATOR_TRUE@noinst_HEADERS = sdt_types.h @BUILD_TRANSLATOR_TRUE@stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ \ -@BUILD_TRANSLATOR_TRUE@ @LIBINTL@ -lpthread @debuginfod_LIBS@ \ +@BUILD_TRANSLATOR_TRUE@ @LIBINTL@ -lpthread \ +@BUILD_TRANSLATOR_TRUE@ @debuginfod_LDFLAGS@ @debuginfod_LIBS@ \ @BUILD_TRANSLATOR_TRUE@ @DYNINST_LDFLAGS@ @DYNINST_LIBS@ \ @BUILD_TRANSLATOR_TRUE@ $(am__append_9) $(am__append_10) \ @BUILD_TRANSLATOR_TRUE@ $(am__append_15) $(am__append_21) \ @@ -744,8 +746,9 @@ PHONIES = $(am__append_23) runcheck update-po dist-gzip rpm srpm \ @BUILD_TRANSLATOR_TRUE@stap_CFLAGS = $(AM_CFLAGS) @PIECFLAGS@ \ @BUILD_TRANSLATOR_TRUE@ $(am__append_18) @BUILD_TRANSLATOR_TRUE@stap_CXXFLAGS = $(AM_CXXFLAGS) @PIECXXFLAGS@ \ -@BUILD_TRANSLATOR_TRUE@ @ALIGNEDNEW@ $(am__append_13) \ -@BUILD_TRANSLATOR_TRUE@ $(am__append_19) $(am__append_22) +@BUILD_TRANSLATOR_TRUE@ @ALIGNEDNEW@ @debuginfod_CFLAGS@ \ +@BUILD_TRANSLATOR_TRUE@ $(am__append_13) $(am__append_19) \ +@BUILD_TRANSLATOR_TRUE@ $(am__append_22) @BUILD_TRANSLATOR_TRUE@stap_CPPFLAGS = $(AM_CPPFLAGS) -DSTAP_SDT_V2 \ @BUILD_TRANSLATOR_TRUE@ $(am__append_14) $(am__append_20) @BUILD_TRANSLATOR_TRUE@stap_LDFLAGS = $(AM_LDFLAGS) @PIELDFLAGS@ @BOOST_SYSTEM_LIB@ diff --git a/configure b/configure index 69640f20c..899b0966c 100755 --- a/configure +++ b/configure @@ -767,11 +767,9 @@ BUILD_TRANSLATOR_FALSE BUILD_TRANSLATOR_TRUE sqlite3_LIBS sqlite3_CFLAGS +debuginfod_LDFLAGS debuginfod_LIBS debuginfod_CFLAGS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG PIECXXFLAGS PIECFLAGS PIELDFLAGS @@ -841,6 +839,9 @@ CPPFLAGS LDFLAGS CFLAGS CC +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE @@ -973,6 +974,9 @@ enable_http ac_precious_vars='build_alias host_alias target_alias +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR CC CFLAGS LDFLAGS @@ -983,9 +987,6 @@ CXXFLAGS CCC CPP PYTHON -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR debuginfod_CFLAGS debuginfod_LIBS sqlite3_CFLAGS @@ -1713,6 +1714,11 @@ Optional Packages: Add STRING to stap -V version Some influential environment variables: + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a @@ -1724,11 +1730,6 @@ Some influential environment variables: CXXFLAGS C++ compiler flags CPP C preprocessor PYTHON the Python interpreter - PKG_CONFIG path to pkg-config utility - PKG_CONFIG_PATH - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path debuginfod_CFLAGS C compiler flags for debuginfod, overriding pkg-config debuginfod_LIBS @@ -4096,6 +4097,136 @@ AM_BACKSLASH='\' +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + PKG_CONFIG="" + fi +fi + + + + + + + DEPDIR="${am__leading_dot}deps" @@ -11418,139 +11549,17 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5 printf %s "checking whether to use debuginfod... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5 -printf "%s\n" "$with_debuginfod" >&6; } -if test "x$with_debuginfod" != xno; then - - - - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -printf "%s\n" "$PKG_CONFIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi +if expr "$with_debuginfod" : "/.*"; then + debuginfod_LDFLAGS=-L$with_debuginfod/lib + debuginfod_LIBS=-ldebuginfod + debuginfod_CFLAGS=-I$with_debuginfod/include + have_debuginfod=1 - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi +printf "%s\n" "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - PKG_CONFIG="" - fi -fi +elif test "x$with_debuginfod" != xno; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for debuginfod" >&5 @@ -11612,33 +11621,34 @@ fi if test "x$with_debuginfod" = xyes; then as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 -printf "%s\n" "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} fi elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if test "x$with_debuginfod" = xyes; then as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 -printf "%s\n" "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} fi else debuginfod_CFLAGS=$pkg_cv_debuginfod_CFLAGS debuginfod_LIBS=$pkg_cv_debuginfod_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + have_debuginfod=1 +fi printf "%s\n" "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5 -printf "%s\n" "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi +ac_save_CFLAGS="$CFLAGS" +ac_save_LDFLAGS="$LDFLAGS" +CFLAGS="$CFLAGS $debuginfod_CFLAGS" +LDFLAGS="$LDFLAGS $debuginfod_LDFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for debuginfod_find_metadata in -ldebuginfod" >&5 printf %s "checking for debuginfod_find_metadata in -ldebuginfod... " >&6; } if test ${ac_cv_lib_debuginfod_debuginfod_find_metadata+y} @@ -11683,6 +11693,9 @@ printf "%s\n" "#define METADATA_QUERY_ENABLED 1" >>confdefs.h fi +CFLAGS="$ac_save_CFLAGS" +LDFLAGS="$ac_save_LDFLAGS" + # Check whether --enable-sqlite was given. if test ${enable_sqlite+y} diff --git a/configure.ac b/configure.ac index b0f6501ac..979567a00 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,7 @@ AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +PKG_PROG_PKG_CONFIG AC_USE_SYSTEM_EXTENSIONS AC_PROG_MKDIR_P AC_SUBST(MKDIR_P) @@ -201,27 +202,43 @@ AC_SUBST(PIECFLAGS) AC_SUBST(PIECXXFLAGS) dnl Handle optional debuginfod support. If not specified by the user, -dnl use it if present. +dnl use it if present. If given --with-debuginfod=/PATH, interpret /PATH as a prefix +dnl of an elfutils install tree. AC_ARG_WITH([debuginfod], AS_HELP_STRING([--with-debuginfod],[Enable debuginfo lookups with debuginfod (auto/yes/no)]), [], [with_debuginfod=auto]) AC_MSG_CHECKING([whether to use debuginfod]) -AC_MSG_RESULT([$with_debuginfod]) -if test "x$with_debuginfod" != xno; then +if expr "$with_debuginfod" : "/.*" >/dev/null; then +dnl take the user at his or her word + debuginfod_LDFLAGS=-L$with_debuginfod/lib + debuginfod_LIBS=-ldebuginfod + debuginfod_CFLAGS=-I$with_debuginfod/include + have_debuginfod=1 + AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.]) + AC_MSG_RESULT([yes]) +elif test "x$with_debuginfod" != xno; then +dnl check in the system pkgconfig PKG_CHECK_MODULES([debuginfod], [libdebuginfod >= 0.179], - [AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])], + [have_debuginfod=1], [if test "x$with_debuginfod" = xyes; then AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."]) - else - AC_MSG_WARN([libdebuginfod is missing or unusable; some features may be unavailable.]) fi]) + AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.]) + AC_MSG_RESULT([yes]) else - AC_MSG_WARN([debuginfod support disabled; some features may be unavailable.]) + AC_MSG_RESULT([no]) fi +ac_save_CFLAGS="$CFLAGS" +ac_save_LDFLAGS="$LDFLAGS" +CFLAGS="$CFLAGS $debuginfod_CFLAGS" +LDFLAGS="$LDFLAGS $debuginfod_LDFLAGS" AC_CHECK_LIB(debuginfod, debuginfod_find_metadata, [ AC_DEFINE([METADATA_QUERY_ENABLED], [1], [Define if a new enough version of elfutils exists to support metadata querying]) ]) +CFLAGS="$ac_save_CFLAGS" +LDFLAGS="$ac_save_LDFLAGS" +AC_SUBST(debuginfod_LDFLAGS) dnl Handle optional sqlite support. If enabled/disabled by the user, dnl do the right thing. If not specified by the user, use it if diff --git a/doc/Makefile.in b/doc/Makefile.in index f78445ec8..3b70db84a 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -288,6 +288,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/doc/SystemTap_Tapset_Reference/Makefile.in b/doc/SystemTap_Tapset_Reference/Makefile.in index 2d1793a6f..92b0c88c4 100644 --- a/doc/SystemTap_Tapset_Reference/Makefile.in +++ b/doc/SystemTap_Tapset_Reference/Makefile.in @@ -296,6 +296,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/doc/beginners/Makefile.in b/doc/beginners/Makefile.in index 31d61bb16..a458d96c6 100644 --- a/doc/beginners/Makefile.in +++ b/doc/beginners/Makefile.in @@ -256,6 +256,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/httpd/Makefile.in b/httpd/Makefile.in index ea5ba1986..2ee7c310d 100644 --- a/httpd/Makefile.in +++ b/httpd/Makefile.in @@ -358,6 +358,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/httpd/docker/Makefile.in b/httpd/docker/Makefile.in index dfb0fcce1..d9a2b610d 100644 --- a/httpd/docker/Makefile.in +++ b/httpd/docker/Makefile.in @@ -302,6 +302,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/interactive-notebook/Makefile.in b/interactive-notebook/Makefile.in index bd85f1d55..2d96ec9d7 100644 --- a/interactive-notebook/Makefile.in +++ b/interactive-notebook/Makefile.in @@ -256,6 +256,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/java/Makefile.in b/java/Makefile.in index 240b4de4e..98ec35049 100644 --- a/java/Makefile.in +++ b/java/Makefile.in @@ -343,6 +343,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/man/Makefile.in b/man/Makefile.in index b526a8636..8f2decb62 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -327,6 +327,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/man/cs/Makefile.in b/man/cs/Makefile.in index 1c1cb4f11..d3a018abd 100644 --- a/man/cs/Makefile.in +++ b/man/cs/Makefile.in @@ -292,6 +292,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/python/Makefile.in b/python/Makefile.in index 15c1718d3..1216eefff 100644 --- a/python/Makefile.in +++ b/python/Makefile.in @@ -299,6 +299,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/stap-exporter/Makefile.in b/stap-exporter/Makefile.in index 41ec92f63..7a905a64f 100644 --- a/stap-exporter/Makefile.in +++ b/stap-exporter/Makefile.in @@ -289,6 +289,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/stapbpf/Makefile.in b/stapbpf/Makefile.in index 57636d632..31d34e5e2 100644 --- a/stapbpf/Makefile.in +++ b/stapbpf/Makefile.in @@ -355,6 +355,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/stapdyn/Makefile.in b/stapdyn/Makefile.in index 1c2c8194d..3469ddf72 100644 --- a/stapdyn/Makefile.in +++ b/stapdyn/Makefile.in @@ -358,6 +358,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ diff --git a/staprun/Makefile.in b/staprun/Makefile.in index 281fbc0f7..07fb23551 100644 --- a/staprun/Makefile.in +++ b/staprun/Makefile.in @@ -407,6 +407,7 @@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ debuginfod_CFLAGS = @debuginfod_CFLAGS@ +debuginfod_LDFLAGS = @debuginfod_LDFLAGS@ debuginfod_LIBS = @debuginfod_LIBS@ docdir = @docdir@ dracutbindir = @dracutbindir@ -- 2.43.5