Commit | Line | Data |
---|---|---|
42a4f53d | 1 | dnl Copyright (C) 1996-2019 Free Software Foundation, Inc. |
17d88f73 JB |
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 | ||
c906108c | 16 | dnl Process this file with autoconf to produce a configure script. |
c906108c | 17 | AC_INIT(Makefile.in) |
9c082ca8 | 18 | sinclude(../common/acinclude.m4) |
c906108c | 19 | |
6ffe910a | 20 | SIM_AC_COMMON |
35695fd6 | 21 | |
7a292a7a SS |
22 | # In the Cygwin environment, we need some additional flags. |
23 | AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, | |
24 | [AC_EGREP_CPP(lose, [ | |
25 | #ifdef __CYGWIN__ | |
26 | lose | |
27 | #endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) | |
28 | ||
c1230d1b JS |
29 | # Keep in sync with gdb's configure.ac list. |
30 | AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses], | |
31 | [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""]) | |
7a292a7a | 32 | if test x$sim_cv_os_cygwin = xyes; then |
c1230d1b | 33 | TERMCAP="${TERMCAP} -luser32" |
7a292a7a | 34 | fi |
c906108c SS |
35 | AC_SUBST(TERMCAP) |
36 | ||
70a9be63 HPN |
37 | # We prefer the in-tree readline. Top-level dependencies make sure |
38 | # src/readline (if it's there) is configured before src/sim. | |
39 | if test -r ../../readline/Makefile; then | |
40 | READLINE=../../readline/libreadline.a | |
41 | else | |
42 | AC_CHECK_LIB(readline, readline, READLINE=-lreadline, | |
43 | AC_ERROR([the required "readline" library is missing]), $TERMCAP) | |
44 | fi | |
45 | AC_SUBST(READLINE) | |
c906108c | 46 | SIM_AC_OUTPUT |