Commit | Line | Data |
---|---|---|
8bffa491 JH |
1 | ?RCS: $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1993, Raphael Manfredi | |
4 | ?RCS: | |
5 | ?RCS: You may redistribute only under the terms of the Artistic Licence, | |
6 | ?RCS: as specified in the README file that comes with the distribution. | |
7 | ?RCS: You may reuse parts of this distribution only within the terms of | |
8 | ?RCS: that same Artistic Licence; a copy of which may be found at the root | |
9 | ?RCS: of the source tree for dist 3.0. | |
10 | ?RCS: | |
11 | ?RCS: $Log: Config_h.U,v $ | |
12 | ?RCS: Revision 3.0.1.5 1997/02/28 14:57:43 ram | |
13 | ?RCS: patch61: added support for src.U | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0.1.4 1995/09/25 09:10:49 ram | |
16 | ?RCS: patch59: commented the purpose of the #un-def directive | |
17 | ?RCS: | |
18 | ?RCS: Revision 3.0.1.3 1995/01/30 14:25:39 ram | |
19 | ?RCS: patch49: typo fixes in leading config.h comment (WED) | |
20 | ?RCS: | |
21 | ?RCS: Revision 3.0.1.2 1993/08/24 12:13:20 ram | |
22 | ?RCS: patch3: added TOP as a local shell temporary variable | |
23 | ?RCS: | |
24 | ?RCS: Revision 3.0.1.1 1993/08/19 06:42:20 ram | |
25 | ?RCS: patch1: leading config.sh searching was not aborting properly | |
26 | ?RCS: | |
27 | ?RCS: Revision 3.0 1993/08/18 12:04:47 ram | |
28 | ?RCS: Baseline for dist 3.0 netwide release. | |
29 | ?RCS: | |
30 | ?X: | |
31 | ?X: This file ends up producing the config_h.SH script, which is run to produce | |
32 | ?X: the config.h file. The file ./.Config_h below contains all the ?H: lines | |
33 | ?X: extracted out of all the units. Metaconfig itself adds the !GROK!THIS!. | |
34 | ?X: Note that this code isn't included into Configure, but must be shipped with. | |
35 | ?X: | |
36 | ?X: For those who wish to know why the file is config_h.SH instead of the more | |
37 | ?X: natural config.h.SH, well... it is to support systems like MS-DOG. Only one | |
38 | ?X: 'dot' is allowed within the file name, as it is part of the "extension" of | |
39 | ?X: the file. MS-DOG will not let you have two 'dots' because that would mean | |
40 | ?X: two "extensions". | |
41 | ?X: | |
42 | ?MAKE:Config_h: Id End Config_sh Obsol_h myuname cf_time cf_by package src | |
43 | ?MAKE: -pick c_h_weed $@ %< | |
44 | ?MAKE: -pick c_h_weed $@ ./Config_h | |
45 | ?MAKE: -pick c_h_weed $@ ./Obsol_h | |
fd1a35d0 JH |
46 | ?LINT:extern CONFIG_H |
47 | ?LINT:extern CONFIG_SH | |
48 | ?LINT:change CONFIG_H | |
49 | ?LINT:change CONFIG_SH | |
ff429c2d | 50 | ?T:PERL_CONFIG_SH TOP |
8bffa491 JH |
51 | case "$CONFIG_SH" in |
52 | '') CONFIG_SH=config.sh ;; | |
53 | esac | |
54 | case "$CONFIG_H" in | |
55 | '') CONFIG_H=config.h ;; | |
56 | esac | |
ff429c2d | 57 | case $PERL_CONFIG_SH in |
8bffa491 JH |
58 | '') |
59 | if test -f $CONFIG_SH; then TOP=.; | |
60 | elif test -f ../$CONFIG_SH; then TOP=..; | |
61 | elif test -f ../../$CONFIG_SH; then TOP=../..; | |
62 | elif test -f ../../../$CONFIG_SH; then TOP=../../..; | |
63 | elif test -f ../../../../$CONFIG_SH; then TOP=../../../..; | |
64 | else | |
65 | echo "Can't find $CONFIG_SH."; exit 1 | |
66 | fi | |
67 | . $TOP/$CONFIG_SH | |
68 | ;; | |
69 | esac | |
70 | ?X: Make sure we are in the directory where the .SH file is located. | |
71 | case "$0" in | |
72 | */*) cd `expr X$0 : 'X\(.*\)/'` ;; | |
73 | esac | |
74 | echo "Extracting $CONFIG_H (with variable substitutions)" | |
75 | ?X: | |
76 | ?X: Since we unconditionally translate leading #undef into /*#define, we're | |
77 | ?X: stuck when we really want to have a #undef in $CONFIG_H. That's why there | |
78 | ?X: is provision here for #un-def, which is translated back into #undef after | |
79 | ?X: all original #undef have been processed. | |
80 | ?X: | |
81 | ?X: Previously, we changed all | |
82 | ?X: #undef FOO /**/ | |
83 | ?X: into | |
84 | ?X: /*#define FOO /**/ | |
85 | ?X: The xlc compiler (available on IBM's AIX) complains that this is | |
86 | ?X: an illegal attempt to write a nested comment, and warns against it. | |
87 | ?X: There's apparently no way to shut the compiler up, either. | |
88 | ?X: This sed command from Hallvard B Furuseth <h.b.furuseth@usit.uio.no> | |
89 | ?X: changes it to | |
90 | ?X: /*#define FOO / **/ | |
91 | sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!' | |
92 | /* | |
93 | * This file was produced by running the config_h.SH script, which | |
94 | * gets its values from $CONFIG_SH, which is generally produced by | |
95 | * running Configure. | |
96 | * | |
97 | * Feel free to modify any of this as the need arises. Note, however, | |
98 | * that running config_h.SH again will wipe out any changes you've made. | |
99 | * For a more permanent change edit $CONFIG_SH and rerun config_h.SH. | |
100 | * | |
101 | * \$Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $ | |
102 | */ | |
103 | ||
104 | /* | |
105 | * Package name : $package | |
106 | * Source directory : $src | |
107 | * Configuration time: $cf_time | |
108 | * Configured by : $cf_by | |
109 | * Target system : $myuname | |
110 | */ | |
111 | ||
112 | #ifndef _config_h_ | |
113 | #define _config_h_ | |
114 |