sim: common: split up acinclude.m4 into individual m4 files
[deliverable/binutils-gdb.git] / sim / erc32 / configure.ac
1 dnl Copyright (C) 1996-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
16 dnl Process this file with autoconf to produce a configure script.
17 AC_INIT(Makefile.in)
18 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
19
20 SIM_AC_COMMON
21 SIM_AC_OPTION_WARNINGS(no)
22
23 # In the Cygwin environment, we need some additional flags.
24 AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
25 [AC_EGREP_CPP(lose, [
26 #ifdef __CYGWIN__
27 lose
28 #endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
29
30 # Keep in sync with gdb's configure.ac list.
31 AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses],
32 [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""])
33 if test x$sim_cv_os_cygwin = xyes; then
34 TERMCAP="${TERMCAP} -luser32"
35 fi
36 AC_SUBST(TERMCAP)
37
38 # We prefer the in-tree readline. Top-level dependencies make sure
39 # src/readline (if it's there) is configured before src/sim.
40 if test -r ../../readline/Makefile; then
41 READLINE=../../readline/libreadline.a
42 else
43 AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
44 AC_ERROR([the required "readline" library is missing]), $TERMCAP)
45 fi
46 AC_SUBST(READLINE)
47 SIM_AC_OUTPUT
This page took 0.050467 seconds and 5 git commands to generate.