comparison configure @ 25099:aa166b26298d

main() --> main(void)
author diego
date Wed, 21 Nov 2007 09:17:04 +0000
parents 03d7f478c367
children f618cb244428
comparison
equal deleted inserted replaced
25098:c38f1f42ee02 25099:aa166b26298d
1496 echores $_host_cc 1496 echores $_host_cc
1497 1497
1498 echocheck "cross compilation" 1498 echocheck "cross compilation"
1499 if test $_cross_compile = auto ; then 1499 if test $_cross_compile = auto ; then
1500 cat > $TMPC << EOF 1500 cat > $TMPC << EOF
1501 int main() { return 0; } 1501 int main(void) { return 0; }
1502 EOF 1502 EOF
1503 _cross_compile=yes 1503 _cross_compile=yes
1504 cc_check && "$TMPEXE" && _cross_compile=no 1504 cc_check && "$TMPEXE" && _cross_compile=no
1505 fi 1505 fi
1506 echores $_cross_compile 1506 echores $_cross_compile
2135 iproc='alpha' 2135 iproc='alpha'
2136 _march='' 2136 _march=''
2137 2137
2138 echocheck "CPU type" 2138 echocheck "CPU type"
2139 cat > $TMPC << EOF 2139 cat > $TMPC << EOF
2140 int main() { 2140 int main(void) {
2141 unsigned long ver, mask; 2141 unsigned long ver, mask;
2142 asm ("implver %0" : "=r" (ver)); 2142 asm ("implver %0" : "=r" (ver));
2143 asm ("amask %1, %0" : "=r" (mask) : "r" (-1)); 2143 asm ("amask %1, %0" : "=r" (mask) : "r" (-1));
2144 printf("%ld-%x\n", ver, ~mask); 2144 printf("%ld-%x\n", ver, ~mask);
2145 return 0; 2145 return 0;
2405 2405
2406 echocheck ".align is a power of two" 2406 echocheck ".align is a power of two"
2407 if test "$_asmalign_pot" = auto ; then 2407 if test "$_asmalign_pot" = auto ; then
2408 _asmalign_pot=no 2408 _asmalign_pot=no
2409 cat > $TMPC << EOF 2409 cat > $TMPC << EOF
2410 main() { asm (".align 3"); } 2410 main(void) { asm (".align 3"); }
2411 EOF 2411 EOF
2412 cc_check && _asmalign_pot=yes 2412 cc_check && _asmalign_pot=yes
2413 fi 2413 fi
2414 if test "$_asmalign_pot" = "yes" ; then 2414 if test "$_asmalign_pot" = "yes" ; then
2415 _def_asmalign_pot='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"' 2415 _def_asmalign_pot='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
2429 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then 2429 if test "$_altivec" = yes -o "$_runtime_cpudetection" = yes ; then
2430 echocheck "GCC altivec support" 2430 echocheck "GCC altivec support"
2431 2431
2432 p='' 2432 p=''
2433 cat > $TMPC << EOF 2433 cat > $TMPC << EOF
2434 int main() { 2434 int main(void) {
2435 return 0; 2435 return 0;
2436 } 2436 }
2437 EOF 2437 EOF
2438 FSF_flags='-maltivec -mabi=altivec' 2438 FSF_flags='-maltivec -mabi=altivec'
2439 Darwin_flags='-faltivec -D__APPLE_ALTIVEC__' 2439 Darwin_flags='-faltivec -D__APPLE_ALTIVEC__'
2675 echores "$_runtime_cpudetection" 2675 echores "$_runtime_cpudetection"
2676 2676
2677 2677
2678 echocheck "restrict keyword" 2678 echocheck "restrict keyword"
2679 for restrict_keyword in restrict __restrict __restrict__ ; do 2679 for restrict_keyword in restrict __restrict __restrict__ ; do
2680 echo "void foo(char * $restrict_keyword p); int main(){}" > $TMPC 2680 echo "void foo(char * $restrict_keyword p); int main(void){}" > $TMPC
2681 if cc_check; then 2681 if cc_check; then
2682 _def_restrict_keyword=$restrict_keyword 2682 _def_restrict_keyword=$restrict_keyword
2683 break; 2683 break;
2684 fi 2684 fi
2685 done 2685 done
2701 cat > $TMPC << EOF 2701 cat > $TMPC << EOF
2702 int foo (int a) { 2702 int foo (int a) {
2703 a = __builtin_expect (a, 10); 2703 a = __builtin_expect (a, 10);
2704 return a == 10 ? 0 : 1; 2704 return a == 10 ? 0 : 1;
2705 } 2705 }
2706 int main() { return foo(10) && foo(0); } 2706 int main(void) { return foo(10) && foo(0); }
2707 EOF 2707 EOF
2708 _builtin_expect=no 2708 _builtin_expect=no
2709 cc_check && _builtin_expect=yes 2709 cc_check && _builtin_expect=yes
2710 if test "$_builtin_expect" = yes ; then 2710 if test "$_builtin_expect" = yes ; then
2711 _def_builtin_expect='#define HAVE_BUILTIN_EXPECT 1' 2711 _def_builtin_expect='#define HAVE_BUILTIN_EXPECT 1'
5453 cat > $TMPC << EOF 5453 cat > $TMPC << EOF
5454 #include <stdio.h> 5454 #include <stdio.h>
5455 #include <cdio/version.h> 5455 #include <cdio/version.h>
5456 #include <cdio/cdda.h> 5456 #include <cdio/cdda.h>
5457 #include <cdio/paranoia.h> 5457 #include <cdio/paranoia.h>
5458 int main() 5458 int main(void)
5459 { 5459 {
5460 void *test = cdda_verbose_set; 5460 void *test = cdda_verbose_set;
5461 printf("%s\n", CDIO_VERSION); 5461 printf("%s\n", CDIO_VERSION);
5462 return test == (void *)1; 5462 return test == (void *)1;
5463 5463
5531 #include <ft2build.h> 5531 #include <ft2build.h>
5532 #include FT_FREETYPE_H 5532 #include FT_FREETYPE_H
5533 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9))) 5533 #if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
5534 #error "Need FreeType 2.0.9 or newer" 5534 #error "Need FreeType 2.0.9 or newer"
5535 #endif 5535 #endif
5536 int main() 5536 int main(void)
5537 { 5537 {
5538 FT_Library library; 5538 FT_Library library;
5539 FT_Int major=-1,minor=-1,patch=-1; 5539 FT_Int major=-1,minor=-1,patch=-1;
5540 int err=FT_Init_FreeType(&library); 5540 int err=FT_Init_FreeType(&library);
5541 if(err){ 5541 if(err){
5575 echocheck "fontconfig" 5575 echocheck "fontconfig"
5576 if test "$_fontconfig" = auto ; then 5576 if test "$_fontconfig" = auto ; then
5577 cat > $TMPC << EOF 5577 cat > $TMPC << EOF
5578 #include <stdio.h> 5578 #include <stdio.h>
5579 #include <fontconfig/fontconfig.h> 5579 #include <fontconfig/fontconfig.h>
5580 int main() 5580 int main(void)
5581 { 5581 {
5582 int err = FcInit(); 5582 int err = FcInit();
5583 if(err == FcFalse){ 5583 if(err == FcFalse){
5584 printf("Couldn't initialize fontconfig lib\n"); 5584 printf("Couldn't initialize fontconfig lib\n");
5585 exit(err); 5585 exit(err);
5620 #include <ft2build.h> 5620 #include <ft2build.h>
5621 #include FT_FREETYPE_H 5621 #include FT_FREETYPE_H
5622 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8))) 5622 #if ((FREETYPE_MAJOR < 2) || (FREETYPE_MINOR < 1) || ((FREETYPE_MINOR == 1) && (FREETYPE_PATCH < 8)))
5623 #error "Need FreeType 2.1.8 or newer" 5623 #error "Need FreeType 2.1.8 or newer"
5624 #endif 5624 #endif
5625 int main() { return 0; } 5625 int main(void) { return 0; }
5626 EOF 5626 EOF
5627 _ass=no 5627 _ass=no
5628 cc_check `$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run && _ass=yes 5628 cc_check `$_freetypeconfig --cflags` `$_freetypeconfig --libs` && tmp_run && _ass=yes
5629 if test "$_ass" = no ; then 5629 if test "$_ass" = no ; then
5630 _res_comment="FreeType >= 2.1.8 needed" 5630 _res_comment="FreeType >= 2.1.8 needed"
5644 cat > $TMPC << EOF 5644 cat > $TMPC << EOF
5645 #include <stdio.h> 5645 #include <stdio.h>
5646 /* workaround for fribidi 0.10.4 and below */ 5646 /* workaround for fribidi 0.10.4 and below */
5647 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8 5647 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5648 #include <fribidi/fribidi.h> 5648 #include <fribidi/fribidi.h>
5649 int main() 5649 int main(void)
5650 { 5650 {
5651 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) { 5651 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5652 printf("Fribidi headers are not consistents with the library!\n"); 5652 printf("Fribidi headers are not consistents with the library!\n");
5653 exit(1); 5653 exit(1);
5654 } 5654 }
5673 5673
5674 echocheck "ENCA" 5674 echocheck "ENCA"
5675 if test "$_enca" = auto ; then 5675 if test "$_enca" = auto ; then
5676 cat > $TMPC << EOF 5676 cat > $TMPC << EOF
5677 #include <enca.h> 5677 #include <enca.h>
5678 int main() 5678 int main(void)
5679 { 5679 {
5680 const char **langs; 5680 const char **langs;
5681 size_t langcnt; 5681 size_t langcnt;
5682 langs = enca_get_languages(&langcnt); 5682 langs = enca_get_languages(&langcnt);
5683 return 0; 5683 return 0;
7062 echocheck "byte order" 7062 echocheck "byte order"
7063 if test "$_big_endian" = auto ; then 7063 if test "$_big_endian" = auto ; then
7064 cat > $TMPC <<EOF 7064 cat > $TMPC <<EOF
7065 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'), 7065 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
7066 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0}; 7066 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
7067 int main(){ 7067 int main(void){
7068 return (int)ascii_name; 7068 return (int)ascii_name;
7069 } 7069 }
7070 EOF 7070 EOF
7071 if cc_check ; then 7071 if cc_check ; then
7072 if strings $TMPEXE | grep -l MPlayerBigEndian >/dev/null ; then 7072 if strings $TMPEXE | grep -l MPlayerBigEndian >/dev/null ; then
7499 7499
7500 CFLAGS="-I. -I.. -I../libavutil $CFLAGS" 7500 CFLAGS="-I. -I.. -I../libavutil $CFLAGS"
7501 CXXFLAGS=" $CFLAGS -D__STDC_LIMIT_MACROS" 7501 CXXFLAGS=" $CFLAGS -D__STDC_LIMIT_MACROS"
7502 7502
7503 cat > $TMPC << EOF 7503 cat > $TMPC << EOF
7504 int main() { return 0; } 7504 int main(void) { return 0; }
7505 EOF 7505 EOF
7506 if test "$cc_vendor" = "gnu" ; then 7506 if test "$cc_vendor" = "gnu" ; then
7507 cc_check -Wdeclaration-after-statement && CFLAGS="-Wdeclaration-after-statement $CFLAGS" 7507 cc_check -Wdeclaration-after-statement && CFLAGS="-Wdeclaration-after-statement $CFLAGS"
7508 cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS" 7508 cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS"
7509 cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS" 7509 cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS"