summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/Makefile.in36
-rw-r--r--source3/configure.in53
2 files changed, 29 insertions, 60 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index eb9a6a26ee..0d92b8d5e9 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1525,7 +1525,7 @@ bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIB
MKSYMS_SH = $(srcdir)/script/mksyms.sh
-SHLIBS = libtalloc libtdb @LIBWBCLIENT@ @LIBSMBCLIENT@ @LIBSMBSHAREMODES@ @LIBADDNS@ libnetapi
+SHLIBS = libtalloc libtdb @LIBWBCLIENT@ libsmbclient @LIBSMBSHAREMODES@ @LIBADDNS@ libnetapi
shlibs: $(SHLIBS)
@@ -1846,16 +1846,26 @@ LIBSMBCLIENT_OBJ0 = \
LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ0) @LIBWBCLIENT_STATIC@
-LIBSMBCLIENT=bin/libsmbclient.a @LIBSMBCLIENT_SHARED@
+LIBSMBCLIENT_SHARED_TARGET=@LIBSMBCLIENT_SHARED_TARGET@
+LIBSMBCLIENT_SOVER=$(shell grep \^$(LIBSMBCLIENT_SHARED_TARGET) $(builddir)/library-versions | cut -d: -f2)
+LIBSMBCLIENT_SHARED_TARGET_SONAME=$(LIBSMBCLIENT_SHARED_TARGET).$(LIBSMBCLIENT_SOVER)
+LIBSMBCLIENT_STATIC_TARGET=@LIBSMBCLIENT_STATIC_TARGET@
+LIBSMBCLIENT=$(LIBSMBCLIENT_STATIC_TARGET) @LIBSMBCLIENT_SHARED@
+#LIBSMBCLIENT_SYMS=$(srcdir)/exports/libsmbclient.@SYMSEXT@
+LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h
-bin/libsmbclient.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
+$(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking shared library $@
@$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) \
@LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@ $(LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- @SONAMEFLAG@`basename $@`.$(SONAME_VER)
+ @SONAMEFLAG@`basename $@`
-bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ0)
+$(LIBSMBCLIENT_SHARED_TARGET): $(LIBSMBCLIENT_SHARED_TARGET_SONAME)
+ @rm -f $@
+ @ln -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` $@
+
+$(LIBSMBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ0)
@echo Linking non-shared library $@
@-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ0)
@@ -1863,16 +1873,22 @@ libsmbclient: $(LIBSMBCLIENT)
installlibsmbclient:: installdirs libsmbclient
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
- -$(INSTALLLIBCMD_SH) bin/libsmbclient.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
- -$(INSTALLLIBCMD_A) bin/libsmbclient.a $(DESTDIR)$(LIBDIR)
+ -$(INSTALLLIBCMD_SH) $(LIBSMBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
+ @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
+ -if test -e $(LIBSMBCLIENT_SHARED_TARGET_SONAME) ; then \
+ ln -s -f `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` \
+ $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ; \
+ fi
+ -$(INSTALLLIBCMD_A) $(LIBSMBCLIENT_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
- -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/include/libsmbclient.h $(DESTDIR)${prefix}/include
+ -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
installclientlib:: installlibsmbclient
uninstalllibsmbclient::
- -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libsmbclient.@SHLIBEXT@
- -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libsmbclient.a
+ -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
+ -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)`
+ -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_STATIC_TARGET)`
-rm -f $(DESTDIR)${prefix}/include/libsmbclient.h
uninstallclientlib:: uninstalllibsmbclient
diff --git a/source3/configure.in b/source3/configure.in
index 8d837eee6f..2ac44b36f0 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -95,10 +95,6 @@ AC_SUBST(WINBIND_LIBS)
AC_SUBST(LIBSAMBAUTIL_SHARED)
-AC_SUBST(INSTALL_LIBSMBCLIENT)
-AC_SUBST(UNINSTALL_LIBSMBCLIENT)
-AC_SUBST(LIBSMBCLIENT_SHARED)
-AC_SUBST(LIBSMBCLIENT)
AC_SUBST(INSTALL_LIBSMBSHAREMODES)
AC_SUBST(UNINSTALL_LIBSMBSHAREMODES)
AC_SUBST(LIBSMBSHAREMODES_SHARED)
@@ -4684,9 +4680,12 @@ AC_ARG_WITH([static-libs],
#
LINK_LIBNETAPI=STATIC
+LINK_LIBSMBCLIENT=STATIC
+
SMB_LIBRARY(talloc)
SMB_LIBRARY(tdb)
SMB_LIBRARY(netapi)
+SMB_LIBRARY(smbclient)
#################################################
@@ -4721,52 +4720,6 @@ AC_ARG_WITH(libaddns,
[AC_MSG_RESULT(no)]
)
-#################################################
-# should we build libsmbclient?
-
-INSTALL_LIBSMBCLIENT=
-UNINSTALL_LIBSMBCLIENT=
-LIBSMBCLIENT_SHARED=
-LIBSMBCLIENT=
-AC_MSG_CHECKING(whether to build the libsmbclient shared library)
-AC_ARG_WITH(libsmbclient,
-[AS_HELP_STRING([--with-libsmbclient], [Build the libsmbclient shared library (default=yes if shared libs supported)])],
-[ case "$withval" in
- no)
- AC_MSG_RESULT(no)
- ;;
- *)
- if test $BLDSHARED = true; then
- LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
- LIBSMBCLIENT=libsmbclient
- AC_MSG_RESULT(yes)
- else
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- LIBSMBCLIENT=libsmbclient
- fi
- INSTALL_LIBSMBCLIENT=installclientlib
- UNINSTALL_LIBSMBCLIENT=uninstallclientlib
- ;;
- esac ],
-[
-# if unspecified, default is to build it if possible.
- if test $BLDSHARED = true; then
- LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
- LIBSMBCLIENT=libsmbclient
- AC_MSG_RESULT(yes)
- else
- enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
- fi
- if test $enable_static = yes; then
- LIBSMBCLIENT=libsmbclient
- fi]
- INSTALL_LIBSMBCLIENT=installclientlib
- UNINSTALL_LIBSMBCLIENT=uninstallclientlib
-)
INSTALL_LIBSMBSHAREMODES=
LIBSMBSHAREMODES_SHARED=