xref: /netbsd-src/external/gpl3/gdb/dist/gdbsupport/configure.ac (revision 5ba1f45f2a09259cc846f20c7c5501604d633c90)
18dffb485Schristosdnl Autoconf configure script for GDB support library
2*5ba1f45fSchristosdnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
38dffb485Schristosdnl
48dffb485Schristosdnl This program is free software; you can redistribute it and/or modify
58dffb485Schristosdnl it under the terms of the GNU General Public License as published by
68dffb485Schristosdnl the Free Software Foundation; either version 3 of the License, or
78dffb485Schristosdnl (at your option) any later version.
88dffb485Schristosdnl
98dffb485Schristosdnl This program is distributed in the hope that it will be useful,
108dffb485Schristosdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
118dffb485Schristosdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
128dffb485Schristosdnl GNU General Public License for more details.
138dffb485Schristosdnl
148dffb485Schristosdnl You should have received a copy of the GNU General Public License
158dffb485Schristosdnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
168dffb485Schristos
178dffb485Schristosdnl Process this file with autoconf to produce a configure script.
188dffb485Schristos
198dffb485SchristosAC_INIT([gdbsupport], 1.0)
208dffb485SchristosAC_CONFIG_SRCDIR(common-defs.h)
218dffb485SchristosAC_CONFIG_HEADER(config.h:config.in)
224b169a6bSchristos
234b169a6bSchristos# Set build, build_cpu, build_vendor and build_os.
244b169a6bSchristosAC_CANONICAL_BUILD
254b169a6bSchristos
264b169a6bSchristos# Set host, host_cpu, host_vendor, and host_os.
274b169a6bSchristosAC_CANONICAL_HOST
284b169a6bSchristos
294b169a6bSchristos# Set target, target_cpu, target_vendor, and target_os.
304b169a6bSchristosAC_CANONICAL_TARGET
314b169a6bSchristos
328dffb485SchristosAM_MAINTAINER_MODE
338dffb485SchristosAC_CONFIG_AUX_DIR(..)
348dffb485SchristosAM_INIT_AUTOMAKE
358dffb485SchristosAM_SILENT_RULES([yes])
368dffb485Schristos
378dffb485SchristosAC_PROG_CC
388dffb485SchristosAC_PROG_CXX
398dffb485SchristosAC_PROG_RANLIB
408dffb485Schristos
418dffb485SchristosAC_USE_SYSTEM_EXTENSIONS
428dffb485SchristosACX_LARGEFILE
438dffb485Schristos
44*5ba1f45fSchristos# We require a C++17 compiler.  Check if one is available, and if
458dffb485Schristos# necessary, set CXX_DIALECT to some -std=xxx switch.
46*5ba1f45fSchristosAX_CXX_COMPILE_STDCXX(17, , mandatory)
478dffb485Schristos
488dffb485Schristosdnl Set up for gettext.
498dffb485SchristosZW_GNU_GETTEXT_SISTER_DIR
508dffb485Schristos
518dffb485Schristoslibiberty_INIT
528dffb485SchristosGDB_AC_COMMON
538dffb485SchristosGDB_AC_SELFTEST
548dffb485SchristosAM_CONDITIONAL(SELFTEST, $enable_unittests)
558dffb485Schristos
564b169a6bSchristosAM_CONDITIONAL(HAVE_PIPE_OR_PIPE2,
574b169a6bSchristos   [test x$ac_cv_func_pipe = xyes -o x$ac_cv_func_pipe2 = xyes ])
584b169a6bSchristos
598dffb485Schristos# Check the return and argument types of ptrace.
608dffb485SchristosGDB_AC_PTRACE
618dffb485Schristos
628dffb485Schristos# Detect support warning flags.
634b169a6bSchristosAM_GDB_COMPILER_TYPE
648dffb485SchristosAM_GDB_WARNINGS
658dffb485Schristos
664b169a6bSchristos# Set the 'development' global.
674b169a6bSchristos. $srcdir/../bfd/development.sh
684b169a6bSchristos
694b169a6bSchristosif test "$development" = true ; then
704b169a6bSchristos   AC_DEFINE(DEVELOPMENT, 1,
714b169a6bSchristos	     [Define if development-mode features are enabled.])
724b169a6bSchristosfi
738dffb485Schristos
748dffb485Schristoscase ${host} in
758dffb485Schristos  *mingw32*)
768dffb485Schristos    AC_DEFINE(USE_WIN32API, 1,
778dffb485Schristos              [Define if we should use the Windows API, instead of the
788dffb485Schristos	       POSIX API.  On Windows, we use the Windows API when
798dffb485Schristos	       building for MinGW, but the POSIX API when building
808dffb485Schristos	       for Cygwin.])
818dffb485Schristos    ;;
828dffb485Schristosesac
838dffb485Schristos
844b169a6bSchristosAC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(srcdir)/../bfd/development.sh'])
854b169a6bSchristos
868dffb485SchristosAC_CONFIG_FILES([Makefile])
878dffb485SchristosAC_OUTPUT
88