From 8d539e1f996a85596dc8027ba06a32e223bd99ad Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Jan 28 2003 01:35:57 +0000 Subject: add --with-moduledir, --with-krb5-libs, --with-krbafs-libs to configure --- diff --git a/Makefile.in b/Makefile.in index 3349be8..973ca07 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,6 +8,9 @@ KRBAFS=@KRBAFS@ DEFS=@DEFS@ OS=@OS@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ + CC=@CC@ FLEX=@FLEX@ YACC=@YACC@ @@ -18,6 +21,7 @@ KRB5LIBS=@KRB5LIBS@ KRB5AFSLIBS=@KRB5AFSLIBS@ CCSHLIBFLAGS=$(LDFLAGS) LDSHLIBFLAGS=$(LDFLAGS) +MODULEDIR=@moduledir@ MODULES = pam_krb5.so pam_krb5afs.so MAN5TARGETS = @MAN5TARGETS@ MAN8TARGETS = @MAN8TARGETS@ @@ -52,8 +56,8 @@ endif install: $(SHLIBDEP) install-modules install-man install-modules: - test -d $(DESTDIR)/lib/security || mkdir -p $(DESTDIR)/lib/security - @INSTALL@ -m 755 $(MODULES) $(DESTDIR)/lib/security + test -d $(DESTDIR)/$(MODULEDIR) || mkdir -p $(DESTDIR)/$(MODULEDIR) + @INSTALL@ -m 755 $(MODULES) $(DESTDIR)/$(MODULEDIR) install-man: test -d $(DESTDIR)$(mandir)/man5 || mkdir -p $(DESTDIR)$(mandir)/man5 diff --git a/autogen b/autogen index 59fb45e..d12fec7 100755 --- a/autogen +++ b/autogen @@ -1,4 +1,4 @@ set -x autoheader &&\ autoconf &&\ -env CFLAGS="-g3 -Wunused -Wuninitialized -Wimplicit -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcast-align" ./configure --with-krb5=/usr/kerberos --with-krbafs=/usr/kerberos +env CFLAGS="-g3 -Wunused -Wuninitialized -Wimplicit -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcast-align" ./configure --with-krb5=/usr/kerberos --with-krbafs=/usr/kerberos --with-moduledir=/lib/security diff --git a/configure.in b/configure.in index 7589a7d..9c99437 100644 --- a/configure.in +++ b/configure.in @@ -9,25 +9,57 @@ AC_PATH_PROG(YACC,yacc) libsave="$LIBS" +AC_ARG_WITH(moduledir, +[ --with-moduledir=dir install module to dir], +[ +if test x$withval != xyes ; then + moduledir="$withval" +fi +] +, +moduledir="$libdir"/security +) + +AC_ARG_WITH(krb5-libs, +[ --with-krb5-libs=dir use Kerberos 5 libs in dir], +if test x$withval != xyes ; then + krb5_libs="$withval" +fi +) + AC_ARG_WITH(krb5, [ --with-krb5=dir use Kerberos 5 headers and libs under dir], if test x$withval != xyes ; then KRB5=$withval CPPFLAGS="-I$withval/include $CPPFLAGS" CFLAGS="-I$withval/include $CFLAGS" - LDFLAGS="-L$withval/lib $LDFLAGS" + if test x$krb5_libs = x ; then + LDFLAGS="-L$withval/lib $LDFLAGS" + else + LDFLAGS="-L$krb5_libs $LDFLAGS" + fi else KRBAFS=/usr fi ) +AC_ARG_WITH(krbafs-libs, +[ --with-krbafs-libs=dir use Kerberos 5-hacked krbafs libs in dir], +if test x$withval != xyes ; then + krbafs_libs="$withval" +fi +) AC_ARG_WITH(krbafs, [ --with-krbafs=dir use Kerberos 5-hacked krbafs package under dir], if test x$withval != xyes ; then KRBAFS=$withval CPPFLAGS="-I$withval/include $CPPFLAGS" CFLAGS="-I$withval/include $CFLAGS" - LDFLAGS="-L$withval/lib $LDFLAGS" + if test x$krbafs_libs = x ; then + LDFLAGS="-L$withval/lib $LDFLAGS" + else + LDFLAGS="-L$krbafs_libs $LDFLAGS" + fi else KRBAFS=/usr fi @@ -40,7 +72,7 @@ MAN8TARGETS=pam_krb5.8 AC_CHECK_HEADERS(dlfcn.h com_err.h syslog.h sys/syslog.h errno.h) AC_CHECK_HEADERS(security/pam_appl.h security/pam_modules.h) -AC_CHECK_HEADER(krb5.h,AC_DEFINE(HAVE_KRB5_H), +AC_CHECK_HEADER(krb5.h,AC_DEFINE(HAVE_KRB5_H,1,[Define if you have krb5.h]), AC_ERROR(install Kerberos 5 or re-run configure with --with-krb5)) AC_CHECK_FUNC(snprintf) @@ -61,7 +93,7 @@ AC_MSG_CHECKING(whether we are using Heimdal) AC_TRY_COMPILE([ #include ], [ char *tmp = heimdal_version; ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HEIMDAL) + AC_DEFINE(HEIMDAL,1,[Define if you have Heimdal instead of MIT Kerberos.]) LIBS="-lkrb5 -lasn1 $LIBS" ], [ AC_MSG_RESULT(no) @@ -71,10 +103,10 @@ AC_TRY_COMPILE([ #include ], AC_CHECK_HEADER(kerberosIV/krb.h, [have_krb_h="kerberosIV/krb.h" - AC_DEFINE(HAVE_KERBEROSIV_KRB_H)], + AC_DEFINE(HAVE_KERBEROSIV_KRB_H,1,[Define if you have kerberosIV/krb.h.])], [AC_CHECK_HEADER(krb.h,[ have_krb_h="krb.h" - AC_DEFINE(HAVE_KRB_H) + AC_DEFINE(HAVE_KRB_H,1,[Define if you have krb.h.]) ])]) if test x$have_krb_h != x; then @@ -87,14 +119,14 @@ if test x$have_krb_h != x; then AC_TRY_COMPILE([#include <$have_krb_h>], [ char *tmp = krb4_version; ], [ AC_MSG_RESULT(yes) - AC_DEFINE(KTH_KRB4)], + AC_DEFINE(KTH_KRB4,1,[Define if your Kerberos IV library is KTH Kerberos and not the MIT Kerberos IV libraries bundled with MIT Kerberos 5.])], [ AC_MSG_RESULT(no) ]) fi KRB5LIBS="$LIBS" if test x$ac_cv_lib_krb4_in_tkt = xyes ; then AC_CHECK_HEADER(krbafs.h, - [AC_DEFINE(HAVE_KRBAFS_H) + [AC_DEFINE(HAVE_KRBAFS_H,1,[Define if you have krbafs.h.]) AC_CHECK_LIB(krbafs,krb_afslog, [LIBS="-lkrbafs $LIBS" SHTARGETS="$SHTARGETS pam_krb5afs.so" @@ -107,7 +139,7 @@ if test x$ac_cv_lib_krb4_in_tkt = xyes ; then fi KRB5AFSLIBS="$LIBS" -AC_CHECK_FUNC(krb5_decode_ticket,AC_DEFINE(HAVE_VALIDATION)) +AC_CHECK_FUNC(krb5_decode_ticket,AC_DEFINE(HAVE_VALIDATION,1,[Define if your Kerberos library provides krb5_decode_ticket().])) AC_CHECK_FUNC(krb5_appdefault_string) AC_CHECK_FUNC(krb5_appdefault_boolean) AC_CHECK_FUNC(krb5_change_password,,AC_MSG_WARN([password-changing disabled])) @@ -131,5 +163,8 @@ AC_SUBST(KRB5LIBS) AC_SUBST(KRB5AFSLIBS) AC_SUBST(MAN5TARGETS) AC_SUBST(MAN8TARGETS) +AC_SUBST(prefix) +AC_SUBST(exec_prefix) +AC_SUBST(moduledir) AC_OUTPUT(Makefile) diff --git a/pam_krb5.spec b/pam_krb5.spec index d75ae49..1f92a00 100644 --- a/pam_krb5.spec +++ b/pam_krb5.spec @@ -1,6 +1,6 @@ Summary: A Pluggable Authentication Module for Kerberos 5. Name: pam_krb5 -Version: 1.56 +Version: 1.57 Release: 1 Source0: pam_krb5-%{version}-%{release}.tar.gz License: LGPL @@ -19,7 +19,12 @@ The included pam_krb5afs module also gets AFS tokens if so configured. %setup -q -n pam_krb5-%{version}-%{release} %build -%configure --with-krb5=/usr/kerberos --with-krbafs=/usr/kerberos +%configure \ + --with-moduledir=/%{_lib}/security \ + --with-krb5=/usr/kerberos \ + --with-krb5-libs=/usr/kerberos/%{_lib} \ + --with-krbafs=/usr/kerberos \ + --with-krbafs-libs=/usr/kerberos/%{_lib} make %install @@ -39,6 +44,9 @@ make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} # $Id$ %changelog +* Mon Jan 27 2003 Nalin Dahyabhai 1.57-1 +- add --with-moduledir, --with-krb5-libs, --with-krbafs-libs to configure + * Tue May 28 2002 Nalin Dahyabhai 1.56-1 - guess a default cell name - fix what's hopefully the last parser bug