[binutils-gdb] Re: binutils/configure: look for msgpack-c.pc (in addition to msgpack.pc)
Alan Modra via Binutils-cvs <[email protected]>
| Newsgroups | gmane.comp.gnu.binutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=469dcb143c6d19cd741fbf904188534e7696658b commit 469dcb143c6d19cd741fbf904188534e7696658b Author: Alan Modra <[email protected]> Date: Sat May 16 10:27:26 2026 +0930 Re: binutils/configure: look for msgpack-c.pc (in addition to msgpack.pc) Commit 520c7eefed7f results in the following if both msgpack-c and msgpack are missing. checking for msgpack-c... no checking for msgpack... no configure: error: Package requirements (msgpack) were not met: Package 'msgpack', required by 'virtual:world', not found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables MSGPACK_CFLAGS and MSGPACK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. make[2]: *** [Makefile:920: config.status] Error 1 make[2]: Leaving directory '/build/gas/all/binutils' make[1]: *** [Makefile:4123: all-binutils] Error 2 binutils/ * configure.ac <msgpack>: Tell PKG_CHECK_MODULES that errors will be handled by its caller. * configure: Regenerate. bfd/ * bfd-in2.h: Regenerate. Diff: --- bfd/bfd-in2.h | 2 +- binutils/configure | 48 ++++-------------------------------------------- binutils/configure.ac | 2 +- 3 files changed, 6 insertions(+), 46 deletions(-) diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 54d2e746a8f..4d157611217 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1803,7 +1803,7 @@ enum bfd_architecture #define bfd_mach_loongarch32 1 #define bfd_mach_loongarch64 2 bfd_arch_amdgcn, /* AMDGCN */ -#define bfd_mach_amdgcn_unknown 0x000 +#define bfd_mach_amdgcn_unknown 0x000 #define bfd_mach_amdgcn_gfx9_generic 0x051 #define bfd_mach_amdgcn_gfx900 0x02c #define bfd_mach_amdgcn_gfx904 0x02e diff --git a/binutils/configure b/binutils/configure index 1a13811c8ff..8012474d899 100755 --- a/binutils/configure +++ b/binutils/configure @@ -16174,31 +16174,11 @@ fi # Put the nasty error message in config.log where it belongs echo "$MSGPACK_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (msgpack) were not met: - -$MSGPACK_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables MSGPACK_CFLAGS -and MSGPACK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MSGPACK_CFLAGS -and MSGPACK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details" "$LINENO" 5; } + : else MSGPACK_CFLAGS=$pkg_cv_MSGPACK_CFLAGS MSGPACK_LIBS=$pkg_cv_MSGPACK_LIBS @@ -16292,31 +16272,11 @@ fi # Put the nasty error message in config.log where it belongs echo "$MSGPACK_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (msgpack) were not met: - -$MSGPACK_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables MSGPACK_CFLAGS -and MSGPACK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables MSGPACK_CFLAGS -and MSGPACK_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details" "$LINENO" 5; } + : else MSGPACK_CFLAGS=$pkg_cv_MSGPACK_CFLAGS MSGPACK_LIBS=$pkg_cv_MSGPACK_LIBS diff --git a/binutils/configure.ac b/binutils/configure.ac index 234eeaadab3..74baea68529 100644 --- a/binutils/configure.ac +++ b/binutils/configure.ac @@ -300,7 +300,7 @@ AS_IF([test "$with_msgpack" != no], # msgpack.pc was renamed to msgpack-c.pc at some point, look for the new # one first. PKG_CHECK_MODULES([MSGPACK], [msgpack-c], [have_msgpack=yes], - [PKG_CHECK_MODULES([MSGPACK], [msgpack], [have_msgpack=yes])]) + [PKG_CHECK_MODULES([MSGPACK], [msgpack], [have_msgpack=yes], [:])]) AS_IF([test "$have_msgpack" = yes], [AC_DEFINE([HAVE_MSGPACK], [1], [Define to 1 if msgpack is available.])],