[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Locating a program in a portable way
From: |
Paul Eggert |
Subject: |
Re: Locating a program in a portable way |
Date: |
07 Sep 2003 17:15:03 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
address@hidden 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