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 | |
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')
-rwxr-xr-x | gdb/configure | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/gdb/configure b/gdb/configure index f2d271e..15a96af 100755 --- a/gdb/configure +++ b/gdb/configure @@ -879,6 +879,7 @@ with_mpfr with_libmpfr_prefix with_python with_guile +enable_source_highlight enable_libmcheck with_intel_pt with_libipt_prefix @@ -1554,6 +1555,8 @@ Optional Features: --enable-profiling enable profiling of GDB --enable-codesign=CERT sign gdb with 'codesign -s CERT' --disable-rpath do not hardcode runtime library paths + --enable-source-highlight + enable source-highlight for source listings --enable-libmcheck Try linking with -lmcheck if available --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used @@ -11393,13 +11396,30 @@ fi SRCHIGH_LIBS= SRCHIGH_CFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 + +# Check whether --enable-source-highlight was given. +if test "${enable_source_highlight+set}" = set; then : + enableval=$enable_source_highlight; case "${enableval}" in + yes) enable_source_highlight=yes ;; + no) enable_source_highlight=no ;; + *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; +esac +else + enable_source_highlight=auto +fi + + +if test "${enable_source_highlight}" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 $as_echo_n "checking for the source-highlight library... " >&6; } -if test "${pkg_config_prog_path}" = "missing"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 + if test "${pkg_config_prog_path}" = "missing"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 $as_echo "no - pkg-config not found" >&6; } -else - if ${pkg_config_prog_path} --exists source-highlight; then + if test "${enable_source_highlight}" = "yes"; then + as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 + 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` @@ -11407,10 +11427,14 @@ $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - else + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi + if test "${enable_source_highlight}" = "yes"; then + as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 + fi + fi + fi fi |