[PATCH, configure]: Use @>:@ and @<:@ instead of square brackets in configure.ac

Uros Bizjak ubizjak@gmail.com
Thu Feb 18 21:00:00 GMT 2010


Hello!

autoconf eats square brackets, so this part of configure.ac:

# Also check for ld.so support, i.e. glibc 2.11 or higher.
     [if test x$host = x$build -a x$host = x$target &&
         glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
        glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
        glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
        glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
        if test "$glibcnum" -ge 2011 ; then
          enable_gnu_unique_object=yes

generates (note the absence of square brackets):

    # Also check for ld.so support, i.e. glibc 2.11 or higher.
     if test x$host = x$build -a x$host = x$target &&
         glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
        glibcmajor=`expr "$glibcver" : "\(0-9*\)"`
        glibcminor=`expr "$glibcver" : "2-9*\.\(0-9*\)"`
        glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
        if test "$glibcnum" -ge 2011 ; then
          enable_gnu_unique_object=yes

and this results in configure error:

checking assembler for gnu_unique_object... yes
expr: syntax error
/home/uros/gcc-svn/trunk/gcc/configure: line 24227: test: : integer 
expression expected

Attached patch substitutes square brackets in confifuire.ac with ... 
well ... whatever these constructs are called.

2010-02-18  Uros Bizjak <ubizjak@gmail.com>

     * configure.ac (gnu-unique-object): Use @>:@ and @<:@ instead of
     square brackets when detecting glibc version.
     * configure: Regenerated.

Patch was bootstrapped on x86_64-pc-linux-gnu where it fixes mentioned 
error. OK for mainline?

Uros.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100218/dcd3cb1d/attachment.txt>


More information about the Gcc-patches mailing list