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