diff options
author | R. Diez <rdiezmail-openocd@yahoo.de> | 2022-06-18 16:23:00 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2022-07-02 08:23:13 +0000 |
commit | c7bdce33e2edd3b9d6d0eb85d38e7cac8e0a4e6e (patch) | |
tree | 044af1c206e65e802aac7016772fe88dd20b0032 | |
parent | a70bab9e5185c8853882748737ceebabde7c4781 (diff) | |
download | riscv-openocd-c7bdce33e2edd3b9d6d0eb85d38e7cac8e0a4e6e.zip riscv-openocd-c7bdce33e2edd3b9d6d0eb85d38e7cac8e0a4e6e.tar.gz riscv-openocd-c7bdce33e2edd3b9d6d0eb85d38e7cac8e0a4e6e.tar.bz2 |
configure: provide advice if PKG_PROG_PKG_CONFIG unavailable
These are the misleading error messages that this change prevents:
configure.ac:13: error: possibly undefined macro: AC_MSG_WARN
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:48: error: possibly undefined macro: AC_DEFINE
configure.ac:342: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:608: error: possibly undefined macro: AC_MSG_NOTICE
Change-Id: I21bcc7715eeac0f3d0bcc60bba6801e6a895cdd0
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7035
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7eada3a..2d5cb5e 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,12 @@ AC_PROG_CC m4_version_prereq([2.70],[],[AC_PROG_CC_C99]) AM_PROG_CC_C_O AC_PROG_RANLIB + +# If macro PKG_PROG_PKG_CONFIG is not available, Autoconf generates a misleading error message, +# so check for existence first, and otherwise provide helpful advice. +m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal(m4_normalize([ + Macro PKG_PROG_PKG_CONFIG is not available. + It is usually defined in file pkg.m4 provided by package pkg-config.]))]) PKG_PROG_PKG_CONFIG([0.23]) dnl disable checks for C++, Fortran and GNU Java Compiler |