]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/m4/sim_ac_common.m4
sim: split debug/stdio/trace/profile options into dedicated m4 files
[thirdparty/binutils-gdb.git] / sim / m4 / sim_ac_common.m4
1 dnl Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 dnl
3 dnl This program is free software; you can redistribute it and/or modify
4 dnl it under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation; either version 3 of the License, or
6 dnl (at your option) any later version.
7 dnl
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 dnl GNU General Public License for more details.
12 dnl
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
15 dnl
16 dnl SIM_AC_COMMON invokes AC macros used by all simulators and by the common
17 dnl directory. It is intended to be invoked before any target specific stuff.
18 dnl SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile.
19 dnl It is intended to be invoked last.
20 dnl
21 dnl See README-HACKING for more details.
22 AC_DEFUN([SIM_AC_COMMON],
23 [dnl
24 SIM_AC_TOOLCHAIN
25 AC_CONFIG_HEADERS([config.h:config.in])
26
27 # Some of the common include files depend on bfd.h, and bfd.h checks
28 # that config.h is included first by testing that the PACKAGE macro
29 # is defined.
30 PACKAGE=sim
31 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ])
32 AC_SUBST(PACKAGE)
33
34 # Dependency checking.
35 ZW_CREATE_DEPDIR
36 ZW_PROG_COMPILER_DEPENDENCIES([CC])
37
38 dnl We don't use gettext, but bfd does. So we do the appropriate checks
39 dnl to see if there are intl libraries we should link against.
40 ALL_LINGUAS=
41 ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
42
43 # Check for socket libraries
44 AC_CHECK_LIB(socket, bind)
45 AC_CHECK_LIB(nsl, gethostbyname)
46
47 # BFD conditionally uses zlib, so we must link it in if libbfd does, by
48 # using the same condition.
49 AM_ZLIB
50
51 # BFD uses libdl when when plugins enabled.
52 AC_PLUGINS
53 AM_CONDITIONAL(PLUGINS, test "$plugins" = yes)
54 LT_INIT([dlopen])
55 AC_SUBST(lt_cv_dlopen_libs)
56
57 dnl Standard (and optional) simulator options.
58 dnl Eventually all simulators will support these.
59 dnl Do not add any here that cannot be supported by all simulators.
60 dnl Do not add similar but different options to a particular simulator,
61 dnl all shall eventually behave the same way.
62
63
64 dnl We don't use automake, but we still want to support
65 dnl --enable-maintainer-mode.
66 AM_MAINTAINER_MODE
67
68
69 SIM_AC_OPTION_DEBUG
70
71 SIM_AC_OPTION_STDIO
72
73 SIM_AC_OPTION_TRACE
74
75 SIM_AC_OPTION_PROFILE
76
77 SIM_AC_OPTION_INLINE
78
79 ACX_PKGVERSION([SIM])
80 ACX_BUGURL([https://www.gnu.org/software/gdb/bugs/])
81 AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
82 AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address])
83
84 dnl Detect exe extension
85 AC_EXEEXT
86 ]) dnl End of SIM_AC_COMMON