[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

awk comands inside m4 macros

From: Chris Coleman
Subject: awk comands inside m4 macros
Date: Sat, 16 Jul 2005 12:24:38 +0100
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)


I'm sorry for asking what must be a trivial question to this list, but I've used up all my ideas, and am relatively new to autoconf and m4.

If from the comand line shell sh I excecute the comand:

sh-2.05b$ boost=1.32.0; echo $boost | awk -F. '{print $1}'

Then I get the expected result '1' echoed to the screen., $2 => 32 and $3 => 0

When I place the same in a configure macro as below, run my bootstrap script, and then excecute the resulting configure script ($boost_min_version == 1.32.0):

WANT_BOOST_MAJOR=`echo $boost_min_version | $AWK -F. '{print $1}'`

$1 => 1.320
$2 => 1.32.0
$3 => gives the below error:
awk: syntax error at source line 1
context is
       {print >>>  { <<<
awk: illegal statement at source line 1
awk: syntax error at source line 2

What have I missed when transfering a command from the comand line, into my configure scripts like this?

Many thanks

reply via email to

[Prev in Thread] Current Thread [Next in Thread]