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