Re: Locating a program in a portable way

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



moseley@xxxxxxxx writes:

> So the current plan is to read $PATH, prepend (or append) our 
> $libexecdir to the path, and then walk the path looking for the program.  
> 
> The problem is how to do it in a portable way.

Yes, it's a bit tricky, but gnulib's findprog module does that.

See <http://savannah.gnu.org/projects/gnulib>, and grab the following files:

modules/findprog
lib/findprog.h
lib/findprog.c
m4/findprog.m4
m4/eaccess.m4



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux