summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1203f4f)
raw | patch | inline | side by side (parent: 1203f4f)
author | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 07:16:53 +0000 (08:16 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 07:16:53 +0000 (08:16 +0100) |
Detect liblircclient with pkg-config.
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index d46045fc5e004c446d67ec40e39558d068e552f7..4c9e1dfc22903389df961d45432b9c9fc6ffe35f 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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 57d1eb605ac3af7e147a9501668a5a480dd2b2f9..af91939b146cfc22d7cb521abab25d7d05eb711d 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
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\