[PATCH wayland 2/2] wayland-egl: Make symbol test fail on failure

Simon McVittie smcv at collabora.com
Mon Mar 19 14:15:12 UTC 2018


On Mon, 19 Mar 2018 at 13:39:30 +0000, Daniel Stone wrote:
> On 19 March 2018 at 13:27, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> >> I'd not realised AC_PROG_NM didn't set a full path. Brilliant. Maybe
> >> replace test -x "$NM" with $NM -V >/dev/null 2>&1? Or just trusting it
> >> works if it's non-empty is fine too.
> >>
> > I'd go with non-empty - everything else seems like an overkill.

If you ever want the more full version for something else, I think

    command -v "$command" >/dev/null

is the canonical way to ask a POSIX shell "could I invoke $command?".
It exits successfully if $command is a function, an alias, a shell
built-in, the basename of an executable in $PATH, an executable found
by relative or absolute path, an alias or a shell reserved word.

    smcv


More information about the wayland-devel mailing list