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