diff options
| author | Jari Aalto <jari.aalto@cante.net> | 2000-03-17 21:46:59 +0000 |
|---|---|---|
| committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:53 +0000 |
| commit | bb70624e964126b7ac4ff085ba163a9c35ffa18f (patch) | |
| tree | ba2dd4add13ada94b1899c6d4aca80195b80b74b /configure.in | |
| parent | b72432fdcc59300c6fe7c9d6c8a31ad3447933f5 (diff) | |
| download | android_external_bash-bb70624e964126b7ac4ff085ba163a9c35ffa18f.tar.gz android_external_bash-bb70624e964126b7ac4ff085ba163a9c35ffa18f.tar.bz2 android_external_bash-bb70624e964126b7ac4ff085ba163a9c35ffa18f.zip | |
Imported from ../bash-2.04.tar.gz.
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 157 |
1 files changed, 109 insertions, 48 deletions
diff --git a/configure.in b/configure.in index fe5d820..d74f1d3 100644 --- a/configure.in +++ b/configure.in @@ -1,18 +1,18 @@ dnl -dnl Configure script for bash-2.03 +dnl Configure script for bash-2.04 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 -AC_REVISION([for Bash 2.03, version 2.49, from autoconf version] AC_ACVERSION)dnl +dnl checks for version info +AC_REVISION([for Bash 2.04, version 2.77, from autoconf version] AC_ACVERSION)dnl AC_INIT(shell.h) AC_CONFIG_HEADER(config.h) dnl make sure we are using a recent autoconf version -AC_PREREQ(2.10) +AC_PREREQ(2.12) dnl where to find install.sh, config.sub, and config.guess AC_CONFIG_AUX_DIR(./support) @@ -22,7 +22,7 @@ dnl parsing options AC_CANONICAL_HOST dnl configure defaults -opt_gnu_malloc=yes +opt_bash_malloc=yes opt_glibc_malloc=no opt_purify=no opt_purecov=no @@ -30,35 +30,39 @@ opt_afs=no opt_curses=no opt_with_installed_readline=no +#htmldir= + 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 -*[Cc]ray*-*) 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 -mips-irix6*) opt_gnu_malloc=no ;; # needs 8-byte alignment -sparc-linux*) opt_gnu_malloc=no ;; # sparc running linux; requires ELF -#*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better -*-aix*) opt_gnu_malloc=no ;; # AIX machines -*-nextstep*) opt_gnu_malloc=no ;; # NeXT machines running NeXTstep -*-rhapsody*) opt_gnu_malloc=no ;; # Apple Rhapsody -*-dgux*) opt_gnu_malloc=no ;; # DG/UX machines -*-qnx*) opt_gnu_malloc=no ;; # QNX 4.2 -*-machten4) opt_gnu_malloc=no ;; # MachTen 4.x -*-bsdi2.1|*-bsdi3.?) opt_gnu_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins -*-beos*) opt_gnu_malloc=no ;; # they say it's suitable -*-cygwin32*) opt_gnu_malloc=no ;; # Cygnus's CYGWIN32 environment +alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux +*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays +*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines +sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 +sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment +mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment +m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir +sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF +#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better +*-aix*) opt_bash_malloc=no ;; # AIX machines +*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody +*-dgux*) opt_bash_malloc=no ;; # DG/UX machines +*-qnx*) opt_bash_malloc=no ;; # QNX 4.2 +*-machten4) opt_bash_malloc=no ;; # MachTen 4.x +*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins +*-beos*) opt_bash_malloc=no ;; # they say it's suitable +*-cygwin32*) opt_bash_malloc=no ;; # Cygnus's CYGWIN32 environment esac dnl arguments to configure dnl packages AC_ARG_WITH(afs, --with-afs if you are running AFS, opt_afs=$withval) +AC_ARG_WITH(bash-malloc, --with-bash-malloc use the Bash version of malloc,opt_bash_malloc=$withval) AC_ARG_WITH(curses, --with-curses use the curses library instead of the termcap library,opt_curses=$withval) AC_ARG_WITH(glibc-malloc, --with-glibc-malloc use the GNU C library version of malloc,opt_glibc_malloc=$withval) -AC_ARG_WITH(gnu-malloc, --with-gnu-malloc use the GNU version of malloc,opt_gnu_malloc=$withval) +AC_ARG_WITH(gnu-malloc, --with-gnu-malloc synonym for --with-bash-malloc,opt_bash_malloc=$withval) AC_ARG_WITH(installed-readline, --with-installed-readline use a version of the readline library that is already installed, opt_with_installed_readline=$withval) AC_ARG_WITH(purecov, --with-purecov configure to postprocess with pure coverage, opt_purecov=$withval) AC_ARG_WITH(purify, --with-purify configure to postprocess with purify, opt_purify=$withval) @@ -67,9 +71,10 @@ dnl test for glibc malloc first because it can override the default if test "$opt_glibc_malloc" = yes; then MALLOC_TARGET=gmalloc MALLOC_SRC=gmalloc.c -elif test "$opt_gnu_malloc" = yes; then +elif test "$opt_bash_malloc" = yes; then MALLOC_TARGET=malloc MALLOC_SRC=malloc.c + AC_DEFINE(USING_BASH_MALLOC) else MALLOC_TARGET=stubmalloc MALLOC_SRC=stub.c @@ -113,8 +118,11 @@ opt_extended_glob=yes opt_brace_expansion=yes opt_disabled_builtins=no opt_command_timing=yes -opt_usg_echo=no +opt_xpg_echo=no opt_cond_command=yes +opt_arith_for_command=yes +opt_net_redirs=yes +opt_progcomp=yes dnl options that affect how bash is compiled and linked opt_static_link=no @@ -131,10 +139,12 @@ if test $opt_minimal_config = yes; then 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 - opt_extended_glob=no opt_cond_command=no + opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no + opt_net_redirs=no opt_progcomp=no fi AC_ARG_ENABLE(alias, --enable-alias enable shell aliases, opt_alias=$enableval) +AC_ARG_ENABLE(arith-for-command, --enable-arith-for-command enable arithmetic for command, opt_arith_for_command=$enableval) AC_ARG_ENABLE(array-variables, --enable-array-variables include shell array variables, opt_array_variables=$enableval) AC_ARG_ENABLE(bang-history, --enable-bang-history turn on csh-style history substitution, opt_bang_history=$enableval) AC_ARG_ENABLE(brace-expansion, --enable-brace-expansion include brace expansion, opt_brace_expansion=$enableval) @@ -147,12 +157,15 @@ AC_ARG_ENABLE(extended-glob, --enable-extended-glob include ksh-style extended p 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) +AC_ARG_ENABLE(net-redirections, --enable-net-redirections enable /dev/tcp/host/port redirection, opt_net_redirs=$enableval) AC_ARG_ENABLE(process-substitution, --enable-process-substitution enable process substitution, opt_process_subst=$enableval) +AC_ARG_ENABLE(progcomp, --enable-progcomp enable programmable completion and the complete builtin, opt_progcomp=$enableval) AC_ARG_ENABLE(prompt-string-decoding, --enable-prompt-string-decoding turn on escape character decoding in prompts, opt_prompt_decoding=$enableval) 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) 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) +AC_ARG_ENABLE(usg-echo-default, --enable-usg-echo-default a synonym for --enable-xpg-echo-default, opt_xpg_echo=$enableval) +AC_ARG_ENABLE(xpg-echo-default, --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(profiling, --enable-profiling allow profiling with gprof, opt_profiling=$enableval) @@ -200,8 +213,8 @@ 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) +if test $opt_xpg_echo = yes ; then +AC_DEFINE(DEFAULT_ECHO_TO_XPG) fi if test $opt_extended_glob = yes ; then AC_DEFINE(EXTENDED_GLOB) @@ -209,6 +222,15 @@ fi if test $opt_cond_command = yes ; then AC_DEFINE(COND_COMMAND) fi +if test $opt_arith_for_command = yes; then +AC_DEFINE(ARITH_FOR_COMMAND) +fi +if test $opt_net_redirs = yes; then +AC_DEFINE(NETWORK_REDIRECTIONS) +fi +if test $opt_progcomp = yes; then +AC_DEFINE(PROGRAMMABLE_COMPLETION) +fi if test "$opt_minimal_config" = yes; then TESTSCRIPT=run-minimal @@ -222,6 +244,8 @@ AC_SUBST(PURIFY) AC_SUBST(MALLOC_TARGET) AC_SUBST(MALLOC_SRC) +AC_SUBST(htmldir) + dnl Use GNU m4 macros to get the distribution and patchlevel information dnl into configure without requiring the files to be distributed [BASHVERS=]dnl @@ -236,9 +260,16 @@ dnl AC_PROG_CC sets $cross_compiling to `yes' if cross-compiling for a dnl different environment AC_PROG_CC BASH_LARGE_FILE_SUPPORT + +dnl test for Unix variants AC_ISC_POSIX AC_MINIX +dnl test for non-Unix variants +AC_CYGWIN +AC_MINGW32 +AC_EXEEXT + dnl BEGIN changes for cross-building for cygwin32 and BeOS SIGNAMES_H=lsignames.h @@ -322,15 +353,19 @@ then dnl we duplicate some work that's done later here so we can look in dnl the correct directory for the readline library + if test -z "$TERMCAP_LIB" ; then + BASH_CHECK_LIB_TERMCAP + fi + test "x$prefix" = xNONE && _rl_prefix=$ac_default_prefix || _rl_prefix=${prefix} test "x$exec_prefix" = xNONE && _rl_exec_prefix=${_rl_prefix} || _rl_exec_prefix=${exec_prefix} AC_MSG_CHECKING(version of installed readline library) - _rl_version=`exec_prefix=${_rl_exec_prefix} ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/rlvers.sh -C "${CC}" -L ${libdir}` + _rl_version=`exec_prefix=${_rl_exec_prefix} ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/rlvers.sh -C "${CC}" -L ${libdir} -T ${TERMCAP_LIB}` AC_MSG_RESULT($_rl_version) case "$_rl_version" in - 3*|4*|5*|6*|7*|8*|9*) ;; + 4.[[1-9]]*|5*|6*|7*|8*|9*) ;; *) opt_with_installed_readline=no AC_MSG_WARN(installed readline library is too old to be linked with bash) AC_MSG_WARN(using private bash version) @@ -395,7 +430,7 @@ AC_PROG_YACC AC_PROG_MAKE_SET case "$host_os" in -opennt*|interix*) MAKE_SHELL="$OPENNT_ROOT/bin/sh" ;; +opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; *) MAKE_SHELL=/bin/sh ;; esac AC_SUBST(MAKE_SHELL) @@ -437,7 +472,8 @@ dnl checks for c library functions AC_CHECK_FUNCS(bcopy bzero confstr getcwd strcasecmp setenv putenv \ setlinebuf setlocale strchr strerror strtod strtol \ strtoul tcgetattr uname sysconf ulimit times tzset \ - siginterrupt memmove) + siginterrupt memmove ttyname gethostbyname inet_aton \ + strpbrk setvbuf) dnl checks for locale functions AC_CHECK_HEADERS(libintl.h) @@ -467,18 +503,31 @@ AC_HEADER_TIME AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \ memory.h locale.h termcap.h termio.h termios.h dlfcn.h \ - stddef.h) + stddef.h netdb.h) 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) +AC_CHECK_HEADERS(netinet/in.h arpa/inet.h) + +dnl network functions -- check for inet_aton again +if test "$ac_cv_func_inet_aton" != 'yes'; then +BASH_FUNC_INET_ATON +fi dnl libraries dnl this is reportedly no longer necessary for irix[56].? -dnl AC_CHECK_LIB(sun, getpwent) +case "$host_os" in +irix4*) AC_CHECK_LIB(sun, getpwent) ;; +esac + 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 +dnl check for gethostbyname in socket libraries if it's not in libc +if test "$ac_cv_func_gethostbyname" = no; then + BASH_FUNC_GETHOSTBYNAME +fi dnl system types AC_TYPE_GETGROUPS @@ -491,25 +540,26 @@ AC_CHECK_TYPE(time_t, long) AC_TYPE_SIGNAL +AC_CHECK_SIZEOF(char, 1) +AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(char *, 4) AC_CHECK_SIZEOF(double, 8) -BASH_TYPE_INT32_T -BASH_TYPE_U_INT32_T -BASH_TYPE_PTRDIFF_T +AC_CHECK_TYPE(u_int, unsigned int) +AC_CHECK_TYPE(u_long, unsigned long) + +BASH_TYPE_BITS16_T +BASH_TYPE_U_BITS16_T +BASH_TYPE_BITS32_T +BASH_TYPE_U_BITS32_T BASH_TYPE_BITS64_T +BASH_TYPE_PTRDIFF_T + 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 @@ -554,6 +604,7 @@ BASH_STRUCT_TERMIO_LDISC BASH_STRUCT_DIRENT_D_INO BASH_STRUCT_DIRENT_D_FILENO BASH_STRUCT_WINSIZE +BASH_STRUCT_TIMEVAL dnl presence and behavior of C library functions BASH_FUNC_STRSIGNAL @@ -596,6 +647,7 @@ AC_SUBST(TERMCAP_LIB) AC_SUBST(TERMCAP_DEP) BASH_CHECK_DEV_FD +BASH_CHECK_DEV_STDIN BASH_DEFAULT_MAIL_DIR if test "$bash_cv_job_control_missing" = missing; then @@ -629,7 +681,8 @@ sysv5*) AC_DEFINE(SVR5) ;; hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;; hpux*) LOCAL_CFLAGS=-DHPUX ;; dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;; -isc*) LOCAL_CFLAGS=-Disc386;; +isc*) LOCAL_CFLAGS=-Disc386 ;; +rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; sco3.2v5*) LOCAL_CFLAGS="-b elf -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 ;; @@ -650,6 +703,13 @@ aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;; bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux esac +dnl FreeBSD-3.x can have either a.out or ELF +case "${host_os}" in +freebsd3*) if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then + LOCAL_LDFLAGS=-rdynamic # allow dynamic loading + fi ;; +esac + case "$host_cpu" in *cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it esac @@ -670,7 +730,7 @@ esac if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf then AC_MSG_CHECKING(shared object configuration for loadable builtins) - eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}` + eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` AC_SUBST(SHOBJ_CC) AC_SUBST(SHOBJ_CFLAGS) AC_SUBST(SHOBJ_LD) @@ -692,6 +752,7 @@ case "$srcdir" in test -d lib/$ld || mkdir lib/$ld done test -d examples/loadables || mkdir examples/loadables # loadable builtins + test -d examples/loadables/perl || mkdir examples/loadables/perl ;; esac @@ -724,7 +785,7 @@ AC_SUBST(LOCAL_DEFS) AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \ lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \ lib/tilde/Makefile doc/Makefile support/Makefile \ - examples/loadables/Makefile], + examples/loadables/Makefile examples/loadables/perl/Makefile], [ # Makefile uses this timestamp file to record whether config.h is up to date. echo timestamp > stamp-h |
