Updated gnulib related files
[distributed.git] / tools / autotools / m4 / ax_path_missing.m4
blob7a0ab81438f4b66a2da1ecc1396811dd8d07ce34
1 # ===========================================================================
2 #            http://autoconf-archive.cryp.to/ax_path_missing.html
3 # ===========================================================================
5 # SYNOPSIS
7 #   AX_PATH_MISSING(VARIABLE, PROG-TO-CHECK-FOR, WARNING-IF-NOT-FOUND, PATH)
9 # DESCRIPTION
11 #   Check whether program PROG-TO-CHECK-FOR exists in path. If it is found,
12 #   set VARIABLE to the full path of PROG-TO-CHECK-FOR, otherwise warn using
13 #   the string WARNING-IF-NOT-FOUND and set VARIABLE to the full path of the
14 #   Automake missing script with PROG-TO-CHECK-FOR as the command to run.
16 #   A typical use is the following:
18 #     AX_PATH_MISSING([AUTOGEN],[autogen],[autogen seems missing ...])
20 #   This macro is the combination of AC_PATH_PROG and AX_MISSING_PROG. If
21 #   you do not want to run AC_PATH_PROG, simply use AX_MISSING_PROG or
22 #   AM_MISSING.
24 # LAST MODIFICATION
26 #   2008-04-12
28 # COPYLEFT
30 #   Copyright (c) 2008 Noah Slater <nslater@bytesexual.org>
31 #   Copyright (c) 2008 Francesco Salvestrini <salvestrini@sourceforge.net>
33 #   Copying and distribution of this file, with or without modification, are
34 #   permitted in any medium without royalty provided the copyright notice
35 #   and this notice are preserved.
37 AC_DEFUN([AX_PATH_MISSING], [
38     AC_PATH_PROG([$1],[$2],[$4])
39     AS_IF([ test -z "${$1}" ],[
40         unset $1
41         AX_MISSING_PROG([$1],[$2],[$3])
42     ])