[pkg-opensc-commit] [pam-p11] 44/66: New build system
Eric Dorland
eric at moszumanska.debian.org
Tue Jun 13 04:06:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository pam-p11.
commit a9fec272f3700fbd2151ad615978cb699f673cc3
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date: Fri Aug 29 14:32:39 2008 +0000
New build system
---
Makefile.am | 33 +++--
NEWS | 3 +
aclocal/Makefile.am | 5 -
bootstrap | 2 +-
configure.ac | 213 +++++++++++++++++++++++++++-----
doc/Makefile.am | 17 +--
doc/changelog.sh | 28 -----
doc/export-wiki.sh | 68 ----------
doc/nonpersistent/Makefile.am | 50 ++++++++
doc/nonpersistent/export-wiki.sh | 72 +++++++++++
doc/{ => nonpersistent}/export-wiki.xsl | 0
doc/{ => nonpersistent}/svn2cl.xsl | 0
src/Makefile.am | 44 +++----
src/pam_p11.exports | 6 +
svnignore | 55 +++++++++
15 files changed, 418 insertions(+), 178 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index ce25c1f..6c3f91c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,17 +1,26 @@
-# Process this file with automake to create Makefile.in
-SUBDIRS = . aclocal src
-DIST_SUBDIRS = . aclocal doc src
-
-EXTRA_DIST = COPYING NEWS bootstrap
+AUTOMAKE_OPTIONS = foreign 1.10
+ACLOCAL_AMFLAGS = -I m4
MAINTAINERCLEANFILES = \
- Makefile.in config.h.in configure \
- install-sh ltmain.sh missing mkinstalldirs \
- compile depcomp config.log config.status \
- config.guess config.sub acinclude.m4 aclocal.m4
+ config.log config.status \
+ $(srcdir)/Makefile.in \
+ $(srcdir)/config.h.in $(srcdir)/config.h.in~ $(srcdir)/configure \
+ $(srcdir)/install-sh $(srcdir)/ltmain.sh $(srcdir)/missing \
+ $(srcdir)/depcomp $(srcdir)/aclocal.m4 \
+ $(srcdir)/config.guess $(srcdir)/config.sub \
+ $(srcdir)/m4/ltsugar.m4 $(srcdir)/m4/libtool.m4 \
+ $(srcdir)/m4/ltversion.m4 $(srcdir)/m4/lt~obsolete.m4 \
+ $(srcdir)/m4/ltoptions.m4 \
+ $(srcdir)/packaged
+EXTRA_DIST = svnignore
+
+SUBDIRS = src doc
-DEPCLEANFILES = config.log configure
+dist_noinst_SCRIPTS = bootstrap
+dist_doc_DATA = NEWS
-AUTOMAKE_OPTIONS = foreign 1.5
-ACLOCAL_AMFLAGS = -I aclocal
+# Allow detection of packaged tarball
+dist-hook:
+ $(MKDIR_P) "$(distdir)/m4"
+ echo > "$(distdir)/packaged"
diff --git a/NEWS b/NEWS
index a4c7ae1..2dcba85 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
NEWS for Pam_p11 -- History of user visible changes
+New in 0.1.6; ????-??-??; Andreas Jellinghaus
+* Build system rewritten (NOTICE: configure options was modified).
+
New in 0.1.5; 2008-08-27; Andreas Jellinghaus
* fix script for wiki to html export.
diff --git a/aclocal/Makefile.am b/aclocal/Makefile.am
deleted file mode 100644
index 64ad78a..0000000
--- a/aclocal/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-# Process this file with automake to create Makefile.in
-
-MAINTAINERCLEANFILES = Makefile.in
-
-EXTRA_DIST =
diff --git a/bootstrap b/bootstrap
index c733ee3..1ed89d2 100755
--- a/bootstrap
+++ b/bootstrap
@@ -7,4 +7,4 @@ if test -f Makefile; then
fi
rm -rf *~ *.cache *.m4 config.guess config.log \
config.status config.sub depcomp ltmain.sh
-autoreconf --verbose --install
+autoreconf --verbose --install --force
diff --git a/configure.ac b/configure.ac
index c1277a6..65a69c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,49 +1,204 @@
-# $Id$
-# Require autoconf 2.52
-AC_PREREQ(2.52)
+AC_PREREQ(2.60)
-# Process this file with autoconf to produce a configure script.
-AC_INIT(pam_p11,[0.1.5-svn])
-AC_CONFIG_SRCDIR([src/pam_p11.c])
-AC_CANONICAL_TARGET([])
-AM_INIT_AUTOMAKE
+define([PACKAGE_VERSION_MAJOR], [0])
+define([PACKAGE_VERSION_MINOR], [1])
+define([PACKAGE_VERSION_FIX], [5])
+
+AC_INIT([pam_p11],[PACKAGE_VERSION_MAJOR.PACKAGE_VERSION_MINOR.PACKAGE_VERSION_FIX-svn])
+AC_CONFIG_AUX_DIR([.])
+AM_CONFIG_HEADER([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}])
-AM_MAINTAINER_MODE
+AC_CONFIG_SRCDIR([src/pam_p11.c])
-# Checks for programs.
+AC_CANONICAL_HOST
AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_LIBTOOL
+PKG_PROG_PKG_CONFIG
+AC_C_BIGENDIAN
+
+AC_MSG_CHECKING([svn checkout])
+if test -e packaged; then
+ svn_checkout="no"
+else
+ svn_checkout="yes"
+fi
+AC_MSG_RESULT([${svn_checkout}])
+
+AC_ARG_ENABLE(
+ [strict],
+ [AS_HELP_STRING([--enable-strict],[enable strict compile mode @<:@disabled@:>@])],
+ ,
+ [enable_strict="no"]
+)
+
+AC_ARG_ENABLE(
+ [pedantic],
+ [AS_HELP_STRING([--enable-pedantic],[enable pedantic compile mode @<:@disabled@:>@])],
+ ,
+ [enable_pedantic="no"]
+)
+
+AC_ARG_ENABLE(
+ [doc],
+ [AS_HELP_STRING([--enable-doc],[enable installation of documents @<:@disabled@:>@])],
+ ,
+ [enable_doc="no"]
+)
+
+AC_ARG_WITH(
+ [pamdir],
+ [AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored])],
+ [pamdir="${withval}"],
+ [
+ if test "${prefix}" = "/usr"; then
+ pamdir="/lib${libdir##*/lib}/security"
+ else
+ pamdir="\$(libdir)/security"
+ fi
+ ]
+)
+
+dnl Checks for programs.
+AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
+AC_PROG_MKDIR_P
+AC_PROG_SED
+AC_PROG_MAKE_SET
-# Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([string.h syslog.h fcntl.h unistd.h security/pam_ext.h])
+dnl Add libtool support.
+ifdef(
+ [LT_INIT],
+ [LT_INIT],
+ [AC_PROG_LIBTOOL]
+)
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([ \
+ string.h syslog.h fcntl.h unistd.h security/pam_ext.h \
+])
AC_TYPE_SIZE_T
-
-# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([memset strdup strerror])
-# Checks for libraries.
-AC_CHECK_LIB(pam, pam_get_item, , AC_MSG_ERROR(could not locate pam libraries))
+PKG_CHECK_MODULES([LIBP11], [libp11 >= 0.2.4],, [AC_MSG_ERROR([libp11 is required])])
+PKG_CHECK_MODULES(
+ [OPENSSL],
+ [libcrypto >= 0.9.7],
+ ,
+ [PKG_CHECK_MODULES(
+ [OPENSSL],
+ [openssl >= 0.9.7],
+ ,
+ [AC_CHECK_LIB(
+ [crypto],
+ [RSA_version],
+ [OPENSSL_LIBS="-lcrypto"],
+ [AC_MSG_ERROR([Cannot find OpenSSL])]
+ )]
+ )]
+)
+
+dnl These required for svn checkout
+AC_ARG_VAR([XSLTPROC], [xsltproc utility])
+AC_ARG_VAR([SVN], [subversion utility])
+AC_ARG_VAR([WGET], [wget utility])
+AC_ARG_VAR([WGET_OPTS], [wget options])
+AC_ARG_VAR([TR], [tr utility])
+AC_CHECK_PROGS([XSLTPROC],[xsltproc])
+AC_CHECK_PROGS([SVN],[svn])
+AC_CHECK_PROGS([WGET],[wget])
+AC_CHECK_PROGS([TR],[tr])
+test -z "${WGET_OPTS}" && WGET_OPTS="-nv"
-# Check and set OpenSSL paths
-PKG_CHECK_MODULES(OPENSSL, openssl, [], [ AC_MSG_ERROR(openssl not found) ])
-PKG_CHECK_MODULES(LIBP11, libp11, [], [ AC_MSG_ERROR(libp11 not found) ])
+dnl svn checkout dependencies
+if test "${svn_checkout}" = "yes"; then
+ AC_MSG_CHECKING([XSLTPROC requirement])
+ if test -n "${XSLTPROC}"; then
+ AC_MSG_RESULT([ok])
+ else
+ if test "${enable_doc}" = "yes"; then
+ AC_MSG_ERROR([Missing XSLTPROC svn build with doc])
+ else
+ AC_MSG_WARN(["make dist" will not work])
+ fi
+ fi
-AC_CONFIG_FILES([
-Makefile
-aclocal/Makefile
-doc/Makefile
-src/Makefile
+ AC_MSG_CHECKING([svn doc build dependencies])
+ if test -n "${SVN}" -a -n "${TR}" -a -n "${WGET}"; then
+ AC_MSG_RESULT([ok])
+ else
+ if test "${enable_doc}" = "yes"; then
+ AC_MSG_ERROR([Missing SVN, TR or WGET for svn doc build])
+ else
+ AC_MSG_WARN(["make dist" will not work])
+ fi
+ fi
+fi
+
+if test -z "${PAM_LIBS}"; then
+ AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam])
+ AC_ARG_VAR([PAM_LIBS], [linker flags for pam])
+ AC_CHECK_LIB(
+ [pam],
+ [pam_authenticate],
+ [PAM_LIBS="-lpam"],
+ [AC_MSG_ERROR([Cannot find pam])]
+ )
+fi
+
+AC_SUBST([pamdir])
+
+AM_CONDITIONAL([SVN_CHECKOUT], [test "${svn_checkout}" = "yes"])
+AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"])
+
+if test "${enable_pedantic}" = "yes"; then
+ enable_strict="yes";
+ CFLAGS="${CFLAGS} -pedantic"
+fi
+if test "${enable_strict}" = "yes"; then
+ CFLAGS="${CFLAGS} -Wall -Wextra"
+fi
+
+AC_CONFIG_FILES([
+ Makefile
+ doc/Makefile
+ doc/nonpersistent/Makefile
+ src/Makefile
])
AC_OUTPUT
+
+cat <<EOF
+
+pam_p11 has been configured with the following options:
+
+
+Version: ${PACKAGE_VERSION}
+Libraries: $(eval eval eval echo "${libdir}")
+
+doc support: ${enable_doc}
+
+Host: ${host}
+Compiler: ${CC}
+Preprocessor flags: ${CPPFLAGS}
+Compiler flags: ${CFLAGS}
+Linker flags: ${LDFLAGS}
+Libraries: ${LIBS}
+
+pamdir ${pamdir}
+
+PAM_CFLAGS: ${PAM_CFLAGS}
+PAM_LIBS: ${PAM_LIBS}
+LIBP11_CFLAGS: ${LIBP11_CFLAGS}
+LIBP11_LIBS: ${LIBP11_LIBS}
+OPENSSL_CFLAGS: ${OPENSSL_CFLAGS}
+OPENSSL_LIBS: ${OPENSSL_LIBS}
+
+EOF
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 8c2b9f8..a97911d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,13 +1,8 @@
-# Process this file with automake to create Makefile.in
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-MAINTAINERCLEANFILES = Makefile.in $(HTML) ChangeLog
+if ENABLE_DOC
+SUBDIRS = nonpersistent
+endif
+DIST_SUBDIRS = nonpersistent
-EXTRA_DIST = README export-wiki.sh export-wiki.xsl $(HTML) index.html ChangeLog
-
-HTML= $(shell ls $(srcdir)/*.html $(srcdir)/*.css)
-
-index.html:
- sh $(srcdir)/export-wiki.sh $(srcdir)
-
-ChangeLog:
- sh $(srcdir)/changelog.sh $(srcdir)
+dist_doc_DATA = README
diff --git a/doc/changelog.sh b/doc/changelog.sh
deleted file mode 100644
index 5a4e538..0000000
--- a/doc/changelog.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# based on svn2cl.sh # Copyright (C) 2005 Arthur de Jong.
-
-set -e
-
-SRCDIR=.
-
-if test -n "$1"
-then
- SRCDIR="$1"
-fi
-
-test -f "$SRCDIR"/`basename $0`
-
-if ! test -w "$SRCDIR"
-then
- exit 0
-fi
-
-rm -rf "$SRCDIR"/ChangeLog
-cd "$SRCDIR"/..
-
-svn --verbose --xml log | \
- xsltproc --nonet --stringparam linelen 75 \
- --stringparam groupbyday no \
- --stringparam include-rev no \
- doc/svn2cl.xsl - > doc/ChangeLog
diff --git a/doc/export-wiki.sh b/doc/export-wiki.sh
deleted file mode 100755
index 613e7cf..0000000
--- a/doc/export-wiki.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-
-set -e
-
-export SERVER=http://www.opensc-project.org
-export PROJECT=pam_p11
-export WIKI=$PROJECT/wiki
-export XSL=export-wiki.xsl
-
-SRCDIR=.
-
-if test -n "$1"
-then
- SRCDIR="$1"
-fi
-
-test -f "$SRCDIR"/`basename $0`
-
-if ! test -w "$SRCDIR"
-then
- exit 0
-fi
-
-rm -rf "$SRCDIR"/*.html "$SRCDIR"/*.css
-
-wget -nv $SERVER/$WIKI/TitleIndex -O "$SRCDIR"/TitleIndex.tmp
-
-sed -e "s#</li>#</li>\n#g" < "$SRCDIR"/TitleIndex.tmp \
- | grep "\"/$WIKI/[^\"]*\"" \
- |sed -e "s#.*\"/$WIKI/\([^\"]*\)\".*#\1#g" \
- > "$SRCDIR"/WikiWords.tmp
-sed -e /^Trac/d -e /^Wiki/d -e /^TitleIndex/d -e /^RecentChanges/d \
- -e /^CamelCase/d -e /^SandBox/d -e /^InterMapTxt/d -e /^InterWiki/d \
- -e /^InterTrac/d -i "$SRCDIR"/WikiWords.tmp
-
-for A in WikiStart `cat "$SRCDIR"/WikiWords.tmp`
-do
- F=`echo $A|sed -e 's/\//_/g'`
- wget -nv $SERVER/$WIKI/$A -O "$SRCDIR"/$F.tmp
- xsltproc --nonet --output "$SRCDIR"/$F.html "$SRCDIR"/$XSL "$SRCDIR"/$F.tmp
- sed -e "s#<a href=\"/$WIKI/\([^\"]*\)\"#<a href=\"\1.html\"#g" \
- -i "$SRCDIR"/$F.html
-done
-
-mv "$SRCDIR"/WikiStart.html "$SRCDIR"/index.html
-
-wget -nv http://www.opensc-project.org/trac/css/trac.css \
- -O "$SRCDIR"/trac.css
-
-cat *.html |grep "<img src=\"/$PROJECT/attachment/wiki" \
- |sed -e 's/.*<img src="\/'$PROJECT'\/attachment\/wiki\/\([^"]*\)?format=raw".*/\1/g' \
- |sort -u |while read A
-do
- B="`echo $A |tr / _`"
- wget -nv "$SERVER/$PROJECT/attachment/wiki/$A?format=raw" -O $B
- for C in *.html
- do
- sed -e 's#\/'$PROJECT'\/attachment\/wiki\/'$A'?format=raw#'$B'#g' -i $C
- done
-done
-
-for A in *.html
-do
- sed -e 's#href="/'$PROJECT'/wiki/\([^"]*\)"#href="\1.html"#g' \
- -i $A
-done
-
-rm "$SRCDIR"/*.tmp
diff --git a/doc/nonpersistent/Makefile.am b/doc/nonpersistent/Makefile.am
new file mode 100644
index 0000000..e4e0185
--- /dev/null
+++ b/doc/nonpersistent/Makefile.am
@@ -0,0 +1,50 @@
+MAINTAINERCLEANFILES = \
+ $(srcdir)/Makefile.in $(srcdir)/ChangeLog
+DISTCLEANFILES = \
+ ChangeLog ChangeLog.tmp
+
+wikidir=$(htmldir)/wiki
+
+dist_noinst_SCRIPTS = export-wiki.sh export-wiki.xsl \
+ svn2cl.xsl
+dist_wiki_DATA = wiki.out/*
+dist_noinst_DATA = ChangeLog
+
+if SVN_CHECKOUT
+
+wiki.out/*:
+ test -n "$(WGET)" -a -n "$(SED)" -a -n "$(TR)" -a -n "$(XSLTPROC)"
+ WGET="$(WGET)" WGET_OPTS="$(WGET_OPTS)" SED="$(SED)" TR="$(TR)" XSLTPROC="$(XSLTPROC)" \
+ PROJECT="@PACKAGE_NAME@" \
+ $(SHELL) "$(srcdir)/export-wiki.sh" "$(srcdir)" "wiki.tmp"
+ mv wiki.tmp wiki.out
+
+ChangeLog:
+ test -n "$(SVN)" -a -n "$(XSLTPROC)"
+ if test -d "$(top_srcdir)/.svn"; then \
+ $(SVN) --verbose --xml log "$(top_srcdir)" | \
+ $(XSLTPROC) --nonet --stringparam linelen 75 \
+ --stringparam groupbyday no \
+ --stringparam include-rev no \
+ "$(srcdir)/svn2cl.xsl" - > ChangeLog.tmp; \
+ else \
+ echo "Warning: Unable to generate ChangeLog from none svn checkout" >&2; \
+ echo > ChangeLog.tmp; \
+ fi
+ mv ChangeLog.tmp ChangeLog
+
+else
+
+wiki.out/*:
+ $(LN_S) "$(srcdir)/wiki.out" wiki.out
+
+ChangeLog:
+ $(LN_S) "$(srcdir)/ChangeLog" ChangeLog
+
+endif
+
+distclean-local:
+ -rm -rf wiki.out wiki.tmp
+
+maintainer-clean-local:
+ -rm -rf "$(srcdir)/wiki.out"
diff --git a/doc/nonpersistent/export-wiki.sh b/doc/nonpersistent/export-wiki.sh
new file mode 100755
index 0000000..ce95593
--- /dev/null
+++ b/doc/nonpersistent/export-wiki.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+set -e
+
+test -z "$XSLTPROC" && XSLTPROC="xsltproc"
+test -z "$WGET" && WGET="wget"
+test -z "$WGET_OPTS" && WGET_OPTS="$WGET_OPTS"
+test -z "$SED" && SED="sed"
+test -z "$TR" && TR="tr"
+
+test -z "$SERVER" && SERVER="http://www.opensc-project.org"
+test -z "$PROJECT" && PROJECT="opensc"
+
+SRCDIR=.
+OUTDIR=.
+test -n "$1" && SRCDIR="$1"
+test -n "$2" && OUTDIR="$2"
+
+WIKI="$PROJECT/wiki"
+XSL="$SRCDIR/export-wiki.xsl"
+
+test -f "$SRCDIR"/`basename $0`
+
+test -e "$OUTDIR" && rm -fr "$OUTDIR"
+
+mkdir "$OUTDIR" || exit 1
+
+$WGET $WGET_OPTS $SERVER/$WIKI/TitleIndex -O "$OUTDIR"/TitleIndex.tmp
+
+$SED -e "s#</li>#</li>\n#g" < "$OUTDIR"/TitleIndex.tmp \
+ | grep "\"/$WIKI/[^\"]*\"" \
+ |$SED -e "s#.*\"/$WIKI/\([^\"]*\)\".*#\1#g" \
+ > "$OUTDIR"/WikiWords.tmp
+$SED -e /^Trac/d -e /^Wiki/d -e /^TitleIndex/d -e /^RecentChanges/d \
+ -e /^CamelCase/d -e /^SandBox/d -e /^InterMapTxt/d -e /^InterWiki/d \
+ -e /^InterTrac/d -i "$OUTDIR"/WikiWords.tmp
+
+
+for A in WikiStart `cat "$OUTDIR"/WikiWords.tmp`
+do
+ F=`echo $A|$SED -e 's/\//_/g'`
+ $WGET $WGET_OPTS $SERVER/$WIKI/$A -O "$OUTDIR"/$F.tmp
+ $XSLTPROC --nonet --output "$OUTDIR"/$F.html "$XSL" "$OUTDIR"/$F.tmp
+ $SED -e "s#<a href=\"/$WIKI/\([^\"]*\)\"#<a href=\"\1.html\"#g" \
+ -i "$OUTDIR"/$F.html
+done
+
+mv "$OUTDIR"/WikiStart.html "$OUTDIR"/index.html
+
+$WGET $WGET_OPTS http://www.opensc-project.org/trac/css/trac.css \
+ -O "$OUTDIR"/trac.css
+
+cat "$OUTDIR"/*.html |grep "<img src=\"/$PROJECT/attachment/wiki" \
+ |$SED -e 's/.*<img src="\/'$PROJECT'\/attachment\/wiki\/\([^"]*\)?format=raw".*/\1/g' \
+ |sort -u |while read A
+do
+ B="`echo $A |$TR / _`"
+ $WGET $WGET_OPTS "$SERVER/$PROJECT/attachment/wiki/$A?format=raw" -O "$OUTDIR"/$B
+ for C in "${OUTDIR}"/*.html
+ do
+ $SED -e 's#\/'$PROJECT'\/attachment\/wiki\/'$A'?format=raw#'$B'#g' -i "$C"
+ done
+done
+
+for A in "${OUTDIR}"/*.html
+do
+ $SED -e 's#href="/'$PROJECT'/wiki/\([^"]*\)"#href="\1.html"#g' \
+ -i $A
+done
+
+rm "$OUTDIR"/*.tmp
+exit 0
diff --git a/doc/export-wiki.xsl b/doc/nonpersistent/export-wiki.xsl
similarity index 100%
rename from doc/export-wiki.xsl
rename to doc/nonpersistent/export-wiki.xsl
diff --git a/doc/svn2cl.xsl b/doc/nonpersistent/svn2cl.xsl
old mode 100644
new mode 100755
similarity index 100%
rename from doc/svn2cl.xsl
rename to doc/nonpersistent/svn2cl.xsl
diff --git a/src/Makefile.am b/src/Makefile.am
index 8bfb0bd..345b011 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,32 +1,28 @@
-# Process this file with automake to create Makefile.in
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-MAINTAINERCLEANFILES = Makefile.in
+EXTRA_DIST = test.c
-AM_CFLAGS = -Wall -fno-strict-aliasing $(OPENSSL_CFLAGS) $(LIBP11_CFLAGS)
-AM_LDFLAGS = -module -avoid-version
+AM_CFLAGS = $(OPENSSL_CFLAGS) $(LIBP11_CFLAGS) $(PAM_CFLAGS)
+LIBS = $(OPENSSL_LIBS) $(LIBP11_LIBS) $(PAM_LIBS)
+AM_LDFLAGS = -module -avoid-version -shared -no-undefined \
+ -export-symbols "$(srcdir)/pam_p11.exports"
-lib_LTLIBRARIES = pam_p11_openssh.la pam_p11_opensc.la
+pam_LTLIBRARIES = pam_p11_openssh.la pam_p11_opensc.la
-pam_p11_openssh_la_SOURCES = pam_p11.c base64.c match_openssh.c
-pam_p11_openssh_la_LIBADD = $(OPENSSL_LIBS) $(LIBP11_LIBS)
+# Needed until libtool-2
+install-data-hook: install-pamLTLIBRARIES
+ rm -f "$(DESTDIR)$(pamdir)/pam_p11_openssh.la"
+ rm -f "$(DESTDIR)$(pamdir)/pam_p11_openssh.a"
+ rm -f "$(DESTDIR)$(pamdir)/pam_p11_opensc.la"
+ rm -f "$(DESTDIR)$(pamdir)/pam_p11_opensc.a"
+uninstall-local:
+ rm -f "$(DESTDIR)$(pamdir)/pam_p11_openssh.so"
+ rm -f "$(DESTDIR)$(pamdir)/pam_p11_opensc.so"
-pam_p11_opensc_la_SOURCES = pam_p11.c match_opensc.c
-pam_p11_opensc_la_LIBADD = $(OPENSSL_LIBS) $(LIBP11_LIBS)
-
-noinst_PROGRAMS= test
-
-test_SOURCES=test.c
-test_LDADD=pam_p11_openssh.la
+pam_p11_openssh_la_SOURCES = pam_p11.c base64.c match_openssh.c \
+ pam_p11.exports
+pam_p11_opensc_la_SOURCES = pam_p11.c match_opensc.c \
+ pam_p11.exports
format:
indent -kr -i8 -ts8 -sob -l80 -ss -ncs *.c *.h
-
-install:
- $(mkinstalldirs) $(DESTDIR)/$(libdir)/security
- $(libLTLIBRARIES_INSTALL) $(top_builddir)/src/.libs/pam_p11_openssh.so $(DESTDIR)/$(libdir)/security
- $(libLTLIBRARIES_INSTALL) $(top_builddir)/src/.libs/pam_p11_opensc.so $(DESTDIR)/$(libdir)/security
-
-uninstall:
- $(RM) $(DESTDIR)/$(libdir)/security/pam_p11_openssh.so
- $(RM) $(DESTDIR)/$(libdir)/security/pam_p11_opensc.so
- @ rmdir $(DESTDIR)/$(libdir)/security
diff --git a/src/pam_p11.exports b/src/pam_p11.exports
new file mode 100644
index 0000000..416cde1
--- /dev/null
+++ b/src/pam_p11.exports
@@ -0,0 +1,6 @@
+pam_sm_authenticate
+pam_sm_setcred
+pam_sm_acct_mgmt
+pam_sm_open_session
+pam_sm_close_session
+pam_sm_chauthtok
diff --git a/svnignore b/svnignore
new file mode 100644
index 0000000..17c63bf
--- /dev/null
+++ b/svnignore
@@ -0,0 +1,55 @@
+Makefile
+Makefile.in
+core
+archive
+acinclude.m4
+aclocal.m4
+autom4te.cache
+compile
+confdefs.h
+config.*
+configure
+conftest
+conftest.c
+depcomp
+install-sh
+libtool
+libtool.m4
+ltmain.sh
+missing
+mkinstalldirs
+so_locations
+stamp-h*
+
+.deps
+.libs
+.#*#
+.*.bak
+.*.orig
+.*.rej
+.*~
+#*#
+*.bak
+*.d
+*.def
+*.dll
+*.exe
+*.la
+*.lib
+*.lo
+*.orig
+*.pdb
+*.rej
+*.u
+*.rc
+*.pc
+*~
+*.gz
+*.bz2
+*.[0-9]
+*.html
+*.gif
+*.css
+*.out
+
+ChangeLog
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/pam-p11.git
More information about the pkg-opensc-commit
mailing list