Fix some bugs in the build system, and make 'make dist' work as expected.

Also add some configure options for developer use.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@395 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2007-06-03 20:26:18 +00:00
parent 613f93be19
commit 119471eac7
8 changed files with 48 additions and 225 deletions

174
MANIFEST
View File

@ -1,174 +0,0 @@
#
# $Id$
#
CREDITS
HISTORY
INSTALL
LICENSE
MANIFEST
Makefile.am
Makefile.in
README
RELNOTES
aclocal.m4
autogen.sh
config.guess
config.h.in
config.sub
configure
configure.ac
depcomp
install-sh
ltmain.sh
missing
bin/
bin/Makefile.am
bin/Makefile.in
bin/su/
bin/su/Makefile.am
bin/su/Makefile.in
bin/su/su.c
doc/
doc/Makefile.am
doc/Makefile.in
doc/man/
doc/man/Makefile.am
doc/man/Makefile.in
doc/man/openpam.3
doc/man/openpam.man
doc/man/openpam_borrow_cred.3
doc/man/openpam_free_data.3
doc/man/openpam_free_envlist.3
doc/man/openpam_get_option.3
doc/man/openpam_log.3
doc/man/openpam_nullconv.3
doc/man/openpam_readline.3
doc/man/openpam_restore_cred.3
doc/man/openpam_set_option.3
doc/man/openpam_ttyconv.3
doc/man/pam.3
doc/man/pam.conf.5
doc/man/pam.man
doc/man/pam_acct_mgmt.3
doc/man/pam_authenticate.3
doc/man/pam_chauthtok.3
doc/man/pam_close_session.3
doc/man/pam_conv.3
doc/man/pam_end.3
doc/man/pam_error.3
doc/man/pam_get_authtok.3
doc/man/pam_get_data.3
doc/man/pam_get_item.3
doc/man/pam_get_user.3
doc/man/pam_getenv.3
doc/man/pam_getenvlist.3
doc/man/pam_info.3
doc/man/pam_open_session.3
doc/man/pam_prompt.3
doc/man/pam_putenv.3
doc/man/pam_set_data.3
doc/man/pam_set_item.3
doc/man/pam_setcred.3
doc/man/pam_setenv.3
doc/man/pam_sm_acct_mgmt.3
doc/man/pam_sm_authenticate.3
doc/man/pam_sm_chauthtok.3
doc/man/pam_sm_close_session.3
doc/man/pam_sm_open_session.3
doc/man/pam_sm_setcred.3
doc/man/pam_start.3
doc/man/pam_strerror.3
doc/man/pam_verror.3
doc/man/pam_vinfo.3
doc/man/pam_vprompt.3
include/
include/Makefile.am
include/Makefile.in
include/security/
include/security/Makefile.am
include/security/Makefile.in
include/security/openpam.h
include/security/openpam_version.h
include/security/pam_appl.h
include/security/pam_attributes.h
include/security/pam_constants.h
include/security/pam_modules.h
include/security/pam_types.h
lib/
lib/Makefile.am
lib/Makefile.in
lib/openpam_borrow_cred.c
lib/openpam_configure.c
lib/openpam_dispatch.c
lib/openpam_dynamic.c
lib/openpam_findenv.c
lib/openpam_free_data.c
lib/openpam_free_envlist.c
lib/openpam_get_option.c
lib/openpam_impl.h
lib/openpam_load.c
lib/openpam_log.c
lib/openpam_nullconv.c
lib/openpam_readline.c
lib/openpam_restore_cred.c
lib/openpam_set_option.c
lib/openpam_static.c
lib/openpam_ttyconv.c
lib/pam_acct_mgmt.c
lib/pam_authenticate.c
lib/pam_authenticate_secondary.c
lib/pam_chauthtok.c
lib/pam_close_session.c
lib/pam_end.c
lib/pam_error.c
lib/pam_get_authtok.c
lib/pam_get_data.c
lib/pam_get_item.c
lib/pam_get_mapped_authtok.c
lib/pam_get_mapped_username.c
lib/pam_get_user.c
lib/pam_getenv.c
lib/pam_getenvlist.c
lib/pam_info.c
lib/pam_open_session.c
lib/pam_prompt.c
lib/pam_putenv.c
lib/pam_set_data.c
lib/pam_set_item.c
lib/pam_set_mapped_authtok.c
lib/pam_set_mapped_username.c
lib/pam_setcred.c
lib/pam_setenv.c
lib/pam_sm_acct_mgmt.c
lib/pam_sm_authenticate.c
lib/pam_sm_authenticate_secondary.c
lib/pam_sm_chauthtok.c
lib/pam_sm_close_session.c
lib/pam_sm_get_mapped_authtok.c
lib/pam_sm_get_mapped_username.c
lib/pam_sm_open_session.c
lib/pam_sm_set_mapped_authtok.c
lib/pam_sm_set_mapped_username.c
lib/pam_sm_setcred.c
lib/pam_start.c
lib/pam_strerror.c
lib/pam_verror.c
lib/pam_vinfo.c
lib/pam_vprompt.c
misc/
misc/gendoc.pl
modules/
modules/Makefile.am
modules/Makefile.in
modules/pam_deny/
modules/pam_deny/Makefile.am
modules/pam_deny/Makefile.in
modules/pam_deny/pam_deny.c
modules/pam_permit/
modules/pam_permit/Makefile.am
modules/pam_permit/Makefile.in
modules/pam_permit/pam_permit.c
modules/pam_unix/
modules/pam_unix/Makefile.am
modules/pam_unix/Makefile.in
modules/pam_unix/pam_unix.c

View File

@ -11,7 +11,7 @@ EXTRA_DIST = \
HISTORY \
INSTALL \
LICENSE \
MANIFEST \
README \
RELNOTES \
autogen.sh \
misc/gendoc.pl

19
autogen.des Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
#
# $Id$
#
set -ex
. ./autogen.sh
# autoconf prior to 2.62 has issues with zsh 4.2 and newer
export CONFIG_SHELL=/bin/sh
./configure \
--with-doc \
--with-pam-unix \
--with-su \
--enable-developer-warnings \
--enable-werror \
"$@"

View File

@ -5,9 +5,10 @@
if [ -d /usr/local/gnu-autotools/bin ] ; then
export PATH=${PATH}:/usr/local/gnu-autotools/bin
FIX_BROKEN_FREEBSD_PORTS="-I /usr/local/share/aclocal"
fi
aclocal
aclocal ${FIX_BROKEN_FREEBSD_PORTS}
libtoolize --copy --force
autoheader
automake -a -c --foreign

View File

@ -1,15 +1,17 @@
dnl $Id$
AC_PREREQ(2.53)
AC_INIT([OpenPAM],[20050616],[des@freebsd.org],[openpam])
AC_CONFIG_SRCDIR([lib/pam_start.c])
AM_CONFIG_HEADER([config.h])
AC_PREREQ(2.59)
AC_REVISION([$Id$])
AC_INIT([OpenPAM],[trunk],[des@des.no])
AC_CONFIG_SRCDIR(lib/pam_start.c)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
AC_LANG(C)
AC_C_VOLATILE
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_INIT_AUTOMAKE
LIB_MAJ=2
AC_SUBST(LIB_MAJ)
@ -94,9 +96,18 @@ AC_SUBST(CRYPT_LIBS)
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Werror"
fi
# This corresponds to FreeBSD's WARNS level 6
DEVELOPER_CFLAGS="-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
AC_ARG_ENABLE(developer-warnings,
AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}")
AC_ARG_ENABLE(debugging-symbols,
AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
CFLAGS="${CFLAGS} -O0 -g -fno-inline")
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
CFLAGS="${CFLAGS} -Werror")
AC_CONFIG_FILES([
bin/Makefile

33
dist.sh
View File

@ -1,33 +0,0 @@
#!/bin/sh
#
# $Id$
#
set -e
srcdir=$(dirname $(realpath $0))
release=$(perl -ne '/^#define\s+_OPENPAM_VERSION\s+(\d+)/ && print $1' \
$srcdir/include/security/openpam_version.h)
distname="openpam-${release}"
tarball="${distname}.tar.gz"
install -d -m 0755 "${distname}"
grep '^[A-Za-z].*/$' MANIFEST | while read dir; do
echo "Creating ${dir}"
install -d -m 0755 "${distname}/${dir}" || exit 1
done
grep '^[A-Za-z].*[^/]$' MANIFEST | while read file; do
echo "Adding ${file}"
install -c -m 0644 "${file}" "${distname}/${file}" || exit 1
done
for file in autogen.sh configure depcomp install-sh ltmain.sh ; do
echo "Adjusting permissions for ${file}"
chmod a+x "${distname}/${file}"
done
find "${distname}" | sort -r | xargs touch -t "${release}0000"
tar zcf "${tarball}" "${distname}"
dd if=/dev/zero of="${tarball}" conv=notrunc bs=4 oseek=1 count=1
rm -rf "${distname}"
echo
md5 "${tarball}"

View File

@ -61,7 +61,7 @@ ALLCMAN = $(PMAN) $(MMAN) $(OMAN)
LINKS = $(ALLCMAN:.3=.c) openpam_configure.c openpam_dispatch.c
man3_MANS = $(ALLCMAN) openpam.3 pam.3
dist_man3_MANS = $(ALLCMAN) openpam.3 pam.3
dist_man3_MANS = pam_conv.3

View File

@ -57,6 +57,12 @@ libpam_la_CFLAGS = -DOPENPAM_MODULES_DIR='"@OPENPAM_MODULES_DIR@/"'
libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@ @DL_LIBS@
EXTRA_DIST = \
pam_authenticate_secondary.c \
pam_get_mapped_authtok.c \
pam_get_mapped_username.c \
pam_set_mapped_authtok.c \
pam_set_mapped_username.c \
\
pam_sm_acct_mgmt.c \
pam_sm_authenticate.c \
pam_sm_authenticate_secondary.c \
@ -68,10 +74,3 @@ EXTRA_DIST = \
pam_sm_set_mapped_authtok.c \
pam_sm_set_mapped_username.c \
pam_sm_setcred.c
# Not implemented yet:
# pam_authenticate_secondary.c
# pam_get_mapped_authtok.c
# pam_get_mapped_username.c
# pam_set_mapped_authtok.c
# pam_set_mapped_username.c