diff options
author | Sergei Trofimovich <siarheit@google.com> | 2019-03-17 22:48:02 +0000 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-04-19 14:05:47 -0600 |
commit | 189b8c2e104017600104457b97315da74a22f549 (patch) | |
tree | 49d678df172cb291de0261e10a8c389a63ebd001 /gdb/configure.ac | |
parent | 8ecb59f8567956c1520b491ea31396363efcb1ef (diff) | |
download | gdb-189b8c2e104017600104457b97315da74a22f549.zip gdb-189b8c2e104017600104457b97315da74a22f549.tar.gz gdb-189b8c2e104017600104457b97315da74a22f549.tar.bz2 |
gdb/configure.ac: add --enable-source-highlight
Allow disabling source-highlight dependency autodetection even
it exists in the system. More details on problem of automatic
dependencies:
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies
Noticed by Jeroen Roovers in https://bugs.gentoo.org/680238
* configure.ac: add --enable-source-highlight switch.
* configure: Regenerate.
* top.c (print_gdb_version): plumb --enable-source-highlight
status to "show configuration".
gdb/ChangeLog
2019-04-19 Sergei Trofimovich <siarheit@google.com>
* configure.ac: add --enable-source-highlight switch.
* configure: Regenerate.
* top.c (print_gdb_version): plumb --enable-source-highlight
status to "show configuration".
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r-- | gdb/configure.ac | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac index 8ddd0fd..1318c8d 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1220,19 +1220,38 @@ AM_CONDITIONAL(HAVE_GUILE, test "${have_libguile}" != no) SRCHIGH_LIBS= SRCHIGH_CFLAGS= -AC_MSG_CHECKING([for the source-highlight library]) -if test "${pkg_config_prog_path}" = "missing"; then - AC_MSG_RESULT([no - pkg-config not found]) -else - if ${pkg_config_prog_path} --exists source-highlight; then + +AC_ARG_ENABLE(source-highlight, + AS_HELP_STRING([--enable-source-highlight], + [enable source-highlight for source listings]), + [case "${enableval}" in + yes) enable_source_highlight=yes ;; + no) enable_source_highlight=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for source-highlight option) ;; +esac], +[enable_source_highlight=auto]) + +if test "${enable_source_highlight}" != "no"; then + AC_MSG_CHECKING([for the source-highlight library]) + if test "${pkg_config_prog_path}" = "missing"; then + AC_MSG_RESULT([no - pkg-config not found]) + if test "${enable_source_highlight}" = "yes"; then + AC_MSG_ERROR([pkg-config was not found in your system]) + fi + else + if ${pkg_config_prog_path} --exists source-highlight; then SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` AC_DEFINE([HAVE_SOURCE_HIGHLIGHT], 1, [Define to 1 if the source-highlight library is available]) AC_MSG_RESULT([yes]) - else + else AC_MSG_RESULT([no]) - fi + if test "${enable_source_highlight}" = "yes"; then + AC_MSG_ERROR([source-highlight was not found in your system]) + fi + fi + fi fi AC_SUBST(SRCHIGH_LIBS) AC_SUBST(SRCHIGH_CFLAGS) |