summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/Makefile.in3
-rw-r--r--source3/configure.in5
2 files changed, 5 insertions, 3 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index f3e8b284d6..d81729e6b8 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -9,6 +9,7 @@ mandir=@mandir@
LIBS=@LIBS@
CC=@CC@
+SHLD=@SHLD@
CFLAGS=@CFLAGS@
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
@@ -591,7 +592,7 @@ bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32)
libsmbclient: $(LIBSMBCLIENT_PICOBJS)
-if [ $(BLDSHARED) = true ]; then \
echo Linking libsmbclient shared library bin/$@.@SHLIBEXT@; \
- $(LD) @LDSHFLAGS@ -o bin/$@.@SHLIBEXT@ $(LIBSMBCLIENT_PICOBJS) $(LIBS); \
+ $(SHLD) @LDSHFLAGS@ -o bin/$@.@SHLIBEXT@ $(LIBSMBCLIENT_PICOBJS) $(LIBS); \
fi
@echo Linking libsmbclient non-shared library bin/$@.a
-$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS)
diff --git a/source3/configure.in b/source3/configure.in
index 721cdd93c2..805e8c0b06 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -9,6 +9,7 @@ AC_SUBST(SHELL)
AC_SUBST(RUNPROG)
AC_SUBST(MPROGS)
AC_SUBST(LDSHFLAGS)
+AC_SUBST(SHLD)
AC_SUBST(HOST_OS)
AC_SUBST(PAM_MOD)
AC_SUBST(WRAP)
@@ -606,6 +607,7 @@ AC_LIBTESTFUNC(sec, getprpwnam)
# these are the defaults, good for lots of systems
HOST_OS="$host_os"
LDSHFLAGS="-shared"
+SHLD="\${CC}"
PICFLAG=""
SHLIBEXT="so"
BLDSHARED="false"
@@ -627,8 +629,7 @@ case "$host_os" in
LDSHFLAGS="-Wl,-h,\$@ -G"
PICFLAG="-KPIC -O2" # Is this correct for SunOS
;;
- *bsd*) LDSHFLAGS="-shared -Bshareable"
- BLDSHARED="true"
+ *bsd*) BLDSHARED="true"
LDSHFLAGS="-Wl,-soname,\$@ -shared"
PICFLAG="-fPIC -O2"
;;