mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
build: fix pthread CFLAGS for function checks
The pthread_* checks for extra pthread features really need PTHREAD_CFLAGS... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
2ccc493333
commit
f1d85301f3
15
configure.ac
15
configure.ac
|
@ -459,6 +459,9 @@ AX_PTHREAD([
|
||||||
AC_MSG_FAILURE([This FRR version needs pthreads])
|
AC_MSG_FAILURE([This FRR version needs pthreads])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
orig_cflags="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||||
|
|
||||||
AC_SEARCH_LIBS([pthread_condattr_setclock], [],
|
AC_SEARCH_LIBS([pthread_condattr_setclock], [],
|
||||||
[frr_cv_pthread_condattr_setclock=yes],
|
[frr_cv_pthread_condattr_setclock=yes],
|
||||||
[frr_cv_pthread_condattr_setclock=no])
|
[frr_cv_pthread_condattr_setclock=no])
|
||||||
|
@ -466,6 +469,13 @@ if test "$frr_cv_pthread_condattr_setclock" = "yes"; then
|
||||||
AC_DEFINE([HAVE_PTHREAD_CONDATTR_SETCLOCK], [1], [Have pthread.h pthread_condattr_setclock])
|
AC_DEFINE([HAVE_PTHREAD_CONDATTR_SETCLOCK], [1], [Have pthread.h pthread_condattr_setclock])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([pthread_np.h],,, [
|
||||||
|
#include <pthread.h>
|
||||||
|
])
|
||||||
|
AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np pthread_getthreadid_np])
|
||||||
|
|
||||||
|
CFLAGS="$orig_cflags"
|
||||||
|
|
||||||
dnl --------------
|
dnl --------------
|
||||||
dnl Check programs
|
dnl Check programs
|
||||||
dnl --------------
|
dnl --------------
|
||||||
|
@ -1041,11 +1051,6 @@ int main(int argc, char **argv) {
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CHECK_HEADERS([pthread_np.h],,, [
|
|
||||||
#include <pthread.h>
|
|
||||||
])
|
|
||||||
AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np pthread_getthreadid_np])
|
|
||||||
|
|
||||||
needsync=true
|
needsync=true
|
||||||
|
|
||||||
AS_IF([$needsync], [
|
AS_IF([$needsync], [
|
||||||
|
|
Loading…
Reference in a new issue