tidy build process
authorEugene Crosser <crosser@average.org>
Sat, 7 Dec 2013 11:51:16 +0000 (15:51 +0400)
committerEugene Crosser <crosser@average.org>
Sat, 7 Dec 2013 11:51:16 +0000 (15:51 +0400)
Makefile.am
README.md
configure.ac

index ab96020824ee1c1ef065750a73e1ef6062893cc5..e14ead904685e3a46addc71335f77a463d18b422 100644 (file)
@@ -1,6 +1,6 @@
 # $Id: Makefile.am 295 2005-05-13 14:58:27Z crosser $
                                                                                 
-AUTOMAKE_OPTIONS = foreign
+AUTOMAKE_OPTIONS = foreign no-dist-gzip dist-xz
 ACLOCAL_AMFLAGS = -I m4
 
 libdir = $(PAMDIR)
@@ -9,7 +9,7 @@ DEFS = -DDEBUG_PAM -DPAM_DEBUG @DEFS@
 noinst_HEADERS = pcsc_cr.h token.h crypto_if.h crypto.h serial.h authobj.h \
                authfile.h
 
-EXTRA_LTLIBRARIES = libpcsc_cr.la
+noinst_LTLIBRARIES = libpcsc_cr.la
 libpcsc_cr_la_SOURCES = authfile.c authobj.c serial.c crypto.c pcsc_cr.c \
                        ykneo.c
 EXTRA_libpcsc_cr_la_SOURCES = ossl_crypto.c tom_crypto.c gnu_crypto.c
@@ -17,6 +17,7 @@ libpcsc_cr_la_LIBADD = @CRYPTO_OBJS@
 libpcsc_cr_la_DEPENDENCIES = @CRYPTO_OBJS@
 
 lib_LTLIBRARIES = pam_pcsc_cr.la
+pam_pcsc_cr_la_LIBTOOLFLAGS = --tag=disable-static
 pam_pcsc_cr_la_LDFLAGS = -module -avoid-version
 pam_pcsc_cr_la_LIBADD = libpcsc_cr.la
 
@@ -33,3 +34,9 @@ EXTRA_DIST = autogen.sh README.md README_CR
 
 TESTS = test_auth test_serial test_crypto test_chalresp
 XFAIL_TESTS = test_chalresp
+
+html: README.html
+README.html: README.md
+       pandoc -f markdown -t html5 --self-contained -o README.html README.md
+clean-local:
+       rm -f README.html
index 75b66042f88c027e29ff32092ad345793797892f..e03dbff4bb54f25160036089ed68917906040e98 100644 (file)
--- a/README.md
+++ b/README.md
@@ -136,8 +136,9 @@ PAM module has the following parameters:
 
 ## Getting the Source
 
-Note that as of December 2013, this is a work in progress. You can
-[clone](git://git.average.org/git/pam_pcsc_cr.git) or
+Pich the tarball
+[here](http://www.average.org/chal-resp/auth/pam_pcsc_cr-0.9.0.tar.xz),
+or you can [clone](git://git.average.org/git/pam_pcsc_cr.git) or
 [browse](http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=summary)
 the git repo.
 
index a3334e0cd821a7a0fdad3ce9e70926f898adb460..723f3c23bec2d6cb24852c999177ca4d73c6af68 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT([pam_pcsc_cr], 0.0.1)
+AC_INIT([pam_pcsc_cr], 0.9.0)
 AC_CONFIG_SRCDIR([pam_pcsc_cr.c])
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE
@@ -28,34 +28,23 @@ AC_CHECK_HEADERS([security/pam_modules.h security/pam_ext.h], [], [], [
 ])
 AC_CHECK_LIB([pam], [pam_start])
 AC_CHECK_FUNCS([pam_get_authtok])
-AC_SUBST(PAMDIR, "/lib/security")
 AC_ARG_WITH(pam-dir,
-       [  --with-pam-dir=DIR                path to install PAM module],
+       [  --with-pam-dir=DIR      path to install the PAM module (/lib/security)],
        [PAMDIR="$withval"],
-       [])
+       [
+case $prefix in
+*/_inst) PAMDIR='${exec_prefix}/lib/security' ;;
+*)       PAMDIR=/lib/security ;;
+esac
+])
+AC_SUBST(PAMDIR)
+AC_MSG_NOTICE([Installation target PAMDIR=${PAMDIR}])
 
 PKG_CHECK_MODULES([PCSC], [libpcsclite])
-AC_ARG_WITH(pcsclite-include-path,
-       [  --with-pcsclite-include-path=PATH path to pcsclite includes],
-       [PCSC_CFLAGS="-I $withval"],
-       [])
-AC_ARG_WITH(pcsclite-lib-path,
-       [  --with-pcsclite-lib-path=PATH path to pcsclite libs],
-       [PCSC_LIBS="-L $withval -lpcsclite"],
-       [])
-
 CPPFLAGS="$PCSC_CFLAGS $CPPFLAGS"
 LIBS="$PCSC_LIBS $LIBS"
 
 PKG_CHECK_MODULES([OPENSSL], [libcrypto], [], [:])
-AC_ARG_WITH(openssl-include-path,
-       [  --with-openssl-include-path=PATH path to openssl includes],
-       [OPENSSL_CFLAGS="-I $withval"],
-       [])
-AC_ARG_WITH(openssl-lib-path,
-       [  --with-openssl-lib-path=PATH path to openssl libs],
-       [OPENSSL_LIBS="-L $withval -lcrypto"],
-       [])
 AS_IF([test "x$OPENSSL_CFLAGS" != "x" -o "x$OPENSSL_LIBS" != "x" ], [
   use_openssl=yes
 ])
@@ -63,19 +52,11 @@ CPPFLAGS="$OPENSSL_CFLAGS $CPPFLAGS"
 LIBS="$OPENSSL_LIBS $LIBS"
 
 AC_ARG_ENABLE(tomcrypt,
-       [  --enable-tomcrypt       use libtomcrypt even when openssl present])
+       [  --enable-tomcrypt       use libtomcrypt even when openssl is present])
 
 AS_IF([test "x$use_openssl" != "xyes" -o "x$enable_tomcrypt" = "xyes"], [
   PKG_CHECK_MODULES([TOMCRYPT], [libtomcrypt], [], [:])
 ])
-AC_ARG_WITH(libtomcrypt-include-path,
-       [  --with-libtomcrypt-include-path=PATH path to libtomcrypt includes],
-       [TOMCRYPT_CFLAGS="-I $withval"],
-       [])
-AC_ARG_WITH(libtomcrypt-lib-path,
-       [  --with-libtomcrypt-lib-path=PATH path to libtomcrypt libs],
-       [TOMCRYPT_LIBS="-L $withval -ltomcrypt"],
-       [])
 AS_IF([test "x$TOMCRYPT_CFLAGS" != "x" -o "x$TOMCRYPT_LIBS" != "x" ], [
   use_tomcrypt=yes
 ])
@@ -83,20 +64,13 @@ CPPFLAGS="$TOMCRYPT_CFLAGS $CPPFLAGS"
 LIBS="$TOMCRYPT_LIBS $LIBS"
 
 AC_ARG_ENABLE(gcrypt,
-       [  --enable-gcrypt         use libgcrypt even when openssl present])
+       [  --enable-gcrypt         use libgcrypt even when openssl or libtomcrypt
+                          is present])
 
 AS_IF([test "x$use_openssl" != "xyes" && test "x$use_tomcrypt" != "xyes" || \
        test "x$enable_tomcrypt" = "xyes"], [
   AM_PATH_LIBGCRYPT()
 ])
-AC_ARG_WITH(libgcrypt-include-path,
-       [  --with-libgcrypt-include-path=PATH path to libgcrypt includes],
-       [LIBGCRYPT_CFLAGS="-I $withval"],
-       [])
-AC_ARG_WITH(libgcrypt-lib-path,
-       [  --with-libgcrypt-lib-path=PATH path to libgcrypt libs],
-       [LIBGCRYPT_LIBS="-L $withval -lgcrypt"],
-       [])
 AS_IF([test "x$LIBGCRYPT_CFLAGS" != "x" -o "x$LIBGCRYPT_LIBS" != "x" ], [
   use_gcrypt=yes
 ])