mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
configure: Abstract configuration of internal libs into an m4 macro.
New subsystem libraries can now be added by specifying SMB_LIBRARY(name).
Michael
(This used to be commit 54d73769c4
)
This commit is contained in:
parent
21387a4c5e
commit
d29c816b61
@ -83,18 +83,6 @@ AC_SUBST(UNINSTALL_LIBADDNS)
|
||||
AC_SUBST(LIBADDNS_SHARED)
|
||||
AC_SUBST(LIBADDNS)
|
||||
|
||||
AC_SUBST(LIBTALLOC_STATIC_TARGET)
|
||||
AC_SUBST(LIBTALLOC_SHARED_TARGET)
|
||||
AC_SUBST(LIBTALLOC_SHARED)
|
||||
AC_SUBST(LIBTALLOC_STATIC)
|
||||
AC_SUBST(LIBTALLOC_LIBS)
|
||||
|
||||
AC_SUBST(LIBTDB_STATIC_TARGET)
|
||||
AC_SUBST(LIBTDB_SHARED_TARGET)
|
||||
AC_SUBST(LIBTDB_SHARED)
|
||||
AC_SUBST(LIBTDB_STATIC)
|
||||
AC_SUBST(LIBTDB_LIBS)
|
||||
|
||||
AC_SUBST(INSTALL_LIBWBCLIENT)
|
||||
AC_SUBST(UNINSTALL_LIBWBCLIENT)
|
||||
AC_SUBST(LIBWBCLIENT_SHARED)
|
||||
@ -113,12 +101,6 @@ AC_SUBST(UNINSTALL_LIBSMBSHAREMODES)
|
||||
AC_SUBST(LIBSMBSHAREMODES_SHARED)
|
||||
AC_SUBST(LIBSMBSHAREMODES)
|
||||
|
||||
AC_SUBST(LIBNETAPI_SHARED_TARGET)
|
||||
AC_SUBST(LIBNETAPI_STATIC_TARGET)
|
||||
AC_SUBST(LIBNETAPI_SHARED)
|
||||
AC_SUBST(LIBNETAPI_STATIC)
|
||||
AC_SUBST(LIBNETAPI_LIBS)
|
||||
|
||||
AC_SUBST(PRINT_LIBS)
|
||||
AC_SUBST(AUTH_LIBS)
|
||||
AC_SUBST(ACL_LIBS)
|
||||
@ -4727,140 +4709,78 @@ AC_ARG_WITH([static-libs],
|
||||
done], [])],
|
||||
[])
|
||||
|
||||
#################################################
|
||||
# should we build libtalloc?
|
||||
LIBTALLOC_SHARED_TARGET=bin/libtalloc.$SHLIBEXT
|
||||
LIBTALLOC_STATIC_TARGET=bin/libtalloc.a
|
||||
LIBTALLOC_SHARED=
|
||||
LIBTALLOC_STATIC=
|
||||
LIBTALLOC_LIBS=
|
||||
|
||||
AC_MSG_CHECKING(whether to build the libtalloc shared library)
|
||||
AC_ARG_WITH(libtalloc,
|
||||
[AS_HELP_STRING([--with-libtalloc],
|
||||
[Build the libtalloc shared library (default=yes if shared libs supported)])],
|
||||
|
||||
dnl SMB_LIBRARY(name)
|
||||
dnl
|
||||
dnl configure build and use of an (internal) shared library
|
||||
dnl
|
||||
AC_DEFUN([SMB_LIBRARY],
|
||||
[
|
||||
m4_pushdef([LIBNAME], [lib$1])
|
||||
m4_pushdef([LIBUC], [m4_toupper(LIBNAME)])
|
||||
m4_pushdef([LIBLIBS], [-l$1])
|
||||
|
||||
LIBUC[_SHARED_TARGET]=bin/LIBNAME.$SHLIBEXT
|
||||
LIBUC[_STATIC_TARGET]=bin/LIBNAME.a
|
||||
LIBUC[_SHARED]=
|
||||
LIBUC[_STATIC]=
|
||||
LIBUC[_LIBS]=
|
||||
|
||||
AC_SUBST(LIBUC[_SHARED_TARGET])
|
||||
AC_SUBST(LIBUC[_STATIC_TARGET])
|
||||
AC_SUBST(LIBUC[_SHARED])
|
||||
AC_SUBST(LIBUC[_STATIC])
|
||||
AC_SUBST(LIBUC[_LIBS])
|
||||
|
||||
AC_MSG_CHECKING([whether to build the LIBNAME shared library])
|
||||
AC_ARG_WITH(LIBNAME,
|
||||
[AS_HELP_STRING([--with-LIBNAME],
|
||||
[Build the LIBNAME shared library (default=yes if shared libs supported)])],
|
||||
[
|
||||
case "$withval" in
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
build_lib=no
|
||||
;;
|
||||
yes)
|
||||
samba_cv_with_libtalloc=yes
|
||||
build_lib=yes
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[
|
||||
# if unspecified, default is to build it if possible.
|
||||
samba_cv_with_libtalloc=yes
|
||||
build_lib=yes
|
||||
]
|
||||
)
|
||||
|
||||
if test x"$samba_cv_with_libtalloc" = "xyes" -a $BLDSHARED = true; then
|
||||
LIBTALLOC_SHARED=$LIBTALLOC_SHARED_TARGET
|
||||
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_LIBTALLOC" = "xSTATIC" ; then
|
||||
LIBTALLOC_STATIC=$LIBTALLOC_STATIC_TARGET
|
||||
AC_MSG_NOTICE([not using libtalloc shared library internally])
|
||||
if test x"$USESHARED" != x"true" -o x"$LINK_LIBUC" = "xSTATIC" ; then
|
||||
LIBUC[_STATIC]=$LIBUC[_STATIC_TARGET]
|
||||
else
|
||||
LIBTALLOC_LIBS=-ltalloc
|
||||
AC_MSG_NOTICE([using libtalloc shared library internally])
|
||||
LIBUC[_LIBS]=LIBLIBS
|
||||
fi
|
||||
else
|
||||
enable_static=yes
|
||||
AC_MSG_RESULT(no shared library support -- will supply static library)
|
||||
fi
|
||||
if test $enable_static = yes; then
|
||||
LIBTALLOC_STATIC=$LIBTALLOC_STATIC_TARGET
|
||||
LIBUC[_STATIC]=$LIBUC[_STATIC_TARGET]
|
||||
fi
|
||||
|
||||
#################################################
|
||||
# should we build libtdb?
|
||||
LIBTDB_SHARED_TARGET=bin/libtdb.$SHLIBEXT
|
||||
LIBTDB_STATIC_TARGET=bin/libtdb.a
|
||||
LIBTDB_SHARED=
|
||||
LIBTDB_STATIC=
|
||||
LIBTDB_LIBS=
|
||||
m4_popdef([LIBNAME])
|
||||
m4_popdef([LIBUC])
|
||||
m4_popdef([LIBLIBS])
|
||||
|
||||
AC_MSG_CHECKING(whether to build the libtdb shared library)
|
||||
AC_ARG_WITH(libtdb,
|
||||
[AS_HELP_STRING([--with-libtdb],
|
||||
[Build the libtdb shared library (default=yes if shared libs supported)])],
|
||||
[
|
||||
case "$withval" in
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
yes)
|
||||
samba_cv_with_libtdb=yes
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[
|
||||
# if unspecified, default is to build it if possible.
|
||||
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"$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
|
||||
else
|
||||
enable_static=yes
|
||||
AC_MSG_RESULT(no shared library support -- will supply static library)
|
||||
fi
|
||||
if test $enable_static = yes; then
|
||||
LIBTDB_STATIC=$LIBTDB_STATIC_TARGET
|
||||
fi
|
||||
|
||||
#################################################
|
||||
# should we build libnetapi?
|
||||
LIBNETAPI_SHARED_TARGET=bin/libnetapi.$SHLIBEXT
|
||||
LIBNETAPI_STATIC_TARGET=bin/libnetapi.a
|
||||
LIBNETAPI_SHARED=
|
||||
LIBNETAPI_STATIC=
|
||||
LIBNETAPI_LIBS=
|
||||
SMB_LIBRARY(talloc)
|
||||
SMB_LIBRARY(tdb)
|
||||
SMB_LIBRARY(netapi)
|
||||
|
||||
AC_MSG_CHECKING(whether to build the libnetapi shared library)
|
||||
AC_ARG_WITH(libnetapi,
|
||||
[AS_HELP_STRING([--with-libnetapi], [Build the libnetapi shared library (default=yes if shared libs supported)])],
|
||||
[
|
||||
case "$withval" in
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
yes)
|
||||
samba_cv_with_libnetapi=yes
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[
|
||||
# if unspecified, default is to build it if possible.
|
||||
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"$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
|
||||
else
|
||||
enable_static=yes
|
||||
AC_MSG_RESULT(no shared library support -- will supply static library)
|
||||
fi
|
||||
if test x"$enable_static" = x"yes"; then
|
||||
LIBNETAPI_STATIC=$LIBNETAPI_STATIC_TARGET
|
||||
fi
|
||||
|
||||
#################################################
|
||||
# should we build libaddns?
|
||||
|
Loading…
Reference in New Issue
Block a user