Make shared lib builds work again

git-svn-id: svn://10.0.0.236/branches/MozillaSourceClassic_19981026_BRANCH@13991 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cls%seawood.org
1998-11-03 15:54:50 +00:00
parent 56fb126836
commit c424dc78b9
2 changed files with 30 additions and 2 deletions

View File

@@ -49,8 +49,15 @@ MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@
MOZ_NATIVE_JPEG = @SYSTEM_JPEG@
MOZ_NATIVE_PNG = @SYSTEM_PNG@
ifndef NO_SHARED_LIB
BUILD_UNIX_PLUGINS = 1
DSO_CFLAGS = -fPIC
MKSHLIB = @MKSHLIB@
DSO_LDOPTS = @DSO_LDOPTS@
endif
# Should the extra CFLAGS only be added in Makefile.ins that need them?
OS_CFLAGS = @CFLAGS@
OS_CFLAGS = @CFLAGS@ $(DSO_CFLAGS)
OS_INCLUDES = $(NSPR_CFLAGS) $(JPEG_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS)
OS_LIBS = @LDFLAGS@ @LIBS@
DEFINES = @DEFS@

View File

@@ -105,11 +105,29 @@ dnl the qsort routine under solaris is faulty
dnl Linux Alpha needs -mieee for FPU to work correctly
dnl Note this case statement doesn't seem to handle [] as part of a regexp
dnl set the defaults first
dnl ========================================================
MKSHLIB='$(LD) $(DSO_LDOPTS)'
DSO_LDOPTS='-shared -h $(@:$(OBJDIR)/%.so=%.so)'
dnl gcc can come with its own linker so its better to use the pass-thru calls
dnl ========================================================
if test "$GNU_CC" = 1; then
MKSHLIB='$(CC) $(DSO_LDOPTS)'
DSO_LDOPTS='-shared -Wl,-h -Wl,$(@:$(OBJDIR)/%.so=%.so)'
fi
case "$target" in
*-*-solaris*)
AC_DEFINE(BROKEN_QSORT) ;;
AC_DEFINE(BROKEN_QSORT)
DSO_LDOPTS='-G -h $(@:$(OBJDIR)/%.so=%.so)' ;;
alpha-*-linux*)
CFLAGS="$CFLAGS -mieee" ;;
*-freebsd*)
DSO_LDOPTS="-Bshareable $DSO_LDOPTS" ;;
esac
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -767,6 +785,9 @@ AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
AC_SUBST(MKSHLIB)
AC_SUBST(DSO_LDOPTS)
dnl Check for missing components
if [ test "$MISSING_X" != "" ]; then
AC_MSG_ERROR([ Could not find the following libraries: $MISSING_X ]);