X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Faix.sh;h=2f19f1cebbaded8d3972d3d7cf243358877de2b0;hb=973abda3de19f81f0355443e0fb0b20961973762;hp=406c44275d6d1afc9b9928bb58e6b7a07f5d1df8;hpb=30def704cafa11862a4b1be8a6e882e725a22b02;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/aix.sh b/hints/aix.sh index 406c442..2f19f1c 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -55,11 +55,9 @@ esac case "$osvers" in 3.*|4.1.*|4.2.*) usenm='undef' - usenativedlopen='false' ;; *) usenm='true' - usenativedlopen='true' ;; esac @@ -148,6 +146,18 @@ case "$cc" in *** EOF ;; + 5.0.0.0) + cat >&4 <&4 <&1 | grep gcc`" = X; then - # Cify libswanted. - set `echo X "$libswanted "| sed -e 's/ c / C c /'` - shift - libswanted="$*" - # Cify lddlflags. - set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'` - shift - lddlflags="$*" - fi +# If the C++ libraries, libC and libC_r, are available we will prefer them +# over the vanilla libc, because the libC contain loadAndInit() and +# terminateAndUnload() which work correctly with C++ statics while libc +# load() and unload() do not. See ext/DynaLoader/dl_aix.xs. +# The C-to-C_r switch is done by usethreads.cbu, if needed. +if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then + # Cify libswanted. + set `echo X "$libswanted "| sed -e 's/ c / C c /'` + shift + libswanted="$*" + # Cify lddlflags. + set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'` + shift + lddlflags="$*" fi # EOF