aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-09-22 16:15:01 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-09-22 16:15:01 +0000
commit496c0e1ba7bd2b8596d90cc6b2bc87cf5c1cff67 (patch)
tree800b57c660209acfea342aa59ddf0b55df3f3dd7 /gdb/configure.ac
parente84676100400c4e1f63f11bdb4aece31c410460a (diff)
downloadbinutils-496c0e1ba7bd2b8596d90cc6b2bc87cf5c1cff67.zip
binutils-496c0e1ba7bd2b8596d90cc6b2bc87cf5c1cff67.tar.gz
binutils-496c0e1ba7bd2b8596d90cc6b2bc87cf5c1cff67.tar.bz2
Allow disabling of gdbserver build (--enable-gdbserver=yes/no/auto).
This patch adds a new --enable-gdbserver=yes/no/auto command-line switch in gdb/configure. The primary purpose is to allow a user to disable the build & install of gdbserver when not desired. It also allows the user to request gdbserver in which case the configure script will abort if automatic building of gdbserver is not supported for that configuration. The default keeps things as is: We automatically build gdbserver if building for a native configuration and if gdbserver is supported for that configuration. gdb/ChangeLog: * configure.ac: Add support for --enable-gdbserver. * configure: Regenerate. At AdaCore, this is mostly intended for ia64-linux, where we currently do not want to distribute gdbserver. This will be useful in the context of I417-033, where we are now using "make install" to determine what needs to be packaged inside the GNAT Pro package.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac20
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 2f8090e..e462274 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2085,17 +2085,33 @@ if test "x$enable_multi_ice" = xyes; then
AC_CONFIG_SUBDIRS(multi-ice)
fi
-# We only build gdbserver automatically in a native configuration.
-if test "$gdb_native" = "yes"; then
+AC_ARG_ENABLE(gdbserver,
+AS_HELP_STRING([--enable-gdbserver],
+ [automatically build gdbserver (yes/no/auto, default is auto)]),
+[case "${enableval}" in
+ yes| no|auto) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdbserver option) ;;
+esac],[enable_gdbserver=auto])
+
+# We only build gdbserver automatically in a native configuration, and
+# only if the user did not explicitly disable its build.
+if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
AC_MSG_CHECKING(whether gdbserver is supported on this host)
if test "x$build_gdbserver" = xyes; then
AC_MSG_RESULT(yes)
AC_CONFIG_SUBDIRS(gdbserver)
+ gdbserver_build_enabled=yes
else
AC_MSG_RESULT(no)
fi
fi
+# If the user explicitly request the gdbserver to be built, verify that
+# we were in fact able to enable it.
+if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
+ AC_MSG_ERROR(Automatic gdbserver build is not supported for this configuration)
+fi
+
# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
# to an empty version.