Opened 19 years ago

Last modified 18 years ago

#1226 new defect

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

Reported by: havard.tveite@… Owned by: mapserverbugs
Priority: lowest Milestone:
Component: Build Problems Version: 4.5
Severity: trivial Keywords:
Cc:

Description

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)

Attachments (1)

solaris-awk.diff (845 bytes ) - added by pere@… 19 years ago.
Patch to get configure to work on Solaris awk

Download all attachments as: .zip

Change History (3)

by pere@…, 19 years ago

Attachment: solaris-awk.diff added

Patch to get configure to work on Solaris awk

comment:1 by pere@…, 19 years ago

Summary: configure awk syntax - httpd version detection (Solaris 2.7)[PATCH] configure awk syntax - httpd version detection (Solaris 2.7)

comment:2 by havard.tveite@…, 18 years ago

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.
Note: See TracTickets for help on using tickets.