aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-02-17 10:00:26 -0700
committerTom Tromey <tom@tromey.com>2020-02-17 10:03:15 -0700
commitb6f9caee52be22ec3ff46f2773aef473625b8033 (patch)
tree7fea7987745ca938bcc36056365c95c968a0c5ed /configure.ac
parent272a84b1204fdd4e96df689383b163b4a52be933 (diff)
downloadgdb-b6f9caee52be22ec3ff46f2773aef473625b8033.zip
gdb-b6f9caee52be22ec3ff46f2773aef473625b8033.tar.gz
gdb-b6f9caee52be22ec3ff46f2773aef473625b8033.tar.bz2
Fix gdbserver-without-gdb build
An earlier patch changed gdbserver to use the already-built top-level gnulib and gdbsupport. However, if one did a build that did not include gdb, then gdbserver would fail to build. The problem is that configure.ac only adds gnulib and gdbsupport to the build when gdb is being built. This patch fixes the problem by arranging for this to happen when gdbserver is built. ChangeLog 2020-02-17 Tom Tromey <tom@tromey.com> * configure: Rebuild. * configure.ac (configdirs): Add gnulib and gdbsupport when building gdbserver.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 11 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 35a9c18..f306509 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2746,13 +2746,17 @@ esac
CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
-# gdb depends on gnulib and gdbsupport, but as nothing else does, only
-# include them if gdb is built.
-if echo " ${configdirs} " | grep " gdb " > /dev/null 2>&1 ; then
- # The Makefile provides the ordering, so it's enough here to add to
- # the list.
- configdirs="${configdirs} gnulib gdbsupport"
-fi
+# gdb and gdbserver depend on gnulib and gdbsupport, but as nothing
+# else does, only include them if one of these is built. The Makefile
+# provides the ordering, so it's enough here to add to the list.
+case " ${configdirs} " in
+ *\ gdb\ *)
+ configdirs="${configdirs} gnulib gdbsupport"
+ ;;
+ *\ gdbserver\ *)
+ configdirs="${configdirs} gnulib gdbsupport"
+ ;;
+esac
# Strip out unwanted targets.