From: Davide Cassioli Date: Mon, 24 Jan 2022 13:24:45 +0000 (+0100) Subject: configure: use correct CFLAGS for threaded resolver with xlC on AIX X-Git-Tag: curl-7_82_0~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cc75eb7ddfbcc3c574b739cb132c24241043987;p=thirdparty%2Fcurl.git configure: use correct CFLAGS for threaded resolver with xlC on AIX Fixes #8276 Closes #8374 --- diff --git a/configure.ac b/configure.ac index 32d788a1fd..d783c5ca8b 100644 --- a/configure.ac +++ b/configure.ac @@ -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,