diff --git a/configure.ac b/configure.ac index 7a509c70..33dc2984 100644 --- a/configure.ac +++ b/configure.ac @@ -38,4 +38,10 @@ AC_CHECK_HEADERS(alloca.h pthread.h stdio.h math.h) AC_CHECK_HEADERS(sys/types.h sys/socket.h) AC_CHECK_HEADERS(stdint.h netinet/in.h netinet/tcp.h) +PTHREAD_LIBS="-lpthread" +MATH_LIBS="-lm" + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(MATH_LIBS) + AC_OUTPUT([Makefile] [src/Makefile]) diff --git a/src/Makefile.am b/src/Makefile.am index 7c60ab1c..84729476 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,6 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libckpool.la libckpool_la_SOURCES = libckpool.c +libckpool_la_LIBADD = @MATH_LIBS@ @PTHREAD_LIBS@ bin_PROGRAMS = ckpool ckpool_SOURCES = ckpool.c