From 5453d0be3c28cfb70add39dafda678cde38e03a7 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Fri, 24 Sep 1999 20:14:44 +0000 Subject: [PATCH] Additionally check libc_r (*BSD) for pthread functions --- TSRM/configure.in | 14 +++++++++----- TSRM/tsrm_config.h.in | 18 ++++++++++++++---- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/TSRM/configure.in b/TSRM/configure.in index 1cee23a9a9..5f2654f50d 100644 --- a/TSRM/configure.in +++ b/TSRM/configure.in @@ -12,12 +12,16 @@ AM_PROG_CC_STDC AC_PROG_CC_C_O AC_PROG_RANLIB -AC_CHECK_LIB(pthread, pthread_create, [ - AC_DEFINE(PTHREADS) - LIBS="$LIBS -lpthread" -],[ +AC_CHECK_LIB(c_r, pthread_create) +AC_CHECK_LIB(pthread, pthread_create) + +AC_CHECK_FUNCS(pthread_create) + +if test "$ac_cv_func_pthread_create" != "yes"; then AC_MSG_ERROR(You need pthreads to build TSRM.) -]) +fi + +AC_DEFINE(PTHREADS) AC_CHECK_HEADERS(stdarg.h) diff --git a/TSRM/tsrm_config.h.in b/TSRM/tsrm_config.h.in index 414851122c..211c8ac5cc 100644 --- a/TSRM/tsrm_config.h.in +++ b/TSRM/tsrm_config.h.in @@ -5,11 +5,21 @@ #undef PTHREADS +/* Define if you have the pthread_create function. */ +#undef HAVE_PTHREAD_CREATE + /* Define if you have the header file. */ #undef HAVE_STDARG_H -#ifdef DEFINE_TSRM_VERSION -# undef PACKAGE -# undef VERSION -#endif +/* Define if you have the c_r library (-lc_r). */ +#undef HAVE_LIBC_R + +/* Define if you have the pthread library (-lpthread). */ +#undef HAVE_LIBPTHREAD + +/* Name of package */ +#undef PACKAGE + +/* Version number of package */ +#undef VERSION -- 2.50.1