Merge branch 'master' of ctdb into 'master' of samba
[sfrench/samba-autobuild/.git] / docs-xml / aclocal.m4
1 dnl (C) 2003-2004 Jelmer Vernooij <jelmer@samba.org>
2 dnl Published under the GNU GPL
3 dnl
4 dnl DOCS_DEFINE_TARGET
5 dnl arg1: Target that is defined
6 dnl arg2: Requirement
7 dnl arg3: Official name
8 dnl arg4: Makefile target name
9
10 AC_DEFUN(DOCS_DEFINE_TARGET, [
11         if test "x$$1_REQUIRES" = x; then
12                 $1_REQUIRES="$$2_REQUIRES"
13         else
14                 $1_REQUIRES="$$1_REQUIRES $$2_REQUIRES"
15         fi
16
17         if test x"$$1_REQUIRES" = x; then
18                 TARGETS="$TARGETS $4"
19         else
20                 AC_MSG_RESULT([Building the $3 requires : $$1_REQUIRES])
21         fi
22 ])
23
24 dnl DOCS_TARGET_REQUIRE_PROGRAM
25 dnl arg1: program variable
26 dnl arg2: program executable name
27 dnl arg3: target that requires it
28
29 AC_DEFUN(DOCS_TARGET_REQUIRE_PROGRAM, [
30         AC_CHECK_PROGS([$1], [$2])
31         if test x"$$1" = x; then
32                 if test x"$$3_REQUIRES" = x; then
33                         $3_REQUIRES="$2"
34                 else
35                         $3_REQUIRES="$$3_REQUIRES $2"
36                 fi
37         fi
38 ])