summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-02-20 22:47:31 +0100
committerMichael Adam <obnox@samba.org>2008-02-20 23:38:27 +0100
commitd2e63399d3ed09b6b1c78affd780946440414b08 (patch)
tree99ad8fde3b5c92a47f706e0fa4831407325c05c2
parent443f8ed26050b515b7786ea72e5dd747e976aa11 (diff)
downloadsamba-d2e63399d3ed09b6b1c78affd780946440414b08.tar.gz
samba-d2e63399d3ed09b6b1c78affd780946440414b08.tar.bz2
samba-d2e63399d3ed09b6b1c78affd780946440414b08.zip
configure: add --enable-shared-libs to control overall internal use of shared libs.
To disable internal use of shared libraries altogether (as opposed to disabling use of single shared libs by --with-static-libs=LIBS), use this new configure parameter --disable-shared-libs. Michael (This used to be commit 63bff18f3f6396736910a8e1f5f2abf453c4f89a)
-rw-r--r--source3/configure.in35
1 files changed, 32 insertions, 3 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 4a798bde62..fe9d716804 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4700,6 +4700,31 @@ if test $enable_static = yes; then
fi
#################################################
+# --disable-shared-libs
+# can be used to disable the internal use of shared libs altogether
+# (this only has an effect when building shared libs is enabled)
+#
+USESHARED=false
+AC_SUBST(USESHARED)
+
+AC_MSG_CHECKING(whether to use shared libraries internally)
+AC_ARG_ENABLE([shared-libs],
+ AS_HELP_STRING([--enable-shared-libs],
+ [Use shared libraries internally (default=yes)]),
+ [enable_shared_libs=$enableval],
+ [enable_shared_libs=yes])
+
+if test x"$enable_shared_libs" != x"no" ; then
+ USESHARED=$BLDSHARED
+fi
+
+AC_MSG_RESULT([$USESHARED])
+
+if test x"$enable_shared_libs" = x"yes" -a x"$BLDSHARED" != x"true" ; then
+ AC_MSG_WARN([--enable-shared-libs: no support for shared libraries])
+fi
+
+#################################################
# --with-static-libs=LIBS:
# link (internal) libs dynamically or statically?
#
@@ -4762,10 +4787,12 @@ samba_cv_with_libtalloc=yes
if test x"$samba_cv_with_libtalloc" = "xyes" -a $BLDSHARED = true; then
LIBTALLOC_SHARED=$LIBTALLOC_SHARED_TARGET
AC_MSG_RESULT(yes)
- if test x"$LINK_LIBTALLOC" = "xSTATIC" ; then
+ if test x"$USESHARED" != x"true" -o x"$LINK_LIBTALLOC" = "xSTATIC" ; then
LIBTALLOC_STATIC=$LIBTALLOC_STATIC_TARGET
+ AC_MSG_NOTICE([not using libtalloc shared library internally])
else
LIBTALLOC_LIBS=-ltalloc
+ AC_MSG_NOTICE([using libtalloc shared library internally])
fi
else
enable_static=yes
@@ -4806,8 +4833,9 @@ samba_cv_with_libtdb=yes
if test x"$samba_cv_with_libtdb" = "xyes" -a $BLDSHARED = true; then
LIBTDB_SHARED=$LIBTDB_SHARED_TARGET
AC_MSG_RESULT(yes)
- if test x"$LINK_LIBTDB" = "xSTATIC" ; then
+ if test x"$USESHARED" != x"true" -o x"$LINK_LIBTDB" = "xSTATIC" ; then
LIBTDB_STATIC=$LIBTDB_STATIC_TARGET
+ AC_MSG_NOTICE([not using libtdb shared library internally])
else
LIBTDB_LIBS=-ltdb
fi
@@ -4849,8 +4877,9 @@ samba_cv_with_libnetapi=yes
if test x"$samba_cv_with_libnetapi" = x"yes" -a $BLDSHARED = true; then
LIBNETAPI_SHARED=$LIBNETAPI_SHARED_TARGET
AC_MSG_RESULT(yes)
- if test x"$LINK_LIBNETAPI" = x"STATIC" ; then
+ if test x"$USESHARED" != x"true" -o x"$LINK_LIBNETAPI" = x"STATIC" ; then
LIBNETAPI_STATIC=$LIBNETAPI_STATIC_TARGET
+ AC_MSG_NOTICE([not using libnetapi shared library internally])
else
LIBNETAPI_LIBS=-lnetapi
fi