aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-06-01 08:11:30 -0600
committerTom Tromey <tromey@adacore.com>2021-06-01 08:11:30 -0600
commitf99d1d37496f3af263e0761c2fd330e62599f383 (patch)
tree6d2c707eeb75b85b7b7d99e3663a57e492cdda74 /gdb/configure.ac
parent17d305ef8f4b5bf20beaaad427490b3c6773909b (diff)
downloadgdb-f99d1d37496f3af263e0761c2fd330e62599f383.zip
gdb-f99d1d37496f3af263e0761c2fd330e62599f383.tar.gz
gdb-f99d1d37496f3af263e0761c2fd330e62599f383.tar.bz2
Remove gdb/testsuite/configure
I didn't see a strong reason to have a separate configure script in gdb/testsuite, so this patch removes it. The few relevant configury bits are moved into gdb's configure script. Some of the old testsuite/configure script (e.g., the header check) is dead code. This also adds a Makefile rule to rebuild lib/pdtrace. This was missing from the old code. 'read1' is now a dependency of check-read1, rather than extra code at configure time. Finally, the old "ENABLE_LIBCTF" subst in gdb/configure was not used; nor was the variable defined, so this was always empty. However, the lower-case variant was used by the testsuite, so this patch renames the subst. gdb/ChangeLog 2021-06-01 Tom Tromey <tromey@adacore.com> * configure.ac: Copy some code from testsuite/configure.ac. (enable_libctf): Subst this, not ENABLE_LIBCTF. * configure: Rebuild. gdb/testsuite/ChangeLog 2021-06-01 Tom Tromey <tromey@adacore.com> * aclocal.m4, configure.ac, configure: Remove. * Makefile.in (EXTRA_RULES): Remove. ($(abs_builddir)/site.exp site.exp): Don't depend on config.status. (distclean maintainer-clean realclean, Makefile): Update. (config.status): Remove target. (lib/pdtrace): New target. (all): Don't depend on EXTRA_RULES. (check-read1): Depend on read1.so, expect-read1.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac36
1 files changed, 34 insertions, 2 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index acfbe4a..c08a3b5 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -152,7 +152,31 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
[Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path])
-AC_CONFIG_SUBDIRS(testsuite)
+# Enable shared libraries.
+AC_ARG_ENABLE(shared,
+[ --enable-shared build shared libraries [deault=yes]],,
+ enable_shared=yes)
+
+# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
+# such that we can find the shared libraries in the build tree.
+if test $enable_shared = no; then
+ # The variable `RPATH_ENVVAR' itself is not likely to be used on any
+ # platform.
+ RPATH_ENVVAR=RPATH_ENVVAR
+else
+ # The variable `LD_LIBRARY_PATH' is used on most platforms.
+ RPATH_ENVVAR=LD_LIBRARY_PATH
+ # The following exceptions are taken from Libtool 1.4.3.
+ case $host_os in
+ aix*)
+ if test $host_cpu != ia64; then
+ RPATH_ENVVAR=LIBPATH
+ fi ;;
+ darwin* | rhapsody*)
+ RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
+ esac
+fi
+AC_SUBST(RPATH_ENVVAR)
# Check whether to support alternative target configurations
AC_ARG_ENABLE(targets,
@@ -2170,7 +2194,7 @@ else
LIBCTF=
CTF_DEPS=
fi
-AC_SUBST(ENABLE_LIBCTF)
+AC_SUBST(enable_libctf)
AC_SUBST(LIBCTF)
AC_SUBST(CTF_DEPS)
@@ -2236,5 +2260,13 @@ GDB_AC_TRANSFORM([gdb], [GDB_TRANSFORM_NAME])
GDB_AC_TRANSFORM([gcore], [GCORE_TRANSFORM_NAME])
AC_CONFIG_FILES([gcore], [chmod +x gcore])
AC_CONFIG_FILES([Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile])
+# Transform the name of some programs for the testsuite/lib/pdtrace
+# test tool.
+GDB_AC_TRANSFORM(strip, STRIP_TRANSFORM_NAME)
+GDB_AC_TRANSFORM(readelf, READELF_TRANSFORM_NAME)
+GDB_AC_TRANSFORM(as, GAS_TRANSFORM_NAME)
+GDB_AC_TRANSFORM(nm, NM_TRANSFORM_NAME)
+AC_CONFIG_FILES([testsuite/lib/pdtrace], [chmod +x testsuite/lib/pdtrace])
+AC_CONFIG_FILES([testsuite/Makefile])
AC_OUTPUT