2 ### The above line is deliberately left blank. If it starts with a #,
3 ### some CSH's will think this is a csh script.
5 #### Configuration script for GNU Emacs
6 #### Copyright (C) 1992 Free Software Foundation, Inc.
8 ### This file is part of GNU Emacs.
10 ### GNU Emacs is free software; you can redistribute it and/or modify
11 ### it under the terms of the GNU General Public License as published by
12 ### the Free Software Foundation; either version 1, or (at your option)
13 ### any later version.
15 ### GNU Emacs is distributed in the hope that it will be useful,
16 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ### GNU General Public License for more details.
20 ### You should have received a copy of the GNU General Public License
21 ### along with GNU Emacs; see the file COPYING. If not, write to
22 ### the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 ### Shell script to edit files and make symlinks in preparation for
27 ### Usage: configure config_name
29 ### If configure succeeds, it leaves its status in config.status.
30 ### If configure fails after disturbing the status quo,
31 ### config.status is removed.
34 ### Remove any more than one leading "." element from the path name.
35 ### If we don't remove them, then another "./" will be prepended to
36 ### the file name each time we use config.status, and the program name
37 ### will get larger and larger. This wouldn't be a problem, except
38 ### that since progname gets recorded in all the Makefiles this script
39 ### produces, move-if-change thinks they're different when they're
42 ### It would be nice if we could put the ./ in a \( \) group and then
43 ### apply the * operator to that, so we remove as many leading ./././'s
44 ### as are present, but some seds (like Ultrix's sed) don't allow you to
45 ### apply * to a \( \) group. Bleah.
46 progname="`echo $0 | sed 's:^\./\./:\./:'`"
51 short_usage="Type \`${progname} --usage' for more information about options."
53 long_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
55 Set compilation and installation parameters for GNU Emacs, and report.
56 CONFIGURATION specifies the machine and operating system to build for.
58 ${progname} sparc-sun-sunos4.1
59 configures Emacs to build on a Sun Sparc machine running SunOS 4.1, and
60 ${progname} decstation
61 configures Emacs to run on a DECstation running Ultrix. See \`etc/MACHINES'.
63 The --with-x, --with-x11 and --with-x10 options specify what window
64 system to use; if all are omitted, use X11 if present. If you
65 don't want X, specify \`--with-x=no'.
67 The --x-includes=DIR option tells the build process where to search
68 for the X Windows header files. DIR should have a
69 subdirectory called \`X11' which contains \`X.h', \`Xlib.h', and
70 the rest of the header files; DIR should not contain \`X11'
71 itself. If this option is omitted, the build process assumes
72 they exist in a directory the compiler checks by default.
74 The --x-libraries=DIR option tells the build process where to look for
75 the X windows libraries. If this option is omitted, the build
76 process assumes they are in a directory the compiler checks by
79 The --with-gcc option says that the build process should use GCC to
80 compile Emacs. If you have GCC but don't want to use it,
81 specify \`--with-gcc=no'. \`configure' tries to guess whether
82 or not you have GCC by searching your executable path, but if
83 it guesses incorrectly, you may need to use this.
85 The --srcdir=DIR option specifies that the configuration and build
86 processes should look for the Emacs source code in DIR, when
87 DIR is not the current directory. This option doesn't work yet.
89 If successful, ${progname} leaves its status in config.status. If
90 unsuccessful after disturbing the status quo, it removes config.status."
93 #### Option processing.
95 ### These are the names of CPP symbols we want to define or leave undefined
96 ### in src/config.h; their values are given by the shell variables of the same
99 HAVE_X_WINDOWS HAVE_X11 HAVE_X_MENU \
100 SIGTYPE GNU_MALLOC REL_ALLOC LISP_FLOAT_TYPE HAVE_CONST \
101 LD_SWITCH_X_SITE C_SWITCH_X_SITE HAVE_XFREE386"
103 ### Record all the arguments, so we can save them in config.status.
106 while [ $# != 0 ]; do
110 ## Anything starting with a hyphen we assume is an option.
113 ## Separate the switch name from the value it's being given.
116 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
117 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
121 ## If FOO is a boolean argument, --FOO is equivalent to
122 ## --FOO=yes. Otherwise, the value comes from the next
123 ## argument - see below.
124 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
130 ## Change `-' in the option name to `_'.
132 opt="`echo ${opt} | tr - _`"
134 ## Process the option.
137 ## Has the user specified which window systems they want to support?
138 "with_x" | "with_x11" | "with_x10" )
139 ## Make sure the value given was either "yes" or "no".
141 y | ye | yes ) val=yes ;;
144 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
145 Set it to either \`yes' or \`no'."
146 echo "${short_usage}") >&2
150 eval "${opt}=\"${val}\""
153 ## Has the user specified whether or not they want GCC?
155 ## Make sure the value given was either "yes" or "no".
157 y | ye | yes ) val=yes ;;
160 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
161 Set it to either \`yes' or \`no'."
162 echo "${short_usage}") >&2
166 eval "${opt}=\"${val}\""
169 ## Has the user specified a source directory?
171 ## If the value was omitted, get it from the next argument.
172 if [ "${valomitted}" = "yes" ]; then
173 ## Get the next argument from the argument list, if there is one.
175 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
176 \`--${optname}=FOO'."
177 echo "${short_usage}") >&2
184 echo "${progname}: Beware - the \`--srcdir' option doesn't work yet." >&2
187 ## Has the user tried to tell us where the X files are?
188 ## I think these are dopey, but no less than three alpha
189 ## testers, at large sites, have said they have their X files
190 ## installed in odd places.
192 ## If the value was omitted, get it from the next argument.
193 if [ "${valomitted}" = "yes" ]; then
194 ## Get the next argument from the argument list, if there is one.
196 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
197 \`--${optname}=FOO'."
198 echo "${short_usage}") >&2
204 C_SWITCH_X_SITE="-I${x_includes}"
207 ## If the value was omitted, get it from the next argument.
208 if [ "${valomitted}" = "yes" ]; then
209 ## Get the next argument from the argument list, if there is one.
211 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
212 \`--${optname}=FOO'."
213 echo "${short_usage}") >&2
219 LD_SWITCH_X_SITE="-L${x_libraries}"
222 ## Has the user asked for some help?
224 echo "${long_usage}" | more
228 ## We ignore all other options silently.
232 ## Anything not starting with a hyphen we assume is a
233 ## configuration name.
242 if [ "${configuration}" = "" ]; then
243 (echo "${progname}: You must specify a configuration name as an argument."
244 echo "${short_usage}") >&2
249 #### Decide where the source is.
252 ## If it's not specified, see if `.' or `..' might work.
254 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
257 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
258 srcdir=`(cd .. ; pwd)`
261 ${progname}: Neither the current directory nor its parent seem to
262 contain the Emacs sources. If you do not want to build Emacs in its
263 source tree, you should run \`${progname}' in the directory in which
264 you wish to build Emacs, using its \`--srcdir' option to say where the
265 sources may be found."
266 echo "${short_usage}") >&2
272 ## Otherwise, check if the directory they specified is okay.
274 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
276 ${progname}: The directory specified with the \`--srcdir' option,
277 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
278 either run the \`${progname}' script at the top of the Emacs source
279 tree, or use the \`--srcdir' option to specify where the Emacs sources
281 echo "${short_usage}") >&2
288 ### Make the necessary directories, if they don't exist.
289 if [ ! -d ./src ]; then
292 if [ ! -d ./lib-src ]; then
295 if [ ! -d ./cpp ]; then
298 if [ ! -d ./oldXMenu ]; then
303 #### Given the configuration name, set machfile and opsysfile to the
304 #### names of the m/*.h and s/*.h files we should use.
306 ### Canonicalize the configuration name.
307 echo "Checking the configuration name."
308 if configuration=`${srcdir}/config.sub "${configuration}"` ; then : ; else
312 ### If you add support for a new configuration, add code to this
313 ### switch statement to recognize your configuration name and select
314 ### the appropriate operating system and machine description files.
316 ### You would hope that you could choose an m/*.h file pretty much
317 ### based on the machine portion of the configuration name, and an s-
318 ### file based on the operating system portion. However, it turns out
319 ### that each m/*.h file is pretty manufacturer-specific - for
320 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
321 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
322 ### machines. So we basically have to have a special case for each
323 ### configuration name.
325 ### As far as handling version numbers on operating systems is
326 ### concerned, make sure things will fail in a fixable way. If
327 ### /etc/MACHINES doesn't say anything about version numbers, be
328 ### prepared to handle anything reasonably. If version numbers
329 ### matter, be sure /etc/MACHINES says something about it.
331 ### Eric Raymond says we should accept strings like "sysvr4" to mean
332 ### "System V Release 4"; he writes, "The old convention encouraged
333 ### confusion between `system' and `release' levels'."
335 machine='' opsys='' unported='false'
336 case "${configuration}" in
339 ## Strictly speaking, we need the version of the alliant operating
340 ## system to choose the right machine file, but currently the
341 ## configuration name doesn't tell us enough to choose the right
342 ## one; we need to give alliants their own operating system name to
343 ## do this right. When someone cares, they can help us.
345 machine=alliant4 opsys=bsd4-2
348 machine=alliant-2800 opsys=bsd4-3
353 machine=altos opsys=usg5-2
358 machine=amdahl opsys=usg5-2-2
361 ## Appallings - I mean, Apollos - running Domain
363 machine=apollo opsysfile=bsd4-2.h
366 ## AT&T 3b2, 3b5, 3b15, 3b20
368 machine=att3b opsys=usg5-2-2
371 ## AT&T 3b1 - The Mighty Unix PC!
373 machine=7300 opsys=usg5-2-2
378 machine=sps7 opsys=usg5-2
381 ## CCI 5/32, 6/32 -- see "Tahoe".
384 ## I don't know what configuration name to use for this; config.sub
385 ## doesn't seem to know anything about it. Hey, Celerity users, get
387 celerity-celerity-bsd* )
388 machine=celerity opsys=bsd4-2
392 ## What operating systems does this chip run that Emacs has been
396 ## We'll use the catch-all code at the bottom to guess the
402 machine=convex opsys=bsd4-3
407 machine=intel386 opsys=usg5-3
411 cydra*-cydrome-sysv* )
412 machine=cydra5 opsys=usg5-3
416 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0 | mips-dec-bsd4.2 )
417 machine=pmax opsys=bsd4-2
419 mips-dec-ultrix* | mips-dec-bsd* )
420 machine=pmax opsys=bsd4-3
423 machine=pmax opsys=osf1
426 ## Motorola Delta machines
427 m68*-motorola-sysv* )
428 machine=delta opsys=usg5-3
430 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
431 machine=delta88k opsys=usg5-3
436 machine=dual opsys=usg5-2
439 machine=dual opsys=unipl5-2
444 machine=elxsi opsys=usg5-2
449 machine=ns16000 opsys=umax
452 ## The GEC 93 - apparently, this port isn't really finished yet.
454 ## Gould Power Node and NP1
456 machine=gould opsys=bsd4-2
459 machine=gould opsys=bsd4-3
462 machine=gould-np1 opsys=bsd4-3
466 xps*-honeywell-sysv* )
467 machine=xps100 opsys=usg5-2
470 ## HP 9000 series 200 or 300
472 machine=hp9000s300 opsys=bsd4-3
474 ## HP/UX 8 doesn't run on these machines, so use HP/UX 7.
476 machine=hp9000s300 opsys=hpux
479 ## HP 9000 series 800, running HP/UX
481 machine=hp9000s800 opsys=hpux
486 machine=orion opsys=bsd4-2
489 machine=orion105 opsys=bsd4-2
494 machine=ibmps2-aix opsys=usg5-2-2
497 machine=ibmps2-aix opsys=usg5-3
500 machine=ibmrs6000 opsys=aix3-1
502 rs6000-ibm-aix3.2 | rs6000-ibm-aix* )
503 machine=ibmrs6000 opsys=aix3-2
506 machine=ibmrt opsys=bsd4-2
509 machine=ibmrt-aix opsys=usg5-2-2
512 ## Integrated Solutions `Optimum V'
514 machine=isi-ov opsys=bsd4-2
517 machine=isi-ov opsys=bsd4-3
520 ## Intel 386 machines where we do care about the manufacturer
521 i[34]86-intsys-sysv* )
522 machine=is386 opsys=usg5-2-2
524 ## Intel 386 machines where we don't care about the manufacturer
527 case "${configuration}" in
528 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
529 *-isc2.2 ) opsys=isc2-2 ;;
530 *-isc* ) opsys=isc3-0 ;;
531 *-esix* ) opsys=esix ;;
532 *-xenix* ) opsys=xenix ;;
533 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
537 ## Silicon Graphics machines
538 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
540 machine=irist opsys=iris3-5
542 m68*-sgi-iris3.6 | m68*-sgi-iris*)
543 machine=irist opsys=iris3-6
547 machine=iris4d opsys=irix3-3
549 mips-sgi-irix4.* | mips-sgi-irix* )
550 machine=iris4d opsys=irix4-0
555 machine=masscomp opsys=rtu
560 machine=mega68 opsys=bsd4-2
563 ## Workstations sold by MIPS
564 ## This is not necessarily all workstations using the MIPS processor -
565 ## Irises are produced by SGI, and DECstations by DEC.
567 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
568 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
569 ## it gives for choosing between the alternatives seems to be "Use
570 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
571 ## the BSD world." I'll assume that these are instructions for
572 ## handling two odd situations, and that every other situation
573 ## should use mips.h and usg5-2-2, they being listed first.
575 machine=mips4 opsys=usg5-2-2
578 machine=mips opsys=bsd4-3
581 machine=mips opsys=usg5-2-2
584 ## The complete machine from National Semiconductor
586 machine=ns32000 opsys=usg5-2
590 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
591 machine=tower32 opsys=usg5-2-2
593 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
594 machine=tower32v3 opsys=usg5-3
599 machine=targon31 opsys=usg5-2-2
604 machine=nu opsys=usg5-2
609 machine=plexus opsys=usg5-2
614 machine=i386 opsys=usg5-3
618 ## I don't really have any idea what sort of processor the Pyramid has,
619 ## so I'm assuming it is its own architecture.
620 pyramid-pyramid-bsd* )
621 machine=pyramid opsys=bsd4-2
625 ns32k-sequent-bsd4.2 )
626 machine=sequent opsys=bsd4-2
628 ns32k-sequent-bsd4.3 )
629 machine=sequent opsys=bsd4-3
633 machine=symmetry opsys=bsd4-3
638 machine=news opsys=bsd4-2
641 machine=news opsys=bsd4-3
644 machine=news-risc opsys=bsd4-3
649 machine=stride opsys=usg5-2
653 *-sun-sunos* | *-sun-bsd* )
654 case "${configuration}" in
655 m68*-sunos1* ) machine=sun1 ;;
656 m68*-sunos2* ) machine=sun2 ;;
657 m68* ) machine=sun3 ;;
658 i[34]86* ) machine=sun386 ;;
659 sparc* ) machine=sparc ;;
662 case "${configuration}" in
663 *-sunos4.0* ) opsys=sunos4-0 ;;
664 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
671 machine=tad68k opsys=usg5-3
676 machine=tahoe opsys=bsd4-2
679 machine=tahoe opsys=bsd4-3
682 ## Tandem Integrity S2
684 machine=tandem-s2 opsys=usg5-3
687 ## Tektronix 16000 box (6130?)
688 ns16k-tektronix-bsd* )
689 machine=ns16000 opsys=bsd4-2
692 ## src/m/tek4300.h hints that this is a m68k machine.
693 m68*-tektronix-bsd* )
694 machine=tex4300 opsys=bsd4-3
698 ## We seem to have lost the machine-description file titan.h!
700 machine=titan opsys=usg5-3
703 ## Ustation E30 (SS5E)
704 m68*-unisys-uniplus* )
705 machine=ustation opsystem=unipl5-2
711 case "${configuration}" in
712 *-bsd4.1 ) opsys=bsd4-1 ;;
713 *-bsd4.2 | *-ultrix[0-3].* | *-ultrix4.0 ) opsys=bsd4-2 ;;
714 *-bsd4.3 | *-ultrix* ) opsys=bsd4-3 ;;
715 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
716 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
717 *-vms* ) opsys=vms ;;
723 ns16k-whitechapel-* )
725 ## We don't know what sort of OS runs on these; we'll let the
726 ## operating system guessing code below try.
731 machine=wicat opsys=usg5-2
739 ### If the code above didn't choose an operating system, just choose
740 ### an operating system based on the configuration name. You really
741 ### only want to use this when you have no idea what the right
742 ### operating system is; if you know what operating systems a machine
743 ### runs, it's cleaner to make it explicit in the case statement
745 if [ ! "${opsys}" ]; then
746 case "${configuration}" in
747 *-bsd4.[01] ) opsys=bsd4-1 ;;
748 *-bsd4.2 ) opsys=bsd4-2 ;;
749 *-bsd4.3 ) opsys=bsd4-3 ;;
750 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
751 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
752 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
753 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
754 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
762 (echo "${progname}: Emacs hasn't been ported to \`${configuration}' systems."
763 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
768 machfile="m/${machine}.h"
769 opsysfile="s/${opsys}.h"
772 #### Choose a window system.
773 echo "Checking window system."
777 window_system=${window_system}x11
780 window_system=${window_system}none
782 case "${with_x11}" in
784 window_system=${window_system}x11
787 case "${with_x10}" in
789 window_system=${window_system}x10
793 case "${window_system}" in
794 "none" | "x11" | "x10" ) ;;
796 echo " No window system specifed. Looking for X Windows."
798 if [ -r /usr/lib/libX11.a \
799 -o -d /usr/include/X11 \
800 -o -d /usr/X386/include ]; then
805 echo "Don\'t specify the window system more than once." >&2
810 case "${window_system}" in
824 echo " Using no window system."
828 ### If we're using X11, we should use the X menu package.
836 ### Check for XFree386. It needs special hacks.
837 case ${window_system} in
839 if [ -d /usr/X386/include ]; then
841 if [ "${C_SWITCH_X_SITE}" = "" ]; then
842 C_SWITCH_X_SITE="-I/usr/X386/include"
848 #### Choose a compiler.
849 echo "Checking compilers."
850 if [ "${with_gcc}" = "" ]; then
851 echo " Searching load path for GCC."
852 temppath=`echo $PATH | sed 's/^:/.:/
857 for dir in ${temppath}; do
858 if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi
864 "yes" ) default_cc="gcc" ;;
865 "no" ) default_cc="cc" ;;
869 case "${default_cc}" in
872 default_cflags='-g -O'
875 echo " Using the system's CC."
881 #### Does this compiler support the `const' keyword?
882 #### The code for this test was adapted from autoconf's test.
883 echo "Checking if the compiler supports \`const'."
885 compile='${default_cc} conftest.c -o conftest >/dev/null 2>&1'
887 main() { exit(0); } t() { /* Ultrix mips cc rejects this. */
888 typedef int charset[2]; const charset x;
889 /* SunOS 4.1.1 cc rejects this. */
890 char const *const *p;
892 /* HPUX 7.0 cc rejects these. */
894 p2 = (char const* const*) p;
896 if eval $compile; then
900 echo " It doesn't seem to."
905 #### What is the return type of a signal handler?
907 ### We run /usr/include/signal.h through cpp and grep for the
908 ### declaration of the signal function. Yuck.
909 echo "Looking for return type of signal handler functions."
911 if [ -r /usr/include/signal.h ]; then
912 signal_h_file=/usr/include/signal.h
913 elif [ -r /usr/include/sys/signal.h ]; then
914 signal_h_file=/usr/include/sys/signal.h
917 if [ "${signal_h_file}" ]; then
918 sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*('
920 ## We make a copy whose name ends in .c, so the compiler
921 ## won't complain about having only been given a .h file.
922 tempcname="configure.tmp.$$.c"
923 cp ${signal_h_file} ${tempcname}
924 if ${default_cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then
929 echo " Guessing that signals return \`${SIGTYPE}'."
932 #### Extract some information from the operating system and machine files.
934 echo "Examining the machine- and system-dependent files to find out"
935 echo " - which libraries the lib-src programs will want, and"
936 echo " - whether the GNU malloc routines are usable."
937 tempcname="configure.tmp.$$.c"
939 #include "'${srcdir}'/src/'${opsysfile}'"
940 #include "'${srcdir}'/src/'${machfile}'"
947 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
949 @configure@ system_malloc=yes
951 @configure@ system_malloc=no
954 eval `${default_cc} -E ${tempcname} \
955 | grep '@configure@' \
956 | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
959 # Do the opsystem or machine files prohibit the use of the GNU malloc?
960 # Assume not, until told otherwise.
962 if [ "${system_malloc}" = "yes" ]; then
965 (The GNU allocators don't work with this system configuration.)"
968 if [ ! "${REL_ALLOC}" ]; then
969 REL_ALLOC=${GNU_MALLOC}
975 #### Find out which version of Emacs this is.
976 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
977 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
978 if [ ! "${version}" ]; then
979 echo "${progname}: can't find current emacs version in
980 \`${srcdir}/lisp/version.el'." >&2
985 #### Make the proper settings in `src/config.h'.
989 echo "Making \`./src/config.h' from \`${srcdir}/src/config.h.in'."
990 sed_flags="-e 's:@machine@:${machfile}:' -e 's:@opsystem@:${opsysfile}:'"
992 for flag in ${config_h_opts}; do
993 val=`eval echo '$'${flag}`
996 f="-e 's:.*#define ${flag}.*:/\\* #define ${flag} \\*/:'"
999 f="-e 's:.*#define ${flag}.*:#define ${flag}:'"
1002 f="-e 's:.*#define ${flag}.*:#define ${flag} ${val}:'"
1005 sed_flags="${sed_flags} ${f}"
1008 rm -f ./src/config.h.tmp
1009 (echo "/* This file is generated by \`${progname}' from"
1010 echo " \`${srcdir}/src/config.h.in'."
1011 echo " If you are thinking about editing it, you should seriously consider"
1012 echo " running \`${progname} instead, or editing"
1013 echo " \`${srcdir}/src/config.h.in' itself."
1014 eval '/bin/sed '${sed_flags}' < "${srcdir}/src/config.h.in"'
1015 ) > src/config.h.tmp
1016 ${srcdir}/move-if-change src/config.h.tmp src/config.h
1017 ### Remind people not to edit this.
1018 chmod -w src/config.h
1021 #### Modify the parameters in the top-level Makefile.
1022 echo "Producing \`Makefile' from \`${srcdir}/Makefile.in'."
1025 # This file is generated by \`${progname}' from
1026 # \`${srcdir}/Makefile.in'.
1027 # If you are thinking about editing it, you should seriously consider
1028 # running \`${progname}' instead, or editing
1029 # \`${srcdir}/Makefile.in' itself."
1030 /bin/sed < ${srcdir}/Makefile.in \
1031 -e 's|^configname *=.*$|configname='"${configuration}"'|' \
1032 -e 's|^version *=.*$|version='"${version}"'|' \
1033 -e 's|^srcdir *=.*$|srcdir='"${srcdir}"'|' \
1034 -e 's|^CC *=.*$|CC='"${default_cc}"'|' \
1035 -e 's|^CONFIG_CFLAGS *=.*$|CONFIG_CFLAGS='"${default_cflags}"'|' \
1036 -e 's|^LOADLIBES *=.*$|LOADLIBES='"${libsrc_libs}"'|' \
1037 -e '/^# DIST: /d') > Makefile.tmp
1038 ${srcdir}/move-if-change Makefile.tmp Makefile
1040 ### I'm commenting out this section until I bring the `build-install' script
1041 ### into line with the rest of the configuration stuff.
1043 ### # Modify the parameters in the `build-install' script.
1044 ### echo "Producing \`./build-install' from \`${srcdir}/build-install.in'."
1045 ### rm -f ./build-install.tmp
1047 ### # This file is generated by \`${progname}' from \`${srcdir}/build-install.in'.
1048 ### # If you are thinking about editing it, you should seriously consider
1049 ### # editing \`./build-install.in' itself, or running \`${progname}' instead."
1050 ### /bin/sed < ${srcdir}/build-install.in \
1051 ### -e 's;^\(prefix=\).*$;\1'"${prefix};" \
1052 ### -e 's;^\(bindir=\).*$;\1'"${bindir};" \
1053 ### -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \
1054 ### -e 's;^\(datadir=\).*$;\1'"${datadir};" \
1055 ### -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \
1056 ### -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp
1057 ### ${srcdir}/move-if-change build-install.tmp build-install
1058 ### # Remind people not to edit this.
1059 ### chmod -w build-install
1060 ### chmod +x build-install
1063 #### Describe the results.
1065 ### Create a verbal description of what we have done.
1067 message="Configured for \`${configuration}'.
1069 What operating system and machine description files should Emacs use?
1070 \`${opsysfile}' and \`${machfile}'
1071 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1072 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1073 What window system should Emacs use? ${window_system}
1074 What compiler should emacs be built with? ${default_cc}
1075 Should the compilation use \`-g' and/or \`-O'? ${default_cflags-neither}${x_includes+
1076 Where do we find X Windows header files? }${x_includes}${x_libraries+
1077 Where do we find X Windows libraries? }${x_libraries}"
1079 ### Write config.status, documenting the damage we have done.
1083 ### This file is generated by \`${progname}.'
1084 ### If you are thinking about editing it, you should seriously consider
1085 ### running \`${progname}' instead.
1087 echo "${message}" | sed -e 's/^/# /'
1088 echo "exec '${progname}' ${arguments} "'$@') > config.status
1090 ### Remind people not to edit this.
1091 chmod -w config.status
1092 chmod +x config.status
1094 ### Print the description.