annotate lib-src/config.values.sh @ 357:4711e16a8e49 r21-1-8

Import from CVS: tag r21-1-8
author cvs
date Mon, 13 Aug 2007 10:57:04 +0200
parents bfd6434d15b3
children 74fd4e045ea6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
181
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
1 #! /bin/sh
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
2 # config.values.sh --- create config.values.in from ../configure
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
3
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
4 # Author: Martin Buchholz
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
5 # Maintainer: Martin Buchholz
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
6 # Keywords: configure elisp report-xemacs-bugs
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
7
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
8 # This file is part of XEmacs.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
9
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
10 # XEmacs is free software; you can redistribute it and/or modify it
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
11 # under the terms of the GNU General Public License as published by
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
12 # the Free Software Foundation; either version 2, or (at your option)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
13 # any later version.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
14
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
15 # XEmacs is distributed in the hope that it will be useful, but
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
18 # General Public License for more details.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
19
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
20 # You should have received a copy of the GNU General Public License
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
21 # along with XEmacs; see the file COPYING. If not, write to
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
22 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
23 # Boston, MA 02111-1307, USA.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
24
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
25 ### Commentary:
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
26
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
27 ## Extract all the @foo@ configuration symbols from ../configure
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
28 ## to make them available to elisp later (see util/config.el)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
29 ## Primarily useful for creating ridiculously verbose bug reports.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
30 ##
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
31 ## See lisp/utils/config.el, ../configure.in,
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
32 ## and the Autoconf documentation on AC_OUTPUT, for more details.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
33 ##
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
34 ## This script needs only to be run occasionally (before a Net release)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
35 ## by an XEmacs Maintainer (consider yourself so blessed, if you are
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
36 ## actually reading this commentary).
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
37 ##
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
38 if test ! -r ./configure; then
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
39 cd ..
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
40 if test ! -r ./configure; then
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
41 echo "Can't find configure!";
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
42 exit 1;
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
43 fi
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
44 fi
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
45
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
46 exec < ./configure > "lib-src/config.values.in"
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
47 cat <<\EOF
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
48 ;;; Do not edit this file!
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
49 ;;; This file was automatically generated, by the config.values.sh script,
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
50 ;;; from configure, which was itself automatically generated from configure.in
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
51 ;;;
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
52 ;;; See lisp/util/config.el for details on how this file is used.
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
53 ;;;
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
54 ;;; You are trapped in a twisty maze of strange-looking files, all autogenerated...
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
55
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
56 ;;; configure is created, from configure.in, by autoconf
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
57 ;;; config.values.in is created, from configure, by config.values.sh
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
58 ;;; config.values is created, from config.values.in, by configure
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
59 ;;; config.values is read by lisp/utils/config.el,
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
60 ;;; to create the (Lisp object) config-value-hash-table
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
61
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
62 ;;; Variables defined in configure by AC_SUBST follow:
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
63 ;;; (These are used in Makefiles)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
64
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
65 EOF
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
66 sed -n '/^s%@\([A-Za-z_][A-Za-z_]*\)@%\$\1%g$/ {
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
67 s/^s%@\([A-Za-z_][A-Za-z_]*\)@%\$\1%g$/\1 "@\1@"/
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
68 p
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
69 }' | \
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
70 sort -u
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
71 cat <<\EOF
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
72
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
73 ;;; Variables defined in configure by AC_DEFINE and AC_DEFINE_UNQUOTED follow:
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
74 ;;; (These are used in C code)
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
75
bfd6434d15b3 Import from CVS: tag r20-3b17
cvs
parents:
diff changeset
76 EOF