only link rt if necessary
This commit is contained in:
+3
-1
@@ -23,7 +23,9 @@ AC_CHECK_HEADERS([arpa/inet.h \
|
|||||||
AC_CHECK_LIB([pthread], [pthread_setname_np],
|
AC_CHECK_LIB([pthread], [pthread_setname_np],
|
||||||
AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [1], [Define to 1 if pthread has pthread_setname_np.]),
|
AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [1], [Define to 1 if pthread has pthread_setname_np.]),
|
||||||
AC_MSG_RESULT([Could not find pthread_setname_np in pthread.]))
|
AC_MSG_RESULT([Could not find pthread_setname_np in pthread.]))
|
||||||
|
RT_LIB=
|
||||||
|
AC_CHECK_LIB([rt], [clock_gettime], [RT_LIB="-lrt"])
|
||||||
|
AC_SUBST(RT_LIB)
|
||||||
AC_CHECK_FUNC([pselect], [AC_DEFINE(HAVE_PSELECT, [1], [Define to 1 if pselect() is available.])])
|
AC_CHECK_FUNC([pselect], [AC_DEFINE(HAVE_PSELECT, [1], [Define to 1 if pselect() is available.])])
|
||||||
AC_CHECK_FUNC([ppoll], [AC_DEFINE(HAVE_PPOLL, [1], [Define to 1 if ppoll() is available.])])
|
AC_CHECK_FUNC([ppoll], [AC_DEFINE(HAVE_PPOLL, [1], [Define to 1 if ppoll() is available.])])
|
||||||
AC_CHECK_FUNC([argp_parse], [have_argp=yes], AC_CHECK_LIB([argp], [argp_parse], [have_argp=yes; LIBS="-largp $LIBS"], [have_argp=no]))
|
AC_CHECK_FUNC([argp_parse], [have_argp=yes], AC_CHECK_LIB([argp], [argp_parse], [have_argp=yes; LIBS="-largp $LIBS"], [have_argp=no]))
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ ebusd_SOURCES = bushandler.cpp \
|
|||||||
ebusd_LDADD = ../lib/utils/libutils.a \
|
ebusd_LDADD = ../lib/utils/libutils.a \
|
||||||
../lib/ebus/libebus.a \
|
../lib/ebus/libebus.a \
|
||||||
-lpthread \
|
-lpthread \
|
||||||
-lrt
|
@RT_LIB@
|
||||||
|
|
||||||
distclean-local:
|
distclean-local:
|
||||||
-rm -f Makefile.in
|
-rm -f Makefile.in
|
||||||
|
|||||||
Reference in New Issue
Block a user