1 AC_DEFUN(SWF_CHECK_BYTEORDER,
3 AC_MSG_CHECKING([for byte order])
5 int main (int argc, char *argv[])
10 ], BIGENDIAN=1, LITTLEENDIAN=1, CROSSCOMPILE=1)
13 if test "x${CROSSCOMPILE}" = "x1"; then
14 AC_MSG_RESULT(we are cross compiling- trying to guess from system type)
16 AC_MSG_CHECKING([for byte order, try 2])
21 *sparc* | *68* | *88k* | *mac* | *Mac* | *sun* | *Sun* | *Amiga* | *amiga* )
28 if test "x${LITTLEENDIAN}" = "x1"; then
29 AC_MSG_RESULT(little endian)
33 if test "x${BIGENDIAN}" = "x1"; then
34 AC_MSG_RESULT(big endian)
37 export WORDS_BIGENDIAN
38 AC_DEFINE_UNQUOTED(WORDS_BIGENDIAN, 1)
40 if test "x${BYTEORDERCHECKOK}" != "x1"; then
41 AC_MSG_RESULT(unknown)
42 echo Byte order could not determined. Try to insert your system type into aclocal.m4 about line 21
47 AC_DEFUN(SWF_CHECK_SYSTEM_BACKTICKS,
49 AC_MSG_CHECKING([whether system() can handle command substitution])
52 int main (int argc, char*argv[])
54 return system("test `touch config.tmp2`");
56 ], OK=OK,,CROSSCOMPILE=1)
58 if test "x${OK}" = "xOK";then
59 test -f config.tmp2 || OK=
62 if test "x${CROSSCOMPILE}" = "x1";then
65 if test "x${OK}" = "xOK";then
69 export SYSTEM_BACKTICKS
70 AC_DEFINE_UNQUOTED(SYSTEM_BACKTICKS, 1)
76 AC_DEFUN(SWF_CHECK_AVI2SWF,
78 AC_MSG_CHECKING([whether we can compile the avifile test program])
80 cat > conftest.$ac_ext << EOF
81 #include <avifile/version.h>
82 #if (AVIFILE_MAJOR_VERSION == 0) && (AVIFILE_MINOR_VERSION==6)
87 #include <StreamInfo.h>
99 int main (int argc, char*argv[])
101 IAviReadFile* player;
102 IAviReadStream* astream;
103 IAviReadStream* vstream;
104 player = CreateIAviReadFile(0);
105 astream = player->GetStream(0, AviStream::Audio);
106 vstream = player->GetStream(0, AviStream::Video);
107 vstream -> StartStreaming();
108 astream -> StartStreaming();
111 player->GetFileHeader(&head);
112 head.dwMicroSecPerFrame;
117 head.dwMicroSecPerFrame;
118 astream->GetEndPos(),
119 astream->GetEndTime());
120 player->StreamCount();
122 StreamInfo*audioinfo;
123 StreamInfo*videoinfo;
124 audioinfo = astream->GetStreamInfo();
125 videoinfo = vstream->GetStreamInfo();
126 videoinfo->GetVideoWidth();
127 videoinfo->GetVideoHeight();
128 audioinfo->GetAudioSamplesPerSec();
131 CImage*img = vstream->GetFrame();
138 astream->GetAudioFormatInfo(&wave,0);
140 astream->ReadFrames(0,0,0,a,b);
144 ac_link='g++ `avifile-config --cflags` `avifile-config --libs` conftest.$ac_ext -o conftest${ac_exeext}'
145 if {(eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
149 AC_DEFINE_UNQUOTED(AVIFILE, true)
151 echo "configure: failed program was:" >&5
152 cat conftest.$ac_ext >&5