dnl Autoconf configure script for GDB server.
-dnl Copyright (C) 2000-2021 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2024 Free Software Foundation, Inc.
dnl
dnl This file is part of GDB.
dnl
dnl Process this file with autoconf to produce a configure script.
AC_INIT
+AC_CONFIG_MACRO_DIRS([../config])
AC_CONFIG_SRCDIR([server.cc])
AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
AC_ARG_PROGRAM
-# 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)
AC_HEADER_STDC
AC_SUBST(ustlibs)
AC_SUBST(ustinc)
+AM_GDB_COMPILER_TYPE
AM_GDB_WARNINGS
dnl dladdr is glibc-specific. It is used by thread-db.c but only for
done
fi
-GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles"
+GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
GDBSERVER_LIBS="$srv_libs"
dnl Check whether the target supports __sync_*_compare_and_swap.
fi
AC_SUBST(GNULIB_STDINT_H)
+# Check for libiconv. It is a requirement for Linux hosts, and others hosts
+# don't use it at all. Define MAYBE_LIBICONV only if the host is Linux.
+AM_ICONV
+MAYBE_LIBICONV=
+case "$host" in
+ *linux*)
+ if test "$am_cv_func_iconv" != yes; then
+ AC_MSG_ERROR([could not find libiconv (required for host $host)])
+ fi
+
+ MAYBE_LIBICONV="$LIBICONV"
+ ;;
+esac
+
+AC_SUBST(MAYBE_LIBICONV)
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT