aboutsummaryrefslogtreecommitdiff
path: root/m4/odp_pthread.m4
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2022-10-28 16:14:01 +0300
committerGitHub <noreply@github.com>2022-10-28 16:14:01 +0300
commitbdfef681d7849339946bd63151fa2875d9ee801d (patch)
treeceec932bbc3f678f68ed91953dc83f3852f95df0 /m4/odp_pthread.m4
parent78066161560f2aa0ea829b1c435ab83809651162 (diff)
parent196c01565be4017e1d4d29df1912014b71adc105 (diff)
Merge ODP v1.38.0.0v1.38.0.0_DPDK_19.11
Merge ODP linux-generic v1.38.0.0 into linux-dpdk.
Diffstat (limited to 'm4/odp_pthread.m4')
-rw-r--r--m4/odp_pthread.m410
1 files changed, 7 insertions, 3 deletions
diff --git a/m4/odp_pthread.m4 b/m4/odp_pthread.m4
index ad65f4d1a..ad1ecdff4 100644
--- a/m4/odp_pthread.m4
+++ b/m4/odp_pthread.m4
@@ -9,11 +9,15 @@
AC_DEFUN([ODP_PTHREAD], [
AC_MSG_CHECKING([for pthread support in -pthread])
AC_LANG_PUSH([C])
- PTHEAD_CFLAGS="-pthread"
- CFLAGS="$CFLAGS $PTHEAD_CFLAGS"
+ saved_cflags="$CFLAGS"
+ saved_ldflags="$LDFLAGS"
+ PTHREAD_CFLAGS="-pthread"
+ CFLAGS="$AM_CFLAGS $CFLAGS $PTHREAD_CFLAGS"
PTHREAD_LIBS="-pthread"
- LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+ LDFLAGS="$AM_LDFLAGS $LDFLAGS $PTHREAD_LIBS"
AC_TRY_LINK_FUNC([pthread_create], [pthread=yes])
+ CFLAGS="$saved_cflags"
+ LDFLAGS="$saved_ldflags"
if test x"$pthread" != "xyes"; then
AC_MSG_FAILURE([pthread is not supported])
fi