version 1.1.1.1, 2012/02/21 22:57:49
|
version 1.1.1.2, 2012/05/29 09:29:44
|
Line 1
|
Line 1
|
# lock.m4 serial 10 (gettext-0.18) | # lock.m4 serial 11 (gettext-0.18.2) |
dnl Copyright (C) 2005-2009 Free Software Foundation, Inc. | dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. |
dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
Line 18 AC_DEFUN([gl_LOCK],
|
Line 18 AC_DEFUN([gl_LOCK],
|
[], |
[], |
[#include <pthread.h>]) |
[#include <pthread.h>]) |
# glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. |
# glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. |
AC_TRY_COMPILE([#include <pthread.h>], | AC_COMPILE_IFELSE([ |
[#if __FreeBSD__ == 4 | AC_LANG_PROGRAM( |
| [[#include <pthread.h>]], |
| [[ |
| #if __FreeBSD__ == 4 |
error "No, in FreeBSD 4.0 recursive mutexes actually don't work." |
error "No, in FreeBSD 4.0 recursive mutexes actually don't work." |
#else |
#else |
int x = (int)PTHREAD_MUTEX_RECURSIVE; |
int x = (int)PTHREAD_MUTEX_RECURSIVE; |
return !x; |
return !x; |
#endif], | #endif |
| ]])], |
[AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], |
[AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], |
[Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) |
[Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) |
fi |
fi |