aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac16
-rw-r--r--platform/linux-generic/m4/configure.m42
-rw-r--r--platform/linux-generic/m4/odp_pthread.m413
3 files changed, 15 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 5441b4a..bb4ebe0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,8 +153,6 @@ AC_ARG_ENABLE([test-helper],
AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ])
##########################################################################
-
-##########################################################################
# Enable/disable test-cpp
##########################################################################
test_cpp=no
@@ -202,18 +200,6 @@ AC_ARG_ENABLE([debug],
ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
##########################################################################
-# Check for pthreads availability
-##########################################################################
-
-AX_PTHREAD([CC="$PTHREAD_CC"], [
- echo "Error! We require pthreads to be available"
- exit -1
- ])
-LIBS="$PTHREAD_LIBS $LIBS"
-AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
-AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS"
-
-##########################################################################
# Check for doxygen availability
##########################################################################
AC_CHECK_PROGS([DOXYGEN], [doxygen])
@@ -355,8 +341,6 @@ AC_SEARCH_LIBS([timer_create],[rt posix4])
##########################################################################
# distribute the changed variables among the Makefiles
-AM_LDFLAGS="$AM_LDFLAGS -pthread -lrt"
-
AC_SUBST([LIBS])
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([CPPFLAGS])
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4
index bb92198..ddac90e 100644
--- a/platform/linux-generic/m4/configure.m4
+++ b/platform/linux-generic/m4/configure.m4
@@ -16,6 +16,8 @@ AC_LINK_IFELSE(
echo "Use newer version. For gcc > 4.7.0"
exit -1)
+m4_include([platform/linux-generic/m4/odp_pthread.m4])
+
AC_CONFIG_FILES([platform/linux-generic/Makefile
platform/linux-generic/test/Makefile
platform/linux-generic/test/pktio/Makefile])
diff --git a/platform/linux-generic/m4/odp_pthread.m4 b/platform/linux-generic/m4/odp_pthread.m4
new file mode 100644
index 0000000..7f39103
--- /dev/null
+++ b/platform/linux-generic/m4/odp_pthread.m4
@@ -0,0 +1,13 @@
+##########################################################################
+# Check for pthreads availability
+##########################################################################
+
+AX_PTHREAD([CC="$PTHREAD_CC"], [
+ echo "Error! We require pthreads to be available"
+ exit -1
+ ])
+LIBS="$PTHREAD_LIBS $LIBS"
+AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
+AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS"
+
+AM_LDFLAGS="$AM_LDFLAGS -pthread -lrt"