3 dnl Copyright (C) 2002 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; version 2 of the License.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 dnl Usage: ENSC_SET_SEARCHPATH(<PATH>)
19 AC_DEFUN([ENSC_SET_SEARCHPATH],
24 dnl Usage: ENSC_PATHPROG_INIT
25 AC_DEFUN([ENSC_PATHPROG_INIT],
28 AC_SUBST([ENSC_PATHPROG_SED])
32 dnl Usage: ENSC_PATHPROG(<VAR>, <PROG>[, <DFLT>, <DESCR>])
33 AC_DEFUN([ENSC_PATHPROG],
35 AC_REQUIRE([ENSC_SET_SEARCHPATH])
36 AC_REQUIRE([ENSC_PATHPROG_INIT])
50 AC_PATH_PROGS($1, [$2], [$ensc_dflt], [$ensc_searchpath])
52 if test -z "${$1}" && $rq; then
54 AC_MSG_ERROR([Can not find the '$2' tool within '${ensc_searchpath:-$PATH}'.])
57 Can not find the '$2' tool within '${ensc_searchpath:-$PATH}'.
62 test "${$1}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'$1'@!${$1}!g;"
68 dnl Usage: ENSC_PATHPROG_STANDARD_TOOLS)
69 AC_DEFUN([ENSC_PATHPROG_STANDARD_TOOLS],
71 ENSC_PATHPROG(AWK, awk)
72 ENSC_PATHPROG(CAT, cat)
73 ENSC_PATHPROG(CHOWN, chown)
74 ENSC_PATHPROG(CMP, cmp)
76 ENSC_PATHPROG(DIRNAME, dirname)
77 ENSC_PATHPROG(EGREP, egrep)
78 env_old_searchpath="${ensc_searchpath}"
79 ensc_searchpath="/bin:${ensc_searchpath:-$PATH}"
80 ENSC_PATHPROG(ENV, env)
81 ensc_searchpath="${env_old_searchpath}"
82 ENSC_PATHPROG(GREP, grep)
84 ENSC_PATHPROG(MKDIR, mkdir)
85 ENSC_PATHPROG(MKFIFO, mkfifo)
86 ENSC_PATHPROG(MKTEMP, mktemp)
87 ENSC_PATHPROG(MOUNT, mount)
89 ENSC_PATHPROG(NICE, nice)
92 ENSC_PATHPROG(RMDIR, rmdir)
93 ENSC_PATHPROG(SED, sed)
95 ENSC_PATHPROG(TAC, tac)
96 ENSC_PATHPROG(TAR, tar)
97 ENSC_PATHPROG(TOUCH, touch)
98 ENSC_PATHPROG(TTY, tty)
99 ENSC_PATHPROG(UMOUNT, umount)
100 ENSC_PATHPROG(WC, wc)