summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2019-01-07 09:27:52 -0500
committerChet Ramey <chet.ramey@case.edu>2019-01-07 09:27:52 -0500
commitd233b485e83c3a784b803fb894280773f16f2deb (patch)
tree16d51f3ccca2d4ad2d8f2da564d68ca848de595b /aclocal.m4
parent64447609994bfddeef1061948022c074093e9a9f (diff)
downloadbash-d233b485e83c3a784b803fb894280773f16f2deb.tar.gz
bash-5.0 distribution sources and documentationbash-5.0
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m4107
1 files changed, 86 insertions, 21 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index d3bac077..1413267f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-dnl
+nl
dnl Bash specific tests
dnl
dnl Some derived from PDKSH 5.1.3 autoconf tests
@@ -962,7 +962,8 @@ AC_CACHE_VAL(bash_cv_termcap_lib,
[AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
[AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
[AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
- bash_cv_termcap_lib=gnutermcap)])])])])])
+ [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw,
+ bash_cv_termcap_lib=gnutermcap)])])])])])])
if test "X$_bash_needmsg" = "Xyes"; then
AC_MSG_CHECKING(which library has the termcap functions)
fi
@@ -1307,7 +1308,7 @@ AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
typedef RETSIGTYPE sigfunc();
-int nsigint;
+volatile int nsigint;
#ifdef HAVE_POSIX_SIGNALS
sigfunc *
@@ -1357,7 +1358,7 @@ AC_DEFUN(BASH_SYS_JOB_CONTROL_MISSING,
[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
AC_MSG_CHECKING(for presence of necessary job control definitions)
AC_CACHE_VAL(bash_cv_job_control_missing,
-[AC_TRY_RUN([
+[AC_TRY_COMPILE([
#include <sys/types.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -1367,42 +1368,38 @@ AC_CACHE_VAL(bash_cv_job_control_missing,
#endif
#include <signal.h>
-/* Add more tests in here as appropriate. */
-main()
-{
+/* add more tests in here as appropriate */
+
/* signal type */
#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
-exit(1);
+#error
#endif
/* signals and tty control. */
#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
-exit (1);
+#error
#endif
/* process control */
#if !defined (WNOHANG) || !defined (WUNTRACED)
-exit(1);
+#error
#endif
/* Posix systems have tcgetpgrp and waitpid. */
#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
-exit(1);
+#error
#endif
#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
-exit(1);
+#error
#endif
/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
-exit(1);
+#error
#endif
-exit(0);
-}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
- [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
- bash_cv_job_control_missing=missing]
+], , bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing
)])
AC_MSG_RESULT($bash_cv_job_control_missing)
if test $bash_cv_job_control_missing = missing; then
@@ -1585,9 +1582,7 @@ fi
AC_DEFUN(BASH_CHECK_DEV_STDIN,
[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
AC_CACHE_VAL(bash_cv_dev_stdin,
-[if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then
- bash_cv_dev_stdin=present
- elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then
+[if (exec test -r /dev/stdin < /dev/null) ; then
bash_cv_dev_stdin=present
else
bash_cv_dev_stdin=absent
@@ -1798,6 +1793,8 @@ if test "$am_cv_func_iconv" = yes; then
LIBS="$OLDLIBS"
fi
+AC_CHECK_SIZEOF(wchar_t, 4)
+
])
dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
@@ -1856,7 +1853,7 @@ main()
],
ac_cv_rl_version=`cat conftest.rlv`,
ac_cv_rl_version='0.0',
-ac_cv_rl_version='6.3')])
+ac_cv_rl_version='8.0')])
CFLAGS="$_save_CFLAGS"
LDFLAGS="$_save_LDFLAGS"
@@ -4195,3 +4192,71 @@ fi
AC_MSG_RESULT($bash_cv_wexitstatus_offset)
AC_DEFINE_UNQUOTED([WEXITSTATUS_OFFSET], [$bash_cv_wexitstatus_offset], [Offset of exit status in wait status word])
])
+
+AC_DEFUN([BASH_FUNC_SBRK],
+[
+ AC_CHECK_FUNCS_ONCE([sbrk])
+ if test X$ac_cv_func_sbrk = Xyes; then
+ AC_CACHE_CHECK([for working sbrk], [bash_cv_func_sbrk],
+ [AC_TRY_RUN([
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main(int c, char **v)
+{
+ void *x;
+
+ x = sbrk (4096);
+ exit ((x == (void *)-1) ? 1 : 0);
+}
+], bash_cv_func_sbrk=yes, bash_cv_func_snprintf=sbrk,
+ [AC_MSG_WARN([cannot check working sbrk if cross-compiling])
+ bash_cv_func_sbrk=yes]
+)])
+ if test $bash_cv_func_sbrk = no; then
+ ac_cv_func_sbrk=no
+ fi
+ fi
+ if test $ac_cv_func_sbrk = no; then
+ AC_DEFINE(HAVE_SBRK, 0,
+ [Define if you have a working sbrk function.])
+ fi
+])
+
+AC_DEFUN(BASH_FUNC_FNMATCH_EQUIV_FALLBACK,
+[AC_MSG_CHECKING(whether fnmatch can be used to check bracket equivalence classes)
+AC_CACHE_VAL(bash_cv_fnmatch_equiv_fallback,
+[AC_TRY_RUN([
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fnmatch.h>
+#include <locale.h>
+
+char *pattern = "[[=a=]]";
+
+/* char *string = "รค"; */
+unsigned char string[4] = { '\xc3', '\xa4', '\0' };
+
+int
+main (int c, char **v)
+{
+ setlocale (LC_ALL, "de_DE.UTF-8");
+ if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH)
+ exit (0);
+ exit (1);
+}
+
+], bash_cv_fnmatch_equiv_fallback=yes, bash_cv_fnmatch_equiv_fallback=no,
+ [AC_MSG_WARN(cannot check fnmatch if cross compiling -- defaulting to no)
+ bash_cv_fnmatch_equiv_fallback=no]
+)])
+AC_MSG_RESULT($bash_cv_fnmatch_equiv_fallback)
+if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then
+ bash_cv_fnmatch_equiv_value=1
+else
+ bash_cv_fnmatch_equiv_value=0
+fi
+AC_DEFINE_UNQUOTED([FNMATCH_EQUIV_FALLBACK], [$bash_cv_fnmatch_equiv_value], [Whether fnmatch can be used for bracket equivalence classes])
+])