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