comparison configure @ 28047:936fc892dcab

whitespace cosmetics in test programs
author diego
date Wed, 03 Dec 2008 14:54:04 +0000
parents 7df791e22c3f
children ff508c85d591
comparison
equal deleted inserted replaced
28046:7df791e22c3f 28047:936fc892dcab
2728 2728
2729 2729
2730 echocheck "__builtin_expect" 2730 echocheck "__builtin_expect"
2731 # GCC branch prediction hint 2731 # GCC branch prediction hint
2732 cat > $TMPC << EOF 2732 cat > $TMPC << EOF
2733 int foo (int a) { 2733 int foo(int a) {
2734 a = __builtin_expect (a, 10); 2734 a = __builtin_expect(a, 10);
2735 return a == 10 ? 0 : 1; 2735 return a == 10 ? 0 : 1;
2736 } 2736 }
2737 int main(void) { return foo(10) && foo(0); } 2737 int main(void) { return foo(10) && foo(0); }
2738 EOF 2738 EOF
2739 _builtin_expect=no 2739 _builtin_expect=no
3117 echocheck "pthread" 3117 echocheck "pthread"
3118 if test "$_pthreads" = auto ; then 3118 if test "$_pthreads" = auto ; then
3119 cat > $TMPC << EOF 3119 cat > $TMPC << EOF
3120 #include <pthread.h> 3120 #include <pthread.h>
3121 void* func(void *arg) { return arg; } 3121 void* func(void *arg) { return arg; }
3122 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } 3122 int main(void) { pthread_t tid; return pthread_create(&tid, 0, func, 0) == 0 ? 0 : 1; }
3123 EOF 3123 EOF
3124 _pthreads=no 3124 _pthreads=no
3125 if ! hpux ; then 3125 if ! hpux ; then
3126 for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do 3126 for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
3127 # for crosscompilation, we cannot execute the program, be happy if we can link statically 3127 # for crosscompilation, we cannot execute the program, be happy if we can link statically
3187 int main(void) { 3187 int main(void) {
3188 size_t numread; 3188 size_t numread;
3189 iconv_t icdsc; 3189 iconv_t icdsc;
3190 char *tocode="UTF-8"; 3190 char *tocode="UTF-8";
3191 char *fromcode="cp1250"; 3191 char *fromcode="cp1250";
3192 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)) { 3192 if ((icdsc = iconv_open(tocode, fromcode)) != (iconv_t)(-1)) {
3193 while ((numread = read (0, inbuffer, INBUFSIZE))) { 3193 while ((numread = read(0, inbuffer, INBUFSIZE))) {
3194 char *iptr=inbuffer; 3194 char *iptr=inbuffer;
3195 char *optr=outbuffer; 3195 char *optr=outbuffer;
3196 size_t inleft=numread; 3196 size_t inleft=numread;
3197 size_t outleft=OUTBUFSIZE; 3197 size_t outleft=OUTBUFSIZE;
3198 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft) 3198 if (iconv(icdsc, (const char **)&iptr, &inleft, &optr, &outleft)
3199 != (size_t)(-1)) { 3199 != (size_t)(-1)) {
3200 write (1, outbuffer, OUTBUFSIZE - outleft); 3200 write(1, outbuffer, OUTBUFSIZE - outleft);
3201 } 3201 }
3202 } 3202 }
3203 if (iconv_close(icdsc) == -1) 3203 if (iconv_close(icdsc) == -1)
3204 ; 3204 ;
3205 } 3205 }
5038 #include <linux/ivtv.h> 5038 #include <linux/ivtv.h>
5039 #include <sys/ioctl.h> 5039 #include <sys/ioctl.h>
5040 int main(void) { 5040 int main(void) {
5041 struct ivtv_cfg_stop_decode sd; 5041 struct ivtv_cfg_stop_decode sd;
5042 struct ivtv_cfg_start_decode sd1; 5042 struct ivtv_cfg_start_decode sd1;
5043 ioctl (0, IVTV_IOC_START_DECODE, &sd1); 5043 ioctl(0, IVTV_IOC_START_DECODE, &sd1);
5044 ioctl (0, IVTV_IOC_STOP_DECODE, &sd); 5044 ioctl(0, IVTV_IOC_STOP_DECODE, &sd);
5045 return 0; } 5045 return 0; }
5046 EOF 5046 EOF
5047 _ivtv=no 5047 _ivtv=no
5048 cc_check && _ivtv=yes 5048 cc_check && _ivtv=yes
5049 fi 5049 fi
5686 #endif 5686 #endif
5687 int main(void) { 5687 int main(void) {
5688 FT_Library library; 5688 FT_Library library;
5689 FT_Int major=-1,minor=-1,patch=-1; 5689 FT_Int major=-1,minor=-1,patch=-1;
5690 int err=FT_Init_FreeType(&library); 5690 int err=FT_Init_FreeType(&library);
5691 if(err){ 5691 if (err) {
5692 printf("Couldn't initialize freetype2 lib, err code: %d\n",err); 5692 printf("Couldn't initialize freetype2 lib, err code: %d\n",err);
5693 exit(err); 5693 exit(err);
5694 } 5694 }
5695 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :((( 5695 FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :(((
5696 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n", 5696 printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n",
5697 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH, 5697 FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH,
5698 (int)major,(int)minor,(int)patch ); 5698 (int)major,(int)minor,(int)patch );
5699 if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){ 5699 if (major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR) {
5700 printf("Library and header version mismatch! Fix it in your distribution!\n"); 5700 printf("Library and header version mismatch! Fix it in your distribution!\n");
5701 exit(1); 5701 exit(1);
5702 } 5702 }
5703 return 0; 5703 return 0;
5704 } 5704 }
5728 #include <stdio.h> 5728 #include <stdio.h>
5729 #include <stdlib.h> 5729 #include <stdlib.h>
5730 #include <fontconfig/fontconfig.h> 5730 #include <fontconfig/fontconfig.h>
5731 int main(void) { 5731 int main(void) {
5732 int err = FcInit(); 5732 int err = FcInit();
5733 if(err == FcFalse){ 5733 if (err == FcFalse) {
5734 printf("Couldn't initialize fontconfig lib\n"); 5734 printf("Couldn't initialize fontconfig lib\n");
5735 exit(err); 5735 exit(err);
5736 } 5736 }
5737 return 0; 5737 return 0;
5738 } 5738 }
5794 #include <stdio.h> 5794 #include <stdio.h>
5795 /* workaround for fribidi 0.10.4 and below */ 5795 /* workaround for fribidi 0.10.4 and below */
5796 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8 5796 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
5797 #include <fribidi/fribidi.h> 5797 #include <fribidi/fribidi.h>
5798 int main(void) { 5798 int main(void) {
5799 if(fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) { 5799 if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8) {
5800 printf("Fribidi headers are not consistents with the library!\n"); 5800 printf("Fribidi headers are not consistents with the library!\n");
5801 exit(1); 5801 exit(1);
5802 } 5802 }
5803 return 0; 5803 return 0;
5804 } 5804 }
6051 theora_state st; 6051 theora_state st;
6052 yuv_buffer yuv; 6052 yuv_buffer yuv;
6053 int r; 6053 int r;
6054 double t; 6054 double t;
6055 6055
6056 theora_info_init (&inf); 6056 theora_info_init(&inf);
6057 theora_comment_init (&tc); 6057 theora_comment_init(&tc);
6058 6058
6059 return 0; 6059 return 0;
6060 6060
6061 /* we don't want to execute this kind of nonsense; just for making sure 6061 /* we don't want to execute this kind of nonsense; just for making sure
6062 * that compilation works... */ 6062 * that compilation works... */
6063 memset(&op, 0, sizeof(op)); 6063 memset(&op, 0, sizeof(op));
6064 r = theora_decode_header (&inf, &tc, &op); 6064 r = theora_decode_header(&inf, &tc, &op);
6065 r = theora_decode_init (&st, &inf); 6065 r = theora_decode_init(&st, &inf);
6066 t = theora_granule_time (&st, op.granulepos); 6066 t = theora_granule_time(&st, op.granulepos);
6067 r = theora_decode_packetin (&st, &op); 6067 r = theora_decode_packetin(&st, &op);
6068 r = theora_decode_YUVout (&st, &yuv); 6068 r = theora_decode_YUVout(&st, &yuv);
6069 theora_clear (&st); 6069 theora_clear(&st);
6070 6070
6071 return 0; 6071 return 0;
6072 } 6072 }
6073 EOF 6073 EOF
6074 for _ld_theora in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora -logg"; do 6074 for _ld_theora in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora -logg"; do
6159 if test "$_libdca" = auto ; then 6159 if test "$_libdca" = auto ; then
6160 _libdca=no 6160 _libdca=no
6161 cat > $TMPC << EOF 6161 cat > $TMPC << EOF
6162 #include <inttypes.h> 6162 #include <inttypes.h>
6163 #include <dts.h> 6163 #include <dts.h>
6164 int main(void) { dts_init (0); return 0; } 6164 int main(void) { dts_init(0); return 0; }
6165 EOF 6165 EOF
6166 for _ld_dca in -ldts -ldca ; do 6166 for _ld_dca in -ldts -ldca ; do
6167 cc_check $_ld_dca $_ld_lm && _ld_extra="$_ld_extra $_ld_dca" \ 6167 cc_check $_ld_dca $_ld_lm && _ld_extra="$_ld_extra $_ld_dca" \
6168 && _libdca=yes && break 6168 && _libdca=yes && break
6169 done 6169 done
7369 # endian testing 7369 # endian testing
7370 echocheck "byte order" 7370 echocheck "byte order"
7371 if test "$_big_endian" = auto ; then 7371 if test "$_big_endian" = auto ; then
7372 cat > $TMPC <<EOF 7372 cat > $TMPC <<EOF
7373 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'), 7373 short ascii_name[] = { (('M'<<8)|'P'),(('l'<<8)|'a'),(('y'<<8)|'e'),(('r'<<8)|'B'),
7374 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0}; 7374 (('i'<<8)|'g'),(('E'<<8)|'n'),(('d'<<8)|'i'),(('a'<<8)|'n'),0};
7375 int main(void) { return (int)ascii_name; } 7375 int main(void) { return (int)ascii_name; }
7376 EOF 7376 EOF
7377 if cc_check ; then 7377 if cc_check ; then
7378 if strings $TMPEXE | grep -q -l MPlayerBigEndian ; then 7378 if strings $TMPEXE | grep -q -l MPlayerBigEndian ; then
7379 _big_endian=yes 7379 _big_endian=yes