summaryrefslogtreecommitdiffstats
path: root/plugins/decoder/flac/configure.in.in
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/decoder/flac/configure.in.in')
-rw-r--r--plugins/decoder/flac/configure.in.in41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/decoder/flac/configure.in.in b/plugins/decoder/flac/configure.in.in
new file mode 100644
index 0000000..e6a3700
--- /dev/null
+++ b/plugins/decoder/flac/configure.in.in
@@ -0,0 +1,41 @@
+dnl === test for FLAC++ and FLAC - begin ====
+AC_ARG_WITH(
+ flac,
+ AS_HELP_STRING([--without-flac], [build K3b without FLAC support (default=no)]),
+ [ac_cv_use_flac=$withval],
+ [ac_cv_use_flac=yes]
+)
+
+have_flac=no
+if test "$ac_cv_use_flac" = "yes"; then
+ KDE_CHECK_HEADERS(FLAC++/decoder.h, [
+ AC_CHECK_LIB(FLAC,FLAC__stream_decoder_process_single,
+ have_flac=yes,[],$all_libraries)])
+
+ AC_MSG_CHECKING(for libFLAC newer than 1.1.1)
+ AC_CACHE_VAL(k3b_flac_new,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE(
+ [
+ #include <FLAC++/metadata.h>
+ ], [
+ FLAC::Metadata::VorbisComment* vc;
+ vc->get_vendor_string().get_field();
+ ], k3b_flac_new=no, k3b_flac_new=yes )
+ AC_LANG_RESTORE
+ ])
+ AC_MSG_RESULT($k3b_flac_new)
+ if test $k3b_flac_new = yes; then
+ AC_DEFINE(FLAC_NEWER_THAN_1_1_1,
+ 1,
+ [Define to 1 if your flac library's version is newer than or equal to 1.1.2]
+ )
+ fi
+else
+ have_flac=no
+fi
+
+AM_CONDITIONAL(include_FLAC, [test x$have_flac = xyes])
+dnl === test for FLAC++ and FLAC - end ====