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 test "$solinst" = "/usr/sbin/install" ; then > + if type install2 2> /dev/null | grep /usr/bin/install >/dev/null ; then install2? > + if prog_exist "awk" -a \ > + prog_exist "grep"; then already pointed out, but -a is a feature of "test" and incorrect here; you want && > - if test -x "`which texi2html 2>/dev/null`" -a \ > - -x "`which pod2man 2>/dev/null`" ; then > + if prog_exist "texi2html" -a \ > + prog_exist "pod2man" ; then ditto Perhaps we should avoid work duplication though? -- Loïc Minier