install.txt

  By Ross Ridge
  Public Domain

  Installation instructions for MySC.

  @(#) MySC install.txt 1.4 98/04/21 14:34:59

To compile the MySC utilities you'll need a C++ development system
that supports templates.  Only versions 2.7.2 and 2.8.0 of the GNU C++
compiler are currently supported.  Earlier (and probably later)
versions of GNU C++ won't work.  You don't need libg++ library itself
but you need the include file wrappers from its distribution to make
your header files usable with C++.

After you figure out what compiler to use you next need to create the
"config.h".  To do this copy the sample configuration file
"cf-solaris.h" to "config.h".  Now edit the file so everything in it
defined (or undefined) as appropriate for your system.  Next copy the
sample makefile "mf-unix.mak" to "Makefile" and edit it to change the
C++ compiler and associated options as necessary.  If you're using GNU
C++ 2.7.2 you'll need to remove the "-fno-exceptions" option from
CFLAGS.  Finally enter "make" and hope nothing goes wrong.

You can also enter "make xgcc" this compiles the utilities using just
one source file (that includes the other source files) per utilities.
Depending on your development system, this can result in smaller
executables.  With the GNU C++ compiler building the utilities, this
reduces the executable size by about half.  The executables built this
way all have a ".x" extension (eg. "get.x"), so you'll need to rename
them before installing them.

Configuration Macros
====================

CONFIG_FILE_NAME_GUESSING

	Define this to enable support for RCS-like file name guessing.

CONFIG_TRADITIONAL_ARGS

	Define this to enable limitted support for traditional SCCS
	argument processing.

CONFIG_ENABLE_MSGDB
	
	Define this to enable support for multilingual message
	databases. Three different message database interfaces are
	supported, in order of preference, catgets(), gettext(), and
	gettxt(). The source message database files, currently only
	the master English database "myscmsgs", are distributed in
	catgets() format.  If you want to use a different interface
	you'll need to somehow convert the message files.  Either way
	you'll need to compile the message databases with the correct
	utility (gencat, msgfmt, or mkmsgs) and install them in an
	appropriate place.
	
CONFIG_NO_DIRECTORY

	Define this if your development system doesn't provide
	opendir(), readdir() and closedir() directory reading
	functions.  If this is defined then the MySC utilities won't
	accept directory names as command line arguments.

CONFIG_NO_MKTIME

	Define this if your development system doesn't support the
	standard C mktime() library function.  The replacement
	mktime() function requires that the traditional Unix
	representation of time_t, a long counting the number of
	seconds since January 1st 1970, 00:00 GMT, is used on your
	system.  You might want to define this if even if you do have
	mktime() as the replacement is likely to be much smaller and
	quicker.

CONFIG_NO_REMOVE

	Define this if your development system doesn't support the
	standard C remove() library function.  The unlink() system
	call will be used instead.

CONFIG_NO_RENAME

	Define this if your development system doesn't support the
	standard C rename() library function.  The link() and unlink()
	system calls will be used instead.

CONFIG_NO_STRERROR

	Define this if your development system doesn't support the
	standard C strerror() library function.  The sys_nerr and
	sys_errlist external variables are used instead.

CONFIG_NO_STRSTR

	Define this if your development system doesn't support the
	standard C strstr() library function.

CONFIG_NO_TIMEZONE_VAR

	Define this if your development system doesn't provide the
	timezone external variable and the tzset() function needed to
	set it.  This macro is only meaningful if CONFIG_NO_MKTIME is
	defined.  If CONFIG_NO_TIMZONE_VAR and CONFIG_NO_MKTIME are
	defined and gmttime() and localtime() give different time
	values for the same time_t then MySC utilities will output
	incorrect times.

CONFIG_NO_CATGETS

	Define this if your system doesn't provide the XPG4 catgets()
	and associated message database access functions.  This macro
	is only meaningful if CONFIG_ENABLE_MSGDB is defined.

CONFIG_NO_GETTEXT

	Define this if your system doesn't provide the Solaris
	gettext() and associated message database access functions.
	This macro is only meaningful if CONFIG_ENABLE_MSGDB and
	CONFIG_NO_CATGETS are defined.

CONFIG_NO_GETTXT

	Define this if your system doesn't provide the System V R4
	gettxt() and associated message database access functions.
	This macro is only meaningful if CONFIG_ENABLE_MSGDB,
	CONFIG_NO_CATGETS, and CONFIG_NO_GETTEXT are defined.

CONFIG_USE_DIFFTIME

	Define this if that standard C difftime() library function
	should be use to compare time_t values rather than comparing
	them directly.

CONFIG_DECLARE_ERRNO

	Define this if the external variable errno isn't declared in
	<errno.h>.

CONFIG_DECLARE_STRERROR

	Define this if the standard C strerror() library function
	isn't declared in <string.h>.

CONFIG_DECLARE_MALLOC

	Define this if the standard C malloc(), realloc(), calloc()
	and free() library functions aren't declared in <stdlib.h>.

CONFIG_DECLARE_STAT

	Define this if the stat() system call isn't declared in
	<sys/stat.h>.  This macro is only meaningful if CONFIG_UIDS is
	defined.

CONFIG_DECLARE_GETPWUID

	Define this if the getpwuid() function isn't declared in
	<pwd.h>.  This macro is only meaningful if CONFIG_UIDS is
	defined.

CONFIG_DECLARE_GETLOGIN

	Define this if the getlogin() function isn't declared in any
	included system header file.  This macro is only meaningful if
	CONFIG_UIDS is defined.

CONFIG_DECLARE_TIMEZONE

	Define this if the timezone external variable isn't declared
	in <time.h>.  This macro is only meaningful if
	CONFIG_NO_MKTIME is defined.

CONFIG_DECLARE_TZSET

	Define this if the tzset() function isn't declared in
	<time.h>.  This macro is only meaningful if CONFIG_NO_MKTIME
	is defined.

CONFIG_DECLARE_FDOPEN

	Define this if the fdopen() function isn't declared in
	<stdio.h>.

CONFIG_INCLUDE_SYS_TYPES_H

	Define this if any of the system header files included require
	that <sys/types.h> be included first.

CONFIG_INCLUDE_FCNTL_H

	Define this if <fcntl.h> needs to be included to get
	definitions of O_RDONLY, O_RDWR, etc...

CONFIG_INCLUDE_SYS_FILE_H

	Define this if <sys/file.h> needs to be included.

CONFIG_INCLUDE_UNISTD_H

	Define this if <unistd.h> declares useful function prototypes
	and should be included.

CONFIG_INCLUDE_SYS_WAIT_H

	Define this if <sys/wait.h> should be included.

CONFIG_SAVED_SETUID

	Define this if your system supports saved set-user-IDs.  This
	macro is only meaningful if CONFIG_UIDS is defined.

CONFIG_SETREUID

	Define this if your system supports the setreuid() system
	call.  This macro is only meaningful if CONFIG_UIDS is
	defined.  If neither CONFIG_SAVED_SETUID nor CONFIG_SETREUID is
	defined then the MySC utilities won't work if they are made
	set-user-ID.

CONFIG_DIFF_COMMAND

	Define this as the filename of the diff command to use when
	making deltas.  If CONFIG_NO_FORK is undefined then for
	security reasons the path will not be searched for this
	command and so this should be defined with an absolute
	pathname.

CONFIG_DIFF_SWITCHES

	Define this if the diff command defined in CONFIG_DIFF_COMMAND
	needs a special command line argument.  Normally this doesn't
	need to be defined as the MySC delta utility processes
	standard diff output.

CONFIG_COMPLETE_TEMPLATES

	Define this if a class template and all it's member functions
	need to be completely defined even some of those member
	functions aren't used.  This is true with the GNU C++
	compiler, and it may be true with other compilers.

CONFIG_LINEBUF_CHUNK_SIZE

	Define this buffer size to used when reading in a line from a
	file.  If the line is longer than this then the buffer
	expanded as needed in increments of this size.

CONFIG_NULL_FILENAME

	Define this as the name of the "null" file.  If this macro is
	left undefined then a default value is chosen according to
	whether or not CONFIG_MSDOS_FILES is defined.

CONFIG_PID_LOCKING

	Define this to create lock files containing the PID of the
	process updating an SCCS file.  The PID in an existing lock
	file is ignored and so no attempt is made to detect stale lock
	files.  This method of locking the SCCS file is compatible
	with the standard SCCS utilities.

CONFIG_DUMB_LOCKING

	Define this to create lock files containing the name of the
	user updating the SCCS file.  This type of locking is intended
	for systems that don't have PID's and/or don't have the
	standard SCCS commands to be compatible with.

CONFIG_NO_LOCKING

	Define this and no attempt will be made to lock SCCS files.


MS-DOS Installation
===================

As I no longer have access to a MS-DOS developement platform, MS-DOS
compilation is no longer supported.  If try reporting it yourself, you
can use the following installation instructions as a starting point.

The MS-DOS sample makefile, "mf-msdos.mak", can be used to compile the
utilities with either a standard MS-DOS compiler or by entering "make
gcc" with the DJGPP port of the GNU C++ compiler.  Only "a.out" files
are created by "make gcc", you'll need to run them using the extender
GO32 or turn them into EXE file with AOUT2EXE.  DJGPP waa only
supported to help in development of the MySC utilities, because of
limitations of the DJGPP development system and need to use an
extender, it's recommended that you use a standard MS-DOS compiler
instead.

CONFIG_NO_FORK

	Define this if your system doesn't support the fork() and exec
	system calls.

CONFIG_NO_PIPE

	Define this if your system doesn't support the pipe() and
	fork() system calls.

CONFIG_NO_SPAWN

	Define this if your development system doesn't provide the
	spawn library functions.  The standard C library function
	system() will be used instead.  This macro is only meaningful
	if CONFIG_NO_FORK is defined.

CONFIG_NO__CHMOD

	Define this if your development system doesn't provide the
	_chmod() system function call.  This macro is only meaningful
	when CONFIG_USE_ATTRIBUTE_BIT is defined and should only be
	defined on MS-DOS systems.  The replacement provides an
	interface to the MS-DOS get and set file attribute services.

CONFIG_NO_FSYNC

	Define this if your development system doesn't provide the
	fsync() system function call.  This macro is only meaningful
	when CONFIG_SYNC_BEFORE_REOPEN is defined and should only be
	defined on MS-DOS systems.  The replacement provides an
	interface to the MS-DOS commit file service.

CONFIG_INCLUDE_PROTOTYPES_H

	Define this if <prototypes.h> declares useful function
	prototypes and should be included.

CONFIG_INCLUDE_IO_H

	Define this if <io.h> declares useful function prototypes and
	should be included.

CONFIG_INCLUDE_PROCESS_H

	Define this if <process.h> needs to be included to use the
	spawn library functions.

CONFIG_UIDS

	Define this your system supports Unix UIDs and GIDs and
	related services.  If this isn't defined then the user's name taken
	from the environment variable USER, and the user is considered to
	be a member of no groups.
	
CONFIG_BINARY_FILE

	Define this if your development system distinguishes between
	files open in text and binary modes.

CONFIG_MSDOS_FILES

	Define this if your system uses MS-DOS style filenames and
	file conventions, otherwise Unix style filenames and file
	conventions are assumed.  Among other things this controls
	whether SCCS files use a "$" suffix or a "s." prefix.

CONFIG_SYNC_BEFORE_REOPEN

	Define this if your system requires that fsync be called for a
	file before it's reopened when it's already been opened for
	writing.  This should be defined if you're using MS-DOS.

CONFIG_BORLANDC

	Define this if you're using Borland C++.  This enables some
	pretty printing of MS-DOS file names.  This may work with
	other MS-DOS compilers so this macro will probably be renamed.

CONFIG_DJGPP

	Define this if you're using DJGPP.  This enables support for
	some quirks in the DJGPP libraries.

CONFIG_NO_ABORT

	Define this if abort shouldn't be called when an assertion
	fails as doing so doesn't do anything more than print a
	redundant message.

CONFIG_TEMP_DIRECTORY

	Define this if tempnam() function call should be used instead
	of the standard C tmpnam() library function.  If defined this
	macro should be defined as the directory name to pass as the
	first argument to the tempnam() function.  This macro is only
	meaningful if CONFIG_NO_PIPE is defined.

CONFIG_EOL_CHARACTER

	Define this as the character that marks the end of a line when
	opened in binary mode.  If your system uses a two (or more)
	character sequence to mark the end of a line then you should
	define this as the last character in sequence.  If undefined
	this macro defaults to '\n' which work on both Unix and MS-DOS
	systems.

CONFIG_SHARE_LOCKING

	Define this to create lock files as if CONFIG_DUMB_LOCKING had
	been defined but additionally opens it as a MS-DOS shared
	file.


/* Local variables: */
/* mode: text */
/* fill-prefix: "	" */
/* End: */