summaryrefslogtreecommitdiff
path: root/source3/m4
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-07-06 23:37:06 +0200
committerMichael Adam <obnox@samba.org>2008-07-07 20:34:01 +0200
commit2e694978f5a21cfd8ce21f5a34ab5bd4ad817dda (patch)
tree6c593a1f119920b7d8a4057e07a73cdc477c8bfb /source3/m4
parentc9178983e82e91104028e01c2550a05a5bc8666e (diff)
downloadsamba-2e694978f5a21cfd8ce21f5a34ab5bd4ad817dda.tar.gz
samba-2e694978f5a21cfd8ce21f5a34ab5bd4ad817dda.tar.bz2
samba-2e694978f5a21cfd8ce21f5a34ab5bd4ad817dda.zip
build: slightly change and extend the logic of SMB_LIBRARY().
Only call the install/uninstall targets (from make (un)install) for libraries configured with SMB_LIBRARY(), when the user did not set --with-libname=no. Make sure to always (at least) build the static version of the library. Michael (This used to be commit f440538c9480134ff05cf9c9f78a565808161101)
Diffstat (limited to 'source3/m4')
-rw-r--r--source3/m4/aclocal.m430
1 files changed, 21 insertions, 9 deletions
diff --git a/source3/m4/aclocal.m4 b/source3/m4/aclocal.m4
index 69bf95ef31..25f9912bef 100644
--- a/source3/m4/aclocal.m4
+++ b/source3/m4/aclocal.m4
@@ -69,12 +69,16 @@ LIBUC[_STATIC_TARGET]=bin/LIBNAME.a
LIBUC[_SHARED]=
LIBUC[_STATIC]=
LIBUC[_LIBS]=
+[INSTALL_]LIBUC=
+[UNINSTALL_]LIBUC=
AC_SUBST(LIBUC[_SHARED_TARGET])
AC_SUBST(LIBUC[_STATIC_TARGET])
AC_SUBST(LIBUC[_SHARED])
AC_SUBST(LIBUC[_STATIC])
AC_SUBST(LIBUC[_LIBS])
+AC_SUBST([INSTALL_]LIBUC)
+AC_SUBST([UNINSTALL_]LIBUC)
AC_MSG_CHECKING([whether to build the LIBNAME shared library])
AC_ARG_WITH(LIBNAME,
@@ -82,11 +86,11 @@ AS_HELP_STRING([--with-]LIBNAME,
[Build the LIBNAME shared library (default=yes if shared libs supported)]),
[
case "$withval" in
- *)
+ no)
AC_MSG_RESULT(no)
build_lib=no
;;
- yes)
+ *)
build_lib=yes
;;
esac
@@ -97,17 +101,25 @@ build_lib=yes
]
)
-if eval test x"$build_lib" = "xyes" -a $BLDSHARED = true; then
- LIBUC[_SHARED]=$LIBUC[_SHARED_TARGET]
- AC_MSG_RESULT(yes)
- if test x"$USESHARED" != x"true" -o x"$[LINK_]LIBUC" = "xSTATIC" ; then
- LIBUC[_STATIC]=$LIBUC[_STATIC_TARGET]
+if eval test x"$build_lib" = "xyes" ; then
+ # only set the install targets if the user chose the library
+ [INSTALL_]LIBUC=[install]LIBNAME
+ [UNINSTALL_]LIBUC=[uninstall]LIBNAME
+ if eval $BLDSHARED = true; then
+ LIBUC[_SHARED]=$LIBUC[_SHARED_TARGET]
+ AC_MSG_RESULT(yes)
+ if test x"$USESHARED" != x"true" -o x"$[LINK_]LIBUC" = "xSTATIC" ; then
+ LIBUC[_STATIC]=$LIBUC[_STATIC_TARGET]
+ else
+ LIBUC[_LIBS]=LIBLIBS
+ fi
else
- LIBUC[_LIBS]=LIBLIBS
+ enable_static=yes
+ AC_MSG_RESULT(no shared library support -- will supply static library)
fi
else
enable_static=yes
- AC_MSG_RESULT(no shared library support -- will supply static library)
+ AC_MSG_RESULT(shared library not selected, but will supply static library)
fi
if test $enable_static = yes; then
LIBUC[_STATIC]=$LIBUC[_STATIC_TARGET]