diff options
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index be1d20c998..b6bd8e473a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -167,4 +167,20 @@ AC_DEFUN(EVO_LDAP_CHECK, [ AC_SUBST(LDAP_LIBS) fi AM_CONDITIONAL(ENABLE_LDAP, test $with_openldap != no) -])
\ No newline at end of file +]) + +# EVO_PTHREAD_CHECK +AC_DEFUN([EVO_PTHREAD_CHECK],[ + PTHREAD_LIB="" + AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread", + [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads", + [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r", + [AC_CHECK_LIB(pthread, __pthread_attr_init_system, PTHREAD_LIB="-lpthread", + [AC_CHECK_FUNC(pthread_create)] + )] + )] + )] + ) + AC_SUBST(PTHREAD_LIB) + AC_PROVIDE([EVO_PTHREAD_CHECK]) +]) |