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