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