# AIX 4.3.* and above default to using nm for symbol extraction
case "$osvers" in
3.*|4.1.*|4.2.*)
- usenm='undef'
- usenativedlopen='false'
+ case "$usenm" in
+ '') usenm='undef'
+ esac
+ case "$usenativedlopen" in
+ '') usenativedlopen='false'
+ esac
;;
*)
- usenm='true'
- usenativedlopen='true'
+ case "$usenm" in
+ '') usenm='true'
+ esac
+ case "$usenativedlopen" in
+ '') usenativedlopen='true'
+ esac
;;
esac
lddlflags="$*"
# Insert pthreads to libswanted, before any libc or libC.
- set `echo X "$libswanted "| sed -e 's/ \([cC]\) / pthreads \1 /'`
+ set `echo X "$libswanted "| sed -e 's/ \([cC]_r\) / pthreads \1 /'`
shift
libswanted="$*"
# Insert pthreads to lddlflags, before any libc or libC.
- set `echo X "$lddlflags " | sed -e 's/ \(-l[cC]\) / -lpthreads \1 /'`
+ set `echo X "$lddlflags " | sed -e 's/ \(-l[cC]_r\) / -lpthreads \1 /'`
shift
lddlflags="$*"
if test $usenativedlopen = 'true'
then
- ccflags="$ccflags -DUSE_NATIVE_DLOPEN"
- ldflags="$ldflags -brtl"
+ ccflags="$ccflags -DUSE_NATIVE_DLOPEN"
+ case "$cc" in
+ *gcc*) ldflags="$ldflags -Wl,-brtl" ;;
+ *) ldflags="$ldflags -brtl" ;;
+ esac
else
# If the C++ libraries, libC and libC_r, are available we will prefer them
# over the vanilla libc, because the libC contain loadAndInit() and