summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gollub <dgollub@brocade.com>2014-08-27 22:18:15 +0200
committerDaniel Gollub <dgollub@brocade.com>2014-08-27 22:18:15 +0200
commit7d197c63b9215a136ac03422bdc10db5439c52a0 (patch)
tree6cc257465966a54b5688042e7e8dffbf1de10420
parentaae45a3089686ac7adeabb77ba04350430e3ae8c (diff)
downloadpam_tacplus-7d197c63b9215a136ac03422bdc10db5439c52a0.tar.gz
pam_tacplus-7d197c63b9215a136ac03422bdc10db5439c52a0.zip
Build and install libtac as shared library
Additional install public headers for libtac shared library. SO-Versioning is initially set to 0:0:0.
-rw-r--r--Makefile.am34
-rw-r--r--configure.ac8
2 files changed, 28 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index 0563f30..76be2f3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,12 +9,14 @@
ACLOCAL_AMFLAGS = -I config
AUTOMAKE_OPTIONS = subdir-objects
-moduledir = @libdir@
-module_LTLIBRARIES = pam_tacplus.la
-pam_tacplus_la_SOURCES = pam_tacplus.h \
-pam_tacplus.c \
-support.h \
-support.c \
+libtac_includedir = $(includedir)/libtac
+libtac_include_HEADERS = \
+libtac/include/tacplus.h \
+libtac/include/libtac.h \
+libtac/include/cdefs.h
+
+lib_LTLIBRARIES = libtac.la
+libtac_la_SOURCES = \
libtac/lib/acct_r.c \
libtac/lib/acct_s.c \
libtac/lib/attrib.c \
@@ -37,12 +39,19 @@ libtac/lib/read_wait.c \
libtac/lib/version.c \
libtac/lib/xalloc.c \
libtac/lib/xalloc.h \
-libtac/include/tacplus.h \
-libtac/include/libtac.h \
-libtac/include/cdefs.h
+$(libtac_include_HEADERS)
+libtac_la_CFLAGS = $(AM_CFLAGS) -Ilibtac/include
+libtac_la_LDFLAGS = -version-info 0:0:0 -shared
+moduledir = @pamdir@
+module_LTLIBRARIES = pam_tacplus.la
+pam_tacplus_la_SOURCES = pam_tacplus.h \
+pam_tacplus.c \
+support.h \
+support.c
pam_tacplus_la_CFLAGS = $(AM_CFLAGS) -Ilibtac/include
pam_tacplus_la_LDFLAGS = -module -avoid-version
+pam_tacplus_la_LIBADD = libtac.la
EXTRA_DIST = pam_tacplus.spec sample.pam
@@ -52,11 +61,8 @@ MAINTAINERCLEANFILES = Makefile.in config.h.in configure aclocal.m4 \
install-data-hook:
- -rm $(DESTDIR)$(libdir)/pam_tacplus.la
- -rm $(DESTDIR)$(libdir)/pam_tacplus.a
- -rm $(DESTDIR)$(libdir)/pam_tacplus.so
- ${INSTALL} -d $(DESTDIR)$(libdir)/security
- ${INSTALL} -m 755 .libs/pam_tacplus.so $(DESTDIR)$(libdir)/security
+ rm -f $(DESTDIR)$(pamdir)/pam_tacplus.la
+ rm -f $(DESTDIR)$(pamdir)/pam_tacplus.a
${INSTALL} -d $(DESTDIR)$(docdir)
${INSTALL} -m 644 sample.pam $(DESTDIR)$(docdir)
diff --git a/configure.ac b/configure.ac
index c6c5b02..720da2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,14 @@ AC_TYPE_SIGNAL
AC_CHECK_FUNCS([bzero gethostbyname gettimeofday inet_ntoa select socket])
dnl --------------------------------------------------------------------
+dnl Switch for pam module dir
+AC_ARG_ENABLE([pamdir], [AS_HELP_STRING([--enable-pamdir],
+ [Location to install the pam module ($libdir/security)])],
+ [pamdir=$enableval], [pamdir=$libdir/security])
+AC_SUBST(pamdir)
+
+
+dnl --------------------------------------------------------------------
dnl Generate made files
AC_CONFIG_FILES([Makefile
pam_tacplus.spec])