summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in32
1 files changed, 21 insertions, 11 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 94bd815add..759690f60d 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -140,6 +140,8 @@ AC_SUBST(PICFLAG)
AC_SUBST(PICSUFFIX)
AC_SUBST(POBAD_CC)
AC_SUBST(SHLIBEXT)
+AC_SUBST(INSTALLCLIENTCMD_SH)
+AC_SUBST(INSTALLCLIENTCMD_A)
AC_SUBST(LIBSMBCLIENT_SHARED)
AC_SUBST(LIBSMBCLIENT)
AC_SUBST(PRINTLIBS)
@@ -1026,14 +1028,6 @@ if test $ac_cv_shlib_works = no; then
fi
fi
-
-# this updates our target list if we can build shared libs
-if test $BLDSHARED = true; then
- LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
-else
- LIBSMBCLIENT_SHARED=
-fi
-
################
AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[
@@ -2472,26 +2466,42 @@ AC_ARG_WITH(manpages-langs,
#################################################
# should we build libsmbclient?
+INSTALLCLIENTCMD_SH=:
+INSTALLCLIENTCMD_A=:
LIBSMBCLIENT_SHARED=
LIBSMBCLIENT=
AC_MSG_CHECKING(whether to build the libsmbclient shared library)
AC_ARG_WITH(libsmbclient,
-[ --with-libsmbclient Build the libsmbclient shared library (default=yes)],
+[ --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
+ INSTALLCLIENTCMD_SH="\$(INSTALLCMD)"
LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
LIBSMBCLIENT=libsmbclient
AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT(no shared library support)
+ INSTALLCLIENTCMD_A="\$(INSTALLCMD)"
+ LIBSMBCLIENT=libsmbclient
+ AC_MSG_RESULT(no shared library support -- will supply static library)
fi
;;
esac ],
- AC_MSG_RESULT(yes)
+[
+# if unspecified, default is to built it iff possible.
+ if test $BLDSHARED = true; then
+ INSTALLCLIENTCMD_SH="\$(INSTALLCMD)"
+ LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
+ LIBSMBCLIENT=libsmbclient
+ AC_MSG_RESULT(yes)
+ else
+ INSTALLCLIENTCMD_A="\$(INSTALLCMD)"
+ LIBSMBCLIENT=libsmbclient
+ AC_MSG_RESULT(no shared library support -- will supply static library)
+ fi]
)