diff options
| author | Jim Blandy | 1992-12-06 22:12:37 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-12-06 22:12:37 +0000 |
| commit | 0c22fbcab46917e98189e0f4ab8907b3f236ee6c (patch) | |
| tree | eee5224670171eae6154062d0c8a5a3fdc608b38 | |
| parent | d95ba5f0be083cc47cde96ccae900e41e430144a (diff) | |
| download | emacs-0c22fbcab46917e98189e0f4ab8907b3f236ee6c.tar.gz emacs-0c22fbcab46917e98189e0f4ab8907b3f236ee6c.zip | |
Now partially conforms with GNU coding standards. I'm only checking
it in to RCS so I can check my changes in with FSF Cambridge.
| -rw-r--r-- | Makefile.in | 78 | ||||
| -rwxr-xr-x | configure1.in | 556 | ||||
| -rw-r--r-- | src/Makefile.in | 15 |
3 files changed, 308 insertions, 341 deletions
diff --git a/Makefile.in b/Makefile.in index 310cabdceff..755093ab8dd 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -23,6 +23,9 @@ SHELL = /bin/sh | |||
| 23 | 23 | ||
| 24 | # ==================== Where To Install Things ==================== | 24 | # ==================== Where To Install Things ==================== |
| 25 | 25 | ||
| 26 | version=version-not-set | ||
| 27 | configname=configuration-name-not-set | ||
| 28 | |||
| 26 | # The default location for installation. Everything is placed in | 29 | # The default location for installation. Everything is placed in |
| 27 | # subdirectories of this directory. This directory must exist when | 30 | # subdirectories of this directory. This directory must exist when |
| 28 | # you start installation. The default values for many of the | 31 | # you start installation. The default values for many of the |
| @@ -34,25 +37,46 @@ prefix=/usr/local | |||
| 34 | # run directly (like etags). | 37 | # run directly (like etags). |
| 35 | bindir=${prefix}/bin | 38 | bindir=${prefix}/bin |
| 36 | 39 | ||
| 37 | # A directory under which we will install many of Emacs's files. The | 40 | # Where to install architecture-independent data files. ${lispdir} |
| 38 | # default values for many of the variables below are expressed in | 41 | # and ${etcdir} are below this. |
| 39 | # terms of this one, so you may not need to change them. | 42 | datadir=${prefix}/lib/emacs/${version} |
| 40 | emacsdir=${prefix}/emacs-19.0 | 43 | |
| 44 | # Where to install and expect the files that Emacs modifies as it | ||
| 45 | # runs. These files are all architecture-independent. Right now, | ||
| 46 | # the only such data is the locking directory. | ||
| 47 | statedir=${prefix}/lib/emacs | ||
| 48 | |||
| 49 | # Where to install and expect executable files to be run by Emacs | ||
| 50 | # rather than directly by users, and other architecture-dependent | ||
| 51 | # data. | ||
| 52 | libdir=${prefix}/${version}/${configname} | ||
| 53 | |||
| 54 | # Where to install Emacs's man pages, and what extension they should have. | ||
| 55 | mandir=/usr/man/man1 | ||
| 56 | manext=.1 | ||
| 57 | |||
| 58 | # Where to install and expect the info files describing Emacs. In the | ||
| 59 | # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but | ||
| 60 | # since there are now many packages documented with the texinfo | ||
| 61 | # system, it is inappropriate to imply that it is part of Emacs. | ||
| 62 | infodir=${prefix}/info | ||
| 41 | 63 | ||
| 42 | # Where to install and expect the architecture-independent data files | 64 | # Where to find the source code. The source code for Emacs's C kernel |
| 43 | # (like the tutorial and the Zippy database). | 65 | # is expected to be in ${srcdir}/src, and the source code for Emacs's |
| 44 | datadir=${emacsdir}/etc | 66 | # utility programs is expected to be in ${srcdir}/lib-src. |
| 67 | # This is set by the configure script's `--srcdir' option. | ||
| 68 | srcdir=. | ||
| 45 | 69 | ||
| 46 | # Where to install the elisp files distributed with Emacs. Strictly | 70 | |
| 47 | # speaking, all the elisp files should go under datadir (above), since | 71 | # ==================== Emacs-specific directories ==================== |
| 48 | # both elisp source and compiled elisp are completely portable, but | 72 | |
| 49 | # it's traditional to give the lisp files their own subdirectory. | 73 | # Where to install the elisp files distributed with Emacs. |
| 50 | lispdir=${emacsdir}/lisp | 74 | lispdir=${datadir}/lisp |
| 51 | 75 | ||
| 52 | # Directories Emacs should search for elisp files specific to this | 76 | # Directories Emacs should search for elisp files specific to this |
| 53 | # site (i.e. customizations), before consulting ${lispdir}. This | 77 | # site (i.e. customizations), before consulting ${lispdir}. This |
| 54 | # should be a colon-separated list of directories. | 78 | # should be a colon-separated list of directories. |
| 55 | locallisppath=${emacsdir}/local-lisp | 79 | locallisppath=${prefix}/lib/emacs/local-lisp |
| 56 | 80 | ||
| 57 | # Where Emacs will search to find its elisp files. Before changing | 81 | # Where Emacs will search to find its elisp files. Before changing |
| 58 | # this, check to see if your purpose wouldn't better be served by | 82 | # this, check to see if your purpose wouldn't better be served by |
| @@ -69,29 +93,22 @@ lisppath=${locallisppath}:${lispdir} | |||
| 69 | # directories. | 93 | # directories. |
| 70 | buildlisppath=../lisp | 94 | buildlisppath=../lisp |
| 71 | 95 | ||
| 72 | # Where to install and expect the files that Emacs modifies as it | 96 | # Where to install the other architecture-independent data files |
| 73 | # runs. These files are all architecture-independent. Right now, | 97 | # distributed with Emacs (like the tutorial, the cookie recipes and |
| 74 | # the only such data is the locking directory. | 98 | # the Zippy database). |
| 75 | statedir=${emacsdir} | 99 | etcdir=${datadir}/etc |
| 76 | 100 | ||
| 77 | # Where to create and expect the locking directory, where the Emacs | 101 | # Where to create and expect the locking directory, where the Emacs |
| 78 | # locking code keeps track of which files are currently being edited. | 102 | # locking code keeps track of which files are currently being edited. |
| 79 | lockdir=${statedir}/lock | 103 | lockdir=${statedir}/lock |
| 80 | 104 | ||
| 81 | # Where to install and expect executable files to be run by Emacs | 105 | # Where to put executables to be run by Emacs rather than the user. |
| 82 | # rather than directly by users, and other architecture-dependent | 106 | archlibdir=${libdir} |
| 83 | # data. | ||
| 84 | libdir=${emacsdir}/arch-lib | ||
| 85 | |||
| 86 | # Where to install Emacs's man pages. | ||
| 87 | mandir=/usr/man/man1 | ||
| 88 | 107 | ||
| 89 | # Where to install and expect the info files describing Emacs. In the | 108 | # ==================== Things `configure' might edit ==================== |
| 90 | # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but | ||
| 91 | # since there are now many packages documented with the texinfo | ||
| 92 | # system, it is inappropriate to imply that it is part of Emacs. | ||
| 93 | infodir=${prefix}/info | ||
| 94 | 109 | ||
| 110 | CC=cc | ||
| 111 | CFLAGS=-g | ||
| 95 | 112 | ||
| 96 | # ==================== Utility Programs for the Build ==================== | 113 | # ==================== Utility Programs for the Build ==================== |
| 97 | 114 | ||
| @@ -101,11 +118,10 @@ INSTALLFLAGS = -c | |||
| 101 | INSTALL_PROGRAM = ${INSTALL} | 118 | INSTALL_PROGRAM = ${INSTALL} |
| 102 | INSTALL_DATA = ${INSTALL} | 119 | INSTALL_DATA = ${INSTALL} |
| 103 | 120 | ||
| 104 | |||
| 105 | # ============================= Targets ============================== | 121 | # ============================= Targets ============================== |
| 106 | 122 | ||
| 107 | # Flags passed down to subdirectory makefiles. | 123 | # Flags passed down to subdirectory makefiles. |
| 108 | MFLAGS = | 124 | MFLAGS = CC='${CC}' CFLAGS='${CFLAGS}' |
| 109 | 125 | ||
| 110 | # Subdirectories to make recursively. `lisp' is not included | 126 | # Subdirectories to make recursively. `lisp' is not included |
| 111 | # because the compiled lisp files are part of the distribution | 127 | # because the compiled lisp files are part of the distribution |
diff --git a/configure1.in b/configure1.in index edacbd9eead..f40702a8c5f 100755 --- a/configure1.in +++ b/configure1.in | |||
| @@ -1,49 +1,53 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # Configuration script for GNU Emacs | 2 | #### Configuration script for GNU Emacs |
| 3 | # Copyright (C) 1992 Free Software Foundation, Inc. | 3 | #### Copyright (C) 1992 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | #This file is part of GNU Emacs. | 5 | ### This file is part of GNU Emacs. |
| 6 | 6 | ||
| 7 | #GNU Emacs is free software; you can redistribute it and/or modify | 7 | ### GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | #it under the terms of the GNU General Public License as published by | 8 | ### it under the terms of the GNU General Public License as published by |
| 9 | #the Free Software Foundation; either version 1, or (at your option) | 9 | ### the Free Software Foundation; either version 1, or (at your option) |
| 10 | #any later version. | 10 | ### any later version. |
| 11 | 11 | ||
| 12 | #GNU Emacs is distributed in the hope that it will be useful, | 12 | ### GNU Emacs is distributed in the hope that it will be useful, |
| 13 | #but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | #GNU General Public License for more details. | 15 | ### GNU General Public License for more details. |
| 16 | 16 | ||
| 17 | #You should have received a copy of the GNU General Public License | 17 | ### You should have received a copy of the GNU General Public License |
| 18 | #along with GNU Emacs; see the file COPYING. If not, write to | 18 | ### along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | ### the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | 20 | ||
| 21 | # Shell script to edit files and make symlinks in preparation for | 21 | ### Shell script to edit files and make symlinks in preparation for |
| 22 | # compiling Emacs. | 22 | ### compiling Emacs. |
| 23 | # | 23 | ### |
| 24 | # Usage: configure config_name | 24 | ### Usage: configure config_name |
| 25 | # | 25 | ### |
| 26 | # If configure succeeds, it leaves its status in config.status. | 26 | ### If configure succeeds, it leaves its status in config.status. |
| 27 | # If configure fails after disturbing the status quo, | 27 | ### If configure fails after disturbing the status quo, |
| 28 | # config.status is removed. | 28 | ### config.status is removed. |
| 29 | # | 29 | ### |
| 30 | 30 | ||
| 31 | # Remove any leading "." elements from the path name. If we don't | 31 | |
| 32 | # remove them, then another "./" will be prepended to the file name | 32 | ### Remove any leading "." elements from the path name. If we don't |
| 33 | # each time we use config.status, and the program name will get larger | 33 | ### remove them, then another "./" will be prepended to the file name |
| 34 | # and larger. This wouldn't be a problem, except that since progname | 34 | ### each time we use config.status, and the program name will get larger |
| 35 | # gets recorded in all the Makefiles this script produces, | 35 | ### and larger. This wouldn't be a problem, except that since progname |
| 36 | # move-if-changed thinks they're different when they're not. | 36 | ### gets recorded in all the Makefiles this script produces, |
| 37 | # | 37 | ### move-if-changed thinks they're different when they're not. |
| 38 | # It would be nice if we could put the ./ in a \( \) group and then | 38 | ### |
| 39 | # apply the * operator to that, so we remove as many leading ./././'s | 39 | ### It would be nice if we could put the ./ in a \( \) group and then |
| 40 | # as are present, but some seds (like Ultrix's sed) don't allow you to | 40 | ### apply the * operator to that, so we remove as many leading ./././'s |
| 41 | # apply * to a \( \) group. Bleah. | 41 | ### as are present, but some seds (like Ultrix's sed) don't allow you to |
| 42 | ### apply * to a \( \) group. Bleah. | ||
| 42 | progname="`echo $0 | sed 's:^\./::'`" | 43 | progname="`echo $0 | sed 's:^\./::'`" |
| 43 | 44 | ||
| 44 | short_usage="Type \`${progname} -usage' for more information about options." | ||
| 45 | 45 | ||
| 46 | usage_message="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...] | 46 | #### Usage messages. |
| 47 | |||
| 48 | short_usage="Type \`${progname} --usage' for more information about options." | ||
| 49 | |||
| 50 | long_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...] | ||
| 47 | 51 | ||
| 48 | Set compilation and installation parameters for GNU Emacs, and report. | 52 | Set compilation and installation parameters for GNU Emacs, and report. |
| 49 | CONFIGURATION specifies the machine and operating system to build for. | 53 | CONFIGURATION specifies the machine and operating system to build for. |
| @@ -52,72 +56,41 @@ For example: | |||
| 52 | configures Emacs to build on a Sun Sparc machine running SunOS 4.1, and | 56 | configures Emacs to build on a Sun Sparc machine running SunOS 4.1, and |
| 53 | ${progname} decstation | 57 | ${progname} decstation |
| 54 | configures Emacs to run on a DECstation running Ultrix. See \`etc/MACHINES'. | 58 | configures Emacs to run on a DECstation running Ultrix. See \`etc/MACHINES'. |
| 55 | Options are: | 59 | |
| 56 | --with-x, --with-x11 or --with-x10 - what window system to use; | 60 | The --with-x, --with-x11 and --with-x10 options specify what window |
| 57 | default is to use X11 if present. If you don't want X, specify | 61 | system to use; if all are omitted, use X11 if present. If you |
| 58 | \`--with-x=no'. | 62 | don't want X, specify \`--with-x=no'. |
| 59 | -g, -O - Passed to the compiler. Default is -g, plus -O if using gcc. | 63 | |
| 60 | --prefix=DIR - where to install Emacs's library files | 64 | The --srcdir=DIR option specifies that the configuration and build |
| 61 | --libdir=DIR - where to look for arch-dependent library files | 65 | processes should look for the Emacs source code in DIR, when |
| 62 | --datadir=DIR - where to look for architecture-independent library files | 66 | DIR is not the current directory. To use this, you must build |
| 63 | --bindir=DIR - where to install the Emacs executable, and some friends | 67 | Emacs using a \`make' program which supports the \`VPATH' |
| 64 | --lisppath=PATH - colon-separated list of Emacs Lisp directories | 68 | feature. |
| 65 | --lockdir=DIR - where Emacs should do its file-locking stuff | 69 | |
| 66 | If successful, ${progname} leaves its status in config.status. If | 70 | If successful, ${progname} leaves its status in config.status. If |
| 67 | unsuccessful after disturbing the status quo, config.status is removed." | 71 | unsuccessful after disturbing the status quo, it removes config.status." |
| 68 | # These are omitted since users should not mess with them. | 72 | |
| 69 | # --gnu-malloc=[yes] or no - use the GNU memory allocator | 73 | |
| 70 | # --rel-alloc=[yes] or no - use compacting allocator for buffers | 74 | #### Option processing. |
| 71 | # --lisp-float-type=[yes] or no - Support floating point in Emacs Lisp. | ||
| 72 | # --window-system is omitted because --with... follow the conventions. | ||
| 73 | |||
| 74 | if [ ! -r ./src/lisp.h ]; then | ||
| 75 | echo "${progname}: Can't find Emacs sources in \`./src'. | ||
| 76 | Run this config script in the top directory of the Emacs source tree." >&2 | ||
| 77 | exit 1 | ||
| 78 | fi | ||
| 79 | 75 | ||
| 80 | # The option names defined here are actually the shell variable names. | 76 | ### These are the names of CPP symbols we want to define or leave undefined |
| 81 | # They should have `_' in place of `-'. | 77 | ### in src/config.h; their values are given by the shell variables of the same |
| 82 | options=":\ | 78 | ### names. |
| 83 | usage:help:\ | 79 | config_h_opts=" \ |
| 84 | with_x:with_x11:with_x10:\ | 80 | HAVE_X_WINDOWS HAVE_X11 HAVE_X_MENU \ |
| 85 | g:O:\ | 81 | SIGTYPE GNU_MALLOC REL_ALLOC LISP_FLOAT_TYPE " |
| 86 | prefix:bindir:emacsdir:datadir:lispdir:locallisppath:\ | 82 | |
| 87 | lisppath:buildlisppath:statedir:lockdir:libdir:mandir:infodir:\ | 83 | ### Record all the arguments, so we can save them in config.status. |
| 88 | " | ||
| 89 | |||
| 90 | boolean_opts=":\ | ||
| 91 | g:O:with_x:with_x10:\ | ||
| 92 | " | ||
| 93 | |||
| 94 | config_h_opts=":\ | ||
| 95 | have_x_windows:have_x11:have_x_menu:\ | ||
| 96 | c_switch_site:sigtype:gnu_malloc:rel_alloc:lisp_float_type:\ | ||
| 97 | " | ||
| 98 | |||
| 99 | prefix= | ||
| 100 | bindir=/usr/local/bin | ||
| 101 | gnu_malloc=yes | ||
| 102 | lisp_float_type=yes | ||
| 103 | |||
| 104 | # The default values for the following options are guessed at after other | ||
| 105 | # options have been checked and given values, so we set them to null here. | ||
| 106 | lisppath="" | ||
| 107 | datadir="" | ||
| 108 | libdir="" | ||
| 109 | lockdir="" | ||
| 110 | window_system="" | ||
| 111 | |||
| 112 | # Record all the arguments, so we can save them in config.status. | ||
| 113 | arguments="$@" | 84 | arguments="$@" |
| 114 | 85 | ||
| 115 | echo "Examining options." | ||
| 116 | while [ $# != 0 ]; do | 86 | while [ $# != 0 ]; do |
| 117 | arg="$1" | 87 | arg="$1" |
| 118 | case "${arg}" in | 88 | case "${arg}" in |
| 119 | -*) | 89 | |
| 120 | # Separate the switch name from the value it's being given. | 90 | ## Anything starting with a hyphen we assume is an option. |
| 91 | -* ) | ||
| 92 | |||
| 93 | ## Separate the switch name from the value it's being given. | ||
| 121 | case "${arg}" in | 94 | case "${arg}" in |
| 122 | -*=*) | 95 | -*=*) |
| 123 | opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'` | 96 | opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'` |
| @@ -125,102 +98,131 @@ while [ $# != 0 ]; do | |||
| 125 | valomitted=no | 98 | valomitted=no |
| 126 | ;; | 99 | ;; |
| 127 | -*) | 100 | -*) |
| 128 | # If FOO is a boolean argument, -FOO is equivalent to | 101 | ## If FOO is a boolean argument, --FOO is equivalent to |
| 129 | # -FOO=yes. Otherwise, the value comes from the next | 102 | ## --FOO=yes. Otherwise, the value comes from the next |
| 130 | # argument - see below. | 103 | ## argument - see below. |
| 131 | opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'` | 104 | opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'` |
| 132 | val="yes" | 105 | val="yes" |
| 133 | valomitted=yes | 106 | valomitted=yes |
| 134 | ;; | 107 | ;; |
| 135 | esac | 108 | esac |
| 136 | 109 | ||
| 137 | # Also change `-' in the option name to `_'. | 110 | ## Change `-' in the option name to `_'. |
| 138 | opt="`echo ${opt} | tr - _`" | 111 | opt="`echo ${opt} | tr - _`" |
| 139 | 112 | ||
| 140 | # Make sure the argument is valid and unambiguous. | 113 | ## Process the option. |
| 141 | case ${options} in | 114 | case "${opt}" in |
| 142 | *:${opt}:* ) # Exact match. | ||
| 143 | optvar=${opt} | ||
| 144 | ;; | ||
| 145 | *:${opt}*:${opt}*:* ) # Ambiguous prefix. | ||
| 146 | echo "\`-${opt}' is an ambiguous switch; it could be any of the following:" | ||
| 147 | # We can't just use tr to translate colons to newlines, since | ||
| 148 | # BSD sed and SYSV sed use different syntaxes for that. | ||
| 149 | spaced_options=`echo ${options} | tr ':' ' '` | ||
| 150 | echo `(for option in ${spaced_options}; do echo $option; done) \ | ||
| 151 | | grep "^${opt}"` | ||
| 152 | echo ${short_usage} | ||
| 153 | exit 1 | ||
| 154 | ;; | ||
| 155 | *:${opt}*:* ) # Unambigous prefix. | ||
| 156 | optvar=`echo ${options} | sed 's/^.*:\('${opt}'[^:]*\):.*$/\1/'` | ||
| 157 | ;; | ||
| 158 | * ) | ||
| 159 | (echo "\`-${opt}' is not a valid option." | ||
| 160 | echo "${short_usage}") | more | ||
| 161 | exit 1 | ||
| 162 | ;; | ||
| 163 | esac | ||
| 164 | 115 | ||
| 165 | case "${optvar}" in | 116 | ## Has the user specified which window systems they want to support? |
| 166 | usage | help) | 117 | "with_x" | "with_x11" | "with_x10" ) |
| 167 | echo "${usage_message}" | more | 118 | ## Make sure the value given was either "yes" or "no". |
| 168 | exit 1 | ||
| 169 | ;; | ||
| 170 | esac | ||
| 171 | |||
| 172 | # If the variable is supposed to be boolean, make sure the value | ||
| 173 | # given is either "yes" or "no". If not, make sure some value | ||
| 174 | # was given. | ||
| 175 | case "${boolean_opts}" in | ||
| 176 | *:${optvar}:* ) | ||
| 177 | case "${val}" in | 119 | case "${val}" in |
| 178 | y | ye | yes ) val=yes ;; | 120 | y | ye | yes ) val=yes ;; |
| 179 | n | no ) val=no ;; | 121 | n | no ) val=no ;; |
| 180 | * ) | 122 | * ) |
| 181 | echo "The \`-${optvar}' option (\`-${opt}') is supposed to have a boolean | 123 | (echo "${progname}: the \`--${opt}' option is supposed to have a boolean value. |
| 182 | value - set it to either \`yes' or \`no'." >&2 | 124 | Set it to either \`yes' or \`no'." |
| 125 | echo "${short_usage}") >&2 | ||
| 183 | exit 1 | 126 | exit 1 |
| 184 | ;; | 127 | ;; |
| 185 | esac | 128 | esac |
| 129 | eval "${opt}=\"${val}\"" | ||
| 186 | ;; | 130 | ;; |
| 187 | *) | 131 | |
| 132 | ## Has the user specified a source directory? | ||
| 133 | "srcdir" ) | ||
| 134 | ## If the value was omitted, get it from the next argument. | ||
| 188 | if [ "${valomitted}" = "yes" ]; then | 135 | if [ "${valomitted}" = "yes" ]; then |
| 136 | ## Get the next argument from the argument list, if there is one. | ||
| 189 | if [ $# = 1 ]; then | 137 | if [ $# = 1 ]; then |
| 190 | (echo "${progname}: You must give a value for the \`-${opt}' option, as in | 138 | (echo "${progname}: You must give a value for the \`--${opt}' option, as in |
| 191 | \`-${opt}=FOO'." | 139 | \`--${opt}=FOO'." |
| 192 | echo "${short_usage}") | more | 140 | echo "${short_usage}") >&2 |
| 193 | exit 1 | 141 | exit 1 |
| 194 | fi | 142 | fi |
| 195 | shift; val="$1" | 143 | shift; val="$1" |
| 196 | fi | 144 | fi |
| 197 | ;; | 145 | srcdir="${val}" |
| 198 | esac | 146 | ;; |
| 147 | |||
| 148 | ## Has the user asked for some help? | ||
| 149 | "usage" | "help" ) | ||
| 150 | echo "${long_usage}" | more | ||
| 151 | exit | ||
| 152 | ;; | ||
| 199 | 153 | ||
| 200 | eval "${optvar}=\"${val}\"" | 154 | ## We ignore all other options silently. |
| 155 | esac | ||
| 201 | ;; | 156 | ;; |
| 157 | |||
| 158 | ## Anything not starting with a hyphen we assume is a | ||
| 159 | ## configuration name. | ||
| 202 | *) | 160 | *) |
| 203 | configuration=${arg} | 161 | configuration=${arg} |
| 204 | ;; | 162 | ;; |
| 163 | |||
| 205 | esac | 164 | esac |
| 206 | shift | 165 | shift |
| 207 | done | 166 | done |
| 208 | 167 | ||
| 209 | if [ "${configuration}" = "" ]; then | 168 | if [ "${configuration}" = "" ]; then |
| 210 | (echo "You must specify a configuration name as an argument to ${progname}." | 169 | (echo "${progname}: You must specify a configuration name as an argument." |
| 211 | echo "${short_usage}") | more | 170 | echo "${short_usage}") >&2 |
| 171 | exit 1 | ||
| 172 | fi | ||
| 173 | |||
| 174 | |||
| 175 | #### Decide where the source is. | ||
| 176 | case "${srcdir}" in | ||
| 177 | |||
| 178 | ## By default, it's in the current directory. | ||
| 179 | "" ) | ||
| 180 | srcdir=`pwd` | ||
| 181 | ;; | ||
| 182 | |||
| 183 | ## Otherwise, make sure it's a directory at all. | ||
| 184 | * ) | ||
| 185 | if [ ! -d "${srcdir}" ]; then | ||
| 186 | (echo "${progname}: The path specified with the `--srcdir' option" | ||
| 187 | echo "isn't a valid directory." | ||
| 188 | echo "${short_usage}") >&2 | ||
| 189 | exit 1 | ||
| 190 | fi | ||
| 191 | ;; | ||
| 192 | |||
| 193 | esac | ||
| 194 | |||
| 195 | ### Check that the source directory actually contains the source. | ||
| 196 | if [ ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then | ||
| 197 | (echo "The directory \`${srcdir}' doesn't contain the Emacs sources." | ||
| 198 | echo "You should either run the \`${progname}' script at the top of" | ||
| 199 | echo "the Emacs source tree, or use the \`--srcdir' option to specify" | ||
| 200 | echo "where the Emacs sources are." | ||
| 201 | echo "${short_usage}") >&2 | ||
| 212 | exit 1 | 202 | exit 1 |
| 213 | fi | 203 | fi |
| 214 | 204 | ||
| 215 | # Canonicalize the configuration name. | 205 | ### Make the necessary directories, if they don't exist. |
| 206 | if [ ! -d ./src ]; then | ||
| 207 | mkdir ./src | ||
| 208 | fi | ||
| 209 | if [ ! -d ./lib-src ]; then | ||
| 210 | mkdir ./lib-src | ||
| 211 | fi | ||
| 212 | if [ ! -d ./cpp ]; then | ||
| 213 | mkdir ./cpp | ||
| 214 | fi | ||
| 215 | |||
| 216 | |||
| 217 | #### Given the configuration name, set machfile and opsysfile to the | ||
| 218 | #### names of the m/*.h and s/*.h files we should use. | ||
| 219 | |||
| 220 | ### Canonicalize the configuration name. | ||
| 216 | echo "Checking the configuration name." | 221 | echo "Checking the configuration name." |
| 217 | if configuration=`./config.sub "${configuration}"` ; then : ; else | 222 | if configuration=`./config.sub "${configuration}"` ; then : ; else |
| 218 | exit $? | 223 | exit $? |
| 219 | fi | 224 | fi |
| 220 | 225 | ||
| 221 | # Given the canonicalized configuration name, set machfile and opsysfile to | ||
| 222 | # the names of the m/*.h and s/*.h files we should use. | ||
| 223 | |||
| 224 | ### You would hope that you could choose an m/*.h file pretty much | 226 | ### You would hope that you could choose an m/*.h file pretty much |
| 225 | ### based on the machine portion of the configuration name, and an s- | 227 | ### based on the machine portion of the configuration name, and an s- |
| 226 | ### file based on the operating system portion. However, it turns out | 228 | ### file based on the operating system portion. However, it turns out |
| @@ -667,54 +669,8 @@ fi | |||
| 667 | machfile="m/${machine}.h" | 669 | machfile="m/${machine}.h" |
| 668 | opsysfile="s/${opsys}.h" | 670 | opsysfile="s/${opsys}.h" |
| 669 | 671 | ||
| 670 | if [ ! "${prefix}" ]; then | ||
| 671 | prefix="/usr/local" | ||
| 672 | fi | ||
| 673 | |||
| 674 | if [ ! "${emacsdir}" ]; then | ||
| 675 | emacsdir="${prefix}/emacs-19.0" | ||
| 676 | fi | ||
| 677 | |||
| 678 | if [ ! "${datadir}" ]; then | ||
| 679 | datadir="${emacsdir}/etc" | ||
| 680 | fi | ||
| 681 | |||
| 682 | if [ ! "${lispdir}" ]; then | ||
| 683 | lispdir="${emacsdir}/lisp" | ||
| 684 | fi | ||
| 685 | |||
| 686 | if [ ! "${locallisppath}" ]; then | ||
| 687 | locallisppath="${emacsdir}/local-lisp" | ||
| 688 | fi | ||
| 689 | |||
| 690 | if [ ! "${lisppath}" ]; then | ||
| 691 | lisppath="${locallisppath}:${lispdir}" | ||
| 692 | fi | ||
| 693 | |||
| 694 | if [ ! "${buildlisppath}" ]; then | ||
| 695 | buildlisppath=../lisp | ||
| 696 | fi | ||
| 697 | |||
| 698 | if [ ! "${statedir}" ]; then | ||
| 699 | statedir="${emacsdir}" | ||
| 700 | fi | ||
| 701 | |||
| 702 | if [ ! "${lockdir}" ]; then | ||
| 703 | lockdir="${statedir}/lock" | ||
| 704 | fi | ||
| 705 | |||
| 706 | if [ "${libdir}" = "" ]; then | ||
| 707 | libdir="${emacsdir}/arch-lib" | ||
| 708 | fi | ||
| 709 | |||
| 710 | if [ ! "${mandir}" ]; then | ||
| 711 | mandir="/usr/man/man1" | ||
| 712 | fi | ||
| 713 | |||
| 714 | if [ ! "${infodir}" ]; then | ||
| 715 | infodir="${prefix}/info" | ||
| 716 | fi | ||
| 717 | 672 | ||
| 673 | #### Choose a window system. | ||
| 718 | echo "Checking window system." | 674 | echo "Checking window system." |
| 719 | window_system='' | 675 | window_system='' |
| 720 | case "${with_x}" in | 676 | case "${with_x}" in |
| @@ -752,70 +708,60 @@ esac | |||
| 752 | 708 | ||
| 753 | case "${window_system}" in | 709 | case "${window_system}" in |
| 754 | x11 ) | 710 | x11 ) |
| 755 | have_x_windows=yes | 711 | HAVE_X_WINDOWS=yes |
| 756 | have_x11=yes | 712 | HAVE_X11=yes |
| 757 | echo " Using X11." | 713 | echo " Using X11." |
| 758 | ;; | 714 | ;; |
| 759 | x10 ) | 715 | x10 ) |
| 760 | have_x_windows=yes | 716 | HAVE_X_WINDOWS=yes |
| 761 | have_x11=no | 717 | HAVE_X11=no |
| 762 | echo " Using X10." | 718 | echo " Using X10." |
| 763 | ;; | 719 | ;; |
| 764 | none ) | 720 | none ) |
| 765 | have_x_windows=no | 721 | HAVE_X_WINDOWS=no |
| 766 | have_x11=no | 722 | HAVE_X11=no |
| 767 | echo " Using no window system." | 723 | echo " Using no window system." |
| 768 | ;; | 724 | ;; |
| 769 | esac | 725 | esac |
| 770 | 726 | ||
| 771 | # If we're using X11, we should use the X menu package. | 727 | ### If we're using X11, we should use the X menu package. |
| 772 | have_x_menu=no | 728 | HAVE_X_MENU=no |
| 773 | case ${have_x11} in | 729 | case ${HAVE_X11} in |
| 774 | yes ) | 730 | yes ) |
| 775 | have_x_menu=yes | 731 | HAVE_X_MENU=yes |
| 776 | ;; | 732 | ;; |
| 777 | esac | 733 | esac |
| 778 | 734 | ||
| 735 | |||
| 736 | #### Choose a compiler. | ||
| 779 | echo "Checking for GCC." | 737 | echo "Checking for GCC." |
| 780 | temppath=`echo $PATH | sed 's/^:/.:/ | 738 | temppath=`echo $PATH | sed 's/^:/.:/ |
| 781 | s/::/:.:/g | 739 | s/::/:.:/g |
| 782 | s/:$/:./ | 740 | s/:$/:./ |
| 783 | s/:/ /g'` | 741 | s/:/ /g'` |
| 784 | cc=`( | 742 | default_cc=`( |
| 785 | for dir in ${temppath}; do | 743 | for dir in ${temppath}; do |
| 786 | if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi | 744 | if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi |
| 787 | done | 745 | done |
| 788 | echo cc | 746 | echo cc |
| 789 | )` | 747 | )` |
| 790 | 748 | ||
| 791 | case "${cc}" in | 749 | case "${default_cc}" in |
| 792 | "gcc" ) | 750 | "gcc" ) |
| 793 | echo " Using GCC." | 751 | echo " Using GCC." |
| 794 | # With GCC, both O and g should default to yes, no matter what | 752 | default_cflags='-g -O' |
| 795 | # the other is. | ||
| 796 | case "${O},${g}" in | ||
| 797 | , ) O=yes; g=yes ;; | ||
| 798 | ,* ) O=yes; ;; | ||
| 799 | *, ) g=yes ;; | ||
| 800 | esac | ||
| 801 | ;; | 753 | ;; |
| 802 | "*" ) | 754 | "*" ) |
| 803 | echo " Using the system's CC." | 755 | echo " Using the system's CC." |
| 804 | # With other compilers, treat them as mutually exclusive, | 756 | default_cflags='-g' |
| 805 | # defaulting to debug. | ||
| 806 | case "${O},${g}" in | ||
| 807 | , ) O=no ; g=yes ;; | ||
| 808 | ,no ) O=yes; ;; | ||
| 809 | ,yes ) O=no ; ;; | ||
| 810 | no, ) g=yes ;; | ||
| 811 | yes, ) g=no ;; | ||
| 812 | esac | ||
| 813 | ;; | 757 | ;; |
| 814 | esac | 758 | esac |
| 815 | 759 | ||
| 816 | # What is the return type of a signal handler? We run | 760 | |
| 817 | # /usr/include/signal.h through cpp and grep for the declaration of | 761 | #### What is the return type of a signal handler? |
| 818 | # the signal function. Yuck. | 762 | |
| 763 | ### We run /usr/include/signal.h through cpp and grep for the | ||
| 764 | ### declaration of the signal function. Yuck. | ||
| 819 | echo "Looking for return type of signal handler functions." | 765 | echo "Looking for return type of signal handler functions." |
| 820 | signal_h_file='' | 766 | signal_h_file='' |
| 821 | if [ -r /usr/include/signal.h ]; then | 767 | if [ -r /usr/include/signal.h ]; then |
| @@ -823,20 +769,23 @@ if [ -r /usr/include/signal.h ]; then | |||
| 823 | elif [ -r /usr/include/sys/signal.h ]; then | 769 | elif [ -r /usr/include/sys/signal.h ]; then |
| 824 | signal_h_file=/usr/include/sys/signal.h | 770 | signal_h_file=/usr/include/sys/signal.h |
| 825 | fi | 771 | fi |
| 826 | sigtype=void | 772 | SIGTYPE=void |
| 827 | if [ "${signal_h_file}" ]; then | 773 | if [ "${signal_h_file}" ]; then |
| 828 | sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*(' | 774 | sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*(' |
| 829 | 775 | ||
| 830 | # We make a copy whose name ends in .c, so the compiler | 776 | ## We make a copy whose name ends in .c, so the compiler |
| 831 | # won't complain about having only been given a .h file. | 777 | ## won't complain about having only been given a .h file. |
| 832 | tempcname="configure.tmp.$$.c" | 778 | tempcname="configure.tmp.$$.c" |
| 833 | cp ${signal_h_file} ${tempcname} | 779 | cp ${signal_h_file} ${tempcname} |
| 834 | if ${cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then | 780 | if ${default_cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then |
| 835 | sigtype=int | 781 | SIGTYPE=int |
| 836 | fi | 782 | fi |
| 837 | rm -f ${tempcname} | 783 | rm -f ${tempcname} |
| 838 | fi | 784 | fi |
| 839 | echo " Guessing that signals return \`${sigtype}'." | 785 | echo " Guessing that signals return \`${SIGTYPE}'." |
| 786 | |||
| 787 | |||
| 788 | #### Extract some information from the operating system and machine files. | ||
| 840 | 789 | ||
| 841 | echo "Examining the machine- and system-dependent files to find out" | 790 | echo "Examining the machine- and system-dependent files to find out" |
| 842 | echo " - which libraries the lib-src programs will want, and" | 791 | echo " - which libraries the lib-src programs will want, and" |
| @@ -857,114 +806,107 @@ echo '#include "src/'${opsysfile}'" | |||
| 857 | @configure@ system_malloc=no | 806 | @configure@ system_malloc=no |
| 858 | #endif | 807 | #endif |
| 859 | ' > ${tempcname} | 808 | ' > ${tempcname} |
| 860 | eval `${cc} -E ${tempcname} \ | 809 | eval `${default_cc} -E ${tempcname} \ |
| 861 | | grep '@configure@' \ | 810 | | grep '@configure@' \ |
| 862 | | sed -e 's/^@configure@//'` | 811 | | sed -e 's/^@configure@//'` |
| 863 | rm ${tempcname} | 812 | rm ${tempcname} |
| 864 | 813 | ||
| 865 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | 814 | # Do the opsystem or machine files prohibit the use of the GNU malloc? |
| 866 | if [ "${system_malloc}" = "yes" ]; then | 815 | if [ "${system_malloc}" = "yes" ]; then |
| 867 | gnu_malloc=no | 816 | GNU_MALLOC=no |
| 868 | gnu_malloc_reason=" | 817 | GNU_MALLOC_reason=" |
| 869 | (The GNU allocators don't work with this system configuration.)" | 818 | (The GNU allocators don't work with this system configuration.)" |
| 870 | fi | 819 | fi |
| 871 | 820 | ||
| 872 | if [ ! "${rel_alloc}" ]; then | 821 | if [ ! "${REL_ALLOC}" ]; then |
| 873 | rel_alloc=${gnu_malloc} | 822 | REL_ALLOC=${GNU_MALLOC} |
| 874 | fi | 823 | fi |
| 875 | 824 | ||
| 825 | LISP_FLOAT_TYPE=yes | ||
| 826 | |||
| 827 | #### Make the proper settings in `src/config.h'. | ||
| 876 | rm -f config.status | 828 | rm -f config.status |
| 877 | set -e | 829 | set -e |
| 878 | 830 | ||
| 879 | # Make the proper settings in the config file. | 831 | echo "Making \`./src/config.h' from \`${srcdir}/src/config.h.in'." |
| 880 | echo "Making src/config.h from src/config.h.in" | 832 | sed_flags="-e 's:@machine@:${machfile}:' -e 's:@opsystem@:${opsysfile}:'" |
| 881 | case "${g}" in | ||
| 882 | "yes" ) c_switch_site="${c_switch_site} -g" ;; | ||
| 883 | esac | ||
| 884 | case "${O}" in | ||
| 885 | "yes" ) c_switch_site="${c_switch_site} -O" ;; | ||
| 886 | esac | ||
| 887 | sed_flags="-e 's:@machine@:${machfile}:'" | ||
| 888 | sed_flags="${sed_flags} -e 's:@opsystem@:${opsysfile}:'" | ||
| 889 | 833 | ||
| 890 | for flag in `echo ${config_h_opts} | tr ':' ' '`; do | 834 | for flag in ${config_h_opts}; do |
| 891 | # Note that SYSV `tr' doesn't handle character ranges. | ||
| 892 | cflagname=`echo ${flag} \ | ||
| 893 | | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` | ||
| 894 | val=`eval echo '$'${flag}` | 835 | val=`eval echo '$'${flag}` |
| 895 | case ${val} in | 836 | case ${val} in |
| 896 | no | "") | 837 | no | "") |
| 897 | f="-e 's:.*#define ${cflagname}.*:/\\* #define ${cflagname} \\*/:'" | 838 | f="-e 's:.*#define ${flag}.*:/\\* #define ${flag} \\*/:'" |
| 898 | ;; | 839 | ;; |
| 899 | yes) | 840 | yes) |
| 900 | f="-e 's:.*#define ${cflagname}.*:#define ${cflagname}:'" | 841 | f="-e 's:.*#define ${flag}.*:#define ${flag}:'" |
| 901 | ;; | 842 | ;; |
| 902 | *) | 843 | *) |
| 903 | f="-e 's:.*#define ${cflagname}.*:#define ${cflagname} ${val}:'" | 844 | f="-e 's:.*#define ${flag}.*:#define ${flag} ${val}:'" |
| 904 | ;; | 845 | ;; |
| 905 | esac | 846 | esac |
| 906 | sed_flags="${sed_flags} ${f}" | 847 | sed_flags="${sed_flags} ${f}" |
| 907 | done | 848 | done |
| 908 | 849 | ||
| 909 | rm -f src/config.h.tmp | 850 | rm -f ./src/config.h.tmp |
| 910 | eval '/bin/sed '${sed_flags}' < src/config.h.in > src/config.h.tmp' | 851 | (echo "/* This file is generated by \`${progname}' from" |
| 852 | echo " \`${srcdir}/src/config.h.in'." | ||
| 853 | echo " If you are thinking about editing it, you should seriously consider" | ||
| 854 | echo " running \`${progname} instead, or editing" | ||
| 855 | echo " \`${srcdir}/src/config.h.in' itself." | ||
| 856 | eval '/bin/sed '${sed_flags}' < "${srcdir}/src/config.h.in"' | ||
| 857 | ) > src/config.h.tmp | ||
| 911 | ./move-if-change src/config.h.tmp src/config.h | 858 | ./move-if-change src/config.h.tmp src/config.h |
| 912 | # Remind people not to edit this. | 859 | ### Remind people not to edit this. |
| 913 | chmod -w src/config.h | 860 | chmod -w src/config.h |
| 914 | 861 | ||
| 915 | # Modify the parameters in the top makefile. | 862 | |
| 916 | echo "Producing ./Makefile from ./Makefile.in." | 863 | ### Modify the parameters in the top makefile. |
| 864 | echo "Producing \`./Makefile' from \`${srcdir}/Makefile.in'." | ||
| 917 | rm -f Makefile.tmp | 865 | rm -f Makefile.tmp |
| 918 | (echo "# This file is generated by \`${progname}' from \`./Makefile.in'. | 866 | (echo "\ |
| 867 | # This file is generated by \`${progname}' from \`${srcdir}/Makefile.in'. | ||
| 919 | # If you are thinking about editing it, you should seriously consider | 868 | # If you are thinking about editing it, you should seriously consider |
| 920 | # editing \`./Makefile.in' itself, or running \`${progname}' instead." | 869 | # editing \`./Makefile.in' itself, or running \`${progname}' instead." |
| 921 | /bin/sed < Makefile.in \ | 870 | /bin/sed < ${srcdir}/Makefile.in \ |
| 922 | -e '/^# DIST: /d' \ | 871 | -e 's/^CC=.*$/CC='"${default_cc}"'/' \ |
| 923 | -e 's;^\(prefix=\).*$;\1'"${prefix};" \ | 872 | -e 's/^CFLAGS=.*$/CFLAGS='"${default_cflags}"'/' \ |
| 924 | -e 's;^\(bindir=\).*$;\1'"${bindir};" \ | 873 | -e '/^# DIST: /d') > ./Makefile.tmp |
| 925 | -e 's;^\(emacsdir=\).*$;\1'"${emacsdir};" \ | 874 | ./move-if-change ./Makefile.tmp ./Makefile |
| 926 | -e 's;^\(datadir=\).*$;\1'"${datadir};" \ | ||
| 927 | -e 's;^\(lispdir=\).*$;\1'"${lispdir};" \ | ||
| 928 | -e 's;^\(locallisppath=\).*$;\1'"${locallisppath};" \ | ||
| 929 | -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \ | ||
| 930 | -e 's;^\(buildlisppath=\).*$;\1'"${buildlisppath};" \ | ||
| 931 | -e 's;^\(statedir=\).*$;\1'"${statedir};" \ | ||
| 932 | -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \ | ||
| 933 | -e 's;^\(libdir=\).*$;\1'"${libdir};" \ | ||
| 934 | -e 's;^\(mandir=\).*$;\1'"${mandir};" \ | ||
| 935 | -e 's;^\(infodir=\).*$;\1'"${infodir};" \ | ||
| 936 | ) > ./Makefile.tmp | ||
| 937 | ./move-if-change Makefile.tmp Makefile | ||
| 938 | # Remind people not to edit this. | 875 | # Remind people not to edit this. |
| 939 | chmod -w ./Makefile | 876 | chmod -w ./Makefile |
| 940 | 877 | ||
| 941 | # Modify the parameters in the `build-install' script. | 878 | ### I'm commenting out this section until I bring the `build-install' script |
| 942 | echo "Producing ./build-install from ./build-install.in." | 879 | ### into line with the rest of the configuration stuff. |
| 943 | rm -f ./build-install.tmp | 880 | |
| 944 | (echo "# This file is generated by \`${progname}' from \`./build-install.in'. | 881 | ### # Modify the parameters in the `build-install' script. |
| 945 | # If you are thinking about editing it, you should seriously consider | 882 | ### echo "Producing \`./build-install' from \`${srcdir}/build-install.in'." |
| 946 | # editing \`./build-install.in' itself, or running \`${progname}' instead." | 883 | ### rm -f ./build-install.tmp |
| 947 | /bin/sed < build-install.in \ | 884 | ### (echo "\ |
| 948 | -e 's;^\(prefix=\).*$;\1'"${prefix};" \ | 885 | ### # This file is generated by \`${progname}' from \`${srcdir}/build-install.in'. |
| 949 | -e 's;^\(bindir=\).*$;\1'"${bindir};" \ | 886 | ### # If you are thinking about editing it, you should seriously consider |
| 950 | -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \ | 887 | ### # editing \`./build-install.in' itself, or running \`${progname}' instead." |
| 951 | -e 's;^\(datadir=\).*$;\1'"${datadir};" \ | 888 | ### /bin/sed < ${srcdir}/build-install.in \ |
| 952 | -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \ | 889 | ### -e 's;^\(prefix=\).*$;\1'"${prefix};" \ |
| 953 | -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp | 890 | ### -e 's;^\(bindir=\).*$;\1'"${bindir};" \ |
| 954 | ./move-if-change build-install.tmp build-install | 891 | ### -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \ |
| 955 | # Remind people not to edit this. | 892 | ### -e 's;^\(datadir=\).*$;\1'"${datadir};" \ |
| 956 | chmod -w build-install | 893 | ### -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \ |
| 957 | chmod +x build-install | 894 | ### -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp |
| 895 | ### ./move-if-change build-install.tmp build-install | ||
| 896 | ### # Remind people not to edit this. | ||
| 897 | ### chmod -w build-install | ||
| 898 | ### chmod +x build-install | ||
| 958 | 899 | ||
| 959 | # Modify the parameters in the src makefile. | 900 | # Modify the parameters in the src makefile. |
| 960 | echo "Producing src/Makefile from src/Makefile.in." | 901 | echo "Producing \`./src/Makefile' from \`${srcdir}/src/Makefile.in'." |
| 961 | rm -f src/Makefile.tmp | 902 | rm -f src/Makefile.tmp |
| 962 | (echo "# This file is generated by \`${progname}' from \`Makefile.in'. | 903 | (echo "# This file is generated by \`${progname}' from \`Makefile.in'. |
| 963 | # If you are thinking about editing it, you should seriously consider | 904 | # If you are thinking about editing it, you should seriously consider |
| 964 | # editing \`Makefile.in' itself, or running \`${progname}' instead." | 905 | # editing \`Makefile.in' itself, or running \`${progname}' instead." |
| 965 | /bin/sed < src/Makefile.in \ | 906 | /bin/sed < src/Makefile.in \ |
| 966 | -e '/^# DIST: /d' \ | 907 | -e 's;^\(CC *=\).*$;\1'"${default_cc};" \ |
| 967 | -e 's;^\(CC[ ]*=\).*$;\1'"${cc};") > src/Makefile.tmp | 908 | -e 's;^\(CFLAGS *=\).*$;\1'"${default_cflags};" \ |
| 909 | -e '/^# DIST: /d') > src/Makefile.tmp | ||
| 968 | ./move-if-change src/Makefile.tmp src/Makefile | 910 | ./move-if-change src/Makefile.tmp src/Makefile |
| 969 | # Remind people not to edit this. | 911 | # Remind people not to edit this. |
| 970 | chmod -w src/Makefile | 912 | chmod -w src/Makefile |
| @@ -1004,8 +946,8 @@ The following values have been set in ./Makefile and ./build-install: | |||
| 1004 | The following values have been set in src/config.h: | 946 | The following values have been set in src/config.h: |
| 1005 | What operating system and machine description files should Emacs use? | 947 | What operating system and machine description files should Emacs use? |
| 1006 | \`${opsysfile}' and \`${machfile}' | 948 | \`${opsysfile}' and \`${machfile}' |
| 1007 | Should Emacs use the GNU version of malloc? ${gnu_malloc}${gnu_malloc_reason} | 949 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} |
| 1008 | Should Emacs use the relocating allocator for buffers? ${rel_alloc} | 950 | Should Emacs use the relocating allocator for buffers? ${REL_ALLOC} |
| 1009 | Should Emacs support a floating point data type? ${lisp_float_type} | 951 | Should Emacs support a floating point data type? ${lisp_float_type} |
| 1010 | What window system should Emacs use? ${window_system} | 952 | What window system should Emacs use? ${window_system} |
| 1011 | What compiler should emacs be built with? ${cc} | 953 | What compiler should emacs be built with? ${cc} |
diff --git a/src/Makefile.in b/src/Makefile.in index 04a083123b0..79994082791 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -5,7 +5,10 @@ | |||
| 5 | MAKE = make | 5 | MAKE = make |
| 6 | # BSD doesn't have it as a default. | 6 | # BSD doesn't have it as a default. |
| 7 | 7 | ||
| 8 | CC =gcc | 8 | # These values are edited by configure. |
| 9 | CC=cc | ||
| 10 | CFLAGS=-g | ||
| 11 | |||
| 9 | CPP = $(CC) -E -Is -Im | 12 | CPP = $(CC) -E -Is -Im |
| 10 | #Note: an alternative is CPP = /lib/cpp | 13 | #Note: an alternative is CPP = /lib/cpp |
| 11 | 14 | ||
| @@ -40,7 +43,13 @@ dotemacs: xmakefile | |||
| 40 | xmakefile: ymakefile config.h | 43 | xmakefile: ymakefile config.h |
| 41 | -rm -f xmakefile xmakefile.new junk.c junk.cpp | 44 | -rm -f xmakefile xmakefile.new junk.c junk.cpp |
| 42 | cp ymakefile junk.c | 45 | cp ymakefile junk.c |
| 43 | $(CPP) junk.c > junk.cpp | 46 | ## The flags for optimization and debugging depend on the |
| 47 | ## system, so take an ordinary CFLAGS value and choose the | ||
| 48 | ## appropriate CPP symbols to use in ymakefile. | ||
| 49 | $(CPP) junk.c > junk.cpp \ | ||
| 50 | -DC_SWITCH_SITE="`echo ${CFLAGS}' ' \ | ||
| 51 | | sed -e 's/-g /C_DEBUG_SWITCH /' \ | ||
| 52 | -e 's/-O /C_OPTIMIZE_SWITCH /`" | ||
| 44 | < junk.cpp \ | 53 | < junk.cpp \ |
| 45 | sed -e 's/^#.*//' \ | 54 | sed -e 's/^#.*//' \ |
| 46 | -e 's/^[ \f\t][ \f\t]*$$//' \ | 55 | -e 's/^[ \f\t][ \f\t]*$$//' \ |
| @@ -48,7 +57,7 @@ xmakefile: ymakefile config.h | |||
| 48 | | sed -n -e '/^..*$$/p' \ | 57 | | sed -n -e '/^..*$$/p' \ |
| 49 | > xmakefile.new | 58 | > xmakefile.new |
| 50 | mv -f xmakefile.new xmakefile | 59 | mv -f xmakefile.new xmakefile |
| 51 | rm -f junk.c | 60 | rm -f junk.c junk.cpp |
| 52 | 61 | ||
| 53 | tags TAGS: | 62 | tags TAGS: |
| 54 | etags [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el \ | 63 | etags [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el \ |