Initial checkin. I created this by combining the XBoard 4.2.6 and
[xboard.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-Xaw3d            use Xaw3d instead of Xaw"
16 ac_help="$ac_help
17   --with-x                use the X Window System"
18 ac_help="$ac_help
19   --enable-xpm            libXpm will be used if found (default)
20   --disable-xpm           libXpm will not be used"
21 ac_help="$ac_help
22   --enable-ptys           force use of pseudo-ttys with child processes
23   --disable-ptys          force use of pipes with child processes"
24 ac_help="$ac_help
25   --enable-zippy          features for interfacing a chess program to ICS"
26 ac_help="$ac_help
27   --enable-sigint         sending SIGINT (^C) wakes up GNU Chess (default)
28   --disable-sigint        typing a command wakes up GNU Chess"
29
30 # Initialize some variables set by options.
31 # The variables have the same names as the options, with
32 # dashes changed to underlines.
33 build=NONE
34 cache_file=./config.cache
35 exec_prefix=NONE
36 host=NONE
37 no_create=
38 nonopt=NONE
39 no_recursion=
40 prefix=NONE
41 program_prefix=NONE
42 program_suffix=NONE
43 program_transform_name=s,x,x,
44 silent=
45 site=
46 srcdir=
47 target=NONE
48 verbose=
49 x_includes=NONE
50 x_libraries=NONE
51 bindir='${exec_prefix}/bin'
52 sbindir='${exec_prefix}/sbin'
53 libexecdir='${exec_prefix}/libexec'
54 datadir='${prefix}/share'
55 sysconfdir='${prefix}/etc'
56 sharedstatedir='${prefix}/com'
57 localstatedir='${prefix}/var'
58 libdir='${exec_prefix}/lib'
59 includedir='${prefix}/include'
60 oldincludedir='/usr/include'
61 infodir='${prefix}/info'
62 mandir='${prefix}/man'
63
64 # Initialize some other variables.
65 subdirs=
66 MFLAGS= MAKEFLAGS=
67 SHELL=${CONFIG_SHELL-/bin/sh}
68 # Maximum number of lines to put in a shell here document.
69 ac_max_here_lines=12
70
71 ac_prev=
72 for ac_option
73 do
74
75   # If the previous option needs an argument, assign it.
76   if test -n "$ac_prev"; then
77     eval "$ac_prev=\$ac_option"
78     ac_prev=
79     continue
80   fi
81
82   case "$ac_option" in
83   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
84   *) ac_optarg= ;;
85   esac
86
87   # Accept the important Cygnus configure options, so we can diagnose typos.
88
89   case "$ac_option" in
90
91   -bindir | --bindir | --bindi | --bind | --bin | --bi)
92     ac_prev=bindir ;;
93   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
94     bindir="$ac_optarg" ;;
95
96   -build | --build | --buil | --bui | --bu)
97     ac_prev=build ;;
98   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
99     build="$ac_optarg" ;;
100
101   -cache-file | --cache-file | --cache-fil | --cache-fi \
102   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
103     ac_prev=cache_file ;;
104   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
105   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
106     cache_file="$ac_optarg" ;;
107
108   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
109     ac_prev=datadir ;;
110   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
111   | --da=*)
112     datadir="$ac_optarg" ;;
113
114   -disable-* | --disable-*)
115     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
116     # Reject names that are not valid shell variable names.
117     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
118       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
119     fi
120     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
121     eval "enable_${ac_feature}=no" ;;
122
123   -enable-* | --enable-*)
124     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
125     # Reject names that are not valid shell variable names.
126     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
127       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
128     fi
129     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130     case "$ac_option" in
131       *=*) ;;
132       *) ac_optarg=yes ;;
133     esac
134     eval "enable_${ac_feature}='$ac_optarg'" ;;
135
136   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
137   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
138   | --exec | --exe | --ex)
139     ac_prev=exec_prefix ;;
140   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
141   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
142   | --exec=* | --exe=* | --ex=*)
143     exec_prefix="$ac_optarg" ;;
144
145   -gas | --gas | --ga | --g)
146     # Obsolete; use --with-gas.
147     with_gas=yes ;;
148
149   -help | --help | --hel | --he)
150     # Omit some internal or obsolete options to make the list less imposing.
151     # This message is too long to be a string in the A/UX 3.1 sh.
152     cat << EOF
153 Usage: configure [options] [host]
154 Options: [defaults in brackets after descriptions]
155 Configuration:
156   --cache-file=FILE       cache test results in FILE
157   --help                  print this message
158   --no-create             do not create output files
159   --quiet, --silent       do not print \`checking...' messages
160   --version               print the version of autoconf that created configure
161 Directory and file names:
162   --prefix=PREFIX         install architecture-independent files in PREFIX
163                           [$ac_default_prefix]
164   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
165                           [same as prefix]
166   --bindir=DIR            user executables in DIR [EPREFIX/bin]
167   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
168   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
169   --datadir=DIR           read-only architecture-independent data in DIR
170                           [PREFIX/share]
171   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
172   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
173                           [PREFIX/com]
174   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
175   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
176   --includedir=DIR        C header files in DIR [PREFIX/include]
177   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
178   --infodir=DIR           info documentation in DIR [PREFIX/info]
179   --mandir=DIR            man documentation in DIR [PREFIX/man]
180   --srcdir=DIR            find the sources in DIR [configure dir or ..]
181   --program-prefix=PREFIX prepend PREFIX to installed program names
182   --program-suffix=SUFFIX append SUFFIX to installed program names
183   --program-transform-name=PROGRAM
184                           run sed PROGRAM on installed program names
185 EOF
186     cat << EOF
187 Host type:
188   --build=BUILD           configure for building on BUILD [BUILD=HOST]
189   --host=HOST             configure for HOST [guessed]
190   --target=TARGET         configure for TARGET [TARGET=HOST]
191 Features and packages:
192   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
193   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
194   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
195   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
196   --x-includes=DIR        X include files are in DIR
197   --x-libraries=DIR       X library files are in DIR
198 EOF
199     if test -n "$ac_help"; then
200       echo "--enable and --with options recognized:$ac_help"
201     fi
202     exit 0 ;;
203
204   -host | --host | --hos | --ho)
205     ac_prev=host ;;
206   -host=* | --host=* | --hos=* | --ho=*)
207     host="$ac_optarg" ;;
208
209   -includedir | --includedir | --includedi | --included | --include \
210   | --includ | --inclu | --incl | --inc)
211     ac_prev=includedir ;;
212   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
213   | --includ=* | --inclu=* | --incl=* | --inc=*)
214     includedir="$ac_optarg" ;;
215
216   -infodir | --infodir | --infodi | --infod | --info | --inf)
217     ac_prev=infodir ;;
218   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
219     infodir="$ac_optarg" ;;
220
221   -libdir | --libdir | --libdi | --libd)
222     ac_prev=libdir ;;
223   -libdir=* | --libdir=* | --libdi=* | --libd=*)
224     libdir="$ac_optarg" ;;
225
226   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
227   | --libexe | --libex | --libe)
228     ac_prev=libexecdir ;;
229   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
230   | --libexe=* | --libex=* | --libe=*)
231     libexecdir="$ac_optarg" ;;
232
233   -localstatedir | --localstatedir | --localstatedi | --localstated \
234   | --localstate | --localstat | --localsta | --localst \
235   | --locals | --local | --loca | --loc | --lo)
236     ac_prev=localstatedir ;;
237   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
238   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
239   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
240     localstatedir="$ac_optarg" ;;
241
242   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
243     ac_prev=mandir ;;
244   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
245     mandir="$ac_optarg" ;;
246
247   -nfp | --nfp | --nf)
248     # Obsolete; use --without-fp.
249     with_fp=no ;;
250
251   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
252   | --no-cr | --no-c)
253     no_create=yes ;;
254
255   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
256   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
257     no_recursion=yes ;;
258
259   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
260   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
261   | --oldin | --oldi | --old | --ol | --o)
262     ac_prev=oldincludedir ;;
263   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
264   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
265   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
266     oldincludedir="$ac_optarg" ;;
267
268   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
269     ac_prev=prefix ;;
270   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
271     prefix="$ac_optarg" ;;
272
273   -program-prefix | --program-prefix | --program-prefi | --program-pref \
274   | --program-pre | --program-pr | --program-p)
275     ac_prev=program_prefix ;;
276   -program-prefix=* | --program-prefix=* | --program-prefi=* \
277   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
278     program_prefix="$ac_optarg" ;;
279
280   -program-suffix | --program-suffix | --program-suffi | --program-suff \
281   | --program-suf | --program-su | --program-s)
282     ac_prev=program_suffix ;;
283   -program-suffix=* | --program-suffix=* | --program-suffi=* \
284   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
285     program_suffix="$ac_optarg" ;;
286
287   -program-transform-name | --program-transform-name \
288   | --program-transform-nam | --program-transform-na \
289   | --program-transform-n | --program-transform- \
290   | --program-transform | --program-transfor \
291   | --program-transfo | --program-transf \
292   | --program-trans | --program-tran \
293   | --progr-tra | --program-tr | --program-t)
294     ac_prev=program_transform_name ;;
295   -program-transform-name=* | --program-transform-name=* \
296   | --program-transform-nam=* | --program-transform-na=* \
297   | --program-transform-n=* | --program-transform-=* \
298   | --program-transform=* | --program-transfor=* \
299   | --program-transfo=* | --program-transf=* \
300   | --program-trans=* | --program-tran=* \
301   | --progr-tra=* | --program-tr=* | --program-t=*)
302     program_transform_name="$ac_optarg" ;;
303
304   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
305   | -silent | --silent | --silen | --sile | --sil)
306     silent=yes ;;
307
308   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
309     ac_prev=sbindir ;;
310   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
311   | --sbi=* | --sb=*)
312     sbindir="$ac_optarg" ;;
313
314   -sharedstatedir | --sharedstatedir | --sharedstatedi \
315   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
316   | --sharedst | --shareds | --shared | --share | --shar \
317   | --sha | --sh)
318     ac_prev=sharedstatedir ;;
319   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
320   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
321   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
322   | --sha=* | --sh=*)
323     sharedstatedir="$ac_optarg" ;;
324
325   -site | --site | --sit)
326     ac_prev=site ;;
327   -site=* | --site=* | --sit=*)
328     site="$ac_optarg" ;;
329
330   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
331     ac_prev=srcdir ;;
332   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
333     srcdir="$ac_optarg" ;;
334
335   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
336   | --syscon | --sysco | --sysc | --sys | --sy)
337     ac_prev=sysconfdir ;;
338   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
339   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
340     sysconfdir="$ac_optarg" ;;
341
342   -target | --target | --targe | --targ | --tar | --ta | --t)
343     ac_prev=target ;;
344   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
345     target="$ac_optarg" ;;
346
347   -v | -verbose | --verbose | --verbos | --verbo | --verb)
348     verbose=yes ;;
349
350   -version | --version | --versio | --versi | --vers)
351     echo "configure generated by autoconf version 2.13"
352     exit 0 ;;
353
354   -with-* | --with-*)
355     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
356     # Reject names that are not valid shell variable names.
357     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
358       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
359     fi
360     ac_package=`echo $ac_package| sed 's/-/_/g'`
361     case "$ac_option" in
362       *=*) ;;
363       *) ac_optarg=yes ;;
364     esac
365     eval "with_${ac_package}='$ac_optarg'" ;;
366
367   -without-* | --without-*)
368     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
369     # Reject names that are not valid shell variable names.
370     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
371       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
372     fi
373     ac_package=`echo $ac_package| sed 's/-/_/g'`
374     eval "with_${ac_package}=no" ;;
375
376   --x)
377     # Obsolete; use --with-x.
378     with_x=yes ;;
379
380   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
381   | --x-incl | --x-inc | --x-in | --x-i)
382     ac_prev=x_includes ;;
383   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
384   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
385     x_includes="$ac_optarg" ;;
386
387   -x-libraries | --x-libraries | --x-librarie | --x-librari \
388   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
389     ac_prev=x_libraries ;;
390   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
391   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
392     x_libraries="$ac_optarg" ;;
393
394   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
395     ;;
396
397   *)
398     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
399       echo "configure: warning: $ac_option: invalid host type" 1>&2
400     fi
401     if test "x$nonopt" != xNONE; then
402       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
403     fi
404     nonopt="$ac_option"
405     ;;
406
407   esac
408 done
409
410 if test -n "$ac_prev"; then
411   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
412 fi
413
414 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
415
416 # File descriptor usage:
417 # 0 standard input
418 # 1 file creation
419 # 2 errors and warnings
420 # 3 some systems may open it to /dev/tty
421 # 4 used on the Kubota Titan
422 # 6 checking for... messages and results
423 # 5 compiler messages saved in config.log
424 if test "$silent" = yes; then
425   exec 6>/dev/null
426 else
427   exec 6>&1
428 fi
429 exec 5>./config.log
430
431 echo "\
432 This file contains any messages produced by compilers while
433 running configure, to aid debugging if configure makes a mistake.
434 " 1>&5
435
436 # Strip out --no-create and --no-recursion so they do not pile up.
437 # Also quote any args containing shell metacharacters.
438 ac_configure_args=
439 for ac_arg
440 do
441   case "$ac_arg" in
442   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
443   | --no-cr | --no-c) ;;
444   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
445   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
446   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
447   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
448   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
449   esac
450 done
451
452 # NLS nuisances.
453 # Only set these to C if already set.  These must not be set unconditionally
454 # because not all systems understand e.g. LANG=C (notably SCO).
455 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
456 # Non-C LC_CTYPE values break the ctype check.
457 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
458 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
459 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
460 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
461
462 # confdefs.h avoids OS command line length limits that DEFS can exceed.
463 rm -rf conftest* confdefs.h
464 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
465 echo > confdefs.h
466
467 # A filename unique to this package, relative to the directory that
468 # configure is in, which we can look for to find out if srcdir is correct.
469 ac_unique_file=xboard.c
470
471 # Find the source files, if location was not specified.
472 if test -z "$srcdir"; then
473   ac_srcdir_defaulted=yes
474   # Try the directory containing this script, then its parent.
475   ac_prog=$0
476   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
477   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
478   srcdir=$ac_confdir
479   if test ! -r $srcdir/$ac_unique_file; then
480     srcdir=..
481   fi
482 else
483   ac_srcdir_defaulted=no
484 fi
485 if test ! -r $srcdir/$ac_unique_file; then
486   if test "$ac_srcdir_defaulted" = yes; then
487     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
488   else
489     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
490   fi
491 fi
492 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
493
494 # Prefer explicitly selected file to automatically selected ones.
495 if test -z "$CONFIG_SITE"; then
496   if test "x$prefix" != xNONE; then
497     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
498   else
499     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
500   fi
501 fi
502 for ac_site_file in $CONFIG_SITE; do
503   if test -r "$ac_site_file"; then
504     echo "loading site script $ac_site_file"
505     . "$ac_site_file"
506   fi
507 done
508
509 if test -r "$cache_file"; then
510   echo "loading cache $cache_file"
511   . $cache_file
512 else
513   echo "creating cache $cache_file"
514   > $cache_file
515 fi
516
517 ac_ext=c
518 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
519 ac_cpp='$CPP $CPPFLAGS'
520 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
521 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
522 cross_compiling=$ac_cv_prog_cc_cross
523
524 ac_exeext=
525 ac_objext=o
526 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
527   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
528   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
529     ac_n= ac_c='
530 ' ac_t='        '
531   else
532     ac_n=-n ac_c= ac_t=
533   fi
534 else
535   ac_n= ac_c='\c' ac_t=
536 fi
537
538
539
540
541 PRODUCT=xboard
542 VERSION=4.2
543 PATCHLEVEL=6
544
545 if test -z "$CFLAGS" ; then
546   CFLAGS=" "
547 fi
548 # Extract the first word of "gcc", so it can be a program name with args.
549 set dummy gcc; ac_word=$2
550 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
551 echo "configure:552: checking for $ac_word" >&5
552 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
553   echo $ac_n "(cached) $ac_c" 1>&6
554 else
555   if test -n "$CC"; then
556   ac_cv_prog_CC="$CC" # Let the user override the test.
557 else
558   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
559   ac_dummy="$PATH"
560   for ac_dir in $ac_dummy; do
561     test -z "$ac_dir" && ac_dir=.
562     if test -f $ac_dir/$ac_word; then
563       ac_cv_prog_CC="gcc"
564       break
565     fi
566   done
567   IFS="$ac_save_ifs"
568 fi
569 fi
570 CC="$ac_cv_prog_CC"
571 if test -n "$CC"; then
572   echo "$ac_t""$CC" 1>&6
573 else
574   echo "$ac_t""no" 1>&6
575 fi
576
577 if test -z "$CC"; then
578   # Extract the first word of "cc", so it can be a program name with args.
579 set dummy cc; ac_word=$2
580 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
581 echo "configure:582: checking for $ac_word" >&5
582 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
583   echo $ac_n "(cached) $ac_c" 1>&6
584 else
585   if test -n "$CC"; then
586   ac_cv_prog_CC="$CC" # Let the user override the test.
587 else
588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
589   ac_prog_rejected=no
590   ac_dummy="$PATH"
591   for ac_dir in $ac_dummy; do
592     test -z "$ac_dir" && ac_dir=.
593     if test -f $ac_dir/$ac_word; then
594       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
595         ac_prog_rejected=yes
596         continue
597       fi
598       ac_cv_prog_CC="cc"
599       break
600     fi
601   done
602   IFS="$ac_save_ifs"
603 if test $ac_prog_rejected = yes; then
604   # We found a bogon in the path, so make sure we never use it.
605   set dummy $ac_cv_prog_CC
606   shift
607   if test $# -gt 0; then
608     # We chose a different compiler from the bogus one.
609     # However, it has the same basename, so the bogon will be chosen
610     # first if we set CC to just the basename; use the full file name.
611     shift
612     set dummy "$ac_dir/$ac_word" "$@"
613     shift
614     ac_cv_prog_CC="$@"
615   fi
616 fi
617 fi
618 fi
619 CC="$ac_cv_prog_CC"
620 if test -n "$CC"; then
621   echo "$ac_t""$CC" 1>&6
622 else
623   echo "$ac_t""no" 1>&6
624 fi
625
626   if test -z "$CC"; then
627     case "`uname -s`" in
628     *win32* | *WIN32*)
629       # Extract the first word of "cl", so it can be a program name with args.
630 set dummy cl; ac_word=$2
631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
632 echo "configure:633: checking for $ac_word" >&5
633 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
634   echo $ac_n "(cached) $ac_c" 1>&6
635 else
636   if test -n "$CC"; then
637   ac_cv_prog_CC="$CC" # Let the user override the test.
638 else
639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
640   ac_dummy="$PATH"
641   for ac_dir in $ac_dummy; do
642     test -z "$ac_dir" && ac_dir=.
643     if test -f $ac_dir/$ac_word; then
644       ac_cv_prog_CC="cl"
645       break
646     fi
647   done
648   IFS="$ac_save_ifs"
649 fi
650 fi
651 CC="$ac_cv_prog_CC"
652 if test -n "$CC"; then
653   echo "$ac_t""$CC" 1>&6
654 else
655   echo "$ac_t""no" 1>&6
656 fi
657  ;;
658     esac
659   fi
660   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
661 fi
662
663 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
664 echo "configure:665: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
665
666 ac_ext=c
667 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
668 ac_cpp='$CPP $CPPFLAGS'
669 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
670 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
671 cross_compiling=$ac_cv_prog_cc_cross
672
673 cat > conftest.$ac_ext << EOF
674
675 #line 676 "configure"
676 #include "confdefs.h"
677
678 main(){return(0);}
679 EOF
680 if { (eval echo configure:681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
681   ac_cv_prog_cc_works=yes
682   # If we can't run a trivial program, we are probably using a cross compiler.
683   if (./conftest; exit) 2>/dev/null; then
684     ac_cv_prog_cc_cross=no
685   else
686     ac_cv_prog_cc_cross=yes
687   fi
688 else
689   echo "configure: failed program was:" >&5
690   cat conftest.$ac_ext >&5
691   ac_cv_prog_cc_works=no
692 fi
693 rm -fr conftest*
694 ac_ext=c
695 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
696 ac_cpp='$CPP $CPPFLAGS'
697 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
698 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
699 cross_compiling=$ac_cv_prog_cc_cross
700
701 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
702 if test $ac_cv_prog_cc_works = no; then
703   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
704 fi
705 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
706 echo "configure:707: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
707 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
708 cross_compiling=$ac_cv_prog_cc_cross
709
710 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
711 echo "configure:712: checking whether we are using GNU C" >&5
712 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
713   echo $ac_n "(cached) $ac_c" 1>&6
714 else
715   cat > conftest.c <<EOF
716 #ifdef __GNUC__
717   yes;
718 #endif
719 EOF
720 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
721   ac_cv_prog_gcc=yes
722 else
723   ac_cv_prog_gcc=no
724 fi
725 fi
726
727 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
728
729 if test $ac_cv_prog_gcc = yes; then
730   GCC=yes
731 else
732   GCC=
733 fi
734
735 ac_test_CFLAGS="${CFLAGS+set}"
736 ac_save_CFLAGS="$CFLAGS"
737 CFLAGS=
738 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
739 echo "configure:740: checking whether ${CC-cc} accepts -g" >&5
740 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
741   echo $ac_n "(cached) $ac_c" 1>&6
742 else
743   echo 'void f(){}' > conftest.c
744 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
745   ac_cv_prog_cc_g=yes
746 else
747   ac_cv_prog_cc_g=no
748 fi
749 rm -f conftest*
750
751 fi
752
753 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
754 if test "$ac_test_CFLAGS" = set; then
755   CFLAGS="$ac_save_CFLAGS"
756 elif test $ac_cv_prog_cc_g = yes; then
757   if test "$GCC" = yes; then
758     CFLAGS="-g -O2"
759   else
760     CFLAGS="-g"
761   fi
762 else
763   if test "$GCC" = yes; then
764     CFLAGS="-O2"
765   else
766     CFLAGS=
767   fi
768 fi
769
770 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
771 echo "configure:772: checking how to run the C preprocessor" >&5
772 # On Suns, sometimes $CPP names a directory.
773 if test -n "$CPP" && test -d "$CPP"; then
774   CPP=
775 fi
776 if test -z "$CPP"; then
777 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
778   echo $ac_n "(cached) $ac_c" 1>&6
779 else
780     # This must be in double quotes, not single quotes, because CPP may get
781   # substituted into the Makefile and "${CC-cc}" will confuse make.
782   CPP="${CC-cc} -E"
783   # On the NeXT, cc -E runs the code through the compiler's parser,
784   # not just through cpp.
785   cat > conftest.$ac_ext <<EOF
786 #line 787 "configure"
787 #include "confdefs.h"
788 #include <assert.h>
789 Syntax Error
790 EOF
791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
792 { (eval echo configure:793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
794 if test -z "$ac_err"; then
795   :
796 else
797   echo "$ac_err" >&5
798   echo "configure: failed program was:" >&5
799   cat conftest.$ac_ext >&5
800   rm -rf conftest*
801   CPP="${CC-cc} -E -traditional-cpp"
802   cat > conftest.$ac_ext <<EOF
803 #line 804 "configure"
804 #include "confdefs.h"
805 #include <assert.h>
806 Syntax Error
807 EOF
808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
809 { (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
811 if test -z "$ac_err"; then
812   :
813 else
814   echo "$ac_err" >&5
815   echo "configure: failed program was:" >&5
816   cat conftest.$ac_ext >&5
817   rm -rf conftest*
818   CPP="${CC-cc} -nologo -E"
819   cat > conftest.$ac_ext <<EOF
820 #line 821 "configure"
821 #include "confdefs.h"
822 #include <assert.h>
823 Syntax Error
824 EOF
825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
826 { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
828 if test -z "$ac_err"; then
829   :
830 else
831   echo "$ac_err" >&5
832   echo "configure: failed program was:" >&5
833   cat conftest.$ac_ext >&5
834   rm -rf conftest*
835   CPP=/lib/cpp
836 fi
837 rm -f conftest*
838 fi
839 rm -f conftest*
840 fi
841 rm -f conftest*
842   ac_cv_prog_CPP="$CPP"
843 fi
844   CPP="$ac_cv_prog_CPP"
845 else
846   ac_cv_prog_CPP="$CPP"
847 fi
848 echo "$ac_t""$CPP" 1>&6
849
850 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
851 echo "configure:852: checking for POSIXized ISC" >&5
852 if test -d /etc/conf/kconfig.d &&
853   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
854 then
855   echo "$ac_t""yes" 1>&6
856   ISC=yes # If later tests want to check for ISC.
857   cat >> confdefs.h <<\EOF
858 #define _POSIX_SOURCE 1
859 EOF
860
861   if test "$GCC" = yes; then
862     CC="$CC -posix"
863   else
864     CC="$CC -Xp"
865   fi
866 else
867   echo "$ac_t""no" 1>&6
868   ISC=
869 fi
870
871 ac_aux_dir=
872 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
873   if test -f $ac_dir/install-sh; then
874     ac_aux_dir=$ac_dir
875     ac_install_sh="$ac_aux_dir/install-sh -c"
876     break
877   elif test -f $ac_dir/install.sh; then
878     ac_aux_dir=$ac_dir
879     ac_install_sh="$ac_aux_dir/install.sh -c"
880     break
881   fi
882 done
883 if test -z "$ac_aux_dir"; then
884   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
885 fi
886 ac_config_guess=$ac_aux_dir/config.guess
887 ac_config_sub=$ac_aux_dir/config.sub
888 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
889
890 # Find a good install program.  We prefer a C program (faster),
891 # so one script is as good as another.  But avoid the broken or
892 # incompatible versions:
893 # SysV /etc/install, /usr/sbin/install
894 # SunOS /usr/etc/install
895 # IRIX /sbin/install
896 # AIX /bin/install
897 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
898 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
899 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
900 # ./install, which can be erroneously created by make from ./install.sh.
901 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
902 echo "configure:903: checking for a BSD compatible install" >&5
903 if test -z "$INSTALL"; then
904 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
905   echo $ac_n "(cached) $ac_c" 1>&6
906 else
907     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
908   for ac_dir in $PATH; do
909     # Account for people who put trailing slashes in PATH elements.
910     case "$ac_dir/" in
911     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
912     *)
913       # OSF1 and SCO ODT 3.0 have their own names for install.
914       # Don't use installbsd from OSF since it installs stuff as root
915       # by default.
916       for ac_prog in ginstall scoinst install; do
917         if test -f $ac_dir/$ac_prog; then
918           if test $ac_prog = install &&
919             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
920             # AIX install.  It has an incompatible calling convention.
921             :
922           else
923             ac_cv_path_install="$ac_dir/$ac_prog -c"
924             break 2
925           fi
926         fi
927       done
928       ;;
929     esac
930   done
931   IFS="$ac_save_IFS"
932
933 fi
934   if test "${ac_cv_path_install+set}" = set; then
935     INSTALL="$ac_cv_path_install"
936   else
937     # As a last resort, use the slow shell script.  We don't cache a
938     # path for INSTALL within a source directory, because that will
939     # break other packages using the cache if that directory is
940     # removed, or if the path is relative.
941     INSTALL="$ac_install_sh"
942   fi
943 fi
944 echo "$ac_t""$INSTALL" 1>&6
945
946 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
947 # It thinks the first close brace ends the variable substitution.
948 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
949
950 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
951
952 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
953
954 for ac_prog in lex flex
955 do
956 # Extract the first word of "$ac_prog", so it can be a program name with args.
957 set dummy $ac_prog; ac_word=$2
958 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
959 echo "configure:960: checking for $ac_word" >&5
960 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
961   echo $ac_n "(cached) $ac_c" 1>&6
962 else
963   if test -n "$LEX"; then
964   ac_cv_prog_LEX="$LEX" # Let the user override the test.
965 else
966   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
967   ac_dummy="$PATH"
968   for ac_dir in $ac_dummy; do
969     test -z "$ac_dir" && ac_dir=.
970     if test -f $ac_dir/$ac_word; then
971       ac_cv_prog_LEX="$ac_prog"
972       break
973     fi
974   done
975   IFS="$ac_save_ifs"
976 fi
977 fi
978 LEX="$ac_cv_prog_LEX"
979 if test -n "$LEX"; then
980   echo "$ac_t""$LEX" 1>&6
981 else
982   echo "$ac_t""no" 1>&6
983 fi
984
985 test -n "$LEX" && break
986 done
987 test -n "$LEX" || LEX="lex_not_found"
988
989 if test "$LEX" != lex_not_found ; then
990   # Extract the first word of "flex", so it can be a program name with args.
991 set dummy flex; ac_word=$2
992 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
993 echo "configure:994: checking for $ac_word" >&5
994 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
995   echo $ac_n "(cached) $ac_c" 1>&6
996 else
997   if test -n "$LEX"; then
998   ac_cv_prog_LEX="$LEX" # Let the user override the test.
999 else
1000   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1001   ac_dummy="$PATH"
1002   for ac_dir in $ac_dummy; do
1003     test -z "$ac_dir" && ac_dir=.
1004     if test -f $ac_dir/$ac_word; then
1005       ac_cv_prog_LEX="flex"
1006       break
1007     fi
1008   done
1009   IFS="$ac_save_ifs"
1010   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1011 fi
1012 fi
1013 LEX="$ac_cv_prog_LEX"
1014 if test -n "$LEX"; then
1015   echo "$ac_t""$LEX" 1>&6
1016 else
1017   echo "$ac_t""no" 1>&6
1018 fi
1019
1020 if test -z "$LEXLIB"
1021 then
1022   case "$LEX" in
1023   flex*) ac_lib=fl ;;
1024   *) ac_lib=l ;;
1025   esac
1026   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1027 echo "configure:1028: checking for yywrap in -l$ac_lib" >&5
1028 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1030   echo $ac_n "(cached) $ac_c" 1>&6
1031 else
1032   ac_save_LIBS="$LIBS"
1033 LIBS="-l$ac_lib  $LIBS"
1034 cat > conftest.$ac_ext <<EOF
1035 #line 1036 "configure"
1036 #include "confdefs.h"
1037 /* Override any gcc2 internal prototype to avoid an error.  */
1038 /* We use char because int might match the return type of a gcc2
1039     builtin and then its argument prototype would still apply.  */
1040 char yywrap();
1041
1042 int main() {
1043 yywrap()
1044 ; return 0; }
1045 EOF
1046 if { (eval echo configure:1047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1047   rm -rf conftest*
1048   eval "ac_cv_lib_$ac_lib_var=yes"
1049 else
1050   echo "configure: failed program was:" >&5
1051   cat conftest.$ac_ext >&5
1052   rm -rf conftest*
1053   eval "ac_cv_lib_$ac_lib_var=no"
1054 fi
1055 rm -f conftest*
1056 LIBS="$ac_save_LIBS"
1057
1058 fi
1059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1060   echo "$ac_t""yes" 1>&6
1061   LEXLIB="-l$ac_lib"
1062 else
1063   echo "$ac_t""no" 1>&6
1064 fi
1065
1066 fi
1067
1068 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1069 echo "configure:1070: checking lex output file root" >&5
1070 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1071   echo $ac_n "(cached) $ac_c" 1>&6
1072 else
1073   # The minimal lex program is just a single line: %%.  But some broken lexes
1074 # (Solaris, I think it was) want two %% lines, so accommodate them.
1075 echo '%%
1076 %%' | $LEX
1077 if test -f lex.yy.c; then
1078   ac_cv_prog_lex_root=lex.yy
1079 elif test -f lexyy.c; then
1080   ac_cv_prog_lex_root=lexyy
1081 else
1082   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1083 fi
1084 fi
1085
1086 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1087 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1088
1089 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1090 echo "configure:1091: checking whether yytext is a pointer" >&5
1091 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1092   echo $ac_n "(cached) $ac_c" 1>&6
1093 else
1094   # POSIX says lex can declare yytext either as a pointer or an array; the
1095 # default is implementation-dependent. Figure out which it is, since
1096 # not all implementations provide the %pointer and %array declarations.
1097 ac_cv_prog_lex_yytext_pointer=no
1098 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1099 ac_save_LIBS="$LIBS"
1100 LIBS="$LIBS $LEXLIB"
1101 cat > conftest.$ac_ext <<EOF
1102 #line 1103 "configure"
1103 #include "confdefs.h"
1104 `cat $LEX_OUTPUT_ROOT.c`
1105 int main() {
1106
1107 ; return 0; }
1108 EOF
1109 if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1110   rm -rf conftest*
1111   ac_cv_prog_lex_yytext_pointer=yes
1112 else
1113   echo "configure: failed program was:" >&5
1114   cat conftest.$ac_ext >&5
1115 fi
1116 rm -f conftest*
1117 LIBS="$ac_save_LIBS"
1118 rm -f "${LEX_OUTPUT_ROOT}.c"
1119
1120 fi
1121
1122 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1123 if test $ac_cv_prog_lex_yytext_pointer = yes; then
1124   cat >> confdefs.h <<\EOF
1125 #define YYTEXT_POINTER 1
1126 EOF
1127
1128 fi
1129
1130 fi
1131 for ac_prog in remsh rsh
1132 do
1133 # Extract the first word of "$ac_prog", so it can be a program name with args.
1134 set dummy $ac_prog; ac_word=$2
1135 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1136 echo "configure:1137: checking for $ac_word" >&5
1137 if eval "test \"`echo '$''{'ac_cv_prog_RSH'+set}'`\" = set"; then
1138   echo $ac_n "(cached) $ac_c" 1>&6
1139 else
1140   if test -n "$RSH"; then
1141   ac_cv_prog_RSH="$RSH" # Let the user override the test.
1142 else
1143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1144   ac_dummy="$PATH"
1145   for ac_dir in $ac_dummy; do
1146     test -z "$ac_dir" && ac_dir=.
1147     if test -f $ac_dir/$ac_word; then
1148       ac_cv_prog_RSH="$ac_prog"
1149       break
1150     fi
1151   done
1152   IFS="$ac_save_ifs"
1153 fi
1154 fi
1155 RSH="$ac_cv_prog_RSH"
1156 if test -n "$RSH"; then
1157   echo "$ac_t""$RSH" 1>&6
1158 else
1159   echo "$ac_t""no" 1>&6
1160 fi
1161
1162 test -n "$RSH" && break
1163 done
1164 test -n "$RSH" || RSH="rsh"
1165
1166 cat >> confdefs.h <<EOF
1167 #define REMOTE_SHELL "$RSH"
1168 EOF
1169
1170 # Extract the first word of "nroff", so it can be a program name with args.
1171 set dummy nroff; ac_word=$2
1172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1173 echo "configure:1174: checking for $ac_word" >&5
1174 if eval "test \"`echo '$''{'ac_cv_prog_NROFF'+set}'`\" = set"; then
1175   echo $ac_n "(cached) $ac_c" 1>&6
1176 else
1177   if test -n "$NROFF"; then
1178   ac_cv_prog_NROFF="$NROFF" # Let the user override the test.
1179 else
1180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1181   ac_dummy="$PATH"
1182   for ac_dir in $ac_dummy; do
1183     test -z "$ac_dir" && ac_dir=.
1184     if test -f $ac_dir/$ac_word; then
1185       ac_cv_prog_NROFF="nroff -man"
1186       break
1187     fi
1188   done
1189   IFS="$ac_save_ifs"
1190   test -z "$ac_cv_prog_NROFF" && ac_cv_prog_NROFF="cat"
1191 fi
1192 fi
1193 NROFF="$ac_cv_prog_NROFF"
1194 if test -n "$NROFF"; then
1195   echo "$ac_t""$NROFF" 1>&6
1196 else
1197   echo "$ac_t""no" 1>&6
1198 fi
1199
1200
1201 for ac_prog in awk mawk gawk nawk
1202 do
1203 # Extract the first word of "$ac_prog", so it can be a program name with args.
1204 set dummy $ac_prog; ac_word=$2
1205 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1206 echo "configure:1207: checking for $ac_word" >&5
1207 if eval "test \"`echo '$''{'ac_cv_path_AWKPATH'+set}'`\" = set"; then
1208   echo $ac_n "(cached) $ac_c" 1>&6
1209 else
1210   case "$AWKPATH" in
1211   /*)
1212   ac_cv_path_AWKPATH="$AWKPATH" # Let the user override the test with a path.
1213   ;;
1214   ?:/*)                  
1215   ac_cv_path_AWKPATH="$AWKPATH" # Let the user override the test with a dos path.
1216   ;;
1217   *)
1218   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1219   ac_dummy="$PATH"
1220   for ac_dir in $ac_dummy; do 
1221     test -z "$ac_dir" && ac_dir=.
1222     if test -f $ac_dir/$ac_word; then
1223       ac_cv_path_AWKPATH="$ac_dir/$ac_word"
1224       break
1225     fi
1226   done
1227   IFS="$ac_save_ifs"
1228   ;;
1229 esac
1230 fi
1231 AWKPATH="$ac_cv_path_AWKPATH"
1232 if test -n "$AWKPATH"; then
1233   echo "$ac_t""$AWKPATH" 1>&6
1234 else
1235   echo "$ac_t""no" 1>&6
1236 fi
1237
1238 test -n "$AWKPATH" && break
1239 done
1240
1241 for ac_prog in perl
1242 do
1243 # Extract the first word of "$ac_prog", so it can be a program name with args.
1244 set dummy $ac_prog; ac_word=$2
1245 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1246 echo "configure:1247: checking for $ac_word" >&5
1247 if eval "test \"`echo '$''{'ac_cv_path_PERLPATH'+set}'`\" = set"; then
1248   echo $ac_n "(cached) $ac_c" 1>&6
1249 else
1250   case "$PERLPATH" in
1251   /*)
1252   ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a path.
1253   ;;
1254   ?:/*)                  
1255   ac_cv_path_PERLPATH="$PERLPATH" # Let the user override the test with a dos path.
1256   ;;
1257   *)
1258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1259   ac_dummy="$PATH"
1260   for ac_dir in $ac_dummy; do 
1261     test -z "$ac_dir" && ac_dir=.
1262     if test -f $ac_dir/$ac_word; then
1263       ac_cv_path_PERLPATH="$ac_dir/$ac_word"
1264       break
1265     fi
1266   done
1267   IFS="$ac_save_ifs"
1268   ;;
1269 esac
1270 fi
1271 PERLPATH="$ac_cv_path_PERLPATH"
1272 if test -n "$PERLPATH"; then
1273   echo "$ac_t""$PERLPATH" 1>&6
1274 else
1275   echo "$ac_t""no" 1>&6
1276 fi
1277
1278 test -n "$PERLPATH" && break
1279 done
1280
1281
1282 # Check whether --with-Xaw3d or --without-Xaw3d was given.
1283 if test "${with_Xaw3d+set}" = set; then
1284   withval="$with_Xaw3d"
1285   cat >> confdefs.h <<\EOF
1286 #define USE_XAW3D 1
1287 EOF
1288
1289    XAW_LIBS="-lXaw3d"
1290 else
1291   XAW_LIBS="-lXaw"
1292 fi
1293
1294
1295
1296 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1297 echo "configure:1298: checking for ANSI C header files" >&5
1298 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1299   echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301   cat > conftest.$ac_ext <<EOF
1302 #line 1303 "configure"
1303 #include "confdefs.h"
1304 #include <stdlib.h>
1305 #include <stdarg.h>
1306 #include <string.h>
1307 #include <float.h>
1308 EOF
1309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1310 { (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1312 if test -z "$ac_err"; then
1313   rm -rf conftest*
1314   ac_cv_header_stdc=yes
1315 else
1316   echo "$ac_err" >&5
1317   echo "configure: failed program was:" >&5
1318   cat conftest.$ac_ext >&5
1319   rm -rf conftest*
1320   ac_cv_header_stdc=no
1321 fi
1322 rm -f conftest*
1323
1324 if test $ac_cv_header_stdc = yes; then
1325   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1326 cat > conftest.$ac_ext <<EOF
1327 #line 1328 "configure"
1328 #include "confdefs.h"
1329 #include <string.h>
1330 EOF
1331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1332   egrep "memchr" >/dev/null 2>&1; then
1333   :
1334 else
1335   rm -rf conftest*
1336   ac_cv_header_stdc=no
1337 fi
1338 rm -f conftest*
1339
1340 fi
1341
1342 if test $ac_cv_header_stdc = yes; then
1343   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1344 cat > conftest.$ac_ext <<EOF
1345 #line 1346 "configure"
1346 #include "confdefs.h"
1347 #include <stdlib.h>
1348 EOF
1349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1350   egrep "free" >/dev/null 2>&1; then
1351   :
1352 else
1353   rm -rf conftest*
1354   ac_cv_header_stdc=no
1355 fi
1356 rm -f conftest*
1357
1358 fi
1359
1360 if test $ac_cv_header_stdc = yes; then
1361   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1362 if test "$cross_compiling" = yes; then
1363   :
1364 else
1365   cat > conftest.$ac_ext <<EOF
1366 #line 1367 "configure"
1367 #include "confdefs.h"
1368 #include <ctype.h>
1369 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1370 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1371 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1372 int main () { int i; for (i = 0; i < 256; i++)
1373 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1374 exit (0); }
1375
1376 EOF
1377 if { (eval echo configure:1378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1378 then
1379   :
1380 else
1381   echo "configure: failed program was:" >&5
1382   cat conftest.$ac_ext >&5
1383   rm -fr conftest*
1384   ac_cv_header_stdc=no
1385 fi
1386 rm -fr conftest*
1387 fi
1388
1389 fi
1390 fi
1391
1392 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1393 if test $ac_cv_header_stdc = yes; then
1394   cat >> confdefs.h <<\EOF
1395 #define STDC_HEADERS 1
1396 EOF
1397
1398 fi
1399
1400 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1401 echo "configure:1402: checking whether time.h and sys/time.h may both be included" >&5
1402 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1403   echo $ac_n "(cached) $ac_c" 1>&6
1404 else
1405   cat > conftest.$ac_ext <<EOF
1406 #line 1407 "configure"
1407 #include "confdefs.h"
1408 #include <sys/types.h>
1409 #include <sys/time.h>
1410 #include <time.h>
1411 int main() {
1412 struct tm *tp;
1413 ; return 0; }
1414 EOF
1415 if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1416   rm -rf conftest*
1417   ac_cv_header_time=yes
1418 else
1419   echo "configure: failed program was:" >&5
1420   cat conftest.$ac_ext >&5
1421   rm -rf conftest*
1422   ac_cv_header_time=no
1423 fi
1424 rm -f conftest*
1425 fi
1426
1427 echo "$ac_t""$ac_cv_header_time" 1>&6
1428 if test $ac_cv_header_time = yes; then
1429   cat >> confdefs.h <<\EOF
1430 #define TIME_WITH_SYS_TIME 1
1431 EOF
1432
1433 fi
1434
1435 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1436 echo "configure:1437: checking for sys/wait.h that is POSIX.1 compatible" >&5
1437 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1438   echo $ac_n "(cached) $ac_c" 1>&6
1439 else
1440   cat > conftest.$ac_ext <<EOF
1441 #line 1442 "configure"
1442 #include "confdefs.h"
1443 #include <sys/types.h>
1444 #include <sys/wait.h>
1445 #ifndef WEXITSTATUS
1446 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1447 #endif
1448 #ifndef WIFEXITED
1449 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1450 #endif
1451 int main() {
1452 int s;
1453 wait (&s);
1454 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1455 ; return 0; }
1456 EOF
1457 if { (eval echo configure:1458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1458   rm -rf conftest*
1459   ac_cv_header_sys_wait_h=yes
1460 else
1461   echo "configure: failed program was:" >&5
1462   cat conftest.$ac_ext >&5
1463   rm -rf conftest*
1464   ac_cv_header_sys_wait_h=no
1465 fi
1466 rm -f conftest*
1467 fi
1468
1469 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1470 if test $ac_cv_header_sys_wait_h = yes; then
1471   cat >> confdefs.h <<\EOF
1472 #define HAVE_SYS_WAIT_H 1
1473 EOF
1474
1475 fi
1476
1477 ac_header_dirent=no
1478 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1479 do
1480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1481 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1482 echo "configure:1483: checking for $ac_hdr that defines DIR" >&5
1483 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1484   echo $ac_n "(cached) $ac_c" 1>&6
1485 else
1486   cat > conftest.$ac_ext <<EOF
1487 #line 1488 "configure"
1488 #include "confdefs.h"
1489 #include <sys/types.h>
1490 #include <$ac_hdr>
1491 int main() {
1492 DIR *dirp = 0;
1493 ; return 0; }
1494 EOF
1495 if { (eval echo configure:1496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1496   rm -rf conftest*
1497   eval "ac_cv_header_dirent_$ac_safe=yes"
1498 else
1499   echo "configure: failed program was:" >&5
1500   cat conftest.$ac_ext >&5
1501   rm -rf conftest*
1502   eval "ac_cv_header_dirent_$ac_safe=no"
1503 fi
1504 rm -f conftest*
1505 fi
1506 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1507   echo "$ac_t""yes" 1>&6
1508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1509   cat >> confdefs.h <<EOF
1510 #define $ac_tr_hdr 1
1511 EOF
1512  ac_header_dirent=$ac_hdr; break
1513 else
1514   echo "$ac_t""no" 1>&6
1515 fi
1516 done
1517 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1518 if test $ac_header_dirent = dirent.h; then
1519 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1520 echo "configure:1521: checking for opendir in -ldir" >&5
1521 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1523   echo $ac_n "(cached) $ac_c" 1>&6
1524 else
1525   ac_save_LIBS="$LIBS"
1526 LIBS="-ldir  $LIBS"
1527 cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 /* Override any gcc2 internal prototype to avoid an error.  */
1531 /* We use char because int might match the return type of a gcc2
1532     builtin and then its argument prototype would still apply.  */
1533 char opendir();
1534
1535 int main() {
1536 opendir()
1537 ; return 0; }
1538 EOF
1539 if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1540   rm -rf conftest*
1541   eval "ac_cv_lib_$ac_lib_var=yes"
1542 else
1543   echo "configure: failed program was:" >&5
1544   cat conftest.$ac_ext >&5
1545   rm -rf conftest*
1546   eval "ac_cv_lib_$ac_lib_var=no"
1547 fi
1548 rm -f conftest*
1549 LIBS="$ac_save_LIBS"
1550
1551 fi
1552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1553   echo "$ac_t""yes" 1>&6
1554   LIBS="$LIBS -ldir"
1555 else
1556   echo "$ac_t""no" 1>&6
1557 fi
1558
1559 else
1560 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1561 echo "configure:1562: checking for opendir in -lx" >&5
1562 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1563 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1564   echo $ac_n "(cached) $ac_c" 1>&6
1565 else
1566   ac_save_LIBS="$LIBS"
1567 LIBS="-lx  $LIBS"
1568 cat > conftest.$ac_ext <<EOF
1569 #line 1570 "configure"
1570 #include "confdefs.h"
1571 /* Override any gcc2 internal prototype to avoid an error.  */
1572 /* We use char because int might match the return type of a gcc2
1573     builtin and then its argument prototype would still apply.  */
1574 char opendir();
1575
1576 int main() {
1577 opendir()
1578 ; return 0; }
1579 EOF
1580 if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1581   rm -rf conftest*
1582   eval "ac_cv_lib_$ac_lib_var=yes"
1583 else
1584   echo "configure: failed program was:" >&5
1585   cat conftest.$ac_ext >&5
1586   rm -rf conftest*
1587   eval "ac_cv_lib_$ac_lib_var=no"
1588 fi
1589 rm -f conftest*
1590 LIBS="$ac_save_LIBS"
1591
1592 fi
1593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1594   echo "$ac_t""yes" 1>&6
1595   LIBS="$LIBS -lx"
1596 else
1597   echo "$ac_t""no" 1>&6
1598 fi
1599
1600 fi
1601
1602 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1603 echo "configure:1604: checking return type of signal handlers" >&5
1604 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1605   echo $ac_n "(cached) $ac_c" 1>&6
1606 else
1607   cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1610 #include <sys/types.h>
1611 #include <signal.h>
1612 #ifdef signal
1613 #undef signal
1614 #endif
1615 #ifdef __cplusplus
1616 extern "C" void (*signal (int, void (*)(int)))(int);
1617 #else
1618 void (*signal ()) ();
1619 #endif
1620
1621 int main() {
1622 int i;
1623 ; return 0; }
1624 EOF
1625 if { (eval echo configure:1626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1626   rm -rf conftest*
1627   ac_cv_type_signal=void
1628 else
1629   echo "configure: failed program was:" >&5
1630   cat conftest.$ac_ext >&5
1631   rm -rf conftest*
1632   ac_cv_type_signal=int
1633 fi
1634 rm -f conftest*
1635 fi
1636
1637 echo "$ac_t""$ac_cv_type_signal" 1>&6
1638 cat >> confdefs.h <<EOF
1639 #define RETSIGTYPE $ac_cv_type_signal
1640 EOF
1641
1642
1643 for ac_hdr in stropts.h sys/time.h string.h unistd.h sys/systeminfo.h
1644 do
1645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1647 echo "configure:1648: checking for $ac_hdr" >&5
1648 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1649   echo $ac_n "(cached) $ac_c" 1>&6
1650 else
1651   cat > conftest.$ac_ext <<EOF
1652 #line 1653 "configure"
1653 #include "confdefs.h"
1654 #include <$ac_hdr>
1655 EOF
1656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1657 { (eval echo configure:1658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1659 if test -z "$ac_err"; then
1660   rm -rf conftest*
1661   eval "ac_cv_header_$ac_safe=yes"
1662 else
1663   echo "$ac_err" >&5
1664   echo "configure: failed program was:" >&5
1665   cat conftest.$ac_ext >&5
1666   rm -rf conftest*
1667   eval "ac_cv_header_$ac_safe=no"
1668 fi
1669 rm -f conftest*
1670 fi
1671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1672   echo "$ac_t""yes" 1>&6
1673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1674   cat >> confdefs.h <<EOF
1675 #define $ac_tr_hdr 1
1676 EOF
1677  
1678 else
1679   echo "$ac_t""no" 1>&6
1680 fi
1681 done
1682
1683 for ac_hdr in fcntl.h sys/fcntl.h
1684 do
1685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1687 echo "configure:1688: checking for $ac_hdr" >&5
1688 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1689   echo $ac_n "(cached) $ac_c" 1>&6
1690 else
1691   cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694 #include <$ac_hdr>
1695 EOF
1696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1697 { (eval echo configure:1698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1699 if test -z "$ac_err"; then
1700   rm -rf conftest*
1701   eval "ac_cv_header_$ac_safe=yes"
1702 else
1703   echo "$ac_err" >&5
1704   echo "configure: failed program was:" >&5
1705   cat conftest.$ac_ext >&5
1706   rm -rf conftest*
1707   eval "ac_cv_header_$ac_safe=no"
1708 fi
1709 rm -f conftest*
1710 fi
1711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1712   echo "$ac_t""yes" 1>&6
1713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1714   cat >> confdefs.h <<EOF
1715 #define $ac_tr_hdr 1
1716 EOF
1717  break
1718 else
1719   echo "$ac_t""no" 1>&6
1720 fi
1721 done
1722
1723 for ac_hdr in sys/socket.h lan/socket.h
1724 do
1725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1727 echo "configure:1728: checking for $ac_hdr" >&5
1728 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1729   echo $ac_n "(cached) $ac_c" 1>&6
1730 else
1731   cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 #include <$ac_hdr>
1735 EOF
1736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1737 { (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1739 if test -z "$ac_err"; then
1740   rm -rf conftest*
1741   eval "ac_cv_header_$ac_safe=yes"
1742 else
1743   echo "$ac_err" >&5
1744   echo "configure: failed program was:" >&5
1745   cat conftest.$ac_ext >&5
1746   rm -rf conftest*
1747   eval "ac_cv_header_$ac_safe=no"
1748 fi
1749 rm -f conftest*
1750 fi
1751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1752   echo "$ac_t""yes" 1>&6
1753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1754   cat >> confdefs.h <<EOF
1755 #define $ac_tr_hdr 1
1756 EOF
1757  break
1758 else
1759   echo "$ac_t""no" 1>&6
1760 fi
1761 done
1762
1763 ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'`
1764 echo $ac_n "checking for stddef.h""... $ac_c" 1>&6
1765 echo "configure:1766: checking for stddef.h" >&5
1766 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1767   echo $ac_n "(cached) $ac_c" 1>&6
1768 else
1769   cat > conftest.$ac_ext <<EOF
1770 #line 1771 "configure"
1771 #include "confdefs.h"
1772 #include <stddef.h>
1773 EOF
1774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1775 { (eval echo configure:1776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1777 if test -z "$ac_err"; then
1778   rm -rf conftest*
1779   eval "ac_cv_header_$ac_safe=yes"
1780 else
1781   echo "$ac_err" >&5
1782   echo "configure: failed program was:" >&5
1783   cat conftest.$ac_ext >&5
1784   rm -rf conftest*
1785   eval "ac_cv_header_$ac_safe=no"
1786 fi
1787 rm -f conftest*
1788 fi
1789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1790   echo "$ac_t""yes" 1>&6
1791   :
1792 else
1793   echo "$ac_t""no" 1>&6
1794 cat >> confdefs.h <<\EOF
1795 #define X_WCHAR 1
1796 EOF
1797
1798 fi
1799
1800
1801 cat > conftest.$ac_ext <<EOF
1802 #line 1803 "configure"
1803 #include "confdefs.h"
1804 #include <errno.h>
1805 EOF
1806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1807   egrep "sys_errlist" >/dev/null 2>&1; then
1808   rm -rf conftest*
1809   cat >> confdefs.h <<\EOF
1810 #define DEFINED_SYS_ERRLIST 1
1811 EOF
1812
1813 fi
1814 rm -f conftest*
1815
1816 cat > conftest.$ac_ext <<EOF
1817 #line 1818 "configure"
1818 #include "confdefs.h"
1819 #include <stdio.h>
1820 EOF
1821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1822   egrep "sys_errlist" >/dev/null 2>&1; then
1823   rm -rf conftest*
1824   cat >> confdefs.h <<\EOF
1825 #define DEFINED_SYS_ERRLIST 1
1826 EOF
1827
1828 fi
1829 rm -f conftest*
1830
1831 cat > conftest.$ac_ext <<EOF
1832 #line 1833 "configure"
1833 #include "confdefs.h"
1834 #include <stdlib.h>
1835 EOF
1836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1837   egrep "sys_errlist" >/dev/null 2>&1; then
1838   rm -rf conftest*
1839   cat >> confdefs.h <<\EOF
1840 #define DEFINED_SYS_ERRLIST 1
1841 EOF
1842
1843 fi
1844 rm -f conftest*
1845
1846
1847 for ac_func in _getpty grantpt setitimer usleep
1848 do
1849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1850 echo "configure:1851: checking for $ac_func" >&5
1851 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1852   echo $ac_n "(cached) $ac_c" 1>&6
1853 else
1854   cat > conftest.$ac_ext <<EOF
1855 #line 1856 "configure"
1856 #include "confdefs.h"
1857 /* System header to define __stub macros and hopefully few prototypes,
1858     which can conflict with char $ac_func(); below.  */
1859 #include <assert.h>
1860 /* Override any gcc2 internal prototype to avoid an error.  */
1861 /* We use char because int might match the return type of a gcc2
1862     builtin and then its argument prototype would still apply.  */
1863 char $ac_func();
1864
1865 int main() {
1866
1867 /* The GNU C library defines this for functions which it implements
1868     to always fail with ENOSYS.  Some functions are actually named
1869     something starting with __ and the normal name is an alias.  */
1870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1871 choke me
1872 #else
1873 $ac_func();
1874 #endif
1875
1876 ; return 0; }
1877 EOF
1878 if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1879   rm -rf conftest*
1880   eval "ac_cv_func_$ac_func=yes"
1881 else
1882   echo "configure: failed program was:" >&5
1883   cat conftest.$ac_ext >&5
1884   rm -rf conftest*
1885   eval "ac_cv_func_$ac_func=no"
1886 fi
1887 rm -f conftest*
1888 fi
1889
1890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1891   echo "$ac_t""yes" 1>&6
1892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1893   cat >> confdefs.h <<EOF
1894 #define $ac_tr_func 1
1895 EOF
1896  
1897 else
1898   echo "$ac_t""no" 1>&6
1899 fi
1900 done
1901
1902 for ac_func in gettimeofday ftime
1903 do
1904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1905 echo "configure:1906: checking for $ac_func" >&5
1906 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1907   echo $ac_n "(cached) $ac_c" 1>&6
1908 else
1909   cat > conftest.$ac_ext <<EOF
1910 #line 1911 "configure"
1911 #include "confdefs.h"
1912 /* System header to define __stub macros and hopefully few prototypes,
1913     which can conflict with char $ac_func(); below.  */
1914 #include <assert.h>
1915 /* Override any gcc2 internal prototype to avoid an error.  */
1916 /* We use char because int might match the return type of a gcc2
1917     builtin and then its argument prototype would still apply.  */
1918 char $ac_func();
1919
1920 int main() {
1921
1922 /* The GNU C library defines this for functions which it implements
1923     to always fail with ENOSYS.  Some functions are actually named
1924     something starting with __ and the normal name is an alias.  */
1925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1926 choke me
1927 #else
1928 $ac_func();
1929 #endif
1930
1931 ; return 0; }
1932 EOF
1933 if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1934   rm -rf conftest*
1935   eval "ac_cv_func_$ac_func=yes"
1936 else
1937   echo "configure: failed program was:" >&5
1938   cat conftest.$ac_ext >&5
1939   rm -rf conftest*
1940   eval "ac_cv_func_$ac_func=no"
1941 fi
1942 rm -f conftest*
1943 fi
1944
1945 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1946   echo "$ac_t""yes" 1>&6
1947     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1948   cat >> confdefs.h <<EOF
1949 #define $ac_tr_func 1
1950 EOF
1951  break
1952 else
1953   echo "$ac_t""no" 1>&6
1954 fi
1955 done
1956
1957 for ac_func in random rand48
1958 do
1959 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1960 echo "configure:1961: checking for $ac_func" >&5
1961 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1962   echo $ac_n "(cached) $ac_c" 1>&6
1963 else
1964   cat > conftest.$ac_ext <<EOF
1965 #line 1966 "configure"
1966 #include "confdefs.h"
1967 /* System header to define __stub macros and hopefully few prototypes,
1968     which can conflict with char $ac_func(); below.  */
1969 #include <assert.h>
1970 /* Override any gcc2 internal prototype to avoid an error.  */
1971 /* We use char because int might match the return type of a gcc2
1972     builtin and then its argument prototype would still apply.  */
1973 char $ac_func();
1974
1975 int main() {
1976
1977 /* The GNU C library defines this for functions which it implements
1978     to always fail with ENOSYS.  Some functions are actually named
1979     something starting with __ and the normal name is an alias.  */
1980 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1981 choke me
1982 #else
1983 $ac_func();
1984 #endif
1985
1986 ; return 0; }
1987 EOF
1988 if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1989   rm -rf conftest*
1990   eval "ac_cv_func_$ac_func=yes"
1991 else
1992   echo "configure: failed program was:" >&5
1993   cat conftest.$ac_ext >&5
1994   rm -rf conftest*
1995   eval "ac_cv_func_$ac_func=no"
1996 fi
1997 rm -f conftest*
1998 fi
1999
2000 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2001   echo "$ac_t""yes" 1>&6
2002     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2003   cat >> confdefs.h <<EOF
2004 #define $ac_tr_func 1
2005 EOF
2006  break
2007 else
2008   echo "$ac_t""no" 1>&6
2009 fi
2010 done
2011
2012 for ac_func in gethostname sysinfo
2013 do
2014 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2015 echo "configure:2016: checking for $ac_func" >&5
2016 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2017   echo $ac_n "(cached) $ac_c" 1>&6
2018 else
2019   cat > conftest.$ac_ext <<EOF
2020 #line 2021 "configure"
2021 #include "confdefs.h"
2022 /* System header to define __stub macros and hopefully few prototypes,
2023     which can conflict with char $ac_func(); below.  */
2024 #include <assert.h>
2025 /* Override any gcc2 internal prototype to avoid an error.  */
2026 /* We use char because int might match the return type of a gcc2
2027     builtin and then its argument prototype would still apply.  */
2028 char $ac_func();
2029
2030 int main() {
2031
2032 /* The GNU C library defines this for functions which it implements
2033     to always fail with ENOSYS.  Some functions are actually named
2034     something starting with __ and the normal name is an alias.  */
2035 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2036 choke me
2037 #else
2038 $ac_func();
2039 #endif
2040
2041 ; return 0; }
2042 EOF
2043 if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2044   rm -rf conftest*
2045   eval "ac_cv_func_$ac_func=yes"
2046 else
2047   echo "configure: failed program was:" >&5
2048   cat conftest.$ac_ext >&5
2049   rm -rf conftest*
2050   eval "ac_cv_func_$ac_func=no"
2051 fi
2052 rm -f conftest*
2053 fi
2054
2055 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2056   echo "$ac_t""yes" 1>&6
2057     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2058   cat >> confdefs.h <<EOF
2059 #define $ac_tr_func 1
2060 EOF
2061  break
2062 else
2063   echo "$ac_t""no" 1>&6
2064 fi
2065 done
2066
2067 echo $ac_n "checking for setlocale""... $ac_c" 1>&6
2068 echo "configure:2069: checking for setlocale" >&5
2069 if eval "test \"`echo '$''{'ac_cv_func_setlocale'+set}'`\" = set"; then
2070   echo $ac_n "(cached) $ac_c" 1>&6
2071 else
2072   cat > conftest.$ac_ext <<EOF
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075 /* System header to define __stub macros and hopefully few prototypes,
2076     which can conflict with char setlocale(); below.  */
2077 #include <assert.h>
2078 /* Override any gcc2 internal prototype to avoid an error.  */
2079 /* We use char because int might match the return type of a gcc2
2080     builtin and then its argument prototype would still apply.  */
2081 char setlocale();
2082
2083 int main() {
2084
2085 /* The GNU C library defines this for functions which it implements
2086     to always fail with ENOSYS.  Some functions are actually named
2087     something starting with __ and the normal name is an alias.  */
2088 #if defined (__stub_setlocale) || defined (__stub___setlocale)
2089 choke me
2090 #else
2091 setlocale();
2092 #endif
2093
2094 ; return 0; }
2095 EOF
2096 if { (eval echo configure:2097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2097   rm -rf conftest*
2098   eval "ac_cv_func_setlocale=yes"
2099 else
2100   echo "configure: failed program was:" >&5
2101   cat conftest.$ac_ext >&5
2102   rm -rf conftest*
2103   eval "ac_cv_func_setlocale=no"
2104 fi
2105 rm -f conftest*
2106 fi
2107
2108 if eval "test \"`echo '$ac_cv_func_'setlocale`\" = yes"; then
2109   echo "$ac_t""yes" 1>&6
2110   :
2111 else
2112   echo "$ac_t""no" 1>&6
2113 echo $ac_n "checking for setlocale in -li""... $ac_c" 1>&6
2114 echo "configure:2115: checking for setlocale in -li" >&5
2115 ac_lib_var=`echo i'_'setlocale | sed 'y%./+-%__p_%'`
2116 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2117   echo $ac_n "(cached) $ac_c" 1>&6
2118 else
2119   ac_save_LIBS="$LIBS"
2120 LIBS="-li  $LIBS"
2121 cat > conftest.$ac_ext <<EOF
2122 #line 2123 "configure"
2123 #include "confdefs.h"
2124 /* Override any gcc2 internal prototype to avoid an error.  */
2125 /* We use char because int might match the return type of a gcc2
2126     builtin and then its argument prototype would still apply.  */
2127 char setlocale();
2128
2129 int main() {
2130 setlocale()
2131 ; return 0; }
2132 EOF
2133 if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2134   rm -rf conftest*
2135   eval "ac_cv_lib_$ac_lib_var=yes"
2136 else
2137   echo "configure: failed program was:" >&5
2138   cat conftest.$ac_ext >&5
2139   rm -rf conftest*
2140   eval "ac_cv_lib_$ac_lib_var=no"
2141 fi
2142 rm -f conftest*
2143 LIBS="$ac_save_LIBS"
2144
2145 fi
2146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2147   echo "$ac_t""yes" 1>&6
2148     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/^a-zA-Z0-9_/_/g' \
2149     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2150   cat >> confdefs.h <<EOF
2151 #define $ac_tr_lib 1
2152 EOF
2153
2154   LIBS="-li $LIBS"
2155
2156 else
2157   echo "$ac_t""no" 1>&6
2158 cat >> confdefs.h <<\EOF
2159 #define X_LOCALE 1
2160 EOF
2161
2162 fi
2163
2164 fi
2165
2166
2167 echo $ac_n "checking for getpseudotty in -lseq""... $ac_c" 1>&6
2168 echo "configure:2169: checking for getpseudotty in -lseq" >&5
2169 ac_lib_var=`echo seq'_'getpseudotty | sed 'y%./+-%__p_%'`
2170 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2171   echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173   ac_save_LIBS="$LIBS"
2174 LIBS="-lseq  $LIBS"
2175 cat > conftest.$ac_ext <<EOF
2176 #line 2177 "configure"
2177 #include "confdefs.h"
2178 /* Override any gcc2 internal prototype to avoid an error.  */
2179 /* We use char because int might match the return type of a gcc2
2180     builtin and then its argument prototype would still apply.  */
2181 char getpseudotty();
2182
2183 int main() {
2184 getpseudotty()
2185 ; return 0; }
2186 EOF
2187 if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2188   rm -rf conftest*
2189   eval "ac_cv_lib_$ac_lib_var=yes"
2190 else
2191   echo "configure: failed program was:" >&5
2192   cat conftest.$ac_ext >&5
2193   rm -rf conftest*
2194   eval "ac_cv_lib_$ac_lib_var=no"
2195 fi
2196 rm -f conftest*
2197 LIBS="$ac_save_LIBS"
2198
2199 fi
2200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2201   echo "$ac_t""yes" 1>&6
2202     ac_tr_lib=HAVE_LIB`echo seq | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2203     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2204   cat >> confdefs.h <<EOF
2205 #define $ac_tr_lib 1
2206 EOF
2207
2208   LIBS="-lseq $LIBS"
2209
2210 else
2211   echo "$ac_t""no" 1>&6
2212 fi
2213
2214
2215 # If we find X, set shell vars x_includes and x_libraries to the
2216 # paths, otherwise set no_x=yes.
2217 # Uses ac_ vars as temps to allow command line to override cache and checks.
2218 # --without-x overrides everything else, but does not touch the cache.
2219 echo $ac_n "checking for X""... $ac_c" 1>&6
2220 echo "configure:2221: checking for X" >&5
2221
2222 # Check whether --with-x or --without-x was given.
2223 if test "${with_x+set}" = set; then
2224   withval="$with_x"
2225   :
2226 fi
2227
2228 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2229 if test "x$with_x" = xno; then
2230   # The user explicitly disabled X.
2231   have_x=disabled
2232 else
2233   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2234     # Both variables are already set.
2235     have_x=yes
2236   else
2237 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2238   echo $ac_n "(cached) $ac_c" 1>&6
2239 else
2240   # One or both of the vars are not set, and there is no cached value.
2241 ac_x_includes=NO ac_x_libraries=NO
2242 rm -fr conftestdir
2243 if mkdir conftestdir; then
2244   cd conftestdir
2245   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2246   cat > Imakefile <<'EOF'
2247 acfindx:
2248         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2249 EOF
2250   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2251     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2252     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2253     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2254     for ac_extension in a so sl; do
2255       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2256         test -f $ac_im_libdir/libX11.$ac_extension; then
2257         ac_im_usrlibdir=$ac_im_libdir; break
2258       fi
2259     done
2260     # Screen out bogus values from the imake configuration.  They are
2261     # bogus both because they are the default anyway, and because
2262     # using them would break gcc on systems where it needs fixed includes.
2263     case "$ac_im_incroot" in
2264         /usr/include) ;;
2265         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2266     esac
2267     case "$ac_im_usrlibdir" in
2268         /usr/lib | /lib) ;;
2269         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2270     esac
2271   fi
2272   cd ..
2273   rm -fr conftestdir
2274 fi
2275
2276 if test "$ac_x_includes" = NO; then
2277   # Guess where to find include files, by looking for this one X11 .h file.
2278   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2279
2280   # First, try using that file with no special directory specified.
2281 cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 #include <$x_direct_test_include>
2285 EOF
2286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2287 { (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2289 if test -z "$ac_err"; then
2290   rm -rf conftest*
2291   # We can compile using X headers with no special include directory.
2292 ac_x_includes=
2293 else
2294   echo "$ac_err" >&5
2295   echo "configure: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   rm -rf conftest*
2298   # Look for the header file in a standard set of common directories.
2299 # Check X11 before X11Rn because it is often a symlink to the current release.
2300   for ac_dir in               \
2301     /usr/X11/include          \
2302     /usr/X11R6/include        \
2303     /usr/X11R5/include        \
2304     /usr/X11R4/include        \
2305                               \
2306     /usr/include/X11          \
2307     /usr/include/X11R6        \
2308     /usr/include/X11R5        \
2309     /usr/include/X11R4        \
2310                               \
2311     /usr/local/X11/include    \
2312     /usr/local/X11R6/include  \
2313     /usr/local/X11R5/include  \
2314     /usr/local/X11R4/include  \
2315                               \
2316     /usr/local/include/X11    \
2317     /usr/local/include/X11R6  \
2318     /usr/local/include/X11R5  \
2319     /usr/local/include/X11R4  \
2320                               \
2321     /usr/X386/include         \
2322     /usr/x386/include         \
2323     /usr/XFree86/include/X11  \
2324                               \
2325     /usr/include              \
2326     /usr/local/include        \
2327     /usr/unsupported/include  \
2328     /usr/athena/include       \
2329     /usr/local/x11r5/include  \
2330     /usr/lpp/Xamples/include  \
2331                               \
2332     /usr/openwin/include      \
2333     /usr/openwin/share/include \
2334     ; \
2335   do
2336     if test -r "$ac_dir/$x_direct_test_include"; then
2337       ac_x_includes=$ac_dir
2338       break
2339     fi
2340   done
2341 fi
2342 rm -f conftest*
2343 fi # $ac_x_includes = NO
2344
2345 if test "$ac_x_libraries" = NO; then
2346   # Check for the libraries.
2347
2348   test -z "$x_direct_test_library" && x_direct_test_library=Xt
2349   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2350
2351   # See if we find them without any special options.
2352   # Don't add to $LIBS permanently.
2353   ac_save_LIBS="$LIBS"
2354   LIBS="-l$x_direct_test_library $LIBS"
2355 cat > conftest.$ac_ext <<EOF
2356 #line 2357 "configure"
2357 #include "confdefs.h"
2358
2359 int main() {
2360 ${x_direct_test_function}()
2361 ; return 0; }
2362 EOF
2363 if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2364   rm -rf conftest*
2365   LIBS="$ac_save_LIBS"
2366 # We can link X programs with no special library path.
2367 ac_x_libraries=
2368 else
2369   echo "configure: failed program was:" >&5
2370   cat conftest.$ac_ext >&5
2371   rm -rf conftest*
2372   LIBS="$ac_save_LIBS"
2373 # First see if replacing the include by lib works.
2374 # Check X11 before X11Rn because it is often a symlink to the current release.
2375 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2376     /usr/X11/lib          \
2377     /usr/X11R6/lib        \
2378     /usr/X11R5/lib        \
2379     /usr/X11R4/lib        \
2380                           \
2381     /usr/lib/X11          \
2382     /usr/lib/X11R6        \
2383     /usr/lib/X11R5        \
2384     /usr/lib/X11R4        \
2385                           \
2386     /usr/local/X11/lib    \
2387     /usr/local/X11R6/lib  \
2388     /usr/local/X11R5/lib  \
2389     /usr/local/X11R4/lib  \
2390                           \
2391     /usr/local/lib/X11    \
2392     /usr/local/lib/X11R6  \
2393     /usr/local/lib/X11R5  \
2394     /usr/local/lib/X11R4  \
2395                           \
2396     /usr/X386/lib         \
2397     /usr/x386/lib         \
2398     /usr/XFree86/lib/X11  \
2399                           \
2400     /usr/lib              \
2401     /usr/local/lib        \
2402     /usr/unsupported/lib  \
2403     /usr/athena/lib       \
2404     /usr/local/x11r5/lib  \
2405     /usr/lpp/Xamples/lib  \
2406     /lib/usr/lib/X11      \
2407                           \
2408     /usr/openwin/lib      \
2409     /usr/openwin/share/lib \
2410     ; \
2411 do
2412   for ac_extension in a so sl; do
2413     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2414       ac_x_libraries=$ac_dir
2415       break 2
2416     fi
2417   done
2418 done
2419 fi
2420 rm -f conftest*
2421 fi # $ac_x_libraries = NO
2422
2423 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2424   # Didn't find X anywhere.  Cache the known absence of X.
2425   ac_cv_have_x="have_x=no"
2426 else
2427   # Record where we found X for the cache.
2428   ac_cv_have_x="have_x=yes \
2429                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2430 fi
2431 fi
2432   fi
2433   eval "$ac_cv_have_x"
2434 fi # $with_x != no
2435
2436 if test "$have_x" != yes; then
2437   echo "$ac_t""$have_x" 1>&6
2438   no_x=yes
2439 else
2440   # If each of the values was on the command line, it overrides each guess.
2441   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2442   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2443   # Update the cache value to reflect the command line values.
2444   ac_cv_have_x="have_x=yes \
2445                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2446   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2447 fi
2448
2449 if test "$no_x" = yes; then
2450   # Not all programs may use this symbol, but it does not hurt to define it.
2451   cat >> confdefs.h <<\EOF
2452 #define X_DISPLAY_MISSING 1
2453 EOF
2454
2455   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2456 else
2457   if test -n "$x_includes"; then
2458     X_CFLAGS="$X_CFLAGS -I$x_includes"
2459   fi
2460
2461   # It would also be nice to do this for all -L options, not just this one.
2462   if test -n "$x_libraries"; then
2463     X_LIBS="$X_LIBS -L$x_libraries"
2464     # For Solaris; some versions of Sun CC require a space after -R and
2465     # others require no space.  Words are not sufficient . . . .
2466     case "`(uname -sr) 2>/dev/null`" in
2467     "SunOS 5"*)
2468       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
2469 echo "configure:2470: checking whether -R must be followed by a space" >&5
2470       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2471       cat > conftest.$ac_ext <<EOF
2472 #line 2473 "configure"
2473 #include "confdefs.h"
2474
2475 int main() {
2476
2477 ; return 0; }
2478 EOF
2479 if { (eval echo configure:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2480   rm -rf conftest*
2481   ac_R_nospace=yes
2482 else
2483   echo "configure: failed program was:" >&5
2484   cat conftest.$ac_ext >&5
2485   rm -rf conftest*
2486   ac_R_nospace=no
2487 fi
2488 rm -f conftest*
2489       if test $ac_R_nospace = yes; then
2490         echo "$ac_t""no" 1>&6
2491         X_LIBS="$X_LIBS -R$x_libraries"
2492       else
2493         LIBS="$ac_xsave_LIBS -R $x_libraries"
2494         cat > conftest.$ac_ext <<EOF
2495 #line 2496 "configure"
2496 #include "confdefs.h"
2497
2498 int main() {
2499
2500 ; return 0; }
2501 EOF
2502 if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2503   rm -rf conftest*
2504   ac_R_space=yes
2505 else
2506   echo "configure: failed program was:" >&5
2507   cat conftest.$ac_ext >&5
2508   rm -rf conftest*
2509   ac_R_space=no
2510 fi
2511 rm -f conftest*
2512         if test $ac_R_space = yes; then
2513           echo "$ac_t""yes" 1>&6
2514           X_LIBS="$X_LIBS -R $x_libraries"
2515         else
2516           echo "$ac_t""neither works" 1>&6
2517         fi
2518       fi
2519       LIBS="$ac_xsave_LIBS"
2520     esac
2521   fi
2522
2523   # Check for system-dependent libraries X programs must link with.
2524   # Do this before checking for the system-independent R6 libraries
2525   # (-lICE), since we may need -lsocket or whatever for X linking.
2526
2527   if test "$ISC" = yes; then
2528     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2529   else
2530     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2531     # libraries were built with DECnet support.  And karl@cs.umb.edu says
2532     # the Alpha needs dnet_stub (dnet does not exist).
2533     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
2534 echo "configure:2535: checking for dnet_ntoa in -ldnet" >&5
2535 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2536 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2537   echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539   ac_save_LIBS="$LIBS"
2540 LIBS="-ldnet  $LIBS"
2541 cat > conftest.$ac_ext <<EOF
2542 #line 2543 "configure"
2543 #include "confdefs.h"
2544 /* Override any gcc2 internal prototype to avoid an error.  */
2545 /* We use char because int might match the return type of a gcc2
2546     builtin and then its argument prototype would still apply.  */
2547 char dnet_ntoa();
2548
2549 int main() {
2550 dnet_ntoa()
2551 ; return 0; }
2552 EOF
2553 if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2554   rm -rf conftest*
2555   eval "ac_cv_lib_$ac_lib_var=yes"
2556 else
2557   echo "configure: failed program was:" >&5
2558   cat conftest.$ac_ext >&5
2559   rm -rf conftest*
2560   eval "ac_cv_lib_$ac_lib_var=no"
2561 fi
2562 rm -f conftest*
2563 LIBS="$ac_save_LIBS"
2564
2565 fi
2566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2567   echo "$ac_t""yes" 1>&6
2568   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2569 else
2570   echo "$ac_t""no" 1>&6
2571 fi
2572
2573     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2574       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
2575 echo "configure:2576: checking for dnet_ntoa in -ldnet_stub" >&5
2576 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2577 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2578   echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580   ac_save_LIBS="$LIBS"
2581 LIBS="-ldnet_stub  $LIBS"
2582 cat > conftest.$ac_ext <<EOF
2583 #line 2584 "configure"
2584 #include "confdefs.h"
2585 /* Override any gcc2 internal prototype to avoid an error.  */
2586 /* We use char because int might match the return type of a gcc2
2587     builtin and then its argument prototype would still apply.  */
2588 char dnet_ntoa();
2589
2590 int main() {
2591 dnet_ntoa()
2592 ; return 0; }
2593 EOF
2594 if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2595   rm -rf conftest*
2596   eval "ac_cv_lib_$ac_lib_var=yes"
2597 else
2598   echo "configure: failed program was:" >&5
2599   cat conftest.$ac_ext >&5
2600   rm -rf conftest*
2601   eval "ac_cv_lib_$ac_lib_var=no"
2602 fi
2603 rm -f conftest*
2604 LIBS="$ac_save_LIBS"
2605
2606 fi
2607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2608   echo "$ac_t""yes" 1>&6
2609   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2610 else
2611   echo "$ac_t""no" 1>&6
2612 fi
2613
2614     fi
2615
2616     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2617     # to get the SysV transport functions.
2618     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
2619     # needs -lnsl.
2620     # The nsl library prevents programs from opening the X display
2621     # on Irix 5.2, according to dickey@clark.net.
2622     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2623 echo "configure:2624: checking for gethostbyname" >&5
2624 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2625   echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627   cat > conftest.$ac_ext <<EOF
2628 #line 2629 "configure"
2629 #include "confdefs.h"
2630 /* System header to define __stub macros and hopefully few prototypes,
2631     which can conflict with char gethostbyname(); below.  */
2632 #include <assert.h>
2633 /* Override any gcc2 internal prototype to avoid an error.  */
2634 /* We use char because int might match the return type of a gcc2
2635     builtin and then its argument prototype would still apply.  */
2636 char gethostbyname();
2637
2638 int main() {
2639
2640 /* The GNU C library defines this for functions which it implements
2641     to always fail with ENOSYS.  Some functions are actually named
2642     something starting with __ and the normal name is an alias.  */
2643 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2644 choke me
2645 #else
2646 gethostbyname();
2647 #endif
2648
2649 ; return 0; }
2650 EOF
2651 if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2652   rm -rf conftest*
2653   eval "ac_cv_func_gethostbyname=yes"
2654 else
2655   echo "configure: failed program was:" >&5
2656   cat conftest.$ac_ext >&5
2657   rm -rf conftest*
2658   eval "ac_cv_func_gethostbyname=no"
2659 fi
2660 rm -f conftest*
2661 fi
2662
2663 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2664   echo "$ac_t""yes" 1>&6
2665   :
2666 else
2667   echo "$ac_t""no" 1>&6
2668 fi
2669
2670     if test $ac_cv_func_gethostbyname = no; then
2671       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2672 echo "configure:2673: checking for gethostbyname in -lnsl" >&5
2673 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2674 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2675   echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677   ac_save_LIBS="$LIBS"
2678 LIBS="-lnsl  $LIBS"
2679 cat > conftest.$ac_ext <<EOF
2680 #line 2681 "configure"
2681 #include "confdefs.h"
2682 /* Override any gcc2 internal prototype to avoid an error.  */
2683 /* We use char because int might match the return type of a gcc2
2684     builtin and then its argument prototype would still apply.  */
2685 char gethostbyname();
2686
2687 int main() {
2688 gethostbyname()
2689 ; return 0; }
2690 EOF
2691 if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2692   rm -rf conftest*
2693   eval "ac_cv_lib_$ac_lib_var=yes"
2694 else
2695   echo "configure: failed program was:" >&5
2696   cat conftest.$ac_ext >&5
2697   rm -rf conftest*
2698   eval "ac_cv_lib_$ac_lib_var=no"
2699 fi
2700 rm -f conftest*
2701 LIBS="$ac_save_LIBS"
2702
2703 fi
2704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2705   echo "$ac_t""yes" 1>&6
2706   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2707 else
2708   echo "$ac_t""no" 1>&6
2709 fi
2710
2711     fi
2712
2713     # lieder@skyler.mavd.honeywell.com says without -lsocket,
2714     # socket/setsockopt and other routines are undefined under SCO ODT
2715     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
2716     # on later versions), says simon@lia.di.epfl.ch: it contains
2717     # gethostby* variants that don't use the nameserver (or something).
2718     # -lsocket must be given before -lnsl if both are needed.
2719     # We assume that if connect needs -lnsl, so does gethostbyname.
2720     echo $ac_n "checking for connect""... $ac_c" 1>&6
2721 echo "configure:2722: checking for connect" >&5
2722 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2723   echo $ac_n "(cached) $ac_c" 1>&6
2724 else
2725   cat > conftest.$ac_ext <<EOF
2726 #line 2727 "configure"
2727 #include "confdefs.h"
2728 /* System header to define __stub macros and hopefully few prototypes,
2729     which can conflict with char connect(); below.  */
2730 #include <assert.h>
2731 /* Override any gcc2 internal prototype to avoid an error.  */
2732 /* We use char because int might match the return type of a gcc2
2733     builtin and then its argument prototype would still apply.  */
2734 char connect();
2735
2736 int main() {
2737
2738 /* The GNU C library defines this for functions which it implements
2739     to always fail with ENOSYS.  Some functions are actually named
2740     something starting with __ and the normal name is an alias.  */
2741 #if defined (__stub_connect) || defined (__stub___connect)
2742 choke me
2743 #else
2744 connect();
2745 #endif
2746
2747 ; return 0; }
2748 EOF
2749 if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2750   rm -rf conftest*
2751   eval "ac_cv_func_connect=yes"
2752 else
2753   echo "configure: failed program was:" >&5
2754   cat conftest.$ac_ext >&5
2755   rm -rf conftest*
2756   eval "ac_cv_func_connect=no"
2757 fi
2758 rm -f conftest*
2759 fi
2760
2761 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2762   echo "$ac_t""yes" 1>&6
2763   :
2764 else
2765   echo "$ac_t""no" 1>&6
2766 fi
2767
2768     if test $ac_cv_func_connect = no; then
2769       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
2770 echo "configure:2771: checking for connect in -lsocket" >&5
2771 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2772 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2773   echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775   ac_save_LIBS="$LIBS"
2776 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
2777 cat > conftest.$ac_ext <<EOF
2778 #line 2779 "configure"
2779 #include "confdefs.h"
2780 /* Override any gcc2 internal prototype to avoid an error.  */
2781 /* We use char because int might match the return type of a gcc2
2782     builtin and then its argument prototype would still apply.  */
2783 char connect();
2784
2785 int main() {
2786 connect()
2787 ; return 0; }
2788 EOF
2789 if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2790   rm -rf conftest*
2791   eval "ac_cv_lib_$ac_lib_var=yes"
2792 else
2793   echo "configure: failed program was:" >&5
2794   cat conftest.$ac_ext >&5
2795   rm -rf conftest*
2796   eval "ac_cv_lib_$ac_lib_var=no"
2797 fi
2798 rm -f conftest*
2799 LIBS="$ac_save_LIBS"
2800
2801 fi
2802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2803   echo "$ac_t""yes" 1>&6
2804   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
2805 else
2806   echo "$ac_t""no" 1>&6
2807 fi
2808
2809     fi
2810
2811     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
2812     echo $ac_n "checking for remove""... $ac_c" 1>&6
2813 echo "configure:2814: checking for remove" >&5
2814 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
2815   echo $ac_n "(cached) $ac_c" 1>&6
2816 else
2817   cat > conftest.$ac_ext <<EOF
2818 #line 2819 "configure"
2819 #include "confdefs.h"
2820 /* System header to define __stub macros and hopefully few prototypes,
2821     which can conflict with char remove(); below.  */
2822 #include <assert.h>
2823 /* Override any gcc2 internal prototype to avoid an error.  */
2824 /* We use char because int might match the return type of a gcc2
2825     builtin and then its argument prototype would still apply.  */
2826 char remove();
2827
2828 int main() {
2829
2830 /* The GNU C library defines this for functions which it implements
2831     to always fail with ENOSYS.  Some functions are actually named
2832     something starting with __ and the normal name is an alias.  */
2833 #if defined (__stub_remove) || defined (__stub___remove)
2834 choke me
2835 #else
2836 remove();
2837 #endif
2838
2839 ; return 0; }
2840 EOF
2841 if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2842   rm -rf conftest*
2843   eval "ac_cv_func_remove=yes"
2844 else
2845   echo "configure: failed program was:" >&5
2846   cat conftest.$ac_ext >&5
2847   rm -rf conftest*
2848   eval "ac_cv_func_remove=no"
2849 fi
2850 rm -f conftest*
2851 fi
2852
2853 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
2854   echo "$ac_t""yes" 1>&6
2855   :
2856 else
2857   echo "$ac_t""no" 1>&6
2858 fi
2859
2860     if test $ac_cv_func_remove = no; then
2861       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
2862 echo "configure:2863: checking for remove in -lposix" >&5
2863 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
2864 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2865   echo $ac_n "(cached) $ac_c" 1>&6
2866 else
2867   ac_save_LIBS="$LIBS"
2868 LIBS="-lposix  $LIBS"
2869 cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 /* Override any gcc2 internal prototype to avoid an error.  */
2873 /* We use char because int might match the return type of a gcc2
2874     builtin and then its argument prototype would still apply.  */
2875 char remove();
2876
2877 int main() {
2878 remove()
2879 ; return 0; }
2880 EOF
2881 if { (eval echo configure:2882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2882   rm -rf conftest*
2883   eval "ac_cv_lib_$ac_lib_var=yes"
2884 else
2885   echo "configure: failed program was:" >&5
2886   cat conftest.$ac_ext >&5
2887   rm -rf conftest*
2888   eval "ac_cv_lib_$ac_lib_var=no"
2889 fi
2890 rm -f conftest*
2891 LIBS="$ac_save_LIBS"
2892
2893 fi
2894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2895   echo "$ac_t""yes" 1>&6
2896   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
2897 else
2898   echo "$ac_t""no" 1>&6
2899 fi
2900
2901     fi
2902
2903     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
2904     echo $ac_n "checking for shmat""... $ac_c" 1>&6
2905 echo "configure:2906: checking for shmat" >&5
2906 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
2907   echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909   cat > conftest.$ac_ext <<EOF
2910 #line 2911 "configure"
2911 #include "confdefs.h"
2912 /* System header to define __stub macros and hopefully few prototypes,
2913     which can conflict with char shmat(); below.  */
2914 #include <assert.h>
2915 /* Override any gcc2 internal prototype to avoid an error.  */
2916 /* We use char because int might match the return type of a gcc2
2917     builtin and then its argument prototype would still apply.  */
2918 char shmat();
2919
2920 int main() {
2921
2922 /* The GNU C library defines this for functions which it implements
2923     to always fail with ENOSYS.  Some functions are actually named
2924     something starting with __ and the normal name is an alias.  */
2925 #if defined (__stub_shmat) || defined (__stub___shmat)
2926 choke me
2927 #else
2928 shmat();
2929 #endif
2930
2931 ; return 0; }
2932 EOF
2933 if { (eval echo configure:2934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2934   rm -rf conftest*
2935   eval "ac_cv_func_shmat=yes"
2936 else
2937   echo "configure: failed program was:" >&5
2938   cat conftest.$ac_ext >&5
2939   rm -rf conftest*
2940   eval "ac_cv_func_shmat=no"
2941 fi
2942 rm -f conftest*
2943 fi
2944
2945 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
2946   echo "$ac_t""yes" 1>&6
2947   :
2948 else
2949   echo "$ac_t""no" 1>&6
2950 fi
2951
2952     if test $ac_cv_func_shmat = no; then
2953       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
2954 echo "configure:2955: checking for shmat in -lipc" >&5
2955 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
2956 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2957   echo $ac_n "(cached) $ac_c" 1>&6
2958 else
2959   ac_save_LIBS="$LIBS"
2960 LIBS="-lipc  $LIBS"
2961 cat > conftest.$ac_ext <<EOF
2962 #line 2963 "configure"
2963 #include "confdefs.h"
2964 /* Override any gcc2 internal prototype to avoid an error.  */
2965 /* We use char because int might match the return type of a gcc2
2966     builtin and then its argument prototype would still apply.  */
2967 char shmat();
2968
2969 int main() {
2970 shmat()
2971 ; return 0; }
2972 EOF
2973 if { (eval echo configure:2974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2974   rm -rf conftest*
2975   eval "ac_cv_lib_$ac_lib_var=yes"
2976 else
2977   echo "configure: failed program was:" >&5
2978   cat conftest.$ac_ext >&5
2979   rm -rf conftest*
2980   eval "ac_cv_lib_$ac_lib_var=no"
2981 fi
2982 rm -f conftest*
2983 LIBS="$ac_save_LIBS"
2984
2985 fi
2986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2987   echo "$ac_t""yes" 1>&6
2988   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
2989 else
2990   echo "$ac_t""no" 1>&6
2991 fi
2992
2993     fi
2994   fi
2995
2996   # Check for libraries that X11R6 Xt/Xaw programs need.
2997   ac_save_LDFLAGS="$LDFLAGS"
2998   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
2999   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3000   # check for ICE first), but we must link in the order -lSM -lICE or
3001   # we get undefined symbols.  So assume we have SM if we have ICE.
3002   # These have to be linked with before -lX11, unlike the other
3003   # libraries we check for below, so use a different variable.
3004   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3005   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
3006 echo "configure:3007: checking for IceConnectionNumber in -lICE" >&5
3007 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3009   echo $ac_n "(cached) $ac_c" 1>&6
3010 else
3011   ac_save_LIBS="$LIBS"
3012 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3013 cat > conftest.$ac_ext <<EOF
3014 #line 3015 "configure"
3015 #include "confdefs.h"
3016 /* Override any gcc2 internal prototype to avoid an error.  */
3017 /* We use char because int might match the return type of a gcc2
3018     builtin and then its argument prototype would still apply.  */
3019 char IceConnectionNumber();
3020
3021 int main() {
3022 IceConnectionNumber()
3023 ; return 0; }
3024 EOF
3025 if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3026   rm -rf conftest*
3027   eval "ac_cv_lib_$ac_lib_var=yes"
3028 else
3029   echo "configure: failed program was:" >&5
3030   cat conftest.$ac_ext >&5
3031   rm -rf conftest*
3032   eval "ac_cv_lib_$ac_lib_var=no"
3033 fi
3034 rm -f conftest*
3035 LIBS="$ac_save_LIBS"
3036
3037 fi
3038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3039   echo "$ac_t""yes" 1>&6
3040   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3041 else
3042   echo "$ac_t""no" 1>&6
3043 fi
3044
3045   LDFLAGS="$ac_save_LDFLAGS"
3046
3047 fi
3048
3049 if test -n "$no_x" ; then
3050   echo $PRODUCT requires the X Window System header files and libraries!
3051   echo They were not found on your system.  See FAQ topic C.2.
3052   echo configure failed
3053   exit 1
3054 fi
3055
3056
3057 # Make sure we can run config.sub.
3058 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
3059 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
3060 fi
3061
3062 echo $ac_n "checking host system type""... $ac_c" 1>&6
3063 echo "configure:3064: checking host system type" >&5
3064
3065 host_alias=$host
3066 case "$host_alias" in
3067 NONE)
3068   case $nonopt in
3069   NONE)
3070     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
3071     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
3072     fi ;;
3073   *) host_alias=$nonopt ;;
3074   esac ;;
3075 esac
3076
3077 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
3078 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3079 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3080 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3081 echo "$ac_t""$host" 1>&6
3082
3083
3084
3085
3086 USE_PTYS=0
3087 case "$host" in
3088   *-*-hpux* )
3089     cat >> confdefs.h <<\EOF
3090 #define PTY_TTY_NAME_SPRINTF sprintf (pty_name, "/dev/pty/tty%c%x", c, i);
3091 EOF
3092
3093     cat >> confdefs.h <<\EOF
3094 #define PTY_NAME_SPRINTF sprintf (pty_name, "/dev/ptym/pty%c%x", c, i);
3095 EOF
3096
3097     if test "$GCC" = yes; then
3098       CONF_CFLAGS="-fwritable-strings"
3099     else
3100
3101
3102       CONF_CFLAGS="-Aa -D_HPUX_SOURCE"
3103     fi
3104
3105
3106     if test -d /opt/hppd/include/X11; then
3107       X_CFLAGS="$X_CFLAGS -I/opt/hppd/include"
3108       X_LIBS="$X_LIBS -L/opt/hppd/lib"
3109     elif test -d /usr/contrib/X11R5/include; then
3110       X_CFLAGS="$X_CFLAGS -I/usr/contrib/X11R5/include"
3111       X_LIBS="$X_LIBS -L/usr/contrib/X11R5/lib"
3112     elif test -d /usr/contrib/mitX11R5/include; then
3113       X_CFLAGS="$X_CFLAGS -I/usr/contrib/mitX11R5/include"
3114       X_LIBS="$X_LIBS -L/usr/contrib/mitX11R5/lib"
3115     elif test -d /MIT/X11R5/include; then
3116       X_CFLAGS="$X_CFLAGS -I/MIT/X11R5/include"
3117       X_LIBS="$X_LIBS -L/MIT/X11R5/lib"
3118     elif test -d /usr/local/include/X11R5; then
3119       X_CFLAGS="$X_CFLAGS -I/usr/local/include/X11R5"
3120       X_LIBS="$X_LIBS -L/usr/local/lib/X11R5"
3121     fi
3122     if test -d /usr/include/X11R5; then
3123       X_CFLAGS="$X_CFLAGS -I/usr/include/X11R5"
3124       X_LIBS="$X_LIBS -L/usr/lib/X11R5 -L/usr/lib/X11R4"
3125     elif test -d /usr/include/X11R4; then
3126       X_CFLAGS="$X_CFLAGS -I/usr/include/X11R4"
3127       X_LIBS="$X_LIBS -L/usr/lib/X11R4"
3128     fi
3129   ;;
3130
3131   romp-ibm-aix* )
3132     cat >> confdefs.h <<\EOF
3133 #define IBMRTAIX 1
3134 EOF
3135
3136   ;;
3137
3138   i386-ibm-aix )
3139     if test "$GCC" = yes; then
3140       CONF_CFLAGS="-fwritable-strings"
3141     fi
3142   ;;
3143
3144   *-*-aix3* | *-*-bosx* )
3145     cat >> confdefs.h <<\EOF
3146 #define PTY_ITERATION for (c = 0; !c; c++)
3147 EOF
3148
3149     cat >> confdefs.h <<\EOF
3150 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc");
3151 EOF
3152
3153     cat >> confdefs.h <<\EOF
3154 #define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));
3155 EOF
3156
3157   ;;
3158
3159   *-*-cxux* )
3160     cat >> confdefs.h <<\EOF
3161 #define FIRST_PTY_LETTER 'A'
3162 EOF
3163
3164     cat >> confdefs.h <<\EOF
3165 #define LAST_PTY_LETTER 'P'
3166 EOF
3167
3168   ;;
3169
3170   *-*-uniplus* )
3171     cat >> confdefs.h <<\EOF
3172 #define UNIPLUS 1
3173 EOF
3174
3175   ;;
3176
3177   *-*-rtu* )
3178     cat >> confdefs.h <<\EOF
3179 #define FIRST_PTY_LETTER 'z'
3180 EOF
3181
3182     cat >> confdefs.h <<\EOF
3183 #define PTY_TTY_NAME_SPRINTF sprintf (pty_name, "/dev/ttyp%x", i);
3184 EOF
3185
3186     cat >> confdefs.h <<\EOF
3187 #define PTY_NAME_SPRINTF sprintf (pty_name, "/dev/pty%x", i);
3188 EOF
3189
3190     cat >> confdefs.h <<\EOF
3191 #define RTU 1
3192 EOF
3193
3194   ;;
3195
3196   *-*-iris* | *-*-irix3* )
3197     cat >> confdefs.h <<\EOF
3198 #define PTY_ITERATION for (c = 0; !c; c++)
3199 EOF
3200
3201     cat >> confdefs.h <<\EOF
3202 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc");
3203 EOF
3204
3205     cat >> confdefs.h <<\EOF
3206 #define PTY_TTY_NAME_SPRINTF sprintf (pty_name, "/dev/ttyq%d", minor(stb.st_rdev));
3207 EOF
3208
3209   ;;
3210
3211   *-*-irix* )
3212   ;;
3213
3214   *-*-sunos4* | *-*-solaris1* )
3215
3216
3217     if test "$GCC" = yes; then
3218       PRE_XMULIB="-static"
3219       POST_XMULIB="-dynamic"
3220     else
3221       PRE_XMULIB="-Bstatic"
3222       POST_XMULIB="-Bdynamic"
3223     fi
3224   ;;
3225
3226   *-*-sunos5* | *-*-solaris2* )
3227
3228
3229     X_LIBS="$X_LIBS -lelf"
3230   ;;
3231
3232   *-*-sco* )
3233     cat >> confdefs.h <<\EOF
3234 #define PTY_ITERATION for (i = 0; ; i++)
3235 EOF
3236
3237     cat >> confdefs.h <<\EOF
3238 #define PTY_NAME_SPRINTF sprintf (pty_name, "/dev/ptyp%d", i);
3239 EOF
3240
3241     cat >> confdefs.h <<\EOF
3242 #define PTY_TTY_NAME_SPRINTF sprintf (pty_name, "/dev/ttyp%d", i);
3243 EOF
3244
3245   ;;
3246         
3247   *-*-dynix* | *-*-ptx* )
3248   ;;
3249
3250   *-*-esix* )
3251   ;;
3252
3253   *-*-usg5-4* | *-*-sysvr4* )
3254   ;;
3255
3256   *-*-usg* | *-*-sysv* | *-*-aix* )
3257   ;;
3258
3259   vax-*-ultrix )
3260     if test "$GCC" = yes; then
3261       CONF_CFLAGS="-fwritable-strings"
3262     fi
3263   ;;
3264 esac
3265
3266 # Check whether --enable-xpm or --disable-xpm was given.
3267 if test "${enable_xpm+set}" = set; then
3268   enableval="$enable_xpm"
3269   enable_xpm="$enableval"
3270 else
3271   enable_xpm="yes"
3272 fi
3273
3274
3275 if test "$enable_xpm" = "yes"; then
3276   save_cflags="$CFLAGS"
3277   CFLAGS="$CFLAGS $X_CFLAGS"
3278   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
3279   for ac_hdr in X11/xpm.h
3280 do
3281 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3282 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3283 echo "configure:3284: checking for $ac_hdr" >&5
3284 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3285   echo $ac_n "(cached) $ac_c" 1>&6
3286 else
3287   cat > conftest.$ac_ext <<EOF
3288 #line 3289 "configure"
3289 #include "confdefs.h"
3290 #include <$ac_hdr>
3291 EOF
3292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3293 { (eval echo configure:3294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3295 if test -z "$ac_err"; then
3296   rm -rf conftest*
3297   eval "ac_cv_header_$ac_safe=yes"
3298 else
3299   echo "$ac_err" >&5
3300   echo "configure: failed program was:" >&5
3301   cat conftest.$ac_ext >&5
3302   rm -rf conftest*
3303   eval "ac_cv_header_$ac_safe=no"
3304 fi
3305 rm -f conftest*
3306 fi
3307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3308   echo "$ac_t""yes" 1>&6
3309     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3310   cat >> confdefs.h <<EOF
3311 #define $ac_tr_hdr 1
3312 EOF
3313  
3314 else
3315   echo "$ac_t""no" 1>&6
3316 fi
3317 done
3318
3319   CFLAGS="$save_cflags"
3320   if test "$ac_cv_header_X11_xpm_h" = "yes"; then
3321     save_ldflags="$LDFLAGS"
3322     LDFLAGS="$LDFLAGS $X_LIBS"
3323     echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
3324 echo "configure:3325: checking for XpmReadFileToPixmap in -lXpm" >&5
3325 ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
3326 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3327   echo $ac_n "(cached) $ac_c" 1>&6
3328 else
3329   ac_save_LIBS="$LIBS"
3330 LIBS="-lXpm $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
3331 cat > conftest.$ac_ext <<EOF
3332 #line 3333 "configure"
3333 #include "confdefs.h"
3334 /* Override any gcc2 internal prototype to avoid an error.  */
3335 /* We use char because int might match the return type of a gcc2
3336     builtin and then its argument prototype would still apply.  */
3337 char XpmReadFileToPixmap();
3338
3339 int main() {
3340 XpmReadFileToPixmap()
3341 ; return 0; }
3342 EOF
3343 if { (eval echo configure:3344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3344   rm -rf conftest*
3345   eval "ac_cv_lib_$ac_lib_var=yes"
3346 else
3347   echo "configure: failed program was:" >&5
3348   cat conftest.$ac_ext >&5
3349   rm -rf conftest*
3350   eval "ac_cv_lib_$ac_lib_var=no"
3351 fi
3352 rm -f conftest*
3353 LIBS="$ac_save_LIBS"
3354
3355 fi
3356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3357   echo "$ac_t""yes" 1>&6
3358   X_PRE_LIBS="-lXpm $X_PRE_LIBS"; cat >> confdefs.h <<\EOF
3359 #define HAVE_LIBXPM 1
3360 EOF
3361
3362 else
3363   echo "$ac_t""no" 1>&6
3364 fi
3365
3366     LDFLAGS="$save_ldflags"
3367   fi
3368 fi
3369
3370
3371
3372
3373
3374
3375 echo $ac_n "checking whether ptys or pipes should be used""... $ac_c" 1>&6
3376 echo "configure:3377: checking whether ptys or pipes should be used" >&5
3377 # Check whether --enable-ptys or --disable-ptys was given.
3378 if test "${enable_ptys+set}" = set; then
3379   enableval="$enable_ptys"
3380   if test "$enableval" = yes; then
3381   USE_PTYS=1
3382   echo "$ac_t""ptys (user override)" 1>&6
3383 fi
3384 if test "$enableval" = no; then
3385   USE_PTYS=0
3386   echo "$ac_t""pipes (user override)" 1>&6
3387 fi
3388 else
3389   if test "$USE_PTYS" = 1; then
3390   echo "$ac_t""ptys" 1>&6
3391 else
3392   echo "$ac_t""pipes" 1>&6
3393 fi
3394 fi
3395
3396 cat >> confdefs.h <<EOF
3397 #define USE_PTYS $USE_PTYS
3398 EOF
3399
3400
3401 # Check whether --enable-zippy or --disable-zippy was given.
3402 if test "${enable_zippy+set}" = set; then
3403   enableval="$enable_zippy"
3404   if test "$enableval" = yes; then
3405   cat >> confdefs.h <<\EOF
3406 #define ZIPPY 1
3407 EOF
3408
3409   ZIPPY_O=zippy.o
3410   ZIPPY_H=zippy.h
3411 fi
3412 fi
3413
3414   
3415   
3416
3417 # Check whether --enable-sigint or --disable-sigint was given.
3418 if test "${enable_sigint+set}" = set; then
3419   enableval="$enable_sigint"
3420   if test "$enableval" = yes; then
3421   cat >> confdefs.h <<\EOF
3422 #define ATTENTION 1
3423 EOF
3424
3425 fi
3426 else
3427   cat >> confdefs.h <<\EOF
3428 #define ATTENTION 1
3429 EOF
3430
3431 fi
3432
3433
3434 cat >> confdefs.h <<EOF
3435 #define PRODUCT "$PRODUCT"
3436 EOF
3437
3438 cat >> confdefs.h <<EOF
3439 #define VERSION "$VERSION"
3440 EOF
3441
3442 cat >> confdefs.h <<EOF
3443 #define PATCHLEVEL "$PATCHLEVEL"
3444 EOF
3445
3446
3447
3448
3449
3450 trap '' 1 2 15
3451 cat > confcache <<\EOF
3452 # This file is a shell script that caches the results of configure
3453 # tests run on this system so they can be shared between configure
3454 # scripts and configure runs.  It is not useful on other systems.
3455 # If it contains results you don't want to keep, you may remove or edit it.
3456 #
3457 # By default, configure uses ./config.cache as the cache file,
3458 # creating it if it does not exist already.  You can give configure
3459 # the --cache-file=FILE option to use a different cache file; that is
3460 # what configure does when it calls configure scripts in
3461 # subdirectories, so they share the cache.
3462 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3463 # config.status only pays attention to the cache file if you give it the
3464 # --recheck option to rerun configure.
3465 #
3466 EOF
3467 # The following way of writing the cache mishandles newlines in values,
3468 # but we know of no workaround that is simple, portable, and efficient.
3469 # So, don't put newlines in cache variables' values.
3470 # Ultrix sh set writes to stderr and can't be redirected directly,
3471 # and sets the high bit in the cache file unless we assign to the vars.
3472 (set) 2>&1 |
3473   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3474   *ac_space=\ *)
3475     # `set' does not quote correctly, so add quotes (double-quote substitution
3476     # turns \\\\ into \\, and sed turns \\ into \).
3477     sed -n \
3478       -e "s/'/'\\\\''/g" \
3479       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3480     ;;
3481   *)
3482     # `set' quotes correctly as required by POSIX, so do not add quotes.
3483     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3484     ;;
3485   esac >> confcache
3486 if cmp -s $cache_file confcache; then
3487   :
3488 else
3489   if test -w $cache_file; then
3490     echo "updating cache $cache_file"
3491     cat confcache > $cache_file
3492   else
3493     echo "not updating unwritable cache $cache_file"
3494   fi
3495 fi
3496 rm -f confcache
3497
3498 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3499
3500 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3501 # Let make expand exec_prefix.
3502 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3503
3504 # Any assignment to VPATH causes Sun make to only execute
3505 # the first set of double-colon rules, so remove it if not needed.
3506 # If there is a colon in the path, we need to keep it.
3507 if test "x$srcdir" = x.; then
3508   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3509 fi
3510
3511 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3512
3513 DEFS=-DHAVE_CONFIG_H
3514
3515 # Without the "./", some shells look in PATH for config.status.
3516 : ${CONFIG_STATUS=./config.status}
3517
3518 echo creating $CONFIG_STATUS
3519 rm -f $CONFIG_STATUS
3520 cat > $CONFIG_STATUS <<EOF
3521 #! /bin/sh
3522 # Generated automatically by configure.
3523 # Run this file to recreate the current configuration.
3524 # This directory was configured as follows,
3525 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3526 #
3527 # $0 $ac_configure_args
3528 #
3529 # Compiler output produced by configure, useful for debugging
3530 # configure, is in ./config.log if it exists.
3531
3532 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3533 for ac_option
3534 do
3535   case "\$ac_option" in
3536   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3537     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3538     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3539   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3540     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3541     exit 0 ;;
3542   -help | --help | --hel | --he | --h)
3543     echo "\$ac_cs_usage"; exit 0 ;;
3544   *) echo "\$ac_cs_usage"; exit 1 ;;
3545   esac
3546 done
3547
3548 ac_given_srcdir=$srcdir
3549 ac_given_INSTALL="$INSTALL"
3550
3551 trap 'rm -fr `echo "Makefile comment.awk:comment.in cmail xboard.texinfo config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3552 EOF
3553 cat >> $CONFIG_STATUS <<EOF
3554
3555 # Protect against being on the right side of a sed subst in config.status.
3556 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3557  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3558 $ac_vpsub
3559 $extrasub
3560 s%@SHELL@%$SHELL%g
3561 s%@CFLAGS@%$CFLAGS%g
3562 s%@CPPFLAGS@%$CPPFLAGS%g
3563 s%@CXXFLAGS@%$CXXFLAGS%g
3564 s%@FFLAGS@%$FFLAGS%g
3565 s%@DEFS@%$DEFS%g
3566 s%@LDFLAGS@%$LDFLAGS%g
3567 s%@LIBS@%$LIBS%g
3568 s%@exec_prefix@%$exec_prefix%g
3569 s%@prefix@%$prefix%g
3570 s%@program_transform_name@%$program_transform_name%g
3571 s%@bindir@%$bindir%g
3572 s%@sbindir@%$sbindir%g
3573 s%@libexecdir@%$libexecdir%g
3574 s%@datadir@%$datadir%g
3575 s%@sysconfdir@%$sysconfdir%g
3576 s%@sharedstatedir@%$sharedstatedir%g
3577 s%@localstatedir@%$localstatedir%g
3578 s%@libdir@%$libdir%g
3579 s%@includedir@%$includedir%g
3580 s%@oldincludedir@%$oldincludedir%g
3581 s%@infodir@%$infodir%g
3582 s%@mandir@%$mandir%g
3583 s%@CC@%$CC%g
3584 s%@CPP@%$CPP%g
3585 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3586 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3587 s%@INSTALL_DATA@%$INSTALL_DATA%g
3588 s%@LEX@%$LEX%g
3589 s%@LEXLIB@%$LEXLIB%g
3590 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
3591 s%@RSH@%$RSH%g
3592 s%@NROFF@%$NROFF%g
3593 s%@NROFFFLAGS@%$NROFFFLAGS%g
3594 s%@AWKPATH@%$AWKPATH%g
3595 s%@PERLPATH@%$PERLPATH%g
3596 s%@XAW_LIBS@%$XAW_LIBS%g
3597 s%@X_CFLAGS@%$X_CFLAGS%g
3598 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3599 s%@X_LIBS@%$X_LIBS%g
3600 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
3601 s%@host@%$host%g
3602 s%@host_alias@%$host_alias%g
3603 s%@host_cpu@%$host_cpu%g
3604 s%@host_vendor@%$host_vendor%g
3605 s%@host_os@%$host_os%g
3606 s%@PRE_XMULIB@%$PRE_XMULIB%g
3607 s%@POST_XMULIB@%$POST_XMULIB%g
3608 s%@CONF_CFLAGS@%$CONF_CFLAGS%g
3609 s%@CONF_LDFLAGS@%$CONF_LDFLAGS%g
3610 s%@ZIPPY_O@%$ZIPPY_O%g
3611 s%@ZIPPY_H@%$ZIPPY_H%g
3612 s%@PRODUCT@%$PRODUCT%g
3613 s%@VERSION@%$VERSION%g
3614 s%@PATCHLEVEL@%$PATCHLEVEL%g
3615
3616 CEOF
3617 EOF
3618
3619 cat >> $CONFIG_STATUS <<\EOF
3620
3621 # Split the substitutions into bite-sized pieces for seds with
3622 # small command number limits, like on Digital OSF/1 and HP-UX.
3623 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3624 ac_file=1 # Number of current file.
3625 ac_beg=1 # First line for current file.
3626 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3627 ac_more_lines=:
3628 ac_sed_cmds=""
3629 while $ac_more_lines; do
3630   if test $ac_beg -gt 1; then
3631     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3632   else
3633     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3634   fi
3635   if test ! -s conftest.s$ac_file; then
3636     ac_more_lines=false
3637     rm -f conftest.s$ac_file
3638   else
3639     if test -z "$ac_sed_cmds"; then
3640       ac_sed_cmds="sed -f conftest.s$ac_file"
3641     else
3642       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3643     fi
3644     ac_file=`expr $ac_file + 1`
3645     ac_beg=$ac_end
3646     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3647   fi
3648 done
3649 if test -z "$ac_sed_cmds"; then
3650   ac_sed_cmds=cat
3651 fi
3652 EOF
3653
3654 cat >> $CONFIG_STATUS <<EOF
3655
3656 CONFIG_FILES=\${CONFIG_FILES-"Makefile comment.awk:comment.in cmail xboard.texinfo"}
3657 EOF
3658 cat >> $CONFIG_STATUS <<\EOF
3659 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3660   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3661   case "$ac_file" in
3662   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3663        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3664   *) ac_file_in="${ac_file}.in" ;;
3665   esac
3666
3667   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3668
3669   # Remove last slash and all that follows it.  Not all systems have dirname.
3670   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3671   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3672     # The file is in a subdirectory.
3673     test ! -d "$ac_dir" && mkdir "$ac_dir"
3674     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3675     # A "../" for each directory in $ac_dir_suffix.
3676     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3677   else
3678     ac_dir_suffix= ac_dots=
3679   fi
3680
3681   case "$ac_given_srcdir" in
3682   .)  srcdir=.
3683       if test -z "$ac_dots"; then top_srcdir=.
3684       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3685   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3686   *) # Relative path.
3687     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3688     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3689   esac
3690
3691   case "$ac_given_INSTALL" in
3692   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3693   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3694   esac
3695
3696   echo creating "$ac_file"
3697   rm -f "$ac_file"
3698   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3699   case "$ac_file" in
3700   *Makefile*) ac_comsub="1i\\
3701 # $configure_input" ;;
3702   *) ac_comsub= ;;
3703   esac
3704
3705   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3706   sed -e "$ac_comsub
3707 s%@configure_input@%$configure_input%g
3708 s%@srcdir@%$srcdir%g
3709 s%@top_srcdir@%$top_srcdir%g
3710 s%@INSTALL@%$INSTALL%g
3711 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3712 fi; done
3713 rm -f conftest.s*
3714
3715 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3716 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3717 #
3718 # ac_d sets the value in "#define NAME VALUE" lines.
3719 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3720 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3721 ac_dC='\3'
3722 ac_dD='%g'
3723 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3724 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3725 ac_uB='\([      ]\)%\1#\2define\3'
3726 ac_uC=' '
3727 ac_uD='\4%g'
3728 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3729 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3730 ac_eB='$%\1#\2define\3'
3731 ac_eC=' '
3732 ac_eD='%g'
3733
3734 if test "${CONFIG_HEADERS+set}" != set; then
3735 EOF
3736 cat >> $CONFIG_STATUS <<EOF
3737   CONFIG_HEADERS="config.h"
3738 EOF
3739 cat >> $CONFIG_STATUS <<\EOF
3740 fi
3741 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3742   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3743   case "$ac_file" in
3744   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3745        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3746   *) ac_file_in="${ac_file}.in" ;;
3747   esac
3748
3749   echo creating $ac_file
3750
3751   rm -f conftest.frag conftest.in conftest.out
3752   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3753   cat $ac_file_inputs > conftest.in
3754
3755 EOF
3756
3757 # Transform confdefs.h into a sed script conftest.vals that substitutes
3758 # the proper values into config.h.in to produce config.h.  And first:
3759 # Protect against being on the right side of a sed subst in config.status.
3760 # Protect against being in an unquoted here document in config.status.
3761 rm -f conftest.vals
3762 cat > conftest.hdr <<\EOF
3763 s/[\\&%]/\\&/g
3764 s%[\\$`]%\\&%g
3765 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3766 s%ac_d%ac_u%gp
3767 s%ac_u%ac_e%gp
3768 EOF
3769 sed -n -f conftest.hdr confdefs.h > conftest.vals
3770 rm -f conftest.hdr
3771
3772 # This sed command replaces #undef with comments.  This is necessary, for
3773 # example, in the case of _POSIX_SOURCE, which is predefined and required
3774 # on some systems where configure will not decide to define it.
3775 cat >> conftest.vals <<\EOF
3776 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3777 EOF
3778
3779 # Break up conftest.vals because some shells have a limit on
3780 # the size of here documents, and old seds have small limits too.
3781
3782 rm -f conftest.tail
3783 while :
3784 do
3785   ac_lines=`grep -c . conftest.vals`
3786   # grep -c gives empty output for an empty file on some AIX systems.
3787   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3788   # Write a limited-size here document to conftest.frag.
3789   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3790   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3791   echo 'CEOF
3792   sed -f conftest.frag conftest.in > conftest.out
3793   rm -f conftest.in
3794   mv conftest.out conftest.in
3795 ' >> $CONFIG_STATUS
3796   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3797   rm -f conftest.vals
3798   mv conftest.tail conftest.vals
3799 done
3800 rm -f conftest.vals
3801
3802 cat >> $CONFIG_STATUS <<\EOF
3803   rm -f conftest.frag conftest.h
3804   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3805   cat conftest.in >> conftest.h
3806   rm -f conftest.in
3807   if cmp -s $ac_file conftest.h 2>/dev/null; then
3808     echo "$ac_file is unchanged"
3809     rm -f conftest.h
3810   else
3811     # Remove last slash and all that follows it.  Not all systems have dirname.
3812       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3813       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3814       # The file is in a subdirectory.
3815       test ! -d "$ac_dir" && mkdir "$ac_dir"
3816     fi
3817     rm -f $ac_file
3818     mv conftest.h $ac_file
3819   fi
3820 fi; done
3821
3822 EOF
3823 cat >> $CONFIG_STATUS <<EOF
3824
3825 EOF
3826 cat >> $CONFIG_STATUS <<\EOF
3827 test -z "$CONFIG_HEADERS" || date > stamp-h
3828 chmod 755 comment.awk cmail
3829
3830 exit 0
3831 EOF
3832 chmod +x $CONFIG_STATUS
3833 rm -fr confdefs* $ac_clean_files
3834 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3835