Commit | Line | Data |
---|---|---|
805e021f CE |
1 | AC_DEFUN([OPENAFS_CTF_TOOLS_CHECKS],[ |
2 | ||
3 | CTF_DEFAULT_PATH="$PATH:/usr/bin:/opt/onbld/bin/$HOST_CPU" | |
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 | CC_WRAPPER= | |
29 | LD_WRAPPER= | |
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]) | |
35 | ||
36 | AC_ARG_VAR([CTFCONVERT], [Path to ctfconvert]) | |
37 | AC_ARG_VAR([CTFMERGE], [Path to ctfmerge]) | |
38 | ]) |