@@ -363,8 +363,6 @@ AC_CONFIG_FILES([Makefile
pkgconfig/libodphelper.pc
])
-AC_SEARCH_LIBS([timer_create],[rt posix4])
-
##########################################################################
# distribute the changed variables among the Makefiles
@@ -7,5 +7,5 @@ Name: libodp-linux
Description: The ODP packet processing engine
Version: @PKGCONFIG_VERSION@
Libs: -L${libdir} -lodp-linux @DPDK_LIBS@
-Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ -lrt -lpthread @ATOMIC_LIBS@
+Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ @TIMER_LIBS@ -lpthread @ATOMIC_LIBS@
Cflags: -I${includedir}
@@ -261,6 +261,7 @@ __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS)
__LIB__libodp_linux_la_LIBADD += $(OPENSSL_LIBS)
__LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS)
__LIB__libodp_linux_la_LIBADD += $(PTHREAD_LIBS)
+__LIB__libodp_linux_la_LIBADD += $(TIMER_LIBS)
# Create symlink for ABI header files. Application does not need to use the arch
# specific include path for installed files.
@@ -75,6 +75,7 @@ fi
AC_SUBST([ATOMIC_LIBS])
m4_include([platform/linux-generic/m4/odp_pthread.m4])
+m4_include([platform/linux-generic/m4/odp_timer.m4])
m4_include([platform/linux-generic/m4/odp_openssl.m4])
m4_include([platform/linux-generic/m4/odp_pcap.m4])
m4_include([platform/linux-generic/m4/odp_netmap.m4])
new file mode 100644
@@ -0,0 +1,8 @@
+##########################################################################
+# Check for POSIX timer functions
+##########################################################################
+
+AC_CHECK_LIB([rt], [timer_create], [TIMER_LIBS="-lrt"],
+ [AC_CHECK_LIB([posix4], [timer_create], [TIMER_LIBS="-lposix4"],
+ [AC_MSG_FAILURE([timer_create not found])])])
+AC_SUBST([TIMER_LIBS])