now search for kerb libs and includes
This commit is contained in:
110
configure.in
110
configure.in
@@ -7,10 +7,10 @@ dnl Variables that get substituted in the Makefile
|
||||
dnl
|
||||
PROGS="sudo visudo"
|
||||
AC_SUBST(PROGS)dnl
|
||||
STATIC_FLAGS=""
|
||||
AC_SUBST(STATIC_FLAGS)dnl
|
||||
INC_FLAGS=""
|
||||
AC_SUBST(INC_FLAGS)dnl
|
||||
LDFLAGS=""
|
||||
AC_SUBST(LDFLAGS)dnl
|
||||
CPPFLAGS=""
|
||||
AC_SUBST(CPPFLAGS)dnl
|
||||
OSDEFS=""
|
||||
AC_SUBST(OSDEFS)dnl
|
||||
OPTIONS=""
|
||||
@@ -25,37 +25,45 @@ MANTYPE="man"
|
||||
MAN_POSTINSTALL=""
|
||||
AC_SUBST(MAN_POSTINSTALL)dnl
|
||||
AC_SUBST(MANTYPE)dnl
|
||||
|
||||
dnl
|
||||
dnl Options for --with
|
||||
dnl
|
||||
|
||||
dnl --with-getpass
|
||||
AC_ARG_WITH(getpass, [ --with-getpass use system getpass(3)], AC_DEFINE(USE_GETPASS)
|
||||
echo 'Using system getpass'
|
||||
TGETPASS="")
|
||||
dnl
|
||||
|
||||
dnl --with-C2
|
||||
AC_ARG_WITH(C2, [ --with-C2 enable C2 security (shadow password) support], AC_DEFINE(HAVE_C2_SECURITY)
|
||||
C2=1
|
||||
echo 'Configuring for C2 security')
|
||||
dnl
|
||||
|
||||
dnl --with-Skey
|
||||
AC_ARG_WITH(SKEY, [ --with-SKEY enable Skey support (untested)], AC_DEFINE(HAVE_SKEY)
|
||||
SKEY=1
|
||||
echo 'Configuring for use with Skey')
|
||||
dnl
|
||||
|
||||
dnl --with-kerb4
|
||||
AC_ARG_WITH(kerb4, [ --with-kerb4 enable kerberos v4 support], AC_DEFINE(HAVE_KERB4)
|
||||
KERB4=1
|
||||
echo 'Configuring for use with Kerberos version 4')
|
||||
dnl
|
||||
|
||||
dnl --with-kerb5
|
||||
AC_ARG_WITH(kerb5, [ --with-kerb5 enable kerberos v5 support], AC_DEFINE(HAVE_KERB5)
|
||||
KERB4=1
|
||||
echo 'Configuring for use with Kerberos version 5')
|
||||
|
||||
dnl --with-AFS
|
||||
AC_ARG_WITH(AFS, [ --with-AFS enable AFS support], AC_DEFINE(HAVE_AFS)
|
||||
AFS=1
|
||||
echo 'Configuring for use with AFS')
|
||||
dnl
|
||||
|
||||
dnl --with-csops
|
||||
AC_ARG_WITH(csops, [ --with-csops add CSops standard options], OPTIONS="${OPTIONS} -DUSE_INSULTS -DENV_EDITOR"
|
||||
echo 'CSOps--adding options: USE_INSULTS ENV_EDITOR')
|
||||
|
||||
dnl
|
||||
dnl If we don't have egrep we can't do anything...
|
||||
dnl
|
||||
@@ -64,11 +72,13 @@ if test -z "$EGREPPROG"; then
|
||||
echo "Sorry, configure requires egrep to run."
|
||||
exit
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl C compiler checks
|
||||
dnl
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
|
||||
dnl
|
||||
dnl find programs we use
|
||||
dnl
|
||||
@@ -79,6 +89,7 @@ AC_CHECK_PROG(NROFFPROG, nroff, nroff, )
|
||||
if test -z "$NROFFPROG" ; then
|
||||
MANTYPE="cat"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl what architecture are we on?
|
||||
dnl
|
||||
@@ -93,14 +104,14 @@ case "$OS" in
|
||||
;;
|
||||
"aix") echo "Looks like AIX"
|
||||
AC_DEFINE(_ALL_SOURCE)
|
||||
STATIC_FLAGS="-Wl,-bI:./aixcrypt.exp"
|
||||
LDFLAGS="${LDFLAGS} -Wl,-bI:./aixcrypt.exp"
|
||||
;;
|
||||
"hp-ux") echo "Looks like HP-UX"
|
||||
if test "$OSREV" -lt 9 ; then
|
||||
if test -n "$GCC" ; then
|
||||
STATIC_FLAGS="-static"
|
||||
LDFLAGS="${LDFLAGS} -static"
|
||||
else
|
||||
STATIC_FLAGS="-Wl,-a,archive"
|
||||
LDFLAGS="${LDFLAGS} -Wl,-a,archive"
|
||||
fi
|
||||
fi
|
||||
if test -n "$AFS" ; then
|
||||
@@ -108,7 +119,7 @@ case "$OS" in
|
||||
fi
|
||||
;;
|
||||
"osf1") echo "Looks like OSF/1"
|
||||
STATIC_FLAGS="-Wl,-no_library_replacement"
|
||||
LDFLAGS="${LDFLAGS} -Wl,-no_library_replacement"
|
||||
# C2 security stuff
|
||||
if test -n "$C2" ; then
|
||||
LIBS="${LIBS} -lsecurity -laud"
|
||||
@@ -126,7 +137,7 @@ case "$OS" in
|
||||
MAN_PREFIX="/usr/catman/local"
|
||||
fi
|
||||
else
|
||||
if test -d /usr/share/man/local; then
|
||||
if test -d "/usr/share/man/local" ; then
|
||||
MAN_PREFIX="/usr/share/man/local"
|
||||
else
|
||||
MAN_PREFIX="/usr/man/local"
|
||||
@@ -157,7 +168,7 @@ case "$OS" in
|
||||
;;
|
||||
"riscos") echo "Looks like RISCos"
|
||||
LIBS="${LIBS} -lsun -lbsd"
|
||||
INC_FLAGS="${INC_FLAGS} -I/usr/include -I/usr/include/bsd"
|
||||
CPPFLAGS="${CPPFLAGS} -I/usr/include -I/usr/include/bsd"
|
||||
OSDEFS="${OSDEFS} -D_MIPS"
|
||||
;;
|
||||
"isc") echo "Looks like INTERACTIVE"
|
||||
@@ -184,24 +195,7 @@ case "$OS" in
|
||||
*) echo "Hmmm, I don't recognize $OS offhand, but that's ok"
|
||||
;;
|
||||
esac
|
||||
dnl
|
||||
dnl extra kerberos libs
|
||||
dnl
|
||||
if test -n "$KERB4" ; then
|
||||
LIBS="${LIBS} -L/usr/kerberos/lib -lkrb -ldes"
|
||||
INC_FLAGS="${INC_FLAGS} -I/usr/kerberos/include"
|
||||
fi
|
||||
dnl
|
||||
dnl extra AFS libs
|
||||
dnl
|
||||
if test -n "$AFS" ; then
|
||||
LIBS="${LIBS} -L/usr/lib/afs -lkauth -lprot -lauth -lubik -lrxkad -lsys -ldes -lrx -llwp -lcom_err -laudit -lutil"
|
||||
fi
|
||||
dnl
|
||||
dnl extra Skey lib
|
||||
if test -n "$SKEY" ; then
|
||||
LIBS="${LIBS} -lskey"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl C compiler checks (to be done after os checks)
|
||||
dnl
|
||||
@@ -269,10 +263,60 @@ dnl
|
||||
dnl OS-dependent libraries
|
||||
dnl
|
||||
AC_CHECK_LIB(sun, getpwnam)
|
||||
dnl
|
||||
dnl Find kerberos includes and libs or complain
|
||||
dnl
|
||||
if test -n "$KERB4" -o -n "$KERB5" ; then
|
||||
if test -d "/usr/include/kerberosIV" ; then
|
||||
CPPFLAGS="${CPPFLAGS} -I/usr/include/kerberosIV"
|
||||
elif test -d "/usr/local/include/kerberosIV" ; then
|
||||
CPPFLAGS="${CPPFLAGS} -I/usr/local/include/kerberosIV"
|
||||
elif test -d "/usr/kerberos/include" ; then
|
||||
CPPFLAGS="${CPPFLAGS} -I/usr/kerberos/include"
|
||||
else
|
||||
echo "Unable to locate kerberos include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test -d "/usr/kerberos/lib" ; then
|
||||
LDFLAGS="${LDFLAGS} -L/usr/kerberos/lib"
|
||||
elif test -d "/usr/lib/kerberos" ; then
|
||||
LDFLAGS="${LDFLAGS} -L/usr/lib/kerberos"
|
||||
elif test -f "/usr/local/lib/libkrb.a" ; then
|
||||
LDFLAGS="${LDFLAGS} -L/usr/local/lib"
|
||||
elif test ! -f "/usr/lib/libkrb.a" ; then
|
||||
echo "Unable to locate kerberos libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to LDFLAGS"
|
||||
fi
|
||||
|
||||
LIBS="${LIBS} -lkrb -ldes"
|
||||
if test -n "$KERB5" ; then
|
||||
LIBS="${LIBS} -ldes425 -lkrb5 -lcrypto -lcom_err"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl extra AFS libs
|
||||
dnl
|
||||
if test -n "$AFS" ; then
|
||||
if test -d "/usr/lib/afs" ; then
|
||||
LDFLAGS="${LDFLAGS} -L/usr/lib/afs"
|
||||
else
|
||||
echo "Unable to locate AFS libraries, you will have to edit the Makefile and add -L/path/to/afs/libs to LDFLAGS"
|
||||
fi
|
||||
|
||||
LIBS="${LIBS} -lkauth -lprot -lauth -lubik -lrxkad -lsys -ldes -lrx -llwp -lcom_err -laudit -lutil"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl extra Skey lib
|
||||
if test -n "$SKEY" ; then
|
||||
LIBS="${LIBS} -lskey"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Check for log file location
|
||||
dnl
|
||||
SUDO_LOGFILE
|
||||
|
||||
dnl
|
||||
dnl Substitute into the Makefiles
|
||||
dnl
|
||||
|
Reference in New Issue
Block a user