Added defaults for cross compiling
[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
905 # Checking for header files.
906 # ===========================================================================
907
908 if test -d /stuff/include; then
909   CPPFLAGS="$CPPFLAGS -I/stuff/include"
910 fi
911
912 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
913 echo "configure:914: checking for ANSI C header files" >&5
914 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
915   echo $ac_n "(cached) $ac_c" 1>&6
916 else
917   cat > conftest.$ac_ext <<EOF
918 #line 919 "configure"
919 #include "confdefs.h"
920 #include <stdlib.h>
921 #include <stdarg.h>
922 #include <string.h>
923 #include <float.h>
924 EOF
925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
926 { (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
928 if test -z "$ac_err"; then
929   rm -rf conftest*
930   ac_cv_header_stdc=yes
931 else
932   echo "$ac_err" >&5
933   echo "configure: failed program was:" >&5
934   cat conftest.$ac_ext >&5
935   rm -rf conftest*
936   ac_cv_header_stdc=no
937 fi
938 rm -f conftest*
939
940 if test $ac_cv_header_stdc = yes; then
941   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
942 cat > conftest.$ac_ext <<EOF
943 #line 944 "configure"
944 #include "confdefs.h"
945 #include <string.h>
946 EOF
947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
948   egrep "memchr" >/dev/null 2>&1; then
949   :
950 else
951   rm -rf conftest*
952   ac_cv_header_stdc=no
953 fi
954 rm -f conftest*
955
956 fi
957
958 if test $ac_cv_header_stdc = yes; then
959   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
960 cat > conftest.$ac_ext <<EOF
961 #line 962 "configure"
962 #include "confdefs.h"
963 #include <stdlib.h>
964 EOF
965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
966   egrep "free" >/dev/null 2>&1; then
967   :
968 else
969   rm -rf conftest*
970   ac_cv_header_stdc=no
971 fi
972 rm -f conftest*
973
974 fi
975
976 if test $ac_cv_header_stdc = yes; then
977   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
978 if test "$cross_compiling" = yes; then
979   :
980 else
981   cat > conftest.$ac_ext <<EOF
982 #line 983 "configure"
983 #include "confdefs.h"
984 #ifdef __cplusplus
985 extern "C" void exit(int);
986 #endif
987 #include <ctype.h>
988 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
989 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
990 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
991 int main () { int i; for (i = 0; i < 256; i++)
992 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
993 exit (0); }
994
995 EOF
996 if { (eval echo configure:997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
997 then
998   :
999 else
1000   echo "configure: failed program was:" >&5
1001   cat conftest.$ac_ext >&5
1002   rm -fr conftest*
1003   ac_cv_header_stdc=no
1004 fi
1005 rm -fr conftest*
1006 fi
1007
1008 fi
1009 fi
1010
1011 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1012 if test $ac_cv_header_stdc = yes; then
1013   cat >> confdefs.h <<\EOF
1014 #define STDC_HEADERS 1
1015 EOF
1016
1017 fi
1018
1019 for ac_hdr in getopt.h
1020 do
1021 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1022 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1023 echo "configure:1024: checking for $ac_hdr" >&5
1024 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027   cat > conftest.$ac_ext <<EOF
1028 #line 1029 "configure"
1029 #include "confdefs.h"
1030 #include <$ac_hdr>
1031 EOF
1032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1033 { (eval echo configure:1034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1035 if test -z "$ac_err"; then
1036   rm -rf conftest*
1037   eval "ac_cv_header_$ac_safe=yes"
1038 else
1039   echo "$ac_err" >&5
1040   echo "configure: failed program was:" >&5
1041   cat conftest.$ac_ext >&5
1042   rm -rf conftest*
1043   eval "ac_cv_header_$ac_safe=no"
1044 fi
1045 rm -f conftest*
1046 fi
1047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1048   echo "$ac_t""yes" 1>&6
1049     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1050   cat >> confdefs.h <<EOF
1051 #define $ac_tr_hdr 1
1052 EOF
1053  
1054 else
1055   echo "$ac_t""no" 1>&6
1056 fi
1057 done
1058
1059 for ac_hdr in unistd.h
1060 do
1061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1063 echo "configure:1064: checking for $ac_hdr" >&5
1064 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1065   echo $ac_n "(cached) $ac_c" 1>&6
1066 else
1067   cat > conftest.$ac_ext <<EOF
1068 #line 1069 "configure"
1069 #include "confdefs.h"
1070 #include <$ac_hdr>
1071 EOF
1072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1073 { (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1075 if test -z "$ac_err"; then
1076   rm -rf conftest*
1077   eval "ac_cv_header_$ac_safe=yes"
1078 else
1079   echo "$ac_err" >&5
1080   echo "configure: failed program was:" >&5
1081   cat conftest.$ac_ext >&5
1082   rm -rf conftest*
1083   eval "ac_cv_header_$ac_safe=no"
1084 fi
1085 rm -f conftest*
1086 fi
1087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1088   echo "$ac_t""yes" 1>&6
1089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1090   cat >> confdefs.h <<EOF
1091 #define $ac_tr_hdr 1
1092 EOF
1093  
1094 else
1095   echo "$ac_t""no" 1>&6
1096 fi
1097 done
1098
1099 ac_safe=`echo "sys/socket.h" | sed 'y%./+-%__p_%'`
1100 echo $ac_n "checking for sys/socket.h""... $ac_c" 1>&6
1101 echo "configure:1102: checking for sys/socket.h" >&5
1102 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105   cat > conftest.$ac_ext <<EOF
1106 #line 1107 "configure"
1107 #include "confdefs.h"
1108 #include <sys/socket.h>
1109 EOF
1110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1111 { (eval echo configure:1112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1113 if test -z "$ac_err"; then
1114   rm -rf conftest*
1115   eval "ac_cv_header_$ac_safe=yes"
1116 else
1117   echo "$ac_err" >&5
1118   echo "configure: failed program was:" >&5
1119   cat conftest.$ac_ext >&5
1120   rm -rf conftest*
1121   eval "ac_cv_header_$ac_safe=no"
1122 fi
1123 rm -f conftest*
1124 fi
1125 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1126   echo "$ac_t""yes" 1>&6
1127   cat >> confdefs.h <<\EOF
1128 #define SOCKET_AVAIL 1
1129 EOF
1130
1131     cat >> confdefs.h <<\EOF
1132 #define HAVE_SYS_SOCKET_H 1
1133 EOF
1134
1135     cat > conftest.$ac_ext <<EOF
1136 #line 1137 "configure"
1137 #include "confdefs.h"
1138 #include <sys/socket.h>
1139 EOF
1140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1141   egrep "socklen_t" >/dev/null 2>&1; then
1142   rm -rf conftest*
1143   cat >> confdefs.h <<EOF
1144 #define SOCKLEN_T socklen_t
1145 EOF
1146
1147 else
1148   rm -rf conftest*
1149   cat >> confdefs.h <<EOF
1150 #define SOCKLEN_T uint
1151 EOF
1152
1153 fi
1154 rm -f conftest*
1155
1156
1157 else
1158   echo "$ac_t""no" 1>&6
1159 fi
1160
1161 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
1162 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
1163 echo "configure:1164: checking for dlfcn.h" >&5
1164 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1165   echo $ac_n "(cached) $ac_c" 1>&6
1166 else
1167   cat > conftest.$ac_ext <<EOF
1168 #line 1169 "configure"
1169 #include "confdefs.h"
1170 #include <dlfcn.h>
1171 EOF
1172 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1173 { (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1174 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1175 if test -z "$ac_err"; then
1176   rm -rf conftest*
1177   eval "ac_cv_header_$ac_safe=yes"
1178 else
1179   echo "$ac_err" >&5
1180   echo "configure: failed program was:" >&5
1181   cat conftest.$ac_ext >&5
1182   rm -rf conftest*
1183   eval "ac_cv_header_$ac_safe=no"
1184 fi
1185 rm -f conftest*
1186 fi
1187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1188   echo "$ac_t""yes" 1>&6
1189   :
1190 else
1191   echo "$ac_t""no" 1>&6
1192 fi
1193
1194 ac_header_dirent=no
1195 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1196 do
1197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1198 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1199 echo "configure:1200: checking for $ac_hdr that defines DIR" >&5
1200 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   cat > conftest.$ac_ext <<EOF
1204 #line 1205 "configure"
1205 #include "confdefs.h"
1206 #include <sys/types.h>
1207 #include <$ac_hdr>
1208 int main() {
1209 DIR *dirp = 0;
1210 ; return 0; }
1211 EOF
1212 if { (eval echo configure:1213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1213   rm -rf conftest*
1214   eval "ac_cv_header_dirent_$ac_safe=yes"
1215 else
1216   echo "configure: failed program was:" >&5
1217   cat conftest.$ac_ext >&5
1218   rm -rf conftest*
1219   eval "ac_cv_header_dirent_$ac_safe=no"
1220 fi
1221 rm -f conftest*
1222 fi
1223 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1224   echo "$ac_t""yes" 1>&6
1225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1226   cat >> confdefs.h <<EOF
1227 #define $ac_tr_hdr 1
1228 EOF
1229  ac_header_dirent=$ac_hdr; break
1230 else
1231   echo "$ac_t""no" 1>&6
1232 fi
1233 done
1234 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1235 if test $ac_header_dirent = dirent.h; then
1236 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1237 echo "configure:1238: checking for opendir in -ldir" >&5
1238 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1239 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1240   echo $ac_n "(cached) $ac_c" 1>&6
1241 else
1242   ac_save_LIBS="$LIBS"
1243 LIBS="-ldir  $LIBS"
1244 cat > conftest.$ac_ext <<EOF
1245 #line 1246 "configure"
1246 #include "confdefs.h"
1247 /* Override any gcc2 internal prototype to avoid an error.  */
1248 #ifdef __cplusplus
1249 extern "C"
1250 #endif
1251 /* We use char because int might match the return type of a gcc2
1252     builtin and then its argument prototype would still apply.  */
1253 char opendir();
1254
1255 int main() {
1256 opendir()
1257 ; return 0; }
1258 EOF
1259 if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1260   rm -rf conftest*
1261   eval "ac_cv_lib_$ac_lib_var=yes"
1262 else
1263   echo "configure: failed program was:" >&5
1264   cat conftest.$ac_ext >&5
1265   rm -rf conftest*
1266   eval "ac_cv_lib_$ac_lib_var=no"
1267 fi
1268 rm -f conftest*
1269 LIBS="$ac_save_LIBS"
1270
1271 fi
1272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1273   echo "$ac_t""yes" 1>&6
1274   LIBS="$LIBS -ldir"
1275 else
1276   echo "$ac_t""no" 1>&6
1277 fi
1278
1279 else
1280 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1281 echo "configure:1282: checking for opendir in -lx" >&5
1282 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1283 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1284   echo $ac_n "(cached) $ac_c" 1>&6
1285 else
1286   ac_save_LIBS="$LIBS"
1287 LIBS="-lx  $LIBS"
1288 cat > conftest.$ac_ext <<EOF
1289 #line 1290 "configure"
1290 #include "confdefs.h"
1291 /* Override any gcc2 internal prototype to avoid an error.  */
1292 #ifdef __cplusplus
1293 extern "C"
1294 #endif
1295 /* We use char because int might match the return type of a gcc2
1296     builtin and then its argument prototype would still apply.  */
1297 char opendir();
1298
1299 int main() {
1300 opendir()
1301 ; return 0; }
1302 EOF
1303 if { (eval echo configure:1304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1304   rm -rf conftest*
1305   eval "ac_cv_lib_$ac_lib_var=yes"
1306 else
1307   echo "configure: failed program was:" >&5
1308   cat conftest.$ac_ext >&5
1309   rm -rf conftest*
1310   eval "ac_cv_lib_$ac_lib_var=no"
1311 fi
1312 rm -f conftest*
1313 LIBS="$ac_save_LIBS"
1314
1315 fi
1316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1317   echo "$ac_t""yes" 1>&6
1318   LIBS="$LIBS -lx"
1319 else
1320   echo "$ac_t""no" 1>&6
1321 fi
1322
1323 fi
1324
1325
1326 # This must be after CXXCPP
1327
1328 echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6
1329 echo "configure:1330: checking which header file defines FD_ macros" >&5
1330 if eval "test \"`echo '$''{'ucsim_cv_fd'+set}'`\" = set"; then
1331   echo $ac_n "(cached) $ac_c" 1>&6
1332 else
1333   ucsim_cv_fd="unknown"
1334 cat > conftest.$ac_ext <<EOF
1335 #line 1336 "configure"
1336 #include "confdefs.h"
1337
1338 #include <sys/time.h>
1339 #ifdef FD_ZERO
1340 yes
1341 #endif
1342 EOF
1343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1344   egrep "yes" >/dev/null 2>&1; then
1345   rm -rf conftest*
1346   ucsim_cv_fd="<sys/time.h>"
1347 fi
1348 rm -f conftest*
1349
1350 cat > conftest.$ac_ext <<EOF
1351 #line 1352 "configure"
1352 #include "confdefs.h"
1353
1354 #include <sys/types.h>
1355 #ifdef FD_ZERO
1356 yes
1357 #endif
1358 EOF
1359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1360   egrep "yes" >/dev/null 2>&1; then
1361   rm -rf conftest*
1362   ucsim_cv_fd="<sys/types.h>"
1363 fi
1364 rm -f conftest*
1365
1366 cat > conftest.$ac_ext <<EOF
1367 #line 1368 "configure"
1368 #include "confdefs.h"
1369
1370 #include <sys/select.h>
1371 #ifdef FD_ZERO
1372 yes
1373 #endif
1374 EOF
1375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1376   egrep "yes" >/dev/null 2>&1; then
1377   rm -rf conftest*
1378   ucsim_cv_fd="<sys/types.h>"
1379 fi
1380 rm -f conftest*
1381
1382 fi
1383
1384 echo "$ac_t""$ucsim_cv_fd" 1>&6
1385
1386 cat >> confdefs.h <<\EOF
1387 #define FD_HEADER_OK 0
1388 EOF
1389
1390 if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then
1391 cat >> confdefs.h <<\EOF
1392 #define FD_NEED_TIME_H 1
1393 EOF
1394
1395 cat >> confdefs.h <<\EOF
1396 #define FD_HEADER_OK 1
1397 EOF
1398
1399 else
1400 cat >> confdefs.h <<\EOF
1401 #define FD_NEED_TIME_H 0
1402 EOF
1403
1404 fi
1405 if echo $ucsim_cv_fd|grep types >/dev/null 2>&1; then
1406 cat >> confdefs.h <<\EOF
1407 #define FD_NEED_TYPES_H 1
1408 EOF
1409
1410 cat >> confdefs.h <<\EOF
1411 #define FD_HEADER_OK 1
1412 EOF
1413
1414 else
1415 cat >> confdefs.h <<\EOF
1416 #define FD_NEED_TYPES_H 0
1417 EOF
1418
1419 fi
1420 if echo $ucsim_cv_fd|grep select >/dev/null 2>&1; then
1421 cat >> confdefs.h <<\EOF
1422 #define FD_NEED_SELECT_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_SELECT_H 0
1432 EOF
1433
1434 fi
1435
1436 cat >> confdefs.h <<EOF
1437 #define HEADER_FD ${ucsim_cv_fd}
1438 EOF
1439
1440
1441
1442 # Checking for functions/libs
1443 # ===========================================================================
1444 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1445 echo "configure:1446: checking for socket in -lsocket" >&5
1446 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1448   echo $ac_n "(cached) $ac_c" 1>&6
1449 else
1450   ac_save_LIBS="$LIBS"
1451 LIBS="-lsocket  $LIBS"
1452 cat > conftest.$ac_ext <<EOF
1453 #line 1454 "configure"
1454 #include "confdefs.h"
1455 /* Override any gcc2 internal prototype to avoid an error.  */
1456 #ifdef __cplusplus
1457 extern "C"
1458 #endif
1459 /* We use char because int might match the return type of a gcc2
1460     builtin and then its argument prototype would still apply.  */
1461 char socket();
1462
1463 int main() {
1464 socket()
1465 ; return 0; }
1466 EOF
1467 if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1468   rm -rf conftest*
1469   eval "ac_cv_lib_$ac_lib_var=yes"
1470 else
1471   echo "configure: failed program was:" >&5
1472   cat conftest.$ac_ext >&5
1473   rm -rf conftest*
1474   eval "ac_cv_lib_$ac_lib_var=no"
1475 fi
1476 rm -f conftest*
1477 LIBS="$ac_save_LIBS"
1478
1479 fi
1480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1481   echo "$ac_t""yes" 1>&6
1482     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1483     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1484   cat >> confdefs.h <<EOF
1485 #define $ac_tr_lib 1
1486 EOF
1487
1488   LIBS="-lsocket $LIBS"
1489
1490 else
1491   echo "$ac_t""no" 1>&6
1492 fi
1493
1494 echo $ac_n "checking for xdr_short in -lnsl""... $ac_c" 1>&6
1495 echo "configure:1496: checking for xdr_short in -lnsl" >&5
1496 ac_lib_var=`echo nsl'_'xdr_short | sed 'y%./+-%__p_%'`
1497 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1498   echo $ac_n "(cached) $ac_c" 1>&6
1499 else
1500   ac_save_LIBS="$LIBS"
1501 LIBS="-lnsl  $LIBS"
1502 cat > conftest.$ac_ext <<EOF
1503 #line 1504 "configure"
1504 #include "confdefs.h"
1505 /* Override any gcc2 internal prototype to avoid an error.  */
1506 #ifdef __cplusplus
1507 extern "C"
1508 #endif
1509 /* We use char because int might match the return type of a gcc2
1510     builtin and then its argument prototype would still apply.  */
1511 char xdr_short();
1512
1513 int main() {
1514 xdr_short()
1515 ; return 0; }
1516 EOF
1517 if { (eval echo configure:1518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1518   rm -rf conftest*
1519   eval "ac_cv_lib_$ac_lib_var=yes"
1520 else
1521   echo "configure: failed program was:" >&5
1522   cat conftest.$ac_ext >&5
1523   rm -rf conftest*
1524   eval "ac_cv_lib_$ac_lib_var=no"
1525 fi
1526 rm -f conftest*
1527 LIBS="$ac_save_LIBS"
1528
1529 fi
1530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1531   echo "$ac_t""yes" 1>&6
1532     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1533     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1534   cat >> confdefs.h <<EOF
1535 #define $ac_tr_lib 1
1536 EOF
1537
1538   LIBS="-lnsl $LIBS"
1539
1540 else
1541   echo "$ac_t""no" 1>&6
1542 fi
1543
1544 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1545 echo "configure:1546: checking for dlopen in -ldl" >&5
1546 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1547 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1548   echo $ac_n "(cached) $ac_c" 1>&6
1549 else
1550   ac_save_LIBS="$LIBS"
1551 LIBS="-ldl  $LIBS"
1552 cat > conftest.$ac_ext <<EOF
1553 #line 1554 "configure"
1554 #include "confdefs.h"
1555 /* Override any gcc2 internal prototype to avoid an error.  */
1556 #ifdef __cplusplus
1557 extern "C"
1558 #endif
1559 /* We use char because int might match the return type of a gcc2
1560     builtin and then its argument prototype would still apply.  */
1561 char dlopen();
1562
1563 int main() {
1564 dlopen()
1565 ; return 0; }
1566 EOF
1567 if { (eval echo configure:1568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1568   rm -rf conftest*
1569   eval "ac_cv_lib_$ac_lib_var=yes"
1570 else
1571   echo "configure: failed program was:" >&5
1572   cat conftest.$ac_ext >&5
1573   rm -rf conftest*
1574   eval "ac_cv_lib_$ac_lib_var=no"
1575 fi
1576 rm -f conftest*
1577 LIBS="$ac_save_LIBS"
1578
1579 fi
1580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1581   echo "$ac_t""yes" 1>&6
1582   dl_ok="yes"
1583 DL="-ldl"
1584 else
1585   echo "$ac_t""no" 1>&6
1586 dl_ok="no"
1587 DL=""
1588 fi
1589
1590
1591
1592 echo $ac_n "checking for panel_above in -lpanel""... $ac_c" 1>&6
1593 echo "configure:1594: checking for panel_above in -lpanel" >&5
1594 ac_lib_var=`echo panel'_'panel_above | sed 'y%./+-%__p_%'`
1595 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1596   echo $ac_n "(cached) $ac_c" 1>&6
1597 else
1598   ac_save_LIBS="$LIBS"
1599 LIBS="-lpanel -lcurses $LIBS"
1600 cat > conftest.$ac_ext <<EOF
1601 #line 1602 "configure"
1602 #include "confdefs.h"
1603 /* Override any gcc2 internal prototype to avoid an error.  */
1604 #ifdef __cplusplus
1605 extern "C"
1606 #endif
1607 /* We use char because int might match the return type of a gcc2
1608     builtin and then its argument prototype would still apply.  */
1609 char panel_above();
1610
1611 int main() {
1612 panel_above()
1613 ; return 0; }
1614 EOF
1615 if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1616   rm -rf conftest*
1617   eval "ac_cv_lib_$ac_lib_var=yes"
1618 else
1619   echo "configure: failed program was:" >&5
1620   cat conftest.$ac_ext >&5
1621   rm -rf conftest*
1622   eval "ac_cv_lib_$ac_lib_var=no"
1623 fi
1624 rm -f conftest*
1625 LIBS="$ac_save_LIBS"
1626
1627 fi
1628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1629   echo "$ac_t""yes" 1>&6
1630   panel_ok="yes"
1631 curses_ok="yes"
1632 CURSES_LIBS="-lpanel -lcurses"
1633
1634 else
1635   echo "$ac_t""no" 1>&6
1636 panel_ok="no"
1637 echo $ac_n "checking for nl in -lcurses""... $ac_c" 1>&6
1638 echo "configure:1639: checking for nl in -lcurses" >&5
1639 ac_lib_var=`echo curses'_'nl | sed 'y%./+-%__p_%'`
1640 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1641   echo $ac_n "(cached) $ac_c" 1>&6
1642 else
1643   ac_save_LIBS="$LIBS"
1644 LIBS="-lcurses  $LIBS"
1645 cat > conftest.$ac_ext <<EOF
1646 #line 1647 "configure"
1647 #include "confdefs.h"
1648 /* Override any gcc2 internal prototype to avoid an error.  */
1649 #ifdef __cplusplus
1650 extern "C"
1651 #endif
1652 /* We use char because int might match the return type of a gcc2
1653     builtin and then its argument prototype would still apply.  */
1654 char nl();
1655
1656 int main() {
1657 nl()
1658 ; return 0; }
1659 EOF
1660 if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1661   rm -rf conftest*
1662   eval "ac_cv_lib_$ac_lib_var=yes"
1663 else
1664   echo "configure: failed program was:" >&5
1665   cat conftest.$ac_ext >&5
1666   rm -rf conftest*
1667   eval "ac_cv_lib_$ac_lib_var=no"
1668 fi
1669 rm -f conftest*
1670 LIBS="$ac_save_LIBS"
1671
1672 fi
1673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1674   echo "$ac_t""yes" 1>&6
1675   curses_ok="yes"
1676 CURSES_LIBS="-lcurses"
1677
1678 else
1679   echo "$ac_t""no" 1>&6
1680 ncurses_ok="no"
1681 fi
1682
1683
1684 fi
1685
1686
1687
1688
1689
1690 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1691 echo "configure:1692: checking for vprintf" >&5
1692 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1693   echo $ac_n "(cached) $ac_c" 1>&6
1694 else
1695   cat > conftest.$ac_ext <<EOF
1696 #line 1697 "configure"
1697 #include "confdefs.h"
1698 /* System header to define __stub macros and hopefully few prototypes,
1699     which can conflict with char vprintf(); below.  */
1700 #include <assert.h>
1701 /* Override any gcc2 internal prototype to avoid an error.  */
1702 #ifdef __cplusplus
1703 extern "C"
1704 #endif
1705 /* We use char because int might match the return type of a gcc2
1706     builtin and then its argument prototype would still apply.  */
1707 char vprintf();
1708
1709 int main() {
1710
1711 /* The GNU C library defines this for functions which it implements
1712     to always fail with ENOSYS.  Some functions are actually named
1713     something starting with __ and the normal name is an alias.  */
1714 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1715 choke me
1716 #else
1717 vprintf();
1718 #endif
1719
1720 ; return 0; }
1721 EOF
1722 if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1723   rm -rf conftest*
1724   eval "ac_cv_func_vprintf=yes"
1725 else
1726   echo "configure: failed program was:" >&5
1727   cat conftest.$ac_ext >&5
1728   rm -rf conftest*
1729   eval "ac_cv_func_vprintf=no"
1730 fi
1731 rm -f conftest*
1732 fi
1733
1734 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1735   echo "$ac_t""yes" 1>&6
1736   cat >> confdefs.h <<\EOF
1737 #define HAVE_VPRINTF 1
1738 EOF
1739
1740 else
1741   echo "$ac_t""no" 1>&6
1742 fi
1743
1744 if test "$ac_cv_func_vprintf" != yes; then
1745 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1746 echo "configure:1747: checking for _doprnt" >&5
1747 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1748   echo $ac_n "(cached) $ac_c" 1>&6
1749 else
1750   cat > conftest.$ac_ext <<EOF
1751 #line 1752 "configure"
1752 #include "confdefs.h"
1753 /* System header to define __stub macros and hopefully few prototypes,
1754     which can conflict with char _doprnt(); below.  */
1755 #include <assert.h>
1756 /* Override any gcc2 internal prototype to avoid an error.  */
1757 #ifdef __cplusplus
1758 extern "C"
1759 #endif
1760 /* We use char because int might match the return type of a gcc2
1761     builtin and then its argument prototype would still apply.  */
1762 char _doprnt();
1763
1764 int main() {
1765
1766 /* The GNU C library defines this for functions which it implements
1767     to always fail with ENOSYS.  Some functions are actually named
1768     something starting with __ and the normal name is an alias.  */
1769 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1770 choke me
1771 #else
1772 _doprnt();
1773 #endif
1774
1775 ; return 0; }
1776 EOF
1777 if { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1778   rm -rf conftest*
1779   eval "ac_cv_func__doprnt=yes"
1780 else
1781   echo "configure: failed program was:" >&5
1782   cat conftest.$ac_ext >&5
1783   rm -rf conftest*
1784   eval "ac_cv_func__doprnt=no"
1785 fi
1786 rm -f conftest*
1787 fi
1788
1789 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1790   echo "$ac_t""yes" 1>&6
1791   cat >> confdefs.h <<\EOF
1792 #define HAVE_DOPRNT 1
1793 EOF
1794
1795 else
1796   echo "$ac_t""no" 1>&6
1797 fi
1798
1799 fi
1800
1801 for ac_func in vsnprintf vasprintf
1802 do
1803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1804 echo "configure:1805: checking for $ac_func" >&5
1805 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1806   echo $ac_n "(cached) $ac_c" 1>&6
1807 else
1808   cat > conftest.$ac_ext <<EOF
1809 #line 1810 "configure"
1810 #include "confdefs.h"
1811 /* System header to define __stub macros and hopefully few prototypes,
1812     which can conflict with char $ac_func(); below.  */
1813 #include <assert.h>
1814 /* Override any gcc2 internal prototype to avoid an error.  */
1815 #ifdef __cplusplus
1816 extern "C"
1817 #endif
1818 /* We use char because int might match the return type of a gcc2
1819     builtin and then its argument prototype would still apply.  */
1820 char $ac_func();
1821
1822 int main() {
1823
1824 /* The GNU C library defines this for functions which it implements
1825     to always fail with ENOSYS.  Some functions are actually named
1826     something starting with __ and the normal name is an alias.  */
1827 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1828 choke me
1829 #else
1830 $ac_func();
1831 #endif
1832
1833 ; return 0; }
1834 EOF
1835 if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1836   rm -rf conftest*
1837   eval "ac_cv_func_$ac_func=yes"
1838 else
1839   echo "configure: failed program was:" >&5
1840   cat conftest.$ac_ext >&5
1841   rm -rf conftest*
1842   eval "ac_cv_func_$ac_func=no"
1843 fi
1844 rm -f conftest*
1845 fi
1846
1847 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1848   echo "$ac_t""yes" 1>&6
1849     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1850   cat >> confdefs.h <<EOF
1851 #define $ac_tr_func 1
1852 EOF
1853  
1854 else
1855   echo "$ac_t""no" 1>&6
1856 fi
1857 done
1858
1859 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
1860 do
1861 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1862 echo "configure:1863: checking for $ac_func" >&5
1863 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1864   echo $ac_n "(cached) $ac_c" 1>&6
1865 else
1866   cat > conftest.$ac_ext <<EOF
1867 #line 1868 "configure"
1868 #include "confdefs.h"
1869 /* System header to define __stub macros and hopefully few prototypes,
1870     which can conflict with char $ac_func(); below.  */
1871 #include <assert.h>
1872 /* Override any gcc2 internal prototype to avoid an error.  */
1873 #ifdef __cplusplus
1874 extern "C"
1875 #endif
1876 /* We use char because int might match the return type of a gcc2
1877     builtin and then its argument prototype would still apply.  */
1878 char $ac_func();
1879
1880 int main() {
1881
1882 /* The GNU C library defines this for functions which it implements
1883     to always fail with ENOSYS.  Some functions are actually named
1884     something starting with __ and the normal name is an alias.  */
1885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1886 choke me
1887 #else
1888 $ac_func();
1889 #endif
1890
1891 ; return 0; }
1892 EOF
1893 if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1894   rm -rf conftest*
1895   eval "ac_cv_func_$ac_func=yes"
1896 else
1897   echo "configure: failed program was:" >&5
1898   cat conftest.$ac_ext >&5
1899   rm -rf conftest*
1900   eval "ac_cv_func_$ac_func=no"
1901 fi
1902 rm -f conftest*
1903 fi
1904
1905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1906   echo "$ac_t""yes" 1>&6
1907     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1908   cat >> confdefs.h <<EOF
1909 #define $ac_tr_func 1
1910 EOF
1911  
1912 else
1913   echo "$ac_t""no" 1>&6
1914 fi
1915 done
1916
1917 for ac_func in strchr memcpy
1918 do
1919 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1920 echo "configure:1921: checking for $ac_func" >&5
1921 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1922   echo $ac_n "(cached) $ac_c" 1>&6
1923 else
1924   cat > conftest.$ac_ext <<EOF
1925 #line 1926 "configure"
1926 #include "confdefs.h"
1927 /* System header to define __stub macros and hopefully few prototypes,
1928     which can conflict with char $ac_func(); below.  */
1929 #include <assert.h>
1930 /* Override any gcc2 internal prototype to avoid an error.  */
1931 #ifdef __cplusplus
1932 extern "C"
1933 #endif
1934 /* We use char because int might match the return type of a gcc2
1935     builtin and then its argument prototype would still apply.  */
1936 char $ac_func();
1937
1938 int main() {
1939
1940 /* The GNU C library defines this for functions which it implements
1941     to always fail with ENOSYS.  Some functions are actually named
1942     something starting with __ and the normal name is an alias.  */
1943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1944 choke me
1945 #else
1946 $ac_func();
1947 #endif
1948
1949 ; return 0; }
1950 EOF
1951 if { (eval echo configure:1952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1952   rm -rf conftest*
1953   eval "ac_cv_func_$ac_func=yes"
1954 else
1955   echo "configure: failed program was:" >&5
1956   cat conftest.$ac_ext >&5
1957   rm -rf conftest*
1958   eval "ac_cv_func_$ac_func=no"
1959 fi
1960 rm -f conftest*
1961 fi
1962
1963 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1964   echo "$ac_t""yes" 1>&6
1965     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1966   cat >> confdefs.h <<EOF
1967 #define $ac_tr_func 1
1968 EOF
1969  
1970 else
1971   echo "$ac_t""no" 1>&6
1972 fi
1973 done
1974
1975 for ac_func in fgets
1976 do
1977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1978 echo "configure:1979: checking for $ac_func" >&5
1979 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1980   echo $ac_n "(cached) $ac_c" 1>&6
1981 else
1982   cat > conftest.$ac_ext <<EOF
1983 #line 1984 "configure"
1984 #include "confdefs.h"
1985 /* System header to define __stub macros and hopefully few prototypes,
1986     which can conflict with char $ac_func(); below.  */
1987 #include <assert.h>
1988 /* Override any gcc2 internal prototype to avoid an error.  */
1989 #ifdef __cplusplus
1990 extern "C"
1991 #endif
1992 /* We use char because int might match the return type of a gcc2
1993     builtin and then its argument prototype would still apply.  */
1994 char $ac_func();
1995
1996 int main() {
1997
1998 /* The GNU C library defines this for functions which it implements
1999     to always fail with ENOSYS.  Some functions are actually named
2000     something starting with __ and the normal name is an alias.  */
2001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2002 choke me
2003 #else
2004 $ac_func();
2005 #endif
2006
2007 ; return 0; }
2008 EOF
2009 if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2010   rm -rf conftest*
2011   eval "ac_cv_func_$ac_func=yes"
2012 else
2013   echo "configure: failed program was:" >&5
2014   cat conftest.$ac_ext >&5
2015   rm -rf conftest*
2016   eval "ac_cv_func_$ac_func=no"
2017 fi
2018 rm -f conftest*
2019 fi
2020
2021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2022   echo "$ac_t""yes" 1>&6
2023     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2024   cat >> confdefs.h <<EOF
2025 #define $ac_tr_func 1
2026 EOF
2027  
2028 else
2029   echo "$ac_t""no" 1>&6
2030 fi
2031 done
2032
2033 for ac_func in yylex
2034 do
2035 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2036 echo "configure:2037: checking for $ac_func" >&5
2037 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2038   echo $ac_n "(cached) $ac_c" 1>&6
2039 else
2040   cat > conftest.$ac_ext <<EOF
2041 #line 2042 "configure"
2042 #include "confdefs.h"
2043 /* System header to define __stub macros and hopefully few prototypes,
2044     which can conflict with char $ac_func(); below.  */
2045 #include <assert.h>
2046 /* Override any gcc2 internal prototype to avoid an error.  */
2047 #ifdef __cplusplus
2048 extern "C"
2049 #endif
2050 /* We use char because int might match the return type of a gcc2
2051     builtin and then its argument prototype would still apply.  */
2052 char $ac_func();
2053
2054 int main() {
2055
2056 /* The GNU C library defines this for functions which it implements
2057     to always fail with ENOSYS.  Some functions are actually named
2058     something starting with __ and the normal name is an alias.  */
2059 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2060 choke me
2061 #else
2062 $ac_func();
2063 #endif
2064
2065 ; return 0; }
2066 EOF
2067 if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2068   rm -rf conftest*
2069   eval "ac_cv_func_$ac_func=yes"
2070 else
2071   echo "configure: failed program was:" >&5
2072   cat conftest.$ac_ext >&5
2073   rm -rf conftest*
2074   eval "ac_cv_func_$ac_func=no"
2075 fi
2076 rm -f conftest*
2077 fi
2078
2079 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2080   echo "$ac_t""yes" 1>&6
2081     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2082   cat >> confdefs.h <<EOF
2083 #define $ac_tr_func 1
2084 EOF
2085  
2086 else
2087   echo "$ac_t""no" 1>&6
2088 fi
2089 done
2090
2091
2092 echo $ac_n "checking whether scanf knows %a""... $ac_c" 1>&6
2093 echo "configure:2094: checking whether scanf knows %a" >&5
2094 if eval "test \"`echo '$''{'ucsim_cv_scanf_a'+set}'`\" = set"; then
2095   echo $ac_n "(cached) $ac_c" 1>&6
2096 else
2097   echo "a b" >conftest.data
2098 if test "$cross_compiling" = yes; then
2099   ucsim_cv_scanf_a="unknown"
2100 else
2101   cat > conftest.$ac_ext <<EOF
2102 #line 2103 "configure"
2103 #include "confdefs.h"
2104 #ifdef __cplusplus
2105 extern "C" void exit(int);
2106 #endif
2107
2108 #include <stdio.h>
2109 void main(void)
2110 {
2111   FILE *f;
2112   char *a;
2113   int  i;
2114   if ((f= fopen("conftest.data", "r")) == NULL)
2115     exit(1);
2116   i= fscanf(f, " %a[a-z] ", &a);
2117   fclose(f);
2118   if (i == 0)
2119     exit(2);
2120   if (i == 1)
2121     exit(0);
2122   exit(3);
2123 }
2124 EOF
2125 if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2126 then
2127   ucsim_cv_scanf_a="yes"
2128 else
2129   echo "configure: failed program was:" >&5
2130   cat conftest.$ac_ext >&5
2131   rm -fr conftest*
2132   ucsim_cv_scanf_a="no"
2133 fi
2134 rm -fr conftest*
2135 fi
2136
2137
2138 fi
2139
2140 echo "$ac_t""$ucsim_cv_scanf_a" 1>&6
2141 if test "$ucsim_cv_scanf_a" = "yes"; then
2142   cat >> confdefs.h <<\EOF
2143 #define SCANF_A 1
2144 EOF
2145
2146 fi
2147
2148 echo $ac_n "checking whether getcwd is GNUish""... $ac_c" 1>&6
2149 echo "configure:2150: checking whether getcwd is GNUish" >&5
2150 if eval "test \"`echo '$''{'ucsim_cv_getcwd'+set}'`\" = set"; then
2151   echo $ac_n "(cached) $ac_c" 1>&6
2152 else
2153   if test "$cross_compiling" = yes; then
2154   ucsim_cv_getcwd="unknown"
2155 else
2156   cat > conftest.$ac_ext <<EOF
2157 #line 2158 "configure"
2158 #include "confdefs.h"
2159 #ifdef __cplusplus
2160 extern "C" void exit(int);
2161 #endif
2162
2163 #include <unistd.h>
2164 void main(void)
2165 {
2166   if ((getcwd(NULL, 0)) == NULL)
2167     exit(1);
2168   exit(0);
2169 }
2170 EOF
2171 if { (eval echo configure:2172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2172 then
2173   ucsim_cv_getcwd="yes"
2174 else
2175   echo "configure: failed program was:" >&5
2176   cat conftest.$ac_ext >&5
2177   rm -fr conftest*
2178   ucsim_cv_getcwd="no"
2179 fi
2180 rm -fr conftest*
2181 fi
2182
2183
2184 fi
2185
2186 echo "$ac_t""$ucsim_cv_getcwd" 1>&6
2187 if test "$ucsim_cv_getcwd" = "yes"; then
2188   cat >> confdefs.h <<\EOF
2189 #define GNU_GETCWD 1
2190 EOF
2191
2192 fi
2193
2194
2195 #'
2196
2197 echo $ac_n "checking for type of length pointer parameter of accept""... $ac_c" 1>&6
2198 echo "configure:2199: checking for type of length pointer parameter of accept" >&5
2199 if eval "test \"`echo '$''{'ucsim_cv_accept_length_type'+set}'`\" = set"; then
2200   echo $ac_n "(cached) $ac_c" 1>&6
2201 else
2202   ac_save_CPPFLAGS="$CPPFLAGS"
2203     ucsim_cv_accept_length_type=no
2204     for ac_val in int size_t socklen_t; do
2205       CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val"
2206       cat > conftest.$ac_ext <<EOF
2207 #line 2208 "configure"
2208 #include "confdefs.h"
2209 #include <sys/types.h>
2210 #include <sys/socket.h>
2211 int main() {
2212 struct sockaddr a; $ac_val len; accept (0, &a, &len);
2213 ; return 0; }
2214 EOF
2215 if { (eval echo configure:2216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2216   rm -rf conftest*
2217   ucsim_cv_accept_length_type=$ac_val; break
2218 else
2219   echo "configure: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221 fi
2222 rm -f conftest*
2223     done
2224     CPPFLAGS="$ac_save_CPPFLAGS"
2225 fi
2226
2227 echo "$ac_t""$ucsim_cv_accept_length_type" 1>&6
2228
2229   if test $ucsim_cv_accept_length_type != no; then
2230     cat >> confdefs.h <<EOF
2231 #define ACCEPT_SOCKLEN_T $ucsim_cv_accept_length_type
2232 EOF
2233
2234   fi
2235  
2236
2237
2238 # Macro definitions
2239 ###################
2240
2241 # DD_COPT macro checks if the compiler specified as the 1st parameter
2242 # supports option specified as the 2nd parameter
2243 # For example: DD_COPT(CXX, fPIC)
2244
2245
2246
2247
2248 # Checking characteristics of compilers and other programs
2249 # --------------------------------------------------------
2250
2251 # Cross compiling overrides
2252 if test "$CC" = "i586-mingw32msvc-gcc"; then
2253   ac_cv_c_bigendian=no
2254   ac_cv_sizeof_char=1
2255   ac_cv_sizeof_short=2
2256   ac_cv_sizeof_int=4 
2257   ac_cv_sizeof_long=4
2258   ac_cv_sizeof_long_long=4
2259 fi
2260
2261 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2262 echo "configure:2263: checking whether byte ordering is bigendian" >&5
2263 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2264   echo $ac_n "(cached) $ac_c" 1>&6
2265 else
2266   ac_cv_c_bigendian=unknown
2267 # See if sys/param.h defines the BYTE_ORDER macro.
2268 cat > conftest.$ac_ext <<EOF
2269 #line 2270 "configure"
2270 #include "confdefs.h"
2271 #include <sys/types.h>
2272 #include <sys/param.h>
2273 int main() {
2274
2275 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2276  bogus endian macros
2277 #endif
2278 ; return 0; }
2279 EOF
2280 if { (eval echo configure:2281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2281   rm -rf conftest*
2282   # It does; now see whether it defined to BIG_ENDIAN or not.
2283 cat > conftest.$ac_ext <<EOF
2284 #line 2285 "configure"
2285 #include "confdefs.h"
2286 #include <sys/types.h>
2287 #include <sys/param.h>
2288 int main() {
2289
2290 #if BYTE_ORDER != BIG_ENDIAN
2291  not big endian
2292 #endif
2293 ; return 0; }
2294 EOF
2295 if { (eval echo configure:2296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2296   rm -rf conftest*
2297   ac_cv_c_bigendian=yes
2298 else
2299   echo "configure: failed program was:" >&5
2300   cat conftest.$ac_ext >&5
2301   rm -rf conftest*
2302   ac_cv_c_bigendian=no
2303 fi
2304 rm -f conftest*
2305 else
2306   echo "configure: failed program was:" >&5
2307   cat conftest.$ac_ext >&5
2308 fi
2309 rm -f conftest*
2310 if test $ac_cv_c_bigendian = unknown; then
2311 if test "$cross_compiling" = yes; then
2312     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2313 else
2314   cat > conftest.$ac_ext <<EOF
2315 #line 2316 "configure"
2316 #include "confdefs.h"
2317 #ifdef __cplusplus
2318 extern "C" void exit(int);
2319 #endif
2320 main () {
2321   /* Are we little or big endian?  From Harbison&Steele.  */
2322   union
2323   {
2324     long l;
2325     char c[sizeof (long)];
2326   } u;
2327   u.l = 1;
2328   exit (u.c[sizeof (long) - 1] == 1);
2329 }
2330 EOF
2331 if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2332 then
2333   ac_cv_c_bigendian=no
2334 else
2335   echo "configure: failed program was:" >&5
2336   cat conftest.$ac_ext >&5
2337   rm -fr conftest*
2338   ac_cv_c_bigendian=yes
2339 fi
2340 rm -fr conftest*
2341 fi
2342
2343 fi
2344 fi
2345
2346 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2347 if test $ac_cv_c_bigendian = yes; then
2348   cat >> confdefs.h <<\EOF
2349 #define WORDS_BIGENDIAN 1
2350 EOF
2351
2352 fi
2353
2354 echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6
2355 echo "configure:2356: checking whether preprocessor accepts -MM or -M" >&5
2356 if eval "test \"`echo '$''{'ucsim_cv_MM'+set}'`\" = set"; then
2357   echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359   echo "#include <stdio.h>" >_test_.c
2360 echo "" >>_test_.c
2361 $CXXCPP -v -MM _test_.c 1>&5 2>&5
2362 if test "$?" = "0"; then
2363   ucsim_cv_MM="-MM"
2364 else
2365   ucsim_cv_MM="-M"
2366 fi
2367 rm -f _test_.*
2368 fi
2369
2370 echo "$ac_t""$ucsim_cv_MM" 1>&6
2371 M_OR_MM=$ucsim_cv_MM
2372
2373
2374 # This is the first time when CFLAGS are set/modified!!
2375
2376
2377 echo $ac_n "checking whether $CXX accepts -ggdb""... $ac_c" 1>&6
2378 echo "configure:2379: checking whether $CXX accepts -ggdb" >&5
2379 if eval "test \"`echo '$''{'ucsim_cv_CXXggdb'+set}'`\" = set"; then
2380   echo $ac_n "(cached) $ac_c" 1>&6
2381 else
2382   cat >_test_.c <<EOF
2383 #include <stdio.h>
2384 void main(void) {}
2385 EOF
2386 $CXX -v -ggdb -c _test_.c 1>&5 2>&5
2387 if test "$?" = "0"; then
2388   ucsim_cv_CXXggdb="yes"
2389 else
2390   ucsim_cv_CXXggdb="no"
2391 fi
2392 rm -f _test_.* a.out
2393 fi
2394
2395 echo "$ac_t""$ucsim_cv_CXXggdb" 1>&6
2396
2397 if test "$ucsim_cv_CXXggdb" = "yes"; then
2398     if test "$CXXFLAGS"x = x ;then
2399         CXXFLAGS="-ggdb -O"
2400     else
2401         CXXFLAGS="$CXXFLAGS -ggdb"
2402     fi
2403 fi
2404
2405
2406 echo $ac_n "checking whether $CXX accepts -pipe""... $ac_c" 1>&6
2407 echo "configure:2408: checking whether $CXX accepts -pipe" >&5
2408 if eval "test \"`echo '$''{'ucsim_cv_CXXpipe'+set}'`\" = set"; then
2409   echo $ac_n "(cached) $ac_c" 1>&6
2410 else
2411   cat >_test_.c <<EOF
2412 #include <stdio.h>
2413 void main(void) {}
2414 EOF
2415 $CXX -v -pipe -c _test_.c 1>&5 2>&5
2416 if test "$?" = "0"; then
2417   ucsim_cv_CXXpipe="yes"
2418 else
2419   ucsim_cv_CXXpipe="no"
2420 fi
2421 rm -f _test_.* a.out
2422 fi
2423
2424 echo "$ac_t""$ucsim_cv_CXXpipe" 1>&6
2425
2426 if test "$ucsim_cv_CXXpipe" = "yes"; then
2427   CXXFLAGS="$CXXFLAGS -pipe"
2428 fi
2429
2430 PICOPT=""
2431 SHAREDLIB="no"
2432
2433 echo $ac_n "checking whether $CXX accepts -fPIC""... $ac_c" 1>&6
2434 echo "configure:2435: checking whether $CXX accepts -fPIC" >&5
2435 if eval "test \"`echo '$''{'ucsim_cv_CXXfPIC'+set}'`\" = set"; then
2436   echo $ac_n "(cached) $ac_c" 1>&6
2437 else
2438   cat >_test_.c <<EOF
2439 #include <stdio.h>
2440 void main(void) {}
2441 EOF
2442 $CXX -v -fPIC -c _test_.c 1>&5 2>&5
2443 if test "$?" = "0"; then
2444   ucsim_cv_CXXfPIC="yes"
2445 else
2446   ucsim_cv_CXXfPIC="no"
2447 fi
2448 rm -f _test_.* a.out
2449 fi
2450
2451 echo "$ac_t""$ucsim_cv_CXXfPIC" 1>&6
2452
2453 if test "$ucsim_cv_CXXfPIC" = "yes"; then
2454     PICOPT="-fPIC"
2455 else
2456     
2457 echo $ac_n "checking whether $CXX accepts -fpic""... $ac_c" 1>&6
2458 echo "configure:2459: checking whether $CXX accepts -fpic" >&5
2459 if eval "test \"`echo '$''{'ucsim_cv_CXXfpic'+set}'`\" = set"; then
2460   echo $ac_n "(cached) $ac_c" 1>&6
2461 else
2462   cat >_test_.c <<EOF
2463 #include <stdio.h>
2464 void main(void) {}
2465 EOF
2466 $CXX -v -fpic -c _test_.c 1>&5 2>&5
2467 if test "$?" = "0"; then
2468   ucsim_cv_CXXfpic="yes"
2469 else
2470   ucsim_cv_CXXfpic="no"
2471 fi
2472 rm -f _test_.* a.out
2473 fi
2474
2475 echo "$ac_t""$ucsim_cv_CXXfpic" 1>&6
2476
2477     if test "$ucsim_cv_CXXfpic" = "yes"; then
2478         PICOPT="-fpic"
2479     fi
2480 fi
2481 if test "$PICOPT"x != "x"; then
2482     SHAREDLIB="yes"
2483 fi
2484
2485
2486
2487
2488 # Checks for typedefs, structures, and compiler characteristics.
2489 # ===========================================================================
2490
2491
2492 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2493 echo "configure:2494: checking return type of signal handlers" >&5
2494 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2495   echo $ac_n "(cached) $ac_c" 1>&6
2496 else
2497   cat > conftest.$ac_ext <<EOF
2498 #line 2499 "configure"
2499 #include "confdefs.h"
2500 #include <sys/types.h>
2501 #include <signal.h>
2502 #ifdef signal
2503 #undef signal
2504 #endif
2505 #ifdef __cplusplus
2506 extern "C" void (*signal (int, void (*)(int)))(int);
2507 #else
2508 void (*signal ()) ();
2509 #endif
2510
2511 int main() {
2512 int i;
2513 ; return 0; }
2514 EOF
2515 if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2516   rm -rf conftest*
2517   ac_cv_type_signal=void
2518 else
2519   echo "configure: failed program was:" >&5
2520   cat conftest.$ac_ext >&5
2521   rm -rf conftest*
2522   ac_cv_type_signal=int
2523 fi
2524 rm -f conftest*
2525 fi
2526
2527 echo "$ac_t""$ac_cv_type_signal" 1>&6
2528 cat >> confdefs.h <<EOF
2529 #define RETSIGTYPE $ac_cv_type_signal
2530 EOF
2531
2532
2533 echo $ac_n "checking size of char""... $ac_c" 1>&6
2534 echo "configure:2535: checking size of char" >&5
2535 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2536   echo $ac_n "(cached) $ac_c" 1>&6
2537 else
2538   if test "$cross_compiling" = yes; then
2539     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2540 else
2541   cat > conftest.$ac_ext <<EOF
2542 #line 2543 "configure"
2543 #include "confdefs.h"
2544 #ifdef __cplusplus
2545 extern "C" void exit(int);
2546 #endif
2547 #include <stdio.h>
2548 #include <sys/types.h>
2549 main()
2550 {
2551   FILE *f=fopen("conftestval", "w");
2552   if (!f) exit(1);
2553   fprintf(f, "%d\n", sizeof(char));
2554   exit(0);
2555 }
2556 EOF
2557 if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2558 then
2559   ac_cv_sizeof_char=`cat conftestval`
2560 else
2561   echo "configure: failed program was:" >&5
2562   cat conftest.$ac_ext >&5
2563   rm -fr conftest*
2564   ac_cv_sizeof_char=0
2565 fi
2566 rm -fr conftest*
2567 fi
2568
2569 fi
2570 echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2571 cat >> confdefs.h <<EOF
2572 #define SIZEOF_CHAR $ac_cv_sizeof_char
2573 EOF
2574
2575
2576 echo $ac_n "checking size of short""... $ac_c" 1>&6
2577 echo "configure:2578: checking size of short" >&5
2578 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2579   echo $ac_n "(cached) $ac_c" 1>&6
2580 else
2581   if test "$cross_compiling" = yes; then
2582     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2583 else
2584   cat > conftest.$ac_ext <<EOF
2585 #line 2586 "configure"
2586 #include "confdefs.h"
2587 #ifdef __cplusplus
2588 extern "C" void exit(int);
2589 #endif
2590 #include <stdio.h>
2591 #include <sys/types.h>
2592 main()
2593 {
2594   FILE *f=fopen("conftestval", "w");
2595   if (!f) exit(1);
2596   fprintf(f, "%d\n", sizeof(short));
2597   exit(0);
2598 }
2599 EOF
2600 if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2601 then
2602   ac_cv_sizeof_short=`cat conftestval`
2603 else
2604   echo "configure: failed program was:" >&5
2605   cat conftest.$ac_ext >&5
2606   rm -fr conftest*
2607   ac_cv_sizeof_short=0
2608 fi
2609 rm -fr conftest*
2610 fi
2611
2612 fi
2613 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2614 cat >> confdefs.h <<EOF
2615 #define SIZEOF_SHORT $ac_cv_sizeof_short
2616 EOF
2617
2618
2619 echo $ac_n "checking size of int""... $ac_c" 1>&6
2620 echo "configure:2621: checking size of int" >&5
2621 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2622   echo $ac_n "(cached) $ac_c" 1>&6
2623 else
2624   if test "$cross_compiling" = yes; then
2625     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2626 else
2627   cat > conftest.$ac_ext <<EOF
2628 #line 2629 "configure"
2629 #include "confdefs.h"
2630 #ifdef __cplusplus
2631 extern "C" void exit(int);
2632 #endif
2633 #include <stdio.h>
2634 #include <sys/types.h>
2635 main()
2636 {
2637   FILE *f=fopen("conftestval", "w");
2638   if (!f) exit(1);
2639   fprintf(f, "%d\n", sizeof(int));
2640   exit(0);
2641 }
2642 EOF
2643 if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2644 then
2645   ac_cv_sizeof_int=`cat conftestval`
2646 else
2647   echo "configure: failed program was:" >&5
2648   cat conftest.$ac_ext >&5
2649   rm -fr conftest*
2650   ac_cv_sizeof_int=0
2651 fi
2652 rm -fr conftest*
2653 fi
2654
2655 fi
2656 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2657 cat >> confdefs.h <<EOF
2658 #define SIZEOF_INT $ac_cv_sizeof_int
2659 EOF
2660
2661
2662 echo $ac_n "checking size of long""... $ac_c" 1>&6
2663 echo "configure:2664: checking size of long" >&5
2664 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2665   echo $ac_n "(cached) $ac_c" 1>&6
2666 else
2667   if test "$cross_compiling" = yes; then
2668     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2669 else
2670   cat > conftest.$ac_ext <<EOF
2671 #line 2672 "configure"
2672 #include "confdefs.h"
2673 #ifdef __cplusplus
2674 extern "C" void exit(int);
2675 #endif
2676 #include <stdio.h>
2677 #include <sys/types.h>
2678 main()
2679 {
2680   FILE *f=fopen("conftestval", "w");
2681   if (!f) exit(1);
2682   fprintf(f, "%d\n", sizeof(long));
2683   exit(0);
2684 }
2685 EOF
2686 if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2687 then
2688   ac_cv_sizeof_long=`cat conftestval`
2689 else
2690   echo "configure: failed program was:" >&5
2691   cat conftest.$ac_ext >&5
2692   rm -fr conftest*
2693   ac_cv_sizeof_long=0
2694 fi
2695 rm -fr conftest*
2696 fi
2697
2698 fi
2699 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2700 cat >> confdefs.h <<EOF
2701 #define SIZEOF_LONG $ac_cv_sizeof_long
2702 EOF
2703
2704
2705 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2706 echo "configure:2707: checking size of long long" >&5
2707 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   if test "$cross_compiling" = yes; then
2711     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2712 else
2713   cat > conftest.$ac_ext <<EOF
2714 #line 2715 "configure"
2715 #include "confdefs.h"
2716 #ifdef __cplusplus
2717 extern "C" void exit(int);
2718 #endif
2719 #include <stdio.h>
2720 #include <sys/types.h>
2721 main()
2722 {
2723   FILE *f=fopen("conftestval", "w");
2724   if (!f) exit(1);
2725   fprintf(f, "%d\n", sizeof(long long));
2726   exit(0);
2727 }
2728 EOF
2729 if { (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2730 then
2731   ac_cv_sizeof_long_long=`cat conftestval`
2732 else
2733   echo "configure: failed program was:" >&5
2734   cat conftest.$ac_ext >&5
2735   rm -fr conftest*
2736   ac_cv_sizeof_long_long=0
2737 fi
2738 rm -fr conftest*
2739 fi
2740
2741 fi
2742 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2743 cat >> confdefs.h <<EOF
2744 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2745 EOF
2746
2747
2748
2749 type_name()
2750 {
2751     if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
2752         echo "char"
2753         exit
2754     fi
2755     if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
2756         echo "short"
2757         exit
2758     fi
2759     if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
2760         echo "int"
2761         exit
2762     fi
2763     if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
2764         echo "long"
2765         exit
2766     fi
2767     if expr "$ac_cv_sizeof_long_long" '>=' "$1" >/dev/null; then
2768         echo "long long"
2769         exit
2770     fi
2771     echo "long long"
2772 }
2773
2774 echo $ac_n "checking type name for byte""... $ac_c" 1>&6
2775 echo "configure:2776: checking type name for byte" >&5
2776 TYPE_BYTE=`type_name 1`
2777 echo "$ac_t""$TYPE_BYTE" 1>&6
2778 echo $ac_n "checking type name for word""... $ac_c" 1>&6
2779 echo "configure:2780: checking type name for word" >&5
2780 TYPE_WORD=`type_name 2`
2781 echo "$ac_t""$TYPE_WORD" 1>&6
2782 echo $ac_n "checking type name for dword""... $ac_c" 1>&6
2783 echo "configure:2784: checking type name for dword" >&5
2784 TYPE_DWORD=`type_name 4`
2785 echo "$ac_t""$TYPE_DWORD" 1>&6
2786 cat >> confdefs.h <<EOF
2787 #define TYPE_BYTE $TYPE_BYTE
2788 EOF
2789
2790 cat >> confdefs.h <<EOF
2791 #define TYPE_WORD $TYPE_WORD
2792 EOF
2793
2794 cat >> confdefs.h <<EOF
2795 #define TYPE_DWORD $TYPE_DWORD
2796 EOF
2797
2798
2799 # Generating output files
2800 # ===========================================================================
2801
2802 trap '' 1 2 15
2803 cat > confcache <<\EOF
2804 # This file is a shell script that caches the results of configure
2805 # tests run on this system so they can be shared between configure
2806 # scripts and configure runs.  It is not useful on other systems.
2807 # If it contains results you don't want to keep, you may remove or edit it.
2808 #
2809 # By default, configure uses ./config.cache as the cache file,
2810 # creating it if it does not exist already.  You can give configure
2811 # the --cache-file=FILE option to use a different cache file; that is
2812 # what configure does when it calls configure scripts in
2813 # subdirectories, so they share the cache.
2814 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2815 # config.status only pays attention to the cache file if you give it the
2816 # --recheck option to rerun configure.
2817 #
2818 EOF
2819 # The following way of writing the cache mishandles newlines in values,
2820 # but we know of no workaround that is simple, portable, and efficient.
2821 # So, don't put newlines in cache variables' values.
2822 # Ultrix sh set writes to stderr and can't be redirected directly,
2823 # and sets the high bit in the cache file unless we assign to the vars.
2824 (set) 2>&1 |
2825   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2826   *ac_space=\ *)
2827     # `set' does not quote correctly, so add quotes (double-quote substitution
2828     # turns \\\\ into \\, and sed turns \\ into \).
2829     sed -n \
2830       -e "s/'/'\\\\''/g" \
2831       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2832     ;;
2833   *)
2834     # `set' quotes correctly as required by POSIX, so do not add quotes.
2835     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2836     ;;
2837   esac >> confcache
2838 if cmp -s $cache_file confcache; then
2839   :
2840 else
2841   if test -w $cache_file; then
2842     echo "updating cache $cache_file"
2843     cat confcache > $cache_file
2844   else
2845     echo "not updating unwritable cache $cache_file"
2846   fi
2847 fi
2848 rm -f confcache
2849
2850 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2851
2852 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2853 # Let make expand exec_prefix.
2854 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2855
2856 # Any assignment to VPATH causes Sun make to only execute
2857 # the first set of double-colon rules, so remove it if not needed.
2858 # If there is a colon in the path, we need to keep it.
2859 if test "x$srcdir" = x.; then
2860   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2861 fi
2862
2863 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2864
2865 DEFS=-DHAVE_CONFIG_H
2866
2867 # Without the "./", some shells look in PATH for config.status.
2868 : ${CONFIG_STATUS=./config.status}
2869
2870 echo creating $CONFIG_STATUS
2871 rm -f $CONFIG_STATUS
2872 cat > $CONFIG_STATUS <<EOF
2873 #! /bin/sh
2874 # Generated automatically by configure.
2875 # Run this file to recreate the current configuration.
2876 # This directory was configured as follows,
2877 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2878 #
2879 # $0 $ac_configure_args
2880 #
2881 # Compiler output produced by configure, useful for debugging
2882 # configure, is in ./config.log if it exists.
2883
2884 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2885 for ac_option
2886 do
2887   case "\$ac_option" in
2888   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2889     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2890     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2891   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2892     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2893     exit 0 ;;
2894   -help | --help | --hel | --he | --h)
2895     echo "\$ac_cs_usage"; exit 0 ;;
2896   *) echo "\$ac_cs_usage"; exit 1 ;;
2897   esac
2898 done
2899
2900 ac_given_srcdir=$srcdir
2901 ac_given_INSTALL="$INSTALL"
2902
2903 trap 'rm -fr `echo "main.mk:main_in.mk
2904 sim.src/Makefile
2905 cmd.src/Makefile
2906 s51.src/Makefile
2907 avr.src/Makefile
2908 z80.src/Makefile
2909 gui.src/Makefile
2910 gui.src/serio.src/Makefile
2911 doc/Makefile
2912  ddconfig.h:ddconfig_in.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2913 EOF
2914 cat >> $CONFIG_STATUS <<EOF
2915
2916 # Protect against being on the right side of a sed subst in config.status.
2917 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2918  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2919 $ac_vpsub
2920 $extrasub
2921 s%@SHELL@%$SHELL%g
2922 s%@CFLAGS@%$CFLAGS%g
2923 s%@CPPFLAGS@%$CPPFLAGS%g
2924 s%@CXXFLAGS@%$CXXFLAGS%g
2925 s%@FFLAGS@%$FFLAGS%g
2926 s%@DEFS@%$DEFS%g
2927 s%@LDFLAGS@%$LDFLAGS%g
2928 s%@LIBS@%$LIBS%g
2929 s%@exec_prefix@%$exec_prefix%g
2930 s%@prefix@%$prefix%g
2931 s%@program_transform_name@%$program_transform_name%g
2932 s%@bindir@%$bindir%g
2933 s%@sbindir@%$sbindir%g
2934 s%@libexecdir@%$libexecdir%g
2935 s%@datadir@%$datadir%g
2936 s%@sysconfdir@%$sysconfdir%g
2937 s%@sharedstatedir@%$sharedstatedir%g
2938 s%@localstatedir@%$localstatedir%g
2939 s%@libdir@%$libdir%g
2940 s%@includedir@%$includedir%g
2941 s%@oldincludedir@%$oldincludedir%g
2942 s%@infodir@%$infodir%g
2943 s%@mandir@%$mandir%g
2944 s%@AWK@%$AWK%g
2945 s%@VERSION@%$VERSION%g
2946 s%@VERSIONHI@%$VERSIONHI%g
2947 s%@VERSIONLO@%$VERSIONLO%g
2948 s%@VERSIONP@%$VERSIONP%g
2949 s%@CXX@%$CXX%g
2950 s%@CXXCPP@%$CXXCPP%g
2951 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2952 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2953 s%@INSTALL_DATA@%$INSTALL_DATA%g
2954 s%@RANLIB@%$RANLIB%g
2955 s%@dl_ok@%$dl_ok%g
2956 s%@DL@%$DL%g
2957 s%@panel_ok@%$panel_ok%g
2958 s%@curses_ok@%$curses_ok%g
2959 s%@CURSES_LIBS@%$CURSES_LIBS%g
2960 s%@M_OR_MM@%$M_OR_MM%g
2961 s%@SHAREDLIB@%$SHAREDLIB%g
2962 s%@PICOPT@%$PICOPT%g
2963
2964 CEOF
2965 EOF
2966
2967 cat >> $CONFIG_STATUS <<\EOF
2968
2969 # Split the substitutions into bite-sized pieces for seds with
2970 # small command number limits, like on Digital OSF/1 and HP-UX.
2971 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2972 ac_file=1 # Number of current file.
2973 ac_beg=1 # First line for current file.
2974 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2975 ac_more_lines=:
2976 ac_sed_cmds=""
2977 while $ac_more_lines; do
2978   if test $ac_beg -gt 1; then
2979     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2980   else
2981     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2982   fi
2983   if test ! -s conftest.s$ac_file; then
2984     ac_more_lines=false
2985     rm -f conftest.s$ac_file
2986   else
2987     if test -z "$ac_sed_cmds"; then
2988       ac_sed_cmds="sed -f conftest.s$ac_file"
2989     else
2990       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2991     fi
2992     ac_file=`expr $ac_file + 1`
2993     ac_beg=$ac_end
2994     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2995   fi
2996 done
2997 if test -z "$ac_sed_cmds"; then
2998   ac_sed_cmds=cat
2999 fi
3000 EOF
3001
3002 cat >> $CONFIG_STATUS <<EOF
3003
3004 CONFIG_FILES=\${CONFIG_FILES-"main.mk:main_in.mk
3005 sim.src/Makefile
3006 cmd.src/Makefile
3007 s51.src/Makefile
3008 avr.src/Makefile
3009 z80.src/Makefile
3010 gui.src/Makefile
3011 gui.src/serio.src/Makefile
3012 doc/Makefile
3013 "}
3014 EOF
3015 cat >> $CONFIG_STATUS <<\EOF
3016 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3017   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3018   case "$ac_file" in
3019   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3020        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3021   *) ac_file_in="${ac_file}.in" ;;
3022   esac
3023
3024   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3025
3026   # Remove last slash and all that follows it.  Not all systems have dirname.
3027   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3028   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3029     # The file is in a subdirectory.
3030     test ! -d "$ac_dir" && mkdir "$ac_dir"
3031     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3032     # A "../" for each directory in $ac_dir_suffix.
3033     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3034   else
3035     ac_dir_suffix= ac_dots=
3036   fi
3037
3038   case "$ac_given_srcdir" in
3039   .)  srcdir=.
3040       if test -z "$ac_dots"; then top_srcdir=.
3041       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3042   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3043   *) # Relative path.
3044     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3045     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3046   esac
3047
3048   case "$ac_given_INSTALL" in
3049   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3050   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3051   esac
3052
3053   echo creating "$ac_file"
3054   rm -f "$ac_file"
3055   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3056   case "$ac_file" in
3057   *Makefile*) ac_comsub="1i\\
3058 # $configure_input" ;;
3059   *) ac_comsub= ;;
3060   esac
3061
3062   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3063   sed -e "$ac_comsub
3064 s%@configure_input@%$configure_input%g
3065 s%@srcdir@%$srcdir%g
3066 s%@top_srcdir@%$top_srcdir%g
3067 s%@INSTALL@%$INSTALL%g
3068 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3069 fi; done
3070 rm -f conftest.s*
3071
3072 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3073 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3074 #
3075 # ac_d sets the value in "#define NAME VALUE" lines.
3076 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3077 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3078 ac_dC='\3'
3079 ac_dD='%g'
3080 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3081 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3082 ac_uB='\([      ]\)%\1#\2define\3'
3083 ac_uC=' '
3084 ac_uD='\4%g'
3085 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3086 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3087 ac_eB='$%\1#\2define\3'
3088 ac_eC=' '
3089 ac_eD='%g'
3090
3091 if test "${CONFIG_HEADERS+set}" != set; then
3092 EOF
3093 cat >> $CONFIG_STATUS <<EOF
3094   CONFIG_HEADERS="ddconfig.h:ddconfig_in.h"
3095 EOF
3096 cat >> $CONFIG_STATUS <<\EOF
3097 fi
3098 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3099   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3100   case "$ac_file" in
3101   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3102        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3103   *) ac_file_in="${ac_file}.in" ;;
3104   esac
3105
3106   echo creating $ac_file
3107
3108   rm -f conftest.frag conftest.in conftest.out
3109   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3110   cat $ac_file_inputs > conftest.in
3111
3112 EOF
3113
3114 # Transform confdefs.h into a sed script conftest.vals that substitutes
3115 # the proper values into config.h.in to produce config.h.  And first:
3116 # Protect against being on the right side of a sed subst in config.status.
3117 # Protect against being in an unquoted here document in config.status.
3118 rm -f conftest.vals
3119 cat > conftest.hdr <<\EOF
3120 s/[\\&%]/\\&/g
3121 s%[\\$`]%\\&%g
3122 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3123 s%ac_d%ac_u%gp
3124 s%ac_u%ac_e%gp
3125 EOF
3126 sed -n -f conftest.hdr confdefs.h > conftest.vals
3127 rm -f conftest.hdr
3128
3129 # This sed command replaces #undef with comments.  This is necessary, for
3130 # example, in the case of _POSIX_SOURCE, which is predefined and required
3131 # on some systems where configure will not decide to define it.
3132 cat >> conftest.vals <<\EOF
3133 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3134 EOF
3135
3136 # Break up conftest.vals because some shells have a limit on
3137 # the size of here documents, and old seds have small limits too.
3138
3139 rm -f conftest.tail
3140 while :
3141 do
3142   ac_lines=`grep -c . conftest.vals`
3143   # grep -c gives empty output for an empty file on some AIX systems.
3144   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3145   # Write a limited-size here document to conftest.frag.
3146   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3147   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3148   echo 'CEOF
3149   sed -f conftest.frag conftest.in > conftest.out
3150   rm -f conftest.in
3151   mv conftest.out conftest.in
3152 ' >> $CONFIG_STATUS
3153   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3154   rm -f conftest.vals
3155   mv conftest.tail conftest.vals
3156 done
3157 rm -f conftest.vals
3158
3159 cat >> $CONFIG_STATUS <<\EOF
3160   rm -f conftest.frag conftest.h
3161   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3162   cat conftest.in >> conftest.h
3163   rm -f conftest.in
3164   if cmp -s $ac_file conftest.h 2>/dev/null; then
3165     echo "$ac_file is unchanged"
3166     rm -f conftest.h
3167   else
3168     # Remove last slash and all that follows it.  Not all systems have dirname.
3169       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3170       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3171       # The file is in a subdirectory.
3172       test ! -d "$ac_dir" && mkdir "$ac_dir"
3173     fi
3174     rm -f $ac_file
3175     mv conftest.h $ac_file
3176   fi
3177 fi; done
3178
3179 EOF
3180 cat >> $CONFIG_STATUS <<EOF
3181
3182 EOF
3183 cat >> $CONFIG_STATUS <<\EOF
3184
3185 exit 0
3186 EOF
3187 chmod +x $CONFIG_STATUS
3188 rm -fr confdefs* $ac_clean_files
3189 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3190
3191
3192 #gui.src/portmon.src/Makefile
3193
3194
3195 # End of configure/configure.in