From 22ccd6dfa9456db3deb2c5056ec166147faa908a Mon Sep 17 00:00:00 2001 From: Marvin Schmidt Date: Sun, 3 Apr 2011 14:53:13 +0200 Subject: [PATCH] configure: Fix media option The third argument to AC_ARG_ENABLE is 'if-passed', so previously passing --{dis,en}able-media would have disabled media support regardlessly. --- configure.ac | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 6f43138..4bb7463 100644 --- a/configure.ac +++ b/configure.ac @@ -106,13 +106,16 @@ AM_CONDITIONAL([WANT_TWISTED_TESTS], test false != "$TEST_PYTHON") AC_ARG_ENABLE(media, AC_HELP_STRING([--disable-media],[disable audio/video calls]), - [ - AM_CONDITIONAL([MEDIA_ENABLED], false) - ],[ - AC_DEFINE(ENABLE_MEDIA, [], [Enable audio/video calls]) - AM_CONDITIONAL([MEDIA_ENABLED], true) - ]) -AC_SUBST(ENABLE_MEDIA) + [enable_media=$enableval], + [enable_media=yes]) + +AM_CONDITIONAL([MEDIA_ENABLED], [test "x$enable_media" = "xyes"]) + +if "x$enable_media" = "xyes"; then + AC_DEFINE([ENABLE_MEDIA], [], [Enable audio/video calls]) +fi + + #AS_AC_EXPAND(DATADIR, $datadir) #DBUS_SERVICES_DIR="$DATADIR/dbus-1/services" -- 1.7.4.1