Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-28 Thread Blue Swirl
On Thu, Jan 28, 2010 at 8:33 PM, Loïc Minier wrote: > On Wed, Jan 27, 2010, Blue Swirl wrote: >> That must've been it. But I get this on Milax: > >  I didn't know about MilaX; I had a hard time getting gcc/binutils (or >  event git) to work along with working headers or base libs such as >  zlib.h

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-28 Thread Loïc Minier
On Wed, Jan 27, 2010, Blue Swirl wrote: > That must've been it. But I get this on Milax: I didn't know about MilaX; I had a hard time getting gcc/binutils (or event git) to work along with working headers or base libs such as zlib.h or unistd.h. Do you have any instructions on how to get these

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-27 Thread Blue Swirl
On Wed, Jan 27, 2010 at 12:41 PM, Loïc Minier wrote: > On Tue, Jan 26, 2010, Blue Swirl wrote: >> The patches didn't apply. Also please send only one patch per message, >> git am can't handle multiple patches. > >  They applied fine here, perhaps you didn't apply the sdl-config patch >  first?  I

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-27 Thread Loïc Minier
On Tue, Jan 26, 2010, Blue Swirl wrote: > The patches didn't apply. Also please send only one patch per message, > git am can't handle multiple patches. They applied fine here, perhaps you didn't apply the sdl-config patch first? I rebased them and resent them. -- Loïc Minier

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-26 Thread Blue Swirl
On Tue, Jan 26, 2010 at 6:47 PM, Loïc Minier wrote: > On Thu, Jan 21, 2010, Måns Rullgård wrote: >> I think that entire test is wrong, in fact.  It is perfectly possible >> for someone on Solaris to install a working "install" command in >> /usr/bin.  It is better, if possible, to test whatever "i

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-26 Thread Loïc Minier
On Thu, Jan 21, 2010, Måns Rullgård wrote: > I think that entire test is wrong, in fact. It is perfectly possible > for someone on Solaris to install a working "install" command in > /usr/bin. It is better, if possible, to test whatever "install" > command is in the path, and complain only if it

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-21 Thread Paolo Bonzini
On 01/21/2010 05:53 PM, Jamie Lokier wrote: > If you make that IFS=${local_ifs:-$(printf ' \t\n')} it should be safe. > Likewise if you set the value first. Remove the colon. The above will wrongly change empty IFS, which is not the same as unset IFS. local_ifs would never be unset anyway,

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-21 Thread Jamie Lokier
Måns Rullgård wrote: > If IFS is not set, the shell shall behave as if the value of IFS is > , , and > > If you make that IFS=${local_ifs:-$(printf ' \t\n')} it should be safe. > Likewise if you set the value first. Remove the colon. The above will wrongly change empty IFS, which is not the

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-21 Thread Måns Rullgård
Juan Quintela writes: > Loïc Minier wrote: >> On Wed, Jan 20, 2010, Måns Rullgård wrote: >>> If you make that IFS=${local_ifs:-$(printf ' \t\n')} it should be safe. >>> Likewise if you set the value first. >> >> Ok; see attached patches > > I still think that path_of is a complication that we d

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-21 Thread Juan Quintela
Loïc Minier wrote: > On Wed, Jan 20, 2010, Måns Rullgård wrote: >> If you make that IFS=${local_ifs:-$(printf ' \t\n')} it should be safe. >> Likewise if you set the value first. > > Ok; see attached patches I still think that path_of is a complication that we don't really need. "type" command

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-21 Thread Loïc Minier
On Wed, Jan 20, 2010, Måns Rullgård wrote: > If you make that IFS=${local_ifs:-$(printf ' \t\n')} it should be safe. > Likewise if you set the value first. Ok; see attached patches -- Loïc Minier >From cccdcaeacc2214390c0c6c198ed875ac59d10669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=2

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Måns Rullgård
Loïc Minier writes: > On Wed, Jan 20, 2010, Paolo Bonzini wrote: >> > Are you saying that I can't backup/restore IFS without setting it >> > first? >> Yes, it affects the behavior of read for example: >> $ echo a b c | (read a b c; echo $a; echo $b; echo $c) >> a >> b >> c >> $ IFS= >> $ echo a

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Loïc Minier
On Wed, Jan 20, 2010, Paolo Bonzini wrote: > > Are you saying that I can't backup/restore IFS without setting it > > first? > Yes, it affects the behavior of read for example: > $ echo a b c | (read a b c; echo $a; echo $b; echo $c) > a > b > c > $ IFS= > $ echo a b c | (read a b c; echo $a; echo

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Paolo Bonzini
On 01/20/2010 02:49 PM, Loïc Minier wrote: On Wed, Jan 20, 2010, Paolo Bonzini wrote: On 01/20/2010 12:37 PM, Loïc Minier wrote: +# not found +IFS="$local_ifs" If you do this, you should set IFS to space-tab-lf at the beginning of the script, like this: IFS=" "" "" " Are you sayin

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Loïc Minier
On Wed, Jan 20, 2010, Loïc Minier wrote: > I'm attaching a new patch which changes the tests a bit; I would prefer > if someone with access to a Solaris build environment would do this > though. Sorry, there was a typo in the new patch, a test was reversed; updated patch attached. -- Loïc M

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Loïc Minier
On Wed, Jan 20, 2010, Juan Quintela wrote: > +prog_exist() { > +prog="$1" > +type $1 > /dev/null 2> /dev/null > +} You set prog but you use $1; also, it seems vars in functions should be prefixed with local_ in qemu's ./configure. I was told not to use a local var here though. > - if

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Loïc Minier
On Wed, Jan 20, 2010, Paolo Bonzini wrote: > On 01/20/2010 12:37 PM, Loïc Minier wrote: > >+# not found > >+IFS="$local_ifs" > If you do this, you should set IFS to space-tab-lf at the beginning of > the script, like this: > > IFS=" "" "" > " Are you saying that I can't backup/rest

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Paolo Bonzini
On 01/20/2010 01:49 PM, Juan Quintela wrote: + if prog_exist "awk" -a \ + prog_exist "grep"; then + if prog_exist "texi2html" -a \ + prog_exist "pod2man" ; then -a is wrong here. BTW, it's evil for test too because its precedence rules WRT ! and -f/-n/-z/-x/etc. are broke

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Juan Quintela
Loïc Minier wrote: > On Tue, Jan 19, 2010, Måns Rullgård wrote: > [...] >> Why the extra variable? Using $1 directly seems just as obvious to me. > [...] > > I'm attaching an updated patch which doesn't use this variable. Should > be applied after the sdl-config patch. > >> Is the full path of

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Paolo Bonzini
On 01/20/2010 12:37 PM, Loïc Minier wrote: +# not found +IFS="$local_ifs" If you do this, you should set IFS to space-tab-lf at the beginning of the script, like this: IFS=" "" "" " or this (better because it does not rely on embedding whitespace characters within the line): IFS=

Re: [Qemu-devel] Re: Stop using "which" in ./configure

2010-01-20 Thread Loïc Minier
On Tue, Jan 19, 2010, Måns Rullgård wrote: [...] > Why the extra variable? Using $1 directly seems just as obvious to me. [...] I'm attaching an updated patch which doesn't use this variable. Should be applied after the sdl-config patch. > Is the full path of these tools really important? Do

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-19 Thread Måns Rullgård
Loïc Minier writes: > On Tue, Jan 19, 2010, Loïc Minier wrote: >> Following the thread on the sdl-config patch, please find attached a >> patch to add a couple of portable shell functions which allow testing >> whehter a command/builtin is available and to find the full pathname of >> an exec

[Qemu-devel] Re: Stop using "which" in ./configure

2010-01-19 Thread Måns Rullgård
Laurent Vivier writes: >>Hi >> >> Following the thread on the sdl-config patch, please find attached a >> patch to add a couple of portable shell functions which allow testing >> whehter a command/builtin is available and to find the full pathname of >> an executable in the PATH. This al