comparison configure @ 13612:c0bde085511c

Zeta OS support, mostly working.
author reimar
date Mon, 11 Oct 2004 19:26:13 +0000
parents fc357e2c7328
children 18ea4c8f35a9
comparison
equal deleted inserted replaced
13611:e0720270e0e1 13612:c0bde085511c
68 darwin() { issystem "Darwin" ; return "$?" ; } 68 darwin() { issystem "Darwin" ; return "$?" ; }
69 gnu() { issystem "GNU" ; return "$?" ; } 69 gnu() { issystem "GNU" ; return "$?" ; }
70 mingw32() { issystem "MINGW32" ; return "$?" ; } 70 mingw32() { issystem "MINGW32" ; return "$?" ; }
71 morphos() { issystem "MorphOS" ; return "$?" ; } 71 morphos() { issystem "MorphOS" ; return "$?" ; }
72 win32() { cygwin || mingw32 ; return "$?" ; } 72 win32() { cygwin || mingw32 ; return "$?" ; }
73 beos() { issystem "BEOS" ; return "$?" ; }
73 74
74 # arch test boolean functions 75 # arch test boolean functions
75 # x86/x86pc is used by QNX 76 # x86/x86pc is used by QNX
76 x86() { 77 x86() {
77 case "$host_arch" in 78 case "$host_arch" in
412 # Determine our OS name and CPU architecture 413 # Determine our OS name and CPU architecture
413 if test -z "$_target" ; then 414 if test -z "$_target" ; then
414 # OS name 415 # OS name
415 system_name=`( uname -s ) 2>&1` 416 system_name=`( uname -s ) 2>&1`
416 case "$system_name" in 417 case "$system_name" in
417 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU) 418 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS)
418 ;; 419 ;;
419 IRIX*) 420 IRIX*)
420 system_name=IRIX 421 system_name=IRIX
421 ;; 422 ;;
422 HP-UX*) 423 HP-UX*)
451 # Maybe uname -m (machine hardware name) returns something we 452 # Maybe uname -m (machine hardware name) returns something we
452 # recognize. 453 # recognize.
453 454
454 # x86/x86pc is used by QNX 455 # x86/x86pc is used by QNX
455 case "`( uname -m ) 2>&1`" in 456 case "`( uname -m ) 2>&1`" in
456 i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;; 457 i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;;
457 ia64) host_arch=ia64 ;; 458 ia64) host_arch=ia64 ;;
458 x86_64|amd64) host_arch=x86_64 ;; 459 x86_64|amd64) host_arch=x86_64 ;;
459 macppc|ppc) host_arch=ppc ;; 460 macppc|ppc) host_arch=ppc ;;
460 alpha) host_arch=alpha ;; 461 alpha) host_arch=alpha ;;
461 sparc) host_arch=sparc ;; 462 sparc) host_arch=sparc ;;
1984 x86 && _vidix=yes 1985 x86 && _vidix=yes
1985 ppc && linux && _vidix=yes 1986 ppc && linux && _vidix=yes
1986 alpha && linux && _vidix=yes 1987 alpha && linux && _vidix=yes
1987 qnx && _vidix=no 1988 qnx && _vidix=no
1988 sunos && _vidix=no 1989 sunos && _vidix=no
1990 beos && _vidix=no
1989 fi 1991 fi
1990 1992
1991 echocheck "mplayer binary name" 1993 echocheck "mplayer binary name"
1992 if win32 ; then 1994 if win32 ; then
1993 _prg="mplayer.exe" 1995 _prg="mplayer.exe"
2051 echores "$_ld_extra" 2053 echores "$_ld_extra"
2052 else 2054 else
2053 echores "none" 2055 echores "none"
2054 fi 2056 fi
2055 2057
2058 echocheck "-lposix"
2059 cat > $TMPC <<EOF
2060 int main(void) { return 0; }
2061 EOF
2062 if cc_check -lposix ; then
2063 _ld_arch="$_ld_arch -lposix"
2064 echores "yes"
2065 else
2066 echores "no"
2067 fi
2068
2069 echocheck "-lm"
2070 cat > $TMPC <<EOF
2071 int main(void) { return 0; }
2072 EOF
2073 if cc_check -lm ; then
2074 _ld_lm="-lm"
2075 echores "yes"
2076 else
2077 _ld_lm=""
2078 echores "no"
2079 fi
2056 2080
2057 # Checking for localization ... 2081 # Checking for localization ...
2058 # CSAK EGY MARADHAT - A HEGYLAKO 2082 # CSAK EGY MARADHAT - A HEGYLAKO
2059 echocheck "i18n" 2083 echocheck "i18n"
2060 if test "$_i18n" != no ; then 2084 if test "$_i18n" != no ; then
2138 ; 2162 ;
2139 } 2163 }
2140 } 2164 }
2141 EOF 2165 EOF
2142 _iconv=no 2166 _iconv=no
2143 if cc_check -lm ; then 2167 if cc_check $_ld_lm ; then
2144 _iconv=yes 2168 _iconv=yes
2145 elif cc_check -lm -liconv ; then 2169 elif cc_check $_ld_lm -liconv ; then
2146 _iconv=yes 2170 _iconv=yes
2147 _ld_iconv='-liconv' 2171 _ld_iconv='-liconv'
2148 fi 2172 fi
2149 fi 2173 fi
2150 if test "$_iconv" = yes ; then 2174 if test "$_iconv" = yes ; then
2268 cat > $TMPC << EOF 2292 cat > $TMPC << EOF
2269 #include <math.h> 2293 #include <math.h>
2270 int main(void) { (void) lrintf(0.0); return 0; } 2294 int main(void) { (void) lrintf(0.0); return 0; }
2271 EOF 2295 EOF
2272 _lrintf=no 2296 _lrintf=no
2273 cc_check -lm && _lrintf=yes 2297 cc_check $_ld_lm && _lrintf=yes
2274 if test "$_lrintf" = yes ; then 2298 if test "$_lrintf" = yes ; then
2275 _def_lrintf="#define HAVE_LRINTF 1" 2299 _def_lrintf="#define HAVE_LRINTF 1"
2276 else 2300 else
2277 _def_lrintf="#undef HAVE_LRINTF" 2301 _def_lrintf="#undef HAVE_LRINTF"
2278 fi 2302 fi
2295 echores "$_nanosleep" 2319 echores "$_nanosleep"
2296 2320
2297 2321
2298 echocheck "socklib" 2322 echocheck "socklib"
2299 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl): 2323 # for Solaris (socket stuff is in -lsocket, gethostbyname and friends in -lnsl):
2324 # for BeOS (socket stuff is in -lsocket, gethostbyname and friends in -lbind):
2300 cat > $TMPC << EOF 2325 cat > $TMPC << EOF
2301 #include <netdb.h> 2326 #include <netdb.h>
2302 int main(void) { (void) gethostbyname(0); return 0; } 2327 int main(void) { (void) gethostbyname(0); return 0; }
2303 EOF 2328 EOF
2304 cc_check -lsocket && _ld_sock="-lsocket" 2329 cc_check -lsocket && _ld_sock="-lsocket"
2305 cc_check -lnsl && _ld_sock="-lnsl" 2330 cc_check -lnsl && _ld_sock="-lnsl"
2306 cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl" 2331 cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl"
2307 cc_check -lsocket -ldnet && _ld_sock="-lsocket -ldnet" 2332 cc_check -lsocket -ldnet && _ld_sock="-lsocket -ldnet"
2333 cc_check -lsocket -lbind && _ld_sock="-lsocket -lbind"
2308 if test $_winsock2 = auto && not cygwin ; then 2334 if test $_winsock2 = auto && not cygwin ; then
2309 _winsock2=no 2335 _winsock2=no
2310 cat > $TMPC << EOF 2336 cat > $TMPC << EOF
2311 #include <winsock2.h> 2337 #include <winsock2.h>
2312 int main(void) { (void) gethostbyname(0); return 0; } 2338 int main(void) { (void) gethostbyname(0); return 0; }
2937 else 2963 else
2938 _def_vsscanf='#undef HAVE_VSSCANF' 2964 _def_vsscanf='#undef HAVE_VSSCANF'
2939 fi 2965 fi
2940 echores "$_vsscanf" 2966 echores "$_vsscanf"
2941 2967
2968
2969 echocheck "swab()"
2970 cat > $TMPC << EOF
2971 #include <unistd.h>
2972 int main(void) { swab(0, 0, 0); return 0; }
2973 EOF
2974 _swab=no
2975 cc_check && _swab=yes
2976 if test "$_swab" = yes ; then
2977 _def_swab='#define HAVE_SWAB 1'
2978 else
2979 _def_swab='#undef HAVE_SWAB'
2980 fi
2981 echores "$_swab"
2942 2982
2943 echocheck "posix select()" 2983 echocheck "posix select()"
2944 cat > $TMPC << EOF 2984 cat > $TMPC << EOF
2945 #include <stdio.h> 2985 #include <stdio.h>
2946 #include <stdlib.h> 2986 #include <stdlib.h>
3466 cat > $TMPC << EOF 3506 cat > $TMPC << EOF
3467 #include <GL/gl.h> 3507 #include <GL/gl.h>
3468 int main(void) { return 0; } 3508 int main(void) { return 0; }
3469 EOF 3509 EOF
3470 _gl=no 3510 _gl=no
3471 if cc_check $_inc_x11 $_ld_x11 -lGL -lm ; then 3511 if cc_check $_inc_x11 $_ld_x11 -lGL $_ld_lm ; then
3472 _gl=yes 3512 _gl=yes
3473 _ld_gl="-lGL" 3513 _ld_gl="-lGL"
3474 elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then 3514 elif cc_check $_inc_x11 $_ld_x11 -lGL $_ld_lm $_ld_pthread ; then
3475 _gl=yes 3515 _gl=yes
3476 _ld_gl="-lGL $_ld_pthread" 3516 _ld_gl="-lGL $_ld_pthread"
3477 elif cc_check -lopengl32 ; then 3517 elif cc_check -lopengl32 ; then
3478 _gl=yes 3518 _gl=yes
3479 _gl_win32=yes 3519 _gl_win32=yes
3619 #include <vga.h> 3659 #include <vga.h>
3620 #include <vgagl.h> 3660 #include <vgagl.h>
3621 int main(void) { return 0; } 3661 int main(void) { return 0; }
3622 EOF 3662 EOF
3623 _svga=no 3663 _svga=no
3624 cc_check -lvgagl -lvga -lm && _svga=yes 3664 cc_check -lvgagl -lvga $_ld_lm && _svga=yes
3625 fi 3665 fi
3626 if test "$_svga" = yes ; then 3666 if test "$_svga" = yes ; then
3627 _def_svga='#define HAVE_SVGALIB 1' 3667 _def_svga='#define HAVE_SVGALIB 1'
3628 _ld_svga='-lvgagl -lvga -lm' 3668 _ld_svga="-lvgagl -lvga $_ld_lm"
3629 _vosrc="$_vosrc vo_svga.c" 3669 _vosrc="$_vosrc vo_svga.c"
3630 _vomodules="svga $_vomodules" 3670 _vomodules="svga $_vomodules"
3631 else 3671 else
3632 _def_svga='#undef HAVE_SVGALIB' 3672 _def_svga='#undef HAVE_SVGALIB'
3633 _novomodules="svga $_novomodules" 3673 _novomodules="svga $_novomodules"
3764 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING); 3804 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
3765 printf("libpng: %s\n", png_libpng_ver); 3805 printf("libpng: %s\n", png_libpng_ver);
3766 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver)); 3806 return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
3767 } 3807 }
3768 EOF 3808 EOF
3769 if cc_check -lpng -lz -lm ; then 3809 if cc_check -lpng -lz $_ld_lm ; then
3770 if "$TMPO" >> "$TMPLOG" ; then 3810 if "$TMPO" >> "$TMPLOG" ; then
3771 _png=yes 3811 _png=yes
3772 echores yes 3812 echores yes
3773 else 3813 else
3774 echores "no (mismatch of library and header versions)" 3814 echores "no (mismatch of library and header versions)"
3803 #include <jpeglib.h> 3843 #include <jpeglib.h>
3804 int main(void) { 3844 int main(void) {
3805 return 0; 3845 return 0;
3806 } 3846 }
3807 EOF 3847 EOF
3808 if cc_check -ljpeg -lm ; then 3848 if cc_check -ljpeg $_ld_lm ; then
3809 if "$TMPO" >> "$TMPLOG" ; then 3849 if "$TMPO" >> "$TMPLOG" ; then
3810 _jpg=yes 3850 _jpg=yes
3811 fi 3851 fi
3812 fi 3852 fi
3813 fi 3853 fi
4062 cat > $TMPC << EOF 4102 cat > $TMPC << EOF
4063 #include <audio/audiolib.h> 4103 #include <audio/audiolib.h>
4064 int main(void) { return 0; } 4104 int main(void) { return 0; }
4065 EOF 4105 EOF
4066 _nas=no 4106 _nas=no
4067 cc_check -laudio $_inc_x11 -lXt $_ld_x11 -lm && _nas=yes 4107 cc_check -laudio $_inc_x11 -lXt $_ld_x11 $_ld_lm && _nas=yes
4068 fi 4108 fi
4069 if test "$_nas" = yes ; then 4109 if test "$_nas" = yes ; then
4070 _def_nas='#define HAVE_NAS 1' 4110 _def_nas='#define HAVE_NAS 1'
4071 _ld_nas="-laudio -lXt $_ld_x11" 4111 _ld_nas="-laudio -lXt $_ld_x11"
4072 _aosrc="$_aosrc ao_nas.c" 4112 _aosrc="$_aosrc ao_nas.c"
4624 #include <cdda_paranoia.h> 4664 #include <cdda_paranoia.h>
4625 // This need a better test. How ? 4665 // This need a better test. How ?
4626 int main(void) { return 1; } 4666 int main(void) { return 1; }
4627 EOF 4667 EOF
4628 _cdparanoia=no 4668 _cdparanoia=no
4629 if cc_check $_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia -lm ; then 4669 if cc_check $_inc_cdparanoia $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then
4630 _cdparanoia=yes 4670 _cdparanoia=yes
4631 else 4671 else
4632 for I in /usr/include/cdda /usr/local/include/cdda ; do 4672 for I in /usr/include/cdda /usr/local/include/cdda ; do
4633 if cc_check -I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia -lm ; then 4673 if cc_check -I$I $_ld_cdparanoia -lcdda_interface -lcdda_paranoia $_ld_lm ; then
4634 _cdparanoia=yes; _inc_cdparanoia="-I$I"; break 4674 _cdparanoia=yes; _inc_cdparanoia="-I$I"; break
4635 fi 4675 fi
4636 done 4676 done
4637 fi 4677 fi
4638 fi 4678 fi
4877 _toolame_extraflags="" 4917 _toolame_extraflags=""
4878 _toolame_lib="-ltoolame" 4918 _toolame_lib="-ltoolame"
4879 if test -n "$_toolamedir"; then 4919 if test -n "$_toolamedir"; then
4880 _toolame_extraflags="-I$_toolamedir -L$_toolamedir" 4920 _toolame_extraflags="-I$_toolamedir -L$_toolamedir"
4881 fi 4921 fi
4882 cc_check $_toolame_extraflags $_toolame_lib -lm && _toolame=yes 4922 cc_check $_toolame_extraflags $_toolame_lib $_ld_lm && _toolame=yes
4883 fi 4923 fi
4884 if test "$_toolame" = yes ; then 4924 if test "$_toolame" = yes ; then
4885 _def_toolame='#define HAVE_TOOLAME 1' 4925 _def_toolame='#define HAVE_TOOLAME 1'
4886 _codecmodules="$_codecmodules toolame" 4926 _codecmodules="$_codecmodules toolame"
4887 else 4927 else
4900 _vorbis=no 4940 _vorbis=no
4901 cat > $TMPC << EOF 4941 cat > $TMPC << EOF
4902 #include <vorbis/codec.h> 4942 #include <vorbis/codec.h>
4903 int main(void) { vorbis_packet_blocksize(0,0); return 0; } 4943 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
4904 EOF 4944 EOF
4905 cc_check -lvorbis -logg -lm && _vorbis=yes 4945 cc_check -lvorbis -logg $_ld_lm && _vorbis=yes
4906 fi 4946 fi
4907 if test "$_vorbis" = yes ; then 4947 if test "$_vorbis" = yes ; then
4908 _def_vorbis='#define HAVE_OGGVORBIS 1' 4948 _def_vorbis='#define HAVE_OGGVORBIS 1'
4909 if test "$_tremor" = yes ; then 4949 if test "$_tremor" = yes ; then
4910 _def_tremor='#define TREMOR 1' 4950 _def_tremor='#define TREMOR 1'
4960 theora_clear (&st); 5000 theora_clear (&st);
4961 5001
4962 return 0; 5002 return 0;
4963 } 5003 }
4964 EOF 5004 EOF
4965 cc_check -ltheora -logg -lm && _theora=yes 5005 cc_check -ltheora -logg $_ld_lm && _theora=yes
4966 fi 5006 fi
4967 if test "$_theora" = yes ; then 5007 if test "$_theora" = yes ; then
4968 _def_theora='#define HAVE_OGGTHEORA 1' 5008 _def_theora='#define HAVE_OGGTHEORA 1'
4969 _codecmodules="libtheora $_codecmodules" 5009 _codecmodules="libtheora $_codecmodules"
4970 _ld_theora="-ltheora -logg" 5010 _ld_theora="-ltheora -logg"
5000 cat > $TMPC << EOF 5040 cat > $TMPC << EOF
5001 #include <stdint.h> 5041 #include <stdint.h>
5002 #include <dts.h> 5042 #include <dts.h>
5003 int main(void) { dts_init (0); return 0; } 5043 int main(void) { dts_init (0); return 0; }
5004 EOF 5044 EOF
5005 cc_check $_inc_libdts $_ld_libdts -ldts -lm && _libdts=yes 5045 cc_check $_inc_libdts $_ld_libdts -ldts $_ld_lm && _libdts=yes
5006 fi 5046 fi
5007 if test "$_libdts" = yes ; then 5047 if test "$_libdts" = yes ; then
5008 _def_libdts='#define CONFIG_DTS 1' 5048 _def_libdts='#define CONFIG_DTS 1'
5009 _ld_libdts="$_ld_libdts -ldts -lm" 5049 _ld_libdts="$_ld_libdts -ldts $_ld_lm"
5010 _codecmodules="libdts $_codecmodules" 5050 _codecmodules="libdts $_codecmodules"
5011 else 5051 else
5012 _def_libdts='#undef CONFIG_DTS' 5052 _def_libdts='#undef CONFIG_DTS'
5013 _nocodecmodules="libdts $_nocodecmodules" 5053 _nocodecmodules="libdts $_nocodecmodules"
5014 fi 5054 fi
5070 _faad_external=no 5110 _faad_external=no
5071 cat > $TMPC << EOF 5111 cat > $TMPC << EOF
5072 #include <faad.h> 5112 #include <faad.h>
5073 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; } 5113 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; }
5074 EOF 5114 EOF
5075 cc_check $_inc_faad $_ld_faad -lm && _faad_external=yes 5115 cc_check $_inc_faad $_ld_faad $_ld_lm && _faad_external=yes
5076 fi 5116 fi
5077 echores "$_faad_external" 5117 echores "$_faad_external"
5078 else 5118 else
5079 echores "no" 5119 echores "no"
5080 fi 5120 fi
5093 printf("1.0\n"); 5133 printf("1.0\n");
5094 #endif 5134 #endif
5095 return 0; 5135 return 0;
5096 } 5136 }
5097 EOF 5137 EOF
5098 if cc_check -I- $_inc_faad $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then 5138 if cc_check -I- $_inc_faad $_ld_faad $_ld_lm && "$TMPO" >> "$TMPLOG" ; then
5099 _faad_version=`"$TMPO"` 5139 _faad_version=`"$TMPO"`
5100 _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'` 5140 _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'`
5101 _def_faad_version="#define FAADVERSION $_faad_tempversion" 5141 _def_faad_version="#define FAADVERSION $_faad_tempversion"
5102 echores "$_faad_version" 5142 echores "$_faad_version"
5103 else 5143 else
5415 int main(void) { 5455 int main(void) {
5416 avcodec_find_encoder_by_name(""); 5456 avcodec_find_encoder_by_name("");
5417 return 0; 5457 return 0;
5418 } 5458 }
5419 EOF 5459 EOF
5420 if cc_check -lavcodec -lm ; then 5460 if cc_check -lavcodec $_ld_lm ; then
5421 _libavcodecso=yes 5461 _libavcodecso=yes
5422 echores "yes (using libavcodec.so)" 5462 echores "yes (using libavcodec.so)"
5423 else 5463 else
5424 echores "no (libavcodec.so is broken/obsolete)" 5464 echores "no (libavcodec.so is broken/obsolete)"
5425 fi 5465 fi
5462 _libdv=no 5502 _libdv=no
5463 cat > $TMPC <<EOF 5503 cat > $TMPC <<EOF
5464 #include <libdv/dv.h> 5504 #include <libdv/dv.h>
5465 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; } 5505 int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
5466 EOF 5506 EOF
5467 cc_check -ldv -lm && _libdv=yes 5507 cc_check -ldv $_ld_lm && _libdv=yes
5468 fi 5508 fi
5469 if test "$_libdv" = yes ; then 5509 if test "$_libdv" = yes ; then
5470 _def_libdv='#define HAVE_LIBDV095 1' 5510 _def_libdv='#define HAVE_LIBDV095 1'
5471 _ld_libdv="-ldv" 5511 _ld_libdv="-ldv"
5472 _codecmodules="libdv $_codecmodules" 5512 _codecmodules="libdv $_codecmodules"
5517 echocheck "XviD" 5557 echocheck "XviD"
5518 cat > $TMPC << EOF 5558 cat > $TMPC << EOF
5519 #include <xvid.h> 5559 #include <xvid.h>
5520 int main(void) { xvid_init(0, 0, 0, 0); return 0; } 5560 int main(void) { xvid_init(0, 0, 0, 0); return 0; }
5521 EOF 5561 EOF
5522 _ld_xvid="$_ld_xvid -lxvidcore -lm" 5562 _ld_xvid="$_ld_xvid -lxvidcore $_ld_lm"
5523 if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid ; then 5563 if test "$_xvid" != no && cc_check $_inc_xvid $_ld_xvid ; then
5524 _xvid=yes 5564 _xvid=yes
5525 _def_xvid3='#define HAVE_XVID3 1' 5565 _def_xvid3='#define HAVE_XVID3 1'
5526 _def_xvid4='#undef HAVE_XVID4' 5566 _def_xvid4='#undef HAVE_XVID4'
5527 _codecmodules="xvid $_codecmodules" 5567 _codecmodules="xvid $_codecmodules"
5552 echocheck "DivX4 compatibility in XviD" 5592 echocheck "DivX4 compatibility in XviD"
5553 cat > $TMPC << EOF 5593 cat > $TMPC << EOF
5554 #include <divx4.h> 5594 #include <divx4.h>
5555 int main(void) { (void) decore(0, 0, 0, 0); return 0; } 5595 int main(void) { (void) decore(0, 0, 0, 0); return 0; }
5556 EOF 5596 EOF
5557 cc_check -lm "$_ld_xvid" && _xvidcompat=yes 5597 cc_check $_ld_lm "$_ld_xvid" && _xvidcompat=yes
5558 echores "$_xvidcompat" 5598 echores "$_xvidcompat"
5559 fi 5599 fi
5560 5600
5561 echocheck "x264" 5601 echocheck "x264"
5562 cat > $TMPC << EOF 5602 cat > $TMPC << EOF
5563 #include <stdint.h> 5603 #include <stdint.h>
5564 #include <stdarg.h> 5604 #include <stdarg.h>
5565 #include <x264.h> 5605 #include <x264.h>
5566 int main(void) { x264_encoder_open((void*)0); return 0; } 5606 int main(void) { x264_encoder_open((void*)0); return 0; }
5567 EOF 5607 EOF
5568 _ld_x264="$_ld_x264 -lx264 -lm" 5608 _ld_x264="$_ld_x264 -lx264 $_ld_lm"
5569 if test "$_x264" != no && cc_check $_inc_x264 $_ld_x264 ; then 5609 if test "$_x264" != no && cc_check $_inc_x264 $_ld_x264 ; then
5570 _x264=yes 5610 _x264=yes
5571 _def_x264='#define HAVE_X264 1' 5611 _def_x264='#define HAVE_X264 1'
5572 _codecmodules="x264 $_codecmodules" 5612 _codecmodules="x264 $_codecmodules"
5573 else 5613 else
5582 # DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311 5622 # DivX5: DEC_OPT_MEMORY_REQS - DivX4: DEC_OPT_FRAME_311
5583 cat > $TMPC << EOF 5623 cat > $TMPC << EOF
5584 #include <decore.h> 5624 #include <decore.h>
5585 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; } 5625 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_FRAME_311; }
5586 EOF 5626 EOF
5587 if test "$_divx4linux" != no && cc_check -lm -ldivxdecore -lm ; then 5627 if test "$_divx4linux" != no && cc_check $_ld_lm -ldivxdecore ; then
5588 _opendivx=no 5628 _opendivx=no
5589 _ld_decore='-ldivxdecore' 5629 _ld_decore='-ldivxdecore'
5590 _def_decore='#define NEW_DECORE 1' 5630 _def_decore='#define NEW_DECORE 1'
5591 _def_divx='#define USE_DIVX' 5631 _def_divx='#define USE_DIVX'
5592 _def_divx5='#undef DECORE_DIVX5' 5632 _def_divx5='#undef DECORE_DIVX5'
5600 # ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o 5640 # ld: Warning: type of symbol `dering' changed from 1 to 2 in opendivx/postprocess.o
5601 cat > $TMPC << EOF 5641 cat > $TMPC << EOF
5602 #include <decore.h> 5642 #include <decore.h>
5603 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; } 5643 int main(void) { (void) decore(0, 0, 0, 0); return DEC_OPT_INIT; }
5604 EOF 5644 EOF
5605 if test "$_divx4linux" != no && cc_check -lm -ldivxdecore -lm ; then 5645 if test "$_divx4linux" != no && cc_check $_ld_lm -ldivxdecore ; then
5606 _opendivx=no 5646 _opendivx=no
5607 # _ld_decore='-ldivxdecore opendivx/postprocess.o' 5647 # _ld_decore='-ldivxdecore opendivx/postprocess.o'
5608 _ld_decore='-ldivxdecore' 5648 _ld_decore='-ldivxdecore'
5609 _def_decore='#define NEW_DECORE 1' 5649 _def_decore='#define NEW_DECORE 1'
5610 _def_divx='#define USE_DIVX' 5650 _def_divx='#define USE_DIVX'
5655 cat > $TMPC <<EOF 5695 cat > $TMPC <<EOF
5656 #include <lame/lame.h> 5696 #include <lame/lame.h>
5657 int main(void) { lame_version_t lv; (void) lame_init(); get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor); return 0; } 5697 int main(void) { lame_version_t lv; (void) lame_init(); get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor); return 0; }
5658 EOF 5698 EOF
5659 # Note: libmp3lame usually depends on vorbis 5699 # Note: libmp3lame usually depends on vorbis
5660 cc_check -lmp3lame $_ld_vorbis -lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame=yes 5700 cc_check -lmp3lame $_ld_vorbis $_ld_lm && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _mp3lame=yes
5661 if test "$_mp3lame" = yes ; then 5701 if test "$_mp3lame" = yes ; then
5662 _def_mp3lame="#define HAVE_MP3LAME `$TMPO`" 5702 _def_mp3lame="#define HAVE_MP3LAME `$TMPO`"
5663 _def_cfg_mp3lame="#define CONFIG_MP3LAME `$TMPO`" 5703 _def_cfg_mp3lame="#define CONFIG_MP3LAME `$TMPO`"
5664 _ld_mp3lame="-lmp3lame $_ld_vorbis" 5704 _ld_mp3lame="-lmp3lame $_ld_vorbis"
5665 else 5705 else
5672 echocheck "DivX4linux encore (for mencoder)" 5712 echocheck "DivX4linux encore (for mencoder)"
5673 cat > $TMPC << EOF 5713 cat > $TMPC << EOF
5674 #include <encore2.h> 5714 #include <encore2.h>
5675 int main(void) { (void) encore(0, 0, 0, 0); return 0; } 5715 int main(void) { (void) encore(0, 0, 0, 0); return 0; }
5676 EOF 5716 EOF
5677 if test "$_divx4linux" != no && cc_check -ldivxencore -lm ; then 5717 if test "$_divx4linux" != no && cc_check -ldivxencore $_ld_lm ; then
5678 _def_encore='#define HAVE_DIVX4ENCORE 1' 5718 _def_encore='#define HAVE_DIVX4ENCORE 1'
5679 _ld_encore='-ldivxencore' 5719 _ld_encore='-ldivxencore'
5680 echores "DivX4linux (with libdivxencore.so)" 5720 echores "DivX4linux (with libdivxencore.so)"
5681 elif test "$_xvidcompat" = yes ; then 5721 elif test "$_xvidcompat" = yes ; then
5682 _def_encore='#define HAVE_DIVX4ENCORE 1' 5722 _def_encore='#define HAVE_DIVX4ENCORE 1'
5829 _ftp=no 5869 _ftp=no
5830 fi 5870 fi
5831 echores "$_network" 5871 echores "$_network"
5832 5872
5833 echocheck "ftp" 5873 echocheck "ftp"
5834 if test "$_ftp" != no ; then 5874 if (not beos) && (test "$_ftp" != no) ; then
5835 _def_ftp='#define HAVE_FTP 1' 5875 _def_ftp='#define HAVE_FTP 1'
5836 _inputmodules="ftp $_inputmodules" 5876 _inputmodules="ftp $_inputmodules"
5837 else 5877 else
5838 _noinputmodules="ftp $_noinputmodules" 5878 _noinputmodules="ftp $_noinputmodules"
5839 _def_ftp='#undef HAVE_FTP' 5879 _def_ftp='#undef HAVE_FTP'
6126 # dvdread support requires this (for off64_t) 6166 # dvdread support requires this (for off64_t)
6127 CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" 6167 CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
6128 fi 6168 fi
6129 fi 6169 fi
6130 6170
6171 echocheck "compiler support for -fno-PIC"
6172 cat > $TMPC <<EOF
6173 int main(void) { return 0; }
6174 EOF
6175 if cc_check -fno-PIC ; then
6176 CFLAGS="-fno-PIC $CFLAGS"
6177 echores "yes"
6178 else
6179 echores "no"
6180 fi
6181
6131 echocheck "ftello()" 6182 echocheck "ftello()"
6132 # if we don't have ftello use the osdep/ compatibility module 6183 # if we don't have ftello use the osdep/ compatibility module
6133 cat > $TMPC << EOF 6184 cat > $TMPC << EOF
6134 #include <stdio.h> 6185 #include <stdio.h>
6135 #include <sys/types.h> 6186 #include <sys/types.h>
6309 HAVE_MLIB = $_mlib 6360 HAVE_MLIB = $_mlib
6310 WIN32_LIB = $_ld_win32libs 6361 WIN32_LIB = $_ld_win32libs
6311 STATIC_LIB = $_ld_static 6362 STATIC_LIB = $_ld_static
6312 ENCA_LIB = $_ld_enca 6363 ENCA_LIB = $_ld_enca
6313 HAVE_PTHREADS = $_pthreads 6364 HAVE_PTHREADS = $_pthreads
6365 MATH_LIB = $_ld_lm
6314 6366
6315 X11_INC = $_inc_x11 6367 X11_INC = $_inc_x11
6316 X11DIR = $_ld_x11 6368 X11DIR = $_ld_x11
6317 6369
6318 HAVE_XVMC_ACCEL = $_xvmc 6370 HAVE_XVMC_ACCEL = $_xvmc
6657 $_def_localtime_r 6709 $_def_localtime_r
6658 6710
6659 /* Define this if your system has vsscanf */ 6711 /* Define this if your system has vsscanf */
6660 $_def_vsscanf 6712 $_def_vsscanf
6661 6713
6714 /* Define this if your system has swab */
6715 $_def_swab
6716
6662 /* Define this if your system has no posix select */ 6717 /* Define this if your system has no posix select */
6663 $_def_no_posix_select 6718 $_def_no_posix_select
6664 6719
6665 /* Define this if your system has gettimeofday */ 6720 /* Define this if your system has gettimeofday */
6666 $_def_gettimeofday 6721 $_def_gettimeofday