dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright (C) 1995-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2024 Free Software Foundation, Inc.
dnl
dnl This file is part of GDB.
dnl
# link tests in the configure script.
LT_OUTPUT
-# We require a C++11 compiler. Check if one is available, and if
+# We require a C++17 compiler. Check if one is available, and if
# necessary, set CXX_DIALECT to some -std=xxx switch.
-AX_CXX_COMPILE_STDCXX(11, , mandatory)
+AX_CXX_COMPILE_STDCXX(17, , mandatory)
+
+GDB_AC_COMMON
# Dependency checking.
ZW_CREATE_DEPDIR
[look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
[${libdir}/debug])
+AC_ARG_WITH(additional-debug-dirs,
+ AS_HELP_STRING([--with-additional-debug-dirs=PATHs],
+ [colon-separated list of additional directories to
+ search for separate debug info]),
+ [AC_DEFINE_UNQUOTED(ADDITIONAL_DEBUG_DIRS, "${withval}",
+ Additional directories to look for separate
+ debug info.)])
+
# We can't pass paths as command line arguments.
# Mingw32 tries to be clever and will convert the paths for us.
# For example -DBINDIR="/usr/local/bin" passed on the command line may get
[has_amd_dbgapi=yes], [has_amd_dbgapi=no])
if test "$has_amd_dbgapi" = "yes"; then
+ AC_DEFINE(HAVE_AMD_DBGAPI, 1, [Define if amd-dbgapi is being linked in.])
TARGET_OBS="$TARGET_OBS amd-dbgapi-target.o"
# If --enable-targets=all was provided, use the list of all files depending
[Define to BFD's default target vector. ])
fi
-# Enable MI.
-AC_ARG_ENABLE([gdbmi],
- [AS_HELP_STRING([--disable-gdbmi], [disable machine-interface (MI)])],
- [GDB_CHECK_YES_NO_VAL([$enableval], [--enable-gdbmi])],
- [enable_gdbmi=yes])
-if test x"$enable_gdbmi" = xyes; then
- if test -d "$srcdir/mi"; then
- CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
- CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
- CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
- ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
- fi
-fi
-
# Enable TUI.
AC_ARG_ENABLE(tui,
AS_HELP_STRING([--enable-tui],
# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
AC_SEARCH_LIBS(gethostbyname, nsl)
-# Some systems (e.g. Solaris) have `socketpair' in libsocket.
-AC_SEARCH_LIBS(socketpair, socket)
-
# Link in zlib/zstd if we can. This allows us to read compressed debug
# sections.
AM_ZLIB
# search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation.
- AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses])
-
- if test "$ac_cv_search_waddstr" != no; then
- curses_found=yes
- fi
+ AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses],
+ [curses_found=yes
+ AC_DEFINE([HAVE_LIBCURSES], [1],
+ [Define to 1 if curses is enabled.])
+ ])
fi
# Check whether we should enable the TUI, but only do so if we really
# can.
if test x"$enable_tui" != xno; then
- if test -d "$srcdir/tui"; then
- if test "$curses_found" != no; then
- CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
- CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
- CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
- ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
+ if test "$curses_found" != no; then
+ CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
+ CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
+ ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
+ else
+ if test x"$enable_tui" = xyes; then
+ AC_MSG_ERROR([no enhanced curses library found; disable TUI])
else
- if test x"$enable_tui" = xyes; then
- AC_MSG_ERROR([no enhanced curses library found; disable TUI])
- else
- AC_MSG_WARN([no enhanced curses library found; disabling TUI])
- fi
+ AC_MSG_WARN([no enhanced curses library found; disabling TUI])
fi
fi
fi
READLINE_DEPS=
READLINE_CFLAGS=
READLINE_TEXI_INCFLAG=
+ READLINE_DOC_SOURCE_INCLUDES='$(READLINE_SYSTEM_DOC_INCLUDES)'
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'
READLINE_CFLAGS='-I$(READLINE_SRC)/..'
READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
+ READLINE_DOC_SOURCE_INCLUDES='$(READLINE_INTREE_DOC_INCLUDES)'
fi
AC_SUBST(READLINE)
AC_SUBST(READLINE_DEPS)
AC_SUBST(READLINE_CFLAGS)
AC_SUBST(READLINE_TEXI_INCFLAG)
+AC_SUBST(READLINE_DOC_SOURCE_INCLUDES)
# Generate jit-reader.h
# ------------------------------ #
AC_CHECK_FUNCS([getuid getgid \
- pipe pread pread64 pwrite resize_term \
+ pread pread64 pwrite resize_term \
getpgid setsid \
- sigaction sigsetmask socketpair \
- ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
+ sigsetmask \
+ ttrace wresize setlocale iconvlist libiconvlist btowc \
setrlimit getrlimit posix_madvise waitpid \
use_default_colors])
AM_LANGINFO_CODESET
-GDB_AC_COMMON
# Check the return and argument types of ptrace.
GDB_AC_PTRACE
# are when --disable-sim is specified, or if the simulator directory is
# not part of the source tree.
#
-AC_ARG_ENABLE(sim,
-AS_HELP_STRING([--enable-sim], [link gdb with simulator]),
-[echo "enable_sim = $enable_sim";
- echo "enableval = ${enableval}";
- case "${enableval}" in
- yes) ignore_sim=false ;;
- no) ignore_sim=true ;;
- *) ignore_sim=false ;;
- esac],
-[ignore_sim=false])
+AC_ARG_ENABLE([sim],
+ [AS_HELP_STRING([--enable-sim], [link gdb with simulator])],
+ [AC_MSG_NOTICE([enable_sim = $enable_sim]);
+ AC_MSG_NOTICE([enableval = ${enableval}]);
+ case "${enableval}" in
+ yes) ignore_sim=false ;;
+ no) ignore_sim=true ;;
+ *) ignore_sim=false ;;
+ esac],
+ [ignore_sim=false])
if test ! -d "${srcdir}/../sim"; then
ignore_sim=true