home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / rcs567s.zip / rcs / src / INSTALL < prev    next >
Text File  |  1994-03-17  |  13KB  |  301 lines

  1. RCS configuration and installation instructions
  2.  
  3.     $Id: INSTALL,v 1.11 1994/03/17 14:05:48 eggert Exp $
  4.  
  5.     Copyright 1991, 1992, 1993, 1994 Paul Eggert
  6.     Distributed under license by the Free Software Foundation, Inc.
  7.  
  8.     This file is part of RCS.
  9.  
  10.     RCS is free software; you can redistribute it and/or modify it
  11.     under the terms of the GNU General Public License as published
  12.     by the Free Software Foundation; either version 2, or (at your
  13.     option) any later version.
  14.  
  15.     RCS is distributed in the hope that it will be useful, but
  16.     WITHOUT ANY WARRANTY; without even the implied warranty of
  17.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.     GNU General Public License for more details.
  19.  
  20.     You should have received a copy of the GNU General Public
  21.     License along with RCS; see the file COPYING.  If not, write to
  22.     the Free Software Foundation, 675 Mass Ave, Cambridge, MA
  23.     02139, USA.
  24.  
  25.     Report problems and direct all questions to:
  26.  
  27.         rcs-bugs@cs.purdue.edu
  28.  
  29.  
  30. __________
  31.  
  32. Prerequisites and compatibility issues
  33.  
  34. RCS requires a diff that supports the -n option.
  35. Get GNU diffutils (version 1.15 or later) if your diff lacks -n.
  36. For best results, use GNU diffutils 2.6 or later.
  37.  
  38. RCS works best with a diff that supports -a and -L,
  39. and a diff3 that supports -E and -m.
  40. GNU diffutils supports these options.
  41.  
  42. RCS version 5 reads RCS files written by any RCS version released since 1982.
  43. It also writes RCS files that these older versions of RCS can read,
  44. unless you use one of the following new features:
  45.  
  46.     checkin times after 1999/12/31 23:59:59 UTC
  47.     checking in non-text files
  48.     identifiers containing `.' or non-Ascii bytes, or starting with a digit
  49.     rcs -bX, where X is nonempty
  50.     rcs -kX, where X is not `kv'
  51.     RCS files that exceed hardcoded limits in older RCS versions
  52.  
  53. A working file written by RCS 5.5 or later contains four-digit years in its
  54. keyword strings.  If you check out a working file with RCS 5.5 or later,
  55. an older RCS version's `ci -k' may insist on two-digit years.
  56. Similarly, a working file written with -zZONE contains times
  57. in its keyword strings that older `ci -k's may not understand.
  58. Work around this with `co -V4 -z', or edit the working file.
  59.  
  60.  
  61. __________
  62.  
  63. Configuration and installation
  64.  
  65. For Posix and near-Posix hosts, configure by editing Makefile,
  66. commenting out wrong lines and uncommenting right ones.
  67. See ``Makefile notes'' below for advice.
  68.  
  69. If your system type is in the following list, look for the
  70. corresponding identifiers in the notes below before proceeding.
  71.  
  72.     system type - identifiers
  73.     ------------------------
  74.     AIX 3.2 - BINDIR has_seteuid
  75.     HP/Apollo DomainOS - has_vfork
  76.     SCO Unix V.3.2 - has_rename
  77.     Ultrix - has_seteuid
  78.  
  79. After configuring, make conf.h.  If making conf.h fails,
  80. look in conf.err to see what went wrong in the conf.sh shell file.
  81. Check the resulting conf.h for plausibility,
  82. e.g. by running `diff conf.heg conf.h'; see ``conf.h notes'' below.
  83. If conf.h is wrong, and the mistake isn't listed in ``conf.h notes'',
  84. there is a bug in conf.sh; please report it.
  85. You can patch conf.h if you're in a hurry, but it's better to fix it;
  86. look at a.h and conf.err for ideas.
  87. If all else fails, copy conf.heg to conf.h and edit it by hand.
  88. After configuring, make `all'.
  89.  
  90. If all went well, make `install'.
  91. If installation succeeds, make `installtest';
  92. if this fails, make `installdebug' for detailed info.
  93.  
  94. If you want to test RCS before installing it,
  95. you must set RCSPREFIX to be empty, make RCS from scratch,
  96. and run `make BINDIR=. installtest'.
  97. Be sure to restore RCSPREFIX and rebuild RCS before installing it.
  98.  
  99. If you want to maintain RCS with itself,
  100. preserve the original revision numbers, dates, etc.
  101. by checking the files in with the -k option.
  102.  
  103.  
  104. __________
  105.  
  106. Makefile notes
  107.  
  108. BINDIR is where the RCS commands will be installed.
  109. Do not set this to /bin or /usr/bin in AIX.
  110. An AIX boot shell script (/etc/rc.boot4 in AIX 3.2) invokes `merge',
  111. meaning /etc/merge, and fails if RCS merge is installed in /bin or /usr/bin.
  112. IBM says that installing new programs into /usr/bin is a customer error (!).
  113.  
  114. CC is the name of your C compiler.
  115.  
  116. CC_D is a list of extra options for the C preprocessor.
  117. It should include any extra -D and -I options needed on your system.
  118.  
  119. CC_O is the C compiler options that affect just compilation and assembly;
  120. not preprocessing, linking or linting.
  121. If your compiler has the BSD -R option, -R can improve performance by
  122. making all initialized data read-only (not just string literals);
  123. this is not worth worrying about if your compiler also supports `const'.
  124.  
  125. CC_W is the list of C compiler options to enable
  126. warnings about questionable constructs in the RCS source code.
  127.  
  128. COMPAT2 is 1 if you still have version 2 RCS files around.
  129. (Version 2 became obsolete in 1982, so this isn't likely.)
  130. COMPAT2 assures that version 2 RCS files can still be read.
  131. When you have the new RCS installed, rename old version 2 RCS files as follows.
  132. Suppose the working file was `f.c';
  133. rename the RCS file `f.c.v' to `f.c,v', and the RCS file `f.v' to `f.c,v'.
  134. Thus suffixes are no longer dropped and RCS files end in `,v' rather than `.v'.
  135. After all version 2 RCS files have been updated with new versions of ci or rcs,
  136. you can remake RCS with COMPAT2 set to 0.
  137.  
  138. DESTBINDIR is where RCS executables are copied when you type `make install'.
  139. This may be different from BINDIR due to installation staging.
  140.  
  141. DIFF is the name of your diff program.
  142. It's normally best to use GNU diffutils.
  143. If you override DIFF, make sure you rebuild conf.h afterwards;
  144. otherwise you may introduce a security hole.
  145. On some versions of Unix, the standard diff does not support RCS
  146. and you must use something like /usr/lib/rdiff instead.
  147.  
  148. DIFFPREFIX act likes RCSPREFIX, except it applies to subsidiary diffs,
  149. not to subsidiary RCS commands.  It must be nonempty if setuid is to be used.
  150.  
  151. DIFF_FLAGS are diff's options for RCS format output, probably -n.
  152. If available, also include the -a option for comparing arbitrary files.
  153.  
  154. DIFF_L is 1 if diff understands the -L option for labeling context diff output.
  155.  
  156. DIFF_SUCCESS, DIFF_FAILURE, DIFF_TROUBLE are integer constants
  157. representing diff's exit status when it finds
  158. no differences, some differences, or trouble respectively.
  159. The first two should be EXIT_SUCCESS and EXIT_FAILURE
  160. but this doesn't work on some broken hosts.
  161.  
  162. DIFF3 is the name of the diff3 program.
  163. With GNU diffutils, this is simply its user-visible diff3 program.
  164. With traditional diff3, this is not the user-visible diff3 program;
  165. instead, it this is the name of the undocumented diff3 auxiliary program,
  166. whose name is /usr/lib/diff3 or /usr/5lib/rdiff3prog or something similar.
  167.  
  168. DIFF3_A is 1 if diff3 understands the -A (--show-all) option, 0 otherwise.
  169.  
  170. DIFF3_BIN is 1 if DIFF3 is the user-visible GNU diff3 program (see DIFF3).
  171. Before setting this to 1, make sure your diff3 understands -a, -L, and and -m;
  172. e.g. the command `echo x | diff3 -m /dev/null /dev/null -' should output `x'.
  173.  
  174. ED is the name of the standard Unix line editor.
  175. It is needed only if DIFF3_BIN is 0.
  176.  
  177. EXECUTABLE_PERMISSIONS are the options given to INSTALL for executable files
  178. on BSD Unix sites.  Watch out for `-g staff' if you don't have a staff group,
  179. or if your installation program doesn't have a -g option.
  180.  
  181. INSTALL is the command that installs commands.
  182.  
  183. LDFLAGS are the loader flags you need, e.g. -i, -n, -s, -x.
  184.  
  185. LDLIBS are the loader libraries you need, e.g. -lbsd, -lBSD, -ljobs, -lPW, -lx.
  186.  
  187. LINK is the command used to link together an executable.
  188.  
  189. LINT is the name and usual arguments of your lint program.
  190.  
  191. MAKE is defined here because ancient `make' programs don't define it.
  192.  
  193. OTHER_OBJECT are any other object files you need to link.
  194.  
  195. RCSPREFIX is the prefix for subsidiary RCS commands like ci.
  196. If empty, RCS will search the PATH for these commands;
  197. this lets you move RCS commands after building them, and permits
  198. multiple instances of setuid RCS commands on the same host for different users.
  199. If nonempty, it should be a path followed by /;
  200. this makes RCS look in just one place, and makes execution faster.
  201.  
  202. REMOVE is how to remove a file.
  203.  
  204. SENDMAIL is a comma-separated list of strings that are a command to send mail.
  205. The name of the addressee will be appended as a separate argument,
  206. and the standard input will be the message
  207. (first line `Subject: xxxx', second line empty).
  208. If your host cannot send mail, leave SENDMAIL empty.
  209.  
  210. TESTPREFIX is the prefix for test commands.
  211.  
  212. o is the filename extension your host uses for object files.
  213. It includes the `.'.  It is typically `.o' on Unix hosts.
  214.  
  215. x is the filename extension your host uses for executables.
  216. It includes the `.'.  It is empty on Unix hosts,
  217. which traditionally lack extensions on executables.
  218.  
  219.  
  220. __________
  221.  
  222. conf.h notes
  223.  
  224. See conf.sh for details about the definitions in conf.h.
  225. Comments below cover unusual situations that can require hand patches to conf.h.
  226.  
  227. const - Some hosts support `const' but complain about it, perhaps because
  228. system headers are wrong.  If you can't stand the complaints,
  229. try `#define const /*empty*/'.
  230.  
  231. has_NFS - Set this if the target host might use NFS.
  232. You should make sure that your NFS uses UDP checksums, if it uses UDP.
  233. Most modern systems checksum by default; ask your vendor if you're not sure.
  234. NFS's stateless server model has well-known problems with
  235. the non-idempotent operations link(), rename(), and unlink().
  236. For example, unlink() can run twice on the file server,
  237. causing the client to think that the unlink failed with errno==ENOENT.
  238. has_NFS enables code that works around these problems.
  239.  
  240. has_rename - This should be 0 in SCO Unix V.3.2.  Its NFS rename() is broken,
  241. but if you run conf.sh in a non-NFS filesystem, conf.sh thinks rename() works.
  242.  
  243. has_seteuid - You have to worry about this only if you plan to run RCS setuid.
  244. has_seteuid should be 1 only if your seteuid lets you switch back and
  245. forth between any pair of users as specified in Posix 1003.1a Draft 5.
  246. On some older systems (e.g. SunOS 3.5) seteuid doesn't allow this.
  247. One must be root to test this reliably, so conf.sh just guesses.
  248. If has_seteuid==0, perhaps you can use setreuid instead (see below).
  249. Otherwise, the next best thing is saved setuid semantics
  250. (a Posix 1003.1-1990 option), because this fails only if you run as root.
  251. You may need to compile with `cc -systype sysv' (some Mips OS variants)
  252. or `cc -YPOSIX' (some Ultrix variants) for best results here.
  253. Don't run RCS setuid under AIX 3.2 if you use NFS, since it's badly broken.
  254. To see the AIX 3.2 bug, run the following program setuid X where the NFS file
  255. "abc" already exists, owned by X, permission -rw-r--r--, and where
  256. the invoker is not X.  The program fails with "fclose: Permission denied".
  257.     #include <stdio.h>
  258.     int main() {
  259.          FILE *f = fopen("abc", "w");
  260.          setuid(getuid());
  261.          fputc('\n', f);
  262.          if (fclose(f) != 0)
  263.              perror("fclose");
  264.     }
  265.  
  266. has_setreuid - You have to worry about this only if you plan to run RCS setuid
  267. and if has_seteuid==0.  On some older BSDish systems, the setreuid system
  268. call lets you swap real and effective users even if one of them is root.
  269. One must be root to test this reliably, so conf.sh always guesses that
  270. it doesn't work.  Set it to 1 by hand if you know that it works.
  271.  
  272. has_vfork - This should be 0 in some variants of HP/Apollo DomainOS.
  273. (The `uname -a' command reported `10.3.5 sys5.3' on one such variant.)
  274. Its vfork causes a system crash; you'll have to change conf.sh to output
  275. `#define has_vfork 0' without actually trying vfork.
  276.  
  277. large_memory - This should be 1 if main memory is large enough to hold entire
  278. copies of RCS files, perhaps because virtual memory is available.
  279.  
  280. _POSIX_SOURCE must be #defined in a strict Standard C environment,
  281. because otherwise stdio.h cannot define useful names like fileno.
  282. Avoid defining _POSIX_SOURCE if possible,
  283. because it can disable useful non-Posix features in your host.
  284. Perhaps you can remove the need for _POSIX_SOURCE
  285. by supplying an option to your compiler to makes it less strict.
  286. You may also have to pay attention to other symbols, e.g. _XOPEN_SOURCE.
  287.  
  288. text_work_stdio - This option makes sense only on non-Posix hosts that
  289. distinguish between text and binary I/O, e.g. DOS.  Set this option if
  290. you want to use text I/O for working files, but binary I/O for RCS
  291. files.  If set, RCS does not support non-text working files, but RCS
  292. files are portable to other hosts across binary network file systems
  293. like NFS.  If not set, RCS supports non-text working files, but RCS
  294. files are not portable to Posix hosts.
  295.  
  296. TZ_must_be_set - set this to 1 on hosts where gmtime() yields bogus
  297. values unless the TZ environment variable is set.
  298.  
  299. volatile - See `const'.  E.g. `volatile sig_atomic_t' is conforming, but some
  300. buggy hosts complain.  Also, Ultrix 4.0 Mips CC 2.0 has buggy volatile support.
  301.