summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorLars Müller <lmuelle@samba.org>2005-12-05 21:02:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:44 -0500
commit884a0c8226a760e72912ceab159ddc28bd07f62c (patch)
tree4cd2017b3fb24dff2e974406fbaf4357a13743bb /source3
parentf6a46f3329683217ec5c71b8a5bf9b8322df023f (diff)
downloadsamba-884a0c8226a760e72912ceab159ddc28bd07f62c.tar.gz
samba-884a0c8226a760e72912ceab159ddc28bd07f62c.tar.bz2
samba-884a0c8226a760e72912ceab159ddc28bd07f62c.zip
r12077: Add configure switch to disable libmsrpc build. Add new Makefile target
installlibmsrpc. This works the same way as we're already doing it for libsmbclient. Default is to build it. Add a soname to libmsrpc as we do it for libsmbclient. We already had the MAJOR and MINOR variable in the Makefile. (This used to be commit 6794d440996946da0f77a83904a713dd298ba8c0)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in22
-rw-r--r--source3/configure.in82
2 files changed, 77 insertions, 27 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index c0753a76c0..a80b16df71 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -36,8 +36,8 @@ KRB5LIBS=@KRB5_LIBS@
LDAP_LIBS=@LDAP_LIBS@
INSTALLCMD=@INSTALL@
-INSTALLCLIENTCMD_SH=@INSTALLCLIENTCMD_SH@
-INSTALLCLIENTCMD_A=@INSTALLCLIENTCMD_A@
+INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
+INSTALLLIBCMD_A=@INSTALLLIBCMD_A@
VPATH=@srcdir@
srcdir=@abs_srcdir@
@@ -1074,7 +1074,7 @@ bin/libsmbsharemodes.a: $(LIBSMBSHAREMODES_PICOBJS)
bin/libmsrpc.@SHLIBEXT@: $(CAC_PICOBJS)
@echo Linking libmsrpc shared library $@
@$(SHLD) $(LDSHFLAGS) -o $@ $(CAC_PICOBJS) $(LDFLAGS) $(LIBS) \
- @SONAMEFLAG@`basename $@`
+ @SONAMEFLAG@`basename $@`.$(LIBMSRPC_MAJOR)
bin/libmsrpc.a: $(CAC_PICOBJS)
@echo Linking libmsrpc non-shared library $@
@@ -1389,7 +1389,7 @@ bin/t_push_ucs2@EXEEXT@: bin/libbigballofmud.@SHLIBEXT@ torture/t_push_ucs2.o
bin/t_snprintf@EXEEXT@: lib/snprintf.c
$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(DYNEXP) -DTEST_SNPRINTF lib/snprintf.c -lm
-install: installbin installman installscripts installdat installswat installmodules @INSTALLCLIENT@
+install: installbin installman installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@
install-everything: install installmodules
@@ -1439,14 +1439,18 @@ installmsg: installdirs
installswat: installdirs installmsg
@$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
-installclientlib: installdirs libsmbclient libmsrpc
+installclientlib: installdirs libsmbclient
@$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(LIBDIR)
- -$(INSTALLCLIENTCMD_SH) bin/libsmbclient.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
- -$(INSTALLCLIENTCMD_A) bin/libsmbclient.a $(DESTDIR)$(LIBDIR)
- -$(INSTALLCLIENTCMD_SH) bin/libmsrpc.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
- -$(INSTALLCLIENTCMD_A) bin/libmsrpc.a $(DESTDIR)$(LIBDIR)
+ -$(INSTALLLIBCMD_SH) bin/libsmbclient.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
+ -$(INSTALLLIBCMD_A) bin/libsmbclient.a $(DESTDIR)$(LIBDIR)
@$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)${prefix}/include
-$(INSTALLCMD) $(srcdir)/include/libsmbclient.h $(DESTDIR)${prefix}/include
+
+installlibmsrpc: installdirs libmsrpc
+ @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(LIBDIR)
+ -$(INSTALLLIBCMD_SH) bin/libmsrpc.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
+ -$(INSTALLLIBCMD_A) bin/libmsrpc.a $(DESTDIR)$(LIBDIR)
+ @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)${prefix}/include
-$(INSTALLCMD) $(srcdir)/include/libmsrpc.h $(DESTDIR)${prefix}/include
# Python extensions
diff --git a/source3/configure.in b/source3/configure.in
index 296673e4b5..ec1bdacad8 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -214,11 +214,15 @@ AC_SUBST(libc_cv_fpie)
AC_SUBST(PIE_CFLAGS)
AC_SUBST(PIE_LDFLAGS)
AC_SUBST(SHLIBEXT)
-AC_SUBST(INSTALLCLIENT)
-AC_SUBST(INSTALLCLIENTCMD_SH)
-AC_SUBST(INSTALLCLIENTCMD_A)
+AC_SUBST(INSTALLLIBCMD_SH)
+AC_SUBST(INSTALLLIBCMD_A)
+AC_SUBST(INSTALL_LIBMSRPC)
+AC_SUBST(LIBMSRPC_SHARED)
+AC_SUBST(LIBMSRPC)
+AC_SUBST(INSTALL_LIBSMBCLIENT)
AC_SUBST(LIBSMBCLIENT_SHARED)
AC_SUBST(LIBSMBCLIENT)
+AC_SUBST(INSTALL_LIBSMBSHAREMODES)
AC_SUBST(LIBSMBSHAREMODES_SHARED)
AC_SUBST(LIBSMBSHAREMODES)
AC_SUBST(PRINT_LIBS)
@@ -3988,20 +3992,62 @@ else
AC_MSG_RESULT(no$utmp_no_reason)
fi
-#################################################
-# should we build libsmbclient?
-
-INSTALLCLIENTCMD_SH=:
-INSTALLCLIENTCMD_A=:
+INSTALLLIBCMD_SH=:
+INSTALLLIBCMD_A=:
if test $BLDSHARED = true; then
- INSTALLCLIENTCMD_SH="\$(INSTALLCMD)"
+ INSTALLLIBCMD_SH="\$(INSTALLCMD)"
fi
if test $enable_static = yes; then
- INSTALLCLIENTCMD_A="\$(INSTALLCMD)"
+ INSTALLLIBCMD_A="\$(INSTALLCMD)"
fi
-INSTALLCLIENT=
+#################################################
+# should we build libmsrpc?
+INSTALL_LIBMSRPC=
+LIBMSRPC_SHARED=
+LIBMSRPC=
+AC_MSG_CHECKING(whether to build the libmsrpc shared library)
+AC_ARG_WITH(libmsrpc,
+[ --with-libmsrpc Build the libmsrpc shared library (default=yes if shared libs supported)],
+[ case "$withval" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ if test $BLDSHARED = true; then
+ LIBMSRPC_SHARED=bin/libmsrpc.$SHLIBEXT
+ LIBMSRPC=libmsrpc
+ 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
+ LIBMSRPC=libmsrpc
+ fi
+ INSTALL_LIBMSRPC=installlibmsrpc
+ ;;
+ esac ],
+[
+# if unspecified, default is to built it if possible.
+ if test $BLDSHARED = true; then
+ LIBMSRPC_SHARED=bin/libmsrpc.$SHLIBEXT
+ LIBMSRPC=libmsrpc
+ 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
+ LIBMSRPC=libmsrpc
+ fi]
+ INSTALL_LIBMSRPC=installlibmsrpc
+)
+
+#################################################
+# should we build libsmbclient?
+INSTALL_LIBSMBCLIENT=
LIBSMBCLIENT_SHARED=
LIBSMBCLIENT=
AC_MSG_CHECKING(whether to build the libsmbclient shared library)
@@ -4023,11 +4069,11 @@ AC_ARG_WITH(libsmbclient,
if test $enable_static = yes; then
LIBSMBCLIENT=libsmbclient
fi
- INSTALLCLIENT=installclientlib
+ INSTALL_LIBSMBCLIENT=installclientlib
;;
esac ],
[
-# if unspecified, default is to built it iff possible.
+# if unspecified, default is to built it if possible.
if test $BLDSHARED = true; then
LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
LIBSMBCLIENT=libsmbclient
@@ -4039,10 +4085,10 @@ AC_ARG_WITH(libsmbclient,
if test $enable_static = yes; then
LIBSMBCLIENT=libsmbclient
fi]
- INSTALLCLIENT=installclientlib
+ INSTALL_LIBSMBCLIENT=installclientlib
)
-INSTALLCLIENT=
+INSTALL_LIBSMBSHAREMODES=
LIBSMBSHAREMODES_SHARED=
LIBSMBSHAREMODES=
AC_MSG_CHECKING(whether to build the libsmbsharemodes shared library)
@@ -4064,11 +4110,11 @@ AC_ARG_WITH(libsmbsharemodes,
if test $enable_static = yes; then
LIBSMBSHAREMODES=libsmbsharemodes
fi
- INSTALLCLIENT=installclientlib
+ INSTALL_LIBSMBSHAREMODES=installlibsmbsharemodes
;;
esac ],
[
-# if unspecified, default is to built it iff possible.
+# if unspecified, default is to built it if possible.
if test $BLDSHARED = true; then
LIBSMBSHAREMODES_SHARED=bin/libsmbsharemodes.$SHLIBEXT
LIBSMBSHAREMODES=libsmbsharemodes
@@ -4080,7 +4126,7 @@ AC_ARG_WITH(libsmbsharemodes,
if test $enable_static = yes; then
LIBSMBSHAREMODES=libsmbsharemodes
fi]
- INSTALLCLIENT=installclientlib
+ INSTALL_LIBSMBSHAREMODES=installlibsmbsharemodes
)
#################################################