]>
Commit | Line | Data |
---|---|---|
eb02fd64 | 1 | #!/bin/sh |
eb02fd64 | 2 | |
70d3fab7 DZ |
3 | ### WARNING: this file contains embedded tabs. Do not run untabify on this file. |
4 | ||
46f3c7cd | 5 | # Configuration script |
0ed316a0 | 6 | # Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. |
eb02fd64 | 7 | |
063efd10 JG |
8 | # This program is free software; you can redistribute it and/or modify |
9 | # it under the terms of the GNU General Public License as published by | |
10 | # the Free Software Foundation; either version 2 of the License, or | |
11 | # (at your option) any later version. | |
12 | # | |
13 | # This program is distributed in the hope that it will be useful, | |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | # GNU General Public License for more details. | |
17 | # | |
18 | # You should have received a copy of the GNU General Public License | |
19 | # along with this program; if not, write to the Free Software | |
20 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
eb02fd64 | 21 | |
49b10446 RP |
22 | # Please email any bugs, comments, and/or additions to this file to: |
23 | # [email protected] | |
24 | ||
c1e4672c RP |
25 | # This file was written by K. Richard Pixley. |
26 | ||
eb02fd64 RP |
27 | # |
28 | # Shell script to create proper links to machine-dependent files in | |
0df06ca0 | 29 | # preparation for compilation. |
eb02fd64 RP |
30 | # |
31 | # If configure succeeds, it leaves its status in config.status. | |
32 | # If configure fails after disturbing the status quo, | |
73f1f5ba | 33 | # config.status is removed. |
eb02fd64 RP |
34 | # |
35 | ||
4d714963 | 36 | export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0 $argv; kill $$) |
c297d71e | 37 | |
eb02fd64 RP |
38 | remove=rm |
39 | hard_link=ln | |
40 | symbolic_link='ln -s' | |
41 | ||
42 | #for Test | |
43 | #remove="echo rm" | |
44 | #hard_link="echo ln" | |
45 | #symbolic_link="echo ln -s" | |
46 | ||
47 | # clear some things potentially inherited from environment. | |
6f8ac2d9 RP |
48 | |
49 | Makefile=Makefile | |
50 | Makefile_in=Makefile.in | |
b8f8fddc | 51 | arguments=$* |
6f8ac2d9 | 52 | configdirs= |
c1e4672c RP |
53 | exec_prefix= |
54 | exec_prefixoption= | |
0df06ca0 | 55 | fatal= |
4d714963 RP |
56 | floating_point=default |
57 | gas=default | |
c1e4672c | 58 | host_alias= |
3a07a6ac | 59 | host_makefile_frag= |
a98e98d3 | 60 | moveifchange= |
4d714963 | 61 | next_host= |
3a07a6ac | 62 | next_prefix= |
3509822c | 63 | next_site= |
4d714963 | 64 | next_srcdir= |
3509822c RP |
65 | next_target= |
66 | next_tmpdir= | |
46766962 | 67 | norecursion= |
34bdab16 | 68 | package_makefile_frag= |
4d714963 | 69 | prefix=/usr/local |
49b10446 | 70 | progname= |
c1e4672c | 71 | program_prefix= |
c5108322 ILT |
72 | program_prefixoption= |
73 | program_suffix= | |
74 | program_suffixoption= | |
75 | program_transform_name= | |
76 | program_transform_nameoption= | |
a98e98d3 RP |
77 | redirect=">/dev/null" |
78 | removing= | |
0e693d0b | 79 | site= |
3a07a6ac | 80 | site_makefile_frag= |
a98e98d3 | 81 | site_option= |
74cc5508 | 82 | srcdir= |
ec342d7d | 83 | srctrigger= |
8becd045 | 84 | subdirs= |
c1e4672c | 85 | target_alias= |
3a07a6ac | 86 | target_makefile_frag= |
4d714963 | 87 | undefinedargs= |
0c72405d | 88 | version="$Revision$" |
4d714963 RP |
89 | x11=default |
90 | ||
4d714963 RP |
91 | NO_EDIT="This file was generated automatically by configure. Do not edit." |
92 | ||
93 | ## this is a little touchy and won't always work, but... | |
94 | ## | |
c1e4672c RP |
95 | ## if the argv[0] starts with a slash then it is an absolute name that can (and |
96 | ## must) be used as is. | |
4d714963 RP |
97 | ## |
98 | ## otherwise, if argv[0] has no slash in it, we can assume that it is on the | |
99 | ## path. Since PATH might include "." we also add `pwd` to the end of PATH. | |
100 | ## | |
4d714963 | 101 | |
c1e4672c | 102 | progname=$0 |
5cc24596 PB |
103 | # if PWD already has a value, it is probably wrong. |
104 | if [ -n "$PWD" ]; then PWD=`pwd`; fi | |
4d714963 | 105 | |
c1e4672c RP |
106 | case "${progname}" in |
107 | /*) ;; | |
108 | */*) ;; | |
109 | *) | |
73f1f5ba DZ |
110 | PATH=$PATH:${PWD=`pwd`} ; export PATH |
111 | ;; | |
c1e4672c | 112 | esac |
4d714963 | 113 | |
eb02fd64 RP |
114 | for arg in $*; |
115 | do | |
73f1f5ba DZ |
116 | # handle things that might have args following as separate words |
117 | if [ -n "${next_prefix}" ] ; then prefix=${arg} ; prefixoption="-prefix=${prefix}" ; next_prefix= | |
118 | elif [ -n "${next_exec_prefix}" ] ; then | |
119 | exec_prefix=${arg} | |
0ed316a0 | 120 | exec_prefixoption="-exec-prefix=${exec_prefix}" |
73f1f5ba DZ |
121 | next_exec_prefix= |
122 | elif [ -n "${next_site}" ] ; then site=${arg} ; site_option=-site=${site} ; next_site= | |
123 | # remove any possible trailing slash from srcdir. See note below. | |
124 | elif [ -n "${next_srcdir}" ] ; then srcdir=`echo ${arg} | sed -e 's:/$::'` ; next_srcdir= | |
125 | elif [ -n "${next_program_prefix}" ] ; then | |
126 | program_prefix=${arg} | |
127 | program_prefixoption="-program_prefix=${program_prefix}" | |
128 | next_program_prefix= | |
129 | elif [ -n "${next_program_suffix}" ] ; then | |
130 | program_suffix=${arg} | |
131 | program_suffixoption="-program_suffix=${program_suffix}" | |
132 | next_program_suffix= | |
133 | elif [ -n "${next_program_transform_name}" ] ; then | |
134 | # Double any backslashes or dollar signs in the argument | |
d6d49c64 PB |
135 | if [ -n "${arg}" ] ; then |
136 | program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`" | |
137 | fi | |
138 | program_transform_nameoption="${program_transform_nameoption} --program-transform-name='${arg}'" | |
73f1f5ba DZ |
139 | next_program_transform_name= |
140 | elif [ -n "${next_target}" ] ; then | |
141 | next_target= | |
142 | case "${target_alias}" in | |
143 | "") | |
144 | target_alias="${arg}" | |
145 | ;; | |
146 | *) | |
147 | echo '***' Can only configure for one target at a time. 1>&2 | |
148 | fatal=yes | |
149 | ;; | |
150 | esac | |
151 | elif [ -n "${next_tmpdir}" ] ; then | |
152 | next_tmpdir= | |
153 | tmpdiroption="--tmpdir=${arg}" | |
154 | TMPDIR=${arg} | |
3509822c | 155 | |
73f1f5ba DZ |
156 | else |
157 | case ${arg} in | |
158 | -exec_prefix=* | --exec_prefix=* | --exec_prefi=* | --exec_pref=* | --exec_pre=* | --exec_pr=* | --exec_p=* | --exec_=* | --exec=* | --exe=* | --ex=* | --e=* | -exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* ) | |
159 | exec_prefix=`echo ${arg} | sed 's/^[-a-z_]*=//'` | |
160 | exec_prefixoption=${arg} | |
161 | ;; | |
162 | -exec_prefix | --exec_prefix | --exec_prefi | --exec_pref | --exec_pre | --exec_pr | --exec_p | --exec_ | --exec | --exe | --ex | --e | -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec-) | |
163 | next_exec_prefix=yes | |
164 | ;; | |
165 | -gas | --g*) | |
166 | gas=yes | |
167 | ;; | |
168 | -help | --he*) | |
169 | fatal=true | |
170 | ;; | |
171 | -host=* | --host=* | --hos=* | --ho=*) | |
172 | case "${host_alias}" in | |
173 | "") | |
174 | host_alias="`echo ${arg} | sed 's/^[-a-z]*=//'`" | |
175 | ;; | |
176 | *) | |
177 | echo '***' Can only configure for one host at a time. 1>&2 | |
178 | fatal=yes | |
179 | ;; | |
180 | esac | |
181 | ;; | |
182 | -nfp | --nf*) | |
183 | floating_point=no | |
184 | ;; | |
185 | -norecursion | --no*) | |
186 | norecursion=true | |
187 | ;; | |
188 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=*) | |
189 | prefix=`echo ${arg} | sed 's/^[-a-z]*=//'` | |
190 | prefixoption=${arg} | |
191 | ;; | |
192 | -prefix | --prefix | --prefi | --pref | --pre) | |
193 | next_prefix=yes | |
194 | ;; | |
195 | -rm | --rm) removing=${arg} ;; | |
196 | -program_prefix=* | --program_prefix=* | --program_prefi=* | --program_pref=* | --program_pre=* | --program_pr=* | --program_p=* | -program-prefix=* | --program-prefix=* | --program-prefi=* | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
197 | program_prefix=`echo ${arg} | sed 's/^[-a-z_]*=//'` | |
198 | program_prefixoption=${arg} | |
199 | ;; | |
200 | -program_prefix | --program_prefix | --program_prefi | --program_pref | --program_pre | --program_pr | --program_p | -program-prefix | --program-prefix | --program-prefi | --program-pref | --program-pre | --program-pr | --program-p) | |
201 | next_program_prefix=yes | |
202 | ;; | |
203 | -program_suffix=* | --program_suffix=* | --program_suffi=* | --program_suff=* | --program_suf=* | --program_su=* | --program_s=* | -program-suffix=* | --program-suffix=* | --program-suffi=* | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
204 | program_suffix=`echo ${arg} | sed 's/^[-a-z_]*=//'` | |
205 | program_suffixoption=${arg} | |
206 | ;; | |
207 | -program_suffix | --program_suffix | --program_suffi | --program_suff | --program_suf | --program_su | --program_s |-program-suffix | --program-suffix | --program-suffi | --program-suff | --program-suf | --program-su | --program-s) | |
208 | next_program_suffix=yes | |
209 | ;; | |
210 | -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=* | -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=*) | |
d6d49c64 | 211 | arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'` |
73f1f5ba | 212 | # Double any \ or $ in the argument |
d6d49c64 PB |
213 | if [ -n "${arg}" ] ; then |
214 | program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`" | |
215 | fi | |
216 | program_transform_nameoption="${program_transform_nameoption} --program-transform-name='${arg}'" | |
73f1f5ba DZ |
217 | ;; |
218 | -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 | -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) | |
219 | next_program_transform_name=yes | |
220 | ;; | |
221 | -site=* | --site=* | --sit=* | --si=*) | |
222 | site_option=${arg} | |
223 | site=`echo ${arg} | sed 's/^[-a-z]*=//'` | |
224 | ;; | |
225 | -site | --site | --sit) | |
226 | next_site=yes | |
227 | ;; | |
228 | # remove trailing slashes. Otherwise, when the file name gets | |
229 | # bolted into an object file as debug info, it has two slashes in | |
230 | # it. Ordinarily this is ok, but emacs takes double slash to | |
231 | # mean "forget the first part". | |
232 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
233 | srcdir=`echo ${arg} | sed 's/^[-a-z]*=//' | sed -e 's:/$::'` | |
234 | ;; | |
235 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
236 | next_srcdir=yes | |
237 | ;; | |
238 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=*) | |
239 | case "${target_alias}" in | |
240 | "") target_alias="`echo ${arg} | sed 's/^[-a-z]*=//'`" ;; | |
241 | *) | |
242 | echo '***' Can only configure for one target at a time. 1>&2 | |
243 | fatal=yes | |
244 | ;; | |
245 | esac | |
246 | ;; | |
247 | -target | --target | --targe | --targ | --tar | --ta) | |
248 | next_target=yes | |
249 | ;; | |
250 | -tmpdir=* | --tmpdir=* | --tmpdi=* | --tmpd=* | --tmp=* | --tm=*) | |
251 | tmpdiroption=${arg} | |
252 | TMPDIR=`echo ${arg} | sed 's/^[-a-z]*=//'` | |
253 | ;; | |
254 | -tmpdir | --tmpdir | --tmpdi | --tmpd | --tmp | --tm) | |
255 | next_tmpdir=yes | |
256 | ;; | |
257 | -v | -verbose | --v) | |
258 | redirect= | |
259 | verbose=-v | |
260 | ;; | |
261 | -version | -V | --version | --V) | |
262 | echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'` | |
263 | exit 0 | |
264 | ;; | |
265 | -with*=* | --with*=*) | |
266 | withopt=`echo ${arg} | sed 's:^-*\(with[^=]*\)=.*$:\1:;s/-/_/g'` | |
267 | withval=`echo ${arg} | sed 's:^-*with[^=]*=\(.*\)$:\1:'` | |
268 | eval $withopt="$withval" | |
269 | withoptions="$withoptions $arg" | |
270 | ;; | |
e5c6be8f DZ |
271 | -without* | --without*) |
272 | withopt=`echo ${arg} | sed 's:^-*without:with:;s/-/_/g'` | |
273 | eval $withopt=no | |
274 | withoutoptions="$withoutoptions $arg" | |
275 | ;; | |
73f1f5ba DZ |
276 | -with* | --with*) |
277 | withopt=`echo ${arg} | sed 's:^-*with:with:;s/-/_/g'` | |
278 | eval $withopt=yes | |
279 | withoptions="$withoptions $arg" | |
280 | ;; | |
281 | -x | --x) ;; | |
282 | -* | --*) | |
283 | (echo ; | |
284 | echo "Unrecognized option: \"${arg}\"". ; | |
285 | echo) 1>&2 | |
286 | fatal=true | |
287 | ;; | |
288 | *) | |
289 | case "${undefs}" in | |
290 | "") | |
291 | undefs="${arg}" | |
292 | ;; | |
293 | *) | |
294 | echo '***' Can only configure for one host and one target at a time. 1>&2 | |
295 | fatal=yes | |
296 | ;; | |
297 | esac | |
298 | ;; | |
299 | esac | |
300 | fi | |
eb02fd64 RP |
301 | done |
302 | ||
4d714963 | 303 | # process host and target |
a98bbe58 RP |
304 | case "${fatal}" in |
305 | "") | |
73f1f5ba DZ |
306 | # # Complain if an arg is missing |
307 | # if [ -z "${host_alias}" ] ; then | |
308 | # (echo ; | |
309 | # echo "configure: No HOST specified." ; | |
310 | # echo) 1>&2 | |
311 | # fatal=true | |
312 | # fi | |
4d714963 RP |
313 | |
314 | ### This is a bit twisted. | |
315 | ### * if all three are specified, this is an error. | |
316 | ### * if we have neither hosts, nor unadorned args, this is an error. | |
317 | ### * if no hosts are specified, then the unadorned args are hosts, but if | |
318 | ### there were none, this is an error. | |
319 | ### * if no targets are specified, then the unadorned args are targets, but if | |
320 | ### there were no unadorned args, then the hosts are also targets. | |
321 | ||
73f1f5ba DZ |
322 | if [ -n "${host_alias}" -a -n "${target_alias}" -a -n "${undefs}" ] ; then |
323 | echo '***' Can only configure for one host and one target at a time. 1>&2 | |
324 | fatal=yes | |
325 | elif [ -z "${host_alias}" -a -z "${undefs}" ] ; then | |
326 | echo '- You did not tell me what kind of host system you want to configure. | |
5cc24596 | 327 | - I will attempt to guess the kind of system this is.' 1>&2 |
73f1f5ba DZ |
328 | guesssys=`echo ${progname} | sed 's/configure$/config.guess/'` |
329 | if tmp_alias=`${guesssys}` ; then | |
330 | echo "- Looks like this is a ${tmp_alias}" 1>&2 | |
331 | host_alias=${tmp_alias} | |
d6d49c64 PB |
332 | case "${target_alias}" in |
333 | "") target_alias=${tmp_alias} ;; | |
334 | *) ;; | |
335 | esac | |
e5c6be8f | 336 | arguments="--host=${host_alias} ${arguments}" |
73f1f5ba DZ |
337 | else |
338 | echo '- Failed to guess the system type. You need to tell me.' 1>&2 | |
339 | fatal=yes | |
340 | fi | |
341 | else | |
342 | case "${host_alias}" in | |
343 | "") host_alias=${undefs} ;; | |
344 | *) ;; | |
345 | esac | |
346 | ||
347 | case "${target_alias}" in | |
348 | "") | |
349 | case "${undefs}" in | |
350 | "") target_alias=${host_alias} ;; | |
351 | *) target_alias=${undefs} ;; | |
352 | esac | |
353 | ;; | |
354 | *) ;; | |
355 | esac | |
356 | fi | |
357 | ;; | |
a98bbe58 RP |
358 | *) ;; |
359 | esac | |
eb02fd64 | 360 | |
c1e4672c | 361 | if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then |
73f1f5ba DZ |
362 | (echo "Usage: configure HOST" ; |
363 | echo ; | |
364 | echo "Options: [defaults in brackets]" ; | |
0ed316a0 DZ |
365 | echo " --prefix=MYDIR configure for installation of host dependent files into MYDIR. [\"/usr/local\"]" ; |
366 | echo " --exec-prefix=MYDIR configure for installation of host dependent files into MYDIR. [\"/usr/local\"]" ; | |
367 | echo " --help print this message. [normal config]" ; | |
368 | echo " --norecursion configure this directory only. [recurse]" ; | |
369 | echo " --program-prefix=FOO install programs with FOO prepended to their names. [ \"\" ]" ; | |
370 | echo " --program-suffix=FOO install programs with FOO appended to their names. [ \"\" ]" ; | |
371 | echo " --program-transform-name=FOO install programs with names transformed by sed pattern FOO. [ \"\" ]" ; | |
372 | echo " --site=SITE configure with site specific makefile for SITE" ; | |
373 | echo " --srcdir=DIR find the sources in DIR. [\".\" or \"..\"]" ; | |
374 | echo " --target=TARGET configure for TARGET. [TARGET = HOST]" ; | |
375 | echo " --tmpdir=TMPDIR create temporary files in TMPDIR. [ TMPDIR = \"/tmp\" ]" ; | |
376 | echo " --nfp configure the compilers default to soft floating point. [hard float]" ; | |
377 | echo " --with-FOO, --with-FOO=BAR specify that FOO is available" | |
378 | echo " --without-FOO specify that FOO is NOT available" | |
73f1f5ba DZ |
379 | echo ; |
380 | echo "Where HOST and TARGET are something like \"vax\", \"sun3\", \"encore\", etc." ; | |
e5c6be8f | 381 | echo ; |
73f1f5ba | 382 | ) 1>&2 |
73f1f5ba DZ |
383 | if [ -r config.status ] ; then |
384 | cat config.status | |
385 | fi | |
0df06ca0 | 386 | |
73f1f5ba | 387 | exit 1 |
eb02fd64 RP |
388 | fi |
389 | ||
0c72405d | 390 | configsub=`echo ${progname} | sed 's/configure$/config.sub/'` |
196377ee | 391 | moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` |
7da1d334 | 392 | |
94c7ae21 RP |
393 | # this is a hack. sun4 must always be a valid host alias or this will fail. |
394 | if ${configsub} sun4 >/dev/null 2>&1 ; then | |
73f1f5ba | 395 | true |
7da1d334 | 396 | else |
73f1f5ba DZ |
397 | echo '***' cannot find config.sub. 1>&2 |
398 | exit 1 | |
7da1d334 RP |
399 | fi |
400 | ||
196377ee RP |
401 | touch config.junk |
402 | if ${moveifchange} config.junk config.trash ; then | |
73f1f5ba | 403 | true |
196377ee | 404 | else |
73f1f5ba DZ |
405 | echo '***' cannot find move-if-change. 1>&2 |
406 | exit 1 | |
196377ee RP |
407 | fi |
408 | rm -f config.junk config.trash | |
409 | ||
a98bbe58 RP |
410 | case "${srcdir}" in |
411 | "") | |
73f1f5ba DZ |
412 | if [ -r configure.in ] ; then |
413 | srcdir=. | |
414 | else | |
415 | if [ -r ${progname}.in ] ; then | |
416 | srcdir=`echo ${progname} | sed 's:/configure$::'` | |
417 | else | |
418 | echo '***' "Can't find configure.in. Try using -srcdir=some_dir" 1>&2 | |
419 | exit 1 | |
420 | fi | |
421 | fi | |
422 | ;; | |
a98bbe58 RP |
423 | *) ;; |
424 | esac | |
eb02fd64 | 425 | |
8fd24008 RP |
426 | ### warn about some conflicting configurations. |
427 | ||
428 | case "${srcdir}" in | |
429 | ".") ;; | |
430 | *) | |
73f1f5ba DZ |
431 | if [ -f ${srcdir}/config.status ] ; then |
432 | echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2 | |
433 | exit 1 | |
434 | fi | |
8fd24008 | 435 | esac |
bc58b41d | 436 | |
c1e4672c RP |
437 | # default exec_prefix |
438 | case "${exec_prefix}" in | |
8becd045 | 439 | "") exec_prefix="\$(prefix)" ;; |
3a07a6ac RP |
440 | *) ;; |
441 | esac | |
442 | ||
4d714963 | 443 | ### break up ${srcdir}/configure.in. |
a98bbe58 RP |
444 | case "`grep '^# per\-host:' ${srcdir}/configure.in`" in |
445 | "") | |
73f1f5ba DZ |
446 | echo '***' ${srcdir}/configure.in has no "per-host:" line. 1>&2 |
447 | exit 1 | |
448 | ;; | |
a98bbe58 RP |
449 | *) ;; |
450 | esac | |
49b10446 | 451 | |
a98bbe58 RP |
452 | case "`grep '^# per\-target:' ${srcdir}/configure.in`" in |
453 | "") | |
73f1f5ba DZ |
454 | echo '***' ${srcdir}/configure.in has no "per-target:" line. 1>&2 |
455 | exit 1 | |
456 | ;; | |
a98bbe58 RP |
457 | *) ;; |
458 | esac | |
c5ae5678 | 459 | |
a98bbe58 RP |
460 | case "${TMPDIR}" in |
461 | "") TMPDIR=/tmp ; export TMPDIR ;; | |
462 | *) ;; | |
463 | esac | |
eb02fd64 | 464 | |
4d714963 RP |
465 | # keep this filename short for &%*%$*# 14 char file names |
466 | tmpfile=${TMPDIR}/cONf$$ | |
467 | trap "rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos" 0 | |
468 | ||
469 | # split ${srcdir}/configure.in into common, per-host, per-target, | |
470 | # and post-target parts. Post-target is optional. | |
471 | sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com | |
472 | sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst | |
473 | if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then | |
474 | sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt | |
475 | sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos | |
c297d71e | 476 | else |
4d714963 RP |
477 | sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt |
478 | echo >${tmpfile}.pos | |
c297d71e | 479 | fi |
eb02fd64 | 480 | |
c297d71e | 481 | ### do common part of configure.in |
eb02fd64 | 482 | |
c5ae5678 | 483 | . ${tmpfile}.com |
eb02fd64 | 484 | |
ec342d7d | 485 | # some sanity checks on configure.in |
a98bbe58 RP |
486 | case "${srctrigger}" in |
487 | "") | |
73f1f5ba DZ |
488 | echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2 |
489 | exit 1 | |
490 | ;; | |
a98bbe58 RP |
491 | *) ;; |
492 | esac | |
ec342d7d | 493 | |
c1e4672c RP |
494 | result=`${configsub} ${host_alias}` |
495 | host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
496 | host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
497 | host_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
498 | host=${host_cpu}-${host_vendor}-${host_os} | |
6c18e393 | 499 | |
c1e4672c | 500 | . ${tmpfile}.hst |
eb02fd64 | 501 | |
c1e4672c RP |
502 | result=`${configsub} ${target_alias}` |
503 | target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
504 | target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
505 | target_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
506 | target=${target_cpu}-${target_vendor}-${target_os} | |
eb02fd64 | 507 | |
c1e4672c | 508 | . ${tmpfile}.tgt |
49b10446 | 509 | |
c1e4672c RP |
510 | # Find the source files, if location was not specified. |
511 | case "${srcdir}" in | |
512 | "") | |
73f1f5ba DZ |
513 | srcdirdefaulted=1 |
514 | srcdir=. | |
515 | if [ ! -r ${srctrigger} ] ; then | |
516 | srcdir=.. | |
517 | fi | |
518 | ;; | |
c1e4672c RP |
519 | *) ;; |
520 | esac | |
eb02fd64 | 521 | |
c1e4672c | 522 | if [ ! -r ${srcdir}/${srctrigger} ] ; then |
73f1f5ba DZ |
523 | case "${srcdirdefaulted}" in |
524 | "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;; | |
525 | *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;; | |
526 | esac | |
eb02fd64 | 527 | |
73f1f5ba DZ |
528 | echo '***' \(At least ${srctrigger} is missing.\) 1>&2 |
529 | exit 1 | |
c1e4672c | 530 | fi |
131a3881 | 531 | |
0ed316a0 DZ |
532 | # Some systems (e.g., one of the i386-aix systems the gas testers are |
533 | # using) don't handle "\$" correctly, so don't use it here. | |
534 | tooldir='$(exec_prefix)'/${target_alias} | |
c5108322 ILT |
535 | |
536 | if [ "${host_alias}" != "${target_alias}" ] ; then | |
d6d49c64 PB |
537 | if [ "${program_prefixoption}" = "" ] ; then |
538 | if [ "${program_suffixoption}" = "" ] ; then | |
539 | if [ "${program_transform_nameoption}" = "" ] ; then | |
73f1f5ba DZ |
540 | program_prefix=${target_alias}- ; |
541 | fi | |
542 | fi | |
c5108322 ILT |
543 | fi |
544 | fi | |
545 | ||
546 | # Merge program_prefix and program_suffix onto program_transform_name | |
547 | # Use a double $ so that make ignores it | |
548 | if [ "${program_suffix}" != "" ] ; then | |
549 | program_transform_name="-e s/\$\$/${program_suffix}/ ${program_transform_name}" | |
550 | fi | |
551 | ||
552 | if [ "${program_prefix}" != "" ] ; then | |
553 | program_transform_name="-e s/^/${program_prefix}/ ${program_transform_name}" | |
554 | fi | |
555 | ||
8becd045 | 556 | for subdir in . ${subdirs} ; do |
eb02fd64 | 557 | |
8becd045 PB |
558 | # ${subdir} is relative path from . to the directory we're currently |
559 | # configuring. | |
560 | # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed. | |
561 | invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'` | |
131a3881 | 562 | |
8becd045 PB |
563 | ### figure out what to do with srcdir |
564 | case "${srcdir}" in | |
73f1f5ba DZ |
565 | ".") # no -srcdir option. We're building in place. |
566 | makesrcdir=. ;; | |
567 | /*) # absolute path | |
568 | makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'` | |
569 | ;; | |
570 | *) # otherwise relative | |
571 | case "${subdir}" in | |
572 | .) makesrcdir=${srcdir} ;; | |
573 | *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;; | |
574 | esac | |
575 | ;; | |
8becd045 | 576 | esac |
131a3881 | 577 | |
8becd045 | 578 | if [ "${subdir}/" != "./" ] ; then |
73f1f5ba | 579 | Makefile=${subdir}/Makefile |
8becd045 | 580 | fi |
131a3881 | 581 | |
9546e9b4 | 582 | if [ ! -d ${subdir} ] ; then |
73f1f5ba DZ |
583 | if mkdir ${subdir} ; then |
584 | true | |
09e0b992 | 585 | else |
73f1f5ba DZ |
586 | echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2 |
587 | exit 1 | |
09e0b992 | 588 | fi |
9546e9b4 RP |
589 | fi |
590 | ||
8becd045 PB |
591 | case "${removing}" in |
592 | "") | |
73f1f5ba DZ |
593 | case "${subdir}" in |
594 | .) ;; | |
595 | *) eval echo Building in ${subdir} ${redirect} ;; | |
596 | esac | |
597 | ||
598 | # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest) | |
599 | # Set up the list of links to be made. | |
600 | # ${links} is the list of link names, and ${files} is the list of names to link to. | |
601 | ||
602 | # Make the links. | |
603 | configlinks="${links}" | |
604 | if [ -r ${subdir}/config.status ] ; then | |
605 | mv -f ${subdir}/config.status ${subdir}/config.back | |
606 | fi | |
607 | while [ -n "${files}" ] ; do | |
608 | # set file to car of files, files to cdr of files | |
609 | set ${files}; file=$1; shift; files=$* | |
610 | set ${links}; link=$1; shift; links=$* | |
611 | ||
612 | if [ ! -r ${srcdir}/${file} ] ; then | |
613 | echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2 | |
614 | echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2 | |
615 | exit 1 | |
616 | fi | |
617 | ||
618 | ${remove} -f ${link} | |
619 | # Make a symlink if possible, otherwise try a hard link | |
620 | ${symbolic_link} ${srcdir}/${file} ${link} 2>/dev/null || ${hard_link} ${srcdir}/${file} ${link} | |
621 | ||
622 | if [ ! -r ${link} ] ; then | |
623 | echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2 | |
624 | exit 1 | |
625 | fi | |
626 | ||
627 | echo "Linked \"${link}\" to \"${srcdir}/${file}\"." | |
628 | done | |
629 | ||
630 | # Create a .gdbinit file which runs the one in srcdir | |
631 | # and tells GDB to look there for source files. | |
632 | ||
633 | if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then | |
634 | case ${srcdir} in | |
635 | .) ;; | |
636 | *) cat > ${subdir}/.gdbinit <<EOF | |
8becd045 | 637 | # ${NO_EDIT} |
3a07a6ac | 638 | dir . |
8becd045 PB |
639 | dir ${makesrcdir} |
640 | source ${makesrcdir}/.gdbinit | |
3a07a6ac | 641 | EOF |
73f1f5ba DZ |
642 | ;; |
643 | esac | |
644 | fi | |
0df06ca0 | 645 | |
73f1f5ba DZ |
646 | # Install a makefile, and make it set VPATH |
647 | # if necessary so that the sources are found. | |
648 | # Also change its value of srcdir. | |
649 | # NOTE: Makefile generation constitutes the majority of the time in configure. Hence, this section has | |
650 | # been somewhat optimized and is perhaps a bit twisty. | |
0df06ca0 | 651 | |
73f1f5ba | 652 | # code is order so as to try to sed the smallest input files we know. |
0df06ca0 | 653 | |
73f1f5ba | 654 | # the four makefile fragments MUST end up in the resulting Makefile in this order: |
34bdab16 DZ |
655 | # package, target, host, and site. so do these separately because I don't trust the |
656 | # order of sed -e expressions. | |
131a3881 | 657 | |
73f1f5ba DZ |
658 | if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then |
659 | ||
e5c6be8f DZ |
660 | # Conditionalize for this site from "Makefile.in" (or whatever it's called) into Makefile.tem |
661 | rm -f ${subdir}/Makefile.tem | |
662 | case "${site}" in | |
663 | "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;; | |
664 | *) | |
665 | site_makefile_frag=${srcdir}/config/ms-${site} | |
666 | ||
667 | if [ -f ${site_makefile_frag} ] ; then | |
668 | sed -e "/^####/ r ${site_makefile_frag}" ${srcdir}/${subdir}/${Makefile_in} \ | |
669 | > ${subdir}/Makefile.tem | |
670 | else | |
671 | cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem | |
672 | site_makefile_frag= | |
673 | fi | |
674 | ;; | |
675 | esac | |
676 | # working copy now in ${subdir}/Makefile.tem | |
677 | ||
678 | # Conditionalize the makefile for this host. | |
679 | rm -f ${Makefile} | |
680 | case "${host_makefile_frag}" in | |
681 | "") mv ${subdir}/Makefile.tem ${Makefile} ;; | |
682 | *) | |
683 | if [ ! -f ${host_makefile_frag} ] ; then | |
684 | host_makefile_frag=${srcdir}/${host_makefile_frag} | |
685 | fi | |
686 | if [ -f ${host_makefile_frag} ] ; then | |
687 | sed -e "/^####/ r ${host_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile} | |
688 | else | |
689 | echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2 | |
690 | echo '***' is missing in ${PWD=`pwd`}. 1>&2 | |
691 | mv ${subdir}/Makefile.tem ${Makefile} | |
692 | fi | |
693 | esac | |
694 | # working copy now in ${Makefile} | |
695 | ||
696 | # Conditionalize the makefile for this target. | |
697 | rm -f ${subdir}/Makefile.tem | |
698 | case "${target_makefile_frag}" in | |
699 | "") mv ${Makefile} ${subdir}/Makefile.tem ;; | |
700 | *) | |
701 | if [ ! -f ${target_makefile_frag} ] ; then | |
702 | target_makefile_frag=${srcdir}/${target_makefile_frag} | |
703 | fi | |
704 | if [ -f ${target_makefile_frag} ] ; then | |
705 | sed -e "/^####/ r ${target_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem | |
706 | else | |
707 | mv ${Makefile} ${subdir}/Makefile.tem | |
708 | target_makefile_frag= | |
709 | fi | |
710 | ;; | |
711 | esac | |
712 | # real copy now in ${subdir}/Makefile.tem | |
713 | ||
714 | # Conditionalize the makefile for this package. | |
715 | rm -f ${Makefile} | |
716 | case "${package_makefile_frag}" in | |
717 | "") mv ${subdir}/Makefile.tem ${Makefile} ;; | |
718 | *) | |
719 | if [ ! -f ${package_makefile_frag} ] ; then | |
720 | package_makefile_frag=${srcdir}/${package_makefile_frag} | |
721 | fi | |
722 | if [ -f ${package_makefile_frag} ] ; then | |
723 | sed -e "/^####/ r ${package_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile} | |
724 | else | |
725 | echo '***' Expected package makefile fragment \"${package_makefile_frag}\" 1>&2 | |
726 | echo '***' is missing in ${PWD=`pwd`}. 1>&2 | |
727 | mv ${subdir}/Makefile.tem ${Makefile} | |
728 | fi | |
729 | esac | |
730 | # working copy now in ${Makefile} | |
731 | ||
732 | mv ${Makefile} ${subdir}/Makefile.tem | |
733 | ||
734 | # real copy now in ${subdir}/Makefile.tem | |
735 | ||
736 | # prepend warning about editting, and a bunch of variables. | |
737 | rm -f ${Makefile} | |
738 | cat > ${Makefile} <<EOF | |
3a07a6ac | 739 | # ${NO_EDIT} |
8becd045 PB |
740 | VPATH = ${makesrcdir} |
741 | links = ${configlinks} | |
3a07a6ac RP |
742 | host_alias = ${host_alias} |
743 | host_cpu = ${host_cpu} | |
744 | host_vendor = ${host_vendor} | |
745 | host_os = ${host_os} | |
5cc24596 | 746 | host_canonical = ${host_cpu}-${host_vendor}-${host_os} |
3a07a6ac RP |
747 | target_alias = ${target_alias} |
748 | target_cpu = ${target_cpu} | |
749 | target_vendor = ${target_vendor} | |
750 | target_os = ${target_os} | |
5cc24596 | 751 | target_canonical = ${target_cpu}-${target_vendor}-${target_os} |
3a07a6ac | 752 | EOF |
e5c6be8f DZ |
753 | case "${package_makefile_frag}" in |
754 | "") ;; | |
755 | /*) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;; | |
756 | *) echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;; | |
757 | esac | |
758 | ||
759 | case "${target_makefile_frag}" in | |
760 | "") ;; | |
761 | /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;; | |
762 | *) echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;; | |
763 | esac | |
764 | ||
765 | case "${host_makefile_frag}" in | |
766 | "") ;; | |
767 | /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;; | |
768 | *) echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;; | |
769 | esac | |
770 | ||
771 | if [ "${site_makefile_frag}" != "" ] ; then | |
772 | echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile} | |
773 | fi | |
774 | ||
775 | # fixme: this shouldn't be in configure. | |
776 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. | |
777 | case "${host_alias}" in | |
778 | "${target_alias}") | |
779 | echo "ALL=all.internal" >> ${Makefile} | |
780 | ;; | |
781 | *) | |
782 | echo "CROSS=-DCROSS_COMPILE" >> ${Makefile} | |
783 | echo "ALL=all.cross" >> ${Makefile} | |
784 | ;; | |
785 | esac | |
786 | ||
787 | # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS, | |
788 | # remove any form feeds. | |
789 | if [ -z "${subdirs}" ]; then | |
790 | rm -f ${subdir}/Makefile.tem2 | |
70d3fab7 DZ |
791 | sed -e "s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:" \ |
792 | -e "s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \ | |
e5c6be8f DZ |
793 | ${subdir}/Makefile.tem > ${subdir}/Makefile.tem2 |
794 | rm -f ${subdir}/Makefile.tem | |
795 | mv ${subdir}/Makefile.tem2 ${subdir}/Makefile.tem | |
796 | fi | |
70d3fab7 DZ |
797 | sed -e "s:^prefix[ ]*=.*$:prefix = ${prefix}:" \ |
798 | -e "s:^exec_prefix[ ]*=.*$:exec_prefix = ${exec_prefix}:" \ | |
799 | -e "s:^srcdir[ ]*=.*$:srcdir = ${makesrcdir}:" \ | |
e5c6be8f | 800 | -e "s/\f//" \ |
70d3fab7 DZ |
801 | -e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \ |
802 | -e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \ | |
0ed316a0 | 803 | -e "s:^program_transform_name[ ]*=.*$:program_transform_name = \"${program_transform_name}\":" \ |
70d3fab7 | 804 | -e "s:^tooldir[ ]*=.*$:tooldir = ${tooldir}:" \ |
e5c6be8f DZ |
805 | ${subdir}/Makefile.tem >> ${Makefile} |
806 | # final copy now in ${Makefile} | |
807 | ||
808 | else | |
809 | echo "No Makefile.in found in ${srcdir}, unable to configure" 1>&2 | |
810 | fi | |
73f1f5ba DZ |
811 | |
812 | rm -f ${subdir}/Makefile.tem | |
813 | ||
814 | case "${host_makefile_frag}" in | |
815 | "") using= ;; | |
816 | *) using="and \"${host_makefile_frag}\"" ;; | |
817 | esac | |
818 | ||
819 | case "${target_makefile_frag}" in | |
820 | "") ;; | |
821 | *) using="${using} and \"${target_makefile_frag}\"" ;; | |
822 | esac | |
823 | ||
824 | case "${site_makefile_frag}" in | |
825 | "") ;; | |
826 | *) using="${using} and \"${site_makefile_frag}\"" ;; | |
827 | esac | |
828 | ||
829 | newusing=`echo "${using}" | sed 's/and/using/'` | |
830 | using=${newusing} | |
831 | echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using} | |
832 | ||
833 | . ${tmpfile}.pos | |
834 | ||
835 | # describe the chosen configuration in config.status. | |
836 | # Make that file a shellscript which will reestablish | |
837 | # the same configuration. Used in Makefiles to rebuild | |
838 | # Makefiles. | |
839 | ||
840 | case "${norecursion}" in | |
841 | "") arguments="${arguments} -norecursion" ;; | |
842 | *) ;; | |
843 | esac | |
844 | ||
845 | if [ ${subdir} = . ] ; then | |
846 | echo "#!/bin/sh | |
4d714963 | 847 | # ${NO_EDIT} |
4347369f | 848 | # This directory was configured as follows: |
4d714963 | 849 | ${progname}" ${arguments} " |
196377ee | 850 | # ${using}" > ${subdir}/config.new |
73f1f5ba DZ |
851 | else |
852 | echo "#!/bin/sh | |
8becd045 | 853 | # ${NO_EDIT} |
4347369f | 854 | # This directory was configured as follows: |
8becd045 PB |
855 | cd ${invsubdir} |
856 | ${progname}" ${arguments} " | |
196377ee | 857 | # ${using}" > ${subdir}/config.new |
73f1f5ba DZ |
858 | fi |
859 | chmod a+x ${subdir}/config.new | |
860 | if [ -r ${subdir}/config.back ] ; then | |
861 | mv -f ${subdir}/config.back ${subdir}/config.status | |
862 | fi | |
863 | ${moveifchange} ${subdir}/config.new ${subdir}/config.status | |
864 | ;; | |
8becd045 | 865 | |
73f1f5ba | 866 | *) rm -f ${Makefile} ${subdir}/config.status ${links} ;; |
8becd045 PB |
867 | esac |
868 | done | |
c1e4672c RP |
869 | |
870 | # If there are subdirectories, then recur. | |
871 | if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then | |
73f1f5ba DZ |
872 | for configdir in ${configdirs} ; do |
873 | ||
874 | if [ -d ${srcdir}/${configdir} ] ; then | |
875 | eval echo Configuring ${configdir}... ${redirect} | |
876 | case "${srcdir}" in | |
877 | ".") ;; | |
878 | *) | |
879 | if [ ! -d ./${configdir} ] ; then | |
880 | if mkdir ./${configdir} ; then | |
881 | true | |
882 | else | |
883 | echo '***' "${progname}: could not make ${PWD=`pwd`}/${configdir}" 1>&2 | |
884 | exit 1 | |
885 | fi | |
886 | fi | |
887 | ;; | |
888 | esac | |
889 | ||
890 | POPDIR=${PWD=`pwd`} | |
891 | cd ${configdir} | |
c1e4672c RP |
892 | |
893 | ### figure out what to do with srcdir | |
73f1f5ba DZ |
894 | case "${srcdir}" in |
895 | ".") newsrcdir=${srcdir} ;; # no -srcdir option. We're building in place. | |
896 | /*) # absolute path | |
897 | newsrcdir=${srcdir}/${configdir} | |
898 | srcdiroption="-srcdir=${newsrcdir}" | |
899 | ;; | |
900 | *) # otherwise relative | |
901 | newsrcdir=../${srcdir}/${configdir} | |
902 | srcdiroption="-srcdir=${newsrcdir}" | |
903 | ;; | |
904 | esac | |
c1e4672c RP |
905 | |
906 | ### check for guested configure, otherwise fix possibly relative progname | |
73f1f5ba DZ |
907 | if [ -f ${newsrcdir}/configure ] ; then |
908 | recprog=${newsrcdir}/configure | |
909 | else | |
910 | case "${progname}" in | |
911 | /*) recprog=${progname} ;; | |
912 | *) recprog=../${progname} ;; | |
913 | esac | |
914 | fi | |
4d714963 RP |
915 | |
916 | ### The recursion line is here. | |
73f1f5ba DZ |
917 | if eval ${recprog} ${verbose} --host=${host_alias} --target=${target_alias} \ |
918 | ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \ | |
e5c6be8f | 919 | ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${removing} ${redirect} ; then |
73f1f5ba DZ |
920 | true |
921 | else | |
922 | exit 1 | |
923 | fi | |
924 | ||
925 | cd ${POPDIR} | |
926 | fi | |
927 | done | |
c1e4672c | 928 | fi |
eb02fd64 | 929 | |
eb02fd64 | 930 | exit 0 |
74cc5508 | 931 | |
0df06ca0 RP |
932 | # |
933 | # Local Variables: | |
934 | # fill-column: 131 | |
935 | # End: | |
936 | # | |
74cc5508 | 937 | |
46f3c7cd | 938 | # end of configure |