diff options
author | Chet Ramey <chet.ramey@case.edu> | 2021-09-08 11:16:55 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2021-09-08 11:16:55 -0400 |
commit | a67031fe1158bbc110b9d0673e57a8707d84d939 (patch) | |
tree | 072b8b8d0365c9a21528ef928184806ff1cfd9b1 /configure.ac | |
parent | 2208813a97583b0da1a843f161be0a575a766e8d (diff) | |
download | bash-a67031fe1158bbc110b9d0673e57a8707d84d939.tar.gz |
configuration changes to remove obsolete autoconf macros, and resultant changes to some source files
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 148 |
1 files changed, 73 insertions, 75 deletions
diff --git a/configure.ac b/configure.ac index 7bfc3fef..076166dc 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ 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.1, version 5.025])dnl +AC_REVISION([for Bash 5.1, version 5.028])dnl define(bashvers, 5.1) define(relstatus, maint) @@ -29,7 +29,8 @@ define(relstatus, maint) AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org]) dnl make sure we are using a recent autoconf version -AC_PREREQ(2.61) +dnl we could consider making this 2.68 or 2.69 +AC_PREREQ(2.63) AC_CONFIG_SRCDIR(shell.h) dnl where to find install.sh, config.sub, and config.guess @@ -108,11 +109,11 @@ AC_ARG_VAR(DEBUGGER_START_FILE, [location of bash debugger initialization file]) dnl arguments to configure dnl packages -AC_ARG_WITH(afs, AC_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval) -AC_ARG_WITH(bash-malloc, AC_HELP_STRING([--with-bash-malloc], [use the Bash version of malloc]), opt_bash_malloc=$withval) -AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) -AC_ARG_WITH(gnu-malloc, AC_HELP_STRING([--with-gnu-malloc], [synonym for --with-bash-malloc]), opt_bash_malloc=$withval) -AC_ARG_WITH(installed-readline, AC_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval) +AC_ARG_WITH(afs, AS_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval) +AC_ARG_WITH(bash-malloc, AS_HELP_STRING([--with-bash-malloc], [use the Bash version of malloc]), opt_bash_malloc=$withval) +AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) +AC_ARG_WITH(gnu-malloc, AS_HELP_STRING([--with-gnu-malloc], [synonym for --with-bash-malloc]), opt_bash_malloc=$withval) +AC_ARG_WITH(installed-readline, AS_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval) if test "$opt_bash_malloc" = yes; then MALLOC_TARGET=malloc @@ -182,13 +183,14 @@ opt_dircomplete_expand_default=no opt_globascii_default=yes opt_function_import=yes opt_dev_fd_stat_broken=no +opt_alt_array_impl=no dnl options that affect how bash is compiled and linked opt_static_link=no opt_profiling=no dnl argument parsing for optional features -AC_ARG_ENABLE(minimal-config, AC_HELP_STRING([--enable-minimal-config], [a minimal sh-like configuration]), opt_minimal_config=$enableval) +AC_ARG_ENABLE(minimal-config, AS_HELP_STRING([--enable-minimal-config], [a minimal sh-like configuration]), opt_minimal_config=$enableval) dnl a minimal configuration turns everything off, but features can be dnl added individually @@ -205,48 +207,49 @@ if test $opt_minimal_config = yes; then opt_globascii_default=yes fi -AC_ARG_ENABLE(alias, AC_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval) -AC_ARG_ENABLE(arith-for-command, AC_HELP_STRING([--enable-arith-for-command], [enable arithmetic for command]), opt_arith_for_command=$enableval) -AC_ARG_ENABLE(array-variables, AC_HELP_STRING([--enable-array-variables], [include shell array variables]), opt_array_variables=$enableval) -AC_ARG_ENABLE(bang-history, AC_HELP_STRING([--enable-bang-history], [turn on csh-style history substitution]), opt_bang_history=$enableval) -AC_ARG_ENABLE(brace-expansion, AC_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval) -AC_ARG_ENABLE(casemod-attributes, AC_HELP_STRING([--enable-casemod-attributes], [include case-modifying variable attributes]), opt_casemod_attrs=$enableval) -AC_ARG_ENABLE(casemod-expansions, AC_HELP_STRING([--enable-casemod-expansions], [include case-modifying word expansions]), opt_casemod_expansions=$enableval) -AC_ARG_ENABLE(command-timing, AC_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval) -AC_ARG_ENABLE(cond-command, AC_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval) -AC_ARG_ENABLE(cond-regexp, AC_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval) -AC_ARG_ENABLE(coprocesses, AC_HELP_STRING([--enable-coprocesses], [enable coprocess support and the coproc reserved word]), opt_coproc=$enableval) -AC_ARG_ENABLE(debugger, AC_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval) -AC_ARG_ENABLE(dev-fd-stat-broken, AC_HELP_STRING([--enable-dev-fd-stat-broken], [enable this option if stat on /dev/fd/N and fstat on file descriptor N don't return the same results]), opt_dev_fd_stat_broken=$enableval) -AC_ARG_ENABLE(direxpand-default, AC_HELP_STRING([--enable-direxpand-default], [enable the direxpand shell option by default]), opt_dircomplete_expand_default=$enableval) -AC_ARG_ENABLE(directory-stack, AC_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval) -AC_ARG_ENABLE(disabled-builtins, AC_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval) -AC_ARG_ENABLE(dparen-arithmetic, AC_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval) -AC_ARG_ENABLE(extended-glob, AC_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval) -AC_ARG_ENABLE(extended-glob-default, AC_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval) -AC_ARG_ENABLE(function-import, AC_HELP_STRING([--enable-function-import], [allow bash to import exported function definitions by default]), opt_function_import=$enableval) -AC_ARG_ENABLE(glob-asciiranges-default, AC_HELP_STRING([--enable-glob-asciiranges-default], [force bracket range expressions in pattern matching to use the C locale by default]), opt_globascii_default=$enableval) -AC_ARG_ENABLE(help-builtin, AC_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval) -AC_ARG_ENABLE(history, AC_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval) -AC_ARG_ENABLE(job-control, AC_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval) -AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval) -AC_ARG_ENABLE(net-redirections, AC_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval) -AC_ARG_ENABLE(process-substitution, AC_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval) -AC_ARG_ENABLE(progcomp, AC_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval) -AC_ARG_ENABLE(prompt-string-decoding, AC_HELP_STRING([--enable-prompt-string-decoding], [turn on escape character decoding in prompts]), opt_prompt_decoding=$enableval) -AC_ARG_ENABLE(readline, AC_HELP_STRING([--enable-readline], [turn on command line editing]), opt_readline=$enableval) -AC_ARG_ENABLE(restricted, AC_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval) -AC_ARG_ENABLE(select, AC_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval) -AC_ARG_ENABLE(separate-helpfiles, AC_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval) -AC_ARG_ENABLE(single-help-strings, AC_HELP_STRING([--enable-single-help-strings], [store help documentation as a single string to ease translation]), opt_single_longdoc_strings=$enableval) -AC_ARG_ENABLE(strict-posix-default, AC_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval) -AC_ARG_ENABLE(usg-echo-default, AC_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval) -AC_ARG_ENABLE(xpg-echo-default, AC_HELP_STRING([--enable-xpg-echo-default], [make the echo builtin expand escape sequences by default]), opt_xpg_echo=$enableval) +AC_ARG_ENABLE(alias, AS_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval) +AC_ARG_ENABLE(alt-array-implementation, AS_HELP_STRING([--enable-alt-array-implementation], [enable an alternate array implementation that optimizes speed at the cost of space]), opt_alt_array_impl=$enableval) +AC_ARG_ENABLE(arith-for-command, AS_HELP_STRING([--enable-arith-for-command], [enable arithmetic for command]), opt_arith_for_command=$enableval) +AC_ARG_ENABLE(array-variables, AS_HELP_STRING([--enable-array-variables], [include shell array variables]), opt_array_variables=$enableval) +AC_ARG_ENABLE(bang-history, AS_HELP_STRING([--enable-bang-history], [turn on csh-style history substitution]), opt_bang_history=$enableval) +AC_ARG_ENABLE(brace-expansion, AS_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval) +AC_ARG_ENABLE(casemod-attributes, AS_HELP_STRING([--enable-casemod-attributes], [include case-modifying variable attributes]), opt_casemod_attrs=$enableval) +AC_ARG_ENABLE(casemod-expansions, AS_HELP_STRING([--enable-casemod-expansions], [include case-modifying word expansions]), opt_casemod_expansions=$enableval) +AC_ARG_ENABLE(command-timing, AS_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval) +AC_ARG_ENABLE(cond-command, AS_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval) +AC_ARG_ENABLE(cond-regexp, AS_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval) +AC_ARG_ENABLE(coprocesses, AS_HELP_STRING([--enable-coprocesses], [enable coprocess support and the coproc reserved word]), opt_coproc=$enableval) +AC_ARG_ENABLE(debugger, AS_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval) +AC_ARG_ENABLE(dev-fd-stat-broken, AS_HELP_STRING([--enable-dev-fd-stat-broken], [enable this option if stat on /dev/fd/N and fstat on file descriptor N don't return the same results]), opt_dev_fd_stat_broken=$enableval) +AC_ARG_ENABLE(direxpand-default, AS_HELP_STRING([--enable-direxpand-default], [enable the direxpand shell option by default]), opt_dircomplete_expand_default=$enableval) +AC_ARG_ENABLE(directory-stack, AS_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval) +AC_ARG_ENABLE(disabled-builtins, AS_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval) +AC_ARG_ENABLE(dparen-arithmetic, AS_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval) +AC_ARG_ENABLE(extended-glob, AS_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval) +AC_ARG_ENABLE(extended-glob-default, AS_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval) +AC_ARG_ENABLE(function-import, AS_HELP_STRING([--enable-function-import], [allow bash to import exported function definitions by default]), opt_function_import=$enableval) +AC_ARG_ENABLE(glob-asciiranges-default, AS_HELP_STRING([--enable-glob-asciiranges-default], [force bracket range expressions in pattern matching to use the C locale by default]), opt_globascii_default=$enableval) +AC_ARG_ENABLE(help-builtin, AS_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval) +AC_ARG_ENABLE(history, AS_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval) +AC_ARG_ENABLE(job-control, AS_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval) +AC_ARG_ENABLE(multibyte, AS_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval) +AC_ARG_ENABLE(net-redirections, AS_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval) +AC_ARG_ENABLE(process-substitution, AS_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval) +AC_ARG_ENABLE(progcomp, AS_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval) +AC_ARG_ENABLE(prompt-string-decoding, AS_HELP_STRING([--enable-prompt-string-decoding], [turn on escape character decoding in prompts]), opt_prompt_decoding=$enableval) +AC_ARG_ENABLE(readline, AS_HELP_STRING([--enable-readline], [turn on command line editing]), opt_readline=$enableval) +AC_ARG_ENABLE(restricted, AS_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval) +AC_ARG_ENABLE(select, AS_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval) +AC_ARG_ENABLE(separate-helpfiles, AS_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval) +AC_ARG_ENABLE(single-help-strings, AS_HELP_STRING([--enable-single-help-strings], [store help documentation as a single string to ease translation]), opt_single_longdoc_strings=$enableval) +AC_ARG_ENABLE(strict-posix-default, AS_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval) +AC_ARG_ENABLE(usg-echo-default, AS_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval) +AC_ARG_ENABLE(xpg-echo-default, AS_HELP_STRING([--enable-xpg-echo-default], [make the echo builtin expand escape sequences by default]), opt_xpg_echo=$enableval) dnl options that alter how bash is compiled and linked -AC_ARG_ENABLE(mem-scramble, AC_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval) -AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval) -AC_ARG_ENABLE(static-link, AC_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval) +AC_ARG_ENABLE(mem-scramble, AS_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval) +AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval) +AC_ARG_ENABLE(static-link, AS_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval) dnl So-called `precious' variables AC_ARG_VAR([CC_FOR_BUILD], [C compiler used when compiling binaries used only at build time]) @@ -354,6 +357,9 @@ fi if test $opt_dev_fd_stat_broken = yes; then AC_DEFINE(DEV_FD_STAT_BROKEN) fi +if test $opt_alt_array_impl = yes; then +AC_DEFINE(ALT_ARRAY_IMPLEMENTATION) +fi if test $opt_memscramble = yes; then AC_DEFINE(MEMSCRAMBLE) @@ -416,14 +422,14 @@ 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} ${GCC:+-Wno-tautological-constant-out-of-range-compare}" 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 +AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE @@ -494,7 +500,7 @@ if test "$opt_static_link" = yes; then prefer_static=yes prefer_shared=no # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 - if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then + if test "$GCC" = "yes"; then STATIC_LD="-static" case "$host_os" in solaris2*|linux*) ;; @@ -735,15 +741,12 @@ 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) - dnl C compiler characteristics AC_C_CONST AC_C_INLINE AC_C_BIGENDIAN AC_C_STRINGIZE -AC_C_LONG_DOUBLE +AC_TYPE_LONG_DOUBLE AC_C_PROTOTYPES AC_C_CHAR_UNSIGNED AC_C_VOLATILE @@ -754,7 +757,6 @@ AM_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl]) dnl header files AC_HEADER_DIRENT -AC_HEADER_TIME AC_HEADER_MAJOR BASH_HEADER_INTTYPES @@ -788,7 +790,6 @@ dnl special checks for libc functions AC_FUNC_ALLOCA AC_FUNC_CHOWN AC_FUNC_GETPGRP -AC_FUNC_SETVBUF_REVERSED AC_FUNC_VPRINTF AC_FUNC_STRCOLL @@ -820,7 +821,7 @@ if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then fi dnl signal stuff -AC_TYPE_SIGNAL +dnl AC_TYPE_SIGNAL dnl checks for certain version-specific system calls and libc functions AC_CHECK_FUNC(__setostype, AC_DEFINE(HAVE_SETOSTYPE)) @@ -930,9 +931,6 @@ AC_CHECK_LIB(dl, dlopen) AC_CHECK_FUNCS(dlopen dlclose dlsym) fi -dnl this defines HAVE_DECL_SYS_SIGLIST -AC_DECL_SYS_SIGLIST - dnl network functions -- check for inet_aton again if test "$ac_cv_func_inet_aton" != 'yes'; then BASH_FUNC_INET_ATON @@ -968,7 +966,6 @@ AC_CHECK_TYPE(time_t, long) BASH_TYPE_LONG_LONG BASH_TYPE_UNSIGNED_LONG_LONG -AC_TYPE_SIGNAL BASH_TYPE_SIG_ATOMIC_T AC_CHECK_SIZEOF(char, 1) @@ -1006,7 +1003,6 @@ BASH_FUNC_LSTAT fi dnl behavior of system calls and library functions -BASH_FUNC_CTYPE_NONASCII BASH_FUNC_DUP2_CLOEXEC_CHECK BASH_SYS_PGRP_SYNC BASH_SYS_SIGNAL_VINTAGE @@ -1017,7 +1013,7 @@ BASH_SYS_SIGLIST BASH_UNDER_SYS_SIGLIST dnl various system types -BASH_TYPE_SIGHANDLER +dnl BASH_TYPE_SIGHANDLER BASH_CHECK_TYPE(clock_t, [#include <sys/times.h>], long) BASH_CHECK_TYPE(sigset_t, [#include <signal.h>], int) BASH_CHECK_TYPE(sig_atomic_t, [#include <signal.h>], int) @@ -1305,14 +1301,16 @@ AC_SUBST(LOCAL_DEFS) #AC_SUBST(ALLOCA_SOURCE) #AC_SUBST(ALLOCA_OBJECT) -AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \ - lib/intl/Makefile \ - lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \ - lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in \ - examples/loadables/Makefile examples/loadables/Makefile.inc \ - examples/loadables/perl/Makefile \ - support/bash.pc support/bashbug.sh], -[ -# Makefile uses this timestamp file to record whether config.h is up to date. -echo timestamp > stamp-h -]) +AC_CONFIG_FILES([Makefile builtins/Makefile lib/readline/Makefile \ + lib/glob/Makefile lib/intl/Makefile \ + lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \ + lib/tilde/Makefile doc/Makefile support/Makefile \ + po/Makefile.in examples/loadables/Makefile \ + examples/loadables/Makefile.inc \ + examples/loadables/perl/Makefile \ + support/bash.pc support/bashbug.sh]) + +dnl Makefile uses this timestamp file to record whether config.h is up to date. +AC_CONFIG_COMMANDS([stamp-h], [echo timestamp > stamp-h]) + +AC_OUTPUT |