From 8008bae486f0bb79bcadaabb79bb11f85256fbef Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Mon, 9 May 2005 19:42:03 +0000 Subject: * readline/aclocal.m4: Use AC_TRY_LINK to check for mbstate_t. * readline/complete.c (pwd.h): Guard with HAVE_PWD_H. (getpwent): Guard with HAVE_GETPWENT. (rl_username_completion_function): Guard use of getpwent. (endpwent): Likewise. * readline/config.h.in (HAVE_FCNTL): New macro. (HAVE_GETPWENT): Likewise. (HAVE_GETPWNAM): Likewise. (HAVE_GETPWUID): Likewise. (HAVE_KILL): Likewise. (HAVE_PWD_H): Likewise. * readline/configure: Regenerated. * readline/configure.in: Handle MinGW when cross compiling. Check for getpwnam, getpwent, getpwuid, kill, and pwd.h. * readline/display.c (rl_clear_screen): Treat Windows like DOS. (insert_some_chars): Likewise. (delete_chars): Likewise. * readline/shell.c (pwd.h): Guard with HAVE_PWD_H. (getpwuid): Guard with HAVE_GETPWUID. (sh_unset_nodelay_mode): Guard use of fnctl with HAVE_FNCTL_H. * readline/signals.c (rl_signal_handler): Don't use SIGALRM or SIGQUIT if not defined. Use "raise" if "kill" is not available. (rl_set_signals): Don't set handlers for SIGQUIT or SIGALRM if they are not defined. (rl_clear_signals): Likewise. * readline/tilde.c (pwd.h): Guard with HAVE_PWD_H. (getpwuid): Guard declaration with HAVE_GETPWUID. (getpwnam): Guard declaration with HAVE_GETPWNAM. (tilde_expand_word): Guard use of getpwnam with HAVE_GETPWNAM. --- readline/configure.in | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'readline/configure.in') diff --git a/readline/configure.in b/readline/configure.in index 406e172c3d0..33bc2c7a955 100644 --- a/readline/configure.in +++ b/readline/configure.in @@ -56,16 +56,22 @@ if test "x$cross_compiling" = "xyes"; then case "${host}" in *-cygwin*) cross_cache=${srcdir}/cross-build/cygwin.cache - if test -r "${cross_cache}"; then - echo "loading cross-build cache file ${cross_cache}" - . ${cross_cache} - fi LOCAL_CFLAGS="$LOCAL_CFLAGS -I${srcdir}/../libtermcap" - unset cross_cache ;; + *-mingw32*) + cross_cache=${srcdir}/cross-build/mingw.cache + ;; *) echo "configure: cross-compiling for a non-cygwin target is not supported" >&2 ;; esac + + if test "x$cross_cache" != "x"; then + if test -r "${cross_cache}"; then + echo "loading cross-build cache file ${cross_cache}" + . ${cross_cache} + fi + unset cross_cache + fi fi if test "x$cross_compiling" = "xyes"; then @@ -112,14 +118,16 @@ AC_CHECK_TYPE(ssize_t, int) AC_HEADER_STAT AC_HEADER_DIRENT -AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \ - strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit) +AC_CHECK_FUNCS(fcntl kill lstat memmove putenv select setenv setlocale \ + strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit \ + getpwname getpwent getpwuid) AC_FUNC_STRCOLL AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \ limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ - termcap.h termios.h termio.h sys/file.h locale.h memory.h ) + termcap.h termios.h termio.h sys/file.h locale.h memory.h \ + pwd.h) BASH_SYS_SIGNAL_VINTAGE BASH_SYS_REINSTALL_SIGHANDLERS -- cgit v1.2.1