Added the hubmgr.1 manpage.
[doldaconnect.git] / acinclude.m4
1 AC_DEFUN([DOLDA_AC_GROUP],
2 [AC_MSG_NOTICE([ -- $1 -- ])])
3
4 m4_defun([_DOLDA_PKG_LOOP],[dnl
5 if test -z "$[]$1"; then
6         $2
7 fi
8 ifelse(m4_eval([$# > 2]), 1, [_DOLDA_PKG_LOOP($1, m4_shift(m4_shift($@)))])
9 ])
10
11 # DOLDA_PKG(VARIABLE-NAME, COMMANDS...)
12 #
13 # Evaluate COMMANDS in sequence as long as ${VARIABLE-NAME} is empty
14
15 AC_DEFUN([DOLDA_PKG],[dnl
16 $1=""
17 _DOLDA_PKG_LOOP($1, m4_shift($@))
18 if test "$[]$1" != no; then $1=yes; fi
19 ])
20
21 # DOLDA_CHECK_HEADER(FILE, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND,
22 #       [EXTRA-CFLAGS])
23 #
24 # Augmented version of AC_CHECK_HEADER that overrides CPPFLAGS
25
26 AC_DEFUN([DOLDA_CHECK_HEADER],[dnl
27 cpp_bak="$CPPFLAGS"
28 ifelse([$4], , , [CPPFLAGS="$CPPFLAGS $4"])
29 AC_CHECK_HEADER($1, $2, $3)
30 CPPFLAGS="$cpp_bak"
31 ])
32
33 # DOLDA_ENABLE(NAME, HELP, DEFAULT, DEPS)
34 #
35 # DEPS is a space-separated listing of required variables that must be
36 # `yes'
37
38 AC_DEFUN([DOLDA_ENABLE],[dnl
39 AC_ARG_ENABLE([$1], [$2])
40 if test "[$enable_][$1]" = yes; then
41         for var in [$4]; do
42                 if test "${!var}" != yes; then
43                         AC_MSG_ERROR([*** cannot enable $1 without $var])
44                 fi
45         done
46 elif test -z "[$enable_][$1]"; then
47         ifelse([$3], yes, [dnl
48         [enable_][$1]=yes
49         for var in [$4]; do
50                 if test "${!var}" != yes; then
51                         [enable_][$1]=no
52                         break
53                 fi
54         done
55 ], [dnl
56         [enable_][$1]=no
57 ])
58 fi
59 ])