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