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