X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=gdb%2Fconfigure.ac;h=62ff09cea204360bda1573b6c12faeb98854fa3c;hb=HEAD;hp=7c7bf88b3fbaea2a6fbc27f0900ac04d548dce4c;hpb=18b4d0736bc570c6d2e3e5f6ebc2ad4617d93847;p=thirdparty%2Fbinutils-gdb.git diff --git a/gdb/configure.ac b/gdb/configure.ac index 7c7bf88b3fb..8368fea0423 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1,5 +1,5 @@ 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 @@ -53,9 +53,11 @@ LT_INIT # 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 @@ -119,6 +121,14 @@ GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir, [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 @@ -271,10 +281,11 @@ if test "$gdb_require_amd_dbgapi" = true \ # stability until amd-dbgapi hits 1.0, but for convenience, still check for # greater or equal that version. It can be handy when testing with a newer # version of the library. - PKG_CHECK_MODULES([AMD_DBGAPI], [amd-dbgapi >= 0.68.0], + PKG_CHECK_MODULES([AMD_DBGAPI], [amd-dbgapi >= 0.75.0], [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 @@ -317,20 +328,6 @@ if test "x$targ_defvec" != x; then [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], @@ -516,9 +513,6 @@ AC_CHECK_LIB(m, main) # 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 @@ -563,28 +557,26 @@ if test x"$prefer_curses" = xyes; then # 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 @@ -643,16 +635,19 @@ if test "$with_system_readline" = yes; then 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 @@ -1353,14 +1348,13 @@ AC_C_BIGENDIAN # ------------------------------ # 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 @@ -2036,16 +2030,16 @@ AC_PATH_X # 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 @@ -2142,7 +2136,7 @@ AC_MSG_CHECKING([whether to use babeltrace]) AC_MSG_RESULT([$with_babeltrace]) if test "x$with_babeltrace" = "xno"; then - AC_MSG_WARN([babletrace support disabled; GDB is unable to read CTF data.]) + AC_MSG_WARN([babeltrace support disabled; GDB is unable to read CTF data.]) else # Append -Werror to CFLAGS so that configure can catch the warning # "assignment from incompatible pointer type", which is related to