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