-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.am
117 lines (93 loc) · 3.63 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
if AIX
authmod = NSS_LDAP
else
authmod =
endif
noinst_PROGRAMS = nss_ldap.so $(authmod)
INST_UID=root
if AIX
INST_GID=system
else
if FreeBSD
INST_GID=wheel
else
INST_GID=root
endif
endif
EXTRA_DIST = CVSVersionInfo.txt ChangeLog \
AUTHORS ANNOUNCE NEWS INSTALL README LICENSE.OpenLDAP COPYING\
ldap.conf nss_ldap.spec nsswitch.ldap
man_MANS = nss_ldap.5
nss_ldap_so_SOURCES = ldap-nss.c ldap-pwd.c ldap-grp.c ldap-netgrp.c ldap-rpc.c \
ldap-hosts.c ldap-network.c ldap-proto.c ldap-spwd.c \
ldap-alias.c ldap-service.c ldap-schema.c ldap-ethers.c \
ldap-bp.c ldap-automount.c util.c ltf.c snprintf.c resolve.c \
dnsconfig.c irs-nss.c pagectrl.c ldap-sldap.c ldap-krb5.c \
vers.c
nss_ldap_so_LDFLAGS = @nss_ldap_so_LDFLAGS@
NSS_LDAP_PATH_CONF = @NSS_LDAP_PATH_CONF@
NSS_LDAP_PATH_ROOTPASSWD = @NSS_LDAP_PATH_ROOTPASSWD@
NSS_LDAP_SOURCES = ldap-nss.c ldap-grp.c ldap-pwd.c ldap-netgrp.c ldap-schema.c \
util.c ltf.c snprintf.c resolve.c dnsconfig.c \
irs-nss.c pagectrl.c aix_authmeth.c ldap-krb5.c vers.c
NSS_LDAP_LDFLAGS = @NSS_LDAP_LDFLAGS@
DEFS = @DEFS@
#INCLUDES = -I$(top_builddir) -I$(srcdir)
if GCC
MULTI_OS_DIRECTORY=$(shell $(CC) $(CFLAGS) -print-multi-os-directory)
else
MULTI_OS_DIRECTORY=.
endif
if GLIBC
LIBC_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed -e 's|.*libc-\(.*\)\.so|\1|')
NSS_LDAP_LIBC_VERSIONED = libnss_ldap-$(LIBC_VERS).so
NSS_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|')
NSS_LDAP_NSS_VERSIONED = libnss_ldap.so.$(NSS_VERS)
endif
if USE_NATIVE_LINKER
NATIVE_LINK = $(nss_ldap_so_LD) $(AM_LDFLAGS) $(LDFLAGS) -o $@
else
GNU_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
endif
# This is horrible but appears to be the only way to work with
# recent versions of automake. Any better ideas, let me know.
LINK = $(NATIVE_LINK) $(GNU_LINK)
if AIX
# AIX install instructions per doc/README.AIX
install-exec-local: nss_ldap.so NSS_LDAP
$(mkinstalldirs) $(DESTDIR)$(libdir)/netsvc/dynload
$(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) nss_ldap.so $(DESTDIR)$(libdir)/netsvc/dynload/nss_ldap.so
$(mkinstalldirs) $(DESTDIR)$(libdir)/security
$(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) NSS_LDAP $(DESTDIR)$(libdir)/security/NSS_LDAP
else
# Linux, Solaris, other platform install instructions
install-exec-local: nss_ldap.so
@$(NORMAL_INSTALL)
if GLIBC
-rm -f $(DESTDIR)$(libdir)/$(NSS_LDAP_LIBC_VERSIONED)
$(mkinstalldirs) $(DESTDIR)$(libdir)
$(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) nss_ldap.so $(DESTDIR)$(libdir)/$(NSS_LDAP_LIBC_VERSIONED)
(cd $(DESTDIR)$(libdir); ln -sf $(NSS_LDAP_LIBC_VERSIONED) $(NSS_LDAP_NSS_VERSIONED))
$(mkinstalldirs) $(DESTDIR)/usr$(libdir)
(cd $(DESTDIR)/usr$(libdir); ln -sf ../..$(libdir)/$(NSS_LDAP_NSS_VERSIONED) .)
else
$(mkinstalldirs) $(DESTDIR)$(libdir)
if HPUX
$(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) nss_ldap.so $(DESTDIR)$(libdir)/libnss_ldap.1
else
$(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) nss_ldap.so $(DESTDIR)$(libdir)/nss_ldap.so.1
(cd $(DESTDIR)$(libdir); rm -f nss_ldap.so; ln -s nss_ldap.so.1 nss_ldap.so)
endif
endif
endif
install-data-local:
@$(NORMAL_INSTALL)
@if test ! -f $(DESTDIR)$(NSS_LDAP_PATH_CONF); then \
$(mkinstalldirs) $(DESTDIR)$(dir $(NSS_LDAP_PATH_CONF)); \
$(INSTALL_DATA) -o $(INST_UID) -g $(INST_GID) $(srcdir)/ldap.conf $(DESTDIR)$(NSS_LDAP_PATH_CONF); \
fi
$(INSTALL_DATA) -o $(INST_UID) -g $(INST_GID) $(srcdir)/nsswitch.ldap $(DESTDIR)$(sysconfdir)/nsswitch.ldap;
uninstall-local:
@$(NORMAL_UNINSTALL)
vers.c: $(top_srcdir)/CVSVersionInfo.txt
CVSVERSIONDIR=$(top_srcdir) $(top_srcdir)/vers_string -v