aboutsummaryrefslogtreecommitdiff
path: root/readline/aclocal.m4
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-10-07 12:52:13 -0600
committerTom Tromey <tom@tromey.com>2019-08-12 10:57:56 -0600
commit775e241e9c5f2b2ff2b59972ab70e5f20763fae6 (patch)
tree597ab643dce69ee6e98e46ecac00ee85f447bb4b /readline/aclocal.m4
parent08132bdd876fa1825810f90ecc25390dd4ded457 (diff)
downloadfsf-binutils-gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.zip
fsf-binutils-gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.tar.gz
fsf-binutils-gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.tar.bz2
Import readline 7.0 (patch 5)
This imports readline 7.0 (up to patch 5) while preserving all gdb-local changes. This was done by checking out the readline git repository, making a branch based on the gdb baseline revision, applying the gdb changes to that branch, and then merging from readline 7. readline/ChangeLog.gdb 2019-08-12 Tom Tromey <tom@tromey.com> * Imported readline 7.0 patch 5.
Diffstat (limited to 'readline/aclocal.m4')
-rw-r--r--readline/aclocal.m440
1 files changed, 34 insertions, 6 deletions
diff --git a/readline/aclocal.m4 b/readline/aclocal.m4
index 716a043..d3bac07 100644
--- a/readline/aclocal.m4
+++ b/readline/aclocal.m4
@@ -1692,13 +1692,14 @@ AC_CHECK_HEADERS(wctype.h)
AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(langinfo.h)
+AC_CHECK_HEADERS(mbstr.h)
+
AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN))
AC_CHECK_FUNC(mbscasecmp, AC_DEFINE(HAVE_MBSCMP))
AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP))
AC_CHECK_FUNC(mbsnrtowcs, AC_DEFINE(HAVE_MBSNRTOWCS))
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
-
AC_REPLACE_FUNCS(mbschr)
AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB))
@@ -1763,9 +1764,36 @@ if test $bash_cv_type_wint_t = yes; then
AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
fi
+dnl check for broken wcwidth
+AC_CACHE_CHECK([for wcwidth broken with unicode combining characters],
+bash_cv_wcwidth_broken,
+[AC_TRY_RUN([
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <locale.h>
+#include <wchar.h>
+
+main(c, v)
+int c;
+char **v;
+{
+ int w;
+
+ setlocale(LC_ALL, "en_US.UTF-8");
+ w = wcwidth (0x0301);
+ exit (w == 0); /* exit 0 if wcwidth broken */
+}
+],
+bash_cv_wcwidth_broken=yes, bash_cv_wcwidth_broken=no, bash_cv_wcwidth_broken=no)])
+if test "$bash_cv_wcwidth_broken" = yes; then
+ AC_DEFINE(WCWIDTH_BROKEN, 1, [wcwidth is usually not broken])
+fi
+
if test "$am_cv_func_iconv" = yes; then
OLDLIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
+ LIBS="$LIBS $LIBINTL $LIBICONV"
AC_CHECK_FUNCS(locale_charset)
LIBS="$OLDLIBS"
fi
@@ -1828,7 +1856,7 @@ main()
],
ac_cv_rl_version=`cat conftest.rlv`,
ac_cv_rl_version='0.0',
-ac_cv_rl_version='4.2')])
+ac_cv_rl_version='6.3')])
CFLAGS="$_save_CFLAGS"
LDFLAGS="$_save_LDFLAGS"
@@ -3098,7 +3126,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
found_so=
found_a=
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
found_dir="$additional_libdir"
found_so="$additional_libdir/lib$name.$shlibext"
if test -f "$additional_libdir/lib$name.la"; then
@@ -3120,7 +3148,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
found_dir="$dir"
found_so="$dir/lib$name.$shlibext"
if test -f "$dir/lib$name.la"; then
@@ -4123,7 +4151,7 @@ main()
AC_DEFUN(BASH_STRUCT_WEXITSTATUS_OFFSET,
[AC_MSG_CHECKING(for offset of exit status in return status from wait)
AC_CACHE_VAL(bash_cv_wexitstatus_offset,
-[AC_RUN_IFELSE([
+[AC_TRY_RUN([
#include <stdlib.h>
#include <unistd.h>