Workspace update.
[ir-tcl-moved-to-github.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-yazdir           Yaz directory"
16 ac_help="$ac_help
17   --with-mosidir          MOSI directory"
18 ac_help="$ac_help
19   --with-x                use the X Window System"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58 # Maximum number of lines to put in a shell here document.
59 ac_max_here_lines=12
60
61 ac_prev=
62 for ac_option
63 do
64
65   # If the previous option needs an argument, assign it.
66   if test -n "$ac_prev"; then
67     eval "$ac_prev=\$ac_option"
68     ac_prev=
69     continue
70   fi
71
72   case "$ac_option" in
73   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
74   *) ac_optarg= ;;
75   esac
76
77   # Accept the important Cygnus configure options, so we can diagnose typos.
78
79   case "$ac_option" in
80
81   -bindir | --bindir | --bindi | --bind | --bin | --bi)
82     ac_prev=bindir ;;
83   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
84     bindir="$ac_optarg" ;;
85
86   -build | --build | --buil | --bui | --bu)
87     ac_prev=build ;;
88   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
89     build="$ac_optarg" ;;
90
91   -cache-file | --cache-file | --cache-fil | --cache-fi \
92   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
93     ac_prev=cache_file ;;
94   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
95   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
96     cache_file="$ac_optarg" ;;
97
98   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
99     ac_prev=datadir ;;
100   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
101   | --da=*)
102     datadir="$ac_optarg" ;;
103
104   -disable-* | --disable-*)
105     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
106     # Reject names that are not valid shell variable names.
107     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
108       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
109     fi
110     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
111     eval "enable_${ac_feature}=no" ;;
112
113   -enable-* | --enable-*)
114     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
115     # Reject names that are not valid shell variable names.
116     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
117       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118     fi
119     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120     case "$ac_option" in
121       *=*) ;;
122       *) ac_optarg=yes ;;
123     esac
124     eval "enable_${ac_feature}='$ac_optarg'" ;;
125
126   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
127   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
128   | --exec | --exe | --ex)
129     ac_prev=exec_prefix ;;
130   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
131   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
132   | --exec=* | --exe=* | --ex=*)
133     exec_prefix="$ac_optarg" ;;
134
135   -gas | --gas | --ga | --g)
136     # Obsolete; use --with-gas.
137     with_gas=yes ;;
138
139   -help | --help | --hel | --he)
140     # Omit some internal or obsolete options to make the list less imposing.
141     # This message is too long to be a string in the A/UX 3.1 sh.
142     cat << EOF
143 Usage: configure [options] [host]
144 Options: [defaults in brackets after descriptions]
145 Configuration:
146   --cache-file=FILE       cache test results in FILE
147   --help                  print this message
148   --no-create             do not create output files
149   --quiet, --silent       do not print \`checking...' messages
150   --version               print the version of autoconf that created configure
151 Directory and file names:
152   --prefix=PREFIX         install architecture-independent files in PREFIX
153                           [$ac_default_prefix]
154   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
155                           [same as prefix]
156   --bindir=DIR            user executables in DIR [EPREFIX/bin]
157   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
158   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
159   --datadir=DIR           read-only architecture-independent data in DIR
160                           [PREFIX/share]
161   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
162   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
163                           [PREFIX/com]
164   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
165   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
166   --includedir=DIR        C header files in DIR [PREFIX/include]
167   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
168   --infodir=DIR           info documentation in DIR [PREFIX/info]
169   --mandir=DIR            man documentation in DIR [PREFIX/man]
170   --srcdir=DIR            find the sources in DIR [configure dir or ..]
171   --program-prefix=PREFIX prepend PREFIX to installed program names
172   --program-suffix=SUFFIX append SUFFIX to installed program names
173   --program-transform-name=PROGRAM
174                           run sed PROGRAM on installed program names
175 EOF
176     cat << EOF
177 Host type:
178   --build=BUILD           configure for building on BUILD [BUILD=HOST]
179   --host=HOST             configure for HOST [guessed]
180   --target=TARGET         configure for TARGET [TARGET=HOST]
181 Features and packages:
182   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
183   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
184   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
185   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
186   --x-includes=DIR        X include files are in DIR
187   --x-libraries=DIR       X library files are in DIR
188 EOF
189     if test -n "$ac_help"; then
190       echo "--enable and --with options recognized:$ac_help"
191     fi
192     exit 0 ;;
193
194   -host | --host | --hos | --ho)
195     ac_prev=host ;;
196   -host=* | --host=* | --hos=* | --ho=*)
197     host="$ac_optarg" ;;
198
199   -includedir | --includedir | --includedi | --included | --include \
200   | --includ | --inclu | --incl | --inc)
201     ac_prev=includedir ;;
202   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
203   | --includ=* | --inclu=* | --incl=* | --inc=*)
204     includedir="$ac_optarg" ;;
205
206   -infodir | --infodir | --infodi | --infod | --info | --inf)
207     ac_prev=infodir ;;
208   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
209     infodir="$ac_optarg" ;;
210
211   -libdir | --libdir | --libdi | --libd)
212     ac_prev=libdir ;;
213   -libdir=* | --libdir=* | --libdi=* | --libd=*)
214     libdir="$ac_optarg" ;;
215
216   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
217   | --libexe | --libex | --libe)
218     ac_prev=libexecdir ;;
219   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
220   | --libexe=* | --libex=* | --libe=*)
221     libexecdir="$ac_optarg" ;;
222
223   -localstatedir | --localstatedir | --localstatedi | --localstated \
224   | --localstate | --localstat | --localsta | --localst \
225   | --locals | --local | --loca | --loc | --lo)
226     ac_prev=localstatedir ;;
227   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
228   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
229   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
230     localstatedir="$ac_optarg" ;;
231
232   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233     ac_prev=mandir ;;
234   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
235     mandir="$ac_optarg" ;;
236
237   -nfp | --nfp | --nf)
238     # Obsolete; use --without-fp.
239     with_fp=no ;;
240
241   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
242   | --no-cr | --no-c)
243     no_create=yes ;;
244
245   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
246   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
247     no_recursion=yes ;;
248
249   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
250   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
251   | --oldin | --oldi | --old | --ol | --o)
252     ac_prev=oldincludedir ;;
253   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
254   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
255   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
256     oldincludedir="$ac_optarg" ;;
257
258   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259     ac_prev=prefix ;;
260   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
261     prefix="$ac_optarg" ;;
262
263   -program-prefix | --program-prefix | --program-prefi | --program-pref \
264   | --program-pre | --program-pr | --program-p)
265     ac_prev=program_prefix ;;
266   -program-prefix=* | --program-prefix=* | --program-prefi=* \
267   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
268     program_prefix="$ac_optarg" ;;
269
270   -program-suffix | --program-suffix | --program-suffi | --program-suff \
271   | --program-suf | --program-su | --program-s)
272     ac_prev=program_suffix ;;
273   -program-suffix=* | --program-suffix=* | --program-suffi=* \
274   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
275     program_suffix="$ac_optarg" ;;
276
277   -program-transform-name | --program-transform-name \
278   | --program-transform-nam | --program-transform-na \
279   | --program-transform-n | --program-transform- \
280   | --program-transform | --program-transfor \
281   | --program-transfo | --program-transf \
282   | --program-trans | --program-tran \
283   | --progr-tra | --program-tr | --program-t)
284     ac_prev=program_transform_name ;;
285   -program-transform-name=* | --program-transform-name=* \
286   | --program-transform-nam=* | --program-transform-na=* \
287   | --program-transform-n=* | --program-transform-=* \
288   | --program-transform=* | --program-transfor=* \
289   | --program-transfo=* | --program-transf=* \
290   | --program-trans=* | --program-tran=* \
291   | --progr-tra=* | --program-tr=* | --program-t=*)
292     program_transform_name="$ac_optarg" ;;
293
294   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
295   | -silent | --silent | --silen | --sile | --sil)
296     silent=yes ;;
297
298   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299     ac_prev=sbindir ;;
300   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301   | --sbi=* | --sb=*)
302     sbindir="$ac_optarg" ;;
303
304   -sharedstatedir | --sharedstatedir | --sharedstatedi \
305   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
306   | --sharedst | --shareds | --shared | --share | --shar \
307   | --sha | --sh)
308     ac_prev=sharedstatedir ;;
309   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
310   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
311   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312   | --sha=* | --sh=*)
313     sharedstatedir="$ac_optarg" ;;
314
315   -site | --site | --sit)
316     ac_prev=site ;;
317   -site=* | --site=* | --sit=*)
318     site="$ac_optarg" ;;
319
320   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321     ac_prev=srcdir ;;
322   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
323     srcdir="$ac_optarg" ;;
324
325   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
326   | --syscon | --sysco | --sysc | --sys | --sy)
327     ac_prev=sysconfdir ;;
328   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
329   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
330     sysconfdir="$ac_optarg" ;;
331
332   -target | --target | --targe | --targ | --tar | --ta | --t)
333     ac_prev=target ;;
334   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
335     target="$ac_optarg" ;;
336
337   -v | -verbose | --verbose | --verbos | --verbo | --verb)
338     verbose=yes ;;
339
340   -version | --version | --versio | --versi | --vers)
341     echo "configure generated by autoconf version 2.12"
342     exit 0 ;;
343
344   -with-* | --with-*)
345     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
346     # Reject names that are not valid shell variable names.
347     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
348       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349     fi
350     ac_package=`echo $ac_package| sed 's/-/_/g'`
351     case "$ac_option" in
352       *=*) ;;
353       *) ac_optarg=yes ;;
354     esac
355     eval "with_${ac_package}='$ac_optarg'" ;;
356
357   -without-* | --without-*)
358     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
359     # Reject names that are not valid shell variable names.
360     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
361       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362     fi
363     ac_package=`echo $ac_package| sed 's/-/_/g'`
364     eval "with_${ac_package}=no" ;;
365
366   --x)
367     # Obsolete; use --with-x.
368     with_x=yes ;;
369
370   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
371   | --x-incl | --x-inc | --x-in | --x-i)
372     ac_prev=x_includes ;;
373   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
374   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
375     x_includes="$ac_optarg" ;;
376
377   -x-libraries | --x-libraries | --x-librarie | --x-librari \
378   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
379     ac_prev=x_libraries ;;
380   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
381   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
382     x_libraries="$ac_optarg" ;;
383
384   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
385     ;;
386
387   *)
388     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
389       echo "configure: warning: $ac_option: invalid host type" 1>&2
390     fi
391     if test "x$nonopt" != xNONE; then
392       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
393     fi
394     nonopt="$ac_option"
395     ;;
396
397   esac
398 done
399
400 if test -n "$ac_prev"; then
401   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
402 fi
403
404 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405
406 # File descriptor usage:
407 # 0 standard input
408 # 1 file creation
409 # 2 errors and warnings
410 # 3 some systems may open it to /dev/tty
411 # 4 used on the Kubota Titan
412 # 6 checking for... messages and results
413 # 5 compiler messages saved in config.log
414 if test "$silent" = yes; then
415   exec 6>/dev/null
416 else
417   exec 6>&1
418 fi
419 exec 5>./config.log
420
421 echo "\
422 This file contains any messages produced by compilers while
423 running configure, to aid debugging if configure makes a mistake.
424 " 1>&5
425
426 # Strip out --no-create and --no-recursion so they do not pile up.
427 # Also quote any args containing shell metacharacters.
428 ac_configure_args=
429 for ac_arg
430 do
431   case "$ac_arg" in
432   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
433   | --no-cr | --no-c) ;;
434   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
435   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
436   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
437   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
438   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
439   esac
440 done
441
442 # NLS nuisances.
443 # Only set these to C if already set.  These must not be set unconditionally
444 # because not all systems understand e.g. LANG=C (notably SCO).
445 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
446 # Non-C LC_CTYPE values break the ctype check.
447 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
448 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
450 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
451
452 # confdefs.h avoids OS command line length limits that DEFS can exceed.
453 rm -rf conftest* confdefs.h
454 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
455 echo > confdefs.h
456
457 # A filename unique to this package, relative to the directory that
458 # configure is in, which we can look for to find out if srcdir is correct.
459 ac_unique_file=ir-tcl.h
460
461 # Find the source files, if location was not specified.
462 if test -z "$srcdir"; then
463   ac_srcdir_defaulted=yes
464   # Try the directory containing this script, then its parent.
465   ac_prog=$0
466   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
467   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
468   srcdir=$ac_confdir
469   if test ! -r $srcdir/$ac_unique_file; then
470     srcdir=..
471   fi
472 else
473   ac_srcdir_defaulted=no
474 fi
475 if test ! -r $srcdir/$ac_unique_file; then
476   if test "$ac_srcdir_defaulted" = yes; then
477     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
478   else
479     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
480   fi
481 fi
482 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483
484 # Prefer explicitly selected file to automatically selected ones.
485 if test -z "$CONFIG_SITE"; then
486   if test "x$prefix" != xNONE; then
487     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
488   else
489     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
490   fi
491 fi
492 for ac_site_file in $CONFIG_SITE; do
493   if test -r "$ac_site_file"; then
494     echo "loading site script $ac_site_file"
495     . "$ac_site_file"
496   fi
497 done
498
499 if test -r "$cache_file"; then
500   echo "loading cache $cache_file"
501   . $cache_file
502 else
503   echo "creating cache $cache_file"
504   > $cache_file
505 fi
506
507 ac_ext=c
508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
509 ac_cpp='$CPP $CPPFLAGS'
510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
511 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
512 cross_compiling=$ac_cv_prog_cc_cross
513
514 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517     ac_n= ac_c='
518 ' ac_t='        '
519   else
520     ac_n=-n ac_c= ac_t=
521   fi
522 else
523   ac_n= ac_c='\c' ac_t=
524 fi
525
526
527 CC=${CC-cc}
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545 ac_aux_dir=
546 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
547   if test -f $ac_dir/install-sh; then
548     ac_aux_dir=$ac_dir
549     ac_install_sh="$ac_aux_dir/install-sh -c"
550     break
551   elif test -f $ac_dir/install.sh; then
552     ac_aux_dir=$ac_dir
553     ac_install_sh="$ac_aux_dir/install.sh -c"
554     break
555   fi
556 done
557 if test -z "$ac_aux_dir"; then
558   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
559 fi
560 ac_config_guess=$ac_aux_dir/config.guess
561 ac_config_sub=$ac_aux_dir/config.sub
562 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
563
564 # Find a good install program.  We prefer a C program (faster),
565 # so one script is as good as another.  But avoid the broken or
566 # incompatible versions:
567 # SysV /etc/install, /usr/sbin/install
568 # SunOS /usr/etc/install
569 # IRIX /sbin/install
570 # AIX /bin/install
571 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
572 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
573 # ./install, which can be erroneously created by make from ./install.sh.
574 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
575 echo "configure:576: checking for a BSD compatible install" >&5
576 if test -z "$INSTALL"; then
577 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
578   echo $ac_n "(cached) $ac_c" 1>&6
579 else
580     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
581   for ac_dir in $PATH; do
582     # Account for people who put trailing slashes in PATH elements.
583     case "$ac_dir/" in
584     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
585     *)
586       # OSF1 and SCO ODT 3.0 have their own names for install.
587       for ac_prog in ginstall installbsd scoinst install; do
588         if test -f $ac_dir/$ac_prog; then
589           if test $ac_prog = install &&
590             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
591             # AIX install.  It has an incompatible calling convention.
592             # OSF/1 installbsd also uses dspmsg, but is usable.
593             :
594           else
595             ac_cv_path_install="$ac_dir/$ac_prog -c"
596             break 2
597           fi
598         fi
599       done
600       ;;
601     esac
602   done
603   IFS="$ac_save_IFS"
604
605 fi
606   if test "${ac_cv_path_install+set}" = set; then
607     INSTALL="$ac_cv_path_install"
608   else
609     # As a last resort, use the slow shell script.  We don't cache a
610     # path for INSTALL within a source directory, because that will
611     # break other packages using the cache if that directory is
612     # removed, or if the path is relative.
613     INSTALL="$ac_install_sh"
614   fi
615 fi
616 echo "$ac_t""$INSTALL" 1>&6
617
618 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
619 # It thinks the first close brace ends the variable substitution.
620 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
621
622 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
623
624 if test "x$prefix" = xNONE; then
625 echo $ac_n "checking for prefix by $ac_c" 1>&6
626 # Extract the first word of "tclsh", so it can be a program name with args.
627 set dummy tclsh; ac_word=$2
628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
629 echo "configure:630: checking for $ac_word" >&5
630 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
631   echo $ac_n "(cached) $ac_c" 1>&6
632 else
633   case "$TCLSH" in
634   /*)
635   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
636   ;;
637   *)
638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
639   for ac_dir in $PATH; do
640     test -z "$ac_dir" && ac_dir=.
641     if test -f $ac_dir/$ac_word; then
642       ac_cv_path_TCLSH="$ac_dir/$ac_word"
643       break
644     fi
645   done
646   IFS="$ac_save_ifs"
647   ;;
648 esac
649 fi
650 TCLSH="$ac_cv_path_TCLSH"
651 if test -n "$TCLSH"; then
652   echo "$ac_t""$TCLSH" 1>&6
653 else
654   echo "$ac_t""no" 1>&6
655 fi
656
657   if test -n "$ac_cv_path_TCLSH"; then
658     prefix=`echo $ac_cv_path_TCLSH|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
659   fi
660 fi
661
662 if test "x$prefix" = xNONE; then
663         if test "x$prefix" = xNONE; then
664 echo $ac_n "checking for prefix by $ac_c" 1>&6
665 # Extract the first word of "tclsh8.1", so it can be a program name with args.
666 set dummy tclsh8.1; ac_word=$2
667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
668 echo "configure:669: checking for $ac_word" >&5
669 if eval "test \"`echo '$''{'ac_cv_path_TCLSH8.1'+set}'`\" = set"; then
670   echo $ac_n "(cached) $ac_c" 1>&6
671 else
672   case "$TCLSH8.1" in
673   /*)
674   ac_cv_path_TCLSH8.1="$TCLSH8.1" # Let the user override the test with a path.
675   ;;
676   *)
677   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
678   for ac_dir in $PATH; do
679     test -z "$ac_dir" && ac_dir=.
680     if test -f $ac_dir/$ac_word; then
681       ac_cv_path_TCLSH8.1="$ac_dir/$ac_word"
682       break
683     fi
684   done
685   IFS="$ac_save_ifs"
686   ;;
687 esac
688 fi
689 TCLSH8.1="$ac_cv_path_TCLSH8.1"
690 if test -n "$TCLSH8.1"; then
691   echo "$ac_t""$TCLSH8.1" 1>&6
692 else
693   echo "$ac_t""no" 1>&6
694 fi
695
696   if test -n "$ac_cv_path_TCLSH8.1"; then
697     prefix=`echo $ac_cv_path_TCLSH8.1|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
698   fi
699 fi
700
701 fi
702 if test "x$prefix" = xNONE; then
703         if test "x$prefix" = xNONE; then
704 echo $ac_n "checking for prefix by $ac_c" 1>&6
705 # Extract the first word of "tclsh8.0", so it can be a program name with args.
706 set dummy tclsh8.0; ac_word=$2
707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
708 echo "configure:709: checking for $ac_word" >&5
709 if eval "test \"`echo '$''{'ac_cv_path_TCLSH8.0'+set}'`\" = set"; then
710   echo $ac_n "(cached) $ac_c" 1>&6
711 else
712   case "$TCLSH8.0" in
713   /*)
714   ac_cv_path_TCLSH8.0="$TCLSH8.0" # Let the user override the test with a path.
715   ;;
716   *)
717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
718   for ac_dir in $PATH; do
719     test -z "$ac_dir" && ac_dir=.
720     if test -f $ac_dir/$ac_word; then
721       ac_cv_path_TCLSH8.0="$ac_dir/$ac_word"
722       break
723     fi
724   done
725   IFS="$ac_save_ifs"
726   ;;
727 esac
728 fi
729 TCLSH8.0="$ac_cv_path_TCLSH8.0"
730 if test -n "$TCLSH8.0"; then
731   echo "$ac_t""$TCLSH8.0" 1>&6
732 else
733   echo "$ac_t""no" 1>&6
734 fi
735
736   if test -n "$ac_cv_path_TCLSH8.0"; then
737     prefix=`echo $ac_cv_path_TCLSH8.0|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
738   fi
739 fi
740
741 fi
742 if test "x$prefix" = xNONE; then
743         if test "x$prefix" = xNONE; then
744 echo $ac_n "checking for prefix by $ac_c" 1>&6
745 # Extract the first word of "tclsh7.6", so it can be a program name with args.
746 set dummy tclsh7.6; ac_word=$2
747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
748 echo "configure:749: checking for $ac_word" >&5
749 if eval "test \"`echo '$''{'ac_cv_path_TCLSH7.6'+set}'`\" = set"; then
750   echo $ac_n "(cached) $ac_c" 1>&6
751 else
752   case "$TCLSH7.6" in
753   /*)
754   ac_cv_path_TCLSH7.6="$TCLSH7.6" # Let the user override the test with a path.
755   ;;
756   *)
757   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
758   for ac_dir in $PATH; do
759     test -z "$ac_dir" && ac_dir=.
760     if test -f $ac_dir/$ac_word; then
761       ac_cv_path_TCLSH7.6="$ac_dir/$ac_word"
762       break
763     fi
764   done
765   IFS="$ac_save_ifs"
766   ;;
767 esac
768 fi
769 TCLSH7.6="$ac_cv_path_TCLSH7.6"
770 if test -n "$TCLSH7.6"; then
771   echo "$ac_t""$TCLSH7.6" 1>&6
772 else
773   echo "$ac_t""no" 1>&6
774 fi
775
776   if test -n "$ac_cv_path_TCLSH7.6"; then
777     prefix=`echo $ac_cv_path_TCLSH7.6|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
778   fi
779 fi
780
781 fi
782 if test "x$prefix" = xNONE; then
783         if test "x$prefix" = xNONE; then
784 echo $ac_n "checking for prefix by $ac_c" 1>&6
785 # Extract the first word of "tclsh7.5", so it can be a program name with args.
786 set dummy tclsh7.5; ac_word=$2
787 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
788 echo "configure:789: checking for $ac_word" >&5
789 if eval "test \"`echo '$''{'ac_cv_path_TCLSH7.5'+set}'`\" = set"; then
790   echo $ac_n "(cached) $ac_c" 1>&6
791 else
792   case "$TCLSH7.5" in
793   /*)
794   ac_cv_path_TCLSH7.5="$TCLSH7.5" # Let the user override the test with a path.
795   ;;
796   *)
797   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
798   for ac_dir in $PATH; do
799     test -z "$ac_dir" && ac_dir=.
800     if test -f $ac_dir/$ac_word; then
801       ac_cv_path_TCLSH7.5="$ac_dir/$ac_word"
802       break
803     fi
804   done
805   IFS="$ac_save_ifs"
806   ;;
807 esac
808 fi
809 TCLSH7.5="$ac_cv_path_TCLSH7.5"
810 if test -n "$TCLSH7.5"; then
811   echo "$ac_t""$TCLSH7.5" 1>&6
812 else
813   echo "$ac_t""no" 1>&6
814 fi
815
816   if test -n "$ac_cv_path_TCLSH7.5"; then
817     prefix=`echo $ac_cv_path_TCLSH7.5|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
818   fi
819 fi
820
821 fi
822 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
823 echo "configure:824: checking how to run the C preprocessor" >&5
824 # On Suns, sometimes $CPP names a directory.
825 if test -n "$CPP" && test -d "$CPP"; then
826   CPP=
827 fi
828 if test -z "$CPP"; then
829 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832     # This must be in double quotes, not single quotes, because CPP may get
833   # substituted into the Makefile and "${CC-cc}" will confuse make.
834   CPP="${CC-cc} -E"
835   # On the NeXT, cc -E runs the code through the compiler's parser,
836   # not just through cpp.
837   cat > conftest.$ac_ext <<EOF
838 #line 839 "configure"
839 #include "confdefs.h"
840 #include <assert.h>
841 Syntax Error
842 EOF
843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
844 { (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
845 ac_err=`grep -v '^ *+' conftest.out`
846 if test -z "$ac_err"; then
847   :
848 else
849   echo "$ac_err" >&5
850   echo "configure: failed program was:" >&5
851   cat conftest.$ac_ext >&5
852   rm -rf conftest*
853   CPP="${CC-cc} -E -traditional-cpp"
854   cat > conftest.$ac_ext <<EOF
855 #line 856 "configure"
856 #include "confdefs.h"
857 #include <assert.h>
858 Syntax Error
859 EOF
860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
861 { (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
862 ac_err=`grep -v '^ *+' conftest.out`
863 if test -z "$ac_err"; then
864   :
865 else
866   echo "$ac_err" >&5
867   echo "configure: failed program was:" >&5
868   cat conftest.$ac_ext >&5
869   rm -rf conftest*
870   CPP=/lib/cpp
871 fi
872 rm -f conftest*
873 fi
874 rm -f conftest*
875   ac_cv_prog_CPP="$CPP"
876 fi
877   CPP="$ac_cv_prog_CPP"
878 else
879   ac_cv_prog_CPP="$CPP"
880 fi
881 echo "$ac_t""$CPP" 1>&6
882
883 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
884 echo "configure:885: checking for ANSI C header files" >&5
885 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
886   echo $ac_n "(cached) $ac_c" 1>&6
887 else
888   cat > conftest.$ac_ext <<EOF
889 #line 890 "configure"
890 #include "confdefs.h"
891 #include <stdlib.h>
892 #include <stdarg.h>
893 #include <string.h>
894 #include <float.h>
895 EOF
896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
897 { (eval echo configure:898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
898 ac_err=`grep -v '^ *+' conftest.out`
899 if test -z "$ac_err"; then
900   rm -rf conftest*
901   ac_cv_header_stdc=yes
902 else
903   echo "$ac_err" >&5
904   echo "configure: failed program was:" >&5
905   cat conftest.$ac_ext >&5
906   rm -rf conftest*
907   ac_cv_header_stdc=no
908 fi
909 rm -f conftest*
910
911 if test $ac_cv_header_stdc = yes; then
912   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
913 cat > conftest.$ac_ext <<EOF
914 #line 915 "configure"
915 #include "confdefs.h"
916 #include <string.h>
917 EOF
918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
919   egrep "memchr" >/dev/null 2>&1; then
920   :
921 else
922   rm -rf conftest*
923   ac_cv_header_stdc=no
924 fi
925 rm -f conftest*
926
927 fi
928
929 if test $ac_cv_header_stdc = yes; then
930   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
931 cat > conftest.$ac_ext <<EOF
932 #line 933 "configure"
933 #include "confdefs.h"
934 #include <stdlib.h>
935 EOF
936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
937   egrep "free" >/dev/null 2>&1; then
938   :
939 else
940   rm -rf conftest*
941   ac_cv_header_stdc=no
942 fi
943 rm -f conftest*
944
945 fi
946
947 if test $ac_cv_header_stdc = yes; then
948   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
949 if test "$cross_compiling" = yes; then
950   :
951 else
952   cat > conftest.$ac_ext <<EOF
953 #line 954 "configure"
954 #include "confdefs.h"
955 #include <ctype.h>
956 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
957 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
958 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
959 int main () { int i; for (i = 0; i < 256; i++)
960 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
961 exit (0); }
962
963 EOF
964 if { (eval echo configure:965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
965 then
966   :
967 else
968   echo "configure: failed program was:" >&5
969   cat conftest.$ac_ext >&5
970   rm -fr conftest*
971   ac_cv_header_stdc=no
972 fi
973 rm -fr conftest*
974 fi
975
976 fi
977 fi
978
979 echo "$ac_t""$ac_cv_header_stdc" 1>&6
980 if test $ac_cv_header_stdc = yes; then
981   cat >> confdefs.h <<\EOF
982 #define STDC_HEADERS 1
983 EOF
984
985 fi
986
987 if test "$ac_cv_header_stdc" = no; then
988         echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2
989 fi
990 echo $ac_n "checking for YAZ directory""... $ac_c" 1>&6
991 echo "configure:992: checking for YAZ directory" >&5
992 # Check whether --with-yazdir or --without-yazdir was given.
993 if test "${with_yazdir+set}" = set; then
994   withval="$with_yazdir"
995   YAZDIR=$withval
996 fi
997
998 if test "$YAZDIR" = "yes"; then
999         YAZDIR="../yaz-1.4"
1000 elif test "$YAZDIR" = ""; then
1001         YAZDIR=../yaz
1002         for i in ../yaz* ../yaz; do
1003             if test -d $i; then
1004                 YAZDIR=$i
1005             fi
1006         done
1007 fi
1008 if test ! -d $YAZDIR; then
1009         echo "configure: warning: YAZ directory ${YAZDIR} doesn't exist" 1>&2
1010 else
1011         echo "$ac_t""$YAZDIR" 1>&6
1012 fi
1013 echo $ac_n "checking for MOSI""... $ac_c" 1>&6
1014 echo "configure:1015: checking for MOSI" >&5
1015 # Check whether --with-mosidir or --without-mosidir was given.
1016 if test "${with_mosidir+set}" = set; then
1017   withval="$with_mosidir"
1018   MOSIDIR=$withval
1019 fi
1020
1021 if test "$MOSIDIR" = "yes"; then
1022         MOSIDIR="../xtimosi/src"
1023 elif test "$MOSIDIR" = ""; then
1024         MOSIDIR="../xtimosi/src"
1025 fi
1026 if test -r ${YAZDIR}/lib/librfc.a; then
1027         MOSI=1
1028         MOSIDIR=$MOSIDIR
1029         MOSILIB='$(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
1030         MOSIINC='-I$(MOSIDIR)'
1031         MOSITELL=yes
1032 else
1033         MOSI=0
1034         MOSIDIR=$MOSIDIR
1035         MOSILIB='# $(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
1036         MOSIINC='# -I$(MOSIDIR)'
1037         MOSITELL=no
1038 fi
1039 echo "$ac_t""$MOSITELL" 1>&6
1040 if test "x$prefix" = xNONE; then
1041         tryprefix=/usr/local
1042 else
1043         tryprefix=${prefix}
1044 fi
1045 if test -r ${tryprefix}/lib/tclConfig.sh; then
1046         echo $ac_n "checking for Tcl""... $ac_c" 1>&6
1047 echo "configure:1048: checking for Tcl" >&5
1048         . ${tryprefix}/lib/tclConfig.sh
1049         TCLLIB="${TCL_LIB_SPEC} ${TCL_LIBS}"
1050         TCLINC=-I${TCL_PREFIX}/include
1051         RANLIB=$TCL_RANLIB
1052         SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
1053         SHLIB_LD=$TCL_SHLIB_LD
1054         SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
1055         SHLIB_VERSION=$TCL_SHLIB_VERSION
1056         SHLIB_IRTCL=irtcl${TCL_SHLIB_SUFFIX}
1057         ALL_SPEC="irtcl${TCL_SHLIB_SUFFIX} libirtcl.a"
1058         echo "$ac_t""$TCL_VERSION" 1>&6
1059 else
1060         SHLIB_CFLAGS=""
1061         SHLIB_LD="shared-linker"
1062         SHLIB_SUFFIX=""
1063         SHLIB_VERSION=""
1064         SHLIB_IRTCL="irtcl-shared"
1065         # Extract the first word of "ranlib", so it can be a program name with args.
1066 set dummy ranlib; ac_word=$2
1067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1068 echo "configure:1069: checking for $ac_word" >&5
1069 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1070   echo $ac_n "(cached) $ac_c" 1>&6
1071 else
1072   if test -n "$RANLIB"; then
1073   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1074 else
1075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1076   for ac_dir in $PATH; do
1077     test -z "$ac_dir" && ac_dir=.
1078     if test -f $ac_dir/$ac_word; then
1079       ac_cv_prog_RANLIB="ranlib"
1080       break
1081     fi
1082   done
1083   IFS="$ac_save_ifs"
1084   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1085 fi
1086 fi
1087 RANLIB="$ac_cv_prog_RANLIB"
1088 if test -n "$RANLIB"; then
1089   echo "$ac_t""$RANLIB" 1>&6
1090 else
1091   echo "$ac_t""no" 1>&6
1092 fi
1093
1094         checkBoth=0
1095         echo $ac_n "checking for connect""... $ac_c" 1>&6
1096 echo "configure:1097: checking for connect" >&5
1097 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1098   echo $ac_n "(cached) $ac_c" 1>&6
1099 else
1100   cat > conftest.$ac_ext <<EOF
1101 #line 1102 "configure"
1102 #include "confdefs.h"
1103 /* System header to define __stub macros and hopefully few prototypes,
1104     which can conflict with char connect(); below.  */
1105 #include <assert.h>
1106 /* Override any gcc2 internal prototype to avoid an error.  */
1107 /* We use char because int might match the return type of a gcc2
1108     builtin and then its argument prototype would still apply.  */
1109 char connect();
1110
1111 int main() {
1112
1113 /* The GNU C library defines this for functions which it implements
1114     to always fail with ENOSYS.  Some functions are actually named
1115     something starting with __ and the normal name is an alias.  */
1116 #if defined (__stub_connect) || defined (__stub___connect)
1117 choke me
1118 #else
1119 connect();
1120 #endif
1121
1122 ; return 0; }
1123 EOF
1124 if { (eval echo configure:1125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1125   rm -rf conftest*
1126   eval "ac_cv_func_connect=yes"
1127 else
1128   echo "configure: failed program was:" >&5
1129   cat conftest.$ac_ext >&5
1130   rm -rf conftest*
1131   eval "ac_cv_func_connect=no"
1132 fi
1133 rm -f conftest*
1134 fi
1135
1136 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1137   echo "$ac_t""yes" 1>&6
1138   tk_checkSocket=0
1139 else
1140   echo "$ac_t""no" 1>&6
1141 tk_checkSocket=1
1142 fi
1143
1144         if test "$tk_checkSocket" = 1; then
1145                 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1146 echo "configure:1147: checking for main in -lsocket" >&5
1147 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1148 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1149   echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151   ac_save_LIBS="$LIBS"
1152 LIBS="-lsocket  $LIBS"
1153 cat > conftest.$ac_ext <<EOF
1154 #line 1155 "configure"
1155 #include "confdefs.h"
1156
1157 int main() {
1158 main()
1159 ; return 0; }
1160 EOF
1161 if { (eval echo configure:1162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1162   rm -rf conftest*
1163   eval "ac_cv_lib_$ac_lib_var=yes"
1164 else
1165   echo "configure: failed program was:" >&5
1166   cat conftest.$ac_ext >&5
1167   rm -rf conftest*
1168   eval "ac_cv_lib_$ac_lib_var=no"
1169 fi
1170 rm -f conftest*
1171 LIBS="$ac_save_LIBS"
1172
1173 fi
1174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1175   echo "$ac_t""yes" 1>&6
1176   LIBS="$LIBS -lsocket"
1177 else
1178   echo "$ac_t""no" 1>&6
1179 checkBoth=1
1180 fi
1181
1182         fi
1183         if test "$checkBoth" = 1; then
1184                 tk_oldLibs=$LIBS
1185                 LIBS="$LIBS -lsocket -lnsl"
1186                 echo $ac_n "checking for accept""... $ac_c" 1>&6
1187 echo "configure:1188: checking for accept" >&5
1188 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
1189   echo $ac_n "(cached) $ac_c" 1>&6
1190 else
1191   cat > conftest.$ac_ext <<EOF
1192 #line 1193 "configure"
1193 #include "confdefs.h"
1194 /* System header to define __stub macros and hopefully few prototypes,
1195     which can conflict with char accept(); below.  */
1196 #include <assert.h>
1197 /* Override any gcc2 internal prototype to avoid an error.  */
1198 /* We use char because int might match the return type of a gcc2
1199     builtin and then its argument prototype would still apply.  */
1200 char accept();
1201
1202 int main() {
1203
1204 /* The GNU C library defines this for functions which it implements
1205     to always fail with ENOSYS.  Some functions are actually named
1206     something starting with __ and the normal name is an alias.  */
1207 #if defined (__stub_accept) || defined (__stub___accept)
1208 choke me
1209 #else
1210 accept();
1211 #endif
1212
1213 ; return 0; }
1214 EOF
1215 if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1216   rm -rf conftest*
1217   eval "ac_cv_func_accept=yes"
1218 else
1219   echo "configure: failed program was:" >&5
1220   cat conftest.$ac_ext >&5
1221   rm -rf conftest*
1222   eval "ac_cv_func_accept=no"
1223 fi
1224 rm -f conftest*
1225 fi
1226
1227 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
1228   echo "$ac_t""yes" 1>&6
1229   :
1230 else
1231   echo "$ac_t""no" 1>&6
1232 LIBS=$tk_oldLibs
1233 fi
1234
1235         fi
1236         echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1237 echo "configure:1238: checking for gethostbyname" >&5
1238 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1239   echo $ac_n "(cached) $ac_c" 1>&6
1240 else
1241   cat > conftest.$ac_ext <<EOF
1242 #line 1243 "configure"
1243 #include "confdefs.h"
1244 /* System header to define __stub macros and hopefully few prototypes,
1245     which can conflict with char gethostbyname(); below.  */
1246 #include <assert.h>
1247 /* Override any gcc2 internal prototype to avoid an error.  */
1248 /* We use char because int might match the return type of a gcc2
1249     builtin and then its argument prototype would still apply.  */
1250 char gethostbyname();
1251
1252 int main() {
1253
1254 /* The GNU C library defines this for functions which it implements
1255     to always fail with ENOSYS.  Some functions are actually named
1256     something starting with __ and the normal name is an alias.  */
1257 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1258 choke me
1259 #else
1260 gethostbyname();
1261 #endif
1262
1263 ; return 0; }
1264 EOF
1265 if { (eval echo configure:1266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1266   rm -rf conftest*
1267   eval "ac_cv_func_gethostbyname=yes"
1268 else
1269   echo "configure: failed program was:" >&5
1270   cat conftest.$ac_ext >&5
1271   rm -rf conftest*
1272   eval "ac_cv_func_gethostbyname=no"
1273 fi
1274 rm -f conftest*
1275 fi
1276
1277 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1278   echo "$ac_t""yes" 1>&6
1279   :
1280 else
1281   echo "$ac_t""no" 1>&6
1282 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1283 echo "configure:1284: checking for main in -lnsl" >&5
1284 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1286   echo $ac_n "(cached) $ac_c" 1>&6
1287 else
1288   ac_save_LIBS="$LIBS"
1289 LIBS="-lnsl  $LIBS"
1290 cat > conftest.$ac_ext <<EOF
1291 #line 1292 "configure"
1292 #include "confdefs.h"
1293
1294 int main() {
1295 main()
1296 ; return 0; }
1297 EOF
1298 if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1299   rm -rf conftest*
1300   eval "ac_cv_lib_$ac_lib_var=yes"
1301 else
1302   echo "configure: failed program was:" >&5
1303   cat conftest.$ac_ext >&5
1304   rm -rf conftest*
1305   eval "ac_cv_lib_$ac_lib_var=no"
1306 fi
1307 rm -f conftest*
1308 LIBS="$ac_save_LIBS"
1309
1310 fi
1311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1312   echo "$ac_t""yes" 1>&6
1313   LIBS="$LIBS -lnsl"
1314 else
1315   echo "$ac_t""no" 1>&6
1316 fi
1317
1318 fi
1319
1320         echo $ac_n "checking for Tcl""... $ac_c" 1>&6
1321 echo "configure:1322: checking for Tcl" >&5
1322         TCL_VERSION=nope
1323         for i in "" 7.4 7.5 7.6 8.0; do
1324                 if test -r ${tryprefix}/lib/libtcl${i}.a; then
1325                         TCL_VERSION=$i
1326                 fi
1327         done
1328         if test "$TCL_VERSION" = nope; then
1329                 echo "configure: warning: Didn't find Tcl" 1>&2
1330                 TCL_LIB_SPEC=-ltcl
1331                 TCLINC=" # -I.. Tcl/Tk include path"
1332         else
1333                 if test "$TCL_VERSION" = ""; then
1334                         echo "$ac_t""7.3" 1>&6
1335                 else
1336                         echo "$ac_t""$TCL_VERSION" 1>&6
1337                 fi
1338                 TCL_LIB_SPEC=${tryprefix}/lib/libtcl${TCL_VERSION}.a
1339                 TCLINC=-I${tryprefix}/include
1340         fi
1341         TCLLIB="${TCL_LIB_SPEC} ${LIBS} -lm"
1342         ALL_SPEC="ir-tcl ir-tk"
1343 fi
1344 if test -r ${tryprefix}/lib/tkConfig.sh; then
1345         echo $ac_n "checking for Tk""... $ac_c" 1>&6
1346 echo "configure:1347: checking for Tk" >&5
1347         . ${tryprefix}/lib/tkConfig.sh
1348         echo "$ac_t""$TK_VERSION" 1>&6
1349         TKINC=${TK_XINCLUDES}
1350         TKLIB="${TK_LIB_SPEC} ${TCL_LIB_SPEC} ${TK_LIBS}"
1351         IRCLIENT_SHELL=wish${TK_VERSION}
1352 else
1353         echo $ac_n "checking for Tk""... $ac_c" 1>&6
1354 echo "configure:1355: checking for Tk" >&5
1355         TK_VERSION=nope
1356         for i in "" 4.0 4.1 4.2 8.0; do
1357                 if test -r ${tryprefix}/lib/libtk${i}.a; then
1358                         TK_VERSION=$i
1359                 fi
1360         done
1361         if test "$TK_VERSION" = nope; then
1362                 echo "configure: warning: Didn't find Tk" 1>&2
1363                 TKLIB=-ltk
1364         else
1365                 TKLIB=${tryprefix}/lib/libtk${TK_VERSION}.a
1366                 if test "$TK_VERSION" = ""; then
1367                         echo "$ac_t""3.x" 1>&6
1368                 else
1369                         echo "$ac_t""$TK_VERSION" 1>&6
1370                 fi
1371         fi
1372         # If we find X, set shell vars x_includes and x_libraries to the
1373 # paths, otherwise set no_x=yes.
1374 # Uses ac_ vars as temps to allow command line to override cache and checks.
1375 # --without-x overrides everything else, but does not touch the cache.
1376 echo $ac_n "checking for X""... $ac_c" 1>&6
1377 echo "configure:1378: checking for X" >&5
1378
1379 # Check whether --with-x or --without-x was given.
1380 if test "${with_x+set}" = set; then
1381   withval="$with_x"
1382   :
1383 fi
1384
1385 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1386 if test "x$with_x" = xno; then
1387   # The user explicitly disabled X.
1388   have_x=disabled
1389 else
1390   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1391     # Both variables are already set.
1392     have_x=yes
1393   else
1394 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1395   echo $ac_n "(cached) $ac_c" 1>&6
1396 else
1397   # One or both of the vars are not set, and there is no cached value.
1398 ac_x_includes=NO ac_x_libraries=NO
1399 rm -fr conftestdir
1400 if mkdir conftestdir; then
1401   cd conftestdir
1402   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1403   cat > Imakefile <<'EOF'
1404 acfindx:
1405         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1406 EOF
1407   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1408     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1409     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1410     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1411     for ac_extension in a so sl; do
1412       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1413         test -f $ac_im_libdir/libX11.$ac_extension; then
1414         ac_im_usrlibdir=$ac_im_libdir; break
1415       fi
1416     done
1417     # Screen out bogus values from the imake configuration.  They are
1418     # bogus both because they are the default anyway, and because
1419     # using them would break gcc on systems where it needs fixed includes.
1420     case "$ac_im_incroot" in
1421         /usr/include) ;;
1422         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1423     esac
1424     case "$ac_im_usrlibdir" in
1425         /usr/lib | /lib) ;;
1426         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1427     esac
1428   fi
1429   cd ..
1430   rm -fr conftestdir
1431 fi
1432
1433 if test "$ac_x_includes" = NO; then
1434   # Guess where to find include files, by looking for this one X11 .h file.
1435   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1436
1437   # First, try using that file with no special directory specified.
1438 cat > conftest.$ac_ext <<EOF
1439 #line 1440 "configure"
1440 #include "confdefs.h"
1441 #include <$x_direct_test_include>
1442 EOF
1443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1444 { (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1445 ac_err=`grep -v '^ *+' conftest.out`
1446 if test -z "$ac_err"; then
1447   rm -rf conftest*
1448   # We can compile using X headers with no special include directory.
1449 ac_x_includes=
1450 else
1451   echo "$ac_err" >&5
1452   echo "configure: failed program was:" >&5
1453   cat conftest.$ac_ext >&5
1454   rm -rf conftest*
1455   # Look for the header file in a standard set of common directories.
1456 # Check X11 before X11Rn because it is often a symlink to the current release.
1457   for ac_dir in               \
1458     /usr/X11/include          \
1459     /usr/X11R6/include        \
1460     /usr/X11R5/include        \
1461     /usr/X11R4/include        \
1462                               \
1463     /usr/include/X11          \
1464     /usr/include/X11R6        \
1465     /usr/include/X11R5        \
1466     /usr/include/X11R4        \
1467                               \
1468     /usr/local/X11/include    \
1469     /usr/local/X11R6/include  \
1470     /usr/local/X11R5/include  \
1471     /usr/local/X11R4/include  \
1472                               \
1473     /usr/local/include/X11    \
1474     /usr/local/include/X11R6  \
1475     /usr/local/include/X11R5  \
1476     /usr/local/include/X11R4  \
1477                               \
1478     /usr/X386/include         \
1479     /usr/x386/include         \
1480     /usr/XFree86/include/X11  \
1481                               \
1482     /usr/include              \
1483     /usr/local/include        \
1484     /usr/unsupported/include  \
1485     /usr/athena/include       \
1486     /usr/local/x11r5/include  \
1487     /usr/lpp/Xamples/include  \
1488                               \
1489     /usr/openwin/include      \
1490     /usr/openwin/share/include \
1491     ; \
1492   do
1493     if test -r "$ac_dir/$x_direct_test_include"; then
1494       ac_x_includes=$ac_dir
1495       break
1496     fi
1497   done
1498 fi
1499 rm -f conftest*
1500 fi # $ac_x_includes = NO
1501
1502 if test "$ac_x_libraries" = NO; then
1503   # Check for the libraries.
1504
1505   test -z "$x_direct_test_library" && x_direct_test_library=Xt
1506   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1507
1508   # See if we find them without any special options.
1509   # Don't add to $LIBS permanently.
1510   ac_save_LIBS="$LIBS"
1511   LIBS="-l$x_direct_test_library $LIBS"
1512 cat > conftest.$ac_ext <<EOF
1513 #line 1514 "configure"
1514 #include "confdefs.h"
1515
1516 int main() {
1517 ${x_direct_test_function}()
1518 ; return 0; }
1519 EOF
1520 if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1521   rm -rf conftest*
1522   LIBS="$ac_save_LIBS"
1523 # We can link X programs with no special library path.
1524 ac_x_libraries=
1525 else
1526   echo "configure: failed program was:" >&5
1527   cat conftest.$ac_ext >&5
1528   rm -rf conftest*
1529   LIBS="$ac_save_LIBS"
1530 # First see if replacing the include by lib works.
1531 # Check X11 before X11Rn because it is often a symlink to the current release.
1532 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1533     /usr/X11/lib          \
1534     /usr/X11R6/lib        \
1535     /usr/X11R5/lib        \
1536     /usr/X11R4/lib        \
1537                           \
1538     /usr/lib/X11          \
1539     /usr/lib/X11R6        \
1540     /usr/lib/X11R5        \
1541     /usr/lib/X11R4        \
1542                           \
1543     /usr/local/X11/lib    \
1544     /usr/local/X11R6/lib  \
1545     /usr/local/X11R5/lib  \
1546     /usr/local/X11R4/lib  \
1547                           \
1548     /usr/local/lib/X11    \
1549     /usr/local/lib/X11R6  \
1550     /usr/local/lib/X11R5  \
1551     /usr/local/lib/X11R4  \
1552                           \
1553     /usr/X386/lib         \
1554     /usr/x386/lib         \
1555     /usr/XFree86/lib/X11  \
1556                           \
1557     /usr/lib              \
1558     /usr/local/lib        \
1559     /usr/unsupported/lib  \
1560     /usr/athena/lib       \
1561     /usr/local/x11r5/lib  \
1562     /usr/lpp/Xamples/lib  \
1563     /lib/usr/lib/X11      \
1564                           \
1565     /usr/openwin/lib      \
1566     /usr/openwin/share/lib \
1567     ; \
1568 do
1569   for ac_extension in a so sl; do
1570     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1571       ac_x_libraries=$ac_dir
1572       break 2
1573     fi
1574   done
1575 done
1576 fi
1577 rm -f conftest*
1578 fi # $ac_x_libraries = NO
1579
1580 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1581   # Didn't find X anywhere.  Cache the known absence of X.
1582   ac_cv_have_x="have_x=no"
1583 else
1584   # Record where we found X for the cache.
1585   ac_cv_have_x="have_x=yes \
1586                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1587 fi
1588 fi
1589   fi
1590   eval "$ac_cv_have_x"
1591 fi # $with_x != no
1592
1593 if test "$have_x" != yes; then
1594   echo "$ac_t""$have_x" 1>&6
1595   no_x=yes
1596 else
1597   # If each of the values was on the command line, it overrides each guess.
1598   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1599   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1600   # Update the cache value to reflect the command line values.
1601   ac_cv_have_x="have_x=yes \
1602                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1603   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1604 fi
1605
1606         not_really_there=""
1607         if test "$no_x" = ""; then
1608                 if test "$x_includes" = ""; then
1609                         cat > conftest.$ac_ext <<EOF
1610 #line 1611 "configure"
1611 #include "confdefs.h"
1612 #include <X11/XIntrinsic.h>
1613 EOF
1614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1615 { (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1616 ac_err=`grep -v '^ *+' conftest.out`
1617 if test -z "$ac_err"; then
1618   :
1619 else
1620   echo "$ac_err" >&5
1621   echo "configure: failed program was:" >&5
1622   cat conftest.$ac_ext >&5
1623   rm -rf conftest*
1624   not_really_there="yes"
1625 fi
1626 rm -f conftest*
1627                 else
1628                         if test ! -r $x_includes/X11/Intrinsic.h; then
1629                                 not_really_there="yes"
1630                         fi
1631                 fi
1632         fi
1633         if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
1634                 echo checking for X11 header files
1635                 XINCLUDES="# no special path needed"
1636                 cat > conftest.$ac_ext <<EOF
1637 #line 1638 "configure"
1638 #include "confdefs.h"
1639 #include <X11/Intrinsic.h>
1640 EOF
1641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1642 { (eval echo configure:1643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1643 ac_err=`grep -v '^ *+' conftest.out`
1644 if test -z "$ac_err"; then
1645   :
1646 else
1647   echo "$ac_err" >&5
1648   echo "configure: failed program was:" >&5
1649   cat conftest.$ac_ext >&5
1650   rm -rf conftest*
1651   XINCLUDES="nope"
1652 fi
1653 rm -f conftest*
1654                 if test "$XINCLUDES" = nope; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 /usr/openwin/include /usr/X11/include /usr/sww/include"
1655                         for i in $dirs ; do
1656                                 if test -r $i/X11/Intrinsic.h; then
1657                                         XINCLUDES=" -I$i"
1658                                 fi
1659                         done
1660                 fi
1661         else
1662                 if test "$x_includes" != ""; then
1663                         XINCLUDES=-I$x_includes
1664                 else
1665                         XINCLUDES="# no special path needed"
1666                 fi
1667         fi
1668         if test "$XINCLUDES" = nope; then
1669                 echo "Warning:  couldn't find any X11 include files."
1670                 XINCLUDES="# no include files found"
1671         fi
1672         if test "$no_x" = yes; then
1673                 XLIBSW=nope
1674                 if test "$XLIBSW" = nope; then
1675                         dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
1676                 for i in $dirs ; do
1677                         if test -r $i/libX11.a; then
1678                                 XLIBSW="-L$i -lX11"
1679                         fi
1680                 done
1681         fi
1682         else
1683                 if test "$x_libraries" = ""; then
1684                         XLIBSW=-lX11
1685                 else
1686                         XLIBSW="-L$x_libraries -lX11"
1687                 fi
1688         fi
1689         if test "$XLIBSW" = nope ; then
1690                 echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
1691 echo "configure:1692: checking for XCreateWindow in -lXwindow" >&5
1692 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
1693 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1694   echo $ac_n "(cached) $ac_c" 1>&6
1695 else
1696   ac_save_LIBS="$LIBS"
1697 LIBS="-lXwindow  $LIBS"
1698 cat > conftest.$ac_ext <<EOF
1699 #line 1700 "configure"
1700 #include "confdefs.h"
1701 /* Override any gcc2 internal prototype to avoid an error.  */
1702 /* We use char because int might match the return type of a gcc2
1703     builtin and then its argument prototype would still apply.  */
1704 char XCreateWindow();
1705
1706 int main() {
1707 XCreateWindow()
1708 ; return 0; }
1709 EOF
1710 if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1711   rm -rf conftest*
1712   eval "ac_cv_lib_$ac_lib_var=yes"
1713 else
1714   echo "configure: failed program was:" >&5
1715   cat conftest.$ac_ext >&5
1716   rm -rf conftest*
1717   eval "ac_cv_lib_$ac_lib_var=no"
1718 fi
1719 rm -f conftest*
1720 LIBS="$ac_save_LIBS"
1721
1722 fi
1723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1724   echo "$ac_t""yes" 1>&6
1725   XLIBSW=-lXwindow
1726 else
1727   echo "$ac_t""no" 1>&6
1728 fi
1729
1730         fi
1731         if test "$XLIBSW" = nope ; then
1732                 echo "Warning:  couldn't find the X11 library archive.  Using -lX11."
1733                 XLIBSW=-lX11
1734         fi
1735         TKINC=$XINCLUDES
1736         TKLIB="${TKLIB} ${XLIBSW} ${TCLLIB}"
1737         IRCLIENT_SHELL=ir-tk
1738 fi
1739 trap '' 1 2 15
1740 cat > confcache <<\EOF
1741 # This file is a shell script that caches the results of configure
1742 # tests run on this system so they can be shared between configure
1743 # scripts and configure runs.  It is not useful on other systems.
1744 # If it contains results you don't want to keep, you may remove or edit it.
1745 #
1746 # By default, configure uses ./config.cache as the cache file,
1747 # creating it if it does not exist already.  You can give configure
1748 # the --cache-file=FILE option to use a different cache file; that is
1749 # what configure does when it calls configure scripts in
1750 # subdirectories, so they share the cache.
1751 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1752 # config.status only pays attention to the cache file if you give it the
1753 # --recheck option to rerun configure.
1754 #
1755 EOF
1756 # The following way of writing the cache mishandles newlines in values,
1757 # but we know of no workaround that is simple, portable, and efficient.
1758 # So, don't put newlines in cache variables' values.
1759 # Ultrix sh set writes to stderr and can't be redirected directly,
1760 # and sets the high bit in the cache file unless we assign to the vars.
1761 (set) 2>&1 |
1762   case `(ac_space=' '; set) 2>&1` in
1763   *ac_space=\ *)
1764     # `set' does not quote correctly, so add quotes (double-quote substitution
1765     # turns \\\\ into \\, and sed turns \\ into \).
1766     sed -n \
1767       -e "s/'/'\\\\''/g" \
1768       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1769     ;;
1770   *)
1771     # `set' quotes correctly as required by POSIX, so do not add quotes.
1772     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1773     ;;
1774   esac >> confcache
1775 if cmp -s $cache_file confcache; then
1776   :
1777 else
1778   if test -w $cache_file; then
1779     echo "updating cache $cache_file"
1780     cat confcache > $cache_file
1781   else
1782     echo "not updating unwritable cache $cache_file"
1783   fi
1784 fi
1785 rm -f confcache
1786
1787 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1788
1789 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1790 # Let make expand exec_prefix.
1791 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1792
1793 # Any assignment to VPATH causes Sun make to only execute
1794 # the first set of double-colon rules, so remove it if not needed.
1795 # If there is a colon in the path, we need to keep it.
1796 if test "x$srcdir" = x.; then
1797   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1798 fi
1799
1800 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1801
1802 # Transform confdefs.h into DEFS.
1803 # Protect against shell expansion while executing Makefile rules.
1804 # Protect against Makefile macro expansion.
1805 cat > conftest.defs <<\EOF
1806 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1807 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1808 s%\[%\\&%g
1809 s%\]%\\&%g
1810 s%\$%$$%g
1811 EOF
1812 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1813 rm -f conftest.defs
1814
1815
1816 # Without the "./", some shells look in PATH for config.status.
1817 : ${CONFIG_STATUS=./config.status}
1818
1819 echo creating $CONFIG_STATUS
1820 rm -f $CONFIG_STATUS
1821 cat > $CONFIG_STATUS <<EOF
1822 #! /bin/sh
1823 # Generated automatically by configure.
1824 # Run this file to recreate the current configuration.
1825 # This directory was configured as follows,
1826 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1827 #
1828 # $0 $ac_configure_args
1829 #
1830 # Compiler output produced by configure, useful for debugging
1831 # configure, is in ./config.log if it exists.
1832
1833 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1834 for ac_option
1835 do
1836   case "\$ac_option" in
1837   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1838     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1839     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1840   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1841     echo "$CONFIG_STATUS generated by autoconf version 2.12"
1842     exit 0 ;;
1843   -help | --help | --hel | --he | --h)
1844     echo "\$ac_cs_usage"; exit 0 ;;
1845   *) echo "\$ac_cs_usage"; exit 1 ;;
1846   esac
1847 done
1848
1849 ac_given_srcdir=$srcdir
1850 ac_given_INSTALL="$INSTALL"
1851
1852 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1853 EOF
1854 cat >> $CONFIG_STATUS <<EOF
1855
1856 # Protect against being on the right side of a sed subst in config.status.
1857 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1858  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1859 $ac_vpsub
1860 $extrasub
1861 s%@CFLAGS@%$CFLAGS%g
1862 s%@CPPFLAGS@%$CPPFLAGS%g
1863 s%@CXXFLAGS@%$CXXFLAGS%g
1864 s%@DEFS@%$DEFS%g
1865 s%@LDFLAGS@%$LDFLAGS%g
1866 s%@LIBS@%$LIBS%g
1867 s%@exec_prefix@%$exec_prefix%g
1868 s%@prefix@%$prefix%g
1869 s%@program_transform_name@%$program_transform_name%g
1870 s%@bindir@%$bindir%g
1871 s%@sbindir@%$sbindir%g
1872 s%@libexecdir@%$libexecdir%g
1873 s%@datadir@%$datadir%g
1874 s%@sysconfdir@%$sysconfdir%g
1875 s%@sharedstatedir@%$sharedstatedir%g
1876 s%@localstatedir@%$localstatedir%g
1877 s%@libdir@%$libdir%g
1878 s%@includedir@%$includedir%g
1879 s%@oldincludedir@%$oldincludedir%g
1880 s%@infodir@%$infodir%g
1881 s%@mandir@%$mandir%g
1882 s%@CC@%$CC%g
1883 s%@TCLLIB@%$TCLLIB%g
1884 s%@TKLIB@%$TKLIB%g
1885 s%@TCLINC@%$TCLINC%g
1886 s%@TKINC@%$TKINC%g
1887 s%@YAZDIR@%$YAZDIR%g
1888 s%@MOSI@%$MOSI%g
1889 s%@MOSIDIR@%$MOSIDIR%g
1890 s%@MOSILIB@%$MOSILIB%g
1891 s%@MOSIINC@%$MOSIINC%g
1892 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
1893 s%@SHLIB_LD@%$SHLIB_LD%g
1894 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
1895 s%@SHLIB_VERSION@%$SHLIB_VERSION%g
1896 s%@SHLIB_IRTCL@%$SHLIB_IRTCL%g
1897 s%@ALL_SPEC@%$ALL_SPEC%g
1898 s%@IRCLIENT_SHELL@%$IRCLIENT_SHELL%g
1899 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1900 s%@INSTALL_DATA@%$INSTALL_DATA%g
1901 s%@TCLSH@%$TCLSH%g
1902 s%@TCLSH8.1@%$TCLSH8.1%g
1903 s%@TCLSH8.0@%$TCLSH8.0%g
1904 s%@TCLSH7.6@%$TCLSH7.6%g
1905 s%@TCLSH7.5@%$TCLSH7.5%g
1906 s%@CPP@%$CPP%g
1907 s%@RANLIB@%$RANLIB%g
1908
1909 CEOF
1910 EOF
1911
1912 cat >> $CONFIG_STATUS <<\EOF
1913
1914 # Split the substitutions into bite-sized pieces for seds with
1915 # small command number limits, like on Digital OSF/1 and HP-UX.
1916 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1917 ac_file=1 # Number of current file.
1918 ac_beg=1 # First line for current file.
1919 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1920 ac_more_lines=:
1921 ac_sed_cmds=""
1922 while $ac_more_lines; do
1923   if test $ac_beg -gt 1; then
1924     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1925   else
1926     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1927   fi
1928   if test ! -s conftest.s$ac_file; then
1929     ac_more_lines=false
1930     rm -f conftest.s$ac_file
1931   else
1932     if test -z "$ac_sed_cmds"; then
1933       ac_sed_cmds="sed -f conftest.s$ac_file"
1934     else
1935       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1936     fi
1937     ac_file=`expr $ac_file + 1`
1938     ac_beg=$ac_end
1939     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1940   fi
1941 done
1942 if test -z "$ac_sed_cmds"; then
1943   ac_sed_cmds=cat
1944 fi
1945 EOF
1946
1947 cat >> $CONFIG_STATUS <<EOF
1948
1949 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1950 EOF
1951 cat >> $CONFIG_STATUS <<\EOF
1952 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1953   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1954   case "$ac_file" in
1955   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1956        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1957   *) ac_file_in="${ac_file}.in" ;;
1958   esac
1959
1960   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1961
1962   # Remove last slash and all that follows it.  Not all systems have dirname.
1963   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1964   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1965     # The file is in a subdirectory.
1966     test ! -d "$ac_dir" && mkdir "$ac_dir"
1967     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1968     # A "../" for each directory in $ac_dir_suffix.
1969     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1970   else
1971     ac_dir_suffix= ac_dots=
1972   fi
1973
1974   case "$ac_given_srcdir" in
1975   .)  srcdir=.
1976       if test -z "$ac_dots"; then top_srcdir=.
1977       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1978   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1979   *) # Relative path.
1980     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1981     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1982   esac
1983
1984   case "$ac_given_INSTALL" in
1985   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1986   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1987   esac
1988
1989   echo creating "$ac_file"
1990   rm -f "$ac_file"
1991   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1992   case "$ac_file" in
1993   *Makefile*) ac_comsub="1i\\
1994 # $configure_input" ;;
1995   *) ac_comsub= ;;
1996   esac
1997
1998   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1999   sed -e "$ac_comsub
2000 s%@configure_input@%$configure_input%g
2001 s%@srcdir@%$srcdir%g
2002 s%@top_srcdir@%$top_srcdir%g
2003 s%@INSTALL@%$INSTALL%g
2004 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2005 fi; done
2006 rm -f conftest.s*
2007
2008 EOF
2009 cat >> $CONFIG_STATUS <<EOF
2010
2011 EOF
2012 cat >> $CONFIG_STATUS <<\EOF
2013
2014 exit 0
2015 EOF
2016 chmod +x $CONFIG_STATUS
2017 rm -fr confdefs* $ac_clean_files
2018 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2019