]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: -pthread not available on AmigaOS 4.x
authorFutaura <oliver@futaura.co.uk>
Sun, 7 Aug 2022 14:42:35 +0000 (15:42 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Aug 2022 07:07:37 +0000 (09:07 +0200)
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

.mailmap
configure.ac

index 831be1f648601f669a0bb361fdc28977abb58486..bfa0774c4b321b5ba218a0508524c859304c5ec7 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -92,3 +92,4 @@ Henrik Holst <henrik.holst@millistream.com>
 Christian Schmitz <support@monkeybreadsoftware.de>
 Max Mehl <max.mehl@fsfe.org>
 rzrymiak on github <106121613+rzrymiak@users.noreply.github.com>
+Oliver Roberts <oliver@futaura.co.uk>
index b4b183f4044f0397b7ad85248d903fa8036eb2a7..5559409427a15e3ea4eb998586ef5e6dc5b8d70e 100644 (file)
@@ -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"])