summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2013-12-10 09:24:12 -0300
committerEric Leblond <eric@regit.org>2013-12-11 08:59:31 +0100
commitefa4bdba6eb982fd44a9bceb2b560baa7a5ec857 (patch)
tree4c689b9997897835c28781677ce1488e83dbc3f9 /configure.ac
parentc3a29314b87959d56f28295f4f8bd5cd9aafe0d4 (diff)
ulogd: use AC_SEARCH_LIBS for libpthread
Some uClibc-based toolchains lack threading support, so use AC_SEARCH_LIB instead of AC_CHECK_LIB to check for libpthread availability and link conditionally if found since it's only used for the database backends. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7f5ffa9..5e45aaa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,8 @@ AC_CHECK_FUNCS(socket strerror)
regular_CFLAGS="-Wall -Wextra -Wno-unused-parameter"
AC_SUBST([regular_CFLAGS])
-AC_CHECK_LIB(pthread, pthread_create)
+AC_SEARCH_LIBS([pthread_create], [pthread], [libpthread_LIBS="$LIBS"; LIBS=""])
+AC_SUBST([libpthread_LIBS])
dnl Check for the right nfnetlink version
PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.1])