summaryrefslogtreecommitdiffstats
path: root/kioslave/audiocd/configure.in.in
blob: 073d0f9658cb24346f217b38f2d2ac5393a6520e (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
AC_DEFUN([AC_CHECK_LIBFLAC],
[
  AC_LANG_SAVE
  AC_LANG_C
  have_libFLAC=no
  KDE_CHECK_HEADER(FLAC/metadata.h,
  [
     KDE_CHECK_LIB(FLAC,FLAC__seekable_stream_decoder_process_single,
	          have_libFLAC=yes)

    ])
  if test "x$have_libFLAC" = "xyes"; then
      LIBFLAC="-lFLAC"
      AC_DEFINE(HAVE_LIBFLAC, 1,
        [Define if you have libFLAC (required for loading FLAC files)])
  fi
  AC_SUBST(LIBFLAC)
  AC_LANG_RESTORE
])

AC_DEFUN([AC_CHECK_LIBOGGFLAC],
[
  AC_LANG_SAVE
  AC_LANG_C
  have_libOggFLAC=no
  KDE_CHECK_HEADER(OggFLAC/seekable_stream_decoder.h,
  [
     KDE_CHECK_LIB(OggFLAC,OggFLAC__seekable_stream_decoder_process_single,
	          have_libOggFLAC=yes,,[-lm -lOggFLAC -lFLAC])

    ])
  if test "x$have_libOggFLAC" = "xyes"; then
      LIBOGGFLAC="-lOggFLAC"
      AC_DEFINE(HAVE_LIBOGGFLAC, 1,
        [Define if you have libOggFLAC (required for loading OggFLAC files)])
  fi
  AC_SUBST(LIBOGGFLAC)
  AC_LANG_RESTORE
])

AC_ARG_WITH(flac,AC_HELP_STRING([--with-flac],[Enable FLAC support @<:@default=check@:>@]),[flac_test="$withval"],[flac_test="yes"])

if test "x$flac_test" = "xyes" ; then
  AC_CHECK_LIBFLAC
  AC_CHECK_LIBOGGFLAC
fi