1 AC_DEFUN(RFX_CHECK_AVI2SWF,
3 AC_CHECK_PROGS(AVIFILE_CONFIG, avifile-config)
4 AC_MSG_CHECKING([whether we can compile the avifile test program])
6 cat > conftest.cpp << EOF
7 #include <avifile/version.h>
8 #if (AVIFILE_MAJOR_VERSION == 0) && (AVIFILE_MINOR_VERSION>=6)
13 #include <StreamInfo.h>
28 IAviReadStream* astream;
29 IAviReadStream* vstream;
30 player = CreateIAviReadFile(0);
31 astream = player->GetStream(0, AviStream::Audio);
32 vstream = player->GetStream(0, AviStream::Video);
33 vstream -> StartStreaming();
34 astream -> StartStreaming();
37 player->GetFileHeader(&head);
38 head.dwMicroSecPerFrame;
43 head.dwMicroSecPerFrame;
45 astream->GetEndTime());
46 player->StreamCount();
50 audioinfo = astream->GetStreamInfo();
51 videoinfo = vstream->GetStreamInfo();
52 videoinfo->GetVideoWidth();
53 videoinfo->GetVideoHeight();
54 audioinfo->GetAudioSamplesPerSec();
57 CImage*img = vstream->GetFrame();
64 astream->GetAudioFormatInfo(&wave,0);
66 astream->ReadFrames(0,0,0,a,b);
68 int main (int argc, char*argv[])
74 if test "x$AVIFILE_CONFIG" '!=' "x";then
75 ac_link='$CXX $CPPFLAGS $CXXFLAGS `$AVIFILE_CONFIG --cflags` `$AVIFILE_CONFIG --libs` conftest.cpp -o conftest${ac_exeext}'
76 if { (eval echo avi2swf.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ./conftest${ac_exeext}; then
80 AC_DEFINE_UNQUOTED(AVIFILE, true)
82 echo "configure: failed program was:" >&5