Opened 18 years ago

Last modified 15 years ago

#120 closed defect (fixed)

configure on solaris 2.7

Reported by: havard.tveite@… Owned by: strk@…
Priority: major Milestone:
Component: Build/Install Version: 2.2.3
Severity: Significant Keywords: imported, phpbugtracker
Cc:

Description (last modified by mloskot)

Using todays CVS snapshot, the following problems arise when running configure on my solaris 2.7 system:

./configure --help
./configure: syntax error at line 1622: `CAPI_VERSION_MAJOR=$' unexpected

If I remove:

$(($CAPI_INTERFACE_CURRENT-$CAPI_INTERFACE_AGE))

and replace it with either 1 (the difference), or

$CAPI_INTERFACE_CURRENT-$CAPI_INTERFACE_AGE

configure seems to work as expected.

I found that this problem also applies to version 2.2.3, but in 2.2.3 there was also another line with the same syntax that had to be fixed

Change History (9)

comment:1 by strk@…, 18 years ago

$var-$val would result in the "4-3" string with a bourne shell. Can you find another syntax for arithmetics ?
Could you try $((4-3)) just to test ?

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

OK.  I only found out that something was wrong, and reported it.  I have now found that the Solaris ksh has arithmetic expansion of the type used in configure ( "$(())" ), but Solaris sh does not have it .
I do not know the portable way to do arithetic in shell programming, but I have seen expr mentioned, so perhaps the following is more portable:
CAPI_VERSION_MAJOR=`(expr $CAPI_INTERFACE_CURRENT - $CAPI_INTERFACE_AGE)`

comment:3 by strk@…, 18 years ago

Does this work ?

a=4
b=3
c=`expr $a - $b`
echo $c

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

Yes,

CAPI_VERSION_MAJOR=`expr $CAPI_INTERFACE_CURRENT - $CAPI_INTERFACE_AGE`

also works.

comment:5 by strk@…, 18 years ago

Thank you, committed the patch in TRUNK. please confirm it works now.

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

It works now.

comment:7 by strk@…, 18 years ago

Resolution: nonefixed

comment:8 by mloskot, 16 years ago

Component: Build scriptsBuild/Install
Description: modified (diff)
Milestone: imported3.0.0
Priority: 1major
Version: 3.0.02.2.3

comment:9 by (none), 15 years ago

Milestone: 3.0.0

Milestone 3.0.0 deleted

Note: See TracTickets for help on using tickets.