annotate configure1.in @ 1043:ee6f647ac103

* emacs.c: Incude "systty.h", not "systerm.h". * emacs.c (Fkill_emacs): Doc fix. (syms_of_emacs): Doc fix for Vkill_emacs_hook.
author Jim Blandy <jimb@redhat.com>
date Sat, 29 Aug 1992 02:58:59 +0000
parents d8d503897aa5
children 1dba066c1e0a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 #!/bin/sh
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 # Configuration script for GNU Emacs
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3 # Copyright (C) 1992 Free Software Foundation, Inc.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 #This file is part of GNU Emacs.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 #GNU Emacs is free software; you can redistribute it and/or modify
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 #it under the terms of the GNU General Public License as published by
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 #the Free Software Foundation; either version 1, or (at your option)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10 #any later version.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 #GNU Emacs is distributed in the hope that it will be useful,
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 #GNU General Public License for more details.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 #You should have received a copy of the GNU General Public License
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 #along with GNU Emacs; see the file COPYING. If not, write to
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19 #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 # Shell script to edit files and make symlinks in preparation for
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 # compiling Emacs.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
23 #
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 # Usage: configure machine
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 #
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 # If configure succeeds, it leaves its status in config.status.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
27 # If configure fails after disturbing the status quo,
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 # config.status is removed.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 #
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
31 # Remove any leading "." elements from the path name. When this
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
32 # script is invoked from the config.status script, a new ./ gets added
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
33 # to the the front of the path, resulting in a "././" prefix. That
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
34 # prefix is then recorded in the resulting config.status file, so
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
35 # basically each time config.status is used, it prepends another "./"
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
36 # to the filename. This wouldn't be a problem, except that since
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
37 # progname gets recorded in all the Makefiles this script produces,
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
38 # move-if-changed thinks they're different when they're not.
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
39 progname="`echo $0 | sed 's:^\(\./\)*::'`"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 short_usage="Type \`${progname} -usage' for more information about options."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 usage_message="Usage: ${progname} MACHINENAME [-OPTION[=VALUE] ...]
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
44
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
45 This message needs to be updated.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
46
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 Set compilation and installation parameters for GNU Emacs, and report.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 MACHINENAME is the machine to build for. See \`etc/MACHINES'.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 Options are:
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 -opsystem=SYSTEM - operating system to build for; see \`etc/MACHINES'.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
51 -prefix=DIR - where to install Emacs's library files
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 These options have reasonable defaults (in []s), and may not be needed:
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 -g, -O - Passed to the compiler. If omitted, use -O only.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 -cc=COMPILER - Which compiler to use. Defaults to gcc if available.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 -libdir=DIR - where to look for arch-dependent library files
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 -datadir=DIR - where to look for architecture-independent library files
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
57 -bindir=DIR - where to install the Emacs executable, and some friends
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 -lisppath=PATH - colon-separated list of Elisp directories
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 -lockdir=DIR - where Emacs should do its file-locking stuff
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 -window_system=none or [x11, if it is installed] - what window system to use
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 -have_x_menu=yes or [no] - include menu support under X11
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 -gnu_malloc=[yes] or no - use the GNU memory allocator
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 -rel_alloc=[yes] or no - use compacting allocator for buffers
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 -highpri=N - run at N points higher-than-normal priority
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
65 -lisp_float_type=[yes] or no - Support native floating point in Elisp
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 If successful, ${progname} leaves its status in config.status. If
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 unsuccessful after disturbing the status quo, config.status is removed."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 if [ ! -r ./src/lisp.h ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 echo "${progname}: Can't find Emacs sources in \`./src'.
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
71 Run this config script in the top directory of the Emacs source tree." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 options=":\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 usage:help:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 machine:opsystem:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 g:O:cc:\
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
79 prefix:bindir:emacsdir:datadir:lispdir:locallisppath:\
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
80 lisppath:buildlisppath:statedir:lockdir:libdir:mandir:infodir:\
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 gnu_malloc:rel_alloc:highpri:lisp_float_type:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 window_system:have_x_menu:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 "
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 boolean_opts=":\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 g:O:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 gnu_malloc:rel_alloc:lisp_float_type:have_x_menu:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 "
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 config_h_opts=":\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 highpri:gnu_malloc:rel_alloc:lisp_float_type:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 have_x_windows:have_x11:have_x_menu:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 c_switch_site:sigtype:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 "
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
96 prefix=
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
97 bindir=/usr/local/bin
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98 gnu_malloc=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99 lisp_float_type=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 # The default values for the following options are guessed at after other
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102 # options have been checked and given values, so we set them to null here.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 lisppath=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 datadir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 libdir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106 lockdir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107 window_system=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 have_x_menu=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
110 # Record all the arguments, so we can save them in config.status.
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
111 arguments="$*"
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
112
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
113 echo "Examining options."
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
114 while [ $# != 0 ]; do
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
115 arg="$1"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 case "${arg}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 -*)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118 # Separate the switch name from the value it's being given.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119 case "${arg}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
120 -*=* )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 opt=`echo ${arg} | sed 's:^-\([^=]*\)=.*$:\1:'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 val=`echo ${arg} | sed 's:^-[^=]*=\(.*\)$:\1:'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 valomitted=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
124 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125 -* )
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
126 # If FOO is a boolean argument, -FOO is equivalent to
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
127 # -FOO=yes. Otherwise, the value comes from the next
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
128 # argument - see below.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 opt=`echo ${arg} | sed 's:^-\(.*\)$:\1:'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 val="yes"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 valomitted=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
134
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135 # Make sure the argument is valid and unambiguous.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 case ${options} in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 *:${opt}:* ) # Exact match.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 optvar=${opt}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140 *:${opt}*:${opt}*:* ) # Ambiguous prefix.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 echo "\`-${opt}' is an ambiguous switch; it could be any of the following:"
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
142 # We can't just use tr to translate colons to newlines, since
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
143 # BSD sed and SYSV sed use different syntaxes for that.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
144 spaced_options=`echo ${options} | tr ':' ' '`
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
145 echo `(for option in ${spaced_options}; do echo $option; done) \
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
146 | grep "^${opt}"`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 echo ${short_usage}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 *:${opt}*:* ) # Unambigous prefix.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 optvar=`echo ${options} | sed 's/^.*:\('${opt}'[^:]*\):.*$/\1/'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 (echo "\`-${opt}' is not a valid option."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155 echo "${short_usage}") | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
158 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 case "${optvar}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161 usage | help)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162 echo "${usage_message}" | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 # If the variable is supposed to be boolean, make sure the value
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 # given is either "yes" or "no". If not, make sure some value
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 # was given.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 case "${boolean_opts}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 *:${optvar}:* )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172 case "${val}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 y | ye | yes ) val=yes ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174 n | no ) val=no ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 echo "The \`-${optvar}' option (\`-${opt}') is supposed to have a boolean
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
177 value - set it to either \`yes' or \`no'." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183 if [ "${valomitted}" = "yes" ]; then
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
184 if [ $# = 1 ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
185 (echo "${progname}: You must give a value for the \`-${opt}' option, as in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
186 \`-${opt}=FOO'."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
187 echo "${short_usage}") | more
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
188 exit 1
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
189 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
190 shift; val="$1"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
191 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
192 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195 eval "${optvar}=\"${val}\""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
198 machine=${arg}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200 esac
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
201 shift
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202 done
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204 if [ "${machine}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 (echo "You must specify a machine name as an argument to ${progname}."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206 echo "${short_usage}") | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
210 echo "Checking the machine."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
211 machfile="m/${machine}.h"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212 if [ ! -r src/${machfile} ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213 echo "${progname}: Emacs has no configuration info for the machine called
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214 \`${machine}'. Look at etc/MACHINES for the names of machines
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
215 that Emacs has been ported to." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
216 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
217 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
218
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
219 echo "Checking the operating system."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
220 if [ "${opsystem}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
221
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 echo " No operating system explicitly specified."
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
223 echo " Guessing, based on machine."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224 # Get the default operating system to go with the specified machine.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225 opsystem=`grep 'USUAL-OPSYS="' src/${machfile} \
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 | sed 's/^.*USUAL-OPSYS="\([^"]*\)".*$/\1/'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
227
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 if [ "${opsystem}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 echo "${progname}: Emacs's configuration files don't suggest what operating
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 system a \`${machine}' machine might run. Try specifying the
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231 operating system explicitly by passing ${progname} an
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
232 \`-opsystem=SYSTEM-NAME' flag. Look at etc/MACHINES for the
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
233 names of operating systems that Emacs has been ported to." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237 if [ "${opsystem}" = "note" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238 echo "The \`${machine}' machine can be used with more than one operating
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239 system, and Emacs's configuration info isn't clever enough to figure
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240 out which one you're running. Run ${progname} with -machine and
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241 -opsystem arguments as specified below for the appropriate system.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 (This information comes from the file \`etc/MACHINES' - see that
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243 file for more detail.)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
245 " >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
246 sed < src/${machfile} -e '1,/NOTE-START/d' -e '/NOTE-END/,$d' | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 echo
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
249 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
251 opsysfile="s/${opsystem}.h"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252 if [ ! -r src/${opsysfile} ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 echo "${progname}: Emacs's configuration files say that the default
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
254 operating system for the machine \`${machine}' is \`${opsystem}',
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
255 but there is no configuration file for \`${opsystem}', so Emacs's
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
256 default info is screwed up. Try specifying the operating system
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
257 explicitly by passing ${progname} an \`-opsystem=SYSTEM-NAME' flag." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
258 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
259 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 else
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261 opsysfile="s/${opsystem}.h"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
262 if [ ! -r src/${opsysfile} ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
263 echo "${progname}: Emacs has no configuration info for the operating system
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
264 \`${opsystem}'. Look at etc/MACHINES for the names of operating
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
265 systems that Emacs has been ported to." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
266 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
267 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
268 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
269
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
270 if [ ! "${prefix}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
271 prefix="/usr/local"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
272 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
273
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
274 if [ ! "${emacsdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
275 emacsdir="${prefix}/emacs-19.0"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
276 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
277
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
278 if [ ! "${datadir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
279 datadir="${emacsdir}/etc"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
280 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
281
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
282 if [ ! "${lispdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
283 lispdir="${emacsdir}/lisp"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
284 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
285
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
286 if [ ! "${locallisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
287 locallisppath="${emacsdir}/local-lisp"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
288 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
289
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
290 if [ ! "${lisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
291 lisppath="${locallisppath}:${lispdir}"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
292 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
293
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
294 if [ ! "${buildlisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
295 buildlisppath=../lisp
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
296 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
297
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
298 if [ ! "${statedir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
299 statedir="${emacsdir}"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
300 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
301
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
302 if [ ! "${lockdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
303 lockdir="${statedir}/lock"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
304 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
305
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
306 if [ "${libdir}" = "" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
307 libdir="${emacsdir}/arch-lib"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
308 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
309
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
310 if [ ! "${mandir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
311 mandir="/usr/man/man1"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
312 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
313
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
314 if [ ! "${infodir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
315 infodir="${prefix}/info"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
316 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
317
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
318 echo "Checking window system."
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
319 # Note that SYSV `tr' doesn't handle character ranges.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
320 window_system="`echo ${window_system} \
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
321 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
322 case "${window_system}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
323 "none" | "x11" | "x10" ) ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
324 "x" ) window_system=x11 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
325 "" )
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
326 echo " No window system specifed. Looking for X Windows."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
327 window_system=none
958
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
328 if [ -r /usr/lib/libX11.a -o -d /usr/include/X11 ]; then
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
329 window_system=x11
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
330 fi
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
331 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
332 * )
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
333 echo "The \`-window_system' option must be set to \`none' or \`X11'." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
334 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
335 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
336 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
337
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
338 case "${window_system}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
339 x11 )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
340 have_x_windows=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
341 have_x11=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
342 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
343 x10 )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
344 have_x_windows=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
345 have_x11=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
346 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
347 none )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
348 have_x_windows=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
349 have_x11=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
350 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
351 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
352
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
353 if [ "${have_x_menu}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
354 have_x_menu=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
355 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
356
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
357 echo "Checking for GCC."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
358 case "${cc}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359 "" )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
360 temppath=`echo $PATH | sed 's/^:/.:/
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
361 s/::/:.:/g
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362 s/:$/:./
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
363 s/:/ /g'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
364 cc=`(
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
365 for dir in ${temppath}; do
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
366 if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
367 done
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
368 echo cc
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
369 )`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
370 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
371 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
372
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
373 case "${cc}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
374 "gcc" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
375 # With GCC, both O and g should default to yes, no matter what
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
376 # the other is.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
377 case "${O},${g}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
378 , ) O=yes; g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
379 ,* ) O=yes; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
380 *, ) g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
381 esac
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
382 ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
383 "*" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
384 # With other compilers, treat them as mutually exclusive,
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
385 # defaulting to debug.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
386 case "${O},${g}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
387 , ) O=no ; g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
388 ,no ) O=yes; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
389 ,yes ) O=no ; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
390 no, ) g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
391 yes, ) g=no ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
392 esac
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
393 ;;
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
394 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
395
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
396 # What is the return type of a signal handler? We run
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
397 # /usr/include/signal.h through cpp and grep for the declaration of
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
398 # the signal function. Yuck.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
399 echo "Looking for return type of signal handler functions."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
400 signal_h_file=''
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
401 if [ -r /usr/include/signal.h ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
402 signal_h_file=/usr/include/signal.h
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
403 elif [ -r /usr/include/sys/signal.h ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
404 signal_h_file=/usr/include/sys/signal.h
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
405 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
406 sigtype=void
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
407 if [ "${signal_h_file}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
408 sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*('
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
409
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
410 # We make a copy whose name ends in .c, so the compiler
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
411 # won't complain about having only been given a .h file.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
412 tempcname="configure.tmp.$$.c"
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
413 cp ${signal_h_file} ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
414 if ${cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
415 sigtype=int
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
416 fi
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
417 rm -f ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
418 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
419
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
420 echo "Examining the machine- and system-dependent files to find out"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
421 echo " - which libraries the lib-src programs will want, and"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
422 echo " - whether the GNU malloc routines are usable."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
423 tempcname="configure.tmp.$$.c"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
424 echo '#include "src/'${machfile}'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
425 #include "src/'${opsysfile}'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
426 #ifndef LIBS_MACHINE
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
427 #define LIBS_MACHINE
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
428 #endif
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
429 #ifndef LIBS_SYSTEM
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
430 #define LIBS_SYSTEM
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
431 #endif
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
432 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
433 #ifdef SYSTEM_MALLOC
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
434 @configure@ system_malloc=yes
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
435 #else
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
436 @configure@ system_malloc=no
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
437 #endif
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
438 ' > ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
439 eval `${cc} -E ${tempcname} \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
440 | grep '@configure@' \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
441 | sed -e 's/^@configure@//'`
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
442 rm ${tempcname}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
443
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
444 # Do the opsystem or machine files prohibit the use of the GNU malloc?
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
445 if [ "${system_malloc}" = "yes" ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
446 gnu_malloc=no
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
447 gnu_malloc_reason="
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
448 (The GNU allocators don't work with this machine and/or operating system.)"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
449 fi
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
450
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
451 if [ ! "${rel_alloc}" ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
452 rel_alloc=${gnu_malloc}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
453 fi
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
454
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
455 rm -f config.status
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
456 set -e
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
457
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
458 # Make the proper settings in the config file.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
459 echo "Making src/config.h from src/config.h.in"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
460 if [ "${highpri}" != "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
461 highpri="(-${highpri})"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
462 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
463 case "${g}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
464 "yes" ) c_switch_site="${c_switch_site} -g" ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
465 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
466 case "${O}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
467 "yes" ) c_switch_site="${c_switch_site} -O" ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
468 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
469 sed_flags="-e 's:@machine@:${machfile}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
470 sed_flags="${sed_flags} -e 's:@opsystem@:${opsysfile}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
471 for flag in `echo ${config_h_opts} | tr ':' ' '`; do
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
472 # Note that SYSV `tr' doesn't handle character ranges.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
473 cflagname=`echo ${flag} \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
474 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
475 val=`eval echo '$'${flag}`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
476 case ${val} in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
477 no | "")
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
478 f="-e 's:.*#define ${cflagname}.*:/\\* #define ${cflagname} \\*/:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
479 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
480 yes)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
481 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
482 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
483 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
484 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname} ${val}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
485 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
486 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
487 sed_flags="${sed_flags} ${f}"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
488 done
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
489 rm -f src/config.h.tmp
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
490 eval '/bin/sed '${sed_flags}' < src/config.h.in > src/config.h.tmp'
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
491 ./move-if-change src/config.h.tmp src/config.h
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
492 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
493 chmod -w src/config.h
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
494
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
495 # Modify the parameters in the top makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
496 echo "Producing ./Makefile from ./Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
497 rm -f Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
498 (echo "# This file is generated by \`${progname}' from \`./Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
499 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
500 # editing \`./Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
501 /bin/sed < Makefile.in \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
502 -e '/^# DIST: /d' \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
503 -e 's;^\(prefix=\).*$;\1'"${prefix};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
504 -e 's;^\(bindir=\).*$;\1'"${bindir};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
505 -e 's;^\(emacsdir=\).*$;\1'"${emacsdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
506 -e 's;^\(datadir=\).*$;\1'"${datadir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
507 -e 's;^\(lispdir=\).*$;\1'"${lispdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
508 -e 's;^\(locallisppath=\).*$;\1'"${locallisppath};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
509 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
510 -e 's;^\(buildlisppath=\).*$;\1'"${buildlisppath};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
511 -e 's;^\(statedir=\).*$;\1'"${statedir};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
512 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
513 -e 's;^\(libdir=\).*$;\1'"${libdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
514 -e 's;^\(mandir=\).*$;\1'"${mandir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
515 -e 's;^\(infodir=\).*$;\1'"${infodir};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
516 ) > ./Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
517 ./move-if-change Makefile.tmp Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
518 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
519 chmod -w ./Makefile
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
520
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
521 # Modify the parameters in the `build-install' script.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
522 echo "Producing ./build-install from ./build-install.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
523 rm -f ./build-install.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
524 (echo "# This file is generated by \`${progname}' from \`./build-install.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
525 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
526 # editing \`./build-install.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
527 /bin/sed < build-install.in \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
528 -e 's;^\(prefix=\).*$;\1'"${prefix};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
529 -e 's;^\(bindir=\).*$;\1'"${bindir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
530 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
531 -e 's;^\(datadir=\).*$;\1'"${datadir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
532 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
533 -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
534 ./move-if-change build-install.tmp build-install
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
535 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
536 chmod -w build-install
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
537 chmod +x build-install
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
538
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
539 # Modify the parameters in the src makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
540 echo "Producing src/Makefile from src/Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
541 rm -f src/Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
542 (echo "# This file is generated by \`${progname}' from \`Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
543 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
544 # editing \`Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
545 /bin/sed < src/Makefile.in \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
546 -e 's;^\(CC[ ]*=\).*$;\1'"${cc};") > src/Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
547 ./move-if-change src/Makefile.tmp src/Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
548 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
549 chmod -w src/Makefile
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
550
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
551 # Modify the parameters in the lib-src makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
552 echo "Producing lib-src/Makefile from lib-src/Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
553 rm -f lib-src/Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
554 (echo "# This file is generated by \`${progname}' from \`Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
555 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
556 # editing \`Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
557 /bin/sed < lib-src/Makefile.in \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
558 -e 's;^\(CFLAGS=\).*$;\1'"${c_switch_site};" \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
559 -e 's;^\(LOADLIBES=\).*$;\1'"${libsrc_libs};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
560 -e 's;^\(CC=\).*$;\1'"${cc};") > lib-src/Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
561 ./move-if-change lib-src/Makefile.tmp lib-src/Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
562 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
563 chmod -w lib-src/Makefile
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
564
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
565
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
566 # Create a verbal description of what we have done.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
567 if [ "${highpri}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
568 desc_highpri="${highpri}"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
569 else
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
570 desc_highpri="none"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
571 fi
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
572 message="Configured for machine \`${machine}' running \`${opsystem}'.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
573 The following values have been set in ./Makefile and ./build-install:
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
574 \`make install' or \`build-install' will placed executables in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
575 ${bindir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
576 Emacs's lisp search path will be
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
577 \`${lisppath}'.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
578 Emacs will look for its architecture-independent data in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
579 ${datadir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
580 Emacs will look for its utility programs and other architecture-
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
581 dependent data in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
582 ${libdir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
583 Emacs will keep track of file-locking in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
584 ${lockdir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
585 The following values have been set in src/config.h:
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
586 At how much higher than normal priority should Emacs run? ${desc_highpri}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
587 Should Emacs use the GNU version of malloc? ${gnu_malloc}${gnu_malloc_reason}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
588 Should Emacs use the relocating allocator for buffers? ${rel_alloc}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
589 Should Emacs support a floating point Elisp type? ${lisp_float_type}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
590 What window system should Emacs use? ${window_system}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
591 Should Emacs support mouse menus, which require X11? ${have_x_menu}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
592 What compiler should emacs be built with? ${cc}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
593 Should the compilation use \`-g' and/or \`-O'? ${c_switch_site- neither}"
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
594
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
595 # Document the damage we have done by writing config.status.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
596
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
597 echo '#!/bin/sh' > config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
598
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
599 echo "# This file is generated by \`${progname}.'
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
600 # If you are thinking about editing it, you should seriously consider
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
601 # running \`${progname}' instead.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
602 " >> config.status
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
603 echo "${message}" | sed -e 's/^/# /' >> config.status
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
604 echo "'${progname}' ${arguments} "'$@' >> config.status
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
605 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
606 chmod -w config.status
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
607 chmod +x config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
608
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
609 # Print the description.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
610 echo
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
611 echo "${message}"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
612
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
613 exit 0