Commit d50340f1 authored by Daniel Salzman's avatar Daniel Salzman

configure: link pthread and dl with knotd only

parent a937fabd
......@@ -559,9 +559,25 @@ AS_IF([test "$enable_cap_ng" = yes],
[AC_DEFINE([ENABLE_CAP_NG], [1], [POSIX capabilities available])]
)
AC_SEARCH_LIBS([pow], [m])
AC_SEARCH_LIBS([pthread_create], [pthread], [], [AC_MSG_ERROR([pthreads not found])])
AC_SEARCH_LIBS([dlopen], [dl])
save_LIBS="$LIBS"
AC_SEARCH_LIBS([pthread_create], [pthread], [
pthread_LIBS="$ac_cv_search_pthread_create"
AC_SUBST([pthread_LIBS])
],[
AC_MSG_ERROR([pthreads not found])
])
LIBS="$save_LIBS"
save_LIBS="$LIBS"
AC_SEARCH_LIBS([dlopen], [dl], [
dlopen_LIBS="$ac_cv_search_dlopen"
AC_SUBST([dlopen_LIBS])
],[
AC_MSG_ERROR([dlopen not found])
])
LIBS="$save_LIBS"
AC_SEARCH_LIBS([pow], [m], [], [AC_MSG_ERROR([math not found])])
AC_SEARCH_LIBS([clock_gettime], [rt])
# Checks for header files.
......
......@@ -2,7 +2,7 @@ libknotd_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAG_VISIBILITY) $(systemd_CFLAGS) \
$(liburcu_CFLAGS) -DKNOTD_MOD_STATIC
libknotd_la_LDFLAGS = $(AM_LDFLAGS) -export-symbols-regex '^knotd_'
libknotd_la_LIBADD = libcontrib.la libknot.la libzscanner.la $(systemd_LIBS) \
$(liburcu_LIBS)
$(liburcu_LIBS) $(pthread_LIBS) $(dlopen_LIBS)
include_libknotddir = $(includedir)/knot
include_libknotd_HEADERS = \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment