summaryrefslogtreecommitdiffstats
path: root/plugins/decoder/ffmpeg/configure.in.in
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-03 02:15:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-03 02:15:56 +0000
commit50b48aec6ddd451a6d1709c0942477b503457663 (patch)
treea9ece53ec06fd0a2819de7a2a6de997193566626 /plugins/decoder/ffmpeg/configure.in.in
downloadk3b-50b48aec6ddd451a6d1709c0942477b503457663.tar.gz
k3b-50b48aec6ddd451a6d1709c0942477b503457663.zip
Added abandoned KDE3 version of K3B
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1084400 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'plugins/decoder/ffmpeg/configure.in.in')
-rw-r--r--plugins/decoder/ffmpeg/configure.in.in68
1 files changed, 68 insertions, 0 deletions
diff --git a/plugins/decoder/ffmpeg/configure.in.in b/plugins/decoder/ffmpeg/configure.in.in
new file mode 100644
index 0000000..84b345a
--- /dev/null
+++ b/plugins/decoder/ffmpeg/configure.in.in
@@ -0,0 +1,68 @@
+dnl --------------- FFMPEG CHECK ---------------------------------
+
+AC_ARG_WITH(
+ ffmpeg,
+ AS_HELP_STRING(
+ [--without-ffmpeg],
+ [build K3b without ffmpeg audio decoder support (default=no)]),
+ [ac_cv_use_ffmpeg=$withval],
+ [ac_cv_use_ffmpeg=yes]
+)
+
+#
+# The ffmpeg decoder plugin needs ffmpeg 0.4.9 or higher
+#
+have_ffmpeg=no
+if test "$ac_cv_use_ffmpeg" = "yes"; then
+ k3b_cxxflags_save="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS"
+ AC_MSG_CHECKING(for ffmpeg >= 0.4.9)
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_COMPILE_IFELSE(
+ extern "C" {
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+ }
+
+ int main() {
+ AVFormatContext* fc = 0;
+ AVPacket* p = 0;
+ av_register_all();
+ return av_read_frame( fc, p );
+ },
+ [ffmpeg_compiles=yes], [ffmpeg_compiles=no] )
+ OLD_LIBS=$LIBS
+ LIBS="-lavformat -lavcodec $LIBS"
+ AC_LINK_IFELSE(
+ extern "C" {
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+ }
+
+ int main() {
+ AVFormatContext* fc = 0;
+ AVPacket* p = 0;
+ av_register_all();
+ return av_read_frame( fc, p );
+ },
+ [ffmpeg_links=yes], [ffmpeg_links=no] )
+ AC_LANG_RESTORE
+ LIBS=$OLD_LIBS
+ have_ffmpeg=$ffmpeg_links
+ AC_MSG_RESULT($have_ffmpeg)
+ CXXFLAGS=$k3b_cxxflags_save
+fi
+AM_CONDITIONAL(include_FFMPEG, [test x$have_ffmpeg = xyes])
+
+dnl --------------- FFMPEG CHECK END ------------------------------
+
+AC_ARG_ENABLE(
+ ffmpeg-all-codecs,
+ AS_HELP_STRING(
+ [--enable-ffmpeg-all-codecs],
+ [Build K3b's ffmeg decoder plugin with all audio codecs enabled (default=disabled)]),
+ [AC_DEFINE(K3B_FFMPEG_ALL_CODECS, 1, [Defined if all ffmpeg codecs should be allowed])
+ enable_ffmpeg_all_codecs=yes],
+ [enable_ffmpeg_all_codecs=no]
+)