1 AC_DEFUN([OPENAFS_CTF_TOOLS_CHECKS],[
3 CTF_DEFAULT_PATH="$PATH:/usr/bin:/opt/onbld/bin/$(uname -p)"
5 AC_ARG_WITH([ctf-tools],
6 AS_HELP_STRING([--with-ctf-tools@<:@=DIR@:>@],
7 [Location of the CTF tools]),
8 [CTF_TOOLS="$withval"],
12 [check], [AC_PATH_PROG([CTFCONVERT], [ctfconvert], [], [$CTF_DEFAULT_PATH])
13 AC_PATH_PROG([CTFMERGE], [ctfmerge], [], [$CTF_DEFAULT_PATH])],
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")])],
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")])]
30 AS_IF([test x"$CTFCONVERT" != x && test x"$CTFMERGE" != x],
31 [CC_WRAPPER="$TOP_SRCDIR/config/cc-wrapper cc"
32 LD_WRAPPER="$TOP_SRCDIR/config/cc-wrapper ld"])
33 AC_SUBST([CC_WRAPPER])
34 AC_SUBST([LD_WRAPPER])
36 AC_ARG_VAR([CTFCONVERT], [Path to ctfconvert])
37 AC_ARG_VAR([CTFMERGE], [Path to ctfmerge])