* input.c (rl_getc): Use getch to read console input on
[deliverable/binutils-gdb.git] / readline / aclocal.m4
index bc43d8db013c816fe8e3aa1d3463b53e870f935e..35613c2702f9610d1734f8adc8f12dce0c27433d 100644 (file)
@@ -1654,18 +1654,18 @@ AC_CHECK_HEADERS(langinfo.h)
 
 AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC))
 AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
-AC_CHECK_FUNC(wcwidth, have_wcwidth=yes)
-if test "$have_wcwidth" = yes; then
-  AC_DEFINE(HAVE_WCWIDTH)
-  AC_SUBST(WCWIDTH_OBJ,)
+AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
+if test "$ac_cv_func_wcwidth" = no && test "$ac_cv_header_wchar_h" = yes; then
+  WCWIDTH_OBJ=wcwidth.o
 else
-  AC_SUBST(WCWIDTH_OBJ,wcwidth.o)
+  WCWIDTH_OBJ=
 fi
+AC_SUBST(WCWIDTH_OBJ)
 
 AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
-[AC_TRY_RUN([
-#include <wchar.h>
-int
+[AC_TRY_LINK(
+[#include <wchar.h>],
+[int
 main ()
 {
   mbstate_t ps;
This page took 0.025039 seconds and 4 git commands to generate.