configure.ac: add macro MPD_DEFINE_CONDITIONAL
This commit is contained in:
@@ -93,11 +93,7 @@ AC_DEFUN([MPD_ARG_ENABLE], [
|
||||
|
||||
$5
|
||||
|
||||
if test x$[]enable_$1 = xyes; then
|
||||
AC_DEFINE(ENABLE_$2, 1,
|
||||
[Define to enable $3])
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_$2, test x$[]enable_$1 = xyes)
|
||||
MPD_DEFINE_CONDITIONAL(enable_$1, ENABLE_$2, [$3])
|
||||
])
|
||||
|
||||
dnl Wrapper for AC_ARG_ENABLE and MPD_AUTO_PKG
|
||||
|
8
m4/mpd_define_conditional.m4
Normal file
8
m4/mpd_define_conditional.m4
Normal file
@@ -0,0 +1,8 @@
|
||||
dnl Wrapper for AC_DEFINE and AM_CONDITIONAL
|
||||
dnl
|
||||
dnl Parameters: varname1, varname2, description
|
||||
AC_DEFUN([MPD_DEFINE_CONDITIONAL], [dnl
|
||||
AM_CONDITIONAL($2, test x$[]$1 = xyes)
|
||||
if test x$[]$1 = xyes; then
|
||||
AC_DEFINE($2, 1, [Define to enable $3])
|
||||
fi])
|
Reference in New Issue
Block a user