DSO_CFLAGS defaults to -fPIC only if using gcc, otherwise it's set to -KPIC.

This commit is contained in:
cls%seawood.org 1998-11-16 22:11:17 +00:00
Родитель 69d8e9a511
Коммит 6da8634dc3
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -107,7 +107,7 @@ NSPR_LIBS = @NSPR_LIBS@
ifndef NO_SHARED_LIB ifndef NO_SHARED_LIB
BUILD_UNIX_PLUGINS = 1 BUILD_UNIX_PLUGINS = 1
DSO_CFLAGS = -fPIC DSO_CFLAGS = @DSO_CFLAGS@
MKSHLIB = @MKSHLIB@ MKSHLIB = @MKSHLIB@
DSO_LDOPTS = @DSO_LDOPTS@ DSO_LDOPTS = @DSO_LDOPTS@
endif endif

Просмотреть файл

@ -117,12 +117,14 @@ dnl set the defaults first
dnl ======================================================== dnl ========================================================
MKSHLIB='$(LD) $(DSO_LDOPTS)' MKSHLIB='$(LD) $(DSO_LDOPTS)'
DSO_LDOPTS='-shared -h $(@:$(OBJDIR)/%.so=%.so)' DSO_LDOPTS='-shared -h $(@:$(OBJDIR)/%.so=%.so)'
DSO_CFLAGS='-KPIC'
dnl gcc can come with its own linker so its better to use the pass-thru calls dnl gcc can come with its own linker so its better to use the pass-thru calls
dnl ======================================================== dnl ========================================================
if test "$GNU_CC" = 1; then if test "$GNU_CC" = 1; then
MKSHLIB='$(CC) $(DSO_LDOPTS)' MKSHLIB='$(CC) $(DSO_LDOPTS)'
DSO_LDOPTS='-shared -Wl,-h -Wl,$(@:$(OBJDIR)/%.so=%.so)' DSO_LDOPTS='-shared -Wl,-h -Wl,$(@:$(OBJDIR)/%.so=%.so)'
DSO_CFLAGS='-fPIC'
fi fi
dnl now the exceptions dnl now the exceptions
@ -785,6 +787,7 @@ AC_SUBST(LDFLAGS)
AC_SUBST(LIBS) AC_SUBST(LIBS)
AC_SUBST(MKSHLIB) AC_SUBST(MKSHLIB)
AC_SUBST(DSO_CFLAGS)
AC_SUBST(DSO_LDOPTS) AC_SUBST(DSO_LDOPTS)
dnl Check for missing components dnl Check for missing components