annotate configure1.in @ 706:86cb5db0b6c3

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Wed, 10 Jun 1992 02:25:55 +0000
parents 2aacd42951ef
children a8d94735277e
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'.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 Run this config script in the top directory of the Emacs source tree." 1>&2
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:"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 echo `echo ${options} | tr ':' '\012' | grep '^'${opt}`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 echo ${short_usage}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
145 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146 *:${opt}*:* ) # Unambigous prefix.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 optvar=`echo ${options} | sed 's/^.*:\('${opt}'[^:]*\):.*$/\1/'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 (echo "\`-${opt}' is not a valid option."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 echo "${short_usage}") | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 case "${optvar}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157 usage | help)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
158 echo "${usage_message}" | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 # If the variable is supposed to be boolean, make sure the value
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164 # given is either "yes" or "no". If not, make sure some value
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 # was given.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 case "${boolean_opts}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 *:${optvar}:* )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 case "${val}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 y | ye | yes ) val=yes ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 n | no ) val=no ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172 echo "The \`-${optvar}' option (\`-${opt}') is supposed to have a boolean
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 value - set it to either \`yes' or \`no'." 1>&2
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179 if [ "${valomitted}" = "yes" ]; then
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
180 if [ $# = 1 ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
181 (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
182 \`-${opt}=FOO'."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
183 echo "${short_usage}") | more
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
184 exit 1
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
185 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
186 shift; val="$1"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
188 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
189 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
190
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
191 eval "${optvar}=\"${val}\""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
192 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194 machine=${arg}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196 esac
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
197 shift
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
198 done
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200 if [ "${machine}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201 (echo "You must specify a machine name as an argument to ${progname}."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202 echo "${short_usage}") | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
206 echo "Checking the machine."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 machfile="m/${machine}.h"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 if [ ! -r src/${machfile} ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209 echo "${progname}: Emacs has no configuration info for the machine called
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210 \`${machine}'. Look at etc/MACHINES for the names of machines
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
211 that Emacs has been ported to." 1>&2
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
215 echo "Checking the operating system."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
216 if [ "${opsystem}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
217
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
218 echo " No operating system explicitly specified."
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
219 echo " Guessing, based on machine."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
220 # Get the default operating system to go with the specified machine.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
221 opsystem=`grep 'USUAL-OPSYS="' src/${machfile} \
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 | sed 's/^.*USUAL-OPSYS="\([^"]*\)".*$/\1/'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224 if [ "${opsystem}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225 echo "${progname}: Emacs's configuration files don't suggest what operating
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 system a \`${machine}' machine might run. Try specifying the
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
227 operating system explicitly by passing ${progname} an
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 \`-opsystem=SYSTEM-NAME' flag. Look at etc/MACHINES for the
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 names of operating systems that Emacs has been ported to." 1>&2
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
232
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
233 if [ "${opsystem}" = "note" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 echo "The \`${machine}' machine can be used with more than one operating
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 system, and Emacs's configuration info isn't clever enough to figure
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236 out which one you're running. Run ${progname} with -machine and
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237 -opsystem arguments as specified below for the appropriate system.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238 (This information comes from the file \`etc/MACHINES' - see that
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239 file for more detail.)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241 " 1>&2
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 sed < src/${machfile} -e '1,/NOTE-START/d' -e '/NOTE-END/,$d' | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243 echo
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
245 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
246
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 opsysfile="s/${opsystem}.h"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248 if [ ! -r src/${opsysfile} ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
249 echo "${progname}: Emacs's configuration files say that the default
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250 operating system for the machine \`${machine}' is \`${opsystem}',
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
251 but there is no configuration file for \`${opsystem}', so Emacs's
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252 default info is screwed up. Try specifying the operating system
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 explicitly by passing ${progname} an \`-opsystem=SYSTEM-NAME' flag." 1>&2
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
254 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
255 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
256 else
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
257 opsysfile="s/${opsystem}.h"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
258 if [ ! -r src/${opsysfile} ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
259 echo "${progname}: Emacs has no configuration info for the operating system
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 \`${opsystem}'. Look at etc/MACHINES for the names of operating
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261 systems that Emacs has been ported to." 1>&2
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
262 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
263 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
264 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
265
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
266 if [ ! "${prefix}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
267 prefix="/usr/local"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
268 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
269
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
270 if [ ! "${emacsdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
271 emacsdir="${prefix}/emacs-19.0"
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 [ ! "${datadir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
275 datadir="${emacsdir}/etc"
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 [ ! "${lispdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
279 lispdir="${emacsdir}/lisp"
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 [ ! "${locallisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
283 locallisppath="${emacsdir}/local-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 [ ! "${lisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
287 lisppath="${locallisppath}:${lispdir}"
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 [ ! "${buildlisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
291 buildlisppath=../lisp
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 [ ! "${statedir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
295 statedir="${emacsdir}"
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 [ ! "${lockdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
299 lockdir="${statedir}/lock"
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 [ "${libdir}" = "" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
303 libdir="${emacsdir}/arch-lib"
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 [ ! "${mandir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
307 mandir="/usr/man/man1"
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 [ ! "${infodir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
311 infodir="${prefix}/info"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
312 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
313
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
314 echo "Checking window system."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
315 window_system="`echo ${window_system} | tr A-Z a-z`"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
316 case "${window_system}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
317 "none" | "x11" | "x10" ) ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
318 "x" ) window_system=x11 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
319 "" )
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
320 echo " No window system specifed. Looking for X Windows."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
321 window_system=none
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
322 if [ -r /usr/lib/libX11.a -a -d /usr/include/X11 ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
323 window_system=x11
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
324 fi
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
325 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
326 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
327 echo "The \`-window_system' option must be set to \`none' or \`X11'." 1>&2
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
328 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
329 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
330 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
331
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
332 case "${window_system}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
333 x11 )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
334 have_x_windows=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
335 have_x11=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
336 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
337 x10 )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
338 have_x_windows=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
339 have_x11=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
340 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
341 none )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
342 have_x_windows=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
343 have_x11=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
344 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
345 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
346
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
347 if [ "${have_x_menu}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
348 have_x_menu=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
349 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
350
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
351 echo "Checking for GCC."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
352 case "${cc}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
353 "" )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
354 temppath=`echo $PATH | sed 's/^:/.:/
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
355 s/::/:.:/g
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
356 s/:$/:./
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
357 s/:/ /g'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
358 cc=`(
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359 for dir in ${temppath}; do
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
360 if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
361 done
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362 echo cc
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
363 )`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
364 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
365 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
366
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
367 case "${cc}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
368 "gcc" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
369 # 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
370 # the other is.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
371 case "${O},${g}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
372 , ) O=yes; g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
373 ,* ) O=yes; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
374 *, ) g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
375 esac
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
376 ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
377 "*" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
378 # With other compilers, treat them as mutually exclusive,
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
379 # defaulting to debug.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
380 case "${O},${g}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
381 , ) O=no ; g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
382 ,no ) O=yes; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
383 ,yes ) O=no ; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
384 no, ) g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
385 yes, ) g=no ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
386 esac
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
387 ;;
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
388 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
389
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
390 # What is the return type of a signal handler? We run
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
391 # /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
392 # the signal function. Yuck.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
393 echo "Looking for return type of signal handler functions."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
394 signal_h_file=''
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
395 if [ -r /usr/include/signal.h ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
396 signal_h_file=/usr/include/signal.h
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
397 elif [ -r /usr/include/sys/signal.h ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
398 signal_h_file=/usr/include/sys/signal.h
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
399 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
400 sigtype=void
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
401 if [ "${signal_h_file}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
402 sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*('
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
403
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
404 # We make a symbolic link whose name ends in .c, so the compiler
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
405 # won't complain about having only been given a .h file.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
406 tempcname="configure.tmp.$$.c"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
407 ln -s ${signal_h_file} ${tempcname}
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
408 if ${cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
409 sigtype=int
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
410 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
411 rm ${tempcname}
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
412 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
413
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
414 echo "Examining the machine- and system-dependent files to find out"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
415 echo " - which libraries the lib-src programs will want, and"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
416 echo " - whether the GNU malloc routines are usable."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
417 tempcname="configure.tmp.$$.c"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
418 echo '#include "src/'${machfile}'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
419 #include "src/'${opsysfile}'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
420 #ifndef LIBS_MACHINE
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
421 #define LIBS_MACHINE
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
422 #endif
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
423 #ifndef LIBS_SYSTEM
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
424 #define LIBS_SYSTEM
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
425 #endif
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
426 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
427 #ifdef SYSTEM_MALLOC
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
428 @configure@ system_malloc=yes
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
429 #else
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
430 @configure@ system_malloc=no
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
431 #endif
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
432 ' > ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
433 eval `${cc} -E ${tempcname} \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
434 | grep '@configure@' \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
435 | sed -e 's/^@configure@//'`
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
436 rm ${tempcname}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
437
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
438 # 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
439 if [ "${system_malloc}" = "yes" ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
440 gnu_malloc=no
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
441 gnu_malloc_reason="
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
442 (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
443 fi
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
444
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
445 if [ ! "${rel_alloc}" ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
446 rel_alloc=${gnu_malloc}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
447 fi
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
448
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
449 rm -f config.status
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
450 set -e
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
451
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
452 # Make the proper settings in the config file.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
453 echo "Making src/config.h from src/config.h.in"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
454 if [ "${highpri}" != "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
455 highpri="(-${highpri})"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
456 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
457 case "${g}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
458 "yes" ) c_switch_site="${c_switch_site} -g" ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
459 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
460 case "${O}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
461 "yes" ) c_switch_site="${c_switch_site} -O" ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
462 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
463 sed_flags="-e 's:@machine@:${machfile}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
464 sed_flags="${sed_flags} -e 's:@opsystem@:${opsysfile}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
465 for flag in `echo ${config_h_opts} | tr ':' ' '`; do
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
466 cflagname=`echo ${flag} \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
467 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
468 val=`eval echo '$'${flag}`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
469 case ${val} in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
470 no | "")
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
471 f="-e 's:.*#define ${cflagname}.*:/\\* #define ${cflagname} \\*/:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
472 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
473 yes)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
474 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
475 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
476 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
477 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname} ${val}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
478 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
479 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
480 sed_flags="${sed_flags} ${f}"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
481 done
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
482 rm -f src/config.h.tmp
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
483 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
484 ./move-if-change src/config.h.tmp src/config.h
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
485 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
486 chmod -w src/config.h
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
487
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
488 # Modify the parameters in the top makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
489 echo "Producing ./Makefile from ./Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
490 rm -f Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
491 (echo "# This file is generated by \`${progname}' from \`./Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
492 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
493 # editing \`./Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
494 /bin/sed < Makefile.in \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
495 -e '/^# DIST: /d' \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
496 -e 's;^\(prefix=\).*$;\1'"${prefix};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
497 -e 's;^\(bindir=\).*$;\1'"${bindir};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
498 -e 's;^\(emacsdir=\).*$;\1'"${emacsdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
499 -e 's;^\(datadir=\).*$;\1'"${datadir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
500 -e 's;^\(lispdir=\).*$;\1'"${lispdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
501 -e 's;^\(locallisppath=\).*$;\1'"${locallisppath};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
502 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
503 -e 's;^\(buildlisppath=\).*$;\1'"${buildlisppath};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
504 -e 's;^\(statedir=\).*$;\1'"${statedir};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
505 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
506 -e 's;^\(libdir=\).*$;\1'"${libdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
507 -e 's;^\(mandir=\).*$;\1'"${mandir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
508 -e 's;^\(infodir=\).*$;\1'"${infodir};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
509 ) > ./Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
510 ./move-if-change Makefile.tmp Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
511 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
512 chmod -w ./Makefile
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
513
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
514 # Modify the parameters in the `build-install' script.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
515 echo "Producing ./build-install from ./build-install.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
516 rm -f ./build-install.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
517 (echo "# This file is generated by \`${progname}' from \`./build-install.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
518 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
519 # editing \`./build-install.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
520 /bin/sed < build-install.in \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
521 -e 's;^\(prefix=\).*$;\1'"${prefix};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
522 -e 's;^\(bindir=\).*$;\1'"${bindir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
523 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
524 -e 's;^\(datadir=\).*$;\1'"${datadir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
525 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
526 -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
527 ./move-if-change build-install.tmp build-install
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
528 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
529 chmod -w build-install
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
530 chmod +x build-install
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
531
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
532 # Modify the parameters in the src makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
533 echo "Producing src/Makefile from src/Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
534 rm -f src/Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
535 (echo "# This file is generated by \`${progname}' from \`Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
536 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
537 # editing \`Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
538 /bin/sed < src/Makefile.in \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
539 -e 's;^\(CC[ ]*=\).*$;\1'"${cc};") > src/Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
540 ./move-if-change src/Makefile.tmp src/Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
541 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
542 chmod -w src/Makefile
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
543
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
544 # Modify the parameters in the lib-src makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
545 echo "Producing lib-src/Makefile from lib-src/Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
546 rm -f lib-src/Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
547 (echo "# This file is generated by \`${progname}' from \`Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
548 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
549 # editing \`Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
550 /bin/sed < lib-src/Makefile.in \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
551 -e 's;^\(CFLAGS=\).*$;\1'"${c_switch_site};" \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
552 -e 's;^\(LOADLIBES=\).*$;\1'"${libsrc_libs};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
553 -e 's;^\(CC=\).*$;\1'"${cc};") > lib-src/Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
554 ./move-if-change lib-src/Makefile.tmp lib-src/Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
555 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
556 chmod -w lib-src/Makefile
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
557
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
558
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
559 # Create a verbal description of what we have done.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
560 if [ "${highpri}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
561 desc_highpri="${highpri}"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
562 else
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
563 desc_highpri="none"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
564 fi
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
565 message="# Configured for machine \`${machine}' running \`${opsystem}'.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
566 # The following values have been set in ./Makefile and ./build-install:
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
567 # Executables will be placed in
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
568 # ${bindir}.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
569 # Emacs's lisp search path will be
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
570 # \`${lisppath}'.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
571 # Emacs will look for its architecture-independent data in
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
572 # ${datadir}.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
573 # Emacs will look for its utility programs and other architecture-
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
574 # dependent data in
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
575 # ${libdir}.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
576 # Emacs will keep track of file-locking in
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
577 # ${lockdir}.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
578 # The following values have been set in src/config.h:
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
579 # At how much higher than normal priority should Emacs run? ${desc_highpri}
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
580 # Should Emacs use the GNU version of malloc? ${gnu_malloc}${gnu_malloc_reason}
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
581 # Should Emacs use the relocating allocator for buffers? ${rel_alloc}
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
582 # Should Emacs support a floating point Elisp type? ${lisp_float_type}
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
583 # What window system should Emacs use? ${window_system}
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
584 # Should Emacs support mouse menus, which require X11? ${have_x_menu}
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
585 # What compiler should emacs be built with? ${cc}
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
586 # Should the compilation use \`-g' and/or \`-O'? ${c_switch_site- neither}"
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
587
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
588 # Document the damage we have done by writing config.status.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
589
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
590 echo '#!/bin/sh' > config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
591
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
592 echo "# This file is generated by \`${progname}.'
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
593 # If you are thinking about editing it, you should seriously consider
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
594 # running \`${progname}' instead.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
595 " >> config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
596 echo "${message}" >> config.status
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
597 echo "'./${progname}' ${arguments} "'$@' >> config.status
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
598 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
599 chmod -w config.status
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
600 chmod +x config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
601
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
602 # Print the description.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
603 echo
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
604 echo "${message}" | sed -e 's/^# //'
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
605
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
606 exit 0