1 dnl (C) 2003-2004 Jelmer Vernooij <jelmer@samba.org>
2 dnl Published under the GNU GPL
5 dnl arg1: Target that is defined
7 dnl arg3: Official name
8 dnl arg4: Makefile target name
10 AC_DEFUN(DOCS_DEFINE_TARGET, [
11 if test "x$$1_REQUIRES" = x; then
12 $1_REQUIRES="$$2_REQUIRES"
14 $1_REQUIRES="$$1_REQUIRES $$2_REQUIRES"
17 if test x"$$1_REQUIRES" = x; then
20 AC_MSG_RESULT([Building the $3 requires : $$1_REQUIRES])
24 dnl DOCS_TARGET_REQUIRE_PROGRAM
25 dnl arg1: program variable
26 dnl arg2: program executable name
27 dnl arg3: target that requires it
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
35 $3_REQUIRES="$$3_REQUIRES $2"
40 dnl DOCS_TARGET_REQUIRE_DIR
41 dnl arg1: list of possible paths
42 dnl arg2: file in dir know to exist
43 dnl arg3: variable to store found path in
44 dnl arg4: target that requires it
46 AC_DEFUN(DOCS_TARGET_REQUIRE_DIR, [
47 AC_MSG_CHECKING([for $2])
51 test -f "$I/$2" && $3="$I"
54 if test x$$3 = x; then
55 if test x"$$4_REQUIRES" = x; then
58 $4_REQUIRES="$$4_REQUIRES $3"
60 AC_MSG_RESULT([not found])
62 AC_MSG_RESULT([found in $$3])