Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the ucontext detection: search for the header, not the function in libc
[simgrid.git] / configure.ac
index 01812cd..ca6f924 100644 (file)
@@ -45,13 +45,13 @@ GRAS_CHECK_STRUCT_COMPACTION
 AC_HEADER_STDC
 AC_HEADER_TIME
 AC_CHECK_HEADERS([sys/socket.h winsock.h winsock2.h \
-                  sys/stat.h\
+                  sys/stat.h \
+                 ucontext.h \
                  sys/time.h ])
 AC_CHECK_FUNCS([gettimeofday \
                 getdtablesize \
                 sysconf])
 
-
 AC_MSG_CHECKING(how to link against winsock)
 save_LIBS="$LIBS"
 case $host_os in
@@ -95,11 +95,6 @@ dnl A C_CHECK_LIB(pthread, pthread_mutex_lock, LIBS="$LIBS -lpthread")
 AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])
 AC_CHECK_LIB(socket, connect,    [LIBS="$LIBS -lsocket"])
 
-AC_CHECK_LIB(c,swapcontext,
-  [AC_DEFINE([USE_CONTEXT],1,[Define if GNU contexts available and you wish to use them])],
-  [AC_MSG_ERROR([[Cannot find context in your libc, go away !]])])
-
-       
 dnl ####[ maint mode ]#######################################################
 AM_MAINTAINER_MODE
 if test x$USE_MAINTAINER_MODE = xyes