Mercurial > emacs
comparison configure1.in @ 1423:93ee9c5e7eec
Partially changed to use GCC-style configuration names.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 17 Oct 1992 22:07:23 +0000 |
parents | 4875b01ff377 |
children | b695cbb4fdab |
comparison
equal
deleted
inserted
replaced
1422:f52113454d04 | 1423:93ee9c5e7eec |
---|---|
42 progname="`echo $0 | sed 's:^\./::'`" | 42 progname="`echo $0 | sed 's:^\./::'`" |
43 | 43 |
44 short_usage="Type \`${progname} -usage' for more information about options." | 44 short_usage="Type \`${progname} -usage' for more information about options." |
45 | 45 |
46 usage_message="Usage: ${progname} MACHINENAME [-OPTION[=VALUE] ...] | 46 usage_message="Usage: ${progname} MACHINENAME [-OPTION[=VALUE] ...] |
47 | |
48 This message needs to be updated. | |
49 | |
50 Set compilation and installation parameters for GNU Emacs, and report. | 47 Set compilation and installation parameters for GNU Emacs, and report. |
51 MACHINENAME is the machine to build for. See \`etc/MACHINES'. | 48 MACHINENAME is the machine to build for. For example: |
49 ${progname} decstation | |
50 configures Emacs to run on a DECstation running Ultrix. See \`etc/MACHINES'. | |
52 Options are: | 51 Options are: |
53 --opsystem=SYSTEM - operating system to build for; see \`etc/MACHINES'. | 52 --with-x, --with-x11 or --with-x10 - what window system to use; |
53 default is to use X11 if present. If you don't want X, specify | |
54 \`--with-x=no'. | |
55 -g, -O - Passed to the compiler. Default is -g, plus -O if using gcc. | |
54 --prefix=DIR - where to install Emacs's library files | 56 --prefix=DIR - where to install Emacs's library files |
55 These options have reasonable defaults (in []s), and may not be needed: | |
56 -g, -O - Passed to the compiler. Default is -g, plus -O if using gcc. | |
57 --cc=COMPILER - Which compiler to use. Defaults to gcc if available. | |
58 --libdir=DIR - where to look for arch-dependent library files | 57 --libdir=DIR - where to look for arch-dependent library files |
59 --datadir=DIR - where to look for architecture-independent library files | 58 --datadir=DIR - where to look for architecture-independent library files |
60 --bindir=DIR - where to install the Emacs executable, and some friends | 59 --bindir=DIR - where to install the Emacs executable, and some friends |
61 --lisppath=PATH - colon-separated list of Emacs Lisp directories | 60 --lisppath=PATH - colon-separated list of Emacs Lisp directories |
62 --lockdir=DIR - where Emacs should do its file-locking stuff | 61 --lockdir=DIR - where Emacs should do its file-locking stuff |
63 --with-x or --with-x10 - what window system to use; | |
64 default is to use X11 if present | |
65 If successful, ${progname} leaves its status in config.status. If | 62 If successful, ${progname} leaves its status in config.status. If |
66 unsuccessful after disturbing the status quo, config.status is removed." | 63 unsuccessful after disturbing the status quo, config.status is removed." |
67 # These are omitted since users should not mess with them. | 64 # These are omitted since users should not mess with them. |
68 # --gnu-malloc=[yes] or no - use the GNU memory allocator | 65 # --gnu-malloc=[yes] or no - use the GNU memory allocator |
69 # --rel-alloc=[yes] or no - use compacting allocator for buffers | 66 # --rel-alloc=[yes] or no - use compacting allocator for buffers |
78 | 75 |
79 # The option names defined here are actually the shell variable names. | 76 # The option names defined here are actually the shell variable names. |
80 # They should have `_' in place of `-'. | 77 # They should have `_' in place of `-'. |
81 options=":\ | 78 options=":\ |
82 usage:help:\ | 79 usage:help:\ |
83 machine:opsystem:\ | 80 with_x:with_x11:with_x10:\ |
84 g:O:cc:\ | 81 g:O:\ |
85 prefix:bindir:emacsdir:datadir:lispdir:locallisppath:\ | 82 prefix:bindir:emacsdir:datadir:lispdir:locallisppath:\ |
86 lisppath:buildlisppath:statedir:lockdir:libdir:mandir:infodir:\ | 83 lisppath:buildlisppath:statedir:lockdir:libdir:mandir:infodir:\ |
87 gnu_malloc:rel_alloc:lisp_float_type:\ | |
88 window_system:\ | |
89 " | 84 " |
90 | 85 |
91 boolean_opts=":\ | 86 boolean_opts=":\ |
92 g:O:\ | 87 g:O:with_x:with_x10:\ |
93 gnu_malloc:rel_alloc:lisp_float_type:have_x_menu:with_x:with_x11:with_x10:\ | |
94 " | 88 " |
95 | 89 |
96 config_h_opts=":\ | 90 config_h_opts=":\ |
97 gnu_malloc:rel_alloc:lisp_float_type:\ | 91 have_x_windows:have_x11:have_x_menu:\ |
98 have_x_windows:have_x11:\ | |
99 c_switch_site:sigtype:\ | 92 c_switch_site:sigtype:\ |
100 " | 93 " |
101 | 94 |
102 prefix= | 95 prefix= |
103 bindir=/usr/local/bin | 96 bindir=/usr/local/bin |
111 libdir="" | 104 libdir="" |
112 lockdir="" | 105 lockdir="" |
113 window_system="" | 106 window_system="" |
114 | 107 |
115 # Record all the arguments, so we can save them in config.status. | 108 # Record all the arguments, so we can save them in config.status. |
116 arguments="$*" | 109 arguments="$@" |
117 | 110 |
118 echo "Examining options." | 111 echo "Examining options." |
119 while [ $# != 0 ]; do | 112 while [ $# != 0 ]; do |
120 arg="$1" | 113 arg="$1" |
121 case "${arg}" in | 114 case "${arg}" in |
122 -*) | 115 -*) |
123 # Separate the switch name from the value it's being given. | 116 # Separate the switch name from the value it's being given. |
124 # Also change `-' in the option name to `_'. | |
125 case "${arg}" in | 117 case "${arg}" in |
126 -*=*) | 118 -*=*) |
127 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:' | tr - _` | 119 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'` |
128 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'` | 120 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'` |
129 valomitted=no | 121 valomitted=no |
130 ;; | 122 ;; |
131 -*) | 123 -*) |
132 # If FOO is a boolean argument, -FOO is equivalent to | 124 # If FOO is a boolean argument, -FOO is equivalent to |
133 # -FOO=yes. Otherwise, the value comes from the next | 125 # -FOO=yes. Otherwise, the value comes from the next |
134 # argument - see below. | 126 # argument - see below. |
135 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:' | tr - _` | 127 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'` |
136 val="yes" | 128 val="yes" |
137 valomitted=yes | 129 valomitted=yes |
138 ;; | 130 ;; |
139 esac | 131 esac |
132 | |
133 # Also change `-' in the option name to `_'. | |
134 opt="`echo ${opt} | tr - _`" | |
140 | 135 |
141 # Make sure the argument is valid and unambiguous. | 136 # Make sure the argument is valid and unambiguous. |
142 case ${options} in | 137 case ${options} in |
143 *:${opt}:* ) # Exact match. | 138 *:${opt}:* ) # Exact match. |
144 optvar=${opt} | 139 optvar=${opt} |
211 (echo "You must specify a machine name as an argument to ${progname}." | 206 (echo "You must specify a machine name as an argument to ${progname}." |
212 echo "${short_usage}") | more | 207 echo "${short_usage}") | more |
213 exit 1 | 208 exit 1 |
214 fi | 209 fi |
215 | 210 |
211 # Canonicalize the machine name. | |
216 echo "Checking the machine." | 212 echo "Checking the machine." |
217 machfile="m/${machine}.h" | 213 machine=`./config.sub "${machine}"` |
218 if [ ! -r src/${machfile} ]; then | 214 |
219 echo "${progname}: Emacs has no configuration info for the machine called | 215 # Given the canonicalized machine name, set machfile and opsysfile to |
220 \`${machine}'. Look at etc/MACHINES for the names of machines | 216 # the names of the m/*.h and s/*.h files we should use. |
221 that Emacs has been ported to." >&2 | 217 echo ${machine} |
222 exit 1 | 218 case "${machine}" in |
223 fi | 219 |
224 | 220 ## Alliant machines. |
225 echo "Checking the operating system." | 221 ## Strictly speaking, we need the version of the alliant operating |
226 if [ "${opsystem}" = "" ]; then | 222 ## system to choose the right machine file, but currently the |
227 | 223 ## configuration name doesn't tell us enough to choose the right |
228 echo " No operating system explicitly specified." | 224 ## one; we need to give alliants their own operating system name to |
229 echo " Guessing, based on machine." | 225 ## do this right. When someone cares, they can help us. |
230 # Get the default operating system to go with the specified machine. | 226 fx80-alliant-* ) |
231 opsystem=`grep 'USUAL-OPSYS="' src/${machfile} \ | 227 machfile=m/alliant4.h opsysfile=s/bsd4-2.h |
232 | sed 's/^.*USUAL-OPSYS="\([^"]*\)".*$/\1/'` | 228 ;; |
233 | 229 i860-alliant-* ) |
234 if [ "${opsystem}" = "" ]; then | 230 machfile=m/alliant-2800.h opsysfile=s/bsd4-3.h |
235 echo "${progname}: Emacs's configuration files don't suggest what operating | 231 ;; |
236 system a \`${machine}' machine might run. Try specifying the | 232 |
237 operating system explicitly by passing ${progname} an | 233 ## DECstations. |
238 \`-opsystem=SYSTEM-NAME' flag. Look at etc/MACHINES for the | 234 mips-*-ultrix* ) |
239 names of operating systems that Emacs has been ported to." >&2 | 235 machfile=m/pmax.h opsysfile=s/bsd4-3.h |
240 exit 1 | 236 ;; |
241 fi | 237 mips-*-osf* ) |
242 | 238 machfile=m/pmax.h opsysfile=s/osf1.h |
243 if [ "${opsystem}" = "note" ]; then | 239 ;; |
244 echo "The \`${machine}' machine can be used with more than one operating | 240 |
245 system, and Emacs's configuration info isn't clever enough to figure | 241 ## HP 9000 series 200 or 300. |
246 out which one you're running. Run ${progname} with -machine and | 242 m68*-hp-bsd* ) |
247 -opsystem arguments as specified below for the appropriate system. | 243 machfile=m/hp9000s300.h opsysfile=s/bsd4-3.h |
248 (This information comes from the file \`etc/MACHINES' - see that | 244 ;; |
249 file for more detail.) | 245 ## If it's running an unspecified version of HP/UX, assume version 8. |
250 | 246 m68*-hp-hpux7 ) |
251 " >&2 | 247 machfile=m/hp9000s300.h opsysfile=s/hpux.h |
252 sed < src/${machfile} -e '1,/NOTE-START/d' -e '/NOTE-END/,$d' | more | 248 ;; |
253 echo | 249 m68*-hp-hpux* ) |
254 exit 1 | 250 machfile=m/hp9000s300.h opsysfile=s/hpux8.h |
255 fi | 251 ;; |
256 | 252 |
257 opsysfile="s/${opsystem}.h" | 253 ## HP 9000 series 800, running HP/UX. |
258 if [ ! -r src/${opsysfile} ]; then | 254 hppa1.0-hp-hpux* ) |
259 echo "${progname}: Emacs's configuration files say that the default | 255 machfile=m/hp9000s800.h opsysfile=s/hpux.h |
260 operating system for the machine \`${machine}' is \`${opsystem}', | 256 ;; |
261 but there is no configuration file for \`${opsystem}', so Emacs's | 257 |
262 default info is screwed up. Try specifying the operating system | 258 ## Suns. |
263 explicitly by passing ${progname} an \`-opsystem=SYSTEM-NAME' flag." >&2 | 259 *-sun-sunos* | *-sun-bsd* ) |
264 exit 1 | 260 case "${machine}" in |
265 fi | 261 m68*-sunos1* ) machfile=m/sun1.h ;; |
266 else | 262 m68*-sunos2* ) machfile=m/sun2.h ;; |
267 opsysfile="s/${opsystem}.h" | 263 m68* ) machfile=m/sun3.h ;; |
268 if [ ! -r src/${opsysfile} ]; then | 264 i[34]86* ) machfile=m/sun386.h ;; |
269 echo "${progname}: Emacs has no configuration info for the operating system | 265 * ) machfile=m/sparc.h ;; |
270 \`${opsystem}'. Look at etc/MACHINES for the names of operating | 266 esac |
271 systems that Emacs has been ported to." >&2 | 267 case "${machine}" in |
272 exit 1 | 268 *-sunos4.0* ) opsysfile=s/sunos4-0.h ;; |
273 fi | 269 *-sunos4* | *-sunos ) opsysfile=s/sunos4-1.h ;; |
274 fi | 270 * ) opsysfile=s/bsd4-2.h ;; |
271 esac | |
272 ;; | |
273 | |
274 * ) | |
275 (echo "${progname}: Emacs hasn't been ported to the machine \`${machine}'." | |
276 echo "${progname}: Check \`etc/MACHINES' for recognized machine names.") \ | |
277 >&2 | |
278 ;; | |
279 | |
280 esac | |
275 | 281 |
276 if [ ! "${prefix}" ]; then | 282 if [ ! "${prefix}" ]; then |
277 prefix="/usr/local" | 283 prefix="/usr/local" |
278 fi | 284 fi |
279 | 285 |
320 if [ ! "${infodir}" ]; then | 326 if [ ! "${infodir}" ]; then |
321 infodir="${prefix}/info" | 327 infodir="${prefix}/info" |
322 fi | 328 fi |
323 | 329 |
324 echo "Checking window system." | 330 echo "Checking window system." |
331 indow_system='' | |
332 case "${with_x}" in | |
333 yes ) | |
334 window_system=${window_system}x11 | |
335 ;; | |
336 no ) | |
337 window_system=${window_system}none | |
338 esac | |
325 case "${with_x11}" in | 339 case "${with_x11}" in |
326 yes ) | 340 yes ) |
327 window_system=${window_system}x11 | 341 window_system=${window_system}x11 |
328 ;; | 342 ;; |
329 esac | |
330 case "${with_x}" in | |
331 yes ) | |
332 window_system=${window_system}x11 | |
333 ;; | |
334 esac | 343 esac |
335 case "${with_x10}" in | 344 case "${with_x10}" in |
336 yes ) | 345 yes ) |
337 window_system=${window_system}x10 | 346 window_system=${window_system}x10 |
338 ;; | 347 ;; |
339 esac | 348 esac |
340 | 349 |
341 # Note that SYSV `tr' doesn't handle character ranges. | |
342 window_system="`echo ${window_system} \ | |
343 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" | |
344 case "${window_system}" in | 350 case "${window_system}" in |
345 "none" | "x11" | "x10" ) ;; | 351 "none" | "x11" | "x10" ) ;; |
346 "x" ) window_system=x11 ;; | |
347 "" ) | 352 "" ) |
348 echo " No window system specifed. Looking for X Windows." | 353 echo " No window system specifed. Looking for X Windows." |
349 window_system=none | 354 window_system=none |
350 if [ -r /usr/lib/libX11.a -o -d /usr/include/X11 ]; then | 355 if [ -r /usr/lib/libX11.a -o -d /usr/include/X11 ]; then |
351 window_system=x11 | 356 window_system=x11 |
370 have_x_windows=no | 375 have_x_windows=no |
371 have_x11=no | 376 have_x11=no |
372 ;; | 377 ;; |
373 esac | 378 esac |
374 | 379 |
380 # If we're using X11, we should use the X menu package. | |
381 have_x_menu=no | |
382 case ${have_x11} in | |
383 yes ) | |
384 have_x_menu=yes | |
385 ;; | |
386 esac | |
387 | |
375 echo "Checking for GCC." | 388 echo "Checking for GCC." |
376 case "${cc}" in | 389 temppath=`echo $PATH | sed 's/^:/.:/ |
377 "" ) | 390 s/::/:.:/g |
378 temppath=`echo $PATH | sed 's/^:/.:/ | 391 s/:$/:./ |
379 s/::/:.:/g | 392 s/:/ /g'` |
380 s/:$/:./ | 393 cc=`( |
381 s/:/ /g'` | 394 for dir in ${temppath}; do |
382 cc=`( | 395 if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi |
383 for dir in ${temppath}; do | 396 done |
384 if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi | 397 echo cc |
385 done | 398 )` |
386 echo cc | |
387 )` | |
388 ;; | |
389 esac | |
390 | 399 |
391 case "${cc}" in | 400 case "${cc}" in |
392 "gcc" ) | 401 "gcc" ) |
393 # With GCC, both O and g should default to yes, no matter what | 402 # With GCC, both O and g should default to yes, no matter what |
394 # the other is. | 403 # the other is. |
579 # Remind people not to edit this. | 588 # Remind people not to edit this. |
580 chmod -w lib-src/Makefile | 589 chmod -w lib-src/Makefile |
581 | 590 |
582 | 591 |
583 # Create a verbal description of what we have done. | 592 # Create a verbal description of what we have done. |
584 message="Configured for machine \`${machine}' running \`${opsystem}'. | 593 message="Configured for \`${machine}'. |
585 The following values have been set in ./Makefile and ./build-install: | 594 The following values have been set in ./Makefile and ./build-install: |
586 \`make install' or \`build-install' will placed executables in | 595 \`make install' or \`build-install' will place executables in |
587 ${bindir}. | 596 ${bindir}. |
588 Emacs's lisp search path will be | 597 Emacs's lisp search path will be |
589 \`${lisppath}'. | 598 \`${lisppath}'. |
590 Emacs will look for its architecture-independent data in | 599 Emacs will look for its architecture-independent data in |
591 ${datadir}. | 600 ${datadir}. |