From f041360ac17bc032c7e5a4553372893e42ba68c6 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 15 Dec 2017 10:07:03 +0100 Subject: Check for prctl portability --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9bb0ebc..261d444 100644 --- a/configure.ac +++ b/configure.ac @@ -173,6 +173,17 @@ AC_COMPILE_IFELSE( [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_DEFINE([M_PIl], [M_PI], [Replacing define])]) AC_LANG_POP([C++]) +# Linux has prctl to set thread names +AC_MSG_CHECKING(for prctl and PR_SET_NAME) +AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ + #include + void set_thread_name() { + prctl(PR_SET_NAME,"test",0,0,0); + } + ]])], + [ AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PRCTL, 1, [Define this symbol if you have prctl and PR_SET_NAME]) ], + [ AC_MSG_RESULT(no) ]) # Check for march AS_IF([test "x$enable_native" = "xyes"], -- cgit v1.2.3