summaryrefslogtreecommitdiffstats
path: root/plugins/decoder/libsndfile/configure.in.in
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/decoder/libsndfile/configure.in.in')
-rw-r--r--plugins/decoder/libsndfile/configure.in.in52
1 files changed, 52 insertions, 0 deletions
diff --git a/plugins/decoder/libsndfile/configure.in.in b/plugins/decoder/libsndfile/configure.in.in
new file mode 100644
index 0000000..e0efcc5
--- /dev/null
+++ b/plugins/decoder/libsndfile/configure.in.in
@@ -0,0 +1,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 kdebase/kioslave/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 ===