if test "$athena" = true; then
enable_athena=yes
- with_readline=/mit/gnu
- unset with_com_err
- prefix=/afs/athena.mit.edu/system/moira
+ prefix=/afs/.athena.mit.edu/system/moira
bindir=$prefix/arch/$ATHENA_SYS/bin
sbindir=$bindir
+ MR_INCLUDE(/usr/athena/include)
+ MR_INCLUDE(/usr/athena/include/kerberosIV)
+ MR_LIBS(/usr/athena/lib)
fi
# We currently just don't support changing this
AC_SUBST(COM_ERR_SUBDIR)
AC_SUBST(COMPILE_ET)
-# Kerberos (required)
+# Kerberos (Kerberos 4 required, Kerberos 5 optional for reg_svr)
AC_MSG_CHECKING(for Kerberos 4)
AC_ARG_WITH(krb4,
[ --with-krb4=PREFIX Specify location of krb4],
elif test -d /usr/include/kerberosIV; then
MR_INCLUDE(/usr/include/kerberosIV)
fi
+AC_CHECK_LIB(crypto, main, crypto="crypto",
+ [AC_CHECK_LIB(k5crypto, main, crypto="k5crypto")])
AC_CHECK_LIB(krb4, krb_rd_req,
- [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto"],
+ [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -l${crypto}"],
[AC_CHECK_LIB(krb, krb_rd_req,
[KRB4_LIBS="-lkrb -ldes"],
[AC_MSG_ERROR(Kerberos 4 libraries not found)],
$LIBPATH -ldes)],
- $LIBPATH -ldes425 -lkrb5 -lcrypto)
+ $LIBPATH -ldes425 -lkrb5 -l${crypto} -lcom_err)
+
+AC_MSG_CHECKING(for Kerberos 5)
+AC_ARG_WITH(krb5,
+ [ --with-krb5=PREFIX Specify location of krb5 (for reg_svr)],
+ [krb5="$withval"], [krb5=no])
+AC_MSG_RESULT($krb5)
+if test "$krb5" != no; then
+ REG_SVR_DEFS=-DKRB5
+ if test "$krb5" != yes; then
+ REG_SVR_INCLUDES=-I$krb5/include
+ REG_SVR_LIBS=-L$krb5/lib
+ fi
+ REG_SVR_LIBS="$REG_SVR_LIBS -lkadm5clnt -lgssapi_krb5 -lgssrpc -ldyn -lkrb4 -ldes425 -lkrb5 -l${crypto}"
+else
+ REG_SVR_DEFS=-DKRB4
+ REG_SVR_LIBS=-lkadm
+fi
+AC_SUBST(REG_SVR_DEFS)
+AC_SUBST(REG_SVR_INCLUDES)
+AC_SUBST(REG_SVR_LIBS)
# Hesiod support
AC_MSG_CHECKING(for Hesiod)
MR_DEFINE(HAVE_ZEPHYR)
fi
-# GDSS support (default: build util/gdss if present)
-AC_MSG_CHECKING(for GDSS)
-AC_ARG_WITH(gdss,
- [ --with-gdss=PREFIX Specify location of GDSS],
- [gdss="$withval"
- GDSS_CPPFLAGS="-I$gdss/include"
- GDSS_LIBS="-L$gdss/lib -lgdss"],
- [if test -d $srcdir/util/gdss; then
- gdss=$srcdir/util/gdss
- GDSS_SUBDIR=util/gdss
- GDSS_OUTPUT_FILES="util/gdss/Makefile util/gdss/lib/Makefile \
- util/gdss/lib/crypto/Makefile util/gdss/lib/crypto/bignum/Makefile \
- util/gdss/lib/crypto/algorithm/Makefile"
- # autoconf can't deal with creating util/gdss if util doesn't exist
+# RSAREF support (default: build util/rsaref if present)
+AC_MSG_CHECKING(for RSAREF)
+AC_ARG_WITH(rsaref,
+ [ --with-rsaref=PREFIX Specify location of RSAREF],
+ [rsaref="$withval"
+ RSAREF_CPPFLAGS="-I$rsaref/include"
+ RSAREF_LIBS="$rsaref/lib/rsaref.a"],
+ RSAREF_SUBDIRS=reg_svr
+ [if test -d $srcdir/util/rsaref; then
+ rsaref=$srcdir/util/rsaref
+ RSAREF_SUBDIRS="util/rsaref reg_svr"
+ RSAREF_OUTPUT_FILES="util/rsaref/Makefile"
+ # autoconf can't deal with creating util/rsaref if util doesn't exist
if test ! -d util; then
mkdir util
fi
- GDSS_CPPFLAGS="-I$gdss/include"
- GDSS_LIBS='-L$(BUILDTOP)/util/gdss/lib -lgdss'
+ RSAREF_CPPFLAGS='-I$(SRCTOP)/util/rsaref'
+ RSAREF_LIBS='$(BUILDTOP)/util/rsaref/rsaref.a'
+ RSAREF_LIBDEP='$(BUILDTOP)/util/rsaref/rsaref.a'
else
- gdss=no
+ rsaref=no
fi])
-AC_MSG_RESULT($gdss)
-if test "$gdss" != no; then
- GDSS_OBJS='$(GDSS_OBJS)'
- GDSS_CFILES='$(GDSS_CFILES)'
- GDSS_TARGET='$(GDSS_TARGET)'
- MR_DEFINE(HAVE_GDSS)
+AC_MSG_RESULT($rsaref)
+if test "$rsaref" != no; then
+ MR_DEFINE(HAVE_RSAREF)
fi
-AC_SUBST(GDSS_CPPFLAGS)
-AC_SUBST(GDSS_LIBS)
-AC_SUBST(GDSS_SUBDIR)
-AC_SUBST(GDSS_OBJS)
-AC_SUBST(GDSS_CFILES)
-AC_SUBST(GDSS_TARGET)
+AC_SUBST(RSAREF_CPPFLAGS)
+AC_SUBST(RSAREF_LIBS)
+AC_SUBST(RSAREF_SUBDIRS)
+AC_SUBST(RSAREF_LIBDEP)
# Oracle (default: yes, if $ORACLE_HOME is set)
AC_MSG_CHECKING(for Oracle)
fi])
AC_MSG_RESULT($oracle)
if test "$oracle" != no; then
- SQL_LIBS="-L$oracle/lib -lsql $oracle/lib/osntab.o -lsqlnet -lora -lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcore -lm"
+ AC_MSG_CHECKING(Pro*C version)
+ ORACLE_HOME=$oracle release=`$ORACLE_HOME/bin/proc | awk '/Release/ {print $3;}'`
+ AC_MSG_RESULT($release)
+ case $release in
+ 2.0.6.0.0)
+ SQL_LIBS="-L$oracle/lib -lsql $oracle/lib/osntab.o -lsqlnet -lora -lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcore -lm"
+ ;;
+ *)
+ SQL_LIBS="-L$oracle/lib -lclntsh -lxa -lsql -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 `cat $oracle/rdbms/lib/sysliblist` -lm -lthread"
+ ;;
+ esac
SVRSUBDIRS='$(SVRDIRS)'
- SERVER_OUTPUT_FILES="db/Makefile server/Makefile afssync/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile incremental/Makefile reg_svr/Makefile regtape/Makefile"
+ SERVER_OUTPUT_FILES="db/Makefile server/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile incremental/Makefile reg_svr/Makefile regtape/Makefile"
PRO_C=$oracle/bin/proc
PRO_C_OPTS=CODE=ANSI_C
+ PRO_C_DEFS="DEFINE=_PROC_ $PRO_C_DEFS"
fi
AC_SUBST(PRO_C)
AC_SUBST(PRO_C_DEFS)
AC_SUBST(SQL_LIBS)
AC_SUBST(SVRSUBDIRS)
+# LDAP support
+AC_MSG_CHECKING(for LDAP)
+AC_ARG_WITH(ldap,
+ [ --with-ldap=PREFIX Specify location of LDAP libs (for server)],
+ [ ldap="$withval"],
+ [if test -n "$LDAP_HOME" -a -d "$LDAP_HOME"; then
+ ldap=$LDAP_HOME
+ else
+ ldap=no
+ fi])
+AC_MSG_RESULT($ldap)
+if test "$ldap" != no -a "$oracle" != no; then
+ if test "$ldap" != yes; then
+ LDAP_CPPFLAGS="-I$ldap/include"
+ LDAP_LIBS="-L$ldap/lib"
+ fi
+ MR_DEFINE(HAVE_LDAP)
+
+ WINAD_SUBDIRS="winad"
+ WINAD_OUTPUT_FILES="incremental/winad/Makefile"
+fi
+AC_SUBST(LDAP_CPPFLAGS)
+AC_SUBST(LDAP_LIBS)
+AC_SUBST(WINAD_SUBDIRS)
+
# AFS support
AC_MSG_CHECKING(for AFS)
AC_ARG_WITH(afs,
[AC_MSG_ERROR(AFS libraries not found)],
$AFS_LIBS -lrx -llwp -lsys $AFS_EXTRA_LIBS)
MR_DEFINE(HAVE_AFS)
+
+ AFS_SUBDIRS="afs"
+ AFS_OUTPUT_FILES="incremental/afs/Makefile"
+ if test -d $srcdir/afssync; then
+ AFS_SYNCDIR="afssync"
+ AFS_OUTPUT_FILES="$AFS_OUTPUT_FILES afssync/Makefile"
+ fi
fi
AC_SUBST(AFS_CPPFLAGS)
AC_SUBST(AFS_PRO_C_INCLUDES)
AC_SUBST(AFS_LIBS)
AC_SUBST(AFS_EXTRA_LIBS)
AC_SUBST(AFS_DIR)
+AC_SUBST(AFS_SUBDIRS)
+AC_SUBST(AFS_SYNCDIR)
# GNU readline
AC_CHECKING(for GNU readline...)
AC_ARG_WITH(readline,
[ --with-readline=PREFIX Specify location of GNU readline],
- [readline="$withval"],
- [AC_CHECK_LIB(readline, readline, [readline=yes], :, -ltermcap)])
+ [readline="$withval"; AC_MSG_RESULT($withval)],
+ [AC_CHECK_LIB(readline, readline, [readline=yes],
+ [if test "$athena" = true; then
+ unset ac_cv_lib_readline_readline
+ AC_CHECK_LIB(readline, readline, [readline=/mit/gnu], :,
+ -L/mit/gnu/lib -ltermcap)
+ fi],
+ -ltermcap)])
if test "$readline" != no; then
if test "$readline" != yes; then
- READLINE_CPPFLAGS="-I$readline/include/readline -DHAVE_READLINE"
- READLINE_LIBS="-L$readline/lib -lreadline -ltermcap"
+ READLINE_CPPFLAGS="-I$readline/include"
+ READLINE_LIBS="-L$readline/lib"
fi
+ READLINE_CPPFLAGS="$READLINE_CPPFLAGS -DHAVE_READLINE"
+ READLINE_LIBS="$READLINE_LIBS -lreadline -ltermcap"
fi
AC_SUBST(READLINE_CPPFLAGS)
AC_SUBST(READLINE_LIBS)
AC_TRY_COMPILE([#include <curses.h>],[WINDOW *w; w->_maxx;],
[CURSES_CPPFLAGS="-D'getmaxx(w)=w->_maxx'"],
[CURSES_CPPFLAGS="-D'getmaxx(w)=w->maxx'"]))
+ AC_TRY_LINK([#include <curses.h>],[newterm(NULL, NULL, NULL);],
+ [CURSES_CPPFLAGS="$CURSES_CPPFLAGS -DCURSES_HAS_NEWTERM"])
LIBS=$OLDLIBS
CURSES_CPPFLAGS="-DHAVE_CURSES $CURSES_CPPFLAGS"
CURSES_SUBDIRS='$(CURSES_SUBDIRS)'
AC_SUBST(CURSES_SUBDIRS)
-AC_CHECK_FUNCS(getusershell)
+AC_CHECK_FUNCS(getusershell strlcpy strlcat uname)
+
+AC_CHECK_FUNC(sigaction, AC_DEFINE(HAVE_POSIX_SIGNALS))
-AC_CHECK_HEADER(crypt.h, CRYPT_CPPFLAGS=-DHAVE_CRYPT_H)
-AC_CHECK_FUNC(crypt, :, AC_CHECK_LIB(crypt, crypt, CRYPT_LIBS=-lcrypt))
-AC_SUBST(CRYPT_CPPFLAGS)
-AC_SUBST(CRYPT_LIBS)
+AC_CHECK_HEADERS(unistd.h getopt.h netinet/in.h)
MR_EXTEND(PRO_C_INCLUDES, INCLUDE='$(srcdir)')
MR_INCLUDE('$(SRCTOP)/include')
MR_INCLUDE('$(SRCTOP)/lib')
MR_INCLUDE('$(BUILDTOP)/lib')
MR_INCLUDE('$(BUILDTOP)/db')
+MR_INCLUDE('$(srcdir)')
LDFLAGS="$LDFLAGS -L\$(BUILDTOP)/lib $LIBPATH"
KLIBS="-lzephyr $KRB4_LIBS -lcom_err -lhesiod $LIBS"
LIBS="-lmoira $KLIBS"
AC_SUBST(KLIBS)
+MR_LIBDEP='$(BUILDTOP)/lib/libmoira.a'
+AC_SUBST(MR_LIBDEP)
+
AC_OUTPUT(Makefile lib/Makefile include/Makefile clients/Makefile \
- clients/addusr/Makefile clients/blanche/Makefile \
+ clients/lib/Makefile clients/addusr/Makefile \
+ clients/blanche/Makefile clients/chfn/Makefile \
+ clients/chpobox/Makefile clients/chsh/Makefile \
clients/mailmaint/Makefile clients/moira/Makefile \
clients/mrcheck/Makefile clients/mrtest/Makefile \
- clients/passwd/Makefile clients/userreg/Makefile \
- update/Makefile man/Makefile \
- $SERVER_OUTPUT_FILES $GDSS_OUTPUT_FILES)
+ clients/stella/Makefile update/Makefile man/Makefile \
+ $SERVER_OUTPUT_FILES $WINAD_OUTPUT_FILES $AFS_OUTPUT_FILES \
+ $RSAREF_OUTPUT_FILES)