Commit | Line | Data |
---|---|---|
15c16493 AC |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
dd442a44 | 4 | # Generated automatically using autoconf version 2.10 |
15c16493 AC |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --enable-sim-bswap Use Host specific BSWAP instruction." | |
16 | ac_help="$ac_help | |
17 | --enable-sim-cflags=opts Extra CFLAGS for use in building simulator" | |
18 | ac_help="$ac_help | |
19 | --enable-sim-debug=opts Enable debugging flags" | |
20 | ac_help="$ac_help | |
21 | --enable-sim-stdio Specify whether to use stdio for console input/output." | |
22 | ac_help="$ac_help | |
23 | --enable-sim-trace=opts Enable tracing flags" | |
dd442a44 DE |
24 | ac_help="$ac_help |
25 | --enable-sim-profile=opts Enable profiling flags" | |
15c16493 AC |
26 | ac_help="$ac_help |
27 | --enable-sim-inline=inlines Specify which functions should be inlined." | |
28 | ac_help="$ac_help | |
29 | --enable-sim-endian=endian Specify target byte endian orientation." | |
30 | ac_help="$ac_help | |
31 | --enable-sim-hostendain=end Specify host byte endian orientation." | |
32 | ac_help="$ac_help | |
33 | --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o" | |
34 | ac_help="$ac_help | |
35 | --enable-sim-reserved-bits Specify whether to check reserved bits in instruction." | |
36 | ||
37 | # Initialize some variables set by options. | |
38 | # The variables have the same names as the options, with | |
39 | # dashes changed to underlines. | |
40 | build=NONE | |
41 | cache_file=./config.cache | |
42 | exec_prefix=NONE | |
43 | host=NONE | |
44 | no_create= | |
45 | nonopt=NONE | |
46 | no_recursion= | |
47 | prefix=NONE | |
48 | program_prefix=NONE | |
49 | program_suffix=NONE | |
50 | program_transform_name=s,x,x, | |
51 | silent= | |
52 | site= | |
53 | srcdir= | |
54 | target=NONE | |
55 | verbose= | |
56 | x_includes=NONE | |
57 | x_libraries=NONE | |
58 | bindir='${exec_prefix}/bin' | |
59 | sbindir='${exec_prefix}/sbin' | |
60 | libexecdir='${exec_prefix}/libexec' | |
61 | datadir='${prefix}/share' | |
62 | sysconfdir='${prefix}/etc' | |
63 | sharedstatedir='${prefix}/com' | |
64 | localstatedir='${prefix}/var' | |
65 | libdir='${exec_prefix}/lib' | |
66 | includedir='${prefix}/include' | |
67 | oldincludedir='/usr/include' | |
68 | infodir='${prefix}/info' | |
69 | mandir='${prefix}/man' | |
70 | ||
71 | # Initialize some other variables. | |
72 | subdirs= | |
73 | MFLAGS= MAKEFLAGS= | |
15c16493 AC |
74 | |
75 | ac_prev= | |
76 | for ac_option | |
77 | do | |
78 | ||
79 | # If the previous option needs an argument, assign it. | |
80 | if test -n "$ac_prev"; then | |
81 | eval "$ac_prev=\$ac_option" | |
82 | ac_prev= | |
83 | continue | |
84 | fi | |
85 | ||
86 | case "$ac_option" in | |
87 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
88 | *) ac_optarg= ;; | |
89 | esac | |
90 | ||
91 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
92 | ||
93 | case "$ac_option" in | |
94 | ||
95 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
96 | ac_prev=bindir ;; | |
97 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
98 | bindir="$ac_optarg" ;; | |
99 | ||
100 | -build | --build | --buil | --bui | --bu) | |
101 | ac_prev=build ;; | |
102 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
103 | build="$ac_optarg" ;; | |
104 | ||
105 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
106 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
107 | ac_prev=cache_file ;; | |
108 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
109 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
110 | cache_file="$ac_optarg" ;; | |
111 | ||
112 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
113 | ac_prev=datadir ;; | |
114 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
115 | | --da=*) | |
116 | datadir="$ac_optarg" ;; | |
117 | ||
118 | -disable-* | --disable-*) | |
119 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
120 | # Reject names that are not valid shell variable names. | |
121 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
122 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
123 | fi | |
124 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
125 | eval "enable_${ac_feature}=no" ;; | |
126 | ||
127 | -enable-* | --enable-*) | |
128 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
129 | # Reject names that are not valid shell variable names. | |
130 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
131 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
132 | fi | |
133 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
134 | case "$ac_option" in | |
135 | *=*) ;; | |
136 | *) ac_optarg=yes ;; | |
137 | esac | |
138 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
139 | ||
140 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
141 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
142 | | --exec | --exe | --ex) | |
143 | ac_prev=exec_prefix ;; | |
144 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
145 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
146 | | --exec=* | --exe=* | --ex=*) | |
147 | exec_prefix="$ac_optarg" ;; | |
148 | ||
149 | -gas | --gas | --ga | --g) | |
150 | # Obsolete; use --with-gas. | |
151 | with_gas=yes ;; | |
152 | ||
153 | -help | --help | --hel | --he) | |
154 | # Omit some internal or obsolete options to make the list less imposing. | |
155 | # This message is too long to be a string in the A/UX 3.1 sh. | |
156 | cat << EOF | |
157 | Usage: configure [options] [host] | |
158 | Options: [defaults in brackets after descriptions] | |
159 | Configuration: | |
160 | --cache-file=FILE cache test results in FILE | |
161 | --help print this message | |
162 | --no-create do not create output files | |
163 | --quiet, --silent do not print \`checking...' messages | |
164 | --version print the version of autoconf that created configure | |
165 | Directory and file names: | |
166 | --prefix=PREFIX install architecture-independent files in PREFIX | |
167 | [$ac_default_prefix] | |
168 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
169 | [same as prefix] | |
170 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
171 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
172 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
173 | --datadir=DIR read-only architecture-independent data in DIR | |
174 | [PREFIX/share] | |
175 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
176 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
177 | [PREFIX/com] | |
178 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
179 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
180 | --includedir=DIR C header files in DIR [PREFIX/include] | |
181 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
182 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
183 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
184 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
185 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
186 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
187 | --program-transform-name=PROGRAM | |
188 | run sed PROGRAM on installed program names | |
189 | EOF | |
190 | cat << EOF | |
191 | Host type: | |
192 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
193 | --host=HOST configure for HOST [guessed] | |
194 | --target=TARGET configure for TARGET [TARGET=HOST] | |
195 | Features and packages: | |
196 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
197 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
198 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
199 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
200 | --x-includes=DIR X include files are in DIR | |
201 | --x-libraries=DIR X library files are in DIR | |
202 | EOF | |
203 | if test -n "$ac_help"; then | |
204 | echo "--enable and --with options recognized:$ac_help" | |
205 | fi | |
206 | exit 0 ;; | |
207 | ||
208 | -host | --host | --hos | --ho) | |
209 | ac_prev=host ;; | |
210 | -host=* | --host=* | --hos=* | --ho=*) | |
211 | host="$ac_optarg" ;; | |
212 | ||
213 | -includedir | --includedir | --includedi | --included | --include \ | |
214 | | --includ | --inclu | --incl | --inc) | |
215 | ac_prev=includedir ;; | |
216 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
217 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
218 | includedir="$ac_optarg" ;; | |
219 | ||
220 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
221 | ac_prev=infodir ;; | |
222 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
223 | infodir="$ac_optarg" ;; | |
224 | ||
225 | -libdir | --libdir | --libdi | --libd) | |
226 | ac_prev=libdir ;; | |
227 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
228 | libdir="$ac_optarg" ;; | |
229 | ||
230 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
231 | | --libexe | --libex | --libe) | |
232 | ac_prev=libexecdir ;; | |
233 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
234 | | --libexe=* | --libex=* | --libe=*) | |
235 | libexecdir="$ac_optarg" ;; | |
236 | ||
237 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
238 | | --localstate | --localstat | --localsta | --localst \ | |
239 | | --locals | --local | --loca | --loc | --lo) | |
240 | ac_prev=localstatedir ;; | |
241 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
242 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
243 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
244 | localstatedir="$ac_optarg" ;; | |
245 | ||
246 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
247 | ac_prev=mandir ;; | |
248 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
249 | mandir="$ac_optarg" ;; | |
250 | ||
251 | -nfp | --nfp | --nf) | |
252 | # Obsolete; use --without-fp. | |
253 | with_fp=no ;; | |
254 | ||
255 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
256 | | --no-cr | --no-c) | |
257 | no_create=yes ;; | |
258 | ||
259 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
260 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
261 | no_recursion=yes ;; | |
262 | ||
263 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
264 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
265 | | --oldin | --oldi | --old | --ol | --o) | |
266 | ac_prev=oldincludedir ;; | |
267 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
268 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
269 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
270 | oldincludedir="$ac_optarg" ;; | |
271 | ||
272 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
273 | ac_prev=prefix ;; | |
274 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
275 | prefix="$ac_optarg" ;; | |
276 | ||
277 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
278 | | --program-pre | --program-pr | --program-p) | |
279 | ac_prev=program_prefix ;; | |
280 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
281 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
282 | program_prefix="$ac_optarg" ;; | |
283 | ||
284 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
285 | | --program-suf | --program-su | --program-s) | |
286 | ac_prev=program_suffix ;; | |
287 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
288 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
289 | program_suffix="$ac_optarg" ;; | |
290 | ||
291 | -program-transform-name | --program-transform-name \ | |
292 | | --program-transform-nam | --program-transform-na \ | |
293 | | --program-transform-n | --program-transform- \ | |
294 | | --program-transform | --program-transfor \ | |
295 | | --program-transfo | --program-transf \ | |
296 | | --program-trans | --program-tran \ | |
297 | | --progr-tra | --program-tr | --program-t) | |
298 | ac_prev=program_transform_name ;; | |
299 | -program-transform-name=* | --program-transform-name=* \ | |
300 | | --program-transform-nam=* | --program-transform-na=* \ | |
301 | | --program-transform-n=* | --program-transform-=* \ | |
302 | | --program-transform=* | --program-transfor=* \ | |
303 | | --program-transfo=* | --program-transf=* \ | |
304 | | --program-trans=* | --program-tran=* \ | |
305 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
306 | program_transform_name="$ac_optarg" ;; | |
307 | ||
308 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
309 | | -silent | --silent | --silen | --sile | --sil) | |
310 | silent=yes ;; | |
311 | ||
312 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
313 | ac_prev=sbindir ;; | |
314 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
315 | | --sbi=* | --sb=*) | |
316 | sbindir="$ac_optarg" ;; | |
317 | ||
318 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
319 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
320 | | --sharedst | --shareds | --shared | --share | --shar \ | |
321 | | --sha | --sh) | |
322 | ac_prev=sharedstatedir ;; | |
323 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
324 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
325 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
326 | | --sha=* | --sh=*) | |
327 | sharedstatedir="$ac_optarg" ;; | |
328 | ||
329 | -site | --site | --sit) | |
330 | ac_prev=site ;; | |
331 | -site=* | --site=* | --sit=*) | |
332 | site="$ac_optarg" ;; | |
333 | ||
334 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
335 | ac_prev=srcdir ;; | |
336 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
337 | srcdir="$ac_optarg" ;; | |
338 | ||
339 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
340 | | --syscon | --sysco | --sysc | --sys | --sy) | |
341 | ac_prev=sysconfdir ;; | |
342 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
343 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
344 | sysconfdir="$ac_optarg" ;; | |
345 | ||
346 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
347 | ac_prev=target ;; | |
348 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
349 | target="$ac_optarg" ;; | |
350 | ||
351 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
352 | verbose=yes ;; | |
353 | ||
354 | -version | --version | --versio | --versi | --vers) | |
dd442a44 | 355 | echo "configure generated by autoconf version 2.10" |
15c16493 AC |
356 | exit 0 ;; |
357 | ||
358 | -with-* | --with-*) | |
359 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
360 | # Reject names that are not valid shell variable names. | |
361 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
362 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
363 | fi | |
364 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
365 | case "$ac_option" in | |
366 | *=*) ;; | |
367 | *) ac_optarg=yes ;; | |
368 | esac | |
369 | eval "with_${ac_package}='$ac_optarg'" ;; | |
370 | ||
371 | -without-* | --without-*) | |
372 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
373 | # Reject names that are not valid shell variable names. | |
374 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
375 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
376 | fi | |
377 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
378 | eval "with_${ac_package}=no" ;; | |
379 | ||
380 | --x) | |
381 | # Obsolete; use --with-x. | |
382 | with_x=yes ;; | |
383 | ||
384 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
385 | | --x-incl | --x-inc | --x-in | --x-i) | |
386 | ac_prev=x_includes ;; | |
387 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
388 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
389 | x_includes="$ac_optarg" ;; | |
390 | ||
391 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
392 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
393 | ac_prev=x_libraries ;; | |
394 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
395 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
396 | x_libraries="$ac_optarg" ;; | |
397 | ||
398 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
399 | ;; | |
400 | ||
401 | *) | |
402 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
403 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
404 | fi | |
405 | if test "x$nonopt" != xNONE; then | |
406 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
407 | fi | |
408 | nonopt="$ac_option" | |
409 | ;; | |
410 | ||
411 | esac | |
412 | done | |
413 | ||
414 | if test -n "$ac_prev"; then | |
415 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
416 | fi | |
417 | ||
418 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
419 | ||
420 | # File descriptor usage: | |
421 | # 0 standard input | |
422 | # 1 file creation | |
423 | # 2 errors and warnings | |
424 | # 3 some systems may open it to /dev/tty | |
425 | # 4 used on the Kubota Titan | |
426 | # 6 checking for... messages and results | |
427 | # 5 compiler messages saved in config.log | |
428 | if test "$silent" = yes; then | |
429 | exec 6>/dev/null | |
430 | else | |
431 | exec 6>&1 | |
432 | fi | |
433 | exec 5>./config.log | |
434 | ||
435 | echo "\ | |
436 | This file contains any messages produced by compilers while | |
437 | running configure, to aid debugging if configure makes a mistake. | |
438 | " 1>&5 | |
439 | ||
440 | # Strip out --no-create and --no-recursion so they do not pile up. | |
441 | # Also quote any args containing shell metacharacters. | |
442 | ac_configure_args= | |
443 | for ac_arg | |
444 | do | |
445 | case "$ac_arg" in | |
446 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
447 | | --no-cr | --no-c) ;; | |
448 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
449 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
450 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
451 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
452 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
453 | esac | |
454 | done | |
455 | ||
456 | # NLS nuisances. | |
dd442a44 DE |
457 | # Only set LANG and LC_ALL to C if already set. |
458 | # These must not be set unconditionally because not all systems understand | |
459 | # e.g. LANG=C (notably SCO). | |
15c16493 | 460 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
dd442a44 | 461 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
15c16493 AC |
462 | |
463 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
464 | rm -rf conftest* confdefs.h | |
465 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
466 | echo > confdefs.h | |
467 | ||
468 | # A filename unique to this package, relative to the directory that | |
469 | # configure is in, which we can look for to find out if srcdir is correct. | |
470 | ac_unique_file=Makefile.in | |
471 | ||
472 | # Find the source files, if location was not specified. | |
473 | if test -z "$srcdir"; then | |
474 | ac_srcdir_defaulted=yes | |
475 | # Try the directory containing this script, then its parent. | |
476 | ac_prog=$0 | |
477 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
478 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
479 | srcdir=$ac_confdir | |
480 | if test ! -r $srcdir/$ac_unique_file; then | |
481 | srcdir=.. | |
482 | fi | |
483 | else | |
484 | ac_srcdir_defaulted=no | |
485 | fi | |
486 | if test ! -r $srcdir/$ac_unique_file; then | |
487 | if test "$ac_srcdir_defaulted" = yes; then | |
488 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
489 | else | |
490 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
491 | fi | |
492 | fi | |
493 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
494 | ||
495 | # Prefer explicitly selected file to automatically selected ones. | |
496 | if test -z "$CONFIG_SITE"; then | |
497 | if test "x$prefix" != xNONE; then | |
498 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
499 | else | |
500 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
501 | fi | |
502 | fi | |
503 | for ac_site_file in $CONFIG_SITE; do | |
504 | if test -r "$ac_site_file"; then | |
505 | echo "loading site script $ac_site_file" | |
506 | . "$ac_site_file" | |
507 | fi | |
508 | done | |
509 | ||
510 | if test -r "$cache_file"; then | |
511 | echo "loading cache $cache_file" | |
512 | . $cache_file | |
513 | else | |
514 | echo "creating cache $cache_file" | |
515 | > $cache_file | |
516 | fi | |
517 | ||
518 | ac_ext=c | |
519 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
520 | ac_cpp='$CPP $CPPFLAGS' | |
521 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
522 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
15c16493 AC |
523 | |
524 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
525 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
526 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
527 | ac_n= ac_c=' | |
528 | ' ac_t=' ' | |
529 | else | |
530 | ac_n=-n ac_c= ac_t= | |
531 | fi | |
532 | else | |
533 | ac_n= ac_c='\c' ac_t= | |
534 | fi | |
535 | ||
536 | ||
537 | ||
538 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
15c16493 AC |
539 | # On Suns, sometimes $CPP names a directory. |
540 | if test -n "$CPP" && test -d "$CPP"; then | |
541 | CPP= | |
542 | fi | |
543 | if test -z "$CPP"; then | |
544 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
545 | echo $ac_n "(cached) $ac_c" 1>&6 | |
546 | else | |
547 | # This must be in double quotes, not single quotes, because CPP may get | |
548 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
549 | CPP="${CC-cc} -E" | |
550 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
551 | # not just through cpp. | |
552 | cat > conftest.$ac_ext <<EOF | |
dd442a44 | 553 | #line 554 "configure" |
15c16493 AC |
554 | #include "confdefs.h" |
555 | #include <assert.h> | |
556 | Syntax Error | |
557 | EOF | |
558 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
dd442a44 | 559 | { (eval echo configure:560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
15c16493 AC |
560 | ac_err=`grep -v '^ *+' conftest.out` |
561 | if test -z "$ac_err"; then | |
562 | : | |
563 | else | |
564 | echo "$ac_err" >&5 | |
15c16493 AC |
565 | rm -rf conftest* |
566 | CPP="${CC-cc} -E -traditional-cpp" | |
567 | cat > conftest.$ac_ext <<EOF | |
dd442a44 | 568 | #line 569 "configure" |
15c16493 AC |
569 | #include "confdefs.h" |
570 | #include <assert.h> | |
571 | Syntax Error | |
572 | EOF | |
573 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
dd442a44 | 574 | { (eval echo configure:575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
15c16493 AC |
575 | ac_err=`grep -v '^ *+' conftest.out` |
576 | if test -z "$ac_err"; then | |
577 | : | |
578 | else | |
579 | echo "$ac_err" >&5 | |
15c16493 AC |
580 | rm -rf conftest* |
581 | CPP=/lib/cpp | |
582 | fi | |
583 | rm -f conftest* | |
584 | fi | |
585 | rm -f conftest* | |
586 | ac_cv_prog_CPP="$CPP" | |
587 | fi | |
588 | CPP="$ac_cv_prog_CPP" | |
589 | else | |
590 | ac_cv_prog_CPP="$CPP" | |
591 | fi | |
592 | echo "$ac_t""$CPP" 1>&6 | |
593 | ||
594 | ||
595 | # autoconf.info says this should be called right after AC_INIT. | |
596 | ||
597 | ||
598 | ac_aux_dir= | |
599 | for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do | |
600 | if test -f $ac_dir/install-sh; then | |
601 | ac_aux_dir=$ac_dir | |
602 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
603 | break | |
604 | elif test -f $ac_dir/install.sh; then | |
605 | ac_aux_dir=$ac_dir | |
606 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
607 | break | |
608 | fi | |
609 | done | |
610 | if test -z "$ac_aux_dir"; then | |
611 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; } | |
612 | fi | |
613 | ac_config_guess=$ac_aux_dir/config.guess | |
614 | ac_config_sub=$ac_aux_dir/config.sub | |
615 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
616 | ||
617 | ||
618 | # Do some error checking and defaulting for the host and target type. | |
619 | # The inputs are: | |
620 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
621 | # | |
622 | # The rules are: | |
623 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
624 | # same time. | |
625 | # 2. Host defaults to nonopt. | |
626 | # 3. If nonopt is not specified, then host defaults to the current host, | |
627 | # as determined by config.guess. | |
628 | # 4. Target and build default to nonopt. | |
629 | # 5. If nonopt is not specified, then target and build default to host. | |
630 | ||
631 | # The aliases save the names the user supplied, while $host etc. | |
632 | # will get canonicalized. | |
633 | case $host---$target---$nonopt in | |
634 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
635 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
636 | esac | |
637 | ||
638 | ||
639 | # Make sure we can run config.sub. | |
640 | if $ac_config_sub sun4 >/dev/null 2>&1; then : | |
641 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
642 | fi | |
643 | ||
644 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
15c16493 AC |
645 | |
646 | host_alias=$host | |
647 | case "$host_alias" in | |
648 | NONE) | |
649 | case $nonopt in | |
650 | NONE) | |
651 | if host_alias=`$ac_config_guess`; then : | |
652 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
653 | fi ;; | |
654 | *) host_alias=$nonopt ;; | |
655 | esac ;; | |
656 | esac | |
657 | ||
658 | host=`$ac_config_sub $host_alias` | |
dd442a44 DE |
659 | host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` |
660 | host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
661 | host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
15c16493 AC |
662 | echo "$ac_t""$host" 1>&6 |
663 | ||
664 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
15c16493 AC |
665 | |
666 | target_alias=$target | |
667 | case "$target_alias" in | |
668 | NONE) | |
669 | case $nonopt in | |
670 | NONE) target_alias=$host_alias ;; | |
671 | *) target_alias=$nonopt ;; | |
672 | esac ;; | |
673 | esac | |
674 | ||
675 | target=`$ac_config_sub $target_alias` | |
dd442a44 DE |
676 | target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` |
677 | target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
678 | target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
15c16493 AC |
679 | echo "$ac_t""$target" 1>&6 |
680 | ||
681 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
15c16493 AC |
682 | |
683 | build_alias=$build | |
684 | case "$build_alias" in | |
685 | NONE) | |
686 | case $nonopt in | |
687 | NONE) build_alias=$host_alias ;; | |
688 | *) build_alias=$nonopt ;; | |
689 | esac ;; | |
690 | esac | |
691 | ||
692 | build=`$ac_config_sub $build_alias` | |
dd442a44 DE |
693 | build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` |
694 | build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
695 | build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
15c16493 AC |
696 | echo "$ac_t""$build" 1>&6 |
697 | ||
698 | test "$host_alias" != "$target_alias" && | |
699 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
700 | NONENONEs,x,x, && | |
701 | program_prefix=${target_alias}- | |
702 | ||
703 | if test "$program_transform_name" = s,x,x,; then | |
704 | program_transform_name= | |
705 | else | |
706 | # Double any \ or $. echo might interpret backslashes. | |
707 | cat <<\EOF_SED > conftestsed | |
708 | s,\\,\\\\,g; s,\$,$$,g | |
709 | EOF_SED | |
710 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
711 | rm -f conftestsed | |
712 | fi | |
713 | test "$program_prefix" != NONE && | |
714 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
715 | # Use a double $ so make ignores it. | |
716 | test "$program_suffix" != NONE && | |
717 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
718 | ||
719 | # sed with no file args requires a program. | |
720 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
721 | ||
722 | # Extract the first word of "gcc", so it can be a program name with args. | |
723 | set dummy gcc; ac_word=$2 | |
724 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
15c16493 AC |
725 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
726 | echo $ac_n "(cached) $ac_c" 1>&6 | |
727 | else | |
728 | if test -n "$CC"; then | |
729 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
730 | else | |
731 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
732 | for ac_dir in $PATH; do | |
733 | test -z "$ac_dir" && ac_dir=. | |
734 | if test -f $ac_dir/$ac_word; then | |
735 | ac_cv_prog_CC="gcc" | |
736 | break | |
737 | fi | |
738 | done | |
739 | IFS="$ac_save_ifs" | |
740 | fi | |
741 | fi | |
742 | CC="$ac_cv_prog_CC" | |
743 | if test -n "$CC"; then | |
744 | echo "$ac_t""$CC" 1>&6 | |
745 | else | |
746 | echo "$ac_t""no" 1>&6 | |
747 | fi | |
748 | ||
749 | if test -z "$CC"; then | |
750 | # Extract the first word of "cc", so it can be a program name with args. | |
751 | set dummy cc; ac_word=$2 | |
752 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
15c16493 AC |
753 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
754 | echo $ac_n "(cached) $ac_c" 1>&6 | |
755 | else | |
756 | if test -n "$CC"; then | |
757 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
758 | else | |
759 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
760 | ac_prog_rejected=no | |
761 | for ac_dir in $PATH; do | |
762 | test -z "$ac_dir" && ac_dir=. | |
763 | if test -f $ac_dir/$ac_word; then | |
764 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
765 | ac_prog_rejected=yes | |
766 | continue | |
767 | fi | |
768 | ac_cv_prog_CC="cc" | |
769 | break | |
770 | fi | |
771 | done | |
772 | IFS="$ac_save_ifs" | |
773 | if test $ac_prog_rejected = yes; then | |
774 | # We found a bogon in the path, so make sure we never use it. | |
775 | set dummy $ac_cv_prog_CC | |
776 | shift | |
777 | if test $# -gt 0; then | |
778 | # We chose a different compiler from the bogus one. | |
779 | # However, it has the same basename, so the bogon will be chosen | |
780 | # first if we set CC to just the basename; use the full file name. | |
781 | shift | |
782 | set dummy "$ac_dir/$ac_word" "$@" | |
783 | shift | |
784 | ac_cv_prog_CC="$@" | |
785 | fi | |
786 | fi | |
787 | fi | |
788 | fi | |
789 | CC="$ac_cv_prog_CC" | |
790 | if test -n "$CC"; then | |
791 | echo "$ac_t""$CC" 1>&6 | |
792 | else | |
793 | echo "$ac_t""no" 1>&6 | |
794 | fi | |
795 | ||
796 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
797 | fi | |
798 | ||
15c16493 | 799 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
15c16493 AC |
800 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
801 | echo $ac_n "(cached) $ac_c" 1>&6 | |
802 | else | |
803 | cat > conftest.c <<EOF | |
804 | #ifdef __GNUC__ | |
805 | yes; | |
806 | #endif | |
807 | EOF | |
dd442a44 | 808 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
15c16493 AC |
809 | ac_cv_prog_gcc=yes |
810 | else | |
811 | ac_cv_prog_gcc=no | |
812 | fi | |
813 | fi | |
814 | ||
815 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
15c16493 AC |
816 | if test $ac_cv_prog_gcc = yes; then |
817 | GCC=yes | |
dd442a44 DE |
818 | if test "${CFLAGS+set}" != set; then |
819 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
820 | if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then | |
15c16493 AC |
821 | echo $ac_n "(cached) $ac_c" 1>&6 |
822 | else | |
823 | echo 'void f(){}' > conftest.c | |
824 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
dd442a44 | 825 | ac_cv_prog_gcc_g=yes |
15c16493 | 826 | else |
dd442a44 | 827 | ac_cv_prog_gcc_g=no |
15c16493 AC |
828 | fi |
829 | rm -f conftest* | |
830 | ||
831 | fi | |
832 | ||
dd442a44 DE |
833 | echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 |
834 | if test $ac_cv_prog_gcc_g = yes; then | |
835 | CFLAGS="-g -O" | |
836 | else | |
837 | CFLAGS="-O" | |
838 | fi | |
15c16493 AC |
839 | fi |
840 | else | |
841 | GCC= | |
842 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
843 | fi | |
844 | ||
845 | # Find a good install program. We prefer a C program (faster), | |
846 | # so one script is as good as another. But avoid the broken or | |
847 | # incompatible versions: | |
848 | # SysV /etc/install, /usr/sbin/install | |
849 | # SunOS /usr/etc/install | |
850 | # IRIX /sbin/install | |
851 | # AIX /bin/install | |
852 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
853 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
854 | # ./install, which can be erroneously created by make from ./install.sh. | |
855 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
15c16493 AC |
856 | if test -z "$INSTALL"; then |
857 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
858 | echo $ac_n "(cached) $ac_c" 1>&6 | |
859 | else | |
dd442a44 | 860 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
15c16493 AC |
861 | for ac_dir in $PATH; do |
862 | # Account for people who put trailing slashes in PATH elements. | |
863 | case "$ac_dir/" in | |
864 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
865 | *) | |
866 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
867 | for ac_prog in ginstall installbsd scoinst install; do | |
868 | if test -f $ac_dir/$ac_prog; then | |
869 | if test $ac_prog = install && | |
870 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
871 | # AIX install. It has an incompatible calling convention. | |
872 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
873 | : | |
874 | else | |
875 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
876 | break 2 | |
877 | fi | |
878 | fi | |
879 | done | |
880 | ;; | |
881 | esac | |
882 | done | |
dd442a44 | 883 | IFS="$ac_save_ifs" |
15c16493 AC |
884 | |
885 | fi | |
886 | if test "${ac_cv_path_install+set}" = set; then | |
887 | INSTALL="$ac_cv_path_install" | |
888 | else | |
889 | # As a last resort, use the slow shell script. We don't cache a | |
890 | # path for INSTALL within a source directory, because that will | |
891 | # break other packages using the cache if that directory is | |
892 | # removed, or if the path is relative. | |
893 | INSTALL="$ac_install_sh" | |
894 | fi | |
895 | fi | |
896 | echo "$ac_t""$INSTALL" 1>&6 | |
897 | ||
898 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
899 | # It thinks the first close brace ends the variable substitution. | |
900 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
901 | ||
902 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
903 | ||
904 | ||
905 | # Put a plausible default for CC_FOR_BUILD in Makefile. | |
906 | if test "x$cross_compiling" = "xno"; then | |
907 | CC_FOR_BUILD='$(CC)' | |
908 | else | |
909 | CC_FOR_BUILD=gcc | |
910 | fi | |
911 | ||
912 | ||
913 | ||
914 | ||
915 | AR=${AR-ar} | |
916 | ||
917 | # Extract the first word of "ranlib", so it can be a program name with args. | |
918 | set dummy ranlib; ac_word=$2 | |
919 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
15c16493 AC |
920 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
921 | echo $ac_n "(cached) $ac_c" 1>&6 | |
922 | else | |
923 | if test -n "$RANLIB"; then | |
924 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
925 | else | |
926 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
927 | for ac_dir in $PATH; do | |
928 | test -z "$ac_dir" && ac_dir=. | |
929 | if test -f $ac_dir/$ac_word; then | |
930 | ac_cv_prog_RANLIB="ranlib" | |
931 | break | |
932 | fi | |
933 | done | |
934 | IFS="$ac_save_ifs" | |
935 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
936 | fi | |
937 | fi | |
938 | RANLIB="$ac_cv_prog_RANLIB" | |
939 | if test -n "$RANLIB"; then | |
940 | echo "$ac_t""$RANLIB" 1>&6 | |
941 | else | |
942 | echo "$ac_t""no" 1>&6 | |
943 | fi | |
944 | ||
945 | ||
946 | # Check for common headers. | |
947 | # FIXME: Seems to me this can cause problems for i386-windows hosts. | |
948 | # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*. | |
949 | for ac_hdr in stdlib.h string.h strings.h unistd.h time.h sys/time.h sys/resource.h | |
950 | do | |
dd442a44 | 951 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` |
15c16493 | 952 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
15c16493 AC |
953 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
954 | echo $ac_n "(cached) $ac_c" 1>&6 | |
955 | else | |
956 | cat > conftest.$ac_ext <<EOF | |
dd442a44 | 957 | #line 958 "configure" |
15c16493 AC |
958 | #include "confdefs.h" |
959 | #include <$ac_hdr> | |
960 | EOF | |
961 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
dd442a44 | 962 | { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
15c16493 AC |
963 | ac_err=`grep -v '^ *+' conftest.out` |
964 | if test -z "$ac_err"; then | |
965 | rm -rf conftest* | |
966 | eval "ac_cv_header_$ac_safe=yes" | |
967 | else | |
968 | echo "$ac_err" >&5 | |
15c16493 AC |
969 | rm -rf conftest* |
970 | eval "ac_cv_header_$ac_safe=no" | |
971 | fi | |
972 | rm -f conftest* | |
973 | fi | |
974 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
975 | echo "$ac_t""yes" 1>&6 | |
dd442a44 | 976 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` |
15c16493 AC |
977 | cat >> confdefs.h <<EOF |
978 | #define $ac_tr_hdr 1 | |
979 | EOF | |
980 | ||
981 | else | |
982 | echo "$ac_t""no" 1>&6 | |
983 | fi | |
984 | done | |
985 | ||
986 | for ac_func in getrusage time | |
987 | do | |
988 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
15c16493 AC |
989 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
990 | echo $ac_n "(cached) $ac_c" 1>&6 | |
991 | else | |
992 | cat > conftest.$ac_ext <<EOF | |
dd442a44 | 993 | #line 994 "configure" |
15c16493 AC |
994 | #include "confdefs.h" |
995 | /* System header to define __stub macros and hopefully few prototypes, | |
996 | which can conflict with char $ac_func(); below. */ | |
997 | #include <assert.h> | |
998 | /* Override any gcc2 internal prototype to avoid an error. */ | |
999 | /* We use char because int might match the return type of a gcc2 | |
1000 | builtin and then its argument prototype would still apply. */ | |
1001 | char $ac_func(); | |
1002 | ||
dd442a44 DE |
1003 | int main() { return 0; } |
1004 | int t() { | |
15c16493 AC |
1005 | |
1006 | /* The GNU C library defines this for functions which it implements | |
1007 | to always fail with ENOSYS. Some functions are actually named | |
1008 | something starting with __ and the normal name is an alias. */ | |
1009 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1010 | choke me | |
1011 | #else | |
1012 | $ac_func(); | |
1013 | #endif | |
1014 | ||
1015 | ; return 0; } | |
1016 | EOF | |
dd442a44 | 1017 | if { (eval echo configure:1018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
15c16493 AC |
1018 | rm -rf conftest* |
1019 | eval "ac_cv_func_$ac_func=yes" | |
1020 | else | |
15c16493 AC |
1021 | rm -rf conftest* |
1022 | eval "ac_cv_func_$ac_func=no" | |
1023 | fi | |
1024 | rm -f conftest* | |
15c16493 | 1025 | |
dd442a44 | 1026 | fi |
15c16493 AC |
1027 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
1028 | echo "$ac_t""yes" 1>&6 | |
1029 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1030 | cat >> confdefs.h <<EOF | |
1031 | #define $ac_tr_func 1 | |
1032 | EOF | |
1033 | ||
1034 | else | |
1035 | echo "$ac_t""no" 1>&6 | |
1036 | fi | |
1037 | done | |
1038 | ||
1039 | ||
1040 | . ${srcdir}/../../bfd/configure.host | |
1041 | ||
1042 | ||
1043 | ||
1044 | # Check whether --enable-sim-bswap or --disable-sim-bswap was given. | |
1045 | if test "${enable_sim_bswap+set}" = set; then | |
1046 | enableval="$enable_sim_bswap" | |
1047 | case "${enableval}" in | |
1048 | yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; | |
1049 | no) sim_bswap="-DWITH_BSWAP=0";; | |
1050 | *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";; | |
1051 | esac | |
1052 | if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then | |
1053 | echo "Setting bswap flags = $sim_bswap" 6>&1 | |
1054 | fi | |
1055 | else | |
1056 | sim_bswap="" | |
1057 | fi | |
1058 | ||
1059 | ||
1060 | ||
1061 | # Check whether --enable-sim-cflags or --disable-sim-cflags was given. | |
1062 | if test "${enable_sim_cflags+set}" = set; then | |
1063 | enableval="$enable_sim_cflags" | |
1064 | case "${enableval}" in | |
1065 | yes) sim_cflags="-O2";; | |
1066 | trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";; | |
1067 | no) sim_cflags="";; | |
1068 | *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
1069 | esac | |
1070 | if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then | |
1071 | echo "Setting sim cflags = $sim_cflags" 6>&1 | |
1072 | fi | |
1073 | else | |
1074 | sim_cflags="" | |
1075 | fi | |
1076 | ||
1077 | ||
1078 | ||
1079 | # Check whether --enable-sim-debug or --disable-sim-debug was given. | |
1080 | if test "${enable_sim_debug+set}" = set; then | |
1081 | enableval="$enable_sim_debug" | |
1082 | case "${enableval}" in | |
1083 | yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";; | |
1084 | no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";; | |
1085 | *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";; | |
1086 | esac | |
1087 | if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then | |
1088 | echo "Setting sim debug = $sim_debug" 6>&1 | |
1089 | fi | |
1090 | else | |
1091 | sim_debug="" | |
1092 | fi | |
1093 | ||
1094 | ||
1095 | ||
1096 | # Check whether --enable-sim-stdio or --disable-sim-stdio was given. | |
1097 | if test "${enable_sim_stdio+set}" = set; then | |
1098 | enableval="$enable_sim_stdio" | |
1099 | case "${enableval}" in | |
1100 | yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; | |
1101 | no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; | |
1102 | *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";; | |
1103 | esac | |
1104 | if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then | |
1105 | echo "Setting stdio flags = $sim_stdio" 6>&1 | |
1106 | fi | |
1107 | else | |
1108 | sim_stdio="" | |
1109 | fi | |
1110 | ||
1111 | ||
1112 | ||
1113 | # Check whether --enable-sim-trace or --disable-sim-trace was given. | |
1114 | if test "${enable_sim_trace+set}" = set; then | |
1115 | enableval="$enable_sim_trace" | |
1116 | case "${enableval}" in | |
dd442a44 | 1117 | yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";; |
15c16493 | 1118 | no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";; |
dd442a44 DE |
1119 | [-0-9]*) |
1120 | sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";; | |
1121 | [a-z]*) | |
1122 | sim_trace="" | |
1123 | for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
1124 | if test x"$sim_trace" = x; then | |
1125 | sim_trace="-DWITH_TRACE='(TRACE_$x" | |
1126 | else | |
1127 | sim_trace="${sim_trace}|TRACE_$x" | |
1128 | fi | |
1129 | done | |
1130 | sim_trace="$sim_trace)'" ;; | |
15c16493 AC |
1131 | esac |
1132 | if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then | |
1133 | echo "Setting sim trace = $sim_trace" 6>&1 | |
1134 | fi | |
1135 | else | |
1136 | sim_trace="" | |
1137 | fi | |
1138 | ||
1139 | ||
1140 | ||
dd442a44 DE |
1141 | # Check whether --enable-sim-profile or --disable-sim-profile was given. |
1142 | if test "${enable_sim_profile+set}" = set; then | |
1143 | enableval="$enable_sim_profile" | |
1144 | case "${enableval}" in | |
1145 | yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";; | |
1146 | no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";; | |
1147 | [-0-9]*) | |
1148 | sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";; | |
1149 | [a-z]*) | |
1150 | sim_profile="" | |
1151 | for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
1152 | if test x"$sim_profile" = x; then | |
1153 | sim_profile="-DWITH_PROFILE='(PROFILE_$x" | |
1154 | else | |
1155 | sim_profile="${sim_profile}|PROFILE_$x" | |
1156 | fi | |
1157 | done | |
1158 | sim_profile="$sim_profile)'" ;; | |
1159 | esac | |
1160 | if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then | |
1161 | echo "Setting sim profile = $sim_profile" 6>&1 | |
1162 | fi | |
1163 | else | |
1164 | sim_profile="" | |
1165 | fi | |
1166 | ||
1167 | ||
1168 | ||
15c16493 | 1169 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
15c16493 AC |
1170 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
1171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1172 | else | |
1173 | cat > conftest.$ac_ext <<EOF | |
dd442a44 | 1174 | #line 1175 "configure" |
15c16493 AC |
1175 | #include "confdefs.h" |
1176 | #include <sys/types.h> | |
1177 | #include <signal.h> | |
1178 | #ifdef signal | |
1179 | #undef signal | |
1180 | #endif | |
1181 | #ifdef __cplusplus | |
1182 | extern "C" void (*signal (int, void (*)(int)))(int); | |
1183 | #else | |
1184 | void (*signal ()) (); | |
1185 | #endif | |
1186 | ||
dd442a44 DE |
1187 | int main() { return 0; } |
1188 | int t() { | |
15c16493 AC |
1189 | int i; |
1190 | ; return 0; } | |
1191 | EOF | |
dd442a44 | 1192 | if { (eval echo configure:1193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
15c16493 AC |
1193 | rm -rf conftest* |
1194 | ac_cv_type_signal=void | |
1195 | else | |
15c16493 AC |
1196 | rm -rf conftest* |
1197 | ac_cv_type_signal=int | |
1198 | fi | |
1199 | rm -f conftest* | |
dd442a44 | 1200 | |
15c16493 AC |
1201 | fi |
1202 | ||
1203 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
1204 | cat >> confdefs.h <<EOF | |
1205 | #define RETSIGTYPE $ac_cv_type_signal | |
1206 | EOF | |
1207 | ||
1208 | ||
1209 | ||
1210 | ||
1211 | sim_link_files= | |
1212 | sim_link_links= | |
1213 | ||
1214 | sim_link_links=tconfig.h | |
1215 | if test -f ${srcdir}/tconfig.in | |
1216 | then | |
1217 | sim_link_files=tconfig.in | |
1218 | else | |
1219 | sim_link_files=../common/tconfig.in | |
1220 | fi | |
1221 | ||
1222 | # targ-vals.def points to the libc macro description file. | |
1223 | case "${target}" in | |
1224 | *-*-*) TARG_VALS_DEF=../common/nltvals.def ;; | |
1225 | esac | |
1226 | sim_link_files="${sim_link_files} ${TARG_VALS_DEF}" | |
1227 | sim_link_links="${sim_link_links} targ-vals.def" | |
1228 | ||
1229 | ||
1230 | ||
1231 | ||
1232 | default_sim_inline="-DDEFAULT_INLINE=0" | |
1233 | # Check whether --enable-sim-inline or --disable-sim-inline was given. | |
1234 | if test "${enable_sim_inline+set}" = set; then | |
1235 | enableval="$enable_sim_inline" | |
1236 | sim_inline="" | |
1237 | case "$enableval" in | |
1238 | no) sim_inline="-DDEFAULT_INLINE=0";; | |
1239 | 0) sim_inline="-DDEFAULT_INLINE=0";; | |
1240 | yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";; | |
1241 | 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";; | |
1242 | *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do | |
1243 | new_flag="" | |
1244 | case "$x" in | |
1245 | *_INLINE=*) new_flag="-D$x";; | |
1246 | *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;; | |
1247 | *_INLINE) new_flag="-D$x=ALL_INLINE";; | |
1248 | *) new_flag="-D$x""_INLINE=ALL_INLINE";; | |
1249 | esac | |
1250 | if test x"$sim_inline" = x""; then | |
1251 | sim_inline="$new_flag" | |
1252 | else | |
1253 | sim_inline="$sim_inline $new_flag" | |
1254 | fi | |
1255 | done;; | |
1256 | esac | |
1257 | if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then | |
1258 | echo "Setting inline flags = $sim_inline" 6>&1 | |
1259 | fi | |
1260 | else | |
1261 | if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then | |
1262 | sim_inline="${default_sim_inline}" | |
1263 | if test x"$silent" != x"yes"; then | |
1264 | echo "Setting inline flags = $sim_inline" 6>&1 | |
1265 | fi | |
1266 | else | |
1267 | sim_inline="" | |
1268 | fi | |
1269 | fi | |
1270 | ||
1271 | ||
1272 | ||
1273 | default_sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN" | |
1274 | # Check whether --enable-sim-endian or --disable-sim-endian was given. | |
1275 | if test "${enable_sim_endian+set}" = set; then | |
1276 | enableval="$enable_sim_endian" | |
1277 | case "${enableval}" in | |
1278 | yes) case "$target" in | |
1279 | *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
1280 | *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
1281 | *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; | |
1282 | esac;; | |
1283 | no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";; | |
1284 | b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; | |
1285 | l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; | |
1286 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";; | |
1287 | esac | |
1288 | if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then | |
1289 | echo "Setting endian flags = $sim_endian" 6>&1 | |
1290 | fi | |
1291 | else | |
1292 | sim_endian="${default_sim_endian}" | |
1293 | fi | |
1294 | ||
1295 | ||
dd442a44 DE |
1296 | # If we cannot run a trivial program, we must be cross compiling. |
1297 | echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 | |
1298 | if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then | |
1299 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1300 | else | |
1301 | if test "$cross_compiling" = yes; then | |
1302 | ac_cv_c_cross=yes | |
1303 | else | |
1304 | cat > conftest.$ac_ext <<EOF | |
1305 | #line 1306 "configure" | |
1306 | #include "confdefs.h" | |
1307 | main(){return(0);} | |
1308 | EOF | |
1309 | { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } | |
1310 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
1311 | ac_cv_c_cross=no | |
1312 | else | |
1313 | ac_cv_c_cross=yes | |
1314 | fi | |
1315 | fi | |
1316 | rm -fr conftest* | |
1317 | fi | |
1318 | ||
1319 | echo "$ac_t""$ac_cv_c_cross" 1>&6 | |
1320 | cross_compiling=$ac_cv_c_cross | |
1321 | ||
15c16493 AC |
1322 | |
1323 | # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given. | |
1324 | if test "${enable_sim_hostendian+set}" = set; then | |
1325 | enableval="$enable_sim_hostendian" | |
1326 | case "${enableval}" in | |
1327 | no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; | |
1328 | b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; | |
1329 | l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; | |
1330 | *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";; | |
1331 | esac | |
1332 | if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then | |
1333 | echo "Setting hostendian flags = $sim_hostendian" 6>&1 | |
1334 | fi | |
1335 | else | |
1336 | ||
1337 | if test "x$cross_compiling" = "xno"; then | |
1338 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 | |
15c16493 AC |
1339 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
1340 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1341 | else | |
1342 | ac_cv_c_bigendian=unknown | |
1343 | # See if sys/param.h defines the BYTE_ORDER macro. | |
1344 | cat > conftest.$ac_ext <<EOF | |
dd442a44 | 1345 | #line 1346 "configure" |
15c16493 AC |
1346 | #include "confdefs.h" |
1347 | #include <sys/types.h> | |
1348 | #include <sys/param.h> | |
dd442a44 DE |
1349 | int main() { return 0; } |
1350 | int t() { | |
15c16493 AC |
1351 | |
1352 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN | |
1353 | bogus endian macros | |
1354 | #endif | |
1355 | ; return 0; } | |
1356 | EOF | |
dd442a44 | 1357 | if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
15c16493 AC |
1358 | rm -rf conftest* |
1359 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
1360 | cat > conftest.$ac_ext <<EOF | |
dd442a44 | 1361 | #line 1362 "configure" |
15c16493 AC |
1362 | #include "confdefs.h" |
1363 | #include <sys/types.h> | |
1364 | #include <sys/param.h> | |
dd442a44 DE |
1365 | int main() { return 0; } |
1366 | int t() { | |
15c16493 AC |
1367 | |
1368 | #if BYTE_ORDER != BIG_ENDIAN | |
1369 | not big endian | |
1370 | #endif | |
1371 | ; return 0; } | |
1372 | EOF | |
dd442a44 | 1373 | if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
15c16493 AC |
1374 | rm -rf conftest* |
1375 | ac_cv_c_bigendian=yes | |
1376 | else | |
15c16493 AC |
1377 | rm -rf conftest* |
1378 | ac_cv_c_bigendian=no | |
1379 | fi | |
1380 | rm -f conftest* | |
dd442a44 | 1381 | |
15c16493 AC |
1382 | fi |
1383 | rm -f conftest* | |
dd442a44 | 1384 | |
15c16493 AC |
1385 | if test $ac_cv_c_bigendian = unknown; then |
1386 | if test "$cross_compiling" = yes; then | |
1387 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } | |
1388 | else | |
dd442a44 DE |
1389 | cat > conftest.$ac_ext <<EOF |
1390 | #line 1391 "configure" | |
15c16493 AC |
1391 | #include "confdefs.h" |
1392 | main () { | |
1393 | /* Are we little or big endian? From Harbison&Steele. */ | |
1394 | union | |
1395 | { | |
1396 | long l; | |
1397 | char c[sizeof (long)]; | |
1398 | } u; | |
1399 | u.l = 1; | |
1400 | exit (u.c[sizeof (long) - 1] == 1); | |
1401 | } | |
1402 | EOF | |
dd442a44 DE |
1403 | { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } |
1404 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
15c16493 AC |
1405 | ac_cv_c_bigendian=no |
1406 | else | |
15c16493 AC |
1407 | ac_cv_c_bigendian=yes |
1408 | fi | |
15c16493 | 1409 | fi |
dd442a44 | 1410 | rm -fr conftest* |
15c16493 AC |
1411 | fi |
1412 | fi | |
1413 | ||
1414 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
1415 | if test $ac_cv_c_bigendian = yes; then | |
1416 | cat >> confdefs.h <<\EOF | |
1417 | #define WORDS_BIGENDIAN 1 | |
1418 | EOF | |
1419 | ||
1420 | fi | |
1421 | ||
1422 | if test $ac_cv_c_bigendian = yes; then | |
1423 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" | |
1424 | else | |
1425 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" | |
1426 | fi | |
1427 | else | |
1428 | sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" | |
1429 | fi | |
1430 | fi | |
1431 | ||
1432 | ||
1433 | ||
1434 | # Check whether --enable-sim-warnings or --disable-sim-warnings was given. | |
1435 | if test "${enable_sim_warnings+set}" = set; then | |
1436 | enableval="$enable_sim_warnings" | |
1437 | case "${enableval}" in | |
1438 | yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";; | |
1439 | no) sim_warnings="-w";; | |
1440 | *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
1441 | esac | |
1442 | if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then | |
1443 | echo "Setting warning flags = $sim_warnings" 6>&1 | |
1444 | fi | |
1445 | else | |
1446 | sim_warnings="" | |
1447 | fi | |
1448 | ||
1449 | ||
1450 | ||
1451 | default_sim_reserved_bits="1" | |
1452 | # Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given. | |
1453 | if test "${enable_sim_reserved_bits+set}" = set; then | |
1454 | enableval="$enable_sim_reserved_bits" | |
1455 | case "${enableval}" in | |
1456 | yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";; | |
1457 | no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";; | |
1458 | *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";; | |
1459 | esac | |
1460 | if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then | |
1461 | echo "Setting reserved flags = $sim_reserved_bits" 6>&1 | |
1462 | fi | |
1463 | else | |
1464 | sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}" | |
1465 | fi | |
1466 | ||
1467 | ||
1468 | ||
1469 | for ac_hdr in stdlib.h unistd.h string.h strings.h | |
1470 | do | |
dd442a44 | 1471 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` |
15c16493 | 1472 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
15c16493 AC |
1473 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1475 | else | |
1476 | cat > conftest.$ac_ext <<EOF | |
dd442a44 | 1477 | #line 1478 "configure" |
15c16493 AC |
1478 | #include "confdefs.h" |
1479 | #include <$ac_hdr> | |
1480 | EOF | |
1481 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
dd442a44 | 1482 | { (eval echo configure:1483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
15c16493 AC |
1483 | ac_err=`grep -v '^ *+' conftest.out` |
1484 | if test -z "$ac_err"; then | |
1485 | rm -rf conftest* | |
1486 | eval "ac_cv_header_$ac_safe=yes" | |
1487 | else | |
1488 | echo "$ac_err" >&5 | |
15c16493 AC |
1489 | rm -rf conftest* |
1490 | eval "ac_cv_header_$ac_safe=no" | |
1491 | fi | |
1492 | rm -f conftest* | |
1493 | fi | |
1494 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1495 | echo "$ac_t""yes" 1>&6 | |
dd442a44 | 1496 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` |
15c16493 AC |
1497 | cat >> confdefs.h <<EOF |
1498 | #define $ac_tr_hdr 1 | |
1499 | EOF | |
1500 | ||
1501 | else | |
1502 | echo "$ac_t""no" 1>&6 | |
1503 | fi | |
1504 | done | |
1505 | ||
1506 | ||
1507 | ||
1508 | ||
1509 | ||
1510 | trap '' 1 2 15 | |
1511 | cat > confcache <<\EOF | |
1512 | # This file is a shell script that caches the results of configure | |
1513 | # tests run on this system so they can be shared between configure | |
1514 | # scripts and configure runs. It is not useful on other systems. | |
1515 | # If it contains results you don't want to keep, you may remove or edit it. | |
1516 | # | |
1517 | # By default, configure uses ./config.cache as the cache file, | |
1518 | # creating it if it does not exist already. You can give configure | |
1519 | # the --cache-file=FILE option to use a different cache file; that is | |
1520 | # what configure does when it calls configure scripts in | |
1521 | # subdirectories, so they share the cache. | |
1522 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
1523 | # config.status only pays attention to the cache file if you give it the | |
1524 | # --recheck option to rerun configure. | |
1525 | # | |
1526 | EOF | |
15c16493 AC |
1527 | # Ultrix sh set writes to stderr and can't be redirected directly, |
1528 | # and sets the high bit in the cache file unless we assign to the vars. | |
1529 | (set) 2>&1 | | |
dd442a44 DE |
1530 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ |
1531 | >> confcache | |
15c16493 AC |
1532 | if cmp -s $cache_file confcache; then |
1533 | : | |
1534 | else | |
1535 | if test -w $cache_file; then | |
1536 | echo "updating cache $cache_file" | |
1537 | cat confcache > $cache_file | |
1538 | else | |
1539 | echo "not updating unwritable cache $cache_file" | |
1540 | fi | |
1541 | fi | |
1542 | rm -f confcache | |
1543 | ||
1544 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
1545 | ||
1546 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
1547 | # Let make expand exec_prefix. | |
1548 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
1549 | ||
1550 | # Any assignment to VPATH causes Sun make to only execute | |
1551 | # the first set of double-colon rules, so remove it if not needed. | |
1552 | # If there is a colon in the path, we need to keep it. | |
1553 | if test "x$srcdir" = x.; then | |
1554 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
1555 | fi | |
1556 | ||
1557 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
1558 | ||
1559 | DEFS=-DHAVE_CONFIG_H | |
1560 | ||
1561 | # Without the "./", some shells look in PATH for config.status. | |
1562 | : ${CONFIG_STATUS=./config.status} | |
1563 | ||
1564 | echo creating $CONFIG_STATUS | |
1565 | rm -f $CONFIG_STATUS | |
1566 | cat > $CONFIG_STATUS <<EOF | |
1567 | #! /bin/sh | |
1568 | # Generated automatically by configure. | |
1569 | # Run this file to recreate the current configuration. | |
1570 | # This directory was configured as follows, | |
1571 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
1572 | # | |
1573 | # $0 $ac_configure_args | |
1574 | # | |
1575 | # Compiler output produced by configure, useful for debugging | |
1576 | # configure, is in ./config.log if it exists. | |
1577 | ||
1578 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
1579 | for ac_option | |
1580 | do | |
1581 | case "\$ac_option" in | |
1582 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
1583 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
1584 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
1585 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
dd442a44 | 1586 | echo "$CONFIG_STATUS generated by autoconf version 2.10" |
15c16493 AC |
1587 | exit 0 ;; |
1588 | -help | --help | --hel | --he | --h) | |
1589 | echo "\$ac_cs_usage"; exit 0 ;; | |
1590 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
1591 | esac | |
1592 | done | |
1593 | ||
1594 | ac_given_srcdir=$srcdir | |
1595 | ac_given_INSTALL="$INSTALL" | |
1596 | ||
1597 | trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
1598 | EOF | |
1599 | cat >> $CONFIG_STATUS <<EOF | |
1600 | ||
1601 | # Protect against being on the right side of a sed subst in config.status. | |
1602 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
1603 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
1604 | $ac_vpsub | |
1605 | $extrasub | |
1606 | s%@CFLAGS@%$CFLAGS%g | |
1607 | s%@CPPFLAGS@%$CPPFLAGS%g | |
1608 | s%@CXXFLAGS@%$CXXFLAGS%g | |
1609 | s%@DEFS@%$DEFS%g | |
1610 | s%@LDFLAGS@%$LDFLAGS%g | |
1611 | s%@LIBS@%$LIBS%g | |
1612 | s%@exec_prefix@%$exec_prefix%g | |
1613 | s%@prefix@%$prefix%g | |
1614 | s%@program_transform_name@%$program_transform_name%g | |
1615 | s%@bindir@%$bindir%g | |
1616 | s%@sbindir@%$sbindir%g | |
1617 | s%@libexecdir@%$libexecdir%g | |
1618 | s%@datadir@%$datadir%g | |
1619 | s%@sysconfdir@%$sysconfdir%g | |
1620 | s%@sharedstatedir@%$sharedstatedir%g | |
1621 | s%@localstatedir@%$localstatedir%g | |
1622 | s%@libdir@%$libdir%g | |
1623 | s%@includedir@%$includedir%g | |
1624 | s%@oldincludedir@%$oldincludedir%g | |
1625 | s%@infodir@%$infodir%g | |
1626 | s%@mandir@%$mandir%g | |
1627 | s%@host@%$host%g | |
1628 | s%@host_alias@%$host_alias%g | |
1629 | s%@host_cpu@%$host_cpu%g | |
1630 | s%@host_vendor@%$host_vendor%g | |
1631 | s%@host_os@%$host_os%g | |
1632 | s%@target@%$target%g | |
1633 | s%@target_alias@%$target_alias%g | |
1634 | s%@target_cpu@%$target_cpu%g | |
1635 | s%@target_vendor@%$target_vendor%g | |
1636 | s%@target_os@%$target_os%g | |
1637 | s%@build@%$build%g | |
1638 | s%@build_alias@%$build_alias%g | |
1639 | s%@build_cpu@%$build_cpu%g | |
1640 | s%@build_vendor@%$build_vendor%g | |
1641 | s%@build_os@%$build_os%g | |
1642 | s%@CC@%$CC%g | |
1643 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
1644 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
1645 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g | |
1646 | s%@HDEFINES@%$HDEFINES%g | |
1647 | s%@AR@%$AR%g | |
1648 | s%@RANLIB@%$RANLIB%g | |
1649 | s%@CPP@%$CPP%g | |
1650 | s%@sim_bswap@%$sim_bswap%g | |
1651 | s%@sim_cflags@%$sim_cflags%g | |
1652 | s%@sim_debug@%$sim_debug%g | |
1653 | s%@sim_stdio@%$sim_stdio%g | |
1654 | s%@sim_trace@%$sim_trace%g | |
dd442a44 | 1655 | s%@sim_profile@%$sim_profile%g |
15c16493 AC |
1656 | s%@sim_inline@%$sim_inline%g |
1657 | s%@sim_endian@%$sim_endian%g | |
1658 | s%@sim_hostendian@%$sim_hostendian%g | |
1659 | s%@sim_warnings@%$sim_warnings%g | |
1660 | s%@sim_reserved_bits@%$sim_reserved_bits%g | |
1661 | ||
1662 | CEOF | |
1663 | EOF | |
15c16493 AC |
1664 | cat >> $CONFIG_STATUS <<EOF |
1665 | ||
1666 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in"} | |
1667 | EOF | |
1668 | cat >> $CONFIG_STATUS <<\EOF | |
1669 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
dd442a44 | 1670 | # Support "outfile[:infile]", defaulting infile="outfile.in". |
15c16493 | 1671 | case "$ac_file" in |
dd442a44 | 1672 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` |
15c16493 AC |
1673 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
1674 | *) ac_file_in="${ac_file}.in" ;; | |
1675 | esac | |
1676 | ||
dd442a44 | 1677 | # Adjust relative srcdir, etc. for subdirectories. |
15c16493 AC |
1678 | |
1679 | # Remove last slash and all that follows it. Not all systems have dirname. | |
1680 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
1681 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
1682 | # The file is in a subdirectory. | |
1683 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
1684 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
1685 | # A "../" for each directory in $ac_dir_suffix. | |
1686 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
1687 | else | |
1688 | ac_dir_suffix= ac_dots= | |
1689 | fi | |
1690 | ||
1691 | case "$ac_given_srcdir" in | |
1692 | .) srcdir=. | |
1693 | if test -z "$ac_dots"; then top_srcdir=. | |
1694 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
1695 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
1696 | *) # Relative path. | |
1697 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
1698 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
1699 | esac | |
1700 | ||
1701 | case "$ac_given_INSTALL" in | |
1702 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
1703 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
1704 | esac | |
15c16493 AC |
1705 | echo creating "$ac_file" |
1706 | rm -f "$ac_file" | |
1707 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
1708 | case "$ac_file" in | |
1709 | *Makefile*) ac_comsub="1i\\ | |
1710 | # $configure_input" ;; | |
1711 | *) ac_comsub= ;; | |
1712 | esac | |
15c16493 AC |
1713 | sed -e "$ac_comsub |
1714 | s%@configure_input@%$configure_input%g | |
1715 | s%@srcdir@%$srcdir%g | |
1716 | s%@top_srcdir@%$top_srcdir%g | |
1717 | s%@INSTALL@%$INSTALL%g | |
dd442a44 | 1718 | " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file |
15c16493 | 1719 | fi; done |
dd442a44 | 1720 | rm -f conftest.subs |
15c16493 AC |
1721 | |
1722 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
1723 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
1724 | # | |
1725 | # ac_d sets the value in "#define NAME VALUE" lines. | |
1726 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
1727 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
1728 | ac_dC='\3' | |
1729 | ac_dD='%g' | |
1730 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
1731 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1732 | ac_uB='\([ ]\)%\1#\2define\3' | |
1733 | ac_uC=' ' | |
1734 | ac_uD='\4%g' | |
1735 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
1736 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1737 | ac_eB='$%\1#\2define\3' | |
1738 | ac_eC=' ' | |
1739 | ac_eD='%g' | |
1740 | ||
dd442a44 | 1741 | CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"} |
15c16493 | 1742 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
dd442a44 | 1743 | # Support "outfile[:infile]", defaulting infile="outfile.in". |
15c16493 | 1744 | case "$ac_file" in |
dd442a44 | 1745 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` |
15c16493 AC |
1746 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
1747 | *) ac_file_in="${ac_file}.in" ;; | |
1748 | esac | |
1749 | ||
1750 | echo creating $ac_file | |
1751 | ||
1752 | rm -f conftest.frag conftest.in conftest.out | |
dd442a44 | 1753 | cp $ac_given_srcdir/$ac_file_in conftest.in |
15c16493 AC |
1754 | |
1755 | EOF | |
1756 | ||
1757 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
1758 | # the proper values into config.h.in to produce config.h. And first: | |
1759 | # Protect against being on the right side of a sed subst in config.status. | |
1760 | # Protect against being in an unquoted here document in config.status. | |
1761 | rm -f conftest.vals | |
1762 | cat > conftest.hdr <<\EOF | |
1763 | s/[\\&%]/\\&/g | |
1764 | s%[\\$`]%\\&%g | |
1765 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
1766 | s%ac_d%ac_u%gp | |
1767 | s%ac_u%ac_e%gp | |
1768 | EOF | |
1769 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
1770 | rm -f conftest.hdr | |
1771 | ||
1772 | # This sed command replaces #undef with comments. This is necessary, for | |
1773 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
1774 | # on some systems where configure will not decide to define it. | |
1775 | cat >> conftest.vals <<\EOF | |
1776 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
1777 | EOF | |
1778 | ||
1779 | # Break up conftest.vals because some shells have a limit on | |
1780 | # the size of here documents, and old seds have small limits too. | |
dd442a44 DE |
1781 | # Maximum number of lines to put in a single here document. |
1782 | ac_max_here_lines=12 | |
15c16493 AC |
1783 | |
1784 | rm -f conftest.tail | |
1785 | while : | |
1786 | do | |
1787 | ac_lines=`grep -c . conftest.vals` | |
1788 | # grep -c gives empty output for an empty file on some AIX systems. | |
1789 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
1790 | # Write a limited-size here document to conftest.frag. | |
1791 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
1792 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
1793 | echo 'CEOF | |
1794 | sed -f conftest.frag conftest.in > conftest.out | |
1795 | rm -f conftest.in | |
1796 | mv conftest.out conftest.in | |
1797 | ' >> $CONFIG_STATUS | |
1798 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
1799 | rm -f conftest.vals | |
1800 | mv conftest.tail conftest.vals | |
1801 | done | |
1802 | rm -f conftest.vals | |
1803 | ||
1804 | cat >> $CONFIG_STATUS <<\EOF | |
1805 | rm -f conftest.frag conftest.h | |
1806 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
1807 | cat conftest.in >> conftest.h | |
1808 | rm -f conftest.in | |
1809 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
1810 | echo "$ac_file is unchanged" | |
1811 | rm -f conftest.h | |
1812 | else | |
1813 | # Remove last slash and all that follows it. Not all systems have dirname. | |
1814 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
1815 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
1816 | # The file is in a subdirectory. | |
1817 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
1818 | fi | |
1819 | rm -f $ac_file | |
1820 | mv conftest.h $ac_file | |
1821 | fi | |
1822 | fi; done | |
1823 | ||
1824 | EOF | |
1825 | ||
1826 | cat >> $CONFIG_STATUS <<EOF | |
1827 | ac_sources="$sim_link_files" | |
1828 | ac_dests="$sim_link_links" | |
1829 | EOF | |
1830 | ||
1831 | cat >> $CONFIG_STATUS <<\EOF | |
1832 | srcdir=$ac_given_srcdir | |
1833 | while test -n "$ac_sources"; do | |
1834 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
1835 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
1836 | ||
1837 | echo "linking $srcdir/$ac_source to $ac_dest" | |
1838 | ||
1839 | if test ! -r $srcdir/$ac_source; then | |
1840 | { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } | |
1841 | fi | |
1842 | rm -f $ac_dest | |
1843 | ||
1844 | # Make relative symlinks. | |
1845 | # Remove last slash and all that follows it. Not all systems have dirname. | |
1846 | ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` | |
1847 | if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then | |
1848 | # The dest file is in a subdirectory. | |
1849 | test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" | |
1850 | ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" | |
1851 | # A "../" for each directory in $ac_dest_dir_suffix. | |
1852 | ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` | |
1853 | else | |
1854 | ac_dest_dir_suffix= ac_dots= | |
1855 | fi | |
1856 | ||
1857 | case "$srcdir" in | |
1858 | [/$]*) ac_rel_source="$srcdir/$ac_source" ;; | |
1859 | *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; | |
1860 | esac | |
1861 | ||
1862 | # Make a symlink if possible; otherwise try a hard link. | |
1863 | if ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
1864 | ln $srcdir/$ac_source $ac_dest; then : | |
1865 | else | |
1866 | { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } | |
1867 | fi | |
1868 | done | |
15c16493 | 1869 | |
15c16493 AC |
1870 | case "x$CONFIG_FILES" in xMakefile*) |
1871 | echo "Merging Makefile.sim+Make-common.sim into Makefile ..." | |
1872 | rm -f Makesim1.tmp Makesim2.tmp Makefile | |
1873 | sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp | |
1874 | sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp | |
1875 | sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \ | |
1876 | -e '/^## COMMON_POST_/ r Makesim2.tmp' \ | |
1877 | <Makefile.sim >Makefile | |
1878 | rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp | |
1879 | ;; | |
1880 | esac | |
1881 | case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac | |
1882 | ||
1883 | exit 0 | |
1884 | EOF | |
1885 | chmod +x $CONFIG_STATUS | |
1886 | rm -fr confdefs* $ac_clean_files | |
1887 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
1888 | ||
1889 |