File: configure.in.in

package info (click to toggle)
k3b 0.12.17-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 17,560 kB
  • ctags: 11,120
  • sloc: cpp: 86,413; ansic: 25,752; sh: 9,055; perl: 2,731; makefile: 810
file content (51 lines) | stat: -rw-r--r-- 1,222 bytes parent folder | download
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
dnl --------------- FFMPEG CHECK ---------------------------------

AC_ARG_WITH(
	ffmpeg, 
	AS_HELP_STRING(
		[--without-ffmpeg], 
		[build 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
	AC_MSG_CHECKING(for ffmpeg >= 0.4.9)
	AC_LANG_SAVE
	AC_LANG_CPLUSPLUS
	AC_COMPILE_IFELSE( 
		#include <ffmpeg/avformat.h>
		#include <ffmpeg/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 -lavutil"
	AC_LINK_IFELSE( 
		#include <ffmpeg/avformat.h>
		#include <ffmpeg/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)
fi
AM_CONDITIONAL(include_FFMPEG, [test x$have_ffmpeg = xyes])

dnl --------------- FFMPEG CHECK END ------------------------------