Use -G option for linking shared libraries on Solaris (SF patch #103656).

Compile shared object files using -fPIC option when using GCC on Solaris (SF
patch #103865).  Closes bug #132783.  Move config.c generated by makesetup to
the Modules directory.
This commit is contained in:
Neil Schemenauer 2001-02-19 04:47:42 +00:00
parent c5cfcb4a48
commit 6625216762
1 changed files with 5 additions and 1 deletions

View File

@ -544,7 +544,7 @@ then
SunOS/4*) LDSHARED="ld";; SunOS/4*) LDSHARED="ld";;
SunOS/5*) SunOS/5*)
if test "$GCC" = "yes" if test "$GCC" = "yes"
then LDSHARED='$(CC) -shared' then LDSHARED='$(CC) -G'
else LDSHARED="ld -G"; else LDSHARED="ld -G";
fi ;; fi ;;
hp*|HP*) LDSHARED="ld -b";; hp*|HP*) LDSHARED="ld -b";;
@ -590,6 +590,9 @@ AC_MSG_CHECKING(CCSHARED)
if test -z "$CCSHARED" if test -z "$CCSHARED"
then then
case $ac_sys_system/$ac_sys_release in case $ac_sys_system/$ac_sys_release in
SunOS*) if test "$GCC" = yes;
then CCSHARED="-fPIC";
fi;;
hp*|HP*) if test "$GCC" = yes; hp*|HP*) if test "$GCC" = yes;
then CCSHARED="-fpic"; then CCSHARED="-fpic";
else CCSHARED="+z"; else CCSHARED="+z";
@ -1441,3 +1444,4 @@ echo "creating Makefile"
$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
-s Modules Modules/Setup.config \ -s Modules Modules/Setup.config \
Modules/Setup Modules/Setup.local Modules/Setup Modules/Setup.local
mv config.c Modules