(autocf21.info.gz) Generic Programs
Info Catalog
(autocf21.info.gz) Particular Programs
(autocf21.info.gz) Alternative Programs
4.1.2 Generic Program and File Checks
-------------------------------------
These macros are used to find programs not covered by the particular
test macros. If you need to check the behavior of a program as well as
find out whether it is present, you have to write your own test for it
( Writing Tests). By default, these macros use the environment
variable `PATH'. If you need to check for a program that might not be
in the user's `PATH', you can pass a modified path to use instead, like
this:
AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd,
$PATH:/usr/libexec:/usr/sbin:/usr/etc:etc)
-- Macro: AC_CHECK_FILE (FILE [, ACTION-IF-FOUND [,
ACTION-IF-NOT-FOUND]])
Check whether file FILE exists on the native system. If it is
found, execute ACTION-IF-FOUND, otherwise do ACTION-IF-NOT-FOUND,
if given.
-- Macro: AC_CHECK_FILES (FILES[, ACTION-IF-FOUND [,
ACTION-IF-NOT-FOUND]])
Executes `AC_CHECK_FILE' once for each file listed in FILES.
Additionally, defines `HAVEFILE' for each file found, set to 1.
-- Macro: AC_CHECK_PROG (VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
[, VALUE-IF-NOT-FOUND [, PATH, [ REJECT ]]])
Check whether program PROG-TO-CHECK-FOR exists in `PATH'. If it
is found, set VARIABLE to VALUE-IF-FOUND, otherwise to
VALUE-IF-NOT-FOUND, if given. Always pass over REJECT (an
absolute file name) even if it is the first found in the search
path; in that case, set VARIABLE using the absolute file name of
the PROG-TO-CHECK-FOR found that is not REJECT. If VARIABLE was
already set, do nothing. Calls `AC_SUBST' for VARIABLE.
-- Macro: AC_CHECK_PROGS (VARIABLE, PROGS-TO-CHECK-FOR [,
VALUE-IF-NOT-FOUND [, PATH]])
Check for each program in the whitespace-separated list
PROGS-TO-CHECK-FOR exists in `PATH'. If it is found, set VARIABLE
to the name of that program. Otherwise, continue checking the
next program in the list. If none of the programs in the list are
found, set VARIABLE to VALUE-IF-NOT-FOUND; if VALUE-IF-NOT-FOUND
is not specified, the value of VARIABLE is not changed. Calls
`AC_SUBST' for VARIABLE.
-- Macro: AC_CHECK_TOOL (VARIABLE, PROG-TO-CHECK-FOR [,
VALUE-IF-NOT-FOUND [, PATH]])
Like `AC_CHECK_PROG', but first looks for PROG-TO-CHECK-FOR with a
prefix of the host type as determined by `AC_CANONICAL_HOST',
followed by a dash ( Canonicalizing). For example, if the
user runs `configure --host=i386-gnu', then this call:
AC_CHECK_TOOL(RANLIB, ranlib, :)
sets `RANLIB' to `i386-gnu-ranlib' if that program exists in
`PATH', or to `ranlib' if that program exists in `PATH', or to `:'
if neither program exists.
-- Macro: AC_PATH_PROG (VARIABLE, PROG-TO-CHECK-FOR [,
VALUE-IF-NOT-FOUND [, PATH]])
Like `AC_CHECK_PROG', but set VARIABLE to the entire path of
PROG-TO-CHECK-FOR if found.
-- Macro: AC_PATH_PROGS (VARIABLE, PROGS-TO-CHECK-FOR [,
VALUE-IF-NOT-FOUND [, PATH]])
Like `AC_CHECK_PROGS', but if any of PROGS-TO-CHECK-FOR are found,
set VARIABLE to the entire path of the program found.
Info Catalog
(autocf21.info.gz) Particular Programs
(autocf21.info.gz) Alternative Programs
automatically generated byinfo2html