diff options
author | Chet Ramey <chet.ramey@case.edu> | 2020-12-06 15:51:17 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2020-12-06 15:51:17 -0500 |
commit | 8868edaf2250e09c4e9a1c75ffe3274f28f38581 (patch) | |
tree | d9a7812ab6cd2f45c5021755c4c094b19dab1b51 /configure.ac | |
parent | 36f2c406ff27995392a9247dfa90672fdaf7dc43 (diff) | |
download | bash-8868edaf2250e09c4e9a1c75ffe3274f28f38581.tar.gz |
bash-5.1 distribution sources and documentationbash-5.1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 111 |
1 files changed, 78 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac index 52b4cdbd..2fe3e7d9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ dnl -dnl Configure script for bash-5.0 +dnl Configure script for bash-5.1 dnl dnl report bugs to chet@po.cwru.edu dnl dnl Process this file with autoconf to produce a configure script. -# Copyright (C) 1987-2018 Free Software Foundation, Inc. +# Copyright (C) 1987-2020 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify @@ -21,9 +21,9 @@ dnl Process this file with autoconf to produce a configure script. # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -AC_REVISION([for Bash 5.0, version 5.005])dnl +AC_REVISION([for Bash 5.1, version 5.022])dnl -define(bashvers, 5.0) +define(bashvers, 5.1) define(relstatus, release) AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org]) @@ -77,6 +77,9 @@ m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF *-aix*) opt_bash_malloc=no ;; # AIX machines *-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment +# These lack a working sbrk(2) +aarch64-freebsd*) opt_bash_malloc=no ;; +riscv*-freebsd*) opt_bash_malloc=no ;; # Mach-derived systems have a ton of extra malloc functions and lack sbrk(2) *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep *-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep @@ -88,13 +91,7 @@ sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF *-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x *-nsk*) opt_bash_malloc=no ;; # HP NonStop *-haiku*) opt_bash_malloc=no ;; # Haiku OS -# Deprecated -- bash malloc is suitable -#sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment -#mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment -#*-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here -#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree -#*-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment -#*-mirbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment +*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk esac # memory scrambling on free() @@ -404,10 +401,7 @@ AC_SUBST(HELPSTRINGS) dnl We want these before the checks, so the checks can modify their values. if test -z "$CFLAGS"; then - AUTO_CFLAGS="-g ${GCC+-O2} ${GCC+-Wno-parentheses}" - AUTO_LDFLAGS="-g ${GCC+-O2}" -else - AUTO_CFLAGS= AUTO_LDFLAGS= + want_auto_cflags=1 fi echo "" @@ -419,6 +413,14 @@ dnl AC_PROG_CC sets $cross_compiling to `yes' if cross-compiling for a dnl different environment AC_PROG_CC +if test -n "$want_auto_cflags"; then + AUTO_CFLAGS="-g ${GCC+-O2}" + AUTO_LDFLAGS="-g ${GCC+-O2}" + STYLE_CFLAGS="${GCC+-Wno-parentheses} ${GCC+-Wno-format-security}" +else + AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS= +fi + dnl test for Unix variants AC_ISC_POSIX AC_MINIX @@ -513,7 +515,11 @@ if test "X$cross_compiling" = "Xno"; then LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} fi # CFLAGS set above to default value if not passed in environment - CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + if test -n "$want_auto_cflags" ; then + CFLAGS_FOR_BUILD="${CFLAGS} ${STYLE_CFLAGS}" + else + CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} + fi LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} else CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} @@ -685,6 +691,44 @@ AC_SUBST(SIZE) m4_include([m4/stat-time.m4]) m4_include([m4/timespec.m4]) +dnl include files for gettext + +m4_include([m4/codeset.m4]) +m4_include([m4/extern-inline.m4]) +m4_include([m4/fcntl-o.m4]) +m4_include([m4/gettext.m4]) +m4_include([m4/glibc2.m4]) +m4_include([m4/glibc21.m4]) +m4_include([m4/host-cpu-c-abi.m4]) +m4_include([m4/iconv.m4]) +m4_include([m4/intdiv0.m4]) +m4_include([m4/intl.m4]) +m4_include([m4/intlmacosx.m4]) +m4_include([m4/intl-thread-locale.m4]) +m4_include([m4/intmax.m4]) +m4_include([m4/inttypes-pri.m4]) +m4_include([m4/inttypes.m4]) +m4_include([m4/inttypes_h.m4]) +m4_include([m4/lcmessage.m4]) +m4_include([m4/lib-ld.m4]) +m4_include([m4/lib-link.m4]) +m4_include([m4/lib-prefix.m4]) +m4_include([m4/lock.m4]) +m4_include([m4/nls.m4]) +m4_include([m4/po.m4]) +m4_include([m4/printf-posix.m4]) +m4_include([m4/progtest.m4]) +m4_include([m4/pthread_rwlock_rdlock.m4]) +m4_include([m4/size_max.m4]) +m4_include([m4/stdint_h.m4]) +m4_include([m4/threadlib.m4]) +m4_include([m4/uintmax_t.m4]) +m4_include([m4/ulonglong.m4]) +m4_include([m4/visibility.m4]) +m4_include([m4/wchar_t.m4]) +m4_include([m4/wint_t.m4]) +m4_include([m4/xsize.m4]) + dnl Turn on any extensions available in the GNU C library. AC_DEFINE(_GNU_SOURCE, 1) @@ -705,6 +749,7 @@ AM_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl]) dnl header files AC_HEADER_DIRENT AC_HEADER_TIME +AC_HEADER_MAJOR BASH_HEADER_INTTYPES @@ -713,7 +758,7 @@ AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \ stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \ regex.h syslog.h ulimit.h) AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \ - sys/mman.h sys/param.h sys/socket.h sys/stat.h \ + sys/mman.h sys/param.h sys/random.h sys/socket.h sys/stat.h \ sys/time.h sys/times.h sys/types.h sys/wait.h) AC_CHECK_HEADERS(netinet/in.h arpa/inet.h) @@ -779,10 +824,10 @@ dnl checks for missing libc functions AC_CHECK_FUNC(mkfifo,AC_DEFINE(HAVE_MKFIFO),AC_DEFINE(MKFIFO_MISSING)) dnl checks for system calls -AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getgroups gethostname \ - getpagesize getpeername getrlimit getrusage gettimeofday \ - kill killpg lstat pselect readlink select setdtablesize \ - setitimer tcgetpgrp uname ulimit waitpid) +AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getentropy getgroups \ + gethostname getpagesize getpeername getrandom getrlimit \ + getrusage gettimeofday kill killpg lstat pselect readlink \ + select setdtablesize setitimer tcgetpgrp uname ulimit waitpid) AC_REPLACE_FUNCS(rename) dnl checks for c library functions @@ -795,7 +840,9 @@ AC_CHECK_FUNCS(bcopy bzero confstr faccessat fnmatch \ AC_CHECK_FUNCS(vasprintf asprintf) AC_CHECK_FUNCS(isascii isblank isgraph isprint isspace isxdigit) AC_CHECK_FUNCS(getpwent getpwnam getpwuid) -AC_CHECK_FUNCS(mkstemp) +AC_CHECK_FUNCS(mkstemp mkdtemp) +AC_CHECK_FUNCS(arc4random) + AC_REPLACE_FUNCS(getcwd memset) AC_REPLACE_FUNCS(strcasecmp strcasestr strerror strftime strnlen strpbrk strstr) AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoimax strtoumax) @@ -810,9 +857,13 @@ AC_CHECK_DECLS([confstr]) AC_CHECK_DECLS([printf]) AC_CHECK_DECLS([sbrk]) AC_CHECK_DECLS([setregid]) +dnl AC_CHECK_DECLS[(setresuid]) +dnl AC_CHECK_DECLS[(setresgid]) AC_CHECK_DECLS([strcpy]) AC_CHECK_DECLS([strsignal]) +AC_CHECK_FUNCS(setresuid setresgid) + dnl Extra test to detect the horribly broken HP/UX 11.00 strtold(3) AC_CHECK_DECLS([strtold], [ AC_MSG_CHECKING([for broken strtold]) @@ -1084,15 +1135,15 @@ LOCAL_DEFS=-DSHELL dnl use this section to possibly define more cpp variables, specify local dnl libraries, and specify any additional local cc or ld flags dnl -dnl this should really go away someday +dnl most of these are really old; this should really go away someday case "${host_os}" in sysv4.2*) AC_DEFINE(SVR4_2) AC_DEFINE(SVR4) ;; sysv4*) AC_DEFINE(SVR4) ;; sysv5*) AC_DEFINE(SVR5) ;; -hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;; -hpux*) LOCAL_CFLAGS=-DHPUX ;; +hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; +hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;; isc*) LOCAL_CFLAGS=-Disc386 ;; rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; @@ -1113,6 +1164,7 @@ linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading *) AC_DEFINE(PGRP_PIPE) ;; esac ;; netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; +freebsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; powerux*) LOCAL_LIBS="-lgen" ;; @@ -1154,14 +1206,7 @@ mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;; esac # turn off paren warnings in gcc -if test "$GCC" = yes # && test -n "$DEBUG" -then - CFLAGS="$CFLAGS -Wno-parentheses -Wno-format-security" -# if test -n "$DEBUG" -# then -# CFLAGS="$CFLAGS -Werror" -# fi -fi +CFLAGS="$CFLAGS ${STYLE_CFLAGS}" # # Shared object configuration section. These values are generated by |