similarity index 63%
rename from platform/linux-generic/m4/odp_timer.m4
rename to m4/odp_timer.m4
@@ -1,8 +1,11 @@
+# ODP_TIMER([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
##########################################################################
# Check for POSIX timer functions
##########################################################################
-
+AC_DEFUN([ODP_TIMER], [dnl
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])])])
+ [m4_default([$2], [AC_MSG_FAILURE([timer_create not found])])])])
+m4_default([$1], [:])
AC_SUBST([TIMER_LIBS])
+]) # ODP_TIMER
@@ -75,7 +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])
+ODP_TIMER
ODP_OPENSSL
m4_include([platform/linux-generic/m4/odp_pcap.m4])
m4_include([platform/linux-generic/m4/odp_netmap.m4])