Andrew Nguyen : configure: Check for a modern sched_setaffinity prototype.
Alexandre Julliard
julliard at winehq.org
Tue Feb 22 10:36:12 CST 2011
Module: wine
Branch: master
Commit: 2f22a504e789625bcaf65d854594a835a67f271d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2f22a504e789625bcaf65d854594a835a67f271d
Author: Andrew Nguyen <anguyen at codeweavers.com>
Date: Tue Feb 22 07:10:22 2011 -0600
configure: Check for a modern sched_setaffinity prototype.
---
configure | 35 ++++++++++++++++++++++++++++++++++-
configure.ac | 10 +++++++++-
2 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index a19e6b8..40e2e20 100755
--- a/configure
+++ b/configure
@@ -12818,7 +12818,6 @@ for ac_func in \
pwrite \
readdir \
readlink \
- sched_setaffinity \
sched_yield \
select \
setproctitle \
@@ -13317,6 +13316,40 @@ $as_echo "#define HAVE_ONE_ARG_MKDIR 1" >>confdefs.h
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_setaffinity" >&5
+$as_echo_n "checking for sched_setaffinity... " >&6; }
+if test "${wine_cv_have_sched_setaffinity+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _GNU_SOURCE
+#include <sched.h>
+int
+main ()
+{
+sched_setaffinity(0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ wine_cv_have_sched_setaffinity=yes
+else
+ wine_cv_have_sched_setaffinity=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_sched_setaffinity" >&5
+$as_echo "$wine_cv_have_sched_setaffinity" >&6; }
+if test "$wine_cv_have_sched_setaffinity" = "yes"
+then
+
+$as_echo "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
diff --git a/configure.ac b/configure.ac
index a68ca49..04e3430 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1947,7 +1947,6 @@ AC_CHECK_FUNCS(\
pwrite \
readdir \
readlink \
- sched_setaffinity \
sched_yield \
select \
setproctitle \
@@ -2049,6 +2048,15 @@ then
AC_DEFINE(HAVE_ONE_ARG_MKDIR, 1, [Define if mkdir takes only one argument])
fi
+AC_CACHE_CHECK([for sched_setaffinity],wine_cv_have_sched_setaffinity,
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[#define _GNU_SOURCE
+#include <sched.h>]], [[sched_setaffinity(0, 0, 0);]])],[wine_cv_have_sched_setaffinity=yes],[wine_cv_have_sched_setaffinity=no]))
+if test "$wine_cv_have_sched_setaffinity" = "yes"
+then
+ AC_DEFINE(HAVE_SCHED_SETAFFINITY, 1, [Define to 1 if you have the `sched_setaffinity' function.])
+fi
+
dnl **** Check for types ****
AC_C_CONST
More information about the wine-cvs
mailing list