2 dnl arg1: Target that is defined
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"
11 $1_REQUIRES="$$1_REQUIRES $$2_REQUIRES"
14 if test x"$$1_REQUIRES" = x; then
17 AC_MSG_RESULT([Building the $3 requires : $$1_REQUIRES])
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
32 $3_REQUIRES="$$3_REQUIRES $2"
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, [
47 test -f "$I/$2" && $3="$I"
50 if test x$$3 = x; then
51 if test x"$$4_REQUIRES" = x; then
54 $4_REQUIRES="$$4_REQUIRES $3"