[:],
[AC_MSG_ERROR([The compiler does not support __attribute__ extensions])])
+AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])
+
# Checks for library functions.
AC_FUNC_CHOWN
AC_FUNC_FORK
sysconf \
])
+# Check for pthread_setname_np and its signature
+LTTNG_PTHREAD_SETNAME_NP
+
# AC_FUNC_MALLOC causes problems when cross-compiling.
#AC_FUNC_MALLOC
[AC_DEFINE([HAVE_DLMOPEN], [1])]
)
-AC_CHECK_LIB([pthread], [pthread_create])
-AC_CHECK_LIB([pthread], [pthread_setname_np],
- AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [1], [Define to 1 if pthread_setname_np is available.]),
- AC_CHECK_LIB([pthread], [pthread_set_name_np],
- AC_DEFINE([HAVE_PTHREAD_SET_NAME_NP], [1], [Define to 1 if pthread_set_name_np is available.]),
- AC_MSG_RESULT([pthread setname/set_name not found.])))
-
# Check for dlfcn.h
AC_CHECK_HEADER([dlfcn.h])
AS_IF([test "x${ac_cv_header_dlfcn_h}" = "xyes"], [
_AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS], [3000])
-AM_CFLAGS="-Wall"
+AM_CFLAGS="-Wall $PTHREAD_CFLAGS"
AC_SUBST(AM_CFLAGS)
AC_SUBST(JNI_CPPFLAGS)