3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic License,
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 License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
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
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
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)
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
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
27 ?RCS: Revision 3.0 1993/08/18 12:04:47 ram
28 ?RCS: Baseline for dist 3.0 netwide release.
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.
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
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
47 ?LINT:unclosed !GROK!THIS!
48 ?LINT:extern CONFIG_H CONFIG_SH
49 ?LINT:change CONFIG_H CONFIG_SH
52 '') CONFIG_SH=config.sh;;
55 '') CONFIG_H=config.h;;
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=../../../..;
65 echo "Can't find $CONFIG_SH."; exit 1
70 ?X: Make sure we are in the directory where the .SH file is located.
72 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
74 echo "Extracting $CONFIG_H (with variable substitutions)"
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.
81 ?X: Previously, we changed all
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>
90 ?X: /*#define FOO / **/
91 sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
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
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.
101 * \$Id: Config_h.U 1 2006-08-24 12:32:52Z rmanfredi $
105 * Package name : $package
106 * Source directory : $src
107 * Configuration time: $cf_time
108 * Configured by : $cf_by
109 * Target system : $myuname