dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright (C) 1995-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2022 Free Software Foundation, Inc.
dnl
dnl This file is part of GDB.
dnl
dnl Process this file with autoconf to produce a configure script.
-m4_include(../config/debuginfod.m4)
-
AC_INIT
+AC_CONFIG_MACRO_DIRS([../config])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
AM_MAINTAINER_MODE
# Set target, target_cpu, target_vendor, and target_os.
AC_CANONICAL_TARGET
+ACX_NONCANONICAL_TARGET
+
AC_ARG_PROGRAM
# We require a C++11 compiler. Check if one is available, and if
AC_MSG_ERROR([pkg-config was not found in your system])
fi
else
- case "$LDFLAGS" in
- *static-libstdc*)
- AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl
+ if ${pkg_config_prog_path} --exists source-highlight; then
+ case "$LDFLAGS" in
+ *static-libstdc*)
+ AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl
either use --disable-source-highlight or dnl
--without-static-standard-libraries])
- ;;
- esac
+ ;;
+ esac
- if ${pkg_config_prog_path} --exists source-highlight; then
SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
AC_DEFINE([HAVE_SOURCE_HIGHLIGHT], 1,
AC_CHECK_HEADERS([nlist.h machine/reg.h \
thread_db.h \
sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
- sys/resource.h sys/ptrace.h ptrace.h \
+ sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \
sys/reg.h sys/debugreg.h \
termios.h elf_hp.h])
AC_CHECK_HEADERS(sys/user.h, [], [],
fi
fi
-# Assume we'll default to using the included libiberty regex.
-gdb_use_included_regex=yes
-
-# However, if the system regex is GNU regex, then default to *not*
-# using the included regex.
-AC_CACHE_CHECK(
- [for GNU regex],
- [gdb_cv_have_gnu_regex],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <gnu-versions.h>],
- [#define REGEX_INTERFACE_VERSION 1
- #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
- # error "Version mismatch"
- #endif]
- )],
- [gdb_cv_have_gnu_regex=yes],
- [gdb_cv_have_gnu_regex=no]
- )]
-)
-if test "$gdb_cv_have_gnu_regex" = yes; then
- gdb_use_included_regex=no
-fi
-
-AC_ARG_WITH(included-regex,
- AS_HELP_STRING([--without-included-regex], [don't use included regex; this is the default on systems with version 2 of the GNU C library (use with caution on other system)]),
- gdb_with_regex=$withval,
- gdb_with_regex=$gdb_use_included_regex)
-if test "$gdb_with_regex" = yes; then
- AC_DEFINE(USE_INCLUDED_REGEX, 1,
- [Define to 1 if the regex included in libiberty should be used.])
-fi
-
# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
AC_CHECK_MEMBERS([struct thread.td_pcb], [], [],
[#include <sys/param.h>
esac
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
+dnl Set the host's .gdbearlyinit filename
+AC_DEFINE_UNQUOTED(GDBEARLYINIT,".gdbearlyinit",[The .gdbearlyinit filename.])
+
dnl Handle optional features that can be enabled.
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
GDB_AC_CHECK_BFD([for ELF support in BFD], gdb_cv_var_elf,
[bfd_get_elf_phdr_upper_bound (NULL)], elf-bfd.h)
if test "$gdb_cv_var_elf" = yes; then
- CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
+ CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
+ gcore-elf.o elf-none-tdep.o"
AC_DEFINE(HAVE_ELF, 1,
[Define if ELF support should be included.])
# -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
LIBCTF=
CTF_DEPS=
fi
-AC_SUBST(ENABLE_LIBCTF)
AC_SUBST(LIBCTF)
AC_SUBST(CTF_DEPS)