aboutsummaryrefslogtreecommitdiffstats
path: root/m4/mpd_define_conditional.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/mpd_define_conditional.m4')
-rw-r--r--m4/mpd_define_conditional.m48
1 files changed, 8 insertions, 0 deletions
diff --git a/m4/mpd_define_conditional.m4 b/m4/mpd_define_conditional.m4
new file mode 100644
index 000000000..4bc849984
--- /dev/null
+++ b/m4/mpd_define_conditional.m4
@@ -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])