[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_PATH_PROGS_FEATURE_CHECK results in namespace invasion
From: |
Russ Allbery |
Subject: |
Re: AC_PATH_PROGS_FEATURE_CHECK results in namespace invasion |
Date: |
Wed, 26 Feb 2014 16:20:00 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
Peter Rosin <address@hidden> writes:
> It's not possible to use AC_PATH_PROGS_FEATURE_CHECK with a cache
> variable that does not start with ac_cv_path_ which is bad since one
> project might check for a certain capability of tool foo, while some
> other project is interested in some completely orthogonal capability of
> that same tool foo. As written, it is very likely that both projects
> will use the cache variable ac_cv_path_FOO for orthogonal purposes,
> which is bad by design.
Wouldn't you name the variable FOO_FEATURE? In other words, I think the
example in the Autoconf manual is not the best, but the functionality you
need is there. I would rewrite the example as:
AC_CACHE_CHECK([for m4 that supports indir], [ac_cv_path_M4_indir],
[AC_PATH_PROGS_FEATURE_CHECK([M4_indir], [m4 gm4],
...
AC_SUBST([M4], [$ac_cv_path_M4_indir])
--
Russ Allbery (address@hidden) <http://www.eyrie.org/~eagle/>