This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Attachment: p.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]