debuginfod.m4 1.2 KB

12345678910111213141516171819202122232425262728
  1. dnl Copyright (C) 1997-2020 Free Software Foundation, Inc.
  2. dnl This file is free software, distributed under the terms of the GNU
  3. dnl General Public License. As a special exception to the GNU General
  4. dnl Public License, this file may be distributed as part of a program
  5. dnl that contains a configuration script generated by Autoconf, under
  6. dnl the same distribution terms as the rest of that program.
  7. AC_DEFUN([AC_DEBUGINFOD],
  8. [
  9. # Handle optional debuginfod support
  10. AC_ARG_WITH([debuginfod],
  11. AC_HELP_STRING([--with-debuginfod], [Enable debuginfo lookups with debuginfod (auto/yes/no)]),
  12. [], [with_debuginfod=auto])
  13. AC_MSG_CHECKING([whether to use debuginfod])
  14. AC_MSG_RESULT([$with_debuginfod])
  15. if test "x$with_debuginfod" != xno; then
  16. PKG_CHECK_MODULES([DEBUGINFOD], [libdebuginfod >= 0.179],
  17. [AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])],
  18. [if test "x$with_debuginfod" = xyes; then
  19. AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."])
  20. else
  21. AC_MSG_WARN([libdebuginfod is missing or unusable; some features may be unavailable.])
  22. fi])
  23. else
  24. AC_MSG_WARN([debuginfod support disabled; some features may be unavailable.])
  25. fi
  26. ])