Mercurial > mplayer.hg
comparison configure @ 14014:913abac7e3d1
check for __builtin_expect (used by libmpeg2)
author | henry |
---|---|
date | Mon, 22 Nov 2004 10:28:36 +0000 |
parents | 343ff7dc2b5c |
children | 89a6c07d33be |
comparison
equal
deleted
inserted
replaced
14013:540512f82d0d | 14014:913abac7e3d1 |
---|---|
2307 else | 2307 else |
2308 _def_restrict_keyword="" | 2308 _def_restrict_keyword="" |
2309 fi | 2309 fi |
2310 | 2310 |
2311 | 2311 |
2312 echocheck "__builtin_expect" | |
2313 # GCC branch prediction hint | |
2314 cat > $TMPC << EOF | |
2315 int foo (int a) { | |
2316 a = __builtin_expect (a, 10); | |
2317 return a == 10 ? 0 : 1; | |
2318 } | |
2319 int main() { return foo(10) && foo(0); } | |
2320 EOF | |
2321 _builtin_expect=no | |
2322 cc_check && _builtin_expect=yes | |
2323 if test "$_builtin_expect" = yes ; then | |
2324 _def_builtin_expect='#define HAVE_BUILTIN_EXPECT 1' | |
2325 else | |
2326 _def_builtin_expect='#undef HAVE_BUILTIN_EXPECT' | |
2327 fi | |
2328 echores "$_builtin_expect" | |
2329 | |
2330 | |
2312 echocheck "kstat" | 2331 echocheck "kstat" |
2313 cat > $TMPC << EOF | 2332 cat > $TMPC << EOF |
2314 #include <kstat.h> | 2333 #include <kstat.h> |
2315 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; } | 2334 int main(void) { (void) kstat_open(); (void) kstat_close(0); return 0; } |
2316 EOF | 2335 EOF |
6670 $_def_dynamic_plugins | 6689 $_def_dynamic_plugins |
6671 | 6690 |
6672 /* "restrict" keyword */ | 6691 /* "restrict" keyword */ |
6673 $_def_restrict_keyword | 6692 $_def_restrict_keyword |
6674 | 6693 |
6694 /* __builtin_expect branch prediction hint */ | |
6695 $_def_builtin_expect | |
6696 | |
6675 /* attribute(used) as needed by some compilers */ | 6697 /* attribute(used) as needed by some compilers */ |
6676 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300) | 6698 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300) |
6677 # define attribute_used __attribute__((used)) | 6699 # define attribute_used __attribute__((used)) |
6678 #else | 6700 #else |
6679 # define attribute_used | 6701 # define attribute_used |