From 6f0afb842c733034bf36b553059270321b38c856 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 21 Sep 2018 09:40:56 +0200 Subject: configure: force-use -lpthreads on HPUX When trying to detect pthreads use on HPUX the checks will succeed without the correct -l option but then end up failing at run-time. Reported-by: Eason-Yu on github Fixes #2697 Closes #3025 --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index fdfd0897c..85b8b1465 100755 --- a/configure.ac +++ b/configure.ac @@ -3897,6 +3897,16 @@ if test "$want_pthreads" != "no"; then dnl first check for function without lib AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] ) + dnl on HPUX, life is more complicated... + case $host in + *-hp-hpux*) + dnl it doesn't actually work without -lpthread + USE_THREADS_POSIX="" + ;; + *) + ;; + esac + dnl if it wasn't found without lib, search for it in pthread lib if test "$USE_THREADS_POSIX" != "1" then -- cgit v1.2.1