mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
adeab0c5b3
Any code using AC_DEBUGINFOD from this dir is using -I../config when running aclocal, so an explicit include on pkg.m4 is unnecessary: aclocal will find the pkg.m4 in this dir just as easily. This is seen in the only two dirs that use AC_DEBUGINFOD (binutils & gdb) as their aclocal.m4 already has m4_include on config m4 files. The include as written only works if aclocal is run on a dir that is at the same level of config/. Any other depth will fail. ./ |-- config/ |-- binutils/ # works |-- gdb/ # works `-- sim/ # works `-- <port>/ # fails It fails even if AC_DEBUGINFOD itself isn't used: sim/bfin/ $ aclocal -I../../config aclocal-1.15: error: ../../config/debuginfod.m4:8: file '../config/pkg.m4' does not exist
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
dnl Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
|
dnl This file is free software, distributed under the terms of the GNU
|
|
dnl General Public License. As a special exception to the GNU General
|
|
dnl Public License, this file may be distributed as part of a program
|
|
dnl that contains a configuration script generated by Autoconf, under
|
|
dnl the same distribution terms as the rest of that program.
|
|
|
|
AC_DEFUN([AC_DEBUGINFOD],
|
|
[
|
|
# Handle optional debuginfod support
|
|
AC_ARG_WITH([debuginfod],
|
|
AC_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
|
|
PKG_CHECK_MODULES([DEBUGINFOD], [libdebuginfod >= 0.179],
|
|
[AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])],
|
|
[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])
|
|
else
|
|
AC_MSG_WARN([debuginfod support disabled; some features may be unavailable.])
|
|
fi
|
|
])
|