comparison configure @ 26633:f2c7d68935d4

cosmetics: Consistently compactify and reformat test programs.
author diego
date Sat, 03 May 2008 20:03:36 +0000
parents 80db5294fe36
children e183e2464abc
comparison
equal deleted inserted replaced
26632:f8d680caa86f 26633:f2c7d68935d4
1552 if test "$1" = kernel_check ; then 1552 if test "$1" = kernel_check ; then
1553 echocheck "kernel support of $2" 1553 echocheck "kernel support of $2"
1554 cat > $TMPC <<EOF 1554 cat > $TMPC <<EOF
1555 #include <signal.h> 1555 #include <signal.h>
1556 void catch() { exit(1); } 1556 void catch() { exit(1); }
1557 int main(void){ 1557 int main(void) {
1558 signal(SIGILL, catch); 1558 signal(SIGILL, catch);
1559 __asm__ __volatile__ ("$3":::"memory");return(0); 1559 __asm__ __volatile__ ("$3":::"memory");return(0);
1560 } 1560 }
1561 EOF 1561 EOF
1562 1562
2410 2410
2411 echocheck "GCC altivec support" 2411 echocheck "GCC altivec support"
2412 2412
2413 p='' 2413 p=''
2414 cat > $TMPC << EOF 2414 cat > $TMPC << EOF
2415 int main(void) { 2415 int main(void) { return 0; }
2416 return 0;
2417 }
2418 EOF 2416 EOF
2419 FSF_flags='-maltivec -mabi=altivec' 2417 FSF_flags='-maltivec -mabi=altivec'
2420 Darwin_flags='-faltivec' 2418 Darwin_flags='-faltivec'
2421 2419
2422 # check for Darwin-style flags first, since gcc-3.3 (August Update 2420 # check for Darwin-style flags first, since gcc-3.3 (August Update
2480 2478
2481 if arm ; then 2479 if arm ; then
2482 echocheck "ARMv5TE (Enhanced DSP Extensions)" 2480 echocheck "ARMv5TE (Enhanced DSP Extensions)"
2483 if test $_armv5te = "auto" ; then 2481 if test $_armv5te = "auto" ; then
2484 cat > $TMPC << EOF 2482 cat > $TMPC << EOF
2485 int main(void) { 2483 int main(void) { __asm__ __volatile__ ("qadd r0, r0, r0"); }
2486 __asm__ __volatile__ ("qadd r0, r0, r0");
2487 }
2488 EOF 2484 EOF
2489 _armv5te=no 2485 _armv5te=no
2490 cc_check && _armv5te=yes 2486 cc_check && _armv5te=yes
2491 fi 2487 fi
2492 echores "$_armv5te" 2488 echores "$_armv5te"
2502 echores "$_armv6" 2498 echores "$_armv6"
2503 2499
2504 echocheck "iWMMXt (Intel XScale SIMD instructions)" 2500 echocheck "iWMMXt (Intel XScale SIMD instructions)"
2505 if test $_iwmmxt = "auto" ; then 2501 if test $_iwmmxt = "auto" ; then
2506 cat > $TMPC << EOF 2502 cat > $TMPC << EOF
2507 int main(void) { 2503 int main(void) { __asm__ __volatile__ ("wunpckelub wr6, wr4"); }
2508 __asm__ __volatile__ ("wunpckelub wr6, wr4");
2509 }
2510 EOF 2504 EOF
2511 _iwmmxt=no 2505 _iwmmxt=no
2512 cc_check && _iwmmxt=yes 2506 cc_check && _iwmmxt=yes
2513 fi 2507 fi
2514 echores "$_iwmmxt" 2508 echores "$_iwmmxt"
2648 echores "$_runtime_cpudetection" 2642 echores "$_runtime_cpudetection"
2649 2643
2650 2644
2651 echocheck "restrict keyword" 2645 echocheck "restrict keyword"
2652 for restrict_keyword in restrict __restrict __restrict__ ; do 2646 for restrict_keyword in restrict __restrict __restrict__ ; do
2653 echo "void foo(char * $restrict_keyword p); int main(void){}" > $TMPC 2647 echo "void foo(char * $restrict_keyword p); int main(void) {}" > $TMPC
2654 if cc_check; then 2648 if cc_check; then
2655 _def_restrict_keyword=$restrict_keyword 2649 _def_restrict_keyword=$restrict_keyword
2656 break; 2650 break;
2657 fi 2651 fi
2658 done 2652 done
2942 2936
2943 echocheck "memalign()" 2937 echocheck "memalign()"
2944 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ? 2938 # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
2945 cat > $TMPC << EOF 2939 cat > $TMPC << EOF
2946 #include <malloc.h> 2940 #include <malloc.h>
2947 int main (void) { (void) memalign(64, sizeof(char)); return 0; } 2941 int main(void) { (void) memalign(64, sizeof(char)); return 0; }
2948 EOF 2942 EOF
2949 _memalign=no 2943 _memalign=no
2950 cc_check && _memalign=yes 2944 cc_check && _memalign=yes
2951 if test "$_memalign" = yes ; then 2945 if test "$_memalign" = yes ; then
2952 _def_memalign='#define HAVE_MEMALIGN 1' 2946 _def_memalign='#define HAVE_MEMALIGN 1'
3265 3259
3266 3260
3267 if sunos; then 3261 if sunos; then
3268 echocheck "userspace SCSI headers (Solaris)" 3262 echocheck "userspace SCSI headers (Solaris)"
3269 cat > $TMPC << EOF 3263 cat > $TMPC << EOF
3270 # include <unistd.h> 3264 #include <unistd.h>
3271 # include <stropts.h> 3265 #include <stropts.h>
3272 # include <sys/scsi/scsi_types.h> 3266 #include <sys/scsi/scsi_types.h>
3273 # include <sys/scsi/impl/uscsi.h> 3267 #include <sys/scsi/impl/uscsi.h>
3274 int main(void) { return 0; } 3268 int main(void) { return 0; }
3275 EOF 3269 EOF
3276 _sol_scsi_h=no 3270 _sol_scsi_h=no
3277 cc_check && _sol_scsi_h=yes 3271 cc_check && _sol_scsi_h=yes
3278 if test "$_sol_scsi_h" = yes ; then 3272 if test "$_sol_scsi_h" = yes ; then
3349 3343
3350 3344
3351 echocheck "strsep()" 3345 echocheck "strsep()"
3352 cat > $TMPC << EOF 3346 cat > $TMPC << EOF
3353 #include <string.h> 3347 #include <string.h>
3354 int main (void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; } 3348 int main(void) { char *s = "Hello, world!"; (void) strsep(&s, ","); return 0; }
3355 EOF 3349 EOF
3356 _strsep=no 3350 _strsep=no
3357 cc_check && _strsep=yes 3351 cc_check && _strsep=yes
3358 if test "$_strsep" = yes ; then 3352 if test "$_strsep" = yes ; then
3359 _def_strsep='#define HAVE_STRSEP 1' 3353 _def_strsep='#define HAVE_STRSEP 1'
3453 3447
3454 3448
3455 echocheck "setenv()" 3449 echocheck "setenv()"
3456 cat > $TMPC << EOF 3450 cat > $TMPC << EOF
3457 #include <stdlib.h> 3451 #include <stdlib.h>
3458 int main (void){ setenv("","",0); return 0; } 3452 int main(void) { setenv("","",0); return 0; }
3459 EOF 3453 EOF
3460 _setenv=no 3454 _setenv=no
3461 cc_check && _setenv=yes 3455 cc_check && _setenv=yes
3462 if test "$_setenv" = yes ; then 3456 if test "$_setenv" = yes ; then
3463 _def_setenv='#define HAVE_SETENV 1' 3457 _def_setenv='#define HAVE_SETENV 1'
3471 3465
3472 if sunos; then 3466 if sunos; then
3473 echocheck "sysi86()" 3467 echocheck "sysi86()"
3474 cat > $TMPC << EOF 3468 cat > $TMPC << EOF
3475 #include <sys/sysi86.h> 3469 #include <sys/sysi86.h>
3476 int main (void) { sysi86(0); return 0; } 3470 int main(void) { sysi86(0); return 0; }
3477 EOF 3471 EOF
3478 _sysi86=no 3472 _sysi86=no
3479 cc_check && _sysi86=yes 3473 cc_check && _sysi86=yes
3480 if test "$_sysi86" = yes ; then 3474 if test "$_sysi86" = yes ; then
3481 _def_sysi86='#define HAVE_SYSI86 1' 3475 _def_sysi86='#define HAVE_SYSI86 1'
3482 cat > $TMPC << EOF 3476 cat > $TMPC << EOF
3483 #include <sys/sysi86.h> 3477 #include <sys/sysi86.h>
3484 int main (void) { int sysi86(int, void*); sysi86(0); return 0; } 3478 int main(void) { int sysi86(int, void*); sysi86(0); return 0; }
3485 EOF 3479 EOF
3486 cc_check && _def_sysi86_iv='#define HAVE_SYSI86_iv 1' 3480 cc_check && _def_sysi86_iv='#define HAVE_SYSI86_iv 1'
3487 else 3481 else
3488 _def_sysi86='#undef HAVE_SYSI86' 3482 _def_sysi86='#undef HAVE_SYSI86'
3489 fi 3483 fi
3602 if test "$_apple_remote" = auto ; then 3596 if test "$_apple_remote" = auto ; then
3603 _apple_remote=no 3597 _apple_remote=no
3604 cat > $TMPC <<EOF 3598 cat > $TMPC <<EOF
3605 #include <stdio.h> 3599 #include <stdio.h>
3606 #include <IOKit/IOCFPlugIn.h> 3600 #include <IOKit/IOCFPlugIn.h>
3607 int main (int argc, const char * argv[]) 3601 int main(int argc, const char * argv[])
3608 { 3602 {
3609 io_iterator_t hidObjectIterator = (io_iterator_t)NULL; 3603 io_iterator_t hidObjectIterator = (io_iterator_t)NULL;
3610 CFMutableDictionaryRef hidMatchDictionary; 3604 CFMutableDictionaryRef hidMatchDictionary;
3611 IOReturn ioReturnValue; 3605 IOReturn ioReturnValue;
3612 3606
3723 #include <sys/fbio.h> 3717 #include <sys/fbio.h>
3724 #include <sys/visual_io.h> 3718 #include <sys/visual_io.h>
3725 int main(void) { 3719 int main(void) {
3726 struct vis_identifier ident; 3720 struct vis_identifier ident;
3727 struct fbgattr attr; 3721 struct fbgattr attr;
3728
3729 ioctl(0, VIS_GETIDENTIFIER, &ident); 3722 ioctl(0, VIS_GETIDENTIFIER, &ident);
3730 ioctl(0, FBIOGATTR, &attr); 3723 ioctl(0, FBIOGATTR, &attr);
3731 } 3724 }
3732 EOF 3725 EOF
3733 _xvr100=no 3726 _xvr100=no
3903 echocheck "Xss screensaver extensions" 3896 echocheck "Xss screensaver extensions"
3904 if test "$_xss" = auto ; then 3897 if test "$_xss" = auto ; then
3905 cat > $TMPC << EOF 3898 cat > $TMPC << EOF
3906 #include <X11/Xlib.h> 3899 #include <X11/Xlib.h>
3907 #include <X11/extensions/scrnsaver.h> 3900 #include <X11/extensions/scrnsaver.h>
3908 int main(void) { 3901 int main(void) { XScreenSaverSuspend(NULL, True); return 0; }
3909 XScreenSaverSuspend(NULL, True);
3910 return 0;
3911 }
3912 EOF 3902 EOF
3913 _xss=no 3903 _xss=no
3914 cc_check -lXss && _xss=yes 3904 cc_check -lXss && _xss=yes
3915 fi 3905 fi
3916 if test "$_xss" = yes ; then 3906 if test "$_xss" = yes ; then
3929 #include <X11/Xmd.h> 3919 #include <X11/Xmd.h>
3930 #include <X11/Xlib.h> 3920 #include <X11/Xlib.h>
3931 #include <X11/Xutil.h> 3921 #include <X11/Xutil.h>
3932 #include <X11/Xatom.h> 3922 #include <X11/Xatom.h>
3933 #include <X11/extensions/dpms.h> 3923 #include <X11/extensions/dpms.h>
3934 int main(void) { 3924 int main(void) { (void) DPMSQueryExtension(0, 0, 0); }
3935 (void) DPMSQueryExtension(0, 0, 0);
3936 }
3937 EOF 3925 EOF
3938 cc_check -lXdpms && _xdpms3=yes 3926 cc_check -lXdpms && _xdpms3=yes
3939 cat > $TMPC <<EOF 3927 cat > $TMPC <<EOF
3940 #include <X11/Xlib.h> 3928 #include <X11/Xlib.h>
3941 #include <X11/extensions/dpms.h> 3929 #include <X11/extensions/dpms.h>
3942 int main(void) { 3930 int main(void) { (void) DPMSQueryExtension(0, 0, 0); }
3943 (void) DPMSQueryExtension(0, 0, 0);
3944 }
3945 EOF 3931 EOF
3946 cc_check -lXext && _xdpms4=yes 3932 cc_check -lXext && _xdpms4=yes
3947 fi 3933 fi
3948 if test "$_xdpms4" = yes ; then 3934 if test "$_xdpms4" = yes ; then
3949 _def_xdpms='#define HAVE_XDPMS 1' 3935 _def_xdpms='#define HAVE_XDPMS 1'
4083 echocheck "DGA" 4069 echocheck "DGA"
4084 if test "$_dga2" = auto && test "$_x11" = yes ; then 4070 if test "$_dga2" = auto && test "$_x11" = yes ; then
4085 cat > $TMPC << EOF 4071 cat > $TMPC << EOF
4086 #include <X11/Xlib.h> 4072 #include <X11/Xlib.h>
4087 #include <X11/extensions/xf86dga.h> 4073 #include <X11/extensions/xf86dga.h>
4088 int main (void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; } 4074 int main(void) { (void) XDGASetViewport(0, 0, 0, 0, 0); return 0; }
4089 EOF 4075 EOF
4090 _dga2=no 4076 _dga2=no
4091 cc_check -lXxf86dga && _dga2=yes 4077 cc_check -lXxf86dga && _dga2=yes
4092 fi 4078 fi
4093 if test "$_dga1" = auto && test "$_dga2" = no && test "$_vm" = yes ; then 4079 if test "$_dga1" = auto && test "$_dga2" = no && test "$_vm" = yes ; then
4094 cat > $TMPC << EOF 4080 cat > $TMPC << EOF
4095 #include <X11/Xlib.h> 4081 #include <X11/Xlib.h>
4096 #include <X11/extensions/xf86dga.h> 4082 #include <X11/extensions/xf86dga.h>
4097 int main (void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; } 4083 int main(void) { (void) XF86DGASetViewPort(0, 0, 0, 0); return 0; }
4098 EOF 4084 EOF
4099 _dga1=no 4085 _dga1=no
4100 cc_check -lXxf86dga -lXxf86vm && _dga1=yes 4086 cc_check -lXxf86dga -lXxf86vm && _dga1=yes
4101 fi 4087 fi
4102 4088
4471 #include <sys/poll.h> 4457 #include <sys/poll.h>
4472 #include <sys/ioctl.h> 4458 #include <sys/ioctl.h>
4473 #include <stdio.h> 4459 #include <stdio.h>
4474 #include <time.h> 4460 #include <time.h>
4475 #include <unistd.h> 4461 #include <unistd.h>
4476
4477 #include <ost/dmx.h> 4462 #include <ost/dmx.h>
4478 #include <ost/frontend.h> 4463 #include <ost/frontend.h>
4479 #include <ost/sec.h> 4464 #include <ost/sec.h>
4480 #include <ost/video.h> 4465 #include <ost/video.h>
4481 #include <ost/audio.h> 4466 #include <ost/audio.h>
4502 #include <sys/poll.h> 4487 #include <sys/poll.h>
4503 #include <sys/ioctl.h> 4488 #include <sys/ioctl.h>
4504 #include <stdio.h> 4489 #include <stdio.h>
4505 #include <time.h> 4490 #include <time.h>
4506 #include <unistd.h> 4491 #include <unistd.h>
4507
4508 #include <linux/dvb/dmx.h> 4492 #include <linux/dvb/dmx.h>
4509 #include <linux/dvb/frontend.h> 4493 #include <linux/dvb/frontend.h>
4510 #include <linux/dvb/video.h> 4494 #include <linux/dvb/video.h>
4511 #include <linux/dvb/audio.h> 4495 #include <linux/dvb/audio.h>
4512 int main(void) {return 0;} 4496 int main(void) {return 0;}
4586 #include <stdio.h> 4570 #include <stdio.h>
4587 #include <stdlib.h> 4571 #include <stdlib.h>
4588 #include <setjmp.h> 4572 #include <setjmp.h>
4589 #include <string.h> 4573 #include <string.h>
4590 #include <jpeglib.h> 4574 #include <jpeglib.h>
4591 int main(void) { 4575 int main(void) { return 0; }
4592 return 0;
4593 }
4594 EOF 4576 EOF
4595 if cc_check -ljpeg $_ld_lm ; then 4577 if cc_check -ljpeg $_ld_lm ; then
4596 if tmp_run ; then 4578 if tmp_run ; then
4597 _jpeg=yes 4579 _jpeg=yes
4598 fi 4580 fi
4636 4618
4637 if test "$_gif" = auto ; then 4619 if test "$_gif" = auto ; then
4638 _gif=no 4620 _gif=no
4639 cat > $TMPC << EOF 4621 cat > $TMPC << EOF
4640 #include <gif_lib.h> 4622 #include <gif_lib.h>
4641 int main(void) { 4623 int main(void) { return 0; }
4642 return 0;
4643 }
4644 EOF 4624 EOF
4645 for _ld_gif in "-lungif" "-lgif" ; do 4625 for _ld_gif in "-lungif" "-lgif" ; do
4646 cc_check $_ld_gif && tmp_run && _gif=yes && break 4626 cc_check $_ld_gif && tmp_run && _gif=yes && break
4647 done 4627 done
4648 fi 4628 fi
5444 if test "$_cdparanoia" = auto ; then 5424 if test "$_cdparanoia" = auto ; then
5445 cat > $TMPC <<EOF 5425 cat > $TMPC <<EOF
5446 #include <cdda_interface.h> 5426 #include <cdda_interface.h>
5447 #include <cdda_paranoia.h> 5427 #include <cdda_paranoia.h>
5448 // This need a better test. How ? 5428 // This need a better test. How ?
5449 int main(void) { 5429 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5450 void *test = cdda_verbose_set;
5451 return test == (void *)1;
5452 }
5453 EOF 5430 EOF
5454 _cdparanoia=no 5431 _cdparanoia=no
5455 for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do 5432 for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5456 cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \ 5433 cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && \
5457 _cdparanoia=yes && _inc_extra="$_inc_extra $_inc_tmp" && break 5434 _cdparanoia=yes && _inc_extra="$_inc_extra $_inc_tmp" && break
5470 cat > $TMPC << EOF 5447 cat > $TMPC << EOF
5471 #include <stdio.h> 5448 #include <stdio.h>
5472 #include <cdio/version.h> 5449 #include <cdio/version.h>
5473 #include <cdio/cdda.h> 5450 #include <cdio/cdda.h>
5474 #include <cdio/paranoia.h> 5451 #include <cdio/paranoia.h>
5475 int main(void) 5452 int main(void) {
5476 {
5477 void *test = cdda_verbose_set; 5453 void *test = cdda_verbose_set;
5478 printf("%s\n", CDIO_VERSION); 5454 printf("%s\n", CDIO_VERSION);
5479 return test == (void *)1; 5455 return test == (void *)1;
5480
5481 } 5456 }
5482 EOF 5457 EOF
5483 _libcdio=no 5458 _libcdio=no
5484 for _ld_tmp in "" "-lwinmm" ; do 5459 for _ld_tmp in "" "-lwinmm" ; do
5485 _ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp" 5460 _ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5548 #include <ft2build.h> 5523 #include <ft2build.h>
5549 #include FT_FREETYPE_H 5524 #include FT_FREETYPE_H
5550 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9))) 5525 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5551 #error "Need FreeType 2.0.9 or newer" 5526 #error "Need FreeType 2.0.9 or newer"
5552 #endif 5527 #endif
5553 int main(void) 5528 int main(void) {
5554 {
5555 FT_Library library; 5529 FT_Library library;
5556 FT_Int major=-1,minor=-1,patch=-1; 5530 FT_Int major=-1,minor=-1,patch=-1;
5557 int err=FT_Init_FreeType(&library); 5531 int err=FT_Init_FreeType(&library);
5558 if(err){ 5532 if(err){
5559 printf("Couldn't initialize freetype2 lib, err code: %d\n",err); 5533 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5592 echocheck "fontconfig" 5566 echocheck "fontconfig"
5593 if test "$_fontconfig" = auto ; then 5567 if test "$_fontconfig" = auto ; then
5594 cat > $TMPC << EOF 5568 cat > $TMPC << EOF
5595 #include <stdio.h> 5569 #include <stdio.h>
5596 #include <fontconfig/fontconfig.h> 5570 #include <fontconfig/fontconfig.h>
5597 int main(void) 5571 int main(void) {
5598 {
5599 int err = FcInit(); 5572 int err = FcInit();
5600 if(err == FcFalse){ 5573 if(err == FcFalse){
5601 printf("Couldn't initialize fontconfig lib\n"); 5574 printf("Couldn't initialize fontconfig lib\n");
5602 exit(err); 5575 exit(err);
5603 } 5576 }
5604 return 0; 5577 return 0;
5605
5606 } 5578 }
5607 EOF 5579 EOF
5608 _fontconfig=no 5580 _fontconfig=no
5609 for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do 5581 for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
5610 _ld_tmp="-lfontconfig $_ld_tmp" 5582 _ld_tmp="-lfontconfig $_ld_tmp"
5661 cat > $TMPC << EOF 5633 cat > $TMPC << EOF
5662 #include <stdio.h> 5634 #include <stdio.h>
5663 /* workaround for fribidi 0.10.4 and below */ 5635 /* workaround for fribidi 0.10.4 and below */
5664 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8 5636 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5665 #include <fribidi/fribidi.h> 5637 #include <fribidi/fribidi.h>
5666 int main(void) 5638 int main(void) {
5667 {
5668 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) { 5639 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5669 printf("Fribidi headers are not consistents with the library!\n"); 5640 printf("Fribidi headers are not consistents with the library!\n");
5670 exit(1); 5641 exit(1);
5671 } 5642 }
5672 return 0; 5643 return 0;
5690 5661
5691 echocheck "ENCA" 5662 echocheck "ENCA"
5692 if test "$_enca" = auto ; then 5663 if test "$_enca" = auto ; then
5693 cat > $TMPC << EOF 5664 cat > $TMPC << EOF
5694 #include <enca.h> 5665 #include <enca.h>
5695 int main(void) 5666 int main(void) {
5696 {
5697 const char **langs; 5667 const char **langs;
5698 size_t langcnt; 5668 size_t langcnt;
5699 langs = enca_get_languages(&langcnt); 5669 langs = enca_get_languages(&langcnt);
5700 return 0; 5670 return 0;
5701 } 5671 }
5889 echocheck "libspeex (version >= 1.1 required)" 5859 echocheck "libspeex (version >= 1.1 required)"
5890 if test "$_speex" = auto ; then 5860 if test "$_speex" = auto ; then
5891 _speex=no 5861 _speex=no
5892 cat > $TMPC << EOF 5862 cat > $TMPC << EOF
5893 #include <speex/speex.h> 5863 #include <speex/speex.h>
5894 int main(void) { 5864 int main(void) { SpeexBits bits; void *dec; speex_decode_int(dec, &bits, dec); }
5895 SpeexBits bits;
5896 void *dec;
5897 speex_decode_int(dec, &bits, dec);
5898 }
5899 EOF 5865 EOF
5900 cc_check -lspeex $_ld_lm && _speex=yes 5866 cc_check -lspeex $_ld_lm && _speex=yes
5901 fi 5867 fi
5902 if test "$_speex" = yes ; then 5868 if test "$_speex" = yes ; then
5903 _def_speex='#define HAVE_SPEEX 1' 5869 _def_speex='#define HAVE_SPEEX 1'
5913 if test "$_theora" = auto ; then 5879 if test "$_theora" = auto ; then
5914 _theora=no 5880 _theora=no
5915 cat > $TMPC << EOF 5881 cat > $TMPC << EOF
5916 #include <theora/theora.h> 5882 #include <theora/theora.h>
5917 #include <string.h> 5883 #include <string.h>
5918 int main(void) 5884 int main(void) {
5919 {
5920 /* theora is in flux, make sure that all interface routines and 5885 /* theora is in flux, make sure that all interface routines and
5921 * datatypes exist and work the way we expect it, so we don't break 5886 * datatypes exist and work the way we expect it, so we don't break
5922 * mplayer */ 5887 * mplayer */
5923 ogg_packet op; 5888 ogg_packet op;
5924 theora_comment tc; 5889 theora_comment tc;
6107 cat > $TMPC << EOF 6072 cat > $TMPC << EOF
6108 #include <faad.h> 6073 #include <faad.h>
6109 #ifndef FAAD_MIN_STREAMSIZE 6074 #ifndef FAAD_MIN_STREAMSIZE
6110 #error Too old version 6075 #error Too old version
6111 #endif 6076 #endif
6112 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; } 6077 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6078 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6113 EOF 6079 EOF
6114 cc_check -lfaad $_ld_lm && _faad_external=yes 6080 cc_check -lfaad $_ld_lm && _faad_external=yes
6115 fi 6081 fi
6116 6082
6117 if test "$_faad_internal" = yes ; then 6083 if test "$_faad_internal" = yes ; then
6698 _mp3lame=no 6664 _mp3lame=no
6699 _def_mp3lame_preset='#undef HAVE_MP3LAME_PRESET' 6665 _def_mp3lame_preset='#undef HAVE_MP3LAME_PRESET'
6700 _def_mp3lame_preset_medium='#undef HAVE_MP3LAME_PRESET_MEDIUM' 6666 _def_mp3lame_preset_medium='#undef HAVE_MP3LAME_PRESET_MEDIUM'
6701 cat > $TMPC <<EOF 6667 cat > $TMPC <<EOF
6702 #include <lame/lame.h> 6668 #include <lame/lame.h>
6703 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; } 6669 int main(void) { lame_version_t lv; (void) lame_init();
6670 get_lame_version_numerical(&lv); printf("%d%d\n",lv.major,lv.minor);
6671 return 0; }
6704 EOF 6672 EOF
6705 # Note: libmp3lame usually depends on vorbis 6673 # Note: libmp3lame usually depends on vorbis
6706 cc_check -lmp3lame $_ld_lm && tmp_run && _mp3lame=yes 6674 cc_check -lmp3lame $_ld_lm && tmp_run && _mp3lame=yes
6707 if test "$_mp3lame" = yes ; then 6675 if test "$_mp3lame" = yes ; then
6708 _def_mp3lame="#define HAVE_MP3LAME" 6676 _def_mp3lame="#define HAVE_MP3LAME"
6788 "dev/ic/bt8xx.h" ; do 6756 "dev/ic/bt8xx.h" ; do
6789 cat > $TMPC <<EOF 6757 cat > $TMPC <<EOF
6790 #include <sys/types.h> 6758 #include <sys/types.h>
6791 #include <sys/ioctl.h> 6759 #include <sys/ioctl.h>
6792 #include <$file> 6760 #include <$file>
6793 int main(void) { 6761 int main(void) { ioctl(0, TVTUNER_GETFREQ, 0); return 0; }
6794 ioctl(0, TVTUNER_GETFREQ, 0);
6795 return 0;
6796 }
6797 EOF 6762 EOF
6798 if cc_check ; then 6763 if cc_check ; then
6799 _ioctl_bt848_h=yes 6764 _ioctl_bt848_h=yes
6800 _ioctl_bt848_h_name="$file" 6765 _ioctl_bt848_h_name="$file"
6801 break; 6766 break;
6815 "dev/bktr/ioctl_meteor.h" \ 6780 "dev/bktr/ioctl_meteor.h" \
6816 "dev/video/bktr/ioctl_meteor.h" ; do 6781 "dev/video/bktr/ioctl_meteor.h" ; do
6817 cat > $TMPC <<EOF 6782 cat > $TMPC <<EOF
6818 #include <sys/types.h> 6783 #include <sys/types.h>
6819 #include <$file> 6784 #include <$file>
6820 int main(void) { 6785 int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
6821 ioctl(0, METEORSINPUT, 0);
6822 return 0;
6823 }
6824 EOF 6786 EOF
6825 if cc_check ; then 6787 if cc_check ; then
6826 _ioctl_meteor_h=yes 6788 _ioctl_meteor_h=yes
6827 _ioctl_meteor_h_name="$file" 6789 _ioctl_meteor_h_name="$file"
6828 break; 6790 break;
6848 #include IOCTL_METEOR_H_NAME 6810 #include IOCTL_METEOR_H_NAME
6849 #endif 6811 #endif
6850 #ifdef IOCTL_BT848_H_NAME 6812 #ifdef IOCTL_BT848_H_NAME
6851 #include IOCTL_BT848_H_NAME 6813 #include IOCTL_BT848_H_NAME
6852 #endif 6814 #endif
6853 int main(void){ 6815 int main(void) {
6854 ioctl(0, METEORSINPUT, 0); 6816 ioctl(0, METEORSINPUT, 0);
6855 ioctl(0, TVTUNER_GETFREQ, 0); 6817 ioctl(0, TVTUNER_GETFREQ, 0);
6856 return 0; 6818 return 0;
6857 } 6819 }
6858 EOF 6820 EOF
7036 #include <sys/types.h> 6998 #include <sys/types.h>
7037 $_def_ioctl_bt848_h_name 6999 $_def_ioctl_bt848_h_name
7038 #ifdef IOCTL_BT848_H_NAME 7000 #ifdef IOCTL_BT848_H_NAME
7039 #include IOCTL_BT848_H_NAME 7001 #include IOCTL_BT848_H_NAME
7040 #endif 7002 #endif
7041 int main(void){ 7003 int main(void) { ioctl(0, RADIO_GETFREQ, 0); return 0; }
7042 ioctl(0, RADIO_GETFREQ, 0);
7043 return 0;
7044 }
7045 EOF 7004 EOF
7046 cc_check && _radio_bsdbt848=yes 7005 cc_check && _radio_bsdbt848=yes
7047 echores "$_radio_bsdbt848" 7006 echores "$_radio_bsdbt848"
7048 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848 7007 fi #if freebsd || netbsd || openbsd || dragonfly || bsdos && _radio && _radio_bsdbt848
7049 7008
7125 echocheck "byte order" 7084 echocheck "byte order"
7126 if test "$_big_endian" = auto ; then 7085 if test "$_big_endian" = auto ; then
7127 cat > $TMPC <<EOF 7086 cat > $TMPC <<EOF
7128 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'), 7087 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
7129 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0}; 7088 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
7130 int main(void){ 7089 int main(void) { return (int)ascii_name; }
7131 return (int)ascii_name;
7132 }
7133 EOF 7090 EOF
7134 if cc_check ; then 7091 if cc_check ; then
7135 if strings $TMPEXE | grep -l MPlayerBigEndian >/dev/null ; then 7092 if strings $TMPEXE | grep -l MPlayerBigEndian >/dev/null ; then
7136 _big_endian=yes 7093 _big_endian=yes
7137 else 7094 else