From 57f6ea57eb015b909e8d150b3111efe42da3a2e9 Mon Sep 17 00:00:00 2001 From: anssih Date: Tue, 8 Jun 2010 18:21:19 +0000 Subject: [PATCH] added: configure option for specifying default LIRC device The default LIRC device location was changed in LIRC 0.8.6 from /dev/lircd to /var/run/lirc/lircd. Add --with-lirc-device=file configure option to select the default device location at build time. This can still be overridden at run time. /dev/lircd is kept as the XBMC default for now. git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30976 568bbfeb-2a22-0410-94d2-cc84cf5bfa90 --- configure.in | 7 +++++++ docs/manpages/xbmc.bin.1 | 2 +- guilib/common/LIRC.cpp | 2 -- xbmc/xbmc.cpp | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index a63ca22aeb98b..8ab5789403572 100644 --- a/configure.in +++ b/configure.in @@ -235,6 +235,13 @@ AC_ARG_ENABLE([liba52], [use_liba52=$enableval], [use_liba52=no]) +AC_ARG_WITH([lirc-device], + [AS_HELP_STRING([--with-lirc-device=file], + [specify the default LIRC device (default is /dev/lircd)])], + [lirc_device=$withval], + [lirc_device=/dev/lircd]) +AC_DEFINE_UNQUOTED([LIRC_DEVICE], ["$lirc_device"], [Default LIRC device]) + ### External libraries options AC_ARG_ENABLE([external-libraries], [AS_HELP_STRING([--enable-external-libraries], diff --git a/docs/manpages/xbmc.bin.1 b/docs/manpages/xbmc.bin.1 index b52ece67acac3..5113f15b7226d 100644 --- a/docs/manpages/xbmc.bin.1 +++ b/docs/manpages/xbmc.bin.1 @@ -24,7 +24,7 @@ XBMC will look for configurations in install folder instead of ~/.xbmc Enables screen resolutions such as PAL, NTSC, etc. .TP \fB\-l\fR or \fB\-\-lircdev\fR -LircDevice to use default is /dev/lircd . +LircDevice to use. See \-\-help output for the default. .TP \fB\-n\fR or \fB\-\-nolirc\fR do not use Lirc, aka no remote input. diff --git a/guilib/common/LIRC.cpp b/guilib/common/LIRC.cpp index 5f220afd55abf..bebaf671af949 100644 --- a/guilib/common/LIRC.cpp +++ b/guilib/common/LIRC.cpp @@ -33,8 +33,6 @@ #include "FileSystem/File.h" #include "utils/TimeUtils.h" -#define LIRC_DEVICE "/dev/lircd" - CRemoteControl g_RemoteControl; CRemoteControl::CRemoteControl() diff --git a/xbmc/xbmc.cpp b/xbmc/xbmc.cpp index 603d4ed16acc1..cd9973675f4ff 100644 --- a/xbmc/xbmc.cpp +++ b/xbmc/xbmc.cpp @@ -96,7 +96,7 @@ int main(int argc, char* argv[]) printf(" -p or --portable\tXBMC will look for configurations in install folder instead of ~/.xbmc\n"); printf(" --legacy-res\t\tEnables screen resolutions such as PAL, NTSC, etc.\n"); #ifdef HAS_LIRC - printf(" -l or --lircdev\tLircDevice to use default is /dev/lircd .\n"); + printf(" -l or --lircdev\tLircDevice to use default is "LIRC_DEVICE" .\n"); printf(" -n or --nolirc\tdo not use Lirc, aka no remote input.\n"); #endif printf(" --debug\t\tEnable debug logging\n");