[MPlayer-cvslog] CVS: main configure,1.939,1.940
Jindrich Makovicka CVS
syncmail at mplayerhq.hu
Mon Nov 22 11:28:39 CET 2004
CVS change done by Jindrich Makovicka CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv12308
Modified Files:
configure
Log Message:
check for __builtin_expect (used by libmpeg2)
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.939
retrieving revision 1.940
diff -u -r1.939 -r1.940
--- configure 20 Nov 2004 19:30:55 -0000 1.939
+++ configure 22 Nov 2004 10:28:36 -0000 1.940
@@ -2309,6 +2309,25 @@
fi
+echocheck "__builtin_expect"
+# GCC branch prediction hint
+cat > $TMPC << EOF
+int foo (int a) {
+ a = __builtin_expect (a, 10);
+ return a == 10 ? 0 : 1;
+}
+int main() { return foo(10) && foo(0); }
+EOF
+_builtin_expect=no
+cc_check && _builtin_expect=yes
+if test "$_builtin_expect" = yes ; then
+ _def_builtin_expect='#define HAVE_BUILTIN_EXPECT 1'
+else
+ _def_builtin_expect='#undef HAVE_BUILTIN_EXPECT'
+fi
+echores "$_builtin_expect"
+
+
echocheck "kstat"
cat > $TMPC << EOF
#include <kstat.h>
@@ -6672,6 +6691,9 @@
/* "restrict" keyword */
$_def_restrict_keyword
+/* __builtin_expect branch prediction hint */
+$_def_builtin_expect
+
/* attribute(used) as needed by some compilers */
#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
# define attribute_used __attribute__((used))
More information about the MPlayer-cvslog
mailing list