aboutsummaryrefslogtreecommitdiffstats
path: root/plugins.m4
diff options
context:
space:
mode:
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-09-23 04:34:38 +0000
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-09-23 04:34:38 +0000
commita50e7c8b4e39f0b11bebe70b43e2a39e72a3fb71 (patch)
treed6577feb4d8d7321733c8fff933d7f5787dde65e /plugins.m4
parentf105fd58e80d8a3668998b5e498518b41822779b (diff)
downloadlcd4linux-a50e7c8b4e39f0b11bebe70b43e2a39e72a3fb71.tar.gz
autoconf patches from PT M.
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1044 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugins.m4')
-rw-r--r--plugins.m412
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins.m4 b/plugins.m4
index 240d4f4..28aa26d 100644
--- a/plugins.m4
+++ b/plugins.m4
@@ -361,11 +361,13 @@ if test "$PLUGIN_MEMINFO" = "yes"; then
fi
# MPD
-if test "$PLUGIN_MPD" = "yes"; then
- if test -f "libmpdclient.h"
- then
- PLUGINS="$PLUGINS plugin_mpd.o libmpdclient.o"
- AC_DEFINE(PLUGIN_MPD,1,[mpd plugin])
+if test "$PLUGIN_MPD" = "yes"; then
+ AC_CHECK_LIB(libmpd, [mpd_newConnection], [has_mpd_header="true"], [has_mpd_header="false"])
+ if test "$has_mpd_header" = "true"; then
+ PLUGINS="$PLUGINS plugin_mpd.o"
+ PLUGINLIBS="$PLUGINLIBS `pkg-config libmpd --libs`"
+ CPPFLAGS="$CPPFLAGS `pkg-config libmpd --cflags`"
+ AC_DEFINE(PLUGIN_MPD,1,[mpd plugin])
else
AC_MSG_WARN(libmpdclient.h header not found: mpd plugin disabled)
AC_MSG_WARN(get libmpdclient.h from http://www.musicpd.org/libmpdclient.shtml)