summaryrefslogtreecommitdiffstats
path: root/plugins/decoder/musepack/configure.in.in
blob: ca4297608f7822f63ef0e5d32c8804c3cf32edad (plain)
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
dnl --------- MUSEPACK CHECK ---------------

AC_ARG_WITH(
	musepack, 
	AS_HELP_STRING(
		[--without-musepack], 
		[build K3b without Musepack audio support (default=no)]),
	[ac_cv_use_mpc=$withval], 
	[ac_cv_use_mpc=yes]
)

have_mpc=no
if test "$ac_cv_use_mpc" = "yes"; then

  dnl - search for both the new and the old naming -

  KDE_CHECK_HEADERS(mpcdec/mpcdec.h, [
  	AC_CHECK_LIB(mpcdec, mpc_decoder_setup, [
  		have_mpc=yes
		MPC_LIBS="-lmpcdec"
		AC_DEFINE(
			MPC_HEADER_FILE, 
			<mpcdec/mpcdec.h>, 
			[The header to include for MPC decoding.])
		],
		[], [], [])
  ])

  if test "$have_mpc" = "no"; then
    KDE_CHECK_HEADERS(mpc/mpcdec.h, [
        AC_CHECK_LIB(mpcdec, mpc_decoder_setup, [
                have_mpc=yes
                MPC_LIBS="-lmpcdec"
                AC_DEFINE(
                        MPC_HEADER_FILE,
                        <mpc/mpcdec.h>,
                        [The header to include for MPC decoding.])
                ],
                [], [], [])
    ])
  fi
	
  if test "$have_mpc" = "no"; then
    KDE_CHECK_HEADERS(musepack/musepack.h, [
    	  AC_CHECK_LIB(musepack, mpc_decoder_setup, [
  		  have_mpc=yes
		  MPC_LIBS="-lmusepack"
		  AC_DEFINE(
			  MPC_HEADER_FILE, 
			  <musepack/musepack.h>, 
			  [The header to include for MPC decoding.]
		  )
		  AC_DEFINE(
			  mpc_bool_t,
			  BOOL,
			  [backwards compatibility stuff]
		  )
  		  ], [], [])
    ])
  fi
fi
AC_SUBST(MPC_LIBS)

AM_CONDITIONAL(include_MPC, [test x$have_mpc = xyes])

dnl --------- MUSEPACK CHECK END -----------