comparison INSTALL @ 357:4711e16a8e49 r21-1-8

Import from CVS: tag r21-1-8
author cvs
date Mon, 13 Aug 2007 10:57:04 +0200
parents 182f72e8cd0d
children 972bbb6d6ca2
comparison
equal deleted inserted replaced
356:e85f639a32f3 357:4711e16a8e49
1 #!/bin/sh
2 #
3 # install - install a program, script, or datafile
4 # This comes from X11R5.
5 #
6 # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
7 #
8 # This script is compatible with the BSD install script, but was written
9 # from scratch.
10 #
11
12
13 # set DOITPROG to echo to test this script
14
15 # Don't use :- since 4.3BSD and earlier shells don't like it.
16 doit="${DOITPROG-}"
17
18
19 # put in absolute paths if you don't have them in your path; or use env. vars.
20
21 mvprog="${MVPROG-mv}"
22 cpprog="${CPPROG-cp}"
23 chmodprog="${CHMODPROG-chmod}"
24 chownprog="${CHOWNPROG-chown}"
25 chgrpprog="${CHGRPPROG-chgrp}"
26 stripprog="${STRIPPROG-strip}"
27 rmprog="${RMPROG-rm}"
28 mkdirprog="${MKDIRPROG-mkdir}"
29
30 tranformbasename=""
31 transform_arg=""
32 instcmd="$mvprog"
33 chmodcmd="$chmodprog 0755"
34 chowncmd=""
35 chgrpcmd=""
36 stripcmd=""
37 rmcmd="$rmprog -f"
38 mvcmd="$mvprog"
39 src=""
40 dst=""
41 dir_arg=""
42
43 while [ x"$1" != x ]; do
44 case $1 in
45 -c) instcmd="$cpprog"
46 shift
47 continue;;
48
49 -d) dir_arg=true
50 shift
51 continue;;
52
53 -m) chmodcmd="$chmodprog $2"
54 shift
55 shift
56 continue;;
57
58 -o) chowncmd="$chownprog $2"
59 shift
60 shift
61 continue;;
62
63 -g) chgrpcmd="$chgrpprog $2"
64 shift
65 shift
66 continue;;
67
68 -s) stripcmd="$stripprog"
69 shift
70 continue;;
71
72 -t=*) transformarg=`echo $1 | sed 's/-t=//'`
73 shift
74 continue;;
75
76 -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
77 shift
78 continue;;
79
80 *) if [ x"$src" = x ]
81 then
82 src=$1
83 else
84 # this colon is to work around a 386BSD /bin/sh bug
85 :
86 dst=$1
87 fi
88 shift
89 continue;;
90 esac
91 done
92
93 if [ x"$src" = x ]
94 then
95 echo "install: no input file specified"
96 exit 1
97 else
98 true
99 fi
100
101 if [ x"$dir_arg" != x ]; then
102 dst=$src
103 src=""
104
105 if [ -d $dst ]; then
106 instcmd=:
107 else
108 instcmd=mkdir
109 fi
110 else
111
112 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
113 # might cause directories to be created, which would be especially bad
114 # if $src (and thus $dsttmp) contains '*'.
115
116 if [ -f $src -o -d $src ]
117 then
118 true
119 else
120 echo "install: $src does not exist"
121 exit 1
122 fi
123
124 if [ x"$dst" = x ]
125 then
126 echo "install: no destination specified"
127 exit 1
128 else
129 true
130 fi
131
132 # If destination is a directory, append the input filename; if your system
133 # does not like double slashes in filenames, you may need to add some logic
134
135 if [ -d $dst ]
136 then
137 dst="$dst"/`basename $src`
138 else
139 true
140 fi
141 fi
142
143 ## this sed command emulates the dirname command
144 dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
145
146 # Make sure that the destination directory exists.
147 # this part is taken from Noah Friedman's mkinstalldirs script
148
149 # Skip lots of stat calls in the usual case.
150 if [ ! -d "$dstdir" ]; then
151 defaultIFS='
152 '
153 IFS="${IFS-${defaultIFS}}"
154
155 oIFS="${IFS}"
156 # Some sh's can't handle IFS=/ for some reason.
157 IFS='%'
158 set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
159 IFS="${oIFS}"
160
161 pathcomp=''
162
163 while [ $# -ne 0 ] ; do
164 pathcomp="${pathcomp}${1}"
165 shift
166
167 if [ ! -d "${pathcomp}" ] ;
168 then
169 $mkdirprog "${pathcomp}"
170 else
171 true
172 fi
173
174 pathcomp="${pathcomp}/"
175 done
176 fi
177
178 if [ x"$dir_arg" != x ]
179 then
180 $doit $instcmd $dst &&
181
182 if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
183 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
184 if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
185 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
186 else
187
188 # If we're going to rename the final executable, determine the name now.
189
190 if [ x"$transformarg" = x ]
191 then
192 dstfile=`basename $dst`
193 else
194 dstfile=`basename $dst $transformbasename |
195 sed $transformarg`$transformbasename
196 fi
197
198 # don't allow the sed command to completely eliminate the filename
199
200 if [ x"$dstfile" = x ]
201 then
202 dstfile=`basename $dst`
203 else
204 true
205 fi
206
207 # Make a temp file name in the proper directory.
208
209 dsttmp=$dstdir/#inst.$$#
210
211 # Move or copy the file name to the temp name
212
213 $doit $instcmd $src $dsttmp &&
214
215 trap "rm -f ${dsttmp}" 0 &&
216
217 # and set any options; do chmod last to preserve setuid bits
218
219 # If any of these fail, we abort the whole thing. If we want to
220 # ignore errors from any of these, just make sure not to ignore
221 # errors from the above "$doit $instcmd $src $dsttmp" command.
222
223 if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
224 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
225 if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
226 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
227
228 # Now rename the file to the real destination.
229
230 $doit $rmcmd -f $dstdir/$dstfile &&
231 $doit $mvcmd $dsttmp $dstdir/$dstfile
232
233 fi &&
234
235
236 exit 0
237 XEmacs Installation Guide 1 XEmacs Installation Guide
238 Copyright (c) 1994, 1995, 1996 Board of Trustees, University of Illinois 2 Copyright (c) 1994, 1995, 1996 Board of Trustees, University of Illinois
239 Copyright (c) 1994 Free Software Foundation, Inc. 3 Copyright (c) 1994-1999 Free Software Foundation, Inc.
240 4
241 Synched up with: FSF 19.30. 5 Synched up with: FSF 19.30.
242 6
243 Permission is granted to anyone to make or distribute verbatim copies 7 Permission is granted to anyone to make or distribute verbatim copies
244 of this document as received, in any medium, provided that the 8 of this document as received, in any medium, provided that the
257 BUILDING AND INSTALLATION (Unix and Cygwin, see the file nt/README 21 BUILDING AND INSTALLATION (Unix and Cygwin, see the file nt/README
258 for instructions on building under Microsoft Windows): 22 for instructions on building under Microsoft Windows):
259 23
260 1) Make sure your system has enough swapping space allocated to handle 24 1) Make sure your system has enough swapping space allocated to handle
261 a program whose pure code is 900k bytes and whose data area is at 25 a program whose pure code is 900k bytes and whose data area is at
262 least 400k and can reach 8Mb or more. If the swapping space is 26 least 400k and can reach 8Mb or more. Note that a typical XEmacs
27 build is much bigger. If the swapping space is
263 insufficient, you will get an error in the command `temacs -batch 28 insufficient, you will get an error in the command `temacs -batch
264 -l loadup dump', found in `./src/Makefile.in.in', or possibly when 29 -l loadup dump', found in `./src/Makefile.in.in', or possibly when
265 running the final dumped XEmacs. 30 running the final dumped XEmacs.
266 31
267 Building XEmacs requires about 41 Mb of disk space (including the 32 Verify that your users have a high enough stack limit. On some
268 XEmacs sources). Once installed, XEmacs occupies about 16 Mb in the 33 systems such as OpenBSD and OSF/Tru64 the default is 2MB which is
269 file system where it is installed; this includes the executable files, 34 too low. See 'PROBLEMS' for details.
270 Lisp libraries, miscellaneous data files, and on-line documentation. 35
271 The amount of storage of the Lisp directories may be reduced by 36 Building XEmacs requires about 100 Mb of disk space (including the
272 compressing the .el files. If the building and installation take place 37 XEmacs sources). Once installed, XEmacs occupies between 20 and 100 Mb
273 in different directories, then the installation procedure temporarily 38 in the file system where it is installed; this includes the executable files,
274 requires 41+16 Mb. Adjust this value upwards depending upon what 39 Lisp libraries, miscellaneous data files, and on-line documentation. The
275 additional Lisp support is installed. 40 exact amount depends greatly on the number of extra lisp packages that are
41 installed
276 42
277 XEmacs requires an ANSI C compiler, such as GCC. If you wish to build 43 XEmacs requires an ANSI C compiler, such as GCC. If you wish to build
278 the documentation yourself, you will need at least version 1.68 of 44 the documentation yourself, you will need at least version 1.68 of
279 makeinfo (GNU texinfo-3.11). 45 makeinfo (GNU texinfo-3.11).
280 46
299 65
300 Use the --site-includes and --site-libraries options when building 66 Use the --site-includes and --site-libraries options when building
301 XEmacs to allow configure to find the external software packages. 67 XEmacs to allow configure to find the external software packages.
302 If you link with dynamic (``.so'') external package libraries, which 68 If you link with dynamic (``.so'') external package libraries, which
303 is not recommended, you will also need to add the library directories 69 is not recommended, you will also need to add the library directories
304 to the --site-runtime-libraries option. 70 to the --site-runtime-libraries option. For your convenience these can
305 71 be set together by using the --with-site-prefix command. This will set
306 72 these variables as needed assuming your libraries are organised as a
307 3) Decide what Initial Lisp you need with XEmacs. XEmacs is 73 typical /usr tree.
308 distributed separately from most of its runtime environment. This is 74
75 3) [N.B. Most of this section can be done during or after the
76 compilation of the core source code, but is present early to catch
77 your attention.]
78
79 Decide what Initial Lisp you need with XEmacs. XEmacs is
80 distributed separately from most of its runtime environment. This is
309 done to make it easier for administrators to tune an installation for 81 done to make it easier for administrators to tune an installation for
310 what the local users need. See the file etc/PACKAGES for an overview 82 what the local users need. Note that while XEmacs will compile and
311 of what is available and which packages need to be installed prior to 83 install without any packages present at least some additional lisp
312 building XEmacs. At this point you only need a minimum to get started 84 packages are needed to bring XEmacs up to "normal" editor
313 at which point you may install what you wish without further changes 85 functionality. Installation and upgrading of the packages can be done
314 to the XEmacs binary. A sample minimum configuration for a Linux 86 almost automatically when from inside XEmacs when it has been compiled
315 system using Mule and Wnn6 from OMRON corporation would be the 87 and installed.
316 packages `mule-base' and `egg-its'. By default, packages will be 88
317 searched for in the path 89 More information and suggestions for which packages to install see the
90 file README.packages.
91
92 IMPORTANT! The file README.packages contain information vital to have
93 a fully working XEmacs. This information was not included in this file
94 only because it is too large for this terse INSTALL. Please read
95 README.packages now!
96
97 By default, packages will be searched for in the path
318 98
319 ~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/xemacs-packages:$prefix/lib/xemacs/xemacs-packages 99 ~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/xemacs-packages:$prefix/lib/xemacs/xemacs-packages
320 100
321 This may be changed by specifying a different value with the 101 This may be changed by specifying a different value with the
322 --package-path configuration option. 102 --package-path configuration option.
323 103
324 IMPORTANT NOTE: In a future version of XEmacs, the user-specific 104 IMPORTANT NOTE: In a future version of XEmacs, the user-specific
325 package hierarchy will move from ~/.xemacs to ~/.xemacs/packages. 105 package hierarchy will move from ~/.xemacs to ~/.xemacs/packages.
106
107
326 108
327 4) In the top level directory of the XEmacs distribution, run the 109 4) In the top level directory of the XEmacs distribution, run the
328 program `configure' as follows: 110 program `configure' as follows:
329 111
330 ./configure [CONFIGURATION-NAME] [--OPTION[=VALUE]] ... 112 ./configure [CONFIGURATION-NAME] [--OPTION[=VALUE]] ...
536 especially if your system's `mmap' implemntation is missing or 318 especially if your system's `mmap' implemntation is missing or
537 inefficient. Generally, it's best to go with the default 319 inefficient. Generally, it's best to go with the default
538 configuration for your system. You can tweak this based on how you 320 configuration for your system. You can tweak this based on how you
539 use XEmacs, and the memory and cpu resources available on your system. 321 use XEmacs, and the memory and cpu resources available on your system.
540 322
541 The `--use-system-malloc' option can be use to either enable or 323 The `--with-system-malloc' option can be use to either enable or
542 disable use of the system malloc. Generally, it's best to go with the 324 disable use of the system malloc. Generally, it's best to go with the
543 default configuration for your system. Note that on many systems 325 default configuration for your system. Note that on many systems
544 using the system malloc disables the use of the relocating allocator. 326 using the system malloc disables the use of the relocating allocator.
545 327
546 The `--use-debug-malloc' option can be used to link a special debugging 328 The `--with-debug-malloc' option can be used to link a special debugging
547 version of malloc. Debug Malloc is not included with XEmacs, is 329 version of malloc. Debug Malloc is not included with XEmacs, is
548 intended for use only by the developers and may be obtained from 330 intended for use only by the developers and may be obtained from
549 <URL:http://www.letters.com/dmalloc/>. 331 <URL:http://www.letters.com/dmalloc/>.
550 332
551 The `--debug' and `--error-checking' options are intended for use only 333 The `--debug' and `--error-checking' options are intended for use only
622 When it is done, `configure' prints a description of what it did and 404 When it is done, `configure' prints a description of what it did and
623 creates a shell script `config.status' which, when run, recreates the 405 creates a shell script `config.status' which, when run, recreates the
624 same configuration. If `configure' exits with an error after 406 same configuration. If `configure' exits with an error after
625 disturbing the status quo, it removes `config.status'. 407 disturbing the status quo, it removes `config.status'.
626 408
627 4) Look at `./lisp/paths.el'; if some of those values are not right 409 5) Look at `./lisp/paths.el'; if some of those values are not right
628 for your system, set up the file `./lisp/site-init.el' with XEmacs 410 for your system, set up the file `./lisp/site-init.el' with XEmacs
629 Lisp code to override them; it is not a good idea to edit paths.el 411 Lisp code to override them; it is not a good idea to edit paths.el
630 itself. YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES, 412 itself. YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES,
631 rather than `defvar', as used by `./lisp/paths.el'. For example, 413 rather than `defvar', as used by `./lisp/paths.el'. For example,
632 414
645 canonical form. XEmacs tries to detect how your automounter is 427 canonical form. XEmacs tries to detect how your automounter is
646 configured. If you have an unusual automounter configuration that 428 configured. If you have an unusual automounter configuration that
647 XEmacs cannot detect, you may need to change the value of 429 XEmacs cannot detect, you may need to change the value of
648 `directory-abbrev-alist'. 430 `directory-abbrev-alist'.
649 431
650 5) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs 432 6) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs
651 Lisp code you want XEmacs to load before it is dumped out. Use 433 Lisp code you want XEmacs to load before it is dumped out. Use
652 site-load.el for additional libraries if you arrange for their 434 site-load.el for additional libraries if you arrange for their
653 documentation strings to be in the lib-src/DOC file (see 435 documentation strings to be in the lib-src/DOC file (see
654 src/Makefile.in.in if you wish to figure out how to do that). For all 436 src/Makefile.in.in if you wish to figure out how to do that). For all
655 else, use site-init.el. 437 else, use site-init.el.
664 See `./PROBLEMS' for more details on which systems this affects. 446 See `./PROBLEMS' for more details on which systems this affects.
665 447
666 The `site-*.el' files are nonexistent in the distribution. You do not 448 The `site-*.el' files are nonexistent in the distribution. You do not
667 need to create them if you have nothing to put in them. 449 need to create them if you have nothing to put in them.
668 450
669 6) Refer to the file `./etc/TERMS' for information on fields you may 451 7) Refer to the file `./etc/TERMS' for information on fields you may
670 wish to add to various termcap entries. The files `./etc/termcap.ucb' 452 wish to add to various termcap entries. The files `./etc/termcap.ucb'
671 and `./etc/termcap.dat' may already contain appropriately-modified 453 and `./etc/termcap.dat' may already contain appropriately-modified
672 entries. 454 entries.
673 455
674 7) Run `make' in the top directory of the XEmacs distribution to finish 456 8) Run `make' in the top directory of the XEmacs distribution to finish
675 building XEmacs in the standard way. The final executable file is 457 building XEmacs in the standard way. The final executable file is
676 named `src/emacs'. You can execute this file "in place" without 458 named `src/emacs'. You can execute this file "in place" without
677 copying it, if you wish; then it automatically uses the sibling 459 copying it, if you wish; then it automatically uses the sibling
678 directories ../lisp, ../lib-src, ../info. 460 directories ../lisp, ../lib-src, ../info.
679 461
733 install XEmacs's libraries and data files or where XEmacs should search 515 install XEmacs's libraries and data files or where XEmacs should search
734 for its lisp files by giving values for `make' variables as part of 516 for its lisp files by giving values for `make' variables as part of
735 the command. See the section below called `MAKE VARIABLES' for more 517 the command. See the section below called `MAKE VARIABLES' for more
736 information on this. 518 information on this.
737 519
738 8) If your system uses lock files to interlock access to mailer inbox files, 520 9) If your system uses lock files to interlock access to mailer inbox
739 then you might need to make the movemail program setuid or setgid 521 files, then you might need to make the movemail program setuid or
740 to enable it to write the lock files. We believe this is safe. 522 setgid to enable it to write the lock files. We believe this is safe.
741 The setuid/setgid bits need not be set on any other XEmacs-related 523 The setuid/setgid bits need not be set on any other XEmacs-related
742 executables. 524 executables.
743 525
744 9) You are done with the hard part! You can remove executables and 526 10) You are done with the hard part! You can remove executables and
745 object files from the build directory by typing `make clean'. To also 527 object files from the build directory by typing `make clean'. To also
746 remove the files that `configure' created (so you can compile XEmacs 528 remove the files that `configure' created (so you can compile XEmacs
747 for a different configuration), type `make distclean'. 529 for a different configuration), type `make distclean'.
748 530
749 10) You should now go to the XEmacs web page at http://www.xemacs.org/ 531 11) You should now go to the XEmacs web page at http://www.xemacs.org/
750 and decide what additional Lisp support you wish to have. 532 and decide what additional Lisp support you wish to have.
751 533
752 MAKE VARIABLES 534 MAKE VARIABLES
753 535
754 You can change where the build process installs XEmacs and its data 536 You can change where the build process installs XEmacs and its data
885 see which operating system and architecture description files from 667 see which operating system and architecture description files from
886 `src/s' and `src/m' should be used for that configuration name. Edit 668 `src/s' and `src/m' should be used for that configuration name. Edit
887 `src/config.h', and change the two `#include' directives to include 669 `src/config.h', and change the two `#include' directives to include
888 the appropriate system and architecture description files. 670 the appropriate system and architecture description files.
889 671
890 2) Edit `./src/config.h' to set the right options for your system. If 672 3) Edit `./src/config.h' to set the right options for your system. If
891 you need to override any of the definitions in the s/*.h and m/*.h 673 you need to override any of the definitions in the s/*.h and m/*.h
892 files for your system and machine, do so by editing config.h, not by 674 files for your system and machine, do so by editing config.h, not by
893 changing the s/*.h and m/*.h files. Occasionally you may need to 675 changing the s/*.h and m/*.h files. Occasionally you may need to
894 redefine parameters used in `./lib-src/movemail.c'. 676 redefine parameters used in `./lib-src/movemail.c'.
895 677
896 3) If you're going to use the make utility to build XEmacs, you will 678 4) If you're going to use the make utility to build XEmacs, you will
897 still need to run `configure' first, giving the appropriate values for 679 still need to run `configure' first, giving the appropriate values for
898 the variables in the sections entitled "Things `configure' Might Edit" 680 the variables in the sections entitled "Things `configure' Might Edit"
899 and "Where To Install Things." Note that you may only need to change 681 and "Where To Install Things." Note that you may only need to change
900 the variables `prefix' and `exec_prefix', since the rest of the 682 the variables `prefix' and `exec_prefix', since the rest of the
901 variables have reasonable defaults based on them. For each Makefile 683 variables have reasonable defaults based on them. For each Makefile
991 debugging. 773 debugging.
992 774
993 775
994 PROBLEMS 776 PROBLEMS
995 777
778 The most likely problem is that you forgot to read and follow the
779 directions in README.packages. You can not have a working XEmacs
780 without downloading some additional packages.
781
996 See the file PROBLEMS in this directory for a list of various 782 See the file PROBLEMS in this directory for a list of various
997 problems sometimes encountered, and what to do about them. 783 problems sometimes encountered, and what to do about them.
998 784
999 785
1000 If all else fails, please see etc/InstallGuide courtesy 786 If all else fails, please see etc/InstallGuide courtesy