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