mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 09:05:44 +00:00
Merge pull request #4032 from joanbm/master
autotools: Avoid multiple liblxc.so with --enable-pam
This commit is contained in:
commit
d6bd3ab9ee
14
configure.ac
14
configure.ac
@ -636,19 +636,19 @@ AM_COND_IF([ENABLE_PAM],
|
||||
[pamdir],
|
||||
[AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored,
|
||||
or "none" if PAM modules are not to be built])],
|
||||
[pamdir=$withval],
|
||||
[exec_pamdir=$withval],
|
||||
[
|
||||
if test "${prefix}" = "/usr"; then
|
||||
pamdir="/lib${libdir##*/lib}/security"
|
||||
exec_pamdir="/lib${libdir##*/lib}/security"
|
||||
else
|
||||
pamdir="\$(libdir)/security"
|
||||
exec_pamdir="\$(libdir)/security"
|
||||
fi
|
||||
]
|
||||
)])
|
||||
|
||||
AM_CONDITIONAL([HAVE_PAM], [test x"$pamdir" != "xnone"])
|
||||
AM_CONDITIONAL([HAVE_PAM], [test x"$exec_pamdir" != "xnone"])
|
||||
AM_COND_IF([ENABLE_PAM],
|
||||
[if test "z$pamdir" != "znone"; then
|
||||
[if test "z$exec_pamdir" != "znone"; then
|
||||
AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam])
|
||||
AC_ARG_VAR([PAM_LIBS], [linker flags for pam])
|
||||
AC_CHECK_LIB(
|
||||
@ -659,7 +659,7 @@ AM_COND_IF([ENABLE_PAM],
|
||||
])
|
||||
|
||||
AC_SUBST(PAM_LIBS)
|
||||
AC_SUBST([pamdir])
|
||||
AC_SUBST([exec_pamdir])
|
||||
fi])
|
||||
|
||||
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
|
||||
@ -1130,7 +1130,7 @@ Security features:
|
||||
|
||||
PAM:
|
||||
- PAM module: $enable_pam
|
||||
- cgroup PAM module: $pamdir
|
||||
- cgroup PAM module: $exec_pamdir
|
||||
|
||||
Documentation:
|
||||
- examples: $enable_examples
|
||||
|
@ -2631,7 +2631,7 @@ endif
|
||||
|
||||
if ENABLE_PAM
|
||||
if HAVE_PAM
|
||||
pam_LTLIBRARIES = pam_cgfs.la
|
||||
exec_pam_LTLIBRARIES = pam_cgfs.la
|
||||
|
||||
pam_cgfs_la_SOURCES = pam/pam_cgfs.c \
|
||||
file_utils.c file_utils.h \
|
||||
@ -2661,7 +2661,7 @@ pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) \
|
||||
endif
|
||||
endif
|
||||
|
||||
install-exec-local: install-libLTLIBRARIES
|
||||
install-exec-hook:
|
||||
mkdir -p $(DESTDIR)$(datadir)/lxc
|
||||
install -c -m 644 lxc.functions $(DESTDIR)$(datadir)/lxc
|
||||
mv $(shell readlink -f $(DESTDIR)$(libdir)/liblxc.so) $(DESTDIR)$(libdir)/liblxc.so.@LXC_ABI@
|
||||
@ -2669,10 +2669,15 @@ install-exec-local: install-libLTLIBRARIES
|
||||
cd $(DESTDIR)$(libdir); \
|
||||
ln -sf liblxc.so.@LXC_ABI@ liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)); \
|
||||
ln -sf liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) liblxc.so
|
||||
|
||||
if ENABLE_PAM
|
||||
if HAVE_PAM
|
||||
$(RM) "$(DESTDIR)$(exec_pamdir)/pam_cgfs.la"
|
||||
$(RM) "$(DESTDIR)$(exec_pamdir)/pam_cgfs.a"
|
||||
endif
|
||||
endif
|
||||
if ENABLE_COMMANDS
|
||||
install-exec-hook:
|
||||
chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
|
||||
|
||||
if ENABLE_BASH
|
||||
install-data-local:
|
||||
cd $(DESTDIR)$(bashcompdir); \
|
||||
@ -2693,10 +2698,6 @@ endif
|
||||
|
||||
if ENABLE_PAM
|
||||
if HAVE_PAM
|
||||
$(RM) $(DESTDIR)$(pamdir)/pam_cgfs.so*
|
||||
|
||||
install-data-hook: install-pamLTLIBRARIES
|
||||
$(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.la"
|
||||
$(RM) "$(DESTDIR)$(pamdir)/pam_cgfs.a"
|
||||
$(RM) $(DESTDIR)$(exec_pamdir)/pam_cgfs.so*
|
||||
endif
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user