Hi, autoconfers.  I've a question on how to use AC_CHECK_PROG.

The normal way would seem to be like so:

AC_CHECK_PROG(FOO, foo, foo, foo-fail)

And that would set @FOO@ to either `foo' or `foo-fail' depending on
$PATH.

Now let's assume that I know that the binary might also reside in some
other directory that might not be in the user's $PATH, presumably
because it's a common place or because of a `--with' option.  Then I
would try doing something like:

AC_CHECK_PROG(FOO, foo, foo, foo-fail, "$PATH:/magic/dir")

But that will probably fail at make-time since we did not record the
path to use for foo.

Doing it this way seems to work, but is somewhat less that perfect:

AC_CHECK_PROG(FOO, foo, $ac_dir/foo, foo-fail, "$PATH:/magic/dir")

So, what do people think.

- Should we add an extra argument that let's the user specify
additional directories?

And:

How should the setting of the variable be handled?

a) We should always add the directory
b) We should add a new version/variant/parameter to AC_CHECK_PROG for
setting the variable to the full path
c) It does not make sense.
d) some other way...

/assar

Reply via email to