summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorskkim <09labs@keti.re.kr>2018-05-03 13:20:55 +0900
committerskkim <09labs@keti.re.kr>2018-05-03 13:20:55 +0900
commit7e7e8fdcb8263ee2392de1d8dd1a47db615c0b7d (patch)
tree2aa1f376f3ed1a634150d4a306a3f2581d507dd2 /Makefile.am
initial commitv1.0master
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am47
1 files changed, 47 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..04f180e
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,47 @@
+noinst_PROGRAMS = pam_ldap.so
+EXTRA_DIST = COPYING.LIB CVSVersionInfo.txt ChangeLog README \
+ ldap.conf pam.conf pam_ldap.spec pam.d
+
+pam_ldap_so_SOURCES = pam_ldap.c pam_ldap.h md5.c md5.h vers.c
+pam_ldap_so_LDFLAGS = @pam_ldap_so_LDFLAGS@
+
+man_MANS = pam_ldap.5
+
+DEFS = @DEFS@
+
+if USE_NATIVE_LINKER
+NATIVE_LINK = $(pam_ldap_so_LD) $(AM_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)
+
+install-exec-local: pam_ldap.so
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)/security
+if EXTENSION_SO
+ $(INSTALL_PROGRAM) -o root -g root pam_ldap.so $(DESTDIR)$(libdir)/security/pam_ldap.so
+else
+if EXTENSION_1
+ $(INSTALL_PROGRAM) -o root -g root pam_ldap.so $(DESTDIR)$(libdir)/security/libpam_ldap.1
+else
+ $(INSTALL_PROGRAM) -o root -g root pam_ldap.so $(DESTDIR)$(libdir)/security/pam_ldap.so.1
+ (cd $(DESTDIR)$(libdir)/security; rm -f pam_ldap.so; ln -s pam_ldap.so.1 pam_ldap.so)
+endif
+endif
+
+install-data-local:
+ @$(NORMAL_INSTALL)
+ @if test ! -f $(DESTDIR)$(sysconfdir)/ldap.conf; then \
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir); \
+ $(INSTALL_DATA) -o root -g root $(srcdir)/ldap.conf $(DESTDIR)$(sysconfdir)/ldap.conf; \
+ fi
+
+uninstall-local:
+ @$(NORMAL_UNINSTALL)
+
+vers.c: $(top_srcdir)/CVSVersionInfo.txt
+ $(top_srcdir)/vers_string -v