summaryrefslogtreecommitdiffstats
path: root/plugins/decoder/libsndfile/configure.in.in
blob: 6b50a68851f1e56684336ff4916c81409c89125d (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
dnl === test for libsndfile - begin ===
dnl
dnl Don't use PKG_CHECK, since if there is no pkg-config installed,
dnl then there is no auto* magic for it either.
dnl
dnl Tests copied from tdebase/tdeioslave/thumbnail/
dnl
if test -z "$PKG_CONFIG"; then
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi

AC_ARG_WITH(
	sndfile, 
	AS_HELP_STRING([--without-sndfile], 
	[build K3b without libsndfile support (default=no)]), 
	[ac_cv_use_sndfile=$withval], 
	[ac_cv_use_sndfile=yes]
)

if test "$ac_cv_use_sndfile" = "yes"; then
  SNDFILE_CFLAGS=""
  SNDFILE_LIBS=""
  if test "$PKG_CONFIG" = "no" ; then
      ac_cv_sndfile=0
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
      if !(`$PKG_CONFIG --exists sndfile`) ; then
          echo "*** sndfile is not installed."
          ac_cv_sndfile=0
      else
          if !(`$PKG_CONFIG --atleast-version="1.0.2" sndfile`) ; then
              echo "*** You need at least version 1.0.2 of sndfile."
              ac_cv_sndfile=0
          else
              ac_cv_sndfile=1
              SNDFILE_CFLAGS=`$PKG_CONFIG --cflags sndfile`
              SNDFILE_LIBS=`$PKG_CONFIG --libs sndfile`
          fi
      fi
  fi

  AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile},
  			[Set to 1 if you have libsndfile.])
  AC_SUBST(SNDFILE_CFLAGS)
  AC_SUBST(SNDFILE_LIBS)
fi

AM_CONDITIONAL(include_AIFF, [test x$ac_cv_sndfile = x1])
dnl === test for libsndfile - end ===