OLD | NEW |
1 dnl Process this file with autoconf to produce a configure script. | 1 dnl Process this file with autoconf to produce a configure script. |
2 AC_PREREQ(2.64)dnl | 2 AC_PREREQ(2.64)dnl |
3 AC_INIT(Makefile.in) | 3 AC_INIT(Makefile.in) |
4 sinclude(../common/acinclude.m4) | 4 sinclude(../common/acinclude.m4) |
5 | 5 |
6 SIM_AC_COMMON | 6 SIM_AC_COMMON |
7 | 7 |
8 AC_CHECK_HEADERS(stdlib.h) | 8 AC_CHECK_HEADERS(stdlib.h) |
9 | 9 |
10 # In the Cygwin environment, we need some additional flags. | 10 # In the Cygwin environment, we need some additional flags. |
11 AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, | 11 AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, |
12 [AC_EGREP_CPP(lose, [ | 12 [AC_EGREP_CPP(lose, [ |
13 #ifdef __CYGWIN__ | 13 #ifdef __CYGWIN__ |
14 lose | 14 lose |
15 #endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) | 15 #endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) |
16 | 16 |
17 if test x$sim_cv_os_cygwin = xyes; then | 17 if test x$sim_cv_os_cygwin = xyes; then |
18 TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap
/libtermcap.a; else echo -ltermcap; fi` -luser32' | 18 TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap
/libtermcap.a; else echo -ltermcap; fi` -luser32' |
19 else | 19 else |
20 AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="") | 20 # Keep in sync with gdb's configure.ac list. |
| 21 AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses], |
| 22 [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""]) |
21 fi | 23 fi |
22 AC_SUBST(TERMCAP) | 24 AC_SUBST(TERMCAP) |
23 | 25 |
24 # We prefer the in-tree readline. Top-level dependencies make sure | 26 # We prefer the in-tree readline. Top-level dependencies make sure |
25 # src/readline (if it's there) is configured before src/sim. | 27 # src/readline (if it's there) is configured before src/sim. |
26 if test -r ../../readline/Makefile; then | 28 if test -r ../../readline/Makefile; then |
27 READLINE=../../readline/libreadline.a | 29 READLINE=../../readline/libreadline.a |
28 else | 30 else |
29 AC_CHECK_LIB(readline, readline, READLINE=-lreadline, | 31 AC_CHECK_LIB(readline, readline, READLINE=-lreadline, |
30 AC_ERROR([the required "readline" library is missing]), $TERMCAP) | 32 AC_ERROR([the required "readline" library is missing]), $TERMCAP) |
31 fi | 33 fi |
32 AC_SUBST(READLINE) | 34 AC_SUBST(READLINE) |
33 SIM_AC_OUTPUT | 35 SIM_AC_OUTPUT |
OLD | NEW |