]> granicus.if.org Git - curl/commitdiff
configure: force-use -lpthreads on HPUX
authorDaniel Stenberg <daniel@haxx.se>
Fri, 21 Sep 2018 07:40:56 +0000 (09:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 21 Sep 2018 20:55:32 +0000 (22:55 +0200)
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

index fdfd0897ce977a9e87fca36734b92370b3951563..85b8b146559bdb9984cafa16cda7ac5284e9cff9 100755 (executable)
@@ -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