Re: [AD] Rework m4 test for sched_yield()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> The output was ugly on Solaris, and what we did in a dozen of lines can be
> done in three lines. Tested with autoconf 2.13 and 2.53, on Solaris and
> Linux.

Well, not sufficiently tested... ALLEGRO_USE_SCHED_YIELD was not defined 
anymore, which had an unexpected consequence: the X11 driver couldn't go 
fullscreen after being windowed.

Fixed thusly, applied to trunk and branch.

-- 
Eric Botcazou
Index: aclocal.m4
===================================================================
RCS file: /cvsroot/alleg/allegro/aclocal.m4,v
retrieving revision 1.45
diff -u -r1.45 aclocal.m4
--- aclocal.m4	28 Jun 2003 14:08:08 -0000	1.45
+++ aclocal.m4	29 Jun 2003 22:14:06 -0000
@@ -475,11 +475,16 @@
 dnl
 dnl Test where is sched_yield (SunOS).
 dnl
+dnl Variables:
+dnl  allegro_cv_support_sched_yield=(yes|)
+dnl
 dnl LIBS can be modified.
 dnl
 AC_DEFUN(ALLEGRO_ACTEST_SCHED_YIELD,
-[AC_CHECK_LIB(c, sched_yield,,
-AC_SEARCH_LIBS(sched_yield, posix4 rt))])
+[AC_CHECK_LIB(c, sched_yield,
+allegro_cv_support_sched_yield=yes,
+AC_SEARCH_LIBS(sched_yield, posix4 rt,
+allegro_cv_support_sched_yield=yes))])
 
 dnl
 dnl Test for constructor attribute support.
Index: configure.in
===================================================================
RCS file: /cvsroot/alleg/allegro/configure.in,v
retrieving revision 1.63
diff -u -r1.63 configure.in
--- configure.in	28 Jun 2003 22:16:13 -0000	1.63
+++ configure.in	29 Jun 2003 22:14:08 -0000
@@ -277,7 +277,7 @@
 
 dnl Test where is sched_yield (SunOS).
 ALLEGRO_ACTEST_SCHED_YIELD
-if test -n "$allegro_sched_yield_lib"; then
+if test "X$allegro_cv_support_sched_yield" = "Xyes"; then
    AC_DEFINE(ALLEGRO_USE_SCHED_YIELD,1,[Define if sched_yield is provided by some library.])
 fi
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/