X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=configure;h=fd51b9b19904975bebefd87f84ee7e3b02a7c8b2;hb=4422eb8459b40c9bf8fa026820781aeb903a2108;hp=18a97cf55ef1d02b2d8f8e7911c60dcc735c3ed5;hpb=2bd761f50263c36f92a385f27b0593105853bbd7;p=swftools.git diff --git a/configure b/configure index 18a97cf..fd51b9b 100755 --- a/configure +++ b/configure @@ -523,9 +523,9 @@ fi PACKAGE=swftools -VERSION=0.2.2 -CFLAGS="-Wimplicit -Wreturn-type -O2 -fomit-frame-pointer" -CXXFLAGS="-Wimplicit -Wreturn-type -O2 -fomit-frame-pointer" +VERSION=0.3.0 +CFLAGS="-Winline -Wparentheses -Wimplicit -Wreturn-type -O2 -fomit-frame-pointer" +CXXFLAGS="-Winline -Wparentheses -Wimplicit -Wreturn-type -O2 -fomit-frame-pointer" export PACKAGE VERSION CFLAGS CXXFLAGS # Extract the first word of "gcc", so it can be a program name with args. @@ -1394,11 +1394,12 @@ else echo "Error: The zlib compression library is required." DISABLEPDF2SWF=true; MISSINGLIBS="${MISSINGLIBS} zlib" + exit; fi echo $ac_n "checking for jpeg_write_raw_data in -ljpeg""... $ac_c" 1>&6 -echo "configure:1402: checking for jpeg_write_raw_data in -ljpeg" >&5 +echo "configure:1403: checking for jpeg_write_raw_data in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_write_raw_data | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1406,7 +1407,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1449,7 +1450,7 @@ DISABLEPDF2SWF=true; fi echo $ac_n "checking for T1_LoadFont in -lt1""... $ac_c" 1>&6 -echo "configure:1453: checking for T1_LoadFont in -lt1" >&5 +echo "configure:1454: checking for T1_LoadFont in -lt1" >&5 ac_lib_var=`echo t1'_'T1_LoadFont | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1457,7 +1458,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lt1 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1501,7 +1502,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1505: checking host system type" >&5 +echo "configure:1506: checking host system type" >&5 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then # Make sure we can run config.sub. @@ -1542,7 +1543,7 @@ host_os=$ac_cv_host_os echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1546: checking target system type" >&5 +echo "configure:1547: checking target system type" >&5 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then # Make sure we can run config.sub. @@ -1582,7 +1583,7 @@ target_os=$ac_cv_target_os echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1586: checking build system type" >&5 +echo "configure:1587: checking build system type" >&5 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then # Make sure we can run config.sub. @@ -1622,12 +1623,12 @@ build_os=$ac_cv_build_os echo $ac_n "checking for byte order""... $ac_c" 1>&6 -echo "configure:1626: checking for byte order" >&5 +echo "configure:1627: checking for byte order" >&5 if test "$cross_compiling" = yes; then CROSSCOMPILE=1 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then BIGENDIAN=1 else @@ -1680,7 +1681,7 @@ test "$host_alias" != "$target_alias" && program_prefix=${target_alias}- echo $ac_n "checking for byte order, try 2""... $ac_c" 1>&6 -echo "configure:1684: checking for byte order, try 2" >&5 +echo "configure:1685: checking for byte order, try 2" >&5 case "${target}" in *86* | *-pc-* ) LITTLEENDIAN=1 @@ -1716,12 +1717,12 @@ fi echo $ac_n "checking whether system() can handle command substitution""... $ac_c" 1>&6 -echo "configure:1720: checking whether system() can handle command substitution" >&5 +echo "configure:1721: checking whether system() can handle command substitution" >&5 if test "$cross_compiling" = yes; then CROSSCOMPILE=1 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then OK=OK else @@ -1791,12 +1792,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1795: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1796: checking for $ac_hdr that defines DIR" >&5 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1804,7 +1805,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1829,7 +1830,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1833: checking for opendir in -ldir" >&5 +echo "configure:1834: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1837,7 +1838,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1870,7 +1871,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1874: checking for opendir in -lx" >&5 +echo "configure:1875: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1878,7 +1879,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1912,12 +1913,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1916: checking for ANSI C header files" >&5 +echo "configure:1917: checking for ANSI C header files" >&5 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1925,7 +1926,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1942,7 +1943,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1960,7 +1961,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1981,7 +1982,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1992,7 +1993,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2019,17 +2020,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2023: checking for $ac_hdr" >&5 +echo "configure:2024: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2085,12 +2086,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2089: checking for working const" >&5 +echo "configure:2090: checking for working const" >&5 if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2160,21 +2161,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2164: checking for inline" >&5 +echo "configure:2165: checking for inline" >&5 if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2200,12 +2201,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2204: checking for off_t" >&5 +echo "configure:2205: checking for off_t" >&5 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2235,12 +2236,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2239: checking for size_t" >&5 +echo "configure:2240: checking for size_t" >&5 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2270,12 +2271,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2274: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2275: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2283,7 +2284,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2304,12 +2305,12 @@ EOF fi echo $ac_n "checking for boolean""... $ac_c" 1>&6 -echo "configure:2308: checking for boolean" >&5 +echo "configure:2309: checking for boolean" >&5 if eval "test \"\${ac_cv_type_boolean+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2338,16 +2339,51 @@ EOF fi + echo $ac_n "checking for bool""... $ac_c" 1>&6 +echo "configure:2344: checking for bool" >&5 +if eval "test \"\${ac_cv_type_bool+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])bool[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + eval "ac_cv_type_bool=yes" +else + rm -rf conftest* + eval "ac_cv_type_bool=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_type_'bool`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <&6 -echo "configure:2346: checking for $ac_func" >&5 +echo "configure:2382: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2395,6 +2431,100 @@ else fi done + +echo $ac_n "checking whether we can compile the avifile test program""... $ac_c" 1>&6 +echo "configure:2437: checking whether we can compile the avifile test program" >&5 + +cat > conftest.$ac_ext << EOF +#include +#if (AVIFILE_MAJOR_VERSION == 0) && (AVIFILE_MINOR_VERSION==6) + #include + #include + #include + #include + #include + #define VERSION6 +#else + #include + #include + #include + #define Width width + #define Height height + #define Data data + #define Bpp bpp +#endif + +int main (int argc, char*argv) +{ + IAviReadFile* player; + IAviReadStream* astream; + IAviReadStream* vstream; + player = CreateIAviReadFile(0); + astream = player->GetStream(0, AviStream::Audio); + vstream = player->GetStream(0, AviStream::Video); + vstream -> StartStreaming(); + astream -> StartStreaming(); +#ifndef VERSION6 + MainAVIHeader head; + player->GetFileHeader(&head); + head.dwMicroSecPerFrame; + head.dwTotalFrames; + head.dwStreams; + head.dwWidth; + head.dwHeight; + head.dwMicroSecPerFrame; + astream->GetEndPos(), + astream->GetEndTime()); + player->StreamCount(); +#else + StreamInfo*audioinfo; + StreamInfo*videoinfo; + audioinfo = astream->GetStreamInfo(); + videoinfo = vstream->GetStreamInfo(); + videoinfo->GetVideoWidth(); + videoinfo->GetVideoHeight(); + audioinfo->GetAudioSamplesPerSec(); + videoinfo->GetFps(); +#endif + CImage*img = vstream->GetFrame(); + img->ToRGB(); + img->Data(); + img->Bpp(); + img->Width(); + img->Height(); + WAVEFORMATEX wave; + astream->GetAudioFormatInfo(&wave,0); + uint_t a,b; + astream->ReadFrames(0,0,0,a,b); +} +EOF + +ac_link='g++ `avifile-config --cflags` `avifile-config --libs` conftest.$ac_ext -o conftest${ac_exeext}' +if {(eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + echo "$ac_t""yes" 1>&6 + AVIFILE=true + export AVIFILE + cat >> confdefs.h <&5 + cat conftest.$ac_ext >&5 + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +avi2swf="avi2swf/Makefile" +if test "x${AVIFILE}" != "xtrue"; then + echo "* Couldn't compile the avifile test program." + echo "* Disabling avi2swf tool..." + echo all: > avi2swf/Makefile + echo install: >> avi2swf/Makefile + echo clean: >> avi2swf/Makefile + avi2swf= +fi if test "x${UNCOMPRESS}" = "xgzip"; then cat >> confdefs.h <