Opened 19 years ago
Last modified 18 years ago
#1226 new defect
[PATCH] configure awk syntax - httpd version detection (Solaris 2.7)
Reported by: | 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)
Change History (3)
by , 19 years ago
Attachment: | solaris-awk.diff added |
---|
comment:1 by , 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 , 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.
Patch to get configure to work on Solaris awk