summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 994d7c1)
raw | patch | inline | side by side (parent: 994d7c1)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 3 Jun 2016 16:30:00 +0000 (18:30 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 3 Jun 2016 16:30:00 +0000 (18:30 +0200) |
Until now you could run ./configure --with-libpthread=no.
This didn't actually compile though.
The daemon has assumed for a while now that pthread support
is available. Bail out in ./configure if this is not the case.
This didn't actually compile though.
The daemon has assumed for a while now that pthread support
is available. Bail out in ./configure if this is not the case.
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/daemon/Makefile.am | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index e4d61335a367c486997d79bce3ec6790c9273384..5e2eaa03f157c49129613df9d1049abd407264e5 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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
diff --git a/src/Makefile.am b/src/Makefile.am
index ec562d8637b5d9c6f75d3fe6e92bb89c14ae64b0..19a1fb1f16a8b8cda86ba2f92d34c76b22bfbdbf 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
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 =
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index 18aef36ca5b814afed244a7bbcd057a856cf69e9..d59e82348404da03594d91e6aa20bc3a95cd5962 100644 (file)
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
# Link to these libraries..
-COMMON_LIBS =
+COMMON_LIBS = $(PTHREAD_LIBS)
if BUILD_WITH_LIBRT
COMMON_LIBS += -lrt
endif
if BUILD_WITH_LIBRESOLV
COMMON_LIBS += -lresolv
endif
-if BUILD_WITH_LIBPTHREAD
-COMMON_LIBS += $(PTHREAD_LIBS)
-endif
if BUILD_WITH_LIBKSTAT
COMMON_LIBS += -lkstat
endif