2 dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_PTHREAD_CHECK],
8 [AC_CHECK_HEADERS_ONCE([pthread.h])
12 if test "$ac_cv_header_pthread_h" = yes; then
14 AC_SEARCH_LIBS([pthread_create], [pthread],
15 [if test "$ac_cv_search_pthread_create" != "none required"; then
16 LIB_PTHREAD="$ac_cv_search_pthread_create"
23 AC_SUBST([LIB_PTHREAD])
26 AC_REQUIRE([AC_C_RESTRICT])