fi
fi
-# --with-libpthread {{{
-AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
-[ if test "x$withval" != "xno" \
- && test "x$withval" != "xyes"
- then
- LDFLAGS="$LDFLAGS -L$withval/lib"
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- with_libpthread="yes"
- else
- if test "x$withval" = "xno"
- then
- with_libpthread="no (disabled)"
- fi
- fi
-], [with_libpthread="yes"])
-
AC_SUBST([PTHREAD_LIBS])
-if test "x$with_libpthread" = "xyes"
-then
- SAVE_LIBS="$LIBS"
- AC_CHECK_LIB(pthread, pthread_create, [], [with_libpthread="no (Symbol 'pthread_create' not found)"], [])
- PTHREAD_LIBS="$LIBS"
- LIBS="$SAVE_LIBS"
-fi
+SAVE_LIBS="$LIBS"
+AC_CHECK_LIB([pthread],
+ [pthread_create],
+ [],
+ [AC_MSG_ERROR([Symbol 'pthread_create' not found in libpthread"])],
+ []
+)
+PTHREAD_LIBS="$LIBS"
+LIBS="$SAVE_LIBS"
-if test "x$with_libpthread" = "xyes"
-then
- AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
-fi
-AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
-# }}}
+AC_CHECK_HEADERS([pthread.h],
+ [],
+ [AC_MSG_ERROR([pthread.h not found])]
+)
m4_divert_once([HELP_WITH], [
collectd additional packages:])
libperfstat . . . . . $with_perfstat
libperl . . . . . . . $with_libperl
libpq . . . . . . . . $with_libpq
- libpthread . . . . . $with_libpthread
librabbitmq . . . . . $with_librabbitmq
libriemann-client . . $with_libriemann_client
librdkafka . . . . . $with_librdkafka
collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) \
-I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
collectd_tg_LDADD = \
+ $(PTHREAD_LIBS) \
daemon/libheap.la \
libcollectdclient/libcollectdclient.la
if BUILD_WITH_LIBSOCKET
if BUILD_AIX
collectd_tg_LDADD += -lm
endif
-if BUILD_WITH_LIBPTHREAD
-collectd_tg_LDADD += $(PTHREAD_LIBS)
-endif
pkglib_LTLIBRARIES =