diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-26 10:49:32 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-27 01:21:47 -0400 |
commit | 5d0b3088f75d2620eb87d5615a2637918d135491 (patch) | |
tree | c23d8ca87ee9d50e4f43b863370385f3c3b686ff /sim/m4 | |
parent | d57b6533281b33d74d8820f44bc2f76d36ead4b2 (diff) | |
download | gdb-5d0b3088f75d2620eb87d5615a2637918d135491.zip gdb-5d0b3088f75d2620eb87d5615a2637918d135491.tar.gz gdb-5d0b3088f75d2620eb87d5615a2637918d135491.tar.bz2 |
sim: erc32: merge with common configure script
Move the unique library tests to the common code so we can delete
the erc32 configure logic entirely.
Diffstat (limited to 'sim/m4')
-rw-r--r-- | sim/m4/sim_ac_platform.m4 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4 index 2a84a01..b0abe62 100644 --- a/sim/m4/sim_ac_platform.m4 +++ b/sim/m4/sim_ac_platform.m4 @@ -171,4 +171,32 @@ PKG_CHECK_MODULES(SDL, sdl, [dnl ], [:]) AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) + +dnl In the Cygwin environment, we need some additional flags. +AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, +[AC_EGREP_CPP(lose, [ +#ifdef __CYGWIN__ +lose +#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) + +dnl Keep in sync with gdb's configure.ac list. +AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses], + [TERMCAP_LIB=$ac_cv_search_tgetent], [TERMCAP_LIB=""]) +if test x$sim_cv_os_cygwin = xyes; then + TERMCAP_LIB="${TERMCAP_LIB} -luser32" +fi +AC_SUBST(TERMCAP_LIB) + +dnl We prefer the in-tree readline. Top-level dependencies make sure +dnl src/readline (if it's there) is configured before src/sim. +if test -r ../readline/Makefile; then + READLINE_LIB=../../readline/readline/libreadline.a + READLINE_CFLAGS='-I$(READLINE_SRC)/..' +else + AC_CHECK_LIB(readline, readline, READLINE_LIB=-lreadline, + AC_ERROR([the required "readline" library is missing]), $TERMCAP_LIB) + READLINE_CFLAGS= +fi +AC_SUBST(READLINE_LIB) +AC_SUBST(READLINE_CFLAGS) ]) |