X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/019c9bb5516c92cceeeb4b050fa8075a1359c43c..52e1cb5ebf5e5a8cd5d3d9673b540b0c0dfe20df:/hints/aix.sh diff --git a/hints/aix.sh b/hints/aix.sh index 2c42151..8869a23 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -1,6 +1,8 @@ # hints/aix.sh # AIX 3.x.x hints thanks to Wayne Scott # AIX 4.1 hints thanks to Christopher Chan-Nui . +# AIX 4.1 pthreading by Christopher Chan-Nui and +# Jarkko Hietaniemi . # Merged on Mon Feb 6 10:22:35 EST 1995 by # Andy Dougherty @@ -74,3 +76,32 @@ lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT). ;; esac + +if [ "X$usethreads" != "X" ]; then + ccflags="-DUSE_THREADS $ccflags" + cppflags="-DUSE_THREADS $cppflags" + case "$cc" in + xlc_r) + ;; + cc | '') + cc=xlc_r + ;; + *) + case "$cc" in + gcc) + echo >&4 "You cannot use POSIX threads from GNU cc in AIX." + ;; + *) + echo >&4 "Unknown C compiler." + ;; + esac + echo >&4 "You should use the AIX C compiler called xlc_r." + echo >&4 "Cannot continue, aborting." + exit 1 + ;; + esac + + # Add the POSIX threads library and use the re-entrant libc. + + lddlflags=`echo $lddlflags | sed 's/ -lc$/ -lpthreads -lc_r/'` +fi