From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21809 invoked from network); 26 Feb 2003 18:10:02 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Feb 2003 18:10:02 -0000 Received: (qmail 8230 invoked by alias); 26 Feb 2003 18:09:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18303 Received: (qmail 8216 invoked from network); 26 Feb 2003 18:09:45 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 26 Feb 2003 18:09:45 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [207.99.30.4] by sunsite.dk (MessageWall 1.0.8) with SMTP; 26 Feb 2003 18:9:44 -0000 Received: from acolyte.scowler.net (localhost [127.0.0.1]) by acolyte.scowler.net (8.12.6/8.12.6/Debian-7) with ESMTP id h1QI9hRe016979 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Wed, 26 Feb 2003 13:09:43 -0500 Received: (from clint@localhost) by acolyte.scowler.net (8.12.6/8.12.6/Debian-7) id h1QI9guc016978 for zsh-workers@sunsite.dk; Wed, 26 Feb 2003 13:09:42 -0500 X-Authentication-Warning: acolyte.scowler.net: clint set sender to clint@zsh.org using -f Date: Wed, 26 Feb 2003 13:09:42 -0500 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: usage of test(1) in zshconfig.ac Message-ID: <20030226180942.GA16932@scowler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Things like "test $ac_cv_func_tcsetpgrp=yes" will always evaluate to true, so this patch adds the necessary spaces around the equals sign. I also went and replaced occurences of -a as a binary operator with the more portable "&& test". Index: zshconfig.ac =================================================================== RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v retrieving revision 1.31 diff -u -r1.31 zshconfig.ac --- zshconfig.ac 14 Feb 2003 15:56:35 -0000 1.31 +++ zshconfig.ac 26 Feb 2003 18:06:21 -0000 @@ -235,8 +235,8 @@ AC_ARG_ENABLE(function-subdirs, [ --enable-function-subdirs install functions in subdirectories]) -if test "x${enable_function_subdirs}" != x -a \ - "x${enable_function_subdirs}" != xno; then +if test "x${enable_function_subdirs}" != x && + test "x${enable_function_subdirs}" != xno; then FUNCTIONS_SUBDIRS=yes else FUNCTIONS_SUBDIRS=no @@ -279,7 +279,7 @@ dnl Gross hack for ReliantUNIX - GCC does not understand getconf options dnl For now just disable LFS in this case dnl Any takers? - if test "$host" = mips-sni-sysv4 -a -n "$GCC"; then + if test "$host" = mips-sni-sysv4 && test -n "$GCC"; then : else zsh_LARGE_FILE_SUPPORT @@ -501,7 +501,7 @@ fi dnl Some SCO systems cannot include both sys/time.h and sys/select.h -if test $ac_cv_header_sys_time_h = yes -a $ac_cv_header_sys_select_h = yes; then +if test $ac_cv_header_sys_time_h = yes && test $ac_cv_header_sys_select_h = yes; then AC_CACHE_CHECK(for conflicts in sys/time.h and sys/select.h, zsh_cv_header_time_h_select_h_conflicts, [AC_TRY_COMPILE([#include @@ -753,7 +753,7 @@ if test $lfs != no -o $zsh_cv_off_t_is_64_bit = yes \ -o $zsh_cv_ino_t_is_64_bit = yes; then AC_CACHE_CHECK(if compiler has a 64 bit type, zsh_cv_64_bit_type, - [if test $lfs != yes -a $lfs != no; then + [if test $lfs != yes && test $lfs != no; then zsh_64_BIT_TYPE(${lfs}, zsh_cv_64_bit_type, force) else zsh_64_BIT_TYPE(long long, zsh_cv_64_bit_type) @@ -766,8 +766,8 @@ dnl As a last resort, if we know off_t has 64 bits, use that as dnl the 64-bit integer type. I don't dare try ino_t since there's dnl probably nothing to stop that being unsigned. - if test "$zsh_cv_64_bit_type" = no -a \ - "$zsh_cv_off_t_is_64_bit" = yes; then + if test "$zsh_cv_64_bit_type" = no && + test "$zsh_cv_off_t_is_64_bit" = yes; then zsh_64_BIT_TYPE(off_t, zsh_cv_64_bit_type) fi fi]) @@ -1051,13 +1051,13 @@ dnl ------------- dnl What style of signal do you have (POSIX, BSD, or SYSV)? AC_MSG_CHECKING(what style of signals to use) -if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then +if test $ac_cv_func_sigaction = yes && test $ac_cv_func_sigprocmask = yes; then signals_style=POSIX_SIGNALS AC_DEFINE(POSIX_SIGNALS) -elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then +elif test $ac_cv_func_sigblock = yes && test $ac_cv_func_sigsetmask = yes; then signals_style=BSD_SIGNALS AC_DEFINE(BSD_SIGNALS) -elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then +elif test $ac_cv_func_sighold = yes && test $ac_cv_func_sigrelse = yes; then signals_style=SYSV_SIGNALS AC_DEFINE(SYSV_SIGNALS) else @@ -1132,7 +1132,7 @@ break done zsh_cv_path_rlimit_h=$RESOURCE_H -if test $RESOURCE_H = "/dev/null" -a $ac_cv_func_getrlimit = yes; then +if test $RESOURCE_H = "/dev/null" && test $ac_cv_func_getrlimit = yes; then AC_MSG_WARN(RLIMIT MACROS NOT FOUND: please report to developers) fi]) RLIMITS_INC_H=$zsh_cv_path_rlimit_h @@ -1451,7 +1451,7 @@ dnl if POSIX, test for working sigsuspend(). dnl for instance, BeOS R4.51 is broken. dnl ----------- -if test $signals_style=POSIX_SIGNALS; then +if test $signals_style = POSIX_SIGNALS; then AC_CACHE_CHECK(if POSIX sigsuspend() works, zsh_cv_sys_sigsuspend, [AC_TRY_RUN([ @@ -1492,7 +1492,7 @@ dnl if found tcsetpgrp, test to see if it actually works dnl for instance, BeOS R4.51 does not support it yet dnl ----------- -if test -t 0 -a $ac_cv_func_tcsetpgrp=yes; then +if test -t 0 && test $ac_cv_func_tcsetpgrp = yes; then AC_CACHE_CHECK(if tcsetpgrp() actually works, zsh_cv_sys_tcsetpgrp, [AC_TRY_RUN([ @@ -1517,7 +1517,7 @@ dnl for instance, BeOS R4.51 is not multiuser yet, and fakes getpwnam() dnl test by looking up two usernames that shouldn't succeed, and compare entry dnl ----------- -if test $ac_cv_func_getpwnam=yes; then +if test $ac_cv_func_getpwnam = yes; then AC_CACHE_CHECK(if getpwnam() is faked, zsh_cv_sys_getpwnam_faked, [AC_TRY_RUN([ @@ -1946,7 +1946,7 @@ load= functions= . ${srcdir}/$modfile - if test x$name != x -a x"$link" != x; then + if test x$name != x && test x"$link" != x; then case "$userlist" in *" $name "*) # not autogenerated, keep original grep "^name=$name " ${CONFIG_MODULES}.old