* aclocal.m4: Don't add wcwidth.o if we don't have wchar.h.
authorMark Kettenis <kettenis@gnu.org>
Tue, 27 May 2003 23:29:47 +0000 (23:29 +0000)
committerMark Kettenis <kettenis@gnu.org>
Tue, 27 May 2003 23:29:47 +0000 (23:29 +0000)
* configure: Regenerate.

readline/ChangeLog.gdb
readline/aclocal.m4
readline/configure

index 28376b78e8bb646a7c81c1e1cc45eeeafa7af99a..3cb58e216187f440567aaf257405944e7d1a7936 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-25  Mark Kettenis  <kettenis@gnu.org>
+
+       * aclocal.m4: Don't add wcwidth.o if we don't have wchar.h.
+       * configure: Regenerate.
+
 2003-05-13  Andreas Jaeger  <aj@suse.de>
 
         * support/config.guess: Update to 2003-05-09 version.
index bc43d8db013c816fe8e3aa1d3463b53e870f935e..a87e2dcb93b762278975987a271cd2703bf82b0c 100644 (file)
@@ -1654,13 +1654,13 @@ 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([
index b5c2e8dcbf9a316dd961aa39f2262aa079e7cef1..236327cf7f63414bc5f373ee9e6b426d15fa49f7 100755 (executable)
@@ -6235,20 +6235,19 @@ fi
 echo "$as_me:$LINENO: result: $ac_cv_func_wcwidth" >&5
 echo "${ECHO_T}$ac_cv_func_wcwidth" >&6
 if test $ac_cv_func_wcwidth = yes; then
-  have_wcwidth=yes
-fi
-
-if test "$have_wcwidth" = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_WCWIDTH 1
 _ACEOF
 
+fi
 
-else
+if test "$ac_cv_func_wcwidth" = no && test "$ac_cv_header_wchar_h" = yes; then
   WCWIDTH_OBJ=wcwidth.o
-
+else
+  WCWIDTH_OBJ=
 fi
 
+
 echo "$as_me:$LINENO: checking for mbstate_t" >&5
 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
 if test "${bash_cv_have_mbstate_t+set}" = set; then