OSDN Git Service

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