]> git.sur5r.net Git - openldap/commitdiff
Add configure support for REPLACE_SCHED_YIELD
authorKurt Zeilenga <kurt@openldap.org>
Fri, 6 Jan 2006 05:38:57 +0000 (05:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 6 Jan 2006 05:38:57 +0000 (05:38 +0000)
configure
configure.in
include/portable.hin

index 3d831943b85a1aa575e6d94a49bc24c868b92f24..e62191610bb32ed542f43f33dfa88107e6c8ae9f 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.610 2005/12/16 15:52:59 ando Exp .
+# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.612 2006/01/03 22:11:59 kurt Exp .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -24741,6 +24741,21 @@ echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
                                { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
    { (exit 1); exit 1; }; }
+                       fi
+
+                       ol_replace_sched_yeild=no
+                       case "$target" in
+                       *-*-linux*)
+                               ol_replace_sched_yeild=yes
+                       ;;
+                       esac
+
+                       if test $ol_replace_sched_yeild = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define REPLACE_SCHED_YEILD 1
+_ACEOF
+
                        fi
 
                                                if test $ol_with_yielding_select = auto ; then
index ff17fdaca3e8f7cf15c5e2c2be4ccfac8b48c0ec..5929bd539275c6f430af3dacbb2f94b55f1ea177 100644 (file)
@@ -1587,6 +1587,18 @@ dnl                      [ol_cv_pthread_lpthread_lexc])
                                AC_MSG_ERROR([pthread_create is not usable, check environment settings])
                        fi
 
+                       ol_replace_sched_yeild=no
+                       case "$target" in
+                       *-*-linux*) 
+                               ol_replace_sched_yeild=yes
+                       ;;
+                       esac
+
+                       if test $ol_replace_sched_yeild = yes ; then
+                               AC_DEFINE([REPLACE_SCHED_YEILD],1,
+                                       [define to replace sched_yeild(2)])
+                       fi
+
                        dnl Check if select causes an yield
                        if test $ol_with_yielding_select = auto ; then
                                AC_CACHE_CHECK([if select yields when using pthreads],
index 86f84670e49a476da84137dc17c42a62a7e4c529..5b80589614a869e8e43557549ca9fd5c34d9da53 100644 (file)
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* define to replace sched_yeild(2) */
+#undef REPLACE_SCHED_YEILD
+
 /* Define as the return type of signal handlers (`int' or `void'). */
 #undef RETSIGTYPE