xref: /netbsd-src/external/bsd/am-utils/dist/m4/macros/with_addon.m4 (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1*a53f50b9Schristosdnl ######################################################################
2*a53f50b9Schristosdnl Do we want to compile with "ADDON" support? (hesiod, ldap, etc.)
3*a53f50b9SchristosAC_DEFUN([AMU_WITH_ADDON],
4*a53f50b9Schristos[AC_MSG_CHECKING([if $1 is wanted])
5*a53f50b9Schristosac_upcase=`echo $1|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6*a53f50b9SchristosAC_ARG_WITH($1,
7*a53f50b9Schristos AC_HELP_STRING([--with-$1],
8*a53f50b9Schristos		[enable $2 support (default=yes if found)]
9*a53f50b9Schristos),[
10*a53f50b9Schristosif test "$withval" = "yes"; then
11*a53f50b9Schristos  with_$1=yes
12*a53f50b9Schristoselif test "$withval" = "no"; then
13*a53f50b9Schristos  with_$1=no
14*a53f50b9Schristoselse
15*a53f50b9Schristos  AC_MSG_ERROR(please use \"yes\" or \"no\" with --with-$1)
16*a53f50b9Schristosfi
17*a53f50b9Schristos],[
18*a53f50b9Schristoswith_$1=yes
19*a53f50b9Schristos])
20*a53f50b9Schristosif test "$with_$1" = "yes"
21*a53f50b9Schristosthen
22*a53f50b9Schristos  AC_MSG_RESULT([yes, will enable if all libraries are found])
23*a53f50b9Schristoselse
24*a53f50b9Schristos  AC_MSG_RESULT([no])
25*a53f50b9Schristosfi
26*a53f50b9Schristos])
27