1999-12-17 21:36:15 +08:00
|
|
|
|
|
|
|
AC_DEFUN(TSRM_BASIC_CHECKS,[
|
|
|
|
|
|
|
|
AC_REQUIRE([AC_PROG_CC])dnl
|
|
|
|
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
|
|
|
|
AC_REQUIRE([AC_PROG_CC_C_O])dnl
|
|
|
|
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(stdarg.h)
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN(TSRM_PTHREAD,[
|
|
|
|
|
1999-12-22 00:29:30 +08:00
|
|
|
dnl Check for FreeBSD/Linux -pthread option
|
1999-12-17 21:36:15 +08:00
|
|
|
|
1999-12-22 00:29:30 +08:00
|
|
|
old_LDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS -pthread"
|
1999-12-17 21:36:15 +08:00
|
|
|
AC_CHECK_FUNCS(pthread_kill)
|
|
|
|
|
|
|
|
if test "$ac_cv_func_pthread_kill" != "yes"; then
|
1999-12-22 00:29:30 +08:00
|
|
|
LDFLAGS="$old_LDFLAGS"
|
|
|
|
dnl Fall back to the standard -lpthread
|
|
|
|
AC_CHECK_LIB(pthread, pthread_kill)
|
|
|
|
unset ac_cv_func_pthread_kill
|
|
|
|
AC_CHECK_FUNCS(pthread_kill)
|
|
|
|
if test "$ac_cv_func_pthread_kill" != "yes"; then
|
|
|
|
AC_MSG_ERROR(You need Pthreads to build TSRM on UNIX.)
|
|
|
|
fi
|
1999-12-17 21:36:15 +08:00
|
|
|
fi
|
1999-12-22 00:29:30 +08:00
|
|
|
|
1999-12-17 21:36:15 +08:00
|
|
|
AC_DEFINE(PTHREADS, [], Whether to use Pthreads)
|
|
|
|
])
|