]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/m4/sim_ac_common.m4
sim: unify debug/stdio/trace/profile build settings
[thirdparty/binutils-gdb.git] / sim / m4 / sim_ac_common.m4
CommitLineData
760b3e8b
MF
1dnl Copyright (C) 1997-2021 Free Software Foundation, Inc.
2dnl
3dnl This program is free software; you can redistribute it and/or modify
4dnl it under the terms of the GNU General Public License as published by
5dnl the Free Software Foundation; either version 3 of the License, or
6dnl (at your option) any later version.
7dnl
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11dnl GNU General Public License for more details.
12dnl
13dnl You should have received a copy of the GNU General Public License
14dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
15dnl
16dnl SIM_AC_COMMON invokes AC macros used by all simulators and by the common
17dnl directory. It is intended to be invoked before any target specific stuff.
18dnl SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile.
19dnl It is intended to be invoked last.
20dnl
21dnl See README-HACKING for more details.
22AC_DEFUN([SIM_AC_COMMON],
c2783492
MF
23[dnl
24SIM_AC_TOOLCHAIN
760b3e8b 25AC_CONFIG_HEADERS([config.h:config.in])
760b3e8b
MF
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.
30PACKAGE=sim
31AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ])
32AC_SUBST(PACKAGE)
33
34# Dependency checking.
35ZW_CREATE_DEPDIR
36ZW_PROG_COMPILER_DEPENDENCIES([CC])
37
760b3e8b
MF
38dnl We don't use gettext, but bfd does. So we do the appropriate checks
39dnl to see if there are intl libraries we should link against.
40ALL_LINGUAS=
41ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
42
760b3e8b
MF
43# Check for socket libraries
44AC_CHECK_LIB(socket, bind)
45AC_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.
49AM_ZLIB
50
51# BFD uses libdl when when plugins enabled.
52AC_PLUGINS
53AM_CONDITIONAL(PLUGINS, test "$plugins" = yes)
54LT_INIT([dlopen])
55AC_SUBST(lt_cv_dlopen_libs)
56
760b3e8b
MF
57dnl We don't use automake, but we still want to support
58dnl --enable-maintainer-mode.
59AM_MAINTAINER_MODE
60
760b3e8b
MF
61SIM_AC_OPTION_INLINE
62
63ACX_PKGVERSION([SIM])
64ACX_BUGURL([https://www.gnu.org/software/gdb/bugs/])
65AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
66AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address])
67
760b3e8b
MF
68dnl Detect exe extension
69AC_EXEEXT
70]) dnl End of SIM_AC_COMMON