Re: little anoyance with configure

Lists: pgsql-hackers
From: ohp(at)pyrenet(dot)fr
To: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: little anoyance with configure
Date: 2006-11-30 12:37:00
Message-ID: Pine.UW2.4.53.0611301332440.11426@sun.pyrenet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

I'm sorry I write so late with final aproaching with all beta and rc
versions of 8.2 I have those (apparently harmless) warnings at configure
time.

Maybe a configure guru could have a quick look.

UX:tr: ERROR: Incorrect usage
UX:tr: TO FIX: Usage:
tr [-cs] string1 string2
tr -s[-c] string1
tr -d[-c] string1
tr -ds[-c] string1 string2
configure: WARNING: option ignored: --
UX:tr: ERROR: Incorrect usage
UX:tr: TO FIX: Usage:
tr [-cs] string1 string2
tr -s[-c] string1
tr -d[-c] string1
tr -ds[-c] string1 string2
configure: WARNING: option ignored: --
UX:tr: ERROR: Incorrect usage
UX:tr: TO FIX: Usage:
tr [-cs] string1 string2
tr -s[-c] string1
tr -d[-c] string1
tr -ds[-c] string1 string2
configure: WARNING: option ignored: --
UX:tr: ERROR: Incorrect usage
UX:tr: TO FIX: Usage:
tr [-cs] string1 string2
tr -s[-c] string1
tr -d[-c] string1
tr -ds[-c] string1 string2
configure: WARNING: option ignored: --
UX:tr: ERROR: Incorrect usage
UX:tr: TO FIX: Usage:
tr [-cs] string1 string2
tr -s[-c] string1
tr -d[-c] string1
tr -ds[-c] string1 string2
configure: WARNING: option ignored: --
UX:tr: ERROR: Incorrect usage
UX:tr: TO FIX: Usage:
tr [-cs] string1 string2
tr -s[-c] string1
tr -d[-c] string1
tr -ds[-c] string1 string2
configure: WARNING: option ignored: --

This is on unixware 714.

TIA
--
Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
15, Chemin des Monges +33-5-61-50-97-01 (Fax)
31190 AUTERIVE +33-6-07-63-80-64 (GSM)
FRANCE Email: ohp(at)pyrenet(dot)fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org, ohp(at)pyrenet(dot)fr
Subject: Re: little anoyance with configure
Date: 2006-11-30 13:43:24
Message-ID: 200611301443.25051.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

ohp(at)pyrenet(dot)fr wrote:
> UX:tr: ERROR: Incorrect usage
> UX:tr: TO FIX: Usage:
> tr [-cs] string1 string2
> tr -s[-c] string1
> tr -d[-c] string1
> tr -ds[-c] string1 string2
> configure: WARNING: option ignored: --

That would appear to be this call:

pgac_txt=`echo $pgac_var | tr '_' '-'`

(four lines from the bottom of configure) But I don't see how this
contradicts the correct usage synopses offered by the error output.

Second thought ... it's interpreting the '-' as an option? Does this
work:

... | tr 'a_b' 'a-b'

?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: ohp(at)pyrenet(dot)fr
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: little anoyance with configure
Date: 2006-11-30 18:33:06
Message-ID: Pine.UW2.4.53.0611301932460.15433@sun.pyrenet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, 30 Nov 2006, Peter Eisentraut wrote:

> Date: Thu, 30 Nov 2006 14:43:24 +0100
> From: Peter Eisentraut <peter_e(at)gmx(dot)net>
> To: pgsql-hackers(at)postgresql(dot)org, ohp(at)pyrenet(dot)fr
> Subject: Re: [HACKERS] little anoyance with configure
>
> ohp(at)pyrenet(dot)fr wrote:
> > UX:tr: ERROR: Incorrect usage
> > UX:tr: TO FIX: Usage:
> > tr [-cs] string1 string2
> > tr -s[-c] string1
> > tr -d[-c] string1
> > tr -ds[-c] string1 string2
> > configure: WARNING: option ignored: --
>
> That would appear to be this call:
>
> pgac_txt=`echo $pgac_var | tr '_' '-'`
>
> (four lines from the bottom of configure) But I don't see how this
> contradicts the correct usage synopses offered by the error output.
>
> Second thought ... it's interpreting the '-' as an option? Does this
> work:
>
> ... | tr 'a_b' 'a-b'
>
> ?
>
>
YES!
--
Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
15, Chemin des Monges +33-5-61-50-97-01 (Fax)
31190 AUTERIVE +33-6-07-63-80-64 (GSM)
FRANCE Email: ohp(at)pyrenet(dot)fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ohp(at)pyrenet(dot)fr
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: little anoyance with configure
Date: 2006-11-30 21:44:46
Message-ID: 922.1164923086@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

ohp(at)pyrenet(dot)fr writes:
> On Thu, 30 Nov 2006, Peter Eisentraut wrote:
>> Second thought ... it's interpreting the '-' as an option? Does this
>> work:
>> ... | tr 'a_b' 'a-b'

> YES!

Patch applied per Peter's suggestion.

regards, tom lane


From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ohp(at)pyrenet(dot)fr, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: little anoyance with configure
Date: 2006-11-30 21:54:28
Message-ID: 20061130215428.GE21407@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Nov 30, 2006 at 04:44:46PM -0500, Tom Lane wrote:
> ohp(at)pyrenet(dot)fr writes:
> > On Thu, 30 Nov 2006, Peter Eisentraut wrote:
> >> Second thought ... it's interpreting the '-' as an option? Does this
> >> work:
> >> ... | tr 'a_b' 'a-b'
>
> > YES!
>
> Patch applied per Peter's suggestion.

Doesn't that do something entirely different? The original purpose was
to convert underscores to hyphens, but it's doing something else
entirely.

$ echo test_string | tr 'a_b' 'a-b'
testbstring

On my system I need to at least escape the hyphen again:

$ echo test_string | tr 'a_b' 'a\-b'
test-string

Character classes didn't do it for me: [_] -> [-]

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, ohp(at)pyrenet(dot)fr, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: little anoyance with configure
Date: 2006-11-30 22:10:04
Message-ID: 456F56BC.3@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Martijn van Oosterhout wrote:
> On Thu, Nov 30, 2006 at 04:44:46PM -0500, Tom Lane wrote:
>
>> ohp(at)pyrenet(dot)fr writes:
>>
>>> On Thu, 30 Nov 2006, Peter Eisentraut wrote:
>>>
>>>> Second thought ... it's interpreting the '-' as an option? Does this
>>>> work:
>>>> ... | tr 'a_b' 'a-b'
>>>>
>>> YES!
>>>
>> Patch applied per Peter's suggestion.
>>
>
> Doesn't that do something entirely different? The original purpose was
> to convert underscores to hyphens, but it's doing something else
> entirely.
>
> $ echo test_string | tr 'a_b' 'a-b'
> testbstring
>
> On my system I need to at least escape the hyphen again:
>
> $ echo test_string | tr 'a_b' 'a\-b'
> test-string
>
> Character classes didn't do it for me: [_] -> [-]
>
> Have a nice day,
>

Would not this be a simple solution? And configure is already littered
with uses of sed.

sed 's/_/-/g'

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: ohp(at)pyrenet(dot)fr, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: little anoyance with configure
Date: 2006-11-30 22:11:54
Message-ID: 1229.1164924714@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> On my system I need to at least escape the hyphen again:

> $ echo test_string | tr 'a_b' 'a\-b'
> test-string

Hm. How about
tr 'x_' 'x-'

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, ohp(at)pyrenet(dot)fr, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: little anoyance with configure
Date: 2006-11-30 22:14:07
Message-ID: 1281.1164924847@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Would not this be a simple solution? And configure is already littered
> with uses of sed.

Good idea --- that's actually the only use of tr in the whole script,
so using sed gets rid of a dependency. (I wonder if the autoconf boys
deliberately avoid tr because they know about portability issues...)

regards, tom lane