root/tk-8.0/tags/rat_4_2_6/unix/configure @ 1291

Revision 1291, 80.7 KB (checked in by anonymous, 14 years ago)

This commit was manufactured by cvs2svn to create tag 'rat_4_2_6'.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --enable-symbols        build with debugging symbols"
16ac_help="$ac_help
17  --with-x                use the X Window System"
18
19# Initialize some variables set by options.
20# The variables have the same names as the options, with
21# dashes changed to underlines.
22build=NONE
23cache_file=./config.cache
24exec_prefix=NONE
25host=NONE
26no_create=
27nonopt=NONE
28no_recursion=
29prefix=NONE
30program_prefix=NONE
31program_suffix=NONE
32program_transform_name=s,x,x,
33silent=
34site=
35srcdir=
36target=NONE
37verbose=
38x_includes=NONE
39x_libraries=NONE
40bindir='${exec_prefix}/bin'
41sbindir='${exec_prefix}/sbin'
42libexecdir='${exec_prefix}/libexec'
43datadir='${prefix}/share'
44sysconfdir='${prefix}/etc'
45sharedstatedir='${prefix}/com'
46localstatedir='${prefix}/var'
47libdir='${exec_prefix}/lib'
48includedir='${prefix}/include'
49oldincludedir='/usr/include'
50infodir='${prefix}/info'
51mandir='${prefix}/man'
52
53# Initialize some other variables.
54subdirs=
55MFLAGS= MAKEFLAGS=
56# Maximum number of lines to put in a shell here document.
57ac_max_here_lines=12
58
59ac_prev=
60for ac_option
61do
62
63  # If the previous option needs an argument, assign it.
64  if test -n "$ac_prev"; then
65    eval "$ac_prev=\$ac_option"
66    ac_prev=
67    continue
68  fi
69
70  case "$ac_option" in
71  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72  *) ac_optarg= ;;
73  esac
74
75  # Accept the important Cygnus configure options, so we can diagnose typos.
76
77  case "$ac_option" in
78
79  -bindir | --bindir | --bindi | --bind | --bin | --bi)
80    ac_prev=bindir ;;
81  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
82    bindir="$ac_optarg" ;;
83
84  -build | --build | --buil | --bui | --bu)
85    ac_prev=build ;;
86  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
87    build="$ac_optarg" ;;
88
89  -cache-file | --cache-file | --cache-fil | --cache-fi \
90  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
91    ac_prev=cache_file ;;
92  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
93  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
94    cache_file="$ac_optarg" ;;
95
96  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
97    ac_prev=datadir ;;
98  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
99  | --da=*)
100    datadir="$ac_optarg" ;;
101
102  -disable-* | --disable-*)
103    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
104    # Reject names that are not valid shell variable names.
105    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
106      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
107    fi
108    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
109    eval "enable_${ac_feature}=no" ;;
110
111  -enable-* | --enable-*)
112    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
113    # Reject names that are not valid shell variable names.
114    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
115      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116    fi
117    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118    case "$ac_option" in
119      *=*) ;;
120      *) ac_optarg=yes ;;
121    esac
122    eval "enable_${ac_feature}='$ac_optarg'" ;;
123
124  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
125  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
126  | --exec | --exe | --ex)
127    ac_prev=exec_prefix ;;
128  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
129  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
130  | --exec=* | --exe=* | --ex=*)
131    exec_prefix="$ac_optarg" ;;
132
133  -gas | --gas | --ga | --g)
134    # Obsolete; use --with-gas.
135    with_gas=yes ;;
136
137  -help | --help | --hel | --he)
138    # Omit some internal or obsolete options to make the list less imposing.
139    # This message is too long to be a string in the A/UX 3.1 sh.
140    cat << EOF
141Usage: configure [options] [host]
142Options: [defaults in brackets after descriptions]
143Configuration:
144  --cache-file=FILE       cache test results in FILE
145  --help                  print this message
146  --no-create             do not create output files
147  --quiet, --silent       do not print \`checking...' messages
148  --version               print the version of autoconf that created configure
149Directory and file names:
150  --prefix=PREFIX         install architecture-independent files in PREFIX
151                          [$ac_default_prefix]
152  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
153                          [same as prefix]
154  --bindir=DIR            user executables in DIR [EPREFIX/bin]
155  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
156  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
157  --datadir=DIR           read-only architecture-independent data in DIR
158                          [PREFIX/share]
159  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
160  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
161                          [PREFIX/com]
162  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
163  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
164  --includedir=DIR        C header files in DIR [PREFIX/include]
165  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
166  --infodir=DIR           info documentation in DIR [PREFIX/info]
167  --mandir=DIR            man documentation in DIR [PREFIX/man]
168  --srcdir=DIR            find the sources in DIR [configure dir or ..]
169  --program-prefix=PREFIX prepend PREFIX to installed program names
170  --program-suffix=SUFFIX append SUFFIX to installed program names
171  --program-transform-name=PROGRAM
172                          run sed PROGRAM on installed program names
173EOF
174    cat << EOF
175Host type:
176  --build=BUILD           configure for building on BUILD [BUILD=HOST]
177  --host=HOST             configure for HOST [guessed]
178  --target=TARGET         configure for TARGET [TARGET=HOST]
179Features and packages:
180  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
181  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
182  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
183  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
184  --x-includes=DIR        X include files are in DIR
185  --x-libraries=DIR       X library files are in DIR
186EOF
187    if test -n "$ac_help"; then
188      echo "--enable and --with options recognized:$ac_help"
189    fi
190    exit 0 ;;
191
192  -host | --host | --hos | --ho)
193    ac_prev=host ;;
194  -host=* | --host=* | --hos=* | --ho=*)
195    host="$ac_optarg" ;;
196
197  -includedir | --includedir | --includedi | --included | --include \
198  | --includ | --inclu | --incl | --inc)
199    ac_prev=includedir ;;
200  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
201  | --includ=* | --inclu=* | --incl=* | --inc=*)
202    includedir="$ac_optarg" ;;
203
204  -infodir | --infodir | --infodi | --infod | --info | --inf)
205    ac_prev=infodir ;;
206  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
207    infodir="$ac_optarg" ;;
208
209  -libdir | --libdir | --libdi | --libd)
210    ac_prev=libdir ;;
211  -libdir=* | --libdir=* | --libdi=* | --libd=*)
212    libdir="$ac_optarg" ;;
213
214  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
215  | --libexe | --libex | --libe)
216    ac_prev=libexecdir ;;
217  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
218  | --libexe=* | --libex=* | --libe=*)
219    libexecdir="$ac_optarg" ;;
220
221  -localstatedir | --localstatedir | --localstatedi | --localstated \
222  | --localstate | --localstat | --localsta | --localst \
223  | --locals | --local | --loca | --loc | --lo)
224    ac_prev=localstatedir ;;
225  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
226  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
227  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
228    localstatedir="$ac_optarg" ;;
229
230  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
231    ac_prev=mandir ;;
232  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
233    mandir="$ac_optarg" ;;
234
235  -nfp | --nfp | --nf)
236    # Obsolete; use --without-fp.
237    with_fp=no ;;
238
239  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
240  | --no-cr | --no-c)
241    no_create=yes ;;
242
243  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
244  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
245    no_recursion=yes ;;
246
247  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
248  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
249  | --oldin | --oldi | --old | --ol | --o)
250    ac_prev=oldincludedir ;;
251  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
252  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
253  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
254    oldincludedir="$ac_optarg" ;;
255
256  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
257    ac_prev=prefix ;;
258  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
259    prefix="$ac_optarg" ;;
260
261  -program-prefix | --program-prefix | --program-prefi | --program-pref \
262  | --program-pre | --program-pr | --program-p)
263    ac_prev=program_prefix ;;
264  -program-prefix=* | --program-prefix=* | --program-prefi=* \
265  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
266    program_prefix="$ac_optarg" ;;
267
268  -program-suffix | --program-suffix | --program-suffi | --program-suff \
269  | --program-suf | --program-su | --program-s)
270    ac_prev=program_suffix ;;
271  -program-suffix=* | --program-suffix=* | --program-suffi=* \
272  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
273    program_suffix="$ac_optarg" ;;
274
275  -program-transform-name | --program-transform-name \
276  | --program-transform-nam | --program-transform-na \
277  | --program-transform-n | --program-transform- \
278  | --program-transform | --program-transfor \
279  | --program-transfo | --program-transf \
280  | --program-trans | --program-tran \
281  | --progr-tra | --program-tr | --program-t)
282    ac_prev=program_transform_name ;;
283  -program-transform-name=* | --program-transform-name=* \
284  | --program-transform-nam=* | --program-transform-na=* \
285  | --program-transform-n=* | --program-transform-=* \
286  | --program-transform=* | --program-transfor=* \
287  | --program-transfo=* | --program-transf=* \
288  | --program-trans=* | --program-tran=* \
289  | --progr-tra=* | --program-tr=* | --program-t=*)
290    program_transform_name="$ac_optarg" ;;
291
292  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
293  | -silent | --silent | --silen | --sile | --sil)
294    silent=yes ;;
295
296  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
297    ac_prev=sbindir ;;
298  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
299  | --sbi=* | --sb=*)
300    sbindir="$ac_optarg" ;;
301
302  -sharedstatedir | --sharedstatedir | --sharedstatedi \
303  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
304  | --sharedst | --shareds | --shared | --share | --shar \
305  | --sha | --sh)
306    ac_prev=sharedstatedir ;;
307  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
308  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
309  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
310  | --sha=* | --sh=*)
311    sharedstatedir="$ac_optarg" ;;
312
313  -site | --site | --sit)
314    ac_prev=site ;;
315  -site=* | --site=* | --sit=*)
316    site="$ac_optarg" ;;
317
318  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
319    ac_prev=srcdir ;;
320  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
321    srcdir="$ac_optarg" ;;
322
323  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
324  | --syscon | --sysco | --sysc | --sys | --sy)
325    ac_prev=sysconfdir ;;
326  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
327  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
328    sysconfdir="$ac_optarg" ;;
329
330  -target | --target | --targe | --targ | --tar | --ta | --t)
331    ac_prev=target ;;
332  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
333    target="$ac_optarg" ;;
334
335  -v | -verbose | --verbose | --verbos | --verbo | --verb)
336    verbose=yes ;;
337
338  -version | --version | --versio | --versi | --vers)
339    echo "configure generated by autoconf version 2.12"
340    exit 0 ;;
341
342  -with-* | --with-*)
343    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
344    # Reject names that are not valid shell variable names.
345    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
346      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
347    fi
348    ac_package=`echo $ac_package| sed 's/-/_/g'`
349    case "$ac_option" in
350      *=*) ;;
351      *) ac_optarg=yes ;;
352    esac
353    eval "with_${ac_package}='$ac_optarg'" ;;
354
355  -without-* | --without-*)
356    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
357    # Reject names that are not valid shell variable names.
358    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
359      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360    fi
361    ac_package=`echo $ac_package| sed 's/-/_/g'`
362    eval "with_${ac_package}=no" ;;
363
364  --x)
365    # Obsolete; use --with-x.
366    with_x=yes ;;
367
368  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
369  | --x-incl | --x-inc | --x-in | --x-i)
370    ac_prev=x_includes ;;
371  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
372  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
373    x_includes="$ac_optarg" ;;
374
375  -x-libraries | --x-libraries | --x-librarie | --x-librari \
376  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
377    ac_prev=x_libraries ;;
378  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
379  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
380    x_libraries="$ac_optarg" ;;
381
382  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
383    ;;
384
385  *)
386    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
387      echo "configure: warning: $ac_option: invalid host type" 1>&2
388    fi
389    if test "x$nonopt" != xNONE; then
390      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
391    fi
392    nonopt="$ac_option"
393    ;;
394
395  esac
396done
397
398if test -n "$ac_prev"; then
399  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
400fi
401
402trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
403
404# File descriptor usage:
405# 0 standard input
406# 1 file creation
407# 2 errors and warnings
408# 3 some systems may open it to /dev/tty
409# 4 used on the Kubota Titan
410# 6 checking for... messages and results
411# 5 compiler messages saved in config.log
412if test "$silent" = yes; then
413  exec 6>/dev/null
414else
415  exec 6>&1
416fi
417exec 5>./config.log
418
419echo "\
420This file contains any messages produced by compilers while
421running configure, to aid debugging if configure makes a mistake.
422" 1>&5
423
424# Strip out --no-create and --no-recursion so they do not pile up.
425# Also quote any args containing shell metacharacters.
426ac_configure_args=
427for ac_arg
428do
429  case "$ac_arg" in
430  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
431  | --no-cr | --no-c) ;;
432  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
433  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
434  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
435  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
436  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
437  esac
438done
439
440# NLS nuisances.
441# Only set these to C if already set.  These must not be set unconditionally
442# because not all systems understand e.g. LANG=C (notably SCO).
443# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
444# Non-C LC_CTYPE values break the ctype check.
445if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
446if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
447if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
448if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
449
450# confdefs.h avoids OS command line length limits that DEFS can exceed.
451rm -rf conftest* confdefs.h
452# AIX cpp loses on an empty file, so make sure it contains at least a newline.
453echo > confdefs.h
454
455# A filename unique to this package, relative to the directory that
456# configure is in, which we can look for to find out if srcdir is correct.
457ac_unique_file=../generic/tk.h
458
459# Find the source files, if location was not specified.
460if test -z "$srcdir"; then
461  ac_srcdir_defaulted=yes
462  # Try the directory containing this script, then its parent.
463  ac_prog=$0
464  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
465  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
466  srcdir=$ac_confdir
467  if test ! -r $srcdir/$ac_unique_file; then
468    srcdir=..
469  fi
470else
471  ac_srcdir_defaulted=no
472fi
473if test ! -r $srcdir/$ac_unique_file; then
474  if test "$ac_srcdir_defaulted" = yes; then
475    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
476  else
477    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
478  fi
479fi
480srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
481
482# Prefer explicitly selected file to automatically selected ones.
483if test -z "$CONFIG_SITE"; then
484  if test "x$prefix" != xNONE; then
485    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
486  else
487    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
488  fi
489fi
490for ac_site_file in $CONFIG_SITE; do
491  if test -r "$ac_site_file"; then
492    echo "loading site script $ac_site_file"
493    . "$ac_site_file"
494  fi
495done
496
497if test -r "$cache_file"; then
498  echo "loading cache $cache_file"
499  . $cache_file
500else
501  echo "creating cache $cache_file"
502  > $cache_file
503fi
504
505ac_ext=c
506# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
507ac_cpp='$CPP $CPPFLAGS'
508ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
509ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
510cross_compiling=$ac_cv_prog_cc_cross
511
512if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
513  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
514  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
515    ac_n= ac_c='
516' ac_t='        '
517  else
518    ac_n=-n ac_c= ac_t=
519  fi
520else
521  ac_n= ac_c='\c' ac_t=
522fi
523
524
525# SCCS: @(#) configure.in 1.90 97/11/20 12:45:45
526
527TK_VERSION=8.0
528TK_MAJOR_VERSION=8
529TK_MINOR_VERSION=0
530TK_PATCH_LEVEL=".3"
531VERSION=${TK_VERSION}
532
533if test "${prefix}" = "NONE"; then
534    prefix=/usr/local
535fi
536if test "${exec_prefix}" = "NONE"; then
537    exec_prefix=$prefix
538fi
539TK_SRC_DIR=`cd $srcdir/..; pwd`
540
541# Extract the first word of "ranlib", so it can be a program name with args.
542set dummy ranlib; ac_word=$2
543echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
544echo "configure:545: checking for $ac_word" >&5
545if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
546  echo $ac_n "(cached) $ac_c" 1>&6
547else
548  if test -n "$RANLIB"; then
549  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
550else
551  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
552  for ac_dir in $PATH; do
553    test -z "$ac_dir" && ac_dir=.
554    if test -f $ac_dir/$ac_word; then
555      ac_cv_prog_RANLIB="ranlib"
556      break
557    fi
558  done
559  IFS="$ac_save_ifs"
560  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
561fi
562fi
563RANLIB="$ac_cv_prog_RANLIB"
564if test -n "$RANLIB"; then
565  echo "$ac_t""$RANLIB" 1>&6
566else
567  echo "$ac_t""no" 1>&6
568fi
569
570#AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available],
571#    [tk_ok=$enableval], [tkl_ok=no])
572#if test "$tk_ok" = "yes"; then
573    # Extract the first word of "gcc", so it can be a program name with args.
574set dummy gcc; ac_word=$2
575echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
576echo "configure:577: checking for $ac_word" >&5
577if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
578  echo $ac_n "(cached) $ac_c" 1>&6
579else
580  if test -n "$CC"; then
581  ac_cv_prog_CC="$CC" # Let the user override the test.
582else
583  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
584  for ac_dir in $PATH; do
585    test -z "$ac_dir" && ac_dir=.
586    if test -f $ac_dir/$ac_word; then
587      ac_cv_prog_CC="gcc"
588      break
589    fi
590  done
591  IFS="$ac_save_ifs"
592fi
593fi
594CC="$ac_cv_prog_CC"
595if test -n "$CC"; then
596  echo "$ac_t""$CC" 1>&6
597else
598  echo "$ac_t""no" 1>&6
599fi
600
601if test -z "$CC"; then
602  # Extract the first word of "cc", so it can be a program name with args.
603set dummy cc; ac_word=$2
604echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
605echo "configure:606: checking for $ac_word" >&5
606if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
607  echo $ac_n "(cached) $ac_c" 1>&6
608else
609  if test -n "$CC"; then
610  ac_cv_prog_CC="$CC" # Let the user override the test.
611else
612  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
613  ac_prog_rejected=no
614  for ac_dir in $PATH; do
615    test -z "$ac_dir" && ac_dir=.
616    if test -f $ac_dir/$ac_word; then
617      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
618        ac_prog_rejected=yes
619        continue
620      fi
621      ac_cv_prog_CC="cc"
622      break
623    fi
624  done
625  IFS="$ac_save_ifs"
626if test $ac_prog_rejected = yes; then
627  # We found a bogon in the path, so make sure we never use it.
628  set dummy $ac_cv_prog_CC
629  shift
630  if test $# -gt 0; then
631    # We chose a different compiler from the bogus one.
632    # However, it has the same basename, so the bogon will be chosen
633    # first if we set CC to just the basename; use the full file name.
634    shift
635    set dummy "$ac_dir/$ac_word" "$@"
636    shift
637    ac_cv_prog_CC="$@"
638  fi
639fi
640fi
641fi
642CC="$ac_cv_prog_CC"
643if test -n "$CC"; then
644  echo "$ac_t""$CC" 1>&6
645else
646  echo "$ac_t""no" 1>&6
647fi
648
649  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
650fi
651
652echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
653echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
654
655ac_ext=c
656# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
657ac_cpp='$CPP $CPPFLAGS'
658ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
659ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
660cross_compiling=$ac_cv_prog_cc_cross
661
662cat > conftest.$ac_ext <<EOF
663#line 664 "configure"
664#include "confdefs.h"
665main(){return(0);}
666EOF
667if { (eval echo configure:668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
668  ac_cv_prog_cc_works=yes
669  # If we can't run a trivial program, we are probably using a cross compiler.
670  if (./conftest; exit) 2>/dev/null; then
671    ac_cv_prog_cc_cross=no
672  else
673    ac_cv_prog_cc_cross=yes
674  fi
675else
676  echo "configure: failed program was:" >&5
677  cat conftest.$ac_ext >&5
678  ac_cv_prog_cc_works=no
679fi
680rm -fr conftest*
681
682echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
683if test $ac_cv_prog_cc_works = no; then
684  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
685fi
686echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
687echo "configure:688: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
688echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
689cross_compiling=$ac_cv_prog_cc_cross
690
691echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
692echo "configure:693: checking whether we are using GNU C" >&5
693if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
694  echo $ac_n "(cached) $ac_c" 1>&6
695else
696  cat > conftest.c <<EOF
697#ifdef __GNUC__
698  yes;
699#endif
700EOF
701if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
702  ac_cv_prog_gcc=yes
703else
704  ac_cv_prog_gcc=no
705fi
706fi
707
708echo "$ac_t""$ac_cv_prog_gcc" 1>&6
709
710if test $ac_cv_prog_gcc = yes; then
711  GCC=yes
712  ac_test_CFLAGS="${CFLAGS+set}"
713  ac_save_CFLAGS="$CFLAGS"
714  CFLAGS=
715  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
716echo "configure:717: checking whether ${CC-cc} accepts -g" >&5
717if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
718  echo $ac_n "(cached) $ac_c" 1>&6
719else
720  echo 'void f(){}' > conftest.c
721if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
722  ac_cv_prog_cc_g=yes
723else
724  ac_cv_prog_cc_g=no
725fi
726rm -f conftest*
727
728fi
729
730echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
731  if test "$ac_test_CFLAGS" = set; then
732    CFLAGS="$ac_save_CFLAGS"
733  elif test $ac_cv_prog_cc_g = yes; then
734    CFLAGS="-g -O2"
735  else
736    CFLAGS="-O2"
737  fi
738else
739  GCC=
740  test "${CFLAGS+set}" = set || CFLAGS="-g"
741fi
742
743#else
744#    CC=${CC-cc}
745#AC_SUBST(CC)
746#fi
747#AC_C_CROSS
748echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
749echo "configure:750: checking how to run the C preprocessor" >&5
750# On Suns, sometimes $CPP names a directory.
751if test -n "$CPP" && test -d "$CPP"; then
752  CPP=
753fi
754if test -z "$CPP"; then
755if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
756  echo $ac_n "(cached) $ac_c" 1>&6
757else
758    # This must be in double quotes, not single quotes, because CPP may get
759  # substituted into the Makefile and "${CC-cc}" will confuse make.
760  CPP="${CC-cc} -E"
761  # On the NeXT, cc -E runs the code through the compiler's parser,
762  # not just through cpp.
763  cat > conftest.$ac_ext <<EOF
764#line 765 "configure"
765#include "confdefs.h"
766#include <assert.h>
767Syntax Error
768EOF
769ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
770{ (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
771ac_err=`grep -v '^ *+' conftest.out`
772if test -z "$ac_err"; then
773  :
774else
775  echo "$ac_err" >&5
776  echo "configure: failed program was:" >&5
777  cat conftest.$ac_ext >&5
778  rm -rf conftest*
779  CPP="${CC-cc} -E -traditional-cpp"
780  cat > conftest.$ac_ext <<EOF
781#line 782 "configure"
782#include "confdefs.h"
783#include <assert.h>
784Syntax Error
785EOF
786ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
787{ (eval echo configure:788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
788ac_err=`grep -v '^ *+' conftest.out`
789if test -z "$ac_err"; then
790  :
791else
792  echo "$ac_err" >&5
793  echo "configure: failed program was:" >&5
794  cat conftest.$ac_ext >&5
795  rm -rf conftest*
796  CPP=/lib/cpp
797fi
798rm -f conftest*
799fi
800rm -f conftest*
801  ac_cv_prog_CPP="$CPP"
802fi
803  CPP="$ac_cv_prog_CPP"
804else
805  ac_cv_prog_CPP="$CPP"
806fi
807echo "$ac_t""$CPP" 1>&6
808
809for ac_hdr in unistd.h limits.h
810do
811ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
812echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
813echo "configure:814: checking for $ac_hdr" >&5
814if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
815  echo $ac_n "(cached) $ac_c" 1>&6
816else
817  cat > conftest.$ac_ext <<EOF
818#line 819 "configure"
819#include "confdefs.h"
820#include <$ac_hdr>
821EOF
822ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
823{ (eval echo configure:824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
824ac_err=`grep -v '^ *+' conftest.out`
825if test -z "$ac_err"; then
826  rm -rf conftest*
827  eval "ac_cv_header_$ac_safe=yes"
828else
829  echo "$ac_err" >&5
830  echo "configure: failed program was:" >&5
831  cat conftest.$ac_ext >&5
832  rm -rf conftest*
833  eval "ac_cv_header_$ac_safe=no"
834fi
835rm -f conftest*
836fi
837if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
838  echo "$ac_t""yes" 1>&6
839    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
840  cat >> confdefs.h <<EOF
841#define $ac_tr_hdr 1
842EOF
843 
844else
845  echo "$ac_t""no" 1>&6
846fi
847done
848
849
850# set the warning flags depending on whether or not we are using gcc
851if test "${GCC}" = "yes" ; then
852    # leave -Wimplicit-int out, the X libs generate so many of these warnings
853    # that they obscure everything else.
854
855    CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
856else
857    CFLAGS_WARNING=""
858fi
859
860#--------------------------------------------------------------------
861#       See if there was a command-line option for where Tcl is;  if
862#       not, assume that its top-level directory is a sibling of ours.
863#--------------------------------------------------------------------
864
865TCL_BIN_DIR=`cd ../../tcl-8.0/unix; pwd`
866if test ! -f $TCL_BIN_DIR/Makefile; then
867    { echo "configure: error: There's no Makefile in $TCL_BIN_DIR;  perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" 1>&2; exit 1; }
868fi
869
870#--------------------------------------------------------------------
871#       Read in configuration information generated by Tcl for shared
872#       libraries, and arrange for it to be substituted into our
873#       Makefile.
874#--------------------------------------------------------------------
875
876file=$TCL_BIN_DIR/tclConfig.sh
877. $file
878
879# Set the default compiler switches based on the --enable-symbols option
880
881# Check whether --enable-symbols or --disable-symbols was given.
882if test "${enable_symbols+set}" = set; then
883  enableval="$enable_symbols"
884  tcl_ok=$enableval
885else
886  tcl_ok=no
887fi
888
889if test "$tcl_ok" = "yes"; then
890    CFLAGS_DEFAULT=CFLAGS_DEBUG
891    TK_DBGX=g
892else
893    CFLAGS_DEFAULT=CFLAGS_OPTIMIZE
894    TK_DBGX=""
895fi
896
897SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
898SHLIB_LD=$TCL_SHLIB_LD
899SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS
900SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
901SHLIB_VERSION=$TCL_SHLIB_VERSION
902DL_LIBS=$TCL_DL_LIBS
903LD_FLAGS=$TCL_LD_FLAGS
904CFLAGS_DEBUG=$TCL_CFLAGS_DEBUG
905CFLAGS_OPTIMIZE=$TCL_CFLAGS_OPTIMIZE
906
907LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}'
908
909# If Tcl and Tk are installed in different places, adjust the library
910# search path to reflect this.
911
912if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then
913    LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${TCL_EXEC_PREFIX}"
914fi
915
916#--------------------------------------------------------------------
917#       Supply a substitute for stdlib.h if it doesn't define strtol,
918#       strtoul, or strtod (which it doesn't in some versions of SunOS).
919#--------------------------------------------------------------------
920
921echo $ac_n "checking stdlib.h""... $ac_c" 1>&6
922echo "configure:923: checking stdlib.h" >&5
923cat > conftest.$ac_ext <<EOF
924#line 925 "configure"
925#include "confdefs.h"
926#include <stdlib.h>
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929  egrep "strtol" >/dev/null 2>&1; then
930  rm -rf conftest*
931  tk_ok=yes
932else
933  rm -rf conftest*
934  tk_ok=no
935fi
936rm -f conftest*
937
938cat > conftest.$ac_ext <<EOF
939#line 940 "configure"
940#include "confdefs.h"
941#include <stdlib.h>
942EOF
943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
944  egrep "strtoul" >/dev/null 2>&1; then
945  :
946else
947  rm -rf conftest*
948  tk_ok=no
949fi
950rm -f conftest*
951
952cat > conftest.$ac_ext <<EOF
953#line 954 "configure"
954#include "confdefs.h"
955#include <stdlib.h>
956EOF
957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
958  egrep "strtod" >/dev/null 2>&1; then
959  :
960else
961  rm -rf conftest*
962  tk_ok=no
963fi
964rm -f conftest*
965
966if test $tk_ok = no; then
967    cat >> confdefs.h <<\EOF
968#define NO_STDLIB_H 1
969EOF
970
971fi
972echo "$ac_t""$tk_ok" 1>&6
973
974#--------------------------------------------------------------------
975#       Include sys/select.h if it exists and if it supplies things
976#       that appear to be useful and aren't already in sys/types.h.
977#       This appears to be true only on the RS/6000 under AIX.  Some
978#       systems like OSF/1 have a sys/select.h that's of no use, and
979#       other systems like SCO UNIX have a sys/select.h that's
980#       pernicious.  If "fd_set" isn't defined anywhere then set a
981#       special flag.
982#--------------------------------------------------------------------
983
984echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6
985echo "configure:986: checking fd_set and sys/select" >&5
986cat > conftest.$ac_ext <<EOF
987#line 988 "configure"
988#include "confdefs.h"
989#include <sys/types.h>
990int main() {
991fd_set readMask, writeMask;
992; return 0; }
993EOF
994if { (eval echo configure:995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
995  rm -rf conftest*
996  tk_ok=yes
997else
998  echo "configure: failed program was:" >&5
999  cat conftest.$ac_ext >&5
1000  rm -rf conftest*
1001  tk_ok=no
1002fi
1003rm -f conftest*
1004if test $tk_ok = no; then
1005    cat > conftest.$ac_ext <<EOF
1006#line 1007 "configure"
1007#include "confdefs.h"
1008#include <sys/select.h>
1009EOF
1010if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1011  egrep "fd_mask" >/dev/null 2>&1; then
1012  rm -rf conftest*
1013  tk_ok=yes
1014fi
1015rm -f conftest*
1016
1017    if test $tk_ok = yes; then
1018        cat >> confdefs.h <<\EOF
1019#define HAVE_SYS_SELECT_H 1
1020EOF
1021
1022    fi
1023fi
1024echo "$ac_t""$tk_ok" 1>&6
1025if test $tk_ok = no; then
1026    cat >> confdefs.h <<\EOF
1027#define NO_FD_SET 1
1028EOF
1029
1030fi
1031
1032#--------------------------------------------------------------------
1033#       Check for various typedefs and provide substitutes if
1034#       they don't exist.
1035#--------------------------------------------------------------------
1036
1037echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1038echo "configure:1039: checking for ANSI C header files" >&5
1039if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1040  echo $ac_n "(cached) $ac_c" 1>&6
1041else
1042  cat > conftest.$ac_ext <<EOF
1043#line 1044 "configure"
1044#include "confdefs.h"
1045#include <stdlib.h>
1046#include <stdarg.h>
1047#include <string.h>
1048#include <float.h>
1049EOF
1050ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1051{ (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1052ac_err=`grep -v '^ *+' conftest.out`
1053if test -z "$ac_err"; then
1054  rm -rf conftest*
1055  ac_cv_header_stdc=yes
1056else
1057  echo "$ac_err" >&5
1058  echo "configure: failed program was:" >&5
1059  cat conftest.$ac_ext >&5
1060  rm -rf conftest*
1061  ac_cv_header_stdc=no
1062fi
1063rm -f conftest*
1064
1065if test $ac_cv_header_stdc = yes; then
1066  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1067cat > conftest.$ac_ext <<EOF
1068#line 1069 "configure"
1069#include "confdefs.h"
1070#include <string.h>
1071EOF
1072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1073  egrep "memchr" >/dev/null 2>&1; then
1074  :
1075else
1076  rm -rf conftest*
1077  ac_cv_header_stdc=no
1078fi
1079rm -f conftest*
1080
1081fi
1082
1083if test $ac_cv_header_stdc = yes; then
1084  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1085cat > conftest.$ac_ext <<EOF
1086#line 1087 "configure"
1087#include "confdefs.h"
1088#include <stdlib.h>
1089EOF
1090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1091  egrep "free" >/dev/null 2>&1; then
1092  :
1093else
1094  rm -rf conftest*
1095  ac_cv_header_stdc=no
1096fi
1097rm -f conftest*
1098
1099fi
1100
1101if test $ac_cv_header_stdc = yes; then
1102  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1103if test "$cross_compiling" = yes; then
1104  :
1105else
1106  cat > conftest.$ac_ext <<EOF
1107#line 1108 "configure"
1108#include "confdefs.h"
1109#include <ctype.h>
1110#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1111#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1112#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1113int main () { int i; for (i = 0; i < 256; i++)
1114if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1115exit (0); }
1116
1117EOF
1118if { (eval echo configure:1119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1119then
1120  :
1121else
1122  echo "configure: failed program was:" >&5
1123  cat conftest.$ac_ext >&5
1124  rm -fr conftest*
1125  ac_cv_header_stdc=no
1126fi
1127rm -fr conftest*
1128fi
1129
1130fi
1131fi
1132
1133echo "$ac_t""$ac_cv_header_stdc" 1>&6
1134if test $ac_cv_header_stdc = yes; then
1135  cat >> confdefs.h <<\EOF
1136#define STDC_HEADERS 1
1137EOF
1138
1139fi
1140
1141echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1142echo "configure:1143: checking for mode_t" >&5
1143if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1144  echo $ac_n "(cached) $ac_c" 1>&6
1145else
1146  cat > conftest.$ac_ext <<EOF
1147#line 1148 "configure"
1148#include "confdefs.h"
1149#include <sys/types.h>
1150#if STDC_HEADERS
1151#include <stdlib.h>
1152#include <stddef.h>
1153#endif
1154EOF
1155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1156  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1157  rm -rf conftest*
1158  ac_cv_type_mode_t=yes
1159else
1160  rm -rf conftest*
1161  ac_cv_type_mode_t=no
1162fi
1163rm -f conftest*
1164
1165fi
1166echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1167if test $ac_cv_type_mode_t = no; then
1168  cat >> confdefs.h <<\EOF
1169#define mode_t int
1170EOF
1171
1172fi
1173
1174echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1175echo "configure:1176: checking for pid_t" >&5
1176if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1177  echo $ac_n "(cached) $ac_c" 1>&6
1178else
1179  cat > conftest.$ac_ext <<EOF
1180#line 1181 "configure"
1181#include "confdefs.h"
1182#include <sys/types.h>
1183#if STDC_HEADERS
1184#include <stdlib.h>
1185#include <stddef.h>
1186#endif
1187EOF
1188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1189  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1190  rm -rf conftest*
1191  ac_cv_type_pid_t=yes
1192else
1193  rm -rf conftest*
1194  ac_cv_type_pid_t=no
1195fi
1196rm -f conftest*
1197
1198fi
1199echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1200if test $ac_cv_type_pid_t = no; then
1201  cat >> confdefs.h <<\EOF
1202#define pid_t int
1203EOF
1204
1205fi
1206
1207echo $ac_n "checking for size_t""... $ac_c" 1>&6
1208echo "configure:1209: checking for size_t" >&5
1209if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1210  echo $ac_n "(cached) $ac_c" 1>&6
1211else
1212  cat > conftest.$ac_ext <<EOF
1213#line 1214 "configure"
1214#include "confdefs.h"
1215#include <sys/types.h>
1216#if STDC_HEADERS
1217#include <stdlib.h>
1218#include <stddef.h>
1219#endif
1220EOF
1221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1222  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1223  rm -rf conftest*
1224  ac_cv_type_size_t=yes
1225else
1226  rm -rf conftest*
1227  ac_cv_type_size_t=no
1228fi
1229rm -f conftest*
1230
1231fi
1232echo "$ac_t""$ac_cv_type_size_t" 1>&6
1233if test $ac_cv_type_size_t = no; then
1234  cat >> confdefs.h <<\EOF
1235#define size_t unsigned
1236EOF
1237
1238fi
1239
1240echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1241echo "configure:1242: checking for uid_t in sys/types.h" >&5
1242if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1243  echo $ac_n "(cached) $ac_c" 1>&6
1244else
1245  cat > conftest.$ac_ext <<EOF
1246#line 1247 "configure"
1247#include "confdefs.h"
1248#include <sys/types.h>
1249EOF
1250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1251  egrep "uid_t" >/dev/null 2>&1; then
1252  rm -rf conftest*
1253  ac_cv_type_uid_t=yes
1254else
1255  rm -rf conftest*
1256  ac_cv_type_uid_t=no
1257fi
1258rm -f conftest*
1259
1260fi
1261
1262echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1263if test $ac_cv_type_uid_t = no; then
1264  cat >> confdefs.h <<\EOF
1265#define uid_t int
1266EOF
1267
1268  cat >> confdefs.h <<\EOF
1269#define gid_t int
1270EOF
1271
1272fi
1273
1274
1275#------------------------------------------------------------------------------
1276#       Find out about time handling differences.
1277#------------------------------------------------------------------------------
1278
1279for ac_hdr in sys/time.h
1280do
1281ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1282echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1283echo "configure:1284: checking for $ac_hdr" >&5
1284if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1285  echo $ac_n "(cached) $ac_c" 1>&6
1286else
1287  cat > conftest.$ac_ext <<EOF
1288#line 1289 "configure"
1289#include "confdefs.h"
1290#include <$ac_hdr>
1291EOF
1292ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1293{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1294ac_err=`grep -v '^ *+' conftest.out`
1295if test -z "$ac_err"; then
1296  rm -rf conftest*
1297  eval "ac_cv_header_$ac_safe=yes"
1298else
1299  echo "$ac_err" >&5
1300  echo "configure: failed program was:" >&5
1301  cat conftest.$ac_ext >&5
1302  rm -rf conftest*
1303  eval "ac_cv_header_$ac_safe=no"
1304fi
1305rm -f conftest*
1306fi
1307if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1308  echo "$ac_t""yes" 1>&6
1309    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1310  cat >> confdefs.h <<EOF
1311#define $ac_tr_hdr 1
1312EOF
1313 
1314else
1315  echo "$ac_t""no" 1>&6
1316fi
1317done
1318
1319echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1320echo "configure:1321: checking whether time.h and sys/time.h may both be included" >&5
1321if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1322  echo $ac_n "(cached) $ac_c" 1>&6
1323else
1324  cat > conftest.$ac_ext <<EOF
1325#line 1326 "configure"
1326#include "confdefs.h"
1327#include <sys/types.h>
1328#include <sys/time.h>
1329#include <time.h>
1330int main() {
1331struct tm *tp;
1332; return 0; }
1333EOF
1334if { (eval echo configure:1335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1335  rm -rf conftest*
1336  ac_cv_header_time=yes
1337else
1338  echo "configure: failed program was:" >&5
1339  cat conftest.$ac_ext >&5
1340  rm -rf conftest*
1341  ac_cv_header_time=no
1342fi
1343rm -f conftest*
1344fi
1345
1346echo "$ac_t""$ac_cv_header_time" 1>&6
1347if test $ac_cv_header_time = yes; then
1348  cat >> confdefs.h <<\EOF
1349#define TIME_WITH_SYS_TIME 1
1350EOF
1351
1352fi
1353
1354
1355#--------------------------------------------------------------------
1356#       Locate the X11 header files and the X11 library archive.  Try
1357#       the ac_path_x macro first, but if it doesn't find the X stuff
1358#       (e.g. because there's no xmkmf program) then check through
1359#       a list of possible directories.  Under some conditions the
1360#       autoconf macro will return an include directory that contains
1361#       no include files, so double-check its result just to be safe.
1362#--------------------------------------------------------------------
1363
1364# If we find X, set shell vars x_includes and x_libraries to the
1365# paths, otherwise set no_x=yes.
1366# Uses ac_ vars as temps to allow command line to override cache and checks.
1367# --without-x overrides everything else, but does not touch the cache.
1368echo $ac_n "checking for X""... $ac_c" 1>&6
1369echo "configure:1370: checking for X" >&5
1370
1371# Check whether --with-x or --without-x was given.
1372if test "${with_x+set}" = set; then
1373  withval="$with_x"
1374  :
1375fi
1376
1377# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
1378if test "x$with_x" = xno; then
1379  # The user explicitly disabled X.
1380  have_x=disabled
1381else
1382  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1383    # Both variables are already set.
1384    have_x=yes
1385  else
1386if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
1387  echo $ac_n "(cached) $ac_c" 1>&6
1388else
1389  # One or both of the vars are not set, and there is no cached value.
1390ac_x_includes=NO ac_x_libraries=NO
1391rm -fr conftestdir
1392if mkdir conftestdir; then
1393  cd conftestdir
1394  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1395  cat > Imakefile <<'EOF'
1396acfindx:
1397        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1398EOF
1399  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1400    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1401    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1402    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1403    for ac_extension in a so sl; do
1404      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1405        test -f $ac_im_libdir/libX11.$ac_extension; then
1406        ac_im_usrlibdir=$ac_im_libdir; break
1407      fi
1408    done
1409    # Screen out bogus values from the imake configuration.  They are
1410    # bogus both because they are the default anyway, and because
1411    # using them would break gcc on systems where it needs fixed includes.
1412    case "$ac_im_incroot" in
1413        /usr/include) ;;
1414        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1415    esac
1416    case "$ac_im_usrlibdir" in
1417        /usr/lib | /lib) ;;
1418        *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1419    esac
1420  fi
1421  cd ..
1422  rm -fr conftestdir
1423fi
1424
1425if test "$ac_x_includes" = NO; then
1426  # Guess where to find include files, by looking for this one X11 .h file.
1427  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1428
1429  # First, try using that file with no special directory specified.
1430cat > conftest.$ac_ext <<EOF
1431#line 1432 "configure"
1432#include "confdefs.h"
1433#include <$x_direct_test_include>
1434EOF
1435ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1436{ (eval echo configure:1437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1437ac_err=`grep -v '^ *+' conftest.out`
1438if test -z "$ac_err"; then
1439  rm -rf conftest*
1440  # We can compile using X headers with no special include directory.
1441ac_x_includes=
1442else
1443  echo "$ac_err" >&5
1444  echo "configure: failed program was:" >&5
1445  cat conftest.$ac_ext >&5
1446  rm -rf conftest*
1447  # Look for the header file in a standard set of common directories.
1448# Check X11 before X11Rn because it is often a symlink to the current release.
1449  for ac_dir in               \
1450    /usr/X11/include          \
1451    /usr/X11R6/include        \
1452    /usr/X11R5/include        \
1453    /usr/X11R4/include        \
1454                              \
1455    /usr/include/X11          \
1456    /usr/include/X11R6        \
1457    /usr/include/X11R5        \
1458    /usr/include/X11R4        \
1459                              \
1460    /usr/local/X11/include    \
1461    /usr/local/X11R6/include  \
1462    /usr/local/X11R5/include  \
1463    /usr/local/X11R4/include  \
1464                              \
1465    /usr/local/include/X11    \
1466    /usr/local/include/X11R6  \
1467    /usr/local/include/X11R5  \
1468    /usr/local/include/X11R4  \
1469                              \
1470    /usr/X386/include         \
1471    /usr/x386/include         \
1472    /usr/XFree86/include/X11  \
1473                              \
1474    /usr/include              \
1475    /usr/local/include        \
1476    /usr/unsupported/include  \
1477    /usr/athena/include       \
1478    /usr/local/x11r5/include  \
1479    /usr/lpp/Xamples/include  \
1480                              \
1481    /usr/openwin/include      \
1482    /usr/openwin/share/include \
1483    ; \
1484  do
1485    if test -r "$ac_dir/$x_direct_test_include"; then
1486      ac_x_includes=$ac_dir
1487      break
1488    fi
1489  done
1490fi
1491rm -f conftest*
1492fi # $ac_x_includes = NO
1493
1494if test "$ac_x_libraries" = NO; then
1495  # Check for the libraries.
1496
1497  test -z "$x_direct_test_library" && x_direct_test_library=Xt
1498  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1499
1500  # See if we find them without any special options.
1501  # Don't add to $LIBS permanently.
1502  ac_save_LIBS="$LIBS"
1503  LIBS="-l$x_direct_test_library $LIBS"
1504cat > conftest.$ac_ext <<EOF
1505#line 1506 "configure"
1506#include "confdefs.h"
1507
1508int main() {
1509${x_direct_test_function}()
1510; return 0; }
1511EOF
1512if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1513  rm -rf conftest*
1514  LIBS="$ac_save_LIBS"
1515# We can link X programs with no special library path.
1516ac_x_libraries=
1517else
1518  echo "configure: failed program was:" >&5
1519  cat conftest.$ac_ext >&5
1520  rm -rf conftest*
1521  LIBS="$ac_save_LIBS"
1522# First see if replacing the include by lib works.
1523# Check X11 before X11Rn because it is often a symlink to the current release.
1524for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1525    /usr/X11/lib          \
1526    /usr/X11R6/lib        \
1527    /usr/X11R5/lib        \
1528    /usr/X11R4/lib        \
1529                          \
1530    /usr/lib/X11          \
1531    /usr/lib/X11R6        \
1532    /usr/lib/X11R5        \
1533    /usr/lib/X11R4        \
1534                          \
1535    /usr/local/X11/lib    \
1536    /usr/local/X11R6/lib  \
1537    /usr/local/X11R5/lib  \
1538    /usr/local/X11R4/lib  \
1539                          \
1540    /usr/local/lib/X11    \
1541    /usr/local/lib/X11R6  \
1542    /usr/local/lib/X11R5  \
1543    /usr/local/lib/X11R4  \
1544                          \
1545    /usr/X386/lib         \
1546    /usr/x386/lib         \
1547    /usr/XFree86/lib/X11  \
1548                          \
1549    /usr/lib              \
1550    /usr/local/lib        \
1551    /usr/unsupported/lib  \
1552    /usr/athena/lib       \
1553    /usr/local/x11r5/lib  \
1554    /usr/lpp/Xamples/lib  \
1555    /lib/usr/lib/X11      \
1556                          \
1557    /usr/openwin/lib      \
1558    /usr/openwin/share/lib \
1559    ; \
1560do
1561  for ac_extension in a so sl; do
1562    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1563      ac_x_libraries=$ac_dir
1564      break 2
1565    fi
1566  done
1567done
1568fi
1569rm -f conftest*
1570fi # $ac_x_libraries = NO
1571
1572if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1573  # Didn't find X anywhere.  Cache the known absence of X.
1574  ac_cv_have_x="have_x=no"
1575else
1576  # Record where we found X for the cache.
1577  ac_cv_have_x="have_x=yes \
1578                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1579fi
1580fi
1581  fi
1582  eval "$ac_cv_have_x"
1583fi # $with_x != no
1584
1585if test "$have_x" != yes; then
1586  echo "$ac_t""$have_x" 1>&6
1587  no_x=yes
1588else
1589  # If each of the values was on the command line, it overrides each guess.
1590  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1591  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1592  # Update the cache value to reflect the command line values.
1593  ac_cv_have_x="have_x=yes \
1594                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1595  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1596fi
1597
1598not_really_there=""
1599if test "$no_x" = ""; then
1600    if test "$x_includes" = ""; then
1601        cat > conftest.$ac_ext <<EOF
1602#line 1603 "configure"
1603#include "confdefs.h"
1604#include <X11/XIntrinsic.h>
1605EOF
1606ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1607{ (eval echo configure:1608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1608ac_err=`grep -v '^ *+' conftest.out`
1609if test -z "$ac_err"; then
1610  :
1611else
1612  echo "$ac_err" >&5
1613  echo "configure: failed program was:" >&5
1614  cat conftest.$ac_ext >&5
1615  rm -rf conftest*
1616  not_really_there="yes"
1617fi
1618rm -f conftest*
1619    else
1620        if test ! -r $x_includes/X11/Intrinsic.h; then
1621            not_really_there="yes"
1622        fi
1623    fi
1624fi
1625if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
1626    echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
1627echo "configure:1628: checking for X11 header files" >&5
1628    XINCLUDES="# no special path needed"
1629    cat > conftest.$ac_ext <<EOF
1630#line 1631 "configure"
1631#include "confdefs.h"
1632#include <X11/Intrinsic.h>
1633EOF
1634ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1635{ (eval echo configure:1636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1636ac_err=`grep -v '^ *+' conftest.out`
1637if test -z "$ac_err"; then
1638  :
1639else
1640  echo "$ac_err" >&5
1641  echo "configure: failed program was:" >&5
1642  cat conftest.$ac_ext >&5
1643  rm -rf conftest*
1644  XINCLUDES="nope"
1645fi
1646rm -f conftest*
1647    if test "$XINCLUDES" = nope; then
1648        dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
1649        for i in $dirs ; do
1650            if test -r $i/X11/Intrinsic.h; then
1651                echo "$ac_t""$i" 1>&6
1652                XINCLUDES=" -I$i"
1653                break
1654            fi
1655        done
1656    fi
1657else
1658    if test "$x_includes" != ""; then
1659        XINCLUDES=-I$x_includes
1660    else
1661        XINCLUDES="# no special path needed"
1662    fi
1663fi
1664if test "$XINCLUDES" = nope; then
1665    echo "$ac_t""couldn't find any!" 1>&6
1666    XINCLUDES="# no include files found"
1667fi
1668
1669if test "$no_x" = yes; then
1670    echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
1671echo "configure:1672: checking for X11 libraries" >&5
1672    XLIBSW=nope
1673    dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
1674    for i in $dirs ; do
1675        if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
1676            echo "$ac_t""$i" 1>&6
1677            XLIBSW="-L$i -lX11"
1678            x_libraries="$i"
1679            break
1680        fi
1681    done
1682else
1683    if test "$x_libraries" = ""; then
1684        XLIBSW=-lX11
1685    else
1686        XLIBSW="-L$x_libraries -lX11"
1687    fi
1688fi
1689if test "$XLIBSW" = nope ; then
1690    echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
1691echo "configure:1692: checking for XCreateWindow in -lXwindow" >&5
1692ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
1693if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1694  echo $ac_n "(cached) $ac_c" 1>&6
1695else
1696  ac_save_LIBS="$LIBS"
1697LIBS="-lXwindow  $LIBS"
1698cat > conftest.$ac_ext <<EOF
1699#line 1700 "configure"
1700#include "confdefs.h"
1701/* Override any gcc2 internal prototype to avoid an error.  */
1702/* We use char because int might match the return type of a gcc2
1703    builtin and then its argument prototype would still apply.  */
1704char XCreateWindow();
1705
1706int main() {
1707XCreateWindow()
1708; return 0; }
1709EOF
1710if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1711  rm -rf conftest*
1712  eval "ac_cv_lib_$ac_lib_var=yes"
1713else
1714  echo "configure: failed program was:" >&5
1715  cat conftest.$ac_ext >&5
1716  rm -rf conftest*
1717  eval "ac_cv_lib_$ac_lib_var=no"
1718fi
1719rm -f conftest*
1720LIBS="$ac_save_LIBS"
1721
1722fi
1723if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1724  echo "$ac_t""yes" 1>&6
1725  XLIBSW=-lXwindow
1726else
1727  echo "$ac_t""no" 1>&6
1728fi
1729
1730fi
1731if test "$XLIBSW" = nope ; then
1732    echo "$ac_t""couldn't find any!  Using -lX11." 1>&6
1733    XLIBSW=-lX11
1734fi
1735
1736#--------------------------------------------------------------------
1737#       Various manipulations on the search path used at runtime to
1738#       find shared libraries:
1739#       1. If the X library binaries are in a non-standard directory,
1740#          add the X library location into that search path.
1741#       2. On systems such as AIX and Ultrix that use "-L" as the
1742#          search path option, colons cannot be used to separate
1743#          directories from each other. Change colons to " -L".
1744#       3. Create two sets of search flags, one for use in cc lines
1745#          and the other for when the linker is invoked directly.  In
1746#          the second case, '-Wl,' must be stripped off and commas must
1747#          be replaced by spaces.
1748#--------------------------------------------------------------------
1749
1750if test "x${x_libraries}" != "x"; then
1751    LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${x_libraries}"
1752fi
1753if test "${TCL_LD_SEARCH_FLAGS}" = '-L${LIB_RUNTIME_DIR}'; then
1754    LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -L/g'`
1755fi
1756
1757# The statement below is very tricky!  It actually *evaluates* the
1758# string in TCL_LD_SEARCH_FLAGS, which causes a substitution of the
1759# variable LIB_RUNTIME_DIR.
1760
1761eval "TK_CC_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\""
1762TK_LD_SEARCH_FLAGS=`echo ${TK_CC_SEARCH_FLAGS} |sed -e "s|-Wl,||g" -e "s|,| |g"`
1763
1764#--------------------------------------------------------------------
1765#       Check for the existence of various libraries.  The order here
1766#       is important, so that then end up in the right order in the
1767#       command line generated by make.  The -lsocket and -lnsl libraries
1768#       require a couple of special tricks:
1769#       1. Use "connect" and "accept" to check for -lsocket, and
1770#          "gethostbyname" to check for -lnsl.
1771#       2. Use each function name only once:  can't redo a check because
1772#          autoconf caches the results of the last check and won't redo it.
1773#       3. Use -lnsl and -lsocket only if they supply procedures that
1774#          aren't already present in the normal libraries.  This is because
1775#          IRIX 5.2 has libraries, but they aren't needed and they're
1776#          bogus:  they goof up name resolution if used.
1777#       4. On some SVR4 systems, can't use -lsocket without -lnsl too.
1778#          To get around this problem, check for both libraries together
1779#          if -lsocket doesn't work by itself.
1780#--------------------------------------------------------------------
1781
1782echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
1783echo "configure:1784: checking for main in -lXbsd" >&5
1784ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
1785if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1786  echo $ac_n "(cached) $ac_c" 1>&6
1787else
1788  ac_save_LIBS="$LIBS"
1789LIBS="-lXbsd  $LIBS"
1790cat > conftest.$ac_ext <<EOF
1791#line 1792 "configure"
1792#include "confdefs.h"
1793
1794int main() {
1795main()
1796; return 0; }
1797EOF
1798if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1799  rm -rf conftest*
1800  eval "ac_cv_lib_$ac_lib_var=yes"
1801else
1802  echo "configure: failed program was:" >&5
1803  cat conftest.$ac_ext >&5
1804  rm -rf conftest*
1805  eval "ac_cv_lib_$ac_lib_var=no"
1806fi
1807rm -f conftest*
1808LIBS="$ac_save_LIBS"
1809
1810fi
1811if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1812  echo "$ac_t""yes" 1>&6
1813  LIBS="$LIBS -lXbsd"
1814else
1815  echo "$ac_t""no" 1>&6
1816fi
1817
1818
1819tk_checkBoth=0
1820echo $ac_n "checking for connect""... $ac_c" 1>&6
1821echo "configure:1822: checking for connect" >&5
1822if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1823  echo $ac_n "(cached) $ac_c" 1>&6
1824else
1825  cat > conftest.$ac_ext <<EOF
1826#line 1827 "configure"
1827#include "confdefs.h"
1828/* System header to define __stub macros and hopefully few prototypes,
1829    which can conflict with char connect(); below.  */
1830#include <assert.h>
1831/* Override any gcc2 internal prototype to avoid an error.  */
1832/* We use char because int might match the return type of a gcc2
1833    builtin and then its argument prototype would still apply.  */
1834char connect();
1835
1836int main() {
1837
1838/* The GNU C library defines this for functions which it implements
1839    to always fail with ENOSYS.  Some functions are actually named
1840    something starting with __ and the normal name is an alias.  */
1841#if defined (__stub_connect) || defined (__stub___connect)
1842choke me
1843#else
1844connect();
1845#endif
1846
1847; return 0; }
1848EOF
1849if { (eval echo configure:1850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1850  rm -rf conftest*
1851  eval "ac_cv_func_connect=yes"
1852else
1853  echo "configure: failed program was:" >&5
1854  cat conftest.$ac_ext >&5
1855  rm -rf conftest*
1856  eval "ac_cv_func_connect=no"
1857fi
1858rm -f conftest*
1859fi
1860
1861if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1862  echo "$ac_t""yes" 1>&6
1863  tk_checkSocket=0
1864else
1865  echo "$ac_t""no" 1>&6
1866tk_checkSocket=1
1867fi
1868
1869if test "$tk_checkSocket" = 1; then
1870    echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1871echo "configure:1872: checking for main in -lsocket" >&5
1872ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1873if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1874  echo $ac_n "(cached) $ac_c" 1>&6
1875else
1876  ac_save_LIBS="$LIBS"
1877LIBS="-lsocket  $LIBS"
1878cat > conftest.$ac_ext <<EOF
1879#line 1880 "configure"
1880#include "confdefs.h"
1881
1882int main() {
1883main()
1884; return 0; }
1885EOF
1886if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1887  rm -rf conftest*
1888  eval "ac_cv_lib_$ac_lib_var=yes"
1889else
1890  echo "configure: failed program was:" >&5
1891  cat conftest.$ac_ext >&5
1892  rm -rf conftest*
1893  eval "ac_cv_lib_$ac_lib_var=no"
1894fi
1895rm -f conftest*
1896LIBS="$ac_save_LIBS"
1897
1898fi
1899if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1900  echo "$ac_t""yes" 1>&6
1901  LIBS="$LIBS -lsocket"
1902else
1903  echo "$ac_t""no" 1>&6
1904tk_checkBoth=1
1905fi
1906
1907fi
1908if test "$tk_checkBoth" = 1; then
1909    tk_oldLibs=$LIBS
1910    LIBS="$LIBS -lsocket -lnsl"
1911    echo $ac_n "checking for accept""... $ac_c" 1>&6
1912echo "configure:1913: checking for accept" >&5
1913if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
1914  echo $ac_n "(cached) $ac_c" 1>&6
1915else
1916  cat > conftest.$ac_ext <<EOF
1917#line 1918 "configure"
1918#include "confdefs.h"
1919/* System header to define __stub macros and hopefully few prototypes,
1920    which can conflict with char accept(); below.  */
1921#include <assert.h>
1922/* Override any gcc2 internal prototype to avoid an error.  */
1923/* We use char because int might match the return type of a gcc2
1924    builtin and then its argument prototype would still apply.  */
1925char accept();
1926
1927int main() {
1928
1929/* The GNU C library defines this for functions which it implements
1930    to always fail with ENOSYS.  Some functions are actually named
1931    something starting with __ and the normal name is an alias.  */
1932#if defined (__stub_accept) || defined (__stub___accept)
1933choke me
1934#else
1935accept();
1936#endif
1937
1938; return 0; }
1939EOF
1940if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1941  rm -rf conftest*
1942  eval "ac_cv_func_accept=yes"
1943else
1944  echo "configure: failed program was:" >&5
1945  cat conftest.$ac_ext >&5
1946  rm -rf conftest*
1947  eval "ac_cv_func_accept=no"
1948fi
1949rm -f conftest*
1950fi
1951
1952if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
1953  echo "$ac_t""yes" 1>&6
1954  tk_checkNsl=0
1955else
1956  echo "$ac_t""no" 1>&6
1957LIBS=$tk_oldLibs
1958fi
1959
1960fi
1961echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1962echo "configure:1963: checking for gethostbyname" >&5
1963if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1964  echo $ac_n "(cached) $ac_c" 1>&6
1965else
1966  cat > conftest.$ac_ext <<EOF
1967#line 1968 "configure"
1968#include "confdefs.h"
1969/* System header to define __stub macros and hopefully few prototypes,
1970    which can conflict with char gethostbyname(); below.  */
1971#include <assert.h>
1972/* Override any gcc2 internal prototype to avoid an error.  */
1973/* We use char because int might match the return type of a gcc2
1974    builtin and then its argument prototype would still apply.  */
1975char gethostbyname();
1976
1977int main() {
1978
1979/* The GNU C library defines this for functions which it implements
1980    to always fail with ENOSYS.  Some functions are actually named
1981    something starting with __ and the normal name is an alias.  */
1982#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1983choke me
1984#else
1985gethostbyname();
1986#endif
1987
1988; return 0; }
1989EOF
1990if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1991  rm -rf conftest*
1992  eval "ac_cv_func_gethostbyname=yes"
1993else
1994  echo "configure: failed program was:" >&5
1995  cat conftest.$ac_ext >&5
1996  rm -rf conftest*
1997  eval "ac_cv_func_gethostbyname=no"
1998fi
1999rm -f conftest*
2000fi
2001
2002if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2003  echo "$ac_t""yes" 1>&6
2004  :
2005else
2006  echo "$ac_t""no" 1>&6
2007echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2008echo "configure:2009: checking for main in -lnsl" >&5
2009ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2010if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2011  echo $ac_n "(cached) $ac_c" 1>&6
2012else
2013  ac_save_LIBS="$LIBS"
2014LIBS="-lnsl  $LIBS"
2015cat > conftest.$ac_ext <<EOF
2016#line 2017 "configure"
2017#include "confdefs.h"
2018
2019int main() {
2020main()
2021; return 0; }
2022EOF
2023if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2024  rm -rf conftest*
2025  eval "ac_cv_lib_$ac_lib_var=yes"
2026else
2027  echo "configure: failed program was:" >&5
2028  cat conftest.$ac_ext >&5
2029  rm -rf conftest*
2030  eval "ac_cv_lib_$ac_lib_var=no"
2031fi
2032rm -f conftest*
2033LIBS="$ac_save_LIBS"
2034
2035fi
2036if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2037  echo "$ac_t""yes" 1>&6
2038  LIBS="$LIBS -lnsl"
2039else
2040  echo "$ac_t""no" 1>&6
2041fi
2042
2043fi
2044
2045
2046#--------------------------------------------------------------------
2047# One more check related to the X libraries.  The standard releases
2048# of Ultrix don't support the "xauth" mechanism, so send won't work
2049# unless TK_NO_SECURITY is defined.  However, there are usually copies
2050# of the MIT X server available as well, which do support xauth.
2051# Check for the MIT stuff and use it if it exists.
2052#
2053# Note: can't use ac_check_lib macro (at least, not in Autoconf 2.1)
2054# because it can't deal with the "-" in the library name.
2055#--------------------------------------------------------------------
2056
2057if test -d /usr/include/mit ; then
2058    echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6
2059echo "configure:2060: checking MIT X libraries" >&5
2060    tk_oldCFlags=$CFLAGS
2061    CFLAGS="$CFLAGS -I/usr/include/mit"
2062    tk_oldLibs=$LIBS
2063    LIBS="$LIBS -lX11-mit"
2064    cat > conftest.$ac_ext <<EOF
2065#line 2066 "configure"
2066#include "confdefs.h"
2067
2068        #include <X11/Xlib.h>
2069   
2070int main() {
2071
2072        XOpenDisplay(0);
2073   
2074; return 0; }
2075EOF
2076if { (eval echo configure:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2077  rm -rf conftest*
2078 
2079        echo "$ac_t""yes" 1>&6
2080        XLIBSW="-lX11-mit"
2081        XINCLUDES="-I/usr/include/mit"
2082   
2083else
2084  echo "configure: failed program was:" >&5
2085  cat conftest.$ac_ext >&5
2086  rm -rf conftest*
2087  echo "$ac_t""no" 1>&6
2088fi
2089rm -f conftest*
2090    CFLAGS=$tk_oldCFlags
2091    LIBS=$tk_oldLibs
2092fi
2093
2094#--------------------------------------------------------------------
2095#       On a few very rare systems, all of the libm.a stuff is
2096#       already in libc.a.  Set compiler flags accordingly.
2097#       Also, Linux requires the "ieee" library for math to
2098#       work right (and it must appear before "-lm").
2099#--------------------------------------------------------------------
2100
2101MATH_LIBS=""
2102echo $ac_n "checking for sin""... $ac_c" 1>&6
2103echo "configure:2104: checking for sin" >&5
2104if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
2105  echo $ac_n "(cached) $ac_c" 1>&6
2106else
2107  cat > conftest.$ac_ext <<EOF
2108#line 2109 "configure"
2109#include "confdefs.h"
2110/* System header to define __stub macros and hopefully few prototypes,
2111    which can conflict with char sin(); below.  */
2112#include <assert.h>
2113/* Override any gcc2 internal prototype to avoid an error.  */
2114/* We use char because int might match the return type of a gcc2
2115    builtin and then its argument prototype would still apply.  */
2116char sin();
2117
2118int main() {
2119
2120/* The GNU C library defines this for functions which it implements
2121    to always fail with ENOSYS.  Some functions are actually named
2122    something starting with __ and the normal name is an alias.  */
2123#if defined (__stub_sin) || defined (__stub___sin)
2124choke me
2125#else
2126sin();
2127#endif
2128
2129; return 0; }
2130EOF
2131if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2132  rm -rf conftest*
2133  eval "ac_cv_func_sin=yes"
2134else
2135  echo "configure: failed program was:" >&5
2136  cat conftest.$ac_ext >&5
2137  rm -rf conftest*
2138  eval "ac_cv_func_sin=no"
2139fi
2140rm -f conftest*
2141fi
2142
2143if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
2144  echo "$ac_t""yes" 1>&6
2145  :
2146else
2147  echo "$ac_t""no" 1>&6
2148MATH_LIBS="-lm"
2149fi
2150
2151echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
2152echo "configure:2153: checking for main in -lieee" >&5
2153ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
2154if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2155  echo $ac_n "(cached) $ac_c" 1>&6
2156else
2157  ac_save_LIBS="$LIBS"
2158LIBS="-lieee  $LIBS"
2159cat > conftest.$ac_ext <<EOF
2160#line 2161 "configure"
2161#include "confdefs.h"
2162
2163int main() {
2164main()
2165; return 0; }
2166EOF
2167if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2168  rm -rf conftest*
2169  eval "ac_cv_lib_$ac_lib_var=yes"
2170else
2171  echo "configure: failed program was:" >&5
2172  cat conftest.$ac_ext >&5
2173  rm -rf conftest*
2174  eval "ac_cv_lib_$ac_lib_var=no"
2175fi
2176rm -f conftest*
2177LIBS="$ac_save_LIBS"
2178
2179fi
2180if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2181  echo "$ac_t""yes" 1>&6
2182  MATH_LIBS="-lieee $MATH_LIBS"
2183else
2184  echo "$ac_t""no" 1>&6
2185fi
2186
2187
2188#--------------------------------------------------------------------
2189#       If this system doesn't have a memmove procedure, use memcpy
2190#       instead.
2191#--------------------------------------------------------------------
2192
2193echo $ac_n "checking for memmove""... $ac_c" 1>&6
2194echo "configure:2195: checking for memmove" >&5
2195if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
2196  echo $ac_n "(cached) $ac_c" 1>&6
2197else
2198  cat > conftest.$ac_ext <<EOF
2199#line 2200 "configure"
2200#include "confdefs.h"
2201/* System header to define __stub macros and hopefully few prototypes,
2202    which can conflict with char memmove(); below.  */
2203#include <assert.h>
2204/* Override any gcc2 internal prototype to avoid an error.  */
2205/* We use char because int might match the return type of a gcc2
2206    builtin and then its argument prototype would still apply.  */
2207char memmove();
2208
2209int main() {
2210
2211/* The GNU C library defines this for functions which it implements
2212    to always fail with ENOSYS.  Some functions are actually named
2213    something starting with __ and the normal name is an alias.  */
2214#if defined (__stub_memmove) || defined (__stub___memmove)
2215choke me
2216#else
2217memmove();
2218#endif
2219
2220; return 0; }
2221EOF
2222if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2223  rm -rf conftest*
2224  eval "ac_cv_func_memmove=yes"
2225else
2226  echo "configure: failed program was:" >&5
2227  cat conftest.$ac_ext >&5
2228  rm -rf conftest*
2229  eval "ac_cv_func_memmove=no"
2230fi
2231rm -f conftest*
2232fi
2233
2234if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
2235  echo "$ac_t""yes" 1>&6
2236  :
2237else
2238  echo "$ac_t""no" 1>&6
2239cat >> confdefs.h <<\EOF
2240#define memmove memcpy
2241EOF
2242
2243fi
2244
2245
2246#--------------------------------------------------------------------
2247#       Figure out whether "char" is unsigned.  If so, set a
2248#       #define for __CHAR_UNSIGNED__.
2249#--------------------------------------------------------------------
2250
2251echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2252echo "configure:2253: checking whether char is unsigned" >&5
2253if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2254  echo $ac_n "(cached) $ac_c" 1>&6
2255else
2256  if test "$GCC" = yes; then
2257  # GCC predefines this symbol on systems where it applies.
2258cat > conftest.$ac_ext <<EOF
2259#line 2260 "configure"
2260#include "confdefs.h"
2261#ifdef __CHAR_UNSIGNED__
2262  yes
2263#endif
2264
2265EOF
2266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2267  egrep "yes" >/dev/null 2>&1; then
2268  rm -rf conftest*
2269  ac_cv_c_char_unsigned=yes
2270else
2271  rm -rf conftest*
2272  ac_cv_c_char_unsigned=no
2273fi
2274rm -f conftest*
2275
2276else
2277if test "$cross_compiling" = yes; then
2278    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2279else
2280  cat > conftest.$ac_ext <<EOF
2281#line 2282 "configure"
2282#include "confdefs.h"
2283/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2284#if !defined(__STDC__) || __STDC__ != 1
2285#define volatile
2286#endif
2287main() {
2288  volatile char c = 255; exit(c < 0);
2289}
2290EOF
2291if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2292then
2293  ac_cv_c_char_unsigned=yes
2294else
2295  echo "configure: failed program was:" >&5
2296  cat conftest.$ac_ext >&5
2297  rm -fr conftest*
2298  ac_cv_c_char_unsigned=no
2299fi
2300rm -fr conftest*
2301fi
2302
2303fi
2304fi
2305
2306echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2307if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2308  cat >> confdefs.h <<\EOF
2309#define __CHAR_UNSIGNED__ 1
2310EOF
2311
2312fi
2313
2314
2315#--------------------------------------------------------------------
2316#       Under Solaris 2.4, strtod returns the wrong value for the
2317#       terminating character under some conditions.  Check for this
2318#       and if the problem exists use a substitute procedure
2319#       "fixstrtod" (provided by Tcl) that corrects the error.
2320#--------------------------------------------------------------------
2321
2322echo $ac_n "checking for strtod""... $ac_c" 1>&6
2323echo "configure:2324: checking for strtod" >&5
2324if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
2325  echo $ac_n "(cached) $ac_c" 1>&6
2326else
2327  cat > conftest.$ac_ext <<EOF
2328#line 2329 "configure"
2329#include "confdefs.h"
2330/* System header to define __stub macros and hopefully few prototypes,
2331    which can conflict with char strtod(); below.  */
2332#include <assert.h>
2333/* Override any gcc2 internal prototype to avoid an error.  */
2334/* We use char because int might match the return type of a gcc2
2335    builtin and then its argument prototype would still apply.  */
2336char strtod();
2337
2338int main() {
2339
2340/* The GNU C library defines this for functions which it implements
2341    to always fail with ENOSYS.  Some functions are actually named
2342    something starting with __ and the normal name is an alias.  */
2343#if defined (__stub_strtod) || defined (__stub___strtod)
2344choke me
2345#else
2346strtod();
2347#endif
2348
2349; return 0; }
2350EOF
2351if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2352  rm -rf conftest*
2353  eval "ac_cv_func_strtod=yes"
2354else
2355  echo "configure: failed program was:" >&5
2356  cat conftest.$ac_ext >&5
2357  rm -rf conftest*
2358  eval "ac_cv_func_strtod=no"
2359fi
2360rm -f conftest*
2361fi
2362
2363if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
2364  echo "$ac_t""yes" 1>&6
2365  tk_strtod=1
2366else
2367  echo "$ac_t""no" 1>&6
2368tk_strtod=0
2369fi
2370
2371if test "$tk_strtod" = 1; then
2372    echo $ac_n "checking for Solaris 2.4 strtod bug""... $ac_c" 1>&6
2373echo "configure:2374: checking for Solaris 2.4 strtod bug" >&5
2374    if test "$cross_compiling" = yes; then
2375  tk_ok=0
2376else
2377  cat > conftest.$ac_ext <<EOF
2378#line 2379 "configure"
2379#include "confdefs.h"
2380
2381        extern double strtod();
2382        int main()
2383        {
2384            char *string = "NaN";
2385            char *term;
2386            strtod(string, &term);
2387            if ((term != string) && (term[-1] == 0)) {
2388                exit(1);
2389            }
2390            exit(0);
2391        }
2392EOF
2393if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2394then
2395  tk_ok=1
2396else
2397  echo "configure: failed program was:" >&5
2398  cat conftest.$ac_ext >&5
2399  rm -fr conftest*
2400  tk_ok=0
2401fi
2402rm -fr conftest*
2403fi
2404
2405    if test "$tk_ok" = 1; then
2406        echo "$ac_t""ok" 1>&6
2407    else
2408        echo "$ac_t""buggy" 1>&6
2409        cat >> confdefs.h <<\EOF
2410#define strtod fixstrtod
2411EOF
2412
2413    fi
2414fi
2415
2416#--------------------------------------------------------------------
2417#       The statements below define a collection of symbols related to
2418#       building libtk as a shared library instead of a static library.
2419#--------------------------------------------------------------------
2420
2421#AC_ARG_ENABLE(shared,
2422#    [  --enable-shared         build libtk as a shared library],
2423#    [ok=$enableval], [ok=no])
2424#if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
2425#    TK_SHARED_BUILD=1
2426#    TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
2427#    TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX}
2428#    MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}"
2429#    RANLIB=":"
2430#else
2431    TK_SHARED_BUILD=0
2432    TK_SHLIB_CFLAGS=""
2433    TK_LIB_FILE=libtk${TCL_UNSHARED_LIB_SUFFIX}
2434    MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}"
2435#fi
2436
2437DBGX='${TK_DBGX}'
2438eval "TK_LIB_FILE=${TK_LIB_FILE}"
2439
2440# Note:  in the following variable, it's important to use the absolute
2441# path name of the Tcl directory rather than "..":  this is because
2442# AIX remembers this path and will attempt to use it at run-time to look
2443# up the Tcl library.
2444
2445if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
2446    TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}"
2447else
2448    TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}"
2449fi
2450TK_BUILD_LIB_SPEC="`pwd`/libtk8.0.a"
2451TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}"
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489trap '' 1 2 15
2490cat > confcache <<\EOF
2491# This file is a shell script that caches the results of configure
2492# tests run on this system so they can be shared between configure
2493# scripts and configure runs.  It is not useful on other systems.
2494# If it contains results you don't want to keep, you may remove or edit it.
2495#
2496# By default, configure uses ./config.cache as the cache file,
2497# creating it if it does not exist already.  You can give configure
2498# the --cache-file=FILE option to use a different cache file; that is
2499# what configure does when it calls configure scripts in
2500# subdirectories, so they share the cache.
2501# Giving --cache-file=/dev/null disables caching, for debugging configure.
2502# config.status only pays attention to the cache file if you give it the
2503# --recheck option to rerun configure.
2504#
2505EOF
2506# The following way of writing the cache mishandles newlines in values,
2507# but we know of no workaround that is simple, portable, and efficient.
2508# So, don't put newlines in cache variables' values.
2509# Ultrix sh set writes to stderr and can't be redirected directly,
2510# and sets the high bit in the cache file unless we assign to the vars.
2511(set) 2>&1 |
2512  case `(ac_space=' '; set) 2>&1` in
2513  *ac_space=\ *)
2514    # `set' does not quote correctly, so add quotes (double-quote substitution
2515    # turns \\\\ into \\, and sed turns \\ into \).
2516    sed -n \
2517      -e "s/'/'\\\\''/g" \
2518      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2519    ;;
2520  *)
2521    # `set' quotes correctly as required by POSIX, so do not add quotes.
2522    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2523    ;;
2524  esac >> confcache
2525if cmp -s $cache_file confcache; then
2526  :
2527else
2528  if test -w $cache_file; then
2529    echo "updating cache $cache_file"
2530    cat confcache > $cache_file
2531  else
2532    echo "not updating unwritable cache $cache_file"
2533  fi
2534fi
2535rm -f confcache
2536
2537trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2538
2539test "x$prefix" = xNONE && prefix=$ac_default_prefix
2540# Let make expand exec_prefix.
2541test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2542
2543# Any assignment to VPATH causes Sun make to only execute
2544# the first set of double-colon rules, so remove it if not needed.
2545# If there is a colon in the path, we need to keep it.
2546if test "x$srcdir" = x.; then
2547  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2548fi
2549
2550trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2551
2552# Transform confdefs.h into DEFS.
2553# Protect against shell expansion while executing Makefile rules.
2554# Protect against Makefile macro expansion.
2555cat > conftest.defs <<\EOF
2556s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2557s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2558s%\[%\\&%g
2559s%\]%\\&%g
2560s%\$%$$%g
2561EOF
2562DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2563rm -f conftest.defs
2564
2565
2566# Without the "./", some shells look in PATH for config.status.
2567: ${CONFIG_STATUS=./config.status}
2568
2569echo creating $CONFIG_STATUS
2570rm -f $CONFIG_STATUS
2571cat > $CONFIG_STATUS <<EOF
2572#! /bin/sh
2573# Generated automatically by configure.
2574# Run this file to recreate the current configuration.
2575# This directory was configured as follows,
2576# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2577#
2578# $0 $ac_configure_args
2579#
2580# Compiler output produced by configure, useful for debugging
2581# configure, is in ./config.log if it exists.
2582
2583ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2584for ac_option
2585do
2586  case "\$ac_option" in
2587  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2588    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2589    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2590  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2591    echo "$CONFIG_STATUS generated by autoconf version 2.12"
2592    exit 0 ;;
2593  -help | --help | --hel | --he | --h)
2594    echo "\$ac_cs_usage"; exit 0 ;;
2595  *) echo "\$ac_cs_usage"; exit 1 ;;
2596  esac
2597done
2598
2599ac_given_srcdir=$srcdir
2600
2601trap 'rm -fr `echo "Makefile tkConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2602EOF
2603cat >> $CONFIG_STATUS <<EOF
2604
2605# Protect against being on the right side of a sed subst in config.status.
2606sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2607 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2608$ac_vpsub
2609$extrasub
2610s%@CFLAGS@%$CFLAGS%g
2611s%@CPPFLAGS@%$CPPFLAGS%g
2612s%@CXXFLAGS@%$CXXFLAGS%g
2613s%@DEFS@%$DEFS%g
2614s%@LDFLAGS@%$LDFLAGS%g
2615s%@LIBS@%$LIBS%g
2616s%@exec_prefix@%$exec_prefix%g
2617s%@prefix@%$prefix%g
2618s%@program_transform_name@%$program_transform_name%g
2619s%@bindir@%$bindir%g
2620s%@sbindir@%$sbindir%g
2621s%@libexecdir@%$libexecdir%g
2622s%@datadir@%$datadir%g
2623s%@sysconfdir@%$sysconfdir%g
2624s%@sharedstatedir@%$sharedstatedir%g
2625s%@localstatedir@%$localstatedir%g
2626s%@libdir@%$libdir%g
2627s%@includedir@%$includedir%g
2628s%@oldincludedir@%$oldincludedir%g
2629s%@infodir@%$infodir%g
2630s%@mandir@%$mandir%g
2631s%@RANLIB@%$RANLIB%g
2632s%@CC@%$CC%g
2633s%@CPP@%$CPP%g
2634s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
2635s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
2636s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
2637s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
2638s%@TK_DBGX@%$TK_DBGX%g
2639s%@DL_LIBS@%$DL_LIBS%g
2640s%@LD_FLAGS@%$LD_FLAGS%g
2641s%@MATH_LIBS@%$MATH_LIBS%g
2642s%@MAKE_LIB@%$MAKE_LIB%g
2643s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
2644s%@SHLIB_LD@%$SHLIB_LD%g
2645s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
2646s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
2647s%@SHLIB_VERSION@%$SHLIB_VERSION%g
2648s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
2649s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
2650s%@TCL_DBGX@%$TCL_DBGX%g
2651s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
2652s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
2653s%@TCL_VERSION@%$TCL_VERSION%g
2654s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
2655s%@TK_CC_SEARCH_FLAGS@%$TK_CC_SEARCH_FLAGS%g
2656s%@TK_LD_SEARCH_FLAGS@%$TK_LD_SEARCH_FLAGS%g
2657s%@TK_LIB_FILE@%$TK_LIB_FILE%g
2658s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
2659s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
2660s%@TK_MAJOR_VERSION@%$TK_MAJOR_VERSION%g
2661s%@TK_MINOR_VERSION@%$TK_MINOR_VERSION%g
2662s%@TK_PATCH_LEVEL@%$TK_PATCH_LEVEL%g
2663s%@TK_SHLIB_CFLAGS@%$TK_SHLIB_CFLAGS%g
2664s%@TK_SRC_DIR@%$TK_SRC_DIR%g
2665s%@TK_VERSION@%$TK_VERSION%g
2666s%@XINCLUDES@%$XINCLUDES%g
2667s%@XLIBSW@%$XLIBSW%g
2668s%@TK_SHARED_BUILD@%$TK_SHARED_BUILD%g
2669
2670CEOF
2671EOF
2672
2673cat >> $CONFIG_STATUS <<\EOF
2674
2675# Split the substitutions into bite-sized pieces for seds with
2676# small command number limits, like on Digital OSF/1 and HP-UX.
2677ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2678ac_file=1 # Number of current file.
2679ac_beg=1 # First line for current file.
2680ac_end=$ac_max_sed_cmds # Line after last line for current file.
2681ac_more_lines=:
2682ac_sed_cmds=""
2683while $ac_more_lines; do
2684  if test $ac_beg -gt 1; then
2685    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2686  else
2687    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2688  fi
2689  if test ! -s conftest.s$ac_file; then
2690    ac_more_lines=false
2691    rm -f conftest.s$ac_file
2692  else
2693    if test -z "$ac_sed_cmds"; then
2694      ac_sed_cmds="sed -f conftest.s$ac_file"
2695    else
2696      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2697    fi
2698    ac_file=`expr $ac_file + 1`
2699    ac_beg=$ac_end
2700    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2701  fi
2702done
2703if test -z "$ac_sed_cmds"; then
2704  ac_sed_cmds=cat
2705fi
2706EOF
2707
2708cat >> $CONFIG_STATUS <<EOF
2709
2710CONFIG_FILES=\${CONFIG_FILES-"Makefile tkConfig.sh"}
2711EOF
2712cat >> $CONFIG_STATUS <<\EOF
2713for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2714  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2715  case "$ac_file" in
2716  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2717       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2718  *) ac_file_in="${ac_file}.in" ;;
2719  esac
2720
2721  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2722
2723  # Remove last slash and all that follows it.  Not all systems have dirname.
2724  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2725  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2726    # The file is in a subdirectory.
2727    test ! -d "$ac_dir" && mkdir "$ac_dir"
2728    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2729    # A "../" for each directory in $ac_dir_suffix.
2730    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2731  else
2732    ac_dir_suffix= ac_dots=
2733  fi
2734
2735  case "$ac_given_srcdir" in
2736  .)  srcdir=.
2737      if test -z "$ac_dots"; then top_srcdir=.
2738      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2739  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2740  *) # Relative path.
2741    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2742    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2743  esac
2744
2745
2746  echo creating "$ac_file"
2747  rm -f "$ac_file"
2748  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2749  case "$ac_file" in
2750  *Makefile*) ac_comsub="1i\\
2751# $configure_input" ;;
2752  *) ac_comsub= ;;
2753  esac
2754
2755  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2756  sed -e "$ac_comsub
2757s%@configure_input@%$configure_input%g
2758s%@srcdir@%$srcdir%g
2759s%@top_srcdir@%$top_srcdir%g
2760" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2761fi; done
2762rm -f conftest.s*
2763
2764EOF
2765cat >> $CONFIG_STATUS <<EOF
2766
2767EOF
2768cat >> $CONFIG_STATUS <<\EOF
2769
2770exit 0
2771EOF
2772chmod +x $CONFIG_STATUS
2773rm -fr confdefs* $ac_clean_files
2774test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2775
Note: See TracBrowser for help on using the browser.