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