Commit | Line | Data |
---|---|---|
01027315 | 1 | dnl Autoconf configure script for GDB support library |
3666a048 | 2 | dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. |
01027315 TT |
3 | dnl |
4 | dnl This program is free software; you can redistribute it and/or modify | |
5 | dnl it under the terms of the GNU General Public License as published by | |
6 | dnl the Free Software Foundation; either version 3 of the License, or | |
7 | dnl (at your option) any later version. | |
8 | dnl | |
9 | dnl This program is distributed in the hope that it will be useful, | |
10 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | dnl GNU General Public License for more details. | |
13 | dnl | |
14 | dnl You should have received a copy of the GNU General Public License | |
15 | dnl along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | ||
17 | dnl Process this file with autoconf to produce a configure script. | |
18 | ||
19 | AC_INIT([gdbsupport], 1.0) | |
20 | AC_CONFIG_SRCDIR(common-defs.h) | |
3684d331 | 21 | AC_CONFIG_HEADER(config.h:config.in) |
91e1a0ed SM |
22 | |
23 | # Set build, build_cpu, build_vendor and build_os. | |
24 | AC_CANONICAL_BUILD | |
25 | ||
26 | # Set host, host_cpu, host_vendor, and host_os. | |
27 | AC_CANONICAL_HOST | |
28 | ||
29 | # Set target, target_cpu, target_vendor, and target_os. | |
30 | AC_CANONICAL_TARGET | |
31 | ||
01027315 TT |
32 | AM_MAINTAINER_MODE |
33 | AC_CONFIG_AUX_DIR(..) | |
34 | AM_INIT_AUTOMAKE | |
35 | AM_SILENT_RULES([yes]) | |
36 | ||
37 | AC_PROG_CC | |
38 | AC_PROG_CXX | |
39 | AC_PROG_RANLIB | |
40 | ||
41 | AC_USE_SYSTEM_EXTENSIONS | |
42 | ACX_LARGEFILE | |
01027315 TT |
43 | |
44 | # We require a C++11 compiler. Check if one is available, and if | |
45 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
46 | AX_CXX_COMPILE_STDCXX(11, , mandatory) | |
47 | ||
48 | dnl Set up for gettext. | |
49 | ZW_GNU_GETTEXT_SISTER_DIR | |
50 | ||
51 | libiberty_INIT | |
52 | GDB_AC_COMMON | |
53 | GDB_AC_SELFTEST | |
54 | AM_CONDITIONAL(SELFTEST, $enable_unittests) | |
55 | ||
05ea2a05 TT |
56 | # Check the return and argument types of ptrace. |
57 | GDB_AC_PTRACE | |
58 | ||
629c2962 SM |
59 | # Detect support warning flags. |
60 | AM_GDB_WARNINGS | |
61 | ||
01027315 TT |
62 | TARGET_WORD_SIZE=`sed -n 's,#define BFD_ARCH_SIZE \(.*\)$,\1,p' ../bfd/bfd-in3.h` |
63 | AC_DEFINE_UNQUOTED(TARGET_WORD_SIZE, $TARGET_WORD_SIZE, | |
64 | [Define to the word size for the target.]) | |
65 | ||
66 | case ${host} in | |
67 | *mingw32*) | |
68 | AC_DEFINE(USE_WIN32API, 1, | |
69 | [Define if we should use the Windows API, instead of the | |
70 | POSIX API. On Windows, we use the Windows API when | |
71 | building for MinGW, but the POSIX API when building | |
72 | for Cygwin.]) | |
73 | ;; | |
74 | esac | |
75 | ||
76 | AC_CONFIG_FILES([Makefile]) | |
77 | AC_OUTPUT |