1996-12-23 17:02:34 +00:00
|
|
|
dnl
|
1997-06-05 14:59:13 +00:00
|
|
|
dnl Configure script for bash-2.01
|
1996-12-23 17:02:34 +00:00
|
|
|
dnl
|
|
|
|
dnl report bugs to chet@po.cwru.edu
|
|
|
|
dnl
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl checks for version info
|
1997-06-05 14:59:13 +00:00
|
|
|
|
1997-09-22 20:22:27 +00:00
|
|
|
AC_REVISION([for Bash 2.01, version 1.28, from autoconf version] AC_ACVERSION)dnl
|
1996-12-23 17:02:34 +00:00
|
|
|
|
|
|
|
AC_INIT(shell.h)
|
|
|
|
AC_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
dnl make sure we are using a recent autoconf version
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_PREREQ(2.10)
|
1996-12-23 17:02:34 +00:00
|
|
|
|
|
|
|
dnl where to find install.sh, config.sub, and config.guess
|
|
|
|
AC_CONFIG_AUX_DIR(./support)
|
|
|
|
|
|
|
|
dnl canonicalize the host and os so we can do some tricky things before
|
|
|
|
dnl parsing options
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
dnl configure defaults
|
|
|
|
opt_gnu_malloc=yes
|
|
|
|
opt_glibc_malloc=no
|
|
|
|
opt_purify=no
|
1997-06-05 14:59:13 +00:00
|
|
|
opt_purecov=no
|
1996-12-23 17:02:34 +00:00
|
|
|
opt_afs=no
|
1997-06-05 14:59:13 +00:00
|
|
|
opt_curses=no
|
1996-12-23 17:02:34 +00:00
|
|
|
|
|
|
|
dnl some systems should be configured without gnu malloc by default
|
|
|
|
dnl and some need a special compiler or loader
|
|
|
|
dnl look in the NOTES file for more
|
|
|
|
case "${host_cpu}-${host_os}" in
|
|
|
|
alpha-*) opt_gnu_malloc=no ;; # alpha running osf/1 or linux
|
|
|
|
*cray*-*) opt_gnu_malloc=no ;; # Crays
|
|
|
|
*-osf1*) opt_gnu_malloc=no ;; # other osf/1 machines
|
|
|
|
sparc-svr4*) opt_gnu_malloc=no ;; # sparc SVR4, SVR4.2
|
|
|
|
sparc-netbsd*) opt_gnu_malloc=no ;; # needs 8-byte alignment
|
1997-09-22 20:22:27 +00:00
|
|
|
sgi-irix6*) opt_gnu_malloc=no ;; # needs 8-byte alignment
|
1996-12-23 17:02:34 +00:00
|
|
|
sparc-linux*) opt_gnu_malloc=no ;; # sparc running linux; requires ELF
|
1997-06-05 14:59:13 +00:00
|
|
|
*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better
|
1996-12-23 17:02:34 +00:00
|
|
|
*-aix*) opt_gnu_malloc=no ;; # AIX machines
|
|
|
|
*-nextstep*) opt_gnu_malloc=no ;; # NeXT machines running NeXTstep
|
|
|
|
*-dgux*) opt_gnu_malloc=no ;; # DG/UX machines
|
1997-06-05 14:59:13 +00:00
|
|
|
*-qnx*) opt_gnu_malloc=no ;; # QNX 4.2
|
|
|
|
*-machten4) opt_gnu_malloc=no ;; # MachTen 4.x
|
1997-09-22 20:22:27 +00:00
|
|
|
*-bsdi2.1|*-bsdi3.0) opt_gnu_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
|
1996-12-23 17:02:34 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
dnl arguments to configure
|
|
|
|
dnl packages
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_ARG_WITH(afs, --with-afs if you are running AFS, opt_afs=$withval)
|
|
|
|
AC_ARG_WITH(curses, --with-curses use the curses library instead of the termcap library,opt_curses=$withval)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_ARG_WITH(glibc-malloc, --with-glibc-malloc use the GNU C library version of malloc,opt_glibc_malloc=$withval)
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_ARG_WITH(gnu-malloc, --with-gnu-malloc use the GNU version of malloc,opt_gnu_malloc=$withval)
|
|
|
|
AC_ARG_WITH(purecov, --with-purecov configure to postprocess with pure coverage, opt_purecov=$withval)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_ARG_WITH(purify, --with-purify configure to postprocess with purify, opt_purify=$withval)
|
|
|
|
|
|
|
|
dnl test for glibc malloc first because it can override the default
|
|
|
|
if test "$opt_glibc_malloc" = yes; then
|
1997-06-05 14:59:13 +00:00
|
|
|
MALLOC_TARGET=gmalloc
|
|
|
|
MALLOC_SRC=gmalloc.c
|
1996-12-23 17:02:34 +00:00
|
|
|
elif test "$opt_gnu_malloc" = yes; then
|
1997-06-05 14:59:13 +00:00
|
|
|
MALLOC_TARGET=malloc
|
|
|
|
MALLOC_SRC=malloc.c
|
1996-12-23 17:02:34 +00:00
|
|
|
else
|
1997-06-05 14:59:13 +00:00
|
|
|
MALLOC_TARGET=stubmalloc
|
|
|
|
MALLOC_SRC=stub.c
|
1996-12-23 17:02:34 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$opt_purify" = yes; then
|
1997-06-05 14:59:13 +00:00
|
|
|
PURIFY="purify "
|
1996-12-23 17:02:34 +00:00
|
|
|
else
|
|
|
|
PURIFY=
|
|
|
|
fi
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
if test "$opt_purecov" = yes; then
|
|
|
|
PURIFY="${PURIFY}purecov"
|
|
|
|
fi
|
|
|
|
|
1996-12-23 17:02:34 +00:00
|
|
|
if test "$opt_afs" = yes; then
|
|
|
|
AC_DEFINE(AFS)
|
|
|
|
fi
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
if test "$opt_curses" = yes; then
|
|
|
|
prefer_curses=yes
|
|
|
|
fi
|
|
|
|
|
1996-12-23 17:02:34 +00:00
|
|
|
dnl optional shell features in config.h.in
|
|
|
|
opt_minimal_config=no
|
|
|
|
|
|
|
|
opt_job_control=yes
|
|
|
|
opt_alias=yes
|
|
|
|
opt_readline=yes
|
|
|
|
opt_history=yes
|
|
|
|
opt_bang_history=yes
|
|
|
|
opt_dirstack=yes
|
|
|
|
opt_restricted=yes
|
|
|
|
opt_process_subst=yes
|
|
|
|
opt_prompt_decoding=yes
|
|
|
|
opt_select=yes
|
|
|
|
opt_help=yes
|
|
|
|
opt_array_variables=yes
|
|
|
|
opt_dparen_arith=yes
|
|
|
|
opt_brace_expansion=yes
|
|
|
|
opt_disabled_builtins=no
|
|
|
|
opt_command_timing=yes
|
|
|
|
opt_usg_echo=no
|
|
|
|
|
|
|
|
dnl argument parsing for optional features
|
|
|
|
AC_ARG_ENABLE(minimal-config, --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
|
|
|
|
if test $opt_minimal_config = yes; then
|
|
|
|
opt_job_control=no opt_alias=no opt_readline=no
|
|
|
|
opt_history=no opt_bang_history=no opt_dirstack=no
|
|
|
|
opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
|
|
|
|
opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
|
|
|
|
opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(alias, --enable-alias enable shell aliases, opt_alias=$enableval)
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_ARG_ENABLE(array-variables, --enable-array-variables include shell array variables, opt_array_variables=$enableval)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_ARG_ENABLE(bang-history, --enable-bang-history turn on csh-style history substitution, opt_bang_history=$enableval)
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_ARG_ENABLE(brace-expansion, --enable-brace-expansion include brace expansion, opt_brace_expansion=$enableval)
|
|
|
|
AC_ARG_ENABLE(command-timing, --enable-command-timing enable the time reserved word and command timing, opt_command_timing=$enableval)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_ARG_ENABLE(directory-stack, --enable-directory-stack enable builtins pushd/popd/dirs, opt_dirstack=$enableval)
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_ARG_ENABLE(disabled-builtins, --enable-disabled-builtins allow disabled builtins to still be invoked, opt_disabled_builtins=$enableval)
|
|
|
|
AC_ARG_ENABLE(dparen-arithmetic, [--enable-dparen-arithmetic include ((...)) command], opt_dparen_arith=$enableval)
|
|
|
|
AC_ARG_ENABLE(help-builtin, --enable-help-builtin include the help builtin, opt_help=$enableval)
|
|
|
|
AC_ARG_ENABLE(history, --enable-history turn on command history, opt_history=$enableval)
|
|
|
|
AC_ARG_ENABLE(job-control, --enable-job-control enable job control features, opt_job_control=$enableval)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_ARG_ENABLE(process-substitution, --enable-process-substitution enable process substitution, opt_process_subst=$enableval)
|
|
|
|
AC_ARG_ENABLE(prompt-string-decoding, --enable-prompt-string-decoding turn on escape character decoding in prompts, opt_prompt_decoding=$enableval)
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_ARG_ENABLE(readline, --enable-readline turn on command line editing, opt_readline=$enableval)
|
|
|
|
AC_ARG_ENABLE(restricted, --enable-restricted enable a restricted shell, opt_restricted=$enableval)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_ARG_ENABLE(select, --enable-select include select command, opt_select=$enableval)
|
|
|
|
AC_ARG_ENABLE(usg-echo-default, --enable-usg-echo-default make the echo builtin expand escape sequences by default, opt_usg_echo=$enableval)
|
|
|
|
|
|
|
|
dnl opt_job_control is handled later, after BASH_JOB_CONTROL_MISSING runs
|
|
|
|
|
|
|
|
if test $opt_alias = yes; then
|
|
|
|
AC_DEFINE(ALIAS)
|
|
|
|
fi
|
|
|
|
if test $opt_readline = yes; then
|
|
|
|
AC_DEFINE(READLINE)
|
|
|
|
READLINE_LIB=-lreadline
|
|
|
|
READLINE_DEP='$(READLINE_LIBRARY)'
|
|
|
|
else
|
|
|
|
READLINE_LIB= READLINE_DEP=
|
|
|
|
fi
|
|
|
|
if test $opt_history = yes; then
|
|
|
|
AC_DEFINE(HISTORY)
|
|
|
|
HISTORY_LIB=-lhistory
|
|
|
|
HISTORY_DEP='$(HISTORY_LIBRARY)'
|
|
|
|
else
|
|
|
|
HISTORY_LIB= HISTORY_DEP=
|
|
|
|
fi
|
|
|
|
if test $opt_bang_history = yes; then
|
|
|
|
AC_DEFINE(BANG_HISTORY)
|
|
|
|
HISTORY_LIB=-lhistory
|
|
|
|
HISTORY_DEP='$(HISTORY_LIBRARY)'
|
|
|
|
else
|
|
|
|
HISTORY_LIB= HISTORY_DEP=
|
|
|
|
fi
|
|
|
|
if test $opt_dirstack = yes; then
|
|
|
|
AC_DEFINE(PUSHD_AND_POPD)
|
|
|
|
fi
|
|
|
|
if test $opt_restricted = yes; then
|
|
|
|
AC_DEFINE(RESTRICTED_SHELL)
|
|
|
|
fi
|
|
|
|
if test $opt_process_subst = yes; then
|
|
|
|
AC_DEFINE(PROCESS_SUBSTITUTION)
|
|
|
|
fi
|
|
|
|
if test $opt_prompt_decoding = yes; then
|
|
|
|
AC_DEFINE(PROMPT_STRING_DECODE)
|
|
|
|
fi
|
|
|
|
if test $opt_select = yes; then
|
|
|
|
AC_DEFINE(SELECT_COMMAND)
|
|
|
|
fi
|
|
|
|
if test $opt_help = yes; then
|
|
|
|
AC_DEFINE(HELP_BUILTIN)
|
|
|
|
fi
|
|
|
|
if test $opt_array_variables = yes; then
|
|
|
|
AC_DEFINE(ARRAY_VARS)
|
|
|
|
fi
|
|
|
|
if test $opt_dparen_arith = yes; then
|
|
|
|
AC_DEFINE(DPAREN_ARITHMETIC)
|
|
|
|
fi
|
|
|
|
if test $opt_brace_expansion = yes; then
|
|
|
|
AC_DEFINE(BRACE_EXPANSION)
|
|
|
|
fi
|
|
|
|
if test $opt_disabled_builtins = yes; then
|
|
|
|
AC_DEFINE(DISABLED_BUILTINS)
|
|
|
|
fi
|
|
|
|
if test $opt_command_timing = yes; then
|
|
|
|
AC_DEFINE(COMMAND_TIMING)
|
|
|
|
fi
|
|
|
|
if test $opt_usg_echo = yes ; then
|
|
|
|
AC_DEFINE(DEFAULT_ECHO_TO_USG)
|
|
|
|
fi
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
if test "$opt_minimal_config" = yes; then
|
|
|
|
TESTSCRIPT=run-minimal
|
|
|
|
else
|
|
|
|
TESTSCRIPT=run-all
|
|
|
|
fi
|
|
|
|
|
1996-12-23 17:02:34 +00:00
|
|
|
dnl now substitute in the values generated by arguments
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_SUBST(TESTSCRIPT)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_SUBST(PURIFY)
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_SUBST(MALLOC_TARGET)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_SUBST(MALLOC_SRC)
|
|
|
|
AC_SUBST(READLINE_LIB)
|
|
|
|
AC_SUBST(READLINE_DEP)
|
|
|
|
AC_SUBST(HISTORY_LIB)
|
|
|
|
AC_SUBST(HISTORY_DEP)
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
dnl Use GNU m4 macros to get the distribution and patchlevel information
|
|
|
|
dnl into configure without requiring the files to be distributed
|
|
|
|
[BASHVERS=]dnl
|
|
|
|
esyscmd(cat _distribution)dnl
|
|
|
|
[BASHPATCH=]dnl
|
|
|
|
esyscmd(cat _patchlevel)dnl
|
|
|
|
|
|
|
|
echo "Beginning configuration for bash-$BASHVERS"
|
1996-12-23 17:02:34 +00:00
|
|
|
|
|
|
|
dnl compilation checks
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_ISC_POSIX
|
|
|
|
AC_MINIX
|
|
|
|
|
|
|
|
dnl We want these before the checks, so the checks can modify their values.
|
|
|
|
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
|
|
|
|
|
|
|
|
dnl If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS.
|
|
|
|
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
|
|
|
|
|
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_SUBST(CPPFLAGS)
|
|
|
|
AC_SUBST(LDFLAGS)
|
|
|
|
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
|
|
|
|
dnl programs needed by the build and install process
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_CHECK_PROG(AR, ar, ar)
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_YACC
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
|
|
|
dnl special checks for libc functions
|
|
|
|
AC_FUNC_ALLOCA
|
|
|
|
AC_FUNC_GETPGRP
|
|
|
|
AC_FUNC_SETVBUF_REVERSED
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_FUNC_WAIT3
|
|
|
|
AC_FUNC_STRCOLL
|
|
|
|
|
|
|
|
dnl if vprintf is not in libc, see if it's defined in stdio.h
|
|
|
|
if test "$ac_cv_func_vprintf" = no; then
|
|
|
|
AC_MSG_CHECKING(for declaration of vprintf in stdio.h)
|
|
|
|
AC_EGREP_HEADER([[int[ ]*vprintf[^a-zA-Z0-9]]],stdio.h,ac_cv_func_vprintf=yes)
|
|
|
|
AC_MSG_RESULT($ac_cv_func_vprintf)
|
|
|
|
if test $ac_cv_func_vprintf = yes; then
|
|
|
|
AC_DEFINE(HAVE_VPRINTF)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl signal stuff
|
|
|
|
AC_RETSIGTYPE
|
|
|
|
|
|
|
|
dnl checks for certain version-specific system calls and libc functions
|
|
|
|
AC_CHECK_FUNC(__setostype, AC_DEFINE(HAVE_SETOSTYPE))
|
|
|
|
AC_CHECK_FUNC(wait3, AC_DEFINE(HAVE_WAIT3))
|
|
|
|
|
|
|
|
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 select getdtablesize getgroups gethostname \
|
|
|
|
setdtablesize getpagesize killpg lstat getpeername \
|
|
|
|
getrlimit getrusage gettimeofday waitpid tcgetpgrp)
|
|
|
|
|
|
|
|
dnl checks for c library functions
|
|
|
|
AC_CHECK_FUNCS(bcopy bzero confstr getcwd strcasecmp setenv putenv \
|
|
|
|
setlinebuf setlocale strchr strerror tcgetattr uname \
|
|
|
|
sysconf ulimit times tzset siginterrupt memmove)
|
|
|
|
|
|
|
|
dnl checks for locale functions
|
|
|
|
AC_CHECK_HEADERS(libintl.h)
|
|
|
|
AC_CHECK_FUNCS(gettext textdomain bindtextdomain)
|
|
|
|
|
|
|
|
dnl check for GNU libintl if gettext/textdomain/bindtextdomain
|
|
|
|
dnl are not found in libc
|
|
|
|
if test "$ac_cv_func_bindtextdomain" = "no"; then
|
|
|
|
AC_CHECK_LIB(intl,bindtextdomain)
|
|
|
|
if test "$ac_cv_lib_intl" = "yes"; then
|
|
|
|
AC_CHECK_FUNCS(gettext textdomain bindtextdomain)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl checks for the dynamic loading library functions in libc and libdl
|
|
|
|
AC_CHECK_LIB(dl, dlopen)
|
|
|
|
AC_CHECK_FUNCS(dlopen dlclose dlsym)
|
|
|
|
|
|
|
|
dnl this defines SYS_SIGLIST_DECLARED
|
|
|
|
AC_DECL_SYS_SIGLIST
|
|
|
|
|
|
|
|
dnl header files
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_TIME
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
|
1997-06-05 14:59:13 +00:00
|
|
|
memory.h locale.h termcap.h termio.h termios.h dlfcn.h)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_CHECK_HEADERS(sys/ptem.h sys/pte.h sys/stream.h sys/select.h sys/file.h \
|
|
|
|
sys/resource.h sys/param.h sys/socket.h \
|
|
|
|
sys/time.h sys/times.h sys/wait.h)
|
|
|
|
|
|
|
|
dnl libraries
|
|
|
|
dnl this is reportedly no longer necessary for irix[56].?
|
|
|
|
dnl AC_CHECK_LIB(sun, getpwent)
|
1997-06-05 14:59:13 +00:00
|
|
|
dnl check for getpeername in the socket library only if it's not in libc
|
|
|
|
if test "$ac_cv_func_getpeername" = no; then
|
|
|
|
BASH_CHECK_SOCKLIB
|
|
|
|
fi
|
1996-12-23 17:02:34 +00:00
|
|
|
|
|
|
|
dnl system types
|
|
|
|
AC_TYPE_GETGROUPS
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_MODE_T
|
|
|
|
AC_TYPE_UID_T
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_CHECK_TYPE(time_t, long)
|
|
|
|
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
|
|
|
|
dnl structures
|
|
|
|
AC_HEADER_STAT
|
|
|
|
AC_HEADER_EGREP(struct timeval, sys/time.h, bash_cv_struct_timeval=yes, )
|
|
|
|
if test -z "$bash_cv_struct_timeval"; then
|
|
|
|
AC_HEADER_EGREP(struct timeval, time.h, bash_cv_struct_timeval=yes, bash_cv_struct_timeval=no)
|
|
|
|
fi
|
|
|
|
if test $bash_cv_struct_timeval = yes; then
|
|
|
|
AC_DEFINE(HAVE_TIMEVAL)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl C compiler characteristics
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
|
|
dnl system services
|
|
|
|
AC_SYS_INTERPRETER
|
|
|
|
if test $ac_cv_sys_interpreter = yes; then
|
|
|
|
AC_DEFINE(HAVE_HASH_BANG_EXEC)
|
|
|
|
fi
|
|
|
|
dnl we use NO_READ_RESTART_ON_SIGNAL
|
|
|
|
AC_SYS_RESTARTABLE_SYSCALLS
|
|
|
|
|
|
|
|
dnl Miscellaneous Bash tests
|
|
|
|
if test "$ac_cv_func_lstat" = "no"; then
|
|
|
|
BASH_FUNC_LSTAT
|
|
|
|
fi
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
dnl behavior of system calls and library functions
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_DUP2_CLOEXEC_CHECK
|
|
|
|
BASH_PGRP_SYNC
|
1997-06-05 14:59:13 +00:00
|
|
|
BASH_SIGNAL_CHECK
|
|
|
|
|
|
|
|
dnl checking for the presence of certain library symbols
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_SYS_ERRLIST
|
|
|
|
BASH_SYS_SIGLIST
|
|
|
|
BASH_UNDER_SYS_SIGLIST
|
1997-06-05 14:59:13 +00:00
|
|
|
|
|
|
|
dnl various system types
|
1996-12-23 17:02:34 +00:00
|
|
|
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(quad_t, , long, HAVE_QUAD_T)
|
|
|
|
BASH_RLIMIT_TYPE
|
1997-06-05 14:59:13 +00:00
|
|
|
|
|
|
|
dnl presence and contents of structures used by system calls
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_STRUCT_TERMIOS_LDISC
|
|
|
|
BASH_STRUCT_TERMIO_LDISC
|
|
|
|
BASH_STRUCT_DIRENT_D_INO
|
1997-06-05 14:59:13 +00:00
|
|
|
BASH_STRUCT_DIRENT_D_FILENO
|
|
|
|
BASH_STRUCT_WINSIZE
|
|
|
|
|
|
|
|
dnl presence and behavior of C library functions
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_FUNC_STRSIGNAL
|
|
|
|
BASH_FUNC_OPENDIR_CHECK
|
|
|
|
BASH_FUNC_PRINTF
|
|
|
|
BASH_FUNC_ULIMIT_MAXFDS
|
|
|
|
BASH_FUNC_GETENV
|
|
|
|
BASH_FUNC_GETCWD
|
|
|
|
BASH_FUNC_SBRK_DECLARED
|
|
|
|
BASH_FUNC_POSIX_SETJMP
|
1997-06-05 14:59:13 +00:00
|
|
|
BASH_FUNC_STRCOLL
|
|
|
|
|
|
|
|
dnl presence and behavior of OS functions
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_REINSTALL_SIGHANDLERS
|
|
|
|
BASH_JOB_CONTROL_MISSING
|
|
|
|
BASH_SYS_NAMED_PIPES
|
1997-06-05 14:59:13 +00:00
|
|
|
|
|
|
|
dnl presence of certain CPP defines
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_HAVE_TIOCGWINSZ
|
|
|
|
BASH_HAVE_TIOCSTAT
|
|
|
|
BASH_HAVE_FIONREAD
|
1997-06-05 14:59:13 +00:00
|
|
|
|
|
|
|
dnl miscellaneous
|
|
|
|
BASH_MISC_SPEED_T
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_CHECK_GETPW_FUNCS
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
dnl special checks
|
1996-12-23 17:02:34 +00:00
|
|
|
case "$host_os" in
|
|
|
|
hpux*) BASH_KERNEL_RLIMIT_CHECK ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test "$opt_readline" = yes; then
|
1997-06-05 14:59:13 +00:00
|
|
|
dnl yuck
|
|
|
|
case "$host_os" in
|
|
|
|
aix*) prefer_curses=yes ;;
|
|
|
|
esac
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_CHECK_LIB_TERMCAP
|
|
|
|
fi
|
|
|
|
AC_SUBST(TERMCAP_LIB)
|
|
|
|
AC_SUBST(TERMCAP_DEP)
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
BASH_CHECK_DEV_FD
|
1996-12-23 17:02:34 +00:00
|
|
|
BASH_DEFAULT_MAIL_DIR
|
|
|
|
|
|
|
|
if test "$bash_cv_job_control_missing" = missing; then
|
|
|
|
opt_job_control=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$opt_job_control" = yes; then
|
|
|
|
AC_DEFINE(JOB_CONTROL)
|
|
|
|
JOBS_O=jobs.o
|
|
|
|
else
|
|
|
|
JOBS_O=nojobs.o
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(JOBS_O)
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
dnl Defines that we want to propagate to the Makefiles in subdirectories,
|
|
|
|
dnl like glob and readline
|
|
|
|
|
|
|
|
LOCAL_DEFS=-DSHELL
|
|
|
|
|
1996-12-23 17:02:34 +00:00
|
|
|
dnl use this section to possibly define more cpp variables, specify local
|
|
|
|
dnl libraries, and specify any additional local cc flags
|
|
|
|
dnl
|
|
|
|
dnl this should really go away someday
|
|
|
|
|
|
|
|
case "$host_os" in
|
1997-09-22 20:22:27 +00:00
|
|
|
sysv4.2*) AC_DEFINE(SVR4_2)
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_DEFINE(SVR4) ;;
|
|
|
|
sysv4*) AC_DEFINE(SVR4) ;;
|
|
|
|
hpux*) LOCAL_CFLAGS=-DHPUX ;;
|
|
|
|
dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
|
|
|
|
isc*) LOCAL_CFLAGS=-Disc386;;
|
|
|
|
sco3.2v5*) LOCAL_CFLAGS="-DWAITPID_BROKEN -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
|
|
|
|
sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
|
|
|
|
sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
|
1997-06-05 14:59:13 +00:00
|
|
|
sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
|
|
|
|
solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
|
|
|
|
linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
|
|
|
|
aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;# allow dynamic loading
|
|
|
|
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s -lunix -lncurses" ;;
|
|
|
|
powerux) LOCAL_LIBS="-lgen" ;;
|
1996-12-23 17:02:34 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
case "$host_cpu" in
|
|
|
|
*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$host_cpu-$host_os" in
|
|
|
|
ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$host_cpu-$host_vendor-$host_os" in
|
|
|
|
m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
|
|
|
|
mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# try to create a directory tree if the source is elsewhere
|
|
|
|
# this should be packaged into a script accessible via ${srcdir}/support
|
|
|
|
case "$srcdir" in
|
|
|
|
.) ;;
|
|
|
|
*) for d in doc tests support lib ; do # dirs
|
|
|
|
test -d $d || mkdir $d
|
|
|
|
done
|
|
|
|
for ld in readline glob tilde malloc termcap; do # libdirs
|
|
|
|
test -d lib/$ld || mkdir lib/$ld
|
|
|
|
done
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
BUILD_DIR=`pwd`
|
|
|
|
|
|
|
|
AC_SUBST(incdir)
|
|
|
|
AC_SUBST(BUILD_DIR)
|
|
|
|
|
|
|
|
AC_SUBST(YACC)
|
|
|
|
AC_SUBST(AR)
|
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_SUBST(BASHVERS)
|
|
|
|
AC_SUBST(BASHPATCH)
|
|
|
|
|
1996-12-23 17:02:34 +00:00
|
|
|
AC_SUBST(host_cpu)
|
|
|
|
AC_SUBST(host_os)
|
|
|
|
|
|
|
|
AC_SUBST(LOCAL_LIBS)
|
|
|
|
AC_SUBST(LOCAL_CFLAGS)
|
|
|
|
AC_SUBST(LOCAL_LDFLAGS)
|
1997-06-05 14:59:13 +00:00
|
|
|
AC_SUBST(LOCAL_DEFS)
|
1996-12-23 17:02:34 +00:00
|
|
|
|
1997-06-05 14:59:13 +00:00
|
|
|
#AC_SUBST(ALLOCA_SOURCE)
|
|
|
|
#AC_SUBST(ALLOCA_OBJECT)
|
1996-12-23 17:02:34 +00:00
|
|
|
|
|
|
|
AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
|
|
|
|
lib/malloc/Makefile lib/termcap/Makefile lib/tilde/Makefile \
|
|
|
|
doc/Makefile],
|
|
|
|
[
|
|
|
|
# Makefile uses this timestamp file to record whether config.h is up to date.
|
|
|
|
echo timestamp > stamp-h
|
|
|
|
])
|