Changeset 139 for trunk/aclocal.m4


Ignore:
Timestamp:
Oct 28, 2007, 4:59:22 PM (17 years ago)
Author:
rainer
Message:

Detect availability of recursive mutexes on Linux.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/aclocal.m4

    r138 r139  
    17941794        fi
    17951795
     1796        # Detect PTHREAD_MUTEX_RECURSIVE
     1797        AC_MSG_CHECKING([for recursive mutexes])
     1798        mutex_recursive=no
     1799        AC_TRY_LINK([
     1800#define _XOPEN_SOURCE 500
     1801#include <pthread.h>], [
     1802pthread_mutexattr_t   mta;
     1803pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
     1804return 0;],[mutex_recursive=yes])
     1805        if test "x$mutex_recursive" = "xyes"
     1806        then
     1807          AC_DEFINE(HAVE_PTHREAD_MUTEX_RECURSIVE,1,[Define if you have recursive mutexes.])
     1808        fi
     1809        AC_MSG_RESULT($mutex_recursive)
     1810
    17961811        LIBS="$save_LIBS"
    17971812        CFLAGS="$save_CFLAGS"
Note: See TracChangeset for help on using the changeset viewer.