Description: debianization
	Meant to maintain a minimal debian/rules, to fix warnings,
	to address Debian specific stuff in general.
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2015-11-07

--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@
 AC_CANONICAL_TARGET([])
 AM_DISABLE_STATIC
 AM_INIT_AUTOMAKE(pam_ssh, 2.1)
+AM_MAINTAINER_MODE
 AM_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
 
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,9 +24,10 @@
 #
 # $Id: Makefile.am,v 1.19 2008/05/12 18:57:12 rosenauer Exp $
 
-lib_LTLIBRARIES			= pam_ssh.la
-pam_ssh_la_LDFLAGS		= -avoid-version -module
-pam_ssh_la_LIBADD		= @LTLIBOBJS@
+lib_LTLIBRARIES    = pam_ssh.la
+pam_ssh_la_CFLAGS  = -ffunction-sections -fdata-sections -Wall -Wno-attributes -Wno-unused-result
+pam_ssh_la_LDFLAGS = -avoid-version -module -Wl,--version-script,debian/pam_ssh.version -Wl,--gc-sections
+pam_ssh_la_LIBADD	 = @LTLIBOBJS@
 pam_ssh_la_SOURCES = \
 	atomicio.c atomicio.h authfd.c authfd.h \
 	authfile.c authfile.h \
@@ -56,7 +57,7 @@
 	ssh2.h ssh.h defines.h includes.h
 libdir				= @PAMDIR@
 man_MANS			= pam_ssh.8
-AM_CFLAGS			= -Wall
+AM_CFLAGS			= -Wall -Wno-attributes -Wno-unused-result
 AUTOMAKE_OPTIONS		= dist-bzip2 dist-xz
 EXTRA_pam_ssh_la_SOURCES	= openpam_cred.h pam_opttab.h pam_option.h \
 				  pam_get_pass.h strlcpy.h strnvis.h
