]> andersk Git - moira.git/commitdiff
Switch from Imake-based build system to autoconf-based.
authordanw <danw>
Tue, 26 May 1998 18:13:21 +0000 (18:13 +0000)
committerdanw <danw>
Tue, 26 May 1998 18:13:21 +0000 (18:13 +0000)
(And fix a few small bugs found on the way)

105 files changed:
Imakefile [deleted file]
Makefile [deleted file]
Makefile.in [new file with mode: 0644]
README
afssync/Imakefile [deleted file]
afssync/Makefile.in [new file with mode: 0644]
backup/Imakefile [deleted file]
backup/Makefile.in [new file with mode: 0644]
clients/Imakefile [deleted file]
clients/Makefile.in [new file with mode: 0644]
clients/addusr/Imakefile [deleted file]
clients/addusr/Makefile.in [new file with mode: 0644]
clients/blanche/Imakefile [deleted file]
clients/blanche/Makefile.in [new file with mode: 0644]
clients/mailmaint/Imakefile [deleted file]
clients/mailmaint/Makefile.in [new file with mode: 0644]
clients/mailmaint/mailmaint.c
clients/moira/Imakefile [deleted file]
clients/moira/Makefile.in [new file with mode: 0644]
clients/moira/delete.c
clients/moira/main.c
clients/moira/menu.c
clients/moira/namespace.c
clients/moira/user.c
clients/mrcheck/Imakefile [deleted file]
clients/mrcheck/Makefile.in [new file with mode: 0644]
clients/mrtest/Imakefile [deleted file]
clients/mrtest/Makefile.in [new file with mode: 0644]
clients/mrtest/mrtest.c
clients/passwd/Imakefile [deleted file]
clients/passwd/Makefile.in [new file with mode: 0644]
clients/passwd/chsh.c
clients/userreg/Imakefile [deleted file]
clients/userreg/Makefile.in [new file with mode: 0644]
clients/userreg/display.c
clients/userreg/reg_stubs.c
clients/userreg/userreg.c
configure [new file with mode: 0755]
configure.in [new file with mode: 0755]
db/Imakefile [deleted file]
db/Makefile.in [new file with mode: 0644]
dbck/Imakefile [deleted file]
dbck/Makefile.in [new file with mode: 0644]
dcm/Imakefile [deleted file]
dcm/Makefile.in [new file with mode: 0644]
gen/Imakefile [deleted file]
gen/Makefile.in [new file with mode: 0644]
include/Imakefile [deleted file]
include/Makefile.in [new file with mode: 0644]
include/moira.h
incremental/Imakefile [deleted file]
incremental/Makefile.in [new file with mode: 0644]
install-sh [new file with mode: 0755]
lib/Imakefile [deleted file]
lib/Makefile.in [new file with mode: 0644]
lib/critical.c
lib/idno.c
lib/mr_connect.c
man/Imakefile [deleted file]
man/Makefile.in [new file with mode: 0644]
man/chfn.1
man/dcm.8
man/moira.3
man/moirad.8
man/mr_do_update.3 [deleted file]
man/mr_set_alternate_input.3 [deleted file]
man/mrtest.8
man/reg_svr.8
man/strsave.3 [deleted file]
mkinstalldirs [new file with mode: 0755]
reg_svr/Imakefile [deleted file]
reg_svr/Makefile.in [new file with mode: 0644]
regtape/Imakefile [deleted file]
regtape/Makefile.in [new file with mode: 0644]
server/Imakefile [deleted file]
server/Makefile.in [new file with mode: 0644]
server/mr_glue.c
update/Imakefile [deleted file]
update/Makefile.in [new file with mode: 0644]
update/update_server.c
update/update_test.c
util/Imakefile [deleted file]
util/et/Makefile.in
util/gdss/Imakefile [deleted file]
util/gdss/Makefile.in [new file with mode: 0644]
util/gdss/lib/Imakefile [deleted file]
util/gdss/lib/Makefile.in [new file with mode: 0644]
util/gdss/lib/crypto/Imakefile [deleted file]
util/gdss/lib/crypto/Makefile.in [new file with mode: 0644]
util/gdss/lib/crypto/algorithm/Imakefile [deleted file]
util/gdss/lib/crypto/algorithm/Makefile.in [new file with mode: 0644]
util/gdss/lib/crypto/algorithm/random.c
util/gdss/lib/crypto/bignum/Imakefile [deleted file]
util/gdss/lib/crypto/bignum/Makefile.in [new file with mode: 0644]
util/gdss/lib/crypto/bignum/c/KerN.c
util/gdss/lib/crypto/crypto_util.c
util/imake.includes/Imake.rules [deleted file]
util/imake.includes/Imake.tmpl [deleted file]
util/imake.includes/Makefile [deleted file]
util/imake.includes/config.Imakefile [deleted file]
util/imake.includes/informix.awk [deleted file]
util/imake.includes/ingres.awk [deleted file]
util/imake.includes/oracle.awk [deleted file]
util/makeconfig [deleted file]
util/makedepend/Imakefile [deleted file]

diff --git a/Imakefile b/Imakefile
deleted file mode 100644 (file)
index 2dc0e93..0000000
--- a/Imakefile
+++ /dev/null
@@ -1,78 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for top level directory.
-#
-
-#define have_subdirs
-CODE=Imakefile
-CLIENTDIRS=util include lib clients man update
-SVRDIRS=db server backup dbck dcm gen reg_svr incremental regtape afssync
-#ifdef SVRBUILD
-SUBDIRS=$(CLIENTDIRS) $(SVRDIRS)
-#else
-SUBDIRS=$(CLIENTDIRS)
-#endif
-
-#ifndef USELOCALTOOLS
-all:: et
-#else
-all:: 
-#endif
-
-#ifndef USELOCALTOOLS
-
-world::
-       make ${MFLAGS} imake
-       make ${MFLAGS} Makefile
-       make ${MFLAGS} Makefiles
-       make ${MFLAGS} depend
-       make ${MFLAGS} all
-
-#else /* USELOCALTOOLS */
-
-world::
-       make ${MFLAGS} Makefile
-       make ${MFLAGS} Makefiles
-       make ${MFLAGS} depend
-       make ${MFLAGS} all
-#endif /* USELOCALTOOLS */
-
-imake::
-       cd util/imake; make 
-
-install::
-       -mkdir ${DESTDIR}
-       -mkdir ${DESTDIR}${USRDIR}
-       -mkdir ${DESTDIR}${ETCDIR}
-       -mkdir ${DESTDIR}${PROGDIR}
-       -mkdir ${DESTDIR}${LIBDIR}
-       -mkdir ${DESTDIR}${LINTLIBDIR}
-       -mkdir ${DESTDIR}${INCLDIR}
-       -mkdir ${DESTDIR}${MANDIR}
-       -mkdir ${DESTDIR}${MANDIR}/man1
-       -mkdir ${DESTDIR}${MANDIR}/man3
-       -mkdir ${DESTDIR}${MANDIR}/man5
-       -mkdir ${DESTDIR}${MANDIR}/man8
-       -mkdir ./bin
-
-#ifndef USELOCALTOOLS
-depend:: makedepend
-#endif
-
-#ifndef USELOCALLIBS
-depend:: et
-
-clean::
-       cd util/et; make clean; cd ../..
-#endif
-
-et:
-       cd util/et; rm -f config.cache; ./configure && make ${MFLAGS} all
-
-makedepend:
-       cd util/makedepend; make
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 207d9c7..0000000
--- a/Makefile
+++ /dev/null
@@ -1,270 +0,0 @@
-# Makefile generated by imake - do not edit!
-# $XConsortium: imake.c,v 1.86 93/10/11 12:12:36 rws Exp $
-
-#
-# This makefile is automatically generated by imake... do not modify
-# or you may lose your changes when imake generates makefiles again.
-# Ignore this message if you are not using imake.
-#
-#      $Source$
-#
-
-NEWTOP=.
-BUILDTOP=.
-
-INCLUDE= -I$(BUILDTOP)/include -I$(BUILDTOP)/lib -I/usr/athena/include \
-       $(SS_INCL)
-CFLAGS=$(DBG) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
-LINTFLAGS=$(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
-
-#      $Source$
-#
-
-CURSES= -L/usr/css/lib -lcurses -ltermcap
-
-OSDEFS= -DPOSIX -DSOLARIS -I/usr/openwin/include
-OSLIBS= -L/usr/ccs/lib -lcurses -ltermcap -lresolv \
-       -lsocket -lnsl -lc /usr/ucblib/libucb.a -lelf -ldl
-CURSES=
-
-GLOBAL_CDEFS= -DHESIOD -DZEPHYR -DGDSS -DATHENA -DDBMS=INGRES -I/usr/athena/include $(OSDEFS)
-
-SRCTOP=/mit/moiradev/src
-
-DESTDIR=
-
-USRDIR= /usr
-ETCDIR= /usr/athena/etc
-PROGDIR=/usr/athena/bin
-LIBDIR= /usr/athena/lib
-LINTLIBDIR = /usr/lib/lint
-INCLDIR= /usr/athena/include
-MANDIR= /usr/athena/man
-
-LZEHPYR=-lzephyr
-
-LIBGDSS= /mit/gdss/`machtype`/libgdss.a
-GDSSINC= -I/mit/gdss/include
-
-LINTLIBFLAG=-C
-
-MR_LIB=$(BUILDTOP)/lib/libmoira.a
-MR_LIBDEP=$(MR_LIB)
-MR_LINTLIB=$(BUILDTOP)/lib/llib-lmoira.ln
-GDB_LIB=$(BUILDTOP)/gdb/libmrgdb.a
-GDB_LIBDEP=$(GDB_LIB)
-GDB_LINTLIB=$(BUILDTOP)/gdb/llib-lmrgdb.ln
-
-COMPILE_ET= compile_et
-
-COM_ERR = -lcom_err
-
-MAKE_COMMANDS= mk_cmds
-
-SS_LIB = -lss
-
-LLIB = -L/usr/athena/lib
-
-CLIBS= $(MR_LIB) $(GDB_LIB) $(LLIB) $(LZEPHYR) $(COM_ERR) -lkrb -ldes -lhesiod
-
-SQL_LIB= /usr/ingres/lib/libingres.a -lm
-
-ARCHIVE= ar cru
-
-RANLIB= /bin/true
-
-INSTALLFILE= install -c -m 444
-
-INSTALLLIB= install -c -m 444
-
-INSTALLPROG= install -c -m 555
-
-INSTALLRAW= install
-
-LD=ld
-
-AS=as
-
-LINT=lint
-
-CC=gcc -traditional
-
-CCRO=$(CC) -R
-
-HCC=$(CC)
-
-CPP=$(CC) -E
-
-DBG=-O
-
-HCFLAGS=$(CFLAGS)
-
-TAGGER=etags
-
-MAKE=make
-RM=rm -f
-MV=mv
-CP=cp
-LN=ln -s
-LPR=lpr -p
-CHMOD=chmod
-AWK=awk
-
-DEPEND=makedepend
-IMAKE=imake -I$(BUILDTOP)/util/imake.includes
-
-#      $Source$
-#
-
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for top level directory.
-#
-
-CODE=Imakefile
-CLIENTDIRS=util include gdb lib clients man update
-SVRDIRS=server db backup dbck dcm gen reg_svr incremental regtape
-
-SUBDIRS=$(CLIENTDIRS)
-
-all::
-
-world::
-       make ${MFLAGS} Makefile
-       make ${MFLAGS} Makefiles
-       make ${MFLAGS} depend
-       make ${MFLAGS} all
-
-imake::
-       cd util/imake; make
-
-install::
-       -mkdir ${DESTDIR}
-       -mkdir ${DESTDIR}${USRDIR}
-       -mkdir ${DESTDIR}${ETCDIR}
-       -mkdir ${DESTDIR}${PROGDIR}
-       -mkdir ${DESTDIR}${LIBDIR}
-       -mkdir ${DESTDIR}${LINTLIBDIR}
-       -mkdir ${DESTDIR}${INCLDIR}
-       -mkdir ${DESTDIR}${MANDIR}
-       -mkdir ${DESTDIR}${MANDIR}/man1
-       -mkdir ${DESTDIR}${MANDIR}/man3
-       -mkdir ${DESTDIR}${MANDIR}/man5
-       -mkdir ${DESTDIR}${MANDIR}/man8
-       -mkdir ./bin
-
-et:
-       cd util/et; make ${MFLAGS} DEPEND="$(BUILDTOP)/../../$(DEPEND)" depend; make ${MFLAGS} all
-
-ss:
-       cd util/ss; make ${MFLAGS} DEPEND="$(BUILDTOP)/../../$(DEPEND)" depend; make ${MFLAGS} all
-
-makedepend:
-       cd util/makedepend; make
-
-all::
-       @for d in  $(SUBDIRS); \
-       do \
-       (cd $$d; echo "### Making" all "in" `pwd`; \
-       $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all ; \
-       echo "### Done with" `pwd`); \
-       done
-
-install::
-       @for d in  $(SUBDIRS); \
-       do \
-       (cd $$d; echo "### Making" install "in" `pwd`; \
-       $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) install ; \
-       echo "### Done with" `pwd`); \
-       done
-
-clean::
-       @for d in  $(SUBDIRS); \
-       do \
-       (cd $$d; echo "### Making" clean "in" `pwd`; \
-       $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) clean ; \
-       echo "### Done with" `pwd`); \
-       done
-
-depend::
-       @for d in  $(SUBDIRS); \
-       do \
-       (cd $$d; echo "### Making" depend "in" `pwd`; \
-       $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) depend ; \
-       echo "### Done with" `pwd`); \
-       done
-
-tags::
-       @for d in  $(SUBDIRS); \
-       do \
-       (cd $$d; echo "### Making" tags "in" `pwd`; \
-       $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) tags ; \
-       echo "### Done with" `pwd`); \
-       done
-
-print::
-       @for d in  $(SUBDIRS); \
-       do \
-       (cd $$d; echo "### Making" print "in" `pwd`; \
-       $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) print ; \
-       echo "### Done with" `pwd`); \
-       done
-
-src::
-       @for d in  $(SUBDIRS); \
-       do \
-       (cd $$d; echo "### Making" src "in" `pwd`; \
-       $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) src ; \
-       echo "### Done with" `pwd`); \
-       done
-
-Makefiles::
-       @echo "### Making Makefiles in" `pwd`
-       @for d in $(SUBDIRS); \
-       do \
-       (cd $$d; echo "### Making Makefile in" `pwd`; \
-       $(MAKE) $(MFLAGS) SRCTOP=$(SRCTOP) \
-       NEWTOP=../$(BUILDTOP) \
-       BUILDTOP=../$(BUILDTOP) \
-       -f ../Makefile \
-       Makefile; \
-       $(MAKE) $(MFLAGS) SRCTOP=$(SRCTOP) \
-       NEWTOP=../$(BUILDTOP) \
-       Makefiles; \
-       echo "### Done with" `pwd`); \
-       done
-
-depend:: $(SRCS)
-       @echo "### Now computing dependencies"
-       @$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)
-
-clean::
-       $(RM) *~ \#* *.bak $(TAGSFILE)
-
-tags::
-       $(TAGGER) *.c *.h
-
-Makefile::
-       -$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
-       $(IMAKE) -DNEW_TOP=$(NEWTOP) -s Makefile
-
-print:: ${CODE}
-       ${LPR} ${CODE}
-
-src:: ${CODE}
-
-${CODE}:
-       $(RM) $@
-       -$(LN) ${SRCDIR}/$@ $@
-
-install::
-
-Makefiles::
-
-# DO NOT DELETE THIS LINE
-
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..3eef838
--- /dev/null
@@ -0,0 +1,35 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+sbindir=@sbindir@
+mandir=@mandir@
+mrbindir=@mrbindir@
+
+CLIENTDIRS=@GDSS_SUBDIR@ include lib clients update man
+SVRDIRS=db server backup dbck dcm gen reg_svr incremental regtape afssync
+DEPDIRS=@COM_ERR_SUBDIR@
+
+SUBDIRS=$(CLIENTDIRS) @SVRSUBDIRS@
+
+world: depend all
+
+all:
+       @for d in $(SUBDIRS); do (echo "### Making $@ in $$d"; cd $$d; $(MAKE) $@) || exit 1; done
+
+clean:
+       @for d in $(SUBDIRS); do (echo "### Making $@ in $$d"; cd $$d; $(MAKE) $@) || exit 1; done
+
+depend:
+       @for d in $(DEPDIRS); do (echo "### Making all in $$d"; cd $$d; $(MAKE) all) || exit 1; done
+       @for d in $(SUBDIRS); do (echo "### Making $@ in $$d"; cd $$d; $(MAKE) $@) || exit 1; done
+
+install:
+       $(srcdir)/mkinstalldirs $(bindir) $(sbindir) $(mrbindir) $(mandir)
+       @for d in $(SUBDIRS); do (echo "### Making $@ in $$d"; cd $$d; $(MAKE) $@) || exit 1; done
diff --git a/README b/README
index 259868312980494a753cd6e527b1ea18559c2553..e7825b20048a6cb1303e6c2c7cb392001bf4cfed 100644 (file)
--- a/README
+++ b/README
@@ -1,46 +1,42 @@
-README file for creating Moira*
+README file for building Moira*
 
 This is the root directory of MIT Athena's Moira service management
 system source code.
 
-The Makefiles are set up so that the source tree can be
-separate from the tree(s) containing binaries.  We have
-found this useful since we have to have separate sets of binaries,
-for different platforms.
-
 Here are the steps for building the Moira source.
 
-1.  Create a directory to hold the tree of object files,
-    say it's /foo/bar/baz.
-
-2.  Cd to that directory and run the command:
-
-       make -f /x/y/z/util/makeconfig SRCDIR=/x/y/z
-
-    where /x/y/z is the root of the source tree (not necessary
-    if the root is /mit/moiradev/src).  This creates the necessary
-    directories and copies Makefiles into them.
-
-3.  Cd to util/imake.includes.  Read through config.Imakefile, turning
-    on appropriate flags for your installation, and setting the paths
-    to your include files, libs, etc for Kerberos, Hesiod and Zephyr.*
-    Note that we are not licensed to distribute gdss, so it is not
-    included in this distribution.  Therefore you will probably not
-    want to define it.
-
-    If you are building the server binaries, uncomment the #define
-    SVRBUILD line, and make sure you have ORACLE_HOME set in your
-    environment.
-
-4.  Cd to include.  Read through moira_site.h adjusting the paths to
+1.  If you want to build in the directory with the sources, run
+       ./configure
+    in that directory. If you want to build in another directory, run
+       /path/to/moira/sources/configure
+    from that directory. Note that for this to work you will need to
+    be using a "make" program that supports VPATH.
+
+    Some options you might want to use:
+        --with-com_err=PREFIX (defaults to util/et)
+        --with-krb4=PREFIX (required)
+        --with-hesiod=PREFIX
+        --with-zephyr=PREFIX
+        --with-gdss=PREFIX (defaults to util/gdss, if present)
+        --with-oracle=PREFIX (defaults to $ORACLE_HOME, if present)
+        --with-afs=PREFIX (defaults to /usr/afsws, if present)
+        --with-readline=PREFIX
+
+    (When building Moira on Athena, you should use the Athena source
+    tree config.site file, either by doing
+        setenv CONFIG_SITE /mit/source/packs/build/config.site
+    before running configure, or by using the Athena build system
+    script /mit/source/packs/build/do.sh.)
+
+2.  cd to include.  Read through moira_site.h adjusting the paths to
     what you want on your system.  Also change the #define of
     MOIRA_SERVER to be the name of the server you are planning on
     using. (Note that this is only used if hesiod lookup fails.)
 
-5.  Still in the top of the object directory (/foo/bar/baz
-    of Step 1), type "make world"
+3.  After configuring, run "make" to build everything. The server-side
+    programs will be built if Oracle was found by configure.
 
-6.  Run "make install".  You may want to check that programs
+4.  Run "make install".  You may want to check that programs
     are installed where you want.  Then add the appropriate
     directories to your PATH environment variable.
 
diff --git a/afssync/Imakefile b/afssync/Imakefile
deleted file mode 100644 (file)
index 738b2fc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-DEFINES= -I$(AFSDIR)/include -I$(AFSDIR)/include/afs -I../include
-ORAINCLUDES= INCLUDE=$(AFSDIR)/include INCLUDE=$(AFSDIR)/include/afs \
-       INCLUDE=$(AFSDIR)/include/rx INCLUDE=../include
-LIBS= -L../lib -L/usr/athena/lib -lmoira -lcom_err -lkrb -ldes ${SQL_LIB}
-
-OBJS= ptutils.o utils.o ubik.o
-SRCS= ptutils.c utils.c ubik.c
-CODE= $(SRCS) sync.pc
-
-AFSDIR = /mit/afsuser
-AFSLIBS=$(AFSDIR)/lib/afs/libprot.a   $(AFSDIR)/lib/afs/libauth.a \
-       $(AFSDIR)/lib/libubik.a       $(AFSDIR)/lib/afs/util.a \
-       $(AFSDIR)/lib/librxkad.a      $(AFSDIR)/lib/afs/libsys.a \
-       $(AFSDIR)/lib/librx.a         $(AFSDIR)/lib/liblwp.a \
-       -lbsd
-
-sqlrule()
-
-genutil(afssync,sync.o $(OBJS),,$(AFSLIBS) $(LIBS))
-genutil(pt_util,pt_util.o $(OBJS),,$(AFSLIBS) -L../lib -L/usr/athena/lib -lcom_err -ldes)
-/* genutil(ptdump,ptdump.o $(OBJS),,) */
-
-sqlfile(sync)
diff --git a/afssync/Makefile.in b/afssync/Makefile.in
new file mode 100644 (file)
index 0000000..58cfbb7
--- /dev/null
@@ -0,0 +1,63 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+AFS_CPPFLAGS=@AFS_CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(AFS_CPPFLAGS) $(CFLAGS) $(DEFS)
+PRO_C=@PRO_C@
+PRO_C_DEFS=@PRO_C_DEFS@
+PRO_C_INCLUDES=@PRO_C_INCLUDES@
+AFS_PRO_C_INCLUDES=@AFS_PRO_C_INCLUDES@
+PRO_C_OPTS=@PRO_C_OPTS@
+PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES) $(AFS_PRO_C_INCLUDES)
+LDFLAGS=@LDFLAGS@
+AFS_LIBS=@AFS_LIBS@
+AFS_EXTRA_LIBS=@AFS_EXTRA_LIBS@
+AFS_DIR=@AFS_DIR@
+SQL_LIBS=@SQL_LIBS@
+LIBS=@LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+SYNC_OBJS=sync.o ptutils.o utils.o ubik.o
+UTIL_OBJS=pt_util.o ptutils.o utils.o ubik.o
+
+CFILES=sync.c
+
+TARGET=afssync pt_util
+
+.SUFFIXES: .pc
+
+.pc.c:
+       $(PRO_C) $(PRO_C_FLAGS) INAME=$<
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(SYNC_OBJS) $(UTIL_OBJS) $(CFILES) $(TARGET)
+
+depend: $(CFILES)
+
+install: all
+       $(INSTALL_PROGRAM) afssync $(mrbindir)
+       $(INSTALL_PROGRAM) pt_util $(mrbindir)
+       $(INSTALL_PROGRAM) $(srcdir)/pt_util.pl $(mrbindir)
+
+afssync: $(SYNC_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(SYNC_OBJS) $(AFS_LIBS) -llwp -lprot $(AFS_EXTRA_LIBS) $(SQL_LIBS) $(LIBS)
+
+pt_util: $(UTIL_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(UTIL_OBJS) $(AFS_LIBS) -llwp -lprot $(AFS_EXTRA_LIBS) $(LIBS)
diff --git a/backup/Imakefile b/backup/Imakefile
deleted file mode 100644 (file)
index 21cba44..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for backup directory.
-#
-
-SRCS= dump_db.h dump_db.c bkup1.c bkup.c dumprest.c rest_db.c rest1.c rest.c
-SRCDIR=${SRCTOP}/backup
-CODE= db2bkup.awk db2rest.awk dump_db.h dump_db.pc dumprest.pc \
-       nightly.sh report.sh rest_db.pc
-BOBJS= dump_db.o bkup1.o bkup.o dumprest.o 
-ROBJS= rest_db.o rest1.o rest.o dumprest.o
-sqlrule()
-
-program(mrbackup, ${BOBJS},${MR_LIBDEP}, ${CLIBS} ${SQL_LIB}, ${PROGDIR})
-program(mrrestore, ${ROBJS},${MR_LIBDEP}, ${CLIBS} ${SQL_LIB}, ${PROGDIR})
-
-bkup.pc: ../db/schema.sql db2bkup.awk
-       awk -f db2bkup.awk < ../db/schema.sql > bkup.pc
-bkup1.pc: bkup.pc
-rest.pc: ../db/schema.sql db2rest.awk
-       awk -f db2rest.awk < ../db/schema.sql > rest.pc
-rest1.pc: rest.pc
-clean::
-       $(RM) bkup.pc bkup1.pc bkup.h rest.pc rest1.pc rest.h
-sqlfile(dump_db)
-sqlfile(rest_db)
-sqlfile(dumprest)
-sqlfile(bkup)
-sqlfile(bkup1)
-sqlfile(rest)
-sqlfile(rest1)
diff --git a/backup/Makefile.in b/backup/Makefile.in
new file mode 100644 (file)
index 0000000..bf8b99e
--- /dev/null
@@ -0,0 +1,63 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+PRO_C=@PRO_C@
+PRO_C_DEFS=@PRO_C_DEFS@
+PRO_C_INCLUDES=@PRO_C_INCLUDES@
+PRO_C_OPTS=@PRO_C_OPTS@
+PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES)
+LDFLAGS=@LDFLAGS@
+LIBS=@SQL_LIBS@ @LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+BOBJS=dump_db.o bkup1.o bkup.o dumprest.o 
+ROBJS=rest_db.o rest1.o rest.o dumprest.o
+
+CFILES=dump_db.c rest_db.c bkup.c bkup1.c rest.c rest1.c dumprest.c
+GENFILES=bkup.pc bkup1.pc bkup.h rest.pc rest1.pc rest.h
+
+TARGET=mrbackup mrrestore
+
+.SUFFIXES: .pc
+
+.pc.c:
+       $(PRO_C) $(PRO_C_FLAGS) INAME=$<
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(BOBJS) $(ROBJS) $(CFILES) $(GENFILES) $(TARGET)
+
+depend: $(GENFILES) $(CFILES)
+
+install: all
+       $(INSTALL_PROGRAM) mrbackup $(mrbindir)
+       $(INSTALL_PROGRAM) mrrestore $(mrbindir)
+
+mrbackup: $(BOBJS)
+       $(CC) -o $@ $(LDFLAGS) $(BOBJS) $(LIBS)
+
+mrrestore: $(ROBJS)
+       $(CC) -o $@ $(LDFLAGS) $(ROBJS) $(LIBS)
+
+bkup.pc bkup1.pc bkup.h: ../db/schema.sql db2bkup.awk
+       awk -f db2bkup.awk < ../db/schema.sql > bkup.pc
+
+rest.pc rest1.pc rest.h: ../db/schema.sql db2rest.awk
+       awk -f db2rest.awk < ../db/schema.sql > rest.pc
diff --git a/clients/Imakefile b/clients/Imakefile
deleted file mode 100644 (file)
index a6263fe..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# $Header$
-
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Intermediate level imakefile for appl directory.
-
-#define have_subdirs
-SUBDIRS=blanche mailmaint moira mrcheck mrtest passwd userreg addusr
-CODE=Imakefile
diff --git a/clients/Makefile.in b/clients/Makefile.in
new file mode 100644 (file)
index 0000000..b9db867
--- /dev/null
@@ -0,0 +1,22 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+
+CURSES_SUBDIRS=mailmaint
+SUBDIRS=addusr blanche moira mrcheck mrtest passwd userreg @CURSES_SUBDIRS@
+
+all:
+       @for d in $(SUBDIRS); do (echo "### Making $@ in clients/$$d"; cd $$d; $(MAKE) $@) || exit 1; done
+
+clean:
+       @for d in $(SUBDIRS); do (echo "### Making $@ in clients/$$d"; cd $$d; $(MAKE) $@) || exit 1; done
+
+depend:
+       @for d in $(SUBDIRS); do (echo "### Making $@ in clients/$$d"; cd $$d; $(MAKE) $@) || exit 1; done
+
+install:
+       @for d in $(SUBDIRS); do (echo "### Making $@ in clients/$$d"; cd $$d; $(MAKE) $@) || exit 1; done
diff --git a/clients/addusr/Imakefile b/clients/addusr/Imakefile
deleted file mode 100644 (file)
index edbcd32..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Header$
-#
-# Copyright 1992 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for addusr.
-#
-
-SRCS=addusr.c
-SRCDIR=${SRCTOP}/clients/addusr
-CODE=${SRCS} Imakefile
-OBJS=addusr.o reg_stubs.o
-
-program(addusr,${OBJS},${MR_LIBDEP}, -lkadm ${CLIBS} ${CRYPT},${PROGDIR})
-
-reg_stubs.c: ../userreg/reg_stubs.c
-       cp ../userreg/reg_stubs.c reg_stubs.c
diff --git a/clients/addusr/Makefile.in b/clients/addusr/Makefile.in
new file mode 100644 (file)
index 0000000..1b63cb9
--- /dev/null
@@ -0,0 +1,44 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=-lkadm @CRYPT_LIBS@ @LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
+OBJS=addusr.o reg_stubs.o
+
+TARGET=addusr
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: depend $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(TARGET) reg_stubs.c
+
+depend: reg_stubs.c
+
+install: all
+       $(INSTALL_PROGRAM) -m 755 addusr $(bindir)
+
+reg_stubs.c: $(SRCTOP)/clients/userreg/reg_stubs.c
+       cp $(SRCTOP)/clients/userreg/reg_stubs.c reg_stubs.c
+
+$(TARGET): $(OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
diff --git a/clients/blanche/Imakefile b/clients/blanche/Imakefile
deleted file mode 100644 (file)
index 871a726..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for blanche.
-#
-
-SRCS=blanche.c
-SRCDIR=${SRCTOP}/clients/blanche
-CODE=${SRCS} Imakefile
-OBJS=blanche.o
-
-program(blanche,${OBJS},${MR_LIBDEP}, ${CLIBS},${PROGDIR})
diff --git a/clients/blanche/Makefile.in b/clients/blanche/Makefile.in
new file mode 100644 (file)
index 0000000..73a0e6c
--- /dev/null
@@ -0,0 +1,41 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
+OBJS=blanche.o
+
+TARGET=blanche
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) blanche $(bindir)
+
+$(TARGET): $(OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
diff --git a/clients/mailmaint/Imakefile b/clients/mailmaint/Imakefile
deleted file mode 100644 (file)
index 97929fc..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for blanche.
-#
-
-SRCS=mailmaint.c
-SRCDIR=${SRCTOP}/clients/mailmaint
-CODE=${SRCS} Imakefile
-OBJS=mailmaint.o
-
-program(mailmaint,${OBJS},${MR_LIBDEP}, ${CLIBS} ${CURSES},${PROGDIR})
diff --git a/clients/mailmaint/Makefile.in b/clients/mailmaint/Makefile.in
new file mode 100644 (file)
index 0000000..58b8251
--- /dev/null
@@ -0,0 +1,41 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@ @CURSES_CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@CURSES_LIBS@ @LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
+OBJS=mailmaint.o
+
+TARGET=mailmaint
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) mailmaint $(bindir)
+
+$(TARGET): $(OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
index 554b1a1c3a52bbc49e7de32504851b54635cdf58..5cbedefee1e2446fa7f3f448149a09b25386aa48 100644 (file)
@@ -14,7 +14,9 @@
 #include <moira_site.h>
 
 #include <ctype.h>
+#ifdef HAVE_CURSES
 #include <curses.h>
+#endif
 #include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -167,33 +169,29 @@ int main(int argc, char *argv[])
       goto punt;
     }
 
-  if (use_menu)
+  initscr();
+  if ((LINES < 24) || (COLS < 60))
     {
-      initscr();
-      if ((LINES < 24) || (COLS < 60))
-       {
-         display_buff("Display window too small.\n\n");
-         sprintf(buf,
-                 "Current window parameters are (%d lines, %d columns)\n",
-                 LINES, COLS);
-         display_buff(buf);
-         display_buff("Please resize your window\n");
-         display_buff("to at least 24 lines and 60 columns.\n");
-         exit(0);
-       }
-      raw();
-      noecho();
-      old_hook = set_com_err_hook(menu_err_hook);
-      position[0] = oldpos[0] = 1;
-      level = 0;
-      pack_main_menu();
-      pack_help_menu();
-      display_menu(main_menu);
-      get_main_input();
-      cls();
-      endwin();
-      set_com_err_hook(old_hook);
+      display_buff("Display window too small.\n\n");
+      sprintf(buf, "Current window parameters are (%d lines, %d columns)\n",
+             LINES, COLS);
+      display_buff(buf);
+      display_buff("Please resize your window\n");
+      display_buff("to at least 24 lines and 60 columns.\n");
+      exit(0);
     }
+  raw();
+  noecho();
+  old_hook = set_com_err_hook(menu_err_hook);
+  position[0] = oldpos[0] = 1;
+  level = 0;
+  pack_main_menu();
+  pack_help_menu();
+  display_menu(main_menu);
+  get_main_input();
+  cls();
+  endwin();
+  set_com_err_hook(old_hook);
   exit(0);
 
 punt:
diff --git a/clients/moira/Imakefile b/clients/moira/Imakefile
deleted file mode 100644 (file)
index f563725..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for moira client.
-#
-
-MSRCS= utils.c attach.c cluster.c delete.c globals.c lists.c main.c \
-       menu.c menus.c nfs.c pobox.c quota.c user.c dcmmaint.c printer.c \
-       misc.c zephyr.c
-SRCS=  ${MSRCS} namespace.c
-SRCDIR=${SRCTOP}/clients/moira
-CODE=${SRCS} Imakefile defs.h f_defs.h globals.h menu.h
-MOBJS= attach.o cluster.o delete.o globals.o lists.o main.o menu.o \
-       menus.o nfs.o pobox.o quota.o user.o utils.o dcmmaint.o printer.o \
-       misc.o zephyr.o
-NOBJS= namespace.o globals.o lists.o menu.o \
-       pobox.o user.o utils.o misc.o
-OBJS=  ${MOBJS} ${NOBJS}
-INCLUDE= -I$(BUILDTOP)/include -I$(BUILDTOP)/lib ${GDSSINC} ${COM_ERR_INC} -I/usr/athena/include -I.
-
-program(moira, ${MOBJS},${MR_LIBDEP}, ${LIBGDSS} ${CLIBS} ${CRYPT} ${CURSES},${PROGDIR})
-program(namespace, ${NOBJS},${MR_LIBDEP}, ${LIBGDSS} ${CLIBS} ${CRYPT} ${CURSES},${PROGDIR})
-
-install::
-       $(RM) $(DESTDIR)$(PROGDIR)/listmaint
-       ln -s moira $(DESTDIR)$(PROGDIR)/listmaint
-       $(RM) $(DESTDIR)$(PROGDIR)/dcmmaint
-       ln -s moira $(DESTDIR)$(PROGDIR)/dcmmaint
-       $(RM) $(DESTDIR)$(PROGDIR)/usermaint
-       ln -s moira $(DESTDIR)$(PROGDIR)/usermaint
-
-depend:: ${CODE}
diff --git a/clients/moira/Makefile.in b/clients/moira/Makefile.in
new file mode 100644 (file)
index 0000000..9d5d16e
--- /dev/null
@@ -0,0 +1,52 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@ @CRYPT_CPPFLAGS@ @CURSES_CPPFLAGS@ @GDSS_CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@CRYPT_LIBS@ @CURSES_LIBS@ @GDSS_LIBS@ @LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
+MOBJS= attach.o cluster.o delete.o globals.o lists.o main.o menu.o \
+       menus.o nfs.o pobox.o quota.o user.o utils.o dcmmaint.o printer.o \
+       misc.o zephyr.o
+NOBJS= namespace.o globals.o lists.o menu.o pobox.o user.o utils.o misc.o
+OBJS=  ${MOBJS} ${NOBJS}
+
+TARGET=moira namespace
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) namespace $(bindir)
+       $(INSTALL_PROGRAM) moira $(bindir)
+       ln -s $(bindir)/listmaint moira
+       ln -s $(bindir)/dcmmaint moira
+       ln -s $(bindir)/usermaint moira
+
+moira: $(MOBJS)
+       $(CC) -o $@ $(LDFLAGS) $(MOBJS) $(LIBS)
+
+namespace: $(NOBJS)
+       $(CC) -o $@ $(LDFLAGS) $(NOBJS) $(LIBS)
index 7e0c4643f94492fef14d1d83c19c77896e659826..7a552d4e93e2cd0290499ce7307ace3ddde38f4c 100644 (file)
@@ -592,11 +592,6 @@ int DeleteList(int argc, char *argv[])
     {
     case MR_SUCCESS:
       break;
-#if 0
-    case MR_NO_WILDCARD:
-      Put_message("Wildcards are not accepted here.");
-      return DM_NORMAL;
-#endif
     case MR_NO_MATCH:
     case MR_LIST:
       Put_message("There is no list that matches that name.");
index f55018b3fee73f7ae69872f20858a5d5046d2435..0252dbf2c641e16adef89fa5b851e7a06baf9f69 100644 (file)
@@ -39,7 +39,9 @@ int interrupt = 0;
 
 extern Menu moira_top_menu, list_menu, user_menu, dcm_menu;
 
+#ifdef HAVE_CURSES
 Bool use_menu = TRUE;          /* whether or not we are using a menu. */
+#endif
 
 /*     Function Name: main
  *     Description: The main driver for the Moira Client.
@@ -79,9 +81,22 @@ void main(int argc, char **argv)
       if (**arg == '-')
        {
          if (!strcmp(*arg, "-nomenu"))
-           use_menu = FALSE;
+           {
+#ifdef HAVE_CURSES
+             use_menu = FALSE;
+#else
+             ;
+#endif
+           }
          else if (!strcmp(*arg, "-menu"))
-           use_menu = TRUE;
+           {
+#ifdef HAVE_CURSES
+             use_menu = TRUE;
+#else
+             fprintf(stderr, "%s: No curses support. -menu option ignored\n",
+                     whoami);
+#endif
+           }
          else if (!strcmp(*arg, "-db"))
            {
              if (arg - argv < argc - 1)
@@ -137,9 +152,11 @@ void main(int argc, char **argv)
   act.sa_handler = Signal_Handler;
   sigaction(SIGHUP, &act, NULL);
   sigaction(SIGQUIT, &act, NULL);
+#ifdef HAVE_CURSES
   if (use_menu)
     sigaction(SIGINT, &act, NULL);
   else
+#endif
     {
       act.sa_handler = CatchInterrupt;
       sigaction(SIGINT, &act, NULL);
@@ -156,6 +173,7 @@ void main(int argc, char **argv)
   else
     menu = &moira_top_menu;
 
+#ifdef HAVE_CURSES
   if (use_menu)                /* Start menus that execute program */
     {
       Start_paging();
@@ -163,6 +181,7 @@ void main(int argc, char **argv)
       Stop_paging();
     }
   else                 /* Start program without menus. */
+#endif
     Start_no_menu(menu);
 
   mr_disconnect();
@@ -205,8 +224,10 @@ static void Usage(void)
 static void Signal_Handler(void)
 {
   Put_message("Signal caught - exiting");
+#ifdef HAVE_CURSES
   if (use_menu)
     Cleanup_menu();
+#endif
   mr_disconnect();
   exit(1);
 }
index ca12c0b87f32396400495d12323c2ef7e9b00e1f..710fd0da52ca3a1afd30a9cbcc9df5fca4b845fc 100644 (file)
@@ -12,7 +12,9 @@
 #include "menu.h"
 
 #include <ctype.h>
+#ifdef HAVE_CURSES
 #include <curses.h>
+#endif
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -35,13 +37,19 @@ int more_flg = 1;
 
 /* Structure for holding current displayed menu */
 struct menu_screen {
+#ifdef HAVE_CURSES
   WINDOW *ms_screen;           /* Window for this menu */
   WINDOW *ms_title;            /* Title subwindow */
   WINDOW *ms_menu;             /* Menu subwindow */
   WINDOW *ms_input;            /* Input subwindow */
+#endif /* HAVE_CURSES */
   int ms_input_y;              /* Input subwindow reference coordinate */
 } *cur_ms;
 
+#ifndef HAVE_CURSES
+int COLS;
+#endif
+
 #define NULLMS ((struct menu_screen *) 0)
 
 Menu *top_menu;                        /* Root for command search */
@@ -86,6 +94,7 @@ void menu_com_err_hook(const char *who, long code, const char *fmt, ...)
   Put_message(buf);
 }
 
+#ifdef HAVE_CURSES
 /*
  * Start_menu takes a menu as an argument.  It initializes curses u.s.w.,
  * and a quit in any submenu should unwind back to here.  (it might not,
@@ -125,16 +134,6 @@ void Cleanup_menu(void)
   endwin();
 }
 
-
-/* Like Start_menu, except it doesn't print menus and doesn't use curses */
-void Start_no_menu(Menu *m)
-{
-  cur_ms = NULLMS;
-  COLS = 80;
-  /* Run the menu */
-  Do_menu(m, -1, NULL);
-}
-
 /*
  * Create a new menu screen template with the specified menu length
  * and return it.
@@ -176,6 +175,16 @@ void destroy_ms(struct menu_screen *ms)
   delwin(ms->ms_screen);
   free(ms);
 }
+#endif /* HAVE_CURSES */
+
+/* Like Start_menu, except it doesn't print menus and doesn't use curses */
+void Start_no_menu(Menu *m)
+{
+  cur_ms = NULLMS;
+  COLS = 80;
+  /* Run the menu */
+  Do_menu(m, -1, NULL);
+}
 
 /*
  * This guy actually puts up the menu
@@ -213,6 +222,7 @@ int Do_menu(Menu *m, int margc, char *margv[])
 
   parsed_argc = 0;
 
+#ifdef HAVE_CURSES
   /* The following get run only in curses mode */
   if (cur_ms != NULLMS)
     {
@@ -253,6 +263,7 @@ int Do_menu(Menu *m, int margc, char *margv[])
       waddstr(my_ms->ms_menu, " q. (quit)         Quit.");
     }
   else
+#endif /* HAVE_CURSES */
     {
       Put_message(m->m_title);
       for (line = 0; line < m->m_length; line++)
@@ -274,12 +285,14 @@ int Do_menu(Menu *m, int margc, char *margv[])
     {
       /* This will be set by a return val from func or submenu */
       quitflag = DM_NORMAL;
+#ifdef HAVE_CURSES
       /* This is here because we may be coming from another menu */
       if (cur_ms != NULL)
        {
          touchwin(my_ms->ms_screen);
          wrefresh(my_ms->ms_screen);
        }
+#endif /* HAVE_CURSES */
       if (margc > 1)
        {
          /* Initialize argv */
@@ -316,11 +329,13 @@ int Do_menu(Menu *m, int margc, char *margv[])
               !strcmp(argv[0], "q") || !strcmp(argv[0], "quit"))
        {
          /* here if it's either return or quit */
+#ifdef HAVE_CURSES
          if (cur_ms != NULLMS)
            {
              cur_ms = old_cur_ms;
              destroy_ms(my_ms);
            }
+#endif /* HAVE_CURSES */
          if (m->m_exit != NULLFUNC)
            m->m_exit(m);
          return *argv[0] == 'r' ? DM_NORMAL : DM_QUIT;
@@ -392,11 +407,13 @@ int Do_menu(Menu *m, int margc, char *margv[])
        }
       if (quitflag == DM_QUIT)
        {
+#ifdef HAVE_CURSES
          if (cur_ms != NULLMS)
            {
              cur_ms = old_cur_ms;
              destroy_ms(my_ms);
            }
+#endif /* HAVE_CURSES */
          if (m->m_exit != NULLFUNC)
            m->m_exit(m);
          parsed_argc = 0;
@@ -409,11 +426,13 @@ int Do_menu(Menu *m, int margc, char *margv[])
 
 void refresh_screen(void)
 {
+#ifdef HAVE_CURSES
   if (cur_ms != NULLMS)
     {
       touchwin(cur_ms->ms_screen);
       refresh_ms(cur_ms);
     }
+#endif /* HAVE_CURSES */
 }
 
 
@@ -424,6 +443,7 @@ int Prompt_input(char *prompt, char *buf, int buflen)
   char *p;
   int y, x, oldx, oldy;
 
+#ifdef HAVE_CURSES
   if (cur_ms != NULLMS)
     {
       more_flg = 1;
@@ -480,11 +500,7 @@ int Prompt_input(char *prompt, char *buf, int buflen)
                      wmove(cur_ms->ms_input, y, 0);
                      wclrtoeol(cur_ms->ms_input);
                      y--;
-#ifdef __NetBSD__
-                     x = cur_ms->ms_input->maxx - 1;
-#else
-                     x = cur_ms->ms_input->_maxx - 1;
-#endif
+                     x = getmaxx(cur_ms->ms_input) - 1;
                    }
                }
              break;
@@ -502,11 +518,7 @@ int Prompt_input(char *prompt, char *buf, int buflen)
                  waddch(cur_ms->ms_input, c);
                  *p++ = c;
                  x++;
-#ifdef __NetBSD__
-                 if (x >= cur_ms->ms_input->maxx)
-#else
-                 if (x >= cur_ms->ms_input->_maxx)
-#endif
+                 if (x >= getmaxx(cur_ms->ms_input))
                    {
                      x = 0;
                      y++;
@@ -528,6 +540,7 @@ int Prompt_input(char *prompt, char *buf, int buflen)
       return 1;
     }
   else
+#endif /* HAVE_CURSES */
     {
       char bigbuf[BUFSIZ];
 
@@ -556,9 +569,11 @@ int lines_left;
    one at the top of the screen when a ---More--- prompt is displayed */
 void Start_paging(void)
 {
+#ifdef HAVE_CURSES
   if (cur_ms != NULLMS)
     lines_left = LINES - cur_ms->ms_input_y - 1;
   else
+#endif /* HAVE_CURSES */
     lines_left = 23;
 }
 
@@ -619,6 +634,7 @@ void Put_line(char *msg)
       if (--lines_left == 0)
        {
          /* Give the user a more prompt */
+#ifdef HAVE_CURSES
          if (cur_ms != NULLMS)
            {
              wstandout(cur_ms->ms_input);
@@ -638,6 +654,7 @@ void Put_line(char *msg)
              wclrtoeol(cur_ms->ms_input);
            }
          else
+#endif /* HAVE_CURSES */
            {
              printf("---More (hit return)---");
              getchar();
@@ -646,6 +663,7 @@ void Put_line(char *msg)
        }
     }
 
+#ifdef HAVE_CURSES
   if (cur_ms != NULLMS)
     {
       msg1 = calloc(COLS, 1);
@@ -655,9 +673,11 @@ void Put_line(char *msg)
       wprintw(cur_ms->ms_input, "%s\n", msg1);
     }
   else
+#endif /* HAVE_CURSES */
     puts(msg);
 }
 
+#ifdef HAVE_CURSES
 /* Refresh a menu_screen onto the real screen */
 void refresh_ms(struct menu_screen *ms)
 {
@@ -665,6 +685,7 @@ void refresh_ms(struct menu_screen *ms)
   wrefresh(ms->ms_menu);
   wrefresh(ms->ms_input);
 }
+#endif /* HAVE_CURSES */
 
 /* Parse buf into a list of words, which will be placed in strings specified by
    argv.  Space for these strings must have already been allocated.
index 080bbc3a218fc34a3de98aa0df181b114fcc0996..5bb6039173da1d743ad241018fdfd37d5484971a 100644 (file)
 #include <signal.h>
 #include <stdio.h>
 #include <string.h>
-#if 0
-#include <pwd.h>
-#include <sys/types.h>
-#endif
 
 #include <krb.h>
 
@@ -164,7 +160,9 @@ Menu namespace_menu = {
   }
 };
 
+#ifdef HAVE_CURSES
 Bool use_menu = TRUE;          /* whether or not we are using a menu. */
+#endif
 
 /*     Function Name: main
  *     Description: The main driver for the Moira Client.
@@ -196,7 +194,22 @@ void main(int argc, char **argv)
       if (**arg == '-')
        {
          if (!strcmp(*arg, "-nomenu"))
-           use_menu = FALSE;
+           {
+#ifdef HAVE_CURSES
+             use_menu = FALSE;
+#else
+             ;
+#endif
+           }
+         else if (!strcmp(*arg, "-menu"))
+           {
+#ifdef HAVE_CURSES
+             use_menu = TRUE;
+#else
+             fprintf(stderr, "%s: No curses support. -menu option ignored\n",
+                     whoami);
+#endif
+           }
          else if (!strcmp(*arg, "-db"))
            if (arg - argv < argc - 1)
              {
@@ -257,9 +270,11 @@ void main(int argc, char **argv)
   act.sa_handler = Signal_Handler;
   sigaction(SIGHUP, &act, NULL);
   sigaction(SIGQUIT, &act, NULL);
+#ifdef HAVE_CURSES
   if (use_menu)
     sigaction(SIGINT, &act, NULL);
   else
+#endif
     {
       act.sa_handler = CatchInterrupt;
       sigaction(SIGINT, &act, NULL);
@@ -267,6 +282,7 @@ void main(int argc, char **argv)
 
   menu = &namespace_menu;
 
+#ifdef HAVE_CURSES
   if (use_menu)                /* Start menus that execute program */
     {
       Start_paging();
@@ -274,6 +290,7 @@ void main(int argc, char **argv)
       Stop_paging();
     }
   else                 /* Start program without menus. */
+#endif
     Start_no_menu(menu);
 
   mr_disconnect();
@@ -315,8 +332,10 @@ static void Usage(void)
 static void Signal_Handler(void)
 {
   Put_message("Signal caught - exiting");
+#ifdef HAVE_CURSES
   if (use_menu)
     Cleanup_menu();
+#endif
   mr_disconnect();
   exit(1);
 }
index 35198931fdddd4e4f04b8802e75a5f890f124bfe..2347cc8dc4712303e3d1556f1216350f415b69bc 100644 (file)
@@ -26,7 +26,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
-#ifdef GDSS
+
+#include <krb.h>
+#ifdef HAVE_GDSS
 #include <gdss.h>
 #endif
 
@@ -105,7 +107,7 @@ static void PrintUserInfo(char **info)
 {
   char name[BUFSIZ], buf[BUFSIZ];
   int status;
-#ifdef GDSS
+#ifdef HAVE_GDSS
   SigInfo si;
 #endif
 
@@ -116,7 +118,7 @@ static void PrintUserInfo(char **info)
          info[U_UID], info[U_SHELL], info[U_CLASS]);
   Put_message(buf);
 
-#ifdef GDSS
+#ifdef HAVE_GDSS
   sprintf(buf, "%s:%s", info[U_NAME], info[U_MITID]);
   si.rawsig = NULL;
   status = GDSS_Verify(buf, strlen(buf), info[U_SIGNATURE], &si);
@@ -200,7 +202,7 @@ void CorrectCapitalization(char **name)
 char **AskUserInfo(char **info, Bool name)
 {
   int i;
-#ifdef GDSS
+#ifdef HAVE_GDSS
   SigInfo si;
 #endif
   char temp_buf[BUFSIZ], *newname;
@@ -306,7 +308,7 @@ char **AskUserInfo(char **info, Bool name)
     }
 
   /* Sign record */
-#ifdef GDSS
+#ifdef HAVE_GDSS
   if (strcmp(info[U_NAME], UNIQUE_LOGIN))
     {
       if (name)
diff --git a/clients/mrcheck/Imakefile b/clients/mrcheck/Imakefile
deleted file mode 100644 (file)
index c379b1b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for mrcheck.
-#
-
-SRCS=mrcheck.c
-SRCDIR=${SRCTOP}/clients/mrcheck
-CODE=${SRCS} Imakefile
-OBJS=mrcheck.o
-
-program(mrcheck,${OBJS},${MR_LIBDEP}, ${CLIBS},${PROGDIR})
diff --git a/clients/mrcheck/Makefile.in b/clients/mrcheck/Makefile.in
new file mode 100644 (file)
index 0000000..eaf597c
--- /dev/null
@@ -0,0 +1,41 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
+OBJS=mrcheck.o
+
+TARGET=mrcheck
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) mrcheck $(bindir)
+
+$(TARGET): $(OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
diff --git a/clients/mrtest/Imakefile b/clients/mrtest/Imakefile
deleted file mode 100644 (file)
index 1c9f0de..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for mrtest.
-#
-
-SRCS=  mrtest.c
-SRCDIR=${SRCTOP}/clients/mrtest
-CODE=${SRCS} Imakefile
-OBJS=  mrtest.o
-LOCAL_INCLUDES= $(READLINE_INCLUDES)
-
-program(mrtest, ${OBJS},${MR_LIBDEP}, ${READLINE_LIBS} ${CLIBS},${ETCDIR})
diff --git a/clients/mrtest/Makefile.in b/clients/mrtest/Makefile.in
new file mode 100644 (file)
index 0000000..bdfa673
--- /dev/null
@@ -0,0 +1,41 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@ @READLINE_CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@READLINE_LIBS@ @LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
+OBJS=mrtest.o
+
+TARGET=mrtest
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) mrtest $(bindir)
+
+$(TARGET): $(OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
index 297c9d16e77214af3b7d4bd83cdc7c231e8b7449..aa5252fe58300894569b45d7cad71ee9a93892f8 100644 (file)
@@ -19,7 +19,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#ifdef USE_READLINE
+#ifdef HAVE_READLINE
 #include "readline.h"
 #include "history.h"
 #endif
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
   initialize_sms_error_table();
   initialize_krb_error_table();
 
-#ifdef USE_READLINE
+#ifdef HAVE_READLINE
   /* we don't want filename completion */
   rl_bind_key('\t', rl_insert);
 #endif
@@ -97,7 +97,7 @@ void discard_input(void)
 char *mr_gets(char *prompt, char *buf, size_t len)
 {
   char *in;
-#ifdef USE_READLINE
+#ifdef HAVE_READLINE
   if (interactive)
     {
       in = readline(prompt);
diff --git a/clients/passwd/Imakefile b/clients/passwd/Imakefile
deleted file mode 100644 (file)
index a3047ff..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for passwd utilities.
-#
-
-SRCS=chfn.c chpobox.c chsh.c
-SRCDIR=${SRCTOP}/clients/passwd
-CODE=${SRCS} Imakefile
-OBJS=chfn.o chpobox.o chsh.o
-
-program(chfn, chfn.o,${MR_LIBDEP}, ${CLIBS},${PROGDIR})
-program(chpobox, chpobox.o,${MR_LIBDEP}, ${CLIBS},${PROGDIR})
-program(chsh, chsh.o,${MR_LIBDEP}, ${CLIBS},${PROGDIR})
diff --git a/clients/passwd/Makefile.in b/clients/passwd/Makefile.in
new file mode 100644 (file)
index 0000000..83345fa
--- /dev/null
@@ -0,0 +1,49 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
+OBJS=chfn.o chpobox.o chsh.o
+
+TARGET=chfn chpobox chsh
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) chfn $(bindir)
+       $(INSTALL_PROGRAM0 chpobox $(bindir)
+       $(INSTALL_PROGRAM) chsh $(bindir)
+
+chfn: chfn.o
+       $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
+
+chpobox: chpobox.o
+       $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
+
+chsh: chsh.o
+       $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
index c308ee4f47268e33453eefc4f620ac85598f2106..8a5e40b5f4576c3f1486b53b2a340e4539e94c82 100644 (file)
@@ -32,7 +32,7 @@ int leave(int status);
 int chsh(char *uname);
 int get_shell(int argc, char **argv, void *uname);
 void check_shell(char *shell);
-#if defined(NEED_GETUSERSHELL) || defined(SOLARIS)
+#ifndef HAVE_GETUSERSHELL
 char *getusershell(void);
 #endif
 
@@ -253,7 +253,7 @@ int usage(void)
   exit(1);
 }
 
-#ifdef NEED_GETUSERSHELL
+#ifndef HAVE_GETUSERSHELL
 char *getusershell(void)
 {
   static int count = 1;
diff --git a/clients/userreg/Imakefile b/clients/userreg/Imakefile
deleted file mode 100644 (file)
index 1de5f39..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for userreg.
-#
-
-SRCS=  disable.c display.c reg_stubs.c userreg.c
-SRCDIR=${SRCTOP}/clients/userreg
-TEXT= welcome network_down username_blurb password_blurb improper_reg \
-       deleted_acct not_allowed
-SCRIPTS= register xregister
-CODE=${SRCS} ${TEXT} ${SCRIPTS} Imakefile files.h userreg.h
-OBJS=  userreg.o display.o reg_stubs.o disable.o
-
-program(userreg, ${OBJS},${MR_LIBDEP}, -lkadm ${CLIBS} ${CRYPT} ${CURSES},${PROGDIR})
-
-depend:: ${CODE}
diff --git a/clients/userreg/Makefile.in b/clients/userreg/Makefile.in
new file mode 100644 (file)
index 0000000..0579ab5
--- /dev/null
@@ -0,0 +1,41 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@ @CRYPT_CPPFLAGS@ @CURSES_CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@CRYPT_LIBS@ @CURSES_LIBS@ -lkadm @LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+
+OBJS=userreg.o display.o reg_stubs.o disable.o
+
+TARGET=userreg
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) userreg $(bindir)
+
+$(TARGET): $(OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
index 4afbbfd8b9569841f835199a31c6c3d00d28e483..b7581230138b6044f58332965c901fffa100863f 100644 (file)
@@ -352,13 +352,13 @@ void display_text_line(char *line)
  */
 void display_text(char *filename, char *string)
 {
-  FILE * fp;
+  FILE *fp;
   char buf[100], buf1[110];
 
   werase(displayw);
-  if (!(fp = fopen (filename, "r")))
+  if (!(fp = fopen(filename, "r")))
     {
-      wprintw (displayw, "Can't open file %s for reading.\n", filename);
+      wprintw(displayw, "Can't open file %s for reading.\n", filename);
       return;
     }
 
index ed0f3b97b5868db4851e9df57533ef09c3b78803..00c6db3fb9f74b7ce9755a1ed137c4400491989a 100644 (file)
 #include <unistd.h>
 
 #include <des.h>
-#include <hesiod.h>
 #include <kadm_err.h>
 #include <krb.h>
+#ifdef HAVE_HESIOD
+#include <hesiod.h>
+#endif
 
 RCSID("$Header$");
 
@@ -67,7 +69,7 @@ int ureg_init(void)
 
   host = NULL;
   host = getenv("REGSERVER");
-#ifdef HESIOD
+#ifdef HAVE_HESIOD
   if (!host || (strlen(host) == 0))
     {
       p = hes_resolve("registration", "sloc");
index 4ee9670504154ccd752562c011ad7bb23bdc2d16..daeb38607784a91510f62258133c08a42013f92f 100644 (file)
@@ -804,10 +804,6 @@ int kinit(char *user, char *passwd)
 }
 
 
-#ifndef _toupper
-#define _toupper(c) ((c) & ~0x20)
-#endif
-
 int lenient_strcmp(char *string1, char *string2)
 {
   /*
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..7631815
--- /dev/null
+++ b/configure
@@ -0,0 +1,2937 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+  --enable-athena         Enable Athena-specific policy decisions"
+ac_help="$ac_help
+  --with-com_err=PREFIX   Specify location of com_err"
+ac_help="$ac_help
+  --with-krb4=PREFIX      Specify location of krb4"
+ac_help="$ac_help
+  --with-hesiod=PREFIX    Specify location of Hesiod"
+ac_help="$ac_help
+  --with-zephyr=PREFIX    Specify location of Zephyr"
+ac_help="$ac_help
+  --with-gdss=PREFIX      Specify location of GDSS"
+ac_help="$ac_help
+  --with-oracle=PREFIX    Specify location of Oracle (for server)"
+ac_help="$ac_help
+  --with-afs=PREFIX       Specify location of AFS libs (for server)"
+ac_help="$ac_help
+  --with-readline=PREFIX  Specify location of GNU readline"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  case "$ac_option" in
+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir="$ac_optarg" ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$ac_optarg" ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file="$ac_optarg" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix="$ac_optarg" ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he)
+    # Omit some internal or obsolete options to make the list less imposing.
+    # This message is too long to be a string in the A/UX 3.1 sh.
+    cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --program-prefix=PREFIX prepend PREFIX to installed program names
+  --program-suffix=SUFFIX append SUFFIX to installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$ac_optarg" ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir="$ac_optarg" ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir="$ac_optarg" ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir="$ac_optarg" ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir="$ac_optarg" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir="$ac_optarg" ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir="$ac_optarg" ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir="$ac_optarg" ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix="$ac_optarg" ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix="$ac_optarg" ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix="$ac_optarg" ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name="$ac_optarg" ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir="$ac_optarg" ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir="$ac_optarg" ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site="$ac_optarg" ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir="$ac_optarg" ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir="$ac_optarg" ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.12"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes="$ac_optarg" ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries="$ac_optarg" ;;
+
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=patchlevel.h
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='       '
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:552: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:581: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  ac_prog_rejected=no
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+       continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:629: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 639 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:668: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:692: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:749: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      for ac_prog in ginstall installbsd scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           # OSF/1 installbsd also uses dspmsg, but is usable.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:801: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:828: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+       @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+if test "$athena" = true; then
+    enable_athena=yes
+    with_readline=/mit/gnu
+    prefix=/afs/athena.mit.edu/system/moira
+    bindir=$prefix/arch/$ATHENA_SYS/bin
+    sbindir=$bindir
+fi
+
+# We currently just don't support changing this
+mrbindir=/moira/bin
+
+
+# Athena-local policy decisions
+echo $ac_n "checking for Athena""... $ac_c" 1>&6
+echo "configure:869: checking for Athena" >&5
+# Check whether --enable-athena or --disable-athena was given.
+if test "${enable_athena+set}" = set; then
+  enableval="$enable_athena"
+  :
+else
+  if test "$athena" = true; then
+           enableval=yes
+       else
+          enableval=no
+       fi
+fi
+
+echo "$ac_t""$enableval" 1>&6
+if test "$enableval" = yes; then
+    
+    cat >> confdefs.h <<\EOF
+#define ATHENA 1
+EOF
+
+    
+    case $PRO_C_DEFS in
+       *DEFINE=ATHENA*) ;;
+       *) PRO_C_DEFS=DEFINE=ATHENA\ $PRO_C_DEFS ;;
+    esac
+
+
+fi
+
+# Networking libraries
+echo "checking network libraries..." 1>&6
+echo "configure:900: checking network libraries..." >&5
+echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:902: checking for gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 907 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gethostbyname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+gethostbyname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_gethostbyname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_gethostbyname=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:948: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 956 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lnsl $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
+echo "configure:993: checking for gethostbyname in -lresolv" >&5
+ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1001 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:1012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lresolv $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+fi
+
+echo $ac_n "checking for socket""... $ac_c" 1>&6
+echo "configure:1044: checking for socket" >&5
+if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1049 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char socket(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char socket();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_socket) || defined (__stub___socket)
+choke me
+#else
+socket();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_socket=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_socket=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
+echo "configure:1090: checking for socket in -lsocket" >&5
+ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1098 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char socket();
+
+int main() {
+socket()
+; return 0; }
+EOF
+if { (eval echo configure:1109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lsocket $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
+echo "configure:1135: checking for socket in -lsocket" >&5
+ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket -lnsl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1143 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char socket();
+
+int main() {
+socket()
+; return 0; }
+EOF
+if { (eval echo configure:1154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="-lsocket -lnsl $LIBS"
+else
+  echo "$ac_t""no" 1>&6
+:
+fi
+
+fi
+
+fi
+
+
+# com_err (required, but can be built)
+echo $ac_n "checking for com_err""... $ac_c" 1>&6
+echo "configure:1182: checking for com_err" >&5
+# Check whether --with-com_err or --without-com_err was given.
+if test "${with_com_err+set}" = set; then
+  withval="$with_com_err"
+  echo "$ac_t""$withval" 1>&6
+     if test $withval = "no"; then
+         { echo "configure: error: com_err is required for Moira" 1>&2; exit 1; }
+     fi
+     if test $withval != "yes"; then
+        
+    
+    case $CPPFLAGS in
+       *-I$withval/include*) ;;
+       *) CPPFLAGS=-I$withval/include\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE=$withval/include*) ;;
+       *) PRO_C_INCLUDES=INCLUDE=$withval/include\ $PRO_C_INCLUDES ;;
+    esac
+
+
+        
+    case $LIBPATH in
+       *-L$withval/lib*) ;;
+       *) LIBPATH=-L$withval/lib\ $LIBPATH ;;
+    esac
+
+     fi
+     COMPILE_ET=compile_et
+else
+  echo "$ac_t""util/et" 1>&6
+     COM_ERR_SUBDIR=util/et;
+     
+    
+    case $CPPFLAGS in
+       *-I`pwd`/util/et*) ;;
+       *) CPPFLAGS=-I`pwd`/util/et\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE=`pwd`/util/et*) ;;
+       *) PRO_C_INCLUDES=INCLUDE=`pwd`/util/et\ $PRO_C_INCLUDES ;;
+    esac
+
+
+     
+    case $LIBPATH in
+       *-L`pwd`/util/et*) ;;
+       *) LIBPATH=-L`pwd`/util/et\ $LIBPATH ;;
+    esac
+
+     COMPILE_ET=`pwd`/util/et/compile_et
+     subdirs="$COM_ERR_SUBDIR"
+
+fi
+
+
+
+
+# Kerberos (required)
+echo $ac_n "checking for Kerberos 4""... $ac_c" 1>&6
+echo "configure:1246: checking for Kerberos 4" >&5
+# Check whether --with-krb4 or --without-krb4 was given.
+if test "${with_krb4+set}" = set; then
+  withval="$with_krb4"
+  krb4="$withval"
+else
+  krb4=no
+fi
+
+echo "$ac_t""$krb4" 1>&6
+if test $krb4 = "no"; then
+    { echo "configure: error: Kerberos is required for Moira" 1>&2; exit 1; }
+fi
+if test "$krb4" != yes; then
+    
+    
+    case $CPPFLAGS in
+       *-I$krb4/include*) ;;
+       *) CPPFLAGS=-I$krb4/include\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE=$krb4/include*) ;;
+       *) PRO_C_INCLUDES=INCLUDE=$krb4/include\ $PRO_C_INCLUDES ;;
+    esac
+
+
+    if test -d "$krb4/include/kerberosIV"; then
+       
+    
+    case $CPPFLAGS in
+       *-I$krb4/include/kerberosIV*) ;;
+       *) CPPFLAGS=-I$krb4/include/kerberosIV\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE=$krb4/include/kerberosIV*) ;;
+       *) PRO_C_INCLUDES=INCLUDE=$krb4/include/kerberosIV\ $PRO_C_INCLUDES ;;
+    esac
+
+
+    fi
+    
+    case $LIBPATH in
+       *-L$krb4/lib*) ;;
+       *) LIBPATH=-L$krb4/lib\ $LIBPATH ;;
+    esac
+
+elif test -d /usr/include/kerberosIV; then
+    
+    
+    case $CPPFLAGS in
+       *-I/usr/include/kerberosIV*) ;;
+       *) CPPFLAGS=-I/usr/include/kerberosIV\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE=/usr/include/kerberosIV*) ;;
+       *) PRO_C_INCLUDES=INCLUDE=/usr/include/kerberosIV\ $PRO_C_INCLUDES ;;
+    esac
+
+
+fi
+echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6
+echo "configure:1313: checking for krb_rd_req in -lkrb4" >&5
+ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lkrb4 $LIBPATH -ldes425 -lkrb5 -lcrypto $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1321 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char krb_rd_req();
+
+int main() {
+krb_rd_req()
+; return 0; }
+EOF
+if { (eval echo configure:1332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6
+echo "configure:1351: checking for krb_rd_req in -lkrb" >&5
+ac_lib_var=`echo krb'_'krb_rd_req | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lkrb $LIBPATH -ldes $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1359 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char krb_rd_req();
+
+int main() {
+krb_rd_req()
+; return 0; }
+EOF
+if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  KRB4_LIBS="-lkrb -ldes"
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Kerberos 4 libraries not found" 1>&2; exit 1; }
+fi
+
+fi
+
+
+# Hesiod support
+echo $ac_n "checking for Hesiod""... $ac_c" 1>&6
+echo "configure:1396: checking for Hesiod" >&5
+# Check whether --with-hesiod or --without-hesiod was given.
+if test "${with_hesiod+set}" = set; then
+  withval="$with_hesiod"
+  hesiod="$withval"
+else
+  hesiod=no
+fi
+
+echo "$ac_t""$hesiod" 1>&6
+if test "$hesiod" != no; then
+    if test "$hesiod" != yes; then
+       
+    
+    case $CPPFLAGS in
+       *-I$hesiod/include*) ;;
+       *) CPPFLAGS=-I$hesiod/include\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE=$hesiod/include*) ;;
+       *) PRO_C_INCLUDES=INCLUDE=$hesiod/include\ $PRO_C_INCLUDES ;;
+    esac
+
+
+       
+    case $LIBPATH in
+       *-L$hesiod/lib*) ;;
+       *) LIBPATH=-L$hesiod/lib\ $LIBPATH ;;
+    esac
+
+    fi
+    echo $ac_n "checking for res_send""... $ac_c" 1>&6
+echo "configure:1430: checking for res_send" >&5
+if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1435 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char res_send(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char res_send();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_res_send) || defined (__stub___res_send)
+choke me
+#else
+res_send();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_res_send=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_res_send=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
+echo "configure:1476: checking for res_send in -lresolv" >&5
+ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1484 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char res_send();
+
+int main() {
+res_send()
+; return 0; }
+EOF
+if { (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lresolv $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+    echo $ac_n "checking for hes_resolve in -lhesiod""... $ac_c" 1>&6
+echo "configure:1525: checking for hes_resolve in -lhesiod" >&5
+ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lhesiod $LIBPATH $LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1533 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char hes_resolve();
+
+int main() {
+hes_resolve()
+; return 0; }
+EOF
+if { (eval echo configure:1544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Hesiod library not found" 1>&2; exit 1; }
+fi
+
+    
+    cat >> confdefs.h <<\EOF
+#define HAVE_HESIOD 1
+EOF
+
+    
+    case $PRO_C_DEFS in
+       *DEFINE=HAVE_HESIOD*) ;;
+       *) PRO_C_DEFS=DEFINE=HAVE_HESIOD\ $PRO_C_DEFS ;;
+    esac
+
+
+fi
+
+# Zephyr support
+echo $ac_n "checking for Zephyr""... $ac_c" 1>&6
+echo "configure:1581: checking for Zephyr" >&5
+# Check whether --with-zephyr or --without-zephyr was given.
+if test "${with_zephyr+set}" = set; then
+  withval="$with_zephyr"
+  zephyr="$withval"
+else
+  zephyr=no
+fi
+
+echo "$ac_t""$zephyr" 1>&6
+if test "$zephyr" != no; then
+    if test "$zephyr" != yes; then
+       
+    
+    case $CPPFLAGS in
+       *-I$zephyr/include*) ;;
+       *) CPPFLAGS=-I$zephyr/include\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE=$zephyr/include*) ;;
+       *) PRO_C_INCLUDES=INCLUDE=$zephyr/include\ $PRO_C_INCLUDES ;;
+    esac
+
+
+       
+    case $LIBPATH in
+       *-L$zephyr/lib*) ;;
+       *) LIBPATH=-L$zephyr/lib\ $LIBPATH ;;
+    esac
+
+    fi
+    echo $ac_n "checking for ZInitialize in -lzephyr""... $ac_c" 1>&6
+echo "configure:1615: checking for ZInitialize in -lzephyr" >&5
+ac_lib_var=`echo zephyr'_'ZInitialize | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lzephyr $LIBPATH $KRB4_LIBS -lcom_err $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1623 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char ZInitialize();
+
+int main() {
+ZInitialize()
+; return 0; }
+EOF
+if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Zephyr library not found" 1>&2; exit 1; }
+fi
+
+    
+    cat >> confdefs.h <<\EOF
+#define HAVE_ZEPHYR 1
+EOF
+
+    
+    case $PRO_C_DEFS in
+       *DEFINE=HAVE_ZEPHYR*) ;;
+       *) PRO_C_DEFS=DEFINE=HAVE_ZEPHYR\ $PRO_C_DEFS ;;
+    esac
+
+
+fi
+
+# GDSS support (default: build util/gdss if present)
+echo $ac_n "checking for GDSS""... $ac_c" 1>&6
+echo "configure:1671: checking for GDSS" >&5
+# Check whether --with-gdss or --without-gdss was given.
+if test "${with_gdss+set}" = set; then
+  withval="$with_gdss"
+  gdss="$withval"
+     GDSS_CPPFLAGS="-I$gdss/include"
+     GDSS_LIBS="-L$gdss/lib -lgdss"
+else
+  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
+        if test ! -d util; then
+            mkdir util
+        fi
+        GDSS_CPPFLGAS="-I$gdss/include"
+        GDSS_LIBS='-L$(BUILDTOP)/util/gdss/lib -lgdss'
+     else
+         gdss=no
+     fi
+fi
+
+echo "$ac_t""$gdss" 1>&6
+if test "$gdss" != no; then
+    GDSS_OBJS='$(GDSS_OBJS)'
+    GDSS_CFILES='$(GDSS_CFILES)'
+    GDSS_TARGET='$(GDSS_TARGET)'
+    
+    cat >> confdefs.h <<\EOF
+#define HAVE_GDSS 1
+EOF
+
+    
+    case $PRO_C_DEFS in
+       *DEFINE=HAVE_GDSS*) ;;
+       *) PRO_C_DEFS=DEFINE=HAVE_GDSS\ $PRO_C_DEFS ;;
+    esac
+
+
+fi
+
+
+
+
+
+
+
+# Oracle (default: yes, if /usr/oracle is present)
+echo $ac_n "checking for Oracle""... $ac_c" 1>&6
+echo "configure:1723: checking for Oracle" >&5
+# Check whether --with-oracle or --without-oracle was given.
+if test "${with_oracle+set}" = set; then
+  withval="$with_oracle"
+  oracle="$withval"
+else
+  if test -d /usr/oracle; then
+         oracle=/usr/oracle
+     else
+        oracle=no
+     fi
+fi
+
+echo "$ac_t""$oracle" 1>&6
+if test "$oracle" != no; then
+    SQL_LIBS="-L$oracle/lib -lsql $oracle/lib/osntab.o -lsqlnet -lora -lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcore -lm"
+    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"
+    PRO_C=$oracle/bin/proc
+    PRO_C_OPTS=CODE=ANSI_C
+fi
+
+
+
+
+
+
+
+# AFS support
+echo $ac_n "checking for AFS""... $ac_c" 1>&6
+echo "configure:1753: checking for AFS" >&5
+# Check whether --with-afs or --without-afs was given.
+if test "${with_afs+set}" = set; then
+  withval="$with_afs"
+  afs="$withval"
+else
+  afs=no
+fi
+
+echo "$ac_t""$afs" 1>&6
+if test "$afs" != no -a "$oracle" != no; then
+    if test "$afs" != yes; then
+       AFS_CPPFLAGS="-I$afs/include -I$afs/include/afs -I$afs/include/rx"
+       AFS_PRO_C_INCLUDES="INCLUDE=$afs/include INCLUDE=$afs/include/afs INCLUDE=$afs/include/rx"
+       AFS_LIBS="-L$afs/lib -L$afs/lib/afs"
+       AFS_DIR=$afs
+    fi
+    echo $ac_n "checking for insque""... $ac_c" 1>&6
+echo "configure:1771: checking for insque" >&5
+if eval "test \"`echo '$''{'ac_cv_func_insque'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1776 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char insque(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char insque();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_insque) || defined (__stub___insque)
+choke me
+#else
+insque();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_insque=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_insque=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'insque`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for insque in -lcompat""... $ac_c" 1>&6
+echo "configure:1817: checking for insque in -lcompat" >&5
+ac_lib_var=`echo compat'_'insque | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lcompat  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1825 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char insque();
+
+int main() {
+insque()
+; return 0; }
+EOF
+if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  AFS_EXTRA_LIBS="-lcompat"
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: insque not found" 1>&2; exit 1; }
+fi
+
+fi
+
+    echo $ac_n "checking for sigvec""... $ac_c" 1>&6
+echo "configure:1860: checking for sigvec" >&5
+if eval "test \"`echo '$''{'ac_cv_func_sigvec'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1865 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char sigvec(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char sigvec();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_sigvec) || defined (__stub___sigvec)
+choke me
+#else
+sigvec();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_sigvec=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_sigvec=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'sigvec`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for sigvec in -lucb""... $ac_c" 1>&6
+echo "configure:1906: checking for sigvec in -lucb" >&5
+ac_lib_var=`echo ucb'_'sigvec | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lucb -L/usr/ucblib $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1914 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char sigvec();
+
+int main() {
+sigvec()
+; return 0; }
+EOF
+if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  AFS_EXTRA_LIBS="$AFS_EXTRA_LIBS -L/usr/ucblib -lc -lucb"
+else
+  echo "$ac_t""no" 1>&6
+:
+fi
+
+fi
+
+    echo $ac_n "checking for pioctl in -lsys""... $ac_c" 1>&6
+echo "configure:1949: checking for pioctl in -lsys" >&5
+ac_lib_var=`echo sys'_'pioctl | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsys $AFS_LIBS -lrx -llwp -lsys $AFS_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1957 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char pioctl();
+
+int main() {
+pioctl()
+; return 0; }
+EOF
+if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: AFS libraries not found" 1>&2; exit 1; }
+fi
+
+    
+    cat >> confdefs.h <<\EOF
+#define HAVE_AFS 1
+EOF
+
+    
+    case $PRO_C_DEFS in
+       *DEFINE=HAVE_AFS*) ;;
+       *) PRO_C_DEFS=DEFINE=HAVE_AFS\ $PRO_C_DEFS ;;
+    esac
+
+
+fi
+
+
+
+
+
+
+# GNU readline
+echo "checking for GNU readline..." 1>&6
+echo "configure:2010: checking for GNU readline..." >&5
+# Check whether --with-readline or --without-readline was given.
+if test "${with_readline+set}" = set; then
+  withval="$with_readline"
+  readline="$withval"
+else
+  echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
+echo "configure:2017: checking for readline in -lreadline" >&5
+ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lreadline -ltermcap $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2025 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char readline();
+
+int main() {
+readline()
+; return 0; }
+EOF
+if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  readline=yes
+else
+  echo "$ac_t""no" 1>&6
+:
+fi
+
+fi
+
+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"
+    fi
+fi
+
+
+
+# Curses
+curses=curses
+echo "checking for curses" 1>&6
+echo "configure:2071: checking for curses" >&5
+echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
+echo "configure:2073: checking for main in -lcurses" >&5
+ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lcurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2081 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6
+echo "configure:2107: checking for main in -lncurses" >&5
+ac_lib_var=`echo ncurses'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lncurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2115 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  curses=ncurses
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+if test -n "$curses"; then
+    OLDLIBS=$LIBS
+    LIBS=-l$curses
+    echo "checking if curses needs termcap" 1>&6
+echo "configure:2148: checking if curses needs termcap" >&5
+                if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2153 "configure"
+#include "confdefs.h"
+#include <curses.h>
+               main(int argc, char **argv)
+               {
+                   initscr();
+                   endwin();
+                   return 0;
+               }
+EOF
+if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+  CURSES_LIBS="-l$curses"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  LIBS="-l$curses -ltermcap"
+               if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2175 "configure"
+#include "confdefs.h"
+#include <curses.h>
+                           main(int argc, char **argv)
+                           {
+                               initscr();
+                               endwin();
+                               return 0;
+                           }
+EOF
+if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+  CURSES_LIBS="-l$curses -ltermcap"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  :
+fi
+rm -fr conftest*
+fi
+
+fi
+rm -fr conftest*
+fi
+
+    LIBS=$OLDLIBS
+fi
+if test -n "$CURSES_LIBS"; then
+    OLDLIBS=$LIBS
+    LIBS=$CURSES_LIBS
+    cat > conftest.$ac_ext <<EOF
+#line 2207 "configure"
+#include "confdefs.h"
+#include <curses.h>
+int main() {
+WINDOW *w; getmaxx(w);
+; return 0; }
+EOF
+if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cat > conftest.$ac_ext <<EOF
+#line 2222 "configure"
+#include "confdefs.h"
+#include <curses.h>
+int main() {
+WINDOW *w; w->_maxx;
+; return 0; }
+EOF
+if { (eval echo configure:2229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  CURSES_CPPFLAGS="-D'getmaxx(w)=w->_maxx'"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CURSES_CPPFLAGS="-D'getmaxx(w)=w->maxx'"
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+    LIBS=$OLDLIBS
+    CURSES_CPPFLAGS="-DHAVE_CURSES $CURSES_CPPFLAGS"
+    CURSES_SUBDIRS='$(CURSES_SUBDIRS)'
+else
+    echo "configure: warning: Couldn't find -lcurses" 1>&2
+fi
+
+
+
+
+
+for ac_func in getusershell
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2255: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2260 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:2309: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 2324 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 2341 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+ac_safe=`echo "crypt.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for crypt.h""... $ac_c" 1>&6
+echo "configure:2371: checking for crypt.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2376 "configure"
+#include "confdefs.h"
+#include <crypt.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  CRYPT_CPPFLAGS=-DHAVE_CRYPT_H
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for crypt""... $ac_c" 1>&6
+echo "configure:2403: checking for crypt" >&5
+if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2408 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char crypt(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char crypt();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_crypt) || defined (__stub___crypt)
+choke me
+#else
+crypt();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_crypt=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_crypt=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
+echo "configure:2449: checking for crypt in -lcrypt" >&5
+ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lcrypt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2457 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char crypt();
+
+int main() {
+crypt()
+; return 0; }
+EOF
+if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  CRYPT_LIBS=-lcrypt
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
+
+
+
+    
+    case $CPPFLAGS in
+       *-I'$(SRCTOP)/include'*) ;;
+       *) CPPFLAGS=-I'$(SRCTOP)/include'\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE='$(SRCTOP)/include'*) ;;
+       *) PRO_C_INCLUDES=INCLUDE='$(SRCTOP)/include'\ $PRO_C_INCLUDES ;;
+    esac
+
+
+
+    
+    case $CPPFLAGS in
+       *-I'$(BUILDTOP)/lib'*) ;;
+       *) CPPFLAGS=-I'$(BUILDTOP)/lib'\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE='$(BUILDTOP)/lib'*) ;;
+       *) PRO_C_INCLUDES=INCLUDE='$(BUILDTOP)/lib'\ $PRO_C_INCLUDES ;;
+    esac
+
+
+
+    
+    case $CPPFLAGS in
+       *-I'$(BUILDTOP)/db'*) ;;
+       *) CPPFLAGS=-I'$(BUILDTOP)/db'\ $CPPFLAGS ;;
+    esac
+
+    
+    case $PRO_C_INCLUDES in
+       *INCLUDE='$(BUILDTOP)/db'*) ;;
+       *) PRO_C_INCLUDES=INCLUDE='$(BUILDTOP)/db'\ $PRO_C_INCLUDES ;;
+    esac
+
+
+LDFLAGS="$LDFLAGS -L\$(BUILDTOP)/lib $LIBPATH"
+KLIBS="-lzephyr $KRB4_LIBS -lcom_err -lhesiod $LIBS"
+LIBS="-lmoira $KLIBS"
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[    `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.12"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile lib/Makefile include/Makefile clients/Makefile \
+         clients/addusr/Makefile clients/blanche/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" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@RANLIB@%$RANLIB%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@mrbindir@%$mrbindir%g
+s%@subdirs@%$subdirs%g
+s%@COM_ERR_SUBDIR@%$COM_ERR_SUBDIR%g
+s%@COMPILE_ET@%$COMPILE_ET%g
+s%@GDSS_CPPFLAGS@%$GDSS_CPPFLAGS%g
+s%@GDSS_LIBS@%$GDSS_LIBS%g
+s%@GDSS_SUBDIR@%$GDSS_SUBDIR%g
+s%@GDSS_OBJS@%$GDSS_OBJS%g
+s%@GDSS_CFILES@%$GDSS_CFILES%g
+s%@GDSS_TARGET@%$GDSS_TARGET%g
+s%@PRO_C@%$PRO_C%g
+s%@PRO_C_DEFS@%$PRO_C_DEFS%g
+s%@PRO_C_INCLUDES@%$PRO_C_INCLUDES%g
+s%@PRO_C_OPTS@%$PRO_C_OPTS%g
+s%@SQL_LIBS@%$SQL_LIBS%g
+s%@SVRSUBDIRS@%$SVRSUBDIRS%g
+s%@AFS_CPPFLAGS@%$AFS_CPPFLAGS%g
+s%@AFS_PRO_C_INCLUDES@%$AFS_PRO_C_INCLUDES%g
+s%@AFS_LIBS@%$AFS_LIBS%g
+s%@AFS_EXTRA_LIBS@%$AFS_EXTRA_LIBS%g
+s%@AFS_DIR@%$AFS_DIR%g
+s%@READLINE_CPPFLAGS@%$READLINE_CPPFLAGS%g
+s%@READLINE_LIBS@%$READLINE_LIBS%g
+s%@CURSES_CPPFLAGS@%$CURSES_CPPFLAGS%g
+s%@CURSES_LIBS@%$CURSES_LIBS%g
+s%@CURSES_SUBDIRS@%$CURSES_SUBDIRS%g
+s%@CPP@%$CPP%g
+s%@CRYPT_CPPFLAGS@%$CRYPT_CPPFLAGS%g
+s%@CRYPT_LIBS@%$CRYPT_LIBS%g
+s%@KLIBS@%$KLIBS%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile include/Makefile clients/Makefile \
+         clients/addusr/Makefile clients/blanche/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"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+if test "$no_recursion" != yes; then
+
+  # Remove --cache-file and --srcdir arguments so they do not pile up.
+  ac_sub_configure_args=
+  ac_prev=
+  for ac_arg in $ac_configure_args; do
+    if test -n "$ac_prev"; then
+      ac_prev=
+      continue
+    fi
+    case "$ac_arg" in
+    -cache-file | --cache-file | --cache-fil | --cache-fi \
+    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+      ac_prev=cache_file ;;
+    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+      ;;
+    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+      ac_prev=srcdir ;;
+    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+      ;;
+    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+    esac
+  done
+
+  for ac_config_dir in $COM_ERR_SUBDIR; do
+
+    # Do not complain, so a configure script can configure whichever
+    # parts of a large source tree are present.
+    if test ! -d $srcdir/$ac_config_dir; then
+      continue
+    fi
+
+    echo configuring in $ac_config_dir
+
+    case "$srcdir" in
+    .) ;;
+    *)
+      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
+      else
+        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
+      fi
+      ;;
+    esac
+
+    ac_popdir=`pwd`
+    cd $ac_config_dir
+
+      # A "../" for each directory in /$ac_config_dir.
+      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+
+    case "$srcdir" in
+    .) # No --srcdir option.  We are building in place.
+      ac_sub_srcdir=$srcdir ;;
+    /*) # Absolute path.
+      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
+    *) # Relative path.
+      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
+    esac
+
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_sub_srcdir/configure; then
+      ac_sub_configure=$ac_sub_srcdir/configure
+    elif test -f $ac_sub_srcdir/configure.in; then
+      ac_sub_configure=$ac_configure
+    else
+      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
+      ac_sub_configure=
+    fi
+
+    # The recursion is here.
+    if test -n "$ac_sub_configure"; then
+
+      # Make the cache file name correct relative to the subdirectory.
+      case "$cache_file" in
+      /*) ac_sub_cache_file=$cache_file ;;
+      *) # Relative path.
+        ac_sub_cache_file="$ac_dots$cache_file" ;;
+      esac
+  case "$ac_given_INSTALL" in
+        [/$]*) INSTALL="$ac_given_INSTALL" ;;
+        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+        esac
+
+      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+      # The eval makes quoting arguments work.
+      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
+      then :
+      else
+        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
+      fi
+    fi
+
+    cd $ac_popdir
+  done
+fi
+
diff --git a/configure.in b/configure.in
new file mode 100755 (executable)
index 0000000..cde9239
--- /dev/null
@@ -0,0 +1,330 @@
+AC_INIT(patchlevel.h)
+
+dnl On Athena at least, many of the packages (krb, zephyr, hesiod, etc)
+dnl will all be in /usr/athena... this hack lets us not end up with 10
+dnl copies of -I/usr/athena/include -L/usr/athena/lib in our command lines
+AC_DEFUN(MR_EXTEND, [
+    case $$1 in
+       *$2*) ;;
+       *) $1=$2\ $$1 ;;
+    esac
+])
+
+dnl Define for both C and Pro*C
+AC_DEFUN(MR_DEFINE, [
+    AC_DEFINE($1)
+    MR_EXTEND(PRO_C_DEFS, DEFINE=$1)
+])
+
+dnl Add to include path for both C and Pro*C
+AC_DEFUN(MR_INCLUDE, [
+    MR_EXTEND(CPPFLAGS, -I$1)
+    MR_EXTEND(PRO_C_INCLUDES, INCLUDE=$1)
+]) 
+
+dnl Add to lib path
+AC_DEFUN(MR_LIBS, [MR_EXTEND(LIBPATH, -L$1)])
+
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+AC_PROG_MAKE_SET
+
+if test "$athena" = true; then
+    enable_athena=yes
+    with_readline=/mit/gnu
+    prefix=/afs/athena.mit.edu/system/moira
+    bindir=$prefix/arch/$ATHENA_SYS/bin
+    sbindir=$bindir
+fi
+
+# We currently just don't support changing this
+mrbindir=/moira/bin
+AC_SUBST(mrbindir)
+
+# Athena-local policy decisions
+AC_MSG_CHECKING(for Athena)
+AC_ARG_ENABLE(athena,
+    [  --enable-athena         Enable Athena-specific policy decisions],
+    , [if test "$athena" = true; then
+           enableval=yes
+       else
+          enableval=no
+       fi])
+AC_MSG_RESULT($enableval)
+if test "$enableval" = yes; then
+    MR_DEFINE(ATHENA)
+fi
+
+# Networking libraries
+AC_CHECKING(network libraries...)
+AC_CHECK_FUNC(gethostbyname, :,
+             AC_CHECK_LIB(nsl, gethostbyname, ,
+                          AC_CHECK_LIB(resolv, gethostbyname)))
+AC_CHECK_FUNC(socket, :,
+             AC_CHECK_LIB(socket, socket, ,
+                          AC_CHECK_LIB(socket, socket,
+                                       LIBS="-lsocket -lnsl $LIBS", :,
+                                       -lnsl)))
+
+# com_err (required, but can be built)
+AC_MSG_CHECKING(for com_err)
+AC_ARG_WITH(com_err,
+    [  --with-com_err=PREFIX   Specify location of com_err],
+    [AC_MSG_RESULT($withval)
+     if test $withval = "no"; then
+         AC_MSG_ERROR(com_err is required for Moira)
+     fi
+     if test $withval != "yes"; then
+        MR_INCLUDE($withval/include)
+        MR_LIBS($withval/lib)
+     fi
+     COMPILE_ET=compile_et],
+    [AC_MSG_RESULT(util/et)
+     COM_ERR_SUBDIR=util/et;
+     MR_INCLUDE(`pwd`/util/et)
+     MR_LIBS(`pwd`/util/et)
+     COMPILE_ET=`pwd`/util/et/compile_et
+     AC_CONFIG_SUBDIRS($COM_ERR_SUBDIR)])
+AC_SUBST(COM_ERR_SUBDIR)
+AC_SUBST(COMPILE_ET)
+
+# Kerberos (required)
+AC_MSG_CHECKING(for Kerberos 4)
+AC_ARG_WITH(krb4,
+    [  --with-krb4=PREFIX      Specify location of krb4],
+    [krb4="$withval"], [krb4=no])
+AC_MSG_RESULT($krb4)
+if test $krb4 = "no"; then
+    AC_MSG_ERROR(Kerberos is required for Moira)
+fi
+if test "$krb4" != yes; then
+    MR_INCLUDE($krb4/include)
+    if test -d "$krb4/include/kerberosIV"; then
+       MR_INCLUDE($krb4/include/kerberosIV)
+    fi
+    MR_LIBS($krb4/lib)
+elif test -d /usr/include/kerberosIV; then
+    MR_INCLUDE(/usr/include/kerberosIV)
+fi
+AC_CHECK_LIB(krb4, krb_rd_req,
+            [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto"],
+            [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)
+
+# Hesiod support
+AC_MSG_CHECKING(for Hesiod)
+AC_ARG_WITH(hesiod,
+    [  --with-hesiod=PREFIX    Specify location of Hesiod],
+    [hesiod="$withval"], [hesiod=no])
+AC_MSG_RESULT($hesiod)
+if test "$hesiod" != no; then
+    if test "$hesiod" != yes; then
+       MR_INCLUDE($hesiod/include)
+       MR_LIBS($hesiod/lib)
+    fi
+    AC_CHECK_FUNC(res_send, :,
+                 AC_CHECK_LIB(resolv, res_send))
+    AC_CHECK_LIB(hesiod, hes_resolve, :,
+                [AC_MSG_ERROR(Hesiod library not found)],
+                $LIBPATH $LIBS)
+    MR_DEFINE(HAVE_HESIOD)
+fi
+
+# Zephyr support
+AC_MSG_CHECKING(for Zephyr)
+AC_ARG_WITH(zephyr,
+    [  --with-zephyr=PREFIX    Specify location of Zephyr],
+    [zephyr="$withval"], [zephyr=no])
+AC_MSG_RESULT($zephyr)
+if test "$zephyr" != no; then
+    if test "$zephyr" != yes; then
+       MR_INCLUDE($zephyr/include)
+       MR_LIBS($zephyr/lib)
+    fi
+    AC_CHECK_LIB(zephyr, ZInitialize, :,
+                [AC_MSG_ERROR(Zephyr library not found)],
+                $LIBPATH $KRB4_LIBS -lcom_err)
+    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
+        if test ! -d util; then
+            mkdir util
+        fi
+        GDSS_CPPFLGAS="-I$gdss/include"
+        GDSS_LIBS='-L$(BUILDTOP)/util/gdss/lib -lgdss'
+     else
+         gdss=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)
+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)
+
+# Oracle (default: yes, if $ORACLE_HOME is set)
+AC_MSG_CHECKING(for Oracle)
+AC_ARG_WITH(oracle,
+    [  --with-oracle=PREFIX    Specify location of Oracle (for server)],
+    [oracle="$withval"],
+    [if test -n "$ORACLE_HOME" -a -d "$ORACLE_HOME"; then
+         oracle=$ORACLE_HOME
+     else
+        oracle=no
+     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"
+    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"
+    PRO_C=$oracle/bin/proc
+    PRO_C_OPTS=CODE=ANSI_C
+fi
+AC_SUBST(PRO_C)
+AC_SUBST(PRO_C_DEFS)
+AC_SUBST(PRO_C_INCLUDES)
+AC_SUBST(PRO_C_OPTS)
+AC_SUBST(SQL_LIBS)
+AC_SUBST(SVRSUBDIRS)
+
+# AFS support
+AC_MSG_CHECKING(for AFS)
+AC_ARG_WITH(afs,
+    [  --with-afs=PREFIX       Specify location of AFS libs (for server)],
+    [afs="$withval"], [afs=no])
+AC_MSG_RESULT($afs)
+if test "$afs" != no -a "$oracle" != no; then
+    if test "$afs" != yes; then
+       AFS_CPPFLAGS="-I$afs/include -I$afs/include/afs -I$afs/include/rx"
+       AFS_PRO_C_INCLUDES="INCLUDE=$afs/include INCLUDE=$afs/include/afs INCLUDE=$afs/include/rx"
+       AFS_LIBS="-L$afs/lib -L$afs/lib/afs"
+       AFS_DIR=$afs
+    fi
+    AC_CHECK_FUNC(insque, :, AC_CHECK_LIB(compat, insque,
+                                         AFS_EXTRA_LIBS="-lcompat",
+                                         AC_MSG_ERROR(insque not found)))
+    AC_CHECK_FUNC(sigvec, :, AC_CHECK_LIB(ucb, sigvec,
+                                         AFS_EXTRA_LIBS="$AFS_EXTRA_LIBS -L/usr/ucblib -lc -lucb",
+                                         :, -L/usr/ucblib))
+    AC_CHECK_LIB(sys, pioctl, :,
+                [AC_MSG_ERROR(AFS libraries not found)],
+                $AFS_LIBS -lrx -llwp -lsys $AFS_EXTRA_LIBS)
+    MR_DEFINE(HAVE_AFS)
+fi
+AC_SUBST(AFS_CPPFLAGS)
+AC_SUBST(AFS_PRO_C_INCLUDES)
+AC_SUBST(AFS_LIBS)
+AC_SUBST(AFS_EXTRA_LIBS)
+AC_SUBST(AFS_DIR)
+
+# 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)])
+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"
+    fi
+fi
+AC_SUBST(READLINE_CPPFLAGS)
+AC_SUBST(READLINE_LIBS)
+
+# Curses
+curses=curses
+AC_CHECKING(for curses)
+AC_CHECK_LIB(curses, main, :, AC_CHECK_LIB(ncurses, main, curses=ncurses))
+if test -n "$curses"; then
+    OLDLIBS=$LIBS
+    LIBS=-l$curses
+    AC_CHECKING(if curses needs termcap)
+    dnl we need to use AC_TRY_RUN because under NetBSD, the program will
+    dnl link with just -lcurses, but then fail with a runtime linker error
+    dnl because you didn't use -ltermcap
+    AC_TRY_RUN([#include <curses.h>
+               main(int argc, char **argv)
+               {
+                   initscr();
+                   endwin();
+                   return 0;
+               }], [CURSES_LIBS="-l$curses"],
+               LIBS="-l$curses -ltermcap"
+               AC_TRY_RUN([#include <curses.h>
+                           main(int argc, char **argv)
+                           {
+                               initscr();
+                               endwin();
+                               return 0;
+                           }], [CURSES_LIBS="-l$curses -ltermcap"],
+                           :, :),
+               :)
+    LIBS=$OLDLIBS
+fi
+if test -n "$CURSES_LIBS"; then
+    OLDLIBS=$LIBS
+    LIBS=$CURSES_LIBS
+    AC_TRY_LINK([#include <curses.h>],[WINDOW *w; getmaxx(w);],
+               :,
+               AC_TRY_COMPILE([#include <curses.h>],[WINDOW *w; w->_maxx;],
+                              [CURSES_CPPFLAGS="-D'getmaxx(w)=w->_maxx'"],
+                              [CURSES_CPPFLAGS="-D'getmaxx(w)=w->maxx'"]))
+    LIBS=$OLDLIBS
+    CURSES_CPPFLAGS="-DHAVE_CURSES $CURSES_CPPFLAGS"
+    CURSES_SUBDIRS='$(CURSES_SUBDIRS)'
+else
+    AC_MSG_WARN(Couldn't find -lcurses)
+fi
+AC_SUBST(CURSES_CPPFLAGS)
+AC_SUBST(CURSES_LIBS)
+AC_SUBST(CURSES_SUBDIRS)
+
+
+AC_CHECK_FUNCS(getusershell)
+
+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)
+
+MR_INCLUDE('$(SRCTOP)/include')
+MR_INCLUDE('$(BUILDTOP)/lib')
+MR_INCLUDE('$(BUILDTOP)/db')
+LDFLAGS="$LDFLAGS -L\$(BUILDTOP)/lib $LIBPATH"
+KLIBS="-lzephyr $KRB4_LIBS -lcom_err -lhesiod $LIBS"
+LIBS="-lmoira $KLIBS"
+AC_SUBST(KLIBS)
+
+AC_OUTPUT(Makefile lib/Makefile include/Makefile clients/Makefile \
+         clients/addusr/Makefile clients/blanche/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)
diff --git a/db/Imakefile b/db/Imakefile
deleted file mode 100644 (file)
index 0567c68..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for db directory.
-#
-
-SRCDIR=${SRCTOP}/db
-CODE= Imakefile schema.sql unschema.sql dbopt.sql
-
-depend:: ${CODE}
-
-depend:: moira_schema.c moira_schema.h
-
-moira_schema.h: schema.sql
-       tr '[a-z]' '[A-Z]' < schema.sql | awk -f doschema.awk > moira_schema.h
-
-moira_schema.c: schema.sql
-       awk -f doschema.awk < schema.sql > moira_schema.c
-
-clean::
-       rm -f moira_schema.h moira_schema.c
-
-all: moira_schema.h moira_schema.c moira_schema.o
diff --git a/db/Makefile.in b/db/Makefile.in
new file mode 100644 (file)
index 0000000..c1a7d42
--- /dev/null
@@ -0,0 +1,34 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: moira_schema.h moira_schema.c moira_schema.o
+
+clean:
+       rm -f moira_schema.h moira_schema.c moira_schema.o
+
+depend: moira_schema.c moira_schema.h
+
+install:
+
+moira_schema.h: $(srcdir)/schema.sql
+       tr '[a-z]' '[A-Z]' < $(srcdir)/schema.sql | \
+               awk -f $(srcdir)/doschema.awk > moira_schema.h
+
+moira_schema.c: schema.sql
+       awk -f $(srcdir)/doschema.awk < $(srcdir)/schema.sql > moira_schema.c
diff --git a/dbck/Imakefile b/dbck/Imakefile
deleted file mode 100644 (file)
index 3aa30f7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Header$
-#
-# Copyright 1993 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for server directory.
-#
-
-SRCS = dbck.h dbck.c fix.c phase1.c phase2.c phase3.c phase4.c
-OBJS = dbck.o fix.o phase1.o phase2.o phase3.o phase4.o
-CODE = dbck.h dbck.pc fix.pc phase1.pc phase2.pc phase3.pc phase4.pc
-SRCDIR=$(SRCTOP)/dbck
-sqlrule()
-
-program(dbck, ${OBJS},,../lib/libmoira.a $(SQL_LIB), ${PROGDIR})
-sqlfile(dbck)
-sqlfile(fix)
-sqlfile(phase1)
-sqlfile(phase2)
-sqlfile(phase3)
-sqlfile(phase4)
diff --git a/dbck/Makefile.in b/dbck/Makefile.in
new file mode 100644 (file)
index 0000000..0336711
--- /dev/null
@@ -0,0 +1,51 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+PRO_C=@PRO_C@
+PRO_C_DEFS=@PRO_C_DEFS@
+PRO_C_INCLUDES=@PRO_C_INCLUDES@
+PRO_C_OPTS=@PRO_C_OPTS@
+PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES)
+LDFLAGS=@LDFLAGS@
+LIBS=@SQL_LIBS@ @LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+OBJS=dbck.o fix.o phase1.o phase2.o phase3.o phase4.o
+
+CFILES=dbck.c fix.c phase1.c phase2.c phase3.c phase4.c
+
+TARGET=dbck
+
+.SUFFIXES: .pc
+
+.pc.c:
+       $(PRO_C) $(PRO_C_FLAGS) INAME=$<
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(CFILES) $(TARGET)
+
+depend: $(CFILES)
+
+install: all
+       $(INSTALL_PROGRAM) dbck $(mrbindir)
+
+$(TARGET): $(OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
diff --git a/dcm/Imakefile b/dcm/Imakefile
deleted file mode 100644 (file)
index 48643ef..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Header$
-
-# Copyright 1992 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for moira dcm.
-
-SRCDIR = $(SRCTOP)/dcm
-SRCS= startdcm.c dcm.c
-CODE= startdcm.c dcm.pc
-OBJS=dcm.o
-sqlrule()
-
-program(dcm, $(OBJS),,../update/moira_update.o $(CLIBS) $(SQL_LIB), ${PROGDIR})
-program(startdcm, startdcm.o,,,${PROGDIR})
-
-sqlfile(dcm)
diff --git a/dcm/Makefile.in b/dcm/Makefile.in
new file mode 100644 (file)
index 0000000..42f7845
--- /dev/null
@@ -0,0 +1,59 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+PRO_C=@PRO_C@
+PRO_C_DEFS=@PRO_C_DEFS@
+PRO_C_INCLUDES=@PRO_C_INCLUDES@
+PRO_C_OPTS=@PRO_C_OPTS@
+PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES)
+LDFLAGS=@LDFLAGS@
+SQL_LIBS=@SQL_LIBS@
+LIBS=@LIBS@
+INSTALL_PROGRAM=$(INSTALL_PROGRAM)
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+DCM_OBJS=dcm.o
+UPDATE_OBJS=../update/checksum.o ../update/client.o ../update/send_file.o \
+       ../update/ticket.o ../update/sendrecv.o
+START_OBJS=startdcm.o
+
+CFILES=dcm.c
+
+TARGET=dcm startdcm
+
+.SUFFIXES: .pc
+
+.pc.c:
+       $(PRO_C) $(PRO_C_FLAGS) INAME=$<
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(DCM_OBJS) $(START_OBJS) $(CFILES) $(TARGET)
+
+depend: $(CFILES)
+
+install: all
+       $(INSTALL_PROGRAM) dcm $(mrbindir)
+       $(INSTALL_PROGRAM) startdcm $(mrbindir)
+
+dcm: $(DCM_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(DCM_OBJS) $(UPDATE_OBJS) $(SQL_LIBS) $(LIBS)
+
+startdcm: $(START_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(START_OBJS) $(LIBS)
diff --git a/gen/Imakefile b/gen/Imakefile
deleted file mode 100644 (file)
index f5c27c7..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-# $Header$
-#
-# Copyright 1993 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for server directory.
-#
-
-SRCDIR = $(SRCTOP)/gen
-#ifdef DO_GDSS
-SRCS = util.c moddiff.c passwd.c hesiod.c \
-       nfs.c mailhub.c sis.c pobox.c \
-       hosts.c network.c warehouse.c directory.c ndb.c
-OBJS = util.o moddiff.o passwd.o hesiod.o \
-       nfs.o mailhub.o sis.o pobox.o \
-       hosts.o network.o warehouse.o directory.o ndb.o
-CODE = util.c moddiff.pc passwd.pc hesiod.pc \
-       nfs.pc mailhub.pc sis.pc pobox.pc \
-       hosts.pc network.pc warehouse.pc directory.pc ndb.pc
-LIBS =  -L/usr/athena/lib ../lib/libmoira.a -lcom_err -lzephyr \
-       $(LIBGDSS) -lkrb -ldes -lhesiod ${SQL_LIB}
-DEFINES = $(GDSSINC)
-#else /* DO_GDSS */
-SRCS = util.c moddiff.c passwd.c hesiod.c \
-       nfs.c mailhub.c pobox.c \
-       hosts.c network.c directory.c ndb.c
-OBJS = util.o moddiff.o passwd.o hesiod.o \
-       nfs.o mailhub.o pobox.o \
-       hosts.o network.o directory.o ndb.o
-CODE = util.c moddiff.pc passwd.pc hesiod.pc \
-       nfs.pc mailhub.pc pobox.pc \
-       hosts.pc network.pc directory.pc ndb.pc
-LIBS =  -L/usr/athena/lib ../lib/libmoira.a -lcom_err -lzephyr \
-       -lkrb -ldes -lhesiod ${SQL_LIB}
-DEFINES =
-#endif /* DO_GDSS */
-sqlrule()
-
-program(passwd.gen, passwd.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(moddiff)
-sqlfile(passwd)
-program(hesiod.gen, hesiod.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(hesiod)
-program(nfs.gen, nfs.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(nfs)
-program(mailhub.gen, mailhub.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(mailhub)
-#ifdef DO_GDSS
-program(sis.gen, sis.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(sis)
-program(warehouse.gen, warehouse.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(warehouse)
-#endif
-program(pobox.gen, pobox.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(pobox)
-program(hosts.gen, hosts.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(hosts)
-program(network.gen, network.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(network)
-program(directory.gen, directory.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(directory)
-program(ndb.gen, ndb.o util.o moddiff.o,${MR_LIBDEP},${LIBS},${PROGDIR})
-sqlfile(ndb)
diff --git a/gen/Makefile.in b/gen/Makefile.in
new file mode 100644 (file)
index 0000000..e4a4db1
--- /dev/null
@@ -0,0 +1,81 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+PRO_C=@PRO_C@
+PRO_C_DEFS=@PRO_C_DEFS@
+PRO_C_INCLUDES=@PRO_C_INCLUDES@
+PRO_C_OPTS=@PRO_C_OPTS@
+PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES)
+LDFLAGS=@LDFLAGS@
+LIBS=@SQL_LIBS@ @GDSS_LIBS@ @LIBS@
+INSTALL_TARGET=@INSTALL_TARGET@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+GDSS_OBJS=warehouse.o
+OBJS=  util.o moddiff.o hesiod.o nfs.o mailhub.o pobox.o \
+       hosts.o network.o directory.o ndb.o @GDSS_OBJS@
+
+GDSS_CFILES=warehouse.c
+CFILES= moddiff.c hesiod.c nfs.c mailhub.c pobox.c \
+       hosts.c network.c directory.c ndb.c @GDSS_CFILES@
+
+GDSS_TARGET=warehouse.gen
+TARGET=        hesiod.gen nfs.gen mailhub.gen pobox.gen hosts.gen \
+       network.gen directory.gen ndb.gen @GDSS_TARGET@
+
+.SUFFIXES: .pc
+
+.pc.c:
+       $(PRO_C) $(PRO_C_FLAGS) INAME=$<
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(OBJS) $(CFILES) $(TARGET)
+
+depend: $(CFILES)
+
+install: all
+       @for p in $(TARGET); do $(INSTALL_PROGRAM) $$p $(mrbindir); done
+
+hesiod.gen: hesiod.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) hesiod.o util.o moddiff.o $(SQL_LIBS) $(LIBS)
+
+hosts.gen: hosts.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) hosts.o util.o moddiff.o $(SQL_LIBS) $(LIBS)
+
+nfs.gen: nfs.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) nfs.o util.o moddiff.o $(SQL_LIBS) $(LIBS)
+
+directory.gen: directory.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) directory.o util.o moddiff.o $(SQL_LIBS) $(LIBS)
+
+ndb.gen: ndb.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) ndb.o util.o moddiff.o $(SQL_LIBS) $(LIBS)
+
+mailhub.gen: mailhub.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) mailhub.o util.o moddiff.o $(SQL_LIBS) $(LIBS)
+
+pobox.gen: pobox.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) pobox.o util.o moddiff.o $(SQL_LIBS) $(LIBS)
+
+network.gen: network.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) network.o util.o moddiff.o $(SQL_LIBS) $(LIBS)
+
+warehouse.gen: warehouse.o util.o moddiff.o
+       $(CC) -o $@ $(LDFLAGS) warehouse.o util.o moddiff.o $(SQL_LIBS) $(GDSS_LIBS) $(LIBS)
diff --git a/include/Imakefile b/include/Imakefile
deleted file mode 100644 (file)
index 09aad02..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for include.
-#
-
-CODE=Imakefile mit-copyright.h \
-       moira.h moira_site.h update.h ureg_proto.h
-SRCDIR=$(SRCTOP)/include
-
-all::
-
-depend:: ${CODE}
-
-install::
-       -mkdir ${DESTDIR}${INCLDIR}
-       for i in moira.h moira_site.h; do \
-               ${INSTALLFILE} $$i ${DESTDIR}${INCLDIR}/$$i; done
diff --git a/include/Makefile.in b/include/Makefile.in
new file mode 100644 (file)
index 0000000..7ae4a15
--- /dev/null
@@ -0,0 +1,16 @@
+# $Id$
+
+SHELL=/bin/sh
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+
+all:
+
+clean:
+
+depend:
+
+install:
index 0f6b5266c937aaf3583bef8f9173d6e1a2d40f19..a12a59cbde2097666d01c52679d1b5c372df4173 100644 (file)
@@ -146,7 +146,11 @@ int mr_query(char *handle, int argc, char **argv,
 #define MR_INGRES_SOFTFAIL     MR_DBMS_SOFTFAIL
 
 
-#ifndef __GNUC__
+#ifdef __GNUC__
+#if __GNUC_MINOR__ < 7
+#define __attribute__(x)
+#endif
+#else /* ! __GNUC __ */
 #define __attribute__(x)
 #endif
 
diff --git a/incremental/Imakefile b/incremental/Imakefile
deleted file mode 100644 (file)
index 525ccf8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# $Header$
-
-AFSDIR = /mit/afsuser
-AFSLIBS=$(AFSDIR)/lib/afs/libprot.a    $(AFSDIR)/lib/afs/libauth.a \
-       $(AFSDIR)/lib/libubik.a        $(AFSDIR)/lib/afs/util.a \
-       $(AFSDIR)/lib/librxkad.a       $(AFSDIR)/lib/afs/libsys.a \
-       $(AFSDIR)/lib/librx.a          $(AFSDIR)/lib/liblwp.a \
-       $(AFSDIR)/lib/afs/libaudit.a   -lbsd
-
-SRCS = afs.c ksrvtgt.c
-CODE = $(SRCS)
-CFLAGS = -I../include -I../lib -I../db -I$(AFSDIR)/include -I/usr/athena/include $(DBG)
-LIBS = -L../lib -L/usr/athena/lib -lmoira -lzephyr -lcom_err -lhesiod -lkrb -ldes
-SRCDIR = $(SRCTOP)/incremental
-
-program(afs.incr,afs.o,,${AFSLIBS} ${LIBS},${PROGDIR})
-program(ksrvtgt,ksrvtgt.o,,${LIBS},${PROGDIR})
diff --git a/incremental/Makefile.in b/incremental/Makefile.in
new file mode 100644 (file)
index 0000000..f0b6c8e
--- /dev/null
@@ -0,0 +1,60 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+AFS_CPPFLAGS=@AFS_CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(AFS_CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+AFS_LIBS=@AFS_LIBS@
+AFS_EXTRA_LIBS=@AFS_EXTRA_LIBS@
+AFS_DIR=@AFS_DIR@
+LIBS=@LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+AFS_OBJS=afs.o
+KSRVTGT_OBJS=ksrvtgt.o
+
+TARGET=afs.incr ksrvtgt
+
+.SUFFIXES: .pc
+
+.pc.c:
+       $(PRO_C) $(PRO_C_FLAGS) INAME=$<
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(AFS_OBJS) $(KSRVTGT_OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) afs.incr $(mrbindir)
+       $(INSTALL_PROGRAM) ksrvtgt $(mrbindir)
+       @for p in afs_create.pl afs_nightly.pl afs_quota.pl afs_rename.pl afs_utils.pl; do $(INSTALL_PROGRAM) $$p $(mrbindir); done
+
+afs.incr: $(AFS_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(AFS_OBJS) $(AFS_LIBS) -lprot -lauth -lrxkad -lrx -llwp -lubik -lsys -laudit $(AFS_DIR)/lib/afs/util.a $(AFS_EXTRA_LIBS) $(LIBS)
+
+ksrvtgt: $(KSRVTGT_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(KSRVTGT_OBJS) $(LIBS)
+
+AFSLIBS=$(AFSDIR)/lib/afs/libprot.a    $(AFSDIR)/lib/afs/libauth.a \
+       $(AFSDIR)/lib/libubik.a        $(AFSDIR)/lib/afs/util.a \
+       $(AFSDIR)/lib/librxkad.a       $(AFSDIR)/lib/afs/libsys.a \
+       $(AFSDIR)/lib/librx.a          $(AFSDIR)/lib/liblwp.a \
+       $(AFSDIR)/lib/afs/libaudit.a   -lbsd
diff --git a/install-sh b/install-sh
new file mode 100755 (executable)
index 0000000..ebc6691
--- /dev/null
@@ -0,0 +1,250 @@
+#! /bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+       -c) instcmd="$cpprog"
+           shift
+           continue;;
+
+       -d) dir_arg=true
+           shift
+           continue;;
+
+       -m) chmodcmd="$chmodprog $2"
+           shift
+           shift
+           continue;;
+
+       -o) chowncmd="$chownprog $2"
+           shift
+           shift
+           continue;;
+
+       -g) chgrpcmd="$chgrpprog $2"
+           shift
+           shift
+           continue;;
+
+       -s) stripcmd="$stripprog"
+           shift
+           continue;;
+
+       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+           shift
+           continue;;
+
+       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+           shift
+           continue;;
+
+       *)  if [ x"$src" = x ]
+           then
+               src=$1
+           else
+               # this colon is to work around a 386BSD /bin/sh bug
+               :
+               dst=$1
+           fi
+           shift
+           continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+       echo "install:  no input file specified"
+       exit 1
+else
+       true
+fi
+
+if [ x"$dir_arg" != x ]; then
+       dst=$src
+       src=""
+       
+       if [ -d $dst ]; then
+               instcmd=:
+       else
+               instcmd=mkdir
+       fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+       if [ -f $src -o -d $src ]
+       then
+               true
+       else
+               echo "install:  $src does not exist"
+               exit 1
+       fi
+       
+       if [ x"$dst" = x ]
+       then
+               echo "install:  no destination specified"
+               exit 1
+       else
+               true
+       fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+       if [ -d $dst ]
+       then
+               dst="$dst"/`basename $src`
+       else
+               true
+       fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='   
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+       pathcomp="${pathcomp}${1}"
+       shift
+
+       if [ ! -d "${pathcomp}" ] ;
+        then
+               $mkdirprog "${pathcomp}"
+       else
+               true
+       fi
+
+       pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+       $doit $instcmd $dst &&
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+       if [ x"$transformarg" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               dstfile=`basename $dst $transformbasename | 
+                       sed $transformarg`$transformbasename
+       fi
+
+# don't allow the sed command to completely eliminate the filename
+
+       if [ x"$dstfile" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               true
+       fi
+
+# Make a temp file name in the proper directory.
+
+       dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+       $doit $instcmd $src $dsttmp &&
+
+       trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+       $doit $rmcmd -f $dstdir/$dstfile &&
+       $doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/lib/Imakefile b/lib/Imakefile
deleted file mode 100644 (file)
index 36ecc3c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for GDB library.
-#
-
-SRCS = mr_auth.c mr_call.c mr_connect.c mr_init.c \
-       mr_query.c mr_access.c mr_ops.c \
-       fixname.c strs.c fixhost.c nfsparttype.c sq.c hash.c \
-       idno.c critical.c gdss_convert.c kname_unparse.c
-
-OBJECTS        = mr_auth.o mr_call.o mr_connect.o mr_init.o \
-       mr_query.o mr_access.o mr_ops.o \
-       fixname.o strs.o fixhost.o nfsparttype.o sq.o hash.o \
-       idno.o critical.o mr_et.o ureg_err.o krb_et.o gdss_et.o \
-       gdss_convert.o kname_unparse.o
-
-SRCDIR=$(SRCTOP)/lib
-CODE=$(SRCS) Imakefile mr_et.et krb_et.et ureg_err.et gdss_et.et mr_private.h
-
-#ifdef NEED_STRCASECMP
-DEFINES= -DNEED_STRCASECMP
-#endif
-#ifdef USE_CRYPT_H
-DEFINES= -DUSE_CRYPT_H
-#endif
-
-all:: mr_et.h krb_et.h ureg_err.h gdss_et.h
-
-comp_et_depend(mr_et)
-comp_et_depend(krb_et)
-comp_et_depend(ureg_err)
-comp_et_depend(gdss_et)
-
-depend:: ${CODE}
-
-library_obj_rule()
-install_library_target(moira,$(OBJECTS),$(SRCS))
-
-install::
-       -mkdir ${DESTDIR}${INCLDIR}
-       for i in mr_et.h; do \
-               ${INSTALLFILE} $$i ${DESTDIR}${INCLDIR}/$$i; done
-
diff --git a/lib/Makefile.in b/lib/Makefile.in
new file mode 100644 (file)
index 0000000..0a70061
--- /dev/null
@@ -0,0 +1,45 @@
+# $Id$
+
+SHELL=/bin/sh
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@ @CRYPT_CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+RANLIB=@RANLIB@
+COMPILE_ET=@COMPILE_ET@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+
+OBJS=  critical.o fixhost.o fixname.o gdss_convert.o gdss_et.o \
+       hash.o idno.o kname_unparse.o krb_et.o mr_access.o mr_auth.o \
+       mr_call.o mr_connect.o mr_et.o mr_init.o mr_ops.o mr_query.o \
+       nfsparttype.o sq.o strs.o ureg_err.o
+
+ET_H=  mr_et.h krb_et.h ureg_err.h gdss_et.h
+ET_C=  mr_et.c krb_et.c ureg_err.c gdss_et.c
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+.SUFFIXES: .et
+
+.et.h:
+       $(COMPILE_ET) $<
+
+all: depend libmoira.a
+
+clean:
+       rm -f $(OBJS) $(ET_H) $(ET_C) libmoira.a
+
+depend: $(ET_H)
+
+install: all
+
+libmoira.a: $(OBJS)
+       ar cru $@ $(OBJS)
+       $(RANLIB) $@
index 6b96880f8ce2a5b1d98c88582d20e390cc9d5f89..c6971ded2266328c5a95e5517748eb4e92a47b2a 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 
-#ifdef ZEPHYR
+#ifdef HAVE_ZEPHYR
 /* need to include before moira.h, which includes krb_et.h, because
    zephyr.h is broken */
 #include <zephyr/zephyr.h>
@@ -21,10 +21,12 @@ extern Code_t ZSendNotice(ZNotice_t *notice, Z_AuthProc cert_routine);
 #include <moira_site.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#ifdef SYSLOG
+#ifndef HAVE_ZEPHYR
 #include <syslog.h>
 #endif
+#include <time.h>
 
 RCSID("$Header$");
 
@@ -93,11 +95,7 @@ void critical_alert(char *instance, char *msg, ...)
 
 void send_zgram(char *inst, char *msg)
 {
-#ifdef SYSLOG
-  char *buf;
-#endif
-
-#ifdef ZEPHYR
+#ifdef HAVE_ZEPHYR
   ZNotice_t znotice;
 
   memset(&znotice, 0, sizeof(znotice));
@@ -111,9 +109,10 @@ void send_zgram(char *inst, char *msg)
   znotice.z_opcode = "";
   znotice.z_recipient = "";
   ZSendNotice(&znotice, ZNOAUTH);
-#endif
-#ifdef SYSLOG
-  buf = malloc(9 + strlen(instance) + strlen(msg));
+#else
+  char *buf;
+
+  buf = malloc(9 + strlen(inst) + strlen(msg));
   if (buf)
     {
       sprintf(buf, "MOIRA: %s %s", inst, msg);
index 32d5cc353bb8c6cce1c8f67d777bf59e940e4b5b..66d0fa49f917864922322c2a79ed7a6abf6f99f0 100644 (file)
@@ -13,7 +13,7 @@
 #include <ctype.h>
 #include <string.h>
 
-#ifdef USE_CRYPT_H
+#ifdef HAVE_CRYPT_H
 #include <crypt.h>
 #else
 #include <unistd.h>
index 0ebeca1ac5a1b17ba6906e9ffa15d3e52027cc39..7c8624decf2c4b0393763be4938c40b56779f757 100644 (file)
@@ -24,7 +24,9 @@
 #include <string.h>
 #include <unistd.h>
 
+#ifdef HAVE_HESIOD
 #include <hesiod.h>
+#endif
 
 RCSID("$Header$");
 
@@ -84,7 +86,7 @@ int mr_connect(char *server)
   if (!server || (strlen(server) == 0))
     server = getenv("MOIRASERVER");
 
-#ifdef HESIOD
+#ifdef HAVE_HESIOD
   if (!server || (strlen(server) == 0))
     {
       pp = hes_resolve("moira", "sloc");
diff --git a/man/Imakefile b/man/Imakefile
deleted file mode 100644 (file)
index a4628e1..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for manual pages.
-#
-
-SRCDIR=${SRCTOP}/man
-CODE=blanche.1 chfn.1 chpobox.1 chsh.1 dcmmaint.1 listmaint.1 \
-       mailmaint.1 moira.1 mrcheck.1 usermaint.1 userreg.1 \
-       moira.3 mr_connect.3 mr_host.3 mr_auth.3 mr_disconnect.3 \
-       mr_noop.3 mr_access.3 mr_query.3 mr_do_update.3 mr_motd.3 \
-       mr_set_alternate_input.3 format_filesys_type.3 \
-       parse_filesys_type.3 canonicalize_hostname.3 strsave.3 \
-       strtrim.3 sq_create.3 sq_destroy.3 sq_get_data.3 \
-       sq_remove_data.3 sq_empty.3 sq_save_args.3 sq_save_data.3 \
-       sq_save_unique_data.3 sq_save_unique_string.3 \
-       dcm.8 mrtest.8 reg_svr.8 moirad.8 startdcm.8 startreg.8 \
-       startmoira.8 update_server.8 addusr.1
-
-manpage(1,addusr.1)
-manpage(1,blanche.1)
-manpage(1,chfn.1)
-manpage(1,chpobox.1)
-manpage(1,chsh.1)
-manpage(1,dcmmaint.1)
-manpage(1,listmaint.1)
-manpage(1,mailmaint.1)
-manpage(1,moira.1)
-manpage(1,mrcheck.1)
-manpage(1,usermaint.1)
-manpage(1,userreg.1)
-manpage(3,moira.3)
-manpage(3,mr_connect.3)
-manpage(3,mr_host.3)
-manpage(3,mr_auth.3)
-manpage(3,mr_disconnect.3)
-manpage(3,mr_noop.3)
-manpage(3,mr_access.3)
-manpage(3,mr_query.3)
-manpage(3,mr_do_update.3)
-manpage(3,mr_motd.3)
-manpage(3,mr_set_alternate_input.3)
-manpage(3,format_filesys_type.3)
-manpage(3,parse_filesys_type.3)
-manpage(3,canonicalize_hostname.3)
-manpage(3,strsave.3)
-manpage(3,strtrim.3)
-manpage(3,sq_create.3)
-manpage(3,sq_destroy.3)
-manpage(3,sq_get_data.3)
-manpage(3,sq_remove_data.3)
-manpage(3,sq_empty.3)
-manpage(3,sq_save_args.3)
-manpage(3,sq_save_data.3)
-manpage(3,sq_save_unique_data.3)
-manpage(3,sq_save_unique_string.3)
-manpage(8,dcm.8)
-manpage(8,mrtest.8)
-manpage(8,reg_svr.8)
-manpage(8,moirad.8)
-manpage(8,startdcm.8)
-manpage(8,startreg.8)
-manpage(8,startmoira.8)
-manpage(8,update_server.8)
diff --git a/man/Makefile.in b/man/Makefile.in
new file mode 100644 (file)
index 0000000..1b400fd
--- /dev/null
@@ -0,0 +1,33 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+INSTALL_DATA=@INSTALL_DATA@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+prefix=@prefix@
+mandir=@mandir@
+
+MAN1=  blanche.1 chfn.1 chpobox.1 chsh.1 dcmmaint.1 listmaint.1 \
+       mailmaint.1 moira.1 mrcheck.1 usermaint.1 userreg.1
+MAN3=  canonicalize_hostname.3 format_filesys_type.3 moira.3 \
+       mr_access.3 mr_auth.3 mr_connect.3 mr_disconnect.3 \
+       mr_host.3 mr_motd.3 mr_noop.3 mr_query.3 \
+       parse_filesys_type.3 sq_create.3 sq_destroy.3 sq_empty.3 \
+       sq_get_data.3 sq_remove_data.3 sq_save_args.3 sq_save_data.3 \
+       sq_save_unique_data.3 sq_save_unique_string.3 strtrim.3
+MAN8=  dcm.8 moirad.8 mrtest.8 reg_svr.8 setquota.8 startdcm.8 \
+       startmoira.8 startreg.8 update_server.8
+
+all:
+
+clean:
+
+depend:
+
+install:
+       for m in $(MAN1); do $(INSTALL_DATA) $(srcdir)/$$m $(mandir)/man1; done
+       for m in $(MAN3); do $(INSTALL_DATA) $(srcdir)/$$m $(mandir)/man3; done
+       for m in $(MAN8); do $(INSTALL_DATA) $(srcdir)/$$m $(mandir)/man8; done
index 2d2279bf9d546ad5cfa6ac9a953cff052d9df5bd..7cbb25233b105946eaac52c91d68f118fd79fc51 100644 (file)
@@ -27,29 +27,24 @@ which is enclosed between brackets.
 The default value is accepted simply by typing a carriage
 return.  To enter a blank field, the word ``none'' may
 be typed.  Below is a sample run:
-.IP
-.B "Info last changed on 22-mar-1988 15:13:33 by user studley using chfn"
+.PP
+Info last changed on 22-mar-1988 15:13:33 by user studley using chfn
 .br
-.B "Name [Biff Studsworth II]:"
+Name [Biff Studsworth II]:
 .br
-.B "Nickname [Studley]:"
+Nickname [Studley]:
 .br
-.B "Home address (Ex: EC Bemis 514) [New House 4-601]:"
+Home address (Ex: EC Bemis 514) [New House 4-601]:
 .br
-.B "Home phone number (Ex: 3141592) [225-1234]:"
+Home phone number (Ex: 3141592) [225-1234]:
 .br
-.B "Office address (Exs: E40-342 or 2-108) [E40-300M]:"
-E40-358M
+Office address (Exs: E40-342 or 2-108) [E40-300M]: \fBE40-358M\fP
 .br
-.B "Office phone (Ex: 3-7619) []:"
-1863
+Office phone (Ex: 3-7619) []: \fB1863\fP
 .br
-.B "MIT department (Exs: 9, Biology, Information Services) [VI-3]:"
-none
+MIT department (Exs: 9, Biology, Information Services) [VI-3]: \fBnone\fP
 .br
-.B "MIT year (Exs: 1989, '91, Faculty, Grad) ['90]:"
-'91
-.sp
+MIT year (Exs: 1989, '91, Faculty, Grad) ['90]: \fB\'91\fP
 .PP
 .I chfn
 allows phone numbers to be entered with or without hyphens.
index 8fc6d5eb38ebb67625f53da5ec0fd98f3b61ef1a..d8526fed8dc147bb6d3bb8611eab76d481e4a919 100644 (file)
--- a/man/dcm.8
+++ b/man/dcm.8
@@ -4,7 +4,7 @@
 dcm, startdcm \- build config files from Moira database and update servers
 .SH SYNOPSIS
 .B dcm
-[-d level]
+[servicename ...]
 .br
 .B startdcm
 .SH DESCRIPTION
@@ -63,8 +63,6 @@ if it is non-zero.
 .br
 /moira/critical.log
 .br
-/moira/dcm/locks/* \- empty files will be created here for advisory locks.
-.br
 /moira/bin/*.gen \- service file generators will be searched for
 here.
 .br
@@ -74,3 +72,4 @@ here.
 (null instance).
 .SH "SEE ALSO"
 The Project Athena Technical Plan section on Moira.
+
index dac1e50719d73d14a75580273551e113a70d0a63..229bcdee3ac3c798a8aa17b58f10565d0879f2ed 100644 (file)
@@ -12,78 +12,73 @@ sq_save_unique_data, sq_save_unique_string
 .nj
 .TP
 Protocol functions
-.B #include <moira.h>
+.B
+int mr_connect(char *server);
 
-.B int mr_connect(server);
-.B     char *server;
+.B
+int mr_host(char *host, int size);
 
-.B int mr_host(host, size);
-.B     char *server;
+.B
+int mr_motd(char **motd);
 
-.B int mr_motd(motd);
-.B     char **motd;
+.B
+int mr_auth(char *prog);
 
-.B int mr_auth(prog);
-.B     char *prog;
+.B
+int mr_disconnect(void);
 
-.B int mr_disconnect();
+.B
+int mr_noop(void);
 
-.B int mr_noop();
+.B
+int mr_access(char *name, int argc, char **argv);
 
-.B int mr_access(name, argc, argv);
-.B     char *name;
-.B     int argc;
-.B     char **argv;
+.B
+int mr_query(char *name, int argc, char **argv,
+.B
+       int (*callproc)(int, char **, void *), void *callarg);
 
-.B int mr_query(name, argc, argv, callproc, callarg);
-.B     char *name;
-.B     int argc;
-.B     char **argv;
-.B     int (*callproc)(int, char **, char *);
-.B     char *callarg;
-
-.B int mr_do_update();
-
-.B int mr_set_alternate_input(fd, proc)
-.B     int fd;
-.B     void (*proc)();
 .TP
 Data manipulation
-.B char *format_filesys_type(fs_status);
-.B     char *fs_status;
-
-.B char *parse_filesys_type(fs_type_name);
-.B     char *fs_type_name;
+.B
+char *format_filesys_type(char *fs_status);
 
-.B char *canonicalize_hostname(host);
-.B     char *host;
+.B
+char *parse_filesys_type(char *fs_type_name);
 
-.B char *strsave(s);
-.B     char *s;
+.B
+char *canonicalize_hostname(char *host);
 
-.B char *strtrim(s);
-.B     char *s;
+.B
+char *strtrim(char *s);
 .TP
 Simple Queues
-.B struct save_queue *sq_create();
+.B
+struct save_queue *sq_create(void);
 
-.B sq_destroy(sq);
-.B     struct save_queue *sq;
+.B
+void sq_destroy(struct save_queue *sq);
 
-.B int sq_get_data(sq, data);
-.B     char **data;
+.B
+int sq_get_data(struct save_queue *sq, void *data);
 
-.B int sq_remove_data(sq, data);
+.B
+int sq_remove_data(struct save_queue *sq, void *data);
 
-.B int sq_empty(sq);
+.B
+int sq_empty(struct save_queue *sq);
 
-.B sq_save_args(argc, argv, sq);
+.B
+sq_save_args(int argc, char **argv, struct save_queue *sq);
 
-.B sq_save_data(sq, data);
+.B
+sq_save_data(struct save_queue *sq, void *data);
 
-.B sq_save_unique_data(sq, data);
+.B
+sq_save_unique_data(struct save_queue *sq, void *data);
 
-.B sq_save_unique_string(sq, data);
+.B
+sq_save_unique_string(struct save_queue *sq, char *data);
 .fi
 .SH DESCRIPTION
 This library supports the Athena Service Management System protocol
@@ -92,7 +87,7 @@ those described in this man page, but they are not intended to be used
 directly. Instead, they are called by the routines that are described.
 
 Be sure to link your application against these libraries:
--lmoira -lcom_err -lkrb -ldes
+-lmoira -lkrb -ldes -lcom_err
 .TP
 Protocol functions
 All protocol routines return 0 on success, or a value from 
@@ -162,18 +157,6 @@ and the value passed to
 as
 .I callarg.
 
-.B mr_do_update
-triggers a DCM update immediately on the Moira server.
-
-.B mr_set_alternate_input
-tells the Moira library that you want to allow some asynchronus
-actions while a query is being processed.  During query processing, if
-any data is available to be read on the specified file descriptor,
-then the specified function will be called to handle it.  For
-instance, calling mr_set_alternate_input with the connection to the X
-server and a routine which will dispatch X events will allow a toolkit
-application to handle mouse and expose events while a query is being
-processed.
 .TP
 Data manipulation
 .B format_filesys_type
@@ -200,10 +183,6 @@ was allocated using
 and may be freed or realloc'ed before returning.  The returned value
 will be a malloc'ed value, possibly the same buffer as the argument.
 
-.B strsave
-will malloc some memory and make a copy of
-.I s.
-
 .B strtrim
 will trim whitespace off of both ends of the string
 .I s.
index 5520823a99c70f4a3ceb170a8f442932898f5582..efa72ec910baa5c62adf7ce7dba845a5db169b90 100644 (file)
@@ -17,12 +17,6 @@ which starts the daemon running in the proper working directory and
 captures logging messages.
 .PP
 Logging is done to standard output.
-How much gets logged by
-.B moirad
-is controlled by the variable
-.I log_flags
-which is compiled into the file
-.I mr_srvdata.c.
 If critical errors are detected, they are logged to
 .B /moira/critical.log
 and in a zephyrgram to class
@@ -35,10 +29,10 @@ Also, a journal file is kept in
 logging every successful change of the database in a format that can
 be replayed by
 .I mrtest(8).
-For the server to be able to function properly, if must be run as root
+For the server to be able to function properly, it must be run as root
 and root must have access to the tables in the DBMS.
 .PP
-It is possible to shutdown the database side of the server when it is
+It is possible to shut down the database side of the server when it is
 necessary to lock out clients.  In this state the server will only
 respond to noop and motd requests.  When the file
 .B /etc/smsdown
diff --git a/man/mr_do_update.3 b/man/mr_do_update.3
deleted file mode 100644 (file)
index 1e8ebec..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/moira.3
diff --git a/man/mr_set_alternate_input.3 b/man/mr_set_alternate_input.3
deleted file mode 100644 (file)
index 1e8ebec..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/moira.3
index 5e1bf8fd021aeeaa3041fae1c4a06d745b4d286b..8543b5e4897f8f4d87db1ed437ba7d847f06c28d 100644 (file)
@@ -26,12 +26,6 @@ break the network connection to the Moira server.
 .B host
 show the name of the host the client is connected to.
 .TP
-.B new
-specify use of version 2.0 of the protocol.
-.TP
-.B old
-specify use of version 1.0 of the protocol.
-.TP
 .B script inputfile [outputfile]
 read commands from 
 .I inputfile.
@@ -77,9 +71,6 @@ performs an authorization check on a query without actually executing
 the query.  The arguments are the same as those in the
 .B query
 command described above.
-.TP
-.B dcm
-instructs the server to trigger a DCM update immediately.
 .SH SEE ALSO
 The Project Athena Technical Plan section on Moira for a list of queries
 and their arguments, and a description of the protocol this
index fd5e94428ba399a06aafb3b0d2c21de842eaab9b..44b0e651bb915417bd7cdb253181871ce7bcf8fe 100644 (file)
@@ -57,7 +57,7 @@ if it is non-zero.
 .br
 /tmp/tkt_ureg \- temporary Kerberos ticket storage.
 .br
-/etc/athena/srvtab \- The dcm must be able to get Kerberos tickets for
+/etc/athena/srvtab \- The reg_svr must be able to get Kerberos tickets for
 "moira.[hostname]".
 .SH AUTHORS
 Jay Berkenbilt, Bill Sommerfeld
diff --git a/man/strsave.3 b/man/strsave.3
deleted file mode 100644 (file)
index 1e8ebec..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/moira.3
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755 (executable)
index 0000000..d0fd194
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id$
+
+errstatus=0
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+        echo "mkdir $pathcomp" 1>&2
+
+        mkdir "$pathcomp" || lasterr=$?
+
+        if test ! -d "$pathcomp"; then
+         errstatus=$lasterr
+        fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/reg_svr/Imakefile b/reg_svr/Imakefile
deleted file mode 100644 (file)
index cad93f8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Header$
-
-# Copyright 1992 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for moira reg_svr.
-
-SRCDIR = $(SRCTOP)/reg_svr
-SRCS= startreg.c reg_svr.c requests.c reg_svr.h
-CODE=$(SRCS)
-OBJS=requests.o reg_svr.o
-
-program(reg_svr, $(OBJS),,-lkadm $(LIBGDSS) $(CLIBS) $(SQL_LIB), ${PROGDIR})
-program(startreg, startreg.o,,,${PROGDIR})
diff --git a/reg_svr/Makefile.in b/reg_svr/Makefile.in
new file mode 100644 (file)
index 0000000..b521d9e
--- /dev/null
@@ -0,0 +1,45 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+SQL_LIBS=@SQL_LIBS@
+LIBS=-lkadm @LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+REG_OBJS=reg_svr.o requests.o
+START_OBJS=startreg.o
+
+TARGET=reg_svr startreg
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(REG_OBJS) $(START_OBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) reg_svr $(mrbindir)
+       $(INSTALL_PROGRAM) startreg $(mrbindir)
+
+reg_svr: $(REG_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(REG_OBJS) ../server/libmrglue.a $(SQL_LIBS) $(LIBS)
+
+startreg: $(START_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(START_OBJS) $(LIBS)
diff --git a/regtape/Imakefile b/regtape/Imakefile
deleted file mode 100644 (file)
index 71cfde4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# $Header$
-
-# Copyright 1992 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for moira regtape programs.
-
-SRCS= students.c employee.c sign.c verify.c vote.c
-CODE= students.pc employee.pc sign.pc verify.pc vote.pc
-SRCDIR = $(SRCTOP)/regtape
-#ifdef USE_CRYPT_H
-DEFINES = -DUSE_CRYPT_H
-#endif
-GDSS_INC = $(GDSSINC)
-sqlrule()
-
-program(students, students.o,,$(CLIBS) $(SQL_LIB), $(PROGDIR))
-program(employee, employee.o,,$(CLIBS) $(SQL_LIB), $(PROGDIR))
-program(verify, verify.o,,$(LIBGDSS) $(CLIBS) $(SQL_LIB), $(PROGDIR))
-program(sign, sign.o,,$(LIBGDSS) $(CLIBS) $(SQL_LIB), $(PROGDIR))
-program(vote, vote.o,,$(CLIBS) $(SQL_LIB), $(PROGDIR))
-
-sqlfile(students)
-sqlfile(employee)
-sqlfile(sign)
-sqlfile(verify)
-sqlfile(vote)
diff --git a/regtape/Makefile.in b/regtape/Makefile.in
new file mode 100644 (file)
index 0000000..07e3032
--- /dev/null
@@ -0,0 +1,72 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+PRO_C=@PRO_C@
+PRO_C_DEFS=@PRO_C_DEFS@
+PRO_C_INCLUDES=@PRO_C_INCLUDES@
+PRO_C_OPTS=@PRO_C_OPTS@
+PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES)
+LDFLAGS=@LDFLAGS@
+SQL_LIBS=@SQL_LIBS@
+GDSS_LIBS=@GDSS_LIBS@
+CRYPT_LIBS=@CRYPT_LIBS@
+LIBS=@LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+STUDENTS_OBJS=students.o
+EMPLOYEE_OBJS=employee.o
+VOTE_OBJS=vote.o
+SIGN_OBJS=sign.o
+VERIFY_OBJS=verify.o
+
+CFILES=students.c employee.c vote.c sign.c verify.c
+
+TARGET=students employee vote sign verify
+
+.SUFFIXES: .pc
+
+.pc.c:
+       $(PRO_C) $(PRO_C_FLAGS) INAME=$<
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(STDENTS_OBJS) $(EMPLOYEE_OBJS) $(VOTE_OBJS)
+       rm -f $(VERIFY_OBJS) $(SIGN_OBJS) $(CFILES) $(TARGET)
+
+depend: $(CFILES)
+
+install: all
+       @for p in $(TARGET); do $(INSTALL_PROGRAM) $$p $(mrbindir); done
+
+students: $(STUDENTS_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(STUDENTS_OBJS) $(SQL_LIBS) $(LIBS) $(CRYPT_LIBS)
+
+employee: $(EMPLOYEE_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(EMPLOYEE_OBJS) $(SQL_LIBS) $(LIBS) $(CRYPT_LIBS)
+
+vote: $(VOTE_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(VOTE_OBJS) $(SQL_LIBS) $(LIBS)
+
+sign: $(SIGN_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(SIGN_OBJS) $(SQL_LIBS) $(GDSS_LIBS) $(LIBS)
+
+verify: $(VERIFY_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(VERIFY_OBJS) $(SQL_LIBS) $(GDSS_LIBS) $(LIBS)
+
diff --git a/server/Imakefile b/server/Imakefile
deleted file mode 100644 (file)
index 0811d22..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for server directory.
-#
-
-GDSS_INC=$(GDSSINC)
-
-SRCS = startmoira.c mr_main.c mr_sauth.c mr_scall.c \
-       mr_shutdown.c mr_util.c \
-       mr_server.h query.h qrtn.h qrtn.c \
-       qsupport.c qsubs.c queries2.c increment.c \
-       cache.c mr_glue.c qvalidate.c qaccess.c qsetup.c \
-       qfollow.c
-CODE= startmoira.c mr_main.c mr_sauth.c mr_scall.c \
-       mr_shutdown.c mr_util.c \
-       mr_server.h query.h qrtn.h qrtn.pc \
-       qsupport.pc qsubs.c queries2.c increment.pc \
-       cache.pc mr_glue.c qvalidate.pc Imakefile \
-       qaccess.pc qsetup.pc qfollow.pc
-SRVOBJ=mr_main.o mr_sauth.o mr_scall.o mr_shutdown.o \
-       mr_util.o qrtn.o queries2.o qsupport.o qsubs.o \
-       increment.o cache.o qvalidate.o \
-       qaccess.o qsetup.o qfollow.o ../db/moira_schema.o
-GLUOBJS=mr_glue.o qrtn.o queries2.o qsupport.o qsubs.o \
-       ../lib/mr_et.o mr_sauth.o \
-       ../lib/krb_et.o mr_util.o increment.o cache.o \
-       qvalidate.o qaccess.o qsetup.o qfollow.o
-SRCDIR = $(SRCTOP)/server
-sqlrule()
-
-program(moirad, ${SRVOBJ},${MR_LIBDEP},\
-       -L/usr/athena/lib .././lib/libmoira.a -lzephyr \
-       -lcom_err $(LIBGDSS)\
-       -lkrb -ldes -lhesiod ${SQL_LIB}, ${PROGDIR})
-program(startmoira, startmoira.o,${MR_LIBDEP},\
-       -L/usr/athena/lib .././lib/libmoira.a -lzephyr \
-       -lcom_err -lkrb -ldes -lhesiod,\
-       ${PROGDIR})
-library_obj_rule()
-install_library_target(mrglue,$(GLUOBJS),$(SRCS))
-
-sqlfile(cache)
-sqlfile(increment)
-sqlfile(qrtn)
-sqlfile(qsupport)
-sqlfile(qvalidate)
-sqlfile(qaccess)
-sqlfile(qsetup)
-sqlfile(qfollow)
diff --git a/server/Makefile.in b/server/Makefile.in
new file mode 100644 (file)
index 0000000..e66ba61
--- /dev/null
@@ -0,0 +1,69 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+PRO_C=@PRO_C@
+PRO_C_DEFS=@PRO_C_DEFS@
+PRO_C_INCLUDES=@PRO_C_INCLUDES@
+PRO_C_OPTS=@PRO_C_OPTS@
+PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES)
+LDFLAGS=@LDFLAGS@
+SERVER_LIBS=@GDSS_LIBS@ @SQL_LIBS@
+LIBS=@LIBS@
+RANLIB=@RANLIB@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+mrbindir=@mrbindir@
+
+SERVER_OBJS=   mr_main.o mr_sauth.o mr_scall.o mr_shutdown.o mr_util.o \
+               qvalidate.o qaccess.o qsetup.o qsupport.o qfollow.o \
+               queries2.o qrtn.o qsubs.o increment.o cache.o
+SCHEMA_OBJS=   ../db/moira_schema.o
+GLUE_OBJS=     mr_glue.o mr_sauth.o mr_util.o \
+               qvalidate.o qaccess.o qsetup.o qsupport.o qfollow.o \
+               queries2.o qrtn.o qsubs.o increment.o cache.o
+START_OBJS=    startmoira.o
+
+CFILES=                qvalidate.c qaccess.c qsetup.c qsupport.c qfollow.c \
+               qrtn.c increment.c cache.c
+
+TARGET=moirad startmoira libmrglue.a
+
+.SUFFIXES: .pc
+
+.pc.c:
+       $(PRO_C) $(PRO_C_FLAGS) INAME=$<
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(SERVER_OBJS) $(GLUE_OBJS) $(START_OBJS) $(CFILES) $(TARGET)
+
+depend: $(CFILES)
+
+install: all
+       $(INSTALL_PROGRAM) moirad $(mrbindir)
+       $(INSTALL_PROGRAM) startmoira $(mrbindir)
+
+moirad: $(SERVER_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(SERVER_OBJS) $(SCHEMA_OBJS) $(SERVER_LIBS) $(LIBS)
+
+startmoira: $(START_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(START_OBJS) $(LIBS)
+
+libmrglue.a: $(GLUE_OBJS)
+       ar cru $@ $(GLUE_OBJS) $(SCHEMA_OBJS)
+       $(RANLIB) $@
index 117e3db4cdfc30ff7d2737605fd6999c5459eb10..1f45e19d16e36712fba5155fa697976288ccfa1e 100644 (file)
@@ -30,8 +30,9 @@ static int already_connected = 0;
 #define CHECK_CONNECTED { if (!already_connected) return MR_NOT_CONNECTED; }
 
 static client pseudo_client;
+client *cur_client = &pseudo_client;
 extern char *whoami;
-extern time_t now;
+time_t now;
 
 void reapchild(void);
 int callback(int argc, char **argv, void *arg);
@@ -94,7 +95,6 @@ int mr_auth(char *prog)
     return KDC_PR_UNKNOWN + ERROR_TABLE_BASE_krb;
   strcpy(pseudo_client.kname.name, pw->pw_name);
   krb_get_lrealm(pseudo_client.kname.realm, 1);
-  krb_get_lrealm(krb_realm, 1);
 
   strcpy(buf, pw->pw_name);
   strcat(buf, "@");
@@ -142,40 +142,6 @@ int mr_access(char *name, int argc, char **argv)
                         mr_copy_args(argv, argc));
 }
 
-/* trigger_dcm is also used as a followup routine to the
- * set_server_host_override query, hence the two dummy arguments.
- */
-
-struct query pseudo_query = {
-  "trigger_dcm",
-  "tdcm",
-};
-
-int trigger_dcm(struct query *q, char *argv[], client *cl)
-{
-  int pid, status;
-  char prog[MAXPATHLEN];
-
-  if ((status = check_query_access(&pseudo_query, 0, cl)))
-    return status;
-
-  sprintf(prog, "%s/startdcm", BIN_DIR);
-  pid = vfork();
-  switch (pid)
-    {
-    case 0:
-      execl(prog, "startdcm", 0);
-      exit(1);
-
-    case -1:
-      return errno;
-
-    default:
-      return MR_SUCCESS;
-    }
-}
-
-
 void reapchild(void)
 {
   int status, pid;
diff --git a/update/Imakefile b/update/Imakefile
deleted file mode 100644 (file)
index 43d9b31..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Imakefile for update.
-#
-
-SRCS=  auth_002.c checksum.c client.c config.c exec_002.c \
-       get_file.c sendrecv.c send_file.c ticket.c \
-       update_server.c update_test.c xfer_002.c xfer_003.c
-SRCDIR=${SRCTOP}/update
-CODE=${SRCS} Imakefile
-SOBJS = auth_002.o checksum.o config.o exec_002.o get_file.o \
-       update_server.o xfer_002.o xfer_003.o sendrecv.o
-COBJS= checksum.o client.o send_file.o ticket.o sendrecv.o
-
-#ifdef HAS_VSPRINTF
-DEFINES= -DHAS_VSPRINTF
-#endif
-
-all::  update_server update_test
-#ifdef SVRBUILD
-all::  moira_update.o
-#endif
-
-#ifdef SVRBUILD
-moira_update.o: ${COBJS}
-       ${LD} -r -o moira_update.o ${COBJS}
-#endif
-
-program(update_server, ${SOBJS},${MR_LIBDEP}, ${CLIBS},${ETCDIR})
-program(update_test, update_test.o ${COBJS}, ${MR_LIBDEP}, ${CLIBS},${BINDIR})
diff --git a/update/Makefile.in b/update/Makefile.in
new file mode 100644 (file)
index 0000000..6f2dbf4
--- /dev/null
@@ -0,0 +1,48 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+CFLAGS=@CFLAGS@
+DEFS=@DEFS@
+ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@LIBS@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=..
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+sbindir=@sbindir@
+
+SOBJS= auth_002.o checksum.o config.o exec_002.o get_file.o \
+       update_server.o xfer_002.o xfer_003.o sendrecv.o
+COBJS= update_test.o checksum.o client.o send_file.o ticket.o sendrecv.o
+
+TARGET=update_server update_test
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: $(TARGET)
+
+clean:
+       rm -f $(SOBJS) $(COBJS) $(TARGET)
+
+depend:
+
+install: all
+       $(INSTALL_PROGRAM) update_test $(bindir)
+       $(INSTALL_PROGRAM) update_server $(sbindir)
+
+update_test: $(COBJS)
+       $(CC) -o $@ $(LDFLAGS) $(COBJS) $(LIBS)
+
+update_server: $(SOBJS)
+       $(CC) -o $@ $(LDFLAGS) $(SOBJS) $(LIBS)
index 22c26f69ec428b0ac96d15dd180e310616e6f5a8..dd4818b551ef3402c1ff67e5e5da471a56199a95 100644 (file)
@@ -12,8 +12,8 @@
 #include <sys/stat.h>
 #include <sys/utsname.h>
 
-#include <arpa/inet.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 
 #include <errno.h>
 #include <pwd.h>
index 1f6a883714940893153bcf2a484577df060639fe..9080fc78a6420f9f42fca633861300bfbdd66190 100644 (file)
@@ -14,6 +14,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 void usage(void);
 
diff --git a/util/Imakefile b/util/Imakefile
deleted file mode 100644 (file)
index 167c92d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# $Header$
-#
-# Copyright 1990 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Intermediate level makefile for `util' directory.
-
-all::
-
-#ifdef DO_GDSS
-do_subdirs(gdss)
-#endif
-
-#ifndef USELOCALTOOLS
-do_subdirs_no_imakefile(imake)
-do_subdirs(makedepend)
-#endif
index 1c29764e296faa9500931e636b70d7172e26d951..3bed7b6605d37f48c5b605436a354dba20cbc0b2 100644 (file)
@@ -38,7 +38,7 @@ compile_et: ${BINOBJS}
 error_table.o: et_lex.lex.c
 
 .c.o:
-       ${CC} -c ${ALL_CFLAGS} $<
+       ${CC} -c -I. ${ALL_CFLAGS} $<
 
 check:
 
diff --git a/util/gdss/Imakefile b/util/gdss/Imakefile
deleted file mode 100644 (file)
index 3ccf5e2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* $Header$ */
-
-#define have_subdirs
-SUBDIRS = lib
-
-all::
-
-gdss_test: lib/libgdss.a
-       $(CC) $(CFLAGS) -I./include -o $@ $@.c lib/libgdss.a $(LLIB) -lkrb -ldes -lhesiod $(OSLIBS)
-
-clean::
-       rm -f gdss_test
-
diff --git a/util/gdss/Makefile.in b/util/gdss/Makefile.in
new file mode 100644 (file)
index 0000000..4946c20
--- /dev/null
@@ -0,0 +1,32 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../..
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@
+LIBS=@KLIBS@
+
+all:
+       @(cd lib; $(MAKE) $@)
+
+clean:
+       @(cd lib; $(MAKE) $@)
+       rm -f gdss_test
+
+depend:
+       @(cd lib; $(MAKE) $@)
+
+install:
+       @(cd lib; $(MAKE) $@)
+
+check: gdss_test
+       ./gdss_test
+
+gdss_test: all
+       $(CC) -I./include $(CPPFLAGS) -o $@ $@.c lib/libgdss.a $(LIBS)
diff --git a/util/gdss/lib/Imakefile b/util/gdss/lib/Imakefile
deleted file mode 100644 (file)
index 7e0b649..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* $Header$ */
-
-SUBDIRS = crypto
-
-OBJS = gdss.o rgdss.o
-COBJS = crypto/hashes.o crypto/read_password.o crypto/crypto_util.o \
-       crypto/dumphex.o crypto/read_privkey.o crypto/read_pubkey.o \
-       crypto/write_pubkey.o crypto/KeyFromPQ.o
-BOBJS = crypto/bignum/o/KerN.o crypto/bignum/o/bnCmp.o \
-       crypto/bignum/o/bnDivide.o crypto/bignum/o/bnInit.o \
-       crypto/bignum/o/bnMult.o crypto/bignum/o/bz.o crypto/bignum/o/bzf.o 
-AOBJS = crypto/algorithm/random.o crypto/algorithm/random_BigNum.o \
-       crypto/algorithm/bigrsacode.o crypto/algorithm/bigkeygen.o \
-       crypto/algorithm/bigsignverify.o
-
-DEFINES = -I. -I../include -I./crypto/bignum/h -I./crypto/algorithm
-
-do_subdirs($(SUBDIRS))
-
-library_obj_rule()
-install_library_target(gdss,$(OBJS) $(COBJS) $(BOBJS) $(AOBJS),)
diff --git a/util/gdss/lib/Makefile.in b/util/gdss/lib/Makefile.in
new file mode 100644 (file)
index 0000000..9db81d9
--- /dev/null
@@ -0,0 +1,48 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+SRCTOP=@top_srcdir@
+BUILDTOP=../../..
+
+CC=@CC@
+CPPFLAGS=@CPPFLAGS@ -I$(srcdir)/../include -I$(srcdir)/crypto/bignum/h -I$(srcdir)/crypto/algorithm
+CFLAGS=@CFLAGS@
+ALL_CFLAGS=$(CFLAGS) $(CPPFLAGS) $(DEFS)
+LDFLAGS=@LDFLAGS@
+LIBS=@LIBS@
+RANLIB=@RANLIB@
+
+OBJS = gdss.o rgdss.o
+COBJS = crypto/hashes.o crypto/read_password.o crypto/crypto_util.o \
+       crypto/dumphex.o crypto/read_privkey.o crypto/read_pubkey.o \
+       crypto/write_pubkey.o crypto/KeyFromPQ.o
+BOBJS = crypto/bignum/KerN.o crypto/bignum/bnCmp.o \
+       crypto/bignum/bnDivide.o crypto/bignum/bnInit.o \
+       crypto/bignum/bnMult.o crypto/bignum/bz.o crypto/bignum/bzf.o 
+AOBJS = crypto/algorithm/random.o crypto/algorithm/random_BigNum.o \
+       crypto/algorithm/bigrsacode.o crypto/algorithm/bigkeygen.o \
+       crypto/algorithm/bigsignverify.o
+
+.c.o:
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all: libgdss.a
+
+libgdss.a: $(OBJS)
+       @(cd crypto; $(MAKE) all)
+       ar cru $@ $(OBJS) $(COBJS) $(BOBJS) $(AOBJS)
+       $(RANLIB) $@
+
+clean:
+       rm -f $(OBJS) libgdss.a
+       @(cd crypto; $(MAKE) $@)
+
+depend:
+       @(cd crypto; $(MAKE) $@)
+
+install:
+       @(cd crypto; $(MAKE) $@)
diff --git a/util/gdss/lib/crypto/Imakefile b/util/gdss/lib/crypto/Imakefile
deleted file mode 100644 (file)
index 628d5c1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* $Header$ */
-
-#define have_subdirs
-SUBDIRS = algorithm bignum
-
-OBJS =  hashes.o \
-       read_password.o \
-       crypto_util.o \
-       dumphex.o \
-       read_privkey.o \
-       read_pubkey.o \
-       write_pubkey.o \
-       KeyFromPQ.o
-
-DEFINES = -I. -I../../include -Ibignum/h
-
-all:: $(OBJS)
diff --git a/util/gdss/lib/crypto/Makefile.in b/util/gdss/lib/crypto/Makefile.in
new file mode 100644 (file)
index 0000000..571ee94
--- /dev/null
@@ -0,0 +1,29 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+
+CC=@CC@
+CFLAGS=@CFLAGS@ -I$(srcdir)/../../include -I$(srcdir)/bignum/h
+
+OBJS =  hashes.o read_password.o crypto_util.o dumphex.o \
+       read_privkey.o read_pubkey.o write_pubkey.o KeyFromPQ.o
+
+.c.o:
+       $(CC) -c $(CFLAGS) $<
+
+all: $(OBJS)
+       @(cd algorithm; $(MAKE) $@) && (cd bignum; $(MAKE) $@)
+
+clean:
+       rm -f $(OBJS)
+       @(cd algorithm; $(MAKE) $@) && (cd bignum; $(MAKE) $@)
+
+depend:
+       @(cd algorithm; $(MAKE) $@) && (cd bignum; $(MAKE) $@)
+
+install:
+       @(cd algorithm; $(MAKE) $@) && (cd bignum; $(MAKE) $@)
diff --git a/util/gdss/lib/crypto/algorithm/Imakefile b/util/gdss/lib/crypto/algorithm/Imakefile
deleted file mode 100644 (file)
index 1604cb8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* $Header$ */
-
-OBJS =         random.o \
-       random_BigNum.o \
-       bigrsacode.o \
-       bigkeygen.o \
-       bigsignverify.o
-
-DEFINES = -I. -I../../../include -I../bignum/h
-
-
-depend:: tables.h
-
-all:: tables.h $(OBJS)
-
-genutil(gentables,gentables.o,,)
-
-endian.h tables.h: gentables
-       ./gentables
-
-clean::
-       $(RM) tables.h endian.h
diff --git a/util/gdss/lib/crypto/algorithm/Makefile.in b/util/gdss/lib/crypto/algorithm/Makefile.in
new file mode 100644 (file)
index 0000000..4d46449
--- /dev/null
@@ -0,0 +1,31 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+
+CC=@CC@
+CFLAGS=@CFLAGS@ -I. -I$(srcdir)/../../../include -I$(srcdir)/../bignum/h
+LDFLAGS=@LDFLAGS@
+
+OBJS=random.o random_BigNum.o bigrsacode.o bigkeygen.o bigsignverify.o
+
+.c.o:
+       $(CC) -c $(CFLAGS) $<
+
+all: depend $(OBJS)
+
+clean:
+       rm -f $(OBJS) gentables gentables.o tables.h endian.h
+
+depend: tables.h
+
+install:
+
+endian.h tables.h: gentables
+       ./gentables
+
+gentables: gentables.o
+       $(CC) $(LDFLAGS) -o $@ gentables.o
index e117e51b71963831913dcb6b670441a748187660..3467037a9d9f14267e60b54e20d5c04c04885ff5 100644 (file)
  */
  
 #include <stdio.h>
-#ifndef ultrix
 #include <sys/time.h>
-#else
-#include <time.h>
-#endif
 #include <sys/types.h>
 #include <sys/resource.h>
-#ifdef POSIX
 #include <sys/utsname.h>
-#endif
-#ifdef SOLARIS
 #include <sys/times.h>
-#endif
 
 #include "DEScrypto.h"
 
@@ -95,43 +87,28 @@ int nl;
 {  
    struct timezone tz;
    struct timeval tv;
-   struct rusage *rs;
-   int i;
+   struct tms buffer;
+   int i, sum = 0;
+   struct utsname name;
 
    /* start with hash of input string */
    DES_load_key_local(scramble_key, &random_key_schedule) ;
    DES_MAC (0, seed, nl, &rng.key, &random_key_schedule) ;
 
    /* get whatever resource usage there is */
-#ifdef SOLARIS
-   rs = (struct rusage *)malloc (sizeof(struct tms));
-   (void) times((struct tms *)rs);
-   DES_MAC (0, rs, sizeof(struct tms), &rng.seed, &random_key_schedule) ;
-#else
-   rs = (struct rusage *) malloc(sizeof(struct rusage));
-   getrusage(0,rs);
-   rs->ru_stime.tv_sec += (long) rs ;
-   DES_MAC (0, rs, sizeof(struct rusage), &rng.seed, &random_key_schedule) ;
-#endif
-   free(rs);
+   times(&buffer);
+   DES_MAC (0, &buffer, sizeof(struct tms), &rng.seed, &random_key_schedule) ;
 
    /* get the current wall clock time, mix in process id */
    gettimeofday(&tv,&tz);
    rng.seed.longwords[0] = tv.tv_sec + getpid() + (long) &tz ;
    rng.seed.longwords[1] = tv.tv_usec + clock();
-#ifdef POSIX
-   {
-       struct utsname name;
-       int i, sum = 0;
-
-       (void) uname(&name);
-       for (i = 0; name.nodename[i]; i++)
-        sum = (sum<<1) + name.nodename[i];
-       rng.seed.longwords[1] += sum;
-   }
-#else
-   rng.seed.longwords[1] += gethostid();
-#endif
+
+   /* and hostname */
+   uname(&name);
+   for (i = 0; name.nodename[i]; i++)
+     sum = (sum<<1) + name.nodename[i];
+   rng.seed.longwords[1] += sum;
 
    DES_load_key_local( &rng.key, &random_key_schedule);
    DESencrypt_local(&rng.seed, &rng.key, &random_key_schedule);
diff --git a/util/gdss/lib/crypto/bignum/Imakefile b/util/gdss/lib/crypto/bignum/Imakefile
deleted file mode 100644 (file)
index c62d62e..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* $Header$ */
-
-OBJECT = o/KerN.o o/bnInit.o o/bnMult.o o/bnDivide.o o/bnCmp.o o/bzf.o o/bz.o 
-DEFINES = -DDIGITon32BIT -I./h
-KERNH = h/BigNum.h 
-
-
-all:: $(OBJECT)
-
-clean::
-       $(RM) $(OBJECT)
-
-
-o/KerN.o: c/KerN.c
-       $(CC) $(CFLAGS) -c c/KerN.c
-       mv KerN.o o
-
-# Level N
-o/bnInit.o: c/bn/bnInit.c $(KERNH)
-       $(CC) $(CFLAGS) -c c/bn/bnInit.c
-       mv bnInit.o o
-
-o/bnMult.o: c/bn/bnMult.c $(KERNH)
-       $(CC) $(CFLAGS) -c c/bn/bnMult.c
-       mv bnMult.o o
-
-o/bnDivide.o: c/bn/bnDivide.c $(KERNH)
-       $(CC) $(CFLAGS) -c c/bn/bnDivide.c
-       mv bnDivide.o o
-
-o/bnCmp.o: c/bn/bnCmp.c $(KERNH)
-       $(CC) $(CFLAGS) -c c/bn/bnCmp.c
-       mv bnCmp.o o
-
-# Level Z
-o/bz.o: c/bz.c h/BigZ.h $(KERNH)
-       $(CC) $(CFLAGS) -c c/bz.c
-       mv bz.o o
-
-# Some functions build with BigZ
-o/bzf.o: c/bzf.c h/BigZ.h $(KERNH)
-       $(CC) $(CFLAGS) -c c/bzf.c
-       mv bzf.o o 
-
diff --git a/util/gdss/lib/crypto/bignum/Makefile.in b/util/gdss/lib/crypto/bignum/Makefile.in
new file mode 100644 (file)
index 0000000..3f5f65b
--- /dev/null
@@ -0,0 +1,45 @@
+# $Id$
+
+SHELL=/bin/sh
+@SET_MAKE@
+
+srcdir=@srcdir@
+VPATH=@srcdir@
+
+CC=@CC@
+CFLAGS=@CFLAGS@ -I$(srcdir)/h -DDIGITon32BIT
+
+OBJS=KerN.o bnInit.o bnMult.o bnDivide.o bnCmp.o bzf.o bz.o
+
+all: $(OBJS)
+
+clean:
+       rm -f $(OBJS)
+
+depend:
+
+install:
+
+KerN.o: $(srcdir)/c/KerN.c
+       $(CC) $(CFLAGS) -c $(srcdir)/c/KerN.c
+
+# Level N
+bnInit.o: $(srcdir)/c/bn/bnInit.c h/BigNum.h
+       $(CC) $(CFLAGS) -c $(srcdir)/c/bn/bnInit.c
+
+bnMult.o: $(srcdir)/c/bn/bnMult.c h/BigNum.h
+       $(CC) $(CFLAGS) -c $(srcdir)/c/bn/bnMult.c
+
+bnDivide.o: $(srcdir)/c/bn/bnDivide.c h/BigNum.h
+       $(CC) $(CFLAGS) -c $(srcdir)/c/bn/bnDivide.c
+
+bnCmp.o: $(srcdir)/c/bn/bnCmp.c h/BigNum.h
+       $(CC) $(CFLAGS) -c $(srcdir)/c/bn/bnCmp.c
+
+# Level Z
+bz.o: $(srcdir)/c/bz.c h/BigZ.h h/BigNum.h
+       $(CC) $(CFLAGS) -c $(srcdir)/c/bz.c
+
+# Some functions build with BigZ
+bzf.o: $(srcdir)/c/bzf.c h/BigZ.h h/BigNum.h
+       $(CC) $(CFLAGS) -c $(srcdir)/c/bzf.c
index 5c2e9ef95c0a34aa58b96088da7291965858f1c4..8661e76c419d358a4c5f6a7093dc9c8d6cd5d8bb 100644 (file)
@@ -84,11 +84,7 @@ register int         nl;
            *mm++ = *nn++;
 #else
         /* be care: bcopy (SRC, DEST, L): SRC-->DEST !!! */
-#ifdef SOLARIS
         memmove (mm, nn, nl*BN_DIGIT_SIZE/BN_BYTE_SIZE);
-#else
-        bcopy (nn, mm, nl*BN_DIGIT_SIZE/BN_BYTE_SIZE);
-#endif
 #endif
     else
     if (mm > nn)
index a32711d4ecaeac6ed288d0b0fa670db6702a2dd3..f583aaafc232c9eaf201beb2573e424e01fb2789 100644 (file)
  */
 
 #include <stdio.h>
-#ifndef ultrix
 #include <sys/time.h>
-#else
-#include <time.h>
-#endif
 #include <sys/types.h>
 #include "random.h"
 #include "BigNum.h"
diff --git a/util/imake.includes/Imake.rules b/util/imake.includes/Imake.rules
deleted file mode 100644 (file)
index 73a561c..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/**/#  $Source$
-/**/#
-
-#ifdef __STDC__
-#define concat(x,y) x##y
-#define concat3(x,y,z) x##y##z
-#define concat4(w,x,y,z) w##x##y##z
-#define concat5(v,w,x,y,z) v##w##x##y##z
-#define requote(x) #x
-#else
-#define concat(x,y)x/**/y
-#define concat3(x,y,z)x/**/y/**/z
-#define concat4(w,x,y,z)w/**/x/**/y/**/z
-#define concat5(v,w,x,y,z)v/**/w/**/x/**/y/**/z
-#define requote(x) "x"
-#endif
-
-/*
- * Rule for building objects in libraries.
- */
-
-#define library_obj_rule()                                             @@\
-.c.o:                                                                  @@\
-       $(CC) -c $(CFLAGS) $*.c
-
-#define        install_library_target(libname,objs,srcs)                       @@\
-                                                                       @@\
-all:: concat3(lib,libname,.a)                                          @@\
-                                                                       @@\
-concat3(lib,libname,.a): objs                                          @@\
-       $(RM) $@.bak                                                    @@\
-       -$(MV) $@ $@.bak                                                @@\
-       $(ARCHIVE) $@ objs                                              @@\
-       $(RANLIB) $@                                                    @@\
-                                                                       @@\
-clean::                                                                @@\
-       $(RM) concat3(lib,libname,.a)                                   @@\
-       $(RM) objs                                                      @@\
-                                                                       @@\
-install::                                                              @@\
-       $(INSTALLRAW) -c -m 644 concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a)    @@\
-       $(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a)       @@\
-       $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a)
-
-
-/*
- * Rule for building utilities (binaries which don't get installed)
- */
-#define genutil(pgm,objs,localdeps,syslibs)                            @@\
-all:: pgm                                                              @@\
-                                                                       @@\
-pgm: objs localdeps                                                    @@\
-       $(CC) $(CFLAGS) -o $@ objs syslibs $(OSLIBS)                    @@\
-                                                                       @@\
-clean::                                                                @@\
-       $(RM) pgm objs                                                  @@\
-
-/*
- * Rule for building test programs (something which is not installed)
- */
-
-#define test_program(pgm,locallibs,syslibs)                            @@\
-                                                                       @@\
-all:: pgm                                                              @@\
-                                                                       @@\
-pgm: concat(pgm,.c) locallibs                                          @@\
-       $(CC) $(CFLAGS) -o $@ $@.c locallibs syslibs $(OSLIBS)          @@\
-                                                                       @@\
-clean::                                                                        @@\
-       $(RM) pgm concat(pgm,.o)                                        @@\
-
-/* 
- * Rule for compiling files with "et"
- */
-
-#define comp_et(tbl)                                                   @@\
-concat(tbl,.h) concat(tbl,.c): concat(tbl,.et)                         @@\
-       $(COMPILE_ET) concat(tbl,.et)                                   @@\
-clean::                                                                        @@\
-       $(RM) concat(tbl,.c) concat(tbl,.h)
-
-#define comp_et_depend(src)                                            @@\
-       comp_et(src)                                                    @@\
-                                                                       @@\
-depend:: concat(src,.h)
-
-/*
- * Rule for building a program which is to be installed:
- */
-
-#define program(pgm,objs,localdeps,syslibs,installdir)                 @@\
-all:: pgm                                                              @@\
-                                                                       @@\
-pgm: localdeps objs                                                    @@\
-       $(CC) $(CFLAGS) -o $@ objs syslibs $(OSLIBS)                    @@\
-                                                                       @@\
-install::                                                              @@\
-       $(INSTALLPROG) pgm ${DESTDIR}installdir/pgm                     @@\
-                                                                       @@\
-clean::                                                                @@\
-       $(RM) pgm objs                                                  @@\
-
-/*
- * Rule for installing man pages.  Section installing into should match
- * suffix, or the man page won't show up when using man(1).
- */
-
-#define manpage(section,page)                                          @@\
-all::                                                                  @@\
-install:: page                                                         @@\
-       $(INSTALLFILE) page concat4(${DESTDIR}${MANDIR}/man,section,/,`basename page`) @@\
-
-/*
- * Rule for building makefile dependencies.
- */
-
-#define        depend_target()                                                 @@\
-depend:: $(SRCS)                                                       @@\
-       @echo "### Now computing dependencies"                          @@\
-       @$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)         @@\
-
-#define clean_target()                                                 @@\
-clean::                                                                        @@\
-       $(RM) *~ \#* *.bak $(TAGSFILE)                          
-
-#define makefile_target()                                              @@\
-Makefile::                                                             @@\
-       -$(RM) Makefile.bak; $(MV) Makefile Makefile.bak                @@\
-       $(IMAKE) -DNEW_TOP=$(NEWTOP) -s Makefile                        @@\
-
-#define foreach_subdirs(name,subdirs)                                  @@\
-name::                                                                 @@\
-       @for d in subdirs; \                                            @@\
-       do \                                                            @@\
-               (cd $$d; echo "### Making" name "in" `pwd`;     \       @@\
-                       $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) name ; \   @@\
-                       echo "### Done with" `pwd`);            \       @@\
-       done
-
-#define do_subdirs_no_imakefile(subdirs)                               @@\
-       foreach_subdirs(all, subdirs)                                   @@\
-       foreach_subdirs(install, subdirs)                               @@\
-       foreach_subdirs(clean, subdirs)                                 @@\
-       foreach_subdirs(depend, subdirs)                                @@\
-       foreach_subdirs(src, subdirs)                                   @@\
-
-#define do_subdirs(subdirs)                                            @@\
-       do_subdirs_no_imakefile(subdirs)                                @@\
-                                                                       @@\
-Makefiles::                                                            @@\
-       @echo "### Making Makefiles in" `pwd`                           @@\
-       @for d in subdirs; \                                            @@\
-       do \                                                            @@\
-               (cd $$d; echo "### Making Makefile in" `pwd`; \         @@\
-                       $(MAKE) $(MFLAGS) SRCTOP=$(SRCTOP) \            @@\
-                       NEWTOP=../$(BUILDTOP)           \               @@\
-                       BUILDTOP=../$(BUILDTOP)         \               @@\
-                       -f ../Makefile                  \               @@\
-                       Makefile; \                                     @@\
-                       $(MAKE) $(MFLAGS) SRCTOP=$(SRCTOP) \            @@\
-                       NEWTOP=../$(BUILDTOP)           \               @@\
-                       Makefiles; \                                    @@\
-                       echo "### Done with" `pwd`); \                  @@\
-       done
-
-
-/* Compile Embeded SQL source */
-
-#ifdef ORACLE
-/* have to undef these to keep the ORADEFS line from being attacked by Imake */
-#undef HESIOD
-#undef ZEPHYR
-#undef GDSS
-#undef ATHENA
-ORADEFS= DEFINE=HESIOD DEFINE=ZEPHYR DEFINE=GDSS DEFINE=ATHENA
-ORAOPTS= CODE=ANSI_C
-#define sqlrule()                                                      @@\
-.SUFFIXES: .pc                                                         @@\
-.pc.c:                                                                 @@\
-       /usr/oracle/bin/proc INAME=$*.pc INCLUDE=$(BUILDTOP)/include INCLUDE=$(BUILDTOP)/lib INCLUDE=$(BUILDTOP)/db INCLUDE=$(INCLDIR) $(ORAOPTS) $(ORADEFS) $(ORAINCLUDES)
-#define sqlfile(file)                                                  @@\
-concat(file,.c): concat(file,.pc)                                      @@\
-clean::                                                                        @@\
-       $(RM) concat(file,.c)
-#endif
diff --git a/util/imake.includes/Imake.tmpl b/util/imake.includes/Imake.tmpl
deleted file mode 100644 (file)
index 1523af8..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/**/#
-/**/# This makefile is automatically generated by imake... do not modify
-/**/# or you may lose your changes when imake generates makefiles again.
-/**/# Ignore this message if you are not using imake.
-/**/#
-/**/#  $Source$
-/**/#
-
-#ifndef NEW_TOP
-NEWTOP=.
-BUILDTOP=.
-#else
-NEWTOP=NEW_TOP
-BUILDTOP=NEW_TOP
-#endif
-
-INCLUDE= -I$(BUILDTOP)/include -I$(BUILDTOP)/lib -I$(BUILDTOP)/db $(COM_ERR_INC) $(GDSS_INC) -I/usr/athena/include $(OSINCLUDES) $(LOCAL_INCLUDES)
-CFLAGS=$(DBG) $(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
-LINTFLAGS=$(INCLUDE) $(DEFINES) $(GLOBAL_CDEFS)
-
-#include "config.Imakefile"
-#ifndef USELOCALTOOLS
-/* The makedepend program */
-DEPEND=$(BUILDTOP)/util/makedepend/makedepend
-/* The Imake command line */
-IMAKE=$(BUILDTOP)/util/imake/imake -I$(BUILDTOP)/util/imake.includes
-#else
-DEPEND=makedepend
-IMAKE=imake -I$(BUILDTOP)/util/imake.includes
-#endif
-
-#include "Imake.rules"
-
-#include INCLUDE_IMAKEFILE
-
-#ifdef have_subdirs
-do_subdirs($(SUBDIRS))
-#endif
-
-depend_target()
-clean_target()
-makefile_target()
-
-install::
-
-Makefiles::
-
-/**/# DO NOT DELETE THIS LINE
diff --git a/util/imake.includes/Makefile b/util/imake.includes/Makefile
deleted file mode 100644 (file)
index acef0dc..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#      $Source$
-#      $Author$
-#      $Header$
-#
-# Copyright 1988 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information, please see the file
-# <mit-copyright.h>.
-#
-# Makefile for copying Imake configuration files
-LNSOURCES = \
-       ${SRCDIR}/util/imake.includes/Imake.rules \
-       ${SRCDIR}/util/imake.includes/Imake.tmpl
-CPSOURCES = ${SRCDIR}/util/imake.includes/config.Imakefile
-DESTDIR =
-SRCDIR = /mit/moiradev/src
-CP = cp
-LN = ln -s
-RM = rm -f
-
-config: $(SOURCES)
-       -mkdir $(DESTDIR)/util/imake.includes
-       for i in $(CPSOURCES); do \
-               $(RM) ${DESTDIR}/util/imake.includes/`basename $$i`; \
-               $(CP) $$i ${DESTDIR}/util/imake.includes/`basename $$i`; done
-       for i in $(LNSOURCES); do \
-               $(RM) ${DESTDIR}/util/imake.includes/`basename $$i`; \
-               $(LN) $$i ${DESTDIR}/util/imake.includes/`basename $$i`; done
-       $(RM) ${DESTDIR}/util/imake.includes/config.Imakefile
-       sed -e "s|/mit/moiradev/src|${SRCDIR}|" \
-               ${SRCDIR}/util/imake.includes/config.Imakefile \
-               > ${DESTDIR}/util/imake.includes/config.Imakefile
diff --git a/util/imake.includes/config.Imakefile b/util/imake.includes/config.Imakefile
deleted file mode 100644 (file)
index a96d79f..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-/**/#  $Source$
-/**/#
-
-/* 
- * Configuration options.
- */
-
-/* GLOBAL_CDEFS are passed to every C compile statement */
-
-#ifdef _AIX
-OSDEFS= -D_BSD -D_BSD_INCLUDES -DPOSIX
-OSLIBS= -lbsd
-#endif
-
-#if defined(linux) || defined(__NetBSD__)
-OSDEFS= -DPOSIX
-#endif
-
-#ifdef sgi
-OSDEFS= -DPOSIX -DNEED_GETUSERSHELL
-#endif
-
-#if defined(SOLARIS)
-OSDEFS= -DPOSIX -DSOLARIS
-OSLIBS= -lresolv -lsocket -lnsl
-#endif
-
-#ifdef NeXT
-OSLIBS= -lresolv
-#endif
-
-#ifdef __alpha
-OSDEFS= -DSIXTYFOUR -DPOSIX
-#endif
-
-GLOBAL_CDEFS= -DHESIOD -DZEPHYR -DATHENA -DDBMS=ORACLE -I/usr/athena/include $(OSDEFS)
-
-
-/* SRCTOP is the root of the Moira source tree */
-SRCTOP=/mit/moiradev/src
-
-/* DESTDIR is the root of the tree to install into.  
- * If null, install into the running system.
- *
- * DESTDIR='/' is guaranteed to cause trouble for systems which don't
- * like double slashes in pathnames.
- *
- * All the installed programs and files are put into ${DESTDIR}/wherever, e.g.
- * kinit would get installed into ${DESTDIR}${PROGDIR}/kuser
- */
-
-DESTDIR= 
-
-/*
- * These directories should be subdirectories of DESTDIR;
- * they show up as absolute pathnames here.
- */
-/*
- * Note: USRDIR should be the parent of most of these directories.
- * If it is not, you may get errors when installing (the installation
- * process attempts to create USRDIR, in order to assure that all the
- * parents of these directories exist.
- */
-USRDIR= /usr
-ETCDIR= /usr/athena/etc
-PROGDIR=/usr/athena/bin
-LIBDIR= /usr/athena/lib
-LINTLIBDIR = /usr/lib/lint
-INCLDIR= /usr/athena/include
-MANDIR= /usr/athena/man
-
-
-/*
- * Define SVRBUILD if this machine has your DBMS installed on it so
- * that the server programs can be built which link against the DBMS
- * libraries.
- */
-/* #define SVRBUILD */
-
-/* Define USELOCALTOOLS if you already have built and installed in
- * your environment the following tools:
-       imake
-       makedepend
- */
-#define USELOCALTOOLS
-
-/* Define USELOCALLIBS if you already have built and installed in
- * your environment the following libraries and associated tools:
-       com_err
- */
-/* we want the newer versions from our source tree */
-/* #define USELOCALLIBS */
-
-/*
- * Define HESIOD if you have hesiod installed on your system and want
- * to use it for the Moira clients to find the Moira server.
- */
-#define HESIOD
-
-/*
- * Define ZEPHYR if you have zephyr installed on your system and want
- * to use it to report Moira server errors.  Also define the library
- * to link against.
- */
-#define ZEPHYR
-LZEPHYR=-lzephyr
-
-/*
- * Define GDSS if you use the Generic Data Signature Service to 
- * stamp user records to guarentee their authenticity.  Also define
- * location of library and includes.
- */
-#define GDSS
-#define DO_GDSS
-LIBGDSS= $(BUILDTOP)/util/gdss/lib/libgdss.a
-GDSSINC= -DGDSS -I$(BUILDTOP)/util/gdss/include
-
-/*
- * Define your DBMS here.  Currently only ORACLE is supported.
- */
-#define ORACLE
-
-/*
- * Define NEED_STRCASECMP if you don't have strcasecmp() in your libc.
- * (likely for older 4.3 systems and pre-4.3 systems)
- */
-/* #define NEED_STRCASECMP */
-
-MR_LIB=$(BUILDTOP)/lib/libmoira.a
-MR_LIBDEP=$(MR_LIB)
-
-/*
- * The name of a command which compiles error tables.
- */
-#ifdef USELOCALLIBS
-COMPILE_ET= compile_et
-#else
-COMPILE_ET= $(BUILDTOP)/util/et/compile_et
-#endif
-/*
- * Loader argument to get the com_err library
- */
-#ifdef USELOCALLIBS
-COM_ERR = -lcom_err
-#else
-COM_ERR = $(BUILDTOP)/util/et/libcom_err.a
-#endif
-/*
- * Dependency name for COM_ERR, if any
- */
-#ifndef USELOCALLIBS
-COM_ERR_DEP = $(COM_ERR)
-COM_ERR_INC = -I$(BUILDTOP)/util/et/
-#endif
-
-LLIB = -L/usr/athena/lib
-
-/* libraries most Moira programs use */
-#ifdef HESIOD
-CLIBS= $(MR_LIB) $(LLIB) $(LZEPHYR) $(COM_ERR) -lkrb -ldes -lhesiod
-#else
-CLIBS= $(MR_LIB) $(LLIB) $(LZEPHYR) $(COM_ERR) -lkrb -ldes
-#endif
-
-/* libraries SQL programs need */
-#ifdef ORACLE
-SQL_LIB= -L/usr/oracle/lib -lsql /usr/oracle/lib/osntab.o -lsqlnet -lora -lsqlnet -lora -lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lsocket -lnsl -lm -lm -ldl -laio
-#endif
-
-/* optional readline support for mrtest */
-READLINE_INCLUDES= -I/mit/gnu/include/readline -DUSE_READLINE
-READLINE_LIBS= -L/mit/gnu/lib -lreadline -ltermcap
-
-/* Define NEED_STRCASECMP if your C library doesn't have the BSD-style
- * case insensitive string compare strcasecmp().
- */
-#ifdef _AIX
-#define NEED_STRCASECMP
-#endif
-
-/* HAS_VSPRINTF should be defined if this function is in your C library */
-#if !defined(ultrix) && (!defined(sun) || defined(SOLARIS))
-#define HAS_VSPRINTF
-#endif
-
-/* Curses library */
-#ifdef SOLARIS
-CURSES= -L/usr/css/lib -lcurses -ltermcap
-#elif linux
-CURSES= -lncurses -ltermcap
-OSINCLUDES= -I/usr/include/ncurses
-#elif _AIX
-CURSES= -lcurses
-#else
-CURSES= -lcurses -ltermcap
-#endif
-
-/* X and motif (for mmoira client) */
-#ifdef SOLARIS
-XDIR= /usr/openwin
-#else
-XDIR= /usr/X11
-#endif
-
-#if !(defined(linux) || defined(__NetBSD__))
-MOTIFINC= /mit/motif/include
-MOTIFLIB= /mit/motif/`machtype`lib
-#endif
-
-/* where crypt is, if not libc and unistd.h */
-#ifdef __NetBSD__
-CRYPT= -lcrypt
-#endif
-#if defined(sgi) || defined(SOLARIS)
-#define USE_CRYPT_H
-#endif
-
-
-/*
- * The name of a command which builds an object library.
- */
-ARCHIVE= ar cru
-
-/*
- * The name of another program needed to post-process the archive.
- */
-#if defined(SOLARIS) || defined(sgi)
-RANLIB= /bin/true
-#else
-RANLIB= ranlib
-#endif
-
-
-/* 
- * Install commands:  installs a file into the destination tree.
- * These commands are called with two arguments: the source and the
- * destination of the install.
- */
-/* install a file */
-INSTALLFILE= install -c -m 444
-/* install a library */ 
-INSTALLLIB= install -c -m 444
-/* install a program */
-INSTALLPROG= install -c -m 555 
-/* invoke raw install program */
-INSTALLRAW= install
-
-LD=ld                  /* The name of the target's linker */
-
-#ifdef SOLARIS
-CC=gcc
-#else
-#ifdef _AIX
-#ifdef i386
-CC=cc -q -D_BSD -DBSD_INCLUDES
-#else /* i386 */
-CC=cc -D_BSD -D_BSD_INCLUDES   /* Use BSD style header files & be quiet */
-#endif /* i386 */
-#else /* _AIX */
-CC=cc                  /* The name of the C compiler for the target */
-#endif /* _AIX */
-#endif /* SOLARIS */
-
-CPP=$(CC) -E           /* A command which invokes the C preprocessor */
-
-#ifndef _AIX           /* RS6K optomizer is buggy, we don't know if it wall affect moira */
-DBG=-g                 /* Debug or optimize? */
-#endif /* _AIX */
-
-SHELL=/bin/sh          /* shell to use from make */
-MAKE=make              /* name of make program */
-RM=rm -f               /* delete one or more files/directories/links */
-MV=mv                  /* rename/move a file */
-CP=cp                  /* copy a file */
-LN=ln -s               /* create a link */
-LPR=lpr -p             /* print a file or files */
-CHMOD=chmod            /* change mode of a file */
-AWK=awk                        /* used to filter embeded SQL files */
diff --git a/util/imake.includes/informix.awk b/util/imake.includes/informix.awk
deleted file mode 100644 (file)
index ee2c612..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-BEGIN                          {state = 0}
-$1=="#ifsql"&&$2=="INFORMIX"   {state = 0; printf("\n"); next}
-$1=="#ifsql"                   {state = 1; printf("\n"); next}
-$1=="#elsesql"                 {state = 1-state; printf("\n"); next}
-$1=="#endsql"                  {state = 0; printf("\n"); next}
-state==1                       {printf("\n"); next}
-state==0
diff --git a/util/imake.includes/ingres.awk b/util/imake.includes/ingres.awk
deleted file mode 100644 (file)
index 9426e28..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-BEGIN                          {state = 0}
-$1=="#ifsql"&&$2=="INGRES"     {state = 0; printf("\n"); next}
-$1=="#ifsql"                   {state = 1; printf("\n"); next}
-$1=="#elsesql"                 {state = 1-state; printf("\n"); next}
-$1=="#endsql"                  {state = 0; printf("\n"); next}
-state==1                       {printf("\n"); next}
-state==0
diff --git a/util/imake.includes/oracle.awk b/util/imake.includes/oracle.awk
deleted file mode 100644 (file)
index c341f30..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-BEGIN                          {state = 0}
-$1=="#ifsql"&&$2=="ORACLE"     {state = 0; printf("\n"); next}
-$1=="#ifsql"                   {state = 1; printf("\n"); next}
-$1=="#elsesql"                 {state = 1-state; printf("\n"); next}
-$1=="#endsql"                  {state = 0; printf("\n"); next}
-state==1                       {printf("\n"); next}
-state==0
diff --git a/util/makeconfig b/util/makeconfig
deleted file mode 100644 (file)
index 6d89e47..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# $Header$
-#
-#  Copyright 1990 by the Massachusetts Institute of Technology.
-# 
-#  For copying and distribution information,
-#  please see the file <mit-copyright.h>.
-#
-# Makefile for creating a Moira configuration
-#
-# This Makefile creates the directories needed to hold Moira
-# object files and executables.  It also installs the Imakefiles.
-# This also copies in the Imake and make depend program and Imake macros.
-# By default, the Imakefiles are copied into the configuration
-# and made writeable.  If a link is preferred, change LN to "ln".
-#
-# The default distination for the configuration is the current
-# directory; defaults for destination and source directories may be
-# specified, e.g.:
-#
-# make -f makeconfig SRCDIR=/u2/lockers/moira DESTDIR=myconfig
-
-DESTDIR        = .
-SRCDIR         = /mit/moiradev/src
-
-SYNCTREE = /usr/athena/etc/synctree
-
-all:
-       $(SYNCTREE) -q -s $(SRCDIR) -d $(DESTDIR)
-
-       rm -f $(DESTDIR)/Makefile
-       cp $(SRCDIR)/Makefile $(DESTDIR)/
-       chmod o+w $(DESTDIR)/Makefile
-
-       rm -f $(DESTDIR)/util/imake.includes/config.Imakefile
-       sed -e "s|/mit/moiradev/src|${SRCDIR}|" \
-               ${SRCDIR}/util/imake.includes/config.Imakefile \
-               > ${DESTDIR}/util/imake.includes/config.Imakefile
diff --git a/util/makedepend/Imakefile b/util/makedepend/Imakefile
deleted file mode 100644 (file)
index 8a4ca2f..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-# $Source$
-# $Author$
-# $Header$
-#
-# Copyright 1987 by the Massachusetts Institute of Technology.
-#
-# For copying and distribution information,
-# please see the file <mit-copyright.h>.
-#
-# Utility to build makefile header dependancies from C source.
-#
-# If you have source for cpp...
-#
-#ifdef cpp_source_path
-SRCS = include.c main.c parse.c pr.c cppsetup.c cpp.c cpy.y
-SOURCES = \
-       ${SRCDIR}/util/makedepend/include.c \
-       ${SRCDIR}/util/makedepend/main.c \
-       ${SRCDIR}/util/makedepend/parse.c \
-       ${SRCDIR}/util/makedepend/pr.c \
-       ${SRCDIR}/util/makedepend/cppsetup.c \
-       ${SRCDIR}/util/makedepend/cpp.ed \
-       ${SRCDIR}/util/makedepend/def.h \
-       ${SRCDIR}/util/makedepend/Imakefile \
-       ${SRCDIR}/util/makedepend/Makefile
-OBJS = include.o main.o parse.o pr.o cppsetup.o cpp.o cpy.o
-DEFINES = -DCPP '-DINCLUDEDIR="/usr/include"'
-CPPSRC = cpp_source_path
-
-#else
-
-#
-# But if you don't have cpp source...
-#
-SRCS = include.c main.c parse.c pr.c cppsetup.c
-SOURCES = \
-       ${SRCDIR}/util/makedepend/include.c \
-       ${SRCDIR}/util/makedepend/main.c \
-       ${SRCDIR}/util/makedepend/parse.c \
-       ${SRCDIR}/util/makedepend/pr.c \
-       ${SRCDIR}/util/makedepend/cppsetup.c \
-       ${SRCDIR}/util/makedepend/def.h \
-       ${SRCDIR}/util/makedepend/Imakefile \
-       ${SRCDIR}/util/makedepend/Makefile
-OBJS = include.o main.o parse.o pr.o cppsetup.o
-DEFINES = '-DINCLUDEDIR="/usr/include"'
-
-#endif
-
-CODE=$(SRCS) Imakefile
-
-genutil(makedepend,$(OBJS),,)
-
-cpy.c: cpy.y yylex.c
-       yacc cpy.y
-       sed -e '/^# *line/d' < y.tab.c > cpy.c
-       $(RM) y.tab.c
-
-cpy.y: $(CPPSRC)/cpy.y
-       $(RM) $@
-       $(LN) $(CPPSRC)/cpy.y .
-
-yylex.c: $(CPPSRC)/yylex.c
-       $(RM) $@
-       sed -e 's/#if pdp11 | vax | mc68000/& | ns16000 | ibm032/' \
-               $(CPPSRC)/yylex.c > yylex.c
-
-cpp.c: $(CPPSRC)/cpp.c cpp.ed
-       $(RM) cpp.c
-       /lib/cpp $(CPPSRC)/cpp.c \
-               | cb \
-               | sed -e '/^$$/d' -e '/^#/d' -e 's/     / /g' > cpp.c
-       sed -e '/^#/d' < cpp.ed | ed - cpp.c
-
-cpp.o: cpp.c
-cpy.o: cpy.c
-
-clean::
-       $(RM) cpp.c cpy.? yylex.c
-
-config: $(SOURCES)
-       -mkdir $(DESTDIR)/util/makedepend
-       for i in $(SOURCES); do \
-               $(RM) ${DESTDIR}/util/makedepend/`basename $$i`; \
-               $(CP) $$i ${DESTDIR}/util/makedepend/`basename $$i`; done
-
This page took 0.428871 seconds and 5 git commands to generate.