Updated doc.
[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.0", so it can be a program name with args.
666 set dummy tclsh8.0; 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.0'+set}'`\" = set"; then
670   echo $ac_n "(cached) $ac_c" 1>&6
671 else
672   case "$TCLSH8.0" in
673   /*)
674   ac_cv_path_TCLSH8.0="$TCLSH8.0" # 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.0="$ac_dir/$ac_word"
682       break
683     fi
684   done
685   IFS="$ac_save_ifs"
686   ;;
687 esac
688 fi
689 TCLSH8.0="$ac_cv_path_TCLSH8.0"
690 if test -n "$TCLSH8.0"; then
691   echo "$ac_t""$TCLSH8.0" 1>&6
692 else
693   echo "$ac_t""no" 1>&6
694 fi
695
696   if test -n "$ac_cv_path_TCLSH8.0"; then
697     prefix=`echo $ac_cv_path_TCLSH8.0|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 "tclsh7.6", so it can be a program name with args.
706 set dummy tclsh7.6; 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_TCLSH7.6'+set}'`\" = set"; then
710   echo $ac_n "(cached) $ac_c" 1>&6
711 else
712   case "$TCLSH7.6" in
713   /*)
714   ac_cv_path_TCLSH7.6="$TCLSH7.6" # 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_TCLSH7.6="$ac_dir/$ac_word"
722       break
723     fi
724   done
725   IFS="$ac_save_ifs"
726   ;;
727 esac
728 fi
729 TCLSH7.6="$ac_cv_path_TCLSH7.6"
730 if test -n "$TCLSH7.6"; then
731   echo "$ac_t""$TCLSH7.6" 1>&6
732 else
733   echo "$ac_t""no" 1>&6
734 fi
735
736   if test -n "$ac_cv_path_TCLSH7.6"; then
737     prefix=`echo $ac_cv_path_TCLSH7.6|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
738   fi
739 fi
740
741 fi
742 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
743 echo "configure:744: checking how to run the C preprocessor" >&5
744 # On Suns, sometimes $CPP names a directory.
745 if test -n "$CPP" && test -d "$CPP"; then
746   CPP=
747 fi
748 if test -z "$CPP"; then
749 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
750   echo $ac_n "(cached) $ac_c" 1>&6
751 else
752     # This must be in double quotes, not single quotes, because CPP may get
753   # substituted into the Makefile and "${CC-cc}" will confuse make.
754   CPP="${CC-cc} -E"
755   # On the NeXT, cc -E runs the code through the compiler's parser,
756   # not just through cpp.
757   cat > conftest.$ac_ext <<EOF
758 #line 759 "configure"
759 #include "confdefs.h"
760 #include <assert.h>
761 Syntax Error
762 EOF
763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
764 { (eval echo configure:765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
765 ac_err=`grep -v '^ *+' conftest.out`
766 if test -z "$ac_err"; then
767   :
768 else
769   echo "$ac_err" >&5
770   echo "configure: failed program was:" >&5
771   cat conftest.$ac_ext >&5
772   rm -rf conftest*
773   CPP="${CC-cc} -E -traditional-cpp"
774   cat > conftest.$ac_ext <<EOF
775 #line 776 "configure"
776 #include "confdefs.h"
777 #include <assert.h>
778 Syntax Error
779 EOF
780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
781 { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
782 ac_err=`grep -v '^ *+' conftest.out`
783 if test -z "$ac_err"; then
784   :
785 else
786   echo "$ac_err" >&5
787   echo "configure: failed program was:" >&5
788   cat conftest.$ac_ext >&5
789   rm -rf conftest*
790   CPP=/lib/cpp
791 fi
792 rm -f conftest*
793 fi
794 rm -f conftest*
795   ac_cv_prog_CPP="$CPP"
796 fi
797   CPP="$ac_cv_prog_CPP"
798 else
799   ac_cv_prog_CPP="$CPP"
800 fi
801 echo "$ac_t""$CPP" 1>&6
802
803 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
804 echo "configure:805: checking for ANSI C header files" >&5
805 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
806   echo $ac_n "(cached) $ac_c" 1>&6
807 else
808   cat > conftest.$ac_ext <<EOF
809 #line 810 "configure"
810 #include "confdefs.h"
811 #include <stdlib.h>
812 #include <stdarg.h>
813 #include <string.h>
814 #include <float.h>
815 EOF
816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
817 { (eval echo configure:818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
818 ac_err=`grep -v '^ *+' conftest.out`
819 if test -z "$ac_err"; then
820   rm -rf conftest*
821   ac_cv_header_stdc=yes
822 else
823   echo "$ac_err" >&5
824   echo "configure: failed program was:" >&5
825   cat conftest.$ac_ext >&5
826   rm -rf conftest*
827   ac_cv_header_stdc=no
828 fi
829 rm -f conftest*
830
831 if test $ac_cv_header_stdc = yes; then
832   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
833 cat > conftest.$ac_ext <<EOF
834 #line 835 "configure"
835 #include "confdefs.h"
836 #include <string.h>
837 EOF
838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
839   egrep "memchr" >/dev/null 2>&1; then
840   :
841 else
842   rm -rf conftest*
843   ac_cv_header_stdc=no
844 fi
845 rm -f conftest*
846
847 fi
848
849 if test $ac_cv_header_stdc = yes; then
850   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
851 cat > conftest.$ac_ext <<EOF
852 #line 853 "configure"
853 #include "confdefs.h"
854 #include <stdlib.h>
855 EOF
856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
857   egrep "free" >/dev/null 2>&1; then
858   :
859 else
860   rm -rf conftest*
861   ac_cv_header_stdc=no
862 fi
863 rm -f conftest*
864
865 fi
866
867 if test $ac_cv_header_stdc = yes; then
868   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
869 if test "$cross_compiling" = yes; then
870   :
871 else
872   cat > conftest.$ac_ext <<EOF
873 #line 874 "configure"
874 #include "confdefs.h"
875 #include <ctype.h>
876 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
877 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
878 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
879 int main () { int i; for (i = 0; i < 256; i++)
880 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
881 exit (0); }
882
883 EOF
884 if { (eval echo configure:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
885 then
886   :
887 else
888   echo "configure: failed program was:" >&5
889   cat conftest.$ac_ext >&5
890   rm -fr conftest*
891   ac_cv_header_stdc=no
892 fi
893 rm -fr conftest*
894 fi
895
896 fi
897 fi
898
899 echo "$ac_t""$ac_cv_header_stdc" 1>&6
900 if test $ac_cv_header_stdc = yes; then
901   cat >> confdefs.h <<\EOF
902 #define STDC_HEADERS 1
903 EOF
904
905 fi
906
907 if test "$ac_cv_header_stdc" = no; then
908         echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2
909 fi
910 echo $ac_n "checking for YAZ directory""... $ac_c" 1>&6
911 echo "configure:912: checking for YAZ directory" >&5
912 # Check whether --with-yazdir or --without-yazdir was given.
913 if test "${with_yazdir+set}" = set; then
914   withval="$with_yazdir"
915   YAZDIR=$withval
916 fi
917
918 if test "$YAZDIR" = "yes"; then
919         YAZDIR="../yaz-1.2"
920 elif test "$YAZDIR" = ""; then
921         YAZDIR=../yaz
922         for i in ../yaz* ../yaz; do
923             if test -d $i; then
924                 YAZDIR=$i
925             fi
926         done
927 fi
928 if test ! -d $YAZDIR; then
929         echo "configure: warning: YAZ directory ${YAZDIR} doesn't exist" 1>&2
930 else
931         echo "$ac_t""$YAZDIR" 1>&6
932 fi
933 echo $ac_n "checking for MOSI""... $ac_c" 1>&6
934 echo "configure:935: checking for MOSI" >&5
935 # Check whether --with-mosidir or --without-mosidir was given.
936 if test "${with_mosidir+set}" = set; then
937   withval="$with_mosidir"
938   MOSIDIR=$withval
939 fi
940
941 if test "$MOSIDIR" = "yes"; then
942         MOSIDIR="../xtimosi/src"
943 elif test "$MOSIDIR" = ""; then
944         MOSIDIR="../xtimosi/src"
945 fi
946 if test -r ${YAZDIR}/lib/librfc.a; then
947         MOSI=1
948         MOSIDIR=$MOSIDIR
949         MOSILIB='$(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
950         MOSIINC='-I$(MOSIDIR)'
951         MOSITELL=yes
952 else
953         MOSI=0
954         MOSIDIR=$MOSIDIR
955         MOSILIB='# $(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
956         MOSIINC='# -I$(MOSIDIR)'
957         MOSITELL=no
958 fi
959 echo "$ac_t""$MOSITELL" 1>&6
960 if test "x$prefix" = xNONE; then
961         tryprefix=/usr/local
962 else
963         tryprefix=${prefix}
964 fi
965 if test -r ${tryprefix}/lib/tclConfig.sh; then
966         echo $ac_n "checking for Tcl""... $ac_c" 1>&6
967 echo "configure:968: checking for Tcl" >&5
968         source ${tryprefix}/lib/tclConfig.sh
969         TCLLIB="${TCL_LIB_SPEC} ${TCL_LIBS}"
970         TCLINC=-I${TCL_PREFIX}/include
971         RANLIB=$TCL_RANLIB
972         SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
973         SHLIB_LD=$TCL_SHLIB_LD
974         SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
975         SHLIB_VERSION=$TCL_SHLIB_VERSION
976         SHLIB_IRTCL=irtcl${TCL_SHLIB_SUFFIX}
977         ALL_SPEC="irtcl${TCL_SHLIB_SUFFIX} libirtcl.a"
978         echo "$ac_t""$TCL_VERSION" 1>&6
979 else
980         SHLIB_CFLAGS=""
981         SHLIB_LD="shared-linker"
982         SHLIB_SUFFIX=""
983         SHLIB_VERSION=""
984         SHLIB_IRTCL="irtcl-shared"
985         # Extract the first word of "ranlib", so it can be a program name with args.
986 set dummy ranlib; ac_word=$2
987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
988 echo "configure:989: checking for $ac_word" >&5
989 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
990   echo $ac_n "(cached) $ac_c" 1>&6
991 else
992   if test -n "$RANLIB"; then
993   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
994 else
995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
996   for ac_dir in $PATH; do
997     test -z "$ac_dir" && ac_dir=.
998     if test -f $ac_dir/$ac_word; then
999       ac_cv_prog_RANLIB="ranlib"
1000       break
1001     fi
1002   done
1003   IFS="$ac_save_ifs"
1004   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1005 fi
1006 fi
1007 RANLIB="$ac_cv_prog_RANLIB"
1008 if test -n "$RANLIB"; then
1009   echo "$ac_t""$RANLIB" 1>&6
1010 else
1011   echo "$ac_t""no" 1>&6
1012 fi
1013
1014         checkBoth=0
1015         echo $ac_n "checking for connect""... $ac_c" 1>&6
1016 echo "configure:1017: checking for connect" >&5
1017 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1018   echo $ac_n "(cached) $ac_c" 1>&6
1019 else
1020   cat > conftest.$ac_ext <<EOF
1021 #line 1022 "configure"
1022 #include "confdefs.h"
1023 /* System header to define __stub macros and hopefully few prototypes,
1024     which can conflict with char connect(); below.  */
1025 #include <assert.h>
1026 /* Override any gcc2 internal prototype to avoid an error.  */
1027 /* We use char because int might match the return type of a gcc2
1028     builtin and then its argument prototype would still apply.  */
1029 char connect();
1030
1031 int main() {
1032
1033 /* The GNU C library defines this for functions which it implements
1034     to always fail with ENOSYS.  Some functions are actually named
1035     something starting with __ and the normal name is an alias.  */
1036 #if defined (__stub_connect) || defined (__stub___connect)
1037 choke me
1038 #else
1039 connect();
1040 #endif
1041
1042 ; return 0; }
1043 EOF
1044 if { (eval echo configure:1045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1045   rm -rf conftest*
1046   eval "ac_cv_func_connect=yes"
1047 else
1048   echo "configure: failed program was:" >&5
1049   cat conftest.$ac_ext >&5
1050   rm -rf conftest*
1051   eval "ac_cv_func_connect=no"
1052 fi
1053 rm -f conftest*
1054 fi
1055
1056 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1057   echo "$ac_t""yes" 1>&6
1058   tk_checkSocket=0
1059 else
1060   echo "$ac_t""no" 1>&6
1061 tk_checkSocket=1
1062 fi
1063
1064         if test "$tk_checkSocket" = 1; then
1065                 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1066 echo "configure:1067: checking for main in -lsocket" >&5
1067 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1069   echo $ac_n "(cached) $ac_c" 1>&6
1070 else
1071   ac_save_LIBS="$LIBS"
1072 LIBS="-lsocket  $LIBS"
1073 cat > conftest.$ac_ext <<EOF
1074 #line 1075 "configure"
1075 #include "confdefs.h"
1076
1077 int main() {
1078 main()
1079 ; return 0; }
1080 EOF
1081 if { (eval echo configure:1082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1082   rm -rf conftest*
1083   eval "ac_cv_lib_$ac_lib_var=yes"
1084 else
1085   echo "configure: failed program was:" >&5
1086   cat conftest.$ac_ext >&5
1087   rm -rf conftest*
1088   eval "ac_cv_lib_$ac_lib_var=no"
1089 fi
1090 rm -f conftest*
1091 LIBS="$ac_save_LIBS"
1092
1093 fi
1094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1095   echo "$ac_t""yes" 1>&6
1096   LIBS="$LIBS -lsocket"
1097 else
1098   echo "$ac_t""no" 1>&6
1099 checkBoth=1
1100 fi
1101
1102         fi
1103         if test "$checkBoth" = 1; then
1104                 tk_oldLibs=$LIBS
1105                 LIBS="$LIBS -lsocket -lnsl"
1106                 echo $ac_n "checking for accept""... $ac_c" 1>&6
1107 echo "configure:1108: checking for accept" >&5
1108 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
1109   echo $ac_n "(cached) $ac_c" 1>&6
1110 else
1111   cat > conftest.$ac_ext <<EOF
1112 #line 1113 "configure"
1113 #include "confdefs.h"
1114 /* System header to define __stub macros and hopefully few prototypes,
1115     which can conflict with char accept(); below.  */
1116 #include <assert.h>
1117 /* Override any gcc2 internal prototype to avoid an error.  */
1118 /* We use char because int might match the return type of a gcc2
1119     builtin and then its argument prototype would still apply.  */
1120 char accept();
1121
1122 int main() {
1123
1124 /* The GNU C library defines this for functions which it implements
1125     to always fail with ENOSYS.  Some functions are actually named
1126     something starting with __ and the normal name is an alias.  */
1127 #if defined (__stub_accept) || defined (__stub___accept)
1128 choke me
1129 #else
1130 accept();
1131 #endif
1132
1133 ; return 0; }
1134 EOF
1135 if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1136   rm -rf conftest*
1137   eval "ac_cv_func_accept=yes"
1138 else
1139   echo "configure: failed program was:" >&5
1140   cat conftest.$ac_ext >&5
1141   rm -rf conftest*
1142   eval "ac_cv_func_accept=no"
1143 fi
1144 rm -f conftest*
1145 fi
1146
1147 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
1148   echo "$ac_t""yes" 1>&6
1149   :
1150 else
1151   echo "$ac_t""no" 1>&6
1152 LIBS=$tk_oldLibs
1153 fi
1154
1155         fi
1156         echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1157 echo "configure:1158: checking for gethostbyname" >&5
1158 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1159   echo $ac_n "(cached) $ac_c" 1>&6
1160 else
1161   cat > conftest.$ac_ext <<EOF
1162 #line 1163 "configure"
1163 #include "confdefs.h"
1164 /* System header to define __stub macros and hopefully few prototypes,
1165     which can conflict with char gethostbyname(); below.  */
1166 #include <assert.h>
1167 /* Override any gcc2 internal prototype to avoid an error.  */
1168 /* We use char because int might match the return type of a gcc2
1169     builtin and then its argument prototype would still apply.  */
1170 char gethostbyname();
1171
1172 int main() {
1173
1174 /* The GNU C library defines this for functions which it implements
1175     to always fail with ENOSYS.  Some functions are actually named
1176     something starting with __ and the normal name is an alias.  */
1177 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1178 choke me
1179 #else
1180 gethostbyname();
1181 #endif
1182
1183 ; return 0; }
1184 EOF
1185 if { (eval echo configure:1186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1186   rm -rf conftest*
1187   eval "ac_cv_func_gethostbyname=yes"
1188 else
1189   echo "configure: failed program was:" >&5
1190   cat conftest.$ac_ext >&5
1191   rm -rf conftest*
1192   eval "ac_cv_func_gethostbyname=no"
1193 fi
1194 rm -f conftest*
1195 fi
1196
1197 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1198   echo "$ac_t""yes" 1>&6
1199   :
1200 else
1201   echo "$ac_t""no" 1>&6
1202 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1203 echo "configure:1204: checking for main in -lnsl" >&5
1204 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1205 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1206   echo $ac_n "(cached) $ac_c" 1>&6
1207 else
1208   ac_save_LIBS="$LIBS"
1209 LIBS="-lnsl  $LIBS"
1210 cat > conftest.$ac_ext <<EOF
1211 #line 1212 "configure"
1212 #include "confdefs.h"
1213
1214 int main() {
1215 main()
1216 ; return 0; }
1217 EOF
1218 if { (eval echo configure:1219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1219   rm -rf conftest*
1220   eval "ac_cv_lib_$ac_lib_var=yes"
1221 else
1222   echo "configure: failed program was:" >&5
1223   cat conftest.$ac_ext >&5
1224   rm -rf conftest*
1225   eval "ac_cv_lib_$ac_lib_var=no"
1226 fi
1227 rm -f conftest*
1228 LIBS="$ac_save_LIBS"
1229
1230 fi
1231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1232   echo "$ac_t""yes" 1>&6
1233   LIBS="$LIBS -lnsl"
1234 else
1235   echo "$ac_t""no" 1>&6
1236 fi
1237
1238 fi
1239
1240         echo $ac_n "checking for Tcl""... $ac_c" 1>&6
1241 echo "configure:1242: checking for Tcl" >&5
1242         TCL_VERSION=nope
1243         for i in "" 7.4 7.5 7.6 8.0; do
1244                 if test -r ${tryprefix}/lib/libtcl${i}.a; then
1245                         TCL_VERSION=$i
1246                 fi
1247         done
1248         if test "$TCL_VERSION" = nope; then
1249                 echo "configure: warning: Didn't find Tcl" 1>&2
1250                 TCL_LIB_SPEC=-ltcl
1251                 TCLINC=" # -I.. Tcl/Tk include path"
1252         else
1253                 if test "$TCL_VERSION" = ""; then
1254                         echo "$ac_t""7.3" 1>&6
1255                 else
1256                         echo "$ac_t""$TCL_VERSION" 1>&6
1257                 fi
1258                 TCL_LIB_SPEC=${tryprefix}/lib/libtcl${TCL_VERSION}.a
1259                 TCLINC=-I${tryprefix}/include
1260         fi
1261         TCLLIB="${TCL_LIB_SPEC} ${LIBS} -lm"
1262         ALL_SPEC="ir-tcl ir-tk"
1263 fi
1264 if test -r ${tryprefix}/lib/tkConfig.sh; then
1265         echo $ac_n "checking for Tk""... $ac_c" 1>&6
1266 echo "configure:1267: checking for Tk" >&5
1267         source ${tryprefix}/lib/tkConfig.sh
1268         echo "$ac_t""$TK_VERSION" 1>&6
1269         TKINC=${TK_XINCLUDES}
1270         TKLIB="${TK_LIB_SPEC} ${TCL_LIB_SPEC} ${TK_LIBS}"
1271         IRCLIENT_SHELL=wish${TK_VERSION}
1272 else
1273         echo $ac_n "checking for Tk""... $ac_c" 1>&6
1274 echo "configure:1275: checking for Tk" >&5
1275         TK_VERSION=nope
1276         for i in "" 4.0 4.1 4.2 8.0; do
1277                 if test -r ${tryprefix}/lib/libtk${i}.a; then
1278                         TK_VERSION=$i
1279                 fi
1280         done
1281         if test "$TK_VERSION" = nope; then
1282                 echo "configure: warning: Didn't find Tk" 1>&2
1283                 TKLIB=-ltk
1284         else
1285                 TKLIB=${tryprefix}/lib/libtk${TK_VERSION}.a
1286                 if test "$TK_VERSION" = ""; then
1287                         echo "$ac_t""3.x" 1>&6
1288                 else
1289                         echo "$ac_t""$TK_VERSION" 1>&6
1290                 fi
1291         fi
1292         # If we find X, set shell vars x_includes and x_libraries to the
1293 # paths, otherwise set no_x=yes.
1294 # Uses ac_ vars as temps to allow command line to override cache and checks.
1295 # --without-x overrides everything else, but does not touch the cache.
1296 echo $ac_n "checking for X""... $ac_c" 1>&6
1297 echo "configure:1298: checking for X" >&5
1298
1299 # Check whether --with-x or --without-x was given.
1300 if test "${with_x+set}" = set; then
1301   withval="$with_x"
1302   :
1303 fi
1304
1305 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1306 if test "x$with_x" = xno; then
1307   # The user explicitly disabled X.
1308   have_x=disabled
1309 else
1310   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1311     # Both variables are already set.
1312     have_x=yes
1313   else
1314 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1315   echo $ac_n "(cached) $ac_c" 1>&6
1316 else
1317   # One or both of the vars are not set, and there is no cached value.
1318 ac_x_includes=NO ac_x_libraries=NO
1319 rm -fr conftestdir
1320 if mkdir conftestdir; then
1321   cd conftestdir
1322   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1323   cat > Imakefile <<'EOF'
1324 acfindx:
1325         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1326 EOF
1327   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1328     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1329     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1330     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1331     for ac_extension in a so sl; do
1332       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1333         test -f $ac_im_libdir/libX11.$ac_extension; then
1334         ac_im_usrlibdir=$ac_im_libdir; break
1335       fi
1336     done
1337     # Screen out bogus values from the imake configuration.  They are
1338     # bogus both because they are the default anyway, and because
1339     # using them would break gcc on systems where it needs fixed includes.
1340     case "$ac_im_incroot" in
1341         /usr/include) ;;
1342         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1343     esac
1344     case "$ac_im_usrlibdir" in
1345         /usr/lib | /lib) ;;
1346         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1347     esac
1348   fi
1349   cd ..
1350   rm -fr conftestdir
1351 fi
1352
1353 if test "$ac_x_includes" = NO; then
1354   # Guess where to find include files, by looking for this one X11 .h file.
1355   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1356
1357   # First, try using that file with no special directory specified.
1358 cat > conftest.$ac_ext <<EOF
1359 #line 1360 "configure"
1360 #include "confdefs.h"
1361 #include <$x_direct_test_include>
1362 EOF
1363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1364 { (eval echo configure:1365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1365 ac_err=`grep -v '^ *+' conftest.out`
1366 if test -z "$ac_err"; then
1367   rm -rf conftest*
1368   # We can compile using X headers with no special include directory.
1369 ac_x_includes=
1370 else
1371   echo "$ac_err" >&5
1372   echo "configure: failed program was:" >&5
1373   cat conftest.$ac_ext >&5
1374   rm -rf conftest*
1375   # Look for the header file in a standard set of common directories.
1376 # Check X11 before X11Rn because it is often a symlink to the current release.
1377   for ac_dir in               \
1378     /usr/X11/include          \
1379     /usr/X11R6/include        \
1380     /usr/X11R5/include        \
1381     /usr/X11R4/include        \
1382                               \
1383     /usr/include/X11          \
1384     /usr/include/X11R6        \
1385     /usr/include/X11R5        \
1386     /usr/include/X11R4        \
1387                               \
1388     /usr/local/X11/include    \
1389     /usr/local/X11R6/include  \
1390     /usr/local/X11R5/include  \
1391     /usr/local/X11R4/include  \
1392                               \
1393     /usr/local/include/X11    \
1394     /usr/local/include/X11R6  \
1395     /usr/local/include/X11R5  \
1396     /usr/local/include/X11R4  \
1397                               \
1398     /usr/X386/include         \
1399     /usr/x386/include         \
1400     /usr/XFree86/include/X11  \
1401                               \
1402     /usr/include              \
1403     /usr/local/include        \
1404     /usr/unsupported/include  \
1405     /usr/athena/include       \
1406     /usr/local/x11r5/include  \
1407     /usr/lpp/Xamples/include  \
1408                               \
1409     /usr/openwin/include      \
1410     /usr/openwin/share/include \
1411     ; \
1412   do
1413     if test -r "$ac_dir/$x_direct_test_include"; then
1414       ac_x_includes=$ac_dir
1415       break
1416     fi
1417   done
1418 fi
1419 rm -f conftest*
1420 fi # $ac_x_includes = NO
1421
1422 if test "$ac_x_libraries" = NO; then
1423   # Check for the libraries.
1424
1425   test -z "$x_direct_test_library" && x_direct_test_library=Xt
1426   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1427
1428   # See if we find them without any special options.
1429   # Don't add to $LIBS permanently.
1430   ac_save_LIBS="$LIBS"
1431   LIBS="-l$x_direct_test_library $LIBS"
1432 cat > conftest.$ac_ext <<EOF
1433 #line 1434 "configure"
1434 #include "confdefs.h"
1435
1436 int main() {
1437 ${x_direct_test_function}()
1438 ; return 0; }
1439 EOF
1440 if { (eval echo configure:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1441   rm -rf conftest*
1442   LIBS="$ac_save_LIBS"
1443 # We can link X programs with no special library path.
1444 ac_x_libraries=
1445 else
1446   echo "configure: failed program was:" >&5
1447   cat conftest.$ac_ext >&5
1448   rm -rf conftest*
1449   LIBS="$ac_save_LIBS"
1450 # First see if replacing the include by lib works.
1451 # Check X11 before X11Rn because it is often a symlink to the current release.
1452 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1453     /usr/X11/lib          \
1454     /usr/X11R6/lib        \
1455     /usr/X11R5/lib        \
1456     /usr/X11R4/lib        \
1457                           \
1458     /usr/lib/X11          \
1459     /usr/lib/X11R6        \
1460     /usr/lib/X11R5        \
1461     /usr/lib/X11R4        \
1462                           \
1463     /usr/local/X11/lib    \
1464     /usr/local/X11R6/lib  \
1465     /usr/local/X11R5/lib  \
1466     /usr/local/X11R4/lib  \
1467                           \
1468     /usr/local/lib/X11    \
1469     /usr/local/lib/X11R6  \
1470     /usr/local/lib/X11R5  \
1471     /usr/local/lib/X11R4  \
1472                           \
1473     /usr/X386/lib         \
1474     /usr/x386/lib         \
1475     /usr/XFree86/lib/X11  \
1476                           \
1477     /usr/lib              \
1478     /usr/local/lib        \
1479     /usr/unsupported/lib  \
1480     /usr/athena/lib       \
1481     /usr/local/x11r5/lib  \
1482     /usr/lpp/Xamples/lib  \
1483     /lib/usr/lib/X11      \
1484                           \
1485     /usr/openwin/lib      \
1486     /usr/openwin/share/lib \
1487     ; \
1488 do
1489   for ac_extension in a so sl; do
1490     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1491       ac_x_libraries=$ac_dir
1492       break 2
1493     fi
1494   done
1495 done
1496 fi
1497 rm -f conftest*
1498 fi # $ac_x_libraries = NO
1499
1500 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1501   # Didn't find X anywhere.  Cache the known absence of X.
1502   ac_cv_have_x="have_x=no"
1503 else
1504   # Record where we found X for the cache.
1505   ac_cv_have_x="have_x=yes \
1506                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1507 fi
1508 fi
1509   fi
1510   eval "$ac_cv_have_x"
1511 fi # $with_x != no
1512
1513 if test "$have_x" != yes; then
1514   echo "$ac_t""$have_x" 1>&6
1515   no_x=yes
1516 else
1517   # If each of the values was on the command line, it overrides each guess.
1518   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1519   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1520   # Update the cache value to reflect the command line values.
1521   ac_cv_have_x="have_x=yes \
1522                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1523   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1524 fi
1525
1526         not_really_there=""
1527         if test "$no_x" = ""; then
1528                 if test "$x_includes" = ""; then
1529                         cat > conftest.$ac_ext <<EOF
1530 #line 1531 "configure"
1531 #include "confdefs.h"
1532 #include <X11/XIntrinsic.h>
1533 EOF
1534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1535 { (eval echo configure:1536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1536 ac_err=`grep -v '^ *+' conftest.out`
1537 if test -z "$ac_err"; then
1538   :
1539 else
1540   echo "$ac_err" >&5
1541   echo "configure: failed program was:" >&5
1542   cat conftest.$ac_ext >&5
1543   rm -rf conftest*
1544   not_really_there="yes"
1545 fi
1546 rm -f conftest*
1547                 else
1548                         if test ! -r $x_includes/X11/Intrinsic.h; then
1549                                 not_really_there="yes"
1550                         fi
1551                 fi
1552         fi
1553         if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
1554                 echo checking for X11 header files
1555                 XINCLUDES="# no special path needed"
1556                 cat > conftest.$ac_ext <<EOF
1557 #line 1558 "configure"
1558 #include "confdefs.h"
1559 #include <X11/Intrinsic.h>
1560 EOF
1561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1562 { (eval echo configure:1563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1563 ac_err=`grep -v '^ *+' conftest.out`
1564 if test -z "$ac_err"; then
1565   :
1566 else
1567   echo "$ac_err" >&5
1568   echo "configure: failed program was:" >&5
1569   cat conftest.$ac_ext >&5
1570   rm -rf conftest*
1571   XINCLUDES="nope"
1572 fi
1573 rm -f conftest*
1574                 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"
1575                         for i in $dirs ; do
1576                                 if test -r $i/X11/Intrinsic.h; then
1577                                         XINCLUDES=" -I$i"
1578                                 fi
1579                         done
1580                 fi
1581         else
1582                 if test "$x_includes" != ""; then
1583                         XINCLUDES=-I$x_includes
1584                 else
1585                         XINCLUDES="# no special path needed"
1586                 fi
1587         fi
1588         if test "$XINCLUDES" = nope; then
1589                 echo "Warning:  couldn't find any X11 include files."
1590                 XINCLUDES="# no include files found"
1591         fi
1592         if test "$no_x" = yes; then
1593                 XLIBSW=nope
1594                 if test "$XLIBSW" = nope; then
1595                         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"
1596                 for i in $dirs ; do
1597                         if test -r $i/libX11.a; then
1598                                 XLIBSW="-L$i -lX11"
1599                         fi
1600                 done
1601         fi
1602         else
1603                 if test "$x_libraries" = ""; then
1604                         XLIBSW=-lX11
1605                 else
1606                         XLIBSW="-L$x_libraries -lX11"
1607                 fi
1608         fi
1609         if test "$XLIBSW" = nope ; then
1610                 echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
1611 echo "configure:1612: checking for XCreateWindow in -lXwindow" >&5
1612 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
1613 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1614   echo $ac_n "(cached) $ac_c" 1>&6
1615 else
1616   ac_save_LIBS="$LIBS"
1617 LIBS="-lXwindow  $LIBS"
1618 cat > conftest.$ac_ext <<EOF
1619 #line 1620 "configure"
1620 #include "confdefs.h"
1621 /* Override any gcc2 internal prototype to avoid an error.  */
1622 /* We use char because int might match the return type of a gcc2
1623     builtin and then its argument prototype would still apply.  */
1624 char XCreateWindow();
1625
1626 int main() {
1627 XCreateWindow()
1628 ; return 0; }
1629 EOF
1630 if { (eval echo configure:1631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1631   rm -rf conftest*
1632   eval "ac_cv_lib_$ac_lib_var=yes"
1633 else
1634   echo "configure: failed program was:" >&5
1635   cat conftest.$ac_ext >&5
1636   rm -rf conftest*
1637   eval "ac_cv_lib_$ac_lib_var=no"
1638 fi
1639 rm -f conftest*
1640 LIBS="$ac_save_LIBS"
1641
1642 fi
1643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1644   echo "$ac_t""yes" 1>&6
1645   XLIBSW=-lXwindow
1646 else
1647   echo "$ac_t""no" 1>&6
1648 fi
1649
1650         fi
1651         if test "$XLIBSW" = nope ; then
1652                 echo "Warning:  couldn't find the X11 library archive.  Using -lX11."
1653                 XLIBSW=-lX11
1654         fi
1655         TKINC=$XINCLUDES
1656         TKLIB="${TKLIB} ${XLIBSW} ${TCLLIB}"
1657         IRCLIENT_SHELL=ir-tk
1658 fi
1659 trap '' 1 2 15
1660 cat > confcache <<\EOF
1661 # This file is a shell script that caches the results of configure
1662 # tests run on this system so they can be shared between configure
1663 # scripts and configure runs.  It is not useful on other systems.
1664 # If it contains results you don't want to keep, you may remove or edit it.
1665 #
1666 # By default, configure uses ./config.cache as the cache file,
1667 # creating it if it does not exist already.  You can give configure
1668 # the --cache-file=FILE option to use a different cache file; that is
1669 # what configure does when it calls configure scripts in
1670 # subdirectories, so they share the cache.
1671 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1672 # config.status only pays attention to the cache file if you give it the
1673 # --recheck option to rerun configure.
1674 #
1675 EOF
1676 # The following way of writing the cache mishandles newlines in values,
1677 # but we know of no workaround that is simple, portable, and efficient.
1678 # So, don't put newlines in cache variables' values.
1679 # Ultrix sh set writes to stderr and can't be redirected directly,
1680 # and sets the high bit in the cache file unless we assign to the vars.
1681 (set) 2>&1 |
1682   case `(ac_space=' '; set) 2>&1` in
1683   *ac_space=\ *)
1684     # `set' does not quote correctly, so add quotes (double-quote substitution
1685     # turns \\\\ into \\, and sed turns \\ into \).
1686     sed -n \
1687       -e "s/'/'\\\\''/g" \
1688       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1689     ;;
1690   *)
1691     # `set' quotes correctly as required by POSIX, so do not add quotes.
1692     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1693     ;;
1694   esac >> confcache
1695 if cmp -s $cache_file confcache; then
1696   :
1697 else
1698   if test -w $cache_file; then
1699     echo "updating cache $cache_file"
1700     cat confcache > $cache_file
1701   else
1702     echo "not updating unwritable cache $cache_file"
1703   fi
1704 fi
1705 rm -f confcache
1706
1707 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1708
1709 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1710 # Let make expand exec_prefix.
1711 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1712
1713 # Any assignment to VPATH causes Sun make to only execute
1714 # the first set of double-colon rules, so remove it if not needed.
1715 # If there is a colon in the path, we need to keep it.
1716 if test "x$srcdir" = x.; then
1717   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1718 fi
1719
1720 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1721
1722 # Transform confdefs.h into DEFS.
1723 # Protect against shell expansion while executing Makefile rules.
1724 # Protect against Makefile macro expansion.
1725 cat > conftest.defs <<\EOF
1726 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1727 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1728 s%\[%\\&%g
1729 s%\]%\\&%g
1730 s%\$%$$%g
1731 EOF
1732 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1733 rm -f conftest.defs
1734
1735
1736 # Without the "./", some shells look in PATH for config.status.
1737 : ${CONFIG_STATUS=./config.status}
1738
1739 echo creating $CONFIG_STATUS
1740 rm -f $CONFIG_STATUS
1741 cat > $CONFIG_STATUS <<EOF
1742 #! /bin/sh
1743 # Generated automatically by configure.
1744 # Run this file to recreate the current configuration.
1745 # This directory was configured as follows,
1746 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1747 #
1748 # $0 $ac_configure_args
1749 #
1750 # Compiler output produced by configure, useful for debugging
1751 # configure, is in ./config.log if it exists.
1752
1753 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1754 for ac_option
1755 do
1756   case "\$ac_option" in
1757   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1758     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1759     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1760   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1761     echo "$CONFIG_STATUS generated by autoconf version 2.12"
1762     exit 0 ;;
1763   -help | --help | --hel | --he | --h)
1764     echo "\$ac_cs_usage"; exit 0 ;;
1765   *) echo "\$ac_cs_usage"; exit 1 ;;
1766   esac
1767 done
1768
1769 ac_given_srcdir=$srcdir
1770 ac_given_INSTALL="$INSTALL"
1771
1772 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1773 EOF
1774 cat >> $CONFIG_STATUS <<EOF
1775
1776 # Protect against being on the right side of a sed subst in config.status.
1777 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1778  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1779 $ac_vpsub
1780 $extrasub
1781 s%@CFLAGS@%$CFLAGS%g
1782 s%@CPPFLAGS@%$CPPFLAGS%g
1783 s%@CXXFLAGS@%$CXXFLAGS%g
1784 s%@DEFS@%$DEFS%g
1785 s%@LDFLAGS@%$LDFLAGS%g
1786 s%@LIBS@%$LIBS%g
1787 s%@exec_prefix@%$exec_prefix%g
1788 s%@prefix@%$prefix%g
1789 s%@program_transform_name@%$program_transform_name%g
1790 s%@bindir@%$bindir%g
1791 s%@sbindir@%$sbindir%g
1792 s%@libexecdir@%$libexecdir%g
1793 s%@datadir@%$datadir%g
1794 s%@sysconfdir@%$sysconfdir%g
1795 s%@sharedstatedir@%$sharedstatedir%g
1796 s%@localstatedir@%$localstatedir%g
1797 s%@libdir@%$libdir%g
1798 s%@includedir@%$includedir%g
1799 s%@oldincludedir@%$oldincludedir%g
1800 s%@infodir@%$infodir%g
1801 s%@mandir@%$mandir%g
1802 s%@CC@%$CC%g
1803 s%@TCLLIB@%$TCLLIB%g
1804 s%@TKLIB@%$TKLIB%g
1805 s%@TCLINC@%$TCLINC%g
1806 s%@TKINC@%$TKINC%g
1807 s%@YAZDIR@%$YAZDIR%g
1808 s%@MOSI@%$MOSI%g
1809 s%@MOSIDIR@%$MOSIDIR%g
1810 s%@MOSILIB@%$MOSILIB%g
1811 s%@MOSIINC@%$MOSIINC%g
1812 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
1813 s%@SHLIB_LD@%$SHLIB_LD%g
1814 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
1815 s%@SHLIB_VERSION@%$SHLIB_VERSION%g
1816 s%@SHLIB_IRTCL@%$SHLIB_IRTCL%g
1817 s%@ALL_SPEC@%$ALL_SPEC%g
1818 s%@IRCLIENT_SHELL@%$IRCLIENT_SHELL%g
1819 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1820 s%@INSTALL_DATA@%$INSTALL_DATA%g
1821 s%@TCLSH@%$TCLSH%g
1822 s%@TCLSH8.0@%$TCLSH8.0%g
1823 s%@TCLSH7.6@%$TCLSH7.6%g
1824 s%@CPP@%$CPP%g
1825 s%@RANLIB@%$RANLIB%g
1826
1827 CEOF
1828 EOF
1829
1830 cat >> $CONFIG_STATUS <<\EOF
1831
1832 # Split the substitutions into bite-sized pieces for seds with
1833 # small command number limits, like on Digital OSF/1 and HP-UX.
1834 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1835 ac_file=1 # Number of current file.
1836 ac_beg=1 # First line for current file.
1837 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1838 ac_more_lines=:
1839 ac_sed_cmds=""
1840 while $ac_more_lines; do
1841   if test $ac_beg -gt 1; then
1842     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1843   else
1844     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1845   fi
1846   if test ! -s conftest.s$ac_file; then
1847     ac_more_lines=false
1848     rm -f conftest.s$ac_file
1849   else
1850     if test -z "$ac_sed_cmds"; then
1851       ac_sed_cmds="sed -f conftest.s$ac_file"
1852     else
1853       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1854     fi
1855     ac_file=`expr $ac_file + 1`
1856     ac_beg=$ac_end
1857     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1858   fi
1859 done
1860 if test -z "$ac_sed_cmds"; then
1861   ac_sed_cmds=cat
1862 fi
1863 EOF
1864
1865 cat >> $CONFIG_STATUS <<EOF
1866
1867 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1868 EOF
1869 cat >> $CONFIG_STATUS <<\EOF
1870 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1871   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1872   case "$ac_file" in
1873   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1874        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1875   *) ac_file_in="${ac_file}.in" ;;
1876   esac
1877
1878   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1879
1880   # Remove last slash and all that follows it.  Not all systems have dirname.
1881   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1882   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1883     # The file is in a subdirectory.
1884     test ! -d "$ac_dir" && mkdir "$ac_dir"
1885     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1886     # A "../" for each directory in $ac_dir_suffix.
1887     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1888   else
1889     ac_dir_suffix= ac_dots=
1890   fi
1891
1892   case "$ac_given_srcdir" in
1893   .)  srcdir=.
1894       if test -z "$ac_dots"; then top_srcdir=.
1895       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1896   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1897   *) # Relative path.
1898     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1899     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1900   esac
1901
1902   case "$ac_given_INSTALL" in
1903   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1904   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1905   esac
1906
1907   echo creating "$ac_file"
1908   rm -f "$ac_file"
1909   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1910   case "$ac_file" in
1911   *Makefile*) ac_comsub="1i\\
1912 # $configure_input" ;;
1913   *) ac_comsub= ;;
1914   esac
1915
1916   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1917   sed -e "$ac_comsub
1918 s%@configure_input@%$configure_input%g
1919 s%@srcdir@%$srcdir%g
1920 s%@top_srcdir@%$top_srcdir%g
1921 s%@INSTALL@%$INSTALL%g
1922 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1923 fi; done
1924 rm -f conftest.s*
1925
1926 EOF
1927 cat >> $CONFIG_STATUS <<EOF
1928
1929 EOF
1930 cat >> $CONFIG_STATUS <<\EOF
1931
1932 exit 0
1933 EOF
1934 chmod +x $CONFIG_STATUS
1935 rm -fr confdefs* $ac_clean_files
1936 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1937