Warn about static libs vs. source-highlight only when necessary
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 16 Dec 2020 18:47:18 +0000 (19:47 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Sat, 19 Dec 2020 08:21:07 +0000 (09:21 +0100)
Avoid the error message when source-highlight is actually available.

2020-12-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

* configure.ac: Move the static libs vs. source-highlight
error message to a better place.
* configure: Regenerate.

gdb/ChangeLog
gdb/configure
gdb/configure.ac

index a7b93353bf23dadfd4b0909b48b3c5e736c5a4eb..3cae03aaedeff14420ea72cb416c5af242d1e335 100644 (file)
@@ -1,3 +1,9 @@
+2020-12-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+       * configure.ac: Move the static libs vs. source-highlight
+       error message to a better place.
+       * configure: Regenerate.
+
 2020-12-18  Hannes Domani  <ssbssa@yahoo.de>
 
        * gdb-gdb.py.in: Fix main_type field name.
index 24e6fbc8fa7b7af2471b66301c3c5350af0374d1..51b4d1921c561f75ac836c46d44981adc9ce645b 100755 (executable)
@@ -12069,13 +12069,13 @@ $as_echo "no - pkg-config not found" >&6; }
       as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
     fi
   else
-    case "$LDFLAGS" in
-      *static-libstdc*)
-        as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
-        ;;
-    esac
-
     if ${pkg_config_prog_path} --exists source-highlight; then
+      case "$LDFLAGS" in
+        *static-libstdc*)
+          as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
+          ;;
+      esac
+
       SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
       SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
 
index 32f25d9655105b2947cf13973f9fa801bd849075..28703d795b69dc9ba56af120998e545bde4e3c24 100644 (file)
@@ -1238,15 +1238,15 @@ if test "${enable_source_highlight}" != "no"; then
       AC_MSG_ERROR([pkg-config was not found in your system])
     fi
   else
-    case "$LDFLAGS" in
-      *static-libstdc*)
-        AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl
+    if ${pkg_config_prog_path} --exists source-highlight; then
+      case "$LDFLAGS" in
+        *static-libstdc*)
+          AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl
 either use --disable-source-highlight or dnl
 --without-static-standard-libraries])
-        ;;
-    esac
+          ;;
+      esac
 
-    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,