summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2014-02-26 09:36:43 -0500
committerChet Ramey <chet.ramey@case.edu>2014-02-26 09:36:43 -0500
commitac50fbac377e32b98d2de396f016ea81e8ee9961 (patch)
treef71882366b98fedf1a88a063103219a4935de926 /aclocal.m4
parent4539d736f1aff232857a854fd2a68df0c98d9f34 (diff)
downloadbash-ac50fbac377e32b98d2de396f016ea81e8ee9961.tar.gz
Bash-4.3 distribution sources and documentationbash-4.3
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m434
1 files changed, 30 insertions, 4 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 716a0436..a947272e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1698,7 +1698,6 @@ 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,6 +1762,33 @@ 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_wcwdith_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"
@@ -3098,7 +3124,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 +3146,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 +4149,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>