Opened 7 years ago

Closed 7 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 7 years ago.
Patch to remove bashism from configure.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by tvrusso

Attachment: gdalpatch_configure added

Patch to remove bashism from configure.

comment:1 Changed 7 years ago by Jukka Rahkonen

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

comment:2 Changed 7 years ago by Even Rouault

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.