341021449bdeb916b6e2d6503c00f13683297408
[openafs.git] / src / cf / ctf-tools.m4
1 AC_DEFUN([OPENAFS_CTF_TOOLS_CHECKS],[
2
3 CTF_DEFAULT_PATH="$PATH:/usr/bin:/opt/onbld/bin/$(uname -p)"
4
5 AC_ARG_WITH([ctf-tools],
6         AS_HELP_STRING([--with-ctf-tools@<:@=DIR@:>@],
7         [Location of the CTF tools]),
8         [CTF_TOOLS="$withval"],
9         [CTF_TOOLS="check"])
10
11 AS_CASE([$CTF_TOOLS],
12         [check], [AC_PATH_PROG([CTFCONVERT], [ctfconvert], [], [$CTF_DEFAULT_PATH])
13                   AC_PATH_PROG([CTFMERGE], [ctfmerge], [], [$CTF_DEFAULT_PATH])],
14
15         [yes],   [AC_PATH_PROG([CTFCONVERT], [ctfconvert], [], [$CTF_DEFAULT_PATH])
16                   AC_PATH_PROG([CTFMERGE], [ctfmerge], [], [$CTF_DEFAULT_PATH])
17                   AS_IF([test "x$CTFCONVERT" = "x"], [AC_MSG_ERROR("ctfconvert not found")])
18                   AS_IF([test "x$CTFMERGE" = "x"], [AC_MSG_ERROR("ctfmerge not found")])],
19
20         [no],    [],
21
22         [AC_PATH_PROG([CTFCONVERT], [ctfconvert], [], [$CTF_TOOLS])
23          AC_PATH_PROG([CTFMERGE], [ctfmerge], [], [$CTF_TOOLS])
24          AS_IF([test "x$CTFCONVERT" = "x"], [AC_MSG_ERROR("ctfconvert not found")])
25          AS_IF([test "x$CTFMERGE" = "x"], [AC_MSG_ERROR("ctfmerge not found")])]
26 )
27
28 AC_ARG_VAR([CTFCONVERT], [Path to ctfconvert])
29 AC_ARG_VAR([CTFMERGE], [Path to ctfmerge])
30 ])