8e79075b9db4fe859fcb023a7203faae2fadabb5
[platform/upstream/libunistring.git] / gnulib-m4 / thread.m4
1 # thread.m4 serial 2
2 dnl Copyright (C) 2008, 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.
6
7 AC_DEFUN([gl_THREAD],
8 [
9   AC_REQUIRE([gl_THREADLIB])
10   AC_REQUIRE([AC_C_INLINE])
11
12   if test $gl_threads_api = posix; then
13     gl_save_LIBS="$LIBS"
14     LIBS="$LIBS $LIBMULTITHREAD"
15     AC_CHECK_FUNCS([pthread_atfork])
16     LIBS="$gl_save_LIBS"
17   fi
18 ])