aboutsummaryrefslogblamecommitdiffstats
path: root/m4/mpd_func.m4
blob: c4650336bd2490a2abc4edc32e44efd610919262 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                     
dnl MPD_OPTIONAL_FUNC(func, macro)
dnl
dnl Allow the user to enable or disable the use of a function.  If the
dnl option is not specified, the function is auto-detected.
AC_DEFUN([MPD_OPTIONAL_FUNC], [
	AC_ARG_ENABLE([$1],
		AS_HELP_STRING([--enable-$1],
			[use the function "$1()" (default: auto)]),
		[test xenable_$1 = xyes && AC_DEFINE([$2], 1, [Define to use $1()])],
		[AC_CHECK_FUNC([$1],
			[AC_DEFINE([$2], 1, [Define to use $1()])],)])
])