Package: xosd / 2.2.14-2.1

35_beep_media_player.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Fix detection of Beep Media Player
--- xosd-2.2.14.orig/configure.ac
+++ xosd-2.2.14/configure.ac
@@ -81,8 +81,7 @@ AC_ARG_ENABLE([xinerama],
               [disable_xinerama="yes"],
 	      [disable_xinerama="no"])
 
-if test x$disable_xinerama = "xno"
-then
+AS_IF([test "x$disable_xinerama" = "xno"], [
         AC_CHECK_LIB(Xinerama_pic,
                      XineramaQueryExtension,
                      [X_LIBS="$X_LIBS -lXinerama_pic"
@@ -96,21 +95,7 @@ installed])
                                     ac_have_xinerama="yes"],,
                                     [$X_LIBS -lXext $X_EXTRA_LIBS]),
                      [$X_LIBS -lXext $X_EXTRA_LIBS])
-fi
-
-if pkg-config --exists bmp
-then
-	PKG_CHECK_MODULES(BMP, bmp)
-	BMP_GENERAL_PLUGIN_DIR=$(pkg-config --variable general_plugin_dir bmp)
-	AC_SUBST(BMP_GENERAL_PLUGIN_DIR)
-	no_bmp="yes"
-else
-	no_bmp="no"	
-	AC_MSG_WARN("beep media player not found")
-fi
-
-
-
+])
 
 dnl Check for xmms
 dnl disabled in Debian because XMMS is not available and we need to
@@ -147,20 +132,21 @@ AC_MSG_RESULT($enable_new_plugin)
 AM_CONDITIONAL([BUILD_NEW_PLUGIN],
 	       [test x"$enable_new_plugin" = "xyes" -a x"$no_xmms" != "xyes" -a x"$no_gdk_pixbuf" != "xyes"])
 
+PKG_PROG_PKG_CONFIG
 
 dnl Check for Beep Media player
 AC_ARG_ENABLE([beep_media_player_plugin],
 		AC_HELP_STRING([--enable-beep_media_player_plugin],
 			     [Enable beep media plugin (enabled by default)]),
-              [beep_media_player_plugin="$enableval"],
-              [beep_media_player_plugin="yes"])
-AC_MSG_CHECKING([whether beep media plugin was requested])
-AC_MSG_RESULT($beep_media_player_plugin)
-
-AM_CONDITIONAL([BUILD_BEEP_MEDIA_PLUGIN],
-	       [test x"$beep_media_player_plugin" = "xyes" -a x"$no_bmp" == "xyes"])
-
-		
+              []
+              [beep_media_player_plugin=check])
+AS_CASE(["$beep_media_player_plugin"],
+	[yes], [PKG_CHECK_MODULES([BMP], [bmp], [HAVE_BMP=1])],
+	[no], [],
+	[PKG_CHECK_MODULES([BMP], [bmp], [HAVE_BMP=1], [HAVE_BMP=0])])
+AM_CONDITIONAL([BUILD_BEEP_MEDIA_PLUGIN], [test "$beep_media_player_plugin" != no -a "$HAVE_BMP" -eq 1])
+AS_IF([test "$beep_media_player_plugin" != no -a "$HAVE_BMP" -eq 1], [BMP_GENERAL_PLUGIN_DIR=$(pkg-config --variable general_plugin_dir bmp)])
+AC_SUBST(BMP_GENERAL_PLUGIN_DIR)
 
 
 dnl OLD plugin