From: Frank Ch. Eigler Date: Sat, 8 Jun 2024 17:31:09 +0000 (-0400) Subject: PR31866: reenable --enable-libdebuginfod=dummy X-Git-Tag: elfutils-0.192~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f14e59b8b3f252b91f6729d9c5086e069949cd1;p=thirdparty%2Felfutils.git PR31866: reenable --enable-libdebuginfod=dummy Tweak configure.ac to support $subject again. Also tweak debuginfod-find.c to not unconditionally include json-c.h, since it may just be compiled in "dummy" mode, sans such prerequisites. It turns out debuginfod-find fails at run time very early in such a configuration, long before it gets to jsonic activities. Signed-off-by: Frank Ch. Eigler --- diff --git a/configure.ac b/configure.ac index ddea5952..24e68d94 100644 --- a/configure.ac +++ b/configure.ac @@ -846,6 +846,8 @@ AC_CHECK_HEADER(imaevm.h) # pronounce judgement on ability to build client, overridden by =yes/=no if test "x$enable_libdebuginfod" = "xno"; then true +elif test "x$enable_libdebuginfod" = "xdummy"; then + true elif test "x$have_jsonc$have_libcurl" = "xyesyes"; then enable_libdebuginfod=yes elif test "x$enable_libdebuginfod" = "xyes" -o "x$enable_libdebuginfod" = "xdummy"; then diff --git a/debuginfod/debuginfod-find.c b/debuginfod/debuginfod-find.c index 0ef80377..deba9560 100644 --- a/debuginfod/debuginfod-find.c +++ b/debuginfod/debuginfod-find.c @@ -30,7 +30,9 @@ #include #include #include +#ifndef DUMMY_LIBDEBUGINFOD #include +#endif /* Name and version of program. */ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; @@ -243,6 +245,7 @@ main(int argc, char** argv) rc = debuginfod_find_metadata (client, argv[remaining+1], argv[remaining+2], &cache_name); +#ifndef DUMMY_LIBDEBUGINFOD if (rc >= 0) { /* We output a pprinted JSON object, not the regular debuginfod-find cached file path */ @@ -264,6 +267,7 @@ main(int argc, char** argv) return 1; } } +#endif } else {