1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
|
#!/bin/sh
# Configuration script for GNU CHILL
# Copyright (C) 1994 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
#GNU CC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GNU CC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA. */
#
# Shell script to create proper links to machine-dependent files in
# preparation for compiling gcc.
#
# Options: --srcdir=DIR specifies directory where sources are.
# --host=HOST specifies host configuration.
# --target=TARGET specifies target configuration.
# --build=TARGET specifies configuration of machine you are
# using to compile GCC.
# --prefix=DIR specifies directory to install in.
# --local-prefix=DIR specifies directory to put local ./include in.
# --exec-prefix=DIR specifies directory to install executables in.
# --with-gnu-ld arrange to work with GNU ld.
# --with-gnu-as arrange to work with GAS.
# --with-stabs arrange to use stabs instead of host debug format.
# --with-elf arrange to use elf instead of host debug format.
# --nfp assume system has no FPU.
#
# If configure succeeds, it leaves its status in config.status.
# If configure fails after disturbing the status quo,
# config.status is removed.
#
progname=$0
# Configure the runtime and regression-test directories
SUBDIRS="runtime utils"
SUBDIRS="$SUBDIRS testsuite/compile"
SUBDIRS="$SUBDIRS testsuite/execute"
SUBDIRS="$SUBDIRS testsuite/execute/telebras"
SUBDIRS="$SUBDIRS testsuite/noncompile"
SUBDIRS="$SUBDIRS testsuite/examples"
SUBDIRS="$SUBDIRS testsuite/execute/oe"
SUBDIRS="$SUBDIRS testsuite/compile/elektra"
SUBDIRS="$SUBDIRS testsuite/compile/votrics"
# Default --srcdir to the directory where the script is found,
# if a directory was specified.
# The second sed call is to convert `.//configure' to `./configure'.
srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
if [ x$srcdir = x$0 ]
then
srcdir=
fi
host=
# Default prefix to /usr/local.
prefix=/usr/local
# local_prefix specifies where to find the directory /usr/local/include
# We don't use $(prefix) for this
# because we always want GCC to search /usr/local/include
# even if GCC is installed somewhere other than /usr/local.
# Think THREE TIMES before specifying any other value for this!
# DO NOT make this use $prefix!
local_prefix=/usr/local
# CYGNUS LOCAL: for our purposes, this must be prefix. This is apparently
# only done for the benefit of glibc, and we don't use glibc.
local_prefix='$(prefix)'
# Default is to let the Makefile set exec_prefix from $(prefix)
exec_prefix='$(prefix)'
# CYGNUS LOCAL. Default to nothing.
program_transform_name=
program_transform_set=
site=
remove=rm
hard_link=ln
symbolic_link='ln -s'
copy=cp
# Record all the arguments, to write them in config.status.
arguments=$*
#for Test
#remove="echo rm"
#hard_link="echo ln"
#symbolic_link="echo ln -s"
target=
host=
build=
for arg in $*;
do
case $next_arg in
--srcdir)
srcdir=$arg
next_arg=
;;
--host)
host=$arg
next_arg=
;;
--target)
target=$arg
next_arg=
;;
--build)
build=$arg
next_arg=
;;
--prefix)
prefix=$arg
next_arg=
;;
--local-prefix)
local_prefix=$arg
next_arg=
;;
--exec-prefix)
exec_prefix=$arg
next_arg=
;;
--program-transform-name) # CYGNUS LOCAL
# Double any backslashes or dollar signs in the argument.
if [ -n "${arg}" ] ; then
program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
fi
program_transform_set=yes
next_arg=
;;
--program-prefix) # CYGNUS LOCAL
if [ -n "${arg}" ]; then
program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
next_arg=
;;
--program-suffix) # CYGNUS LOCAL
if [ -n "${arg}" ]; then
program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
next_arg=
;;
--site) # CYGNUS LOCAL
site=${arg}
next_arg=
;;
--x-*)
next_arg=
;;
*)
case $arg in
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
next_arg=--srcdir
;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
;;
-host | --host | --hos | --ho | --h)
next_arg=--host
;;
-host=* | --host=* | --hos=* | --ho=* | --h=*)
host=`echo $arg | sed 's/-*h[a-z]*=//'`
;;
-target | --target | --targe | --targ | --tar | --ta | --t)
next_arg=--target
;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target=`echo $arg | sed 's/-*t[a-z]*=//'`
;;
-build | --build | --buil | --bui | --bu | --b)
next_arg=--build
;;
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
build=`echo $arg | sed 's/-*b[a-z]*=//'`
;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
next_arg=--prefix
;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
;;
-local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
| --local-pr | --local-p | --local- | --local | --loc | --lo | --l)
next_arg=--local-prefix
;;
-local-prefix=* | --local-prefix=* | --local-prefi=* | --local-pref=* \
| --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
| --loc=* | --lo=* | --l=*)
local_prefix=`echo $arg | sed 's/-*l[-a-z]*=//'`
;;
-exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
| --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
next_arg=--exec-prefix
;;
-exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* \
| --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
| --exe=* | --ex=* | --e=*)
exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'`
;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- | --program-transform \
| --program-transfor | --program-transfo | --program-transf \
| --program-trans | --program-tran | --program-tra \
| --program-tr | --program-t)
next_arg=--program-transform-name
# CYGNUS LOCAL
;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* | --program-transfo=* \
| --program-transf=* | --program-trans=* | --program-tran=* \
| --program-tra=* | --program-tr=* | --program-t=*)
# CYGNUS LOCAL
arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
# Double any \ or $ in the argument.
if [ -n "${arg}" ] ; then
program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
fi
program_transform_set=yes
;;
-program-prefix | --program-prefix | --program-prefi \
| --program-pref | --program-pre | --program-pr \
| --program-p)
next_arg=--program-prefix
# CYGNUS LOCAL
;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* \
| --program-p=*)
# CYGNUS LOCAL
arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
if [ -n "${arg}" ]; then
program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
;;
-program-suffix | --program-suffix | --program-suffi \
| --program-suff | --program-suf | --program-su \
| --program-s)
next_arg=--program-suffix
# CYGNUS LOCAL
;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* \
| --program-s=*)
# CYGNUS LOCAL
arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
if [ -n "${arg}" ]; then
program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
fi
program_transform_set=yes
;;
-site | --site | --sit) # CYGNUS LOCAL
next_arg=--site
;;
-site=* | --site=* | --sit=* | --si=*) # CYGNUS LOCAL
site=`echo ${arg} | sed 's/^[-a-z]*=//'`
;;
-with-gnu-ld | --with-gnu-ld | --with-gnu-l)
gnu_ld=yes
;;
-gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
gas=yes
;;
-nfp | --nfp | --nf | --n)
nfp=yes
;;
-with-stabs | -with-stab | -with-sta | -with-st | -with-s \
| --with-stabs | --with-stab | --with-sta | --with-st | --with-s \
| -stabs | -stab | -sta | -st \
| --stabs | --stab | --sta | --st)
stabs=yes
;;
-with-elf | -with-el | -with-se \
| --with-elf | --with-el | --with-e \
| -elf | -el | -e \
|--elf | --el | --e)
elf=yes
;;
-with-* | --with-*) ;; #ignored
-without-* | --without-*) ;; #ignored
-enable-* | --enable-*) ;; #ignored
-x | --x) ;; # ignored
-x-*=* | --x-*=*) ;; # ignored
-x-* | --x-*)
next_arg=--x-ignored # ignored
;;
--he*) ;; # ignored for now (--help)
--vers*) ;; # ignored for now (--version)
-v | -verb* | --verb*) ;; # ignored for now (--verbose)
--program-*) ;; #ignored (--program-prefix, --program-suffix)
--c*) ;; #ignored (--cache-file)
--q*) ;; #ignored (--quiet)
--si*) ;; #ignored (--silent)
-*)
echo "Invalid option \`$arg'" 1>&2
exit 1
;;
*)
# Allow configure HOST TARGET
if [ x$host = x ]
then
host=$target
fi
target=$arg
;;
esac
esac
done
# Find the source files, if location was not specified.
if [ x$srcdir = x ]
then
srcdirdefaulted=1
srcdir=.
if [ ! -r tree.c ]
then
srcdir=..
fi
fi
if [ ! -r ${srcdir}/grant.c ]
then
if [ x$srcdirdefaulted = x ]
then
echo "$progname: Can't find CHILL frontend sources in \`${srcdir}'" 1>&2
else
echo "$progname: Can't find CHILL frontend sources in \`.' or \`..'" 1>&2
fi
exit 1
fi
# Make sure that scripts are executable
[ -w ${srcdir} -a -f ${srcdir}/regression.sh ] && \
chmod +x ${srcdir}/regression.sh
[ -w ${srcdir} -a -f ${srcdir}/regression.prpt ] && \
chmod +x ${srcdir}/regression.prpt
[ -w ${srcdir} -a -f ${srcdir}/regression.awk3 ] && \
chmod +x ${srcdir}/regression.awk3
if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]
then
echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2
exit 1
fi
host_xmake_file=
host_truncate_target=
# Complain if an arg is missing
if [ x$build = x ]
then
# If host was specified, always use it for build also to avoid
# confusion. If someone wants a cross compiler where build != host,
# then they must specify build explicitly. Since this case is
# extremely rare, it does not matter that it is slightly inconvenient.
if [ x$host != x ]
then
build=$host
# This way of testing the result of a command substitution is
# defined by Posix.2 (section 3.9.1) as well as traditional shells.
elif build=`${srcdir}/../config.guess`
then
echo "This appears to be a ${build} system." 1>&2
elif [ x$target != x ]
then
echo 'Config.guess failed to determine the host type. Defaulting to target.'
build=$target
else
echo 'Config.guess failed to determine the host type. You need to specify one.' 1>&2
echo "\
Usage: `basename $progname` [--host=HOST] [--build=BUILD]
[--prefix=DIR] [--gxx-include-dir=DIR] [--local-pref=DIR] [--exec-pref=DIR]
[--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--with-elf] [--nfp] TARGET" 1>&2
echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
if [ -r config.status ]
then
tail +2 config.status 1>&2
fi
exit 1
fi
fi
# If $host was not specified, use $build.
if [ x$host = x ]
then
host=$build
fi
# If $target was not specified, use $host.
if [ x$target = x ]
then
target=$host
fi
# Validate the specs, and canonicalize them.
canon_build=`/bin/sh $srcdir/../config.sub $build` || exit 1
canon_host=`/bin/sh $srcdir/../config.sub $host` || exit 1
canon_target=`/bin/sh $srcdir/../config.sub $target` || exit 1
rm -f config.bak
if [ -f config.status ]; then mv -f config.status config.bak; fi
#
# For the current directory and all of the designated SUBDIRS,
# do the rest of the script...
#
if [ ! -d testsuite ] ; then mkdir testsuite; fi
_SUBDIRS=
for d in $SUBDIRS; do
[ -d $srcdir/$d ] && _SUBDIRS="$_SUBDIRS $d"
done
savesrcdir=$srcdir
STARTDIR=`pwd`
for subdir in $_SUBDIRS
do
tmake_file=
host_xmake_file=
oldsrcdir=$savesrcdir
# ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
# Re-adjust the path
# Also create a .gdbinit file which runs the one in srcdir
# and tells GDB to look there for source files.
case $oldsrcdir in
".") srcdir=. ;;
/*) # absolute path
srcdir=${oldsrcdir}/${subdir} ;;
*) # otherwise relative
srcdir=${invsubdir}${oldsrcdir}/${subdir} ;;
esac
if [ -r ${oldsrcdir}/${subdir}/.gdbinit -a ${oldsrcdir} != "." ] ; then
cat > ${subdir}/.gdbinit <<EOF
dir .
dir ${srcdir}
source ${srcdir}/.gdbinit
EOF
fi
case $oldsrcdir in
/*) ;;
*) oldsrcdir=${invsubdir}${oldsrcdir} ;;
esac
mainsrcdir=${oldsrcdir}/..
test -d $subdir || mkdir $subdir
cd $subdir
#
# Create Makefile.tem from Makefile.in.
# Make it set VPATH if necessary so that the sources are found.
# Also change its value of srcdir.
rm -f Makefile.tem
echo "VPATH = ${srcdir}" \
| cat - ${srcdir}/Makefile.in \
| sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
# Conditionalize the makefile for this host machine.
if [ -f ${mainsrcdir}/config/${host_xmake_file} ]
then
rm -f Makefile.xx
sed -e "/####host/ r ${mainsrcdir}/config/${host_xmake_file}" Makefile.tem > Makefile.xx
echo "Merged ${host_xmake_file}."
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
else
# Say in the makefile that there is no host_xmake_file,
# by using a name which (when interpreted relative to $srcdir/config)
# will duplicate another dependency: $srcdir/Makefile.in.
host_xmake_file=../Makefile.in
fi
# Define variables host_canonical, build_canonical, and target_canonical
# because some Cygnus local changes in the Makefile depend on them.
echo host_canonical = ${canon_host} > Makefile.xx
echo target_canonical = ${canon_target} >> Makefile.xx
echo build_canonical = ${canon_build} >> Makefile.xx
cat Makefile.tem >> Makefile.xx
mv Makefile.xx Makefile.tem
# Conditionalize the makefile for this target machine.
if [ -f ${mainsrcdir}/config/${tmake_file} ]
then
rm -f Makefile.xx
sed -e "/####target/ r ${mainsrcdir}/config/${tmake_file}" Makefile.tem > Makefile.xx
echo "Merged ${tmake_file}."
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
else
# Say in the makefile that there is no tmake_file,
# by using a name which (when interpreted relative to $srcdir/config)
# will duplicate another dependency: $srcdir/Makefile.in.
tmake_file=../Makefile.in
fi
# CYGNUS LOCAL
# Conditionalize the makefile for this site.
if [ -f ${mainsrcdir}/config/ms-${site} ]
then
rm -f Makefile.xx
sed -e "/####site/ r ${mainsrcdir}/config/ms-${site}" Makefile.tem > Makefile.xx
echo "Merged ms-${site}."
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
fi
# CYGNUS LOCAL
# If this is a cross compilation, and we have newlib in the build
# tree, then define inhibit_libc in LIBGCC2_CFLAGS. This will cause
# __eprintf to be left out of libgcc.a, but that's OK because newlib
# has its own version of assert.h.
if [ x$host != x$target ]; then
sed -e 's/^\(LIBGCC2_CFLAGS[ ]*=[ ]*\)/\1-Dinhibit_libc /' Makefile.tem > Makefile.tem2
rm -f Makefile.tem
mv Makefile.tem2 Makefile.tem
fi
# Remove all formfeeds, since some Makes get confused by them.
# Also arrange to give the variables `target', `host_xmake_file',
# `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
# and `INSTALL_HEADERS_DIR' values in the Makefile from the values
# they have in this script.
# CYGNUS LOCAL: FLOAT_H, CROSS_FLOAT_H, objdir
rm -f Makefile.xx
sed -e "s///" -e "s/^target=.*$/target=${target}/" \
-e "s|^xmake_file=.*$|xmake_file=${host_xmake_file}|" \
-e "s|^tmake_file=.*$|tmake_file=${tmake_file}|" \
-e "s|^version=.*$|version=${version}|" \
-e "s|^prefix[ ]*=.*|prefix = $prefix|" \
-e "s|^local_prefix[ ]*=.*|local_prefix = $local_prefix|" \
-e "s|^exec_prefix[ ]*=.*|exec_prefix = $exec_prefix|" \
-e "s|^objdir[ ]*=.*|objdir=`pwd`|" \
Makefile.tem > Makefile.xx
rm -f Makefile.tem
mv Makefile.xx Makefile.tem
# Install Makefile for real, after making final changes.
# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
# Also use all.cross instead of all.internal, and add cross-make to Makefile.
if [ x$canon_host = x$canon_target ]
then
rm -f Makefile
if [ x$canon_host = x$canon_build ]
then
mv Makefile.tem Makefile
else
# When building gcc with a cross-compiler, we need to fix a
# few things.
echo "build= $build" > Makefile
sed -e "/####build/ r ${mainsrcdir}/build-make" Makefile.tem >> Makefile
rm -f Makefile.tem Makefile.xx
fi
else
rm -f Makefile
echo "CROSS=-DCROSS_COMPILE" > Makefile
sed -e "/####cross/ r ${mainsrcdir}/cross-make" Makefile.tem >> Makefile
rm -f Makefile.tem Makefile.xx
fi
echo "Created \`$subdir/Makefile'."
if [ xx${vint} != xx ]
then
vintmsg=" (vint)"
fi
# Describe the chosen configuration in config.status.
# Make that file a shellscript which will reestablish the same configuration.
rm -f config.bak
if [ -f config.status ]; then mv -f config.status config.bak; fi
echo "#!/bin/sh
# This directory was configured as follows:
cd $invsubdir; ${progname}" $arguments > config.new
echo echo host=$canon_host target=$canon_target build=$canon_build >> config.new
chmod a+x config.new
# If we aren't executing the configure script in .
if [ x$subdir != x. ]
then
if [ -f $srcdir/configure ]
then
echo "Running \`${CONFIG_SHELL-sh} $srcdir/configure $arguments\'"
${CONFIG_SHELL-sh} $srcdir/configure $arguments
echo "${srcdir}/configure" $arguments >> config.new
echo echo host=$canon_host target=$canon_target build=$canon_build >> config.new
fi
fi
if [ -f config.bak ] && cmp config.bak config.new >/dev/null 2>/dev/null;
then
mv -f config.bak config.status
rm -f config.new
else
mv -f config.new config.status
rm -f config.bak
fi
cd $STARTDIR
done # end of current-dir SUBDIRS loop
srcdir=$savesrcdir
# Describe the chosen configuration in config.status.
# Make that file a shellscript which will reestablish the same configuration.
echo "#!/bin/sh
# This directory was configured as follows:
${progname}" $arguments > config.new
echo echo host=$canon_host target=$canon_target build=$canon_build >> config.new
chmod a+x config.new
if [ -f config.bak ] && cmp config.bak config.new >/dev/null 2>/dev/null;
then
mv -f config.bak config.status
rm -f config.new
else
mv -f config.new config.status
rm -f config.bak
fi
exit 0
|