* configure.in (mips*-*-*): Added "mips" simulator target.
[deliverable/binutils-gdb.git] / sim / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.4.2
5 # Copyright (C) 1992, 1993, 1994 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
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
48
49 # Initialize some other variables.
50 subdirs=
51
52 ac_prev=
53 for ac_option
54 do
55
56 # If the previous option needs an argument, assign it.
57 if test -n "$ac_prev"; then
58 eval "$ac_prev=\$ac_option"
59 ac_prev=
60 continue
61 fi
62
63 case "$ac_option" in
64 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
65 *) ac_optarg= ;;
66 esac
67
68 # Accept the important Cygnus configure options, so we can diagnose typos.
69
70 case "$ac_option" in
71
72 -bindir | --bindir | --bindi | --bind | --bin | --bi)
73 ac_prev=bindir ;;
74 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
75 bindir="$ac_optarg" ;;
76
77 -build | --build | --buil | --bui | --bu)
78 ac_prev=build ;;
79 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
80 build="$ac_optarg" ;;
81
82 -cache-file | --cache-file | --cache-fil | --cache-fi \
83 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
84 ac_prev=cache_file ;;
85 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
86 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
87 cache_file="$ac_optarg" ;;
88
89 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
90 ac_prev=datadir ;;
91 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
92 | --da=*)
93 datadir="$ac_optarg" ;;
94
95 -disable-* | --disable-*)
96 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
97 # Reject names that are not valid shell variable names.
98 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
99 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
100 fi
101 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
102 eval "enable_${ac_feature}=no" ;;
103
104 -enable-* | --enable-*)
105 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
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 case "$ac_option" in
112 *=*) ;;
113 *) ac_optarg=yes ;;
114 esac
115 eval "enable_${ac_feature}='$ac_optarg'" ;;
116
117 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
118 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
119 | --exec | --exe | --ex)
120 ac_prev=exec_prefix ;;
121 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
122 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
123 | --exec=* | --exe=* | --ex=*)
124 exec_prefix="$ac_optarg" ;;
125
126 -gas | --gas | --ga | --g)
127 # Obsolete; use --with-gas.
128 with_gas=yes ;;
129
130 -help | --help | --hel | --he)
131 # Omit some internal or obsolete options to make the list less imposing.
132 # This message is too long to be a string in the A/UX 3.1 sh.
133 cat << EOF
134 Usage: configure [options] [host]
135 Options: [defaults in brackets after descriptions]
136 Configuration:
137 --cache-file=FILE cache test results in FILE
138 --help print this message
139 --no-create do not create output files
140 --quiet, --silent do not print \`checking...' messages
141 --version print the version of autoconf that created configure
142 Directory and file names:
143 --prefix=PREFIX install architecture-independent files in PREFIX
144 [$ac_default_prefix]
145 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
146 [same as prefix]
147 --bindir=DIR user executables in DIR [EPREFIX/bin]
148 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
149 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
150 --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share]
151 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
152 --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com]
153 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
154 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
155 --includedir=DIR C header files in DIR [PREFIX/include]
156 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
157 --infodir=DIR info documentation in DIR [PREFIX/info]
158 --mandir=DIR man documentation in DIR [PREFIX/man]
159 --srcdir=DIR find the sources in DIR [configure dir or ..]
160 --program-prefix=PREFIX prepend PREFIX to installed program names
161 --program-suffix=SUFFIX append SUFFIX to installed program names
162 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
163 EOF
164 cat << EOF
165 Host type:
166 --build=BUILD configure for building on BUILD [BUILD=HOST]
167 --host=HOST configure for HOST [guessed]
168 --target=TARGET configure for TARGET [TARGET=HOST]
169 Features and packages:
170 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
171 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
172 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
173 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
174 --x-includes=DIR X include files are in DIR
175 --x-libraries=DIR X library files are in DIR
176 --enable and --with options recognized:$ac_help
177 EOF
178 exit 0 ;;
179
180 -host | --host | --hos | --ho)
181 ac_prev=host ;;
182 -host=* | --host=* | --hos=* | --ho=*)
183 host="$ac_optarg" ;;
184
185 -includedir | --includedir | --includedi | --included | --include \
186 | --includ | --inclu | --incl | --inc)
187 ac_prev=includedir ;;
188 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
189 | --includ=* | --inclu=* | --incl=* | --inc=*)
190 includedir="$ac_optarg" ;;
191
192 -infodir | --infodir | --infodi | --infod | --info | --inf)
193 ac_prev=infodir ;;
194 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
195 infodir="$ac_optarg" ;;
196
197 -libdir | --libdir | --libdi | --libd)
198 ac_prev=libdir ;;
199 -libdir=* | --libdir=* | --libdi=* | --libd=*)
200 libdir="$ac_optarg" ;;
201
202 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
203 | --libexe | --libex | --libe)
204 ac_prev=libexecdir ;;
205 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
206 | --libexe=* | --libex=* | --libe=*)
207 libexecdir="$ac_optarg" ;;
208
209 -localstatedir | --localstatedir | --localstatedi | --localstated \
210 | --localstate | --localstat | --localsta | --localst \
211 | --locals | --local | --loca | --loc | --lo)
212 ac_prev=localstatedir ;;
213 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
214 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
215 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
216 localstatedir="$ac_optarg" ;;
217
218 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
219 ac_prev=mandir ;;
220 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
221 mandir="$ac_optarg" ;;
222
223 -nfp | --nfp | --nf)
224 # Obsolete; use --without-fp.
225 with_fp=no ;;
226
227 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
228 | --no-cr | --no-c)
229 no_create=yes ;;
230
231 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
232 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
233 no_recursion=yes ;;
234
235 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
236 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
237 | --oldin | --oldi | --old | --ol | --o)
238 ac_prev=oldincludedir ;;
239 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
240 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
241 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
242 oldincludedir="$ac_optarg" ;;
243
244 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
245 ac_prev=prefix ;;
246 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
247 prefix="$ac_optarg" ;;
248
249 -program-prefix | --program-prefix | --program-prefi | --program-pref \
250 | --program-pre | --program-pr | --program-p)
251 ac_prev=program_prefix ;;
252 -program-prefix=* | --program-prefix=* | --program-prefi=* \
253 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
254 program_prefix="$ac_optarg" ;;
255
256 -program-suffix | --program-suffix | --program-suffi | --program-suff \
257 | --program-suf | --program-su | --program-s)
258 ac_prev=program_suffix ;;
259 -program-suffix=* | --program-suffix=* | --program-suffi=* \
260 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
261 program_suffix="$ac_optarg" ;;
262
263 -program-transform-name | --program-transform-name \
264 | --program-transform-nam | --program-transform-na \
265 | --program-transform-n | --program-transform- \
266 | --program-transform | --program-transfor \
267 | --program-transfo | --program-transf \
268 | --program-trans | --program-tran \
269 | --progr-tra | --program-tr | --program-t)
270 ac_prev=program_transform_name ;;
271 -program-transform-name=* | --program-transform-name=* \
272 | --program-transform-nam=* | --program-transform-na=* \
273 | --program-transform-n=* | --program-transform-=* \
274 | --program-transform=* | --program-transfor=* \
275 | --program-transfo=* | --program-transf=* \
276 | --program-trans=* | --program-tran=* \
277 | --progr-tra=* | --program-tr=* | --program-t=*)
278 program_transform_name="$ac_optarg" ;;
279
280 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
281 | -silent | --silent | --silen | --sile | --sil)
282 silent=yes ;;
283
284 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
285 ac_prev=sbindir ;;
286 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
287 | --sbi=* | --sb=*)
288 sbindir="$ac_optarg" ;;
289
290 -sharedstatedir | --sharedstatedir | --sharedstatedi \
291 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
292 | --sharedst | --shareds | --shared | --share | --shar \
293 | --sha | --sh)
294 ac_prev=sharedstatedir ;;
295 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
296 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
297 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
298 | --sha=* | --sh=*)
299 sharedstatedir="$ac_optarg" ;;
300
301 -site | --site | --sit)
302 ac_prev=site ;;
303 -site=* | --site=* | --sit=*)
304 site="$ac_optarg" ;;
305
306 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
307 ac_prev=srcdir ;;
308 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
309 srcdir="$ac_optarg" ;;
310
311 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
312 | --syscon | --sysco | --sysc | --sys | --sy)
313 ac_prev=sysconfdir ;;
314 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
315 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
316 sysconfdir="$ac_optarg" ;;
317
318 -target | --target | --targe | --targ | --tar | --ta | --t)
319 ac_prev=target ;;
320 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
321 target="$ac_optarg" ;;
322
323 -v | -verbose | --verbose | --verbos | --verbo | --verb)
324 verbose=yes ;;
325
326 -version | --version | --versio | --versi | --vers)
327 echo "configure generated by autoconf version 2.4.2"
328 exit 0 ;;
329
330 -with-* | --with-*)
331 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
332 # Reject names that are not valid shell variable names.
333 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
334 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
335 fi
336 ac_package=`echo $ac_package| sed 's/-/_/g'`
337 case "$ac_option" in
338 *=*) ;;
339 *) ac_optarg=yes ;;
340 esac
341 eval "with_${ac_package}='$ac_optarg'" ;;
342
343 -without-* | --without-*)
344 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
345 # Reject names that are not valid shell variable names.
346 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
347 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
348 fi
349 ac_package=`echo $ac_package| sed 's/-/_/g'`
350 eval "with_${ac_package}=no" ;;
351
352 --x)
353 # Obsolete; use --with-x.
354 with_x=yes ;;
355
356 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
357 | --x-incl | --x-inc | --x-in | --x-i)
358 ac_prev=x_includes ;;
359 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
360 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
361 x_includes="$ac_optarg" ;;
362
363 -x-libraries | --x-libraries | --x-librarie | --x-librari \
364 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
365 ac_prev=x_libraries ;;
366 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
367 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
368 x_libraries="$ac_optarg" ;;
369
370 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
371 ;;
372
373 *)
374 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
375 echo "configure: warning: $ac_option: invalid host type" 1>&2
376 fi
377 if test "x$nonopt" != xNONE; then
378 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
379 fi
380 nonopt="$ac_option"
381 ;;
382
383 esac
384 done
385
386 if test -n "$ac_prev"; then
387 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
388 fi
389
390 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
391
392 # File descriptor usage:
393 # 0 standard input
394 # 1 file creation
395 # 2 errors and warnings
396 # 3 some systems may open it to /dev/tty
397 # 4 used on the Kubota Titan
398 # 6 checking for... messages and results
399 # 5 compiler messages saved in config.log
400 if test "$silent" = yes; then
401 exec 6>/dev/null
402 else
403 exec 6>&1
404 fi
405 exec 5>./config.log
406
407 echo "\
408 This file contains any messages produced by compilers while
409 running configure, to aid debugging if configure makes a mistake.
410 " 1>&5
411
412 # Strip out --no-create and --no-recursion so they do not pile up.
413 # Also quote any args containing shell metacharacters.
414 ac_configure_args=
415 for ac_arg
416 do
417 case "$ac_arg" in
418 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
419 | --no-cr | --no-c) ;;
420 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
421 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
422 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
423 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
424 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
425 esac
426 done
427
428 # NLS nuisances.
429 # Only set LANG and LC_ALL to C if already set.
430 # These must not be set unconditionally because not all systems understand
431 # e.g. LANG=C (notably SCO).
432 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
433 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
434
435 # confdefs.h avoids OS command line length limits that DEFS can exceed.
436 rm -rf conftest* confdefs.h
437 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
438 echo > confdefs.h
439
440 # A filename unique to this package, relative to the directory that
441 # configure is in, which we can look for to find out if srcdir is correct.
442 ac_unique_file=Makefile.in
443
444 # Find the source files, if location was not specified.
445 if test -z "$srcdir"; then
446 ac_srcdir_defaulted=yes
447 # Try the directory containing this script, then its parent.
448 ac_prog=$0
449 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
450 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
451 srcdir=$ac_confdir
452 if test ! -r $srcdir/$ac_unique_file; then
453 srcdir=..
454 fi
455 else
456 ac_srcdir_defaulted=no
457 fi
458 if test ! -r $srcdir/$ac_unique_file; then
459 if test "$ac_srcdir_defaulted" = yes; then
460 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
461 else
462 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
463 fi
464 fi
465 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
466
467 # Prefer explicitly selected file to automatically selected ones.
468 if test -z "$CONFIG_SITE"; then
469 if test "x$prefix" != xNONE; then
470 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
471 else
472 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
473 fi
474 fi
475 for ac_site_file in $CONFIG_SITE; do
476 if test -r "$ac_site_file"; then
477 echo "loading site script $ac_site_file"
478 . "$ac_site_file"
479 fi
480 done
481
482 if test -r "$cache_file"; then
483 echo "loading cache $cache_file"
484 . $cache_file
485 else
486 echo "creating cache $cache_file"
487 > $cache_file
488 fi
489
490 ac_ext=c
491 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
492 ac_cpp='echo $CPP $CPPFLAGS 1>&5;
493 $CPP $CPPFLAGS'
494 ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
495 ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
496 ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
497 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
498
499 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
500 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
501 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
502 ac_n= ac_c='
503 ' ac_t=' '
504 else
505 ac_n=-n ac_c= ac_t=
506 fi
507 else
508 ac_n= ac_c='\c' ac_t=
509 fi
510
511
512
513 ac_aux_dir=
514 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
515 if test -f $ac_dir/install-sh; then
516 ac_aux_dir=$ac_dir
517 ac_install_sh="$ac_aux_dir/install-sh -c"
518 break
519 elif test -f $ac_dir/install.sh; then
520 ac_aux_dir=$ac_dir
521 ac_install_sh="$ac_aux_dir/install.sh -c"
522 break
523 fi
524 done
525 if test -z "$ac_aux_dir"; then
526 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
527 fi
528 ac_config_guess=$ac_aux_dir/config.guess
529 ac_config_sub=$ac_aux_dir/config.sub
530 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
531
532
533 # Do some error checking and defaulting for the host and target type.
534 # The inputs are:
535 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
536 #
537 # The rules are:
538 # 1. You are not allowed to specify --host, --target, and nonopt at the
539 # same time.
540 # 2. Host defaults to nonopt.
541 # 3. If nonopt is not specified, then host defaults to the current host,
542 # as determined by config.guess.
543 # 4. Target and build default to nonopt.
544 # 5. If nonopt is not specified, then target and build default to host.
545
546 # The aliases save the names the user supplied, while $host etc.
547 # will get canonicalized.
548 case $host---$target---$nonopt in
549 NONE---*---* | *---NONE---* | *---*---NONE) ;;
550 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
551 esac
552
553
554 # Make sure we can run config.sub.
555 if $ac_config_sub sun4 >/dev/null 2>&1; then :
556 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
557 fi
558
559 echo $ac_n "checking host system type""... $ac_c" 1>&6
560
561 host_alias=$host
562 case "$host_alias" in
563 NONE)
564 case $nonopt in
565 NONE)
566 if host_alias=`$ac_config_guess`; then :
567 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
568 fi ;;
569 *) host_alias=$nonopt ;;
570 esac ;;
571 esac
572
573 host=`$ac_config_sub $host_alias`
574 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
575 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
576 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
577 echo "$ac_t""$host" 1>&6
578
579 echo $ac_n "checking target system type""... $ac_c" 1>&6
580
581 target_alias=$target
582 case "$target_alias" in
583 NONE)
584 case $nonopt in
585 NONE) target_alias=$host_alias ;;
586 *) target_alias=$nonopt ;;
587 esac ;;
588 esac
589
590 target=`$ac_config_sub $target_alias`
591 target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
592 target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
593 target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
594 echo "$ac_t""$target" 1>&6
595
596 echo $ac_n "checking build system type""... $ac_c" 1>&6
597
598 build_alias=$build
599 case "$build_alias" in
600 NONE)
601 case $nonopt in
602 NONE) build_alias=$host_alias ;;
603 *) build_alias=$nonopt ;;
604 esac ;;
605 esac
606
607 build=`$ac_config_sub $build_alias`
608 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
609 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
610 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
611 echo "$ac_t""$build" 1>&6
612
613 test "$host_alias" != "$target_alias" &&
614 test "$program_prefix$program_suffix$program_transform_name" = \
615 NONENONEs,x,x, &&
616 program_prefix=${target_alias}-
617
618 if test "$program_transform_name" = s,x,x,; then
619 program_transform_name=
620 else
621 # Double any \ or $.
622 echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
623 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
624 rm -f conftestsed
625 fi
626 test "$program_prefix" != NONE &&
627 program_transform_name="s,^,${program_prefix},; $program_transform_name"
628 # Use a double $ so make ignores it.
629 test "$program_suffix" != NONE &&
630 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
631
632 # sed with no file args requires a program.
633 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
634
635
636 # WHEN ADDING ENTRIES TO THIS MATRIX:
637 # Make sure that the left side always has two dashes. Otherwise you
638 # can get spurious matches. Even for unambiguous cases, do this as a
639 # convention, else the table becomes a real mess to understand and maintain.
640
641 case "${target}" in
642 arm*-*-*) sim_target=arm ;;
643 h8300*-*-*) sim_target=h8300 ;;
644 h8500-*-*) sim_target=h8500 ;;
645 mips*-*-*) sim_target=mips ;;
646 sh*-*-*) sim_target=sh ;;
647 powerpc-*-eabisim*) sim_target=ppc ;;
648 powerpcle-*-eabisim*) sim_target=ppc ;;
649 w65-*-*) sim_target=w65 ;;
650 z8k*-*-*) sim_target=z8k ;;
651 *) sim_target=none ;;
652 esac
653
654 configdirs=${sim_target}
655 subdirs="$configdirs"
656
657
658 trap '' 1 2 15
659 cat > confcache <<\EOF
660 # This file is a shell script that caches the results of configure
661 # tests run on this system so they can be shared between configure
662 # scripts and configure runs. It is not useful on other systems.
663 # If it contains results you don't want to keep, you may remove or edit it.
664 #
665 # By default, configure uses ./config.cache as the cache file,
666 # creating it if it does not exist already. You can give configure
667 # the --cache-file=FILE option to use a different cache file; that is
668 # what configure does when it calls configure scripts in
669 # subdirectories, so they share the cache.
670 # Giving --cache-file=/dev/null disables caching, for debugging configure.
671 # config.status only pays attention to the cache file if you give it the
672 # --recheck option to rerun configure.
673 #
674 EOF
675 # Ultrix sh set writes to stderr and can't be redirected directly,
676 # and sets the high bit in the cache file unless we assign to the vars.
677 (set) 2>&1 |
678 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
679 >> confcache
680 if cmp -s $cache_file confcache; then
681 :
682 else
683 if test -w $cache_file; then
684 echo "updating cache $cache_file"
685 cat confcache > $cache_file
686 else
687 echo "not updating unwritable cache $cache_file"
688 fi
689 fi
690 rm -f confcache
691
692 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
693
694 test "x$prefix" = xNONE && prefix=$ac_default_prefix
695 # Let make expand exec_prefix.
696 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
697
698 # Any assignment to VPATH causes Sun make to only execute
699 # the first set of double-colon rules, so remove it if not needed.
700 # If there is a colon in the path, we need to keep it.
701 if test "x$srcdir" = x.; then
702 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
703 fi
704
705 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
706
707 # Transform confdefs.h into DEFS.
708 # Protect against shell expansion while executing Makefile rules.
709 # Protect against Makefile macro expansion.
710 cat > conftest.defs <<\EOF
711 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
712 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
713 s%\[%\\&%g
714 s%\]%\\&%g
715 s%\$%$$%g
716 EOF
717 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
718 rm -f conftest.defs
719
720
721 # Without the "./", some shells look in PATH for config.status.
722 : ${CONFIG_STATUS=./config.status}
723
724 echo creating $CONFIG_STATUS
725 rm -f $CONFIG_STATUS
726 cat > $CONFIG_STATUS <<EOF
727 #! /bin/sh
728 # Generated automatically by configure.
729 # Run this file to recreate the current configuration.
730 # This directory was configured as follows,
731 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
732 #
733 # $0 $ac_configure_args
734 #
735 # Compiler output produced by configure, useful for debugging
736 # configure, is in ./config.log if it exists.
737
738 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
739 for ac_option
740 do
741 case "\$ac_option" in
742 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
743 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
744 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
745 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
746 echo "$CONFIG_STATUS generated by autoconf version 2.4.2"
747 exit 0 ;;
748 -help | --help | --hel | --he | --h)
749 echo "\$ac_cs_usage"; exit 0 ;;
750 *) echo "\$ac_cs_usage"; exit 1 ;;
751 esac
752 done
753
754 ac_given_srcdir=$srcdir
755
756 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
757
758 # Protect against being on the right side of a sed subst in config.status.
759 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
760 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
761 $ac_vpsub
762 $extrasub
763 s%@CFLAGS@%$CFLAGS%g
764 s%@CPPFLAGS@%$CPPFLAGS%g
765 s%@CXXFLAGS@%$CXXFLAGS%g
766 s%@DEFS@%$DEFS%g
767 s%@LDFLAGS@%$LDFLAGS%g
768 s%@LIBS@%$LIBS%g
769 s%@exec_prefix@%$exec_prefix%g
770 s%@prefix@%$prefix%g
771 s%@program_transform_name@%$program_transform_name%g
772 s%@bindir@%$bindir%g
773 s%@sbindir@%$sbindir%g
774 s%@libexecdir@%$libexecdir%g
775 s%@datadir@%$datadir%g
776 s%@sysconfdir@%$sysconfdir%g
777 s%@sharedstatedir@%$sharedstatedir%g
778 s%@localstatedir@%$localstatedir%g
779 s%@libdir@%$libdir%g
780 s%@includedir@%$includedir%g
781 s%@oldincludedir@%$oldincludedir%g
782 s%@infodir@%$infodir%g
783 s%@mandir@%$mandir%g
784 s%@host@%$host%g
785 s%@host_alias@%$host_alias%g
786 s%@host_cpu@%$host_cpu%g
787 s%@host_vendor@%$host_vendor%g
788 s%@host_os@%$host_os%g
789 s%@target@%$target%g
790 s%@target_alias@%$target_alias%g
791 s%@target_cpu@%$target_cpu%g
792 s%@target_vendor@%$target_vendor%g
793 s%@target_os@%$target_os%g
794 s%@build@%$build%g
795 s%@build_alias@%$build_alias%g
796 s%@build_cpu@%$build_cpu%g
797 s%@build_vendor@%$build_vendor%g
798 s%@build_os@%$build_os%g
799 s%@subdirs@%$subdirs%g
800
801 CEOF
802 EOF
803 cat >> $CONFIG_STATUS <<EOF
804
805 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
806 EOF
807 cat >> $CONFIG_STATUS <<\EOF
808 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
809 # Support "outfile[:infile]", defaulting infile="outfile.in".
810 case "$ac_file" in
811 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
812 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
813 *) ac_file_in="${ac_file}.in" ;;
814 esac
815
816 # Adjust relative srcdir, etc. for subdirectories.
817
818 # Remove last slash and all that follows it. Not all systems have dirname.
819 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
820 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
821 # The file is in a subdirectory.
822 test ! -d "$ac_dir" && mkdir "$ac_dir"
823 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
824 # A "../" for each directory in $ac_dir_suffix.
825 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
826 else
827 ac_dir_suffix= ac_dots=
828 fi
829
830 case "$ac_given_srcdir" in
831 .) srcdir=.
832 if test -z "$ac_dots"; then top_srcdir=.
833 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
834 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
835 *) # Relative path.
836 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
837 top_srcdir="$ac_dots$ac_given_srcdir" ;;
838 esac
839
840 echo creating "$ac_file"
841 rm -f "$ac_file"
842 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
843 case "$ac_file" in
844 *Makefile*) ac_comsub="1i\\
845 # $configure_input" ;;
846 *) ac_comsub= ;;
847 esac
848 sed -e "$ac_comsub
849 s%@configure_input@%$configure_input%g
850 s%@srcdir@%$srcdir%g
851 s%@top_srcdir@%$top_srcdir%g
852 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
853 fi; done
854 rm -f conftest.subs
855
856
857
858 exit 0
859 EOF
860 chmod +x $CONFIG_STATUS
861 rm -fr confdefs* $ac_clean_files
862 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
863
864 if test "$no_recursion" != yes; then
865
866 # Remove --cache-file and --srcdir arguments so they do not pile up.
867 ac_sub_configure_args=
868 ac_prev=
869 for ac_arg in $ac_configure_args; do
870 if test -n "$ac_prev"; then
871 ac_prev=
872 continue
873 fi
874 case "$ac_arg" in
875 -cache-file | --cache-file | --cache-fil | --cache-fi \
876 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
877 ac_prev=cache_file ;;
878 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
879 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
880 ;;
881 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
882 ac_prev=srcdir ;;
883 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
884 ;;
885 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
886 esac
887 done
888
889 for ac_config_dir in $configdirs; do
890
891 # Do not complain, so a configure script can configure whichever
892 # parts of a large source tree are present.
893 if test ! -d $srcdir/$ac_config_dir; then
894 continue
895 fi
896
897 echo configuring in $ac_config_dir
898
899 case "$srcdir" in
900 .) ;;
901 *)
902 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
903 else
904 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
905 fi
906 ;;
907 esac
908
909 ac_popdir=`pwd`
910 cd $ac_config_dir
911
912 case "$srcdir" in
913 .) # No --srcdir option. We are building in place.
914 ac_sub_srcdir=$srcdir ;;
915 /*) # Absolute path.
916 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
917 *) # Relative path.
918 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
919 esac
920
921 # Check for guested configure; otherwise get Cygnus style configure.
922 if test -f $ac_sub_srcdir/configure; then
923 ac_sub_configure=$ac_sub_srcdir/configure
924 elif test -f $ac_sub_srcdir/configure.in; then
925 ac_sub_configure=$ac_configure
926 else
927 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
928 ac_sub_configure=
929 fi
930
931 # The recursion is here.
932 if test -n "$ac_sub_configure"; then
933
934 # Make the cache file name correct relative to the subdirectory.
935 # A "../" for each directory in /$ac_config_dir.
936 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
937 case "$cache_file" in
938 /*) ac_sub_cache_file=$cache_file ;;
939 *) # Relative path.
940 ac_sub_cache_file="$ac_dots$cache_file" ;;
941 esac
942
943 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
944 # The eval makes quoting arguments work.
945 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
946 then :
947 else
948 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
949 fi
950 fi
951
952 cd $ac_popdir
953 done
954 fi
955
956
957 exit 0
This page took 0.074143 seconds and 5 git commands to generate.