now search for kerb libs and includes

This commit is contained in:
Todd C. Miller
1995-06-18 17:58:42 +00:00
parent 403a908020
commit 1a19c778df

View File

@@ -7,10 +7,10 @@ dnl Variables that get substituted in the Makefile
dnl dnl
PROGS="sudo visudo" PROGS="sudo visudo"
AC_SUBST(PROGS)dnl AC_SUBST(PROGS)dnl
STATIC_FLAGS="" LDFLAGS=""
AC_SUBST(STATIC_FLAGS)dnl AC_SUBST(LDFLAGS)dnl
INC_FLAGS="" CPPFLAGS=""
AC_SUBST(INC_FLAGS)dnl AC_SUBST(CPPFLAGS)dnl
OSDEFS="" OSDEFS=""
AC_SUBST(OSDEFS)dnl AC_SUBST(OSDEFS)dnl
OPTIONS="" OPTIONS=""
@@ -25,37 +25,45 @@ MANTYPE="man"
MAN_POSTINSTALL="" MAN_POSTINSTALL=""
AC_SUBST(MAN_POSTINSTALL)dnl AC_SUBST(MAN_POSTINSTALL)dnl
AC_SUBST(MANTYPE)dnl AC_SUBST(MANTYPE)dnl
dnl dnl
dnl Options for --with dnl Options for --with
dnl dnl
dnl --with-getpass dnl --with-getpass
AC_ARG_WITH(getpass, [ --with-getpass use system getpass(3)], AC_DEFINE(USE_GETPASS) AC_ARG_WITH(getpass, [ --with-getpass use system getpass(3)], AC_DEFINE(USE_GETPASS)
echo 'Using system getpass' echo 'Using system getpass'
TGETPASS="") TGETPASS="")
dnl
dnl --with-C2 dnl --with-C2
AC_ARG_WITH(C2, [ --with-C2 enable C2 security (shadow password) support], AC_DEFINE(HAVE_C2_SECURITY) AC_ARG_WITH(C2, [ --with-C2 enable C2 security (shadow password) support], AC_DEFINE(HAVE_C2_SECURITY)
C2=1 C2=1
echo 'Configuring for C2 security') echo 'Configuring for C2 security')
dnl
dnl --with-Skey dnl --with-Skey
AC_ARG_WITH(SKEY, [ --with-SKEY enable Skey support (untested)], AC_DEFINE(HAVE_SKEY) AC_ARG_WITH(SKEY, [ --with-SKEY enable Skey support (untested)], AC_DEFINE(HAVE_SKEY)
SKEY=1 SKEY=1
echo 'Configuring for use with Skey') echo 'Configuring for use with Skey')
dnl
dnl --with-kerb4 dnl --with-kerb4
AC_ARG_WITH(kerb4, [ --with-kerb4 enable kerberos v4 support], AC_DEFINE(HAVE_KERB4) AC_ARG_WITH(kerb4, [ --with-kerb4 enable kerberos v4 support], AC_DEFINE(HAVE_KERB4)
KERB4=1 KERB4=1
echo 'Configuring for use with Kerberos version 4') 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 dnl --with-AFS
AC_ARG_WITH(AFS, [ --with-AFS enable AFS support], AC_DEFINE(HAVE_AFS) AC_ARG_WITH(AFS, [ --with-AFS enable AFS support], AC_DEFINE(HAVE_AFS)
AFS=1 AFS=1
echo 'Configuring for use with AFS') echo 'Configuring for use with AFS')
dnl
dnl --with-csops dnl --with-csops
AC_ARG_WITH(csops, [ --with-csops add CSops standard options], OPTIONS="${OPTIONS} -DUSE_INSULTS -DENV_EDITOR" AC_ARG_WITH(csops, [ --with-csops add CSops standard options], OPTIONS="${OPTIONS} -DUSE_INSULTS -DENV_EDITOR"
echo 'CSOps--adding options: USE_INSULTS ENV_EDITOR') echo 'CSOps--adding options: USE_INSULTS ENV_EDITOR')
dnl dnl
dnl If we don't have egrep we can't do anything... dnl If we don't have egrep we can't do anything...
dnl dnl
@@ -64,11 +72,13 @@ if test -z "$EGREPPROG"; then
echo "Sorry, configure requires egrep to run." echo "Sorry, configure requires egrep to run."
exit exit
fi fi
dnl dnl
dnl C compiler checks dnl C compiler checks
dnl dnl
AC_PROG_CC AC_PROG_CC
AC_PROG_CPP AC_PROG_CPP
dnl dnl
dnl find programs we use dnl find programs we use
dnl dnl
@@ -79,6 +89,7 @@ AC_CHECK_PROG(NROFFPROG, nroff, nroff, )
if test -z "$NROFFPROG" ; then if test -z "$NROFFPROG" ; then
MANTYPE="cat" MANTYPE="cat"
fi fi
dnl dnl
dnl what architecture are we on? dnl what architecture are we on?
dnl dnl
@@ -93,14 +104,14 @@ case "$OS" in
;; ;;
"aix") echo "Looks like AIX" "aix") echo "Looks like AIX"
AC_DEFINE(_ALL_SOURCE) AC_DEFINE(_ALL_SOURCE)
STATIC_FLAGS="-Wl,-bI:./aixcrypt.exp" LDFLAGS="${LDFLAGS} -Wl,-bI:./aixcrypt.exp"
;; ;;
"hp-ux") echo "Looks like HP-UX" "hp-ux") echo "Looks like HP-UX"
if test "$OSREV" -lt 9 ; then if test "$OSREV" -lt 9 ; then
if test -n "$GCC" ; then if test -n "$GCC" ; then
STATIC_FLAGS="-static" LDFLAGS="${LDFLAGS} -static"
else else
STATIC_FLAGS="-Wl,-a,archive" LDFLAGS="${LDFLAGS} -Wl,-a,archive"
fi fi
fi fi
if test -n "$AFS" ; then if test -n "$AFS" ; then
@@ -108,7 +119,7 @@ case "$OS" in
fi fi
;; ;;
"osf1") echo "Looks like OSF/1" "osf1") echo "Looks like OSF/1"
STATIC_FLAGS="-Wl,-no_library_replacement" LDFLAGS="${LDFLAGS} -Wl,-no_library_replacement"
# C2 security stuff # C2 security stuff
if test -n "$C2" ; then if test -n "$C2" ; then
LIBS="${LIBS} -lsecurity -laud" LIBS="${LIBS} -lsecurity -laud"
@@ -126,7 +137,7 @@ case "$OS" in
MAN_PREFIX="/usr/catman/local" MAN_PREFIX="/usr/catman/local"
fi fi
else else
if test -d /usr/share/man/local; then if test -d "/usr/share/man/local" ; then
MAN_PREFIX="/usr/share/man/local" MAN_PREFIX="/usr/share/man/local"
else else
MAN_PREFIX="/usr/man/local" MAN_PREFIX="/usr/man/local"
@@ -157,7 +168,7 @@ case "$OS" in
;; ;;
"riscos") echo "Looks like RISCos" "riscos") echo "Looks like RISCos"
LIBS="${LIBS} -lsun -lbsd" 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" OSDEFS="${OSDEFS} -D_MIPS"
;; ;;
"isc") echo "Looks like INTERACTIVE" "isc") echo "Looks like INTERACTIVE"
@@ -184,24 +195,7 @@ case "$OS" in
*) echo "Hmmm, I don't recognize $OS offhand, but that's ok" *) echo "Hmmm, I don't recognize $OS offhand, but that's ok"
;; ;;
esac 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
dnl C compiler checks (to be done after os checks) dnl C compiler checks (to be done after os checks)
dnl dnl
@@ -269,10 +263,60 @@ dnl
dnl OS-dependent libraries dnl OS-dependent libraries
dnl dnl
AC_CHECK_LIB(sun, getpwnam) 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
dnl Check for log file location dnl Check for log file location
dnl dnl
SUDO_LOGFILE SUDO_LOGFILE
dnl dnl
dnl Substitute into the Makefiles dnl Substitute into the Makefiles
dnl dnl