18aa02ec1e4dd32b9a14b3de3daafa58bb3dd72f
[fw/sdcc] / sim / ucsim / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
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
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
48
49 # Initialize some other variables.
50 subdirs=
51 MFLAGS= MAKEFLAGS=
52 # Maximum number of lines to put in a shell here document.
53 ac_max_here_lines=12
54
55 ac_prev=
56 for ac_option
57 do
58
59   # If the previous option needs an argument, assign it.
60   if test -n "$ac_prev"; then
61     eval "$ac_prev=\$ac_option"
62     ac_prev=
63     continue
64   fi
65
66   case "$ac_option" in
67   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
68   *) ac_optarg= ;;
69   esac
70
71   # Accept the important Cygnus configure options, so we can diagnose typos.
72
73   case "$ac_option" in
74
75   -bindir | --bindir | --bindi | --bind | --bin | --bi)
76     ac_prev=bindir ;;
77   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
78     bindir="$ac_optarg" ;;
79
80   -build | --build | --buil | --bui | --bu)
81     ac_prev=build ;;
82   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
83     build="$ac_optarg" ;;
84
85   -cache-file | --cache-file | --cache-fil | --cache-fi \
86   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
87     ac_prev=cache_file ;;
88   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
89   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
90     cache_file="$ac_optarg" ;;
91
92   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
93     ac_prev=datadir ;;
94   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
95   | --da=*)
96     datadir="$ac_optarg" ;;
97
98   -disable-* | --disable-*)
99     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
100     # Reject names that are not valid shell variable names.
101     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
102       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
103     fi
104     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
105     eval "enable_${ac_feature}=no" ;;
106
107   -enable-* | --enable-*)
108     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
109     # Reject names that are not valid shell variable names.
110     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
111       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
112     fi
113     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114     case "$ac_option" in
115       *=*) ;;
116       *) ac_optarg=yes ;;
117     esac
118     eval "enable_${ac_feature}='$ac_optarg'" ;;
119
120   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
121   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
122   | --exec | --exe | --ex)
123     ac_prev=exec_prefix ;;
124   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
125   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
126   | --exec=* | --exe=* | --ex=*)
127     exec_prefix="$ac_optarg" ;;
128
129   -gas | --gas | --ga | --g)
130     # Obsolete; use --with-gas.
131     with_gas=yes ;;
132
133   -help | --help | --hel | --he)
134     # Omit some internal or obsolete options to make the list less imposing.
135     # This message is too long to be a string in the A/UX 3.1 sh.
136     cat << EOF
137 Usage: configure [options] [host]
138 Options: [defaults in brackets after descriptions]
139 Configuration:
140   --cache-file=FILE       cache test results in FILE
141   --help                  print this message
142   --no-create             do not create output files
143   --quiet, --silent       do not print \`checking...' messages
144   --version               print the version of autoconf that created configure
145 Directory and file names:
146   --prefix=PREFIX         install architecture-independent files in PREFIX
147                           [$ac_default_prefix]
148   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
149                           [same as prefix]
150   --bindir=DIR            user executables in DIR [EPREFIX/bin]
151   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
152   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
153   --datadir=DIR           read-only architecture-independent data in DIR
154                           [PREFIX/share]
155   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
156   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
157                           [PREFIX/com]
158   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
159   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
160   --includedir=DIR        C header files in DIR [PREFIX/include]
161   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
162   --infodir=DIR           info documentation in DIR [PREFIX/info]
163   --mandir=DIR            man documentation in DIR [PREFIX/man]
164   --srcdir=DIR            find the sources in DIR [configure dir or ..]
165   --program-prefix=PREFIX prepend PREFIX to installed program names
166   --program-suffix=SUFFIX append SUFFIX to installed program names
167   --program-transform-name=PROGRAM
168                           run sed PROGRAM on installed program names
169 EOF
170     cat << EOF
171 Host type:
172   --build=BUILD           configure for building on BUILD [BUILD=HOST]
173   --host=HOST             configure for HOST [guessed]
174   --target=TARGET         configure for TARGET [TARGET=HOST]
175 Features and packages:
176   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
177   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
178   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
179   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
180   --x-includes=DIR        X include files are in DIR
181   --x-libraries=DIR       X library files are in DIR
182 EOF
183     if test -n "$ac_help"; then
184       echo "--enable and --with options recognized:$ac_help"
185     fi
186     exit 0 ;;
187
188   -host | --host | --hos | --ho)
189     ac_prev=host ;;
190   -host=* | --host=* | --hos=* | --ho=*)
191     host="$ac_optarg" ;;
192
193   -includedir | --includedir | --includedi | --included | --include \
194   | --includ | --inclu | --incl | --inc)
195     ac_prev=includedir ;;
196   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
197   | --includ=* | --inclu=* | --incl=* | --inc=*)
198     includedir="$ac_optarg" ;;
199
200   -infodir | --infodir | --infodi | --infod | --info | --inf)
201     ac_prev=infodir ;;
202   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
203     infodir="$ac_optarg" ;;
204
205   -libdir | --libdir | --libdi | --libd)
206     ac_prev=libdir ;;
207   -libdir=* | --libdir=* | --libdi=* | --libd=*)
208     libdir="$ac_optarg" ;;
209
210   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
211   | --libexe | --libex | --libe)
212     ac_prev=libexecdir ;;
213   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
214   | --libexe=* | --libex=* | --libe=*)
215     libexecdir="$ac_optarg" ;;
216
217   -localstatedir | --localstatedir | --localstatedi | --localstated \
218   | --localstate | --localstat | --localsta | --localst \
219   | --locals | --local | --loca | --loc | --lo)
220     ac_prev=localstatedir ;;
221   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
222   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
223   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
224     localstatedir="$ac_optarg" ;;
225
226   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
227     ac_prev=mandir ;;
228   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
229     mandir="$ac_optarg" ;;
230
231   -nfp | --nfp | --nf)
232     # Obsolete; use --without-fp.
233     with_fp=no ;;
234
235   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
236   | --no-cr | --no-c)
237     no_create=yes ;;
238
239   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
240   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
241     no_recursion=yes ;;
242
243   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
244   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
245   | --oldin | --oldi | --old | --ol | --o)
246     ac_prev=oldincludedir ;;
247   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
248   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
249   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
250     oldincludedir="$ac_optarg" ;;
251
252   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
253     ac_prev=prefix ;;
254   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
255     prefix="$ac_optarg" ;;
256
257   -program-prefix | --program-prefix | --program-prefi | --program-pref \
258   | --program-pre | --program-pr | --program-p)
259     ac_prev=program_prefix ;;
260   -program-prefix=* | --program-prefix=* | --program-prefi=* \
261   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
262     program_prefix="$ac_optarg" ;;
263
264   -program-suffix | --program-suffix | --program-suffi | --program-suff \
265   | --program-suf | --program-su | --program-s)
266     ac_prev=program_suffix ;;
267   -program-suffix=* | --program-suffix=* | --program-suffi=* \
268   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
269     program_suffix="$ac_optarg" ;;
270
271   -program-transform-name | --program-transform-name \
272   | --program-transform-nam | --program-transform-na \
273   | --program-transform-n | --program-transform- \
274   | --program-transform | --program-transfor \
275   | --program-transfo | --program-transf \
276   | --program-trans | --program-tran \
277   | --progr-tra | --program-tr | --program-t)
278     ac_prev=program_transform_name ;;
279   -program-transform-name=* | --program-transform-name=* \
280   | --program-transform-nam=* | --program-transform-na=* \
281   | --program-transform-n=* | --program-transform-=* \
282   | --program-transform=* | --program-transfor=* \
283   | --program-transfo=* | --program-transf=* \
284   | --program-trans=* | --program-tran=* \
285   | --progr-tra=* | --program-tr=* | --program-t=*)
286     program_transform_name="$ac_optarg" ;;
287
288   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
289   | -silent | --silent | --silen | --sile | --sil)
290     silent=yes ;;
291
292   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
293     ac_prev=sbindir ;;
294   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
295   | --sbi=* | --sb=*)
296     sbindir="$ac_optarg" ;;
297
298   -sharedstatedir | --sharedstatedir | --sharedstatedi \
299   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
300   | --sharedst | --shareds | --shared | --share | --shar \
301   | --sha | --sh)
302     ac_prev=sharedstatedir ;;
303   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
304   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
305   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
306   | --sha=* | --sh=*)
307     sharedstatedir="$ac_optarg" ;;
308
309   -site | --site | --sit)
310     ac_prev=site ;;
311   -site=* | --site=* | --sit=*)
312     site="$ac_optarg" ;;
313
314   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
315     ac_prev=srcdir ;;
316   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
317     srcdir="$ac_optarg" ;;
318
319   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
320   | --syscon | --sysco | --sysc | --sys | --sy)
321     ac_prev=sysconfdir ;;
322   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
323   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
324     sysconfdir="$ac_optarg" ;;
325
326   -target | --target | --targe | --targ | --tar | --ta | --t)
327     ac_prev=target ;;
328   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
329     target="$ac_optarg" ;;
330
331   -v | -verbose | --verbose | --verbos | --verbo | --verb)
332     verbose=yes ;;
333
334   -version | --version | --versio | --versi | --vers)
335     echo "configure generated by autoconf version 2.12"
336     exit 0 ;;
337
338   -with-* | --with-*)
339     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
340     # Reject names that are not valid shell variable names.
341     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
342       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
343     fi
344     ac_package=`echo $ac_package| sed 's/-/_/g'`
345     case "$ac_option" in
346       *=*) ;;
347       *) ac_optarg=yes ;;
348     esac
349     eval "with_${ac_package}='$ac_optarg'" ;;
350
351   -without-* | --without-*)
352     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
353     # Reject names that are not valid shell variable names.
354     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
355       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356     fi
357     ac_package=`echo $ac_package| sed 's/-/_/g'`
358     eval "with_${ac_package}=no" ;;
359
360   --x)
361     # Obsolete; use --with-x.
362     with_x=yes ;;
363
364   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
365   | --x-incl | --x-inc | --x-in | --x-i)
366     ac_prev=x_includes ;;
367   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
368   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
369     x_includes="$ac_optarg" ;;
370
371   -x-libraries | --x-libraries | --x-librarie | --x-librari \
372   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
373     ac_prev=x_libraries ;;
374   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
375   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
376     x_libraries="$ac_optarg" ;;
377
378   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
379     ;;
380
381   *)
382     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
383       echo "configure: warning: $ac_option: invalid host type" 1>&2
384     fi
385     if test "x$nonopt" != xNONE; then
386       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
387     fi
388     nonopt="$ac_option"
389     ;;
390
391   esac
392 done
393
394 if test -n "$ac_prev"; then
395   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
396 fi
397
398 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
399
400 # File descriptor usage:
401 # 0 standard input
402 # 1 file creation
403 # 2 errors and warnings
404 # 3 some systems may open it to /dev/tty
405 # 4 used on the Kubota Titan
406 # 6 checking for... messages and results
407 # 5 compiler messages saved in config.log
408 if test "$silent" = yes; then
409   exec 6>/dev/null
410 else
411   exec 6>&1
412 fi
413 exec 5>./config.log
414
415 echo "\
416 This file contains any messages produced by compilers while
417 running configure, to aid debugging if configure makes a mistake.
418 " 1>&5
419
420 # Strip out --no-create and --no-recursion so they do not pile up.
421 # Also quote any args containing shell metacharacters.
422 ac_configure_args=
423 for ac_arg
424 do
425   case "$ac_arg" in
426   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
427   | --no-cr | --no-c) ;;
428   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
429   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
430   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
431   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
432   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
433   esac
434 done
435
436 # NLS nuisances.
437 # Only set these to C if already set.  These must not be set unconditionally
438 # because not all systems understand e.g. LANG=C (notably SCO).
439 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
440 # Non-C LC_CTYPE values break the ctype check.
441 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
442 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
443 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
444 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
445
446 # confdefs.h avoids OS command line length limits that DEFS can exceed.
447 rm -rf conftest* confdefs.h
448 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
449 echo > confdefs.h
450
451 # A filename unique to this package, relative to the directory that
452 # configure is in, which we can look for to find out if srcdir is correct.
453 ac_unique_file=.version
454
455 # Find the source files, if location was not specified.
456 if test -z "$srcdir"; then
457   ac_srcdir_defaulted=yes
458   # Try the directory containing this script, then its parent.
459   ac_prog=$0
460   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
461   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
462   srcdir=$ac_confdir
463   if test ! -r $srcdir/$ac_unique_file; then
464     srcdir=..
465   fi
466 else
467   ac_srcdir_defaulted=no
468 fi
469 if test ! -r $srcdir/$ac_unique_file; then
470   if test "$ac_srcdir_defaulted" = yes; then
471     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
472   else
473     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
474   fi
475 fi
476 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
477
478 # Prefer explicitly selected file to automatically selected ones.
479 if test -z "$CONFIG_SITE"; then
480   if test "x$prefix" != xNONE; then
481     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
482   else
483     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
484   fi
485 fi
486 for ac_site_file in $CONFIG_SITE; do
487   if test -r "$ac_site_file"; then
488     echo "loading site script $ac_site_file"
489     . "$ac_site_file"
490   fi
491 done
492
493 if test -r "$cache_file"; then
494   echo "loading cache $cache_file"
495   . $cache_file
496 else
497   echo "creating cache $cache_file"
498   > $cache_file
499 fi
500
501 ac_ext=c
502 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
503 ac_cpp='$CPP $CPPFLAGS'
504 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
505 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
506 cross_compiling=$ac_cv_prog_cc_cross
507
508 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
509   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
510   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
511     ac_n= ac_c='
512 ' ac_t='        '
513   else
514     ac_n=-n ac_c= ac_t=
515   fi
516 else
517   ac_n= ac_c='\c' ac_t=
518 fi
519
520
521
522
523 for ac_prog in mawk gawk nawk awk
524 do
525 # Extract the first word of "$ac_prog", so it can be a program name with args.
526 set dummy $ac_prog; ac_word=$2
527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
528 echo "configure:529: checking for $ac_word" >&5
529 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
530   echo $ac_n "(cached) $ac_c" 1>&6
531 else
532   if test -n "$AWK"; then
533   ac_cv_prog_AWK="$AWK" # Let the user override the test.
534 else
535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
536   for ac_dir in $PATH; do
537     test -z "$ac_dir" && ac_dir=.
538     if test -f $ac_dir/$ac_word; then
539       ac_cv_prog_AWK="$ac_prog"
540       break
541     fi
542   done
543   IFS="$ac_save_ifs"
544 fi
545 fi
546 AWK="$ac_cv_prog_AWK"
547 if test -n "$AWK"; then
548   echo "$ac_t""$AWK" 1>&6
549 else
550   echo "$ac_t""no" 1>&6
551 fi
552
553 test -n "$AWK" && break
554 done
555
556
557 echo $ac_n "checking version of the package""... $ac_c" 1>&6
558 echo "configure:559: checking version of the package" >&5
559 if test -f .version; then
560   VERSION=`cat .version`
561   echo "$ac_t""$VERSION" 1>&6
562 else
563   VERSION="0.0.0"
564   echo "$ac_t""unknown using 0.0.0" 1>&6
565 fi
566 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
567 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
568 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
569
570
571
572
573 cat >> confdefs.h <<EOF
574 #define VERSIONSTR "${VERSION}"
575 EOF
576
577 cat >> confdefs.h <<EOF
578 #define VERSIONHI $VERSIONHI
579 EOF
580
581 cat >> confdefs.h <<EOF
582 #define VERSIONLO $VERSIONLO
583 EOF
584
585 cat >> confdefs.h <<EOF
586 #define VERSIONP $VERSIONP
587 EOF
588
589
590
591 # Required programs
592 #-------------------
593 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
594 do
595 # Extract the first word of "$ac_prog", so it can be a program name with args.
596 set dummy $ac_prog; ac_word=$2
597 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
598 echo "configure:599: checking for $ac_word" >&5
599 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
600   echo $ac_n "(cached) $ac_c" 1>&6
601 else
602   if test -n "$CXX"; then
603   ac_cv_prog_CXX="$CXX" # Let the user override the test.
604 else
605   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
606   for ac_dir in $PATH; do
607     test -z "$ac_dir" && ac_dir=.
608     if test -f $ac_dir/$ac_word; then
609       ac_cv_prog_CXX="$ac_prog"
610       break
611     fi
612   done
613   IFS="$ac_save_ifs"
614 fi
615 fi
616 CXX="$ac_cv_prog_CXX"
617 if test -n "$CXX"; then
618   echo "$ac_t""$CXX" 1>&6
619 else
620   echo "$ac_t""no" 1>&6
621 fi
622
623 test -n "$CXX" && break
624 done
625 test -n "$CXX" || CXX="gcc"
626
627
628 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
629 echo "configure:630: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
630
631 ac_ext=C
632 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
633 ac_cpp='$CXXCPP $CPPFLAGS'
634 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
635 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
636 cross_compiling=$ac_cv_prog_cxx_cross
637
638 cat > conftest.$ac_ext <<EOF
639 #line 640 "configure"
640 #include "confdefs.h"
641 main(){return(0);}
642 EOF
643 if { (eval echo configure:644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
644   ac_cv_prog_cxx_works=yes
645   # If we can't run a trivial program, we are probably using a cross compiler.
646   if (./conftest; exit) 2>/dev/null; then
647     ac_cv_prog_cxx_cross=no
648   else
649     ac_cv_prog_cxx_cross=yes
650   fi
651 else
652   echo "configure: failed program was:" >&5
653   cat conftest.$ac_ext >&5
654   ac_cv_prog_cxx_works=no
655 fi
656 rm -fr conftest*
657 ac_ext=c
658 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
659 ac_cpp='$CPP $CPPFLAGS'
660 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
661 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
662 cross_compiling=$ac_cv_prog_cc_cross
663
664 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
665 if test $ac_cv_prog_cxx_works = no; then
666   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
667 fi
668 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
669 echo "configure:670: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
670 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
671 cross_compiling=$ac_cv_prog_cxx_cross
672
673 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
674 echo "configure:675: checking whether we are using GNU C++" >&5
675 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
676   echo $ac_n "(cached) $ac_c" 1>&6
677 else
678   cat > conftest.C <<EOF
679 #ifdef __GNUC__
680   yes;
681 #endif
682 EOF
683 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
684   ac_cv_prog_gxx=yes
685 else
686   ac_cv_prog_gxx=no
687 fi
688 fi
689
690 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
691
692 if test $ac_cv_prog_gxx = yes; then
693   GXX=yes
694   ac_test_CXXFLAGS="${CXXFLAGS+set}"
695   ac_save_CXXFLAGS="$CXXFLAGS"
696   CXXFLAGS=
697   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
698 echo "configure:699: checking whether ${CXX-g++} accepts -g" >&5
699 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
700   echo $ac_n "(cached) $ac_c" 1>&6
701 else
702   echo 'void f(){}' > conftest.cc
703 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
704   ac_cv_prog_cxx_g=yes
705 else
706   ac_cv_prog_cxx_g=no
707 fi
708 rm -f conftest*
709
710 fi
711
712 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
713   if test "$ac_test_CXXFLAGS" = set; then
714     CXXFLAGS="$ac_save_CXXFLAGS"
715   elif test $ac_cv_prog_cxx_g = yes; then
716     CXXFLAGS="-g -O2"
717   else
718     CXXFLAGS="-O2"
719   fi
720 else
721   GXX=
722   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
723 fi
724
725 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
726 echo "configure:727: checking how to run the C++ preprocessor" >&5
727 if test -z "$CXXCPP"; then
728 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
729   echo $ac_n "(cached) $ac_c" 1>&6
730 else
731   ac_ext=C
732 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
733 ac_cpp='$CXXCPP $CPPFLAGS'
734 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
735 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
736 cross_compiling=$ac_cv_prog_cxx_cross
737   CXXCPP="${CXX-g++} -E"
738   cat > conftest.$ac_ext <<EOF
739 #line 740 "configure"
740 #include "confdefs.h"
741 #include <stdlib.h>
742 EOF
743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
744 { (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
745 ac_err=`grep -v '^ *+' conftest.out`
746 if test -z "$ac_err"; then
747   :
748 else
749   echo "$ac_err" >&5
750   echo "configure: failed program was:" >&5
751   cat conftest.$ac_ext >&5
752   rm -rf conftest*
753   CXXCPP=/lib/cpp
754 fi
755 rm -f conftest*
756   ac_cv_prog_CXXCPP="$CXXCPP"
757 ac_ext=c
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
763 fi
764 fi
765 CXXCPP="$ac_cv_prog_CXXCPP"
766 echo "$ac_t""$CXXCPP" 1>&6
767
768 ac_aux_dir=
769 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
770   if test -f $ac_dir/install-sh; then
771     ac_aux_dir=$ac_dir
772     ac_install_sh="$ac_aux_dir/install-sh -c"
773     break
774   elif test -f $ac_dir/install.sh; then
775     ac_aux_dir=$ac_dir
776     ac_install_sh="$ac_aux_dir/install.sh -c"
777     break
778   fi
779 done
780 if test -z "$ac_aux_dir"; then
781   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
782 fi
783 ac_config_guess=$ac_aux_dir/config.guess
784 ac_config_sub=$ac_aux_dir/config.sub
785 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
786
787 # Find a good install program.  We prefer a C program (faster),
788 # so one script is as good as another.  But avoid the broken or
789 # incompatible versions:
790 # SysV /etc/install, /usr/sbin/install
791 # SunOS /usr/etc/install
792 # IRIX /sbin/install
793 # AIX /bin/install
794 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
795 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
796 # ./install, which can be erroneously created by make from ./install.sh.
797 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
798 echo "configure:799: checking for a BSD compatible install" >&5
799 if test -z "$INSTALL"; then
800 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
801   echo $ac_n "(cached) $ac_c" 1>&6
802 else
803     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
804   for ac_dir in $PATH; do
805     # Account for people who put trailing slashes in PATH elements.
806     case "$ac_dir/" in
807     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
808     *)
809       # OSF1 and SCO ODT 3.0 have their own names for install.
810       for ac_prog in ginstall installbsd scoinst install; do
811         if test -f $ac_dir/$ac_prog; then
812           if test $ac_prog = install &&
813             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
814             # AIX install.  It has an incompatible calling convention.
815             # OSF/1 installbsd also uses dspmsg, but is usable.
816             :
817           else
818             ac_cv_path_install="$ac_dir/$ac_prog -c"
819             break 2
820           fi
821         fi
822       done
823       ;;
824     esac
825   done
826   IFS="$ac_save_IFS"
827
828 fi
829   if test "${ac_cv_path_install+set}" = set; then
830     INSTALL="$ac_cv_path_install"
831   else
832     # As a last resort, use the slow shell script.  We don't cache a
833     # path for INSTALL within a source directory, because that will
834     # break other packages using the cache if that directory is
835     # removed, or if the path is relative.
836     INSTALL="$ac_install_sh"
837   fi
838 fi
839 echo "$ac_t""$INSTALL" 1>&6
840
841 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
842 # It thinks the first close brace ends the variable substitution.
843 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
844
845 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
846
847 # Extract the first word of "ranlib", so it can be a program name with args.
848 set dummy ranlib; ac_word=$2
849 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
850 echo "configure:851: checking for $ac_word" >&5
851 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
852   echo $ac_n "(cached) $ac_c" 1>&6
853 else
854   if test -n "$RANLIB"; then
855   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
856 else
857   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
858   for ac_dir in $PATH; do
859     test -z "$ac_dir" && ac_dir=.
860     if test -f $ac_dir/$ac_word; then
861       ac_cv_prog_RANLIB="ranlib"
862       break
863     fi
864   done
865   IFS="$ac_save_ifs"
866   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
867 fi
868 fi
869 RANLIB="$ac_cv_prog_RANLIB"
870 if test -n "$RANLIB"; then
871   echo "$ac_t""$RANLIB" 1>&6
872 else
873   echo "$ac_t""no" 1>&6
874 fi
875
876 ac_ext=C
877 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
878 ac_cpp='$CXXCPP $CPPFLAGS'
879 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
880 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
881 cross_compiling=$ac_cv_prog_cxx_cross
882
883
884
885 # Checking for header files.
886 # ===========================================================================
887
888 if test -d /stuff/include; then
889   CPPFLAGS="$CPPFLAGS -I/stuff/include"
890 fi
891
892 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
893 echo "configure:894: checking for ANSI C header files" >&5
894 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
895   echo $ac_n "(cached) $ac_c" 1>&6
896 else
897   cat > conftest.$ac_ext <<EOF
898 #line 899 "configure"
899 #include "confdefs.h"
900 #include <stdlib.h>
901 #include <stdarg.h>
902 #include <string.h>
903 #include <float.h>
904 EOF
905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
906 { (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
907 ac_err=`grep -v '^ *+' conftest.out`
908 if test -z "$ac_err"; then
909   rm -rf conftest*
910   ac_cv_header_stdc=yes
911 else
912   echo "$ac_err" >&5
913   echo "configure: failed program was:" >&5
914   cat conftest.$ac_ext >&5
915   rm -rf conftest*
916   ac_cv_header_stdc=no
917 fi
918 rm -f conftest*
919
920 if test $ac_cv_header_stdc = yes; then
921   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
922 cat > conftest.$ac_ext <<EOF
923 #line 924 "configure"
924 #include "confdefs.h"
925 #include <string.h>
926 EOF
927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
928   egrep "memchr" >/dev/null 2>&1; then
929   :
930 else
931   rm -rf conftest*
932   ac_cv_header_stdc=no
933 fi
934 rm -f conftest*
935
936 fi
937
938 if test $ac_cv_header_stdc = yes; then
939   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
940 cat > conftest.$ac_ext <<EOF
941 #line 942 "configure"
942 #include "confdefs.h"
943 #include <stdlib.h>
944 EOF
945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
946   egrep "free" >/dev/null 2>&1; then
947   :
948 else
949   rm -rf conftest*
950   ac_cv_header_stdc=no
951 fi
952 rm -f conftest*
953
954 fi
955
956 if test $ac_cv_header_stdc = yes; then
957   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
958 if test "$cross_compiling" = yes; then
959   :
960 else
961   cat > conftest.$ac_ext <<EOF
962 #line 963 "configure"
963 #include "confdefs.h"
964 #ifdef __cplusplus
965 extern "C" void exit(int);
966 #endif
967 #include <ctype.h>
968 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
969 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
970 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
971 int main () { int i; for (i = 0; i < 256; i++)
972 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
973 exit (0); }
974
975 EOF
976 if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
977 then
978   :
979 else
980   echo "configure: failed program was:" >&5
981   cat conftest.$ac_ext >&5
982   rm -fr conftest*
983   ac_cv_header_stdc=no
984 fi
985 rm -fr conftest*
986 fi
987
988 fi
989 fi
990
991 echo "$ac_t""$ac_cv_header_stdc" 1>&6
992 if test $ac_cv_header_stdc = yes; then
993   cat >> confdefs.h <<\EOF
994 #define STDC_HEADERS 1
995 EOF
996
997 fi
998
999 for ac_hdr in getopt.h
1000 do
1001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1003 echo "configure:1004: checking for $ac_hdr" >&5
1004 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1005   echo $ac_n "(cached) $ac_c" 1>&6
1006 else
1007   cat > conftest.$ac_ext <<EOF
1008 #line 1009 "configure"
1009 #include "confdefs.h"
1010 #include <$ac_hdr>
1011 EOF
1012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1013 { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1014 ac_err=`grep -v '^ *+' conftest.out`
1015 if test -z "$ac_err"; then
1016   rm -rf conftest*
1017   eval "ac_cv_header_$ac_safe=yes"
1018 else
1019   echo "$ac_err" >&5
1020   echo "configure: failed program was:" >&5
1021   cat conftest.$ac_ext >&5
1022   rm -rf conftest*
1023   eval "ac_cv_header_$ac_safe=no"
1024 fi
1025 rm -f conftest*
1026 fi
1027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1028   echo "$ac_t""yes" 1>&6
1029     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1030   cat >> confdefs.h <<EOF
1031 #define $ac_tr_hdr 1
1032 EOF
1033  
1034 else
1035   echo "$ac_t""no" 1>&6
1036 fi
1037 done
1038
1039 for ac_hdr in unistd.h
1040 do
1041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1042 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1043 echo "configure:1044: checking for $ac_hdr" >&5
1044 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1045   echo $ac_n "(cached) $ac_c" 1>&6
1046 else
1047   cat > conftest.$ac_ext <<EOF
1048 #line 1049 "configure"
1049 #include "confdefs.h"
1050 #include <$ac_hdr>
1051 EOF
1052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1053 { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1054 ac_err=`grep -v '^ *+' conftest.out`
1055 if test -z "$ac_err"; then
1056   rm -rf conftest*
1057   eval "ac_cv_header_$ac_safe=yes"
1058 else
1059   echo "$ac_err" >&5
1060   echo "configure: failed program was:" >&5
1061   cat conftest.$ac_ext >&5
1062   rm -rf conftest*
1063   eval "ac_cv_header_$ac_safe=no"
1064 fi
1065 rm -f conftest*
1066 fi
1067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1068   echo "$ac_t""yes" 1>&6
1069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1070   cat >> confdefs.h <<EOF
1071 #define $ac_tr_hdr 1
1072 EOF
1073  
1074 else
1075   echo "$ac_t""no" 1>&6
1076 fi
1077 done
1078
1079 ac_safe=`echo "sys/socket.h" | sed 'y%./+-%__p_%'`
1080 echo $ac_n "checking for sys/socket.h""... $ac_c" 1>&6
1081 echo "configure:1082: checking for sys/socket.h" >&5
1082 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1083   echo $ac_n "(cached) $ac_c" 1>&6
1084 else
1085   cat > conftest.$ac_ext <<EOF
1086 #line 1087 "configure"
1087 #include "confdefs.h"
1088 #include <sys/socket.h>
1089 EOF
1090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1091 { (eval echo configure:1092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1092 ac_err=`grep -v '^ *+' conftest.out`
1093 if test -z "$ac_err"; then
1094   rm -rf conftest*
1095   eval "ac_cv_header_$ac_safe=yes"
1096 else
1097   echo "$ac_err" >&5
1098   echo "configure: failed program was:" >&5
1099   cat conftest.$ac_ext >&5
1100   rm -rf conftest*
1101   eval "ac_cv_header_$ac_safe=no"
1102 fi
1103 rm -f conftest*
1104 fi
1105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1106   echo "$ac_t""yes" 1>&6
1107   cat >> confdefs.h <<\EOF
1108 #define SOCKET_AVAIL 1
1109 EOF
1110
1111   cat >> confdefs.h <<\EOF
1112 #define HAVE_SYS_SOCKET_H 1
1113 EOF
1114
1115 else
1116   echo "$ac_t""no" 1>&6
1117 fi
1118
1119 ac_header_dirent=no
1120 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1121 do
1122 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1123 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1124 echo "configure:1125: checking for $ac_hdr that defines DIR" >&5
1125 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1126   echo $ac_n "(cached) $ac_c" 1>&6
1127 else
1128   cat > conftest.$ac_ext <<EOF
1129 #line 1130 "configure"
1130 #include "confdefs.h"
1131 #include <sys/types.h>
1132 #include <$ac_hdr>
1133 int main() {
1134 DIR *dirp = 0;
1135 ; return 0; }
1136 EOF
1137 if { (eval echo configure:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1138   rm -rf conftest*
1139   eval "ac_cv_header_dirent_$ac_safe=yes"
1140 else
1141   echo "configure: failed program was:" >&5
1142   cat conftest.$ac_ext >&5
1143   rm -rf conftest*
1144   eval "ac_cv_header_dirent_$ac_safe=no"
1145 fi
1146 rm -f conftest*
1147 fi
1148 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1149   echo "$ac_t""yes" 1>&6
1150     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1151   cat >> confdefs.h <<EOF
1152 #define $ac_tr_hdr 1
1153 EOF
1154  ac_header_dirent=$ac_hdr; break
1155 else
1156   echo "$ac_t""no" 1>&6
1157 fi
1158 done
1159 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1160 if test $ac_header_dirent = dirent.h; then
1161 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1162 echo "configure:1163: checking for opendir in -ldir" >&5
1163 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1164 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1165   echo $ac_n "(cached) $ac_c" 1>&6
1166 else
1167   ac_save_LIBS="$LIBS"
1168 LIBS="-ldir  $LIBS"
1169 cat > conftest.$ac_ext <<EOF
1170 #line 1171 "configure"
1171 #include "confdefs.h"
1172 /* Override any gcc2 internal prototype to avoid an error.  */
1173 #ifdef __cplusplus
1174 extern "C"
1175 #endif
1176 /* We use char because int might match the return type of a gcc2
1177     builtin and then its argument prototype would still apply.  */
1178 char opendir();
1179
1180 int main() {
1181 opendir()
1182 ; return 0; }
1183 EOF
1184 if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1185   rm -rf conftest*
1186   eval "ac_cv_lib_$ac_lib_var=yes"
1187 else
1188   echo "configure: failed program was:" >&5
1189   cat conftest.$ac_ext >&5
1190   rm -rf conftest*
1191   eval "ac_cv_lib_$ac_lib_var=no"
1192 fi
1193 rm -f conftest*
1194 LIBS="$ac_save_LIBS"
1195
1196 fi
1197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1198   echo "$ac_t""yes" 1>&6
1199   LIBS="$LIBS -ldir"
1200 else
1201   echo "$ac_t""no" 1>&6
1202 fi
1203
1204 else
1205 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1206 echo "configure:1207: checking for opendir in -lx" >&5
1207 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1209   echo $ac_n "(cached) $ac_c" 1>&6
1210 else
1211   ac_save_LIBS="$LIBS"
1212 LIBS="-lx  $LIBS"
1213 cat > conftest.$ac_ext <<EOF
1214 #line 1215 "configure"
1215 #include "confdefs.h"
1216 /* Override any gcc2 internal prototype to avoid an error.  */
1217 #ifdef __cplusplus
1218 extern "C"
1219 #endif
1220 /* We use char because int might match the return type of a gcc2
1221     builtin and then its argument prototype would still apply.  */
1222 char opendir();
1223
1224 int main() {
1225 opendir()
1226 ; return 0; }
1227 EOF
1228 if { (eval echo configure:1229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1229   rm -rf conftest*
1230   eval "ac_cv_lib_$ac_lib_var=yes"
1231 else
1232   echo "configure: failed program was:" >&5
1233   cat conftest.$ac_ext >&5
1234   rm -rf conftest*
1235   eval "ac_cv_lib_$ac_lib_var=no"
1236 fi
1237 rm -f conftest*
1238 LIBS="$ac_save_LIBS"
1239
1240 fi
1241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1242   echo "$ac_t""yes" 1>&6
1243   LIBS="$LIBS -lx"
1244 else
1245   echo "$ac_t""no" 1>&6
1246 fi
1247
1248 fi
1249
1250
1251 # This must be after CXXCPP
1252
1253 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1254 echo "configure:1255: checking which header file defines FD_ macros" >&5
1255 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then
1256   echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258   s51_cv_fd="unknown"
1259 cat > conftest.$ac_ext <<EOF
1260 #line 1261 "configure"
1261 #include "confdefs.h"
1262
1263 #include <sys/time.h>
1264 #ifdef FD_ZERO
1265 yes
1266 #endif
1267 EOF
1268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1269   egrep "yes" >/dev/null 2>&1; then
1270   rm -rf conftest*
1271   s51_cv_fd="<sys/time.h>"
1272 fi
1273 rm -f conftest*
1274
1275 cat > conftest.$ac_ext <<EOF
1276 #line 1277 "configure"
1277 #include "confdefs.h"
1278
1279 #include <sys/types.h>
1280 #ifdef FD_ZERO
1281 yes
1282 #endif
1283 EOF
1284 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1285   egrep "yes" >/dev/null 2>&1; then
1286   rm -rf conftest*
1287   s51_cv_fd="<sys/types.h>"
1288 fi
1289 rm -f conftest*
1290
1291 cat > conftest.$ac_ext <<EOF
1292 #line 1293 "configure"
1293 #include "confdefs.h"
1294
1295 #include <sys/select.h>
1296 #ifdef FD_ZERO
1297 yes
1298 #endif
1299 EOF
1300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1301   egrep "yes" >/dev/null 2>&1; then
1302   rm -rf conftest*
1303   s51_cv_fd="<sys/types.h>"
1304 fi
1305 rm -f conftest*
1306
1307 fi
1308
1309 echo "$ac_t""$s51_cv_fd" 1>&6
1310
1311 cat >> confdefs.h <<\EOF
1312 #define FD_HEADER_OK 0
1313 EOF
1314
1315 if echo $s51_cv_fd|grep time >/dev/null 2>&1; then
1316 cat >> confdefs.h <<\EOF
1317 #define FD_NEED_TIME_H 1
1318 EOF
1319
1320 cat >> confdefs.h <<\EOF
1321 #define FD_HEADER_OK 1
1322 EOF
1323
1324 else
1325 cat >> confdefs.h <<\EOF
1326 #define FD_NEED_TIME_H 0
1327 EOF
1328
1329 fi
1330 if echo $s51_cv_fd|grep types >/dev/null 2>&1; then
1331 cat >> confdefs.h <<\EOF
1332 #define FD_NEED_TYPES_H 1
1333 EOF
1334
1335 cat >> confdefs.h <<\EOF
1336 #define FD_HEADER_OK 1
1337 EOF
1338
1339 else
1340 cat >> confdefs.h <<\EOF
1341 #define FD_NEED_TYPES_H 0
1342 EOF
1343
1344 fi
1345 if echo $s51_cv_fd|grep select >/dev/null 2>&1; then
1346 cat >> confdefs.h <<\EOF
1347 #define FD_NEED_SELECT_H 1
1348 EOF
1349
1350 cat >> confdefs.h <<\EOF
1351 #define FD_HEADER_OK 1
1352 EOF
1353
1354 else
1355 cat >> confdefs.h <<\EOF
1356 #define FD_NEED_SELECT_H 0
1357 EOF
1358
1359 fi
1360
1361 cat >> confdefs.h <<EOF
1362 #define HEADER_FD ${s51_cv_fd}
1363 EOF
1364
1365
1366
1367 # Checking for functions/libs
1368 # ===========================================================================
1369 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1370 echo "configure:1371: checking for socket in -lsocket" >&5
1371 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1372 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1373   echo $ac_n "(cached) $ac_c" 1>&6
1374 else
1375   ac_save_LIBS="$LIBS"
1376 LIBS="-lsocket  $LIBS"
1377 cat > conftest.$ac_ext <<EOF
1378 #line 1379 "configure"
1379 #include "confdefs.h"
1380 /* Override any gcc2 internal prototype to avoid an error.  */
1381 #ifdef __cplusplus
1382 extern "C"
1383 #endif
1384 /* We use char because int might match the return type of a gcc2
1385     builtin and then its argument prototype would still apply.  */
1386 char socket();
1387
1388 int main() {
1389 socket()
1390 ; return 0; }
1391 EOF
1392 if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1393   rm -rf conftest*
1394   eval "ac_cv_lib_$ac_lib_var=yes"
1395 else
1396   echo "configure: failed program was:" >&5
1397   cat conftest.$ac_ext >&5
1398   rm -rf conftest*
1399   eval "ac_cv_lib_$ac_lib_var=no"
1400 fi
1401 rm -f conftest*
1402 LIBS="$ac_save_LIBS"
1403
1404 fi
1405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1406   echo "$ac_t""yes" 1>&6
1407     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1408     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1409   cat >> confdefs.h <<EOF
1410 #define $ac_tr_lib 1
1411 EOF
1412
1413   LIBS="-lsocket $LIBS"
1414
1415 else
1416   echo "$ac_t""no" 1>&6
1417 fi
1418
1419 echo $ac_n "checking for xdr_short in -lnsl""... $ac_c" 1>&6
1420 echo "configure:1421: checking for xdr_short in -lnsl" >&5
1421 ac_lib_var=`echo nsl'_'xdr_short | sed 'y%./+-%__p_%'`
1422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1423   echo $ac_n "(cached) $ac_c" 1>&6
1424 else
1425   ac_save_LIBS="$LIBS"
1426 LIBS="-lnsl  $LIBS"
1427 cat > conftest.$ac_ext <<EOF
1428 #line 1429 "configure"
1429 #include "confdefs.h"
1430 /* Override any gcc2 internal prototype to avoid an error.  */
1431 #ifdef __cplusplus
1432 extern "C"
1433 #endif
1434 /* We use char because int might match the return type of a gcc2
1435     builtin and then its argument prototype would still apply.  */
1436 char xdr_short();
1437
1438 int main() {
1439 xdr_short()
1440 ; return 0; }
1441 EOF
1442 if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1443   rm -rf conftest*
1444   eval "ac_cv_lib_$ac_lib_var=yes"
1445 else
1446   echo "configure: failed program was:" >&5
1447   cat conftest.$ac_ext >&5
1448   rm -rf conftest*
1449   eval "ac_cv_lib_$ac_lib_var=no"
1450 fi
1451 rm -f conftest*
1452 LIBS="$ac_save_LIBS"
1453
1454 fi
1455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1456   echo "$ac_t""yes" 1>&6
1457     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1458     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1459   cat >> confdefs.h <<EOF
1460 #define $ac_tr_lib 1
1461 EOF
1462
1463   LIBS="-lnsl $LIBS"
1464
1465 else
1466   echo "$ac_t""no" 1>&6
1467 fi
1468
1469 echo $ac_n "checking for panel_above in -lpanel""... $ac_c" 1>&6
1470 echo "configure:1471: checking for panel_above in -lpanel" >&5
1471 ac_lib_var=`echo panel'_'panel_above | sed 'y%./+-%__p_%'`
1472 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1473   echo $ac_n "(cached) $ac_c" 1>&6
1474 else
1475   ac_save_LIBS="$LIBS"
1476 LIBS="-lpanel -lcurses $LIBS"
1477 cat > conftest.$ac_ext <<EOF
1478 #line 1479 "configure"
1479 #include "confdefs.h"
1480 /* Override any gcc2 internal prototype to avoid an error.  */
1481 #ifdef __cplusplus
1482 extern "C"
1483 #endif
1484 /* We use char because int might match the return type of a gcc2
1485     builtin and then its argument prototype would still apply.  */
1486 char panel_above();
1487
1488 int main() {
1489 panel_above()
1490 ; return 0; }
1491 EOF
1492 if { (eval echo configure:1493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1493   rm -rf conftest*
1494   eval "ac_cv_lib_$ac_lib_var=yes"
1495 else
1496   echo "configure: failed program was:" >&5
1497   cat conftest.$ac_ext >&5
1498   rm -rf conftest*
1499   eval "ac_cv_lib_$ac_lib_var=no"
1500 fi
1501 rm -f conftest*
1502 LIBS="$ac_save_LIBS"
1503
1504 fi
1505 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1506   echo "$ac_t""yes" 1>&6
1507   panel_ok="yes"
1508 curses_ok="yes"
1509 LIBS="$LIBS -lpanel -lcurses"
1510
1511 else
1512   echo "$ac_t""no" 1>&6
1513 panel_ok="no"
1514 echo $ac_n "checking for nl in -lcurses""... $ac_c" 1>&6
1515 echo "configure:1516: checking for nl in -lcurses" >&5
1516 ac_lib_var=`echo curses'_'nl | sed 'y%./+-%__p_%'`
1517 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1518   echo $ac_n "(cached) $ac_c" 1>&6
1519 else
1520   ac_save_LIBS="$LIBS"
1521 LIBS="-lcurses  $LIBS"
1522 cat > conftest.$ac_ext <<EOF
1523 #line 1524 "configure"
1524 #include "confdefs.h"
1525 /* Override any gcc2 internal prototype to avoid an error.  */
1526 #ifdef __cplusplus
1527 extern "C"
1528 #endif
1529 /* We use char because int might match the return type of a gcc2
1530     builtin and then its argument prototype would still apply.  */
1531 char nl();
1532
1533 int main() {
1534 nl()
1535 ; return 0; }
1536 EOF
1537 if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1538   rm -rf conftest*
1539   eval "ac_cv_lib_$ac_lib_var=yes"
1540 else
1541   echo "configure: failed program was:" >&5
1542   cat conftest.$ac_ext >&5
1543   rm -rf conftest*
1544   eval "ac_cv_lib_$ac_lib_var=no"
1545 fi
1546 rm -f conftest*
1547 LIBS="$ac_save_LIBS"
1548
1549 fi
1550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1551   echo "$ac_t""yes" 1>&6
1552   curses_ok="yes"
1553 LIBS="$LIBS -lcurses"
1554
1555 else
1556   echo "$ac_t""no" 1>&6
1557 ncurses_ok="no"
1558 fi
1559
1560
1561 fi
1562
1563
1564
1565
1566 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1567 echo "configure:1568: checking for vprintf" >&5
1568 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1569   echo $ac_n "(cached) $ac_c" 1>&6
1570 else
1571   cat > conftest.$ac_ext <<EOF
1572 #line 1573 "configure"
1573 #include "confdefs.h"
1574 /* System header to define __stub macros and hopefully few prototypes,
1575     which can conflict with char vprintf(); below.  */
1576 #include <assert.h>
1577 /* Override any gcc2 internal prototype to avoid an error.  */
1578 #ifdef __cplusplus
1579 extern "C"
1580 #endif
1581 /* We use char because int might match the return type of a gcc2
1582     builtin and then its argument prototype would still apply.  */
1583 char vprintf();
1584
1585 int main() {
1586
1587 /* The GNU C library defines this for functions which it implements
1588     to always fail with ENOSYS.  Some functions are actually named
1589     something starting with __ and the normal name is an alias.  */
1590 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1591 choke me
1592 #else
1593 vprintf();
1594 #endif
1595
1596 ; return 0; }
1597 EOF
1598 if { (eval echo configure:1599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1599   rm -rf conftest*
1600   eval "ac_cv_func_vprintf=yes"
1601 else
1602   echo "configure: failed program was:" >&5
1603   cat conftest.$ac_ext >&5
1604   rm -rf conftest*
1605   eval "ac_cv_func_vprintf=no"
1606 fi
1607 rm -f conftest*
1608 fi
1609
1610 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1611   echo "$ac_t""yes" 1>&6
1612   cat >> confdefs.h <<\EOF
1613 #define HAVE_VPRINTF 1
1614 EOF
1615
1616 else
1617   echo "$ac_t""no" 1>&6
1618 fi
1619
1620 if test "$ac_cv_func_vprintf" != yes; then
1621 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1622 echo "configure:1623: checking for _doprnt" >&5
1623 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1624   echo $ac_n "(cached) $ac_c" 1>&6
1625 else
1626   cat > conftest.$ac_ext <<EOF
1627 #line 1628 "configure"
1628 #include "confdefs.h"
1629 /* System header to define __stub macros and hopefully few prototypes,
1630     which can conflict with char _doprnt(); below.  */
1631 #include <assert.h>
1632 /* Override any gcc2 internal prototype to avoid an error.  */
1633 #ifdef __cplusplus
1634 extern "C"
1635 #endif
1636 /* We use char because int might match the return type of a gcc2
1637     builtin and then its argument prototype would still apply.  */
1638 char _doprnt();
1639
1640 int main() {
1641
1642 /* The GNU C library defines this for functions which it implements
1643     to always fail with ENOSYS.  Some functions are actually named
1644     something starting with __ and the normal name is an alias.  */
1645 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1646 choke me
1647 #else
1648 _doprnt();
1649 #endif
1650
1651 ; return 0; }
1652 EOF
1653 if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1654   rm -rf conftest*
1655   eval "ac_cv_func__doprnt=yes"
1656 else
1657   echo "configure: failed program was:" >&5
1658   cat conftest.$ac_ext >&5
1659   rm -rf conftest*
1660   eval "ac_cv_func__doprnt=no"
1661 fi
1662 rm -f conftest*
1663 fi
1664
1665 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1666   echo "$ac_t""yes" 1>&6
1667   cat >> confdefs.h <<\EOF
1668 #define HAVE_DOPRNT 1
1669 EOF
1670
1671 else
1672   echo "$ac_t""no" 1>&6
1673 fi
1674
1675 fi
1676
1677 for ac_func in vsnprintf vasprintf
1678 do
1679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1680 echo "configure:1681: checking for $ac_func" >&5
1681 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1682   echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684   cat > conftest.$ac_ext <<EOF
1685 #line 1686 "configure"
1686 #include "confdefs.h"
1687 /* System header to define __stub macros and hopefully few prototypes,
1688     which can conflict with char $ac_func(); below.  */
1689 #include <assert.h>
1690 /* Override any gcc2 internal prototype to avoid an error.  */
1691 #ifdef __cplusplus
1692 extern "C"
1693 #endif
1694 /* We use char because int might match the return type of a gcc2
1695     builtin and then its argument prototype would still apply.  */
1696 char $ac_func();
1697
1698 int main() {
1699
1700 /* The GNU C library defines this for functions which it implements
1701     to always fail with ENOSYS.  Some functions are actually named
1702     something starting with __ and the normal name is an alias.  */
1703 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1704 choke me
1705 #else
1706 $ac_func();
1707 #endif
1708
1709 ; return 0; }
1710 EOF
1711 if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1712   rm -rf conftest*
1713   eval "ac_cv_func_$ac_func=yes"
1714 else
1715   echo "configure: failed program was:" >&5
1716   cat conftest.$ac_ext >&5
1717   rm -rf conftest*
1718   eval "ac_cv_func_$ac_func=no"
1719 fi
1720 rm -f conftest*
1721 fi
1722
1723 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1724   echo "$ac_t""yes" 1>&6
1725     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1726   cat >> confdefs.h <<EOF
1727 #define $ac_tr_func 1
1728 EOF
1729  
1730 else
1731   echo "$ac_t""no" 1>&6
1732 fi
1733 done
1734
1735 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
1736 do
1737 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1738 echo "configure:1739: checking for $ac_func" >&5
1739 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1740   echo $ac_n "(cached) $ac_c" 1>&6
1741 else
1742   cat > conftest.$ac_ext <<EOF
1743 #line 1744 "configure"
1744 #include "confdefs.h"
1745 /* System header to define __stub macros and hopefully few prototypes,
1746     which can conflict with char $ac_func(); below.  */
1747 #include <assert.h>
1748 /* Override any gcc2 internal prototype to avoid an error.  */
1749 #ifdef __cplusplus
1750 extern "C"
1751 #endif
1752 /* We use char because int might match the return type of a gcc2
1753     builtin and then its argument prototype would still apply.  */
1754 char $ac_func();
1755
1756 int main() {
1757
1758 /* The GNU C library defines this for functions which it implements
1759     to always fail with ENOSYS.  Some functions are actually named
1760     something starting with __ and the normal name is an alias.  */
1761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1762 choke me
1763 #else
1764 $ac_func();
1765 #endif
1766
1767 ; return 0; }
1768 EOF
1769 if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1770   rm -rf conftest*
1771   eval "ac_cv_func_$ac_func=yes"
1772 else
1773   echo "configure: failed program was:" >&5
1774   cat conftest.$ac_ext >&5
1775   rm -rf conftest*
1776   eval "ac_cv_func_$ac_func=no"
1777 fi
1778 rm -f conftest*
1779 fi
1780
1781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1782   echo "$ac_t""yes" 1>&6
1783     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1784   cat >> confdefs.h <<EOF
1785 #define $ac_tr_func 1
1786 EOF
1787  
1788 else
1789   echo "$ac_t""no" 1>&6
1790 fi
1791 done
1792
1793 for ac_func in strchr memcpy
1794 do
1795 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1796 echo "configure:1797: checking for $ac_func" >&5
1797 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1798   echo $ac_n "(cached) $ac_c" 1>&6
1799 else
1800   cat > conftest.$ac_ext <<EOF
1801 #line 1802 "configure"
1802 #include "confdefs.h"
1803 /* System header to define __stub macros and hopefully few prototypes,
1804     which can conflict with char $ac_func(); below.  */
1805 #include <assert.h>
1806 /* Override any gcc2 internal prototype to avoid an error.  */
1807 #ifdef __cplusplus
1808 extern "C"
1809 #endif
1810 /* We use char because int might match the return type of a gcc2
1811     builtin and then its argument prototype would still apply.  */
1812 char $ac_func();
1813
1814 int main() {
1815
1816 /* The GNU C library defines this for functions which it implements
1817     to always fail with ENOSYS.  Some functions are actually named
1818     something starting with __ and the normal name is an alias.  */
1819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1820 choke me
1821 #else
1822 $ac_func();
1823 #endif
1824
1825 ; return 0; }
1826 EOF
1827 if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1828   rm -rf conftest*
1829   eval "ac_cv_func_$ac_func=yes"
1830 else
1831   echo "configure: failed program was:" >&5
1832   cat conftest.$ac_ext >&5
1833   rm -rf conftest*
1834   eval "ac_cv_func_$ac_func=no"
1835 fi
1836 rm -f conftest*
1837 fi
1838
1839 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1840   echo "$ac_t""yes" 1>&6
1841     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1842   cat >> confdefs.h <<EOF
1843 #define $ac_tr_func 1
1844 EOF
1845  
1846 else
1847   echo "$ac_t""no" 1>&6
1848 fi
1849 done
1850
1851 for ac_func in fgets
1852 do
1853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1854 echo "configure:1855: checking for $ac_func" >&5
1855 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856   echo $ac_n "(cached) $ac_c" 1>&6
1857 else
1858   cat > conftest.$ac_ext <<EOF
1859 #line 1860 "configure"
1860 #include "confdefs.h"
1861 /* System header to define __stub macros and hopefully few prototypes,
1862     which can conflict with char $ac_func(); below.  */
1863 #include <assert.h>
1864 /* Override any gcc2 internal prototype to avoid an error.  */
1865 #ifdef __cplusplus
1866 extern "C"
1867 #endif
1868 /* We use char because int might match the return type of a gcc2
1869     builtin and then its argument prototype would still apply.  */
1870 char $ac_func();
1871
1872 int main() {
1873
1874 /* The GNU C library defines this for functions which it implements
1875     to always fail with ENOSYS.  Some functions are actually named
1876     something starting with __ and the normal name is an alias.  */
1877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1878 choke me
1879 #else
1880 $ac_func();
1881 #endif
1882
1883 ; return 0; }
1884 EOF
1885 if { (eval echo configure:1886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1886   rm -rf conftest*
1887   eval "ac_cv_func_$ac_func=yes"
1888 else
1889   echo "configure: failed program was:" >&5
1890   cat conftest.$ac_ext >&5
1891   rm -rf conftest*
1892   eval "ac_cv_func_$ac_func=no"
1893 fi
1894 rm -f conftest*
1895 fi
1896
1897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1898   echo "$ac_t""yes" 1>&6
1899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1900   cat >> confdefs.h <<EOF
1901 #define $ac_tr_func 1
1902 EOF
1903  
1904 else
1905   echo "$ac_t""no" 1>&6
1906 fi
1907 done
1908
1909 for ac_func in yylex
1910 do
1911 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1912 echo "configure:1913: checking for $ac_func" >&5
1913 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1914   echo $ac_n "(cached) $ac_c" 1>&6
1915 else
1916   cat > conftest.$ac_ext <<EOF
1917 #line 1918 "configure"
1918 #include "confdefs.h"
1919 /* System header to define __stub macros and hopefully few prototypes,
1920     which can conflict with char $ac_func(); below.  */
1921 #include <assert.h>
1922 /* Override any gcc2 internal prototype to avoid an error.  */
1923 #ifdef __cplusplus
1924 extern "C"
1925 #endif
1926 /* We use char because int might match the return type of a gcc2
1927     builtin and then its argument prototype would still apply.  */
1928 char $ac_func();
1929
1930 int main() {
1931
1932 /* The GNU C library defines this for functions which it implements
1933     to always fail with ENOSYS.  Some functions are actually named
1934     something starting with __ and the normal name is an alias.  */
1935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1936 choke me
1937 #else
1938 $ac_func();
1939 #endif
1940
1941 ; return 0; }
1942 EOF
1943 if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1944   rm -rf conftest*
1945   eval "ac_cv_func_$ac_func=yes"
1946 else
1947   echo "configure: failed program was:" >&5
1948   cat conftest.$ac_ext >&5
1949   rm -rf conftest*
1950   eval "ac_cv_func_$ac_func=no"
1951 fi
1952 rm -f conftest*
1953 fi
1954
1955 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1956   echo "$ac_t""yes" 1>&6
1957     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1958   cat >> confdefs.h <<EOF
1959 #define $ac_tr_func 1
1960 EOF
1961  
1962 else
1963   echo "$ac_t""no" 1>&6
1964 fi
1965 done
1966
1967
1968 echo $ac_n "checking whether scanf knows %a""... $ac_c" 1>&6
1969 echo "configure:1970: checking whether scanf knows %a" >&5
1970 if eval "test \"`echo '$''{'s51_cv_scanf_a'+set}'`\" = set"; then
1971   echo $ac_n "(cached) $ac_c" 1>&6
1972 else
1973   echo "a b" >conftest.data
1974 if test "$cross_compiling" = yes; then
1975   s51_cv_scanf_a="unknown"
1976 else
1977   cat > conftest.$ac_ext <<EOF
1978 #line 1979 "configure"
1979 #include "confdefs.h"
1980 #ifdef __cplusplus
1981 extern "C" void exit(int);
1982 #endif
1983
1984 #include <stdio.h>
1985 void main(void)
1986 {
1987   FILE *f;
1988   char *a;
1989   int  i;
1990   if ((f= fopen("conftest.data", "r")) == NULL)
1991     exit(1);
1992   i= fscanf(f, " %a[a-z] ", &a);
1993   fclose(f);
1994   if (i == 0)
1995     exit(2);
1996   if (i == 1)
1997     exit(0);
1998   exit(3);
1999 }
2000 EOF
2001 if { (eval echo configure:2002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2002 then
2003   s51_cv_scanf_a="yes"
2004 else
2005   echo "configure: failed program was:" >&5
2006   cat conftest.$ac_ext >&5
2007   rm -fr conftest*
2008   s51_cv_scanf_a="no"
2009 fi
2010 rm -fr conftest*
2011 fi
2012
2013
2014 fi
2015
2016 echo "$ac_t""$s51_cv_scanf_a" 1>&6
2017 if test "$s51_cv_scanf_a" = "yes"; then
2018   cat >> confdefs.h <<\EOF
2019 #define SCANF_A 1
2020 EOF
2021
2022 fi
2023
2024 echo $ac_n "checking whether getcwd is GNUish""... $ac_c" 1>&6
2025 echo "configure:2026: checking whether getcwd is GNUish" >&5
2026 if eval "test \"`echo '$''{'s51_cv_getcwd'+set}'`\" = set"; then
2027   echo $ac_n "(cached) $ac_c" 1>&6
2028 else
2029   if test "$cross_compiling" = yes; then
2030   s51_cv_getcwd="unknown"
2031 else
2032   cat > conftest.$ac_ext <<EOF
2033 #line 2034 "configure"
2034 #include "confdefs.h"
2035 #ifdef __cplusplus
2036 extern "C" void exit(int);
2037 #endif
2038
2039 #include <unistd.h>
2040 void main(void)
2041 {
2042   if ((getcwd(NULL, 0)) == NULL)
2043     exit(1);
2044   exit(0);
2045 }
2046 EOF
2047 if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2048 then
2049   s51_cv_getcwd="yes"
2050 else
2051   echo "configure: failed program was:" >&5
2052   cat conftest.$ac_ext >&5
2053   rm -fr conftest*
2054   s51_cv_getcwd="no"
2055 fi
2056 rm -fr conftest*
2057 fi
2058
2059
2060 fi
2061
2062 echo "$ac_t""$s51_cv_getcwd" 1>&6
2063 if test "$s51_cv_getcwd" = "yes"; then
2064   cat >> confdefs.h <<\EOF
2065 #define GNU_GETCWD 1
2066 EOF
2067
2068 fi
2069
2070
2071 # Macro definitions
2072 ###################
2073
2074 # DD_COPT macro checks if the compiler specified as the 1st parameter
2075 # supports option specified as the 2nd parameter
2076 # For example: DD_CPORT(CXX, fPIC)
2077
2078
2079
2080
2081 # Checking characteristics of compilers and other programs
2082 # --------------------------------------------------------
2083 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2084 echo "configure:2085: checking whether byte ordering is bigendian" >&5
2085 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2086   echo $ac_n "(cached) $ac_c" 1>&6
2087 else
2088   ac_cv_c_bigendian=unknown
2089 # See if sys/param.h defines the BYTE_ORDER macro.
2090 cat > conftest.$ac_ext <<EOF
2091 #line 2092 "configure"
2092 #include "confdefs.h"
2093 #include <sys/types.h>
2094 #include <sys/param.h>
2095 int main() {
2096
2097 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2098  bogus endian macros
2099 #endif
2100 ; return 0; }
2101 EOF
2102 if { (eval echo configure:2103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2103   rm -rf conftest*
2104   # It does; now see whether it defined to BIG_ENDIAN or not.
2105 cat > conftest.$ac_ext <<EOF
2106 #line 2107 "configure"
2107 #include "confdefs.h"
2108 #include <sys/types.h>
2109 #include <sys/param.h>
2110 int main() {
2111
2112 #if BYTE_ORDER != BIG_ENDIAN
2113  not big endian
2114 #endif
2115 ; return 0; }
2116 EOF
2117 if { (eval echo configure:2118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2118   rm -rf conftest*
2119   ac_cv_c_bigendian=yes
2120 else
2121   echo "configure: failed program was:" >&5
2122   cat conftest.$ac_ext >&5
2123   rm -rf conftest*
2124   ac_cv_c_bigendian=no
2125 fi
2126 rm -f conftest*
2127 else
2128   echo "configure: failed program was:" >&5
2129   cat conftest.$ac_ext >&5
2130 fi
2131 rm -f conftest*
2132 if test $ac_cv_c_bigendian = unknown; then
2133 if test "$cross_compiling" = yes; then
2134     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2135 else
2136   cat > conftest.$ac_ext <<EOF
2137 #line 2138 "configure"
2138 #include "confdefs.h"
2139 #ifdef __cplusplus
2140 extern "C" void exit(int);
2141 #endif
2142 main () {
2143   /* Are we little or big endian?  From Harbison&Steele.  */
2144   union
2145   {
2146     long l;
2147     char c[sizeof (long)];
2148   } u;
2149   u.l = 1;
2150   exit (u.c[sizeof (long) - 1] == 1);
2151 }
2152 EOF
2153 if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2154 then
2155   ac_cv_c_bigendian=no
2156 else
2157   echo "configure: failed program was:" >&5
2158   cat conftest.$ac_ext >&5
2159   rm -fr conftest*
2160   ac_cv_c_bigendian=yes
2161 fi
2162 rm -fr conftest*
2163 fi
2164
2165 fi
2166 fi
2167
2168 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2169 if test $ac_cv_c_bigendian = yes; then
2170   cat >> confdefs.h <<\EOF
2171 #define WORDS_BIGENDIAN 1
2172 EOF
2173
2174 fi
2175
2176 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2177 echo "configure:2178: checking whether preprocessor accepts -MM or -M" >&5
2178 if eval "test \"`echo '$''{'s51_cv_MM'+set}'`\" = set"; then
2179   echo $ac_n "(cached) $ac_c" 1>&6
2180 else
2181   echo "#include <stdio.h>" >_test_.c
2182 echo "" >>_test_.c
2183 $CXXCPP -v -MM _test_.c 1>&5 2>&5
2184 if test "$?" = "0"; then
2185   s51_cv_MM="-MM"
2186 else
2187   s51_cv_MM="-M"
2188 fi
2189 rm -f _test_.*
2190 fi
2191
2192 echo "$ac_t""$s51_cv_MM" 1>&6
2193 M_OR_MM=$s51_cv_MM
2194
2195
2196 # This is the first time when CFLAGS are set/modified!!
2197
2198
2199 echo $ac_n "checking whether $CXX accepts -ggdb""... $ac_c" 1>&6
2200 echo "configure:2201: checking whether $CXX accepts -ggdb" >&5
2201 if eval "test \"`echo '$''{'s51_cv_CXXggdb'+set}'`\" = set"; then
2202   echo $ac_n "(cached) $ac_c" 1>&6
2203 else
2204   cat >_test_.c <<EOF
2205 #include <stdio.h>
2206 void main(void) {}
2207 EOF
2208 $CXX -v -ggdb -c _test_.c 1>&5 2>&5
2209 if test "$?" = "0"; then
2210   s51_cv_CXXggdb="yes"
2211 else
2212   s51_cv_CXXggdb="no"
2213 fi
2214 rm -f _test_.* a.out
2215 fi
2216
2217 echo "$ac_t""$s51_cv_CXXggdb" 1>&6
2218
2219 if test "$s51_cv_CXXggdb" = "yes"; then
2220     if test "$CXXFLAGS"x = x ;then
2221         CXXFLAGS="-ggdb -O"
2222     else
2223         CXXFLAGS="$CXXFLAGS -ggdb"
2224     fi
2225 fi
2226
2227
2228 echo $ac_n "checking whether $CXX accepts -pipe""... $ac_c" 1>&6
2229 echo "configure:2230: checking whether $CXX accepts -pipe" >&5
2230 if eval "test \"`echo '$''{'s51_cv_CXXpipe'+set}'`\" = set"; then
2231   echo $ac_n "(cached) $ac_c" 1>&6
2232 else
2233   cat >_test_.c <<EOF
2234 #include <stdio.h>
2235 void main(void) {}
2236 EOF
2237 $CXX -v -pipe -c _test_.c 1>&5 2>&5
2238 if test "$?" = "0"; then
2239   s51_cv_CXXpipe="yes"
2240 else
2241   s51_cv_CXXpipe="no"
2242 fi
2243 rm -f _test_.* a.out
2244 fi
2245
2246 echo "$ac_t""$s51_cv_CXXpipe" 1>&6
2247
2248 if test "$s51_cv_CXXpipe" = "yes"; then
2249   CXXFLAGS="$CXXFLAGS -pipe"
2250 fi
2251
2252
2253 # Checks for typedefs, structures, and compiler characteristics.
2254 # ===========================================================================
2255
2256 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2257 echo "configure:2258: checking return type of signal handlers" >&5
2258 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2259   echo $ac_n "(cached) $ac_c" 1>&6
2260 else
2261   cat > conftest.$ac_ext <<EOF
2262 #line 2263 "configure"
2263 #include "confdefs.h"
2264 #include <sys/types.h>
2265 #include <signal.h>
2266 #ifdef signal
2267 #undef signal
2268 #endif
2269 #ifdef __cplusplus
2270 extern "C" void (*signal (int, void (*)(int)))(int);
2271 #else
2272 void (*signal ()) ();
2273 #endif
2274
2275 int main() {
2276 int i;
2277 ; return 0; }
2278 EOF
2279 if { (eval echo configure:2280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2280   rm -rf conftest*
2281   ac_cv_type_signal=void
2282 else
2283   echo "configure: failed program was:" >&5
2284   cat conftest.$ac_ext >&5
2285   rm -rf conftest*
2286   ac_cv_type_signal=int
2287 fi
2288 rm -f conftest*
2289 fi
2290
2291 echo "$ac_t""$ac_cv_type_signal" 1>&6
2292 cat >> confdefs.h <<EOF
2293 #define RETSIGTYPE $ac_cv_type_signal
2294 EOF
2295
2296
2297 echo $ac_n "checking size of char""... $ac_c" 1>&6
2298 echo "configure:2299: checking size of char" >&5
2299 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2300   echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302   if test "$cross_compiling" = yes; then
2303     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2304 else
2305   cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #ifdef __cplusplus
2309 extern "C" void exit(int);
2310 #endif
2311 #include <stdio.h>
2312 main()
2313 {
2314   FILE *f=fopen("conftestval", "w");
2315   if (!f) exit(1);
2316   fprintf(f, "%d\n", sizeof(char));
2317   exit(0);
2318 }
2319 EOF
2320 if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2321 then
2322   ac_cv_sizeof_char=`cat conftestval`
2323 else
2324   echo "configure: failed program was:" >&5
2325   cat conftest.$ac_ext >&5
2326   rm -fr conftest*
2327   ac_cv_sizeof_char=0
2328 fi
2329 rm -fr conftest*
2330 fi
2331
2332 fi
2333 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2334 cat >> confdefs.h <<EOF
2335 #define SIZEOF_CHAR $ac_cv_sizeof_char
2336 EOF
2337
2338
2339 echo $ac_n "checking size of short""... $ac_c" 1>&6
2340 echo "configure:2341: checking size of short" >&5
2341 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2342   echo $ac_n "(cached) $ac_c" 1>&6
2343 else
2344   if test "$cross_compiling" = yes; then
2345     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2346 else
2347   cat > conftest.$ac_ext <<EOF
2348 #line 2349 "configure"
2349 #include "confdefs.h"
2350 #ifdef __cplusplus
2351 extern "C" void exit(int);
2352 #endif
2353 #include <stdio.h>
2354 main()
2355 {
2356   FILE *f=fopen("conftestval", "w");
2357   if (!f) exit(1);
2358   fprintf(f, "%d\n", sizeof(short));
2359   exit(0);
2360 }
2361 EOF
2362 if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2363 then
2364   ac_cv_sizeof_short=`cat conftestval`
2365 else
2366   echo "configure: failed program was:" >&5
2367   cat conftest.$ac_ext >&5
2368   rm -fr conftest*
2369   ac_cv_sizeof_short=0
2370 fi
2371 rm -fr conftest*
2372 fi
2373
2374 fi
2375 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2376 cat >> confdefs.h <<EOF
2377 #define SIZEOF_SHORT $ac_cv_sizeof_short
2378 EOF
2379
2380
2381 echo $ac_n "checking size of int""... $ac_c" 1>&6
2382 echo "configure:2383: checking size of int" >&5
2383 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2384   echo $ac_n "(cached) $ac_c" 1>&6
2385 else
2386   if test "$cross_compiling" = yes; then
2387     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2388 else
2389   cat > conftest.$ac_ext <<EOF
2390 #line 2391 "configure"
2391 #include "confdefs.h"
2392 #ifdef __cplusplus
2393 extern "C" void exit(int);
2394 #endif
2395 #include <stdio.h>
2396 main()
2397 {
2398   FILE *f=fopen("conftestval", "w");
2399   if (!f) exit(1);
2400   fprintf(f, "%d\n", sizeof(int));
2401   exit(0);
2402 }
2403 EOF
2404 if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2405 then
2406   ac_cv_sizeof_int=`cat conftestval`
2407 else
2408   echo "configure: failed program was:" >&5
2409   cat conftest.$ac_ext >&5
2410   rm -fr conftest*
2411   ac_cv_sizeof_int=0
2412 fi
2413 rm -fr conftest*
2414 fi
2415
2416 fi
2417 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2418 cat >> confdefs.h <<EOF
2419 #define SIZEOF_INT $ac_cv_sizeof_int
2420 EOF
2421
2422
2423 echo $ac_n "checking size of long""... $ac_c" 1>&6
2424 echo "configure:2425: checking size of long" >&5
2425 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2426   echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428   if test "$cross_compiling" = yes; then
2429     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2430 else
2431   cat > conftest.$ac_ext <<EOF
2432 #line 2433 "configure"
2433 #include "confdefs.h"
2434 #ifdef __cplusplus
2435 extern "C" void exit(int);
2436 #endif
2437 #include <stdio.h>
2438 main()
2439 {
2440   FILE *f=fopen("conftestval", "w");
2441   if (!f) exit(1);
2442   fprintf(f, "%d\n", sizeof(long));
2443   exit(0);
2444 }
2445 EOF
2446 if { (eval echo configure:2447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2447 then
2448   ac_cv_sizeof_long=`cat conftestval`
2449 else
2450   echo "configure: failed program was:" >&5
2451   cat conftest.$ac_ext >&5
2452   rm -fr conftest*
2453   ac_cv_sizeof_long=0
2454 fi
2455 rm -fr conftest*
2456 fi
2457
2458 fi
2459 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2460 cat >> confdefs.h <<EOF
2461 #define SIZEOF_LONG $ac_cv_sizeof_long
2462 EOF
2463
2464
2465 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2466 echo "configure:2467: checking size of long long" >&5
2467 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2468   echo $ac_n "(cached) $ac_c" 1>&6
2469 else
2470   if test "$cross_compiling" = yes; then
2471     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2472 else
2473   cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2476 #ifdef __cplusplus
2477 extern "C" void exit(int);
2478 #endif
2479 #include <stdio.h>
2480 main()
2481 {
2482   FILE *f=fopen("conftestval", "w");
2483   if (!f) exit(1);
2484   fprintf(f, "%d\n", sizeof(long long));
2485   exit(0);
2486 }
2487 EOF
2488 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2489 then
2490   ac_cv_sizeof_long_long=`cat conftestval`
2491 else
2492   echo "configure: failed program was:" >&5
2493   cat conftest.$ac_ext >&5
2494   rm -fr conftest*
2495   ac_cv_sizeof_long_long=0
2496 fi
2497 rm -fr conftest*
2498 fi
2499
2500 fi
2501 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2502 cat >> confdefs.h <<EOF
2503 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2504 EOF
2505
2506
2507
2508 type_name()
2509 {
2510     if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
2511         echo "char"
2512         exit
2513     fi
2514     if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
2515         echo "short"
2516         exit
2517     fi
2518     if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
2519         echo "int"
2520         exit
2521     fi
2522     if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
2523         echo "long"
2524         exit
2525     fi
2526     if expr "$ac_cv_sizeof_long_long" '>=' "$1" >/dev/null; then
2527         echo "long long"
2528         exit
2529     fi
2530     echo "long long"
2531 }
2532
2533 echo $ac_n "checking type name for byte""... $ac_c" 1>&6
2534 echo "configure:2535: checking type name for byte" >&5
2535 TYPE_BYTE=`type_name 1`
2536 echo "$ac_t""$TYPE_BYTE" 1>&6
2537 echo $ac_n "checking type name for word""... $ac_c" 1>&6
2538 echo "configure:2539: checking type name for word" >&5
2539 TYPE_WORD=`type_name 2`
2540 echo "$ac_t""$TYPE_WORD" 1>&6
2541 echo $ac_n "checking type name for dword""... $ac_c" 1>&6
2542 echo "configure:2543: checking type name for dword" >&5
2543 TYPE_DWORD=`type_name 4`
2544 echo "$ac_t""$TYPE_DWORD" 1>&6
2545 cat >> confdefs.h <<EOF
2546 #define TYPE_BYTE $TYPE_BYTE
2547 EOF
2548
2549 cat >> confdefs.h <<EOF
2550 #define TYPE_WORD $TYPE_WORD
2551 EOF
2552
2553 cat >> confdefs.h <<EOF
2554 #define TYPE_DWORD $TYPE_DWORD
2555 EOF
2556
2557
2558 # Generating output files
2559 # ===========================================================================
2560
2561 trap '' 1 2 15
2562 cat > confcache <<\EOF
2563 # This file is a shell script that caches the results of configure
2564 # tests run on this system so they can be shared between configure
2565 # scripts and configure runs.  It is not useful on other systems.
2566 # If it contains results you don't want to keep, you may remove or edit it.
2567 #
2568 # By default, configure uses ./config.cache as the cache file,
2569 # creating it if it does not exist already.  You can give configure
2570 # the --cache-file=FILE option to use a different cache file; that is
2571 # what configure does when it calls configure scripts in
2572 # subdirectories, so they share the cache.
2573 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2574 # config.status only pays attention to the cache file if you give it the
2575 # --recheck option to rerun configure.
2576 #
2577 EOF
2578 # The following way of writing the cache mishandles newlines in values,
2579 # but we know of no workaround that is simple, portable, and efficient.
2580 # So, don't put newlines in cache variables' values.
2581 # Ultrix sh set writes to stderr and can't be redirected directly,
2582 # and sets the high bit in the cache file unless we assign to the vars.
2583 (set) 2>&1 |
2584   case `(ac_space=' '; set) 2>&1` in
2585   *ac_space=\ *)
2586     # `set' does not quote correctly, so add quotes (double-quote substitution
2587     # turns \\\\ into \\, and sed turns \\ into \).
2588     sed -n \
2589       -e "s/'/'\\\\''/g" \
2590       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2591     ;;
2592   *)
2593     # `set' quotes correctly as required by POSIX, so do not add quotes.
2594     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2595     ;;
2596   esac >> confcache
2597 if cmp -s $cache_file confcache; then
2598   :
2599 else
2600   if test -w $cache_file; then
2601     echo "updating cache $cache_file"
2602     cat confcache > $cache_file
2603   else
2604     echo "not updating unwritable cache $cache_file"
2605   fi
2606 fi
2607 rm -f confcache
2608
2609 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2610
2611 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2612 # Let make expand exec_prefix.
2613 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2614
2615 # Any assignment to VPATH causes Sun make to only execute
2616 # the first set of double-colon rules, so remove it if not needed.
2617 # If there is a colon in the path, we need to keep it.
2618 if test "x$srcdir" = x.; then
2619   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2620 fi
2621
2622 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2623
2624 DEFS=-DHAVE_CONFIG_H
2625
2626 # Without the "./", some shells look in PATH for config.status.
2627 : ${CONFIG_STATUS=./config.status}
2628
2629 echo creating $CONFIG_STATUS
2630 rm -f $CONFIG_STATUS
2631 cat > $CONFIG_STATUS <<EOF
2632 #! /bin/sh
2633 # Generated automatically by configure.
2634 # Run this file to recreate the current configuration.
2635 # This directory was configured as follows,
2636 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2637 #
2638 # $0 $ac_configure_args
2639 #
2640 # Compiler output produced by configure, useful for debugging
2641 # configure, is in ./config.log if it exists.
2642
2643 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2644 for ac_option
2645 do
2646   case "\$ac_option" in
2647   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2648     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2649     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2650   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2651     echo "$CONFIG_STATUS generated by autoconf version 2.12"
2652     exit 0 ;;
2653   -help | --help | --hel | --he | --h)
2654     echo "\$ac_cs_usage"; exit 0 ;;
2655   *) echo "\$ac_cs_usage"; exit 1 ;;
2656   esac
2657 done
2658
2659 ac_given_srcdir=$srcdir
2660 ac_given_INSTALL="$INSTALL"
2661
2662 trap 'rm -fr `echo "main.mk:main_in.mk
2663 sim.src/Makefile
2664 cmd.src/Makefile
2665 s51.src/Makefile
2666 avr.src/Makefile
2667 z80.src/Makefile
2668 gui.src/Makefile
2669 gui.src/serio.src/Makefile
2670 gui.src/portmon.src/Makefile
2671 doc/Makefile
2672  ddconfig.h:ddconfig_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2673 EOF
2674 cat >> $CONFIG_STATUS <<EOF
2675
2676 # Protect against being on the right side of a sed subst in config.status.
2677 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2678  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2679 $ac_vpsub
2680 $extrasub
2681 s%@CFLAGS@%$CFLAGS%g
2682 s%@CPPFLAGS@%$CPPFLAGS%g
2683 s%@CXXFLAGS@%$CXXFLAGS%g
2684 s%@DEFS@%$DEFS%g
2685 s%@LDFLAGS@%$LDFLAGS%g
2686 s%@LIBS@%$LIBS%g
2687 s%@exec_prefix@%$exec_prefix%g
2688 s%@prefix@%$prefix%g
2689 s%@program_transform_name@%$program_transform_name%g
2690 s%@bindir@%$bindir%g
2691 s%@sbindir@%$sbindir%g
2692 s%@libexecdir@%$libexecdir%g
2693 s%@datadir@%$datadir%g
2694 s%@sysconfdir@%$sysconfdir%g
2695 s%@sharedstatedir@%$sharedstatedir%g
2696 s%@localstatedir@%$localstatedir%g
2697 s%@libdir@%$libdir%g
2698 s%@includedir@%$includedir%g
2699 s%@oldincludedir@%$oldincludedir%g
2700 s%@infodir@%$infodir%g
2701 s%@mandir@%$mandir%g
2702 s%@AWK@%$AWK%g
2703 s%@VERSION@%$VERSION%g
2704 s%@VERSIONHI@%$VERSIONHI%g
2705 s%@VERSIONLO@%$VERSIONLO%g
2706 s%@VERSIONP@%$VERSIONP%g
2707 s%@CXX@%$CXX%g
2708 s%@CXXCPP@%$CXXCPP%g
2709 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2710 s%@INSTALL_DATA@%$INSTALL_DATA%g
2711 s%@RANLIB@%$RANLIB%g
2712 s%@panel_ok@%$panel_ok%g
2713 s%@curses_ok@%$curses_ok%g
2714 s%@M_OR_MM@%$M_OR_MM%g
2715
2716 CEOF
2717 EOF
2718
2719 cat >> $CONFIG_STATUS <<\EOF
2720
2721 # Split the substitutions into bite-sized pieces for seds with
2722 # small command number limits, like on Digital OSF/1 and HP-UX.
2723 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2724 ac_file=1 # Number of current file.
2725 ac_beg=1 # First line for current file.
2726 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2727 ac_more_lines=:
2728 ac_sed_cmds=""
2729 while $ac_more_lines; do
2730   if test $ac_beg -gt 1; then
2731     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2732   else
2733     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2734   fi
2735   if test ! -s conftest.s$ac_file; then
2736     ac_more_lines=false
2737     rm -f conftest.s$ac_file
2738   else
2739     if test -z "$ac_sed_cmds"; then
2740       ac_sed_cmds="sed -f conftest.s$ac_file"
2741     else
2742       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2743     fi
2744     ac_file=`expr $ac_file + 1`
2745     ac_beg=$ac_end
2746     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2747   fi
2748 done
2749 if test -z "$ac_sed_cmds"; then
2750   ac_sed_cmds=cat
2751 fi
2752 EOF
2753
2754 cat >> $CONFIG_STATUS <<EOF
2755
2756 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
2757 sim.src/Makefile
2758 cmd.src/Makefile
2759 s51.src/Makefile
2760 avr.src/Makefile
2761 z80.src/Makefile
2762 gui.src/Makefile
2763 gui.src/serio.src/Makefile
2764 gui.src/portmon.src/Makefile
2765 doc/Makefile
2766 "}
2767 EOF
2768 cat >> $CONFIG_STATUS <<\EOF
2769 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2770   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2771   case "$ac_file" in
2772   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2773        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2774   *) ac_file_in="${ac_file}.in" ;;
2775   esac
2776
2777   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2778
2779   # Remove last slash and all that follows it.  Not all systems have dirname.
2780   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2781   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2782     # The file is in a subdirectory.
2783     test ! -d "$ac_dir" && mkdir "$ac_dir"
2784     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2785     # A "../" for each directory in $ac_dir_suffix.
2786     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2787   else
2788     ac_dir_suffix= ac_dots=
2789   fi
2790
2791   case "$ac_given_srcdir" in
2792   .)  srcdir=.
2793       if test -z "$ac_dots"; then top_srcdir=.
2794       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2795   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2796   *) # Relative path.
2797     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2798     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2799   esac
2800
2801   case "$ac_given_INSTALL" in
2802   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2803   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2804   esac
2805
2806   echo creating "$ac_file"
2807   rm -f "$ac_file"
2808   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2809   case "$ac_file" in
2810   *Makefile*) ac_comsub="1i\\
2811 # $configure_input" ;;
2812   *) ac_comsub= ;;
2813   esac
2814
2815   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2816   sed -e "$ac_comsub
2817 s%@configure_input@%$configure_input%g
2818 s%@srcdir@%$srcdir%g
2819 s%@top_srcdir@%$top_srcdir%g
2820 s%@INSTALL@%$INSTALL%g
2821 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2822 fi; done
2823 rm -f conftest.s*
2824
2825 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2826 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2827 #
2828 # ac_d sets the value in "#define NAME VALUE" lines.
2829 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2830 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2831 ac_dC='\3'
2832 ac_dD='%g'
2833 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2834 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2835 ac_uB='\([      ]\)%\1#\2define\3'
2836 ac_uC=' '
2837 ac_uD='\4%g'
2838 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2839 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2840 ac_eB='$%\1#\2define\3'
2841 ac_eC=' '
2842 ac_eD='%g'
2843
2844 if test "${CONFIG_HEADERS+set}" != set; then
2845 EOF
2846 cat >> $CONFIG_STATUS <<EOF
2847   CONFIG_HEADERS="ddconfig.h:ddconfig_in.h"
2848 EOF
2849 cat >> $CONFIG_STATUS <<\EOF
2850 fi
2851 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2852   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2853   case "$ac_file" in
2854   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2855        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2856   *) ac_file_in="${ac_file}.in" ;;
2857   esac
2858
2859   echo creating $ac_file
2860
2861   rm -f conftest.frag conftest.in conftest.out
2862   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2863   cat $ac_file_inputs > conftest.in
2864
2865 EOF
2866
2867 # Transform confdefs.h into a sed script conftest.vals that substitutes
2868 # the proper values into config.h.in to produce config.h.  And first:
2869 # Protect against being on the right side of a sed subst in config.status.
2870 # Protect against being in an unquoted here document in config.status.
2871 rm -f conftest.vals
2872 cat > conftest.hdr <<\EOF
2873 s/[\\&%]/\\&/g
2874 s%[\\$`]%\\&%g
2875 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2876 s%ac_d%ac_u%gp
2877 s%ac_u%ac_e%gp
2878 EOF
2879 sed -n -f conftest.hdr confdefs.h > conftest.vals
2880 rm -f conftest.hdr
2881
2882 # This sed command replaces #undef with comments.  This is necessary, for
2883 # example, in the case of _POSIX_SOURCE, which is predefined and required
2884 # on some systems where configure will not decide to define it.
2885 cat >> conftest.vals <<\EOF
2886 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2887 EOF
2888
2889 # Break up conftest.vals because some shells have a limit on
2890 # the size of here documents, and old seds have small limits too.
2891
2892 rm -f conftest.tail
2893 while :
2894 do
2895   ac_lines=`grep -c . conftest.vals`
2896   # grep -c gives empty output for an empty file on some AIX systems.
2897   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2898   # Write a limited-size here document to conftest.frag.
2899   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2900   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2901   echo 'CEOF
2902   sed -f conftest.frag conftest.in > conftest.out
2903   rm -f conftest.in
2904   mv conftest.out conftest.in
2905 ' >> $CONFIG_STATUS
2906   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2907   rm -f conftest.vals
2908   mv conftest.tail conftest.vals
2909 done
2910 rm -f conftest.vals
2911
2912 cat >> $CONFIG_STATUS <<\EOF
2913   rm -f conftest.frag conftest.h
2914   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2915   cat conftest.in >> conftest.h
2916   rm -f conftest.in
2917   if cmp -s $ac_file conftest.h 2>/dev/null; then
2918     echo "$ac_file is unchanged"
2919     rm -f conftest.h
2920   else
2921     # Remove last slash and all that follows it.  Not all systems have dirname.
2922       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2923       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2924       # The file is in a subdirectory.
2925       test ! -d "$ac_dir" && mkdir "$ac_dir"
2926     fi
2927     rm -f $ac_file
2928     mv conftest.h $ac_file
2929   fi
2930 fi; done
2931
2932 EOF
2933 cat >> $CONFIG_STATUS <<EOF
2934
2935 EOF
2936 cat >> $CONFIG_STATUS <<\EOF
2937
2938 exit 0
2939 EOF
2940 chmod +x $CONFIG_STATUS
2941 rm -fr confdefs* $ac_clean_files
2942 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2943
2944
2945
2946 # End of configure/configure.in