[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.

Applied to mainline and branch.

-- 
Eric Botcazou
Index: aclocal.m4
===================================================================
RCS file: /cvsroot/alleg/allegro/aclocal.m4,v
retrieving revision 1.44
diff -u -r1.44 aclocal.m4
--- aclocal.m4	29 May 2003 10:26:34 -0000	1.44
+++ aclocal.m4	28 Jun 2003 14:03:09 -0000
@@ -475,23 +475,11 @@
 dnl
 dnl Test where is sched_yield (SunOS).
 dnl
-dnl Variables:
-dnl  allegro_sched_yield_lib=(lib|)
-dnl
 dnl LIBS can be modified.
 dnl
 AC_DEFUN(ALLEGRO_ACTEST_SCHED_YIELD,
-[AC_MSG_CHECKING(for sched_yield)
-AC_TRY_LINK([ extern void sched_yield (); ],
-  [ sched_yield (); ],
-  allegro_sched_yield_lib="-lc",
-  AC_CHECK_LIB(posix4, sched_yield,
-    [ LIBS="-lposix4 $LIBS"
-    allegro_sched_yield_lib="-lposix4"],
-    AC_CHECK_LIB(rt, sched_yield,
-      [ LIBS="-lrt $LIBS"
-      allegro_sched_yield_lib="-lrt"])))
-AC_MSG_RESULT($allegro_sched_yield_lib)])
+[AC_CHECK_LIB(c, sched_yield,,
+AC_SEARCH_LIBS(sched_yield, posix4 rt))])
 
 dnl
 dnl Test for constructor attribute support.


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