annotate configure1.in @ 1443:b359c67a9194

* minibuf.c (temp_echo_area_glyphs): Don't clear echo_area_glyphs and previous_echo_glyphs; let message do that work.
author Jim Blandy <jimb@redhat.com>
date Mon, 19 Oct 1992 18:44:46 +0000
parents 93ee9c5e7eec
children b695cbb4fdab
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
1112
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
31 # Remove any leading "." elements from the path name. If we don't
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
32 # remove them, then another "./" will be prepended to the file name
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
33 # each time we use config.status, and the program name will get larger
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
34 # and larger. This wouldn't be a problem, except that since progname
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
35 # gets recorded in all the Makefiles this script produces,
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
36 # move-if-changed thinks they're different when they're not.
1112
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
37 #
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
38 # It would be nice if we could put the ./ in a \( \) group and then
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
39 # apply the * operator to that, so we remove as many leading ./././'s
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
40 # as are present, but some seds (like Ultrix's sed) don't allow you to
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
41 # apply * to a \( \) group. Bleah.
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
42 progname="`echo $0 | sed 's:^\./::'`"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 short_usage="Type \`${progname} -usage' for more information about options."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 usage_message="Usage: ${progname} MACHINENAME [-OPTION[=VALUE] ...]
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 Set compilation and installation parameters for GNU Emacs, and report.
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
48 MACHINENAME is the machine to build for. For example:
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
49 ${progname} decstation
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
50 configures Emacs to run on a DECstation running Ultrix. See \`etc/MACHINES'.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 Options are:
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
52 --with-x, --with-x11 or --with-x10 - what window system to use;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
53 default is to use X11 if present. If you don't want X, specify
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
54 \`--with-x=no'.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
55 -g, -O - Passed to the compiler. Default is -g, plus -O if using gcc.
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
56 --prefix=DIR - where to install Emacs's library files
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
57 --libdir=DIR - where to look for arch-dependent library files
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
58 --datadir=DIR - where to look for architecture-independent library files
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
59 --bindir=DIR - where to install the Emacs executable, and some friends
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
60 --lisppath=PATH - colon-separated list of Emacs Lisp directories
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
61 --lockdir=DIR - where Emacs should do its file-locking stuff
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 If successful, ${progname} leaves its status in config.status. If
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63 unsuccessful after disturbing the status quo, config.status is removed."
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
64 # These are omitted since users should not mess with them.
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
65 # --gnu-malloc=[yes] or no - use the GNU memory allocator
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
66 # --rel-alloc=[yes] or no - use compacting allocator for buffers
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
67 # --lisp-float-type=[yes] or no - Support floating point in Emacs Lisp.
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
68 # --window-system is omitted because --with... follow the conventions.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 if [ ! -r ./src/lisp.h ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 echo "${progname}: Can't find Emacs sources in \`./src'.
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
72 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
73 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
76 # The option names defined here are actually the shell variable names.
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
77 # They should have `_' in place of `-'.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 options=":\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 usage:help:\
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
80 with_x:with_x11:with_x10:\
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
81 g:O:\
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
82 prefix:bindir:emacsdir:datadir:lispdir:locallisppath:\
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
83 lisppath:buildlisppath:statedir:lockdir:libdir:mandir:infodir:\
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 "
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 boolean_opts=":\
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
87 g:O:with_x:with_x10:\
603
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=":\
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
91 have_x_windows:have_x11:have_x_menu:\
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 c_switch_site:sigtype:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 "
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
95 prefix=
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
96 bindir=/usr/local/bin
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 gnu_malloc=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98 lisp_float_type=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 # The default values for the following options are guessed at after other
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 # 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
102 lisppath=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 datadir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 libdir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 lockdir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106 window_system=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
108 # Record all the arguments, so we can save them in config.status.
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
109 arguments="$@"
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
110
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
111 echo "Examining options."
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
112 while [ $# != 0 ]; do
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
113 arg="$1"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 case "${arg}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115 -*)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 # Separate the switch name from the value it's being given.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 case "${arg}" in
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
118 -*=*)
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
119 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
120 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 valomitted=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 ;;
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
123 -*)
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
124 # If FOO is a boolean argument, -FOO is equivalent to
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
125 # -FOO=yes. Otherwise, the value comes from the next
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
126 # argument - see below.
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
127 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128 val="yes"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 valomitted=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
133 # Also change `-' in the option name to `_'.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
134 opt="`echo ${opt} | tr - _`"
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
135
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 # Make sure the argument is valid and unambiguous.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 case ${options} in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 *:${opt}:* ) # Exact match.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 optvar=${opt}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 *:${opt}*:${opt}*:* ) # Ambiguous prefix.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 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
143 # 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
144 # BSD sed and SYSV sed use different syntaxes for that.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
145 spaced_options=`echo ${options} | tr ':' ' '`
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
146 echo `(for option in ${spaced_options}; do echo $option; done) \
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
147 | grep "^${opt}"`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 echo ${short_usage}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 *:${opt}*:* ) # Unambigous prefix.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 optvar=`echo ${options} | sed 's/^.*:\('${opt}'[^:]*\):.*$/\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 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155 (echo "\`-${opt}' is not a valid option."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 echo "${short_usage}") | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
158 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161 case "${optvar}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162 usage | help)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 echo "${usage_message}" | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 # If the variable is supposed to be boolean, make sure the value
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 # given is either "yes" or "no". If not, make sure some value
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 # was given.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 case "${boolean_opts}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172 *:${optvar}:* )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 case "${val}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174 y | ye | yes ) val=yes ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 n | no ) val=no ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177 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
178 value - set it to either \`yes' or \`no'." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 if [ "${valomitted}" = "yes" ]; then
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
185 if [ $# = 1 ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
186 (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
187 \`-${opt}=FOO'."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
188 echo "${short_usage}") | more
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
189 exit 1
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
190 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
191 shift; val="$1"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
192 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196 eval "${optvar}=\"${val}\""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
198 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199 machine=${arg}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201 esac
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
202 shift
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 done
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 if [ "${machine}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206 (echo "You must specify a machine name as an argument to ${progname}."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 echo "${short_usage}") | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
211 # Canonicalize the machine name.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
212 echo "Checking the machine."
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
213 machine=`./config.sub "${machine}"`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
215 # Given the canonicalized machine name, set machfile and opsysfile to
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
216 # the names of the m/*.h and s/*.h files we should use.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
217 echo ${machine}
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
218 case "${machine}" in
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
219
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
220 ## Alliant machines.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
221 ## Strictly speaking, we need the version of the alliant operating
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
222 ## system to choose the right machine file, but currently the
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
223 ## configuration name doesn't tell us enough to choose the right
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
224 ## one; we need to give alliants their own operating system name to
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
225 ## do this right. When someone cares, they can help us.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
226 fx80-alliant-* )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
227 machfile=m/alliant4.h opsysfile=s/bsd4-2.h
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
228 ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
229 i860-alliant-* )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
230 machfile=m/alliant-2800.h opsysfile=s/bsd4-3.h
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
231 ;;
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
232
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
233 ## DECstations.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
234 mips-*-ultrix* )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
235 machfile=m/pmax.h opsysfile=s/bsd4-3.h
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
236 ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
237 mips-*-osf* )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
238 machfile=m/pmax.h opsysfile=s/osf1.h
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
239 ;;
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
241 ## HP 9000 series 200 or 300.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
242 m68*-hp-bsd* )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
243 machfile=m/hp9000s300.h opsysfile=s/bsd4-3.h
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
244 ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
245 ## If it's running an unspecified version of HP/UX, assume version 8.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
246 m68*-hp-hpux7 )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
247 machfile=m/hp9000s300.h opsysfile=s/hpux.h
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
248 ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
249 m68*-hp-hpux* )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
250 machfile=m/hp9000s300.h opsysfile=s/hpux8.h
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
251 ;;
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
253 ## HP 9000 series 800, running HP/UX.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
254 hppa1.0-hp-hpux* )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
255 machfile=m/hp9000s800.h opsysfile=s/hpux.h
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
256 ;;
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
257
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
258 ## Suns.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
259 *-sun-sunos* | *-sun-bsd* )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
260 case "${machine}" in
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
261 m68*-sunos1* ) machfile=m/sun1.h ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
262 m68*-sunos2* ) machfile=m/sun2.h ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
263 m68* ) machfile=m/sun3.h ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
264 i[34]86* ) machfile=m/sun386.h ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
265 * ) machfile=m/sparc.h ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
266 esac
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
267 case "${machine}" in
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
268 *-sunos4.0* ) opsysfile=s/sunos4-0.h ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
269 *-sunos4* | *-sunos ) opsysfile=s/sunos4-1.h ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
270 * ) opsysfile=s/bsd4-2.h ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
271 esac
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
272 ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
273
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
274 * )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
275 (echo "${progname}: Emacs hasn't been ported to the machine \`${machine}'."
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
276 echo "${progname}: Check \`etc/MACHINES' for recognized machine names.") \
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
277 >&2
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
278 ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
279
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
280 esac
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
281
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
282 if [ ! "${prefix}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
283 prefix="/usr/local"
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 [ ! "${emacsdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
287 emacsdir="${prefix}/emacs-19.0"
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 [ ! "${datadir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
291 datadir="${emacsdir}/etc"
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 [ ! "${lispdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
295 lispdir="${emacsdir}/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 [ ! "${locallisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
299 locallisppath="${emacsdir}/local-lisp"
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 [ ! "${lisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
303 lisppath="${locallisppath}:${lispdir}"
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 [ ! "${buildlisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
307 buildlisppath=../lisp
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 [ ! "${statedir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
311 statedir="${emacsdir}"
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 [ ! "${lockdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
315 lockdir="${statedir}/lock"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
316 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
317
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
318 if [ "${libdir}" = "" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
319 libdir="${emacsdir}/arch-lib"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
320 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
321
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
322 if [ ! "${mandir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
323 mandir="/usr/man/man1"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
324 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
325
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
326 if [ ! "${infodir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
327 infodir="${prefix}/info"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
328 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
329
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
330 echo "Checking window system."
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
331 indow_system=''
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
332 case "${with_x}" in
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
333 yes )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
334 window_system=${window_system}x11
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
335 ;;
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
336 no )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
337 window_system=${window_system}none
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
338 esac
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
339 case "${with_x11}" in
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
340 yes )
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
341 window_system=${window_system}x11
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
342 ;;
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
343 esac
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
344 case "${with_x10}" in
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
345 yes )
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
346 window_system=${window_system}x10
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
347 ;;
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
348 esac
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
349
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
350 case "${window_system}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
351 "none" | "x11" | "x10" ) ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
352 "" )
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
353 echo " No window system specifed. Looking for X Windows."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
354 window_system=none
958
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
355 if [ -r /usr/lib/libX11.a -o -d /usr/include/X11 ]; then
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
356 window_system=x11
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
357 fi
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
358 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359 * )
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
360 echo "Don\'t specify the window system more than once." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
361 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
363 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
364
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
365 case "${window_system}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
366 x11 )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
367 have_x_windows=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
368 have_x11=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
369 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
370 x10 )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
371 have_x_windows=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
372 have_x11=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
373 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
374 none )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
375 have_x_windows=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
376 have_x11=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
377 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
378 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
379
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
380 # If we're using X11, we should use the X menu package.
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
381 have_x_menu=no
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
382 case ${have_x11} in
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
383 yes )
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
384 have_x_menu=yes
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
385 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
386 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
387
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
388 echo "Checking for GCC."
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
389 temppath=`echo $PATH | sed 's/^:/.:/
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
390 s/::/:.:/g
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
391 s/:$/:./
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
392 s/:/ /g'`
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
393 cc=`(
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
394 for dir in ${temppath}; do
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
395 if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
396 done
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
397 echo cc
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
398 )`
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
399
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
400 case "${cc}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
401 "gcc" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
402 # 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
403 # the other is.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
404 case "${O},${g}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
405 , ) O=yes; g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
406 ,* ) O=yes; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
407 *, ) g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
408 esac
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
409 ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
410 "*" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
411 # With other compilers, treat them as mutually exclusive,
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
412 # defaulting to debug.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
413 case "${O},${g}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
414 , ) O=no ; g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
415 ,no ) O=yes; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
416 ,yes ) O=no ; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
417 no, ) g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
418 yes, ) g=no ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
419 esac
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
420 ;;
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
421 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
422
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
423 # What is the return type of a signal handler? We run
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
424 # /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
425 # the signal function. Yuck.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
426 echo "Looking for return type of signal handler functions."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
427 signal_h_file=''
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
428 if [ -r /usr/include/signal.h ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
429 signal_h_file=/usr/include/signal.h
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
430 elif [ -r /usr/include/sys/signal.h ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
431 signal_h_file=/usr/include/sys/signal.h
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
432 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
433 sigtype=void
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
434 if [ "${signal_h_file}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
435 sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*('
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
436
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
437 # 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
438 # won't complain about having only been given a .h file.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
439 tempcname="configure.tmp.$$.c"
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
440 cp ${signal_h_file} ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
441 if ${cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
442 sigtype=int
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
443 fi
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
444 rm -f ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
445 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
446
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
447 echo "Examining the machine- and system-dependent files to find out"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
448 echo " - which libraries the lib-src programs will want, and"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
449 echo " - whether the GNU malloc routines are usable."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
450 tempcname="configure.tmp.$$.c"
1112
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
451 echo '#include "src/'${opsysfile}'"
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
452 #include "src/'${machfile}'"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
453 #ifndef LIBS_MACHINE
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
454 #define LIBS_MACHINE
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
455 #endif
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
456 #ifndef LIBS_SYSTEM
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
457 #define LIBS_SYSTEM
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
458 #endif
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
459 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
460 #ifdef SYSTEM_MALLOC
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
461 @configure@ system_malloc=yes
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
462 #else
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
463 @configure@ system_malloc=no
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
464 #endif
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
465 ' > ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
466 eval `${cc} -E ${tempcname} \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
467 | grep '@configure@' \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
468 | sed -e 's/^@configure@//'`
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
469 rm ${tempcname}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
470
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
471 # 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
472 if [ "${system_malloc}" = "yes" ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
473 gnu_malloc=no
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
474 gnu_malloc_reason="
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
475 (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
476 fi
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
477
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
478 if [ ! "${rel_alloc}" ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
479 rel_alloc=${gnu_malloc}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
480 fi
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
481
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
482 rm -f config.status
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
483 set -e
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
484
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
485 # Make the proper settings in the config file.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
486 echo "Making src/config.h from src/config.h.in"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
487 case "${g}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
488 "yes" ) c_switch_site="${c_switch_site} -g" ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
489 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
490 case "${O}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
491 "yes" ) c_switch_site="${c_switch_site} -O" ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
492 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
493 sed_flags="-e 's:@machine@:${machfile}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
494 sed_flags="${sed_flags} -e 's:@opsystem@:${opsysfile}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
495 for flag in `echo ${config_h_opts} | tr ':' ' '`; do
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
496 # Note that SYSV `tr' doesn't handle character ranges.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
497 cflagname=`echo ${flag} \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
498 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
499 val=`eval echo '$'${flag}`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
500 case ${val} in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
501 no | "")
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
502 f="-e 's:.*#define ${cflagname}.*:/\\* #define ${cflagname} \\*/:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
503 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
504 yes)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
505 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
506 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
507 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
508 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname} ${val}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
509 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
510 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
511 sed_flags="${sed_flags} ${f}"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
512 done
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
513 rm -f src/config.h.tmp
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
514 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
515 ./move-if-change src/config.h.tmp src/config.h
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
516 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
517 chmod -w src/config.h
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
518
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
519 # Modify the parameters in the top makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
520 echo "Producing ./Makefile from ./Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
521 rm -f Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
522 (echo "# This file is generated by \`${progname}' from \`./Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
523 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
524 # editing \`./Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
525 /bin/sed < Makefile.in \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
526 -e '/^# DIST: /d' \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
527 -e 's;^\(prefix=\).*$;\1'"${prefix};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
528 -e 's;^\(bindir=\).*$;\1'"${bindir};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
529 -e 's;^\(emacsdir=\).*$;\1'"${emacsdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
530 -e 's;^\(datadir=\).*$;\1'"${datadir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
531 -e 's;^\(lispdir=\).*$;\1'"${lispdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
532 -e 's;^\(locallisppath=\).*$;\1'"${locallisppath};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
533 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
534 -e 's;^\(buildlisppath=\).*$;\1'"${buildlisppath};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
535 -e 's;^\(statedir=\).*$;\1'"${statedir};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
536 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
537 -e 's;^\(libdir=\).*$;\1'"${libdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
538 -e 's;^\(mandir=\).*$;\1'"${mandir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
539 -e 's;^\(infodir=\).*$;\1'"${infodir};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
540 ) > ./Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
541 ./move-if-change Makefile.tmp Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
542 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
543 chmod -w ./Makefile
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
544
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
545 # Modify the parameters in the `build-install' script.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
546 echo "Producing ./build-install from ./build-install.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
547 rm -f ./build-install.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
548 (echo "# This file is generated by \`${progname}' from \`./build-install.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
549 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
550 # editing \`./build-install.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
551 /bin/sed < build-install.in \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
552 -e 's;^\(prefix=\).*$;\1'"${prefix};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
553 -e 's;^\(bindir=\).*$;\1'"${bindir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
554 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
555 -e 's;^\(datadir=\).*$;\1'"${datadir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
556 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
557 -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
558 ./move-if-change build-install.tmp build-install
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
559 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
560 chmod -w build-install
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
561 chmod +x build-install
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
562
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
563 # Modify the parameters in the src makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
564 echo "Producing src/Makefile from src/Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
565 rm -f src/Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
566 (echo "# This file is generated by \`${progname}' from \`Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
567 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
568 # editing \`Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
569 /bin/sed < src/Makefile.in \
1112
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
570 -e '/^# DIST: /d' \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
571 -e 's;^\(CC[ ]*=\).*$;\1'"${cc};") > src/Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
572 ./move-if-change src/Makefile.tmp src/Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
573 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
574 chmod -w src/Makefile
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
575
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
576 # Modify the parameters in the lib-src makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
577 echo "Producing lib-src/Makefile from lib-src/Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
578 rm -f lib-src/Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
579 (echo "# This file is generated by \`${progname}' from \`Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
580 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
581 # editing \`Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
582 /bin/sed < lib-src/Makefile.in \
1112
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
583 -e '/^# DIST: /d' \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
584 -e 's;^\(CFLAGS=\).*$;\1'"${c_switch_site};" \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
585 -e 's;^\(LOADLIBES=\).*$;\1'"${libsrc_libs};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
586 -e 's;^\(CC=\).*$;\1'"${cc};") > lib-src/Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
587 ./move-if-change lib-src/Makefile.tmp lib-src/Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
588 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
589 chmod -w lib-src/Makefile
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
590
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
591
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
592 # Create a verbal description of what we have done.
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
593 message="Configured for \`${machine}'.
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
594 The following values have been set in ./Makefile and ./build-install:
1423
93ee9c5e7eec Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents: 1139
diff changeset
595 \`make install' or \`build-install' will place executables in
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
596 ${bindir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
597 Emacs's lisp search path will be
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
598 \`${lisppath}'.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
599 Emacs will look for its architecture-independent data in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
600 ${datadir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
601 Emacs will look for its utility programs and other architecture-
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
602 dependent data in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
603 ${libdir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
604 Emacs will keep track of file-locking in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
605 ${lockdir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
606 The following values have been set in src/config.h:
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
607 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
608 Should Emacs use the relocating allocator for buffers? ${rel_alloc}
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
609 Should Emacs support a floating point data type? ${lisp_float_type}
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
610 What window system should Emacs use? ${window_system}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
611 What compiler should emacs be built with? ${cc}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
612 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
613
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
614 # Document the damage we have done by writing config.status.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
615
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
616 echo '#!/bin/sh' > config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
617
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
618 echo "# This file is generated by \`${progname}.'
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
619 # If you are thinking about editing it, you should seriously consider
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
620 # running \`${progname}' instead.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
621 " >> config.status
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
622 echo "${message}" | sed -e 's/^/# /' >> config.status
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
623 echo "'${progname}' ${arguments} "'$@' >> config.status
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
624 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
625 chmod -w config.status
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
626 chmod +x config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
627
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
628 # Print the description.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
629 echo
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
630 echo "${message}"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
631
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
632 exit 0