summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2001-06-29 23:30:01 +0000
committerRichard Sharpe <sharpe@samba.org>2001-06-29 23:30:01 +0000
commit9585529455ae4a3e9b4dafc5f16286fabb052809 (patch)
tree494db4d899806b9a1db6d5004af07b5fda0f58e8 /source
parent7079300da6dbd950e55dc5871851250d5a3717ff (diff)
downloadsamba-9585529455ae4a3e9b4dafc5f16286fabb052809.tar.gz
samba-9585529455ae4a3e9b4dafc5f16286fabb052809.tar.xz
samba-9585529455ae4a3e9b4dafc5f16286fabb052809.zip
These changes cause the libsmbclient stuff to always build a non-shared library and to build a shared library only for the four OSes that we currently like.
I will probably add HP/UX and AIX support based on the CUPS stuff soon ...
Diffstat (limited to 'source')
-rw-r--r--source/Makefile.in16
-rw-r--r--source/configure.in8
2 files changed, 15 insertions, 9 deletions
diff --git a/source/Makefile.in b/source/Makefile.in
index 0801efb5ec0..5b362d37a6c 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -83,7 +83,7 @@ MPROGS = @MPROGS@
WINBIND_PROGS = nsswitch/pam_winbind.so nsswitch/libnss_winbind.so bin/winbindd bin/wbinfo
PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup bin/make_printerdef bin/pdbedit @WINBIND_TARGETS@
TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest bin/locktest2
-SHLIBS = bin/libsmbclient.so
+SHLIBS = bin/libsmbclient
SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd
@@ -610,13 +610,13 @@ bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32)
@echo Linking shared library $@
@$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS)
-bin/libsmbclient.so: $(LIBSMBCLIENT_PICOBJS)
- @echo Linking libsmbclient shared library $@
- -$(LD) @LDSHFLAGS@ -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) # Anything else?
-
-client/testsmbc: client/testsmbc.o bin/libsmbclient.so
- @echo Linking testsmbc
- -$(CC) $(CFLAGS) -o $@ client/testsmbc.o -Lbin -lsmbclient
+bin/libsmbclient: $(LIBSMBCLIENT_PICOBJS)
+ -if [ @BLDSHARED@ ]; then \
+ echo Linking libsmbclient shared library $@.@SHLIBEXT@; \
+ $(LD) @LDSHFLAGS@ -o $@.@SHLIBEXT@ $(LIBSMBCLIENT_PICOBJS) $(LIBS); \
+ fi
+ @echo Linking libsmbclient non-shared library $@.a
+ -$(AR) -rc $@.a $(LIBSMBCLIENT_PICOBJS)
bin/smbsh: $(SMBSH_OBJ) bin/.dummy
@echo Linking $@
diff --git a/source/configure.in b/source/configure.in
index 0d59ee50e28..231c1e1e094 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -15,6 +15,7 @@ AC_SUBST(WRAP)
AC_SUBST(WRAP32)
AC_SUBST(PICFLAG)
AC_SUBST(SHLIBEXT)
+AC_SUBST(BLDSHARED)
# compile with optimisation and without debugging by default
CFLAGS="-O ${CFLAGS}"
@@ -607,17 +608,22 @@ HOST_OS="$host_os"
LDSHFLAGS="-shared"
PICFLAG=""
SHLIBEXT="so"
+BLDSHARED="false"
# and these are for particular systems
case "$host_os" in
- *linux*) AC_DEFINE(LINUX);;
+ *linux*) AC_DEFINE(LINUX)
+ BLDSHARED="true"
+ ;;
*solaris*) AC_DEFINE(SUNOS5)
LDSHFLAGS="-G"
+ BLDSHARED="true"
;;
*sunos*) AC_DEFINE(SUNOS4)
LDSHFLAGS=""
;;
*bsd*) LDSHFLAGS="-shared -Bshareable"
+ BLDSHARED="true"
;;
*irix*) AC_DEFINE(IRIX)
case "$host_os" in