]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: use correct CFLAGS for threaded resolver with xlC on AIX
authorDavide Cassioli <dcassioli@gmail.com>
Mon, 24 Jan 2022 13:24:45 +0000 (14:24 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 2 Feb 2022 12:05:50 +0000 (13:05 +0100)
Fixes #8276
Closes #8374

configure.ac

index 32d788a1fd436256b490c56bba2c2fed08d5d8a0..d783c5ca8b28703a267e6d493e5293f462ad6532 100644 (file)
@@ -3477,14 +3477,23 @@ if test "$want_pthreads" != "no"; then
          dnl it doesn't actually work without -lpthread
          USE_THREADS_POSIX=""
          ;;
+      *-ibm-aix*)
+         dnl Check if compiler is xlC
+         COMPILER_VERSION=`"$CC" -qversion 2>/dev/null`
+         if test x"$COMPILER_VERSION" = "x"; then
+           CFLAGS="$CFLAGS -pthread"
+         else
+           CFLAGS="$CFLAGS -qthreaded"
+         fi
+         ;;
       *)
+         CFLAGS="$CFLAGS -pthread"
          ;;
       esac
 
       dnl if it wasn't found without lib, search for it in pthread lib
       if test "$USE_THREADS_POSIX" != "1"
       then
-        CFLAGS="$CFLAGS -pthread"
         # assign PTHREAD for pkg-config use
         PTHREAD=" -pthread"
         AC_CHECK_LIB(pthread, pthread_create,