From: Futaura Date: Sun, 7 Aug 2022 14:42:35 +0000 (+0100) Subject: configure: -pthread not available on AmigaOS 4.x X-Git-Tag: curl-7_85_0~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7b322aac8decc38b76d1ba358bb22263d231a49;p=thirdparty%2Fcurl.git configure: -pthread not available on AmigaOS 4.x The most recent GCC builds for AmigaOS 4.x do not allow -pthread and exit with an error. Instead, need to explictly specify -lpthread. Closes #9266 --- diff --git a/.mailmap b/.mailmap index 831be1f648..bfa0774c4b 100644 --- a/.mailmap +++ b/.mailmap @@ -92,3 +92,4 @@ Henrik Holst Christian Schmitz Max Mehl rzrymiak on github <106121613+rzrymiak@users.noreply.github.com> +Oliver Roberts diff --git a/configure.ac b/configure.ac index b4b183f404..5559409427 100644 --- a/configure.ac +++ b/configure.ac @@ -3617,6 +3617,9 @@ if test "$want_pthreads" != "no"; then dnl if it wasn't found without lib, search for it in pthread lib if test "$USE_THREADS_POSIX" != "1" then + # assign PTHREAD for pkg-config use + PTHREAD=" -pthread" + case $host in *-ibm-aix*) dnl Check if compiler is xlC @@ -3627,12 +3630,14 @@ if test "$want_pthreads" != "no"; then CFLAGS="$CFLAGS -qthreaded" fi ;; + powerpc-*amigaos*) + dnl No -pthread option, but link with -lpthread + PTHREAD=" -lpthread" + ;; *) CFLAGS="$CFLAGS -pthread" ;; esac - # assign PTHREAD for pkg-config use - PTHREAD=" -pthread" AC_CHECK_LIB(pthread, pthread_create, [USE_THREADS_POSIX=1], [ CFLAGS="$save_CFLAGS"])