Opened 9 years ago

Closed 9 years ago

#5865 closed defect (fixed)

[PATCH] Remove bashism introduced into configure by changeset 28265

Reported by: tvrusso Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

The commit in changeset 28265 introduced a bash-specific construct into configure.in that breaks it on operating systems where "/bin/sh" is the Bourne shell, not Bash (FreeBSD is such an example).

The specific problematic construct is:

   ecw_license_types=( "Desktop_Read-Write" "Server_Read-Only_EndUser" "Server_Read-Only" "Server_Read-Write" "Desktop_Read-Only"   )
    for ecw_license_type in ${ecw_license_types@<:@@@:>@};

This the assignment of a list to a shell variable is not accepted in the Bourne shell, and causes the error message:

./configure: 22882: Syntax error: word unexpected (expecting ")")

Specifying the list directly on the "for" line fixes the incompatibility, rendering configure portable to systems where /bin/sh is not an alias for bash.

for ecw_license_type in "Desktop_Read-Write" "Server_Read-Only_EndUser" "Server_Read-Only" "Server_Read-Write" "Desktop_Read-Only"

Attachments (1)

gdalpatch_configure (1.5 KB ) - added by tvrusso 9 years ago.
Patch to remove bashism from configure.

Download all attachments as: .zip

Change History (3)

by tvrusso, 9 years ago

Attachment: gdalpatch_configure added

Patch to remove bashism from configure.

comment:1 by Jukka Rahkonen, 9 years ago

Summary: Bashism introduced into configure by changeset 28265[PATCH] Remove bashism introduced into configure by changeset 28265

comment:2 by Even Rouault, 9 years ago

Resolution: fixed
Status: newclosed

trunk r28592 "configure: remove bashism (trunk only, patch by tvrusso, #5865)"

Note: See TracTickets for help on using tickets.