diff options
author | Michael Adam <obnox@samba.org> | 2008-07-07 13:57:34 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-07-07 20:34:03 +0200 |
commit | d51180e4b80ff18980c58fd44fc870d5024dab04 (patch) | |
tree | 364cbbae71ef96ba48d862c4d0ebca940918e9ee /source3 | |
parent | e9d5d97a3f182419ce5979591a510e18e37a64a1 (diff) | |
download | samba-d51180e4b80ff18980c58fd44fc870d5024dab04.tar.gz samba-d51180e4b80ff18980c58fd44fc870d5024dab04.tar.bz2 samba-d51180e4b80ff18980c58fd44fc870d5024dab04.zip |
build: handle libaddns by SMB_LIBRARY() and correctly create SONAME file.
Create .so file as a symlink.
Michael
(This used to be commit bbf665ad5790e89ff01867e2762fe2b94db7277d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/Makefile.in | 34 | ||||
-rw-r--r-- | source3/configure.in | 38 |
2 files changed, 26 insertions, 46 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index 1b0b37cad9..933644a6a1 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -1519,7 +1519,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) @@ -1722,15 +1722,25 @@ uninstalllibwbclient:: 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 $@ @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \ $(KRB5LIBS) $(UUID_LIBS) @LIBTALLOC_LIBS@ \ - @SONAMEFLAG@`basename $@`.$(SONAME_VER) + @SONAMEFLAG@`basename $@` + +$(LIBADDNS_SHARED_TARGET): $(LIBADDNS_SHARED_TARGET_SONAME) + @rm -f $@ + @ln -s -f `basename $(LIBADDNS_SHARED_TARGET_SONAME)` $@ -bin/libaddns.a: $(BINARY_PREREQS) $(LIBADDNS_OBJ) +$(LIBADDNS_STATIC_TARGET): $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking non-shared library $@ @-$(AR) -rc $@ $(LIBADDNS_OBJ) @@ -1738,12 +1748,18 @@ libaddns: $(LIBADDNS) installlibaddns:: installdirs libaddns @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) - -$(INSTALLLIBCMD_SH) bin/libaddns.@SHLIBEXT@ $(DESTDIR)$(LIBDIR) - -$(INSTALLLIBCMD_A) bin/libaddns.a $(DESTDIR)$(LIBDIR) + -$(INSTALLLIBCMD_SH) $(LIBADDNS_SHARED_TARGET_SONAME) $(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:: - -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libaddns.@SHLIBEXT@ - -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libaddns.a + -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET_SONAME)` + -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)` + -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_STATIC_TARGET)` #------------------------------------------------------------------- diff --git a/source3/configure.in b/source3/configure.in index b5c372974c..673bf3b91e 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -79,10 +79,6 @@ AC_SUBST(INSTALLLIBCMD_SH) AC_SUBST(INSTALLLIBCMD_A) AC_SUBST(UNINSTALLLIBCMD_SH) 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(UNINSTALL_LIBWBCLIENT) @@ -4682,39 +4678,7 @@ SMB_LIBRARY(tdb) SMB_LIBRARY(netapi) SMB_LIBRARY(smbclient) SMB_LIBRARY(smbsharemodes) - - -################################################# -# 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)] -) +SMB_LIBRARY(addns, no, [undefined API]) |