1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
dnl pthreads.m4--pthreads setup macro
dnl Rob Earhart
dnl $Id: pthreads.m4,v 1.10 2002/05/25 19:57:42 leg Exp $
AC_DEFUN(CMU_PTHREADS, [
AC_REQUIRE([AC_CANONICAL_HOST])
cmu_save_LIBS="$LIBS"
AC_CHECK_LIB(pthread, pthread_create,LIB_PTHREAD="-lpthread",
AC_CHECK_LIB(c_r, pthread_create,LIB_PTHREAD="-lc_r",
AC_ERROR([Can't compile without pthreads])))
LIBS="$cmu_save_LIBS"
AC_SUBST(LIB_PTHREAD)
AC_DEFINE(_REENTRANT)
case "$host_os" in
solaris2*)
AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
AC_DEFINE(__EXTENSIONS__)
;;
irix6*)
AC_DEFINE(_SGI_REENTRANT_FUNCTIONS)
;;
esac
])
|