diff options
author | Max Kellermann <max@duempel.org> | 2008-11-07 08:16:53 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-07 08:16:53 +0100 |
commit | 5155ef7b1d4ac8fa57df7b6a5ecc7d9e71d52e6c (patch) | |
tree | 228ec3f2335dec245160ded27c8778eb7f8ed28d | |
parent | 1203f4f8e6f18ef3a4cd1dcb0287ca1a889b3d4b (diff) | |
download | mpd-5155ef7b1d4ac8fa57df7b6a5ecc7d9e71d52e6c.tar.gz mpd-5155ef7b1d4ac8fa57df7b6a5ecc7d9e71d52e6c.tar.xz mpd-5155ef7b1d4ac8fa57df7b6a5ecc7d9e71d52e6c.zip |
configure.ac: added LIRC configure switch
Detect liblircclient with pkg-config.
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | src/Makefile.am | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index d46045fc5..4c9e1dfc2 100644 --- a/configure.ac +++ b/configure.ac @@ -175,9 +175,19 @@ if test "x$use_colors" = "xyes" ; then fi dnl test for LIRC support -AC_CHECK_LIB(lirc_client, lirc_init) -AC_SUBST(LIRC_LIBS) -AC_DEFINE([ENABLE_LIRC], [1], [Enable LIRC support]) + +AC_ARG_ENABLE([lirc], + AC_HELP_STRING([--enable-lirc], + [Enable LIRC support]), + [enable_lirc=$enableval], + [enable_lirc=no]) +if test x$enable_lirc = xyes; then + PKG_CHECK_MODULES([LIBLIRCCLIENT], [liblircclient0],, + [AC_MSG_ERROR([liblircclient0 not found])]) + AC_DEFINE([ENABLE_LIRC], [1], [Enable LIRC support]) +fi + +AM_CONDITIONAL(ENABLE_LIRC, test x$enable_lirc = xyes) dnl Debugging AC_MSG_CHECKING([whether to build with debug support]) diff --git a/src/Makefile.am b/src/Makefile.am index 57d1eb605..af91939b1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,12 +3,14 @@ AM_CPPFLAGS = \ $(GLIB_CFLAGS)\ $(GTHREAD_CFLAGS)\ + $(LIBLIRCCLIENT_CFLAGS) \ -DLOCALE_DIR=\""$(datadir)/locale"\"\ -DSYSCONFDIR=\""$(sysconfdir)"\" ncmpc_LDADD = \ $(GLIB_LIBS)\ - $(GTHREAD_LIBS) + $(GTHREAD_LIBS) \ + $(LIBLIRCCLIENT_LIBS) ncmpc_headers = \ libmpdclient.h\ |