[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
more variable quoting needed
From: |
Stephen Gildea |
Subject: |
more variable quoting needed |
Date: |
Wed, 08 May 2002 11:58:07 -0400 |
While running configure from Texinfo 4.2 on Cygwin, I got the error
./configure: test: !=: unary operator expected
Looking at the configure script, I see line 3959 is this:
if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
That variable name should have double-quotes around it:
if test "$ac_cv_sys_tiocgwinsz_in_termios_h" != yes; then
Looking at the configure script more, I see that many variable
references are missing the necessary double quotes.
Whenever a variable is passed as an argument to a command (such as the
"test" command), its expansion is not guaranteed to be exactly one word
unless the variable is in double quotes. (It appears I got zero words
in the case above, but more than one word can also result.) In most
cases (especially with the "test" command), the script author expects
the variable expansion to yield exactly one word; double-quotes are
required to ensure this result.
Because configure scripts must run on a variety of OS's in a variety of
situations, it is especially important here to pay close attention to
quoting.
The "configure" I am looking at claims to be generated by Autoconf 2.53.
< Stephen
- more variable quoting needed,
Stephen Gildea <=