diff --git a/ChangeLog b/ChangeLog
index 38a216728f1126996bfcec1e9b6d36ed0bf44f54..35a29f7318e349a25815e877e8c7992ea72516de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,30 @@
 Sun Mar  6 02:13:55 1994  Per Cederqvist  (ceder@lysator.liu.se)
 
+	* Release 1.6.
+
+	* doc/ADMINISTRATION: Talked about start_kom, stop_kom and the
+	program updateLysKOM.
+
+	* INSTALL: Updated/rewritten for LysKOM 1.6.
+
+	* scripts/mkmi.m4 (LK_STD): Now takes an optional argument: what
+	`all' should depend on.  Defaults to `libraries'.
+	* Makefile.src (LK_STD): Make `all' depend on includes,
+	stamp-depend, libraries and binaries.
+	(stamp-depend): New target.
+	(depend): No longer depends on includes.
+	(dodistclean): Remove stamp-depend.
+	(dist): Remove stamp-* from the distribution.
+	* src/Makefile.src (LK_STD): Make `all' depend on includes,
+	libraries and binaries.
+
+	* scripts/Depend.make, scripts/Parallell-depend.make,
+	scripts/RCS-depend.make, scripts/Single-depend.make,
+	scripts/install-includes.make, scripts/sub-binaries.make,
+	scripts/sub-clean.make, scripts/sub-depend.make,
+	scripts/sub-includes.make, scripts/sub-install.make,
+	scripts/sub-libraries.make: Removed.
+
 	* doc/man/Makefile.src (doinstall): mkinstalldirs before trying to
 	install the man-pages.
 
diff --git a/Makefile.in b/Makefile.in
index 3aa1ded6aec394150d6c5578bc290af83ff4d9e7..477c13db9a32b45361edfbfe82cec8e9d4ef4a20 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,5 +1,4 @@
-#
-# $Id: Makefile.in,v 1.6 1993/11/22 18:34:37 ceder Exp $
+# $Id: Makefile.in,v 1.7 1994/03/06 22:56:24 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -23,84 +22,128 @@
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
 
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
 
-SUBDIRS = doc scripts src # config # junk
-SERVER-VER = 1.5
+all: msg includes stamp-depend libraries binaries end-msg
 
-all: msg includes libraries binaries end-msg
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
 
-@ALL_DESCEND@
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
+SUBDIRS = doc scripts src run-support
+SERVER-VER = 1.6
 
-doincludes:;
-dolibraries:;
-dobinaries:;
-doinstall:;
-dodepend:;
-dopure: dorealclean
-	$(RM) configure
-dorealclean: dodistclean;
-dodistclean: doclean
-	$(RM) $(GENERIC-DISTCLEAN) config.status
-	$(RM) lib/lib*.a
-	rmdir lib
-doclean: domostlyclean;
-domostlyclean:
-	$(RM) $(GENERIC-MOSTLYCLEAN)
 
 includes: $(INCLUDEDIR)
-depend: $(INCLUDEDIR) msg includes
 libraries: lib
 
 lib:
 	mkdir lib
 
-configure: configure.in
-	autoconf
+$(srcdir)/configure: configure.in
+	autoconf $(srcdir)/configure.in > $(srcdir)/configure
+
+# Make depend must be run once before we start to compile, but since
+# it takes a long time we don't want to run it everytime somebody says
+# "make".  If you make big changes you should run "make depend".
+stamp-depend:
+	$(MAKE) depend
+	touch stamp-depend
 
-distribution: distclean configure
-	find . -name '#*#' -print
+.PHONY: dist
+dist: $(srcdir)/configure
+	[ ! -f $(srcdir)/Makefile ]
+	cd $(srcdir); ./mkmi
 	-$(RM) -r lyskom-$(SERVER-VER)
-	$(MKDIR) lyskom-$(SERVER-VER)
-	cp README-serverrelease lyskom-$(SERVER-VER)/README
-	cp COPYING INSTALL configure configure.in Build Makefile.in \
-		lyskom-$(SERVER-VER)/
-	$(MKDIR) lyskom-$(SERVER-VER)/src
-	cp src/Makefile.in lyskom-$(SERVER-VER)/src/
-	$(MKDIR) lyskom-$(SERVER-VER)/src/libraries
-	cp src/libraries/Makefile.in lyskom-$(SERVER-VER)/src/libraries/
-	$(MKDIR) lyskom-$(SERVER-VER)/doc
+	for i in "" /src /src/libraries /doc /scripts; do\
+		$(MKDIR) lyskom-$(SERVER-VER)$$i||exit 1;\
+	done
+	if [ -f $(srcdir)/README-serverrelease ] ;then \
+		cp $(srcdir)/README-serverrelease lyskom-$(SERVER-VER)/README;\
+	else\
+		cp $(srcdir)/README lyskom-$(SERVER-VER)/README;\
+	fi
+	for i in COPYING INSTALL configure configure.in Build Makefile.in \
+		Makefile.src mkmi; \
+	    do cp $(srcdir)/$$i lyskom-$(SERVER-VER)/||exit 1; done
+	cp $(srcdir)/src/Makefile.in lyskom-$(SERVER-VER)/src/
+	cp $(srcdir)/src/Makefile.src lyskom-$(SERVER-VER)/src/
+	cp $(srcdir)/src/libraries/Makefile.in \
+	    lyskom-$(SERVER-VER)/src/libraries/
+	cp $(srcdir)/src/libraries/Makefile.src \
+	    lyskom-$(SERVER-VER)/src/libraries/
 	for i in ADMINISTRATION Makefile.in misc_items prot-A.txt	\
-		server-async.extend server.extend what-is-unread.swe; 	\
+		server-async.extend server.extend what-is-unread.swe 	\
+		server-config.extend Makefile.src;			\
 	do 								\
-		cp doc/$$i lyskom-$(SERVER-VER)/doc/$i;			\
+		cp $(srcdir)/doc/$$i lyskom-$(SERVER-VER)/doc/$i||exit 1;\
 	done
-	cp -r doc/man lyskom-$(SERVER-VER)/doc/man
-	cp -r scripts lyskom-$(SERVER-VER)/scripts
-	$(RM) lyskom-$(SERVER-VER)/scripts/import.make
-	cp -r run-support lyskom-$(SERVER-VER)/run-support
-	cp -r src/libraries/libansi lyskom-$(SERVER-VER)/src/libraries
-	cp -r src/libraries/libcommon lyskom-$(SERVER-VER)/src/libraries
-	cp -r src/libraries/libisc-new lyskom-$(SERVER-VER)/src/libraries
-	cp -r src/libraries/libmisc lyskom-$(SERVER-VER)/src/libraries
-	cp -r src/libraries/regex lyskom-$(SERVER-VER)/src/libraries
-	cp -r src/server lyskom-$(SERVER-VER)/src
-	cp -r src/include lyskom-$(SERVER-VER)/src/include
+	cp -r $(srcdir)/doc/man lyskom-$(SERVER-VER)/doc/man
+	for i in mkmi.m4 Makefile.src Makefile.in; do\
+	    cp $(srcdir)/scripts/$$i lyskom-$(SERVER-VER)/scripts/||exit 1; \
+	done
+	cp -r $(srcdir)/run-support lyskom-$(SERVER-VER)/run-support
+	for i in libansi libcommon libisc-new libmisc regex ; do \
+		cp -r $(srcdir)/src/libraries/$$i \
+			lyskom-$(SERVER-VER)/src/libraries \
+		|| exit 1 ; \
+	done
+	cp -r $(srcdir)/src/server lyskom-$(SERVER-VER)/src
+	cp -r $(srcdir)/src/include lyskom-$(SERVER-VER)/src/include
 	$(RM) -r lyskom-$(SERVER-VER)/src/include/ansi
-	cp -r db-crypt lyskom-$(SERVER-VER)
-	cp -r db-nocrypt lyskom-$(SERVER-VER)
-	find lyskom-$(SERVER-VER) -name CVS -print -exec rm -rf "{}" \; -prune
+	cp -r $(srcdir)/db-crypt lyskom-$(SERVER-VER)
+	cp -r $(srcdir)/db-nocrypt lyskom-$(SERVER-VER)
+	find lyskom-$(SERVER-VER) \
+	    \( -name CVS -o -name '*~' -o -name '#*#' -o -name 'lib*.a' \
+		 -o -name '*.o' -o -name '.#*' -o -name core \
+		 -o -name Makefile.in2 -o -name 'stamp-*' \) \
+	    -print -exec rm -rf "{}" \; -prune
 	tar cvf lyskom-$(SERVER-VER).tar lyskom-$(SERVER-VER)
 	$(RM) lyskom-$(SERVER-VER).tar.gz
-	gzip lyskom-$(SERVER-VER).tar
+	gzip -9v lyskom-$(SERVER-VER).tar
 	$(RM) -r lyskom-$(SERVER-VER)
 
+.PHONY: msg
 msg:
 	@date
 	@echo
 
+.PHONY: end-msg
 end-msg:
 	@echo
 	@echo Finished at
@@ -108,3 +151,135 @@ end-msg:
 
 $(INCLUDEDIR):
 	mkdir $(INCLUDEDIR)
+
+.PHONY: includes
+includes: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	$(SCRIPTDIR)/mkinstalldirs $(prefix) $(exec_prefix) $(bindir) $(dbdir)\
+		$(etcdir) $(coredir)
+	chmod 700 $(dbdir)
+	if [ ! -f $(dbdir)/lyskomd-data ] && [ ! -f $(dbdir)/lyskomd-texts ];\
+	  then cp $(srcdir)/db-crypt/db/lyskomd-data $(dbdir)/lyskomd-data && \
+	       cp $(srcdir)/db-crypt/db/lyskomd-texts $(dbdir)/lyskomd-texts ;\
+	  else true; fi
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dopure: dorealclean
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
+dodistclean: doclean
+	$(RM) $(GENERIC-DISTCLEAN) config.status
+	$(RM) lib/lib*.a stamp-depend
+	rmdir lib
+
+doclean: domostlyclean
+
+domostlyclean:
+	$(RM) $(GENERIC-MOSTLYCLEAN)
+
+# End output from LK_CLEAN
+
diff --git a/SERVER-RELEASE b/SERVER-RELEASE
index 2e51f8cc006d345274ab5737ad811d9c5015ee3a..9440c08fc071f31054160917b47bb1d254ef4566 100644
--- a/SERVER-RELEASE
+++ b/SERVER-RELEASE
@@ -1,6 +1,13 @@
 Att g|ra inf|r varje server-release: (Denna lista {r ej n|dv{ndigtvis
 fullst{ndig).
 
+*** Se till att updateLysKOM beter sig som en riktigt tomte.  Bakgrund och
+hela k|ret.
+
+*** mkmi.m4 (eller kanske mkmi) borde substituera bort $-tecknen s}
+att keyword expansion ej sker.  Borde l{gga till nya
+keyword-expansionstecken.
+
 Fixa versionsnumret i:
 
 	doc/ADMINISTRATION
@@ -11,9 +18,11 @@ Skriv en rad i:
 	
 	ChangeLog
 
+Checka in allt.
+
 G|r:
 
-	make distribution
+	make dist
 
 G|r:
 
diff --git a/configure b/configure
new file mode 100755
index 0000000000000000000000000000000000000000..a33ef796319d5916d5cf4d86c31b061b6012a017
--- /dev/null
+++ b/configure
@@ -0,0 +1,1350 @@
+#!/bin/sh
+# From configure.in Revision: 1.16 
+
+#!/bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf.
+# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp]
+#        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]]
+# Ignores all args except --srcdir, --prefix, --exec-prefix, and
+# --with-PACKAGE[=VALUE] unless this script has special code to handle it.
+
+for arg
+do
+  # Handle --exec-prefix with a space before the argument.
+  if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
+  # Handle --host with a space before the argument.
+  elif test x$next_host = xyes; then next_host=
+  # Handle --prefix with a space before the argument.
+  elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
+  # Handle --srcdir with a space before the argument.
+  elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
+  else
+    case $arg in
+     # For backward compatibility, recognize -exec-prefix and --exec_prefix.
+     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
+	exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
+     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
+	next_exec_prefix=yes ;;
+
+     -gas | --gas | --ga | --g) ;;
+
+     -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
+     -host | --host | --hos | --ho | --h)
+	next_host=yes ;;
+
+     -nfp | --nfp | --nf) ;;
+
+     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+	prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
+     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+	next_prefix=yes ;;
+
+     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
+	srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
+     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
+	next_srcdir=yes ;;
+
+     -with-* | --with-*)
+       package=`echo $arg|sed -e 's/-*with-//' -e 's/=.*//'`
+       # Reject names that aren't valid shell variable names.
+       if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+         echo "configure: $package: invalid package name" >&2; exit 1
+       fi
+       package=`echo $package| sed 's/-/_/g'`
+       case "$arg" in
+         *=*) val="`echo $arg|sed 's/[^=]*=//'`" ;;
+         *) val=1 ;;
+       esac
+       eval "with_$package='$val'" ;;
+
+     -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
+       verbose=yes ;;
+
+     *) ;;
+    esac
+  fi
+done
+
+trap 'rm -fr conftest* confdefs* core; exit 1' 1 3 15
+trap 'rm -f confdefs*' 0
+
+# NLS nuisances.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
+if test "${LANG+set}"   = 'set' ; then LANG=C;   export LANG;   fi
+
+rm -f conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1'
+
+# 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.
+unique_file=src/server/lyskomd.h
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  srcdirdefaulted=yes
+  # Try the directory containing this script, then `..'.
+  prog=$0
+  confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
+  test "X$confdir" = "X$prog" && confdir=.
+  srcdir=$confdir
+  if test ! -r $srcdir/$unique_file; then
+    srcdir=..
+  fi
+fi
+if test ! -r $srcdir/$unique_file; then
+  if test x$srcdirdefaulted = xyes; then
+    echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
+  else
+    echo "configure: Can not find sources in \`${srcdir}'." 1>&2
+  fi
+  exit 1
+fi
+# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
+# But we can't avoid them for `..', to make subdirectories work.
+case $srcdir in
+  .|/*|~*) ;;
+  *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
+esac
+
+
+# Save the original args to write them into config.status later.
+configure_args="$*"
+
+if test -z "$CC"; then
+  # Extract the first word of `gcc', so it can be a program name with args.
+  set dummy gcc; word=$2
+  echo checking for $word
+  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/$word; then
+      CC="gcc"
+      break
+    fi
+  done
+  IFS="$saveifs"
+fi
+test -z "$CC" && CC="cc"
+test -n "$CC" && test -n "$verbose" && echo "	setting CC to $CC"
+
+# Find out if we are using GNU C, under whatever name.
+cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes
+#endif
+EOF
+${CC-cc} -E conftest.c > conftest.out 2>&1
+if egrep yes conftest.out >/dev/null 2>&1; then
+  GCC=1 # For later tests.
+fi
+rm -f conftest*
+
+
+
+
+
+INCLUDE_CURRENT=-I.
+if test -n "$GCC"; then
+	test -n "$verbose" && echo adding -g -O -ansi -Wall -pipe
+	CFLAGS="$CFLAGS -g -O -Wall -ansi -pipe"
+	DEPENDFLAG=-MM
+else
+	test -n "$verbose" && echo adding -g
+	CFLAGS="$CFLAGS -g"
+	case "$CC" in
+		*vcc) DEPENDFLAG=-Em
+			INCLUDE_CURRENT='-I`pwd`';;
+		*) DEPENDFLAG=-M;;
+	esac
+fi
+test -n "$verbose" && echo Setting DEPENDFLAG to $DEPENDFLAG
+echo checking for AIX
+echo checking how to run the C preprocessor
+if test -z "$CPP"; then
+  # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and ``${CC-cc}'' will simply confuse
+  # make.  It must be expanded now.
+  CPP="${CC-cc} -E"
+  cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <stdio.h>
+Syntax Error
+EOF
+err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
+if test -z "$err"; then
+  :
+else
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+test ".${verbose}" != "." && echo "	setting CPP to $CPP"
+
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#ifdef _AIX
+  yes
+#endif
+
+EOF
+eval "$CPP conftest.c > conftest.out 2>&1"
+if egrep "yes" conftest.out >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+{
+test -n "$verbose" && \
+echo "	defining _ALL_SOURCE"
+echo "#define" _ALL_SOURCE 1 >> confdefs.h
+DEFS="$DEFS -D_ALL_SOURCE=1"
+}
+
+
+fi
+rm -f conftest*
+
+
+echo checking for POSIXized ISC
+if test -d /etc/conf/kconfig.d &&
+  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+  ISC=1 # If later tests want to check for ISC.
+  
+{
+test -n "$verbose" && \
+echo "	defining _POSIX_SOURCE"
+echo "#define" _POSIX_SOURCE 1 >> confdefs.h
+DEFS="$DEFS -D_POSIX_SOURCE=1"
+}
+
+  if test -n "$GCC"; then
+    CC="$CC -posix"
+  else
+    CC="$CC -Xp"
+  fi
+fi
+
+echo checking for minix/config.h
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <minix/config.h>
+EOF
+err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
+if test -z "$err"; then
+  rm -rf conftest*
+  MINIX=1
+
+fi
+rm -f conftest*
+
+# The Minix shell can't assign to the same variable on the same line!
+if test -n "$MINIX"; then
+  
+{
+test -n "$verbose" && \
+echo "	defining _POSIX_SOURCE"
+echo "#define" _POSIX_SOURCE 1 >> confdefs.h
+DEFS="$DEFS -D_POSIX_SOURCE=1"
+}
+
+  
+{
+test -n "$verbose" && \
+echo "	defining" _POSIX_1_SOURCE to be 2
+echo "#define" _POSIX_1_SOURCE 2 >> confdefs.h
+DEFS="$DEFS -D_POSIX_1_SOURCE=2"
+}
+
+  
+{
+test -n "$verbose" && \
+echo "	defining _MINIX"
+echo "#define" _MINIX 1 >> confdefs.h
+DEFS="$DEFS -D_MINIX=1"
+}
+
+fi
+
+LIBS_save="${LIBS}"
+LIBS="${LIBS} -lseq"
+have_lib=""
+echo checking for -lseq
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { main(); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  have_lib="1"
+
+fi
+rm -f conftest*
+LIBS="${LIBS_save}"
+if test -n "${have_lib}"; then
+   :; LIBS="$LIBS -lseq"
+else
+   :; 
+fi
+
+
+LIBS_save="${LIBS}"
+LIBS="${LIBS} -lsun"
+have_lib=""
+echo checking for -lsun
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { main(); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  have_lib="1"
+
+fi
+rm -f conftest*
+LIBS="${LIBS_save}"
+if test -n "${have_lib}"; then
+   :; LIBS="$LIBS -lsun"
+else
+   :; 
+fi
+
+
+prog='/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25,17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}'
+echo checking for lack of working const
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { $prog }
+EOF
+if eval $compile; then
+  :
+else
+  rm -rf conftest*
+  
+{
+test -n "$verbose" && \
+echo "	defining" const to be empty
+echo "#define" const  >> confdefs.h
+DEFS="$DEFS -Dconst="
+}
+
+fi
+rm -f conftest*
+
+echo checking for ANSI C header files
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
+if test -z "$err"; then
+  rm -rf conftest*
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+echo '#include "confdefs.h"
+#include <string.h>' > conftest.c
+eval "$CPP conftest.c > conftest.out 2>&1"
+if egrep "memchr" conftest.out >/dev/null 2>&1; then
+  rm -rf conftest*
+  # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+eval $compile
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+  
+{
+test -n "$verbose" && \
+echo "	defining STDC_HEADERS"
+echo "#define" STDC_HEADERS 1 >> confdefs.h
+DEFS="$DEFS -DSTDC_HEADERS=1"
+}
+
+
+fi
+rm -fr conftest*
+
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+echo checking for HPUX and struct sockaddr
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <sys/socket.h>
+int main() { exit(0); }
+int t() { struct sockaddr foo; }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  test -n "$verbose" && echo '	'No action needed
+
+else
+  rm -rf conftest*
+  test -n "$verbose" && echo '	'Checking for a fix; echo checking for _HPUX_SOURCE to fix problems
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#define _HPUX_SOURCE
+#include <sys/socket.h>
+int main() { exit(0); }
+int t() { struct sockaddr foo; }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  
+{
+test -n "$verbose" && \
+echo "	defining _HPUX_SOURCE"
+echo "#define" _HPUX_SOURCE 1 >> confdefs.h
+DEFS="$DEFS -D_HPUX_SOURCE=1"
+}
+
+
+else
+  rm -rf conftest*
+  test -n "$verbose" && echo '	'Problem remains
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+SRCTOPDIR=`cd $srcdir;pwd`
+
+BUILDTOPDIR=`pwd`
+# Make sure to not get the incompatible SysV /etc/install and
+# /usr/sbin/install, which might be in PATH before a BSD-like install,
+# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
+# or the AFS install, which mishandles nonexistent args, or
+# /usr/ucb/install on SVR4, which tries to use the nonexistent group
+# `staff'.  On most BSDish systems install is in /usr/bin, not /usr/ucb
+# anyway.  Sigh.
+if test "z${INSTALL}" = "z" ; then
+  echo checking for install
+  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    case $dir in
+    /etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
+    *)
+      if test -f $dir/installbsd; then
+	INSTALL="$dir/installbsd -c" # OSF1
+	INSTALL_PROGRAM='$(INSTALL)'
+	INSTALL_DATA='$(INSTALL) -m 644'
+	break
+      fi
+      if test -f $dir/install; then
+	if grep dspmsg $dir/install >/dev/null 2>&1; then
+	  : # AIX
+	else
+	  INSTALL="$dir/install -c"
+	  INSTALL_PROGRAM='$(INSTALL)'
+	  INSTALL_DATA='$(INSTALL) -m 644'
+	  break
+	fi
+      fi
+      ;;
+    esac
+  done
+  IFS="$saveifs"
+fi
+INSTALL=${INSTALL-cp}
+test -n "$verbose" && echo "	setting INSTALL to $INSTALL"
+INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
+test -n "$verbose" && echo "	setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
+INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
+test -n "$verbose" && echo "	setting INSTALL_DATA to $INSTALL_DATA"
+
+if test -z "$RANLIB"; then
+  # Extract the first word of `ranlib', so it can be a program name with args.
+  set dummy ranlib; word=$2
+  echo checking for $word
+  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/$word; then
+      RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$saveifs"
+fi
+test -z "$RANLIB" && RANLIB=":"
+test -n "$RANLIB" && test -n "$verbose" && echo "	setting RANLIB to $RANLIB"
+
+for p in mawk gawk nawk awk
+do
+if test -z "$AWK"; then
+  # Extract the first word of `$p', so it can be a program name with args.
+  set dummy $p; word=$2
+  echo checking for $word
+  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/$word; then
+      AWK="$p"
+      break
+    fi
+  done
+  IFS="$saveifs"
+fi
+
+test -n "$AWK" && test -n "$verbose" && echo "	setting AWK to $AWK"
+
+test -n "$AWK" && break
+done
+
+echo checking for ln -s
+rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  LN_S="ln -s"
+else
+  LN_S=ln
+fi
+
+
+for p in 'bison -y' byacc
+do
+if test -z "$YACC"; then
+  # Extract the first word of `$p', so it can be a program name with args.
+  set dummy $p; word=$2
+  echo checking for $word
+  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/$word; then
+      YACC="$p"
+      break
+    fi
+  done
+  IFS="$saveifs"
+fi
+
+test -n "$YACC" && test -n "$verbose" && echo "	setting YACC to $YACC"
+
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+if test -z "$LEX"; then
+  # Extract the first word of `flex', so it can be a program name with args.
+  set dummy flex; word=$2
+  echo checking for $word
+  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/$word; then
+      LEX="flex"
+      break
+    fi
+  done
+  IFS="$saveifs"
+fi
+test -z "$LEX" && LEX="lex"
+test -n "$LEX" && test -n "$verbose" && echo "	setting LEX to $LEX"
+
+if test -z "$LEXLIB"
+then
+  case "$LEX" in
+  flex*) LIBS_save="${LIBS}"
+LIBS="${LIBS} -lfl"
+have_lib=""
+echo checking for -lfl
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { main(); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  have_lib="1"
+
+fi
+rm -f conftest*
+LIBS="${LIBS_save}"
+if test -n "${have_lib}"; then
+   :; LEXLIB="-lfl"
+else
+   :; 
+fi
+ ;;
+  *) LEXLIB="-ll" ;;
+  esac
+fi
+
+for p in sed
+do
+if test -z "$SED"; then
+  # Extract the first word of `$p', so it can be a program name with args.
+  set dummy $p; word=$2
+  echo checking for $word
+  IFS="${IFS= 	}"; saveifs="$IFS"; IFS="${IFS}:"
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/$word; then
+      SED="$p"
+      break
+    fi
+  done
+  IFS="$saveifs"
+fi
+
+test -n "$SED" && test -n "$verbose" && echo "	setting SED to $SED"
+
+test -n "$SED" && break
+done
+
+for hdr in string.h memory.h strings.h sys/param.h sys/time.h
+do
+trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
+echo checking for ${hdr}
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <${hdr}>
+EOF
+err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
+if test -z "$err"; then
+  rm -rf conftest*
+  
+{
+test -n "$verbose" && \
+echo "	defining ${trhdr}"
+echo "#define" ${trhdr} 1 >> confdefs.h
+DEFS="$DEFS -D${trhdr}=1"
+}
+
+
+fi
+rm -f conftest*
+done
+
+for hdr in stdarg.h stdlib.h stddef.h locale.h
+do
+trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
+echo checking for ${hdr}
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <${hdr}>
+EOF
+err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
+if test -z "$err"; then
+  rm -rf conftest*
+  
+{
+test -n "$verbose" && \
+echo "	defining ${trhdr}"
+echo "#define" ${trhdr} 1 >> confdefs.h
+DEFS="$DEFS -D${trhdr}=1"
+}
+
+
+fi
+rm -f conftest*
+done
+
+echo checking for whether time.h and sys/time.h may both be included
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() { exit(0); }
+int t() { struct tm *tp; }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  
+{
+test -n "$verbose" && \
+echo "	defining TIME_WITH_SYS_TIME"
+echo "#define" TIME_WITH_SYS_TIME 1 >> confdefs.h
+DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
+}
+
+
+fi
+rm -f conftest*
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+echo checking for working alloca.h
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <alloca.h>
+int main() { exit(0); }
+int t() { char *p = alloca(2 * sizeof(int)); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  
+{
+test -n "$verbose" && \
+echo "	defining HAVE_ALLOCA_H"
+echo "#define" HAVE_ALLOCA_H 1 >> confdefs.h
+DEFS="$DEFS -DHAVE_ALLOCA_H=1"
+}
+
+
+fi
+rm -f conftest*
+
+decl="#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else
+#if HAVE_ALLOCA_H
+#include <alloca.h>
+#else
+#ifdef _AIX
+ #pragma alloca
+#else
+char *alloca ();
+#endif
+#endif
+#endif
+"
+echo checking for alloca
+cat > conftest.c <<EOF
+#include "confdefs.h"
+$decl
+int main() { exit(0); }
+int t() { char *p = (char *) alloca(1); }
+EOF
+if eval $compile; then
+  :
+else
+  rm -rf conftest*
+  alloca_missing=1
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+#if defined(CRAY) && ! defined(CRAY2)
+winnitude
+#else
+lossage
+#endif
+
+EOF
+eval "$CPP conftest.c > conftest.out 2>&1"
+if egrep "winnitude" conftest.out >/dev/null 2>&1; then
+  rm -rf conftest*
+  echo checking for _getb67
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <ctype.h>
+int main() { exit(0); }
+int t() { 
+/* 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__getb67) || defined (__stub____getb67)
+choke me
+#else
+/* Override any gcc2 internal prototype to avoid an error.  */
+extern char _getb67(); _getb67();
+#endif
+ }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  {
+test -n "$verbose" && \
+echo "	defining" CRAY_STACKSEG_END to be _getb67
+echo "#define" CRAY_STACKSEG_END _getb67 >> confdefs.h
+DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
+}
+
+
+else
+  rm -rf conftest*
+  echo checking for GETB67
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <ctype.h>
+int main() { exit(0); }
+int t() { 
+/* 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_GETB67) || defined (__stub___GETB67)
+choke me
+#else
+/* Override any gcc2 internal prototype to avoid an error.  */
+extern char GETB67(); GETB67();
+#endif
+ }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  {
+test -n "$verbose" && \
+echo "	defining" CRAY_STACKSEG_END to be GETB67
+echo "#define" CRAY_STACKSEG_END GETB67 >> confdefs.h
+DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
+}
+
+
+else
+  rm -rf conftest*
+  echo checking for getb67
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <ctype.h>
+int main() { exit(0); }
+int t() { 
+/* 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_getb67) || defined (__stub___getb67)
+choke me
+#else
+/* Override any gcc2 internal prototype to avoid an error.  */
+extern char getb67(); getb67();
+#endif
+ }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  {
+test -n "$verbose" && \
+echo "	defining" CRAY_STACKSEG_END to be getb67
+echo "#define" CRAY_STACKSEG_END getb67 >> confdefs.h
+DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
+}
+
+
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+if test -n "$alloca_missing"; then
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+  # that cause trouble.  Some versions do not even contain alloca or
+  # contain a buggy version.  If you still want to use their alloca,
+  # use ar to extract alloca.o from them instead of compiling alloca.c.
+  ALLOCA=alloca.o
+  
+{
+test -n "$verbose" && \
+echo "	defining C_ALLOCA"
+echo "#define" C_ALLOCA 1 >> confdefs.h
+DEFS="$DEFS -DC_ALLOCA=1"
+}
+
+
+  echo 'checking stack direction for C alloca'
+  echo checking whether cross-compiling
+# If we cannot run a trivial program, we must be cross compiling.
+cat > conftest.c <<EOF
+#include "confdefs.h"
+main(){exit(0);}
+EOF
+eval $compile
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+  :
+else
+  cross_compiling=1
+fi
+rm -fr conftest*
+
+if test -n "$cross_compiling"
+then
+  
+{
+test -n "$verbose" && \
+echo "	defining" STACK_DIRECTION to be 0
+echo "#define" STACK_DIRECTION 0 >> confdefs.h
+DEFS="$DEFS -DSTACK_DIRECTION=0"
+}
+
+else
+cat > conftest.c <<EOF
+#include "confdefs.h"
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+  exit (find_stack_direction() < 0);
+}
+EOF
+eval $compile
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+  
+{
+test -n "$verbose" && \
+echo "	defining" STACK_DIRECTION to be 1
+echo "#define" STACK_DIRECTION 1 >> confdefs.h
+DEFS="$DEFS -DSTACK_DIRECTION=1"
+}
+
+
+else
+  
+{
+test -n "$verbose" && \
+echo "	defining" STACK_DIRECTION to be -1
+echo "#define" STACK_DIRECTION -1 >> confdefs.h
+DEFS="$DEFS -DSTACK_DIRECTION=-1"
+}
+
+fi
+fi
+rm -fr conftest*
+fi
+
+LIBS_save="${LIBS}"
+LIBS="${LIBS} -lresolv"
+have_lib=""
+echo checking for -lresolv
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { main(); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  have_lib="1"
+
+fi
+rm -f conftest*
+LIBS="${LIBS_save}"
+if test -n "${have_lib}"; then
+   
+{
+test -n "$verbose" && \
+echo "	defining HAVE_LIBRESOLV"
+echo "#define" HAVE_LIBRESOLV 1 >> confdefs.h
+DEFS="$DEFS -DHAVE_LIBRESOLV=1"
+}
+
+   LIBS="${LIBS} -lresolv"
+fi
+ LIBS_save="${LIBS}"
+LIBS="${LIBS} -lauthuser"
+have_lib=""
+echo checking for -lauthuser
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { main(); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  have_lib="1"
+
+fi
+rm -f conftest*
+LIBS="${LIBS_save}"
+if test -n "${have_lib}"; then
+   
+{
+test -n "$verbose" && \
+echo "	defining HAVE_LIBAUTHUSER"
+echo "#define" HAVE_LIBAUTHUSER 1 >> confdefs.h
+DEFS="$DEFS -DHAVE_LIBAUTHUSER=1"
+}
+
+   LIBS="${LIBS} -lauthuser"
+fi
+ LIBS_save="${LIBS}"
+LIBS="${LIBS} -lsocket"
+have_lib=""
+echo checking for -lsocket
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { main(); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  have_lib="1"
+
+fi
+rm -f conftest*
+LIBS="${LIBS_save}"
+if test -n "${have_lib}"; then
+   
+{
+test -n "$verbose" && \
+echo "	defining HAVE_LIBSOCKET"
+echo "#define" HAVE_LIBSOCKET 1 >> confdefs.h
+DEFS="$DEFS -DHAVE_LIBSOCKET=1"
+}
+
+   LIBS="${LIBS} -lsocket"
+fi
+ LIBS_save="${LIBS}"
+LIBS="${LIBS} -lnsl"
+have_lib=""
+echo checking for -lnsl
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { main(); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  have_lib="1"
+
+fi
+rm -f conftest*
+LIBS="${LIBS_save}"
+if test -n "${have_lib}"; then
+   
+{
+test -n "$verbose" && \
+echo "	defining HAVE_LIBNSL"
+echo "#define" HAVE_LIBNSL 1 >> confdefs.h
+DEFS="$DEFS -DHAVE_LIBNSL=1"
+}
+
+   LIBS="${LIBS} -lnsl"
+fi
+ LIBS_save="${LIBS}"
+LIBS="${LIBS} -li"
+have_lib=""
+echo checking for -li
+cat > conftest.c <<EOF
+#include "confdefs.h"
+
+int main() { exit(0); }
+int t() { main(); }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  have_lib="1"
+
+fi
+rm -f conftest*
+LIBS="${LIBS_save}"
+if test -n "${have_lib}"; then
+   
+{
+test -n "$verbose" && \
+echo "	defining HAVE_LIBI"
+echo "#define" HAVE_LIBI 1 >> confdefs.h
+DEFS="$DEFS -DHAVE_LIBI=1"
+}
+
+   LIBS="${LIBS} -li"
+fi
+ for func in difftime getdtablesize sysconf strchr getcwd vfprintf
+do
+trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'`
+echo checking for ${func}
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <ctype.h>
+int main() { exit(0); }
+int t() { 
+/* 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_${func}) || defined (__stub___${func})
+choke me
+#else
+/* Override any gcc2 internal prototype to avoid an error.  */
+extern char ${func}(); ${func}();
+#endif
+ }
+EOF
+if eval $compile; then
+  rm -rf conftest*
+  {
+test -n "$verbose" && \
+echo "	defining ${trfunc}"
+echo "#define" ${trfunc} 1 >> confdefs.h
+DEFS="$DEFS -D${trfunc}=1"
+}
+
+
+fi
+rm -f conftest*
+done
+
+for func in memcpy difftime strerror remove memset memchr
+do
+echo checking for ${func}
+cat > conftest.c <<EOF
+#include "confdefs.h"
+#include <ctype.h>
+int main() { exit(0); }
+int t() { 
+/* 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_${func}) || defined (__stub___${func})
+choke me
+#else
+/* Override any gcc2 internal prototype to avoid an error.  */
+extern char ${func}(); ${func}();
+#endif
+ }
+EOF
+if eval $compile; then
+  :
+else
+  rm -rf conftest*
+  LIBOBJS="$LIBOBJS ${func}.o"
+test -n "$verbose" && echo "	using ${func}.o instead"
+fi
+rm -f conftest*
+
+done
+
+DEFS="$DEFS -DBUGGY_INET_NTOA=1 -DENCRYPT_PASSWORDS=1 -DSERVER=1"
+# Set default prefixes.
+if test -n "$prefix"; then
+  test -z "$exec_prefix" && exec_prefix='${prefix}'
+  prsub="s%^prefix\\([ 	]*\\)=\\([ 	]*\\).*$%prefix\\1=\\2$prefix%"
+fi
+if test -n "$exec_prefix"; then
+  prsub="$prsub
+s%^exec_prefix\\([ 	]*\\)=\\([ 	]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
+fi
+# Quote sed substitution magic chars in DEFS.
+cat >conftest.def <<EOF
+$DEFS
+EOF
+escape_ampersand_and_backslash='s%[&\\]%\\&%g'
+DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
+rm -f conftest.def
+# Substitute for predefined variables.
+
+trap 'rm -f config.status; exit 1' 1 3 15
+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 $configure_args
+
+for arg
+do
+  case "\$arg" in
+    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args
+    exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;;
+    *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
+  esac
+done
+
+trap 'rm -f Makefile
+doc/Makefile
+doc/man/Makefile
+scripts/Makefile
+src/Makefile
+src/include/Makefile
+src/include/server/Makefile
+src/libraries/Makefile
+src/libraries/libansi/Makefile
+src/libraries/libcommon/Makefile
+src/libraries/libisc-new/Makefile
+src/libraries/libisc-new/src/Makefile
+src/libraries/libmisc/Makefile
+src/libraries/regex/Makefile
+src/server/Makefile
+run-support/Makefile; exit 1' 1 3 15
+CC='$CC'
+CFLAGS='$CFLAGS'
+LDFLAGS='$LDFLAGS'
+DEPENDFLAG='$DEPENDFLAG'
+INCLUDE_CURRENT='$INCLUDE_CURRENT'
+CPP='$CPP'
+SRCTOPDIR='$SRCTOPDIR'
+BUILDTOPDIR='$BUILDTOPDIR'
+INSTALL='$INSTALL'
+INSTALL_PROGRAM='$INSTALL_PROGRAM'
+INSTALL_DATA='$INSTALL_DATA'
+RANLIB='$RANLIB'
+AWK='$AWK'
+LN_S='$LN_S'
+YACC='$YACC'
+LEX='$LEX'
+LEXLIB='$LEXLIB'
+SED='$SED'
+ALLOCA='$ALLOCA'
+LIBOBJS='$LIBOBJS'
+LIBS='$LIBS'
+srcdir='$srcdir'
+DEFS='$DEFS'
+prefix='$prefix'
+exec_prefix='$exec_prefix'
+prsub='$prsub'
+extrasub='$extrasub'
+EOF
+cat >> config.status <<\EOF
+
+top_srcdir=$srcdir
+
+CONFIG_FILES=${CONFIG_FILES-"Makefile
+doc/Makefile
+doc/man/Makefile
+scripts/Makefile
+src/Makefile
+src/include/Makefile
+src/include/server/Makefile
+src/libraries/Makefile
+src/libraries/libansi/Makefile
+src/libraries/libcommon/Makefile
+src/libraries/libisc-new/Makefile
+src/libraries/libisc-new/src/Makefile
+src/libraries/libmisc/Makefile
+src/libraries/regex/Makefile
+src/server/Makefile
+run-support/Makefile"}
+for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then
+  srcdir=$top_srcdir
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  dir=`echo $file|sed 's%/[^/][^/]*$%%'`
+  if test "$dir" != "$file"; then
+    test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
+    test ! -d $dir && mkdir $dir
+  fi
+  echo creating $file
+  rm -f $file
+  echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
+  sed -e "
+$prsub
+$extrasub
+s%@CC@%$CC%g
+s%@CFLAGS@%$CFLAGS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@DEPENDFLAG@%$DEPENDFLAG%g
+s%@INCLUDE_CURRENT@%$INCLUDE_CURRENT%g
+s%@CPP@%$CPP%g
+s%@SRCTOPDIR@%$SRCTOPDIR%g
+s%@BUILDTOPDIR@%$BUILDTOPDIR%g
+s%@INSTALL@%$INSTALL%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@RANLIB@%$RANLIB%g
+s%@AWK@%$AWK%g
+s%@LN_S@%$LN_S%g
+s%@YACC@%$YACC%g
+s%@LEX@%$LEX%g
+s%@LEXLIB@%$LEXLIB%g
+s%@SED@%$SED%g
+s%@ALLOCA@%$ALLOCA%g
+s%@LIBOBJS@%$LIBOBJS%g
+s%@LIBS@%$LIBS%g
+s%@srcdir@%$srcdir%g
+s%@DEFS@%$DEFS%
+" $top_srcdir/${file}.in >> $file
+fi; done
+
+
+exit 0
+EOF
+chmod +x config.status
+${CONFIG_SHELL-/bin/sh} config.status
+
diff --git a/doc/ADMINISTRATION b/doc/ADMINISTRATION
index e496e106001ac0fa58f9d74b848f308a4576d05c..33a0eb16319461d86acfd136bbe87abac23bcad7 100644
--- a/doc/ADMINISTRATION
+++ b/doc/ADMINISTRATION
@@ -29,7 +29,7 @@ is to be run on the database, the LysKOM server *must* be stopped, or
 unrepairable damage may result.  See below for a description on how to
 stop the server.
 
-  There is a shell script called updateLysKOM which is used to ensure
+  There is a program called updateLysKOM which is used to ensure
 continuous operation.  This script is run with certain intervals and
 if the LysKOM server has died for some reason, updateLysKOM restarts
 it.  If the server is still running properly, updateLysKOM sends a
@@ -46,3 +46,14 @@ a small memory leak in the server (typically, less than 10 memory
 blocks leaks per server run).  We know about it, so there is no need
 to send bug reports to us about that (unless you have found where the
 leak is).
+
+  To prevent updateLysKOM from restarting a server, create a file
+named /usr/lyskom/etc/status.  The file should contain a valid mail
+address on the first line.  The shell script stop_kom will create such
+a file.  UpdateLysKOM will not restart the server as long as that file
+exists.  In addition, if the file is between 1 and 2 hours old an
+email will be sent to the mail address found in the file.  If the file
+is older than that, mail will be sent to ceder. FIXME///+++<<<>>>
+
+  The shell script start_kom will remove the status file and run
+updateLysKOM.
diff --git a/doc/Makefile.in b/doc/Makefile.in
index d6f40450d1cb1cfc6c94069e6c56ed28d7d2c4f9..06f7cd2e9f64299898aedbafb3bd959320d293f4 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.2 1993/10/10 11:38:33 ceder Exp $
+# $Id: Makefile.in,v 1.3 1994/03/06 22:56:52 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,26 +22,169 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
-
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
+SHELL = /bin/sh
+
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
 
 SUBDIRS = man
+.PHONY: includes
+includes: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
 
-all:;
-depend:;
-includes:;
-libraries:;
-binaries:;
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-@CLEAN@
-@INSTALL_DESCEND@
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dopure: dorealclean
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
 
-doinstall:;
-dopure: dorealclean;
-dorealclean: dodistclean;
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
+
+# End output from LK_CLEAN
+
diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in
index b5237dfb4f642fc87b925f301cad245cc122b9aa..2dc84fc56f0e242d1db128c15159e5c12ca5b449 100644
--- a/doc/man/Makefile.in
+++ b/doc/man/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.3 1994/02/24 10:38:51 ceder Exp $
+# $Id: Makefile.in,v 1.4 1994/03/06 22:57:02 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,35 +22,186 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
-@STDLYSKOM@
+# Begin LK_STD
+srcdir = @srcdir@
+VPATH = @srcdir@
+SHELL = /bin/sh
 
-man5dir = \$(prefix)/man/man5\\
-man8dir = \$(prefix)/man/man8\\
-man5ext = .5\\
-man8ext = .8\\
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
+
+SUBDIRS =
+man5dir = $(prefix)/man/man5
+man8dir = $(prefix)/man/man8
+man5ext = .5
+man8ext = .8
 
 # List of man pages in the various sections to install
 MAN5 = lyskom
 MAN8 = dbck lyskomd updateLysKOM
 
-all:;
-depend:;
+.PHONY: includes
+includes: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	-$(SCRIPTDIR)/mkinstalldirs $(man5dir) $(man8dir)
+	-for i in $(MAN5); do \
+		$(INSTALL_DATA) $(srcdir)/$$i.5 $(man5dir)/$$i$(man5ext); \
+	done
+	-for i in $(MAN8); do \
+		$(INSTALL_DATA) $(srcdir)/$$i.8 $(man8dir)/$$i$(man8ext); \
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-@CLEAN@
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
+
 doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
 
-install:
-	-for i in $(MAN5); \
-	do \
-		$(INSTALL_DATA) $$i.5 $(man5dir)/$$i.$(man5ext); \
-	done
-	-for i in $(MAN8); \
-	do \
-		$(INSTALL_DATA) $$i.8 $(man8dir)/$$i.$(man8ext); \
-	done
+# End output from LK_CLEAN
+
diff --git a/run-support/Makefile.in b/run-support/Makefile.in
new file mode 100644
index 0000000000000000000000000000000000000000..d540ce54edba4fb48f4500f991df26bd3ec5f000
--- /dev/null
+++ b/run-support/Makefile.in
@@ -0,0 +1,201 @@
+#
+# $Id: Makefile.in,v 1.1 1994/03/06 22:57:11 ceder Exp $
+# Copyright (C) 1994  Lysator Academic Computer Association.
+#
+# This file is part of the LysKOM server.
+# 
+# LysKOM is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by 
+# the Free Software Foundation; either version 1, or (at your option) 
+# any later version.
+# 
+# LysKOM is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with LysKOM; see the file COPYING.  If not, write to
+# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
+# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
+# MA 02139, USA.
+#
+# Please mail bug reports to bug-lyskom@lysator.liu.se. 
+#
+
+# Begin LK_STD
+srcdir = @srcdir@
+VPATH = @srcdir@
+SHELL = /bin/sh
+
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
+SUBDIRS = 
+SCRIPTS = stop_kom start_kom
+
+.PHONY: includes
+includes: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	for i in $(SCRIPTS); do \
+	    sed -e s+@ETCDIR@+$(etcdir)+ -e s+@BINDIR@+$(bindir)+ \
+		$(srcdir)/$$i.sh > $$i;\
+	    chmod +x $$i;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	for i in $(SCRIPTS); do \
+	    $(INSTALL_PROGRAM) $$i $(bindir); \
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dopure: dorealclean
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
+dodistclean: doclean
+	$(RM) $(GENERIC-DISTCLEAN)
+
+doclean: domostlyclean
+
+domostlyclean:
+	$(RM) $(GENERIC-MOSTLYCLEAN)
+
+# End output from LK_CLEAN
+
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index f81bb62bd3dc80dbd7f581f136c7c0091fe0245c..4e14ee401af880bced05a1cc09d264bc90c2284e 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.2 1993/10/10 11:38:46 ceder Exp $
+# $Id: Makefile.in,v 1.3 1994/03/06 22:57:20 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,23 +22,169 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
-
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
+SHELL = /bin/sh
 
-all:;
-depend:;
-install:;
-includes:;
-libraries:;
-binaries:;
-	
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
+SUBDIRS=
+.PHONY: includes
+includes: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-@CLEAN@
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
+
+# End output from LK_CLEAN
+	
diff --git a/src/Makefile.in b/src/Makefile.in
index a14437e1325ed6876dac4c34f7af2dfb6000b7d8..98b2c5e59d929f1722a53dad8be023259a0ff971 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.2 1993/10/10 11:38:53 ceder Exp $
+# $Id: Makefile.in,v 1.3 1994/03/06 22:57:57 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,26 +22,169 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
-
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
-
-SUBDIRS = include libraries server # komutils clients
+SHELL = /bin/sh
 
 all: includes libraries binaries
 
-@ALL_DESCEND@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
+SUBDIRS = include libraries server
+.PHONY: includes
+includes: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-doincludes:;
-dolibraries:;
-dobinaries:;
-doinstall:;
-dodepend:;
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
+
+# End output from LK_CLEAN
+
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index 068dd02844bbc31dbe73919daf90190922fd6ccb..92ebdc33a905e96fd4df73f5338c2295348a48d6 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.2 1993/10/10 11:39:03 ceder Exp $
+# $Id: Makefile.in,v 1.3 1994/03/06 22:58:07 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,37 +22,181 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
-
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
 
-SUBDIRS = server # ansi 
+all: libraries
 
-INSTALL-HDRS = compiler.h debug.h kom-types.h config.h kom-errno.h \
-	misc-types.h services.h rcs.h
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
 
-all: includes libraries binaries
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
 
-libraries:;
-binaries:;
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
 
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
+SUBDIRS = server
+INSTALL-HDRS = compiler.h debug.h kom-types.h config.h kom-errno.h \
+		misc-types.h services.h rcs.h
+HDRS-DIR =$(INCLUDEDIR)
 
-@INCLUDES_DESCEND@
-doincludes:
+.PHONY: includes
+includes: 
+	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
 	for i in $(INSTALL-HDRS) ; \
-	do	\
-		( cmp $(srcdir)/$$i $(INCLUDEDIR)/$$i 2>/dev/null ) \
-		  || cp $(srcdir)/$$i $(INCLUDEDIR)/$$i; \
-	done;
+	do if ( cmp $(srcdir)/$$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
+             true; else\
+		$(RM) $(HDRS-DIR)/$$i;\
+		if $(INSTALL_DATA) $(srcdir)/$$i $(HDRS-DIR)/$$i;\
+		then true ; else exit 1; fi; fi;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-@CLEAN@
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
 
-depend:;
+# End output from LK_CLEAN
+
diff --git a/src/include/server/Makefile.in b/src/include/server/Makefile.in
index e3562774bebd05e4903f715756022adbc8a6f934..0346a92d172df4b5d7dce590fb79f9ad1729fecb 100644
--- a/src/include/server/Makefile.in
+++ b/src/include/server/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.2 1993/10/10 11:39:11 ceder Exp $
+# $Id: Makefile.in,v 1.3 1994/03/06 22:58:17 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,34 +22,179 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
+
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
 
 INSTALL-HDRS = smalloc.h
+HDRS-DIR =$(INCLUDEDIR)/server
+
+.PHONY: includes
+includes: 
+	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
+	for i in $(INSTALL-HDRS) ; \
+	do if ( cmp $(srcdir)/$$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
+             true; else\
+		$(RM) $(HDRS-DIR)/$$i;\
+		if $(INSTALL_DATA) $(srcdir)/$$i $(HDRS-DIR)/$$i;\
+		then true ; else exit 1; fi; fi;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-all: includes libraries binaries
+dependencies:
+	touch dependencies
 
-libraries:;
-binaries:;
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-.PHONY : includes
-includes:
-	if [ ! -d $(INCLUDEDIR)/server ] ;then \
-		 $(MKDIR) $(INCLUDEDIR)/server; \
-	fi
-	for i in $(INSTALL-HDRS);\
-	do	\
-		( cmp $(srcdir)/$$i $(INCLUDEDIR)/server/$$i 2>/dev/null ) \
-		|| cp $(srcdir)/$$i $(INCLUDEDIR)/server/$$i; \
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
 	done
 
-@CLEAN@
-depend:;
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
+
+# End output from LK_CLEAN
+
diff --git a/src/libraries/Makefile.in b/src/libraries/Makefile.in
index 3345441971568ff82a06130525c67adab0e8abb8..fac1b36794ad095726ad944afeb32a0d31f7119b 100644
--- a/src/libraries/Makefile.in
+++ b/src/libraries/Makefile.in
@@ -1,33 +1,190 @@
+#
+# $Id: Makefile.in,v 1.6 1994/03/06 22:58:27 ceder Exp $
+# Copyright (C) 1991  Lysator Academic Computer Association.
+#
+# This file is part of the LysKOM server.
+# 
+# LysKOM is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by 
+# the Free Software Foundation; either version 1, or (at your option) 
+# any later version.
+# 
+# LysKOM is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with LysKOM; see the file COPYING.  If not, write to
+# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
+# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
+# MA 02139, USA.
+#
+# Please mail bug reports to bug-lyskom@lysator.liu.se. 
+#
+# Begin LK_STD
+srcdir = @srcdir@
 VPATH = @srcdir@
-SUBMAKEFLAGS = MAKE='${MAKE}' OPTFLAGS='${OPTFLAGS}'
+SHELL = /bin/sh
 
-# This target is used by tty-client.
-all: libclient-sup.a liblyskom-client.a libmisc.a
+all: libraries
 
-.PHONY: libclient-sup.a liblyskom-client.a libmisc.a
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
 
-libclient-sup.a:
-	cd libclient; ${MAKE} -f client-Makefile ${SUBMAKEFLAGS}
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
 
-liblyskom-client.a:
-	cd libcommon; ${MAKE} -f client-Makefile ${SUBMAKEFLAGS}
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
 
-libmisc.a:
-	cd libmisc; ${MAKE} -f client-Makefile ${SUBMAKEFLAGS}
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
 
-# The remaining of the Makefile is used by the server.
-@STDLYSKOM@
 SUBDIRS = libisc-new libansi regex libcommon libmisc
-@ALL_DESCEND@
-doincludes:;
-dolibraries:;
-dobinaries:;
-doinstall:;
-dodepend:;
+.PHONY: includes
+includes: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
+
+# End output from LK_CLEAN
+
diff --git a/src/libraries/libansi/Makefile.in b/src/libraries/libansi/Makefile.in
index c93fefc8a4cec0832a5b25c7ea59df43d5afb8bb..371557d0cf5661a40ebc7d7517c93975667400fe 100644
--- a/src/libraries/libansi/Makefile.in
+++ b/src/libraries/libansi/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.3 1993/10/10 22:33:52 ceder Exp $
+# $Id: Makefile.in,v 1.4 1994/03/06 22:58:39 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,43 +22,194 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
 
-LIBNAME = libansi$(PROFILE-LIB-SUFFIX).a
-LIBOBJS = @LIBOBJS@ empty.o
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
 
 INSTALL-HDRS = tmp-difftime.h
+HDRS-DIR =$(INCLUDEDIR)
 
-all:	$(LIBNAME)
+LIBNAME = libansi$(PROFILE-LIB-SUFFIX).a
+LIBOBJS = @LIBOBJS@ empty.o
 
 $(LIBNAME): $(LIBOBJS)
-	$(AR) $(ARFLAGS) $(LIBNAME) $?
-	$(RANLIB) $(LIBNAME)
+	$(AR) $(ARFLAGS) $@ $?
+	$(RANLIB) $@
 
-include $(SCRIPTDIR)/install-includes.make
 
+.PHONY: includes
+includes: 
+	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
+	for i in $(INSTALL-HDRS) ; \
+	do if ( cmp $(srcdir)/$$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
+             true; else\
+		$(RM) $(HDRS-DIR)/$$i;\
+		if $(INSTALL_DATA) $(srcdir)/$$i $(HDRS-DIR)/$$i;\
+		then true ; else exit 1; fi; fi;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
 libraries: $(LIBNAME)
 	$(RM) $(LIBDIR)/$(LIBNAME)
 	cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
 	$(TOUCHLIB) $(LIBDIR)/$(LIBNAME)
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-binaries:;
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: $(C_SPECIALS)
+	$(CC) $(DEPENDFLAG) $(ALL_CFLAGS) $(srcdir)/*.c $(C_SPECIALS) \
+		>dependencies
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-@CLEAN@
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
 
-# Recreate the Makefile
-include $(SCRIPTDIR)/Single-depend.make
+# End output from LK_CLEAN
 
 tags:
-	etags -t *.[hc]	
-
-include dependencies
+	etags -t *.[hc]
diff --git a/src/libraries/libcommon/Makefile.in b/src/libraries/libcommon/Makefile.in
index 54258f169d00a4e03421b03b20c68de03b0b7761..6e41cff264aff5324529765744e9c4df28b43659 100644
--- a/src/libraries/libcommon/Makefile.in
+++ b/src/libraries/libcommon/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.2 1993/10/10 11:39:38 ceder Exp $
+# $Id: Makefile.in,v 1.3 1994/03/06 22:58:50 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,42 +22,194 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
-LIBOBJS = kom-errno.o misc-parser.o parser.o
-INSTALL-HDRS = misc-parser.h parser.h
-LIBRARIES = liblyskom-server$(PROFILE-LIB-SUFFIX).a
+SHELL = /bin/sh
+
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
 
-all: $(LIBRARIES)
+LIBNAME = liblyskom-server$(PROFILE-LIB-SUFFIX).a
+LIBOBJS = kom-errno.o misc-parser.o parser.o
 
-liblyskom-server$(PROFILE-LIB-SUFFIX).a: $(LIBOBJS)
+$(LIBNAME): $(LIBOBJS)
 	$(AR) $(ARFLAGS) $@ $?
 	$(RANLIB) $@
 
-@CLEAN@
+INSTALL-HDRS = misc-parser.h parser.h
+HDRS-DIR =$(INCLUDEDIR)
+
+
+.PHONY: includes
+includes: 
+	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
+	for i in $(INSTALL-HDRS) ; \
+	do if ( cmp $(srcdir)/$$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
+             true; else\
+		$(RM) $(HDRS-DIR)/$$i;\
+		if $(INSTALL_DATA) $(srcdir)/$$i $(HDRS-DIR)/$$i;\
+		then true ; else exit 1; fi; fi;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: $(LIBNAME)
+	$(RM) $(LIBDIR)/$(LIBNAME)
+	cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
+	$(TOUCHLIB) $(LIBDIR)/$(LIBNAME)
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: $(C_SPECIALS)
+	$(CC) $(DEPENDFLAG) $(ALL_CFLAGS) $(srcdir)/*.c $(C_SPECIALS) \
+		>dependencies
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
+
 doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
 
-libraries: liblyskom-server$(PROFILE-LIB-SUFFIX).a
-	(cd $(LIBDIR); $(RM)  $(LIBRARIES))
-	cp $(LIBRARIES) $(LIBDIR)
-	(cd $(LIBDIR); $(TOUCHLIB) $(LIBRARIES))
-
-include $(SCRIPTDIR)/install-includes.make
-
-binaries:;
+# End output from LK_CLEAN
 
 tags:
-	etags -t $(INCLUDEDIR)/*.h *.[hc]	
-
-# Recreate the Makefile from Makefile
-
-include $(SCRIPTDIR)/Single-depend.make
-
-include dependencies
+	etags -t $(INCLUDEDIR)/*.h *.[hc]
diff --git a/src/libraries/libisc-new/Makefile.in b/src/libraries/libisc-new/Makefile.in
index 652226f136bd39f0182e94fc9caec97bfa12ab67..db6432698c8598f0973ee2598e1170bdb0b569d4 100644
--- a/src/libraries/libisc-new/Makefile.in
+++ b/src/libraries/libisc-new/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.2 1993/10/10 11:39:46 ceder Exp $
+# $Id: Makefile.in,v 1.3 1994/03/06 22:59:00 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,24 +22,169 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
+
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
 
 SUBDIRS = src
+.PHONY: includes
+includes: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-all: includes libraries binaries
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-@ALL_DESCEND@
-doincludes:;
-dolibraries:;
-dobinaries:;
-doinstall:;
-dodepend:;
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
+
+# End output from LK_CLEAN
+
diff --git a/src/libraries/libisc-new/src/Makefile.in b/src/libraries/libisc-new/src/Makefile.in
index 053d9fc14ee640a606be84961a6e3072a882350d..59adc9f85f3da0091979cd7c16cfeaa0fc3450e2 100644
--- a/src/libraries/libisc-new/src/Makefile.in
+++ b/src/libraries/libisc-new/src/Makefile.in
@@ -7,56 +7,198 @@
 #
 #
 #
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
 
-SOURCES=isc_event.c isc_session.c isc_abort.c isc_alloc.c isc_master.c\
-        isc_output.c isc_queue.c isc_message.c isc_handler.c\
-        isc_stdout.c isc_socket.c isc_tcp.c isc_udp.c printf.c
-LIBOBJS=isc_event.o isc_session.o isc_abort.o isc_alloc.o isc_master.o\
-        isc_output.o isc_queue.o isc_message.o isc_handler.o\
-        isc_stdout.o isc_socket.o isc_tcp.o isc_udp.o printf.o
+all: libraries
 
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
 
-LIBNAME = libisc-new$(PROFILE-LIB-SUFFIX).a
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
 
-INSTALL-HDRS = isc.h
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
+LIBNAME = libisc-new$(PROFILE-LIB-SUFFIX).a
+LIBOBJS = isc_event.o isc_session.o isc_abort.o isc_alloc.o isc_master.o\
+        isc_output.o isc_queue.o isc_message.o isc_handler.o\
+        isc_stdout.o isc_socket.o isc_tcp.o isc_udp.o printf.o
 
-all: 		$(LIBNAME)
+$(LIBNAME): $(LIBOBJS)
+	$(AR) $(ARFLAGS) $@ $?
+	$(RANLIB) $@
 
-binaries:;
+INSTALL-HDRS = isc-new.h
+HDRS-DIR =$(INCLUDEDIR)
 
-libraries: $(LIBDIR)/$(LIBNAME)
 
-includes:
-	( cmp $(srcdir)/isc.h $(INCLUDEDIR)/isc-new.h 2>/dev/null ) \
-	  || ( $(RM) $(INCLUDEDIR)/isc-new.h; \
-		cp $(srcdir)/isc.h $(INCLUDEDIR)/isc-new.h; \
-		chmod a-w $(INCLUDEDIR)/isc-new.h ) \
+.PHONY: includes
+includes: $(INSTALL-HDRS)
+	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
+	for i in $(INSTALL-HDRS) ; \
+	do if ( cmp $$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
+             true; else\
+		$(RM) $(HDRS-DIR)/$$i;\
+		if $(INSTALL_DATA) $$i $(HDRS-DIR)/$$i;\
+		then true ; else exit 1; fi; fi;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-$(LIBDIR)/$(LIBNAME): $(LIBNAME)
+.PHONY: libraries
+libraries: $(LIBNAME)
 	$(RM) $(LIBDIR)/$(LIBNAME)
 	cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
 	$(TOUCHLIB) $(LIBDIR)/$(LIBNAME)
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-tags:
-	etags -t *.[hc]
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
 
+.PHONY: depend
+depend: $(C_SPECIALS)
+	$(CC) $(DEPENDFLAG) $(ALL_CFLAGS) $(srcdir)/*.c $(C_SPECIALS) \
+		>dependencies
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-@CLEAN@
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
+
 doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
 
-include $(SCRIPTDIR)/Single-depend.make
-
-include dependencies
+# End output from LK_CLEAN
 
-$(LIBNAME): $(LIBOBJS)
-	$(AR) $(ARFLAGS) $(LIBNAME) $?
-	$(RANLIB) $(LIBNAME)
+tags:
+	etags -t *.[hc]
+isc-new.h: isc.h
+	cp $(srcdir)/isc.h isc-new.h
diff --git a/src/libraries/libmisc/Makefile.in b/src/libraries/libmisc/Makefile.in
index abd5dbddab039ab92d0b13530f076266db468f44..c71a7d66baaae3934504348a710d9353ed93ff72 100644
--- a/src/libraries/libmisc/Makefile.in
+++ b/src/libraries/libmisc/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.2 1993/10/10 11:39:53 ceder Exp $
+# $Id: Makefile.in,v 1.3 1994/03/06 22:59:20 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,47 +22,196 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
 
-LIBNAME = libmisc$(PROFILE-LIB-SUFFIX).a
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
 
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
+LIBNAME = libmisc$(PROFILE-LIB-SUFFIX).a
 LIBOBJS = pom.o s-collat-tabs.o s-string.o zmalloc.o
 
+$(LIBNAME): $(LIBOBJS)
+	$(AR) $(ARFLAGS) $@ $?
+	$(RANLIB) $@
+
 INSTALL-HDRS = pom.h s-collat-tabs.h s-string.h zmalloc.h
+HDRS-DIR =$(INCLUDEDIR)
 
-all:	$(LIBNAME)
 
-$(LIBNAME): $(LIBOBJS)
-	$(AR) $(ARFLAGS) $(LIBNAME) $?
-	$(RANLIB) $(LIBNAME)
+.PHONY: includes
+includes: 
+	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
+	for i in $(INSTALL-HDRS) ; \
+	do if ( cmp $(srcdir)/$$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
+             true; else\
+		$(RM) $(HDRS-DIR)/$$i;\
+		if $(INSTALL_DATA) $(srcdir)/$$i $(HDRS-DIR)/$$i;\
+		then true ; else exit 1; fi; fi;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
+.PHONY: libraries
 libraries: $(LIBNAME)
 	$(RM) $(LIBDIR)/$(LIBNAME)
 	cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
 	$(TOUCHLIB) $(LIBDIR)/$(LIBNAME)
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-include $(SCRIPTDIR)/install-includes.make
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-binaries:;
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-testnumlist: testnumlist.o numlist.o
-	$(CC) -o testnumlist testnumlist.o numlist.o
+dependencies:
+	touch dependencies
 
+.PHONY: depend
+depend: $(C_SPECIALS)
+	$(CC) $(DEPENDFLAG) $(ALL_CFLAGS) $(srcdir)/*.c $(C_SPECIALS) \
+		>dependencies
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-@CLEAN@
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
+
 doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
 
-include $(SCRIPTDIR)/Single-depend.make
+# End output from LK_CLEAN
 
+#testnumlist: testnumlist.o numlist.o
+#	$(CC) -o testnumlist testnumlist.o numlist.o
 tags:
-	etags -t $(INCLUDEDIR)/*.h *.[hc]	
-
-include dependencies
+	etags -t $(INCLUDEDIR)/*.h *.[hc]
diff --git a/src/libraries/regex/Makefile.in b/src/libraries/regex/Makefile.in
index a87216c7fc3b7b4b0c96175e4909967b567d3976..2248d08b0c81aca8959a8252ee7255d47a14047c 100644
--- a/src/libraries/regex/Makefile.in
+++ b/src/libraries/regex/Makefile.in
@@ -16,69 +16,208 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-version = 0.12
+# Note that this Makefile has been almost totally rewritten by Per
+# Cederqvist <ceder@lysator.liu.se> to fit into the LysKOM
+# environment.  If you want to use GNU regex in a project of your own,
+# you should get the latest release of GNU regex from FSF.  For your
+# own sake, do not start from these sources.  This Makefile suits
+# LysKOM, but it is inferior from the Makefile distributed by vanilla
+# regex 0.12.
+version = 0.12-lyskom
+
+# LysKOM doesn't require the doc and test subdirectory.
+# Don't bother integrating the Makefiles into the LysKOM environment.
+SUBDIRS = # doc test
 
 # Special support for LysKOM
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
+
+all: libraries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
+
 LIBNAME = libregex$(PROFILE-LIB-SUFFIX).a
 LIBOBJS = regex.o
-INSTALL-HDRS = regex.h
 
-SUBDIRS = doc test
+$(LIBNAME): $(LIBOBJS)
+	$(AR) $(ARFLAGS) $@ $?
+	$(RANLIB) $@
 
-default all:: regex.o
-.PHONY: default all
+INSTALL-HDRS = regex.h
+HDRS-DIR =$(INCLUDEDIR)
 
-$(LIBNAME): $(LIBOBJS)
-	$(AR) $(ARFLAGS) $(LIBNAME) $?
-	$(RANLIB) $(LIBNAME)
 
+regex.o: regex.c regex.h
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<
+.PHONY: includes
+includes: 
+	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
+	for i in $(INSTALL-HDRS) ; \
+	do if ( cmp $(srcdir)/$$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
+             true; else\
+		$(RM) $(HDRS-DIR)/$$i;\
+		if $(INSTALL_DATA) $(srcdir)/$$i $(HDRS-DIR)/$$i;\
+		then true ; else exit 1; fi; fi;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
 libraries: $(LIBNAME)
 	$(RM) $(LIBDIR)/$(LIBNAME)
 	cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
 	$(TOUCHLIB) $(LIBDIR)/$(LIBNAME)
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-include $(SCRIPTDIR)/install-includes.make
-depend:;
-binaries:;
+.PHONY: binaries
+binaries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-regex.o: regex.c regex.h
-	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<
-@CLEAN@
+.PHONY: install
+install: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: $(C_SPECIALS)
+	$(CC) $(DEPENDFLAG) $(ALL_CFLAGS) $(srcdir)/*.c $(C_SPECIALS) \
+		>dependencies
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dopure: dorealclean
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
 
-dopure: dorealclean;
-dorealclean: dodistclean;
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean;
+
+doclean: domostlyclean
+
 domostlyclean:
 	$(RM) $(GENERIC-MOSTLYCLEAN)
 
-makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
-DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'
-
-default all install \
-TAGS check::
-	for d in $(SUBDIRS); do (cd $$d; $(MAKE) $(makeargs) $@); done
-.PHONY: install mostlyclean clean distclean extraclean realclean TAGS check
-
-# Prevent GNU make 3 from overflowing arg limit on system V.
-.NOEXPORT:
-
-distfiles = AUTHORS ChangeLog COPYING INSTALL NEWS README \
-            *.in configure regex.c regex.h 
-distdir = regex-$(version)
-distargs = version=$(version) distdir=../$(distdir)/$$d
-dist: TAGS configure
-	@echo "Version numbers in: Makefile.in, ChangeLog, NEWS,"
-	@echo "  regex.c, regex.h,"
-	@echo "  and doc/xregex.texi (if modified)."
-	rm -rf $(distdir)
-	mkdir $(distdir)
-	ln $(distfiles) $(distdir)
-	for d in $(SUBDIRS); do (cd $$d; $(MAKE) $(distargs) dist); done
-	tar czhf $(distdir).tar.Z $(distdir)
-	rm -rf $(distdir)
-.PHONY: dist
+# End output from LK_CLEAN
+
diff --git a/src/server/ChangeLog b/src/server/ChangeLog
index 87f634cf8164828a12e2942a9c364811a8ce7379..2e01b573cc6120059002298d3cb0063d37e7b723 100644
--- a/src/server/ChangeLog
+++ b/src/server/ChangeLog
@@ -1,4 +1,11 @@
-<Sun Mar  6 20:53:37 1994  Per Cederqvist  (ceder@lysator.liu.se)
+Sun Mar  6 23:05:30 1994  Per Cederqvist  (ceder@lysator.liu.se)
+
+	* version.incl: Version 1.6 (alpha release).
+
+	* Makefile.src (LK_STD):  Make `all' depend on includes and
+	binaries.
+
+Sun Mar  6 20:53:37 1994  Per Cederqvist  (ceder@lysator.liu.se)
 
 	* Makefile.src (doinstall): Install $(PROGRAMS).
 	(PROGRAMS): Added updateLysKOM.
diff --git a/src/server/Makefile.in b/src/server/Makefile.in
index e55cf52f6e453a4449091ed7bc7c17046c9300b6..e06870316c843fe5809268bc998c9a060dc10814 100755
--- a/src/server/Makefile.in
+++ b/src/server/Makefile.in
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.in,v 1.9 1994/02/24 10:32:25 ceder Exp $
+# $Id: Makefile.in,v 1.10 1994/03/06 23:00:15 ceder Exp $
 # Copyright (C) 1991  Lysator Academic Computer Association.
 #
 # This file is part of the LysKOM server.
@@ -22,24 +22,49 @@
 #
 # Please mail bug reports to bug-lyskom@lysator.liu.se. 
 #
+# Begin LK_STD
 srcdir = @srcdir@
 VPATH = @srcdir@
-@STDLYSKOM@
+SHELL = /bin/sh
+
+all: includes binaries
+
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+ALL_CFLAGS = @INCLUDE_CURRENT@ -I@srcdir@ -I@BUILDTOPDIR@/include \
+	-I@BUILDTOPDIR@/include/server $(DEFS) $(CFLAGS)
+
+DEPENDFLAG = @DEPENDFLAG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+LEX = @LEX@
+MKDIR = mkdir
+RANLIB = @RANLIB@
+RM = rm -f
+SED = @SED@
+SYMLINK = @LN_S@
+TOUCHLIB = @RANLIB@
+YACC = @YACC@
+
+INCLUDEDIR = @BUILDTOPDIR@/include
+LIBDIR = @BUILDTOPDIR@/lib
+prefix = /usr/lyskom
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+dbdir = $(exec_prefix)/db
+etcdir = $(exec_prefix)/etc
+coredir = $(exec_prefix)/cores
+
+DEFS = @DEFS@
+LDFLAGS = @LDFLAGS@
+SCRIPTDIR = @SRCTOPDIR@/scripts
+
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+# END section from LK_STD
 
-HDRS = admin.h isc-parse.h prot-a-output.h async.h isc-interface.h \
-	prot-a-parse.h cache.h tmp-limits.h prot-a-send-async.h connections.h \
-	log.h prot-a.h dbck-cache.h lyskomd.h ram-output.h disk-cache.h \
-	manipulate.h ram-parse.h end-of-atomic.h memory.h send-async.h exp.h \
-	minmax.h internal-connections.h mux-parse.h \
-	internal-services.h mux.h text-garb.h \
-	version.incl cache-node.h conf-file.h param.h
-
-# See config/sun4os4-defs.make about LIBRESOLV if you are running SunOS 4.1.1.
-
-#LIBS = -L$(LIBDIR) \
-#	-lisc-new$(PROFILE-LIB-SUFFIX) -lmisc$(PROFILE-LIB-SUFFIX) \
-#	-llyskom-server$(PROFILE-LIB-SUFFIX) -lansi$(PROFILE-LIB-SUFFIX) \
-#	$(LIBRESOLV) $(LIBIDENT) -lregex @LIBS@
 
 LIBS = $(LIBDIR)/libisc-new$(PROFILE-LIB-SUFFIX).a \
 	$(LIBDIR)/libmisc$(PROFILE-LIB-SUFFIX).a \
@@ -51,18 +76,12 @@ LIBS = $(LIBDIR)/libisc-new$(PROFILE-LIB-SUFFIX).a \
 PROTA =  prot-a-output.o prot-a-parse-arg.o prot-a-parse.o prot-a.o \
 	 prot-a-send-async.o
 
-PROTA_SRCS = prot-a-output.c prot-a-parse-arg.c prot-a-parse.c prot-a.c \
-	     prot-a-send-async.c
-
 MUX = mux.o mux-parse.o
 
-MUX_SRCS = mux.c mux-parse.c
 # Implementations of the atomic calls.
 
 ATOMS = text.o membership.o person.o conference.o session.o admin.o \
 	regex-match.o
-ATOMS_SRCS = text.c membership.c person.c conference.c session.c admin.c \
-	regex-match.o
 
 # These files are needed by all versions of the LysKOM server.
 GENOBJS = connections.o log.o $(ATOMS) \
@@ -72,52 +91,41 @@ GENOBJS = connections.o log.o $(ATOMS) \
 	  internal-connections.o rfc931.o isc-malloc.o \
 	  conf-file.o
 
-GEN_SRCS = connections.c log.c $(ATOMS_SRCS) \
-          kom-types.c \
-          send-async.c server-config.c text-garb.c \
-          isc-parse.c memory.c $(PROTA_SRCS) $(MUX_SRCS) \
-	  internal-connections.c rfc931.c isc-malloc.c \
-	  conf-file.c
-
 # Files for lyskomd.
 
 DISKOBJS = ramkomd.o ram-smalloc.o simple-cache.o ram-parse.o ram-output.o \
 	disk-end-of-atomic.o cache-node.o string-malloc.o
 
-DISK_SRCS = ramkomd.c ram-smalloc.c simple-cache.c ram-parse.c ram-output.c \
-	disk-end-of-atomic.c cache-node.c string-malloc.c
-
+# Files for dbck.
 
 DBCK = dbck.o dbck-cache.o ram-smalloc.o ram-parse.o server-config.o\
 	kom-types.o\
 	ram-output.o memory.o conf-file.o
 
-DBCK_SRCS = dbck.c dbck-cache.c ram-smalloc.c ram-parse.c server-config.c\
-	kom-types.c\
-	ram-output.c memory.c conf-file.c
+# Files for encrypt (a program to transform the database from unencrypted
+# apasswords to encrypted).  No longer supported.
 
-ENCRYPT = encrypt-passwd.o dbck-cache.o ram-smalloc.o ram-parse.o server-config.o\
+ENCRYPT = encrypt-passwd.o dbck-cache.o ram-smalloc.o ram-parse.o \
+	server-config.o\
 	kom-types.o\
 	ram-output.o memory.o
 
-SPECIALS = call-switch.incl com.h fnc-def-init.incl prot-a-parse-arg.c\
-	prot-a-parse-arg.h fncdef-no-str-limit.txt .gdbinit
-
-SRCS = $(GEN_SRCS) $(RAM_SRCS) $(DISK_SRCS) $(LYS_SRCS) $(DBCK_SRCS)
+C_SPECIALS = prot-a-parse-arg.c
 
-PROGRAMS = lyskomd dbck
+SPECIALS = call-switch.incl com.h fnc-def-init.incl \
+	prot-a-parse-arg.h fncdef-no-str-limit.txt .gdbinit \
+	$(C_SPECIALS)
 
+PROGRAMS = lyskomd dbck updateLysKOM
 
 all binaries: $(PROGRAMS)
 
-includes: com.h
-	cp com.h $(INCLUDEDIR)
-
-libraries:;
-
 lyskomd: $(DISKOBJS) $(GENOBJS)
 	$(CC) $(LDFLAGS) -o lyskomd $(DISKOBJS) $(GENOBJS) $(LIBS)
 
+updateLysKOM: updateLysKOM.o
+	$(CC) $(LDFLAGS) -o updateLysKOM updateLysKOM.o $(LIBS)
+
 encrypt: $(ENCRYPT)
 	$(CC) $(LDFLAGS) -o enrypt $(ENCRYPT) $(LIBS)
 
@@ -151,40 +159,164 @@ fncdef-no-str-limit.txt: fncdef.txt
 .gdbinit: Makefile
 	$(RM) -f .gdbinit
 	echo handle 13 nostop noprint 			>.gdbinit
-	echo dir $(TOPDIR)/src/libraries/libcommon	>>.gdbinit
-	echo dir $(TOPDIR)/src/libraries/libansi	>>.gdbinit
-	echo dir $(TOPDIR)/src/libraries/libisc		>>.gdbinit
-	echo dir $(TOPDIR)/src/libraries/libmisc	>>.gdbinit
+	echo dir @SRCTOPDIR@/src/libraries/libcommon	>>.gdbinit
+	echo dir @SRCTOPDIR@/src/libraries/libansi	>>.gdbinit
+	echo dir @SRCTOPDIR@/src/libraries/libisc		>>.gdbinit
+	echo dir @SRCTOPDIR@/src/libraries/libmisc	>>.gdbinit
 
+tags:
+	$(RM) TAGS
+	etags -t $(INCLUDEDIR)/*.h *.h \
+		@SRCTOPDIR@/src/libraries/libisc-new/src/*.h \
+		@SRCTOPDIR@/src/libraries/lib*/*.h \
+		*.c \
+		@SRCTOPDIR@/src/libraries/libisc-new/src/*.c \
+		@SRCTOPDIR@/src/libraries/lib*/*.c
+
+server-config.o: Makefile
+	$(CC) -c $(CPPFLAGS) -DDEFAULT_PREFIX='"$(prefix)"' $(ALL_CFLAGS) \
+		$(srcdir)/server-config.c
+
+updateLysKOM.o: Makefile
+	$(CC) -c $(CPPFLAGS) -DDEFAULT_PREFIX='"$(prefix)"' $(ALL_CFLAGS) \
+		$(srcdir)/updateLysKOM.c
+
+INSTALL-HDRS = com.h
+HDRS-DIR =$(INCLUDEDIR)
+
+
+]).PHONY: includes
+includes: $(INSTALL-HDRS)
+	test -d $(HDRS-DIR) || $(MKDIR) $(HDRS-DIR)
+	for i in $(INSTALL-HDRS) ; \
+	do if ( cmp $$i $(HDRS-DIR)/$$i 2>/dev/null ) ; then\
+             true; else\
+		$(RM) $(HDRS-DIR)/$$i;\
+		if $(INSTALL_DATA) $$i $(HDRS-DIR)/$$i;\
+		then true ; else exit 1; fi; fi;\
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making includes in directory $$i; \
+			if (cd ./$$i; $(MAKE) includes); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: libraries
+libraries: 
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making libraries in directory $$i; \
+			if (cd ./$$i; $(MAKE) libraries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: binaries
+binaries: $(PROGRAMS)
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making binaries in directory $$i; \
+			if (cd ./$$i; $(MAKE) binaries); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: install
+install: $(PROGRAMS)
+	for i in $(PROGRAMS); do \
+	    $(INSTALL_PROGRAM) $$i $(bindir)/$$i; \
+	done
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making install in directory $$i; \
+			if (cd ./$$i; $(MAKE) install); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+dependencies:
+	touch dependencies
+
+.PHONY: depend
+depend: $(SPECIALS)
+	$(CC) $(DEPENDFLAG) $(ALL_CFLAGS) $(srcdir)/*.c $(C_SPECIALS) \
+		>dependencies
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making depend in directory $$i; \
+			if (cd ./$$i; $(MAKE) depend); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+# Output from LK_CLEAN
+GENERIC-MOSTLYCLEAN = *.o lib*.a core Makefile.in2
+GENERIC-PURE = Makefile.in configure
+GENERIC-DISTCLEAN = *~ .\#* TAGS dependencies Makefile
+.PHONY: mostlyclean
+mostlyclean: domostlyclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making mostlyclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) mostlyclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: clean
+clean: doclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making clean in directory $$i; \
+			if (cd ./$$i; $(MAKE) clean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: distclean
+distclean: dodistclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making distclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) distclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: realclean
+realclean: dorealclean
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making realclean in directory $$i; \
+			if (cd ./$$i; $(MAKE) realclean); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
+
+.PHONY: pure
+pure: dopure
+	@for i in DuMmY $(SUBDIRS); do \
+		if test -f $$i/Makefile ; then \
+			echo making pure in directory $$i; \
+			if (cd ./$$i; $(MAKE) pure); \
+			then true; else exit 1; fi ; \
+		else true; fi; \
+	done
 
-install:  $(PROGRAMS)
-	echo Server not installed.
-#	cp lyskomd $(DESTDIR)/ramkomd	# The utilites wants ramkomd.
-#	cp dbck $(DESTDIR)/
-#	strip $(DESTDIR)/dbck
-# Don't strip ramkomd - we want debugging info!
-
-@CLEAN@
 dopure: dorealclean
-dorealclean: dodistclean;
+	$(RM) $(GENERIC-PURE)
+
+dorealclean: dodistclean
+
 dodistclean: doclean
 	$(RM) $(GENERIC-DISTCLEAN)
-doclean: domostlyclean
-	$(RM) $(SPECIALS)
-domostlyclean:
-	$(RM) $(GENERIC-MOSTLYCLEAN) $(PROGRAMS)
 
-specials: $(SPECIALS)
+doclean: domostlyclean
 
-tags:
-	$(RM) TAGS
-	etags -t $(INCLUDEDIR)/*.h *.h \
-		$(TOPDIR)/src/libraries/libisc-new/src/*.h \
-		$(TOPDIR)/src/libraries/lib*/*.h \
-		*.c \
-		$(TOPDIR)/src/libraries/libisc-new/src/*.c \
-		$(TOPDIR)/src/libraries/lib*/*.c
+domostlyclean:
+	$(RM) $(GENERIC-MOSTLYCLEAN)
 
-include $(SCRIPTDIR)/Parallell-depend.make
+# End output from LK_CLEAN
 
-include dependencies