annotate configure1.in @ 1200:d2360c870787

* xrdb.c (x_get_resource): Cast the value being assigned to ret_value->addr, rather than ret_value->addr itself; only GCC allows you to cast lvalues.
author Jim Blandy <jimb@redhat.com>
date Tue, 22 Sep 1992 06:43:04 +0000
parents 4875b01ff377
children 93ee9c5e7eec
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] ...]
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
47
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
48 This message needs to be updated.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
49
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 Set compilation and installation parameters for GNU Emacs, and report.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 MACHINENAME is the machine to build for. See \`etc/MACHINES'.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 Options are:
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
53 --opsystem=SYSTEM - operating system to build for; see \`etc/MACHINES'.
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
54 --prefix=DIR - where to install Emacs's library files
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 These options have reasonable defaults (in []s), and may not be needed:
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
56 -g, -O - Passed to the compiler. Default is -g, plus -O if using gcc.
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
57 --cc=COMPILER - Which compiler to use. Defaults to gcc if available.
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
58 --libdir=DIR - where to look for arch-dependent library files
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
59 --datadir=DIR - where to look for architecture-independent library files
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
60 --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
61 --lisppath=PATH - colon-separated list of Emacs Lisp directories
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
62 --lockdir=DIR - where Emacs should do its file-locking stuff
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
63 --with-x or --with-x10 - what window system to use;
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
64 default is to use X11 if present
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 If successful, ${progname} leaves its status in config.status. If
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 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
67 # These are omitted since users should not mess with them.
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
68 # --gnu-malloc=[yes] or no - use the GNU memory allocator
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
69 # --rel-alloc=[yes] or no - use compacting allocator for buffers
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
70 # --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
71 # --window-system is omitted because --with... follow the conventions.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 if [ ! -r ./src/lisp.h ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 echo "${progname}: Can't find Emacs sources in \`./src'.
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
75 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
76 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
79 # 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
80 # They should have `_' in place of `-'.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 options=":\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 usage:help:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 machine:opsystem:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 g:O:cc:\
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
85 prefix:bindir:emacsdir:datadir:lispdir:locallisppath:\
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
86 lisppath:buildlisppath:statedir:lockdir:libdir:mandir:infodir:\
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
87 gnu_malloc:rel_alloc:lisp_float_type:\
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
88 window_system:\
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89 "
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 boolean_opts=":\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 g:O:\
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
93 gnu_malloc:rel_alloc:lisp_float_type:have_x_menu:with_x:with_x11:with_x10:\
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 "
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96 config_h_opts=":\
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
97 gnu_malloc:rel_alloc:lisp_float_type:\
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
98 have_x_windows:have_x11:\
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99 c_switch_site:sigtype:\
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 "
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
102 prefix=
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
103 bindir=/usr/local/bin
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 gnu_malloc=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 lisp_float_type=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107 # The default values for the following options are guessed at after other
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 # 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
109 lisppath=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
110 datadir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
111 libdir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112 lockdir=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113 window_system=""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
115 # 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
116 arguments="$*"
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
117
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
118 echo "Examining options."
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
119 while [ $# != 0 ]; do
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
120 arg="$1"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 case "${arg}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 -*)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 # Separate the switch name from the value it's being given.
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
124 # Also change `-' in the option name to `_'.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125 case "${arg}" in
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
126 -*=*)
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
127 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:' | tr - _`
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
128 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 valomitted=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 ;;
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
131 -*)
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
132 # If FOO is a boolean argument, -FOO is equivalent to
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
133 # -FOO=yes. Otherwise, the value comes from the next
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
134 # argument - see below.
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
135 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:' | tr - _`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 val="yes"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 valomitted=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 # Make sure the argument is valid and unambiguous.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 case ${options} in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 *:${opt}:* ) # Exact match.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 optvar=${opt}
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}*:${opt}*:* ) # Ambiguous prefix.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 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
148 # 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
149 # BSD sed and SYSV sed use different syntaxes for that.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
150 spaced_options=`echo ${options} | tr ':' ' '`
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
151 echo `(for option in ${spaced_options}; do echo $option; done) \
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
152 | grep "^${opt}"`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 echo ${short_usage}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 *:${opt}*:* ) # Unambigous prefix.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157 optvar=`echo ${options} | sed 's/^.*:\('${opt}'[^:]*\):.*$/\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 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 (echo "\`-${opt}' is not a valid option."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161 echo "${short_usage}") | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 case "${optvar}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 usage | help)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 echo "${usage_message}" | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 # If the variable is supposed to be boolean, make sure the value
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174 # given is either "yes" or "no". If not, make sure some value
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 # was given.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 case "${boolean_opts}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177 *:${optvar}:* )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 case "${val}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179 y | ye | yes ) val=yes ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 n | no ) val=no ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181 * )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 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
183 value - set it to either \`yes' or \`no'." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
188 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
189 if [ "${valomitted}" = "yes" ]; then
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
190 if [ $# = 1 ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
191 (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
192 \`-${opt}=FOO'."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
193 echo "${short_usage}") | more
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
194 exit 1
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
195 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
196 shift; val="$1"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
198 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201 eval "${optvar}=\"${val}\""
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204 machine=${arg}
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206 esac
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
207 shift
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 done
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210 if [ "${machine}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
211 (echo "You must specify a machine name as an argument to ${progname}."
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212 echo "${short_usage}") | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
215
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
216 echo "Checking the machine."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
217 machfile="m/${machine}.h"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
218 if [ ! -r src/${machfile} ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
219 echo "${progname}: Emacs has no configuration info for the machine called
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
220 \`${machine}'. Look at etc/MACHINES for the names of machines
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
221 that Emacs has been ported to." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
225 echo "Checking the operating system."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 if [ "${opsystem}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
227
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 echo " No operating system explicitly specified."
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
229 echo " Guessing, based on machine."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 # Get the default operating system to go with the specified machine.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231 opsystem=`grep 'USUAL-OPSYS="' src/${machfile} \
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
232 | sed 's/^.*USUAL-OPSYS="\([^"]*\)".*$/\1/'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
233
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 if [ "${opsystem}" = "" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 echo "${progname}: Emacs's configuration files don't suggest what operating
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236 system a \`${machine}' machine might run. Try specifying the
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237 operating system explicitly by passing ${progname} an
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238 \`-opsystem=SYSTEM-NAME' flag. Look at etc/MACHINES for the
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
239 names of operating systems that Emacs has been ported to." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243 if [ "${opsystem}" = "note" ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244 echo "The \`${machine}' machine can be used with more than one operating
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
245 system, and Emacs's configuration info isn't clever enough to figure
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
246 out which one you're running. Run ${progname} with -machine and
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 -opsystem arguments as specified below for the appropriate system.
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248 (This information comes from the file \`etc/MACHINES' - see that
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
249 file for more detail.)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
251 " >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252 sed < src/${machfile} -e '1,/NOTE-START/d' -e '/NOTE-END/,$d' | more
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 echo
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
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's configuration files say that the default
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 operating system for the machine \`${machine}' is \`${opsystem}',
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261 but there is no configuration file for \`${opsystem}', so Emacs's
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
262 default info is screwed up. Try specifying the operating system
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
263 explicitly by passing ${progname} an \`-opsystem=SYSTEM-NAME' flag." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
264 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
265 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
266 else
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
267 opsysfile="s/${opsystem}.h"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
268 if [ ! -r src/${opsysfile} ]; then
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
269 echo "${progname}: Emacs has no configuration info for the operating system
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
270 \`${opsystem}'. Look at etc/MACHINES for the names of operating
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
271 systems that Emacs has been ported to." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
272 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
273 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
274 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
275
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
276 if [ ! "${prefix}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
277 prefix="/usr/local"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
278 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
279
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
280 if [ ! "${emacsdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
281 emacsdir="${prefix}/emacs-19.0"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
282 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
283
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
284 if [ ! "${datadir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
285 datadir="${emacsdir}/etc"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
286 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
287
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
288 if [ ! "${lispdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
289 lispdir="${emacsdir}/lisp"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
290 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
291
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
292 if [ ! "${locallisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
293 locallisppath="${emacsdir}/local-lisp"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
294 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
295
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
296 if [ ! "${lisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
297 lisppath="${locallisppath}:${lispdir}"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
298 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
299
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
300 if [ ! "${buildlisppath}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
301 buildlisppath=../lisp
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
302 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
303
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
304 if [ ! "${statedir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
305 statedir="${emacsdir}"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
306 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
307
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
308 if [ ! "${lockdir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
309 lockdir="${statedir}/lock"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
310 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
311
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
312 if [ "${libdir}" = "" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
313 libdir="${emacsdir}/arch-lib"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
314 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
315
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
316 if [ ! "${mandir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
317 mandir="/usr/man/man1"
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
318 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
319
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
320 if [ ! "${infodir}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
321 infodir="${prefix}/info"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
322 fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
323
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
324 echo "Checking window system."
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
325 case "${with_x11}" in
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
326 yes )
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
327 window_system=${window_system}x11
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
328 ;;
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
329 esac
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
330 case "${with_x}" in
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
331 yes )
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
332 window_system=${window_system}x11
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
333 ;;
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
334 esac
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
335 case "${with_x10}" in
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
336 yes )
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
337 window_system=${window_system}x10
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
338 ;;
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
339 esac
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
340
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
341 # Note that SYSV `tr' doesn't handle character ranges.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
342 window_system="`echo ${window_system} \
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
343 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
344 case "${window_system}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
345 "none" | "x11" | "x10" ) ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
346 "x" ) window_system=x11 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
347 "" )
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
348 echo " No window system specifed. Looking for X Windows."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
349 window_system=none
958
cc82116a8f1c *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 732
diff changeset
350 if [ -r /usr/lib/libX11.a -o -d /usr/include/X11 ]; then
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
351 window_system=x11
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
352 fi
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
353 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
354 * )
1139
4875b01ff377 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 1112
diff changeset
355 echo "Don\'t specify the window system more than once." >&2
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
356 exit 1
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
357 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
358 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
360 case "${window_system}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
361 x11 )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362 have_x_windows=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
363 have_x11=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
364 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
365 x10 )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
366 have_x_windows=yes
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
367 have_x11=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
368 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
369 none )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
370 have_x_windows=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
371 have_x11=no
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
372 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
373 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
374
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
375 echo "Checking for GCC."
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
376 case "${cc}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
377 "" )
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
378 temppath=`echo $PATH | sed 's/^:/.:/
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
379 s/::/:.:/g
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
380 s/:$/:./
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
381 s/:/ /g'`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
382 cc=`(
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
383 for dir in ${temppath}; do
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
384 if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
385 done
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
386 echo cc
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
387 )`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
388 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
389 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
390
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
391 case "${cc}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
392 "gcc" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
393 # 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
394 # the other is.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
395 case "${O},${g}" in
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
396 , ) O=yes; g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
397 ,* ) O=yes; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
398 *, ) g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
399 esac
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
400 ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
401 "*" )
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
402 # With other compilers, treat them as mutually exclusive,
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
403 # defaulting to debug.
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=no ; g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
406 ,no ) O=yes; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
407 ,yes ) O=no ; ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
408 no, ) g=yes ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
409 yes, ) g=no ;;
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
410 esac
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
411 ;;
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
412 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
413
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
414 # What is the return type of a signal handler? We run
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
415 # /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
416 # the signal function. Yuck.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
417 echo "Looking for return type of signal handler functions."
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
418 signal_h_file=''
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
419 if [ -r /usr/include/signal.h ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
420 signal_h_file=/usr/include/signal.h
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
421 elif [ -r /usr/include/sys/signal.h ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
422 signal_h_file=/usr/include/sys/signal.h
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
423 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
424 sigtype=void
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
425 if [ "${signal_h_file}" ]; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
426 sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*('
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
427
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
428 # 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
429 # won't complain about having only been given a .h file.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
430 tempcname="configure.tmp.$$.c"
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
431 cp ${signal_h_file} ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
432 if ${cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
433 sigtype=int
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
434 fi
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
435 rm -f ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
436 fi
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
437
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
438 echo "Examining the machine- and system-dependent files to find out"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
439 echo " - which libraries the lib-src programs will want, and"
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
440 echo " - whether the GNU malloc routines are usable."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
441 tempcname="configure.tmp.$$.c"
1112
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
442 echo '#include "src/'${opsysfile}'"
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
443 #include "src/'${machfile}'"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
444 #ifndef LIBS_MACHINE
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
445 #define LIBS_MACHINE
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
446 #endif
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
447 #ifndef LIBS_SYSTEM
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
448 #define LIBS_SYSTEM
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
449 #endif
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
450 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
451 #ifdef SYSTEM_MALLOC
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
452 @configure@ system_malloc=yes
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
453 #else
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
454 @configure@ system_malloc=no
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
455 #endif
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
456 ' > ${tempcname}
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
457 eval `${cc} -E ${tempcname} \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
458 | grep '@configure@' \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
459 | sed -e 's/^@configure@//'`
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
460 rm ${tempcname}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
461
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
462 # 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
463 if [ "${system_malloc}" = "yes" ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
464 gnu_malloc=no
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
465 gnu_malloc_reason="
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
466 (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
467 fi
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
468
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
469 if [ ! "${rel_alloc}" ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
470 rel_alloc=${gnu_malloc}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
471 fi
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
472
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
473 rm -f config.status
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
474 set -e
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
475
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
476 # Make the proper settings in the config file.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
477 echo "Making src/config.h from src/config.h.in"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
478 case "${g}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
479 "yes" ) c_switch_site="${c_switch_site} -g" ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
480 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
481 case "${O}" in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
482 "yes" ) c_switch_site="${c_switch_site} -O" ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
483 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
484 sed_flags="-e 's:@machine@:${machfile}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
485 sed_flags="${sed_flags} -e 's:@opsystem@:${opsysfile}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
486 for flag in `echo ${config_h_opts} | tr ':' ' '`; do
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
487 # Note that SYSV `tr' doesn't handle character ranges.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
488 cflagname=`echo ${flag} \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
489 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
490 val=`eval echo '$'${flag}`
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
491 case ${val} in
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
492 no | "")
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
493 f="-e 's:.*#define ${cflagname}.*:/\\* #define ${cflagname} \\*/:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
494 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
495 yes)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
496 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
497 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
498 *)
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
499 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname} ${val}:'"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
500 ;;
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
501 esac
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
502 sed_flags="${sed_flags} ${f}"
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
503 done
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
504 rm -f src/config.h.tmp
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
505 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
506 ./move-if-change src/config.h.tmp src/config.h
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
507 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
508 chmod -w src/config.h
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
509
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
510 # Modify the parameters in the top makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
511 echo "Producing ./Makefile from ./Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
512 rm -f Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
513 (echo "# This file is generated by \`${progname}' from \`./Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
514 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
515 # editing \`./Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
516 /bin/sed < Makefile.in \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
517 -e '/^# DIST: /d' \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
518 -e 's;^\(prefix=\).*$;\1'"${prefix};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
519 -e 's;^\(bindir=\).*$;\1'"${bindir};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
520 -e 's;^\(emacsdir=\).*$;\1'"${emacsdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
521 -e 's;^\(datadir=\).*$;\1'"${datadir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
522 -e 's;^\(lispdir=\).*$;\1'"${lispdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
523 -e 's;^\(locallisppath=\).*$;\1'"${locallisppath};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
524 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
525 -e 's;^\(buildlisppath=\).*$;\1'"${buildlisppath};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
526 -e 's;^\(statedir=\).*$;\1'"${statedir};" \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
527 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
528 -e 's;^\(libdir=\).*$;\1'"${libdir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
529 -e 's;^\(mandir=\).*$;\1'"${mandir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
530 -e 's;^\(infodir=\).*$;\1'"${infodir};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
531 ) > ./Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
532 ./move-if-change Makefile.tmp Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
533 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
534 chmod -w ./Makefile
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
535
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
536 # Modify the parameters in the `build-install' script.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
537 echo "Producing ./build-install from ./build-install.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
538 rm -f ./build-install.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
539 (echo "# This file is generated by \`${progname}' from \`./build-install.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
540 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
541 # editing \`./build-install.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
542 /bin/sed < build-install.in \
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
543 -e 's;^\(prefix=\).*$;\1'"${prefix};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
544 -e 's;^\(bindir=\).*$;\1'"${bindir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
545 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
546 -e 's;^\(datadir=\).*$;\1'"${datadir};" \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
547 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
548 -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
549 ./move-if-change build-install.tmp build-install
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
550 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
551 chmod -w build-install
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
552 chmod +x build-install
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
553
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
554 # Modify the parameters in the src makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
555 echo "Producing src/Makefile from src/Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
556 rm -f src/Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
557 (echo "# This file is generated by \`${progname}' from \`Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
558 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
559 # editing \`Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
560 /bin/sed < src/Makefile.in \
1112
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
561 -e '/^# DIST: /d' \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
562 -e 's;^\(CC[ ]*=\).*$;\1'"${cc};") > src/Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
563 ./move-if-change src/Makefile.tmp src/Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
564 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
565 chmod -w src/Makefile
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
566
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
567 # Modify the parameters in the lib-src makefile.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
568 echo "Producing lib-src/Makefile from lib-src/Makefile.in."
704
2aacd42951ef *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 638
diff changeset
569 rm -f lib-src/Makefile.tmp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
570 (echo "# This file is generated by \`${progname}' from \`Makefile.in'.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
571 # If you are thinking about editing it, you should seriously consider
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
572 # editing \`Makefile.in' itself, or running \`${progname}' instead."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
573 /bin/sed < lib-src/Makefile.in \
1112
1dba066c1e0a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 999
diff changeset
574 -e '/^# DIST: /d' \
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
575 -e 's;^\(CFLAGS=\).*$;\1'"${c_switch_site};" \
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
576 -e 's;^\(LOADLIBES=\).*$;\1'"${libsrc_libs};" \
638
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
577 -e 's;^\(CC=\).*$;\1'"${cc};") > lib-src/Makefile.tmp
40b255f55df3 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
578 ./move-if-change lib-src/Makefile.tmp lib-src/Makefile
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
579 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
580 chmod -w lib-src/Makefile
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
581
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
582
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
583 # Create a verbal description of what we have done.
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
584 message="Configured for machine \`${machine}' running \`${opsystem}'.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
585 The following values have been set in ./Makefile and ./build-install:
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
586 \`make install' or \`build-install' will placed executables in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
587 ${bindir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
588 Emacs's lisp search path will be
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
589 \`${lisppath}'.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
590 Emacs will look for its architecture-independent data in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
591 ${datadir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
592 Emacs will look for its utility programs and other architecture-
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
593 dependent data in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
594 ${libdir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
595 Emacs will keep track of file-locking in
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
596 ${lockdir}.
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
597 The following values have been set in src/config.h:
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
598 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
599 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
600 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
601 What window system should Emacs use? ${window_system}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
602 What compiler should emacs be built with? ${cc}
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
603 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
604
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
605 # Document the damage we have done by writing config.status.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
606
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
607 echo '#!/bin/sh' > config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
608
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
609 echo "# This file is generated by \`${progname}.'
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
610 # If you are thinking about editing it, you should seriously consider
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
611 # running \`${progname}' instead.
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
612 " >> config.status
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
613 echo "${message}" | sed -e 's/^/# /' >> config.status
999
d8d503897aa5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
614 echo "'${progname}' ${arguments} "'$@' >> config.status
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
615 # Remind people not to edit this.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 605
diff changeset
616 chmod -w config.status
605
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
617 chmod +x config.status
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
618
5f36058e31f9 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 603
diff changeset
619 # Print the description.
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
620 echo
732
a8d94735277e *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 704
diff changeset
621 echo "${message}"
603
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
622
470f556a9453 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
623 exit 0