Skip to content

Commit

Permalink
configure: use correct CFLAGS for threaded resolver with xlC on AIX
Browse files Browse the repository at this point in the history
Fixes #8276
Closes #8374
  • Loading branch information
dcassioli authored and bagder committed Feb 2, 2022
1 parent 94d4a06 commit 9cc75eb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion configure.ac
Expand Up @@ -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,
Expand Down

0 comments on commit 9cc75eb

Please sign in to comment.