MapServer / MapServer-import

3 stars 2 forks source link

[PATCH] configure awk syntax - httpd version detection (Solaris 2.7) #1226

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: havard.tveite@umb.no Date: 2005/02/10 - 10:16

The configure line:

APACHE_VERSION=`echo "$HTTPD_VERSION_STRING" | grep Apache | awk -F / '{
print $2}' | awk -F . '{print $1*1000000 + $2*1000 + $3}'`

causes Solaris 2.7 awk to respond with errors:

awk: syntax error near line 1
awk: bailing out near line 1
awk: syntax error near line 1
awk: bailing out near line 1

Solaris awk does not like the space between -F and the character.
The following awk syntax seems to work with Solaris awk:

APACHE_VERSION=`echo "$HTTPD_VERSION_STRING" | grep Apache | awk -F/ '{
print $2}' | awk -F. '{print $1*1000000 + $2*1000 + $3}'`

(it also works with my Debian 3 - mawk 1.3.3)
tbonfort commented 12 years ago

Author: havard.tveite@umb.no Date: 2006/03/23 - 10:04

I have tried to search for "awk -F" in the configure files I have on my system,
and have only found the version without the space used.  "awk -F" is not used a
lot, but in php 4.3.6 configure, "awk -F:" is used, and in gcc 2.95.3/libobjc
configure, "awk -F=" is used.

Solaris nawk supports -F with a space between the F and the character defining
the field separator.

I would suggest that Petter Reinholdtsen's patch is applied, so that this bug
can be marked as fixed.