Fix typo.
[Samba.git] / docs / aclocal.m4
blob073d2aafd229f0df9d46c3eba0536ce4c0e90388
1 dnl DOCS_DEFINE_TARGET
2 dnl arg1: Target that is defined
3 dnl arg2: Requirement
4 dnl arg3: Official name
5 dnl arg4: Makefile target name
7 AC_DEFUN(DOCS_DEFINE_TARGET, [
8         if test "x$$1_REQUIRES" = x; then
9                 $1_REQUIRES="$$2_REQUIRES"
10         else
11                 $1_REQUIRES="$$1_REQUIRES $$2_REQUIRES"
12         fi
14         if test x"$$1_REQUIRES" = x; then
15                 TARGETS="$TARGETS $4"
16         else
17                 AC_MSG_RESULT([Building the $3 requires : $$1_REQUIRES])
18         fi
21 dnl DOCS_TARGET_REQUIRE_PROGRAM
22 dnl arg1: program variable
23 dnl arg2: program executable name
24 dnl arg3: target that requires it
26 AC_DEFUN(DOCS_TARGET_REQUIRE_PROGRAM, [
27         AC_PATH_PROG([$1], [$2])
28         if test x"$$1" = x; then
29                 if test x"$$3_REQUIRES" = x; then
30                         $3_REQUIRES="$2"
31                 else
32                         $3_REQUIRES="$$3_REQUIRES $2"
33                 fi
34         fi
37 dnl DOCS_TARGET_REQUIRE_DIR
38 dnl arg1: list of possible paths
39 dnl arg2: file in dir know to exist
40 dnl arg3: variable to store found path in
41 dnl arg4: target that requires it
43 AC_DEFUN(DOCS_TARGET_REQUIRE_DIR, [
44         AC_SUBST($3)
45         for I in $1; 
46         do 
47                 test -f "$I/$2" && $3="$I"
48         done
50         if test x$$3 = x; then
51                 if test x"$$4_REQUIRES" = x; then
52                         $4_REQUIRES="$3"
53                 else
54                         $4_REQUIRES="$$4_REQUIRES $3"
55                 fi
56         fi