# Checks for header files.
AC_PATH_X
AC_CHECK_HEADERS([stdbool.h])
-AC_CHECK_HEADERS(pthread.h,, [AC_MSG_ERROR([pthread.h required])])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
############### common
# Checks pthread
-AC_CHECK_LIB(pthread, pthread_create, [LIBS="$LIBS -lpthread"])
+AC_CHECK_LIB(pthread, pthread_create)
+PTHREAD_LIBS=-pthread
+AC_SUBST(PTHREAD_LIBS)
# Checks sensors, required by psensor and psensor-server
AC_CHECK_LIB(sensors, sensors_init)
../lib/libpsensor.a \
$(SENSORS_LIBS) \
$(JSON_LIBS) \
- $(LIBMICROHTTPD_LIBS)
+ $(LIBMICROHTTPD_LIBS) \
+ $(PTHREAD_LIBS)
if GTOP
AM_CPPFLAGS += $(GTOP_CFLAGS)
EXTRA_DIST = description.txt
psensor-server.1: server.c $(top_srcdir)/configure.ac
$(MAKE) $(AM_MAKEFLAGS) psensor-server$(EXEEXT)
- help2man --include=description.txt -N --name="Temperature and system monitoring Web server" --output=psensor-server.1 ./psensor-server$(EXEEXT)
\ No newline at end of file
+ help2man --include=description.txt -N --name="Temperature and system monitoring Web server" --output=psensor-server.1 ./psensor-server$(EXEEXT)