mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
build: handle libaddns by SMB_LIBRARY() and correctly create SONAME file.
Create .so file as a symlink. Michael
This commit is contained in:
parent
af971f79c7
commit
bbf665ad57
@ -1519,7 +1519,7 @@ bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIB
|
|||||||
|
|
||||||
MKSYMS_SH = $(srcdir)/script/mksyms.sh
|
MKSYMS_SH = $(srcdir)/script/mksyms.sh
|
||||||
|
|
||||||
SHLIBS = libtalloc libtdb @LIBWBCLIENT@ libsmbclient libsmbsharemodes @LIBADDNS@ libnetapi
|
SHLIBS = libtalloc libtdb @LIBWBCLIENT@ libsmbclient libsmbsharemodes libaddns libnetapi
|
||||||
|
|
||||||
shlibs: $(SHLIBS)
|
shlibs: $(SHLIBS)
|
||||||
|
|
||||||
@ -1722,15 +1722,25 @@ uninstalllibwbclient::
|
|||||||
|
|
||||||
LIBADDNS_OBJ = $(LIBADDNS_OBJ0) @LIBTALLOC_STATIC@
|
LIBADDNS_OBJ = $(LIBADDNS_OBJ0) @LIBTALLOC_STATIC@
|
||||||
|
|
||||||
LIBADDNS=bin/libaddns.a @LIBADDNS_SHARED@
|
LIBADDNS_SHARED_TARGET=@LIBADDNS_SHARED_TARGET@
|
||||||
|
LIBADDNS_SOVER=$(shell grep \^$(LIBADDNS_SHARED_TARGET) $(builddir)/library-versions | cut -d: -f2)
|
||||||
|
LIBADDNS_SHARED_TARGET_SONAME=$(LIBADDNS_SHARED_TARGET).$(LIBADDNS_SOVER)
|
||||||
|
LIBADDNS_STATIC_TARGET=@LIBADDNS_STATIC_TARGET@
|
||||||
|
LIBADDNS=$(LIBADDNS_STATIC_TARGET) @LIBADDNS_SHARED@
|
||||||
|
#LIBADDNS_SYMS=$(srcdir)/exports/libaddns.@SYMSEXT@
|
||||||
|
LIBADDNS_HEADERS=$(srcdir)/libaddns/addns.h
|
||||||
|
|
||||||
bin/libaddns.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @LIBTALLOC_SHARED@
|
$(LIBADDNS_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBADDNS_OBJ) @LIBTALLOC_SHARED@
|
||||||
@echo Linking shared library $@
|
@echo Linking shared library $@
|
||||||
@$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \
|
@$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \
|
||||||
$(KRB5LIBS) $(UUID_LIBS) @LIBTALLOC_LIBS@ \
|
$(KRB5LIBS) $(UUID_LIBS) @LIBTALLOC_LIBS@ \
|
||||||
@SONAMEFLAG@`basename $@`.$(SONAME_VER)
|
@SONAMEFLAG@`basename $@`
|
||||||
|
|
||||||
bin/libaddns.a: $(BINARY_PREREQS) $(LIBADDNS_OBJ)
|
$(LIBADDNS_SHARED_TARGET): $(LIBADDNS_SHARED_TARGET_SONAME)
|
||||||
|
@rm -f $@
|
||||||
|
@ln -s -f `basename $(LIBADDNS_SHARED_TARGET_SONAME)` $@
|
||||||
|
|
||||||
|
$(LIBADDNS_STATIC_TARGET): $(BINARY_PREREQS) $(LIBADDNS_OBJ)
|
||||||
@echo Linking non-shared library $@
|
@echo Linking non-shared library $@
|
||||||
@-$(AR) -rc $@ $(LIBADDNS_OBJ)
|
@-$(AR) -rc $@ $(LIBADDNS_OBJ)
|
||||||
|
|
||||||
@ -1738,12 +1748,18 @@ libaddns: $(LIBADDNS)
|
|||||||
|
|
||||||
installlibaddns:: installdirs libaddns
|
installlibaddns:: installdirs libaddns
|
||||||
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
|
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
|
||||||
-$(INSTALLLIBCMD_SH) bin/libaddns.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
|
-$(INSTALLLIBCMD_SH) $(LIBADDNS_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
|
||||||
-$(INSTALLLIBCMD_A) bin/libaddns.a $(DESTDIR)$(LIBDIR)
|
@rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
|
||||||
|
-if test -e $(LIBADDNS_SHARED_TARGET_SONAME) ; then \
|
||||||
|
ln -s -f `basename $(LIBADDNS_SHARED_TARGET_SONAME)` \
|
||||||
|
$(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)` ; \
|
||||||
|
fi
|
||||||
|
-$(INSTALLLIBCMD_A) $(LIBADDNS_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
|
||||||
|
|
||||||
uninstalllibaddns::
|
uninstalllibaddns::
|
||||||
-$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libaddns.@SHLIBEXT@
|
-$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET_SONAME)`
|
||||||
-$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libaddns.a
|
-rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
|
||||||
|
-$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_STATIC_TARGET)`
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
@ -79,10 +79,6 @@ AC_SUBST(INSTALLLIBCMD_SH)
|
|||||||
AC_SUBST(INSTALLLIBCMD_A)
|
AC_SUBST(INSTALLLIBCMD_A)
|
||||||
AC_SUBST(UNINSTALLLIBCMD_SH)
|
AC_SUBST(UNINSTALLLIBCMD_SH)
|
||||||
AC_SUBST(UNINSTALLLIBCMD_A)
|
AC_SUBST(UNINSTALLLIBCMD_A)
|
||||||
AC_SUBST(INSTALL_LIBADDNS)
|
|
||||||
AC_SUBST(UNINSTALL_LIBADDNS)
|
|
||||||
AC_SUBST(LIBADDNS_SHARED)
|
|
||||||
AC_SUBST(LIBADDNS)
|
|
||||||
|
|
||||||
AC_SUBST(INSTALL_LIBWBCLIENT)
|
AC_SUBST(INSTALL_LIBWBCLIENT)
|
||||||
AC_SUBST(UNINSTALL_LIBWBCLIENT)
|
AC_SUBST(UNINSTALL_LIBWBCLIENT)
|
||||||
@ -4682,39 +4678,7 @@ SMB_LIBRARY(tdb)
|
|||||||
SMB_LIBRARY(netapi)
|
SMB_LIBRARY(netapi)
|
||||||
SMB_LIBRARY(smbclient)
|
SMB_LIBRARY(smbclient)
|
||||||
SMB_LIBRARY(smbsharemodes)
|
SMB_LIBRARY(smbsharemodes)
|
||||||
|
SMB_LIBRARY(addns, no, [undefined API])
|
||||||
|
|
||||||
#################################################
|
|
||||||
# should we build libaddns?
|
|
||||||
INSTALL_LIBADDNS=
|
|
||||||
UNINSTALL_LIBADDNS=
|
|
||||||
LIBADDNS_SHARED=
|
|
||||||
LIBADDNS=
|
|
||||||
AC_MSG_CHECKING(whether to build the libaddns shared library)
|
|
||||||
AC_ARG_WITH(libaddns,
|
|
||||||
[AS_HELP_STRING([--with-libaddns], [Build the libaddns shared library (default=no undefined API)])],
|
|
||||||
[ case "$withval" in
|
|
||||||
*)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
yes)
|
|
||||||
if test $BLDSHARED = true; then
|
|
||||||
LIBADDNS_SHARED=bin/libaddns.$SHLIBEXT
|
|
||||||
LIBADDNS=libaddns
|
|
||||||
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
|
|
||||||
LIBADDNS=libaddns
|
|
||||||
fi
|
|
||||||
INSTALL_LIBADDNS=installlibaddns
|
|
||||||
UNINSTALL_LIBADDNS=uninstalllibaddns
|
|
||||||
;;
|
|
||||||
esac ],
|
|
||||||
[AC_MSG_RESULT(no)]
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user