From c424dc78b9a257871b1e34cf0392622d80edeb14 Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Tue, 3 Nov 1998 15:54:50 +0000 Subject: [PATCH] Make shared lib builds work again git-svn-id: svn://10.0.0.236/branches/MozillaSourceClassic_19981026_BRANCH@13991 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/config/autoconf.mk.in | 9 ++++++++- mozilla/configure.in | 23 ++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/mozilla/config/autoconf.mk.in b/mozilla/config/autoconf.mk.in index 8e3f9ce1d64..3dea4dbb737 100644 --- a/mozilla/config/autoconf.mk.in +++ b/mozilla/config/autoconf.mk.in @@ -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@ diff --git a/mozilla/configure.in b/mozilla/configure.in index ea29d7c9c7b..743b284eff4 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -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 ]);