~ubuntu-branches/ubuntu/trusty/libnss-ldap/trusty-proposed

« back to all changes in this revision

Viewing changes to Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Richard A Nelson (Rick)
  • Date: 2007-05-14 19:40:00 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070514194000-40u9ndh540lgliqe
Tags: 255-1
Survived i386 and amd64, let it loose

Show diffs side-by-side

added added

removed removed

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