]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/erc32/configure.ac
sim: delete SIM_AC_COMMON macro
[thirdparty/binutils-gdb.git] / sim / erc32 / configure.ac
CommitLineData
3666a048 1dnl Copyright (C) 1996-2021 Free Software Foundation, Inc.
17d88f73
JB
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/>.
15
c906108c 16dnl Process this file with autoconf to produce a configure script.
c906108c 17AC_INIT(Makefile.in)
760b3e8b 18AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
c906108c 19
7a292a7a
SS
20# In the Cygwin environment, we need some additional flags.
21AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
22[AC_EGREP_CPP(lose, [
23#ifdef __CYGWIN__
24lose
25#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
26
c1230d1b
JS
27# Keep in sync with gdb's configure.ac list.
28AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses],
29 [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""])
7a292a7a 30if test x$sim_cv_os_cygwin = xyes; then
c1230d1b 31 TERMCAP="${TERMCAP} -luser32"
7a292a7a 32fi
c906108c
SS
33AC_SUBST(TERMCAP)
34
70a9be63
HPN
35# We prefer the in-tree readline. Top-level dependencies make sure
36# src/readline (if it's there) is configured before src/sim.
37if test -r ../../readline/Makefile; then
53e123a5 38 READLINE=../../readline/readline/libreadline.a
2694bce9 39 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
70a9be63
HPN
40else
41 AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
42 AC_ERROR([the required "readline" library is missing]), $TERMCAP)
2694bce9 43 READLINE_CFLAGS=
70a9be63
HPN
44fi
45AC_SUBST(READLINE)
2694bce9 46AC_SUBST(READLINE_CFLAGS)
c906108c 47SIM_AC_OUTPUT